@clevertask/scribe 0.1.22 → 0.1.24

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.
Files changed (35) hide show
  1. package/README.md +34 -2
  2. package/dist/{BarMenu-tPZoiOba.js → BarMenu-DW95OBe1.js} +1 -1
  3. package/dist/assets/index.css +1 -1
  4. package/dist/components/Menu/BarMenu.js +1 -1
  5. package/dist/components/Menu/BubbleMenu.js +2 -2
  6. package/dist/components/Menu/CalloutBubbleMenu.js +2 -2
  7. package/dist/components/Menu/LinkBubbleMenu.js +2 -2
  8. package/dist/components/Menu/Mobile/ListOptionBar.js +1 -1
  9. package/dist/components/Menu/TableBubbleMenu.js +2 -2
  10. package/dist/components/Scribe/extension/emoji/suggest.js +1 -1
  11. package/dist/components/Scribe/extension/extension-markdown-paste.js +1 -1
  12. package/dist/components/Scribe/extension/external-link-preview/index.js +1 -1
  13. package/dist/components/Scribe/extension/external-link-preview/node-view.js +1 -1
  14. package/dist/components/Scribe/extension/index.js +1 -1
  15. package/dist/components/Scribe/extension/slashCommand/renderItems.js +1 -1
  16. package/dist/components/Scribe/index.js +4 -4
  17. package/dist/{dist-D31OwZrM.js → dist-_L8dTDsy.js} +1 -1
  18. package/dist/document-node-capabilities.d.ts +47 -0
  19. package/dist/document-node-capabilities.d.ts.map +1 -0
  20. package/dist/document-node-capabilities.js +409 -0
  21. package/dist/{extension-BMUUYPzc.js → extension-B7i7CZ1Y.js} +1 -1
  22. package/dist/{html-to-markdown-D7PT8MhP.js → html-to-markdown-CKpceHDk.js} +1 -1
  23. package/dist/main.js +2 -2
  24. package/dist/{markdown-to-html-ChfR7P_Y.js → markdown-to-html-zj2j0HLf.js} +18 -15
  25. package/dist/{menus-DLKcWlVX.js → menus-BhM4ctz2.js} +2 -2
  26. package/dist/{purify.es-DGv0-Lid.js → purify.es-CpMrJENN.js} +277 -277
  27. package/dist/{schema-extensions-CQTswF0n.js → schema-extensions-ggKYCkRf.js} +397 -372
  28. package/dist/schema-extensions.js +1 -1
  29. package/dist/schema.d.ts +2 -0
  30. package/dist/schema.d.ts.map +1 -1
  31. package/dist/schema.js +4 -3
  32. package/dist/utils/html-to-markdown.js +1 -1
  33. package/dist/utils/index.js +3 -3
  34. package/dist/utils/markdown-to-html.js +1 -1
  35. package/package.json +10 -10
@@ -1,4 +1,4 @@
1
- //#region node_modules/.pnpm/dompurify@3.4.14/node_modules/dompurify/dist/purify.es.mjs
1
+ //#region node_modules/.pnpm/dompurify@3.4.15/node_modules/dompurify/dist/purify.es.mjs
2
2
  function e(e, t) {
3
3
  (t == null || t > e.length) && (t = e.length);
4
4
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
@@ -49,7 +49,7 @@ d ||= function(e) {
49
49
  }, ee ||= function(e) {
50
50
  return new e(...[...arguments].slice(1));
51
51
  };
52
- var g = w(Array.prototype.forEach), te = w(Array.prototype.lastIndexOf), ne = w(Array.prototype.pop), re = w(Array.prototype.push), ie = w(Array.prototype.splice), _ = Array.isArray, ae = w(String.prototype.toLowerCase), oe = w(String.prototype.toString), se = w(String.prototype.match), ce = w(String.prototype.replace), le = w(String.prototype.indexOf), ue = w(String.prototype.trim), de = w(Number.prototype.toString), fe = w(Boolean.prototype.toString), v = typeof BigInt > "u" ? null : w(BigInt.prototype.toString), y = typeof Symbol > "u" ? null : w(Symbol.prototype.toString), b = w(Object.prototype.hasOwnProperty), x = w(Object.prototype.toString), S = w(RegExp.prototype.test), C = T(TypeError);
52
+ var g = w(Array.prototype.forEach), te = w(Array.prototype.lastIndexOf), ne = w(Array.prototype.pop), re = w(Array.prototype.push), ie = w(Array.prototype.splice), _ = Array.isArray, ae = w(String.prototype.toLowerCase), oe = w(String.prototype.toString), se = w(String.prototype.match), v = w(String.prototype.replace), ce = w(String.prototype.indexOf), le = w(String.prototype.trim), ue = w(Number.prototype.toString), de = w(Boolean.prototype.toString), fe = typeof BigInt > "u" ? null : w(BigInt.prototype.toString), y = typeof Symbol > "u" ? null : w(Symbol.prototype.toString), b = w(Object.prototype.hasOwnProperty), x = w(Object.prototype.toString), S = w(RegExp.prototype.test), C = pe(TypeError);
53
53
  function w(e) {
54
54
  return function(t) {
55
55
  t instanceof RegExp && (t.lastIndex = 0);
@@ -57,12 +57,12 @@ function w(e) {
57
57
  return h(e, t, n);
58
58
  };
59
59
  }
60
- function T(e) {
60
+ function pe(e) {
61
61
  return function() {
62
62
  return ee(e, [...arguments]);
63
63
  };
64
64
  }
65
- function E(e, t) {
65
+ function T(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,31 +76,31 @@ function E(e, t) {
76
76
  }
77
77
  return e;
78
78
  }
79
- function D(e) {
79
+ function E(e) {
80
80
  for (let t = 0; t < e.length; t++) b(e, t) || (e[t] = null);
81
81
  return e;
82
82
  }
83
- function O(e) {
83
+ function D(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
- b(e, a) && (t[a] = _(o) ? D(o) : o && typeof o == "object" && o.constructor === Object ? O(o) : o);
88
+ b(e, a) && (t[a] = _(o) ? E(o) : o && typeof o == "object" && o.constructor === Object ? D(o) : o);
89
89
  }
90
90
  return t;
91
91
  }
92
- function pe(e) {
92
+ function me(e) {
93
93
  switch (typeof e) {
94
94
  case "string": return e;
95
- case "number": return de(e);
96
- case "boolean": return fe(e);
97
- case "bigint": return v ? v(e) : "0";
95
+ case "number": return ue(e);
96
+ case "boolean": return de(e);
97
+ case "bigint": return fe ? fe(e) : "0";
98
98
  case "symbol": return y ? y(e) : "Symbol()";
99
99
  case "undefined": return x(e);
100
100
  case "function":
101
101
  case "object": {
102
102
  if (e === null) return x(e);
103
- let t = e, n = k(t, "toString");
103
+ let t = e, n = O(t, "toString");
104
104
  if (typeof n == "function") {
105
105
  let e = n(t);
106
106
  return typeof e == "string" ? e : x(e);
@@ -110,7 +110,7 @@ function pe(e) {
110
110
  default: return x(e);
111
111
  }
112
112
  }
113
- function k(e, t) {
113
+ function O(e, t) {
114
114
  for (; e !== null;) {
115
115
  let n = u(e, t);
116
116
  if (n) {
@@ -124,14 +124,14 @@ function k(e, t) {
124
124
  }
125
125
  return n;
126
126
  }
127
- function me(e) {
127
+ function he(e) {
128
128
  try {
129
129
  return S(e, ""), !0;
130
130
  } catch {
131
131
  return !1;
132
132
  }
133
133
  }
134
- var he = 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(".")), ge = 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(".")), _e = d([
134
+ var ge = 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(".")), _e = 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(".")), ve = d([
135
135
  "feBlend",
136
136
  "feColorMatrix",
137
137
  "feComponentTransfer",
@@ -157,7 +157,7 @@ var he = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
157
157
  "feSpotLight",
158
158
  "feTile",
159
159
  "feTurbulence"
160
- ]), ve = d([
160
+ ]), ye = d([
161
161
  "animate",
162
162
  "color-profile",
163
163
  "cursor",
@@ -180,7 +180,7 @@ var he = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
180
180
  "solidcolor",
181
181
  "unknown",
182
182
  "use"
183
- ]), ye = 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(".")), be = d([
183
+ ]), be = 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(".")), xe = d([
184
184
  "maction",
185
185
  "maligngroup",
186
186
  "malignmark",
@@ -196,13 +196,13 @@ var he = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
196
196
  "annotation-xml",
197
197
  "mprescripts",
198
198
  "none"
199
- ]), xe = d(["#text"]), Se = 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(".")), Ce = 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.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), we = 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(".")), Te = d([
199
+ ]), Se = d(["#text"]), Ce = 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(".")), we = 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.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Te = 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(".")), Ee = d([
200
200
  "xlink:href",
201
201
  "xml:id",
202
202
  "xlink:title",
203
203
  "xml:space",
204
204
  "xmlns:xlink"
205
- ]), Ee = f(/{{[\w\W]*|^[\w\W]*}}/g), De = f(/<%[\w\W]*|^[\w\W]*%>/g), Oe = f(/\${[\w\W]*/g), ke = f(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ae = f(/^aria-[\-\w]+$/), je = f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Me = f(/^(?:\w+script|data):/i), Ne = f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Pe = f(/^html$/i), Fe = f(/^[a-z][.\w]*(-[.\w]+)+$/i), Ie = f(/<[/\w!]/g), Le = f(/<[/\w]/g), Re = f(/<\/no(script|embed|frames)/i), ze = f(/\/>/i), A = {
205
+ ]), De = f(/{{[\w\W]*|^[\w\W]*}}/g), Oe = f(/<%[\w\W]*|^[\w\W]*%>/g), ke = f(/\${[\w\W]*/g), Ae = f(/^data-[\-\w.\u00B7-\uFFFF]+$/), je = f(/^aria-[\-\w]+$/), Me = f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Ne = f(/^(?:\w+script|data):/i), Pe = f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Fe = f(/^html$/i), Ie = f(/^[a-z][.\w]*(-[.\w]+)+$/i), Le = f(/<[/\w!]/g), Re = f(/<[/\w]/g), ze = f(/<\/no(script|embed|frames)/i), Be = f(/\/>/i), k = {
206
206
  element: 1,
207
207
  attribute: 2,
208
208
  text: 3,
@@ -215,7 +215,7 @@ var he = 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
- }, j = [
218
+ }, A = [
219
219
  "style",
220
220
  "script",
221
221
  "xmp",
@@ -224,14 +224,14 @@ var he = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
224
224
  "noframes",
225
225
  "plaintext",
226
226
  "noscript"
227
- ], Be = d(E({}, j)), Ve = function() {
227
+ ], Ve = d(T({}, A)), He = function() {
228
228
  let e = {};
229
- return g(j, (t) => {
229
+ return g(A, (t) => {
230
230
  e[t] = f(RegExp("</" + t + "(?=[\\t\\n\\f\\r />])", "i"));
231
231
  }), d(e);
232
- }(), He = function() {
232
+ }(), Ue = function() {
233
233
  return typeof window > "u" ? null : window;
234
- }, Ue = function(e, t) {
234
+ }, We = function(e, t) {
235
235
  if (typeof e != "object" || typeof e.createPolicy != "function") return null;
236
236
  let n = null, r = "data-tt-policy-suffix";
237
237
  t && t.hasAttribute(r) && (n = t.getAttribute(r));
@@ -248,7 +248,7 @@ var he = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
248
248
  } catch {
249
249
  return console.warn("TrustedTypes policy " + i + " could not be created."), null;
250
250
  }
251
- }, We = function() {
251
+ }, Ge = function() {
252
252
  return {
253
253
  afterSanitizeAttributes: [],
254
254
  afterSanitizeElements: [],
@@ -260,60 +260,60 @@ var he = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
260
260
  uponSanitizeElement: [],
261
261
  uponSanitizeShadowNode: []
262
262
  };
263
- }, M = function(e, t, n, r) {
264
- return b(e, t) && _(e[t]) ? E(r.base ? O(r.base) : {}, e[t], r.transform) : n;
265
- }, Ge = function(e, t, n) {
263
+ }, j = function(e, t, n, r) {
264
+ return b(e, t) && _(e[t]) ? T(r.base ? D(r.base) : {}, e[t], r.transform) : n;
265
+ }, Ke = function(e, t, n) {
266
266
  let r = b(e, t) ? e[t] : void 0;
267
- return r && typeof r == "object" ? O(r) : n();
267
+ return r && typeof r == "object" ? D(r) : n();
268
268
  };
269
- function Ke() {
270
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : He(), t = (e) => Ke(e);
271
- if (t.version = "3.4.14", t.removed = [], !e || !e.document || e.document.nodeType !== A.document || !e.Element) return t.isSupported = !1, t;
269
+ function qe() {
270
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ue(), t = (e) => qe(e);
271
+ if (t.version = "3.4.15", t.removed = [], !e || !e.document || e.document.nodeType !== k.document || !e.Element) return t.isSupported = !1, t;
272
272
  let n = e.document, r = n, i = r.currentScript;
273
273
  e.DocumentFragment;
274
274
  let a = e.HTMLTemplateElement, s = e.Node, c = e.Element, l = e.NodeFilter;
275
275
  e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
276
- let u = e.DOMParser, m = e.trustedTypes, h = c.prototype, ee = k(h, "cloneNode"), de = k(h, "remove"), fe = k(h, "nextSibling"), v = k(h, "childNodes"), y = k(h, "parentNode"), x = k(h, "shadowRoot"), w = k(h, "attributes"), T = s && s.prototype ? k(s.prototype, "nodeType") : null, D = s && s.prototype ? k(s.prototype, "nodeName") : null, j = s && s.prototype ? k(s.prototype, "ownerDocument") : null, qe = function(e) {
277
- return T ? T(e) : e.nodeType;
278
- }, Je = function(e) {
279
- return D ? D(e) : e.nodeName;
276
+ let u = e.DOMParser, m = e.trustedTypes, h = c.prototype, ee = O(h, "cloneNode"), ue = O(h, "remove"), de = O(h, "removeAttributeNode"), fe = O(h, "nextSibling"), y = O(h, "childNodes"), x = O(h, "parentNode"), w = O(h, "shadowRoot"), pe = O(h, "attributes"), E = s && s.prototype ? O(s.prototype, "nodeType") : null, A = s && s.prototype ? O(s.prototype, "nodeName") : null, Je = s && s.prototype ? O(s.prototype, "ownerDocument") : null, Ye = function(e) {
277
+ return E ? E(e) : e.nodeType;
278
+ }, Xe = function(e) {
279
+ return A ? A(e) : e.nodeName;
280
280
  };
281
281
  if (typeof a == "function") {
282
282
  let e = n.createElement("template");
283
283
  e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
284
284
  }
285
- let N, P = "", Ye, Xe = !1, Ze = 0, Qe = function() {
286
- if (Ze > 0) throw C("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.");
287
- }, F = function(e) {
288
- Qe(), Ze++;
285
+ let M, N = "", Ze, Qe = !1, $e = 0, et = function() {
286
+ if ($e > 0) throw C("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.");
287
+ }, P = function(e) {
288
+ et(), $e++;
289
289
  try {
290
- return N.createHTML(e);
290
+ return M.createHTML(e);
291
291
  } finally {
292
- Ze--;
292
+ $e--;
293
293
  }
294
- }, $e = function(e) {
295
- Qe(), Ze++;
294
+ }, tt = function(e) {
295
+ et(), $e++;
296
296
  try {
297
- return N.createScriptURL(e);
297
+ return M.createScriptURL(e);
298
298
  } finally {
299
- Ze--;
300
- }
301
- }, et = function() {
302
- return Xe ||= (Ye = Ue(m, i), !0), Ye;
303
- }, tt = n, nt = tt.implementation, rt = tt.createNodeIterator, it = tt.createDocumentFragment, at = tt.getElementsByTagName, ot = r.importNode, I = We();
304
- t.isSupported = typeof o == "function" && typeof y == "function" && nt && nt.createHTMLDocument !== void 0;
305
- let st = Ee, ct = De, lt = Oe, ut = ke, dt = Ae, ft = Me, pt = Ne, mt = Fe, ht = je, L = null, gt = E({}, [
306
- ...he,
299
+ $e--;
300
+ }
301
+ }, nt = function() {
302
+ return Qe ||= (Ze = We(m, i), !0), Ze;
303
+ }, rt = n, it = rt.implementation, at = rt.createNodeIterator, ot = rt.createDocumentFragment, st = rt.getElementsByTagName, ct = r.importNode, F = Ge();
304
+ t.isSupported = typeof o == "function" && typeof x == "function" && it && it.createHTMLDocument !== void 0;
305
+ let lt = De, ut = Oe, dt = ke, ft = Ae, pt = je, mt = Ne, ht = Pe, gt = Ie, _t = Me, I = null, vt = T({}, [
307
306
  ...ge,
308
307
  ..._e,
309
- ...ye,
310
- ...xe
311
- ]), R = null, _t = E({}, [
312
- ...Se,
308
+ ...ve,
309
+ ...be,
310
+ ...Se
311
+ ]), L = null, yt = T({}, [
313
312
  ...Ce,
314
313
  ...we,
315
- ...Te
316
- ]), z = Object.seal(p(null, {
314
+ ...Te,
315
+ ...Ee
316
+ ]), R = Object.seal(p(null, {
317
317
  tagNameCheck: {
318
318
  writable: !0,
319
319
  configurable: !1,
@@ -332,7 +332,7 @@ function Ke() {
332
332
  enumerable: !0,
333
333
  value: !1
334
334
  }
335
- })), vt = null, yt = null, B = Object.seal(p(null, {
335
+ })), bt = null, xt = null, z = Object.seal(p(null, {
336
336
  tagCheck: {
337
337
  writable: !0,
338
338
  configurable: !1,
@@ -345,14 +345,14 @@ function Ke() {
345
345
  enumerable: !0,
346
346
  value: null
347
347
  }
348
- })), bt = !0, xt = !0, St = !1, Ct = !0, V = !1, H = !0, U = !1, wt = !1, Tt = null, Et = null, Dt = !1, W = !1, Ot = !1, kt = !1, At = !0, jt = !1, Mt = "user-content-", Nt = !0, Pt = !1, G = {}, K = null, Ft = E({}, /* @__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(".")), It = null, Lt = E({}, [
348
+ })), St = !0, Ct = !0, wt = !1, Tt = !0, B = !1, V = !0, H = !1, Et = !1, Dt = null, Ot = null, kt = !1, U = !1, At = !1, jt = !1, Mt = !0, Nt = !1, Pt = "user-content-", Ft = !0, It = !1, W = {}, G = null, Lt = T({}, /* @__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(".")), Rt = null, zt = T({}, [
349
349
  "audio",
350
350
  "video",
351
351
  "img",
352
352
  "source",
353
353
  "image",
354
354
  "track"
355
- ]), Rt = null, zt = E({}, [
355
+ ]), Bt = null, Vt = T({}, [
356
356
  "alt",
357
357
  "class",
358
358
  "for",
@@ -367,103 +367,103 @@ function Ke() {
367
367
  "value",
368
368
  "style",
369
369
  "xmlns"
370
- ]), Bt = "http://www.w3.org/1998/Math/MathML", Vt = "http://www.w3.org/2000/svg", q = "http://www.w3.org/1999/xhtml", J = q, Ht = !1, Ut = null, Wt = E({}, [
371
- Bt,
372
- Vt,
373
- q
374
- ], oe), Gt = d([
370
+ ]), Ht = "http://www.w3.org/1998/Math/MathML", Ut = "http://www.w3.org/2000/svg", K = "http://www.w3.org/1999/xhtml", q = K, Wt = !1, Gt = null, Kt = T({}, [
371
+ Ht,
372
+ Ut,
373
+ K
374
+ ], oe), qt = d([
375
375
  "mi",
376
376
  "mo",
377
377
  "mn",
378
378
  "ms",
379
379
  "mtext"
380
- ]), Kt = E({}, Gt), qt = d(["annotation-xml"]), Jt = E({}, qt), Yt = E({}, [
380
+ ]), Jt = T({}, qt), Yt = d(["annotation-xml"]), Xt = T({}, Yt), Zt = T({}, [
381
381
  "title",
382
382
  "style",
383
383
  "font",
384
384
  "a",
385
385
  "script"
386
- ]), Xt = null, Zt = ["application/xhtml+xml", "text/html"], Y = null, X = null, Qt = n.createElement("form"), $t = function(e) {
386
+ ]), Qt = null, $t = ["application/xhtml+xml", "text/html"], J = null, Y = null, en = n.createElement("form"), tn = function(e) {
387
387
  return e instanceof RegExp || e instanceof Function;
388
- }, en = function() {
388
+ }, nn = function() {
389
389
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
390
- if (X && X === e) return;
391
- (!e || typeof e != "object") && (e = {}), e = O(e), Xt = Zt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = Xt === "application/xhtml+xml" ? oe : ae, L = M(e, "ALLOWED_TAGS", gt, { transform: Y }), R = M(e, "ALLOWED_ATTR", _t, { transform: Y }), Ut = M(e, "ALLOWED_NAMESPACES", Wt, { transform: oe }), Rt = M(e, "ADD_URI_SAFE_ATTR", zt, {
392
- transform: Y,
390
+ if (Y && Y === e) return;
391
+ (!e || typeof e != "object") && (e = {}), e = D(e), Qt = $t.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, J = Qt === "application/xhtml+xml" ? oe : ae, I = j(e, "ALLOWED_TAGS", vt, { transform: J }), L = j(e, "ALLOWED_ATTR", yt, { transform: J }), Gt = j(e, "ALLOWED_NAMESPACES", Kt, { transform: oe }), Bt = j(e, "ADD_URI_SAFE_ATTR", Vt, {
392
+ transform: J,
393
+ base: Vt
394
+ }), Rt = j(e, "ADD_DATA_URI_TAGS", zt, {
395
+ transform: J,
393
396
  base: zt
394
- }), It = M(e, "ADD_DATA_URI_TAGS", Lt, {
395
- transform: Y,
396
- base: Lt
397
- }), K = M(e, "FORBID_CONTENTS", Ft, { transform: Y }), vt = M(e, "FORBID_TAGS", O({}), { transform: Y }), yt = M(e, "FORBID_ATTR", O({}), { transform: Y }), G = b(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? O(e.USE_PROFILES) : e.USE_PROFILES : !1, bt = e.ALLOW_ARIA_ATTR !== !1, xt = e.ALLOW_DATA_ATTR !== !1, St = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ct = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, V = e.SAFE_FOR_TEMPLATES || !1, H = e.SAFE_FOR_XML !== !1, U = e.WHOLE_DOCUMENT || !1, W = e.RETURN_DOM || !1, Ot = e.RETURN_DOM_FRAGMENT || !1, kt = e.RETURN_TRUSTED_TYPE || !1, Dt = e.FORCE_BODY || !1, At = e.SANITIZE_DOM !== !1, jt = e.SANITIZE_NAMED_PROPS || !1, Nt = e.KEEP_CONTENT !== !1, Pt = e.IN_PLACE || !1, ht = me(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : je, J = typeof e.NAMESPACE == "string" ? e.NAMESPACE : q, Kt = Ge(e, "MATHML_TEXT_INTEGRATION_POINTS", () => E({}, Gt)), Jt = Ge(e, "HTML_INTEGRATION_POINTS", () => E({}, qt));
398
- let t = Ge(e, "CUSTOM_ELEMENT_HANDLING", () => p(null));
399
- if (z = p(null), b(t, "tagNameCheck") && $t(t.tagNameCheck) && (z.tagNameCheck = t.tagNameCheck), b(t, "attributeNameCheck") && $t(t.attributeNameCheck) && (z.attributeNameCheck = t.attributeNameCheck), b(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (z.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), f(z), V && (xt = !1), Ot && (W = !0), G && (L = E({}, xe), R = p(null), G.html === !0 && (E(L, he), E(R, Se)), G.svg === !0 && (E(L, ge), E(R, Ce), E(R, Te)), G.svgFilters === !0 && (E(L, _e), E(R, Ce), E(R, Te)), G.mathMl === !0 && (E(L, ye), E(R, we), E(R, Te))), B.tagCheck = null, B.attributeCheck = null, b(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? B.tagCheck = e.ADD_TAGS : _(e.ADD_TAGS) && (L === gt && (L = O(L)), E(L, e.ADD_TAGS, Y))), b(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? B.attributeCheck = e.ADD_ATTR : _(e.ADD_ATTR) && (R === _t && (R = O(R)), E(R, e.ADD_ATTR, Y))), b(e, "ADD_FORBID_CONTENTS") && _(e.ADD_FORBID_CONTENTS) && (K === Ft && (K = O(K)), E(K, e.ADD_FORBID_CONTENTS, Y)), Nt && (L["#text"] = !0), U && E(L, [
397
+ }), G = j(e, "FORBID_CONTENTS", Lt, { transform: J }), bt = j(e, "FORBID_TAGS", D({}), { transform: J }), xt = j(e, "FORBID_ATTR", D({}), { transform: J }), W = b(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? D(e.USE_PROFILES) : e.USE_PROFILES : !1, St = e.ALLOW_ARIA_ATTR !== !1, Ct = e.ALLOW_DATA_ATTR !== !1, wt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Tt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, B = e.SAFE_FOR_TEMPLATES || !1, V = e.SAFE_FOR_XML !== !1, H = e.WHOLE_DOCUMENT || !1, U = e.RETURN_DOM || !1, At = e.RETURN_DOM_FRAGMENT || !1, jt = e.RETURN_TRUSTED_TYPE || !1, kt = e.FORCE_BODY || !1, Mt = e.SANITIZE_DOM !== !1, Nt = e.SANITIZE_NAMED_PROPS || !1, Ft = e.KEEP_CONTENT !== !1, It = e.IN_PLACE || !1, _t = he(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Me, q = typeof e.NAMESPACE == "string" ? e.NAMESPACE : K, Jt = Ke(e, "MATHML_TEXT_INTEGRATION_POINTS", () => T({}, qt)), Xt = Ke(e, "HTML_INTEGRATION_POINTS", () => T({}, Yt));
398
+ let t = Ke(e, "CUSTOM_ELEMENT_HANDLING", () => p(null));
399
+ if (R = p(null), b(t, "tagNameCheck") && tn(t.tagNameCheck) && (R.tagNameCheck = t.tagNameCheck), b(t, "attributeNameCheck") && tn(t.attributeNameCheck) && (R.attributeNameCheck = t.attributeNameCheck), b(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (R.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), f(R), B && (Ct = !1), At && (U = !0), W && (I = T({}, Se), L = p(null), W.html === !0 && (T(I, ge), T(L, Ce)), W.svg === !0 && (T(I, _e), T(L, we), T(L, Ee)), W.svgFilters === !0 && (T(I, ve), T(L, we), T(L, Ee)), W.mathMl === !0 && (T(I, be), T(L, Te), T(L, Ee))), z.tagCheck = null, z.attributeCheck = null, b(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? z.tagCheck = e.ADD_TAGS : _(e.ADD_TAGS) && (I === vt && (I = D(I)), T(I, e.ADD_TAGS, J))), b(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? z.attributeCheck = e.ADD_ATTR : _(e.ADD_ATTR) && (L === yt && (L = D(L)), T(L, e.ADD_ATTR, J))), b(e, "ADD_FORBID_CONTENTS") && _(e.ADD_FORBID_CONTENTS) && (G === Lt && (G = D(G)), T(G, e.ADD_FORBID_CONTENTS, J)), Ft && (I["#text"] = !0), H && T(I, [
400
400
  "html",
401
401
  "head",
402
402
  "body"
403
- ]), L.table && (E(L, ["tbody"]), delete vt.tbody), e.TRUSTED_TYPES_POLICY) {
403
+ ]), I.table && (T(I, ["tbody"]), delete bt.tbody), e.TRUSTED_TYPES_POLICY) {
404
404
  if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw C("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
405
405
  if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw C("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
406
- let t = N;
407
- N = e.TRUSTED_TYPES_POLICY;
406
+ let t = M;
407
+ M = e.TRUSTED_TYPES_POLICY;
408
408
  try {
409
- P = F("");
409
+ N = P("");
410
410
  } catch (e) {
411
- throw N = t, e;
411
+ throw M = t, e;
412
412
  }
413
- } else e.TRUSTED_TYPES_POLICY === null ? (N = void 0, P = "") : (N === void 0 && (N = et()), N && typeof P == "string" && (P = F("")));
414
- d && d(e), X = e;
415
- }, tn = E({}, [
416
- ...ge,
413
+ } else e.TRUSTED_TYPES_POLICY === null ? (M = void 0, N = "") : (M === void 0 && (M = nt()), M && typeof N == "string" && (N = P("")));
414
+ d && d(e), Y = e;
415
+ }, rn = T({}, [
417
416
  ..._e,
418
- ...ve
419
- ]), nn = E({}, [...ye, ...be]), rn = function(e, t, n) {
420
- return t.namespaceURI === q ? e === "svg" : t.namespaceURI === Bt ? e === "svg" && (n === "annotation-xml" || Kt[n]) : !!tn[e];
421
- }, an = function(e, t, n) {
422
- return t.namespaceURI === q ? e === "math" : t.namespaceURI === Vt ? e === "math" && Jt[n] : !!nn[e];
423
- }, on = function(e, t, n) {
424
- return t.namespaceURI === Vt && !Jt[n] || t.namespaceURI === Bt && !Kt[n] ? !1 : !nn[e] && (Yt[e] || !tn[e]);
425
- }, sn = function(e) {
426
- let t = y(e);
417
+ ...ve,
418
+ ...ye
419
+ ]), an = T({}, [...be, ...xe]), on = function(e, t, n) {
420
+ return t.namespaceURI === K ? e === "svg" : t.namespaceURI === Ht ? e === "svg" && (n === "annotation-xml" || Jt[n]) : !!rn[e];
421
+ }, sn = function(e, t, n) {
422
+ return t.namespaceURI === K ? e === "math" : t.namespaceURI === Ut ? e === "math" && Xt[n] : !!an[e];
423
+ }, cn = function(e, t, n) {
424
+ return t.namespaceURI === Ut && !Xt[n] || t.namespaceURI === Ht && !Jt[n] ? !1 : !an[e] && (Zt[e] || !rn[e]);
425
+ }, ln = function(e) {
426
+ let t = x(e);
427
427
  (!t || !t.tagName) && (t = {
428
- namespaceURI: J,
428
+ namespaceURI: q,
429
429
  tagName: "template"
430
430
  });
431
431
  let n = ae(e.tagName), r = ae(t.tagName);
432
- return Ut[e.namespaceURI] ? e.namespaceURI === Vt ? rn(n, t, r) : e.namespaceURI === Bt ? an(n, t, r) : e.namespaceURI === q ? on(n, t, r) : !!(Xt === "application/xhtml+xml" && Ut[e.namespaceURI]) : !1;
433
- }, Z = function(e) {
432
+ return Gt[e.namespaceURI] ? e.namespaceURI === Ut ? on(n, t, r) : e.namespaceURI === Ht ? sn(n, t, r) : e.namespaceURI === K ? cn(n, t, r) : !!(Qt === "application/xhtml+xml" && Gt[e.namespaceURI]) : !1;
433
+ }, X = function(e) {
434
434
  re(t.removed, { element: e });
435
435
  try {
436
- y(e).removeChild(e);
436
+ x(e).removeChild(e);
437
437
  } catch {
438
- if (de(e), !y(e)) throw C("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
438
+ if (ue(e), !x(e)) throw C("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
439
439
  }
440
- }, cn = function(e, t, n) {
440
+ }, un = function(e, t, n) {
441
441
  try {
442
- e.removeAttributeNode(t);
442
+ de(e, t);
443
443
  } catch {
444
444
  try {
445
445
  e.removeAttribute(n);
446
446
  } catch {}
447
447
  }
448
- }, ln = function(e) {
449
- dn(e);
450
- let t = v(e);
448
+ }, dn = function(e) {
449
+ pn(e);
450
+ let t = y(e);
451
451
  if (t) {
452
452
  let e = [];
453
453
  g(t, (t) => {
454
454
  re(e, t);
455
455
  }), g(e, (e) => {
456
456
  try {
457
- de(e);
457
+ ue(e);
458
458
  } catch {}
459
459
  });
460
460
  }
461
- let n = w(e);
461
+ let n = pe(e);
462
462
  if (n) for (let t = n.length - 1; t >= 0; --t) {
463
463
  let r = n[t], i = r && r.name;
464
- typeof i == "string" && cn(e, r, i);
464
+ typeof i == "string" && un(e, r, i);
465
465
  }
466
- }, Q = function(e, n, r) {
466
+ }, Z = function(e, n, r) {
467
467
  if (!r) try {
468
468
  r = n.getAttributeNode(e);
469
469
  } catch {
@@ -474,120 +474,120 @@ function Ke() {
474
474
  from: n
475
475
  });
476
476
  try {
477
- r ? n.removeAttributeNode(r) : n.removeAttribute(e);
477
+ r ? de(n, r) : n.removeAttribute(e);
478
478
  } catch {
479
479
  try {
480
480
  n.removeAttribute(e);
481
481
  } catch {}
482
482
  }
483
483
  if (e === "is") {
484
- if (W || Ot) try {
485
- Z(n);
484
+ if (U || At) try {
485
+ X(n);
486
486
  } catch {}
487
487
  else try {
488
488
  n.setAttribute(e, "");
489
489
  } catch {}
490
490
  }
491
- }, un = function(e) {
492
- let t = w(e);
491
+ }, fn = function(e) {
492
+ let t = pe(e);
493
493
  if (t) for (let n = t.length - 1; n >= 0; --n) {
494
494
  let r = t[n], i = r && r.name;
495
- typeof i != "string" || R[Y(i)] || cn(e, r, i);
495
+ typeof i != "string" || L[J(i)] || un(e, r, i);
496
496
  }
497
- }, dn = function(e) {
497
+ }, pn = function(e) {
498
498
  let t = [e];
499
499
  for (; t.length > 0;) {
500
500
  let e = t.pop();
501
- qe(e) === A.element && un(e);
502
- let n = v(e);
501
+ Ye(e) === k.element && fn(e);
502
+ let n = y(e);
503
503
  if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
504
504
  }
505
- }, fn = function(e, t) {
506
- return H ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
507
- }, pn = function(e) {
508
- if (!H) return;
505
+ }, mn = function(e, t) {
506
+ return V ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
507
+ }, hn = function(e) {
508
+ if (!V) return;
509
509
  let t = [e];
510
510
  for (; t.length > 0;) {
511
- let e = t.pop(), n = qe(e);
512
- if (n === A.processingInstruction || n === A.comment && S(Le, e.data)) {
511
+ let e = t.pop(), n = Ye(e);
512
+ if (n === k.processingInstruction || n === k.comment && S(Re, e.data)) {
513
513
  try {
514
- de(e);
514
+ ue(e);
515
515
  } catch {}
516
516
  continue;
517
517
  }
518
- if (n === A.element) {
519
- let t = e, n = Y(Je(e));
518
+ if (n === k.element) {
519
+ let t = e, n = J(Xe(e));
520
520
  try {
521
- t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && fn("for", n) && t.removeAttribute("for");
521
+ t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && mn("for", n) && t.removeAttribute("for");
522
522
  } catch {}
523
523
  }
524
- let r = v(e);
524
+ let r = y(e);
525
525
  if (r) for (let e = r.length - 1; e >= 0; --e) t.push(r[e]);
526
526
  }
527
- }, mn = function(e) {
527
+ }, gn = function(e) {
528
528
  let t = null, r = null;
529
- if (Dt) e = "<remove></remove>" + e;
529
+ if (kt) e = "<remove></remove>" + e;
530
530
  else {
531
531
  let t = se(e, /^[\r\n\t ]+/);
532
532
  r = t && t[0];
533
533
  }
534
- Xt === "application/xhtml+xml" && J === q && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
535
- let i = N ? F(e) : e;
536
- if (J === q) try {
537
- t = new u().parseFromString(i, Xt);
534
+ Qt === "application/xhtml+xml" && q === K && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
535
+ let i = M ? P(e) : e;
536
+ if (q === K) try {
537
+ t = new u().parseFromString(i, Qt);
538
538
  } catch {}
539
539
  if (!t || !t.documentElement) {
540
- t = nt.createDocument(J, "template", null);
540
+ t = it.createDocument(q, "template", null);
541
541
  try {
542
- t.documentElement.innerHTML = Ht ? P : i;
542
+ t.documentElement.innerHTML = Wt ? N : i;
543
543
  } catch {}
544
544
  }
545
545
  let a = t.body || t.documentElement;
546
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), J === q ? at.call(t, U ? "html" : "body")[0] : U ? t.documentElement : a;
547
- }, hn = function(e) {
548
- let t = j ? j(e) : e.ownerDocument;
549
- return rt.call(t || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
550
- }, gn = function(e) {
551
- return e = ce(e, st, " "), e = ce(e, ct, " "), e = ce(e, lt, " "), e;
546
+ return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), q === K ? st.call(t, H ? "html" : "body")[0] : H ? t.documentElement : a;
552
547
  }, _n = function(e) {
548
+ let t = Je ? Je(e) : e.ownerDocument;
549
+ return at.call(t || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
550
+ }, vn = function(e) {
551
+ return e = v(e, lt, " "), e = v(e, ut, " "), e = v(e, dt, " "), e;
552
+ }, yn = function(e) {
553
553
  e.normalize();
554
- let t = j ? j(e) : e.ownerDocument, n = rt.call(t || e, e, l.SHOW_TEXT | l.SHOW_COMMENT | l.SHOW_CDATA_SECTION | l.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
555
- for (; r;) r.data = gn(r.data), r = n.nextNode();
554
+ let t = Je ? Je(e) : e.ownerDocument, n = at.call(t || e, e, l.SHOW_TEXT | l.SHOW_COMMENT | l.SHOW_CDATA_SECTION | l.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
555
+ for (; r;) r.data = vn(r.data), r = n.nextNode();
556
556
  let i = e.querySelectorAll?.call(e, "template");
557
557
  i && g(i, (e) => {
558
- yn(e.content) && _n(e.content);
558
+ Q(e.content) && yn(e.content);
559
559
  });
560
- }, vn = function(e) {
561
- let t = D ? D(e) : null;
562
- return typeof t != "string" || Y(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== w(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 !== v(e);
563
- }, yn = function(e) {
564
- if (!T || typeof e != "object" || !e) return !1;
560
+ }, bn = function(e) {
561
+ let t = A ? A(e) : null;
562
+ return typeof t != "string" || J(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== pe(e) || typeof e.removeAttribute != "function" || typeof e.removeAttributeNode != "function" || typeof e.getAttributeNode != "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);
563
+ }, Q = function(e) {
564
+ if (!E || typeof e != "object" || !e) return !1;
565
565
  try {
566
- return T(e) === A.documentFragment;
566
+ return E(e) === k.documentFragment;
567
567
  } catch {
568
568
  return !1;
569
569
  }
570
- }, bn = function(e) {
571
- if (!T || typeof e != "object" || !e) return !1;
570
+ }, xn = function(e) {
571
+ if (!E || typeof e != "object" || !e) return !1;
572
572
  try {
573
- return typeof T(e) == "number";
573
+ return typeof E(e) == "number";
574
574
  } catch {
575
575
  return !1;
576
576
  }
577
577
  };
578
578
  function $(e, n, r) {
579
579
  e.length !== 0 && g(e, (e) => {
580
- e.call(t, n, r, X);
580
+ e.call(t, n, r, Y);
581
581
  });
582
582
  }
583
- let xn = function(e, t) {
584
- return !!(H && e.hasChildNodes() && !bn(e.firstElementChild) && S(Ie, e.textContent) && S(Ie, e.innerHTML) || H && e.namespaceURI === q && Be[t] && (bn(e.firstElementChild) || typeof e.textContent == "string" && S(Ve[t], e.textContent)) || e.nodeType === A.processingInstruction || H && e.nodeType === A.comment && S(Le, e.data));
585
- }, Sn = function(e, t) {
583
+ let Sn = function(e, t) {
584
+ return !!(V && e.hasChildNodes() && !xn(e.firstElementChild) && S(Le, e.textContent) && S(Le, e.innerHTML) || V && e.namespaceURI === K && Ve[t] && (xn(e.firstElementChild) || typeof e.textContent == "string" && S(He[t], e.textContent)) || e.nodeType === k.processingInstruction || V && e.nodeType === k.comment && S(Re, e.data));
585
+ }, Cn = function(e, t) {
586
586
  return e instanceof RegExp ? S(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
587
- }, Cn = function(e, t, n) {
588
- if (!vt[t] && kn(t) && Sn(z.tagNameCheck, t)) return !1;
589
- if (Nt && !K[t]) {
590
- let t = y(e), r = v(e);
587
+ }, wn = function(e, t, n) {
588
+ if (!bt[t] && An(t) && Cn(R.tagNameCheck, t)) return !1;
589
+ if (Ft && !G[t]) {
590
+ let t = x(e), r = y(e);
591
591
  if (r && t) {
592
592
  let i = r.length;
593
593
  for (let a = i - 1; a >= 0; --a) {
@@ -596,35 +596,35 @@ function Ke() {
596
596
  }
597
597
  }
598
598
  }
599
- return Z(e), !0;
600
- }, wn = function(e, t, n, r) {
601
- return e.length === 0 ? t : t === n || t === r ? O(t) : t;
602
- }, Tn = function(e, t) {
603
- return e === t || y(e) !== null ? !1 : (Pt && dn(e), !0);
604
- }, En = function(e, n) {
605
- if ($(I.beforeSanitizeElements, e, null), Tn(e, n)) return !0;
606
- if (vn(e)) return Z(e), !0;
607
- let r = Y(Je(e));
608
- if (L = wn(I.uponSanitizeElement, L, gt, Tt), $(I.uponSanitizeElement, e, {
599
+ return X(e), !0;
600
+ }, Tn = function(e, t, n, r) {
601
+ return e.length === 0 ? t : t === n || t === r ? D(t) : t;
602
+ }, En = function(e, t) {
603
+ return e === t || x(e) !== null ? !1 : (It && pn(e), !0);
604
+ }, Dn = function(e, n) {
605
+ if ($(F.beforeSanitizeElements, e, null), En(e, n)) return !0;
606
+ if (bn(e)) return X(e), !0;
607
+ let r = J(Xe(e));
608
+ if (I = Tn(F.uponSanitizeElement, I, vt, Dt), $(F.uponSanitizeElement, e, {
609
609
  tagName: r,
610
- allowedTags: L
611
- }), Tn(e, n)) return !0;
612
- if (xn(e, r)) return Z(e), !0;
613
- if (vt[r] || !(B.tagCheck instanceof Function && B.tagCheck(r)) && !L[r]) {
614
- let t = Cn(e, r, n);
615
- return t === !1 && $(I.afterSanitizeElements, e, null), t;
616
- }
617
- if (qe(e) === A.element && !sn(e) || (r === "noscript" || r === "noembed" || r === "noframes") && S(Re, e.innerHTML)) return Z(e), !0;
618
- if (V && e.nodeType === A.text) {
619
- let n = gn(e.textContent);
610
+ allowedTags: I
611
+ }), En(e, n)) return !0;
612
+ if (Sn(e, r)) return X(e), !0;
613
+ if (bt[r] || !(z.tagCheck instanceof Function && z.tagCheck(r)) && !I[r]) {
614
+ let t = wn(e, r, n);
615
+ return t === !1 && $(F.afterSanitizeElements, e, null), t;
616
+ }
617
+ if (Ye(e) === k.element && !ln(e) || (r === "noscript" || r === "noembed" || r === "noframes") && S(ze, e.innerHTML)) return X(e), !0;
618
+ if (B && e.nodeType === k.text) {
619
+ let n = vn(e.textContent);
620
620
  e.textContent !== n && (re(t.removed, { element: e.cloneNode() }), e.textContent = n);
621
621
  }
622
- return $(I.afterSanitizeElements, e, null), !1;
623
- }, Dn = function(e, t, r) {
624
- if (yt[t] || fn(t, e) || At && (t === "id" || t === "name") && (r in n || r in Qt)) return !1;
625
- let i = R[t] || B.attributeCheck instanceof Function && B.attributeCheck(t, e);
626
- return xt && S(ut, t) || bt && S(dt, t) ? !0 : i ? Rt[t] || S(ht, ce(r, pt, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && le(r, "data:") === 0 && It[e] || St && !S(ft, ce(r, pt, "")) ? !0 : !r : kn(e) && Sn(z.tagNameCheck, e) && Sn(z.attributeNameCheck, t, e) || t === "is" && z.allowCustomizedBuiltInElements && Sn(z.tagNameCheck, r);
627
- }, On = E({}, [
622
+ return $(F.afterSanitizeElements, e, null), !1;
623
+ }, On = function(e, t, r) {
624
+ if (xt[t] || mn(t, e) || Mt && (t === "id" || t === "name") && (r in n || r in en)) return !1;
625
+ let i = L[t] || z.attributeCheck instanceof Function && z.attributeCheck(t, e);
626
+ return Ct && S(ft, t) || St && S(pt, t) ? !0 : i ? Bt[t] || S(_t, v(r, ht, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && ce(r, "data:") === 0 && Rt[e] || wt && !S(mt, v(r, ht, "")) ? !0 : !r : An(e) && Cn(R.tagNameCheck, e) && Cn(R.attributeNameCheck, t, e) || t === "is" && R.allowCustomizedBuiltInElements && Cn(R.tagNameCheck, r);
627
+ }, kn = T({}, [
628
628
  "annotation-xml",
629
629
  "color-profile",
630
630
  "font-face",
@@ -633,67 +633,67 @@ function Ke() {
633
633
  "font-face-src",
634
634
  "font-face-uri",
635
635
  "missing-glyph"
636
- ]), kn = function(e) {
637
- return !On[ae(e)] && S(mt, e);
638
- }, An = function(e, t, n, r) {
639
- if (N && typeof m == "object" && typeof m.getAttributeType == "function" && !n) switch (m.getAttributeType(e, t)) {
640
- case "TrustedHTML": return F(r);
641
- case "TrustedScriptURL": return $e(r);
636
+ ]), An = function(e) {
637
+ return !kn[ae(e)] && S(gt, e);
638
+ }, jn = function(e, t, n, r) {
639
+ if (M && typeof m == "object" && typeof m.getAttributeType == "function" && !n) switch (m.getAttributeType(e, t)) {
640
+ case "TrustedHTML": return P(r);
641
+ case "TrustedScriptURL": return tt(r);
642
642
  }
643
643
  return r;
644
- }, jn = function(e, n, r, i) {
644
+ }, Mn = function(e, t, n, r) {
645
645
  try {
646
- r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), vn(e) ? Z(e) : ne(t.removed);
646
+ return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !bn(e) || (X(e), !1);
647
647
  } catch {
648
- Q(n, e);
649
- }
650
- }, Mn = function(e) {
651
- $(I.beforeSanitizeAttributes, e, null);
652
- let t = e.attributes;
653
- if (!t || vn(e)) return;
654
- R = wn(I.uponSanitizeAttribute, R, _t, Et);
655
- let n = {
648
+ return Z(t, e), !1;
649
+ }
650
+ }, Nn = function(e) {
651
+ $(F.beforeSanitizeAttributes, e, null);
652
+ let n = e.attributes;
653
+ if (!n || bn(e)) return;
654
+ L = Tn(F.uponSanitizeAttribute, L, yt, Ot);
655
+ let r = {
656
656
  attrName: "",
657
657
  attrValue: "",
658
658
  keepAttr: !0,
659
- allowedAttributes: R,
659
+ allowedAttributes: L,
660
660
  forceKeepAttr: void 0
661
- }, r = t.length, i = Y(e.nodeName);
662
- for (; r--;) {
663
- let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = Y(o), u = c, d = o === "value" ? u : ue(u);
664
- if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, $(I.uponSanitizeAttribute, e, n), d = n.attrValue, jt && (l === "id" || l === "name") && le(d, Mt) !== 0 && (Q(o, e, a), d = Mt + d), H && S(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
665
- Q(o, e, a);
661
+ }, i = n.length, a = J(e.nodeName);
662
+ for (; i--;) {
663
+ let o = n[i], s = o.name, c = o.namespaceURI, l = o.value, u = J(s), d = l, f = s === "value" ? d : le(d), p = !1;
664
+ if (r.attrName = u, r.attrValue = f, r.keepAttr = !0, r.forceKeepAttr = void 0, $(F.uponSanitizeAttribute, e, r), f = r.attrValue, Nt && (u === "id" || u === "name") && ce(f, Pt) !== 0 && (Z(s, e, o), f = Pt + f, p = !0), V && S(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, f)) {
665
+ Z(s, e, o);
666
666
  continue;
667
667
  }
668
- if (l === "attributename" && se(d, "href")) {
669
- Q(o, e, a);
668
+ if (u === "attributename" && se(f, "href")) {
669
+ Z(s, e, o);
670
670
  continue;
671
671
  }
672
- if (!n.forceKeepAttr) {
673
- if (!n.keepAttr) {
674
- Q(o, e, a);
672
+ if (!r.forceKeepAttr) {
673
+ if (!r.keepAttr) {
674
+ Z(s, e, o);
675
675
  continue;
676
676
  }
677
- if (!Ct && S(ze, d)) {
678
- Q(o, e, a);
677
+ if (!Tt && S(Be, f)) {
678
+ Z(s, e, o);
679
679
  continue;
680
680
  }
681
- if (V && (d = gn(d)), !Dn(i, l, d)) {
682
- Q(o, e, a);
681
+ if (B && (f = vn(f)), !On(a, u, f)) {
682
+ Z(s, e, o);
683
683
  continue;
684
684
  }
685
- d = An(i, l, s, d), d !== u && jn(e, o, s, d);
685
+ f = jn(a, u, c, f), f !== d && Mn(e, s, c, f) && p && ne(t.removed);
686
686
  }
687
687
  }
688
- $(I.afterSanitizeAttributes, e, null);
689
- }, Nn = function(e) {
690
- let t = null, n = hn(e);
691
- for ($(I.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if ($(I.uponSanitizeShadowNode, t, null), En(t, e), Mn(t), yn(t.content) && Nn(t.content), qe(t) === A.element) {
692
- let e = x(t);
693
- yn(e) && (Pn(e), Nn(e));
694
- }
695
- $(I.afterSanitizeShadowDOM, e, null);
688
+ $(F.afterSanitizeAttributes, e, null);
696
689
  }, Pn = function(e) {
690
+ let t = null, n = _n(e);
691
+ for ($(F.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if ($(F.uponSanitizeShadowNode, t, null), Dn(t, e), Nn(t), Q(t.content) && Pn(t.content), Ye(t) === k.element) {
692
+ let e = w(t);
693
+ Q(e) && (Fn(e), Pn(e));
694
+ }
695
+ $(F.afterSanitizeShadowDOM, e, null);
696
+ }, Fn = function(e) {
697
697
  let t = [{
698
698
  node: e,
699
699
  shadow: null
@@ -701,27 +701,27 @@ function Ke() {
701
701
  for (; t.length > 0;) {
702
702
  let e = t.pop();
703
703
  if (e.shadow) {
704
- Nn(e.shadow);
704
+ Pn(e.shadow);
705
705
  continue;
706
706
  }
707
- let n = e.node, r = qe(n) === A.element, i = v(n);
707
+ let n = e.node, r = Ye(n) === k.element, i = y(n);
708
708
  if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
709
709
  node: i[e],
710
710
  shadow: null
711
711
  });
712
712
  if (r) {
713
- let e = D ? D(n) : null;
714
- if (typeof e == "string" && Y(e) === "template") {
713
+ let e = A ? A(n) : null;
714
+ if (typeof e == "string" && J(e) === "template") {
715
715
  let e = n.content;
716
- yn(e) && t.push({
716
+ Q(e) && t.push({
717
717
  node: e,
718
718
  shadow: null
719
719
  });
720
720
  }
721
721
  }
722
722
  if (r) {
723
- let e = x(n);
724
- yn(e) && t.push({
723
+ let e = w(n);
724
+ Q(e) && t.push({
725
725
  node: null,
726
726
  shadow: e
727
727
  }, {
@@ -733,73 +733,73 @@ function Ke() {
733
733
  };
734
734
  return t.sanitize = function(e) {
735
735
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
736
- if (Ht = !e, Ht && (e = "<!-->"), typeof e != "string" && !bn(e) && (e = pe(e), typeof e != "string")) throw C("dirty is not a string, aborting");
736
+ if (Wt = !e, Wt && (e = "<!-->"), typeof e != "string" && !xn(e) && (e = me(e), typeof e != "string")) throw C("dirty is not a string, aborting");
737
737
  if (!t.isSupported) return e;
738
- wt ? (L = Tt, R = Et) : en(n), (I.uponSanitizeElement.length > 0 || I.uponSanitizeAttribute.length > 0) && (L = O(L)), I.uponSanitizeAttribute.length > 0 && (R = O(R)), t.removed = [];
739
- let c = Pt && typeof e != "string" && bn(e);
738
+ Et ? (I = Dt, L = Ot) : nn(n), (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && (I = D(I)), F.uponSanitizeAttribute.length > 0 && (L = D(L)), t.removed = [];
739
+ let c = It && typeof e != "string" && xn(e);
740
740
  if (c) {
741
- pn(e);
742
- let t = Je(e);
741
+ hn(e);
742
+ let t = Xe(e);
743
743
  if (typeof t == "string") {
744
- let n = Y(t);
745
- if (!L[n] || vt[n]) throw ln(e), C("root node is forbidden and cannot be sanitized in-place");
744
+ let n = J(t);
745
+ if (!I[n] || bt[n]) throw dn(e), C("root node is forbidden and cannot be sanitized in-place");
746
746
  }
747
- if (vn(e)) throw ln(e), C("root node is clobbered and cannot be sanitized in-place");
747
+ if (bn(e)) throw dn(e), C("root node is clobbered and cannot be sanitized in-place");
748
748
  try {
749
- Pn(e);
749
+ Fn(e);
750
750
  } catch (t) {
751
- throw ln(e), t;
751
+ throw dn(e), t;
752
752
  }
753
- } else if (bn(e)) i = mn("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === A.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Pn(a);
753
+ } else if (xn(e)) i = gn("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === k.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Fn(i);
754
754
  else {
755
- if (!W && !V && !U && e.indexOf("<") === -1) return N && kt ? F(e) : e;
756
- if (i = mn(e), !i) return W ? null : kt ? P : "";
755
+ if (!U && !B && !H && e.indexOf("<") === -1) return M && jt ? P(e) : e;
756
+ if (i = gn(e), !i) return U ? null : jt ? N : "";
757
757
  }
758
- i && Dt && Z(i.firstChild);
758
+ i && kt && X(i.firstChild);
759
759
  let l = c ? e : i;
760
760
  try {
761
- let e = hn(l);
762
- for (; o = e.nextNode();) En(o, l), Mn(o), yn(o.content) && Nn(o.content);
761
+ let e = _n(l);
762
+ for (; o = e.nextNode();) Dn(o, l), Nn(o), Q(o.content) && Pn(o.content);
763
763
  } catch (n) {
764
- throw c && (ln(e), g(t.removed, (e) => {
765
- e.element && dn(e.element);
764
+ throw c && (dn(e), g(t.removed, (e) => {
765
+ e.element && pn(e.element);
766
766
  })), n;
767
767
  }
768
768
  if (c) return g(t.removed, (e) => {
769
- e.element && dn(e.element);
770
- }), V && _n(e), e;
771
- if (W) {
772
- if (V && _n(i), Ot) for (s = it.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
769
+ e.element && pn(e.element);
770
+ }), B && yn(e), e;
771
+ if (U) {
772
+ if (B && yn(i), At) for (s = ot.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
773
773
  else s = i;
774
- return (R.shadowroot || R.shadowrootmode) && (s = ot.call(r, s, !0)), s;
774
+ return (L.shadowroot || L.shadowrootmode) && (s = ct.call(r, s, !0)), s;
775
775
  }
776
- let u = U ? i.outerHTML : i.innerHTML;
777
- return U && L["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && S(Pe, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), V && (u = gn(u)), N && kt ? F(u) : u;
776
+ let u = H ? i.outerHTML : i.innerHTML;
777
+ return H && I["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && S(Fe, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), B && (u = vn(u)), M && jt ? P(u) : u;
778
778
  }, t.setConfig = function() {
779
779
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
780
- en(e), wt = !0, Tt = L, Et = R;
780
+ nn(e), Et = !0, Dt = I, Ot = L;
781
781
  }, t.clearConfig = function() {
782
- X = null, wt = !1, Tt = null, Et = null, N = Ye, P = "";
782
+ Y = null, Et = !1, Dt = null, Ot = null, M = Ze, N = "";
783
783
  }, t.isValidAttribute = function(e, t, n) {
784
- X || en({});
785
- let r = Y(e), i = Y(t);
786
- return Dn(r, i, n);
784
+ Y || nn({});
785
+ let r = J(e), i = J(t);
786
+ return On(r, i, n);
787
787
  }, t.addHook = function(e, t) {
788
- typeof t == "function" && b(I, e) && re(I[e], t);
788
+ typeof t == "function" && b(F, e) && re(F[e], t);
789
789
  }, t.removeHook = function(e, t) {
790
- if (b(I, e)) {
790
+ if (b(F, e)) {
791
791
  if (t !== void 0) {
792
- let n = te(I[e], t);
793
- return n === -1 ? void 0 : ie(I[e], n, 1)[0];
792
+ let n = te(F[e], t);
793
+ return n === -1 ? void 0 : ie(F[e], n, 1)[0];
794
794
  }
795
- return ne(I[e]);
795
+ return ne(F[e]);
796
796
  }
797
797
  }, t.removeHooks = function(e) {
798
- b(I, e) && (I[e] = []);
798
+ b(F, e) && (F[e] = []);
799
799
  }, t.removeAllHooks = function() {
800
- I = We();
800
+ F = Ge();
801
801
  }, t;
802
802
  }
803
- var qe = Ke();
803
+ var Je = qe();
804
804
  //#endregion
805
- export { qe as t };
805
+ export { Je as t };