@plumile/ui 0.1.178 → 0.1.181

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.
@@ -49,20 +49,20 @@ d ||= function(e) {
49
49
  }, te ||= function(e) {
50
50
  return new e(...[...arguments].slice(1));
51
51
  };
52
- var h = T(Array.prototype.forEach), ne = T(Array.prototype.lastIndexOf), re = T(Array.prototype.pop), g = T(Array.prototype.push), ie = T(Array.prototype.splice), _ = Array.isArray, ae = T(String.prototype.toLowerCase), oe = T(String.prototype.toString), se = T(String.prototype.match), v = T(String.prototype.replace), ce = T(String.prototype.indexOf), le = T(String.prototype.trim), ue = T(Number.prototype.toString), de = T(Boolean.prototype.toString), y = typeof BigInt > "u" ? null : T(BigInt.prototype.toString), b = typeof Symbol > "u" ? null : T(Symbol.prototype.toString), x = T(Object.prototype.hasOwnProperty), S = T(Object.prototype.toString), C = T(RegExp.prototype.test), w = E(TypeError);
53
- function T(e) {
52
+ var h = E(Array.prototype.forEach), ne = E(Array.prototype.lastIndexOf), re = E(Array.prototype.pop), g = E(Array.prototype.push), ie = E(Array.prototype.splice), _ = Array.isArray, ae = E(String.prototype.toLowerCase), oe = E(String.prototype.toString), se = E(String.prototype.match), v = E(String.prototype.replace), ce = E(String.prototype.indexOf), le = E(String.prototype.trim), ue = E(Number.prototype.toString), y = E(Boolean.prototype.toString), b = typeof BigInt > "u" ? null : E(BigInt.prototype.toString), x = typeof Symbol > "u" ? null : E(Symbol.prototype.toString), S = E(Object.prototype.hasOwnProperty), C = E(Object.prototype.toString), w = E(RegExp.prototype.test), T = D(TypeError);
53
+ function E(e) {
54
54
  return function(t) {
55
55
  t instanceof RegExp && (t.lastIndex = 0);
56
56
  var n = [...arguments].slice(1);
57
57
  return ee(e, t, n);
58
58
  };
59
59
  }
60
- function E(e) {
60
+ function D(e) {
61
61
  return function() {
62
62
  return te(e, [...arguments]);
63
63
  };
64
64
  }
65
- function D(e, t) {
65
+ function O(e, t) {
66
66
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ae;
67
67
  if (s && s(e, null), !_(t)) return e;
68
68
  let r = t.length;
@@ -76,46 +76,46 @@ function D(e, t) {
76
76
  }
77
77
  return e;
78
78
  }
79
- function O(e) {
80
- for (let t = 0; t < e.length; t++) x(e, t) || (e[t] = null);
79
+ function k(e) {
80
+ for (let t = 0; t < e.length; t++) S(e, t) || (e[t] = null);
81
81
  return e;
82
82
  }
83
- function k(e) {
83
+ function A(e) {
84
84
  let t = p(null);
85
85
  for (let r of o(e)) {
86
86
  var n = i(r, 2);
87
87
  let a = n[0], o = n[1];
88
- x(e, a) && (_(o) ? t[a] = O(o) : o && typeof o == "object" && o.constructor === Object ? t[a] = k(o) : t[a] = o);
88
+ S(e, a) && (_(o) ? t[a] = k(o) : o && typeof o == "object" && o.constructor === Object ? t[a] = A(o) : t[a] = o);
89
89
  }
90
90
  return t;
91
91
  }
92
- function fe(e) {
92
+ function de(e) {
93
93
  switch (typeof e) {
94
94
  case "string": return e;
95
95
  case "number": return ue(e);
96
- case "boolean": return de(e);
97
- case "bigint": return y ? y(e) : "0";
98
- case "symbol": return b ? b(e) : "Symbol()";
99
- case "undefined": return S(e);
96
+ case "boolean": return y(e);
97
+ case "bigint": return b ? b(e) : "0";
98
+ case "symbol": return x ? x(e) : "Symbol()";
99
+ case "undefined": return C(e);
100
100
  case "function":
101
101
  case "object": {
102
- if (e === null) return S(e);
103
- let t = e, n = A(t, "toString");
102
+ if (e === null) return C(e);
103
+ let t = e, n = j(t, "toString");
104
104
  if (typeof n == "function") {
105
105
  let e = n(t);
106
- return typeof e == "string" ? e : S(e);
106
+ return typeof e == "string" ? e : C(e);
107
107
  }
108
- return S(e);
108
+ return C(e);
109
109
  }
110
- default: return S(e);
110
+ default: return C(e);
111
111
  }
112
112
  }
113
- function A(e, t) {
113
+ function j(e, t) {
114
114
  for (; e !== null;) {
115
115
  let n = u(e, t);
116
116
  if (n) {
117
- if (n.get) return T(n.get);
118
- if (typeof n.value == "function") return T(n.value);
117
+ if (n.get) return E(n.get);
118
+ if (typeof n.value == "function") return E(n.value);
119
119
  }
120
120
  e = l(e);
121
121
  }
@@ -124,14 +124,14 @@ function A(e, t) {
124
124
  }
125
125
  return n;
126
126
  }
127
- function pe(e) {
127
+ function fe(e) {
128
128
  try {
129
- return C(e, ""), !0;
129
+ return w(e, ""), !0;
130
130
  } catch {
131
131
  return !1;
132
132
  }
133
133
  }
134
- var me = d(/* @__PURE__ */ "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".split(".")), he = d(/* @__PURE__ */ "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".split(".")), ge = d([
134
+ var pe = d(/* @__PURE__ */ "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".split(".")), me = d(/* @__PURE__ */ "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".split(".")), he = d([
135
135
  "feBlend",
136
136
  "feColorMatrix",
137
137
  "feComponentTransfer",
@@ -157,7 +157,7 @@ var me = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
157
157
  "feSpotLight",
158
158
  "feTile",
159
159
  "feTurbulence"
160
- ]), _e = d([
160
+ ]), ge = d([
161
161
  "animate",
162
162
  "color-profile",
163
163
  "cursor",
@@ -180,7 +180,7 @@ var me = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
180
180
  "solidcolor",
181
181
  "unknown",
182
182
  "use"
183
- ]), ve = d(/* @__PURE__ */ "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".split(".")), ye = d([
183
+ ]), _e = d(/* @__PURE__ */ "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".split(".")), ve = d([
184
184
  "maction",
185
185
  "maligngroup",
186
186
  "malignmark",
@@ -196,13 +196,13 @@ var me = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
196
196
  "annotation-xml",
197
197
  "mprescripts",
198
198
  "none"
199
- ]), be = d(["#text"]), xe = d(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Se = d(/* @__PURE__ */ "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".split(".")), Ce = d(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), we = d([
199
+ ]), ye = d(["#text"]), be = d(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), xe = d(/* @__PURE__ */ "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".split(".")), Se = d(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Ce = d([
200
200
  "xlink:href",
201
201
  "xml:id",
202
202
  "xlink:title",
203
203
  "xml:space",
204
204
  "xmlns:xlink"
205
- ]), Te = f(/{{[\w\W]*|^[\w\W]*}}/g), Ee = f(/<%[\w\W]*|^[\w\W]*%>/g), De = f(/\${[\w\W]*/g), Oe = f(/^data-[\-\w.\u00B7-\uFFFF]+$/), ke = f(/^aria-[\-\w]+$/), Ae = f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), je = f(/^(?:\w+script|data):/i), Me = f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ne = f(/^html$/i), Pe = f(/^[a-z][.\w]*(-[.\w]+)+$/i), j = {
205
+ ]), we = f(/{{[\w\W]*|^[\w\W]*}}/g), Te = f(/<%[\w\W]*|^[\w\W]*%>/g), Ee = f(/\${[\w\W]*/g), De = f(/^data-[\-\w.\u00B7-\uFFFF]+$/), Oe = f(/^aria-[\-\w]+$/), ke = f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Ae = f(/^(?:\w+script|data):/i), je = f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Me = f(/^html$/i), Ne = f(/^[a-z][.\w]*(-[.\w]+)+$/i), M = {
206
206
  element: 1,
207
207
  attribute: 2,
208
208
  text: 3,
@@ -215,9 +215,9 @@ var me = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
215
215
  documentType: 10,
216
216
  documentFragment: 11,
217
217
  notation: 12
218
- }, Fe = function() {
218
+ }, Pe = function() {
219
219
  return typeof window > "u" ? null : window;
220
- }, Ie = function(e, t) {
220
+ }, Fe = function(e, t) {
221
221
  if (typeof e != "object" || typeof e.createPolicy != "function") return null;
222
222
  let n = null, r = "data-tt-policy-suffix";
223
223
  t && t.hasAttribute(r) && (n = t.getAttribute(r));
@@ -234,7 +234,7 @@ var me = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
234
234
  } catch {
235
235
  return console.warn("TrustedTypes policy " + i + " could not be created."), null;
236
236
  }
237
- }, Le = function() {
237
+ }, Ie = function() {
238
238
  return {
239
239
  afterSanitizeAttributes: [],
240
240
  afterSanitizeElements: [],
@@ -247,40 +247,50 @@ var me = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
247
247
  uponSanitizeShadowNode: []
248
248
  };
249
249
  };
250
- function Re() {
251
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Fe(), t = (e) => Re(e);
252
- if (t.version = "3.4.8", t.removed = [], !e || !e.document || e.document.nodeType !== j.document || !e.Element) return t.isSupported = !1, t;
250
+ function Le() {
251
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Pe(), t = (e) => Le(e);
252
+ if (t.version = "3.4.9", t.removed = [], !e || !e.document || e.document.nodeType !== M.document || !e.Element) return t.isSupported = !1, t;
253
253
  let n = e.document, r = n, i = r.currentScript;
254
254
  e.DocumentFragment;
255
255
  let a = e.HTMLTemplateElement, s = e.Node, c = e.Element, l = e.NodeFilter;
256
256
  e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
257
- let u = e.DOMParser, f = e.trustedTypes, m = c.prototype, ee = A(m, "cloneNode"), te = A(m, "remove"), ue = A(m, "nextSibling"), de = A(m, "childNodes"), y = A(m, "parentNode"), b = A(m, "shadowRoot"), S = A(m, "attributes"), T = s && s.prototype ? A(s.prototype, "nodeType") : null, E = s && s.prototype ? A(s.prototype, "nodeName") : null;
257
+ let u = e.DOMParser, f = e.trustedTypes, m = c.prototype, ee = j(m, "cloneNode"), te = j(m, "remove"), ue = j(m, "nextSibling"), y = j(m, "childNodes"), b = j(m, "parentNode"), x = j(m, "shadowRoot"), C = j(m, "attributes"), E = s && s.prototype ? j(s.prototype, "nodeType") : null, D = s && s.prototype ? j(s.prototype, "nodeName") : null;
258
258
  if (typeof a == "function") {
259
259
  let e = n.createElement("template");
260
260
  e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
261
261
  }
262
- let O, M = "", ze = 0, N = function(e) {
263
- if (ze > 0) throw w("The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
264
- ze++;
262
+ let k, N = "", Re, ze = !1, Be = 0, Ve = function() {
263
+ if (Be > 0) throw T("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
264
+ }, P = function(e) {
265
+ Ve(), Be++;
265
266
  try {
266
- return O.createHTML(e);
267
+ return k.createHTML(e);
267
268
  } finally {
268
- ze--;
269
+ Be--;
269
270
  }
270
- }, Be = n, Ve = Be.implementation, He = Be.createNodeIterator, Ue = Be.createDocumentFragment, We = Be.getElementsByTagName, Ge = r.importNode, P = Le();
271
- t.isSupported = typeof o == "function" && typeof y == "function" && Ve && Ve.createHTMLDocument !== void 0;
272
- let Ke = Te, qe = Ee, Je = De, Ye = Oe, Xe = ke, Ze = je, Qe = Me, $e = Pe, et = Ae, F = null, tt = D({}, [
271
+ }, He = function(e) {
272
+ Ve(), Be++;
273
+ try {
274
+ return k.createScriptURL(e);
275
+ } finally {
276
+ Be--;
277
+ }
278
+ }, Ue = function() {
279
+ return ze ||= (Re = Fe(f, i), !0), Re;
280
+ }, We = n, Ge = We.implementation, Ke = We.createNodeIterator, qe = We.createDocumentFragment, Je = We.getElementsByTagName, Ye = r.importNode, F = Ie();
281
+ t.isSupported = typeof o == "function" && typeof b == "function" && Ge && Ge.createHTMLDocument !== void 0;
282
+ let Xe = we, Ze = Te, Qe = Ee, $e = De, et = Oe, tt = Ae, nt = je, rt = Ne, it = ke, I = null, at = O({}, [
283
+ ...pe,
273
284
  ...me,
274
285
  ...he,
275
- ...ge,
276
- ...ve,
277
- ...be
278
- ]), I = null, nt = D({}, [
286
+ ..._e,
287
+ ...ye
288
+ ]), L = null, ot = O({}, [
289
+ ...be,
279
290
  ...xe,
280
291
  ...Se,
281
- ...Ce,
282
- ...we
283
- ]), L = Object.seal(p(null, {
292
+ ...Ce
293
+ ]), R = Object.seal(p(null, {
284
294
  tagNameCheck: {
285
295
  writable: !0,
286
296
  configurable: !1,
@@ -299,7 +309,7 @@ function Re() {
299
309
  enumerable: !0,
300
310
  value: !1
301
311
  }
302
- })), R = null, rt = null, z = Object.seal(p(null, {
312
+ })), z = null, st = null, B = Object.seal(p(null, {
303
313
  tagCheck: {
304
314
  writable: !0,
305
315
  configurable: !1,
@@ -312,40 +322,14 @@ function Re() {
312
322
  enumerable: !0,
313
323
  value: null
314
324
  }
315
- })), it = !0, at = !0, ot = !1, st = !0, B = !1, ct = !0, V = !1, lt = !1, ut = !1, H = !1, dt = !1, ft = !1, pt = !0, mt = !1, ht = "user-content-", gt = !0, _t = !1, U = {}, W = null, vt = D({}, [
316
- "annotation-xml",
317
- "audio",
318
- "colgroup",
319
- "desc",
320
- "foreignobject",
321
- "head",
322
- "iframe",
323
- "math",
324
- "mi",
325
- "mn",
326
- "mo",
327
- "ms",
328
- "mtext",
329
- "noembed",
330
- "noframes",
331
- "noscript",
332
- "plaintext",
333
- "script",
334
- "style",
335
- "svg",
336
- "template",
337
- "thead",
338
- "title",
339
- "video",
340
- "xmp"
341
- ]), yt = null, bt = D({}, [
325
+ })), ct = !0, lt = !0, ut = !1, dt = !0, V = !1, ft = !0, H = !1, pt = !1, mt = !1, U = !1, ht = !1, gt = !1, _t = !0, vt = !1, yt = "user-content-", bt = !0, xt = !1, W = {}, G = null, St = O({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ct = null, wt = O({}, [
342
326
  "audio",
343
327
  "video",
344
328
  "img",
345
329
  "source",
346
330
  "image",
347
331
  "track"
348
- ]), xt = null, St = D({}, [
332
+ ]), Tt = null, Et = O({}, [
349
333
  "alt",
350
334
  "class",
351
335
  "for",
@@ -360,71 +344,90 @@ function Re() {
360
344
  "value",
361
345
  "style",
362
346
  "xmlns"
363
- ]), Ct = "http://www.w3.org/1998/Math/MathML", wt = "http://www.w3.org/2000/svg", G = "http://www.w3.org/1999/xhtml", K = G, Tt = !1, Et = null, Dt = D({}, [
364
- Ct,
365
- wt,
366
- G
367
- ], oe), Ot = D({}, [
347
+ ]), Dt = "http://www.w3.org/1998/Math/MathML", Ot = "http://www.w3.org/2000/svg", K = "http://www.w3.org/1999/xhtml", q = K, kt = !1, At = null, jt = O({}, [
348
+ Dt,
349
+ Ot,
350
+ K
351
+ ], oe), Mt = O({}, [
368
352
  "mi",
369
353
  "mo",
370
354
  "mn",
371
355
  "ms",
372
356
  "mtext"
373
- ]), kt = D({}, ["annotation-xml"]), At = D({}, [
357
+ ]), Nt = O({}, ["annotation-xml"]), Pt = O({}, [
374
358
  "title",
375
359
  "style",
376
360
  "font",
377
361
  "a",
378
362
  "script"
379
- ]), jt = null, Mt = ["application/xhtml+xml", "text/html"], q = null, J = null, Nt = n.createElement("form"), Pt = function(e) {
363
+ ]), Ft = null, It = ["application/xhtml+xml", "text/html"], J = null, Y = null, Lt = n.createElement("form"), Rt = function(e) {
380
364
  return e instanceof RegExp || e instanceof Function;
381
- }, Ft = function() {
365
+ }, zt = function() {
382
366
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
383
- if (J && J === e) return;
384
- (!e || typeof e != "object") && (e = {}), e = k(e), jt = Mt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, q = jt === "application/xhtml+xml" ? oe : ae, F = x(e, "ALLOWED_TAGS") && _(e.ALLOWED_TAGS) ? D({}, e.ALLOWED_TAGS, q) : tt, I = x(e, "ALLOWED_ATTR") && _(e.ALLOWED_ATTR) ? D({}, e.ALLOWED_ATTR, q) : nt, Et = x(e, "ALLOWED_NAMESPACES") && _(e.ALLOWED_NAMESPACES) ? D({}, e.ALLOWED_NAMESPACES, oe) : Dt, xt = x(e, "ADD_URI_SAFE_ATTR") && _(e.ADD_URI_SAFE_ATTR) ? D(k(St), e.ADD_URI_SAFE_ATTR, q) : St, yt = x(e, "ADD_DATA_URI_TAGS") && _(e.ADD_DATA_URI_TAGS) ? D(k(bt), e.ADD_DATA_URI_TAGS, q) : bt, W = x(e, "FORBID_CONTENTS") && _(e.FORBID_CONTENTS) ? D({}, e.FORBID_CONTENTS, q) : vt, R = x(e, "FORBID_TAGS") && _(e.FORBID_TAGS) ? D({}, e.FORBID_TAGS, q) : k({}), rt = x(e, "FORBID_ATTR") && _(e.FORBID_ATTR) ? D({}, e.FORBID_ATTR, q) : k({}), U = x(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? k(e.USE_PROFILES) : e.USE_PROFILES : !1, it = e.ALLOW_ARIA_ATTR !== !1, at = e.ALLOW_DATA_ATTR !== !1, ot = e.ALLOW_UNKNOWN_PROTOCOLS || !1, st = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, B = e.SAFE_FOR_TEMPLATES || !1, ct = e.SAFE_FOR_XML !== !1, V = e.WHOLE_DOCUMENT || !1, H = e.RETURN_DOM || !1, dt = e.RETURN_DOM_FRAGMENT || !1, ft = e.RETURN_TRUSTED_TYPE || !1, ut = e.FORCE_BODY || !1, pt = e.SANITIZE_DOM !== !1, mt = e.SANITIZE_NAMED_PROPS || !1, gt = e.KEEP_CONTENT !== !1, _t = e.IN_PLACE || !1, et = pe(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ae, K = typeof e.NAMESPACE == "string" ? e.NAMESPACE : G, Ot = x(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? k(e.MATHML_TEXT_INTEGRATION_POINTS) : D({}, [
367
+ if (Y && Y === e) return;
368
+ (!e || typeof e != "object") && (e = {}), e = A(e), Ft = It.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, J = Ft === "application/xhtml+xml" ? oe : ae, I = S(e, "ALLOWED_TAGS") && _(e.ALLOWED_TAGS) ? O({}, e.ALLOWED_TAGS, J) : at, L = S(e, "ALLOWED_ATTR") && _(e.ALLOWED_ATTR) ? O({}, e.ALLOWED_ATTR, J) : ot, At = S(e, "ALLOWED_NAMESPACES") && _(e.ALLOWED_NAMESPACES) ? O({}, e.ALLOWED_NAMESPACES, oe) : jt, Tt = S(e, "ADD_URI_SAFE_ATTR") && _(e.ADD_URI_SAFE_ATTR) ? O(A(Et), e.ADD_URI_SAFE_ATTR, J) : Et, Ct = S(e, "ADD_DATA_URI_TAGS") && _(e.ADD_DATA_URI_TAGS) ? O(A(wt), e.ADD_DATA_URI_TAGS, J) : wt, G = S(e, "FORBID_CONTENTS") && _(e.FORBID_CONTENTS) ? O({}, e.FORBID_CONTENTS, J) : St, z = S(e, "FORBID_TAGS") && _(e.FORBID_TAGS) ? O({}, e.FORBID_TAGS, J) : A({}), st = S(e, "FORBID_ATTR") && _(e.FORBID_ATTR) ? O({}, e.FORBID_ATTR, J) : A({}), W = S(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? A(e.USE_PROFILES) : e.USE_PROFILES : !1, ct = e.ALLOW_ARIA_ATTR !== !1, lt = e.ALLOW_DATA_ATTR !== !1, ut = e.ALLOW_UNKNOWN_PROTOCOLS || !1, dt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, V = e.SAFE_FOR_TEMPLATES || !1, ft = e.SAFE_FOR_XML !== !1, H = e.WHOLE_DOCUMENT || !1, U = e.RETURN_DOM || !1, ht = e.RETURN_DOM_FRAGMENT || !1, gt = e.RETURN_TRUSTED_TYPE || !1, mt = e.FORCE_BODY || !1, _t = e.SANITIZE_DOM !== !1, vt = e.SANITIZE_NAMED_PROPS || !1, bt = e.KEEP_CONTENT !== !1, xt = e.IN_PLACE || !1, it = fe(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : ke, q = typeof e.NAMESPACE == "string" ? e.NAMESPACE : K, Mt = S(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? A(e.MATHML_TEXT_INTEGRATION_POINTS) : O({}, [
385
369
  "mi",
386
370
  "mo",
387
371
  "mn",
388
372
  "ms",
389
373
  "mtext"
390
- ]), kt = x(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? k(e.HTML_INTEGRATION_POINTS) : D({}, ["annotation-xml"]);
391
- let t = x(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? k(e.CUSTOM_ELEMENT_HANDLING) : p(null);
392
- if (L = p(null), x(t, "tagNameCheck") && Pt(t.tagNameCheck) && (L.tagNameCheck = t.tagNameCheck), x(t, "attributeNameCheck") && Pt(t.attributeNameCheck) && (L.attributeNameCheck = t.attributeNameCheck), x(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (L.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), B && (at = !1), dt && (H = !0), U && (F = D({}, be), I = p(null), U.html === !0 && (D(F, me), D(I, xe)), U.svg === !0 && (D(F, he), D(I, Se), D(I, we)), U.svgFilters === !0 && (D(F, ge), D(I, Se), D(I, we)), U.mathMl === !0 && (D(F, ve), D(I, Ce), D(I, we))), z.tagCheck = null, z.attributeCheck = null, x(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? z.tagCheck = e.ADD_TAGS : _(e.ADD_TAGS) && (F === tt && (F = k(F)), D(F, e.ADD_TAGS, q))), x(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? z.attributeCheck = e.ADD_ATTR : _(e.ADD_ATTR) && (I === nt && (I = k(I)), D(I, e.ADD_ATTR, q))), x(e, "ADD_URI_SAFE_ATTR") && _(e.ADD_URI_SAFE_ATTR) && D(xt, e.ADD_URI_SAFE_ATTR, q), x(e, "FORBID_CONTENTS") && _(e.FORBID_CONTENTS) && (W === vt && (W = k(W)), D(W, e.FORBID_CONTENTS, q)), x(e, "ADD_FORBID_CONTENTS") && _(e.ADD_FORBID_CONTENTS) && (W === vt && (W = k(W)), D(W, e.ADD_FORBID_CONTENTS, q)), gt && (F["#text"] = !0), V && D(F, [
374
+ ]), Nt = S(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? A(e.HTML_INTEGRATION_POINTS) : O({}, ["annotation-xml"]);
375
+ let t = S(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? A(e.CUSTOM_ELEMENT_HANDLING) : p(null);
376
+ if (R = p(null), S(t, "tagNameCheck") && Rt(t.tagNameCheck) && (R.tagNameCheck = t.tagNameCheck), S(t, "attributeNameCheck") && Rt(t.attributeNameCheck) && (R.attributeNameCheck = t.attributeNameCheck), S(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (R.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), V && (lt = !1), ht && (U = !0), W && (I = O({}, ye), L = p(null), W.html === !0 && (O(I, pe), O(L, be)), W.svg === !0 && (O(I, me), O(L, xe), O(L, Ce)), W.svgFilters === !0 && (O(I, he), O(L, xe), O(L, Ce)), W.mathMl === !0 && (O(I, _e), O(L, Se), O(L, Ce))), B.tagCheck = null, B.attributeCheck = null, S(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? B.tagCheck = e.ADD_TAGS : _(e.ADD_TAGS) && (I === at && (I = A(I)), O(I, e.ADD_TAGS, J))), S(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? B.attributeCheck = e.ADD_ATTR : _(e.ADD_ATTR) && (L === ot && (L = A(L)), O(L, e.ADD_ATTR, J))), S(e, "ADD_URI_SAFE_ATTR") && _(e.ADD_URI_SAFE_ATTR) && O(Tt, e.ADD_URI_SAFE_ATTR, J), S(e, "FORBID_CONTENTS") && _(e.FORBID_CONTENTS) && (G === St && (G = A(G)), O(G, e.FORBID_CONTENTS, J)), S(e, "ADD_FORBID_CONTENTS") && _(e.ADD_FORBID_CONTENTS) && (G === St && (G = A(G)), O(G, e.ADD_FORBID_CONTENTS, J)), bt && (I["#text"] = !0), H && O(I, [
393
377
  "html",
394
378
  "head",
395
379
  "body"
396
- ]), F.table && (D(F, ["tbody"]), delete R.tbody), e.TRUSTED_TYPES_POLICY) {
397
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw w("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
398
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw w("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
399
- let t = O;
400
- O = e.TRUSTED_TYPES_POLICY;
380
+ ]), I.table && (O(I, ["tbody"]), delete z.tbody), e.TRUSTED_TYPES_POLICY) {
381
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw T("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
382
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw T("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
383
+ let t = k;
384
+ k = e.TRUSTED_TYPES_POLICY;
401
385
  try {
402
- M = N("");
386
+ N = P("");
403
387
  } catch (e) {
404
- throw O = t, e;
388
+ throw k = t, e;
405
389
  }
406
- } else O === void 0 && e.TRUSTED_TYPES_POLICY !== null && (O = Ie(f, i)), O && typeof M == "string" && (M = N(""));
407
- (P.uponSanitizeElement.length > 0 || P.uponSanitizeAttribute.length > 0) && F === tt && (F = k(F)), P.uponSanitizeAttribute.length > 0 && I === nt && (I = k(I)), d && d(e), J = e;
408
- }, It = D({}, [
390
+ } else e.TRUSTED_TYPES_POLICY === null ? (k = void 0, N = "") : (k === void 0 && (k = Ue()), k && typeof N == "string" && (N = P("")));
391
+ (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && I === at && (I = A(I)), F.uponSanitizeAttribute.length > 0 && L === ot && (L = A(L)), d && d(e), Y = e;
392
+ }, Bt = O({}, [
393
+ ...me,
409
394
  ...he,
410
- ...ge,
411
- ..._e
412
- ]), Lt = D({}, [...ve, ...ye]), Rt = function(e) {
413
- let t = y(e);
395
+ ...ge
396
+ ]), Vt = O({}, [..._e, ...ve]), Ht = function(e) {
397
+ let t = b(e);
414
398
  (!t || !t.tagName) && (t = {
415
- namespaceURI: K,
399
+ namespaceURI: q,
416
400
  tagName: "template"
417
401
  });
418
402
  let n = ae(e.tagName), r = ae(t.tagName);
419
- return Et[e.namespaceURI] ? e.namespaceURI === wt ? t.namespaceURI === G ? n === "svg" : t.namespaceURI === Ct ? n === "svg" && (r === "annotation-xml" || Ot[r]) : !!It[n] : e.namespaceURI === Ct ? t.namespaceURI === G ? n === "math" : t.namespaceURI === wt ? n === "math" && kt[r] : !!Lt[n] : e.namespaceURI === G ? t.namespaceURI === wt && !kt[r] || t.namespaceURI === Ct && !Ot[r] ? !1 : !Lt[n] && (At[n] || !It[n]) : !!(jt === "application/xhtml+xml" && Et[e.namespaceURI]) : !1;
420
- }, Y = function(e) {
403
+ return At[e.namespaceURI] ? e.namespaceURI === Ot ? t.namespaceURI === K ? n === "svg" : t.namespaceURI === Dt ? n === "svg" && (r === "annotation-xml" || Mt[r]) : !!Bt[n] : e.namespaceURI === Dt ? t.namespaceURI === K ? n === "math" : t.namespaceURI === Ot ? n === "math" && Nt[r] : !!Vt[n] : e.namespaceURI === K ? t.namespaceURI === Ot && !Nt[r] || t.namespaceURI === Dt && !Mt[r] ? !1 : !Vt[n] && (Pt[n] || !Bt[n]) : !!(Ft === "application/xhtml+xml" && At[e.namespaceURI]) : !1;
404
+ }, X = function(e) {
421
405
  g(t.removed, { element: e });
422
406
  try {
423
- y(e).removeChild(e);
407
+ b(e).removeChild(e);
424
408
  } catch {
425
- te(e);
409
+ if (te(e), !b(e)) throw T("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
410
+ }
411
+ }, Ut = function(e) {
412
+ let t = y ? y(e) : e.childNodes;
413
+ if (t) {
414
+ let e = [];
415
+ h(t, (t) => {
416
+ g(e, t);
417
+ }), h(e, (e) => {
418
+ try {
419
+ te(e);
420
+ } catch {}
421
+ });
426
422
  }
427
- }, X = function(e, n) {
423
+ let n = C ? C(e) : null;
424
+ if (n) for (let t = n.length - 1; t >= 0; --t) {
425
+ let r = n[t], i = r && r.name;
426
+ if (typeof i == "string") try {
427
+ e.removeAttribute(i);
428
+ } catch {}
429
+ }
430
+ }, Z = function(e, n) {
428
431
  try {
429
432
  g(t.removed, {
430
433
  attribute: n.getAttributeNode(e),
@@ -436,113 +439,129 @@ function Re() {
436
439
  from: n
437
440
  });
438
441
  }
439
- if (n.removeAttribute(e), e === "is") if (H || dt) try {
440
- Y(n);
442
+ if (n.removeAttribute(e), e === "is") if (U || ht) try {
443
+ X(n);
441
444
  } catch {}
442
445
  else try {
443
446
  n.setAttribute(e, "");
444
447
  } catch {}
445
- }, zt = function(e) {
448
+ }, Wt = function(e) {
449
+ let t = C ? C(e) : e.attributes;
450
+ if (t) for (let n = t.length - 1; n >= 0; --n) {
451
+ let r = t[n], i = r && r.name;
452
+ if (!(typeof i != "string" || L[J(i)])) try {
453
+ e.removeAttribute(i);
454
+ } catch {}
455
+ }
456
+ }, Gt = function(e) {
457
+ let t = [e];
458
+ for (; t.length > 0;) {
459
+ let e = t.pop();
460
+ (E ? E(e) : e.nodeType) === M.element && Wt(e);
461
+ let n = y ? y(e) : e.childNodes;
462
+ if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
463
+ }
464
+ }, Kt = function(e) {
446
465
  let t = null, r = null;
447
- if (ut) e = "<remove></remove>" + e;
466
+ if (mt) e = "<remove></remove>" + e;
448
467
  else {
449
468
  let t = se(e, /^[\r\n\t ]+/);
450
469
  r = t && t[0];
451
470
  }
452
- jt === "application/xhtml+xml" && K === G && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
453
- let i = O ? N(e) : e;
454
- if (K === G) try {
455
- t = new u().parseFromString(i, jt);
471
+ Ft === "application/xhtml+xml" && q === K && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
472
+ let i = k ? P(e) : e;
473
+ if (q === K) try {
474
+ t = new u().parseFromString(i, Ft);
456
475
  } catch {}
457
476
  if (!t || !t.documentElement) {
458
- t = Ve.createDocument(K, "template", null);
477
+ t = Ge.createDocument(q, "template", null);
459
478
  try {
460
- t.documentElement.innerHTML = Tt ? M : i;
479
+ t.documentElement.innerHTML = kt ? N : i;
461
480
  } catch {}
462
481
  }
463
482
  let a = t.body || t.documentElement;
464
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), K === G ? We.call(t, V ? "html" : "body")[0] : V ? t.documentElement : a;
465
- }, Bt = function(e) {
466
- return He.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
467
- }, Vt = function(e) {
483
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), q === K ? Je.call(t, H ? "html" : "body")[0] : H ? t.documentElement : a;
484
+ }, qt = function(e) {
485
+ return Ke.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
486
+ }, Jt = function(e) {
468
487
  e.normalize();
469
- let t = He.call(e.ownerDocument || e, e, l.SHOW_TEXT | l.SHOW_COMMENT | l.SHOW_CDATA_SECTION | l.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
488
+ let t = Ke.call(e.ownerDocument || e, e, l.SHOW_TEXT | l.SHOW_COMMENT | l.SHOW_CDATA_SECTION | l.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
470
489
  for (; n;) {
471
490
  let e = n.data;
472
491
  h([
473
- Ke,
474
- qe,
475
- Je
492
+ Xe,
493
+ Ze,
494
+ Qe
476
495
  ], (t) => {
477
496
  e = v(e, t, " ");
478
497
  }), n.data = e, n = t.nextNode();
479
498
  }
480
499
  let r = e.querySelectorAll?.call(e, "template") ?? [];
481
500
  h(Array.from(r), (e) => {
482
- Z(e.content) && Vt(e.content);
501
+ Q(e.content) && Jt(e.content);
483
502
  });
484
- }, Ht = function(e) {
485
- let t = E ? E(e) : null;
486
- return typeof t != "string" || q(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== S(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== T(e) || e.childNodes !== de(e);
487
- }, Z = function(e) {
488
- if (!T || typeof e != "object" || !e) return !1;
503
+ }, Yt = function(e) {
504
+ let t = D ? D(e) : null;
505
+ return typeof t != "string" || J(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== C(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== E(e) || e.childNodes !== y(e);
506
+ }, Q = function(e) {
507
+ if (!E || typeof e != "object" || !e) return !1;
489
508
  try {
490
- return T(e) === j.documentFragment;
509
+ return E(e) === M.documentFragment;
491
510
  } catch {
492
511
  return !1;
493
512
  }
494
- }, Ut = function(e) {
495
- if (!T || typeof e != "object" || !e) return !1;
513
+ }, Xt = function(e) {
514
+ if (!E || typeof e != "object" || !e) return !1;
496
515
  try {
497
- return typeof T(e) == "number";
516
+ return typeof E(e) == "number";
498
517
  } catch {
499
518
  return !1;
500
519
  }
501
520
  };
502
- function Q(e, n, r) {
521
+ function $(e, n, r) {
503
522
  h(e, (e) => {
504
- e.call(t, n, r, J);
523
+ e.call(t, n, r, Y);
505
524
  });
506
525
  }
507
- let Wt = function(e) {
526
+ let Zt = function(e) {
508
527
  let n = null;
509
- if (Q(P.beforeSanitizeElements, e, null), Ht(e)) return Y(e), !0;
510
- let r = q(E ? E(e) : e.nodeName);
511
- if (Q(P.uponSanitizeElement, e, {
528
+ if ($(F.beforeSanitizeElements, e, null), Yt(e)) return X(e), !0;
529
+ let r = J(D ? D(e) : e.nodeName);
530
+ if ($(F.uponSanitizeElement, e, {
512
531
  tagName: r,
513
- allowedTags: F
514
- }), ct && e.hasChildNodes() && !Ut(e.firstElementChild) && C(/<[/\w!]/g, e.innerHTML) && C(/<[/\w!]/g, e.textContent) || ct && e.namespaceURI === G && r === "style" && Ut(e.firstElementChild) || e.nodeType === j.progressingInstruction || ct && e.nodeType === j.comment && C(/<[/\w]/g, e.data)) return Y(e), !0;
515
- if (R[r] || !(z.tagCheck instanceof Function && z.tagCheck(r)) && !F[r]) {
516
- if (!R[r] && qt(r) && (L.tagNameCheck instanceof RegExp && C(L.tagNameCheck, r) || L.tagNameCheck instanceof Function && L.tagNameCheck(r))) return !1;
517
- if (gt && !W[r]) {
518
- let t = y(e), n = de(e);
532
+ allowedTags: I
533
+ }), ft && e.hasChildNodes() && !Xt(e.firstElementChild) && w(/<[/\w!]/g, e.innerHTML) && w(/<[/\w!]/g, e.textContent) || ft && e.namespaceURI === K && r === "style" && Xt(e.firstElementChild) || e.nodeType === M.progressingInstruction || ft && e.nodeType === M.comment && w(/<[/\w]/g, e.data)) return X(e), !0;
534
+ if (z[r] || !(B.tagCheck instanceof Function && B.tagCheck(r)) && !I[r]) {
535
+ if (!z[r] && en(r) && (R.tagNameCheck instanceof RegExp && w(R.tagNameCheck, r) || R.tagNameCheck instanceof Function && R.tagNameCheck(r))) return !1;
536
+ if (bt && !G[r]) {
537
+ let t = b(e), n = y(e);
519
538
  if (n && t) {
520
539
  let r = n.length;
521
540
  for (let i = r - 1; i >= 0; --i) {
522
- let r = ee(n[i], !0);
541
+ let r = xt ? n[i] : ee(n[i], !0);
523
542
  t.insertBefore(r, ue(e));
524
543
  }
525
544
  }
526
545
  }
527
- return Y(e), !0;
546
+ return X(e), !0;
528
547
  }
529
- return (T ? T(e) : e.nodeType) === j.element && !Rt(e) || (r === "noscript" || r === "noembed" || r === "noframes") && C(/<\/no(script|embed|frames)/i, e.innerHTML) ? (Y(e), !0) : (B && e.nodeType === j.text && (n = e.textContent, h([
530
- Ke,
531
- qe,
532
- Je
548
+ return (E ? E(e) : e.nodeType) === M.element && !Ht(e) || (r === "noscript" || r === "noembed" || r === "noframes") && w(/<\/no(script|embed|frames)/i, e.innerHTML) ? (X(e), !0) : (V && e.nodeType === M.text && (n = e.textContent, h([
549
+ Xe,
550
+ Ze,
551
+ Qe
533
552
  ], (e) => {
534
553
  n = v(n, e, " ");
535
- }), e.textContent !== n && (g(t.removed, { element: e.cloneNode() }), e.textContent = n)), Q(P.afterSanitizeElements, e, null), !1);
536
- }, Gt = function(e, t, r) {
537
- if (rt[t] || pt && (t === "id" || t === "name") && (r in n || r in Nt)) return !1;
538
- let i = I[t] || z.attributeCheck instanceof Function && z.attributeCheck(t, e);
539
- if (!(at && !rt[t] && C(Ye, t)) && !(it && C(Xe, t))) {
540
- if (!i || rt[t]) {
541
- if (!(qt(e) && (L.tagNameCheck instanceof RegExp && C(L.tagNameCheck, e) || L.tagNameCheck instanceof Function && L.tagNameCheck(e)) && (L.attributeNameCheck instanceof RegExp && C(L.attributeNameCheck, t) || L.attributeNameCheck instanceof Function && L.attributeNameCheck(t, e)) || t === "is" && L.allowCustomizedBuiltInElements && (L.tagNameCheck instanceof RegExp && C(L.tagNameCheck, r) || L.tagNameCheck instanceof Function && L.tagNameCheck(r)))) return !1;
542
- } else if (!xt[t] && !C(et, v(r, Qe, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && ce(r, "data:") === 0 && yt[e]) && !(ot && !C(Ze, v(r, Qe, ""))) && r) return !1;
554
+ }), e.textContent !== n && (g(t.removed, { element: e.cloneNode() }), e.textContent = n)), $(F.afterSanitizeElements, e, null), !1);
555
+ }, Qt = function(e, t, r) {
556
+ if (st[t] || _t && (t === "id" || t === "name") && (r in n || r in Lt)) return !1;
557
+ let i = L[t] || B.attributeCheck instanceof Function && B.attributeCheck(t, e);
558
+ if (!(lt && !st[t] && w($e, t)) && !(ct && w(et, t))) {
559
+ if (!i || st[t]) {
560
+ if (!(en(e) && (R.tagNameCheck instanceof RegExp && w(R.tagNameCheck, e) || R.tagNameCheck instanceof Function && R.tagNameCheck(e)) && (R.attributeNameCheck instanceof RegExp && w(R.attributeNameCheck, t) || R.attributeNameCheck instanceof Function && R.attributeNameCheck(t, e)) || t === "is" && R.allowCustomizedBuiltInElements && (R.tagNameCheck instanceof RegExp && w(R.tagNameCheck, r) || R.tagNameCheck instanceof Function && R.tagNameCheck(r)))) return !1;
561
+ } else if (!Tt[t] && !w(it, v(r, nt, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && ce(r, "data:") === 0 && Ct[e]) && !(ut && !w(tt, v(r, nt, ""))) && r) return !1;
543
562
  }
544
563
  return !0;
545
- }, Kt = D({}, [
564
+ }, $t = O({}, [
546
565
  "annotation-xml",
547
566
  "color-profile",
548
567
  "font-face",
@@ -551,149 +570,178 @@ function Re() {
551
570
  "font-face-src",
552
571
  "font-face-uri",
553
572
  "missing-glyph"
554
- ]), qt = function(e) {
555
- return !Kt[ae(e)] && C($e, e);
556
- }, Jt = function(e) {
557
- Q(P.beforeSanitizeAttributes, e, null);
573
+ ]), en = function(e) {
574
+ return !$t[ae(e)] && w(rt, e);
575
+ }, tn = function(e) {
576
+ $(F.beforeSanitizeAttributes, e, null);
558
577
  let n = e.attributes;
559
- if (!n || Ht(e)) return;
578
+ if (!n || Yt(e)) return;
560
579
  let r = {
561
580
  attrName: "",
562
581
  attrValue: "",
563
582
  keepAttr: !0,
564
- allowedAttributes: I,
583
+ allowedAttributes: L,
565
584
  forceKeepAttr: void 0
566
585
  }, i = n.length;
567
586
  for (; i--;) {
568
- let a = n[i], o = a.name, s = a.namespaceURI, c = a.value, l = q(o), u = c, d = o === "value" ? u : le(u);
569
- if (r.attrName = l, r.attrValue = d, r.keepAttr = !0, r.forceKeepAttr = void 0, Q(P.uponSanitizeAttribute, e, r), d = r.attrValue, mt && (l === "id" || l === "name") && ce(d, ht) !== 0 && (X(o, e), d = ht + d), ct && C(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
570
- X(o, e);
587
+ let a = n[i], o = a.name, s = a.namespaceURI, c = a.value, l = J(o), u = c, d = o === "value" ? u : le(u);
588
+ if (r.attrName = l, r.attrValue = d, r.keepAttr = !0, r.forceKeepAttr = void 0, $(F.uponSanitizeAttribute, e, r), d = r.attrValue, vt && (l === "id" || l === "name") && ce(d, yt) !== 0 && (Z(o, e), d = yt + d), ft && w(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
589
+ Z(o, e);
571
590
  continue;
572
591
  }
573
592
  if (l === "attributename" && se(d, "href")) {
574
- X(o, e);
593
+ Z(o, e);
575
594
  continue;
576
595
  }
577
596
  if (r.forceKeepAttr) continue;
578
597
  if (!r.keepAttr) {
579
- X(o, e);
598
+ Z(o, e);
580
599
  continue;
581
600
  }
582
- if (!st && C(/\/>/i, d)) {
583
- X(o, e);
601
+ if (!dt && w(/\/>/i, d)) {
602
+ Z(o, e);
584
603
  continue;
585
604
  }
586
- B && h([
587
- Ke,
588
- qe,
589
- Je
605
+ V && h([
606
+ Xe,
607
+ Ze,
608
+ Qe
590
609
  ], (e) => {
591
610
  d = v(d, e, " ");
592
611
  });
593
- let p = q(e.nodeName);
594
- if (!Gt(p, l, d)) {
595
- X(o, e);
612
+ let p = J(e.nodeName);
613
+ if (!Qt(p, l, d)) {
614
+ Z(o, e);
596
615
  continue;
597
616
  }
598
- if (O && typeof f == "object" && typeof f.getAttributeType == "function" && !s) switch (f.getAttributeType(p, l)) {
617
+ if (k && typeof f == "object" && typeof f.getAttributeType == "function" && !s) switch (f.getAttributeType(p, l)) {
599
618
  case "TrustedHTML":
600
- d = N(d);
619
+ d = P(d);
601
620
  break;
602
621
  case "TrustedScriptURL":
603
- d = O.createScriptURL(d);
622
+ d = He(d);
604
623
  break;
605
624
  }
606
625
  if (d !== u) try {
607
- s ? e.setAttributeNS(s, o, d) : e.setAttribute(o, d), Ht(e) ? Y(e) : re(t.removed);
626
+ s ? e.setAttributeNS(s, o, d) : e.setAttribute(o, d), Yt(e) ? X(e) : re(t.removed);
608
627
  } catch {
609
- X(o, e);
628
+ Z(o, e);
610
629
  }
611
630
  }
612
- Q(P.afterSanitizeAttributes, e, null);
613
- }, Yt = function(e) {
614
- let t = null, n = Bt(e);
615
- for (Q(P.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (Q(P.uponSanitizeShadowNode, t, null), Wt(t), Jt(t), Z(t.content) && Yt(t.content), (T ? T(t) : t.nodeType) === j.element) {
616
- let e = b ? b(t) : t.shadowRoot;
617
- Z(e) && ($(e), Yt(e));
618
- }
619
- Q(P.afterSanitizeShadowDOM, e, null);
620
- }, $ = function(e) {
621
- let t = T ? T(e) : e.nodeType;
622
- if (t === j.element) {
623
- let t = b ? b(e) : e.shadowRoot;
624
- Z(t) && ($(t), Yt(t));
631
+ $(F.afterSanitizeAttributes, e, null);
632
+ }, nn = function(e) {
633
+ let t = null, n = qt(e);
634
+ for ($(F.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if ($(F.uponSanitizeShadowNode, t, null), Zt(t), tn(t), Q(t.content) && nn(t.content), (E ? E(t) : t.nodeType) === M.element) {
635
+ let e = x ? x(t) : t.shadowRoot;
636
+ Q(e) && (rn(e), nn(e));
625
637
  }
626
- let n = de ? de(e) : e.childNodes;
627
- if (!n) return;
628
- let r = [];
629
- h(n, (e) => {
630
- g(r, e);
631
- });
632
- for (let e of r) $(e);
633
- if (t === j.element) {
634
- let t = E ? E(e) : null;
635
- if (typeof t == "string" && q(t) === "template") {
636
- let t = e.content;
637
- Z(t) && $(t);
638
+ $(F.afterSanitizeShadowDOM, e, null);
639
+ }, rn = function(e) {
640
+ let t = [{
641
+ node: e,
642
+ shadow: null
643
+ }];
644
+ for (; t.length > 0;) {
645
+ let e = t.pop();
646
+ if (e.shadow) {
647
+ nn(e.shadow);
648
+ continue;
649
+ }
650
+ let n = e.node, r = (E ? E(n) : n.nodeType) === M.element, i = y ? y(n) : n.childNodes;
651
+ if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
652
+ node: i[e],
653
+ shadow: null
654
+ });
655
+ if (r) {
656
+ let e = D ? D(n) : null;
657
+ if (typeof e == "string" && J(e) === "template") {
658
+ let e = n.content;
659
+ Q(e) && t.push({
660
+ node: e,
661
+ shadow: null
662
+ });
663
+ }
664
+ }
665
+ if (r) {
666
+ let e = x ? x(n) : n.shadowRoot;
667
+ Q(e) && t.push({
668
+ node: null,
669
+ shadow: e
670
+ }, {
671
+ node: e,
672
+ shadow: null
673
+ });
638
674
  }
639
675
  }
640
676
  };
641
677
  return t.sanitize = function(e) {
642
678
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
643
- if (Tt = !e, Tt && (e = "<!-->"), typeof e != "string" && !Ut(e) && (e = fe(e), typeof e != "string")) throw w("dirty is not a string, aborting");
679
+ if (kt = !e, kt && (e = "<!-->"), typeof e != "string" && !Xt(e) && (e = de(e), typeof e != "string")) throw T("dirty is not a string, aborting");
644
680
  if (!t.isSupported) return e;
645
- if (lt || Ft(n), t.removed = [], typeof e == "string" && (_t = !1), _t) {
646
- let t = E ? E(e) : e.nodeName;
681
+ pt || zt(n), t.removed = [];
682
+ let c = xt && typeof e != "string" && Xt(e);
683
+ if (c) {
684
+ let t = D ? D(e) : e.nodeName;
647
685
  if (typeof t == "string") {
648
- let e = q(t);
649
- if (!F[e] || R[e]) throw w("root node is forbidden and cannot be sanitized in-place");
686
+ let e = J(t);
687
+ if (!I[e] || z[e]) throw T("root node is forbidden and cannot be sanitized in-place");
688
+ }
689
+ if (Yt(e)) throw T("root node is clobbered and cannot be sanitized in-place");
690
+ try {
691
+ rn(e);
692
+ } catch (t) {
693
+ throw Ut(e), t;
650
694
  }
651
- if (Ht(e)) throw w("root node is clobbered and cannot be sanitized in-place");
652
- $(e);
653
- } else if (Ut(e)) i = zt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === j.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), $(a);
695
+ } else if (Xt(e)) i = Kt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === M.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), rn(a);
654
696
  else {
655
- if (!H && !B && !V && e.indexOf("<") === -1) return O && ft ? N(e) : e;
656
- if (i = zt(e), !i) return H ? null : ft ? M : "";
697
+ if (!U && !V && !H && e.indexOf("<") === -1) return k && gt ? P(e) : e;
698
+ if (i = Kt(e), !i) return U ? null : gt ? N : "";
699
+ }
700
+ i && mt && X(i.firstChild);
701
+ let l = qt(c ? e : i);
702
+ try {
703
+ for (; o = l.nextNode();) Zt(o), tn(o), Q(o.content) && nn(o.content);
704
+ } catch (t) {
705
+ throw c && Ut(e), t;
657
706
  }
658
- i && ut && Y(i.firstChild);
659
- let c = Bt(_t ? e : i);
660
- for (; o = c.nextNode();) Wt(o), Jt(o), Z(o.content) && Yt(o.content);
661
- if (_t) return B && Vt(e), e;
662
- if (H) {
663
- if (B && Vt(i), dt) for (s = Ue.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
707
+ if (c) return h(t.removed, (e) => {
708
+ e.element && Gt(e.element);
709
+ }), V && Jt(e), e;
710
+ if (U) {
711
+ if (V && Jt(i), ht) for (s = qe.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
664
712
  else s = i;
665
- return (I.shadowroot || I.shadowrootmode) && (s = Ge.call(r, s, !0)), s;
713
+ return (L.shadowroot || L.shadowrootmode) && (s = Ye.call(r, s, !0)), s;
666
714
  }
667
- let l = V ? i.outerHTML : i.innerHTML;
668
- return V && F["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && C(Ne, i.ownerDocument.doctype.name) && (l = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + l), B && h([
669
- Ke,
670
- qe,
671
- Je
715
+ let u = H ? i.outerHTML : i.innerHTML;
716
+ return H && I["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && w(Me, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), V && h([
717
+ Xe,
718
+ Ze,
719
+ Qe
672
720
  ], (e) => {
673
- l = v(l, e, " ");
674
- }), O && ft ? N(l) : l;
721
+ u = v(u, e, " ");
722
+ }), k && gt ? P(u) : u;
675
723
  }, t.setConfig = function() {
676
- Ft(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), lt = !0;
724
+ zt(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), pt = !0;
677
725
  }, t.clearConfig = function() {
678
- J = null, lt = !1;
726
+ Y = null, pt = !1, k = Re, N = "";
679
727
  }, t.isValidAttribute = function(e, t, n) {
680
- return J || Ft({}), Gt(q(e), q(t), n);
728
+ return Y || zt({}), Qt(J(e), J(t), n);
681
729
  }, t.addHook = function(e, t) {
682
- typeof t == "function" && g(P[e], t);
730
+ typeof t == "function" && g(F[e], t);
683
731
  }, t.removeHook = function(e, t) {
684
732
  if (t !== void 0) {
685
- let n = ne(P[e], t);
686
- return n === -1 ? void 0 : ie(P[e], n, 1)[0];
733
+ let n = ne(F[e], t);
734
+ return n === -1 ? void 0 : ie(F[e], n, 1)[0];
687
735
  }
688
- return re(P[e]);
736
+ return re(F[e]);
689
737
  }, t.removeHooks = function(e) {
690
- P[e] = [];
738
+ F[e] = [];
691
739
  }, t.removeAllHooks = function() {
692
- P = Le();
740
+ F = Ie();
693
741
  }, t;
694
742
  }
695
- var M = Re();
743
+ var N = Le();
696
744
  //#endregion
697
- export { M as purify };
745
+ export { N as purify };
698
746
 
699
747
  //# sourceMappingURL=purify.es.js.map