@gomusdev/web-components 3.1.1 → 3.2.0

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.
@@ -256,9 +256,9 @@ function enable_legacy_mode_flag() {
256
256
  }
257
257
  const empty = [];
258
258
  function snapshot(value, skip_warning = false, no_tojson = false) {
259
- return clone$1(value, /* @__PURE__ */ new Map(), "", empty, null, no_tojson);
259
+ return clone$2(value, /* @__PURE__ */ new Map(), "", empty, null, no_tojson);
260
260
  }
261
- function clone$1(value, cloned, path, paths, original = null, no_tojson = false) {
261
+ function clone$2(value, cloned, path, paths, original = null, no_tojson = false) {
262
262
  if (typeof value === "object" && value !== null) {
263
263
  var unwrapped = cloned.get(value);
264
264
  if (unwrapped !== void 0) return unwrapped;
@@ -282,7 +282,7 @@ function clone$1(value, cloned, path, paths, original = null, no_tojson = false)
282
282
  for (var i = 0; i < value.length; i += 1) {
283
283
  var element = value[i];
284
284
  if (i in value) {
285
- copy[i] = clone$1(element, cloned, path, paths, null, no_tojson);
285
+ copy[i] = clone$2(element, cloned, path, paths, null, no_tojson);
286
286
  }
287
287
  }
288
288
  return copy;
@@ -294,7 +294,7 @@ function clone$1(value, cloned, path, paths, original = null, no_tojson = false)
294
294
  cloned.set(original, copy);
295
295
  }
296
296
  for (var key in value) {
297
- copy[key] = clone$1(
297
+ copy[key] = clone$2(
298
298
  // @ts-expect-error
299
299
  value[key],
300
300
  cloned,
@@ -314,7 +314,7 @@ function clone$1(value, cloned, path, paths, original = null, no_tojson = false)
314
314
  }
315
315
  if (typeof /** @type {T & { toJSON?: any } } */
316
316
  value.toJSON === "function" && !no_tojson) {
317
- return clone$1(
317
+ return clone$2(
318
318
  /** @type {T & { toJSON(): any } } */
319
319
  value.toJSON(),
320
320
  cloned,
@@ -3034,7 +3034,7 @@ function from_html(content, flags2) {
3034
3034
  return clone2;
3035
3035
  };
3036
3036
  }
3037
- function text(value = "") {
3037
+ function text$1(value = "") {
3038
3038
  if (!hydrating) {
3039
3039
  var t = create_text(value + "");
3040
3040
  assign_nodes(t, t);
@@ -3937,7 +3937,7 @@ function link(state2, prev, next2) {
3937
3937
  next2.prev = prev;
3938
3938
  }
3939
3939
  }
3940
- function html(node, get_value, svg = false, mathml = false, skip_warning = false) {
3940
+ function html$2(node, get_value, svg2 = false, mathml = false, skip_warning = false) {
3941
3941
  var anchor = node;
3942
3942
  var value = "";
3943
3943
  template_effect(() => {
@@ -3976,10 +3976,10 @@ function html(node, get_value, svg = false, mathml = false, skip_warning = false
3976
3976
  return;
3977
3977
  }
3978
3978
  var html2 = value + "";
3979
- if (svg) html2 = `<svg>${html2}</svg>`;
3979
+ if (svg2) html2 = `<svg>${html2}</svg>`;
3980
3980
  else if (mathml) html2 = `<math>${html2}</math>`;
3981
3981
  var node2 = create_fragment_from_html(html2);
3982
- if (svg || mathml) {
3982
+ if (svg2 || mathml) {
3983
3983
  node2 = /** @type {Element} */
3984
3984
  /* @__PURE__ */ get_first_child(node2);
3985
3985
  }
@@ -3989,7 +3989,7 @@ function html(node, get_value, svg = false, mathml = false, skip_warning = false
3989
3989
  /** @type {TemplateNode} */
3990
3990
  node2.lastChild
3991
3991
  );
3992
- if (svg || mathml) {
3992
+ if (svg2 || mathml) {
3993
3993
  while (/* @__PURE__ */ get_first_child(node2)) {
3994
3994
  anchor.before(
3995
3995
  /** @type {TemplateNode} */
@@ -9448,13 +9448,13 @@ class ZodPipeline extends ZodType$1 {
9448
9448
  let ZodReadonly$1 = class ZodReadonly extends ZodType$1 {
9449
9449
  _parse(input) {
9450
9450
  const result = this._def.innerType._parse(input);
9451
- const freeze = (data) => {
9451
+ const freeze2 = (data) => {
9452
9452
  if (isValid(data)) {
9453
9453
  data.value = Object.freeze(data.value);
9454
9454
  }
9455
9455
  return data;
9456
9456
  };
9457
- return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);
9457
+ return isAsync(result) ? result.then((data) => freeze2(data)) : freeze2(result);
9458
9458
  }
9459
9459
  unwrap() {
9460
9460
  return this._def.innerType;
@@ -13190,7 +13190,7 @@ function shallowClone(o) {
13190
13190
  function escapeRegex(str) {
13191
13191
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
13192
13192
  }
13193
- function clone(inst, def, params) {
13193
+ function clone$1(inst, def, params) {
13194
13194
  const cl = new inst._zod.constr(def ?? inst._zod.def);
13195
13195
  if (!def || params?.parent)
13196
13196
  cl._zod.parent = inst;
@@ -15628,7 +15628,7 @@ const ZodType2 = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
15628
15628
  });
15629
15629
  };
15630
15630
  inst.with = inst.check;
15631
- inst.clone = (def2, params) => clone(inst, def2, params);
15631
+ inst.clone = (def2, params) => clone$1(inst, def2, params);
15632
15632
  inst.brand = () => inst;
15633
15633
  inst.register = ((reg, meta) => {
15634
15634
  reg.add(inst, meta);
@@ -17628,9 +17628,9 @@ function CartCounter($$anchor, $$props) {
17628
17628
  push($$props, true);
17629
17629
  let cartCounter = /* @__PURE__ */ user_derived(() => shop.cart?.items.length);
17630
17630
  next();
17631
- var text$1 = text();
17632
- template_effect(() => set_text(text$1, get$2(cartCounter)));
17633
- append($$anchor, text$1);
17631
+ var text2 = text$1();
17632
+ template_effect(() => set_text(text2, get$2(cartCounter)));
17633
+ append($$anchor, text2);
17634
17634
  pop();
17635
17635
  }
17636
17636
  customElements.define("go-cart-counter", create_custom_element(CartCounter, {}, [], []));
@@ -18885,9 +18885,9 @@ class ElementSize {
18885
18885
  if (!node$) return;
18886
18886
  return createSubscriber((update) => {
18887
18887
  if (!this.#window) return;
18888
- const observer = new this.#window.ResizeObserver((entries) => {
18888
+ const observer = new this.#window.ResizeObserver((entries2) => {
18889
18889
  this.#observed = true;
18890
- for (const entry of entries) {
18890
+ for (const entry of entries2) {
18891
18891
  const boxSize = this.#options.box === "content-box" ? entry.contentBoxSize : entry.borderBoxSize;
18892
18892
  const boxSizeArr = Array.isArray(boxSize) ? boxSize : [boxSize];
18893
18893
  this.#size.width = boxSizeArr.reduce((acc, size2) => Math.max(acc, size2.inlineSize), 0);
@@ -23326,9 +23326,9 @@ function Calendar_day($$anchor, $$props) {
23326
23326
  append($$anchor3, fragment_2);
23327
23327
  };
23328
23328
  var alternate = ($$anchor3) => {
23329
- var text$1 = text();
23330
- template_effect(() => set_text(text$1, dayState.cell.opts.date.current.day));
23331
- append($$anchor3, text$1);
23329
+ var text2 = text$1();
23330
+ template_effect(() => set_text(text2, dayState.cell.opts.date.current.day));
23331
+ append($$anchor3, text2);
23332
23332
  };
23333
23333
  if_block(node_2, ($$render) => {
23334
23334
  if (children()) $$render(consequent_1);
@@ -23979,9 +23979,9 @@ function Calendar_heading($$anchor, $$props) {
23979
23979
  append($$anchor3, fragment_2);
23980
23980
  };
23981
23981
  var alternate = ($$anchor3) => {
23982
- var text$1 = text();
23983
- template_effect(() => set_text(text$1, headingState.root.headingValue));
23984
- append($$anchor3, text$1);
23982
+ var text2 = text$1();
23983
+ template_effect(() => set_text(text2, headingState.root.headingValue));
23984
+ append($$anchor3, text2);
23985
23985
  };
23986
23986
  if_block(node_2, ($$render) => {
23987
23987
  if (children()) $$render(consequent_1);
@@ -24990,7 +24990,7 @@ const size$1 = function(options) {
24990
24990
  elements
24991
24991
  } = state2;
24992
24992
  const {
24993
- apply = () => {
24993
+ apply: apply2 = () => {
24994
24994
  },
24995
24995
  ...detectOverflowOptions
24996
24996
  } = evaluate$1(options, state2);
@@ -25035,7 +25035,7 @@ const size$1 = function(options) {
25035
25035
  availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max$1(overflow.top, overflow.bottom));
25036
25036
  }
25037
25037
  }
25038
- await apply({
25038
+ await apply2({
25039
25039
  ...state2,
25040
25040
  availableWidth,
25041
25041
  availableHeight
@@ -25689,8 +25689,8 @@ function observeMove(element, onMove) {
25689
25689
  threshold: max$1(0, min$1(1, threshold)) || 1
25690
25690
  };
25691
25691
  let isFirstUpdate = true;
25692
- function handleObserve(entries) {
25693
- const ratio = entries[0].intersectionRatio;
25692
+ function handleObserve(entries2) {
25693
+ const ratio = entries2[0].intersectionRatio;
25694
25694
  if (ratio !== threshold) {
25695
25695
  if (!isFirstUpdate) {
25696
25696
  return refresh();
@@ -31438,9 +31438,9 @@ function DatePicker_1($$anchor, $$props) {
31438
31438
  },
31439
31439
  children: ($$anchor7, $$slotProps2) => {
31440
31440
  next();
31441
- var text$1 = text();
31442
- template_effect(() => set_text(text$1, value()));
31443
- append($$anchor7, text$1);
31441
+ var text2 = text$1();
31442
+ template_effect(() => set_text(text2, value()));
31443
+ append($$anchor7, text2);
31444
31444
  },
31445
31445
  $$slots: { default: true }
31446
31446
  });
@@ -31527,7 +31527,7 @@ function DatePicker_1($$anchor, $$props) {
31527
31527
  DatePicker_HeadCell($$anchor15, {
31528
31528
  children: ($$anchor16, $$slotProps6) => {
31529
31529
  next();
31530
- var text_1 = text();
31530
+ var text_1 = text$1();
31531
31531
  template_effect(() => set_text(text_1, get$2(day)));
31532
31532
  append($$anchor16, text_1);
31533
31533
  },
@@ -32295,11 +32295,11 @@ function ErrorsFeedback($$anchor, $$props) {
32295
32295
  var node = child(p2);
32296
32296
  {
32297
32297
  var consequent = ($$anchor2) => {
32298
- var text$1 = text();
32299
- template_effect(($0) => set_text(text$1, $0), [
32298
+ var text2 = text$1();
32299
+ template_effect(($0) => set_text(text2, $0), [
32300
32300
  () => shop.t("forms.errorSummary", { count: get$2(errorsOnSubmit) })
32301
32301
  ]);
32302
- append($$anchor2, text$1);
32302
+ append($$anchor2, text2);
32303
32303
  };
32304
32304
  if_block(node, ($$render) => {
32305
32305
  if (get$2(errorsOnSubmit) > 0) $$render(consequent);
@@ -35443,9 +35443,9 @@ function InvoiceId($$anchor, $$props) {
35443
35443
  const orderDetails = /* @__PURE__ */ user_derived(() => _orderDetails.value);
35444
35444
  let order = /* @__PURE__ */ user_derived(() => get$2(orderDetails)?.order);
35445
35445
  next();
35446
- var text$1 = text();
35447
- template_effect(() => set_text(text$1, get$2(order)?.id));
35448
- append($$anchor, text$1);
35446
+ var text2 = text$1();
35447
+ template_effect(() => set_text(text2, get$2(order)?.id));
35448
+ append($$anchor, text2);
35449
35449
  pop();
35450
35450
  }
35451
35451
  customElements.define("go-order-invoice-id", create_custom_element(InvoiceId, {}, [], []));
@@ -35537,7 +35537,7 @@ function Overview($$anchor, $$props) {
35537
35537
  append($$anchor2, fragment_1);
35538
35538
  };
35539
35539
  var alternate = ($$anchor2) => {
35540
- var text_2 = text();
35540
+ var text_2 = text$1();
35541
35541
  template_effect(($0) => set_text(text_2, $0), [() => shop.t("user.login.desc.text")]);
35542
35542
  append($$anchor2, text_2);
35543
35543
  };
@@ -35703,9 +35703,9 @@ function TicketsSum($$anchor, $$props) {
35703
35703
  const tsd = /* @__PURE__ */ user_derived(() => _tsd.value);
35704
35704
  let val = /* @__PURE__ */ user_derived(() => sum(get$2(tsd)?.preCarts || [], (c) => c.totalPriceCents));
35705
35705
  next();
35706
- var text$1 = text();
35707
- template_effect(($0) => set_text(text$1, $0), [() => formatCurrency(get$2(val))]);
35708
- append($$anchor, text$1);
35706
+ var text2 = text$1();
35707
+ template_effect(($0) => set_text(text2, $0), [() => formatCurrency(get$2(val))]);
35708
+ append($$anchor, text2);
35709
35709
  pop();
35710
35710
  }
35711
35711
  customElements.define("go-tickets-sum", create_custom_element(TicketsSum, {}, [], []));
@@ -35946,6 +35946,1014 @@ function TicketSegmentEmpty($$anchor, $$props) {
35946
35946
  pop();
35947
35947
  }
35948
35948
  customElements.define("go-ticket-segment-empty", create_custom_element(TicketSegmentEmpty, {}, [], []));
35949
+ const {
35950
+ entries,
35951
+ setPrototypeOf,
35952
+ isFrozen,
35953
+ getPrototypeOf,
35954
+ getOwnPropertyDescriptor
35955
+ } = Object;
35956
+ let {
35957
+ freeze,
35958
+ seal,
35959
+ create
35960
+ } = Object;
35961
+ let {
35962
+ apply,
35963
+ construct
35964
+ } = typeof Reflect !== "undefined" && Reflect;
35965
+ if (!freeze) {
35966
+ freeze = function freeze2(x) {
35967
+ return x;
35968
+ };
35969
+ }
35970
+ if (!seal) {
35971
+ seal = function seal2(x) {
35972
+ return x;
35973
+ };
35974
+ }
35975
+ if (!apply) {
35976
+ apply = function apply2(func, thisArg) {
35977
+ for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
35978
+ args[_key - 2] = arguments[_key];
35979
+ }
35980
+ return func.apply(thisArg, args);
35981
+ };
35982
+ }
35983
+ if (!construct) {
35984
+ construct = function construct2(Func) {
35985
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
35986
+ args[_key2 - 1] = arguments[_key2];
35987
+ }
35988
+ return new Func(...args);
35989
+ };
35990
+ }
35991
+ const arrayForEach = unapply(Array.prototype.forEach);
35992
+ const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
35993
+ const arrayPop = unapply(Array.prototype.pop);
35994
+ const arrayPush = unapply(Array.prototype.push);
35995
+ const arraySplice = unapply(Array.prototype.splice);
35996
+ const stringToLowerCase = unapply(String.prototype.toLowerCase);
35997
+ const stringToString = unapply(String.prototype.toString);
35998
+ const stringMatch = unapply(String.prototype.match);
35999
+ const stringReplace = unapply(String.prototype.replace);
36000
+ const stringIndexOf = unapply(String.prototype.indexOf);
36001
+ const stringTrim = unapply(String.prototype.trim);
36002
+ const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
36003
+ const regExpTest = unapply(RegExp.prototype.test);
36004
+ const typeErrorCreate = unconstruct(TypeError);
36005
+ function unapply(func) {
36006
+ return function(thisArg) {
36007
+ if (thisArg instanceof RegExp) {
36008
+ thisArg.lastIndex = 0;
36009
+ }
36010
+ for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
36011
+ args[_key3 - 1] = arguments[_key3];
36012
+ }
36013
+ return apply(func, thisArg, args);
36014
+ };
36015
+ }
36016
+ function unconstruct(Func) {
36017
+ return function() {
36018
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
36019
+ args[_key4] = arguments[_key4];
36020
+ }
36021
+ return construct(Func, args);
36022
+ };
36023
+ }
36024
+ function addToSet(set2, array2) {
36025
+ let transformCaseFunc = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : stringToLowerCase;
36026
+ if (setPrototypeOf) {
36027
+ setPrototypeOf(set2, null);
36028
+ }
36029
+ let l = array2.length;
36030
+ while (l--) {
36031
+ let element = array2[l];
36032
+ if (typeof element === "string") {
36033
+ const lcElement = transformCaseFunc(element);
36034
+ if (lcElement !== element) {
36035
+ if (!isFrozen(array2)) {
36036
+ array2[l] = lcElement;
36037
+ }
36038
+ element = lcElement;
36039
+ }
36040
+ }
36041
+ set2[element] = true;
36042
+ }
36043
+ return set2;
36044
+ }
36045
+ function cleanArray(array2) {
36046
+ for (let index2 = 0; index2 < array2.length; index2++) {
36047
+ const isPropertyExist = objectHasOwnProperty(array2, index2);
36048
+ if (!isPropertyExist) {
36049
+ array2[index2] = null;
36050
+ }
36051
+ }
36052
+ return array2;
36053
+ }
36054
+ function clone(object) {
36055
+ const newObject = create(null);
36056
+ for (const [property, value] of entries(object)) {
36057
+ const isPropertyExist = objectHasOwnProperty(object, property);
36058
+ if (isPropertyExist) {
36059
+ if (Array.isArray(value)) {
36060
+ newObject[property] = cleanArray(value);
36061
+ } else if (value && typeof value === "object" && value.constructor === Object) {
36062
+ newObject[property] = clone(value);
36063
+ } else {
36064
+ newObject[property] = value;
36065
+ }
36066
+ }
36067
+ }
36068
+ return newObject;
36069
+ }
36070
+ function lookupGetter(object, prop2) {
36071
+ while (object !== null) {
36072
+ const desc = getOwnPropertyDescriptor(object, prop2);
36073
+ if (desc) {
36074
+ if (desc.get) {
36075
+ return unapply(desc.get);
36076
+ }
36077
+ if (typeof desc.value === "function") {
36078
+ return unapply(desc.value);
36079
+ }
36080
+ }
36081
+ object = getPrototypeOf(object);
36082
+ }
36083
+ function fallbackValue() {
36084
+ return null;
36085
+ }
36086
+ return fallbackValue;
36087
+ }
36088
+ const html$1 = freeze(["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"]);
36089
+ const svg$1 = freeze(["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"]);
36090
+ const svgFilters = freeze(["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"]);
36091
+ const svgDisallowed = freeze(["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"]);
36092
+ const mathMl$1 = freeze(["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"]);
36093
+ const mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
36094
+ const text = freeze(["#text"]);
36095
+ const html = freeze(["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"]);
36096
+ const svg = freeze(["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"]);
36097
+ const mathMl = freeze(["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"]);
36098
+ const xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
36099
+ const MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
36100
+ const ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
36101
+ const TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm);
36102
+ const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
36103
+ const ARIA_ATTR = seal(/^aria-[\-\w]+$/);
36104
+ const IS_ALLOWED_URI = seal(
36105
+ /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
36106
+ // eslint-disable-line no-useless-escape
36107
+ );
36108
+ const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
36109
+ const ATTR_WHITESPACE = seal(
36110
+ /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
36111
+ // eslint-disable-line no-control-regex
36112
+ );
36113
+ const DOCTYPE_NAME = seal(/^html$/i);
36114
+ const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
36115
+ var EXPRESSIONS = /* @__PURE__ */ Object.freeze({
36116
+ __proto__: null,
36117
+ ARIA_ATTR,
36118
+ ATTR_WHITESPACE,
36119
+ CUSTOM_ELEMENT,
36120
+ DATA_ATTR,
36121
+ DOCTYPE_NAME,
36122
+ ERB_EXPR,
36123
+ IS_ALLOWED_URI,
36124
+ IS_SCRIPT_OR_DATA,
36125
+ MUSTACHE_EXPR,
36126
+ TMPLIT_EXPR
36127
+ });
36128
+ const NODE_TYPE = {
36129
+ element: 1,
36130
+ text: 3,
36131
+ // Deprecated
36132
+ progressingInstruction: 7,
36133
+ comment: 8,
36134
+ document: 9
36135
+ };
36136
+ const getGlobal = function getGlobal2() {
36137
+ return typeof window === "undefined" ? null : window;
36138
+ };
36139
+ const _createTrustedTypesPolicy = function _createTrustedTypesPolicy2(trustedTypes, purifyHostElement) {
36140
+ if (typeof trustedTypes !== "object" || typeof trustedTypes.createPolicy !== "function") {
36141
+ return null;
36142
+ }
36143
+ let suffix = null;
36144
+ const ATTR_NAME = "data-tt-policy-suffix";
36145
+ if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
36146
+ suffix = purifyHostElement.getAttribute(ATTR_NAME);
36147
+ }
36148
+ const policyName = "dompurify" + (suffix ? "#" + suffix : "");
36149
+ try {
36150
+ return trustedTypes.createPolicy(policyName, {
36151
+ createHTML(html2) {
36152
+ return html2;
36153
+ },
36154
+ createScriptURL(scriptUrl) {
36155
+ return scriptUrl;
36156
+ }
36157
+ });
36158
+ } catch (_) {
36159
+ console.warn("TrustedTypes policy " + policyName + " could not be created.");
36160
+ return null;
36161
+ }
36162
+ };
36163
+ const _createHooksMap = function _createHooksMap2() {
36164
+ return {
36165
+ afterSanitizeAttributes: [],
36166
+ afterSanitizeElements: [],
36167
+ afterSanitizeShadowDOM: [],
36168
+ beforeSanitizeAttributes: [],
36169
+ beforeSanitizeElements: [],
36170
+ beforeSanitizeShadowDOM: [],
36171
+ uponSanitizeAttribute: [],
36172
+ uponSanitizeElement: [],
36173
+ uponSanitizeShadowNode: []
36174
+ };
36175
+ };
36176
+ function createDOMPurify() {
36177
+ let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
36178
+ const DOMPurify = (root2) => createDOMPurify(root2);
36179
+ DOMPurify.version = "3.3.1";
36180
+ DOMPurify.removed = [];
36181
+ if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
36182
+ DOMPurify.isSupported = false;
36183
+ return DOMPurify;
36184
+ }
36185
+ let {
36186
+ document: document2
36187
+ } = window2;
36188
+ const originalDocument = document2;
36189
+ const currentScript = originalDocument.currentScript;
36190
+ const {
36191
+ DocumentFragment,
36192
+ HTMLTemplateElement,
36193
+ Node: Node2,
36194
+ Element: Element2,
36195
+ NodeFilter,
36196
+ NamedNodeMap = window2.NamedNodeMap || window2.MozNamedAttrMap,
36197
+ HTMLFormElement,
36198
+ DOMParser,
36199
+ trustedTypes
36200
+ } = window2;
36201
+ const ElementPrototype = Element2.prototype;
36202
+ const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
36203
+ const remove = lookupGetter(ElementPrototype, "remove");
36204
+ const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
36205
+ const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
36206
+ const getParentNode2 = lookupGetter(ElementPrototype, "parentNode");
36207
+ if (typeof HTMLTemplateElement === "function") {
36208
+ const template = document2.createElement("template");
36209
+ if (template.content && template.content.ownerDocument) {
36210
+ document2 = template.content.ownerDocument;
36211
+ }
36212
+ }
36213
+ let trustedTypesPolicy;
36214
+ let emptyHTML = "";
36215
+ const {
36216
+ implementation,
36217
+ createNodeIterator,
36218
+ createDocumentFragment,
36219
+ getElementsByTagName
36220
+ } = document2;
36221
+ const {
36222
+ importNode
36223
+ } = originalDocument;
36224
+ let hooks = _createHooksMap();
36225
+ DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode2 === "function" && implementation && implementation.createHTMLDocument !== void 0;
36226
+ const {
36227
+ MUSTACHE_EXPR: MUSTACHE_EXPR2,
36228
+ ERB_EXPR: ERB_EXPR2,
36229
+ TMPLIT_EXPR: TMPLIT_EXPR2,
36230
+ DATA_ATTR: DATA_ATTR2,
36231
+ ARIA_ATTR: ARIA_ATTR2,
36232
+ IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA2,
36233
+ ATTR_WHITESPACE: ATTR_WHITESPACE2,
36234
+ CUSTOM_ELEMENT: CUSTOM_ELEMENT2
36235
+ } = EXPRESSIONS;
36236
+ let {
36237
+ IS_ALLOWED_URI: IS_ALLOWED_URI$1
36238
+ } = EXPRESSIONS;
36239
+ let ALLOWED_TAGS = null;
36240
+ const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
36241
+ let ALLOWED_ATTR = null;
36242
+ const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
36243
+ let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
36244
+ tagNameCheck: {
36245
+ writable: true,
36246
+ configurable: false,
36247
+ enumerable: true,
36248
+ value: null
36249
+ },
36250
+ attributeNameCheck: {
36251
+ writable: true,
36252
+ configurable: false,
36253
+ enumerable: true,
36254
+ value: null
36255
+ },
36256
+ allowCustomizedBuiltInElements: {
36257
+ writable: true,
36258
+ configurable: false,
36259
+ enumerable: true,
36260
+ value: false
36261
+ }
36262
+ }));
36263
+ let FORBID_TAGS = null;
36264
+ let FORBID_ATTR = null;
36265
+ const EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {
36266
+ tagCheck: {
36267
+ writable: true,
36268
+ configurable: false,
36269
+ enumerable: true,
36270
+ value: null
36271
+ },
36272
+ attributeCheck: {
36273
+ writable: true,
36274
+ configurable: false,
36275
+ enumerable: true,
36276
+ value: null
36277
+ }
36278
+ }));
36279
+ let ALLOW_ARIA_ATTR = true;
36280
+ let ALLOW_DATA_ATTR = true;
36281
+ let ALLOW_UNKNOWN_PROTOCOLS = false;
36282
+ let ALLOW_SELF_CLOSE_IN_ATTR = true;
36283
+ let SAFE_FOR_TEMPLATES = false;
36284
+ let SAFE_FOR_XML = true;
36285
+ let WHOLE_DOCUMENT = false;
36286
+ let SET_CONFIG = false;
36287
+ let FORCE_BODY = false;
36288
+ let RETURN_DOM = false;
36289
+ let RETURN_DOM_FRAGMENT = false;
36290
+ let RETURN_TRUSTED_TYPE = false;
36291
+ let SANITIZE_DOM = true;
36292
+ let SANITIZE_NAMED_PROPS = false;
36293
+ const SANITIZE_NAMED_PROPS_PREFIX = "user-content-";
36294
+ let KEEP_CONTENT = true;
36295
+ let IN_PLACE = false;
36296
+ let USE_PROFILES = {};
36297
+ let FORBID_CONTENTS = null;
36298
+ const DEFAULT_FORBID_CONTENTS = addToSet({}, ["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"]);
36299
+ let DATA_URI_TAGS = null;
36300
+ const DEFAULT_DATA_URI_TAGS = addToSet({}, ["audio", "video", "img", "source", "image", "track"]);
36301
+ let URI_SAFE_ATTRIBUTES = null;
36302
+ const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]);
36303
+ const MATHML_NAMESPACE = "http://www.w3.org/1998/Math/MathML";
36304
+ const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
36305
+ const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
36306
+ let NAMESPACE = HTML_NAMESPACE;
36307
+ let IS_EMPTY_INPUT = false;
36308
+ let ALLOWED_NAMESPACES = null;
36309
+ const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
36310
+ let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
36311
+ let HTML_INTEGRATION_POINTS = addToSet({}, ["annotation-xml"]);
36312
+ const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ["title", "style", "font", "a", "script"]);
36313
+ let PARSER_MEDIA_TYPE = null;
36314
+ const SUPPORTED_PARSER_MEDIA_TYPES = ["application/xhtml+xml", "text/html"];
36315
+ const DEFAULT_PARSER_MEDIA_TYPE = "text/html";
36316
+ let transformCaseFunc = null;
36317
+ let CONFIG = null;
36318
+ const formElement = document2.createElement("form");
36319
+ const isRegexOrFunction = function isRegexOrFunction2(testValue) {
36320
+ return testValue instanceof RegExp || testValue instanceof Function;
36321
+ };
36322
+ const _parseConfig = function _parseConfig2() {
36323
+ let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
36324
+ if (CONFIG && CONFIG === cfg) {
36325
+ return;
36326
+ }
36327
+ if (!cfg || typeof cfg !== "object") {
36328
+ cfg = {};
36329
+ }
36330
+ cfg = clone(cfg);
36331
+ PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
36332
+ SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
36333
+ transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
36334
+ ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
36335
+ ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
36336
+ ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
36337
+ URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
36338
+ DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
36339
+ FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
36340
+ FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
36341
+ FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
36342
+ USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES : false;
36343
+ ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
36344
+ ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
36345
+ ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
36346
+ ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false;
36347
+ SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false;
36348
+ SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false;
36349
+ WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false;
36350
+ RETURN_DOM = cfg.RETURN_DOM || false;
36351
+ RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false;
36352
+ RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false;
36353
+ FORCE_BODY = cfg.FORCE_BODY || false;
36354
+ SANITIZE_DOM = cfg.SANITIZE_DOM !== false;
36355
+ SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;
36356
+ KEEP_CONTENT = cfg.KEEP_CONTENT !== false;
36357
+ IN_PLACE = cfg.IN_PLACE || false;
36358
+ IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
36359
+ NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
36360
+ MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
36361
+ HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
36362
+ CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
36363
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
36364
+ CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
36365
+ }
36366
+ if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
36367
+ CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
36368
+ }
36369
+ if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === "boolean") {
36370
+ CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
36371
+ }
36372
+ if (SAFE_FOR_TEMPLATES) {
36373
+ ALLOW_DATA_ATTR = false;
36374
+ }
36375
+ if (RETURN_DOM_FRAGMENT) {
36376
+ RETURN_DOM = true;
36377
+ }
36378
+ if (USE_PROFILES) {
36379
+ ALLOWED_TAGS = addToSet({}, text);
36380
+ ALLOWED_ATTR = [];
36381
+ if (USE_PROFILES.html === true) {
36382
+ addToSet(ALLOWED_TAGS, html$1);
36383
+ addToSet(ALLOWED_ATTR, html);
36384
+ }
36385
+ if (USE_PROFILES.svg === true) {
36386
+ addToSet(ALLOWED_TAGS, svg$1);
36387
+ addToSet(ALLOWED_ATTR, svg);
36388
+ addToSet(ALLOWED_ATTR, xml);
36389
+ }
36390
+ if (USE_PROFILES.svgFilters === true) {
36391
+ addToSet(ALLOWED_TAGS, svgFilters);
36392
+ addToSet(ALLOWED_ATTR, svg);
36393
+ addToSet(ALLOWED_ATTR, xml);
36394
+ }
36395
+ if (USE_PROFILES.mathMl === true) {
36396
+ addToSet(ALLOWED_TAGS, mathMl$1);
36397
+ addToSet(ALLOWED_ATTR, mathMl);
36398
+ addToSet(ALLOWED_ATTR, xml);
36399
+ }
36400
+ }
36401
+ if (cfg.ADD_TAGS) {
36402
+ if (typeof cfg.ADD_TAGS === "function") {
36403
+ EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
36404
+ } else {
36405
+ if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
36406
+ ALLOWED_TAGS = clone(ALLOWED_TAGS);
36407
+ }
36408
+ addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
36409
+ }
36410
+ }
36411
+ if (cfg.ADD_ATTR) {
36412
+ if (typeof cfg.ADD_ATTR === "function") {
36413
+ EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
36414
+ } else {
36415
+ if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
36416
+ ALLOWED_ATTR = clone(ALLOWED_ATTR);
36417
+ }
36418
+ addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
36419
+ }
36420
+ }
36421
+ if (cfg.ADD_URI_SAFE_ATTR) {
36422
+ addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
36423
+ }
36424
+ if (cfg.FORBID_CONTENTS) {
36425
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
36426
+ FORBID_CONTENTS = clone(FORBID_CONTENTS);
36427
+ }
36428
+ addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
36429
+ }
36430
+ if (cfg.ADD_FORBID_CONTENTS) {
36431
+ if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
36432
+ FORBID_CONTENTS = clone(FORBID_CONTENTS);
36433
+ }
36434
+ addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);
36435
+ }
36436
+ if (KEEP_CONTENT) {
36437
+ ALLOWED_TAGS["#text"] = true;
36438
+ }
36439
+ if (WHOLE_DOCUMENT) {
36440
+ addToSet(ALLOWED_TAGS, ["html", "head", "body"]);
36441
+ }
36442
+ if (ALLOWED_TAGS.table) {
36443
+ addToSet(ALLOWED_TAGS, ["tbody"]);
36444
+ delete FORBID_TAGS.tbody;
36445
+ }
36446
+ if (cfg.TRUSTED_TYPES_POLICY) {
36447
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== "function") {
36448
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
36449
+ }
36450
+ if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== "function") {
36451
+ throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
36452
+ }
36453
+ trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
36454
+ emptyHTML = trustedTypesPolicy.createHTML("");
36455
+ } else {
36456
+ if (trustedTypesPolicy === void 0) {
36457
+ trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
36458
+ }
36459
+ if (trustedTypesPolicy !== null && typeof emptyHTML === "string") {
36460
+ emptyHTML = trustedTypesPolicy.createHTML("");
36461
+ }
36462
+ }
36463
+ if (freeze) {
36464
+ freeze(cfg);
36465
+ }
36466
+ CONFIG = cfg;
36467
+ };
36468
+ const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
36469
+ const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
36470
+ const _checkValidNamespace = function _checkValidNamespace2(element) {
36471
+ let parent = getParentNode2(element);
36472
+ if (!parent || !parent.tagName) {
36473
+ parent = {
36474
+ namespaceURI: NAMESPACE,
36475
+ tagName: "template"
36476
+ };
36477
+ }
36478
+ const tagName = stringToLowerCase(element.tagName);
36479
+ const parentTagName = stringToLowerCase(parent.tagName);
36480
+ if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
36481
+ return false;
36482
+ }
36483
+ if (element.namespaceURI === SVG_NAMESPACE) {
36484
+ if (parent.namespaceURI === HTML_NAMESPACE) {
36485
+ return tagName === "svg";
36486
+ }
36487
+ if (parent.namespaceURI === MATHML_NAMESPACE) {
36488
+ return tagName === "svg" && (parentTagName === "annotation-xml" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
36489
+ }
36490
+ return Boolean(ALL_SVG_TAGS[tagName]);
36491
+ }
36492
+ if (element.namespaceURI === MATHML_NAMESPACE) {
36493
+ if (parent.namespaceURI === HTML_NAMESPACE) {
36494
+ return tagName === "math";
36495
+ }
36496
+ if (parent.namespaceURI === SVG_NAMESPACE) {
36497
+ return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName];
36498
+ }
36499
+ return Boolean(ALL_MATHML_TAGS[tagName]);
36500
+ }
36501
+ if (element.namespaceURI === HTML_NAMESPACE) {
36502
+ if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
36503
+ return false;
36504
+ }
36505
+ if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
36506
+ return false;
36507
+ }
36508
+ return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
36509
+ }
36510
+ if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[element.namespaceURI]) {
36511
+ return true;
36512
+ }
36513
+ return false;
36514
+ };
36515
+ const _forceRemove = function _forceRemove2(node) {
36516
+ arrayPush(DOMPurify.removed, {
36517
+ element: node
36518
+ });
36519
+ try {
36520
+ getParentNode2(node).removeChild(node);
36521
+ } catch (_) {
36522
+ remove(node);
36523
+ }
36524
+ };
36525
+ const _removeAttribute = function _removeAttribute2(name, element) {
36526
+ try {
36527
+ arrayPush(DOMPurify.removed, {
36528
+ attribute: element.getAttributeNode(name),
36529
+ from: element
36530
+ });
36531
+ } catch (_) {
36532
+ arrayPush(DOMPurify.removed, {
36533
+ attribute: null,
36534
+ from: element
36535
+ });
36536
+ }
36537
+ element.removeAttribute(name);
36538
+ if (name === "is") {
36539
+ if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
36540
+ try {
36541
+ _forceRemove(element);
36542
+ } catch (_) {
36543
+ }
36544
+ } else {
36545
+ try {
36546
+ element.setAttribute(name, "");
36547
+ } catch (_) {
36548
+ }
36549
+ }
36550
+ }
36551
+ };
36552
+ const _initDocument = function _initDocument2(dirty) {
36553
+ let doc = null;
36554
+ let leadingWhitespace = null;
36555
+ if (FORCE_BODY) {
36556
+ dirty = "<remove></remove>" + dirty;
36557
+ } else {
36558
+ const matches2 = stringMatch(dirty, /^[\r\n\t ]+/);
36559
+ leadingWhitespace = matches2 && matches2[0];
36560
+ }
36561
+ if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && NAMESPACE === HTML_NAMESPACE) {
36562
+ dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + "</body></html>";
36563
+ }
36564
+ const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
36565
+ if (NAMESPACE === HTML_NAMESPACE) {
36566
+ try {
36567
+ doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
36568
+ } catch (_) {
36569
+ }
36570
+ }
36571
+ if (!doc || !doc.documentElement) {
36572
+ doc = implementation.createDocument(NAMESPACE, "template", null);
36573
+ try {
36574
+ doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
36575
+ } catch (_) {
36576
+ }
36577
+ }
36578
+ const body = doc.body || doc.documentElement;
36579
+ if (dirty && leadingWhitespace) {
36580
+ body.insertBefore(document2.createTextNode(leadingWhitespace), body.childNodes[0] || null);
36581
+ }
36582
+ if (NAMESPACE === HTML_NAMESPACE) {
36583
+ return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0];
36584
+ }
36585
+ return WHOLE_DOCUMENT ? doc.documentElement : body;
36586
+ };
36587
+ const _createNodeIterator = function _createNodeIterator2(root2) {
36588
+ return createNodeIterator.call(
36589
+ root2.ownerDocument || root2,
36590
+ root2,
36591
+ // eslint-disable-next-line no-bitwise
36592
+ NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION,
36593
+ null
36594
+ );
36595
+ };
36596
+ const _isClobbered = function _isClobbered2(element) {
36597
+ return element instanceof HTMLFormElement && (typeof element.nodeName !== "string" || typeof element.textContent !== "string" || typeof element.removeChild !== "function" || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function");
36598
+ };
36599
+ const _isNode = function _isNode2(value) {
36600
+ return typeof Node2 === "function" && value instanceof Node2;
36601
+ };
36602
+ function _executeHooks(hooks2, currentNode, data) {
36603
+ arrayForEach(hooks2, (hook) => {
36604
+ hook.call(DOMPurify, currentNode, data, CONFIG);
36605
+ });
36606
+ }
36607
+ const _sanitizeElements = function _sanitizeElements2(currentNode) {
36608
+ let content = null;
36609
+ _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
36610
+ if (_isClobbered(currentNode)) {
36611
+ _forceRemove(currentNode);
36612
+ return true;
36613
+ }
36614
+ const tagName = transformCaseFunc(currentNode.nodeName);
36615
+ _executeHooks(hooks.uponSanitizeElement, currentNode, {
36616
+ tagName,
36617
+ allowedTags: ALLOWED_TAGS
36618
+ });
36619
+ if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
36620
+ _forceRemove(currentNode);
36621
+ return true;
36622
+ }
36623
+ if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
36624
+ _forceRemove(currentNode);
36625
+ return true;
36626
+ }
36627
+ if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
36628
+ _forceRemove(currentNode);
36629
+ return true;
36630
+ }
36631
+ if (!(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName])) {
36632
+ if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
36633
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
36634
+ return false;
36635
+ }
36636
+ if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
36637
+ return false;
36638
+ }
36639
+ }
36640
+ if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
36641
+ const parentNode = getParentNode2(currentNode) || currentNode.parentNode;
36642
+ const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
36643
+ if (childNodes && parentNode) {
36644
+ const childCount = childNodes.length;
36645
+ for (let i = childCount - 1; i >= 0; --i) {
36646
+ const childClone = cloneNode(childNodes[i], true);
36647
+ childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
36648
+ parentNode.insertBefore(childClone, getNextSibling(currentNode));
36649
+ }
36650
+ }
36651
+ }
36652
+ _forceRemove(currentNode);
36653
+ return true;
36654
+ }
36655
+ if (currentNode instanceof Element2 && !_checkValidNamespace(currentNode)) {
36656
+ _forceRemove(currentNode);
36657
+ return true;
36658
+ }
36659
+ if ((tagName === "noscript" || tagName === "noembed" || tagName === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
36660
+ _forceRemove(currentNode);
36661
+ return true;
36662
+ }
36663
+ if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
36664
+ content = currentNode.textContent;
36665
+ arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
36666
+ content = stringReplace(content, expr, " ");
36667
+ });
36668
+ if (currentNode.textContent !== content) {
36669
+ arrayPush(DOMPurify.removed, {
36670
+ element: currentNode.cloneNode()
36671
+ });
36672
+ currentNode.textContent = content;
36673
+ }
36674
+ }
36675
+ _executeHooks(hooks.afterSanitizeElements, currentNode, null);
36676
+ return false;
36677
+ };
36678
+ const _isValidAttribute = function _isValidAttribute2(lcTag, lcName, value) {
36679
+ if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document2 || value in formElement)) {
36680
+ return false;
36681
+ }
36682
+ if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR2, lcName)) ;
36683
+ else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR2, lcName)) ;
36684
+ else if (EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag)) ;
36685
+ else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
36686
+ if (
36687
+ // First condition does a very basic check if a) it's basically a valid custom element tagname AND
36688
+ // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
36689
+ // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
36690
+ _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) || // Alternative, second condition checks if it's an `is`-attribute, AND
36691
+ // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
36692
+ lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))
36693
+ ) ;
36694
+ else {
36695
+ return false;
36696
+ }
36697
+ } else if (URI_SAFE_ATTRIBUTES[lcName]) ;
36698
+ else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE2, ""))) ;
36699
+ else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag]) ;
36700
+ else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA2, stringReplace(value, ATTR_WHITESPACE2, ""))) ;
36701
+ else if (value) {
36702
+ return false;
36703
+ } else ;
36704
+ return true;
36705
+ };
36706
+ const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
36707
+ return tagName !== "annotation-xml" && stringMatch(tagName, CUSTOM_ELEMENT2);
36708
+ };
36709
+ const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
36710
+ _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
36711
+ const {
36712
+ attributes
36713
+ } = currentNode;
36714
+ if (!attributes || _isClobbered(currentNode)) {
36715
+ return;
36716
+ }
36717
+ const hookEvent = {
36718
+ attrName: "",
36719
+ attrValue: "",
36720
+ keepAttr: true,
36721
+ allowedAttributes: ALLOWED_ATTR,
36722
+ forceKeepAttr: void 0
36723
+ };
36724
+ let l = attributes.length;
36725
+ while (l--) {
36726
+ const attr = attributes[l];
36727
+ const {
36728
+ name,
36729
+ namespaceURI,
36730
+ value: attrValue
36731
+ } = attr;
36732
+ const lcName = transformCaseFunc(name);
36733
+ const initValue = attrValue;
36734
+ let value = name === "value" ? initValue : stringTrim(initValue);
36735
+ hookEvent.attrName = lcName;
36736
+ hookEvent.attrValue = value;
36737
+ hookEvent.keepAttr = true;
36738
+ hookEvent.forceKeepAttr = void 0;
36739
+ _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
36740
+ value = hookEvent.attrValue;
36741
+ if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) {
36742
+ _removeAttribute(name, currentNode);
36743
+ value = SANITIZE_NAMED_PROPS_PREFIX + value;
36744
+ }
36745
+ if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, value)) {
36746
+ _removeAttribute(name, currentNode);
36747
+ continue;
36748
+ }
36749
+ if (lcName === "attributename" && stringMatch(value, "href")) {
36750
+ _removeAttribute(name, currentNode);
36751
+ continue;
36752
+ }
36753
+ if (hookEvent.forceKeepAttr) {
36754
+ continue;
36755
+ }
36756
+ if (!hookEvent.keepAttr) {
36757
+ _removeAttribute(name, currentNode);
36758
+ continue;
36759
+ }
36760
+ if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
36761
+ _removeAttribute(name, currentNode);
36762
+ continue;
36763
+ }
36764
+ if (SAFE_FOR_TEMPLATES) {
36765
+ arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
36766
+ value = stringReplace(value, expr, " ");
36767
+ });
36768
+ }
36769
+ const lcTag = transformCaseFunc(currentNode.nodeName);
36770
+ if (!_isValidAttribute(lcTag, lcName, value)) {
36771
+ _removeAttribute(name, currentNode);
36772
+ continue;
36773
+ }
36774
+ if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function") {
36775
+ if (namespaceURI) ;
36776
+ else {
36777
+ switch (trustedTypes.getAttributeType(lcTag, lcName)) {
36778
+ case "TrustedHTML": {
36779
+ value = trustedTypesPolicy.createHTML(value);
36780
+ break;
36781
+ }
36782
+ case "TrustedScriptURL": {
36783
+ value = trustedTypesPolicy.createScriptURL(value);
36784
+ break;
36785
+ }
36786
+ }
36787
+ }
36788
+ }
36789
+ if (value !== initValue) {
36790
+ try {
36791
+ if (namespaceURI) {
36792
+ currentNode.setAttributeNS(namespaceURI, name, value);
36793
+ } else {
36794
+ currentNode.setAttribute(name, value);
36795
+ }
36796
+ if (_isClobbered(currentNode)) {
36797
+ _forceRemove(currentNode);
36798
+ } else {
36799
+ arrayPop(DOMPurify.removed);
36800
+ }
36801
+ } catch (_) {
36802
+ _removeAttribute(name, currentNode);
36803
+ }
36804
+ }
36805
+ }
36806
+ _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
36807
+ };
36808
+ const _sanitizeShadowDOM = function _sanitizeShadowDOM2(fragment) {
36809
+ let shadowNode = null;
36810
+ const shadowIterator = _createNodeIterator(fragment);
36811
+ _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
36812
+ while (shadowNode = shadowIterator.nextNode()) {
36813
+ _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
36814
+ _sanitizeElements(shadowNode);
36815
+ _sanitizeAttributes(shadowNode);
36816
+ if (shadowNode.content instanceof DocumentFragment) {
36817
+ _sanitizeShadowDOM2(shadowNode.content);
36818
+ }
36819
+ }
36820
+ _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
36821
+ };
36822
+ DOMPurify.sanitize = function(dirty) {
36823
+ let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
36824
+ let body = null;
36825
+ let importedNode = null;
36826
+ let currentNode = null;
36827
+ let returnNode = null;
36828
+ IS_EMPTY_INPUT = !dirty;
36829
+ if (IS_EMPTY_INPUT) {
36830
+ dirty = "<!-->";
36831
+ }
36832
+ if (typeof dirty !== "string" && !_isNode(dirty)) {
36833
+ if (typeof dirty.toString === "function") {
36834
+ dirty = dirty.toString();
36835
+ if (typeof dirty !== "string") {
36836
+ throw typeErrorCreate("dirty is not a string, aborting");
36837
+ }
36838
+ } else {
36839
+ throw typeErrorCreate("toString is not a function");
36840
+ }
36841
+ }
36842
+ if (!DOMPurify.isSupported) {
36843
+ return dirty;
36844
+ }
36845
+ if (!SET_CONFIG) {
36846
+ _parseConfig(cfg);
36847
+ }
36848
+ DOMPurify.removed = [];
36849
+ if (typeof dirty === "string") {
36850
+ IN_PLACE = false;
36851
+ }
36852
+ if (IN_PLACE) {
36853
+ if (dirty.nodeName) {
36854
+ const tagName = transformCaseFunc(dirty.nodeName);
36855
+ if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
36856
+ throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
36857
+ }
36858
+ }
36859
+ } else if (dirty instanceof Node2) {
36860
+ body = _initDocument("<!---->");
36861
+ importedNode = body.ownerDocument.importNode(dirty, true);
36862
+ if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY") {
36863
+ body = importedNode;
36864
+ } else if (importedNode.nodeName === "HTML") {
36865
+ body = importedNode;
36866
+ } else {
36867
+ body.appendChild(importedNode);
36868
+ }
36869
+ } else {
36870
+ if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
36871
+ dirty.indexOf("<") === -1) {
36872
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
36873
+ }
36874
+ body = _initDocument(dirty);
36875
+ if (!body) {
36876
+ return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
36877
+ }
36878
+ }
36879
+ if (body && FORCE_BODY) {
36880
+ _forceRemove(body.firstChild);
36881
+ }
36882
+ const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
36883
+ while (currentNode = nodeIterator.nextNode()) {
36884
+ _sanitizeElements(currentNode);
36885
+ _sanitizeAttributes(currentNode);
36886
+ if (currentNode.content instanceof DocumentFragment) {
36887
+ _sanitizeShadowDOM(currentNode.content);
36888
+ }
36889
+ }
36890
+ if (IN_PLACE) {
36891
+ return dirty;
36892
+ }
36893
+ if (RETURN_DOM) {
36894
+ if (RETURN_DOM_FRAGMENT) {
36895
+ returnNode = createDocumentFragment.call(body.ownerDocument);
36896
+ while (body.firstChild) {
36897
+ returnNode.appendChild(body.firstChild);
36898
+ }
36899
+ } else {
36900
+ returnNode = body;
36901
+ }
36902
+ if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
36903
+ returnNode = importNode.call(originalDocument, returnNode, true);
36904
+ }
36905
+ return returnNode;
36906
+ }
36907
+ let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
36908
+ if (WHOLE_DOCUMENT && ALLOWED_TAGS["!doctype"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
36909
+ serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
36910
+ }
36911
+ if (SAFE_FOR_TEMPLATES) {
36912
+ arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
36913
+ serializedHTML = stringReplace(serializedHTML, expr, " ");
36914
+ });
36915
+ }
36916
+ return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
36917
+ };
36918
+ DOMPurify.setConfig = function() {
36919
+ let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
36920
+ _parseConfig(cfg);
36921
+ SET_CONFIG = true;
36922
+ };
36923
+ DOMPurify.clearConfig = function() {
36924
+ CONFIG = null;
36925
+ SET_CONFIG = false;
36926
+ };
36927
+ DOMPurify.isValidAttribute = function(tag, attr, value) {
36928
+ if (!CONFIG) {
36929
+ _parseConfig({});
36930
+ }
36931
+ const lcTag = transformCaseFunc(tag);
36932
+ const lcName = transformCaseFunc(attr);
36933
+ return _isValidAttribute(lcTag, lcName, value);
36934
+ };
36935
+ DOMPurify.addHook = function(entryPoint, hookFunction) {
36936
+ if (typeof hookFunction !== "function") {
36937
+ return;
36938
+ }
36939
+ arrayPush(hooks[entryPoint], hookFunction);
36940
+ };
36941
+ DOMPurify.removeHook = function(entryPoint, hookFunction) {
36942
+ if (hookFunction !== void 0) {
36943
+ const index2 = arrayLastIndexOf(hooks[entryPoint], hookFunction);
36944
+ return index2 === -1 ? void 0 : arraySplice(hooks[entryPoint], index2, 1)[0];
36945
+ }
36946
+ return arrayPop(hooks[entryPoint]);
36947
+ };
36948
+ DOMPurify.removeHooks = function(entryPoint) {
36949
+ hooks[entryPoint] = [];
36950
+ };
36951
+ DOMPurify.removeAllHooks = function() {
36952
+ hooks = _createHooksMap();
36953
+ };
36954
+ return DOMPurify;
36955
+ }
36956
+ var purify = createDOMPurify();
35949
36957
  var root_1$3 = /* @__PURE__ */ from_html(`<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>`, 1);
35950
36958
  var root_4 = /* @__PURE__ */ from_html(`<option> </option>`);
35951
36959
  var root_3$1 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-tickets-item-title"><!></li> <li class="go-tickets-item-description" data-go-tickets-description=""><!></li> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><select class="go-tickets-item-select"></select></li></ul></article></li>`);
@@ -35970,7 +36978,7 @@ function Item($$anchor, $$props) {
35970
36978
  };
35971
36979
  const default_title = ($$anchor2) => {
35972
36980
  next();
35973
- var text_2 = text();
36981
+ var text_2 = text$1();
35974
36982
  template_effect(() => set_text(text_2, item().product.title));
35975
36983
  append($$anchor2, text_2);
35976
36984
  };
@@ -36017,7 +37025,7 @@ function Item($$anchor, $$props) {
36017
37025
  reset(li_1);
36018
37026
  var li_2 = sibling(li_1, 2);
36019
37027
  var node_2 = child(li_2);
36020
- html(node_2, () => item().product.description);
37028
+ html$2(node_2, () => purify.sanitize(item().product.description));
36021
37029
  reset(li_2);
36022
37030
  var li_3 = sibling(li_2, 2);
36023
37031
  var text_3 = child(li_3, true);
@@ -36135,9 +37143,9 @@ function Sum($$anchor, $$props) {
36135
37143
  const _details = getSegmentDetails($$props.$$host);
36136
37144
  const details = /* @__PURE__ */ user_derived(() => _details.value);
36137
37145
  next();
36138
- var text$1 = text();
36139
- template_effect(() => set_text(text$1, get$2(details)?.preCart.totalFormatted));
36140
- append($$anchor, text$1);
37146
+ var text2 = text$1();
37147
+ template_effect(() => set_text(text2, get$2(details)?.preCart.totalFormatted));
37148
+ append($$anchor, text2);
36141
37149
  pop();
36142
37150
  }
36143
37151
  customElements.define("go-ticket-segment-sum", create_custom_element(Sum, {}, [], []));
@@ -36400,8 +37408,8 @@ function CalendarUI($$anchor, $$props) {
36400
37408
  class: "go-calendar-prev-button",
36401
37409
  children: ($$anchor6, $$slotProps2) => {
36402
37410
  next();
36403
- var text$1 = text("Prev");
36404
- append($$anchor6, text$1);
37411
+ var text2 = text$1("Prev");
37412
+ append($$anchor6, text2);
36405
37413
  },
36406
37414
  $$slots: { default: true }
36407
37415
  });
@@ -36416,7 +37424,7 @@ function CalendarUI($$anchor, $$props) {
36416
37424
  class: "go-calendar-next-button",
36417
37425
  children: ($$anchor6, $$slotProps2) => {
36418
37426
  next();
36419
- var text_1 = text("Next");
37427
+ var text_1 = text$1("Next");
36420
37428
  append($$anchor6, text_1);
36421
37429
  },
36422
37430
  $$slots: { default: true }
@@ -36521,7 +37529,7 @@ function CalendarUI($$anchor, $$props) {
36521
37529
  },
36522
37530
  children: ($$anchor15, $$slotProps5) => {
36523
37531
  next();
36524
- var text_3 = text();
37532
+ var text_3 = text$1();
36525
37533
  template_effect(() => set_text(text_3, get$2(date2).day));
36526
37534
  append($$anchor15, text_3);
36527
37535
  },