@file-viewer/vue3 3.3.3 → 3.3.5

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.
@@ -1,1217 +0,0 @@
1
- import { r as e, t } from "./objectSpread2.js";
2
- import { a as n, c as r, i, l as a, n as o, o as s, r as c, s as l, t as u } from "./export.js";
3
- import { i as d, n as f, r as p, t as ee } from "./printMask.js";
4
- // ../../../node_modules/.pnpm/dompurify@3.4.17/node_modules/dompurify/dist/purify.es.mjs
5
- function m(e, t) {
6
- this.v = e, this.k = t;
7
- }
8
- function h(e, t) {
9
- (t == null || t > e.length) && (t = e.length);
10
- for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
11
- return r;
12
- }
13
- function g(e) {
14
- if (Array.isArray(e)) return e;
15
- }
16
- function te(e, t) {
17
- var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
18
- if (n != null) {
19
- var r, i, a, o, s = [], c = !0, l = !1;
20
- try {
21
- if (a = (n = n.call(e)).next, t === 0) {
22
- if (Object(n) !== n) return;
23
- c = !1;
24
- } else for (; !(c = (r = a.call(n)).done) && (s.push(r.value), s.length !== t); c = !0);
25
- } catch (e) {
26
- l = !0, i = e;
27
- } finally {
28
- try {
29
- if (!c && n.return != null && (o = n.return(), Object(o) !== o)) return;
30
- } finally {
31
- if (l) throw i;
32
- }
33
- }
34
- return s;
35
- }
36
- }
37
- function ne() {
38
- throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
39
- }
40
- function _(e, t) {
41
- return g(e) || te(e, t) || v(e, t) || ne();
42
- }
43
- function v(e, t) {
44
- if (e) {
45
- if (typeof e == "string") return h(e, t);
46
- var n = {}.toString.call(e).slice(8, -1);
47
- return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? h(e, t) : void 0;
48
- }
49
- }
50
- function y(e) {
51
- var t, n;
52
- function r(t, n) {
53
- try {
54
- var a = e[t](n), o = a.value, s = o instanceof m;
55
- Promise.resolve(s ? o.v : o).then(function(n) {
56
- if (s) {
57
- var c = t === "return" && o.k ? t : "next";
58
- if (!o.k || n.done) return r(c, n);
59
- n = e[c](n).value;
60
- }
61
- i(!!a.done, n);
62
- }, function(e) {
63
- r("throw", e);
64
- });
65
- } catch (e) {
66
- i(2, e);
67
- }
68
- }
69
- function i(e, i) {
70
- e === 2 ? t.reject(i) : t.resolve({
71
- value: i,
72
- done: e
73
- }), (t = t.next) ? r(t.key, t.arg) : n = null;
74
- }
75
- this._invoke = function(e, i) {
76
- return new Promise(function(a, o) {
77
- var s = {
78
- key: e,
79
- arg: i,
80
- resolve: a,
81
- reject: o,
82
- next: null
83
- };
84
- n ? n = n.next = s : (t = n = s, r(e, i));
85
- });
86
- }, typeof e.return != "function" && (this.return = void 0);
87
- }
88
- y.prototype[typeof Symbol == "function" && Symbol.asyncIterator || "@@asyncIterator"] = function() {
89
- return this;
90
- }, y.prototype.next = function(e) {
91
- return this._invoke("next", e);
92
- }, y.prototype.throw = function(e) {
93
- return this._invoke("throw", e);
94
- }, y.prototype.return = function(e) {
95
- return this._invoke("return", e);
96
- };
97
- var re = Object.entries, b = Object.setPrototypeOf, ie = Object.isFrozen, ae = Object.getPrototypeOf, oe = Object.getOwnPropertyDescriptor, x = Object.freeze, S = Object.seal, se = Object.create, C = typeof Reflect < "u" && Reflect, w = C.apply, ce = C.construct;
98
- x || (x = function(e) {
99
- return e;
100
- }), S || (S = function(e) {
101
- return e;
102
- }), w || (w = function(e, t) {
103
- var n = [...arguments].slice(2);
104
- return e.apply(t, n);
105
- }), ce || (ce = function(e) {
106
- return new e(...[...arguments].slice(1));
107
- });
108
- var T = j(Array.prototype.forEach);
109
- Array.prototype.indexOf;
110
- var le = j(Array.prototype.lastIndexOf), ue = j(Array.prototype.pop), de = j(Array.prototype.push), fe = j(Array.prototype.slice), pe = j(Array.prototype.splice), me = Array.isArray, he = De(Set), ge = j(Set.prototype.add), _e = j(Set.prototype.has), E = j(String.prototype.toLowerCase), ve = j(String.prototype.toString), ye = j(String.prototype.match), be = j(String.prototype.replace), xe = j(String.prototype.indexOf), Se = j(String.prototype.trim), Ce = j(Number.prototype.toString), we = j(Boolean.prototype.toString), Te = typeof BigInt > "u" ? null : j(BigInt.prototype.toString), D = typeof Symbol > "u" ? null : j(Symbol.prototype.toString), O = j(Object.prototype.hasOwnProperty), Ee = j(Object.prototype.toString), k = j(RegExp.prototype.test), A = De(TypeError);
111
- function j(e) {
112
- return function(t) {
113
- t instanceof RegExp && (t.lastIndex = 0);
114
- var n = [...arguments].slice(1);
115
- return w(e, t, n);
116
- };
117
- }
118
- function De(e) {
119
- return function() {
120
- return ce(e, [...arguments]);
121
- };
122
- }
123
- function M(e, t) {
124
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : E;
125
- if (b && b(e, null), !me(t)) return e;
126
- let r = t.length;
127
- for (; r--;) {
128
- let i = t[r];
129
- if (typeof i == "string") {
130
- let e = n(i);
131
- e !== i && (ie(t) || (t[r] = e), i = e);
132
- }
133
- e[i] = !0;
134
- }
135
- return e;
136
- }
137
- function Oe(e) {
138
- for (let t = 0; t < e.length; t++) O(e, t) || (e[t] = null);
139
- return e;
140
- }
141
- function N(e) {
142
- let t = se(null);
143
- for (let r of re(e)) {
144
- var n = _(r, 2);
145
- let i = n[0], a = n[1];
146
- O(e, i) && (t[i] = me(a) ? Oe(a) : a && typeof a == "object" && a.constructor === Object ? N(a) : a);
147
- }
148
- return t;
149
- }
150
- function ke(e) {
151
- switch (typeof e) {
152
- case "string": return e;
153
- case "number": return Ce(e);
154
- case "boolean": return we(e);
155
- case "bigint": return Te ? Te(e) : "0";
156
- case "symbol": return D ? D(e) : "Symbol()";
157
- case "undefined": return Ee(e);
158
- case "function":
159
- case "object": {
160
- if (e === null) return Ee(e);
161
- let t = e, n = P(t, "toString");
162
- if (typeof n == "function") {
163
- let e = n(t);
164
- return typeof e == "string" ? e : Ee(e);
165
- }
166
- return Ee(e);
167
- }
168
- default: return Ee(e);
169
- }
170
- }
171
- function P(e, t) {
172
- for (; e !== null;) {
173
- let n = oe(e, t);
174
- if (n) {
175
- if (n.get) return j(n.get);
176
- if (typeof n.value == "function") return j(n.value);
177
- }
178
- e = ae(e);
179
- }
180
- function n() {
181
- return null;
182
- }
183
- return n;
184
- }
185
- function Ae(e, t) {
186
- for (; e !== null;) {
187
- let n = oe(e, t);
188
- if (n) return n.get ? j(n.get) : null;
189
- e = ae(e);
190
- }
191
- return null;
192
- }
193
- function je(e) {
194
- try {
195
- return k(e, ""), !0;
196
- } catch (e) {
197
- return !1;
198
- }
199
- }
200
- var Me = x(/* @__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(".")), Ne = x(/* @__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(".")), Pe = x([
201
- "feBlend",
202
- "feColorMatrix",
203
- "feComponentTransfer",
204
- "feComposite",
205
- "feConvolveMatrix",
206
- "feDiffuseLighting",
207
- "feDisplacementMap",
208
- "feDistantLight",
209
- "feDropShadow",
210
- "feFlood",
211
- "feFuncA",
212
- "feFuncB",
213
- "feFuncG",
214
- "feFuncR",
215
- "feGaussianBlur",
216
- "feImage",
217
- "feMerge",
218
- "feMergeNode",
219
- "feMorphology",
220
- "feOffset",
221
- "fePointLight",
222
- "feSpecularLighting",
223
- "feSpotLight",
224
- "feTile",
225
- "feTurbulence"
226
- ]), Fe = x([
227
- "animate",
228
- "color-profile",
229
- "cursor",
230
- "discard",
231
- "font-face",
232
- "font-face-format",
233
- "font-face-name",
234
- "font-face-src",
235
- "font-face-uri",
236
- "foreignobject",
237
- "hatch",
238
- "hatchpath",
239
- "mesh",
240
- "meshgradient",
241
- "meshpatch",
242
- "meshrow",
243
- "missing-glyph",
244
- "script",
245
- "set",
246
- "solidcolor",
247
- "unknown",
248
- "use"
249
- ]), Ie = x(/* @__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(".")), Le = x([
250
- "maction",
251
- "maligngroup",
252
- "malignmark",
253
- "mlongdiv",
254
- "mscarries",
255
- "mscarry",
256
- "msgroup",
257
- "mstack",
258
- "msline",
259
- "msrow",
260
- "semantics",
261
- "annotation",
262
- "annotation-xml",
263
- "mprescripts",
264
- "none"
265
- ]), Re = x(["#text"]), ze = x(/* @__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(".")), Be = x(/* @__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(".")), Ve = x(/* @__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(".")), He = x([
266
- "xlink:href",
267
- "xml:id",
268
- "xlink:title",
269
- "xml:space",
270
- "xmlns:xlink"
271
- ]), Ue = S(/{{[\w\W]*|^[\w\W]*}}/g), We = S(/<%[\w\W]*|^[\w\W]*%>/g), Ge = S(/\${[\w\W]*/g), Ke = S(/^data-[\-\w.\u00B7-\uFFFF]+$/), qe = S(/^aria-[\-\w]+$/), Je = S(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Ye = S(/^(?:\w+script|data):/i), Xe = S(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ze = S(/^html$/i), Qe = S(/^[a-z][.\w]*(-[.\w]+)+$/i), $e = S(/<[/\w!]/g), et = S(/<[/\w]/g), tt = S(/<\/no(script|embed|frames)/i), nt = S(/\/>/i), F = {
272
- element: 1,
273
- attribute: 2,
274
- text: 3,
275
- cdataSection: 4,
276
- entityReference: 5,
277
- entityNode: 6,
278
- processingInstruction: 7,
279
- comment: 8,
280
- document: 9,
281
- documentType: 10,
282
- documentFragment: 11,
283
- notation: 12
284
- }, rt = x(M({}, [
285
- "style",
286
- "script",
287
- "xmp",
288
- "iframe",
289
- "noembed",
290
- "noframes",
291
- "plaintext",
292
- "noscript"
293
- ])), it = function() {
294
- return typeof window > "u" ? null : window;
295
- }, at = function(e, t) {
296
- if (typeof e != "object" || typeof e.createPolicy != "function") return null;
297
- let n = null, r = "data-tt-policy-suffix";
298
- t && t.hasAttribute(r) && (n = t.getAttribute(r));
299
- let i = "dompurify" + (n ? "#" + n : "");
300
- try {
301
- return e.createPolicy(i, {
302
- createHTML(e) {
303
- return e;
304
- },
305
- createScriptURL(e) {
306
- return e;
307
- }
308
- });
309
- } catch (e) {
310
- return console.warn("TrustedTypes policy " + i + " could not be created."), null;
311
- }
312
- }, ot = function() {
313
- return {
314
- afterSanitizeAttributes: [],
315
- afterSanitizeElements: [],
316
- afterSanitizeShadowDOM: [],
317
- beforeSanitizeAttributes: [],
318
- beforeSanitizeElements: [],
319
- beforeSanitizeShadowDOM: [],
320
- uponSanitizeAttribute: [],
321
- uponSanitizeElement: [],
322
- uponSanitizeShadowNode: []
323
- };
324
- }, I = function(e, t, n, r) {
325
- return O(e, t) && me(e[t]) ? M(r.base ? N(r.base) : {}, e[t], r.transform) : n;
326
- }, st = function(e, t, n) {
327
- let r = O(e, t) ? e[t] : void 0;
328
- return r && typeof r == "object" ? N(r) : n();
329
- };
330
- function ct() {
331
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : it(), t = (e) => ct(e);
332
- if (t.version = "3.4.17", t.removed = [], !e || !e.document || e.document.nodeType !== F.document || !e.Element) return t.isSupported = !1, t;
333
- let n = e.document, r = n, i = r.currentScript;
334
- e.DocumentFragment;
335
- let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
336
- e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
337
- let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = P(d, "cloneNode"), p = P(d, "remove"), ee = P(d, "removeAttributeNode"), m = P(d, "nextSibling"), h = P(d, "childNodes"), g = P(d, "parentNode"), te = P(d, "shadowRoot"), ne = P(d, "attributes"), _ = o && o.prototype ? P(o.prototype, "nodeType") : null, v = o && o.prototype ? P(o.prototype, "nodeName") : null, y = o && o.prototype ? P(o.prototype, "ownerDocument") : null, b = function(e) {
338
- return _ ? _(e) : e.nodeType;
339
- }, ie = function(e) {
340
- return v ? v(e) : e.nodeName;
341
- }, ae = Ae(d, "namespaceURI"), oe = function(e) {
342
- return ae ? ae(e) : e.namespaceURI;
343
- };
344
- if (typeof a == "function") {
345
- let e = n.createElement("template");
346
- e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
347
- }
348
- let C, w = "", ce, Ce = !1, we = 0, Te = function() {
349
- if (we > 0) throw A("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.");
350
- }, D = function(e) {
351
- Te(), we++;
352
- try {
353
- return C.createHTML(e);
354
- } finally {
355
- we--;
356
- }
357
- }, Ee = function(e) {
358
- Te(), we++;
359
- try {
360
- return C.createScriptURL(e);
361
- } finally {
362
- we--;
363
- }
364
- }, j = function() {
365
- return Ce || (ce = at(u, i), Ce = !0), ce;
366
- }, De = n, Oe = De.implementation, lt = De.createNodeIterator, ut = De.createDocumentFragment, dt = De.getElementsByTagName, ft = r.importNode, L = ot();
367
- t.isSupported = typeof re == "function" && typeof g == "function" && Oe && Oe.createHTMLDocument !== void 0;
368
- let pt = Ue, mt = We, ht = Ge, gt = Ke, _t = qe, vt = Ye, yt = Xe, bt = Qe, R = Je, z = null, xt = M({}, [
369
- ...Me,
370
- ...Ne,
371
- ...Pe,
372
- ...Ie,
373
- ...Re
374
- ]), B = null, St = M({}, [
375
- ...ze,
376
- ...Be,
377
- ...Ve,
378
- ...He
379
- ]), V = Object.seal(se(null, {
380
- tagNameCheck: {
381
- writable: !0,
382
- configurable: !1,
383
- enumerable: !0,
384
- value: null
385
- },
386
- attributeNameCheck: {
387
- writable: !0,
388
- configurable: !1,
389
- enumerable: !0,
390
- value: null
391
- },
392
- allowCustomizedBuiltInElements: {
393
- writable: !0,
394
- configurable: !1,
395
- enumerable: !0,
396
- value: !1
397
- }
398
- })), H = null, Ct = null, U = Object.seal(se(null, {
399
- tagCheck: {
400
- writable: !0,
401
- configurable: !1,
402
- enumerable: !0,
403
- value: null
404
- },
405
- attributeCheck: {
406
- writable: !0,
407
- configurable: !1,
408
- enumerable: !0,
409
- value: null
410
- }
411
- })), wt = !0, Tt = !0, Et = !1, Dt = !0, W = !1, G = !0, K = !1, Ot = !1, kt = null, At = null, jt = !1, Mt = !1, Nt = !1, Pt = !1, Ft = !0, It = !1, Lt = "user-content-", Rt = !0, zt = !1, q = null, Bt = {}, J = null, Vt = M({}, /* @__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(".")), Ht = null, Ut = M({}, [
412
- "audio",
413
- "video",
414
- "img",
415
- "source",
416
- "image",
417
- "track"
418
- ]), Wt = null, Gt = M({}, [
419
- "alt",
420
- "class",
421
- "for",
422
- "id",
423
- "label",
424
- "name",
425
- "pattern",
426
- "placeholder",
427
- "role",
428
- "summary",
429
- "title",
430
- "value",
431
- "style",
432
- "xmlns"
433
- ]), Kt = "http://www.w3.org/1998/Math/MathML", qt = "http://www.w3.org/2000/svg", Y = "http://www.w3.org/1999/xhtml", Jt = Y, Yt = !1, Xt = null, Zt = M({}, [
434
- Kt,
435
- qt,
436
- Y
437
- ], ve), Qt = x([
438
- "mi",
439
- "mo",
440
- "mn",
441
- "ms",
442
- "mtext"
443
- ]), $t = M({}, Qt), en = x(["annotation-xml"]), tn = M({}, en), nn = M({}, [
444
- "title",
445
- "style",
446
- "font",
447
- "a",
448
- "script"
449
- ]), rn = null, an = ["application/xhtml+xml", "text/html"], X = null, on = null, sn = n.createElement("form"), cn = function(e) {
450
- return e instanceof RegExp || e instanceof Function;
451
- }, ln = function() {
452
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
453
- if (on && on === e) return;
454
- e && typeof e == "object" || (e = {}), e = N(e), rn = an.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, X = rn === "application/xhtml+xml" ? ve : E, z = I(e, "ALLOWED_TAGS", xt, { transform: X }), B = I(e, "ALLOWED_ATTR", St, { transform: X }), Xt = I(e, "ALLOWED_NAMESPACES", Zt, { transform: ve }), Wt = I(e, "ADD_URI_SAFE_ATTR", Gt, {
455
- transform: X,
456
- base: Gt
457
- }), Ht = I(e, "ADD_DATA_URI_TAGS", Ut, {
458
- transform: X,
459
- base: Ut
460
- }), J = I(e, "FORBID_CONTENTS", Vt, { transform: X }), H = I(e, "FORBID_TAGS", N({}), { transform: X }), Ct = I(e, "FORBID_ATTR", N({}), { transform: X }), Bt = O(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? N(e.USE_PROFILES) : e.USE_PROFILES : !1, wt = e.ALLOW_ARIA_ATTR !== !1, Tt = e.ALLOW_DATA_ATTR !== !1, Et = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Dt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, W = e.SAFE_FOR_TEMPLATES || !1, G = e.SAFE_FOR_XML !== !1, K = e.WHOLE_DOCUMENT || !1, Mt = e.RETURN_DOM || !1, Nt = e.RETURN_DOM_FRAGMENT || !1, Pt = e.RETURN_TRUSTED_TYPE || !1, jt = e.FORCE_BODY || !1, Ft = e.SANITIZE_DOM !== !1, It = e.SANITIZE_NAMED_PROPS || !1, Rt = e.KEEP_CONTENT !== !1, zt = e.IN_PLACE || !1, R = je(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Je, Jt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Y, $t = st(e, "MATHML_TEXT_INTEGRATION_POINTS", () => M({}, Qt)), tn = st(e, "HTML_INTEGRATION_POINTS", () => M({}, en));
461
- let t = st(e, "CUSTOM_ELEMENT_HANDLING", () => se(null));
462
- if (V = se(null), O(t, "tagNameCheck") && cn(t.tagNameCheck) && (V.tagNameCheck = t.tagNameCheck), O(t, "attributeNameCheck") && cn(t.attributeNameCheck) && (V.attributeNameCheck = t.attributeNameCheck), O(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (V.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), S(V), W && (Tt = !1), Nt && (Mt = !0), Bt && (z = M({}, Re), B = se(null), Bt.html === !0 && (M(z, Me), M(B, ze)), Bt.svg === !0 && (M(z, Ne), M(B, Be), M(B, He)), Bt.svgFilters === !0 && (M(z, Pe), M(B, Be), M(B, He)), Bt.mathMl === !0 && (M(z, Ie), M(B, Ve), M(B, He))), U.tagCheck = null, U.attributeCheck = null, O(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? U.tagCheck = e.ADD_TAGS : me(e.ADD_TAGS) && (z === xt && (z = N(z)), M(z, e.ADD_TAGS, X))), O(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? U.attributeCheck = e.ADD_ATTR : me(e.ADD_ATTR) && (B === St && (B = N(B)), M(B, e.ADD_ATTR, X))), O(e, "ADD_FORBID_CONTENTS") && me(e.ADD_FORBID_CONTENTS) && (J === Vt && (J = N(J)), M(J, e.ADD_FORBID_CONTENTS, X)), Rt && (z["#text"] = !0), K && M(z, [
463
- "html",
464
- "head",
465
- "body"
466
- ]), z.table && (M(z, ["tbody"]), delete H.tbody), e.TRUSTED_TYPES_POLICY) {
467
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw A("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
468
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw A("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
469
- let t = C;
470
- C = e.TRUSTED_TYPES_POLICY;
471
- try {
472
- w = D("");
473
- } catch (e) {
474
- throw C = t, e;
475
- }
476
- } else e.TRUSTED_TYPES_POLICY === null ? (C = void 0, w = "") : (C === void 0 && (C = j()), C && typeof w == "string" && (w = D("")));
477
- x && x(e), on = e;
478
- }, un = M({}, [
479
- ...Ne,
480
- ...Pe,
481
- ...Fe
482
- ]), dn = M({}, [...Ie, ...Le]), fn = function(e, t, n) {
483
- return t.namespaceURI === Y ? e === "svg" : t.namespaceURI === Kt ? e === "svg" && (n === "annotation-xml" || $t[n]) : !!un[e];
484
- }, pn = function(e, t, n) {
485
- return t.namespaceURI === Y ? e === "math" : t.namespaceURI === qt ? e === "math" && tn[n] : !!dn[e];
486
- }, mn = function(e, t, n) {
487
- return t.namespaceURI === qt && !tn[n] || t.namespaceURI === Kt && !$t[n] ? !1 : !dn[e] && (nn[e] || !un[e]);
488
- }, hn = function(e) {
489
- let t = oe(e), n = E(ie(e)), r = g(e), i, a;
490
- return r && b(r) === F.element ? (i = { namespaceURI: oe(r) }, a = E(ie(r))) : (i = { namespaceURI: Jt }, a = "template"), Xt[t] ? t === qt ? fn(n, i, a) : t === Kt ? pn(n, i, a) : t === Y ? mn(n, i, a) : !!(rn === "application/xhtml+xml" && Xt[t]) : !1;
491
- }, Z = function(e) {
492
- de(t.removed, { element: e });
493
- try {
494
- g(e).removeChild(e);
495
- } catch (t) {
496
- if (p(e), !g(e)) throw A("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
497
- }
498
- }, gn = function(e, t, n) {
499
- try {
500
- ee(e, t);
501
- } catch (t) {
502
- try {
503
- e.removeAttribute(n);
504
- } catch (e) {}
505
- }
506
- }, _n = function(e) {
507
- xn(e);
508
- let t = h(e);
509
- t && T(fe(t), (e) => {
510
- try {
511
- p(e);
512
- } catch (e) {}
513
- });
514
- let n = b(e) === F.element ? ne(e) : null;
515
- if (n) for (let t = n.length - 1; t >= 0; --t) {
516
- let r = n[t], i = r && r.name;
517
- typeof i == "string" && gn(e, r, i);
518
- }
519
- }, vn = function(e, n, r) {
520
- if (!r) try {
521
- r = n.getAttributeNode(e);
522
- } catch (e) {
523
- r = null;
524
- }
525
- de(t.removed, {
526
- attribute: r || null,
527
- from: n
528
- });
529
- try {
530
- r ? ee(n, r) : n.removeAttribute(e);
531
- } catch (t) {
532
- try {
533
- n.removeAttribute(e);
534
- } catch (e) {}
535
- }
536
- if (e === "is") {
537
- if (Mt || Nt) try {
538
- Z(n);
539
- } catch (e) {}
540
- else try {
541
- n.setAttribute(e, "");
542
- } catch (e) {}
543
- }
544
- }, yn = function(e) {
545
- let t = ne(e);
546
- if (t) for (let n = t.length - 1; n >= 0; --n) {
547
- let r = t[n], i = r && r.name;
548
- typeof i != "string" || B[X(i)] || gn(e, r, i);
549
- }
550
- }, bn = function(e, t) {
551
- let n = arguments.length > 2 && arguments[2] !== void 0 && arguments[2], r = [e];
552
- for (; r.length > 0;) {
553
- let e = r.pop();
554
- if (t(e) === !1) continue;
555
- if (n && b(e) === F.element) {
556
- let t = te(e);
557
- Q(t) && r.push(t);
558
- }
559
- let i = h(e);
560
- if (i) for (let e = i.length - 1; e >= 0; --e) r.push(i[e]);
561
- }
562
- }, xn = function(e) {
563
- bn(e, (e) => {
564
- b(e) === F.element && yn(e);
565
- });
566
- }, Sn = function(e) {
567
- let t = [];
568
- return bn(e, (e) => {
569
- t.push(e);
570
- }, !0), t;
571
- }, Cn = function(e, t) {
572
- let n = he();
573
- T(Sn(e), (e) => {
574
- b(e) === F.element && ge(n, e);
575
- }), T(t, (e) => {
576
- b(e) === F.element && !_e(n, e) && yn(e);
577
- });
578
- }, wn = function(e, n) {
579
- let r = !1;
580
- return T(t.removed, (t) => {
581
- t.element && (r = r || t.element === e, xn(t.element));
582
- }), Cn(e, n), r;
583
- }, Tn = function(e, t) {
584
- let n = q, r = null, i = () => (r || (r = he(), T(t, (e) => {
585
- ge(r, e);
586
- })), r);
587
- for (let t = 0;; t++) {
588
- let r = Sn(e), a = [e], o = !1;
589
- if (T(r, (e) => {
590
- b(e) === F.documentFragment ? de(a, e) : !o && !_e(n, e) && (o = _e(i(), e));
591
- }), !o) return;
592
- if (t >= 8) throw A("the tree kept changing during in-place sanitization; refusing to return it");
593
- T(a, (t, n) => {
594
- En(t, n > 0, e, i());
595
- });
596
- }
597
- }, En = function(e, t, n, r) {
598
- let i = jn(e), a;
599
- for (; a = i.nextNode();) _e(r, a) && !_e(q, a) && (t && $(L.uponSanitizeShadowNode, a, null), Hn(a, n), Yn(a, n), Q(a.content) && Xn(a.content));
600
- }, Dn = function(e) {
601
- q && ge(q, e);
602
- }, On = function(e, t) {
603
- return G ? e === "patchsrc" || e === "for" && t !== "label" && t !== "output" : !1;
604
- }, kn = function(e) {
605
- G && bn(e, (e) => {
606
- let t = b(e);
607
- if (t === F.processingInstruction || t === F.comment && k(et, e.data)) {
608
- try {
609
- p(e);
610
- } catch (e) {}
611
- return !1;
612
- }
613
- if (t === F.element) {
614
- let t = e, n = X(ie(e));
615
- try {
616
- t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && On("for", n) && t.removeAttribute("for");
617
- } catch (e) {}
618
- }
619
- return !0;
620
- });
621
- }, An = function(e) {
622
- let t = null, r = null;
623
- if (jt) e = "<remove></remove>" + e;
624
- else {
625
- let t = ye(e, /^[\r\n\t ]+/);
626
- r = t && t[0];
627
- }
628
- rn === "application/xhtml+xml" && Jt === Y && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
629
- let i = C ? D(e) : e;
630
- if (Jt === Y) try {
631
- t = new l().parseFromString(i, rn);
632
- } catch (e) {}
633
- if (!t || !t.documentElement) {
634
- t = Oe.createDocument(Jt, "template", null);
635
- try {
636
- t.documentElement.innerHTML = Yt ? w : i;
637
- } catch (e) {}
638
- }
639
- let a = t.body || t.documentElement;
640
- return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Jt === Y ? dt.call(t, K ? "html" : "body")[0] : K ? t.documentElement : a;
641
- }, jn = function(e) {
642
- let t = y ? y(e) : e.ownerDocument;
643
- return lt.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
644
- }, Mn = function(e) {
645
- return e = be(e, pt, " "), e = be(e, mt, " "), e = be(e, ht, " "), e;
646
- }, Nn = function(e) {
647
- var t;
648
- Pn(e);
649
- let n = (t = e.querySelectorAll) == null ? void 0 : t.call(e, "template");
650
- n && T(n, (e) => {
651
- Q(e.content) && Nn(e.content);
652
- });
653
- }, Pn = function(e) {
654
- e.normalize();
655
- let t = y ? y(e) : e.ownerDocument, n = lt.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
656
- for (; r;) r.data = Mn(r.data), r = n.nextNode();
657
- }, Fn = function(e) {
658
- let t = v ? v(e) : null;
659
- return typeof t != "string" || X(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== ne(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.childNodes !== h(e);
660
- }, Q = function(e) {
661
- if (!_ || typeof e != "object" || !e) return !1;
662
- try {
663
- return _(e) === F.documentFragment;
664
- } catch (e) {
665
- return !1;
666
- }
667
- }, In = function(e) {
668
- if (!_ || typeof e != "object" || !e) return !1;
669
- try {
670
- return typeof _(e) == "number";
671
- } catch (e) {
672
- return !1;
673
- }
674
- };
675
- function $(e, n, r) {
676
- e.length !== 0 && T(e, (e) => {
677
- e.call(t, n, r, on);
678
- });
679
- }
680
- let Ln = function(e, t) {
681
- return !!(G && e.hasChildNodes() && !In(e.firstElementChild) && k($e, e.textContent) && k($e, e.innerHTML) || G && rt[t] && b(e) === F.element && oe(e) === Y && (In(e.firstElementChild) || typeof e.textContent == "string" && k($e, e.textContent)) || e.nodeType === F.processingInstruction || G && e.nodeType === F.comment && k(et, e.data));
682
- }, Rn = function(e, t) {
683
- return e instanceof RegExp ? k(e, t) : e instanceof Function && !!e(t, ...[...arguments].slice(2));
684
- }, zn = function(e, t, n) {
685
- if (!H[t] && Gn(t) && Rn(V.tagNameCheck, t)) return !1;
686
- if (Rt && !J[t] && !J[E(t)]) {
687
- let t = g(e), r = h(e);
688
- if (r && t) {
689
- let i = r.length;
690
- for (let a = i - 1; a >= 0; --a) {
691
- let i = e === n ? f(r[a], !0) : r[a];
692
- t.insertBefore(i, m(e));
693
- }
694
- }
695
- }
696
- return Z(e), !0;
697
- }, Bn = function(e, t, n, r) {
698
- return e.length === 0 ? t : t === n || t === r ? N(t) : t;
699
- }, Vn = function(e, t) {
700
- return e === t || g(e) !== null ? !1 : (zt && xn(e), !0);
701
- }, Hn = function(e, n) {
702
- if (Dn(e), $(L.beforeSanitizeElements, e, null), Vn(e, n)) return !0;
703
- if (Fn(e)) return Z(e), !0;
704
- let r = X(ie(e));
705
- if (z = Bn(L.uponSanitizeElement, z, xt, kt), $(L.uponSanitizeElement, e, {
706
- tagName: r,
707
- allowedTags: z
708
- }), Vn(e, n)) return !0;
709
- if (Ln(e, r)) return Z(e), !0;
710
- if (H[r] || !(U.tagCheck instanceof Function && U.tagCheck(r)) && !z[r]) {
711
- let t = zn(e, r, n);
712
- return t === !1 && ($(L.afterSanitizeElements, e, null), Vn(e, n)) ? !0 : t;
713
- }
714
- if (b(e) === F.element && !hn(e) || (r === "noscript" || r === "noembed" || r === "noframes") && k(tt, e.innerHTML)) return Z(e), !0;
715
- if (W && e.nodeType === F.text) {
716
- let n = Mn(e.textContent);
717
- e.textContent !== n && (de(t.removed, { element: e.cloneNode() }), e.textContent = n);
718
- }
719
- return $(L.afterSanitizeElements, e, null), Vn(e, n);
720
- }, Un = function(e, t, r) {
721
- if (Ct[t] || On(t, e) || Ft && (t === "id" || t === "name") && (r in n || r in sn)) return !1;
722
- let i = B[t] || U.attributeCheck instanceof Function && U.attributeCheck(t, e);
723
- return Tt && k(gt, t) || wt && k(_t, t) ? !0 : i ? Wt[t] || k(R, be(r, yt, "")) || (t === "src" || t === "xlink:href" || t === "href") && e !== "script" && xe(r, "data:") === 0 && Ht[e] || Et && !k(vt, be(r, yt, "")) ? !0 : !r : Gn(e) && Rn(V.tagNameCheck, e) && Rn(V.attributeNameCheck, t, e) || t === "is" && V.allowCustomizedBuiltInElements && Rn(V.tagNameCheck, r);
724
- }, Wn = M({}, [
725
- "annotation-xml",
726
- "color-profile",
727
- "font-face",
728
- "font-face-format",
729
- "font-face-name",
730
- "font-face-src",
731
- "font-face-uri",
732
- "missing-glyph"
733
- ]), Gn = function(e) {
734
- return !Wn[E(e)] && k(bt, e);
735
- }, Kn = function(e, t, n, r) {
736
- if (C && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
737
- case "TrustedHTML": return D(r);
738
- case "TrustedScriptURL": return Ee(r);
739
- }
740
- return r;
741
- }, qn = function(e, t, n, r) {
742
- try {
743
- return n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), !Fn(e) || (Z(e), !1);
744
- } catch (n) {
745
- return vn(t, e), !1;
746
- }
747
- }, Jn = function(e, t) {
748
- return G && k(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, t) ? !0 : E(e) === "attributename" && ye(t, "href") !== null;
749
- }, Yn = function(e, n) {
750
- if ($(L.beforeSanitizeAttributes, e, null), Vn(e, n)) return;
751
- let r = e.attributes;
752
- if (!r || Fn(e)) return;
753
- B = Bn(L.uponSanitizeAttribute, B, St, At);
754
- let i = {
755
- attrName: "",
756
- attrValue: "",
757
- keepAttr: !0,
758
- allowedAttributes: B,
759
- forceKeepAttr: void 0
760
- }, a = r.length, o = X(e.nodeName);
761
- for (; a--;) {
762
- let n = r[a], s = n.name, c = n.namespaceURI, l = n.value, u = X(s), d = l, f = s === "value" ? d : Se(d), p = !1;
763
- i.attrName = u, i.attrValue = f, i.keepAttr = !0, i.forceKeepAttr = void 0, $(L.uponSanitizeAttribute, e, i), f = i.attrValue, It && (u === "id" || u === "name") && xe(f, Lt) !== 0 && (vn(s, e, n), f = Lt + f, p = !0), Jn(s, f) ? vn(s, e, n) : i.forceKeepAttr || (i.keepAttr ? !Dt && k(nt, f) ? vn(s, e, n) : (W && (f = Mn(f)), Un(o, u, f) ? (f = Kn(o, u, c, f), f !== d && qn(e, s, c, f) && p && ue(t.removed)) : vn(s, e, n)) : vn(s, e, n));
764
- }
765
- $(L.afterSanitizeAttributes, e, null), Vn(e, n);
766
- }, Xn = function(e) {
767
- let t = null, n = jn(e);
768
- for ($(L.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if ($(L.uponSanitizeShadowNode, t, null), Hn(t, e), Yn(t, e), Q(t.content) && Xn(t.content), b(t) === F.element) {
769
- let e = te(t);
770
- Q(e) && (Zn(e), Xn(e));
771
- }
772
- W && Pn(e), $(L.afterSanitizeShadowDOM, e, null);
773
- }, Zn = function(e) {
774
- let t = [{
775
- node: e,
776
- shadow: null
777
- }];
778
- for (; t.length > 0;) {
779
- let e = t.pop();
780
- if (e.shadow) {
781
- Xn(e.shadow);
782
- continue;
783
- }
784
- let n = e.node, r = b(n) === F.element, i = h(n);
785
- if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
786
- node: i[e],
787
- shadow: null
788
- });
789
- if (r) {
790
- let e = v ? v(n) : null;
791
- if (typeof e == "string" && X(e) === "template") {
792
- let e = n.content;
793
- Q(e) && t.push({
794
- node: e,
795
- shadow: null
796
- });
797
- }
798
- }
799
- if (r) {
800
- let e = te(n);
801
- Q(e) && t.push({
802
- node: null,
803
- shadow: e
804
- }, {
805
- node: e,
806
- shadow: null
807
- });
808
- }
809
- }
810
- };
811
- return t.sanitize = function(e) {
812
- let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
813
- if (Yt = !e, Yt && (e = "<!-->"), typeof e != "string" && !In(e) && (e = ke(e), typeof e != "string")) throw A("dirty is not a string, aborting");
814
- if (!t.isSupported) return e;
815
- Ot ? (z = kt, B = At) : ln(n), (L.uponSanitizeElement.length > 0 || L.uponSanitizeAttribute.length > 0) && (z = N(z)), L.uponSanitizeAttribute.length > 0 && (B = N(B)), t.removed = [];
816
- let c = zt && typeof e != "string" && In(e), l = [], u = q;
817
- if (c) {
818
- kn(e);
819
- let t = ie(e);
820
- if (typeof t == "string") {
821
- let n = X(t);
822
- if (!z[n] || H[n]) throw _n(e), A("root node is forbidden and cannot be sanitized in-place");
823
- }
824
- if (Fn(e)) throw _n(e), A("root node is clobbered and cannot be sanitized in-place");
825
- l = Sn(e), q = he();
826
- } else if (In(e)) i = An("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === F.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), Zn(i);
827
- else {
828
- if (!Mt && !W && !K && e.indexOf("<") === -1) return C && Pt ? D(e) : e;
829
- if (i = An(e), !i) return Mt ? null : Pt ? w : "";
830
- }
831
- i && jt && Z(i.firstChild);
832
- let d = c ? e : i;
833
- try {
834
- c && Zn(e);
835
- let t = jn(d);
836
- for (; o = t.nextNode();) Hn(o, d), Yn(o, d), Q(o.content) && Xn(o.content);
837
- c && Tn(e, l);
838
- } catch (t) {
839
- throw c && (_n(e), wn(e, l)), t;
840
- } finally {
841
- q = u;
842
- }
843
- if (c) {
844
- if (wn(e, l)) throw A("a node selected for removal could not be safely returned; refusing to sanitize in place");
845
- return W && Nn(e), e;
846
- }
847
- if (Mt) {
848
- if (W && Nn(i), Nt) for (s = ut.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
849
- else s = i;
850
- return (B.shadowroot || B.shadowrootmode) && (s = ft.call(r, s, !0)), s;
851
- }
852
- let f = K ? i.outerHTML : i.innerHTML;
853
- return K && z["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && k(Ze, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), W && (f = Mn(f)), C && Pt ? D(f) : f;
854
- }, t.setConfig = function() {
855
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
856
- ln(e), Ot = !0, kt = z, At = B;
857
- }, t.clearConfig = function() {
858
- on = null, Ot = !1, kt = null, At = null, C = ce, w = "";
859
- }, t.isValidAttribute = function(e, t, n) {
860
- on || ln({});
861
- let r = X(e), i = X(t);
862
- return typeof n == "string" && (Jn(t, n) || !Dt && k(nt, n)) ? !1 : Un(r, i, n);
863
- }, t.addHook = function(e, t) {
864
- typeof t == "function" && O(L, e) && de(L[e], t);
865
- }, t.removeHook = function(e, t) {
866
- if (O(L, e)) {
867
- if (t !== void 0) {
868
- let n = le(L[e], t);
869
- return n === -1 ? void 0 : pe(L[e], n, 1)[0];
870
- }
871
- return ue(L[e]);
872
- }
873
- }, t.removeHooks = function(e) {
874
- O(L, e) && (L[e] = []);
875
- }, t.removeAllHooks = function() {
876
- L = ot();
877
- }, t;
878
- }
879
- var lt = ct(), ut = (e) => e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), dt = {
880
- WHOLE_DOCUMENT: !0,
881
- USE_PROFILES: {
882
- html: !0,
883
- svg: !0,
884
- svgFilters: !0,
885
- mathMl: !0
886
- },
887
- ADD_TAGS: ["use"],
888
- ADD_ATTR: [
889
- "target",
890
- "rel",
891
- "download"
892
- ],
893
- FORBID_TAGS: [
894
- "script",
895
- "iframe",
896
- "object",
897
- "embed",
898
- "base",
899
- "form",
900
- "link"
901
- ],
902
- FORBID_ATTR: ["srcdoc"]
903
- }, ft = (e) => e || globalThis.document || null, L = (e) => /[A-Za-z0-9_-]/.test(e), pt = (e, t) => {
904
- let n = t + 1, r = e[n] || "";
905
- if (!r) return {
906
- value: "",
907
- nextIndex: n
908
- };
909
- if (r === "\r" || r === "\n" || r === "\f") return r === "\r" && e[n + 1] === "\n" && (n += 1), {
910
- value: "",
911
- nextIndex: n + 1
912
- };
913
- let i = "";
914
- for (; n < e.length && i.length < 6 && /[0-9a-f]/i.test(e[n] || "");) i += e[n], n += 1;
915
- if (i) {
916
- /\s/.test(e[n] || "") && (n += 1);
917
- let t = Number.parseInt(i, 16);
918
- return {
919
- value: t === 0 || t > 1114111 ? "�" : String.fromCodePoint(t),
920
- nextIndex: n
921
- };
922
- }
923
- return {
924
- value: r,
925
- nextIndex: n + 1
926
- };
927
- }, mt = (e) => {
928
- let t = "", n = "", r = 0;
929
- for (; r < e.length;) {
930
- let i = e[r] || "";
931
- if (n) {
932
- if (t += i, i === "\\") {
933
- t += e[r + 1] || "", r += 2;
934
- continue;
935
- }
936
- i === n && (n = ""), r += 1;
937
- continue;
938
- }
939
- if (i === "/" && e[r + 1] === "*") {
940
- let t = e.indexOf("*/", r + 2);
941
- r = t < 0 ? e.length : t + 2;
942
- continue;
943
- }
944
- if (i === "\"" || i === "'") {
945
- n = i, t += i, r += 1;
946
- continue;
947
- }
948
- if (i === "\\") {
949
- let n = pt(e, r);
950
- t += n.value, r = n.nextIndex;
951
- continue;
952
- }
953
- let a = i.charCodeAt(0);
954
- t += a < 32 && i !== " " && i !== "\n" && i !== "\r" ? " " : i, r += 1;
955
- }
956
- return t;
957
- }, ht = /^data:(?:image\/(?:avif|bmp|gif|jpeg|png|webp|x-icon)|font\/(?:collection|otf|sfnt|ttf|woff2?)|application\/(?:font-sfnt|font-woff|vnd\.ms-fontobject|x-font-opentype|x-font-ttf|x-font-woff));/i, gt = (e) => {
958
- let t = /^data:image\/svg\+xml(?:;charset=[A-Za-z0-9._-]+)?,([\s\S]*)$/i.exec(e);
959
- if (!t || t[1].length > 1048576) return !1;
960
- let n;
961
- try {
962
- n = decodeURIComponent(t[1]);
963
- } catch (e) {
964
- return !1;
965
- }
966
- if (!/^\s*<svg(?:\s|>)/i.test(n) || /<\/?(?:script|style|foreignObject|iframe|object|embed|form|link)\b/i.test(n) || /<!\s*(?:doctype|entity)\b/i.test(n) || /\son[a-z0-9_-]+\s*=/i.test(n) || /@import\b/i.test(n) || /url\s*\(\s*(?!["']?#)/i.test(n)) return !1;
967
- for (let e of n.matchAll(/\s(?:href|xlink:href|src)\s*=\s*(["'])([\s\S]*?)\1/gi)) {
968
- let t = vt(e[2] || "");
969
- if (!/^#[A-Za-z0-9_.:-]+$/.test(t) && !ht.test(t)) return !1;
970
- }
971
- return !0;
972
- }, _t = (e) => {
973
- let t = "";
974
- for (let n of e) {
975
- let e = n.charCodeAt(0);
976
- e <= 32 || e >= 127 && e <= 159 || (t += n);
977
- }
978
- return t.trim();
979
- }, vt = _t, yt = /^data:(?:image\/(?:avif|bmp|gif|jpeg|png|webp|x-icon)|audio\/[a-z0-9.+-]+|video\/[a-z0-9.+-]+|text\/vtt)(?:;[^,]*)?,/i, bt = (e) => {
980
- let t = _t(e);
981
- return t ? t.startsWith("#") || /^blob:/i.test(t) ? !0 : yt.test(t) : !1;
982
- }, R = (e, t, n = {}) => {
983
- if (!e.hasAttribute(t)) return;
984
- let r = _t(e.getAttribute(t) || "");
985
- (n.fragmentOnly ? /^#[A-Za-z0-9_.:-]+$/.test(r) : bt(r)) ? e.setAttribute(t, r) : e.removeAttribute(t);
986
- }, z = (e) => {
987
- let t = e.trim(), n = t[0];
988
- return (n === "\"" || n === "'") && t[t.length - 1] === n && (t = t.slice(1, -1).trim()), _t(t);
989
- }, xt = (e) => {
990
- let t = z(e);
991
- return t ? t.startsWith("#") || /^blob:/i.test(t) ? !0 : ht.test(t) || gt(t) : !1;
992
- }, B = (e, t) => {
993
- let n = "";
994
- for (let r = t; r < e.length; r += 1) {
995
- let t = e[r] || "";
996
- if (n) t === "\\" ? r += 1 : t === n && (n = "");
997
- else if (t === "\"" || t === "'") n = t;
998
- else if (t === ")") return r;
999
- }
1000
- return -1;
1001
- }, St = (e) => {
1002
- let t = !1, n = !1, r = "", i = 0;
1003
- for (; i < e.length;) {
1004
- let a = e[i] || "";
1005
- if (r) {
1006
- if (a === "\\") {
1007
- i += 2;
1008
- continue;
1009
- }
1010
- a === r && (r = ""), i += 1;
1011
- } else if (a === "/" && e[i + 1] === "*") {
1012
- let t = e.indexOf("*/", i + 2);
1013
- i = t < 0 ? e.length : t + 2;
1014
- } else if (a === "\"" || a === "'") r = a, i += 1;
1015
- else if (a === "\\") i += 2;
1016
- else {
1017
- if (a === "@" && e.slice(i + 1, i + 7).toLowerCase() === "import") {
1018
- let n = e[i + 7] || "";
1019
- n && L(n) || (t = !0);
1020
- }
1021
- if (e.slice(i, i + 3).toLowerCase() === "url" && !L(e[i - 1] || "")) {
1022
- let t = i + 3;
1023
- for (; /\s/.test(e[t] || "");) t += 1;
1024
- e[t] === "(" && (n = !0);
1025
- }
1026
- i += 1;
1027
- }
1028
- }
1029
- return {
1030
- hasImport: t,
1031
- hasUrl: n
1032
- };
1033
- }, V = (e) => {
1034
- let t = St(mt(e)), n = St(e);
1035
- if (t.hasImport || t.hasUrl && !n.hasUrl) return "";
1036
- if (!n.hasUrl) return e;
1037
- let r = "", i = "", a = 0;
1038
- for (; a < e.length;) {
1039
- let t = e[a] || "";
1040
- if (i) {
1041
- if (r += t, t === "\\") {
1042
- r += e[a + 1] || "", a += 2;
1043
- continue;
1044
- }
1045
- t === i && (i = ""), a += 1;
1046
- } else if (t === "\"" || t === "'") i = t, r += t, a += 1;
1047
- else if (t === "/" && e[a + 1] === "*") {
1048
- let t = e.indexOf("*/", a + 2);
1049
- if (t < 0) {
1050
- r += e.slice(a);
1051
- break;
1052
- }
1053
- r += e.slice(a, t + 2), a = t + 2;
1054
- } else if (t === "\\") r += t, r += e[a + 1] || "", a += 2;
1055
- else {
1056
- if (e.slice(a, a + 3).toLowerCase() === "url" && !L(e[a - 1] || "")) {
1057
- let t = a + 3;
1058
- for (; /\s/.test(e[t] || "");) t += 1;
1059
- if (e[t] === "(") {
1060
- let n = B(e, t + 1);
1061
- if (n < 0) return "";
1062
- let i = e.slice(t + 1, n);
1063
- r += xt(i) ? e.slice(a, n + 1) : "none", a = n + 1;
1064
- continue;
1065
- }
1066
- }
1067
- r += t, a += 1;
1068
- }
1069
- }
1070
- return r;
1071
- }, H = (e) => {
1072
- let t = e.defaultView;
1073
- if (!t) return null;
1074
- let n = lt(t);
1075
- return n.isSupported ? (n.addHook("afterSanitizeElements", (e) => {
1076
- var t;
1077
- let n = e;
1078
- if (((t = n.localName) == null ? void 0 : t.toLowerCase()) !== "style") return;
1079
- let r = V(n.textContent || "");
1080
- r ? n.textContent = r : n.remove();
1081
- }), n.addHook("afterSanitizeAttributes", (e) => {
1082
- var t;
1083
- let n = e, r = (t = n.localName) == null ? void 0 : t.toLowerCase();
1084
- if (r === "a" && (n.getAttribute("target") || "").trim().toLowerCase() === "_blank" && n.setAttribute("rel", "noopener noreferrer"), (r === "a" || r === "area") && n.removeAttribute("ping"), n.hasAttribute("srcset") && n.removeAttribute("srcset"), [
1085
- "img",
1086
- "audio",
1087
- "video",
1088
- "source",
1089
- "track",
1090
- "input"
1091
- ].includes(r || "") && R(n, "src"), r === "video" && R(n, "poster"), n.hasAttribute("background") && R(n, "background"), n.namespaceURI === "http://www.w3.org/2000/svg" && r !== "a") {
1092
- let e = r === "use" || r === "mpath";
1093
- R(n, "href", { fragmentOnly: e }), R(n, "xlink:href", { fragmentOnly: e });
1094
- }
1095
- if (n.hasAttribute("style")) {
1096
- let e = V(n.getAttribute("style") || "");
1097
- e ? n.setAttribute("style", e) : n.removeAttribute("style");
1098
- }
1099
- }), n) : null;
1100
- }, Ct = "<meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\" />", U = (e, t) => {
1101
- let n = ft(t), r = n ? H(n) : null;
1102
- return r ? `<!doctype html>\n${String(r.sanitize(e, dt)).replace("<head>", `<head>\n ${Ct}`)}` : "<!doctype html>\n<html lang=\"en\"><head><meta charset=\"utf-8\" /></head><body></body></html>";
1103
- }, wt = (e) => {
1104
- let t = e.createElement("html");
1105
- t.lang = "en";
1106
- let n = e.createElement("head"), r = e.createElement("meta");
1107
- return r.setAttribute("charset", "utf-8"), n.append(r), t.append(n, e.createElement("body")), t;
1108
- }, Tt = (e) => {
1109
- let t = e.querySelector(":scope > head");
1110
- if (!t) return e;
1111
- if (!t.querySelector("meta[charset]")) {
1112
- let n = e.ownerDocument.createElement("meta");
1113
- n.setAttribute("charset", "utf-8"), t.prepend(n);
1114
- }
1115
- if (!t.querySelector("meta[name=\"viewport\"]")) {
1116
- let n = e.ownerDocument.createElement("meta");
1117
- n.setAttribute("name", "viewport"), n.setAttribute("content", "width=device-width,initial-scale=1");
1118
- let r = t.querySelector("meta[charset]");
1119
- r == null || r.after(n);
1120
- }
1121
- return e;
1122
- }, Et = (e, n) => {
1123
- let r = ft(n);
1124
- if (!r) throw Error("A browser document is required to build printable DOM.");
1125
- let i = H(r);
1126
- if (!i) return wt(r);
1127
- let a = i.sanitize(e, t(t({}, dt), {}, { RETURN_DOM: !0 }));
1128
- return !a || a.nodeType !== 1 || a.localName.toLowerCase() !== "html" ? wt(r) : Tt(a);
1129
- }, Dt = "\n * { box-sizing: border-box; }\n html, body { margin: 0; min-height: 100%; background: #f2f4f7; color: #172033; font-family: Aptos, \"Segoe UI\", \"PingFang SC\", \"Microsoft YaHei\", sans-serif; print-color-adjust: exact; -webkit-print-color-adjust: exact; }\n body { padding: 24px; }\n .viewer-export-shell { position: relative; min-height: calc(100vh - 48px); overflow: visible; background: #f2f4f7; }\n .viewer-export-content { position: relative; z-index: 1; contain: none; width: 100%; min-height: 100%; overflow: visible; }\n .viewer-export-watermark { position: absolute; inset: 0; pointer-events: none; z-index: 20; background-repeat: repeat; print-color-adjust: exact; -webkit-print-color-adjust: exact; }\n .viewer-export-content .file-render,\n .viewer-export-content .file-viewer,\n .viewer-export-content .viewer-stage,\n .viewer-export-content .content,\n .viewer-export-content .pdf-shell,\n .viewer-export-content .pdf-content,\n .viewer-export-content .pdf-viewport,\n .viewer-export-content .pdf-wrapper,\n .viewer-export-content .docx-fit-viewer,\n .viewer-export-content .docx-wrapper,\n .viewer-export-content .docx-canvas-wrapper,\n .viewer-export-content .msdoc-stage,\n .viewer-export-content .msdoc-paged-view,\n .viewer-export-content .code-viewer,\n .viewer-export-content .markdown-viewer,\n .viewer-export-content .email-shell,\n .viewer-export-content .archive-shell,\n .viewer-export-content .eda-shell,\n .viewer-export-content .ebook-shell,\n .viewer-export-content .umd-shell,\n .viewer-export-content .drawing-shell,\n .viewer-export-content .audio-shell,\n .viewer-export-content .cad-shell,\n .viewer-export-content .cad-body,\n .viewer-export-content .cad-canvas-wrap,\n .viewer-export-content .dwg-preview-frame {\n position: relative !important;\n inset: auto !important;\n contain: none !important;\n width: 100% !important;\n height: auto !important;\n min-height: 0 !important;\n max-height: none !important;\n overflow: visible !important;\n }\n .viewer-export-content .docx-wrapper {\n display: block !important;\n padding: 0 !important;\n background: transparent !important;\n }\n .viewer-export-content .docx-canvas-wrapper {\n display: block !important;\n padding: 0 !important;\n background: transparent !important;\n }\n .viewer-export-content .docx-print-document {\n display: block !important;\n width: fit-content !important;\n max-width: 100% !important;\n height: auto !important;\n overflow: visible !important;\n margin: 0 auto !important;\n }\n .viewer-export-content .docx-page-frame {\n position: relative !important;\n width: var(--viewer-print-page-width, fit-content) !important;\n height: var(--viewer-print-page-height, auto) !important;\n min-height: var(--viewer-print-page-height, 0) !important;\n max-width: 100% !important;\n margin: 0 auto 18px !important;\n overflow: hidden !important;\n break-inside: avoid;\n page-break-inside: avoid;\n break-after: page;\n page-break-after: always;\n }\n .viewer-export-content .docx-canvas-sheet {\n position: relative !important;\n contain: none !important;\n width: var(--viewer-print-page-width, 794px) !important;\n height: var(--viewer-print-page-height, 1123px) !important;\n min-height: var(--viewer-print-page-height, 1123px) !important;\n max-width: 100% !important;\n margin: 0 auto 18px !important;\n overflow: hidden !important;\n box-shadow: none !important;\n break-inside: avoid;\n page-break-inside: avoid;\n break-after: page;\n page-break-after: always;\n }\n .viewer-export-content .docx-canvas-sheet > img {\n display: block !important;\n width: 100% !important;\n height: 100% !important;\n max-width: none !important;\n object-fit: fill;\n }\n .viewer-export-content .msdoc-page {\n position: relative !important;\n width: var(--viewer-print-page-width, 794px) !important;\n min-height: var(--viewer-print-page-height, 1123px) !important;\n max-width: 100% !important;\n height: auto !important;\n margin: 0 auto 18px !important;\n overflow: visible !important;\n break-after: page;\n page-break-after: always;\n }\n .viewer-export-content .docx-page-frame:last-child,\n .viewer-export-content .docx-canvas-sheet:last-child,\n .viewer-export-content .msdoc-page:last-child {\n break-after: auto;\n page-break-after: auto;\n }\n .viewer-export-content .docx-page-frame > section.docx {\n position: relative !important;\n top: auto !important;\n left: auto !important;\n width: var(--viewer-print-page-width, auto) !important;\n min-height: var(--viewer-print-page-height, auto) !important;\n max-width: none !important;\n margin: 0 auto !important;\n overflow: visible !important;\n transform: none !important;\n box-shadow: none !important;\n break-inside: avoid;\n page-break-inside: avoid;\n }\n .viewer-export-content .msdoc-stage {\n display: block !important;\n padding: 0 !important;\n background: transparent !important;\n }\n .viewer-export-content .msdoc-paged-view {\n display: block !important;\n gap: 0 !important;\n padding: 0 !important;\n background: transparent !important;\n }\n .viewer-export-content .msdoc-page > .msdoc-root {\n margin: 0 auto !important;\n box-shadow: none !important;\n overflow: visible !important;\n }\n .viewer-export-content .pdf-toolbar,\n .viewer-export-content .pdf-nav-pane,\n .viewer-export-content .viewer-actions,\n .viewer-export-content .code-toolbar,\n .viewer-export-content .umd-toolbar,\n .viewer-export-content .drawing-toolbar,\n .viewer-export-content .cad-toolbar {\n display: none !important;\n }\n .viewer-export-content .pdf-content,\n .viewer-export-content .pdf-shell--nav-hidden .pdf-content,\n .viewer-export-content .cad-body.without-layers {\n display: block !important;\n grid-template-columns: none !important;\n }\n .viewer-export-content .pdfViewer { padding: 0 !important; }\n .viewer-export-content .pdfViewer .page {\n margin: 0 auto 16px !important;\n border: 0 !important;\n box-shadow: none !important;\n break-after: page;\n page-break-after: always;\n }\n .viewer-export-content .pdfViewer .page:last-child {\n break-after: auto;\n page-break-after: auto;\n }\n .viewer-export-content .pdf-export-document {\n display: grid;\n justify-items: center;\n gap: 18px;\n padding: 4px 0;\n }\n .viewer-export-content .pdf-export-page {\n width: var(--viewer-print-page-width, auto);\n height: var(--viewer-print-page-height, auto);\n max-width: 100%;\n overflow: hidden;\n background: #ffffff;\n box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);\n break-inside: avoid;\n page-break-inside: avoid;\n break-after: page;\n page-break-after: always;\n }\n .viewer-export-content .pdf-export-page:last-child {\n break-after: auto;\n page-break-after: auto;\n }\n .viewer-export-content .pdf-export-page img {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n .viewer-export-content .pptx-wrapper {\n width: 100% !important;\n max-width: 100% !important;\n height: auto !important;\n overflow: visible !important;\n transform: none !important;\n }\n .viewer-export-content .pptx-wrapper .slide {\n margin: 0 auto 18px !important;\n break-inside: avoid;\n page-break-inside: avoid;\n break-after: page;\n page-break-after: always;\n box-shadow: none !important;\n }\n .viewer-export-content .pptx-wrapper .slide:last-child {\n break-after: auto;\n page-break-after: auto;\n }\n .viewer-export-content .ofd-stage {\n padding: 0 !important;\n overflow: visible !important;\n }\n .viewer-export-content .ofd-page,\n .viewer-export-content .drawing-svg,\n .viewer-export-content .cad-canvas-wrap,\n .viewer-export-content .dwg-preview-frame {\n break-inside: avoid;\n page-break-inside: avoid;\n break-after: page;\n page-break-after: always;\n box-shadow: none !important;\n }\n .viewer-export-content .ofd-page:last-child,\n .viewer-export-content .drawing-svg:last-child,\n .viewer-export-content .cad-canvas-wrap:last-child,\n .viewer-export-content .dwg-preview-frame:last-child {\n break-after: auto;\n page-break-after: auto;\n }\n .viewer-export-content .code-area {\n overflow: visible !important;\n white-space: pre-wrap !important;\n word-break: break-word !important;\n }\n .viewer-export-content .umd-body,\n .viewer-export-content .umd-stage-wrap,\n .viewer-export-content .umd-stage {\n display: block !important;\n height: auto !important;\n max-height: none !important;\n overflow: visible !important;\n }\n .viewer-export-content .umd-toc {\n display: none !important;\n }\n img, canvas, svg, video { max-width: 100%; }\n @media print {\n @page { margin: 12mm; }\n html, body { min-height: auto; background: #ffffff; }\n body { padding: 0; }\n .viewer-export-shell,\n .viewer-export-content {\n min-height: 0;\n overflow: visible;\n background: #ffffff;\n }\n .viewer-export-content .docx-print-document {\n width: auto !important;\n max-width: none !important;\n margin: 0 !important;\n }\n .viewer-export-content .pdf-export-document {\n display: block;\n padding: 0;\n }\n .viewer-export-content .pdf-export-page {\n width: var(--viewer-print-page-width, auto) !important;\n height: var(--viewer-print-page-height, auto) !important;\n max-width: none !important;\n margin: 0;\n overflow: hidden;\n box-shadow: none;\n }\n .viewer-export-content .docx-page-frame {\n width: var(--viewer-print-page-width, auto) !important;\n height: var(--viewer-print-page-height, auto) !important;\n min-height: var(--viewer-print-page-height, 0) !important;\n max-width: none !important;\n margin: 0 !important;\n overflow: hidden !important;\n }\n .viewer-export-content .docx-canvas-sheet {\n contain: none !important;\n width: var(--viewer-print-page-width, 794px) !important;\n height: var(--viewer-print-page-height, 1123px) !important;\n min-height: var(--viewer-print-page-height, 1123px) !important;\n max-width: none !important;\n margin: 0 !important;\n overflow: hidden !important;\n box-shadow: none !important;\n }\n .viewer-export-content .msdoc-page {\n width: var(--viewer-print-page-width, 794px) !important;\n min-height: var(--viewer-print-page-height, 1123px) !important;\n max-width: none !important;\n margin: 0 !important;\n overflow: visible !important;\n }\n .viewer-export-content .docx-page-frame > section.docx,\n .viewer-export-content .msdoc-page > .msdoc-root {\n width: var(--viewer-print-page-width, 100%) !important;\n max-width: none !important;\n border: 0 !important;\n }\n .viewer-export-content .pptx-wrapper .slide,\n .viewer-export-content .ofd-page,\n .viewer-export-content .drawing-svg,\n .viewer-export-content .cad-canvas-wrap,\n .viewer-export-content .dwg-preview-frame {\n box-shadow: none !important;\n }\n }\n", W = (e) => {
1130
- let t = ft(e);
1131
- return t ? Array.from(t.querySelectorAll("style, link[rel=\"stylesheet\"]")).map((e) => {
1132
- var t;
1133
- if (e.localName.toLowerCase() === "style") return `<style>${e.textContent || ""}</style>`;
1134
- let n = e;
1135
- try {
1136
- let e = Array.from(((t = n.sheet) == null ? void 0 : t.cssRules) || []).map((e) => e.cssText).join("\n");
1137
- return e ? `<style data-viewer-inlined-stylesheet>${e}</style>` : "";
1138
- } catch (e) {
1139
- return "";
1140
- }
1141
- }).filter(Boolean).join("\n") : "";
1142
- }, G = ({ contentHtml: e, includeDocumentStyles: n = !0, printStyle: r = "", title: i, watermarkInlineStyle: a = "", mask: o = null, documentRef: s }) => {
1143
- var c, l;
1144
- let u = a ? `<div class="viewer-export-watermark" style="${ut(a)}"></div>` : "", m = d(o), h = m ? t(t({}, m), {}, {
1145
- regions: (c = m.regions) == null ? void 0 : c.filter((e) => e.pageIndex === void 0),
1146
- stamps: (l = m.stamps) == null ? void 0 : l.filter((e) => e.pageIndex === void 0)
1147
- }) : null, g = p(h), te = f(e, m), ne = n ? W(s) : "", _ = r ? `<style data-viewer-print-style>${r}</style>` : "", v = m ? `<style data-viewer-print-mask-style>${ee}</style>` : "";
1148
- return `<!doctype html>
1149
- <html lang="zh-CN">
1150
- <head>
1151
- <meta charset="utf-8" />
1152
- <meta name="viewport" content="width=device-width,initial-scale=1" />
1153
- <title>${ut(i)}</title>
1154
- ${ne}
1155
- <style>${Dt}</style>
1156
- ${v}
1157
- </head>
1158
- <body>
1159
- <main class="viewer-export-shell">
1160
- <div class="viewer-export-content">${te}</div>
1161
- ${g}
1162
- ${u}
1163
- </main>
1164
- ${_}
1165
- </body>
1166
- </html>`;
1167
- }, K = (e) => U(G(e), e.documentRef), Ot = (e) => Et(G(e), e.documentRef), kt = function() {
1168
- var t = e(function* ({ source: e, mode: t = "export", title: n, adapter: r = null, watermarkInlineStyle: a = "", mask: s = null }) {
1169
- let l = {
1170
- mode: t,
1171
- title: n
1172
- }, f = r == null ? void 0 : r.toHtml, p = d(s);
1173
- if (f) {
1174
- yield o(e, r);
1175
- let t = yield u(yield f(l)), s = yield i(r, l);
1176
- return {
1177
- contentHtml: t,
1178
- includeDocumentStyles: r.includeDocumentStyles !== !1,
1179
- printStyle: s,
1180
- title: n,
1181
- watermarkInlineStyle: a,
1182
- mask: p,
1183
- documentRef: e.ownerDocument
1184
- };
1185
- }
1186
- yield o(e, r);
1187
- let ee = e.cloneNode(!0);
1188
- ee.querySelectorAll(".viewer-watermark").forEach((e) => e.remove()), c(e, ee);
1189
- let m = yield i(r, l);
1190
- return {
1191
- contentHtml: yield u(ee.innerHTML),
1192
- printStyle: m,
1193
- title: n,
1194
- watermarkInlineStyle: a,
1195
- mask: p,
1196
- documentRef: e.ownerDocument
1197
- };
1198
- });
1199
- return function(e) {
1200
- return t.apply(this, arguments);
1201
- };
1202
- }(), At = function() {
1203
- var t = e(function* (e) {
1204
- return K(yield kt(e));
1205
- });
1206
- return function(e) {
1207
- return t.apply(this, arguments);
1208
- };
1209
- }(), jt = function() {
1210
- var t = e(function* (e) {
1211
- return Ot(yield kt(e));
1212
- });
1213
- return function(e) {
1214
- return t.apply(this, arguments);
1215
- };
1216
- }();
1217
- export { Ot as buildExportDomDocument, K as buildExportHtmlDocument, jt as buildFileViewerRenderedDomDocument, At as buildFileViewerRenderedHtmlDocument, W as collectDocumentStyles, u as inlineFileViewerBlobUrlsInHtml, o as prepareFileViewerRenderedContentForSnapshot, c as replaceFileViewerCanvasWithImages, i as resolveFileViewerPrintStyle, Et as sanitizeFileViewerExportDocumentDom, U as sanitizeFileViewerExportDocumentHtml, n as triggerFileViewerBlobDownload, s as triggerFileViewerUrlDownload, l as waitForFileViewerImages, r as waitForFileViewerNextPaint, a as waitForFileViewerPrintWindowReady };