@commercetools/nimbus 0.0.0-canary-20251013204307 → 0.0.0-canary-20251014070008

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.
@@ -1,131 +1,131 @@
1
- import { DEFAULT_FORBIDDEN_TAGS as Bt } from "./constants.es.js";
2
- /*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */
1
+ import { DEFAULT_FORBIDDEN_TAGS as Yt } from "./constants.es.js";
2
+ /*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */
3
3
  const {
4
- entries: Tt,
5
- setPrototypeOf: st,
6
- isFrozen: Yt,
7
- getPrototypeOf: Xt,
8
- getOwnPropertyDescriptor: jt
4
+ entries: _t,
5
+ setPrototypeOf: ct,
6
+ isFrozen: Xt,
7
+ getPrototypeOf: jt,
8
+ getOwnPropertyDescriptor: Vt
9
9
  } = Object;
10
10
  let {
11
11
  freeze: R,
12
12
  seal: y,
13
- create: Et
13
+ create: Pe
14
14
  } = Object, {
15
- apply: xe,
16
- construct: Pe
15
+ apply: ve,
16
+ construct: ke
17
17
  } = typeof Reflect < "u" && Reflect;
18
- R || (R = function(n) {
19
- return n;
18
+ R || (R = function(o) {
19
+ return o;
20
20
  });
21
- y || (y = function(n) {
22
- return n;
21
+ y || (y = function(o) {
22
+ return o;
23
23
  });
24
- xe || (xe = function(n, l) {
24
+ ve || (ve = function(o, l) {
25
25
  for (var a = arguments.length, c = new Array(a > 2 ? a - 2 : 0), _ = 2; _ < a; _++)
26
26
  c[_ - 2] = arguments[_];
27
- return n.apply(l, c);
27
+ return o.apply(l, c);
28
28
  });
29
- Pe || (Pe = function(n) {
29
+ ke || (ke = function(o) {
30
30
  for (var l = arguments.length, a = new Array(l > 1 ? l - 1 : 0), c = 1; c < l; c++)
31
31
  a[c - 1] = arguments[c];
32
- return new n(...a);
32
+ return new o(...a);
33
33
  });
34
- const le = /* @__PURE__ */ O(Array.prototype.forEach), Vt = /* @__PURE__ */ O(Array.prototype.lastIndexOf), lt = /* @__PURE__ */ O(Array.prototype.pop), $ = /* @__PURE__ */ O(Array.prototype.push), $t = /* @__PURE__ */ O(Array.prototype.splice), fe = /* @__PURE__ */ O(String.prototype.toLowerCase), be = /* @__PURE__ */ O(String.prototype.toString), Ie = /* @__PURE__ */ O(String.prototype.match), q = /* @__PURE__ */ O(String.prototype.replace), qt = /* @__PURE__ */ O(String.prototype.indexOf), Kt = /* @__PURE__ */ O(String.prototype.trim), D = /* @__PURE__ */ O(Object.prototype.hasOwnProperty), S = /* @__PURE__ */ O(RegExp.prototype.test), K = /* @__PURE__ */ Zt(TypeError);
34
+ const ce = /* @__PURE__ */ O(Array.prototype.forEach), $t = /* @__PURE__ */ O(Array.prototype.lastIndexOf), ft = /* @__PURE__ */ O(Array.prototype.pop), q = /* @__PURE__ */ O(Array.prototype.push), qt = /* @__PURE__ */ O(Array.prototype.splice), ue = /* @__PURE__ */ O(String.prototype.toLowerCase), Ie = /* @__PURE__ */ O(String.prototype.toString), Ne = /* @__PURE__ */ O(String.prototype.match), K = /* @__PURE__ */ O(String.prototype.replace), Kt = /* @__PURE__ */ O(String.prototype.indexOf), Zt = /* @__PURE__ */ O(String.prototype.trim), D = /* @__PURE__ */ O(Object.prototype.hasOwnProperty), S = /* @__PURE__ */ O(RegExp.prototype.test), Z = /* @__PURE__ */ Jt(TypeError);
35
35
  function O(r) {
36
- return function(n) {
37
- n instanceof RegExp && (n.lastIndex = 0);
36
+ return function(o) {
37
+ o instanceof RegExp && (o.lastIndex = 0);
38
38
  for (var l = arguments.length, a = new Array(l > 1 ? l - 1 : 0), c = 1; c < l; c++)
39
39
  a[c - 1] = arguments[c];
40
- return xe(r, n, a);
40
+ return ve(r, o, a);
41
41
  };
42
42
  }
43
- function Zt(r) {
43
+ function Jt(r) {
44
44
  return function() {
45
- for (var n = arguments.length, l = new Array(n), a = 0; a < n; a++)
45
+ for (var o = arguments.length, l = new Array(o), a = 0; a < o; a++)
46
46
  l[a] = arguments[a];
47
- return Pe(r, l);
47
+ return ke(r, l);
48
48
  };
49
49
  }
50
- function s(r, n) {
51
- let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : fe;
52
- st && st(r, null);
53
- let a = n.length;
50
+ function s(r, o) {
51
+ let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ue;
52
+ ct && ct(r, null);
53
+ let a = o.length;
54
54
  for (; a--; ) {
55
- let c = n[a];
55
+ let c = o[a];
56
56
  if (typeof c == "string") {
57
57
  const _ = l(c);
58
- _ !== c && (Yt(n) || (n[a] = _), c = _);
58
+ _ !== c && (Xt(o) || (o[a] = _), c = _);
59
59
  }
60
60
  r[c] = !0;
61
61
  }
62
62
  return r;
63
63
  }
64
- function Jt(r) {
65
- for (let n = 0; n < r.length; n++)
66
- D(r, n) || (r[n] = null);
64
+ function Qt(r) {
65
+ for (let o = 0; o < r.length; o++)
66
+ D(r, o) || (r[o] = null);
67
67
  return r;
68
68
  }
69
- function C(r) {
70
- const n = Et(null);
71
- for (const [l, a] of Tt(r))
72
- D(r, l) && (Array.isArray(a) ? n[l] = Jt(a) : a && typeof a == "object" && a.constructor === Object ? n[l] = C(a) : n[l] = a);
73
- return n;
69
+ function M(r) {
70
+ const o = Pe(null);
71
+ for (const [l, a] of _t(r))
72
+ D(r, l) && (Array.isArray(a) ? o[l] = Qt(a) : a && typeof a == "object" && a.constructor === Object ? o[l] = M(a) : o[l] = a);
73
+ return o;
74
74
  }
75
- function Z(r, n) {
75
+ function J(r, o) {
76
76
  for (; r !== null; ) {
77
- const a = jt(r, n);
77
+ const a = Vt(r, o);
78
78
  if (a) {
79
79
  if (a.get)
80
80
  return O(a.get);
81
81
  if (typeof a.value == "function")
82
82
  return O(a.value);
83
83
  }
84
- r = Xt(r);
84
+ r = jt(r);
85
85
  }
86
86
  function l() {
87
87
  return null;
88
88
  }
89
89
  return l;
90
90
  }
91
- const ct = /* @__PURE__ */ R(["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"]), Ne = /* @__PURE__ */ R(["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", "slot", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Me = /* @__PURE__ */ R(["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"]), Qt = /* @__PURE__ */ R(["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"]), Ce = /* @__PURE__ */ R(["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"]), en = /* @__PURE__ */ R(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ft = /* @__PURE__ */ R(["#text"]), ut = /* @__PURE__ */ R(["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"]), we = /* @__PURE__ */ R(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), mt = /* @__PURE__ */ R(["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"]), ce = /* @__PURE__ */ R(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), tn = /* @__PURE__ */ y(/\{\{[\w\W]*|[\w\W]*\}\}/gm), nn = /* @__PURE__ */ y(/<%[\w\W]*|[\w\W]*%>/gm), on = /* @__PURE__ */ y(/\$\{[\w\W]*/gm), an = /* @__PURE__ */ y(/^data-[\-\w.\u00B7-\uFFFF]+$/), rn = /* @__PURE__ */ y(/^aria-[\-\w]+$/), _t = /* @__PURE__ */ y(
91
+ const ut = /* @__PURE__ */ R(["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"]), Ce = /* @__PURE__ */ R(["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"]), Me = /* @__PURE__ */ R(["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"]), en = /* @__PURE__ */ R(["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"]), we = /* @__PURE__ */ R(["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"]), tn = /* @__PURE__ */ R(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), mt = /* @__PURE__ */ R(["#text"]), pt = /* @__PURE__ */ R(["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"]), xe = /* @__PURE__ */ R(["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"]), dt = /* @__PURE__ */ R(["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"]), fe = /* @__PURE__ */ R(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), nn = /* @__PURE__ */ y(/\{\{[\w\W]*|[\w\W]*\}\}/gm), on = /* @__PURE__ */ y(/<%[\w\W]*|[\w\W]*%>/gm), an = /* @__PURE__ */ y(/\$\{[\w\W]*/gm), rn = /* @__PURE__ */ y(/^data-[\-\w.\u00B7-\uFFFF]+$/), sn = /* @__PURE__ */ y(/^aria-[\-\w]+$/), At = /* @__PURE__ */ y(
92
92
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
93
93
  // eslint-disable-line no-useless-escape
94
- ), sn = /* @__PURE__ */ y(/^(?:\w+script|data):/i), ln = /* @__PURE__ */ y(
94
+ ), ln = /* @__PURE__ */ y(/^(?:\w+script|data):/i), cn = /* @__PURE__ */ y(
95
95
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
96
96
  // eslint-disable-line no-control-regex
97
- ), gt = /* @__PURE__ */ y(/^html$/i), cn = /* @__PURE__ */ y(/^[a-z][.\w]*(-[.\w]+)+$/i);
98
- var pt = /* @__PURE__ */ Object.freeze({
97
+ ), gt = /* @__PURE__ */ y(/^html$/i), fn = /* @__PURE__ */ y(/^[a-z][.\w]*(-[.\w]+)+$/i);
98
+ var Tt = /* @__PURE__ */ Object.freeze({
99
99
  __proto__: null,
100
- ARIA_ATTR: rn,
101
- ATTR_WHITESPACE: ln,
102
- CUSTOM_ELEMENT: cn,
103
- DATA_ATTR: an,
100
+ ARIA_ATTR: sn,
101
+ ATTR_WHITESPACE: cn,
102
+ CUSTOM_ELEMENT: fn,
103
+ DATA_ATTR: rn,
104
104
  DOCTYPE_NAME: gt,
105
- ERB_EXPR: nn,
106
- IS_ALLOWED_URI: _t,
107
- IS_SCRIPT_OR_DATA: sn,
108
- MUSTACHE_EXPR: tn,
109
- TMPLIT_EXPR: on
105
+ ERB_EXPR: on,
106
+ IS_ALLOWED_URI: At,
107
+ IS_SCRIPT_OR_DATA: ln,
108
+ MUSTACHE_EXPR: nn,
109
+ TMPLIT_EXPR: an
110
110
  });
111
- const J = {
111
+ const Q = {
112
112
  element: 1,
113
113
  text: 3,
114
114
  // Deprecated
115
115
  progressingInstruction: 7,
116
116
  comment: 8,
117
117
  document: 9
118
- }, fn = function() {
118
+ }, un = function() {
119
119
  return typeof window > "u" ? null : window;
120
- }, un = function(n, l) {
121
- if (typeof n != "object" || typeof n.createPolicy != "function")
120
+ }, mn = function(o, l) {
121
+ if (typeof o != "object" || typeof o.createPolicy != "function")
122
122
  return null;
123
123
  let a = null;
124
124
  const c = "data-tt-policy-suffix";
125
125
  l && l.hasAttribute(c) && (a = l.getAttribute(c));
126
126
  const _ = "dompurify" + (a ? "#" + a : "");
127
127
  try {
128
- return n.createPolicy(_, {
128
+ return o.createPolicy(_, {
129
129
  createHTML(w) {
130
130
  return w;
131
131
  },
@@ -136,7 +136,7 @@ const J = {
136
136
  } catch {
137
137
  return console.warn("TrustedTypes policy " + _ + " could not be created."), null;
138
138
  }
139
- }, dt = function() {
139
+ }, Et = function() {
140
140
  return {
141
141
  afterSanitizeAttributes: [],
142
142
  afterSanitizeElements: [],
@@ -149,57 +149,57 @@ const J = {
149
149
  uponSanitizeShadowNode: []
150
150
  };
151
151
  };
152
- function At() {
153
- let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : fn();
154
- const n = (i) => At(i);
155
- if (n.version = "3.2.7", n.removed = [], !r || !r.document || r.document.nodeType !== J.document || !r.Element)
156
- return n.isSupported = !1, n;
152
+ function ht() {
153
+ let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : un();
154
+ const o = (i) => ht(i);
155
+ if (o.version = "3.3.0", o.removed = [], !r || !r.document || r.document.nodeType !== Q.document || !r.Element)
156
+ return o.isSupported = !1, o;
157
157
  let {
158
158
  document: l
159
159
  } = r;
160
160
  const a = l, c = a.currentScript, {
161
161
  DocumentFragment: _,
162
162
  HTMLTemplateElement: w,
163
- Node: ue,
164
- Element: ve,
165
- NodeFilter: W,
166
- NamedNodeMap: ht = r.NamedNodeMap || r.MozNamedAttrMap,
167
- HTMLFormElement: St,
168
- DOMParser: Rt,
169
- trustedTypes: Q
170
- } = r, B = ve.prototype, Ot = Z(B, "cloneNode"), Lt = Z(B, "remove"), yt = Z(B, "nextSibling"), Dt = Z(B, "childNodes"), ee = Z(B, "parentNode");
163
+ Node: me,
164
+ Element: Ue,
165
+ NodeFilter: B,
166
+ NamedNodeMap: St = r.NamedNodeMap || r.MozNamedAttrMap,
167
+ HTMLFormElement: Rt,
168
+ DOMParser: Ot,
169
+ trustedTypes: ee
170
+ } = r, Y = Ue.prototype, bt = J(Y, "cloneNode"), yt = J(Y, "remove"), Dt = J(Y, "nextSibling"), Lt = J(Y, "childNodes"), te = J(Y, "parentNode");
171
171
  if (typeof w == "function") {
172
172
  const i = l.createElement("template");
173
173
  i.content && i.content.ownerDocument && (l = i.content.ownerDocument);
174
174
  }
175
- let A, Y = "";
175
+ let g, X = "";
176
176
  const {
177
- implementation: me,
178
- createNodeIterator: bt,
179
- createDocumentFragment: It,
180
- getElementsByTagName: Nt
177
+ implementation: pe,
178
+ createNodeIterator: It,
179
+ createDocumentFragment: Nt,
180
+ getElementsByTagName: Ct
181
181
  } = l, {
182
182
  importNode: Mt
183
183
  } = a;
184
- let h = dt();
185
- n.isSupported = typeof Tt == "function" && typeof ee == "function" && me && me.createHTMLDocument !== void 0;
184
+ let h = Et();
185
+ o.isSupported = typeof _t == "function" && typeof te == "function" && pe && pe.createHTMLDocument !== void 0;
186
186
  const {
187
- MUSTACHE_EXPR: pe,
188
- ERB_EXPR: de,
189
- TMPLIT_EXPR: Te,
190
- DATA_ATTR: Ct,
191
- ARIA_ATTR: wt,
192
- IS_SCRIPT_OR_DATA: xt,
193
- ATTR_WHITESPACE: Ue,
194
- CUSTOM_ELEMENT: Pt
195
- } = pt;
187
+ MUSTACHE_EXPR: de,
188
+ ERB_EXPR: Te,
189
+ TMPLIT_EXPR: Ee,
190
+ DATA_ATTR: wt,
191
+ ARIA_ATTR: xt,
192
+ IS_SCRIPT_OR_DATA: Pt,
193
+ ATTR_WHITESPACE: Fe,
194
+ CUSTOM_ELEMENT: vt
195
+ } = Tt;
196
196
  let {
197
- IS_ALLOWED_URI: ke
198
- } = pt, p = null;
199
- const Fe = s({}, [...ct, ...Ne, ...Me, ...Ce, ...ft]);
197
+ IS_ALLOWED_URI: He
198
+ } = Tt, p = null;
199
+ const ze = s({}, [...ut, ...Ce, ...Me, ...we, ...mt]);
200
200
  let T = null;
201
- const He = s({}, [...ut, ...we, ...mt, ...ce]);
202
- let u = Object.seal(Et(null, {
201
+ const Ge = s({}, [...pt, ...xe, ...dt, ...fe]);
202
+ let u = Object.seal(Pe(null, {
203
203
  tagNameCheck: {
204
204
  writable: !0,
205
205
  configurable: !1,
@@ -218,70 +218,85 @@ function At() {
218
218
  enumerable: !0,
219
219
  value: !1
220
220
  }
221
- })), X = null, Ee = null, ze = !0, _e = !0, Ge = !1, We = !0, v = !1, te = !0, x = !1, ge = !1, Ae = !1, U = !1, ne = !1, oe = !1, Be = !0, Ye = !1;
222
- const vt = "user-content-";
223
- let he = !0, j = !1, k = {}, F = null;
224
- const Xe = s({}, ["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"]);
225
- let je = null;
226
- const Ve = s({}, ["audio", "video", "img", "source", "image", "track"]);
227
- let Se = null;
228
- const $e = s({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ie = "http://www.w3.org/1998/Math/MathML", ae = "http://www.w3.org/2000/svg", I = "http://www.w3.org/1999/xhtml";
229
- let H = I, Re = !1, Oe = null;
230
- const Ut = s({}, [ie, ae, I], be);
231
- let re = s({}, ["mi", "mo", "mn", "ms", "mtext"]), se = s({}, ["annotation-xml"]);
232
- const kt = s({}, ["title", "style", "font", "a", "script"]);
233
- let V = null;
234
- const Ft = ["application/xhtml+xml", "text/html"], Ht = "text/html";
235
- let d = null, z = null;
236
- const zt = l.createElement("form"), qe = function(e) {
221
+ })), j = null, _e = null;
222
+ const v = Object.seal(Pe(null, {
223
+ tagCheck: {
224
+ writable: !0,
225
+ configurable: !1,
226
+ enumerable: !0,
227
+ value: null
228
+ },
229
+ attributeCheck: {
230
+ writable: !0,
231
+ configurable: !1,
232
+ enumerable: !0,
233
+ value: null
234
+ }
235
+ }));
236
+ let We = !0, Ae = !0, Be = !1, Ye = !0, k = !1, ne = !0, x = !1, ge = !1, he = !1, U = !1, oe = !1, ie = !1, Xe = !0, je = !1;
237
+ const kt = "user-content-";
238
+ let Se = !0, V = !1, F = {}, H = null;
239
+ const Ve = s({}, ["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"]);
240
+ let $e = null;
241
+ const qe = s({}, ["audio", "video", "img", "source", "image", "track"]);
242
+ let Re = null;
243
+ const Ke = s({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ae = "http://www.w3.org/1998/Math/MathML", re = "http://www.w3.org/2000/svg", I = "http://www.w3.org/1999/xhtml";
244
+ let z = I, Oe = !1, be = null;
245
+ const Ut = s({}, [ae, re, I], Ie);
246
+ let se = s({}, ["mi", "mo", "mn", "ms", "mtext"]), le = s({}, ["annotation-xml"]);
247
+ const Ft = s({}, ["title", "style", "font", "a", "script"]);
248
+ let $ = null;
249
+ const Ht = ["application/xhtml+xml", "text/html"], zt = "text/html";
250
+ let d = null, G = null;
251
+ const Gt = l.createElement("form"), Ze = function(e) {
237
252
  return e instanceof RegExp || e instanceof Function;
238
- }, Le = function() {
253
+ }, ye = function() {
239
254
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
240
- if (!(z && z === e)) {
241
- if ((!e || typeof e != "object") && (e = {}), e = C(e), V = // eslint-disable-next-line unicorn/prefer-includes
242
- Ft.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? Ht : e.PARSER_MEDIA_TYPE, d = V === "application/xhtml+xml" ? be : fe, p = D(e, "ALLOWED_TAGS") ? s({}, e.ALLOWED_TAGS, d) : Fe, T = D(e, "ALLOWED_ATTR") ? s({}, e.ALLOWED_ATTR, d) : He, Oe = D(e, "ALLOWED_NAMESPACES") ? s({}, e.ALLOWED_NAMESPACES, be) : Ut, Se = D(e, "ADD_URI_SAFE_ATTR") ? s(C($e), e.ADD_URI_SAFE_ATTR, d) : $e, je = D(e, "ADD_DATA_URI_TAGS") ? s(C(Ve), e.ADD_DATA_URI_TAGS, d) : Ve, F = D(e, "FORBID_CONTENTS") ? s({}, e.FORBID_CONTENTS, d) : Xe, X = D(e, "FORBID_TAGS") ? s({}, e.FORBID_TAGS, d) : C({}), Ee = D(e, "FORBID_ATTR") ? s({}, e.FORBID_ATTR, d) : C({}), k = D(e, "USE_PROFILES") ? e.USE_PROFILES : !1, ze = e.ALLOW_ARIA_ATTR !== !1, _e = e.ALLOW_DATA_ATTR !== !1, Ge = e.ALLOW_UNKNOWN_PROTOCOLS || !1, We = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, v = e.SAFE_FOR_TEMPLATES || !1, te = e.SAFE_FOR_XML !== !1, x = e.WHOLE_DOCUMENT || !1, U = e.RETURN_DOM || !1, ne = e.RETURN_DOM_FRAGMENT || !1, oe = e.RETURN_TRUSTED_TYPE || !1, Ae = e.FORCE_BODY || !1, Be = e.SANITIZE_DOM !== !1, Ye = e.SANITIZE_NAMED_PROPS || !1, he = e.KEEP_CONTENT !== !1, j = e.IN_PLACE || !1, ke = e.ALLOWED_URI_REGEXP || _t, H = e.NAMESPACE || I, re = e.MATHML_TEXT_INTEGRATION_POINTS || re, se = e.HTML_INTEGRATION_POINTS || se, u = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && qe(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (u.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && qe(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (u.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (u.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), v && (_e = !1), ne && (U = !0), k && (p = s({}, ft), T = [], k.html === !0 && (s(p, ct), s(T, ut)), k.svg === !0 && (s(p, Ne), s(T, we), s(T, ce)), k.svgFilters === !0 && (s(p, Me), s(T, we), s(T, ce)), k.mathMl === !0 && (s(p, Ce), s(T, mt), s(T, ce))), e.ADD_TAGS && (p === Fe && (p = C(p)), s(p, e.ADD_TAGS, d)), e.ADD_ATTR && (T === He && (T = C(T)), s(T, e.ADD_ATTR, d)), e.ADD_URI_SAFE_ATTR && s(Se, e.ADD_URI_SAFE_ATTR, d), e.FORBID_CONTENTS && (F === Xe && (F = C(F)), s(F, e.FORBID_CONTENTS, d)), he && (p["#text"] = !0), x && s(p, ["html", "head", "body"]), p.table && (s(p, ["tbody"]), delete X.tbody), e.TRUSTED_TYPES_POLICY) {
255
+ if (!(G && G === e)) {
256
+ if ((!e || typeof e != "object") && (e = {}), e = M(e), $ = // eslint-disable-next-line unicorn/prefer-includes
257
+ Ht.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? zt : e.PARSER_MEDIA_TYPE, d = $ === "application/xhtml+xml" ? Ie : ue, p = D(e, "ALLOWED_TAGS") ? s({}, e.ALLOWED_TAGS, d) : ze, T = D(e, "ALLOWED_ATTR") ? s({}, e.ALLOWED_ATTR, d) : Ge, be = D(e, "ALLOWED_NAMESPACES") ? s({}, e.ALLOWED_NAMESPACES, Ie) : Ut, Re = D(e, "ADD_URI_SAFE_ATTR") ? s(M(Ke), e.ADD_URI_SAFE_ATTR, d) : Ke, $e = D(e, "ADD_DATA_URI_TAGS") ? s(M(qe), e.ADD_DATA_URI_TAGS, d) : qe, H = D(e, "FORBID_CONTENTS") ? s({}, e.FORBID_CONTENTS, d) : Ve, j = D(e, "FORBID_TAGS") ? s({}, e.FORBID_TAGS, d) : M({}), _e = D(e, "FORBID_ATTR") ? s({}, e.FORBID_ATTR, d) : M({}), F = D(e, "USE_PROFILES") ? e.USE_PROFILES : !1, We = e.ALLOW_ARIA_ATTR !== !1, Ae = e.ALLOW_DATA_ATTR !== !1, Be = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ye = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, k = e.SAFE_FOR_TEMPLATES || !1, ne = e.SAFE_FOR_XML !== !1, x = e.WHOLE_DOCUMENT || !1, U = e.RETURN_DOM || !1, oe = e.RETURN_DOM_FRAGMENT || !1, ie = e.RETURN_TRUSTED_TYPE || !1, he = e.FORCE_BODY || !1, Xe = e.SANITIZE_DOM !== !1, je = e.SANITIZE_NAMED_PROPS || !1, Se = e.KEEP_CONTENT !== !1, V = e.IN_PLACE || !1, He = e.ALLOWED_URI_REGEXP || At, z = e.NAMESPACE || I, se = e.MATHML_TEXT_INTEGRATION_POINTS || se, le = e.HTML_INTEGRATION_POINTS || le, u = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && Ze(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (u.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && Ze(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (u.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (u.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), k && (Ae = !1), oe && (U = !0), F && (p = s({}, mt), T = [], F.html === !0 && (s(p, ut), s(T, pt)), F.svg === !0 && (s(p, Ce), s(T, xe), s(T, fe)), F.svgFilters === !0 && (s(p, Me), s(T, xe), s(T, fe)), F.mathMl === !0 && (s(p, we), s(T, dt), s(T, fe))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? v.tagCheck = e.ADD_TAGS : (p === ze && (p = M(p)), s(p, e.ADD_TAGS, d))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? v.attributeCheck = e.ADD_ATTR : (T === Ge && (T = M(T)), s(T, e.ADD_ATTR, d))), e.ADD_URI_SAFE_ATTR && s(Re, e.ADD_URI_SAFE_ATTR, d), e.FORBID_CONTENTS && (H === Ve && (H = M(H)), s(H, e.FORBID_CONTENTS, d)), Se && (p["#text"] = !0), x && s(p, ["html", "head", "body"]), p.table && (s(p, ["tbody"]), delete j.tbody), e.TRUSTED_TYPES_POLICY) {
243
258
  if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
244
- throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
259
+ throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
245
260
  if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
246
- throw K('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
247
- A = e.TRUSTED_TYPES_POLICY, Y = A.createHTML("");
261
+ throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
262
+ g = e.TRUSTED_TYPES_POLICY, X = g.createHTML("");
248
263
  } else
249
- A === void 0 && (A = un(Q, c)), A !== null && typeof Y == "string" && (Y = A.createHTML(""));
250
- R && R(e), z = e;
264
+ g === void 0 && (g = mn(ee, c)), g !== null && typeof X == "string" && (X = g.createHTML(""));
265
+ R && R(e), G = e;
251
266
  }
252
- }, Ke = s({}, [...Ne, ...Me, ...Qt]), Ze = s({}, [...Ce, ...en]), Gt = function(e) {
253
- let t = ee(e);
267
+ }, Je = s({}, [...Ce, ...Me, ...en]), Qe = s({}, [...we, ...tn]), Wt = function(e) {
268
+ let t = te(e);
254
269
  (!t || !t.tagName) && (t = {
255
- namespaceURI: H,
270
+ namespaceURI: z,
256
271
  tagName: "template"
257
272
  });
258
- const o = fe(e.tagName), f = fe(t.tagName);
259
- return Oe[e.namespaceURI] ? e.namespaceURI === ae ? t.namespaceURI === I ? o === "svg" : t.namespaceURI === ie ? o === "svg" && (f === "annotation-xml" || re[f]) : !!Ke[o] : e.namespaceURI === ie ? t.namespaceURI === I ? o === "math" : t.namespaceURI === ae ? o === "math" && se[f] : !!Ze[o] : e.namespaceURI === I ? t.namespaceURI === ae && !se[f] || t.namespaceURI === ie && !re[f] ? !1 : !Ze[o] && (kt[o] || !Ke[o]) : !!(V === "application/xhtml+xml" && Oe[e.namespaceURI]) : !1;
260
- }, b = function(e) {
261
- $(n.removed, {
273
+ const n = ue(e.tagName), f = ue(t.tagName);
274
+ return be[e.namespaceURI] ? e.namespaceURI === re ? t.namespaceURI === I ? n === "svg" : t.namespaceURI === ae ? n === "svg" && (f === "annotation-xml" || se[f]) : !!Je[n] : e.namespaceURI === ae ? t.namespaceURI === I ? n === "math" : t.namespaceURI === re ? n === "math" && le[f] : !!Qe[n] : e.namespaceURI === I ? t.namespaceURI === re && !le[f] || t.namespaceURI === ae && !se[f] ? !1 : !Qe[n] && (Ft[n] || !Je[n]) : !!($ === "application/xhtml+xml" && be[e.namespaceURI]) : !1;
275
+ }, L = function(e) {
276
+ q(o.removed, {
262
277
  element: e
263
278
  });
264
279
  try {
265
- ee(e).removeChild(e);
280
+ te(e).removeChild(e);
266
281
  } catch {
267
- Lt(e);
282
+ yt(e);
268
283
  }
269
284
  }, P = function(e, t) {
270
285
  try {
271
- $(n.removed, {
286
+ q(o.removed, {
272
287
  attribute: t.getAttributeNode(e),
273
288
  from: t
274
289
  });
275
290
  } catch {
276
- $(n.removed, {
291
+ q(o.removed, {
277
292
  attribute: null,
278
293
  from: t
279
294
  });
280
295
  }
281
296
  if (t.removeAttribute(e), e === "is")
282
- if (U || ne)
297
+ if (U || oe)
283
298
  try {
284
- b(t);
299
+ L(t);
285
300
  } catch {
286
301
  }
287
302
  else
@@ -289,98 +304,100 @@ function At() {
289
304
  t.setAttribute(e, "");
290
305
  } catch {
291
306
  }
292
- }, Je = function(e) {
293
- let t = null, o = null;
294
- if (Ae)
307
+ }, et = function(e) {
308
+ let t = null, n = null;
309
+ if (he)
295
310
  e = "<remove></remove>" + e;
296
311
  else {
297
- const m = Ie(e, /^[\r\n\t ]+/);
298
- o = m && m[0];
312
+ const m = Ne(e, /^[\r\n\t ]+/);
313
+ n = m && m[0];
299
314
  }
300
- V === "application/xhtml+xml" && H === I && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
301
- const f = A ? A.createHTML(e) : e;
302
- if (H === I)
315
+ $ === "application/xhtml+xml" && z === I && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
316
+ const f = g ? g.createHTML(e) : e;
317
+ if (z === I)
303
318
  try {
304
- t = new Rt().parseFromString(f, V);
319
+ t = new Ot().parseFromString(f, $);
305
320
  } catch {
306
321
  }
307
322
  if (!t || !t.documentElement) {
308
- t = me.createDocument(H, "template", null);
323
+ t = pe.createDocument(z, "template", null);
309
324
  try {
310
- t.documentElement.innerHTML = Re ? Y : f;
325
+ t.documentElement.innerHTML = Oe ? X : f;
311
326
  } catch {
312
327
  }
313
328
  }
314
- const g = t.body || t.documentElement;
315
- return e && o && g.insertBefore(l.createTextNode(o), g.childNodes[0] || null), H === I ? Nt.call(t, x ? "html" : "body")[0] : x ? t.documentElement : g;
316
- }, Qe = function(e) {
317
- return bt.call(
329
+ const A = t.body || t.documentElement;
330
+ return e && n && A.insertBefore(l.createTextNode(n), A.childNodes[0] || null), z === I ? Ct.call(t, x ? "html" : "body")[0] : x ? t.documentElement : A;
331
+ }, tt = function(e) {
332
+ return It.call(
318
333
  e.ownerDocument || e,
319
334
  e,
320
335
  // eslint-disable-next-line no-bitwise
321
- W.SHOW_ELEMENT | W.SHOW_COMMENT | W.SHOW_TEXT | W.SHOW_PROCESSING_INSTRUCTION | W.SHOW_CDATA_SECTION,
336
+ B.SHOW_ELEMENT | B.SHOW_COMMENT | B.SHOW_TEXT | B.SHOW_PROCESSING_INSTRUCTION | B.SHOW_CDATA_SECTION,
322
337
  null
323
338
  );
324
- }, ye = function(e) {
325
- return e instanceof St && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof ht) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
326
- }, et = function(e) {
327
- return typeof ue == "function" && e instanceof ue;
339
+ }, De = function(e) {
340
+ return e instanceof Rt && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof St) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
341
+ }, nt = function(e) {
342
+ return typeof me == "function" && e instanceof me;
328
343
  };
329
344
  function N(i, e, t) {
330
- le(i, (o) => {
331
- o.call(n, e, t, z);
345
+ ce(i, (n) => {
346
+ n.call(o, e, t, G);
332
347
  });
333
348
  }
334
- const tt = function(e) {
349
+ const ot = function(e) {
335
350
  let t = null;
336
- if (N(h.beforeSanitizeElements, e, null), ye(e))
337
- return b(e), !0;
338
- const o = d(e.nodeName);
351
+ if (N(h.beforeSanitizeElements, e, null), De(e))
352
+ return L(e), !0;
353
+ const n = d(e.nodeName);
339
354
  if (N(h.uponSanitizeElement, e, {
340
- tagName: o,
355
+ tagName: n,
341
356
  allowedTags: p
342
- }), te && e.hasChildNodes() && !et(e.firstElementChild) && S(/<[/\w!]/g, e.innerHTML) && S(/<[/\w!]/g, e.textContent) || e.nodeType === J.progressingInstruction || te && e.nodeType === J.comment && S(/<[/\w]/g, e.data))
343
- return b(e), !0;
344
- if (!p[o] || X[o]) {
345
- if (!X[o] && ot(o) && (u.tagNameCheck instanceof RegExp && S(u.tagNameCheck, o) || u.tagNameCheck instanceof Function && u.tagNameCheck(o)))
357
+ }), ne && e.hasChildNodes() && !nt(e.firstElementChild) && S(/<[/\w!]/g, e.innerHTML) && S(/<[/\w!]/g, e.textContent) || e.nodeType === Q.progressingInstruction || ne && e.nodeType === Q.comment && S(/<[/\w]/g, e.data))
358
+ return L(e), !0;
359
+ if (!(v.tagCheck instanceof Function && v.tagCheck(n)) && (!p[n] || j[n])) {
360
+ if (!j[n] && at(n) && (u.tagNameCheck instanceof RegExp && S(u.tagNameCheck, n) || u.tagNameCheck instanceof Function && u.tagNameCheck(n)))
346
361
  return !1;
347
- if (he && !F[o]) {
348
- const f = ee(e) || e.parentNode, g = Dt(e) || e.childNodes;
349
- if (g && f) {
350
- const m = g.length;
351
- for (let L = m - 1; L >= 0; --L) {
352
- const M = Ot(g[L], !0);
353
- M.__removalCount = (e.__removalCount || 0) + 1, f.insertBefore(M, yt(e));
362
+ if (Se && !H[n]) {
363
+ const f = te(e) || e.parentNode, A = Lt(e) || e.childNodes;
364
+ if (A && f) {
365
+ const m = A.length;
366
+ for (let b = m - 1; b >= 0; --b) {
367
+ const C = bt(A[b], !0);
368
+ C.__removalCount = (e.__removalCount || 0) + 1, f.insertBefore(C, Dt(e));
354
369
  }
355
370
  }
356
371
  }
357
- return b(e), !0;
372
+ return L(e), !0;
358
373
  }
359
- return e instanceof ve && !Gt(e) || (o === "noscript" || o === "noembed" || o === "noframes") && S(/<\/no(script|embed|frames)/i, e.innerHTML) ? (b(e), !0) : (v && e.nodeType === J.text && (t = e.textContent, le([pe, de, Te], (f) => {
360
- t = q(t, f, " ");
361
- }), e.textContent !== t && ($(n.removed, {
374
+ return e instanceof Ue && !Wt(e) || (n === "noscript" || n === "noembed" || n === "noframes") && S(/<\/no(script|embed|frames)/i, e.innerHTML) ? (L(e), !0) : (k && e.nodeType === Q.text && (t = e.textContent, ce([de, Te, Ee], (f) => {
375
+ t = K(t, f, " ");
376
+ }), e.textContent !== t && (q(o.removed, {
362
377
  element: e.cloneNode()
363
378
  }), e.textContent = t)), N(h.afterSanitizeElements, e, null), !1);
364
- }, nt = function(e, t, o) {
365
- if (Be && (t === "id" || t === "name") && (o in l || o in zt))
379
+ }, it = function(e, t, n) {
380
+ if (Xe && (t === "id" || t === "name") && (n in l || n in Gt))
366
381
  return !1;
367
- if (!(_e && !Ee[t] && S(Ct, t))) {
368
- if (!(ze && S(wt, t))) {
369
- if (!T[t] || Ee[t]) {
370
- if (
371
- // First condition does a very basic check if a) it's basically a valid custom element tagname AND
372
- // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
373
- // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
374
- !(ot(e) && (u.tagNameCheck instanceof RegExp && S(u.tagNameCheck, e) || u.tagNameCheck instanceof Function && u.tagNameCheck(e)) && (u.attributeNameCheck instanceof RegExp && S(u.attributeNameCheck, t) || u.attributeNameCheck instanceof Function && u.attributeNameCheck(t, e)) || // Alternative, second condition checks if it's an `is`-attribute, AND
375
- // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
376
- t === "is" && u.allowCustomizedBuiltInElements && (u.tagNameCheck instanceof RegExp && S(u.tagNameCheck, o) || u.tagNameCheck instanceof Function && u.tagNameCheck(o)))
377
- ) return !1;
378
- } else if (!Se[t]) {
379
- if (!S(ke, q(o, Ue, ""))) {
380
- if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && qt(o, "data:") === 0 && je[e])) {
381
- if (!(Ge && !S(xt, q(o, Ue, "")))) {
382
- if (o)
383
- return !1;
382
+ if (!(Ae && !_e[t] && S(wt, t))) {
383
+ if (!(We && S(xt, t))) {
384
+ if (!(v.attributeCheck instanceof Function && v.attributeCheck(t, e))) {
385
+ if (!T[t] || _e[t]) {
386
+ if (
387
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
388
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
389
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
390
+ !(at(e) && (u.tagNameCheck instanceof RegExp && S(u.tagNameCheck, e) || u.tagNameCheck instanceof Function && u.tagNameCheck(e)) && (u.attributeNameCheck instanceof RegExp && S(u.attributeNameCheck, t) || u.attributeNameCheck instanceof Function && u.attributeNameCheck(t, e)) || // Alternative, second condition checks if it's an `is`-attribute, AND
391
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
392
+ t === "is" && u.allowCustomizedBuiltInElements && (u.tagNameCheck instanceof RegExp && S(u.tagNameCheck, n) || u.tagNameCheck instanceof Function && u.tagNameCheck(n)))
393
+ ) return !1;
394
+ } else if (!Re[t]) {
395
+ if (!S(He, K(n, Fe, ""))) {
396
+ if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Kt(n, "data:") === 0 && $e[e])) {
397
+ if (!(Be && !S(Pt, K(n, Fe, "")))) {
398
+ if (n)
399
+ return !1;
400
+ }
384
401
  }
385
402
  }
386
403
  }
@@ -388,16 +405,16 @@ function At() {
388
405
  }
389
406
  }
390
407
  return !0;
391
- }, ot = function(e) {
392
- return e !== "annotation-xml" && Ie(e, Pt);
393
- }, it = function(e) {
408
+ }, at = function(e) {
409
+ return e !== "annotation-xml" && Ne(e, vt);
410
+ }, rt = function(e) {
394
411
  N(h.beforeSanitizeAttributes, e, null);
395
412
  const {
396
413
  attributes: t
397
414
  } = e;
398
- if (!t || ye(e))
415
+ if (!t || De(e))
399
416
  return;
400
- const o = {
417
+ const n = {
401
418
  attrName: "",
402
419
  attrValue: "",
403
420
  keepAttr: !0,
@@ -406,157 +423,157 @@ function At() {
406
423
  };
407
424
  let f = t.length;
408
425
  for (; f--; ) {
409
- const g = t[f], {
426
+ const A = t[f], {
410
427
  name: m,
411
- namespaceURI: L,
412
- value: M
413
- } = g, G = d(m), De = M;
414
- let E = m === "value" ? De : Kt(De);
415
- if (o.attrName = G, o.attrValue = E, o.keepAttr = !0, o.forceKeepAttr = void 0, N(h.uponSanitizeAttribute, e, o), E = o.attrValue, Ye && (G === "id" || G === "name") && (P(m, e), E = vt + E), te && S(/((--!?|])>)|<\/(style|title|textarea)/i, E)) {
428
+ namespaceURI: b,
429
+ value: C
430
+ } = A, W = d(m), Le = C;
431
+ let E = m === "value" ? Le : Zt(Le);
432
+ if (n.attrName = W, n.attrValue = E, n.keepAttr = !0, n.forceKeepAttr = void 0, N(h.uponSanitizeAttribute, e, n), E = n.attrValue, je && (W === "id" || W === "name") && (P(m, e), E = kt + E), ne && S(/((--!?|])>)|<\/(style|title|textarea)/i, E)) {
416
433
  P(m, e);
417
434
  continue;
418
435
  }
419
- if (G === "attributename" && Ie(E, "href")) {
436
+ if (W === "attributename" && Ne(E, "href")) {
420
437
  P(m, e);
421
438
  continue;
422
439
  }
423
- if (o.forceKeepAttr)
440
+ if (n.forceKeepAttr)
424
441
  continue;
425
- if (!o.keepAttr) {
442
+ if (!n.keepAttr) {
426
443
  P(m, e);
427
444
  continue;
428
445
  }
429
- if (!We && S(/\/>/i, E)) {
446
+ if (!Ye && S(/\/>/i, E)) {
430
447
  P(m, e);
431
448
  continue;
432
449
  }
433
- v && le([pe, de, Te], (rt) => {
434
- E = q(E, rt, " ");
450
+ k && ce([de, Te, Ee], (lt) => {
451
+ E = K(E, lt, " ");
435
452
  });
436
- const at = d(e.nodeName);
437
- if (!nt(at, G, E)) {
453
+ const st = d(e.nodeName);
454
+ if (!it(st, W, E)) {
438
455
  P(m, e);
439
456
  continue;
440
457
  }
441
- if (A && typeof Q == "object" && typeof Q.getAttributeType == "function" && !L)
442
- switch (Q.getAttributeType(at, G)) {
458
+ if (g && typeof ee == "object" && typeof ee.getAttributeType == "function" && !b)
459
+ switch (ee.getAttributeType(st, W)) {
443
460
  case "TrustedHTML": {
444
- E = A.createHTML(E);
461
+ E = g.createHTML(E);
445
462
  break;
446
463
  }
447
464
  case "TrustedScriptURL": {
448
- E = A.createScriptURL(E);
465
+ E = g.createScriptURL(E);
449
466
  break;
450
467
  }
451
468
  }
452
- if (E !== De)
469
+ if (E !== Le)
453
470
  try {
454
- L ? e.setAttributeNS(L, m, E) : e.setAttribute(m, E), ye(e) ? b(e) : lt(n.removed);
471
+ b ? e.setAttributeNS(b, m, E) : e.setAttribute(m, E), De(e) ? L(e) : ft(o.removed);
455
472
  } catch {
456
473
  P(m, e);
457
474
  }
458
475
  }
459
476
  N(h.afterSanitizeAttributes, e, null);
460
- }, Wt = function i(e) {
477
+ }, Bt = function i(e) {
461
478
  let t = null;
462
- const o = Qe(e);
463
- for (N(h.beforeSanitizeShadowDOM, e, null); t = o.nextNode(); )
464
- N(h.uponSanitizeShadowNode, t, null), tt(t), it(t), t.content instanceof _ && i(t.content);
479
+ const n = tt(e);
480
+ for (N(h.beforeSanitizeShadowDOM, e, null); t = n.nextNode(); )
481
+ N(h.uponSanitizeShadowNode, t, null), ot(t), rt(t), t.content instanceof _ && i(t.content);
465
482
  N(h.afterSanitizeShadowDOM, e, null);
466
483
  };
467
- return n.sanitize = function(i) {
468
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null, o = null, f = null, g = null;
469
- if (Re = !i, Re && (i = "<!-->"), typeof i != "string" && !et(i))
484
+ return o.sanitize = function(i) {
485
+ let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null, n = null, f = null, A = null;
486
+ if (Oe = !i, Oe && (i = "<!-->"), typeof i != "string" && !nt(i))
470
487
  if (typeof i.toString == "function") {
471
488
  if (i = i.toString(), typeof i != "string")
472
- throw K("dirty is not a string, aborting");
489
+ throw Z("dirty is not a string, aborting");
473
490
  } else
474
- throw K("toString is not a function");
475
- if (!n.isSupported)
491
+ throw Z("toString is not a function");
492
+ if (!o.isSupported)
476
493
  return i;
477
- if (ge || Le(e), n.removed = [], typeof i == "string" && (j = !1), j) {
494
+ if (ge || ye(e), o.removed = [], typeof i == "string" && (V = !1), V) {
478
495
  if (i.nodeName) {
479
- const M = d(i.nodeName);
480
- if (!p[M] || X[M])
481
- throw K("root node is forbidden and cannot be sanitized in-place");
496
+ const C = d(i.nodeName);
497
+ if (!p[C] || j[C])
498
+ throw Z("root node is forbidden and cannot be sanitized in-place");
482
499
  }
483
- } else if (i instanceof ue)
484
- t = Je("<!---->"), o = t.ownerDocument.importNode(i, !0), o.nodeType === J.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? t = o : t.appendChild(o);
500
+ } else if (i instanceof me)
501
+ t = et("<!---->"), n = t.ownerDocument.importNode(i, !0), n.nodeType === Q.element && n.nodeName === "BODY" || n.nodeName === "HTML" ? t = n : t.appendChild(n);
485
502
  else {
486
- if (!U && !v && !x && // eslint-disable-next-line unicorn/prefer-includes
503
+ if (!U && !k && !x && // eslint-disable-next-line unicorn/prefer-includes
487
504
  i.indexOf("<") === -1)
488
- return A && oe ? A.createHTML(i) : i;
489
- if (t = Je(i), !t)
490
- return U ? null : oe ? Y : "";
505
+ return g && ie ? g.createHTML(i) : i;
506
+ if (t = et(i), !t)
507
+ return U ? null : ie ? X : "";
491
508
  }
492
- t && Ae && b(t.firstChild);
493
- const m = Qe(j ? i : t);
509
+ t && he && L(t.firstChild);
510
+ const m = tt(V ? i : t);
494
511
  for (; f = m.nextNode(); )
495
- tt(f), it(f), f.content instanceof _ && Wt(f.content);
496
- if (j)
512
+ ot(f), rt(f), f.content instanceof _ && Bt(f.content);
513
+ if (V)
497
514
  return i;
498
515
  if (U) {
499
- if (ne)
500
- for (g = It.call(t.ownerDocument); t.firstChild; )
501
- g.appendChild(t.firstChild);
516
+ if (oe)
517
+ for (A = Nt.call(t.ownerDocument); t.firstChild; )
518
+ A.appendChild(t.firstChild);
502
519
  else
503
- g = t;
504
- return (T.shadowroot || T.shadowrootmode) && (g = Mt.call(a, g, !0)), g;
520
+ A = t;
521
+ return (T.shadowroot || T.shadowrootmode) && (A = Mt.call(a, A, !0)), A;
505
522
  }
506
- let L = x ? t.outerHTML : t.innerHTML;
507
- return x && p["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && S(gt, t.ownerDocument.doctype.name) && (L = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
508
- ` + L), v && le([pe, de, Te], (M) => {
509
- L = q(L, M, " ");
510
- }), A && oe ? A.createHTML(L) : L;
511
- }, n.setConfig = function() {
523
+ let b = x ? t.outerHTML : t.innerHTML;
524
+ return x && p["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && S(gt, t.ownerDocument.doctype.name) && (b = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
525
+ ` + b), k && ce([de, Te, Ee], (C) => {
526
+ b = K(b, C, " ");
527
+ }), g && ie ? g.createHTML(b) : b;
528
+ }, o.setConfig = function() {
512
529
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
513
- Le(i), ge = !0;
514
- }, n.clearConfig = function() {
515
- z = null, ge = !1;
516
- }, n.isValidAttribute = function(i, e, t) {
517
- z || Le({});
518
- const o = d(i), f = d(e);
519
- return nt(o, f, t);
520
- }, n.addHook = function(i, e) {
521
- typeof e == "function" && $(h[i], e);
522
- }, n.removeHook = function(i, e) {
530
+ ye(i), ge = !0;
531
+ }, o.clearConfig = function() {
532
+ G = null, ge = !1;
533
+ }, o.isValidAttribute = function(i, e, t) {
534
+ G || ye({});
535
+ const n = d(i), f = d(e);
536
+ return it(n, f, t);
537
+ }, o.addHook = function(i, e) {
538
+ typeof e == "function" && q(h[i], e);
539
+ }, o.removeHook = function(i, e) {
523
540
  if (e !== void 0) {
524
- const t = Vt(h[i], e);
525
- return t === -1 ? void 0 : $t(h[i], t, 1)[0];
541
+ const t = $t(h[i], e);
542
+ return t === -1 ? void 0 : qt(h[i], t, 1)[0];
526
543
  }
527
- return lt(h[i]);
528
- }, n.removeHooks = function(i) {
544
+ return ft(h[i]);
545
+ }, o.removeHooks = function(i) {
529
546
  h[i] = [];
530
- }, n.removeAllHooks = function() {
531
- h = dt();
532
- }, n;
547
+ }, o.removeAllHooks = function() {
548
+ h = Et();
549
+ }, o;
533
550
  }
534
- var mn = /* @__PURE__ */ At();
535
- function Tn(r, n = {}) {
551
+ var pn = /* @__PURE__ */ ht();
552
+ function En(r, o = {}) {
536
553
  const {
537
554
  allowStyles: l = !1,
538
555
  forbiddenAttributes: a = [],
539
556
  forbiddenTags: c = []
540
- } = n;
557
+ } = o;
541
558
  if (!r || typeof r != "string")
542
559
  return null;
543
- if (!pn())
560
+ if (!dn())
544
561
  return r;
545
- const _ = [...Bt, ...c], w = [
562
+ const _ = [...Yt, ...c], w = [
546
563
  ...l ? [] : ["style"],
547
564
  ...a
548
565
  ];
549
- return mn.sanitize(r, {
566
+ return pn.sanitize(r, {
550
567
  USE_PROFILES: { svg: !0, svgFilters: !0 },
551
568
  FORBID_TAGS: _,
552
569
  FORBID_ATTR: w
553
570
  });
554
571
  }
555
- function pn() {
572
+ function dn() {
556
573
  return !!(typeof window < "u" && window.document && window.document.createElement);
557
574
  }
558
575
  export {
559
- pn as canUseDOM,
560
- Tn as sanitizeSvg
576
+ dn as canUseDOM,
577
+ En as sanitizeSvg
561
578
  };
562
579
  //# sourceMappingURL=utils.es.js.map