@plumile/ui 0.1.153 → 0.1.154
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/lib/esm/admin/organisms/admin_topbar/adminTopbar.css.js +2 -0
- package/lib/esm/atomic/atoms/modal/modal.css.js +0 -2
- package/lib/esm/atomic/molecules/markdown/components/MarkdownInlineCode.css.js +1 -0
- package/lib/esm/atomic/molecules/markdown/components/MarkdownLink.css.js +0 -1
- package/lib/esm/node_modules/dompurify/dist/purify.es.js +244 -224
- package/lib/esm/node_modules/dompurify/dist/purify.es.js.map +1 -1
- package/package.json +5 -5
|
@@ -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, p = Object.create,
|
|
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, ee = m.apply, te = m.construct;
|
|
42
42
|
d ||= function(e) {
|
|
43
43
|
return e;
|
|
44
44
|
}, f ||= function(e) {
|
|
45
45
|
return e;
|
|
46
|
-
},
|
|
46
|
+
}, ee ||= function(e, t) {
|
|
47
47
|
var n = [...arguments].slice(2);
|
|
48
48
|
return e.apply(t, n);
|
|
49
|
-
},
|
|
49
|
+
}, te ||= function(e) {
|
|
50
50
|
return new e(...[...arguments].slice(1));
|
|
51
51
|
};
|
|
52
|
-
var
|
|
53
|
-
function
|
|
52
|
+
var h = T(Array.prototype.forEach), ne = T(Array.prototype.lastIndexOf), re = T(Array.prototype.pop), g = T(Array.prototype.push), ie = T(Array.prototype.splice), _ = Array.isArray, v = T(String.prototype.toLowerCase), ae = T(String.prototype.toString), oe = T(String.prototype.match), y = T(String.prototype.replace), se = T(String.prototype.indexOf), ce = T(String.prototype.trim), le = T(Number.prototype.toString), b = T(Boolean.prototype.toString), x = typeof BigInt > "u" ? null : T(BigInt.prototype.toString), ue = typeof Symbol > "u" ? null : T(Symbol.prototype.toString), S = T(Object.prototype.hasOwnProperty), C = T(Object.prototype.toString), w = T(RegExp.prototype.test), de = 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 ee(e, t, n);
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function E(e) {
|
|
61
61
|
return function() {
|
|
62
|
-
return
|
|
62
|
+
return te(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] : v;
|
|
67
|
+
if (s && s(e, null), !_(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++) S(e, t) || (e[t] = null);
|
|
81
81
|
return e;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function k(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
|
-
|
|
88
|
+
S(e, a) && (_(o) ? t[a] = O(o) : o && typeof o == "object" && o.constructor === Object ? t[a] = k(o) : t[a] = 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
|
|
95
|
+
case "number": return le(e);
|
|
96
96
|
case "boolean": return b(e);
|
|
97
|
-
case "bigint": return
|
|
98
|
-
case "symbol": return
|
|
99
|
-
case "undefined": return
|
|
97
|
+
case "bigint": return x ? x(e) : "0";
|
|
98
|
+
case "symbol": return ue ? ue(e) : "Symbol()";
|
|
99
|
+
case "undefined": return C(e);
|
|
100
100
|
case "function":
|
|
101
101
|
case "object": {
|
|
102
|
-
if (e === null) return
|
|
103
|
-
let t = e, n =
|
|
102
|
+
if (e === null) return C(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 : C(e);
|
|
107
107
|
}
|
|
108
|
-
return
|
|
108
|
+
return C(e);
|
|
109
109
|
}
|
|
110
|
-
default: return
|
|
110
|
+
default: return C(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 O(e, t) {
|
|
|
124
124
|
}
|
|
125
125
|
return n;
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function pe(e) {
|
|
128
128
|
try {
|
|
129
|
-
return
|
|
129
|
+
return w(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 ge = 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 ge = 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,21 +196,28 @@ var ge = 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.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Ce = d(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), we = d([
|
|
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), j = {
|
|
206
206
|
element: 1,
|
|
207
|
+
attribute: 2,
|
|
207
208
|
text: 3,
|
|
209
|
+
cdataSection: 4,
|
|
210
|
+
entityReference: 5,
|
|
211
|
+
entityNode: 6,
|
|
208
212
|
progressingInstruction: 7,
|
|
209
213
|
comment: 8,
|
|
210
|
-
document: 9
|
|
211
|
-
|
|
214
|
+
document: 9,
|
|
215
|
+
documentType: 10,
|
|
216
|
+
documentFragment: 11,
|
|
217
|
+
notation: 12
|
|
218
|
+
}, Fe = function() {
|
|
212
219
|
return typeof window > "u" ? null : window;
|
|
213
|
-
},
|
|
220
|
+
}, Ie = function(e, t) {
|
|
214
221
|
if (typeof e != "object" || typeof e.createPolicy != "function") return null;
|
|
215
222
|
let n = null, r = "data-tt-policy-suffix";
|
|
216
223
|
t && t.hasAttribute(r) && (n = t.getAttribute(r));
|
|
@@ -227,7 +234,7 @@ var ge = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
227
234
|
} catch {
|
|
228
235
|
return console.warn("TrustedTypes policy " + i + " could not be created."), null;
|
|
229
236
|
}
|
|
230
|
-
},
|
|
237
|
+
}, Le = function() {
|
|
231
238
|
return {
|
|
232
239
|
afterSanitizeAttributes: [],
|
|
233
240
|
afterSanitizeElements: [],
|
|
@@ -240,28 +247,32 @@ var ge = d(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
|
|
|
240
247
|
uponSanitizeShadowNode: []
|
|
241
248
|
};
|
|
242
249
|
};
|
|
243
|
-
function
|
|
244
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
245
|
-
if (t.version = "3.4.
|
|
246
|
-
let n = e.document, r = n, i = r.currentScript
|
|
247
|
-
|
|
250
|
+
function Re() {
|
|
251
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Fe(), t = (e) => Re(e);
|
|
252
|
+
if (t.version = "3.4.6", t.removed = [], !e || !e.document || e.document.nodeType !== j.document || !e.Element) return t.isSupported = !1, t;
|
|
253
|
+
let n = e.document, r = n, i = r.currentScript;
|
|
254
|
+
e.DocumentFragment;
|
|
255
|
+
let a = e.HTMLTemplateElement, s = e.Node, c = e.Element, l = e.NodeFilter;
|
|
256
|
+
e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
|
|
257
|
+
let u = e.DOMParser, f = e.trustedTypes, m = c.prototype, ee = A(m, "cloneNode"), te = A(m, "remove"), le = A(m, "nextSibling"), b = A(m, "childNodes"), x = A(m, "parentNode"), ue = A(m, "shadowRoot"), C = A(m, "attributes"), T = s && s.prototype ? A(s.prototype, "nodeType") : null, E = s && s.prototype ? A(s.prototype, "nodeName") : null;
|
|
258
|
+
if (typeof a == "function") {
|
|
248
259
|
let e = n.createElement("template");
|
|
249
260
|
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
250
261
|
}
|
|
251
|
-
let
|
|
252
|
-
t.isSupported = typeof o == "function" && typeof
|
|
253
|
-
let qe = De, Je = Oe, Ye = ke, Xe =
|
|
262
|
+
let O, M = "", ze = n, Be = ze.implementation, Ve = ze.createNodeIterator, He = ze.createDocumentFragment, Ue = ze.getElementsByTagName, We = r.importNode, N = Le();
|
|
263
|
+
t.isSupported = typeof o == "function" && typeof x == "function" && Be && Be.createHTMLDocument !== void 0;
|
|
264
|
+
let Ge = Te, Ke = Ee, qe = De, Je = Oe, Ye = ke, Xe = je, Ze = Me, Qe = Pe, $e = Ae, P = null, et = D({}, [
|
|
265
|
+
...me,
|
|
266
|
+
...he,
|
|
254
267
|
...ge,
|
|
255
|
-
..._e,
|
|
256
268
|
...ve,
|
|
257
|
-
...be
|
|
258
|
-
|
|
259
|
-
|
|
269
|
+
...be
|
|
270
|
+
]), F = null, tt = D({}, [
|
|
271
|
+
...xe,
|
|
272
|
+
...Se,
|
|
260
273
|
...Ce,
|
|
261
|
-
...we
|
|
262
|
-
|
|
263
|
-
...Ee
|
|
264
|
-
]), F = Object.seal(p(null, {
|
|
274
|
+
...we
|
|
275
|
+
]), I = Object.seal(p(null, {
|
|
265
276
|
tagNameCheck: {
|
|
266
277
|
writable: !0,
|
|
267
278
|
configurable: !1,
|
|
@@ -280,7 +291,7 @@ function Be() {
|
|
|
280
291
|
enumerable: !0,
|
|
281
292
|
value: !1
|
|
282
293
|
}
|
|
283
|
-
})),
|
|
294
|
+
})), L = null, nt = null, R = Object.seal(p(null, {
|
|
284
295
|
tagCheck: {
|
|
285
296
|
writable: !0,
|
|
286
297
|
configurable: !1,
|
|
@@ -293,7 +304,7 @@ function Be() {
|
|
|
293
304
|
enumerable: !0,
|
|
294
305
|
value: null
|
|
295
306
|
}
|
|
296
|
-
})),
|
|
307
|
+
})), rt = !0, it = !0, at = !1, ot = !0, z = !1, B = !0, V = !1, st = !1, ct = !1, H = !1, lt = !1, ut = !1, dt = !0, ft = !1, pt = "user-content-", mt = !0, U = !1, W = {}, G = null, ht = D({}, [
|
|
297
308
|
"annotation-xml",
|
|
298
309
|
"audio",
|
|
299
310
|
"colgroup",
|
|
@@ -319,14 +330,14 @@ function Be() {
|
|
|
319
330
|
"title",
|
|
320
331
|
"video",
|
|
321
332
|
"xmp"
|
|
322
|
-
]),
|
|
333
|
+
]), gt = null, _t = D({}, [
|
|
323
334
|
"audio",
|
|
324
335
|
"video",
|
|
325
336
|
"img",
|
|
326
337
|
"source",
|
|
327
338
|
"image",
|
|
328
339
|
"track"
|
|
329
|
-
]),
|
|
340
|
+
]), vt = null, yt = D({}, [
|
|
330
341
|
"alt",
|
|
331
342
|
"class",
|
|
332
343
|
"for",
|
|
@@ -341,171 +352,179 @@ function Be() {
|
|
|
341
352
|
"value",
|
|
342
353
|
"style",
|
|
343
354
|
"xmlns"
|
|
344
|
-
]),
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
],
|
|
355
|
+
]), bt = "http://www.w3.org/1998/Math/MathML", xt = "http://www.w3.org/2000/svg", K = "http://www.w3.org/1999/xhtml", q = K, St = !1, Ct = null, wt = D({}, [
|
|
356
|
+
bt,
|
|
357
|
+
xt,
|
|
358
|
+
K
|
|
359
|
+
], ae), Tt = D({}, [
|
|
349
360
|
"mi",
|
|
350
361
|
"mo",
|
|
351
362
|
"mn",
|
|
352
363
|
"ms",
|
|
353
364
|
"mtext"
|
|
354
|
-
]),
|
|
365
|
+
]), Et = D({}, ["annotation-xml"]), Dt = D({}, [
|
|
355
366
|
"title",
|
|
356
367
|
"style",
|
|
357
368
|
"font",
|
|
358
369
|
"a",
|
|
359
370
|
"script"
|
|
360
|
-
]),
|
|
371
|
+
]), J = null, Ot = ["application/xhtml+xml", "text/html"], Y = null, X = null, kt = n.createElement("form"), At = function(e) {
|
|
361
372
|
return e instanceof RegExp || e instanceof Function;
|
|
362
|
-
},
|
|
373
|
+
}, jt = function() {
|
|
363
374
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
364
|
-
if (
|
|
365
|
-
(!e || typeof e != "object") && (e = {}), e =
|
|
375
|
+
if (X && X === e) return;
|
|
376
|
+
(!e || typeof e != "object") && (e = {}), e = k(e), J = Ot.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = J === "application/xhtml+xml" ? ae : v, P = S(e, "ALLOWED_TAGS") && _(e.ALLOWED_TAGS) ? D({}, e.ALLOWED_TAGS, Y) : et, F = S(e, "ALLOWED_ATTR") && _(e.ALLOWED_ATTR) ? D({}, e.ALLOWED_ATTR, Y) : tt, Ct = S(e, "ALLOWED_NAMESPACES") && _(e.ALLOWED_NAMESPACES) ? D({}, e.ALLOWED_NAMESPACES, ae) : wt, vt = S(e, "ADD_URI_SAFE_ATTR") && _(e.ADD_URI_SAFE_ATTR) ? D(k(yt), e.ADD_URI_SAFE_ATTR, Y) : yt, gt = S(e, "ADD_DATA_URI_TAGS") && _(e.ADD_DATA_URI_TAGS) ? D(k(_t), e.ADD_DATA_URI_TAGS, Y) : _t, G = S(e, "FORBID_CONTENTS") && _(e.FORBID_CONTENTS) ? D({}, e.FORBID_CONTENTS, Y) : ht, L = S(e, "FORBID_TAGS") && _(e.FORBID_TAGS) ? D({}, e.FORBID_TAGS, Y) : k({}), nt = S(e, "FORBID_ATTR") && _(e.FORBID_ATTR) ? D({}, e.FORBID_ATTR, Y) : k({}), W = S(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? k(e.USE_PROFILES) : e.USE_PROFILES : !1, rt = e.ALLOW_ARIA_ATTR !== !1, it = e.ALLOW_DATA_ATTR !== !1, at = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ot = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, z = e.SAFE_FOR_TEMPLATES || !1, B = e.SAFE_FOR_XML !== !1, V = e.WHOLE_DOCUMENT || !1, H = e.RETURN_DOM || !1, lt = e.RETURN_DOM_FRAGMENT || !1, ut = e.RETURN_TRUSTED_TYPE || !1, ct = e.FORCE_BODY || !1, dt = e.SANITIZE_DOM !== !1, ft = e.SANITIZE_NAMED_PROPS || !1, mt = e.KEEP_CONTENT !== !1, U = e.IN_PLACE || !1, $e = pe(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ae, q = typeof e.NAMESPACE == "string" ? e.NAMESPACE : K, Tt = S(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? k(e.MATHML_TEXT_INTEGRATION_POINTS) : D({}, [
|
|
366
377
|
"mi",
|
|
367
378
|
"mo",
|
|
368
379
|
"mn",
|
|
369
380
|
"ms",
|
|
370
381
|
"mtext"
|
|
371
|
-
]),
|
|
372
|
-
let t =
|
|
373
|
-
if (
|
|
382
|
+
]), Et = S(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? k(e.HTML_INTEGRATION_POINTS) : D({}, ["annotation-xml"]);
|
|
383
|
+
let t = S(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? k(e.CUSTOM_ELEMENT_HANDLING) : p(null);
|
|
384
|
+
if (I = p(null), S(t, "tagNameCheck") && At(t.tagNameCheck) && (I.tagNameCheck = t.tagNameCheck), S(t, "attributeNameCheck") && At(t.attributeNameCheck) && (I.attributeNameCheck = t.attributeNameCheck), S(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (I.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), z && (it = !1), lt && (H = !0), W && (P = D({}, be), F = p(null), W.html === !0 && (D(P, me), D(F, xe)), W.svg === !0 && (D(P, he), D(F, Se), D(F, we)), W.svgFilters === !0 && (D(P, ge), D(F, Se), D(F, we)), W.mathMl === !0 && (D(P, ve), D(F, Ce), D(F, we))), R.tagCheck = null, R.attributeCheck = null, S(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? R.tagCheck = e.ADD_TAGS : _(e.ADD_TAGS) && (P === et && (P = k(P)), D(P, e.ADD_TAGS, Y))), S(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? R.attributeCheck = e.ADD_ATTR : _(e.ADD_ATTR) && (F === tt && (F = k(F)), D(F, e.ADD_ATTR, Y))), S(e, "ADD_URI_SAFE_ATTR") && _(e.ADD_URI_SAFE_ATTR) && D(vt, e.ADD_URI_SAFE_ATTR, Y), S(e, "FORBID_CONTENTS") && _(e.FORBID_CONTENTS) && (G === ht && (G = k(G)), D(G, e.FORBID_CONTENTS, Y)), S(e, "ADD_FORBID_CONTENTS") && _(e.ADD_FORBID_CONTENTS) && (G === ht && (G = k(G)), D(G, e.ADD_FORBID_CONTENTS, Y)), mt && (P["#text"] = !0), V && D(P, [
|
|
374
385
|
"html",
|
|
375
386
|
"head",
|
|
376
387
|
"body"
|
|
377
|
-
]),
|
|
378
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw
|
|
379
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw
|
|
380
|
-
|
|
381
|
-
} else
|
|
382
|
-
d && d(e),
|
|
383
|
-
},
|
|
384
|
-
...
|
|
385
|
-
...
|
|
386
|
-
...
|
|
387
|
-
]),
|
|
388
|
-
let t =
|
|
388
|
+
]), P.table && (D(P, ["tbody"]), delete L.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
389
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw de("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
390
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw de("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
391
|
+
O = e.TRUSTED_TYPES_POLICY, M = O.createHTML("");
|
|
392
|
+
} else O === void 0 && (O = Ie(f, i)), O !== null && typeof M == "string" && (M = O.createHTML(""));
|
|
393
|
+
d && d(e), X = e;
|
|
394
|
+
}, Mt = D({}, [
|
|
395
|
+
...he,
|
|
396
|
+
...ge,
|
|
397
|
+
..._e
|
|
398
|
+
]), Nt = D({}, [...ve, ...ye]), Pt = function(e) {
|
|
399
|
+
let t = x(e);
|
|
389
400
|
(!t || !t.tagName) && (t = {
|
|
390
|
-
namespaceURI:
|
|
401
|
+
namespaceURI: q,
|
|
391
402
|
tagName: "template"
|
|
392
403
|
});
|
|
393
|
-
let n =
|
|
394
|
-
return
|
|
395
|
-
},
|
|
396
|
-
|
|
404
|
+
let n = v(e.tagName), r = v(t.tagName);
|
|
405
|
+
return Ct[e.namespaceURI] ? e.namespaceURI === xt ? t.namespaceURI === K ? n === "svg" : t.namespaceURI === bt ? n === "svg" && (r === "annotation-xml" || Tt[r]) : !!Mt[n] : e.namespaceURI === bt ? t.namespaceURI === K ? n === "math" : t.namespaceURI === xt ? n === "math" && Et[r] : !!Nt[n] : e.namespaceURI === K ? t.namespaceURI === xt && !Et[r] || t.namespaceURI === bt && !Tt[r] ? !1 : !Nt[n] && (Dt[n] || !Mt[n]) : !!(J === "application/xhtml+xml" && Ct[e.namespaceURI]) : !1;
|
|
406
|
+
}, Z = function(e) {
|
|
407
|
+
g(t.removed, { element: e });
|
|
397
408
|
try {
|
|
398
|
-
|
|
409
|
+
x(e).removeChild(e);
|
|
399
410
|
} catch {
|
|
400
|
-
|
|
411
|
+
te(e);
|
|
401
412
|
}
|
|
402
|
-
},
|
|
413
|
+
}, Q = function(e, n) {
|
|
403
414
|
try {
|
|
404
|
-
|
|
415
|
+
g(t.removed, {
|
|
405
416
|
attribute: n.getAttributeNode(e),
|
|
406
417
|
from: n
|
|
407
418
|
});
|
|
408
419
|
} catch {
|
|
409
|
-
|
|
420
|
+
g(t.removed, {
|
|
410
421
|
attribute: null,
|
|
411
422
|
from: n
|
|
412
423
|
});
|
|
413
424
|
}
|
|
414
|
-
if (n.removeAttribute(e), e === "is") if (
|
|
415
|
-
|
|
425
|
+
if (n.removeAttribute(e), e === "is") if (H || lt) try {
|
|
426
|
+
Z(n);
|
|
416
427
|
} catch {}
|
|
417
428
|
else try {
|
|
418
429
|
n.setAttribute(e, "");
|
|
419
430
|
} catch {}
|
|
420
|
-
},
|
|
431
|
+
}, Ft = function(e) {
|
|
421
432
|
let t = null, r = null;
|
|
422
|
-
if (
|
|
433
|
+
if (ct) e = "<remove></remove>" + e;
|
|
423
434
|
else {
|
|
424
|
-
let t =
|
|
435
|
+
let t = oe(e, /^[\r\n\t ]+/);
|
|
425
436
|
r = t && t[0];
|
|
426
437
|
}
|
|
427
|
-
|
|
428
|
-
let i =
|
|
429
|
-
if (
|
|
430
|
-
t = new
|
|
438
|
+
J === "application/xhtml+xml" && q === K && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
439
|
+
let i = O ? O.createHTML(e) : e;
|
|
440
|
+
if (q === K) try {
|
|
441
|
+
t = new u().parseFromString(i, J);
|
|
431
442
|
} catch {}
|
|
432
443
|
if (!t || !t.documentElement) {
|
|
433
|
-
t =
|
|
444
|
+
t = Be.createDocument(q, "template", null);
|
|
434
445
|
try {
|
|
435
|
-
t.documentElement.innerHTML =
|
|
446
|
+
t.documentElement.innerHTML = St ? M : i;
|
|
436
447
|
} catch {}
|
|
437
448
|
}
|
|
438
449
|
let a = t.body || t.documentElement;
|
|
439
|
-
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null),
|
|
440
|
-
},
|
|
441
|
-
return
|
|
442
|
-
},
|
|
450
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), q === K ? Ue.call(t, V ? "html" : "body")[0] : V ? t.documentElement : a;
|
|
451
|
+
}, It = function(e) {
|
|
452
|
+
return Ve.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
|
|
453
|
+
}, Lt = function(e) {
|
|
443
454
|
e.normalize();
|
|
444
|
-
let t =
|
|
455
|
+
let t = Ve.call(e.ownerDocument || e, e, l.SHOW_TEXT | l.SHOW_COMMENT | l.SHOW_CDATA_SECTION | l.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
|
|
445
456
|
for (; n;) {
|
|
446
457
|
let e = n.data;
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
458
|
+
h([
|
|
459
|
+
Ge,
|
|
460
|
+
Ke,
|
|
461
|
+
qe
|
|
451
462
|
], (t) => {
|
|
452
|
-
e =
|
|
463
|
+
e = y(e, t, " ");
|
|
453
464
|
}), n.data = e, n = t.nextNode();
|
|
454
465
|
}
|
|
466
|
+
}, Rt = function(e) {
|
|
467
|
+
let t = E ? E(e) : null;
|
|
468
|
+
return typeof t != "string" || Y(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== C(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.childNodes !== b(e);
|
|
469
|
+
}, zt = function(e) {
|
|
470
|
+
if (!T || typeof e != "object" || !e) return !1;
|
|
471
|
+
try {
|
|
472
|
+
return T(e) === j.documentFragment;
|
|
473
|
+
} catch {
|
|
474
|
+
return !1;
|
|
475
|
+
}
|
|
455
476
|
}, Bt = function(e) {
|
|
456
|
-
|
|
457
|
-
}, Vt = function(e) {
|
|
458
|
-
if (!pe || typeof e != "object" || !e) return !1;
|
|
477
|
+
if (!T || typeof e != "object" || !e) return !1;
|
|
459
478
|
try {
|
|
460
|
-
return typeof
|
|
479
|
+
return typeof T(e) == "number";
|
|
461
480
|
} catch {
|
|
462
481
|
return !1;
|
|
463
482
|
}
|
|
464
483
|
};
|
|
465
|
-
function
|
|
466
|
-
|
|
467
|
-
e.call(t, n, r,
|
|
484
|
+
function $(e, n, r) {
|
|
485
|
+
h(e, (e) => {
|
|
486
|
+
e.call(t, n, r, X);
|
|
468
487
|
});
|
|
469
488
|
}
|
|
470
|
-
let
|
|
489
|
+
let Vt = function(e) {
|
|
471
490
|
let n = null;
|
|
472
|
-
if (
|
|
473
|
-
let r =
|
|
474
|
-
if (
|
|
491
|
+
if ($(N.beforeSanitizeElements, e, null), Rt(e)) return Z(e), !0;
|
|
492
|
+
let r = Y(e.nodeName);
|
|
493
|
+
if ($(N.uponSanitizeElement, e, {
|
|
475
494
|
tagName: r,
|
|
476
|
-
allowedTags:
|
|
477
|
-
}),
|
|
478
|
-
if (
|
|
479
|
-
if (!
|
|
480
|
-
if (
|
|
481
|
-
let t =
|
|
495
|
+
allowedTags: P
|
|
496
|
+
}), B && e.hasChildNodes() && !Bt(e.firstElementChild) && w(/<[/\w!]/g, e.innerHTML) && w(/<[/\w!]/g, e.textContent) || B && e.namespaceURI === K && r === "style" && Bt(e.firstElementChild) || e.nodeType === j.progressingInstruction || B && e.nodeType === j.comment && w(/<[/\w]/g, e.data)) return Z(e), !0;
|
|
497
|
+
if (L[r] || !(R.tagCheck instanceof Function && R.tagCheck(r)) && !P[r]) {
|
|
498
|
+
if (!L[r] && Wt(r) && (I.tagNameCheck instanceof RegExp && w(I.tagNameCheck, r) || I.tagNameCheck instanceof Function && I.tagNameCheck(r))) return !1;
|
|
499
|
+
if (mt && !G[r]) {
|
|
500
|
+
let t = x(e) || e.parentNode, n = b(e) || e.childNodes;
|
|
482
501
|
if (n && t) {
|
|
483
502
|
let r = n.length;
|
|
484
503
|
for (let i = r - 1; i >= 0; --i) {
|
|
485
|
-
let r =
|
|
486
|
-
t.insertBefore(r,
|
|
504
|
+
let r = ee(n[i], !0);
|
|
505
|
+
t.insertBefore(r, le(e));
|
|
487
506
|
}
|
|
488
507
|
}
|
|
489
508
|
}
|
|
490
|
-
return
|
|
509
|
+
return Z(e), !0;
|
|
491
510
|
}
|
|
492
|
-
return e
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
511
|
+
return (T ? T(e) : e.nodeType) === j.element && !Pt(e) || (r === "noscript" || r === "noembed" || r === "noframes") && w(/<\/no(script|embed|frames)/i, e.innerHTML) ? (Z(e), !0) : (z && e.nodeType === j.text && (n = e.textContent, h([
|
|
512
|
+
Ge,
|
|
513
|
+
Ke,
|
|
514
|
+
qe
|
|
496
515
|
], (e) => {
|
|
497
|
-
n =
|
|
498
|
-
}), e.textContent !== n && (
|
|
499
|
-
},
|
|
500
|
-
if (
|
|
501
|
-
let i =
|
|
502
|
-
if (!(
|
|
503
|
-
if (!i ||
|
|
504
|
-
if (!(
|
|
505
|
-
} else if (!
|
|
516
|
+
n = y(n, e, " ");
|
|
517
|
+
}), e.textContent !== n && (g(t.removed, { element: e.cloneNode() }), e.textContent = n)), $(N.afterSanitizeElements, e, null), !1);
|
|
518
|
+
}, Ht = function(e, t, r) {
|
|
519
|
+
if (nt[t] || dt && (t === "id" || t === "name") && (r in n || r in kt)) return !1;
|
|
520
|
+
let i = F[t] || R.attributeCheck instanceof Function && R.attributeCheck(t, e);
|
|
521
|
+
if (!(it && !nt[t] && w(Je, t)) && !(rt && w(Ye, t))) {
|
|
522
|
+
if (!i || nt[t]) {
|
|
523
|
+
if (!(Wt(e) && (I.tagNameCheck instanceof RegExp && w(I.tagNameCheck, e) || I.tagNameCheck instanceof Function && I.tagNameCheck(e)) && (I.attributeNameCheck instanceof RegExp && w(I.attributeNameCheck, t) || I.attributeNameCheck instanceof Function && I.attributeNameCheck(t, e)) || t === "is" && I.allowCustomizedBuiltInElements && (I.tagNameCheck instanceof RegExp && w(I.tagNameCheck, r) || I.tagNameCheck instanceof Function && I.tagNameCheck(r)))) return !1;
|
|
524
|
+
} else if (!vt[t] && !w($e, y(r, Ze, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && se(r, "data:") === 0 && gt[e]) && !(at && !w(Xe, y(r, Ze, ""))) && r) return !1;
|
|
506
525
|
}
|
|
507
526
|
return !0;
|
|
508
|
-
},
|
|
527
|
+
}, Ut = D({}, [
|
|
509
528
|
"annotation-xml",
|
|
510
529
|
"color-profile",
|
|
511
530
|
"font-face",
|
|
@@ -514,137 +533,138 @@ function Be() {
|
|
|
514
533
|
"font-face-src",
|
|
515
534
|
"font-face-uri",
|
|
516
535
|
"missing-glyph"
|
|
517
|
-
]),
|
|
518
|
-
return !
|
|
519
|
-
},
|
|
520
|
-
|
|
536
|
+
]), Wt = function(e) {
|
|
537
|
+
return !Ut[v(e)] && w(Qe, e);
|
|
538
|
+
}, Gt = function(e) {
|
|
539
|
+
$(N.beforeSanitizeAttributes, e, null);
|
|
521
540
|
let n = e.attributes;
|
|
522
|
-
if (!n ||
|
|
541
|
+
if (!n || Rt(e)) return;
|
|
523
542
|
let r = {
|
|
524
543
|
attrName: "",
|
|
525
544
|
attrValue: "",
|
|
526
545
|
keepAttr: !0,
|
|
527
|
-
allowedAttributes:
|
|
546
|
+
allowedAttributes: F,
|
|
528
547
|
forceKeepAttr: void 0
|
|
529
548
|
}, i = n.length;
|
|
530
549
|
for (; i--;) {
|
|
531
|
-
let a = n[i], o = a.name, s = a.namespaceURI, c = a.value, l =
|
|
532
|
-
if (r.attrName = l, r.attrValue = d, r.keepAttr = !0, r.forceKeepAttr = void 0,
|
|
533
|
-
|
|
550
|
+
let a = n[i], o = a.name, s = a.namespaceURI, c = a.value, l = Y(o), u = c, d = o === "value" ? u : ce(u);
|
|
551
|
+
if (r.attrName = l, r.attrValue = d, r.keepAttr = !0, r.forceKeepAttr = void 0, $(N.uponSanitizeAttribute, e, r), d = r.attrValue, ft && (l === "id" || l === "name") && se(d, pt) !== 0 && (Q(o, e), d = pt + d), B && w(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
|
|
552
|
+
Q(o, e);
|
|
534
553
|
continue;
|
|
535
554
|
}
|
|
536
|
-
if (l === "attributename" &&
|
|
537
|
-
|
|
555
|
+
if (l === "attributename" && oe(d, "href")) {
|
|
556
|
+
Q(o, e);
|
|
538
557
|
continue;
|
|
539
558
|
}
|
|
540
559
|
if (r.forceKeepAttr) continue;
|
|
541
560
|
if (!r.keepAttr) {
|
|
542
|
-
|
|
561
|
+
Q(o, e);
|
|
543
562
|
continue;
|
|
544
563
|
}
|
|
545
|
-
if (!
|
|
546
|
-
|
|
564
|
+
if (!ot && w(/\/>/i, d)) {
|
|
565
|
+
Q(o, e);
|
|
547
566
|
continue;
|
|
548
567
|
}
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
568
|
+
z && h([
|
|
569
|
+
Ge,
|
|
570
|
+
Ke,
|
|
571
|
+
qe
|
|
553
572
|
], (e) => {
|
|
554
|
-
d =
|
|
573
|
+
d = y(d, e, " ");
|
|
555
574
|
});
|
|
556
|
-
let
|
|
557
|
-
if (!
|
|
558
|
-
|
|
575
|
+
let p = Y(e.nodeName);
|
|
576
|
+
if (!Ht(p, l, d)) {
|
|
577
|
+
Q(o, e);
|
|
559
578
|
continue;
|
|
560
579
|
}
|
|
561
|
-
if (
|
|
580
|
+
if (O && typeof f == "object" && typeof f.getAttributeType == "function" && !s) switch (f.getAttributeType(p, l)) {
|
|
562
581
|
case "TrustedHTML":
|
|
563
|
-
d =
|
|
582
|
+
d = O.createHTML(d);
|
|
564
583
|
break;
|
|
565
584
|
case "TrustedScriptURL":
|
|
566
|
-
d =
|
|
585
|
+
d = O.createScriptURL(d);
|
|
567
586
|
break;
|
|
568
587
|
}
|
|
569
588
|
if (d !== u) try {
|
|
570
|
-
s ? e.setAttributeNS(s, o, d) : e.setAttribute(o, d),
|
|
589
|
+
s ? e.setAttributeNS(s, o, d) : e.setAttribute(o, d), Rt(e) ? Z(e) : re(t.removed);
|
|
571
590
|
} catch {
|
|
572
|
-
|
|
591
|
+
Q(o, e);
|
|
573
592
|
}
|
|
574
593
|
}
|
|
575
|
-
|
|
594
|
+
$(N.afterSanitizeAttributes, e, null);
|
|
595
|
+
}, Kt = function(e) {
|
|
596
|
+
let t = null, n = It(e);
|
|
597
|
+
for ($(N.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) $(N.uponSanitizeShadowNode, t, null), Vt(t), Gt(t), zt(t.content) && Kt(t.content);
|
|
598
|
+
$(N.afterSanitizeShadowDOM, e, null);
|
|
576
599
|
}, qt = function(e) {
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
}, $ = function(e) {
|
|
581
|
-
if (e.nodeType === k.element && e.shadowRoot instanceof a) {
|
|
582
|
-
let t = e.shadowRoot;
|
|
583
|
-
$(t), qt(t);
|
|
600
|
+
if ((T ? T(e) : e.nodeType) === j.element) {
|
|
601
|
+
let t = ue ? ue(e) : e.shadowRoot;
|
|
602
|
+
zt(t) && (qt(t), Kt(t));
|
|
584
603
|
}
|
|
585
|
-
let t = e.childNodes;
|
|
604
|
+
let t = b ? b(e) : e.childNodes;
|
|
586
605
|
if (!t) return;
|
|
587
606
|
let n = [];
|
|
588
|
-
|
|
589
|
-
|
|
607
|
+
h(t, (e) => {
|
|
608
|
+
g(n, e);
|
|
590
609
|
});
|
|
591
|
-
for (let e of n)
|
|
610
|
+
for (let e of n) qt(e);
|
|
592
611
|
};
|
|
593
612
|
return t.sanitize = function(e) {
|
|
594
|
-
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null,
|
|
595
|
-
if (
|
|
613
|
+
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
|
|
614
|
+
if (St = !e, St && (e = "<!-->"), typeof e != "string" && !Bt(e) && (e = fe(e), typeof e != "string")) throw de("dirty is not a string, aborting");
|
|
596
615
|
if (!t.isSupported) return e;
|
|
597
|
-
if (
|
|
598
|
-
let t = e.nodeName;
|
|
616
|
+
if (st || jt(n), t.removed = [], typeof e == "string" && (U = !1), U) {
|
|
617
|
+
let t = E ? E(e) : e.nodeName;
|
|
599
618
|
if (typeof t == "string") {
|
|
600
|
-
let e =
|
|
601
|
-
if (!
|
|
619
|
+
let e = Y(t);
|
|
620
|
+
if (!P[e] || L[e]) throw de("root node is forbidden and cannot be sanitized in-place");
|
|
602
621
|
}
|
|
603
|
-
|
|
604
|
-
|
|
622
|
+
if (Rt(e)) throw de("root node is clobbered and cannot be sanitized in-place");
|
|
623
|
+
qt(e);
|
|
624
|
+
} else if (Bt(e)) i = Ft("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === j.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), qt(a);
|
|
605
625
|
else {
|
|
606
|
-
if (!
|
|
607
|
-
if (i =
|
|
626
|
+
if (!H && !z && !V && e.indexOf("<") === -1) return O && ut ? O.createHTML(e) : e;
|
|
627
|
+
if (i = Ft(e), !i) return H ? null : ut ? M : "";
|
|
608
628
|
}
|
|
609
|
-
i &&
|
|
610
|
-
let
|
|
611
|
-
for (;
|
|
612
|
-
if (
|
|
613
|
-
if (
|
|
614
|
-
if (
|
|
615
|
-
else
|
|
616
|
-
return (
|
|
629
|
+
i && ct && Z(i.firstChild);
|
|
630
|
+
let c = It(U ? e : i);
|
|
631
|
+
for (; o = c.nextNode();) Vt(o), Gt(o), zt(o.content) && Kt(o.content);
|
|
632
|
+
if (U) return z && Lt(e), e;
|
|
633
|
+
if (H) {
|
|
634
|
+
if (z && Lt(i), lt) for (s = He.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
|
|
635
|
+
else s = i;
|
|
636
|
+
return (F.shadowroot || F.shadowrootmode) && (s = We.call(r, s, !0)), s;
|
|
617
637
|
}
|
|
618
|
-
let
|
|
619
|
-
return
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
638
|
+
let l = V ? i.outerHTML : i.innerHTML;
|
|
639
|
+
return V && P["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && w(Ne, i.ownerDocument.doctype.name) && (l = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + l), z && h([
|
|
640
|
+
Ge,
|
|
641
|
+
Ke,
|
|
642
|
+
qe
|
|
623
643
|
], (e) => {
|
|
624
|
-
|
|
625
|
-
}),
|
|
644
|
+
l = y(l, e, " ");
|
|
645
|
+
}), O && ut ? O.createHTML(l) : l;
|
|
626
646
|
}, t.setConfig = function() {
|
|
627
|
-
|
|
647
|
+
jt(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), st = !0;
|
|
628
648
|
}, t.clearConfig = function() {
|
|
629
|
-
|
|
649
|
+
X = null, st = !1;
|
|
630
650
|
}, t.isValidAttribute = function(e, t, n) {
|
|
631
|
-
return
|
|
651
|
+
return X || jt({}), Ht(Y(e), Y(t), n);
|
|
632
652
|
}, t.addHook = function(e, t) {
|
|
633
|
-
typeof t == "function" &&
|
|
653
|
+
typeof t == "function" && g(N[e], t);
|
|
634
654
|
}, t.removeHook = function(e, t) {
|
|
635
655
|
if (t !== void 0) {
|
|
636
|
-
let n =
|
|
637
|
-
return n === -1 ? void 0 :
|
|
656
|
+
let n = ne(N[e], t);
|
|
657
|
+
return n === -1 ? void 0 : ie(N[e], n, 1)[0];
|
|
638
658
|
}
|
|
639
|
-
return
|
|
659
|
+
return re(N[e]);
|
|
640
660
|
}, t.removeHooks = function(e) {
|
|
641
|
-
|
|
661
|
+
N[e] = [];
|
|
642
662
|
}, t.removeAllHooks = function() {
|
|
643
|
-
|
|
663
|
+
N = Le();
|
|
644
664
|
}, t;
|
|
645
665
|
}
|
|
646
|
-
var
|
|
666
|
+
var M = Re();
|
|
647
667
|
//#endregion
|
|
648
|
-
export {
|
|
668
|
+
export { M as purify };
|
|
649
669
|
|
|
650
670
|
//# sourceMappingURL=purify.es.js.map
|