@clevertask/scribe 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -1
- package/dist/{BarMenu-5S2vKAtc.js → BarMenu-5M9g9Y1j.js} +7 -5
- package/dist/components/Menu/BarMenu.js +1 -1
- package/dist/components/Menu/BubbleMenu.js +2 -2
- package/dist/components/Menu/CalloutBubbleMenu.d.ts +7 -0
- package/dist/components/Menu/CalloutBubbleMenu.d.ts.map +1 -0
- package/dist/components/Menu/CalloutBubbleMenu.js +156 -0
- package/dist/components/Menu/LinkBubbleMenu.js +2 -2
- package/dist/components/Menu/Mobile/ListOptionBar.js +1 -1
- package/dist/components/Menu/TableBubbleMenu.d.ts +8 -0
- package/dist/components/Menu/TableBubbleMenu.d.ts.map +1 -0
- package/dist/components/Menu/TableBubbleMenu.js +306 -0
- package/dist/components/Menu/calloutBubbleMenuPlugin.d.ts +10 -0
- package/dist/components/Menu/calloutBubbleMenuPlugin.d.ts.map +1 -0
- package/dist/components/Menu/calloutBubbleMenuPlugin.js +22 -0
- package/dist/components/Menu/contextualMenuOwner.d.ts +4 -0
- package/dist/components/Menu/contextualMenuOwner.d.ts.map +1 -0
- package/dist/components/Menu/contextualMenuOwner.js +9 -0
- package/dist/components/Menu/tableBubbleMenuPlugin.d.ts +11 -0
- package/dist/components/Menu/tableBubbleMenuPlugin.d.ts.map +1 -0
- package/dist/components/Menu/tableBubbleMenuPlugin.js +22 -0
- package/dist/components/Scribe/extension/callout.d.ts +32 -0
- package/dist/components/Scribe/extension/callout.d.ts.map +1 -0
- package/dist/components/Scribe/extension/callout.js +118 -0
- package/dist/components/Scribe/extension/emoji/suggest.js +1 -1
- package/dist/components/Scribe/extension/extension-link.js +1 -1
- package/dist/components/Scribe/extension/extension-markdown-paste.js +2 -2
- package/dist/components/Scribe/extension/extension-selectedText.js +1 -1
- package/dist/components/Scribe/extension/index.d.ts +1 -1
- package/dist/components/Scribe/extension/index.d.ts.map +1 -1
- package/dist/components/Scribe/extension/index.js +1 -1
- package/dist/components/Scribe/extension/resizable-table.d.ts +8 -0
- package/dist/components/Scribe/extension/resizable-table.d.ts.map +1 -0
- package/dist/components/Scribe/extension/resizable-table.js +2 -0
- package/dist/components/Scribe/extension/slashCommand/SlashCommandList.js +1390 -1390
- package/dist/components/Scribe/extension/slashCommand/index.js +1 -1
- package/dist/components/Scribe/extension/slashCommand/items.d.ts.map +1 -1
- package/dist/components/Scribe/extension/slashCommand/items.js +73 -26
- package/dist/components/Scribe/extension/slashCommand/renderItems.js +1 -1
- package/dist/components/Scribe/extension/tableOfContents.js +1 -1
- package/dist/components/Scribe/index.d.ts +2 -1
- package/dist/components/Scribe/index.d.ts.map +1 -1
- package/dist/components/Scribe/index.js +140 -133
- package/dist/{dist-DErUltkU.js → dist-DFua_Xbu.js} +37 -31
- package/dist/{dist-wYqYXEOz.js → dist-Dw4STOPE.js} +1 -1
- package/dist/{extension-6I5t1ZxQ.js → extension-_8uh0Ik9.js} +1323 -1780
- package/dist/{extension-link-DJy7XDoj.js → extension-link-CjfUZ90W.js} +1 -1
- package/dist/{html-to-markdown-Cta7-ssO.js → html-to-markdown-C920nQtn.js} +155 -56
- package/dist/icons/CalloutIcon.d.ts +9 -0
- package/dist/icons/CalloutIcon.d.ts.map +1 -0
- package/dist/icons/CalloutIcon.js +72 -0
- package/dist/main.css +170 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +9 -8
- package/dist/{markdown-to-html-DwSNqq2i.js → markdown-to-html-CW0Nb9Ye.js} +103 -60
- package/dist/{menus-m_EkiaUN.js → menus-_EXlLMjz.js} +2 -2
- package/dist/{purify.es-CFiLaBu1.js → purify.es-BES4pJF7.js} +267 -260
- package/dist/resizable-table-Ddw3l6DJ.js +489 -0
- package/dist/{slashCommand-DuSH9sXJ.js → slashCommand-CxX07Nbk.js} +24 -22
- package/dist/utils/html-to-markdown.d.ts.map +1 -1
- package/dist/utils/html-to-markdown.js +1 -1
- package/dist/utils/index.js +4 -4
- package/dist/utils/markdown-to-html.d.ts.map +1 -1
- package/dist/utils/markdown-to-html.js +1 -1
- package/package.json +47 -24
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region node_modules/.pnpm/dompurify@3.4.
|
|
1
|
+
//#region node_modules/.pnpm/dompurify@3.4.13/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];
|
|
@@ -38,33 +38,33 @@ function a(t, n) {
|
|
|
38
38
|
return r === "Object" && t.constructor && (r = t.constructor.name), r === "Map" || r === "Set" ? Array.from(t) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? e(t, n) : void 0;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
var o = Object.entries, s = Object.setPrototypeOf, c = Object.isFrozen, l = Object.getPrototypeOf, u = Object.getOwnPropertyDescriptor, d = Object.freeze, f = Object.seal,
|
|
41
|
+
var o = Object.entries, s = Object.setPrototypeOf, c = Object.isFrozen, l = Object.getPrototypeOf, u = Object.getOwnPropertyDescriptor, d = Object.freeze, f = Object.seal, p = Object.create, m = typeof Reflect < "u" && Reflect, h = m.apply, ee = m.construct;
|
|
42
42
|
d ||= function(e) {
|
|
43
43
|
return e;
|
|
44
44
|
}, f ||= function(e) {
|
|
45
45
|
return e;
|
|
46
|
-
},
|
|
46
|
+
}, h ||= function(e, t) {
|
|
47
47
|
var n = [...arguments].slice(2);
|
|
48
48
|
return e.apply(t, n);
|
|
49
|
-
},
|
|
49
|
+
}, ee ||= function(e) {
|
|
50
50
|
return new e(...[...arguments].slice(1));
|
|
51
51
|
};
|
|
52
|
-
var
|
|
53
|
-
function
|
|
52
|
+
var g = T(Array.prototype.forEach), te = T(Array.prototype.lastIndexOf), ne = T(Array.prototype.pop), _ = T(Array.prototype.push), re = T(Array.prototype.splice), v = Array.isArray, ie = T(String.prototype.toLowerCase), ae = T(String.prototype.toString), oe = T(String.prototype.match), se = 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) {
|
|
54
54
|
return function(t) {
|
|
55
55
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
56
56
|
var n = [...arguments].slice(1);
|
|
57
|
-
return
|
|
57
|
+
return h(e, t, n);
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function E(e) {
|
|
61
61
|
return function() {
|
|
62
|
-
return
|
|
62
|
+
return ee(e, [...arguments]);
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
67
|
-
if (s && s(e, null), !
|
|
65
|
+
function D(e, t) {
|
|
66
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ie;
|
|
67
|
+
if (s && s(e, null), !v(t)) return e;
|
|
68
68
|
let r = t.length;
|
|
69
69
|
for (; r--;) {
|
|
70
70
|
let i = t[r];
|
|
@@ -76,46 +76,46 @@ function E(e, t) {
|
|
|
76
76
|
}
|
|
77
77
|
return e;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
for (let t = 0; t < e.length; t++)
|
|
79
|
+
function O(e) {
|
|
80
|
+
for (let t = 0; t < e.length; t++) x(e, t) || (e[t] = null);
|
|
81
81
|
return e;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
let t =
|
|
83
|
+
function k(e) {
|
|
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
|
-
|
|
88
|
+
x(e, a) && (t[a] = v(o) ? O(o) : o && typeof o == "object" && o.constructor === Object ? k(o) : o);
|
|
89
89
|
}
|
|
90
90
|
return t;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function fe(e) {
|
|
93
93
|
switch (typeof e) {
|
|
94
94
|
case "string": return e;
|
|
95
|
-
case "number": return
|
|
96
|
-
case "boolean": return
|
|
97
|
-
case "bigint": return
|
|
98
|
-
case "symbol": return
|
|
99
|
-
case "undefined": return
|
|
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);
|
|
100
100
|
case "function":
|
|
101
101
|
case "object": {
|
|
102
|
-
if (e === null) return
|
|
103
|
-
let t = e, n =
|
|
102
|
+
if (e === null) return S(e);
|
|
103
|
+
let t = e, n = A(t, "toString");
|
|
104
104
|
if (typeof n == "function") {
|
|
105
105
|
let e = n(t);
|
|
106
|
-
return typeof e == "string" ? e :
|
|
106
|
+
return typeof e == "string" ? e : S(e);
|
|
107
107
|
}
|
|
108
|
-
return
|
|
108
|
+
return S(e);
|
|
109
109
|
}
|
|
110
|
-
default: return
|
|
110
|
+
default: return S(e);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function A(e, t) {
|
|
114
114
|
for (; e !== null;) {
|
|
115
115
|
let n = u(e, t);
|
|
116
116
|
if (n) {
|
|
117
|
-
if (n.get) return
|
|
118
|
-
if (typeof n.value == "function") return
|
|
117
|
+
if (n.get) return T(n.get);
|
|
118
|
+
if (typeof n.value == "function") return T(n.value);
|
|
119
119
|
}
|
|
120
120
|
e = l(e);
|
|
121
121
|
}
|
|
@@ -124,14 +124,14 @@ function k(e, t) {
|
|
|
124
124
|
}
|
|
125
125
|
return n;
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function pe(e) {
|
|
128
128
|
try {
|
|
129
|
-
return
|
|
129
|
+
return C(e, ""), !0;
|
|
130
130
|
} catch {
|
|
131
131
|
return !1;
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
var
|
|
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([
|
|
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
|
-
]),
|
|
160
|
+
]), _e = 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
|
-
]),
|
|
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([
|
|
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
|
-
]),
|
|
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.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".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([
|
|
200
200
|
"xlink:href",
|
|
201
201
|
"xml:id",
|
|
202
202
|
"xlink:title",
|
|
203
203
|
"xml:space",
|
|
204
204
|
"xmlns:xlink"
|
|
205
|
-
]),
|
|
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), Fe = f(/<[/\w!]/g), Ie = f(/<[/\w]/g), Le = f(/<\/no(script|embed|frames)/i), Re = f(/\/>/i), j = {
|
|
206
206
|
element: 1,
|
|
207
207
|
attribute: 2,
|
|
208
208
|
text: 3,
|
|
@@ -215,9 +215,9 @@ 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
|
-
},
|
|
218
|
+
}, ze = function() {
|
|
219
219
|
return typeof window > "u" ? null : window;
|
|
220
|
-
},
|
|
220
|
+
}, Be = 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 he = 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
|
-
},
|
|
237
|
+
}, Ve = function() {
|
|
238
238
|
return {
|
|
239
239
|
afterSanitizeAttributes: [],
|
|
240
240
|
afterSanitizeElements: [],
|
|
@@ -246,53 +246,53 @@ var he = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
246
246
|
uponSanitizeElement: [],
|
|
247
247
|
uponSanitizeShadowNode: []
|
|
248
248
|
};
|
|
249
|
-
},
|
|
250
|
-
return
|
|
249
|
+
}, M = function(e, t, n, r) {
|
|
250
|
+
return x(e, t) && v(e[t]) ? D(r.base ? k(r.base) : {}, e[t], r.transform) : n;
|
|
251
251
|
};
|
|
252
|
-
function
|
|
253
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
254
|
-
if (t.version = "3.4.
|
|
252
|
+
function He() {
|
|
253
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ze(), t = (e) => He(e);
|
|
254
|
+
if (t.version = "3.4.13", t.removed = [], !e || !e.document || e.document.nodeType !== j.document || !e.Element) return t.isSupported = !1, t;
|
|
255
255
|
let n = e.document, r = n, i = r.currentScript;
|
|
256
256
|
e.DocumentFragment;
|
|
257
257
|
let a = e.HTMLTemplateElement, s = e.Node, c = e.Element, l = e.NodeFilter;
|
|
258
258
|
e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
|
|
259
|
-
let u = e.DOMParser,
|
|
259
|
+
let u = e.DOMParser, m = e.trustedTypes, h = c.prototype, ee = A(h, "cloneNode"), ue = A(h, "remove"), de = A(h, "nextSibling"), y = A(h, "childNodes"), b = A(h, "parentNode"), S = A(h, "shadowRoot"), T = A(h, "attributes"), E = s && s.prototype ? A(s.prototype, "nodeType") : null, O = s && s.prototype ? A(s.prototype, "nodeName") : null, Ue = s && s.prototype ? A(s.prototype, "ownerDocument") : null;
|
|
260
260
|
if (typeof a == "function") {
|
|
261
261
|
let e = n.createElement("template");
|
|
262
262
|
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
263
263
|
}
|
|
264
|
-
let
|
|
265
|
-
if (Ke > 0) throw
|
|
266
|
-
},
|
|
264
|
+
let N, P = "", We, Ge = !1, Ke = 0, qe = function() {
|
|
265
|
+
if (Ke > 0) throw w("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.");
|
|
266
|
+
}, F = function(e) {
|
|
267
267
|
qe(), Ke++;
|
|
268
268
|
try {
|
|
269
|
-
return
|
|
269
|
+
return N.createHTML(e);
|
|
270
270
|
} finally {
|
|
271
271
|
Ke--;
|
|
272
272
|
}
|
|
273
273
|
}, Je = function(e) {
|
|
274
274
|
qe(), Ke++;
|
|
275
275
|
try {
|
|
276
|
-
return
|
|
276
|
+
return N.createScriptURL(e);
|
|
277
277
|
} finally {
|
|
278
278
|
Ke--;
|
|
279
279
|
}
|
|
280
280
|
}, Ye = function() {
|
|
281
|
-
return Ge ||= (We =
|
|
282
|
-
}, Xe = n, Ze = Xe.implementation, Qe = Xe.createNodeIterator, $e = Xe.createDocumentFragment, et = Xe.getElementsByTagName, tt = r.importNode,
|
|
283
|
-
t.isSupported = typeof o == "function" && typeof
|
|
284
|
-
let nt =
|
|
281
|
+
return Ge ||= (We = Be(m, i), !0), We;
|
|
282
|
+
}, Xe = n, Ze = Xe.implementation, Qe = Xe.createNodeIterator, $e = Xe.createDocumentFragment, et = Xe.getElementsByTagName, tt = r.importNode, I = Ve();
|
|
283
|
+
t.isSupported = typeof o == "function" && typeof b == "function" && Ze && Ze.createHTMLDocument !== void 0;
|
|
284
|
+
let nt = Te, rt = Ee, it = De, at = Oe, ot = ke, st = je, ct = Me, lt = Pe, ut = Ae, L = null, dt = D({}, [
|
|
285
|
+
...me,
|
|
285
286
|
...he,
|
|
286
287
|
...ge,
|
|
287
|
-
...
|
|
288
|
-
...
|
|
289
|
-
|
|
290
|
-
|
|
288
|
+
...ve,
|
|
289
|
+
...be
|
|
290
|
+
]), R = null, ft = D({}, [
|
|
291
|
+
...xe,
|
|
291
292
|
...Se,
|
|
292
293
|
...Ce,
|
|
293
|
-
...we
|
|
294
|
-
|
|
295
|
-
]), R = Object.seal(ee(null, {
|
|
294
|
+
...we
|
|
295
|
+
]), z = Object.seal(p(null, {
|
|
296
296
|
tagNameCheck: {
|
|
297
297
|
writable: !0,
|
|
298
298
|
configurable: !1,
|
|
@@ -311,7 +311,7 @@ function Ue() {
|
|
|
311
311
|
enumerable: !0,
|
|
312
312
|
value: !1
|
|
313
313
|
}
|
|
314
|
-
})), pt = null, mt = null,
|
|
314
|
+
})), pt = null, mt = null, B = Object.seal(p(null, {
|
|
315
315
|
tagCheck: {
|
|
316
316
|
writable: !0,
|
|
317
317
|
configurable: !1,
|
|
@@ -324,14 +324,14 @@ function Ue() {
|
|
|
324
324
|
enumerable: !0,
|
|
325
325
|
value: null
|
|
326
326
|
}
|
|
327
|
-
})), ht = !0, gt = !0, _t = !1, vt = !0,
|
|
327
|
+
})), ht = !0, gt = !0, _t = !1, vt = !0, V = !1, H = !0, U = !1, yt = !1, bt = null, xt = null, St = !1, W = !1, Ct = !1, wt = !1, Tt = !0, Et = !1, Dt = "user-content-", Ot = !0, kt = !1, G = {}, K = null, At = D({}, /* @__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(".")), jt = null, Mt = D({}, [
|
|
328
328
|
"audio",
|
|
329
329
|
"video",
|
|
330
330
|
"img",
|
|
331
331
|
"source",
|
|
332
332
|
"image",
|
|
333
333
|
"track"
|
|
334
|
-
]), Nt = null, Pt =
|
|
334
|
+
]), Nt = null, Pt = D({}, [
|
|
335
335
|
"alt",
|
|
336
336
|
"class",
|
|
337
337
|
"for",
|
|
@@ -346,119 +346,121 @@ function Ue() {
|
|
|
346
346
|
"value",
|
|
347
347
|
"style",
|
|
348
348
|
"xmlns"
|
|
349
|
-
]), Ft = "http://www.w3.org/1998/Math/MathML", It = "http://www.w3.org/2000/svg",
|
|
349
|
+
]), Ft = "http://www.w3.org/1998/Math/MathML", It = "http://www.w3.org/2000/svg", q = "http://www.w3.org/1999/xhtml", J = q, Lt = !1, Rt = null, zt = D({}, [
|
|
350
350
|
Ft,
|
|
351
351
|
It,
|
|
352
|
-
|
|
353
|
-
],
|
|
352
|
+
q
|
|
353
|
+
], ae), Bt = d([
|
|
354
354
|
"mi",
|
|
355
355
|
"mo",
|
|
356
356
|
"mn",
|
|
357
357
|
"ms",
|
|
358
358
|
"mtext"
|
|
359
|
-
]), Vt =
|
|
359
|
+
]), Vt = D({}, Bt), Ht = d(["annotation-xml"]), Ut = D({}, Ht), Wt = D({}, [
|
|
360
360
|
"title",
|
|
361
361
|
"style",
|
|
362
362
|
"font",
|
|
363
363
|
"a",
|
|
364
364
|
"script"
|
|
365
|
-
]), Gt = null, Kt = ["application/xhtml+xml", "text/html"],
|
|
365
|
+
]), Gt = null, Kt = ["application/xhtml+xml", "text/html"], Y = null, X = null, qt = n.createElement("form"), Jt = function(e) {
|
|
366
366
|
return e instanceof RegExp || e instanceof Function;
|
|
367
367
|
}, Yt = function() {
|
|
368
368
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
369
|
-
if (
|
|
370
|
-
(!e || typeof e != "object") && (e = {}), e =
|
|
371
|
-
transform:
|
|
369
|
+
if (X && X === e) return;
|
|
370
|
+
(!e || typeof e != "object") && (e = {}), e = k(e), Gt = Kt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = Gt === "application/xhtml+xml" ? ae : ie, L = M(e, "ALLOWED_TAGS", dt, { transform: Y }), R = M(e, "ALLOWED_ATTR", ft, { transform: Y }), Rt = M(e, "ALLOWED_NAMESPACES", zt, { transform: ae }), Nt = M(e, "ADD_URI_SAFE_ATTR", Pt, {
|
|
371
|
+
transform: Y,
|
|
372
372
|
base: Pt
|
|
373
|
-
}), jt =
|
|
374
|
-
transform:
|
|
373
|
+
}), jt = M(e, "ADD_DATA_URI_TAGS", Mt, {
|
|
374
|
+
transform: Y,
|
|
375
375
|
base: Mt
|
|
376
|
-
}),
|
|
377
|
-
let t =
|
|
378
|
-
if (
|
|
376
|
+
}), K = M(e, "FORBID_CONTENTS", At, { transform: Y }), pt = M(e, "FORBID_TAGS", k({}), { transform: Y }), mt = M(e, "FORBID_ATTR", k({}), { transform: Y }), G = x(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? k(e.USE_PROFILES) : e.USE_PROFILES : !1, ht = e.ALLOW_ARIA_ATTR !== !1, gt = e.ALLOW_DATA_ATTR !== !1, _t = e.ALLOW_UNKNOWN_PROTOCOLS || !1, vt = 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, Ct = e.RETURN_DOM_FRAGMENT || !1, wt = e.RETURN_TRUSTED_TYPE || !1, St = e.FORCE_BODY || !1, Tt = e.SANITIZE_DOM !== !1, Et = e.SANITIZE_NAMED_PROPS || !1, Ot = e.KEEP_CONTENT !== !1, kt = e.IN_PLACE || !1, ut = pe(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ae, J = typeof e.NAMESPACE == "string" ? e.NAMESPACE : q, Vt = 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({}, Bt), Ut = x(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? k(e.HTML_INTEGRATION_POINTS) : D({}, Ht);
|
|
377
|
+
let t = x(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? k(e.CUSTOM_ELEMENT_HANDLING) : p(null);
|
|
378
|
+
if (z = p(null), x(t, "tagNameCheck") && Jt(t.tagNameCheck) && (z.tagNameCheck = t.tagNameCheck), x(t, "attributeNameCheck") && Jt(t.attributeNameCheck) && (z.attributeNameCheck = t.attributeNameCheck), x(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (z.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), f(z), V && (gt = !1), Ct && (W = !0), G && (L = D({}, be), R = p(null), G.html === !0 && (D(L, me), D(R, xe)), G.svg === !0 && (D(L, he), D(R, Se), D(R, we)), G.svgFilters === !0 && (D(L, ge), D(R, Se), D(R, we)), G.mathMl === !0 && (D(L, ve), D(R, Ce), D(R, we))), B.tagCheck = null, B.attributeCheck = null, x(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? B.tagCheck = e.ADD_TAGS : v(e.ADD_TAGS) && (L === dt && (L = k(L)), D(L, e.ADD_TAGS, Y))), x(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? B.attributeCheck = e.ADD_ATTR : v(e.ADD_ATTR) && (R === ft && (R = k(R)), D(R, e.ADD_ATTR, Y))), x(e, "ADD_URI_SAFE_ATTR") && v(e.ADD_URI_SAFE_ATTR) && D(Nt, e.ADD_URI_SAFE_ATTR, Y), x(e, "FORBID_CONTENTS") && v(e.FORBID_CONTENTS) && (K === At && (K = k(K)), D(K, e.FORBID_CONTENTS, Y)), x(e, "ADD_FORBID_CONTENTS") && v(e.ADD_FORBID_CONTENTS) && (K === At && (K = k(K)), D(K, e.ADD_FORBID_CONTENTS, Y)), Ot && (L["#text"] = !0), U && D(L, [
|
|
379
379
|
"html",
|
|
380
380
|
"head",
|
|
381
381
|
"body"
|
|
382
|
-
]),
|
|
383
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw
|
|
384
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw
|
|
385
|
-
let t =
|
|
386
|
-
|
|
382
|
+
]), L.table && (D(L, ["tbody"]), delete pt.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
383
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw w("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
384
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw w("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
385
|
+
let t = N;
|
|
386
|
+
N = e.TRUSTED_TYPES_POLICY;
|
|
387
387
|
try {
|
|
388
|
-
|
|
388
|
+
P = F("");
|
|
389
389
|
} catch (e) {
|
|
390
|
-
throw
|
|
390
|
+
throw N = t, e;
|
|
391
391
|
}
|
|
392
|
-
} else e.TRUSTED_TYPES_POLICY === null ? (
|
|
393
|
-
d && d(e),
|
|
394
|
-
}, Xt =
|
|
392
|
+
} else e.TRUSTED_TYPES_POLICY === null ? (N = void 0, P = "") : (N === void 0 && (N = Ye()), N && typeof P == "string" && (P = F("")));
|
|
393
|
+
d && d(e), X = e;
|
|
394
|
+
}, Xt = D({}, [
|
|
395
|
+
...he,
|
|
395
396
|
...ge,
|
|
396
|
-
..._e
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
return t.namespaceURI === K ? e === "svg" : t.namespaceURI === Ft ? e === "svg" && (n === "annotation-xml" || Vt[n]) : !!Xt[e];
|
|
397
|
+
..._e
|
|
398
|
+
]), Zt = D({}, [...ve, ...ye]), Qt = function(e, t, n) {
|
|
399
|
+
return t.namespaceURI === q ? e === "svg" : t.namespaceURI === Ft ? e === "svg" && (n === "annotation-xml" || Vt[n]) : !!Xt[e];
|
|
400
400
|
}, $t = function(e, t, n) {
|
|
401
|
-
return t.namespaceURI ===
|
|
401
|
+
return t.namespaceURI === q ? e === "math" : t.namespaceURI === It ? e === "math" && Ut[n] : !!Zt[e];
|
|
402
402
|
}, en = function(e, t, n) {
|
|
403
403
|
return t.namespaceURI === It && !Ut[n] || t.namespaceURI === Ft && !Vt[n] ? !1 : !Zt[e] && (Wt[e] || !Xt[e]);
|
|
404
404
|
}, tn = function(e) {
|
|
405
|
-
let t =
|
|
405
|
+
let t = b(e);
|
|
406
406
|
(!t || !t.tagName) && (t = {
|
|
407
|
-
namespaceURI:
|
|
407
|
+
namespaceURI: J,
|
|
408
408
|
tagName: "template"
|
|
409
409
|
});
|
|
410
|
-
let n =
|
|
411
|
-
return Rt[e.namespaceURI] ? e.namespaceURI === It ? Qt(n, t, r) : e.namespaceURI === Ft ? $t(n, t, r) : e.namespaceURI ===
|
|
412
|
-
},
|
|
413
|
-
|
|
410
|
+
let n = ie(e.tagName), r = ie(t.tagName);
|
|
411
|
+
return Rt[e.namespaceURI] ? e.namespaceURI === It ? Qt(n, t, r) : e.namespaceURI === Ft ? $t(n, t, r) : e.namespaceURI === q ? en(n, t, r) : !!(Gt === "application/xhtml+xml" && Rt[e.namespaceURI]) : !1;
|
|
412
|
+
}, Z = function(e) {
|
|
413
|
+
_(t.removed, { element: e });
|
|
414
414
|
try {
|
|
415
|
-
|
|
415
|
+
b(e).removeChild(e);
|
|
416
416
|
} catch {
|
|
417
|
-
if (
|
|
417
|
+
if (ue(e), !b(e)) throw w("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
418
418
|
}
|
|
419
419
|
}, nn = function(e) {
|
|
420
420
|
an(e);
|
|
421
|
-
let t =
|
|
421
|
+
let t = y(e);
|
|
422
422
|
if (t) {
|
|
423
423
|
let e = [];
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
}),
|
|
424
|
+
g(t, (t) => {
|
|
425
|
+
_(e, t);
|
|
426
|
+
}), g(e, (e) => {
|
|
427
427
|
try {
|
|
428
|
-
|
|
428
|
+
ue(e);
|
|
429
429
|
} catch {}
|
|
430
430
|
});
|
|
431
431
|
}
|
|
432
|
-
let n =
|
|
432
|
+
let n = T(e);
|
|
433
433
|
if (n) for (let t = n.length - 1; t >= 0; --t) {
|
|
434
434
|
let r = n[t], i = r && r.name;
|
|
435
435
|
if (typeof i == "string") try {
|
|
436
436
|
e.removeAttribute(i);
|
|
437
437
|
} catch {}
|
|
438
438
|
}
|
|
439
|
-
},
|
|
439
|
+
}, Q = function(e, n) {
|
|
440
440
|
try {
|
|
441
|
-
|
|
441
|
+
_(t.removed, {
|
|
442
442
|
attribute: n.getAttributeNode(e),
|
|
443
443
|
from: n
|
|
444
444
|
});
|
|
445
445
|
} catch {
|
|
446
|
-
|
|
446
|
+
_(t.removed, {
|
|
447
447
|
attribute: null,
|
|
448
448
|
from: n
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
|
-
if (n.removeAttribute(e), e === "is")
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
451
|
+
if (n.removeAttribute(e), e === "is") {
|
|
452
|
+
if (W || Ct) try {
|
|
453
|
+
Z(n);
|
|
454
|
+
} catch {}
|
|
455
|
+
else try {
|
|
456
|
+
n.setAttribute(e, "");
|
|
457
|
+
} catch {}
|
|
458
|
+
}
|
|
457
459
|
}, rn = function(e) {
|
|
458
|
-
let t =
|
|
460
|
+
let t = T(e);
|
|
459
461
|
if (t) for (let n = t.length - 1; n >= 0; --n) {
|
|
460
462
|
let r = t[n], i = r && r.name;
|
|
461
|
-
if (!(typeof i != "string" ||
|
|
463
|
+
if (!(typeof i != "string" || R[Y(i)])) try {
|
|
462
464
|
e.removeAttribute(i);
|
|
463
465
|
} catch {}
|
|
464
466
|
}
|
|
@@ -466,129 +468,132 @@ function Ue() {
|
|
|
466
468
|
let t = [e];
|
|
467
469
|
for (; t.length > 0;) {
|
|
468
470
|
let e = t.pop();
|
|
469
|
-
(
|
|
470
|
-
let n =
|
|
471
|
+
(E ? E(e) : e.nodeType) === j.element && rn(e);
|
|
472
|
+
let n = y(e);
|
|
471
473
|
if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
|
|
472
474
|
}
|
|
473
475
|
}, on = function(e) {
|
|
474
|
-
if (!
|
|
476
|
+
if (!H) return;
|
|
475
477
|
let t = [e];
|
|
476
478
|
for (; t.length > 0;) {
|
|
477
|
-
let e = t.pop(), n =
|
|
478
|
-
if (n ===
|
|
479
|
+
let e = t.pop(), n = E ? E(e) : e.nodeType;
|
|
480
|
+
if (n === j.processingInstruction || n === j.comment && C(Ie, e.data)) {
|
|
479
481
|
try {
|
|
480
|
-
|
|
482
|
+
ue(e);
|
|
481
483
|
} catch {}
|
|
482
484
|
continue;
|
|
483
485
|
}
|
|
484
|
-
if (n ===
|
|
485
|
-
let t = e, n =
|
|
486
|
+
if (n === j.element) {
|
|
487
|
+
let t = e, n = Y(O ? O(e) : e.nodeName);
|
|
486
488
|
try {
|
|
487
489
|
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && n !== "label" && n !== "output" && t.removeAttribute("for");
|
|
488
490
|
} catch {}
|
|
489
491
|
}
|
|
490
|
-
let r =
|
|
492
|
+
let r = y(e);
|
|
491
493
|
if (r) for (let e = r.length - 1; e >= 0; --e) t.push(r[e]);
|
|
492
494
|
}
|
|
493
495
|
}, sn = function(e) {
|
|
494
496
|
let t = null, r = null;
|
|
495
497
|
if (St) e = "<remove></remove>" + e;
|
|
496
498
|
else {
|
|
497
|
-
let t =
|
|
499
|
+
let t = oe(e, /^[\r\n\t ]+/);
|
|
498
500
|
r = t && t[0];
|
|
499
501
|
}
|
|
500
|
-
Gt === "application/xhtml+xml" &&
|
|
501
|
-
let i =
|
|
502
|
-
if (
|
|
502
|
+
Gt === "application/xhtml+xml" && J === q && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
503
|
+
let i = N ? F(e) : e;
|
|
504
|
+
if (J === q) try {
|
|
503
505
|
t = new u().parseFromString(i, Gt);
|
|
504
506
|
} catch {}
|
|
505
507
|
if (!t || !t.documentElement) {
|
|
506
|
-
t = Ze.createDocument(
|
|
508
|
+
t = Ze.createDocument(J, "template", null);
|
|
507
509
|
try {
|
|
508
|
-
t.documentElement.innerHTML = Lt ?
|
|
510
|
+
t.documentElement.innerHTML = Lt ? P : i;
|
|
509
511
|
} catch {}
|
|
510
512
|
}
|
|
511
513
|
let a = t.body || t.documentElement;
|
|
512
|
-
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null),
|
|
514
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), J === q ? et.call(t, U ? "html" : "body")[0] : U ? t.documentElement : a;
|
|
513
515
|
}, cn = function(e) {
|
|
514
|
-
|
|
516
|
+
let t = Ue ? Ue(e) : e.ownerDocument;
|
|
517
|
+
return Qe.call(t || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
|
|
515
518
|
}, ln = function(e) {
|
|
516
|
-
return e =
|
|
519
|
+
return e = se(e, nt, " "), e = se(e, rt, " "), e = se(e, it, " "), e;
|
|
517
520
|
}, un = function(e) {
|
|
518
521
|
e.normalize();
|
|
519
|
-
let t =
|
|
520
|
-
for (;
|
|
521
|
-
let
|
|
522
|
-
|
|
523
|
-
|
|
522
|
+
let t = Ue ? Ue(e) : e.ownerDocument, n = Qe.call(t || e, e, l.SHOW_TEXT | l.SHOW_COMMENT | l.SHOW_CDATA_SECTION | l.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
|
|
523
|
+
for (; r;) r.data = ln(r.data), r = n.nextNode();
|
|
524
|
+
let i = e.querySelectorAll?.call(e, "template");
|
|
525
|
+
i && g(i, (e) => {
|
|
526
|
+
fn(e.content) && un(e.content);
|
|
524
527
|
});
|
|
525
528
|
}, dn = function(e) {
|
|
526
|
-
let t =
|
|
527
|
-
return typeof t != "string" ||
|
|
528
|
-
},
|
|
529
|
-
if (!
|
|
529
|
+
let t = O ? O(e) : null;
|
|
530
|
+
return typeof t != "string" || Y(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== T(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);
|
|
531
|
+
}, fn = function(e) {
|
|
532
|
+
if (!E || typeof e != "object" || !e) return !1;
|
|
530
533
|
try {
|
|
531
|
-
return
|
|
534
|
+
return E(e) === j.documentFragment;
|
|
532
535
|
} catch {
|
|
533
536
|
return !1;
|
|
534
537
|
}
|
|
535
|
-
},
|
|
536
|
-
if (!
|
|
538
|
+
}, pn = function(e) {
|
|
539
|
+
if (!E || typeof e != "object" || !e) return !1;
|
|
537
540
|
try {
|
|
538
|
-
return typeof
|
|
541
|
+
return typeof E(e) == "number";
|
|
539
542
|
} catch {
|
|
540
543
|
return !1;
|
|
541
544
|
}
|
|
542
545
|
};
|
|
543
546
|
function $(e, n, r) {
|
|
544
|
-
e.length !== 0 &&
|
|
545
|
-
e.call(t, n, r,
|
|
547
|
+
e.length !== 0 && g(e, (e) => {
|
|
548
|
+
e.call(t, n, r, X);
|
|
546
549
|
});
|
|
547
550
|
}
|
|
548
|
-
let
|
|
549
|
-
return !!(
|
|
550
|
-
},
|
|
551
|
-
if (!pt[t] &&
|
|
552
|
-
if (Ot && !
|
|
553
|
-
let t =
|
|
554
|
-
if (
|
|
555
|
-
let
|
|
556
|
-
for (let
|
|
557
|
-
let
|
|
558
|
-
t.insertBefore(
|
|
551
|
+
let mn = function(e, t) {
|
|
552
|
+
return !!(H && e.hasChildNodes() && !pn(e.firstElementChild) && C(Fe, e.textContent) && C(Fe, e.innerHTML) || H && e.namespaceURI === q && t === "style" && pn(e.firstElementChild) || e.nodeType === j.processingInstruction || H && e.nodeType === j.comment && C(Ie, e.data));
|
|
553
|
+
}, hn = function(e, t, n) {
|
|
554
|
+
if (!pt[t] && bn(t) && (z.tagNameCheck instanceof RegExp && C(z.tagNameCheck, t) || z.tagNameCheck instanceof Function && z.tagNameCheck(t))) return !1;
|
|
555
|
+
if (Ot && !K[t]) {
|
|
556
|
+
let t = b(e), r = y(e);
|
|
557
|
+
if (r && t) {
|
|
558
|
+
let i = r.length;
|
|
559
|
+
for (let a = i - 1; a >= 0; --a) {
|
|
560
|
+
let i = e === n ? ee(r[a], !0) : r[a];
|
|
561
|
+
t.insertBefore(i, de(e));
|
|
559
562
|
}
|
|
560
563
|
}
|
|
561
564
|
}
|
|
562
|
-
return
|
|
563
|
-
},
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
if (
|
|
565
|
+
return Z(e), !0;
|
|
566
|
+
}, gn = function(e, t, n, r) {
|
|
567
|
+
return e.length === 0 ? t : t === n || t === r ? k(t) : t;
|
|
568
|
+
}, _n = function(e, n) {
|
|
569
|
+
if ($(I.beforeSanitizeElements, e, null), e !== n && b(e) === null) return kt && an(e), !0;
|
|
570
|
+
if (dn(e)) return Z(e), !0;
|
|
571
|
+
let r = Y(O ? O(e) : e.nodeName);
|
|
572
|
+
if (L = gn(I.uponSanitizeElement, L, dt, bt), $(I.uponSanitizeElement, e, {
|
|
568
573
|
tagName: r,
|
|
569
|
-
allowedTags:
|
|
570
|
-
}), e !== n &&
|
|
571
|
-
if (
|
|
572
|
-
if (pt[r] || !(
|
|
573
|
-
let t =
|
|
574
|
-
return t === !1 && $(
|
|
575
|
-
}
|
|
576
|
-
if ((
|
|
577
|
-
if (
|
|
574
|
+
allowedTags: L
|
|
575
|
+
}), e !== n && b(e) === null) return kt && an(e), !0;
|
|
576
|
+
if (mn(e, r)) return Z(e), !0;
|
|
577
|
+
if (pt[r] || !(B.tagCheck instanceof Function && B.tagCheck(r)) && !L[r]) {
|
|
578
|
+
let t = hn(e, r, n);
|
|
579
|
+
return t === !1 && $(I.afterSanitizeElements, e, null), t;
|
|
580
|
+
}
|
|
581
|
+
if ((E ? E(e) : e.nodeType) === j.element && !tn(e) || (r === "noscript" || r === "noembed" || r === "noframes") && C(Le, e.innerHTML)) return Z(e), !0;
|
|
582
|
+
if (V && e.nodeType === j.text) {
|
|
578
583
|
let n = ln(e.textContent);
|
|
579
|
-
e.textContent !== n && (
|
|
584
|
+
e.textContent !== n && (_(t.removed, { element: e.cloneNode() }), e.textContent = n);
|
|
580
585
|
}
|
|
581
|
-
return $(
|
|
582
|
-
},
|
|
583
|
-
if (mt[t] ||
|
|
584
|
-
let i =
|
|
585
|
-
if (!(gt &&
|
|
586
|
+
return $(I.afterSanitizeElements, e, null), !1;
|
|
587
|
+
}, vn = function(e, t, r) {
|
|
588
|
+
if (mt[t] || H && t === "patchsrc" || H && t === "for" && e !== "label" && e !== "output" || Tt && (t === "id" || t === "name") && (r in n || r in qt)) return !1;
|
|
589
|
+
let i = R[t] || B.attributeCheck instanceof Function && B.attributeCheck(t, e);
|
|
590
|
+
if (!(gt && C(at, t)) && !(ht && C(ot, t))) {
|
|
586
591
|
if (!i) {
|
|
587
|
-
if (!(
|
|
588
|
-
} else if (!Nt[t] && !
|
|
592
|
+
if (!(bn(e) && (z.tagNameCheck instanceof RegExp && C(z.tagNameCheck, e) || z.tagNameCheck instanceof Function && z.tagNameCheck(e)) && (z.attributeNameCheck instanceof RegExp && C(z.attributeNameCheck, t) || z.attributeNameCheck instanceof Function && z.attributeNameCheck(t, e)) || t === "is" && z.allowCustomizedBuiltInElements && (z.tagNameCheck instanceof RegExp && C(z.tagNameCheck, r) || z.tagNameCheck instanceof Function && z.tagNameCheck(r)))) return !1;
|
|
593
|
+
} else if (!Nt[t] && !C(ut, se(r, ct, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && ce(r, "data:") === 0 && jt[e]) && !(_t && !C(st, se(r, ct, ""))) && r) return !1;
|
|
589
594
|
}
|
|
590
595
|
return !0;
|
|
591
|
-
},
|
|
596
|
+
}, yn = D({}, [
|
|
592
597
|
"annotation-xml",
|
|
593
598
|
"color-profile",
|
|
594
599
|
"font-face",
|
|
@@ -597,66 +602,67 @@ function Ue() {
|
|
|
597
602
|
"font-face-src",
|
|
598
603
|
"font-face-uri",
|
|
599
604
|
"missing-glyph"
|
|
600
|
-
]),
|
|
601
|
-
return !
|
|
602
|
-
},
|
|
603
|
-
if (
|
|
604
|
-
case "TrustedHTML": return
|
|
605
|
+
]), bn = function(e) {
|
|
606
|
+
return !yn[ie(e)] && C(lt, e);
|
|
607
|
+
}, xn = function(e, t, n, r) {
|
|
608
|
+
if (N && typeof m == "object" && typeof m.getAttributeType == "function" && !n) switch (m.getAttributeType(e, t)) {
|
|
609
|
+
case "TrustedHTML": return F(r);
|
|
605
610
|
case "TrustedScriptURL": return Je(r);
|
|
606
611
|
}
|
|
607
612
|
return r;
|
|
608
|
-
},
|
|
613
|
+
}, Sn = function(e, n, r, i) {
|
|
609
614
|
try {
|
|
610
|
-
r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), dn(e) ?
|
|
615
|
+
r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), dn(e) ? Z(e) : ne(t.removed);
|
|
611
616
|
} catch {
|
|
612
|
-
|
|
617
|
+
Q(n, e);
|
|
613
618
|
}
|
|
614
|
-
},
|
|
615
|
-
$(
|
|
619
|
+
}, Cn = function(e) {
|
|
620
|
+
$(I.beforeSanitizeAttributes, e, null);
|
|
616
621
|
let t = e.attributes;
|
|
617
622
|
if (!t || dn(e)) return;
|
|
623
|
+
R = gn(I.uponSanitizeAttribute, R, ft, xt);
|
|
618
624
|
let n = {
|
|
619
625
|
attrName: "",
|
|
620
626
|
attrValue: "",
|
|
621
627
|
keepAttr: !0,
|
|
622
|
-
allowedAttributes:
|
|
628
|
+
allowedAttributes: R,
|
|
623
629
|
forceKeepAttr: void 0
|
|
624
|
-
}, r = t.length, i =
|
|
630
|
+
}, r = t.length, i = Y(e.nodeName);
|
|
625
631
|
for (; r--;) {
|
|
626
|
-
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l =
|
|
627
|
-
if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, $(
|
|
628
|
-
|
|
632
|
+
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = Y(o), u = c, d = o === "value" ? u : le(u);
|
|
633
|
+
if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, $(I.uponSanitizeAttribute, e, n), d = n.attrValue, Et && (l === "id" || l === "name") && ce(d, Dt) !== 0 && (Q(o, e), d = Dt + d), H && C(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
|
|
634
|
+
Q(o, e);
|
|
629
635
|
continue;
|
|
630
636
|
}
|
|
631
|
-
if (l === "attributename" &&
|
|
632
|
-
|
|
637
|
+
if (l === "attributename" && oe(d, "href")) {
|
|
638
|
+
Q(o, e);
|
|
633
639
|
continue;
|
|
634
640
|
}
|
|
635
641
|
if (!n.forceKeepAttr) {
|
|
636
642
|
if (!n.keepAttr) {
|
|
637
|
-
|
|
643
|
+
Q(o, e);
|
|
638
644
|
continue;
|
|
639
645
|
}
|
|
640
|
-
if (!vt &&
|
|
641
|
-
|
|
646
|
+
if (!vt && C(Re, d)) {
|
|
647
|
+
Q(o, e);
|
|
642
648
|
continue;
|
|
643
649
|
}
|
|
644
|
-
if (
|
|
645
|
-
|
|
650
|
+
if (V && (d = ln(d)), !vn(i, l, d)) {
|
|
651
|
+
Q(o, e);
|
|
646
652
|
continue;
|
|
647
653
|
}
|
|
648
|
-
d =
|
|
654
|
+
d = xn(i, l, s, d), d !== u && Sn(e, o, s, d);
|
|
649
655
|
}
|
|
650
656
|
}
|
|
651
|
-
$(
|
|
652
|
-
},
|
|
657
|
+
$(I.afterSanitizeAttributes, e, null);
|
|
658
|
+
}, wn = function(e) {
|
|
653
659
|
let t = null, n = cn(e);
|
|
654
|
-
for ($(
|
|
655
|
-
let e =
|
|
656
|
-
|
|
660
|
+
for ($(I.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if ($(I.uponSanitizeShadowNode, t, null), _n(t, e), Cn(t), fn(t.content) && wn(t.content), (E ? E(t) : t.nodeType) === j.element) {
|
|
661
|
+
let e = S(t);
|
|
662
|
+
fn(e) && (Tn(e), wn(e));
|
|
657
663
|
}
|
|
658
|
-
$(
|
|
659
|
-
},
|
|
664
|
+
$(I.afterSanitizeShadowDOM, e, null);
|
|
665
|
+
}, Tn = function(e) {
|
|
660
666
|
let t = [{
|
|
661
667
|
node: e,
|
|
662
668
|
shadow: null
|
|
@@ -664,27 +670,27 @@ function Ue() {
|
|
|
664
670
|
for (; t.length > 0;) {
|
|
665
671
|
let e = t.pop();
|
|
666
672
|
if (e.shadow) {
|
|
667
|
-
|
|
673
|
+
wn(e.shadow);
|
|
668
674
|
continue;
|
|
669
675
|
}
|
|
670
|
-
let n = e.node, r = (
|
|
676
|
+
let n = e.node, r = (E ? E(n) : n.nodeType) === j.element, i = y(n);
|
|
671
677
|
if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
|
|
672
678
|
node: i[e],
|
|
673
679
|
shadow: null
|
|
674
680
|
});
|
|
675
681
|
if (r) {
|
|
676
|
-
let e =
|
|
677
|
-
if (typeof e == "string" &&
|
|
682
|
+
let e = O ? O(n) : null;
|
|
683
|
+
if (typeof e == "string" && Y(e) === "template") {
|
|
678
684
|
let e = n.content;
|
|
679
|
-
|
|
685
|
+
fn(e) && t.push({
|
|
680
686
|
node: e,
|
|
681
687
|
shadow: null
|
|
682
688
|
});
|
|
683
689
|
}
|
|
684
690
|
}
|
|
685
691
|
if (r) {
|
|
686
|
-
let e =
|
|
687
|
-
|
|
692
|
+
let e = S(n);
|
|
693
|
+
fn(e) && t.push({
|
|
688
694
|
node: null,
|
|
689
695
|
shadow: e
|
|
690
696
|
}, {
|
|
@@ -696,72 +702,73 @@ function Ue() {
|
|
|
696
702
|
};
|
|
697
703
|
return t.sanitize = function(e) {
|
|
698
704
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
|
|
699
|
-
if (Lt = !e, Lt && (e = "<!-->"), typeof e != "string" && !
|
|
705
|
+
if (Lt = !e, Lt && (e = "<!-->"), typeof e != "string" && !pn(e) && (e = fe(e), typeof e != "string")) throw w("dirty is not a string, aborting");
|
|
700
706
|
if (!t.isSupported) return e;
|
|
701
|
-
yt ? (
|
|
702
|
-
let c = kt && typeof e != "string" &&
|
|
707
|
+
yt ? (L = bt, R = xt) : Yt(n), (I.uponSanitizeElement.length > 0 || I.uponSanitizeAttribute.length > 0) && (L = k(L)), I.uponSanitizeAttribute.length > 0 && (R = k(R)), t.removed = [];
|
|
708
|
+
let c = kt && typeof e != "string" && pn(e);
|
|
703
709
|
if (c) {
|
|
704
710
|
on(e);
|
|
705
|
-
let t =
|
|
711
|
+
let t = O ? O(e) : e.nodeName;
|
|
706
712
|
if (typeof t == "string") {
|
|
707
|
-
let n =
|
|
708
|
-
if (!
|
|
713
|
+
let n = Y(t);
|
|
714
|
+
if (!L[n] || pt[n]) throw nn(e), w("root node is forbidden and cannot be sanitized in-place");
|
|
709
715
|
}
|
|
710
|
-
if (dn(e)) throw nn(e),
|
|
716
|
+
if (dn(e)) throw nn(e), w("root node is clobbered and cannot be sanitized in-place");
|
|
711
717
|
try {
|
|
712
|
-
|
|
718
|
+
Tn(e);
|
|
713
719
|
} catch (t) {
|
|
714
720
|
throw nn(e), t;
|
|
715
721
|
}
|
|
716
|
-
} else if (
|
|
722
|
+
} else if (pn(e)) i = sn("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === j.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Tn(a);
|
|
717
723
|
else {
|
|
718
|
-
if (!
|
|
719
|
-
if (i = sn(e), !i) return
|
|
724
|
+
if (!W && !V && !U && e.indexOf("<") === -1) return N && wt ? F(e) : e;
|
|
725
|
+
if (i = sn(e), !i) return W ? null : wt ? P : "";
|
|
720
726
|
}
|
|
721
|
-
i && St &&
|
|
722
|
-
let l = c ? e : i
|
|
727
|
+
i && St && Z(i.firstChild);
|
|
728
|
+
let l = c ? e : i;
|
|
723
729
|
try {
|
|
724
|
-
|
|
730
|
+
let e = cn(l);
|
|
731
|
+
for (; o = e.nextNode();) _n(o, l), Cn(o), fn(o.content) && wn(o.content);
|
|
725
732
|
} catch (n) {
|
|
726
|
-
throw c && (nn(e),
|
|
733
|
+
throw c && (nn(e), g(t.removed, (e) => {
|
|
727
734
|
e.element && an(e.element);
|
|
728
735
|
})), n;
|
|
729
736
|
}
|
|
730
|
-
if (c) return
|
|
737
|
+
if (c) return g(t.removed, (e) => {
|
|
731
738
|
e.element && an(e.element);
|
|
732
|
-
}),
|
|
733
|
-
if (
|
|
734
|
-
if (
|
|
739
|
+
}), V && un(e), e;
|
|
740
|
+
if (W) {
|
|
741
|
+
if (V && un(i), Ct) for (s = $e.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
|
|
735
742
|
else s = i;
|
|
736
|
-
return (
|
|
743
|
+
return (R.shadowroot || R.shadowrootmode) && (s = tt.call(r, s, !0)), s;
|
|
737
744
|
}
|
|
738
|
-
let
|
|
739
|
-
return
|
|
745
|
+
let u = U ? i.outerHTML : i.innerHTML;
|
|
746
|
+
return U && L["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && C(Ne, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), V && (u = ln(u)), N && wt ? F(u) : u;
|
|
740
747
|
}, t.setConfig = function() {
|
|
741
748
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
742
|
-
Yt(e), yt = !0, bt =
|
|
749
|
+
Yt(e), yt = !0, bt = L, xt = R;
|
|
743
750
|
}, t.clearConfig = function() {
|
|
744
|
-
|
|
751
|
+
X = null, yt = !1, bt = null, xt = null, N = We, P = "";
|
|
745
752
|
}, t.isValidAttribute = function(e, t, n) {
|
|
746
|
-
|
|
747
|
-
let r =
|
|
748
|
-
return
|
|
753
|
+
X || Yt({});
|
|
754
|
+
let r = Y(e), i = Y(t);
|
|
755
|
+
return vn(r, i, n);
|
|
749
756
|
}, t.addHook = function(e, t) {
|
|
750
|
-
typeof t == "function" &&
|
|
757
|
+
typeof t == "function" && x(I, e) && _(I[e], t);
|
|
751
758
|
}, t.removeHook = function(e, t) {
|
|
752
|
-
if (
|
|
759
|
+
if (x(I, e)) {
|
|
753
760
|
if (t !== void 0) {
|
|
754
|
-
let n =
|
|
755
|
-
return n === -1 ? void 0 :
|
|
761
|
+
let n = te(I[e], t);
|
|
762
|
+
return n === -1 ? void 0 : re(I[e], n, 1)[0];
|
|
756
763
|
}
|
|
757
|
-
return
|
|
764
|
+
return ne(I[e]);
|
|
758
765
|
}
|
|
759
766
|
}, t.removeHooks = function(e) {
|
|
760
|
-
|
|
767
|
+
x(I, e) && (I[e] = []);
|
|
761
768
|
}, t.removeAllHooks = function() {
|
|
762
|
-
|
|
769
|
+
I = Ve();
|
|
763
770
|
}, t;
|
|
764
771
|
}
|
|
765
|
-
var
|
|
772
|
+
var Ue = He();
|
|
766
773
|
//#endregion
|
|
767
|
-
export {
|
|
774
|
+
export { Ue as t };
|