@nysds/nys-icon 1.20.1 → 1.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/nys-icon.js CHANGED
@@ -1,236 +1,236 @@
1
- import { LitElement as Bn, unsafeCSS as Wn, html as Yn } from "lit";
2
- import { property as nt, state as $n } from "lit/decorators.js";
1
+ import { LitElement as Jn, unsafeCSS as Qn, html as to } from "lit";
2
+ import { property as J, state as eo } from "lit/decorators.js";
3
3
  /*!
4
4
  * █▄ █ █ █ █▀▀▀█ █▀▀▄ █▀▀▀█
5
5
  * █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
6
6
  * █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
7
7
  *
8
- * Icon Component v1.20.1
8
+ * Icon Component v1.21.1
9
9
  * Part of the New York State Design System
10
10
  * Repository: https://github.com/its-hcd/nysds
11
11
  * License: MIT
12
12
  */
13
13
  /*!
14
- * New York State Design System v1.20.1
14
+ * New York State Design System v1.21.1
15
15
  * Description: A design system for New York State's digital products.
16
16
  * Repository: https://github.com/its-hcd/nysds
17
17
  * License: MIT
18
18
  */
19
- let jn = 0;
20
- function Xn(i) {
21
- return `${i}-${Date.now()}-${jn++}`;
19
+ let no = 0;
20
+ function oo(o) {
21
+ return `${o}-${Date.now()}-${no++}`;
22
22
  }
23
- const Vn = (i) => {
24
- class n extends i {
23
+ const io = (o) => {
24
+ class n extends o {
25
25
  get idPrefix() {
26
26
  return this.localName || "nys-element";
27
27
  }
28
28
  ensureId() {
29
- this.id || (this.id = Xn(this.idPrefix));
29
+ this.id || (this.id = oo(this.idPrefix));
30
30
  }
31
31
  connectedCallback() {
32
32
  super.connectedCallback(), this.ensureId();
33
33
  }
34
34
  }
35
35
  return n;
36
- }, qn = /* @__PURE__ */ Vn(Bn), Ot = globalThis.__nysIconRegistry ??= /* @__PURE__ */ new Map(), mt = globalThis.__nysIconWatchers ??= /* @__PURE__ */ new Map();
37
- let oe = null, Be = null;
38
- async function Kn() {
39
- return oe || (Be ??= import("./nys-icon.library-DHBltclg.js").then(
40
- (i) => oe = i.default
41
- ), Be);
36
+ }, ro = /* @__PURE__ */ io(Jn), wt = globalThis.__nysIconRegistry ??= /* @__PURE__ */ new Map(), ut = globalThis.__nysIconWatchers ??= /* @__PURE__ */ new Map();
37
+ let le = null, Ze = null;
38
+ async function so() {
39
+ return le || (Ze ??= import("./nys-icon.library-BxwfG3ym.js").then(
40
+ (o) => le = o.default
41
+ ), Ze);
42
42
  }
43
- function Zn() {
44
- if (globalThis.__nysIconDefaultRegistered || Ot.has("default")) {
43
+ function ao() {
44
+ if (globalThis.__nysIconDefaultRegistered || wt.has("default")) {
45
45
  globalThis.__nysIconDefaultRegistered = !0;
46
46
  return;
47
47
  }
48
- globalThis.__nysIconDefaultRegistered = !0, Ot.set("default", {
49
- resolver: async (i) => {
50
- if (!i) return;
51
- const s = (await Kn())[i];
48
+ globalThis.__nysIconDefaultRegistered = !0, wt.set("default", {
49
+ resolver: async (o) => {
50
+ if (!o) return;
51
+ const s = (await so())[o];
52
52
  return s ? { type: "svg", content: s } : void 0;
53
53
  }
54
54
  });
55
55
  }
56
- function Ui(i, n) {
57
- Ot.set(i, n), mt.get(i)?.forEach((s) => s.redraw());
56
+ function Jo(o, n) {
57
+ wt.set(o, n), ut.get(o)?.forEach((s) => s.redraw());
58
58
  }
59
- function Hi(i) {
60
- Ot.delete(i), mt.get(i)?.forEach((n) => n.redraw());
59
+ function Qo(o) {
60
+ wt.delete(o), ut.get(o)?.forEach((n) => n.redraw());
61
61
  }
62
- function Jn(i) {
63
- return Zn(), Ot.get(i);
62
+ function lo(o) {
63
+ return ao(), wt.get(o);
64
64
  }
65
- function We(i, n) {
66
- mt.has(i) || mt.set(i, /* @__PURE__ */ new Set()), mt.get(i).add(n);
65
+ function Je(o, n) {
66
+ ut.has(o) || ut.set(o, /* @__PURE__ */ new Set()), ut.get(o).add(n);
67
67
  }
68
- function Ye(i, n) {
69
- mt.get(i)?.delete(n);
68
+ function Qe(o, n) {
69
+ ut.get(o)?.delete(n);
70
70
  }
71
- /*! @license DOMPurify 3.4.12 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.12/LICENSE */
72
- function $e(i, n) {
73
- (n == null || n > i.length) && (n = i.length);
74
- for (var s = 0, l = Array(n); s < n; s++) l[s] = i[s];
75
- return l;
71
+ /*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */
72
+ function tn(o, n) {
73
+ (n == null || n > o.length) && (n = o.length);
74
+ for (var s = 0, c = Array(n); s < n; s++) c[s] = o[s];
75
+ return c;
76
76
  }
77
- function Qn(i) {
78
- if (Array.isArray(i)) return i;
77
+ function co(o) {
78
+ if (Array.isArray(o)) return o;
79
79
  }
80
- function ti(i, n) {
81
- var s = i == null ? null : typeof Symbol < "u" && i[Symbol.iterator] || i["@@iterator"];
80
+ function uo(o, n) {
81
+ var s = o == null ? null : typeof Symbol < "u" && o[Symbol.iterator] || o["@@iterator"];
82
82
  if (s != null) {
83
- var l, u, m, A, dt = [], M = !0, ht = !1;
83
+ var c, u, m, T, pt = [], N = !0, mt = !1;
84
84
  try {
85
- if (m = (s = s.call(i)).next, n !== 0) for (; !(M = (l = m.call(s)).done) && (dt.push(l.value), dt.length !== n); M = !0) ;
86
- } catch (kt) {
87
- ht = !0, u = kt;
85
+ if (m = (s = s.call(o)).next, n !== 0) for (; !(N = (c = m.call(s)).done) && (pt.push(c.value), pt.length !== n); N = !0) ;
86
+ } catch (Gt) {
87
+ mt = !0, u = Gt;
88
88
  } finally {
89
89
  try {
90
- if (!M && s.return != null && (A = s.return(), Object(A) !== A)) return;
90
+ if (!N && s.return != null && (T = s.return(), Object(T) !== T)) return;
91
91
  } finally {
92
- if (ht) throw u;
92
+ if (mt) throw u;
93
93
  }
94
94
  }
95
- return dt;
95
+ return pt;
96
96
  }
97
97
  }
98
- function ei() {
98
+ function fo() {
99
99
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
100
100
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
101
101
  }
102
- function ni(i, n) {
103
- return Qn(i) || ti(i, n) || ii(i, n) || ei();
102
+ function po(o, n) {
103
+ return co(o) || uo(o, n) || mo(o, n) || fo();
104
104
  }
105
- function ii(i, n) {
106
- if (i) {
107
- if (typeof i == "string") return $e(i, n);
108
- var s = {}.toString.call(i).slice(8, -1);
109
- return s === "Object" && i.constructor && (s = i.constructor.name), s === "Map" || s === "Set" ? Array.from(i) : s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? $e(i, n) : void 0;
105
+ function mo(o, n) {
106
+ if (o) {
107
+ if (typeof o == "string") return tn(o, n);
108
+ var s = {}.toString.call(o).slice(8, -1);
109
+ return s === "Object" && o.constructor && (s = o.constructor.name), s === "Map" || s === "Set" ? Array.from(o) : s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? tn(o, n) : void 0;
110
110
  }
111
111
  }
112
- const ln = Object.entries, je = Object.setPrototypeOf, oi = Object.isFrozen, ri = Object.getPrototypeOf, si = Object.getOwnPropertyDescriptor;
113
- let O = Object.freeze, w = Object.seal, pt = Object.create, cn = typeof Reflect < "u" && Reflect, ue = cn.apply, fe = cn.construct;
114
- O || (O = function(n) {
112
+ const gn = Object.entries, en = Object.setPrototypeOf, ho = Object.isFrozen, _o = Object.getPrototypeOf, go = Object.getOwnPropertyDescriptor;
113
+ let b = Object.freeze, S = Object.seal, ct = Object.create, yn = typeof Reflect < "u" && Reflect, he = yn.apply, _e = yn.construct;
114
+ b || (b = function(n) {
115
115
  return n;
116
116
  });
117
- w || (w = function(n) {
117
+ S || (S = function(n) {
118
118
  return n;
119
119
  });
120
- ue || (ue = function(n, s) {
121
- for (var l = arguments.length, u = new Array(l > 2 ? l - 2 : 0), m = 2; m < l; m++)
120
+ he || (he = function(n, s) {
121
+ for (var c = arguments.length, u = new Array(c > 2 ? c - 2 : 0), m = 2; m < c; m++)
122
122
  u[m - 2] = arguments[m];
123
123
  return n.apply(s, u);
124
124
  });
125
- fe || (fe = function(n) {
126
- for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++)
127
- l[u - 1] = arguments[u];
128
- return new n(...l);
125
+ _e || (_e = function(n) {
126
+ for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++)
127
+ c[u - 1] = arguments[u];
128
+ return new n(...c);
129
129
  });
130
- const ut = E(Array.prototype.forEach), ai = E(Array.prototype.lastIndexOf), Xe = E(Array.prototype.pop), ft = E(Array.prototype.push), li = E(Array.prototype.splice), X = Array.isArray, bt = E(String.prototype.toLowerCase), re = E(String.prototype.toString), Ve = E(String.prototype.match), Et = E(String.prototype.replace), qe = E(String.prototype.indexOf), ci = E(String.prototype.trim), ui = E(Number.prototype.toString), fi = E(Boolean.prototype.toString), Ke = typeof BigInt > "u" ? null : E(BigInt.prototype.toString), Ze = typeof Symbol > "u" ? null : E(Symbol.prototype.toString), S = E(Object.prototype.hasOwnProperty), At = E(Object.prototype.toString), b = E(RegExp.prototype.test), et = pi(TypeError);
131
- function E(i) {
130
+ const Z = A(Array.prototype.forEach), yo = A(Array.prototype.lastIndexOf), nn = A(Array.prototype.pop), Tt = A(Array.prototype.push), To = A(Array.prototype.splice), ft = Array.isArray, bt = A(String.prototype.toLowerCase), ce = A(String.prototype.toString), on = A(String.prototype.match), Et = A(String.prototype.replace), rn = A(String.prototype.indexOf), Eo = A(String.prototype.trim), Ao = A(Number.prototype.toString), bo = A(Boolean.prototype.toString), sn = typeof BigInt > "u" ? null : A(BigInt.prototype.toString), an = typeof Symbol > "u" ? null : A(Symbol.prototype.toString), D = A(Object.prototype.hasOwnProperty), At = A(Object.prototype.toString), w = A(RegExp.prototype.test), K = So(TypeError);
131
+ function A(o) {
132
132
  return function(n) {
133
133
  n instanceof RegExp && (n.lastIndex = 0);
134
- for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++)
135
- l[u - 1] = arguments[u];
136
- return ue(i, n, l);
134
+ for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++)
135
+ c[u - 1] = arguments[u];
136
+ return he(o, n, c);
137
137
  };
138
138
  }
139
- function pi(i) {
139
+ function So(o) {
140
140
  return function() {
141
- for (var n = arguments.length, s = new Array(n), l = 0; l < n; l++)
142
- s[l] = arguments[l];
143
- return fe(i, s);
141
+ for (var n = arguments.length, s = new Array(n), c = 0; c < n; c++)
142
+ s[c] = arguments[c];
143
+ return _e(o, s);
144
144
  };
145
145
  }
146
- function p(i, n) {
146
+ function p(o, n) {
147
147
  let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : bt;
148
- if (je && je(i, null), !X(n))
149
- return i;
150
- let l = n.length;
151
- for (; l--; ) {
152
- let u = n[l];
148
+ if (en && en(o, null), !ft(n))
149
+ return o;
150
+ let c = n.length;
151
+ for (; c--; ) {
152
+ let u = n[c];
153
153
  if (typeof u == "string") {
154
154
  const m = s(u);
155
- m !== u && (oi(n) || (n[l] = m), u = m);
155
+ m !== u && (ho(n) || (n[c] = m), u = m);
156
156
  }
157
- i[u] = !0;
157
+ o[u] = !0;
158
158
  }
159
- return i;
159
+ return o;
160
160
  }
161
- function mi(i) {
162
- for (let n = 0; n < i.length; n++)
163
- S(i, n) || (i[n] = null);
164
- return i;
161
+ function wo(o) {
162
+ for (let n = 0; n < o.length; n++)
163
+ D(o, n) || (o[n] = null);
164
+ return o;
165
165
  }
166
- function L(i) {
167
- const n = pt(null);
168
- for (const l of ln(i)) {
169
- var s = ni(l, 2);
166
+ function C(o) {
167
+ const n = ct(null);
168
+ for (const c of gn(o)) {
169
+ var s = po(c, 2);
170
170
  const u = s[0], m = s[1];
171
- S(i, u) && (X(m) ? n[u] = mi(m) : m && typeof m == "object" && m.constructor === Object ? n[u] = L(m) : n[u] = m);
171
+ D(o, u) && (ft(m) ? n[u] = wo(m) : m && typeof m == "object" && m.constructor === Object ? n[u] = C(m) : n[u] = m);
172
172
  }
173
173
  return n;
174
174
  }
175
- function di(i) {
176
- switch (typeof i) {
175
+ function Oo(o) {
176
+ switch (typeof o) {
177
177
  case "string":
178
- return i;
178
+ return o;
179
179
  case "number":
180
- return ui(i);
180
+ return Ao(o);
181
181
  case "boolean":
182
- return fi(i);
182
+ return bo(o);
183
183
  case "bigint":
184
- return Ke ? Ke(i) : "0";
184
+ return sn ? sn(o) : "0";
185
185
  case "symbol":
186
- return Ze ? Ze(i) : "Symbol()";
186
+ return an ? an(o) : "Symbol()";
187
187
  case "undefined":
188
- return At(i);
188
+ return At(o);
189
189
  case "function":
190
190
  case "object": {
191
- if (i === null)
192
- return At(i);
193
- const n = i, s = H(n, "toString");
191
+ if (o === null)
192
+ return At(o);
193
+ const n = o, s = M(n, "toString");
194
194
  if (typeof s == "function") {
195
- const l = s(n);
196
- return typeof l == "string" ? l : At(l);
195
+ const c = s(n);
196
+ return typeof c == "string" ? c : At(c);
197
197
  }
198
- return At(i);
198
+ return At(o);
199
199
  }
200
200
  default:
201
- return At(i);
201
+ return At(o);
202
202
  }
203
203
  }
204
- function H(i, n) {
205
- for (; i !== null; ) {
206
- const l = si(i, n);
207
- if (l) {
208
- if (l.get)
209
- return E(l.get);
210
- if (typeof l.value == "function")
211
- return E(l.value);
204
+ function M(o, n) {
205
+ for (; o !== null; ) {
206
+ const c = go(o, n);
207
+ if (c) {
208
+ if (c.get)
209
+ return A(c.get);
210
+ if (typeof c.value == "function")
211
+ return A(c.value);
212
212
  }
213
- i = ri(i);
213
+ o = _o(o);
214
214
  }
215
215
  function s() {
216
216
  return null;
217
217
  }
218
218
  return s;
219
219
  }
220
- function hi(i) {
220
+ function Ro(o) {
221
221
  try {
222
- return b(i, ""), !0;
222
+ return w(o, ""), !0;
223
223
  } catch {
224
224
  return !1;
225
225
  }
226
226
  }
227
- const Je = O(["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"]), se = O(["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"]), ae = O(["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"]), _i = O(["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"]), le = O(["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"]), Ti = O(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Qe = O(["#text"]), tn = O(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "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"]), ce = O(["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", "dominant-baseline", "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-orientation", "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"]), en = O(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "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"]), xt = O(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), gi = w(/{{[\w\W]*|^[\w\W]*}}/g), yi = w(/<%[\w\W]*|^[\w\W]*%>/g), Ei = w(/\${[\w\W]*/g), Ai = w(/^data-[\-\w.\u00B7-\uFFFF]+$/), bi = w(/^aria-[\-\w]+$/), nn = w(
227
+ const ln = b(["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"]), ue = b(["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"]), fe = b(["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"]), Lo = b(["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"]), pe = b(["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"]), Io = b(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), cn = b(["#text"]), un = b(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "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"]), me = b(["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", "dominant-baseline", "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", "pointer-events", "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-orientation", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "vector-effect", "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"]), fn = b(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "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"]), Ht = b(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Do = S(/{{[\w\W]*|^[\w\W]*}}/g), No = S(/<%[\w\W]*|^[\w\W]*%>/g), vo = S(/\${[\w\W]*/g), Co = S(/^data-[\-\w.\u00B7-\uFFFF]+$/), Mo = S(/^aria-[\-\w]+$/), pn = S(
228
228
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
229
229
  // eslint-disable-line no-useless-escape
230
- ), Si = w(/^(?:\w+script|data):/i), Oi = w(
230
+ ), xo = S(/^(?:\w+script|data):/i), Po = S(
231
231
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
232
232
  // eslint-disable-line no-control-regex
233
- ), wi = w(/^html$/i), Ri = w(/^[a-z][.\w]*(-[.\w]+)+$/i), on = w(/<[/\w!]/g), rn = w(/<[/\w]/g), Ii = w(/<\/no(script|embed|frames)/i), Ni = w(/\/>/i), v = {
233
+ ), zo = S(/^html$/i), ko = S(/^[a-z][.\w]*(-[.\w]+)+$/i), mn = S(/<[/\w!]/g), dn = S(/<[/\w]/g), Uo = S(/<\/no(script|embed|frames)/i), Fo = S(/\/>/i), v = {
234
234
  element: 1,
235
235
  attribute: 2,
236
236
  text: 3,
@@ -246,28 +246,33 @@ const Je = O(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
246
246
  documentFragment: 11,
247
247
  notation: 12
248
248
  // Deprecated
249
- }, Li = function() {
249
+ }, Tn = ["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"], Ho = b(p({}, Tn)), Go = (function() {
250
+ const o = {};
251
+ return Z(Tn, (n) => {
252
+ o[n] = S(new RegExp("</" + n + "(?=[\\t\\n\\f\\r />])", "i"));
253
+ }), b(o);
254
+ })(), Wo = function() {
250
255
  return typeof window > "u" ? null : window;
251
- }, Di = function(n, s) {
256
+ }, Bo = function(n, s) {
252
257
  if (typeof n != "object" || typeof n.createPolicy != "function")
253
258
  return null;
254
- let l = null;
259
+ let c = null;
255
260
  const u = "data-tt-policy-suffix";
256
- s && s.hasAttribute(u) && (l = s.getAttribute(u));
257
- const m = "dompurify" + (l ? "#" + l : "");
261
+ s && s.hasAttribute(u) && (c = s.getAttribute(u));
262
+ const m = "dompurify" + (c ? "#" + c : "");
258
263
  try {
259
264
  return n.createPolicy(m, {
260
- createHTML(A) {
261
- return A;
265
+ createHTML(T) {
266
+ return T;
262
267
  },
263
- createScriptURL(A) {
264
- return A;
268
+ createScriptURL(T) {
269
+ return T;
265
270
  }
266
271
  });
267
272
  } catch {
268
273
  return console.warn("TrustedTypes policy " + m + " could not be created."), null;
269
274
  }
270
- }, sn = function() {
275
+ }, hn = function() {
271
276
  return {
272
277
  afterSanitizeAttributes: [],
273
278
  afterSanitizeElements: [],
@@ -279,53 +284,60 @@ const Je = O(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
279
284
  uponSanitizeElement: [],
280
285
  uponSanitizeShadowNode: []
281
286
  };
282
- }, j = function(n, s, l, u) {
283
- return S(n, s) && X(n[s]) ? p(u.base ? L(u.base) : {}, n[s], u.transform) : l;
287
+ }, G = function(n, s, c, u) {
288
+ return D(n, s) && ft(n[s]) ? p(u.base ? C(u.base) : {}, n[s], u.transform) : c;
289
+ }, de = function(n, s, c) {
290
+ const u = D(n, s) ? n[s] : void 0;
291
+ return u && typeof u == "object" ? C(u) : c();
284
292
  };
285
- function un() {
286
- let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Li();
287
- const n = (r) => un(r);
288
- if (n.version = "3.4.12", n.removed = [], !i || !i.document || i.document.nodeType !== v.document || !i.Element)
293
+ function En() {
294
+ let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Wo();
295
+ const n = (r) => En(r);
296
+ if (n.version = "3.4.14", n.removed = [], !o || !o.document || o.document.nodeType !== v.document || !o.Element)
289
297
  return n.isSupported = !1, n;
290
- let s = i.document;
291
- const l = s, u = l.currentScript;
292
- i.DocumentFragment;
293
- const m = i.HTMLTemplateElement, A = i.Node, dt = i.Element, M = i.NodeFilter, ht = i.NamedNodeMap;
294
- ht === void 0 && (i.NamedNodeMap || i.MozNamedAttrMap), i.HTMLFormElement;
295
- const kt = i.DOMParser, wt = i.trustedTypes, K = dt.prototype, pn = H(K, "cloneNode"), zt = H(K, "remove"), mn = H(K, "nextSibling"), it = H(K, "childNodes"), Z = H(K, "parentNode"), me = H(K, "shadowRoot"), Ft = H(K, "attributes"), I = A && A.prototype ? H(A.prototype, "nodeType") : null, k = A && A.prototype ? H(A.prototype, "nodeName") : null;
298
+ let s = o.document;
299
+ const c = s, u = c.currentScript;
300
+ o.DocumentFragment;
301
+ const m = o.HTMLTemplateElement, T = o.Node, pt = o.Element, N = o.NodeFilter, mt = o.NamedNodeMap;
302
+ mt === void 0 && (o.NamedNodeMap || o.MozNamedAttrMap), o.HTMLFormElement;
303
+ const Gt = o.DOMParser, Ot = o.trustedTypes, Y = pt.prototype, bn = M(Y, "cloneNode"), Wt = M(Y, "remove"), Sn = M(Y, "nextSibling"), Q = M(Y, "childNodes"), tt = M(Y, "parentNode"), ye = M(Y, "shadowRoot"), Bt = M(Y, "attributes"), $ = T && T.prototype ? M(T.prototype, "nodeType") : null, et = T && T.prototype ? M(T.prototype, "nodeName") : null, Rt = T && T.prototype ? M(T.prototype, "ownerDocument") : null, dt = function(t) {
304
+ return $ ? $(t) : t.nodeType;
305
+ }, Yt = function(t) {
306
+ return et ? et(t) : t.nodeName;
307
+ };
296
308
  if (typeof m == "function") {
297
309
  const r = s.createElement("template");
298
310
  r.content && r.content.ownerDocument && (s = r.content.ownerDocument);
299
311
  }
300
- let D, J = "", Ut, de = !1, _t = 0;
301
- const he = function() {
302
- if (_t > 0)
303
- throw et('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
304
- }, ot = function(t) {
305
- he(), _t++;
312
+ let R, j = "", $t, Te = !1, ht = 0;
313
+ const Ee = function() {
314
+ if (ht > 0)
315
+ throw K('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
316
+ }, nt = function(t) {
317
+ Ee(), ht++;
306
318
  try {
307
- return D.createHTML(t);
319
+ return R.createHTML(t);
308
320
  } finally {
309
- _t--;
321
+ ht--;
310
322
  }
311
- }, dn = function(t) {
312
- he(), _t++;
323
+ }, wn = function(t) {
324
+ Ee(), ht++;
313
325
  try {
314
- return D.createScriptURL(t);
326
+ return R.createScriptURL(t);
315
327
  } finally {
316
- _t--;
328
+ ht--;
317
329
  }
318
- }, hn = function() {
319
- return de || (Ut = Di(wt, u), de = !0), Ut;
320
- }, Rt = s, Ht = Rt.implementation, _e = Rt.createNodeIterator, _n = Rt.createDocumentFragment, Tn = Rt.getElementsByTagName, gn = l.importNode;
321
- let h = sn();
322
- n.isSupported = typeof ln == "function" && typeof Z == "function" && Ht && Ht.createHTMLDocument !== void 0;
323
- const yn = gi, En = yi, An = Ei, bn = Ai, Sn = bi, On = Si, Te = Oi, wn = Ri;
324
- let ge = nn, _ = null;
325
- const ye = p({}, [...Je, ...se, ...ae, ...le, ...Qe]);
326
- let T = null;
327
- const Ee = p({}, [...tn, ...ce, ...en, ...xt]);
328
- let g = Object.seal(pt(null, {
330
+ }, On = function() {
331
+ return Te || ($t = Bo(Ot, u), Te = !0), $t;
332
+ }, Lt = s, jt = Lt.implementation, Ae = Lt.createNodeIterator, Rn = Lt.createDocumentFragment, Ln = Lt.getElementsByTagName, In = c.importNode;
333
+ let h = hn();
334
+ n.isSupported = typeof gn == "function" && typeof tt == "function" && jt && jt.createHTMLDocument !== void 0;
335
+ const Dn = Do, Nn = No, vn = vo, Cn = Co, Mn = Mo, xn = xo, be = Po, Pn = ko;
336
+ let Se = pn, _ = null;
337
+ const Xt = p({}, [...ln, ...ue, ...fe, ...pe, ...cn]);
338
+ let g = null;
339
+ const Vt = p({}, [...un, ...me, ...fn, ...Ht]);
340
+ let x = Object.seal(ct(null, {
329
341
  tagNameCheck: {
330
342
  writable: !0,
331
343
  configurable: !1,
@@ -344,8 +356,8 @@ function un() {
344
356
  enumerable: !0,
345
357
  value: !1
346
358
  }
347
- })), Tt = null, Ae = null;
348
- const B = Object.seal(pt(null, {
359
+ })), _t = null, we = null;
360
+ const U = Object.seal(ct(null, {
349
361
  tagCheck: {
350
362
  writable: !0,
351
363
  configurable: !1,
@@ -359,10 +371,10 @@ function un() {
359
371
  value: null
360
372
  }
361
373
  }));
362
- let be = !0, Gt = !0, Se = !1, Oe = !0, W = !1, Y = !0, Q = !1, Bt = !1, Wt = null, Yt = null, $t = !1, rt = !1, It = !1, Nt = !1, we = !0, Re = !1;
363
- const Ie = "user-content-";
364
- let jt = !0, Xt = !1, st = {}, z = null;
365
- const Vt = p({}, [
374
+ let Oe = !0, qt = !0, Re = !1, Le = !0, F = !1, X = !0, V = !1, Kt = !1, It = null, Dt = null, Zt = !1, ot = !1, Nt = !1, vt = !1, Ie = !0, De = !1;
375
+ const Ne = "user-content-";
376
+ let Jt = !0, Qt = !1, it = {}, rt = null;
377
+ const ve = p({}, [
366
378
  "annotation-xml",
367
379
  "audio",
368
380
  "colgroup",
@@ -399,124 +411,146 @@ function un() {
399
411
  "video",
400
412
  "xmp"
401
413
  ]);
402
- let Ne = null;
403
- const Le = p({}, ["audio", "video", "img", "source", "image", "track"]);
404
- let qt = null;
405
- const De = p({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Lt = "http://www.w3.org/1998/Math/MathML", Dt = "http://www.w3.org/2000/svg", F = "http://www.w3.org/1999/xhtml";
406
- let at = F, Kt = !1, Zt = null;
407
- const Rn = p({}, [Lt, Dt, F], re), Ce = O(["mi", "mo", "mn", "ms", "mtext"]);
408
- let Jt = p({}, Ce);
409
- const Me = O(["annotation-xml"]);
410
- let Qt = p({}, Me);
411
- const In = p({}, ["title", "style", "font", "a", "script"]);
414
+ let Ce = null;
415
+ const Me = p({}, ["audio", "video", "img", "source", "image", "track"]);
416
+ let xe = null;
417
+ const Pe = p({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Ct = "http://www.w3.org/1998/Math/MathML", Mt = "http://www.w3.org/2000/svg", P = "http://www.w3.org/1999/xhtml";
418
+ let st = P, te = !1, ee = null;
419
+ const zn = p({}, [Ct, Mt, P], ce), ze = b(["mi", "mo", "mn", "ms", "mtext"]);
420
+ let ne = p({}, ze);
421
+ const ke = b(["annotation-xml"]);
422
+ let oe = p({}, ke);
423
+ const kn = p({}, ["title", "style", "font", "a", "script"]);
412
424
  let gt = null;
413
- const Nn = ["application/xhtml+xml", "text/html"], Ln = "text/html";
414
- let d = null, lt = null;
415
- const Dn = s.createElement("form"), ve = function(t) {
425
+ const Un = ["application/xhtml+xml", "text/html"], Fn = "text/html";
426
+ let E = null, at = null;
427
+ const Hn = s.createElement("form"), Ue = function(t) {
416
428
  return t instanceof RegExp || t instanceof Function;
417
- }, te = function() {
429
+ }, ie = function() {
418
430
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
419
- if (lt && lt === t)
431
+ if (at && at === t)
420
432
  return;
421
- (!t || typeof t != "object") && (t = {}), t = L(t), gt = // eslint-disable-next-line unicorn/prefer-includes
422
- Nn.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? Ln : t.PARSER_MEDIA_TYPE, d = gt === "application/xhtml+xml" ? re : bt, _ = j(t, "ALLOWED_TAGS", ye, {
423
- transform: d
424
- }), T = j(t, "ALLOWED_ATTR", Ee, {
425
- transform: d
426
- }), Zt = j(t, "ALLOWED_NAMESPACES", Rn, {
427
- transform: re
428
- }), qt = j(t, "ADD_URI_SAFE_ATTR", De, {
429
- transform: d,
430
- base: De
431
- }), Ne = j(t, "ADD_DATA_URI_TAGS", Le, {
432
- transform: d,
433
- base: Le
434
- }), z = j(t, "FORBID_CONTENTS", Vt, {
435
- transform: d
436
- }), Tt = j(t, "FORBID_TAGS", L({}), {
437
- transform: d
438
- }), Ae = j(t, "FORBID_ATTR", L({}), {
439
- transform: d
440
- }), st = S(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? L(t.USE_PROFILES) : t.USE_PROFILES : !1, be = t.ALLOW_ARIA_ATTR !== !1, Gt = t.ALLOW_DATA_ATTR !== !1, Se = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Oe = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, W = t.SAFE_FOR_TEMPLATES || !1, Y = t.SAFE_FOR_XML !== !1, Q = t.WHOLE_DOCUMENT || !1, rt = t.RETURN_DOM || !1, It = t.RETURN_DOM_FRAGMENT || !1, Nt = t.RETURN_TRUSTED_TYPE || !1, $t = t.FORCE_BODY || !1, we = t.SANITIZE_DOM !== !1, Re = t.SANITIZE_NAMED_PROPS || !1, jt = t.KEEP_CONTENT !== !1, Xt = t.IN_PLACE || !1, ge = hi(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : nn, at = typeof t.NAMESPACE == "string" ? t.NAMESPACE : F, Jt = S(t, "MATHML_TEXT_INTEGRATION_POINTS") && t.MATHML_TEXT_INTEGRATION_POINTS && typeof t.MATHML_TEXT_INTEGRATION_POINTS == "object" ? L(t.MATHML_TEXT_INTEGRATION_POINTS) : p({}, Ce), Qt = S(t, "HTML_INTEGRATION_POINTS") && t.HTML_INTEGRATION_POINTS && typeof t.HTML_INTEGRATION_POINTS == "object" ? L(t.HTML_INTEGRATION_POINTS) : p({}, Me);
441
- const e = S(t, "CUSTOM_ELEMENT_HANDLING") && t.CUSTOM_ELEMENT_HANDLING && typeof t.CUSTOM_ELEMENT_HANDLING == "object" ? L(t.CUSTOM_ELEMENT_HANDLING) : pt(null);
442
- if (g = pt(null), S(e, "tagNameCheck") && ve(e.tagNameCheck) && (g.tagNameCheck = e.tagNameCheck), S(e, "attributeNameCheck") && ve(e.attributeNameCheck) && (g.attributeNameCheck = e.attributeNameCheck), S(e, "allowCustomizedBuiltInElements") && typeof e.allowCustomizedBuiltInElements == "boolean" && (g.allowCustomizedBuiltInElements = e.allowCustomizedBuiltInElements), w(g), W && (Gt = !1), It && (rt = !0), st && (_ = p({}, Qe), T = pt(null), st.html === !0 && (p(_, Je), p(T, tn)), st.svg === !0 && (p(_, se), p(T, ce), p(T, xt)), st.svgFilters === !0 && (p(_, ae), p(T, ce), p(T, xt)), st.mathMl === !0 && (p(_, le), p(T, en), p(T, xt))), B.tagCheck = null, B.attributeCheck = null, S(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? B.tagCheck = t.ADD_TAGS : X(t.ADD_TAGS) && (_ === ye && (_ = L(_)), p(_, t.ADD_TAGS, d))), S(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? B.attributeCheck = t.ADD_ATTR : X(t.ADD_ATTR) && (T === Ee && (T = L(T)), p(T, t.ADD_ATTR, d))), S(t, "ADD_URI_SAFE_ATTR") && X(t.ADD_URI_SAFE_ATTR) && p(qt, t.ADD_URI_SAFE_ATTR, d), S(t, "FORBID_CONTENTS") && X(t.FORBID_CONTENTS) && (z === Vt && (z = L(z)), p(z, t.FORBID_CONTENTS, d)), S(t, "ADD_FORBID_CONTENTS") && X(t.ADD_FORBID_CONTENTS) && (z === Vt && (z = L(z)), p(z, t.ADD_FORBID_CONTENTS, d)), jt && (_["#text"] = !0), Q && p(_, ["html", "head", "body"]), _.table && (p(_, ["tbody"]), delete Tt.tbody), t.TRUSTED_TYPES_POLICY) {
433
+ (!t || typeof t != "object") && (t = {}), t = C(t), gt = // eslint-disable-next-line unicorn/prefer-includes
434
+ Un.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? Fn : t.PARSER_MEDIA_TYPE, E = gt === "application/xhtml+xml" ? ce : bt, _ = G(t, "ALLOWED_TAGS", Xt, {
435
+ transform: E
436
+ }), g = G(t, "ALLOWED_ATTR", Vt, {
437
+ transform: E
438
+ }), ee = G(t, "ALLOWED_NAMESPACES", zn, {
439
+ transform: ce
440
+ }), xe = G(t, "ADD_URI_SAFE_ATTR", Pe, {
441
+ transform: E,
442
+ base: Pe
443
+ }), Ce = G(t, "ADD_DATA_URI_TAGS", Me, {
444
+ transform: E,
445
+ base: Me
446
+ }), rt = G(t, "FORBID_CONTENTS", ve, {
447
+ transform: E
448
+ }), _t = G(t, "FORBID_TAGS", C({}), {
449
+ transform: E
450
+ }), we = G(t, "FORBID_ATTR", C({}), {
451
+ transform: E
452
+ }), it = D(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? C(t.USE_PROFILES) : t.USE_PROFILES : !1, Oe = t.ALLOW_ARIA_ATTR !== !1, qt = t.ALLOW_DATA_ATTR !== !1, Re = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Le = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, F = t.SAFE_FOR_TEMPLATES || !1, X = t.SAFE_FOR_XML !== !1, V = t.WHOLE_DOCUMENT || !1, ot = t.RETURN_DOM || !1, Nt = t.RETURN_DOM_FRAGMENT || !1, vt = t.RETURN_TRUSTED_TYPE || !1, Zt = t.FORCE_BODY || !1, Ie = t.SANITIZE_DOM !== !1, De = t.SANITIZE_NAMED_PROPS || !1, Jt = t.KEEP_CONTENT !== !1, Qt = t.IN_PLACE || !1, Se = Ro(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : pn, st = typeof t.NAMESPACE == "string" ? t.NAMESPACE : P, ne = de(
453
+ t,
454
+ "MATHML_TEXT_INTEGRATION_POINTS",
455
+ () => p({}, ze)
456
+ // Default built-in map
457
+ ), oe = de(
458
+ t,
459
+ "HTML_INTEGRATION_POINTS",
460
+ () => p({}, ke)
461
+ // Default built-in map
462
+ );
463
+ const e = de(t, "CUSTOM_ELEMENT_HANDLING", () => ct(null));
464
+ if (x = ct(null), D(e, "tagNameCheck") && Ue(e.tagNameCheck) && (x.tagNameCheck = e.tagNameCheck), D(e, "attributeNameCheck") && Ue(e.attributeNameCheck) && (x.attributeNameCheck = e.attributeNameCheck), D(e, "allowCustomizedBuiltInElements") && typeof e.allowCustomizedBuiltInElements == "boolean" && (x.allowCustomizedBuiltInElements = e.allowCustomizedBuiltInElements), S(x), F && (qt = !1), Nt && (ot = !0), it && (_ = p({}, cn), g = ct(null), it.html === !0 && (p(_, ln), p(g, un)), it.svg === !0 && (p(_, ue), p(g, me), p(g, Ht)), it.svgFilters === !0 && (p(_, fe), p(g, me), p(g, Ht)), it.mathMl === !0 && (p(_, pe), p(g, fn), p(g, Ht))), U.tagCheck = null, U.attributeCheck = null, D(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? U.tagCheck = t.ADD_TAGS : ft(t.ADD_TAGS) && (_ === Xt && (_ = C(_)), p(_, t.ADD_TAGS, E))), D(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? U.attributeCheck = t.ADD_ATTR : ft(t.ADD_ATTR) && (g === Vt && (g = C(g)), p(g, t.ADD_ATTR, E))), D(t, "ADD_FORBID_CONTENTS") && ft(t.ADD_FORBID_CONTENTS) && (rt === ve && (rt = C(rt)), p(rt, t.ADD_FORBID_CONTENTS, E)), Jt && (_["#text"] = !0), V && p(_, ["html", "head", "body"]), _.table && (p(_, ["tbody"]), delete _t.tbody), t.TRUSTED_TYPES_POLICY) {
443
465
  if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function")
444
- throw et('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
466
+ throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
445
467
  if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function")
446
- throw et('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
447
- const o = D;
448
- D = t.TRUSTED_TYPES_POLICY;
468
+ throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
469
+ const i = R;
470
+ R = t.TRUSTED_TYPES_POLICY;
449
471
  try {
450
- J = ot("");
472
+ j = nt("");
451
473
  } catch (a) {
452
- throw D = o, a;
474
+ throw R = i, a;
453
475
  }
454
- } else t.TRUSTED_TYPES_POLICY === null ? (D = void 0, J = "") : (D === void 0 && (D = hn()), D && typeof J == "string" && (J = ot("")));
455
- O && O(t), lt = t;
456
- }, Pe = p({}, [...se, ...ae, ..._i]), xe = p({}, [...le, ...Ti]), Cn = function(t, e, o) {
457
- return e.namespaceURI === F ? t === "svg" : e.namespaceURI === Lt ? t === "svg" && (o === "annotation-xml" || Jt[o]) : !!Pe[t];
458
- }, Mn = function(t, e, o) {
459
- return e.namespaceURI === F ? t === "math" : e.namespaceURI === Dt ? t === "math" && Qt[o] : !!xe[t];
460
- }, vn = function(t, e, o) {
461
- return e.namespaceURI === Dt && !Qt[o] || e.namespaceURI === Lt && !Jt[o] ? !1 : !xe[t] && (In[t] || !Pe[t]);
462
- }, Pn = function(t) {
463
- let e = Z(t);
476
+ } else t.TRUSTED_TYPES_POLICY === null ? (R = void 0, j = "") : (R === void 0 && (R = On()), R && typeof j == "string" && (j = nt("")));
477
+ b && b(t), at = t;
478
+ }, Fe = p({}, [...ue, ...fe, ...Lo]), He = p({}, [...pe, ...Io]), Gn = function(t, e, i) {
479
+ return e.namespaceURI === P ? t === "svg" : e.namespaceURI === Ct ? t === "svg" && (i === "annotation-xml" || ne[i]) : !!Fe[t];
480
+ }, Wn = function(t, e, i) {
481
+ return e.namespaceURI === P ? t === "math" : e.namespaceURI === Mt ? t === "math" && oe[i] : !!He[t];
482
+ }, Bn = function(t, e, i) {
483
+ return e.namespaceURI === Mt && !oe[i] || e.namespaceURI === Ct && !ne[i] ? !1 : !He[t] && (kn[t] || !Fe[t]);
484
+ }, Yn = function(t) {
485
+ let e = tt(t);
464
486
  (!e || !e.tagName) && (e = {
465
- namespaceURI: at,
487
+ namespaceURI: st,
466
488
  tagName: "template"
467
489
  });
468
- const o = bt(t.tagName), a = bt(e.tagName);
469
- return Zt[t.namespaceURI] ? t.namespaceURI === Dt ? Cn(o, e, a) : t.namespaceURI === Lt ? Mn(o, e, a) : t.namespaceURI === F ? vn(o, e, a) : !!(gt === "application/xhtml+xml" && Zt[t.namespaceURI]) : !1;
470
- }, $ = function(t) {
471
- ft(n.removed, {
490
+ const i = bt(t.tagName), a = bt(e.tagName);
491
+ return ee[t.namespaceURI] ? t.namespaceURI === Mt ? Gn(i, e, a) : t.namespaceURI === Ct ? Wn(i, e, a) : t.namespaceURI === P ? Bn(i, e, a) : !!(gt === "application/xhtml+xml" && ee[t.namespaceURI]) : !1;
492
+ }, H = function(t) {
493
+ Tt(n.removed, {
472
494
  element: t
473
495
  });
474
496
  try {
475
- Z(t).removeChild(t);
497
+ tt(t).removeChild(t);
476
498
  } catch {
477
- if (zt(t), !Z(t))
478
- throw et("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
499
+ if (Wt(t), !tt(t))
500
+ throw K("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
479
501
  }
480
- }, Ct = function(t) {
481
- ee(t);
482
- const e = it(t);
502
+ }, Ge = function(t, e, i) {
503
+ try {
504
+ t.removeAttributeNode(e);
505
+ } catch {
506
+ try {
507
+ t.removeAttribute(i);
508
+ } catch {
509
+ }
510
+ }
511
+ }, xt = function(t) {
512
+ Pt(t);
513
+ const e = Q(t);
483
514
  if (e) {
484
515
  const a = [];
485
- ut(e, (c) => {
486
- ft(a, c);
487
- }), ut(a, (c) => {
516
+ Z(e, (l) => {
517
+ Tt(a, l);
518
+ }), Z(a, (l) => {
488
519
  try {
489
- zt(c);
520
+ Wt(l);
490
521
  } catch {
491
522
  }
492
523
  });
493
524
  }
494
- const o = Ft(t);
495
- if (o)
496
- for (let a = o.length - 1; a >= 0; --a) {
497
- const c = o[a], f = c && c.name;
498
- if (typeof f == "string")
499
- try {
500
- t.removeAttribute(f);
501
- } catch {
502
- }
525
+ const i = Bt(t);
526
+ if (i)
527
+ for (let a = i.length - 1; a >= 0; --a) {
528
+ const l = i[a], f = l && l.name;
529
+ typeof f == "string" && Ge(t, l, f);
530
+ }
531
+ }, q = function(t, e, i) {
532
+ if (!i)
533
+ try {
534
+ i = e.getAttributeNode(t);
535
+ } catch {
536
+ i = null;
503
537
  }
504
- }, tt = function(t, e) {
538
+ Tt(n.removed, {
539
+ attribute: i || null,
540
+ from: e
541
+ });
505
542
  try {
506
- ft(n.removed, {
507
- attribute: e.getAttributeNode(t),
508
- from: e
509
- });
543
+ i ? e.removeAttributeNode(i) : e.removeAttribute(t);
510
544
  } catch {
511
- ft(n.removed, {
512
- attribute: null,
513
- from: e
514
- });
545
+ try {
546
+ e.removeAttribute(t);
547
+ } catch {
548
+ }
515
549
  }
516
- if (e.removeAttribute(t), t === "is")
517
- if (rt || It)
550
+ if (t === "is")
551
+ if (ot || Nt)
518
552
  try {
519
- $(e);
553
+ H(e);
520
554
  } catch {
521
555
  }
522
556
  else
@@ -524,118 +558,117 @@ function un() {
524
558
  e.setAttribute(t, "");
525
559
  } catch {
526
560
  }
527
- }, xn = function(t) {
528
- const e = Ft(t);
561
+ }, $n = function(t) {
562
+ const e = Bt(t);
529
563
  if (e)
530
- for (let o = e.length - 1; o >= 0; --o) {
531
- const a = e[o], c = a && a.name;
532
- if (!(typeof c != "string" || T[d(c)]))
533
- try {
534
- t.removeAttribute(c);
535
- } catch {
536
- }
564
+ for (let i = e.length - 1; i >= 0; --i) {
565
+ const a = e[i], l = a && a.name;
566
+ typeof l != "string" || g[E(l)] || Ge(t, a, l);
537
567
  }
538
- }, ee = function(t) {
568
+ }, Pt = function(t) {
539
569
  const e = [t];
540
570
  for (; e.length > 0; ) {
541
- const o = e.pop();
542
- (I ? I(o) : o.nodeType) === v.element && xn(o);
543
- const c = it(o);
544
- if (c)
545
- for (let f = c.length - 1; f >= 0; --f)
546
- e.push(c[f]);
571
+ const i = e.pop();
572
+ dt(i) === v.element && $n(i);
573
+ const l = Q(i);
574
+ if (l)
575
+ for (let f = l.length - 1; f >= 0; --f)
576
+ e.push(l[f]);
547
577
  }
548
- }, kn = function(t) {
549
- if (!Y)
578
+ }, We = function(t, e) {
579
+ return X ? t === "patchsrc" ? !0 : t === "for" && e !== "label" && e !== "output" : !1;
580
+ }, jn = function(t) {
581
+ if (!X)
550
582
  return;
551
583
  const e = [t];
552
584
  for (; e.length > 0; ) {
553
- const o = e.pop(), a = I ? I(o) : o.nodeType;
554
- if (a === v.processingInstruction || a === v.comment && b(rn, o.data)) {
585
+ const i = e.pop(), a = dt(i);
586
+ if (a === v.processingInstruction || a === v.comment && w(dn, i.data)) {
555
587
  try {
556
- zt(o);
588
+ Wt(i);
557
589
  } catch {
558
590
  }
559
591
  continue;
560
592
  }
561
593
  if (a === v.element) {
562
- const f = o, y = d(k ? k(o) : o.nodeName);
594
+ const f = i, d = E(Yt(i));
563
595
  try {
564
- f.hasAttribute && f.hasAttribute("patchsrc") && f.removeAttribute("patchsrc"), f.hasAttribute && f.hasAttribute("for") && y !== "label" && y !== "output" && f.removeAttribute("for");
596
+ f.hasAttribute && f.hasAttribute("patchsrc") && f.removeAttribute("patchsrc"), f.hasAttribute && f.hasAttribute("for") && We("for", d) && f.removeAttribute("for");
565
597
  } catch {
566
598
  }
567
599
  }
568
- const c = it(o);
569
- if (c)
570
- for (let f = c.length - 1; f >= 0; --f)
571
- e.push(c[f]);
600
+ const l = Q(i);
601
+ if (l)
602
+ for (let f = l.length - 1; f >= 0; --f)
603
+ e.push(l[f]);
572
604
  }
573
- }, ke = function(t) {
574
- let e = null, o = null;
575
- if ($t)
605
+ }, Be = function(t) {
606
+ let e = null, i = null;
607
+ if (Zt)
576
608
  t = "<remove></remove>" + t;
577
609
  else {
578
- const f = Ve(t, /^[\r\n\t ]+/);
579
- o = f && f[0];
610
+ const f = on(t, /^[\r\n\t ]+/);
611
+ i = f && f[0];
580
612
  }
581
- gt === "application/xhtml+xml" && at === F && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
582
- const a = D ? ot(t) : t;
583
- if (at === F)
613
+ gt === "application/xhtml+xml" && st === P && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
614
+ const a = R ? nt(t) : t;
615
+ if (st === P)
584
616
  try {
585
- e = new kt().parseFromString(a, gt);
617
+ e = new Gt().parseFromString(a, gt);
586
618
  } catch {
587
619
  }
588
620
  if (!e || !e.documentElement) {
589
- e = Ht.createDocument(at, "template", null);
621
+ e = jt.createDocument(st, "template", null);
590
622
  try {
591
- e.documentElement.innerHTML = Kt ? J : a;
623
+ e.documentElement.innerHTML = te ? j : a;
592
624
  } catch {
593
625
  }
594
626
  }
595
- const c = e.body || e.documentElement;
596
- return t && o && c.insertBefore(s.createTextNode(o), c.childNodes[0] || null), at === F ? Tn.call(e, Q ? "html" : "body")[0] : Q ? e.documentElement : c;
597
- }, ze = function(t) {
598
- return _e.call(
599
- t.ownerDocument || t,
627
+ const l = e.body || e.documentElement;
628
+ return t && i && l.insertBefore(s.createTextNode(i), l.childNodes[0] || null), st === P ? Ln.call(e, V ? "html" : "body")[0] : V ? e.documentElement : l;
629
+ }, Ye = function(t) {
630
+ const e = Rt ? Rt(t) : t.ownerDocument;
631
+ return Ae.call(
632
+ e || t,
600
633
  t,
601
634
  // eslint-disable-next-line no-bitwise
602
- M.SHOW_ELEMENT | M.SHOW_COMMENT | M.SHOW_TEXT | M.SHOW_PROCESSING_INSTRUCTION | M.SHOW_CDATA_SECTION,
635
+ N.SHOW_ELEMENT | N.SHOW_COMMENT | N.SHOW_TEXT | N.SHOW_PROCESSING_INSTRUCTION | N.SHOW_CDATA_SECTION,
603
636
  null
604
637
  );
605
- }, Mt = function(t) {
606
- return t = Et(t, yn, " "), t = Et(t, En, " "), t = Et(t, An, " "), t;
607
- }, ne = function(t) {
638
+ }, zt = function(t) {
639
+ return t = Et(t, Dn, " "), t = Et(t, Nn, " "), t = Et(t, vn, " "), t;
640
+ }, re = function(t) {
608
641
  var e;
609
642
  t.normalize();
610
- const o = _e.call(
611
- t.ownerDocument || t,
643
+ const i = Rt ? Rt(t) : t.ownerDocument, a = Ae.call(
644
+ i || t,
612
645
  t,
613
646
  // eslint-disable-next-line no-bitwise
614
- M.SHOW_TEXT | M.SHOW_COMMENT | M.SHOW_CDATA_SECTION | M.SHOW_PROCESSING_INSTRUCTION,
647
+ N.SHOW_TEXT | N.SHOW_COMMENT | N.SHOW_CDATA_SECTION | N.SHOW_PROCESSING_INSTRUCTION,
615
648
  null
616
649
  );
617
- let a = o.nextNode();
618
- for (; a; )
619
- a.data = Mt(a.data), a = o.nextNode();
620
- const c = (e = t.querySelectorAll) === null || e === void 0 ? void 0 : e.call(t, "template");
621
- c && ut(c, (f) => {
622
- ct(f.content) && ne(f.content);
650
+ let l = a.nextNode();
651
+ for (; l; )
652
+ l.data = zt(l.data), l = a.nextNode();
653
+ const f = (e = t.querySelectorAll) === null || e === void 0 ? void 0 : e.call(t, "template");
654
+ f && Z(f, (d) => {
655
+ lt(d.content) && re(d.content);
623
656
  });
624
- }, vt = function(t) {
625
- const e = k ? k(t) : null;
626
- return typeof e != "string" || d(e) !== "form" ? !1 : typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
657
+ }, kt = function(t) {
658
+ const e = et ? et(t) : null;
659
+ return typeof e != "string" || E(e) !== "form" ? !1 : typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
627
660
  // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
628
661
  // makes the direct read diverge from the cached read; a clean form
629
662
  // (same-realm OR foreign-realm) has both reads pointing at the same
630
663
  // canonical NamedNodeMap.
631
- t.attributes !== Ft(t) || typeof t.removeAttribute != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
664
+ t.attributes !== Bt(t) || typeof t.removeAttribute != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
632
665
  // returns the integer 1 for any Element regardless of realm; direct
633
666
  // read on a clobbered form (e.g. <input name="nodeType">) returns
634
667
  // the named child element. Cheap addition — nodeType is read from
635
668
  // an internal slot, no serialization cost — and removes a residual
636
669
  // clobbering surface used by several mXSS / PI / comment branches
637
670
  // in _sanitizeElements that compare currentNode.nodeType directly.
638
- t.nodeType !== I(t) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
671
+ t.nodeType !== $(t) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
639
672
  // "childNodes" shadows the prototype getter. Direct reads of
640
673
  // form.childNodes from a clobbered form return the named child
641
674
  // instead of the real NodeList, so any walk that reads it directly
@@ -646,293 +679,293 @@ function un() {
646
679
  // select, etc.) regardless of whether the named child happens to
647
680
  // carry a numeric .length, which a typeof-based probe would miss
648
681
  // (e.g. HTMLSelectElement.length is a defined unsigned-long).
649
- t.childNodes !== it(t);
650
- }, ct = function(t) {
651
- if (!I || typeof t != "object" || t === null)
682
+ t.childNodes !== Q(t);
683
+ }, lt = function(t) {
684
+ if (!$ || typeof t != "object" || t === null)
652
685
  return !1;
653
686
  try {
654
- return I(t) === v.documentFragment;
687
+ return $(t) === v.documentFragment;
655
688
  } catch {
656
689
  return !1;
657
690
  }
658
691
  }, yt = function(t) {
659
- if (!I || typeof t != "object" || t === null)
692
+ if (!$ || typeof t != "object" || t === null)
660
693
  return !1;
661
694
  try {
662
- return typeof I(t) == "number";
695
+ return typeof $(t) == "number";
663
696
  } catch {
664
697
  return !1;
665
698
  }
666
699
  };
667
- function U(r, t, e) {
668
- r.length !== 0 && ut(r, (o) => {
669
- o.call(n, t, e, lt);
700
+ function z(r, t, e) {
701
+ r.length !== 0 && Z(r, (i) => {
702
+ i.call(n, t, e, at);
670
703
  });
671
704
  }
672
- const zn = function(t, e) {
673
- return !!(Y && t.hasChildNodes() && !yt(t.firstElementChild) && b(on, t.textContent) && b(on, t.innerHTML) || Y && t.namespaceURI === F && e === "style" && yt(t.firstElementChild) || t.nodeType === v.processingInstruction || Y && t.nodeType === v.comment && b(rn, t.data));
674
- }, Fn = function(t, e) {
675
- if (!Tt[e] && He(e) && (g.tagNameCheck instanceof RegExp && b(g.tagNameCheck, e) || g.tagNameCheck instanceof Function && g.tagNameCheck(e)))
705
+ const Xn = function(t, e) {
706
+ return !!(X && t.hasChildNodes() && !yt(t.firstElementChild) && w(mn, t.textContent) && w(mn, t.innerHTML) || X && t.namespaceURI === P && Ho[e] && (yt(t.firstElementChild) || typeof t.textContent == "string" && w(Go[e], t.textContent)) || t.nodeType === v.processingInstruction || X && t.nodeType === v.comment && w(dn, t.data));
707
+ }, Ut = function(t, e) {
708
+ if (t instanceof RegExp)
709
+ return w(t, e);
710
+ if (t instanceof Function) {
711
+ for (var i = arguments.length, a = new Array(i > 2 ? i - 2 : 0), l = 2; l < i; l++)
712
+ a[l - 2] = arguments[l];
713
+ return !!t(e, ...a);
714
+ }
715
+ return !1;
716
+ }, Vn = function(t, e, i) {
717
+ if (!_t[e] && qe(e) && Ut(x.tagNameCheck, e))
676
718
  return !1;
677
- if (jt && !z[e]) {
678
- const o = Z(t), a = it(t);
679
- if (a && o) {
680
- const c = a.length;
681
- for (let f = c - 1; f >= 0; --f) {
682
- const y = Xt ? a[f] : pn(a[f], !0);
683
- o.insertBefore(y, mn(t));
719
+ if (Jt && !rt[e]) {
720
+ const a = tt(t), l = Q(t);
721
+ if (l && a) {
722
+ const f = l.length;
723
+ for (let d = f - 1; d >= 0; --d) {
724
+ const y = t === i ? bn(l[d], !0) : l[d];
725
+ a.insertBefore(y, Sn(t));
684
726
  }
685
727
  }
686
728
  }
687
- return $(t), !0;
688
- }, Fe = function(t, e) {
689
- if (U(h.beforeSanitizeElements, t, null), t !== e && Z(t) === null)
729
+ return H(t), !0;
730
+ }, $e = function(t, e, i, a) {
731
+ return t.length === 0 ? e : e === i || e === a ? C(e) : e;
732
+ }, je = function(t, e) {
733
+ return t === e || tt(t) !== null ? !1 : (Qt && Pt(t), !0);
734
+ }, Xe = function(t, e) {
735
+ if (z(h.beforeSanitizeElements, t, null), je(t, e))
690
736
  return !0;
691
- if (vt(t))
692
- return $(t), !0;
693
- const o = d(k ? k(t) : t.nodeName);
694
- if (U(h.uponSanitizeElement, t, {
695
- tagName: o,
737
+ if (kt(t))
738
+ return H(t), !0;
739
+ const i = E(Yt(t));
740
+ if (_ = $e(h.uponSanitizeElement, _, Xt, It), z(h.uponSanitizeElement, t, {
741
+ tagName: i,
696
742
  allowedTags: _
697
- }), t !== e && Z(t) === null)
743
+ }), je(t, e))
698
744
  return !0;
699
- if (zn(t, o))
700
- return $(t), !0;
701
- if (Tt[o] || !(B.tagCheck instanceof Function && B.tagCheck(o)) && !_[o]) {
702
- const c = Fn(t, o);
703
- return c === !1 && U(h.afterSanitizeElements, t, null), c;
745
+ if (Xn(t, i))
746
+ return H(t), !0;
747
+ if (_t[i] || !(U.tagCheck instanceof Function && U.tagCheck(i)) && !_[i]) {
748
+ const l = Vn(t, i, e);
749
+ return l === !1 && z(h.afterSanitizeElements, t, null), l;
704
750
  }
705
- if ((I ? I(t) : t.nodeType) === v.element && !Pn(t) || (o === "noscript" || o === "noembed" || o === "noframes") && b(Ii, t.innerHTML))
706
- return $(t), !0;
707
- if (W && t.nodeType === v.text) {
708
- const c = Mt(t.textContent);
709
- t.textContent !== c && (ft(n.removed, {
751
+ if (dt(t) === v.element && !Yn(t) || (i === "noscript" || i === "noembed" || i === "noframes") && w(Uo, t.innerHTML))
752
+ return H(t), !0;
753
+ if (F && t.nodeType === v.text) {
754
+ const l = zt(t.textContent);
755
+ t.textContent !== l && (Tt(n.removed, {
710
756
  element: t.cloneNode()
711
- }), t.textContent = c);
757
+ }), t.textContent = l);
712
758
  }
713
- return U(h.afterSanitizeElements, t, null), !1;
714
- }, Ue = function(t, e, o) {
715
- if (Ae[e] || Y && e === "patchsrc" || Y && e === "for" && t !== "label" && t !== "output" || we && (e === "id" || e === "name") && (o in s || o in Dn))
759
+ return z(h.afterSanitizeElements, t, null), !1;
760
+ }, Ve = function(t, e, i) {
761
+ if (we[e] || We(e, t) || Ie && (e === "id" || e === "name") && (i in s || i in Hn))
716
762
  return !1;
717
- const a = T[e] || B.attributeCheck instanceof Function && B.attributeCheck(e, t);
718
- if (!(Gt && b(bn, e))) {
719
- if (!(be && b(Sn, e))) {
720
- if (a) {
721
- if (!qt[e]) {
722
- if (!b(ge, Et(o, Te, ""))) {
723
- if (!((e === "src" || e === "xlink:href" || e === "href") && t !== "script" && qe(o, "data:") === 0 && Ne[t])) {
724
- if (!(Se && !b(On, Et(o, Te, "")))) {
725
- if (o)
726
- return !1;
727
- }
728
- }
729
- }
730
- }
731
- } else if (
732
- // First condition does a very basic check if a) it's basically a valid custom element tagname AND
733
- // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
734
- // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
735
- !(He(t) && (g.tagNameCheck instanceof RegExp && b(g.tagNameCheck, t) || g.tagNameCheck instanceof Function && g.tagNameCheck(t)) && (g.attributeNameCheck instanceof RegExp && b(g.attributeNameCheck, e) || g.attributeNameCheck instanceof Function && g.attributeNameCheck(e, t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
736
- // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
737
- e === "is" && g.allowCustomizedBuiltInElements && (g.tagNameCheck instanceof RegExp && b(g.tagNameCheck, o) || g.tagNameCheck instanceof Function && g.tagNameCheck(o)))
738
- ) return !1;
739
- }
740
- }
741
- return !0;
742
- }, Un = p({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), He = function(t) {
743
- return !Un[bt(t)] && b(wn, t);
744
- }, Hn = function(t, e, o, a) {
745
- if (D && typeof wt == "object" && typeof wt.getAttributeType == "function" && !o)
746
- switch (wt.getAttributeType(t, e)) {
763
+ const a = g[e] || U.attributeCheck instanceof Function && U.attributeCheck(e, t);
764
+ return qt && w(Cn, e) || Oe && w(Mn, e) ? !0 : a ? xe[e] || w(Se, Et(i, be, "")) || (e === "src" || e === "xlink:href" || e === "href") && t !== "script" && rn(i, "data:") === 0 && Ce[t] || Re && !w(xn, Et(i, be, "")) ? !0 : !i : (
765
+ // Condition a) covers a basically valid custom element tag name whose
766
+ // tag passes the configured tagNameCheck and whose attribute name
767
+ // passes the configured attributeNameCheck ...
768
+ qe(t) && Ut(x.tagNameCheck, t) && Ut(x.attributeNameCheck, e, t) || // Condition b) covers an `is` attribute whose value passes the
769
+ // configured tagNameCheck while customized built-in elements are
770
+ // allowed.
771
+ e === "is" && x.allowCustomizedBuiltInElements && Ut(x.tagNameCheck, i)
772
+ );
773
+ }, qn = p({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), qe = function(t) {
774
+ return !qn[bt(t)] && w(Pn, t);
775
+ }, Kn = function(t, e, i, a) {
776
+ if (R && typeof Ot == "object" && typeof Ot.getAttributeType == "function" && !i)
777
+ switch (Ot.getAttributeType(t, e)) {
747
778
  case "TrustedHTML":
748
- return ot(a);
779
+ return nt(a);
749
780
  case "TrustedScriptURL":
750
- return dn(a);
781
+ return wn(a);
751
782
  }
752
783
  return a;
753
- }, Gn = function(t, e, o, a) {
784
+ }, Zn = function(t, e, i, a) {
754
785
  try {
755
- o ? t.setAttributeNS(o, e, a) : t.setAttribute(e, a), vt(t) ? $(t) : Xe(n.removed);
786
+ i ? t.setAttributeNS(i, e, a) : t.setAttribute(e, a), kt(t) ? H(t) : nn(n.removed);
756
787
  } catch {
757
- tt(e, t);
788
+ q(e, t);
758
789
  }
759
- }, Ge = function(t) {
760
- U(h.beforeSanitizeAttributes, t, null);
790
+ }, Ke = function(t) {
791
+ z(h.beforeSanitizeAttributes, t, null);
761
792
  const e = t.attributes;
762
- if (!e || vt(t))
793
+ if (!e || kt(t))
763
794
  return;
764
- const o = {
795
+ g = $e(h.uponSanitizeAttribute, g, Vt, Dt);
796
+ const i = {
765
797
  attrName: "",
766
798
  attrValue: "",
767
799
  keepAttr: !0,
768
- allowedAttributes: T,
800
+ allowedAttributes: g,
769
801
  forceKeepAttr: void 0
770
802
  };
771
803
  let a = e.length;
772
- const c = d(t.nodeName);
804
+ const l = E(t.nodeName);
773
805
  for (; a--; ) {
774
- const f = e[a], y = f.name, R = f.namespaceURI, P = f.value, C = d(y), x = P;
775
- let N = y === "value" ? x : ci(x);
776
- if (o.attrName = C, o.attrValue = N, o.keepAttr = !0, o.forceKeepAttr = void 0, U(h.uponSanitizeAttribute, t, o), N = o.attrValue, Re && (C === "id" || C === "name") && qe(N, Ie) !== 0 && (tt(y, t), N = Ie + N), Y && b(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, N)) {
777
- tt(y, t);
806
+ const f = e[a], d = f.name, y = f.namespaceURI, L = f.value, I = E(d), ae = L;
807
+ let O = d === "value" ? ae : Eo(ae);
808
+ if (i.attrName = I, i.attrValue = O, i.keepAttr = !0, i.forceKeepAttr = void 0, z(h.uponSanitizeAttribute, t, i), O = i.attrValue, De && (I === "id" || I === "name") && rn(O, Ne) !== 0 && (q(d, t, f), O = Ne + O), X && w(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, O)) {
809
+ q(d, t, f);
778
810
  continue;
779
811
  }
780
- if (C === "attributename" && Ve(N, "href")) {
781
- tt(y, t);
812
+ if (I === "attributename" && on(O, "href")) {
813
+ q(d, t, f);
782
814
  continue;
783
815
  }
784
- if (!o.forceKeepAttr) {
785
- if (!o.keepAttr) {
786
- tt(y, t);
816
+ if (!i.forceKeepAttr) {
817
+ if (!i.keepAttr) {
818
+ q(d, t, f);
787
819
  continue;
788
820
  }
789
- if (!Oe && b(Ni, N)) {
790
- tt(y, t);
821
+ if (!Le && w(Fo, O)) {
822
+ q(d, t, f);
791
823
  continue;
792
824
  }
793
- if (W && (N = Mt(N)), !Ue(c, C, N)) {
794
- tt(y, t);
825
+ if (F && (O = zt(O)), !Ve(l, I, O)) {
826
+ q(d, t, f);
795
827
  continue;
796
828
  }
797
- N = Hn(c, C, R, N), N !== x && Gn(t, y, R, N);
829
+ O = Kn(l, I, y, O), O !== ae && Zn(t, d, y, O);
798
830
  }
799
831
  }
800
- U(h.afterSanitizeAttributes, t, null);
801
- }, Pt = function(t) {
832
+ z(h.afterSanitizeAttributes, t, null);
833
+ }, Ft = function(t) {
802
834
  let e = null;
803
- const o = ze(t);
804
- for (U(h.beforeSanitizeShadowDOM, t, null); e = o.nextNode(); )
805
- if (U(h.uponSanitizeShadowNode, e, null), Fe(e, t), Ge(e), ct(e.content) && Pt(e.content), (I ? I(e) : e.nodeType) === v.element) {
806
- const c = me(e);
807
- ct(c) && (ie(c), Pt(c));
835
+ const i = Ye(t);
836
+ for (z(h.beforeSanitizeShadowDOM, t, null); e = i.nextNode(); )
837
+ if (z(h.uponSanitizeShadowNode, e, null), Xe(e, t), Ke(e), lt(e.content) && Ft(e.content), dt(e) === v.element) {
838
+ const a = ye(e);
839
+ lt(a) && (se(a), Ft(a));
808
840
  }
809
- U(h.afterSanitizeShadowDOM, t, null);
810
- }, ie = function(t) {
841
+ z(h.afterSanitizeShadowDOM, t, null);
842
+ }, se = function(t) {
811
843
  const e = [{
812
844
  node: t,
813
845
  shadow: null
814
846
  }];
815
847
  for (; e.length > 0; ) {
816
- const o = e.pop();
817
- if (o.shadow) {
818
- Pt(o.shadow);
848
+ const i = e.pop();
849
+ if (i.shadow) {
850
+ Ft(i.shadow);
819
851
  continue;
820
852
  }
821
- const a = o.node, f = (I ? I(a) : a.nodeType) === v.element, y = it(a);
822
- if (y)
823
- for (let R = y.length - 1; R >= 0; --R)
853
+ const a = i.node, f = dt(a) === v.element, d = Q(a);
854
+ if (d)
855
+ for (let y = d.length - 1; y >= 0; --y)
824
856
  e.push({
825
- node: y[R],
857
+ node: d[y],
826
858
  shadow: null
827
859
  });
828
860
  if (f) {
829
- const R = k ? k(a) : null;
830
- if (typeof R == "string" && d(R) === "template") {
831
- const P = a.content;
832
- ct(P) && e.push({
833
- node: P,
861
+ const y = et ? et(a) : null;
862
+ if (typeof y == "string" && E(y) === "template") {
863
+ const L = a.content;
864
+ lt(L) && e.push({
865
+ node: L,
834
866
  shadow: null
835
867
  });
836
868
  }
837
869
  }
838
870
  if (f) {
839
- const R = me(a);
840
- ct(R) && e.push({
871
+ const y = ye(a);
872
+ lt(y) && e.push({
841
873
  node: null,
842
- shadow: R
874
+ shadow: y
843
875
  }, {
844
- node: R,
876
+ node: y,
845
877
  shadow: null
846
878
  });
847
879
  }
848
880
  }
849
881
  };
850
882
  return n.sanitize = function(r) {
851
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = null, o = null, a = null, c = null;
852
- if (Kt = !r, Kt && (r = "<!-->"), typeof r != "string" && !yt(r) && (r = di(r), typeof r != "string"))
853
- throw et("dirty is not a string, aborting");
883
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = null, i = null, a = null, l = null;
884
+ if (te = !r, te && (r = "<!-->"), typeof r != "string" && !yt(r) && (r = Oo(r), typeof r != "string"))
885
+ throw K("dirty is not a string, aborting");
854
886
  if (!n.isSupported)
855
887
  return r;
856
- Bt ? (_ = Wt, T = Yt) : te(t), (h.uponSanitizeElement.length > 0 || h.uponSanitizeAttribute.length > 0) && (_ = L(_)), h.uponSanitizeAttribute.length > 0 && (T = L(T)), n.removed = [];
857
- const f = Xt && typeof r != "string" && yt(r);
888
+ Kt ? (_ = It, g = Dt) : ie(t), (h.uponSanitizeElement.length > 0 || h.uponSanitizeAttribute.length > 0) && (_ = C(_)), h.uponSanitizeAttribute.length > 0 && (g = C(g)), n.removed = [];
889
+ const f = Qt && typeof r != "string" && yt(r);
858
890
  if (f) {
859
- kn(r);
860
- const C = k ? k(r) : r.nodeName;
861
- if (typeof C == "string") {
862
- const x = d(C);
863
- if (!_[x] || Tt[x])
864
- throw Ct(r), et("root node is forbidden and cannot be sanitized in-place");
891
+ jn(r);
892
+ const L = Yt(r);
893
+ if (typeof L == "string") {
894
+ const I = E(L);
895
+ if (!_[I] || _t[I])
896
+ throw xt(r), K("root node is forbidden and cannot be sanitized in-place");
865
897
  }
866
- if (vt(r))
867
- throw Ct(r), et("root node is clobbered and cannot be sanitized in-place");
898
+ if (kt(r))
899
+ throw xt(r), K("root node is clobbered and cannot be sanitized in-place");
868
900
  try {
869
- ie(r);
870
- } catch (x) {
871
- throw Ct(r), x;
901
+ se(r);
902
+ } catch (I) {
903
+ throw xt(r), I;
872
904
  }
873
905
  } else if (yt(r))
874
- e = ke("<!---->"), o = e.ownerDocument.importNode(r, !0), o.nodeType === v.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? e = o : e.appendChild(o), ie(o);
906
+ e = Be("<!---->"), i = e.ownerDocument.importNode(r, !0), i.nodeType === v.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? e = i : e.appendChild(i), se(i);
875
907
  else {
876
- if (!rt && !W && !Q && // eslint-disable-next-line unicorn/prefer-includes
908
+ if (!ot && !F && !V && // eslint-disable-next-line unicorn/prefer-includes
877
909
  r.indexOf("<") === -1)
878
- return D && Nt ? ot(r) : r;
879
- if (e = ke(r), !e)
880
- return rt ? null : Nt ? J : "";
910
+ return R && vt ? nt(r) : r;
911
+ if (e = Be(r), !e)
912
+ return ot ? null : vt ? j : "";
881
913
  }
882
- e && $t && $(e.firstChild);
883
- const y = f ? r : e, R = ze(y);
914
+ e && Zt && H(e.firstChild);
915
+ const d = f ? r : e;
884
916
  try {
885
- for (; a = R.nextNode(); )
886
- Fe(a, y), Ge(a), ct(a.content) && Pt(a.content);
887
- } catch (C) {
888
- throw f && (Ct(r), ut(n.removed, (x) => {
889
- x.element && ee(x.element);
890
- })), C;
917
+ const L = Ye(d);
918
+ for (; a = L.nextNode(); )
919
+ Xe(a, d), Ke(a), lt(a.content) && Ft(a.content);
920
+ } catch (L) {
921
+ throw f && (xt(r), Z(n.removed, (I) => {
922
+ I.element && Pt(I.element);
923
+ })), L;
891
924
  }
892
925
  if (f)
893
- return ut(n.removed, (C) => {
894
- C.element && ee(C.element);
895
- }), W && ne(r), r;
896
- if (rt) {
897
- if (W && ne(e), It)
898
- for (c = _n.call(e.ownerDocument); e.firstChild; )
899
- c.appendChild(e.firstChild);
926
+ return Z(n.removed, (L) => {
927
+ L.element && Pt(L.element);
928
+ }), F && re(r), r;
929
+ if (ot) {
930
+ if (F && re(e), Nt)
931
+ for (l = Rn.call(e.ownerDocument); e.firstChild; )
932
+ l.appendChild(e.firstChild);
900
933
  else
901
- c = e;
902
- return (T.shadowroot || T.shadowrootmode) && (c = gn.call(l, c, !0)), c;
934
+ l = e;
935
+ return (g.shadowroot || g.shadowrootmode) && (l = In.call(c, l, !0)), l;
903
936
  }
904
- let P = Q ? e.outerHTML : e.innerHTML;
905
- return Q && _["!doctype"] && e.ownerDocument && e.ownerDocument.doctype && e.ownerDocument.doctype.name && b(wi, e.ownerDocument.doctype.name) && (P = "<!DOCTYPE " + e.ownerDocument.doctype.name + `>
906
- ` + P), W && (P = Mt(P)), D && Nt ? ot(P) : P;
937
+ let y = V ? e.outerHTML : e.innerHTML;
938
+ return V && _["!doctype"] && e.ownerDocument && e.ownerDocument.doctype && e.ownerDocument.doctype.name && w(zo, e.ownerDocument.doctype.name) && (y = "<!DOCTYPE " + e.ownerDocument.doctype.name + `>
939
+ ` + y), F && (y = zt(y)), R && vt ? nt(y) : y;
907
940
  }, n.setConfig = function() {
908
941
  let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
909
- te(r), Bt = !0, Wt = _, Yt = T;
942
+ ie(r), Kt = !0, It = _, Dt = g;
910
943
  }, n.clearConfig = function() {
911
- lt = null, Bt = !1, Wt = null, Yt = null, D = Ut, J = "";
944
+ at = null, Kt = !1, It = null, Dt = null, R = $t, j = "";
912
945
  }, n.isValidAttribute = function(r, t, e) {
913
- lt || te({});
914
- const o = d(r), a = d(t);
915
- return Ue(o, a, e);
946
+ at || ie({});
947
+ const i = E(r), a = E(t);
948
+ return Ve(i, a, e);
916
949
  }, n.addHook = function(r, t) {
917
- typeof t == "function" && S(h, r) && ft(h[r], t);
950
+ typeof t == "function" && D(h, r) && Tt(h[r], t);
918
951
  }, n.removeHook = function(r, t) {
919
- if (S(h, r)) {
952
+ if (D(h, r)) {
920
953
  if (t !== void 0) {
921
- const e = ai(h[r], t);
922
- return e === -1 ? void 0 : li(h[r], e, 1)[0];
954
+ const e = yo(h[r], t);
955
+ return e === -1 ? void 0 : To(h[r], e, 1)[0];
923
956
  }
924
- return Xe(h[r]);
957
+ return nn(h[r]);
925
958
  }
926
959
  }, n.removeHooks = function(r) {
927
- S(h, r) && (h[r] = []);
960
+ D(h, r) && (h[r] = []);
928
961
  }, n.removeAllHooks = function() {
929
- h = sn();
962
+ h = hn();
930
963
  }, n;
931
964
  }
932
- var Ci = un();
933
- const St = /* @__PURE__ */ new Map(), pe = /* @__PURE__ */ new Map();
934
- function fn(i, n) {
935
- const s = Ci.sanitize(i, {
965
+ var Yo = En();
966
+ const St = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map();
967
+ function An(o, n) {
968
+ const s = Yo.sanitize(o, {
936
969
  USE_PROFILES: { svg: !0, svgFilters: !0 },
937
970
  FORBID_TAGS: ["script", "use"],
938
971
  // <use> can SSRF to external hrefs
@@ -942,29 +975,29 @@ function fn(i, n) {
942
975
  throw new Error(`Invalid SVG from ${n}`);
943
976
  return m;
944
977
  }
945
- async function Mi(i) {
946
- const n = await fetch(i);
978
+ async function $o(o) {
979
+ const n = await fetch(o);
947
980
  if (!n.ok)
948
981
  throw new Error(`Failed to load icon: ${n.status}`);
949
- return fn(await n.text(), i);
982
+ return An(await n.text(), o);
950
983
  }
951
- async function an(i) {
952
- return St.has(i) || St.set(i, Mi(i)), (await St.get(i)).cloneNode(!0);
984
+ async function _n(o) {
985
+ return St.has(o) || St.set(o, $o(o)), (await St.get(o)).cloneNode(!0);
953
986
  }
954
- function vi(i) {
955
- let n = pe.get(i);
956
- return n || (n = fn(i, "inline SVG source"), pe.set(i, n)), n.cloneNode(!0);
987
+ function jo(o) {
988
+ let n = ge.get(o);
989
+ return n || (n = An(o, "inline SVG source"), ge.set(o, n)), n.cloneNode(!0);
957
990
  }
958
- function Gi(i) {
959
- i ? St.delete(i) : (St.clear(), pe.clear());
991
+ function ti(o) {
992
+ o ? St.delete(o) : (St.clear(), ge.clear());
960
993
  }
961
- const Pi = ":host{display:inline-block;width:fit-content;height:fit-content;--_nys-icon-size: var( --nys-icon-size, .7em );box-sizing:content-box!important;vertical-align:middle}@supports (font-size: 1cap){:host{--_nys-icon-size: var(--nys-icon-size, 1cap)}}.nys-icon--svg{width:var(--_nys-icon-size, 1em);height:var(--_nys-icon-size, 1em);display:block;white-space:nowrap}.nys-icon--xs{width:calc(var(--_nys-icon-size) * .75);height:calc(var(--_nys-icon-size) * .75)}.nys-icon--sm{width:calc(var(--_nys-icon-size) * .875);height:calc(var(--_nys-icon-size) * .875)}.nys-icon--md{width:var(--_nys-icon-size);height:var(--_nys-icon-size)}.nys-icon--lg{width:calc(var(--_nys-icon-size) * 1.125);height:calc(var(--_nys-icon-size) * 1.125)}.nys-icon--xl{width:calc(var(--_nys-icon-size) * 1.25);height:calc(var(--_nys-icon-size) * 1.25)}.nys-icon--2xl{width:calc(var(--_nys-icon-size) * 1.5);height:calc(var(--_nys-icon-size) * 1.5)}.nys-icon--3xl{width:calc(var(--_nys-icon-size) * 1.875);height:calc(var(--_nys-icon-size) * 1.875)}.nys-icon--4xl{width:calc(var(--_nys-icon-size) * 2.25);height:calc(var(--_nys-icon-size) * 2.25)}.nys-icon--5xl{width:calc(var(--_nys-icon-size) * 3);height:calc(var(--_nys-icon-size) * 3)}.nys-icon--12{width:.75rem;height:.75rem}.nys-icon--14{width:.875rem;height:.875rem}.nys-icon--16{width:1rem;height:1rem}.nys-icon--18{width:1.125rem;height:1.125rem}.nys-icon--20{width:1.25rem;height:1.25rem}.nys-icon--24{width:1.5rem;height:1.5rem}.nys-icon--32{width:2rem;height:2rem}.nys-icon--40{width:2.5rem;height:2.5rem}.nys-icon--50{width:3.125rem;height:3.125rem}.nys-icon--flip-horizontal{transform:scaleX(-1)}.nys-icon--flip-vertical{transform:scaleY(-1)}.nys-icon--flip-both{transform:scale(-1)}";
962
- var xi = Object.defineProperty, q = (i, n, s, l) => {
963
- for (var u = void 0, m = i.length - 1, A; m >= 0; m--)
964
- (A = i[m]) && (u = A(n, s, u) || u);
965
- return u && xi(n, s, u), u;
966
- }, V;
967
- const G = (V = class extends qn {
994
+ const Xo = ":host{display:inline-block;width:fit-content;height:fit-content;--_nys-icon-size: var( --nys-icon-size, .7em );box-sizing:content-box!important;vertical-align:middle}@supports (font-size: 1cap){:host{--_nys-icon-size: var(--nys-icon-size, 1cap)}}.nys-icon--svg{width:var(--_nys-icon-size, 1em);height:var(--_nys-icon-size, 1em);display:block;white-space:nowrap}.nys-icon--xs{width:calc(var(--_nys-icon-size) * .75);height:calc(var(--_nys-icon-size) * .75)}.nys-icon--sm{width:calc(var(--_nys-icon-size) * .875);height:calc(var(--_nys-icon-size) * .875)}.nys-icon--md{width:var(--_nys-icon-size);height:var(--_nys-icon-size)}.nys-icon--lg{width:calc(var(--_nys-icon-size) * 1.125);height:calc(var(--_nys-icon-size) * 1.125)}.nys-icon--xl{width:calc(var(--_nys-icon-size) * 1.25);height:calc(var(--_nys-icon-size) * 1.25)}.nys-icon--2xl{width:calc(var(--_nys-icon-size) * 1.5);height:calc(var(--_nys-icon-size) * 1.5)}.nys-icon--3xl{width:calc(var(--_nys-icon-size) * 1.875);height:calc(var(--_nys-icon-size) * 1.875)}.nys-icon--4xl{width:calc(var(--_nys-icon-size) * 2.25);height:calc(var(--_nys-icon-size) * 2.25)}.nys-icon--5xl{width:calc(var(--_nys-icon-size) * 3);height:calc(var(--_nys-icon-size) * 3)}.nys-icon--12{width:.75rem;height:.75rem}.nys-icon--14{width:.875rem;height:.875rem}.nys-icon--16{width:1rem;height:1rem}.nys-icon--18{width:1.125rem;height:1.125rem}.nys-icon--20{width:1.25rem;height:1.25rem}.nys-icon--24{width:1.5rem;height:1.5rem}.nys-icon--32{width:2rem;height:2rem}.nys-icon--40{width:2.5rem;height:2.5rem}.nys-icon--50{width:3.125rem;height:3.125rem}.nys-icon--flip-horizontal{transform:scaleX(-1)}.nys-icon--flip-vertical{transform:scaleY(-1)}.nys-icon--flip-both{transform:scale(-1)}";
995
+ var Vo = Object.defineProperty, B = (o, n, s, c) => {
996
+ for (var u = void 0, m = o.length - 1, T; m >= 0; m--)
997
+ (T = o[m]) && (u = T(n, s, u) || u);
998
+ return u && Vo(n, s, u), u;
999
+ }, W;
1000
+ const k = (W = class extends ro {
968
1001
  constructor() {
969
1002
  super(...arguments), this.name = "", this.library = "default", this.ariaLabel = "", this.rotate = "0", this.flip = "", this.color = "", this.size = "md", this._svg = null, this._loadSeq = 0, this._loadPromise = null;
970
1003
  }
@@ -976,10 +1009,10 @@ const G = (V = class extends qn {
976
1009
  })();
977
1010
  }
978
1011
  connectedCallback() {
979
- super.connectedCallback(), this._reflectHostSemantics(), We(this.library, this);
1012
+ super.connectedCallback(), this._reflectHostSemantics(), Je(this.library, this);
980
1013
  }
981
1014
  disconnectedCallback() {
982
- super.disconnectedCallback(), Ye(this.library, this);
1015
+ super.disconnectedCallback(), Qe(this.library, this);
983
1016
  }
984
1017
  /** Called by the icon library registry when the current library changes. */
985
1018
  redraw() {
@@ -996,14 +1029,14 @@ const G = (V = class extends qn {
996
1029
  this._loadIcon();
997
1030
  }
998
1031
  updated(n) {
999
- if (n.has("name") && !V._validName.test(this.name)) {
1032
+ if (n.has("name") && !W._validName.test(this.name)) {
1000
1033
  console.warn(`nys-icon: invalid name "${this.name}" — ignored`), this._svg = null;
1001
1034
  return;
1002
1035
  }
1003
1036
  if (n.has("name") || n.has("library")) {
1004
1037
  if (n.has("library")) {
1005
1038
  const s = n.get("library");
1006
- s && Ye(s, this), We(this.library, this);
1039
+ s && Qe(s, this), Je(this.library, this);
1007
1040
  }
1008
1041
  this._loadIcon();
1009
1042
  }
@@ -1012,19 +1045,19 @@ const G = (V = class extends qn {
1012
1045
  _loadIcon() {
1013
1046
  const n = ++this._loadSeq;
1014
1047
  this._loadPromise = (async () => {
1015
- const s = Jn(this.library);
1048
+ const s = lo(this.library);
1016
1049
  if (!s || !this.name) {
1017
1050
  this._svg = null;
1018
1051
  return;
1019
1052
  }
1020
1053
  try {
1021
- const l = await s.resolver(this.name);
1054
+ const c = await s.resolver(this.name);
1022
1055
  if (n !== this._loadSeq) return;
1023
- if (!l) {
1056
+ if (!c) {
1024
1057
  this._svg = null;
1025
1058
  return;
1026
1059
  }
1027
- const u = typeof l == "string" ? await an(l) : l.type === "url" ? await an(l.href) : vi(l.content);
1060
+ const u = typeof c == "string" ? await _n(c) : c.type === "url" ? await _n(c.href) : jo(c.content);
1028
1061
  if (n !== this._loadSeq) return;
1029
1062
  s.mutator?.(u), this._applyAttributes(u), this._svg = u;
1030
1063
  } catch {
@@ -1051,40 +1084,40 @@ const G = (V = class extends qn {
1051
1084
  this.ariaLabel ? (this.setAttribute("role", "img"), this.setAttribute("aria-label", this.ariaLabel), this.removeAttribute("aria-hidden")) : (this.removeAttribute("role"), this.removeAttribute("aria-label"), this.setAttribute("aria-hidden", "true"));
1052
1085
  }
1053
1086
  render() {
1054
- return this._svg ? Yn`${this._svg}` : null;
1087
+ return this._svg ? to`${this._svg}` : null;
1055
1088
  }
1056
- }, V.styles = Wn(Pi), V._validName = /^[a-zA-Z0-9_-]+$/, V);
1057
- q([
1058
- nt({ type: String, reflect: !0 })
1059
- ], G.prototype, "name");
1060
- q([
1061
- nt({ type: String, reflect: !0 })
1062
- ], G.prototype, "library");
1063
- q([
1064
- nt({ type: String })
1065
- ], G.prototype, "ariaLabel");
1066
- q([
1067
- nt({ type: String })
1068
- ], G.prototype, "rotate");
1069
- q([
1070
- nt({ type: String })
1071
- ], G.prototype, "flip");
1072
- q([
1073
- nt({ type: String })
1074
- ], G.prototype, "color");
1075
- q([
1076
- nt({ type: String })
1077
- ], G.prototype, "size");
1078
- q([
1079
- $n()
1080
- ], G.prototype, "_svg");
1081
- let ki = G;
1082
- customElements.get("nys-icon") || customElements.define("nys-icon", ki);
1089
+ }, W.styles = Qn(Xo), W._validName = /^[a-zA-Z0-9_-]+$/, W);
1090
+ B([
1091
+ J({ type: String, reflect: !0 })
1092
+ ], k.prototype, "name");
1093
+ B([
1094
+ J({ type: String, reflect: !0 })
1095
+ ], k.prototype, "library");
1096
+ B([
1097
+ J({ type: String })
1098
+ ], k.prototype, "ariaLabel");
1099
+ B([
1100
+ J({ type: String })
1101
+ ], k.prototype, "rotate");
1102
+ B([
1103
+ J({ type: String })
1104
+ ], k.prototype, "flip");
1105
+ B([
1106
+ J({ type: String })
1107
+ ], k.prototype, "color");
1108
+ B([
1109
+ J({ type: String })
1110
+ ], k.prototype, "size");
1111
+ B([
1112
+ eo()
1113
+ ], k.prototype, "_svg");
1114
+ let qo = k;
1115
+ customElements.get("nys-icon") || customElements.define("nys-icon", qo);
1083
1116
  export {
1084
- ki as NysIcon,
1085
- Gi as clearIconCache,
1086
- Jn as getIconLibrary,
1087
- Ui as registerIconLibrary,
1088
- Hi as unregisterIconLibrary
1117
+ qo as NysIcon,
1118
+ ti as clearIconCache,
1119
+ lo as getIconLibrary,
1120
+ Jo as registerIconLibrary,
1121
+ Qo as unregisterIconLibrary
1089
1122
  };
1090
1123
  //# sourceMappingURL=nys-icon.js.map