@ed.yakovich/component-library 0.0.15 → 0.0.17
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/dist/components/Accordion/context/index.js +7 -0
- package/dist/components/Accordion/index.js +38 -0
- package/dist/components/Accordion/types/index.js +1 -0
- package/dist/components/Cart/index.js +34 -0
- package/dist/components/EquipmentSummary/context/index.js +10 -0
- package/dist/components/EquipmentSummary/index.js +65 -0
- package/dist/components/EquipmentSummary/types/index.js +1 -0
- package/dist/components/Grid/index.js +19 -0
- package/dist/components/HeroBanner/context/index.js +7 -0
- package/dist/components/HeroBanner/index.js +33 -0
- package/dist/components/HeroBanner/types/index.js +1 -0
- package/dist/components/InfoBanner/index.js +24 -4
- package/dist/components/Nav/index.js +19 -0
- package/dist/components/OfferCards/context/index.js +7 -0
- package/dist/components/OfferCards/index.js +30 -0
- package/dist/components/OfferCards/subComponents/OfferCard.js +61 -0
- package/dist/components/OfferCards/types/index.js +1 -0
- package/dist/components/SaleBanner/context/index.js +7 -0
- package/dist/components/SaleBanner/index.js +58 -0
- package/dist/components/SaleBanner/types/index.js +1 -0
- package/dist/{index-ba31999b-V1s4iffq.js → index-0d8e0844-BJzWsYCM.js} +2443 -2491
- package/dist/index-CIJ0X8ia.js +29141 -0
- package/dist/index-b30029d4-CYulIFrS.js +12 -0
- package/dist/index-e6818ded-r_t6ryaW.js +57 -0
- package/dist/{index.esm-a7c99373-DUoLYEEM.js → index.esm-322571ff-D1REhsOg.js} +1 -1
- package/dist/lib/components/Accordion/context/index.d.ts +10 -0
- package/dist/lib/components/Accordion/index.d.ts +2 -0
- package/dist/lib/components/Accordion/types/index.d.ts +13 -0
- package/dist/lib/components/Cart/index.d.ts +6 -0
- package/dist/lib/components/EquipmentSummary/context/index.d.ts +10 -0
- package/dist/lib/components/EquipmentSummary/index.d.ts +2 -0
- package/dist/lib/components/EquipmentSummary/types/index.d.ts +14 -0
- package/dist/lib/components/Grid/index.d.ts +13 -0
- package/dist/lib/components/HeroBanner/context/index.d.ts +10 -0
- package/dist/lib/components/HeroBanner/index.d.ts +2 -0
- package/dist/lib/components/HeroBanner/types/index.d.ts +11 -0
- package/dist/lib/components/Nav/index.d.ts +8 -0
- package/dist/lib/components/OfferCards/context/index.d.ts +9 -0
- package/dist/lib/components/OfferCards/index.d.ts +2 -0
- package/dist/lib/components/OfferCards/subComponents/OfferCard.d.ts +3 -0
- package/dist/lib/components/OfferCards/types/index.d.ts +26 -0
- package/dist/lib/components/SaleBanner/context/index.d.ts +10 -0
- package/dist/lib/components/SaleBanner/index.d.ts +2 -0
- package/dist/lib/components/SaleBanner/types/index.d.ts +11 -0
- package/dist/lib/main.d.ts +13 -0
- package/dist/main.js +32 -6
- package/dist/prism-accordion.entry-BxWxJTzN.js +51 -0
- package/dist/prism-avatar_2.entry-D13WJm8L.js +68 -0
- package/dist/prism-badge.entry-DxUacM3U.js +58 -0
- package/dist/prism-banner.entry-C2PB-eYg.js +82 -0
- package/dist/prism-breadcrumb.entry-Xs2uvtMJ.js +33 -0
- package/dist/prism-button_2.entry-Bu7aTvL3.js +110 -0
- package/dist/prism-card.entry-DN_z84zN.js +119 -0
- package/dist/prism-carousel.entry-R9W3QWAj.js +3111 -0
- package/dist/prism-checkbox-group.entry-D6r-q0Hm.js +62 -0
- package/dist/prism-checkbox.entry-w99uqUBB.js +99 -0
- package/dist/prism-data-table.entry-Ckducvo-.js +10475 -0
- package/dist/prism-datepicker.entry-QpabfLme.js +249 -0
- package/dist/{prism-form.entry-C8VzGp6c.js → prism-form.entry-B0of8RQh.js} +11 -11
- package/dist/prism-grid.entry-CFnOi_Vc.js +28 -0
- package/dist/prism-header.entry-0LjtG822.js +202 -0
- package/dist/prism-hero.entry-DVipQrOc.js +23 -0
- package/dist/prism-icon_2.entry-FQ8c7tJr.js +118 -0
- package/dist/prism-image.entry-BtjBPMeE.js +38 -0
- package/dist/prism-input-file.entry-CXYV9xtO.js +119 -0
- package/dist/prism-input-otp.entry-CXBN1WBi.js +63 -0
- package/dist/prism-input-text.entry-D5yPqcBS.js +228 -0
- package/dist/prism-input-textarea.entry-6O7qdk_r.js +140 -0
- package/dist/prism-layout.entry-CJcjgXky.js +20 -0
- package/dist/prism-lineitem.entry-BSBcpGKE.js +44 -0
- package/dist/prism-menu.entry-hxjFECbL.js +231 -0
- package/dist/prism-modal.entry-BIavEySL.js +94 -0
- package/dist/prism-pagination.entry-cJjWcUeH.js +60 -0
- package/dist/prism-popover.entry-EiL6rh8c.js +1013 -0
- package/dist/prism-popper.entry-B3NAqQHK.js +959 -0
- package/dist/prism-progress.entry-DkyB0j-F.js +79 -0
- package/dist/prism-radio-group.entry-nR5BA0H-.js +66 -0
- package/dist/prism-radio.entry-2oHibUZp.js +101 -0
- package/dist/prism-select.entry-DaSGr0dP.js +230 -0
- package/dist/prism-switch.entry-CiUr8IHK.js +95 -0
- package/dist/prism-tab.entry-Db7WSxCT.js +20 -0
- package/dist/prism-tabs.entry-BSS5u08w.js +70 -0
- package/dist/prism-tooltip.entry-Dqu6PskB.js +52 -0
- package/dist/prism-typeahead.entry-BMyMjXSV.js +1234 -0
- package/package.json +3 -2
- package/dist/index-44540db3-BN5vFHKr.js +0 -44
- package/dist/index-4d46d9ca-BtyZMEt1.js +0 -12
- package/dist/index-D9BZSjMp.js +0 -21158
- package/dist/prism-accordion.entry-D4g7wdXB.js +0 -51
- package/dist/prism-avatar_3.entry-C1H9bg9y.js +0 -335
- package/dist/prism-badge.entry-CWLalQsR.js +0 -56
- package/dist/prism-banner.entry-D1sce4tY.js +0 -105
- package/dist/prism-breadcrumb.entry-C282yHQl.js +0 -33
- package/dist/prism-button_3.entry-DIg1AEXF.js +0 -240
- package/dist/prism-card.entry-DaxGD-uX.js +0 -152
- package/dist/prism-carousel.entry-BGmaoDVM.js +0 -3346
- package/dist/prism-checkbox-group.entry-Dwa_mvjd.js +0 -62
- package/dist/prism-checkbox.entry-CZvx2AHI.js +0 -116
- package/dist/prism-data-table.entry-DACAS8BE.js +0 -3591
- package/dist/prism-datepicker.entry-CHUyjilE.js +0 -279
- package/dist/prism-dialog.entry-DdO9Kt32.js +0 -73
- package/dist/prism-drawer.entry-Dn0rvW9U.js +0 -43
- package/dist/prism-header.entry-D0PypuC3.js +0 -227
- package/dist/prism-hero.entry-DQ8G7Jb_.js +0 -23
- package/dist/prism-image.entry-tx9Pc3k_.js +0 -38
- package/dist/prism-input-file.entry-CO-2LZxG.js +0 -119
- package/dist/prism-input-otp.entry-ZAxExI2D.js +0 -79
- package/dist/prism-input-text.entry-EXsN4rgi.js +0 -278
- package/dist/prism-input-textarea.entry-CRqY4mr9.js +0 -145
- package/dist/prism-input-time.entry-BJ9he6MX.js +0 -85
- package/dist/prism-layout.entry-ulDWjtj8.js +0 -20
- package/dist/prism-lineitem.entry-DJk6X6mR.js +0 -47
- package/dist/prism-modal.entry-C795YZic.js +0 -95
- package/dist/prism-pagination.entry-DYQieAu3.js +0 -69
- package/dist/prism-popover.entry-BgLcACZw.js +0 -1114
- package/dist/prism-progress.entry-Z21rpoTm.js +0 -79
- package/dist/prism-radio_2.entry-C0HPCb3G.js +0 -159
- package/dist/prism-select.entry-B_l-ab1d.js +0 -286
- package/dist/prism-switch.entry-OkC8X1bD.js +0 -95
- package/dist/prism-tab.entry-szftB_wL.js +0 -20
- package/dist/prism-tabs.entry-0UR3WF52.js +0 -72
- package/dist/prism-text.entry-BEAZ8xEV.js +0 -28
- package/dist/prism-treelist.entry-UX4FM4Bi.js +0 -135
- package/dist/prism-typeahead.entry-CwOiAFQE.js +0 -1264
- package/dist/purify-9647b094-0-ZyuBNz.js +0 -572
|
@@ -1,572 +0,0 @@
|
|
|
1
|
-
import { d as Tn } from "./index-D9BZSjMp.js";
|
|
2
|
-
/*!
|
|
3
|
-
* Copyright (c) 2025 Comcast. Prism UI - v8.28.0 - made with ❤️ in Philadelphia
|
|
4
|
-
*/
|
|
5
|
-
var St = { exports: {} };
|
|
6
|
-
/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */
|
|
7
|
-
(function(Rt, En) {
|
|
8
|
-
(function(pe, ee) {
|
|
9
|
-
Rt.exports = ee();
|
|
10
|
-
})(Tn, function() {
|
|
11
|
-
const {
|
|
12
|
-
entries: pe,
|
|
13
|
-
setPrototypeOf: ee,
|
|
14
|
-
isFrozen: Ot,
|
|
15
|
-
getPrototypeOf: Dt,
|
|
16
|
-
getOwnPropertyDescriptor: yt
|
|
17
|
-
} = Object;
|
|
18
|
-
let {
|
|
19
|
-
freeze: g,
|
|
20
|
-
seal: y,
|
|
21
|
-
create: de
|
|
22
|
-
} = Object, {
|
|
23
|
-
apply: Te,
|
|
24
|
-
construct: Ee
|
|
25
|
-
} = typeof Reflect < "u" && Reflect;
|
|
26
|
-
g || (g = function(o) {
|
|
27
|
-
return o;
|
|
28
|
-
}), y || (y = function(o) {
|
|
29
|
-
return o;
|
|
30
|
-
}), Te || (Te = function(o, l) {
|
|
31
|
-
for (var a = arguments.length, c = new Array(a > 2 ? a - 2 : 0), O = 2; O < a; O++)
|
|
32
|
-
c[O - 2] = arguments[O];
|
|
33
|
-
return o.apply(l, c);
|
|
34
|
-
}), Ee || (Ee = function(o) {
|
|
35
|
-
for (var l = arguments.length, a = new Array(l > 1 ? l - 1 : 0), c = 1; c < l; c++)
|
|
36
|
-
a[c - 1] = arguments[c];
|
|
37
|
-
return new o(...a);
|
|
38
|
-
});
|
|
39
|
-
const te = h(Array.prototype.forEach), bt = h(Array.prototype.lastIndexOf), ze = h(Array.prototype.pop), B = h(Array.prototype.push), Lt = h(Array.prototype.splice), ne = h(String.prototype.toLowerCase), _e = h(String.prototype.toString), ge = h(String.prototype.match), Y = h(String.prototype.replace), Nt = h(String.prototype.indexOf), It = h(String.prototype.trim), b = h(Object.prototype.hasOwnProperty), A = h(RegExp.prototype.test), X = Ct(TypeError);
|
|
40
|
-
function h(s) {
|
|
41
|
-
return function(o) {
|
|
42
|
-
o instanceof RegExp && (o.lastIndex = 0);
|
|
43
|
-
for (var l = arguments.length, a = new Array(l > 1 ? l - 1 : 0), c = 1; c < l; c++)
|
|
44
|
-
a[c - 1] = arguments[c];
|
|
45
|
-
return Te(s, o, a);
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
function Ct(s) {
|
|
49
|
-
return function() {
|
|
50
|
-
for (var o = arguments.length, l = new Array(o), a = 0; a < o; a++)
|
|
51
|
-
l[a] = arguments[a];
|
|
52
|
-
return Ee(s, l);
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
function r(s, o) {
|
|
56
|
-
let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ne;
|
|
57
|
-
ee && ee(s, null);
|
|
58
|
-
let a = o.length;
|
|
59
|
-
for (; a--; ) {
|
|
60
|
-
let c = o[a];
|
|
61
|
-
if (typeof c == "string") {
|
|
62
|
-
const O = l(c);
|
|
63
|
-
O !== c && (Ot(o) || (o[a] = O), c = O);
|
|
64
|
-
}
|
|
65
|
-
s[c] = !0;
|
|
66
|
-
}
|
|
67
|
-
return s;
|
|
68
|
-
}
|
|
69
|
-
function Mt(s) {
|
|
70
|
-
for (let o = 0; o < s.length; o++)
|
|
71
|
-
b(s, o) || (s[o] = null);
|
|
72
|
-
return s;
|
|
73
|
-
}
|
|
74
|
-
function L(s) {
|
|
75
|
-
const o = de(null);
|
|
76
|
-
for (const [l, a] of pe(s))
|
|
77
|
-
b(s, l) && (Array.isArray(a) ? o[l] = Mt(a) : a && typeof a == "object" && a.constructor === Object ? o[l] = L(a) : o[l] = a);
|
|
78
|
-
return o;
|
|
79
|
-
}
|
|
80
|
-
function j(s, o) {
|
|
81
|
-
for (; s !== null; ) {
|
|
82
|
-
const a = yt(s, o);
|
|
83
|
-
if (a) {
|
|
84
|
-
if (a.get)
|
|
85
|
-
return h(a.get);
|
|
86
|
-
if (typeof a.value == "function")
|
|
87
|
-
return h(a.value);
|
|
88
|
-
}
|
|
89
|
-
s = Dt(s);
|
|
90
|
-
}
|
|
91
|
-
function l() {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
return l;
|
|
95
|
-
}
|
|
96
|
-
const Ge = g(["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"]), Ae = g(["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"]), he = g(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), wt = g(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Se = g(["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"]), xt = g(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), We = g(["#text"]), Be = g(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "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", "slot"]), Re = g(["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"]), Ye = g(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "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"]), oe = g(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Pt = y(/\{\{[\w\W]*|[\w\W]*\}\}/gm), vt = y(/<%[\w\W]*|[\w\W]*%>/gm), kt = y(/\$\{[\w\W]*/gm), Ut = y(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ft = y(/^aria-[\-\w]+$/), Xe = y(
|
|
97
|
-
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
98
|
-
// eslint-disable-line no-useless-escape
|
|
99
|
-
), Ht = y(/^(?:\w+script|data):/i), zt = y(
|
|
100
|
-
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
101
|
-
// eslint-disable-line no-control-regex
|
|
102
|
-
), je = y(/^html$/i), Gt = y(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
103
|
-
var Ve = /* @__PURE__ */ Object.freeze({
|
|
104
|
-
__proto__: null,
|
|
105
|
-
ARIA_ATTR: Ft,
|
|
106
|
-
ATTR_WHITESPACE: zt,
|
|
107
|
-
CUSTOM_ELEMENT: Gt,
|
|
108
|
-
DATA_ATTR: Ut,
|
|
109
|
-
DOCTYPE_NAME: je,
|
|
110
|
-
ERB_EXPR: vt,
|
|
111
|
-
IS_ALLOWED_URI: Xe,
|
|
112
|
-
IS_SCRIPT_OR_DATA: Ht,
|
|
113
|
-
MUSTACHE_EXPR: Pt,
|
|
114
|
-
TMPLIT_EXPR: kt
|
|
115
|
-
});
|
|
116
|
-
const V = {
|
|
117
|
-
element: 1,
|
|
118
|
-
attribute: 2,
|
|
119
|
-
text: 3,
|
|
120
|
-
cdataSection: 4,
|
|
121
|
-
entityReference: 5,
|
|
122
|
-
// Deprecated
|
|
123
|
-
entityNode: 6,
|
|
124
|
-
// Deprecated
|
|
125
|
-
progressingInstruction: 7,
|
|
126
|
-
comment: 8,
|
|
127
|
-
document: 9,
|
|
128
|
-
documentType: 10,
|
|
129
|
-
documentFragment: 11,
|
|
130
|
-
notation: 12
|
|
131
|
-
// Deprecated
|
|
132
|
-
}, Wt = function() {
|
|
133
|
-
return typeof window > "u" ? null : window;
|
|
134
|
-
}, Bt = function(o, l) {
|
|
135
|
-
if (typeof o != "object" || typeof o.createPolicy != "function")
|
|
136
|
-
return null;
|
|
137
|
-
let a = null;
|
|
138
|
-
const c = "data-tt-policy-suffix";
|
|
139
|
-
l && l.hasAttribute(c) && (a = l.getAttribute(c));
|
|
140
|
-
const O = "dompurify" + (a ? "#" + a : "");
|
|
141
|
-
try {
|
|
142
|
-
return o.createPolicy(O, {
|
|
143
|
-
createHTML(v) {
|
|
144
|
-
return v;
|
|
145
|
-
},
|
|
146
|
-
createScriptURL(v) {
|
|
147
|
-
return v;
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
} catch {
|
|
151
|
-
return console.warn("TrustedTypes policy " + O + " could not be created."), null;
|
|
152
|
-
}
|
|
153
|
-
}, $e = function() {
|
|
154
|
-
return {
|
|
155
|
-
afterSanitizeAttributes: [],
|
|
156
|
-
afterSanitizeElements: [],
|
|
157
|
-
afterSanitizeShadowDOM: [],
|
|
158
|
-
beforeSanitizeAttributes: [],
|
|
159
|
-
beforeSanitizeElements: [],
|
|
160
|
-
beforeSanitizeShadowDOM: [],
|
|
161
|
-
uponSanitizeAttribute: [],
|
|
162
|
-
uponSanitizeElement: [],
|
|
163
|
-
uponSanitizeShadowNode: []
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
function qe() {
|
|
167
|
-
let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Wt();
|
|
168
|
-
const o = (i) => qe(i);
|
|
169
|
-
if (o.version = "3.3.1", o.removed = [], !s || !s.document || s.document.nodeType !== V.document || !s.Element)
|
|
170
|
-
return o.isSupported = !1, o;
|
|
171
|
-
let {
|
|
172
|
-
document: l
|
|
173
|
-
} = s;
|
|
174
|
-
const a = l, c = a.currentScript, {
|
|
175
|
-
DocumentFragment: O,
|
|
176
|
-
HTMLTemplateElement: v,
|
|
177
|
-
Node: Oe,
|
|
178
|
-
Element: Ke,
|
|
179
|
-
NodeFilter: $,
|
|
180
|
-
NamedNodeMap: Xt = s.NamedNodeMap || s.MozNamedAttrMap,
|
|
181
|
-
HTMLFormElement: jt,
|
|
182
|
-
DOMParser: Vt,
|
|
183
|
-
trustedTypes: ie
|
|
184
|
-
} = s, q = Ke.prototype, $t = j(q, "cloneNode"), qt = j(q, "remove"), Kt = j(q, "nextSibling"), Zt = j(q, "childNodes"), ae = j(q, "parentNode");
|
|
185
|
-
if (typeof v == "function") {
|
|
186
|
-
const i = l.createElement("template");
|
|
187
|
-
i.content && i.content.ownerDocument && (l = i.content.ownerDocument);
|
|
188
|
-
}
|
|
189
|
-
let S, K = "";
|
|
190
|
-
const {
|
|
191
|
-
implementation: De,
|
|
192
|
-
createNodeIterator: Jt,
|
|
193
|
-
createDocumentFragment: Qt,
|
|
194
|
-
getElementsByTagName: en
|
|
195
|
-
} = l, {
|
|
196
|
-
importNode: tn
|
|
197
|
-
} = a;
|
|
198
|
-
let R = $e();
|
|
199
|
-
o.isSupported = typeof pe == "function" && typeof ae == "function" && De && De.createHTMLDocument !== void 0;
|
|
200
|
-
const {
|
|
201
|
-
MUSTACHE_EXPR: ye,
|
|
202
|
-
ERB_EXPR: be,
|
|
203
|
-
TMPLIT_EXPR: Le,
|
|
204
|
-
DATA_ATTR: nn,
|
|
205
|
-
ARIA_ATTR: on,
|
|
206
|
-
IS_SCRIPT_OR_DATA: an,
|
|
207
|
-
ATTR_WHITESPACE: Ze,
|
|
208
|
-
CUSTOM_ELEMENT: rn
|
|
209
|
-
} = Ve;
|
|
210
|
-
let {
|
|
211
|
-
IS_ALLOWED_URI: Je
|
|
212
|
-
} = Ve, d = null;
|
|
213
|
-
const Qe = r({}, [...Ge, ...Ae, ...he, ...Se, ...We]);
|
|
214
|
-
let T = null;
|
|
215
|
-
const et = r({}, [...Be, ...Re, ...Ye, ...oe]);
|
|
216
|
-
let u = Object.seal(de(null, {
|
|
217
|
-
tagNameCheck: {
|
|
218
|
-
writable: !0,
|
|
219
|
-
configurable: !1,
|
|
220
|
-
enumerable: !0,
|
|
221
|
-
value: null
|
|
222
|
-
},
|
|
223
|
-
attributeNameCheck: {
|
|
224
|
-
writable: !0,
|
|
225
|
-
configurable: !1,
|
|
226
|
-
enumerable: !0,
|
|
227
|
-
value: null
|
|
228
|
-
},
|
|
229
|
-
allowCustomizedBuiltInElements: {
|
|
230
|
-
writable: !0,
|
|
231
|
-
configurable: !1,
|
|
232
|
-
enumerable: !0,
|
|
233
|
-
value: !1
|
|
234
|
-
}
|
|
235
|
-
})), Z = null, Ne = null;
|
|
236
|
-
const k = Object.seal(de(null, {
|
|
237
|
-
tagCheck: {
|
|
238
|
-
writable: !0,
|
|
239
|
-
configurable: !1,
|
|
240
|
-
enumerable: !0,
|
|
241
|
-
value: null
|
|
242
|
-
},
|
|
243
|
-
attributeCheck: {
|
|
244
|
-
writable: !0,
|
|
245
|
-
configurable: !1,
|
|
246
|
-
enumerable: !0,
|
|
247
|
-
value: null
|
|
248
|
-
}
|
|
249
|
-
}));
|
|
250
|
-
let tt = !0, Ie = !0, nt = !1, ot = !0, U = !1, re = !0, x = !1, Ce = !1, Me = !1, F = !1, se = !1, le = !1, it = !0, at = !1;
|
|
251
|
-
const sn = "user-content-";
|
|
252
|
-
let we = !0, J = !1, H = {}, N = null;
|
|
253
|
-
const xe = r({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
254
|
-
let rt = null;
|
|
255
|
-
const st = r({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
256
|
-
let Pe = null;
|
|
257
|
-
const lt = r({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ce = "http://www.w3.org/1998/Math/MathML", fe = "http://www.w3.org/2000/svg", C = "http://www.w3.org/1999/xhtml";
|
|
258
|
-
let z = C, ve = !1, ke = null;
|
|
259
|
-
const ln = r({}, [ce, fe, C], _e);
|
|
260
|
-
let ue = r({}, ["mi", "mo", "mn", "ms", "mtext"]), me = r({}, ["annotation-xml"]);
|
|
261
|
-
const cn = r({}, ["title", "style", "font", "a", "script"]);
|
|
262
|
-
let Q = null;
|
|
263
|
-
const fn = ["application/xhtml+xml", "text/html"], un = "text/html";
|
|
264
|
-
let p = null, G = null;
|
|
265
|
-
const mn = l.createElement("form"), ct = function(e) {
|
|
266
|
-
return e instanceof RegExp || e instanceof Function;
|
|
267
|
-
}, Ue = function() {
|
|
268
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
269
|
-
if (!(G && G === e)) {
|
|
270
|
-
if ((!e || typeof e != "object") && (e = {}), e = L(e), Q = // eslint-disable-next-line unicorn/prefer-includes
|
|
271
|
-
fn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? un : e.PARSER_MEDIA_TYPE, p = Q === "application/xhtml+xml" ? _e : ne, d = b(e, "ALLOWED_TAGS") ? r({}, e.ALLOWED_TAGS, p) : Qe, T = b(e, "ALLOWED_ATTR") ? r({}, e.ALLOWED_ATTR, p) : et, ke = b(e, "ALLOWED_NAMESPACES") ? r({}, e.ALLOWED_NAMESPACES, _e) : ln, Pe = b(e, "ADD_URI_SAFE_ATTR") ? r(L(lt), e.ADD_URI_SAFE_ATTR, p) : lt, rt = b(e, "ADD_DATA_URI_TAGS") ? r(L(st), e.ADD_DATA_URI_TAGS, p) : st, N = b(e, "FORBID_CONTENTS") ? r({}, e.FORBID_CONTENTS, p) : xe, Z = b(e, "FORBID_TAGS") ? r({}, e.FORBID_TAGS, p) : L({}), Ne = b(e, "FORBID_ATTR") ? r({}, e.FORBID_ATTR, p) : L({}), H = b(e, "USE_PROFILES") ? e.USE_PROFILES : !1, tt = e.ALLOW_ARIA_ATTR !== !1, Ie = e.ALLOW_DATA_ATTR !== !1, nt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ot = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, U = e.SAFE_FOR_TEMPLATES || !1, re = e.SAFE_FOR_XML !== !1, x = e.WHOLE_DOCUMENT || !1, F = e.RETURN_DOM || !1, se = e.RETURN_DOM_FRAGMENT || !1, le = e.RETURN_TRUSTED_TYPE || !1, Me = e.FORCE_BODY || !1, it = e.SANITIZE_DOM !== !1, at = e.SANITIZE_NAMED_PROPS || !1, we = e.KEEP_CONTENT !== !1, J = e.IN_PLACE || !1, Je = e.ALLOWED_URI_REGEXP || Xe, z = e.NAMESPACE || C, ue = e.MATHML_TEXT_INTEGRATION_POINTS || ue, me = e.HTML_INTEGRATION_POINTS || me, u = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && ct(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (u.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && ct(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (u.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (u.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), U && (Ie = !1), se && (F = !0), H && (d = r({}, We), T = [], H.html === !0 && (r(d, Ge), r(T, Be)), H.svg === !0 && (r(d, Ae), r(T, Re), r(T, oe)), H.svgFilters === !0 && (r(d, he), r(T, Re), r(T, oe)), H.mathMl === !0 && (r(d, Se), r(T, Ye), r(T, oe))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? k.tagCheck = e.ADD_TAGS : (d === Qe && (d = L(d)), r(d, e.ADD_TAGS, p))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? k.attributeCheck = e.ADD_ATTR : (T === et && (T = L(T)), r(T, e.ADD_ATTR, p))), e.ADD_URI_SAFE_ATTR && r(Pe, e.ADD_URI_SAFE_ATTR, p), e.FORBID_CONTENTS && (N === xe && (N = L(N)), r(N, e.FORBID_CONTENTS, p)), e.ADD_FORBID_CONTENTS && (N === xe && (N = L(N)), r(N, e.ADD_FORBID_CONTENTS, p)), we && (d["#text"] = !0), x && r(d, ["html", "head", "body"]), d.table && (r(d, ["tbody"]), delete Z.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
272
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
273
|
-
throw X('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
274
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
275
|
-
throw X('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
276
|
-
S = e.TRUSTED_TYPES_POLICY, K = S.createHTML("");
|
|
277
|
-
} else
|
|
278
|
-
S === void 0 && (S = Bt(ie, c)), S !== null && typeof K == "string" && (K = S.createHTML(""));
|
|
279
|
-
g && g(e), G = e;
|
|
280
|
-
}
|
|
281
|
-
}, ft = r({}, [...Ae, ...he, ...wt]), ut = r({}, [...Se, ...xt]), pn = function(e) {
|
|
282
|
-
let t = ae(e);
|
|
283
|
-
(!t || !t.tagName) && (t = {
|
|
284
|
-
namespaceURI: z,
|
|
285
|
-
tagName: "template"
|
|
286
|
-
});
|
|
287
|
-
const n = ne(e.tagName), f = ne(t.tagName);
|
|
288
|
-
return ke[e.namespaceURI] ? e.namespaceURI === fe ? t.namespaceURI === C ? n === "svg" : t.namespaceURI === ce ? n === "svg" && (f === "annotation-xml" || ue[f]) : !!ft[n] : e.namespaceURI === ce ? t.namespaceURI === C ? n === "math" : t.namespaceURI === fe ? n === "math" && me[f] : !!ut[n] : e.namespaceURI === C ? t.namespaceURI === fe && !me[f] || t.namespaceURI === ce && !ue[f] ? !1 : !ut[n] && (cn[n] || !ft[n]) : !!(Q === "application/xhtml+xml" && ke[e.namespaceURI]) : !1;
|
|
289
|
-
}, I = function(e) {
|
|
290
|
-
B(o.removed, {
|
|
291
|
-
element: e
|
|
292
|
-
});
|
|
293
|
-
try {
|
|
294
|
-
ae(e).removeChild(e);
|
|
295
|
-
} catch {
|
|
296
|
-
qt(e);
|
|
297
|
-
}
|
|
298
|
-
}, P = function(e, t) {
|
|
299
|
-
try {
|
|
300
|
-
B(o.removed, {
|
|
301
|
-
attribute: t.getAttributeNode(e),
|
|
302
|
-
from: t
|
|
303
|
-
});
|
|
304
|
-
} catch {
|
|
305
|
-
B(o.removed, {
|
|
306
|
-
attribute: null,
|
|
307
|
-
from: t
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
if (t.removeAttribute(e), e === "is")
|
|
311
|
-
if (F || se)
|
|
312
|
-
try {
|
|
313
|
-
I(t);
|
|
314
|
-
} catch {
|
|
315
|
-
}
|
|
316
|
-
else
|
|
317
|
-
try {
|
|
318
|
-
t.setAttribute(e, "");
|
|
319
|
-
} catch {
|
|
320
|
-
}
|
|
321
|
-
}, mt = function(e) {
|
|
322
|
-
let t = null, n = null;
|
|
323
|
-
if (Me)
|
|
324
|
-
e = "<remove></remove>" + e;
|
|
325
|
-
else {
|
|
326
|
-
const m = ge(e, /^[\r\n\t ]+/);
|
|
327
|
-
n = m && m[0];
|
|
328
|
-
}
|
|
329
|
-
Q === "application/xhtml+xml" && z === C && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
|
|
330
|
-
const f = S ? S.createHTML(e) : e;
|
|
331
|
-
if (z === C)
|
|
332
|
-
try {
|
|
333
|
-
t = new Vt().parseFromString(f, Q);
|
|
334
|
-
} catch {
|
|
335
|
-
}
|
|
336
|
-
if (!t || !t.documentElement) {
|
|
337
|
-
t = De.createDocument(z, "template", null);
|
|
338
|
-
try {
|
|
339
|
-
t.documentElement.innerHTML = ve ? K : f;
|
|
340
|
-
} catch {
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
const _ = t.body || t.documentElement;
|
|
344
|
-
return e && n && _.insertBefore(l.createTextNode(n), _.childNodes[0] || null), z === C ? en.call(t, x ? "html" : "body")[0] : x ? t.documentElement : _;
|
|
345
|
-
}, pt = function(e) {
|
|
346
|
-
return Jt.call(
|
|
347
|
-
e.ownerDocument || e,
|
|
348
|
-
e,
|
|
349
|
-
// eslint-disable-next-line no-bitwise
|
|
350
|
-
$.SHOW_ELEMENT | $.SHOW_COMMENT | $.SHOW_TEXT | $.SHOW_PROCESSING_INSTRUCTION | $.SHOW_CDATA_SECTION,
|
|
351
|
-
null
|
|
352
|
-
);
|
|
353
|
-
}, Fe = function(e) {
|
|
354
|
-
return e instanceof jt && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof Xt) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
|
|
355
|
-
}, dt = function(e) {
|
|
356
|
-
return typeof Oe == "function" && e instanceof Oe;
|
|
357
|
-
};
|
|
358
|
-
function M(i, e, t) {
|
|
359
|
-
te(i, (n) => {
|
|
360
|
-
n.call(o, e, t, G);
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
const Tt = function(e) {
|
|
364
|
-
let t = null;
|
|
365
|
-
if (M(R.beforeSanitizeElements, e, null), Fe(e))
|
|
366
|
-
return I(e), !0;
|
|
367
|
-
const n = p(e.nodeName);
|
|
368
|
-
if (M(R.uponSanitizeElement, e, {
|
|
369
|
-
tagName: n,
|
|
370
|
-
allowedTags: d
|
|
371
|
-
}), re && e.hasChildNodes() && !dt(e.firstElementChild) && A(/<[/\w!]/g, e.innerHTML) && A(/<[/\w!]/g, e.textContent) || e.nodeType === V.progressingInstruction || re && e.nodeType === V.comment && A(/<[/\w]/g, e.data))
|
|
372
|
-
return I(e), !0;
|
|
373
|
-
if (!(k.tagCheck instanceof Function && k.tagCheck(n)) && (!d[n] || Z[n])) {
|
|
374
|
-
if (!Z[n] && _t(n) && (u.tagNameCheck instanceof RegExp && A(u.tagNameCheck, n) || u.tagNameCheck instanceof Function && u.tagNameCheck(n)))
|
|
375
|
-
return !1;
|
|
376
|
-
if (we && !N[n]) {
|
|
377
|
-
const f = ae(e) || e.parentNode, _ = Zt(e) || e.childNodes;
|
|
378
|
-
if (_ && f) {
|
|
379
|
-
const m = _.length;
|
|
380
|
-
for (let D = m - 1; D >= 0; --D) {
|
|
381
|
-
const w = $t(_[D], !0);
|
|
382
|
-
w.__removalCount = (e.__removalCount || 0) + 1, f.insertBefore(w, Kt(e));
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
return I(e), !0;
|
|
387
|
-
}
|
|
388
|
-
return e instanceof Ke && !pn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && A(/<\/no(script|embed|frames)/i, e.innerHTML) ? (I(e), !0) : (U && e.nodeType === V.text && (t = e.textContent, te([ye, be, Le], (f) => {
|
|
389
|
-
t = Y(t, f, " ");
|
|
390
|
-
}), e.textContent !== t && (B(o.removed, {
|
|
391
|
-
element: e.cloneNode()
|
|
392
|
-
}), e.textContent = t)), M(R.afterSanitizeElements, e, null), !1);
|
|
393
|
-
}, Et = function(e, t, n) {
|
|
394
|
-
if (it && (t === "id" || t === "name") && (n in l || n in mn))
|
|
395
|
-
return !1;
|
|
396
|
-
if (!(Ie && !Ne[t] && A(nn, t))) {
|
|
397
|
-
if (!(tt && A(on, t))) {
|
|
398
|
-
if (!(k.attributeCheck instanceof Function && k.attributeCheck(t, e))) {
|
|
399
|
-
if (!T[t] || Ne[t]) {
|
|
400
|
-
if (
|
|
401
|
-
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
402
|
-
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
403
|
-
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
404
|
-
!(_t(e) && (u.tagNameCheck instanceof RegExp && A(u.tagNameCheck, e) || u.tagNameCheck instanceof Function && u.tagNameCheck(e)) && (u.attributeNameCheck instanceof RegExp && A(u.attributeNameCheck, t) || u.attributeNameCheck instanceof Function && u.attributeNameCheck(t, e)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
405
|
-
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
406
|
-
t === "is" && u.allowCustomizedBuiltInElements && (u.tagNameCheck instanceof RegExp && A(u.tagNameCheck, n) || u.tagNameCheck instanceof Function && u.tagNameCheck(n)))
|
|
407
|
-
) return !1;
|
|
408
|
-
} else if (!Pe[t]) {
|
|
409
|
-
if (!A(Je, Y(n, Ze, ""))) {
|
|
410
|
-
if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Nt(n, "data:") === 0 && rt[e])) {
|
|
411
|
-
if (!(nt && !A(an, Y(n, Ze, "")))) {
|
|
412
|
-
if (n)
|
|
413
|
-
return !1;
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
return !0;
|
|
422
|
-
}, _t = function(e) {
|
|
423
|
-
return e !== "annotation-xml" && ge(e, rn);
|
|
424
|
-
}, gt = function(e) {
|
|
425
|
-
M(R.beforeSanitizeAttributes, e, null);
|
|
426
|
-
const {
|
|
427
|
-
attributes: t
|
|
428
|
-
} = e;
|
|
429
|
-
if (!t || Fe(e))
|
|
430
|
-
return;
|
|
431
|
-
const n = {
|
|
432
|
-
attrName: "",
|
|
433
|
-
attrValue: "",
|
|
434
|
-
keepAttr: !0,
|
|
435
|
-
allowedAttributes: T,
|
|
436
|
-
forceKeepAttr: void 0
|
|
437
|
-
};
|
|
438
|
-
let f = t.length;
|
|
439
|
-
for (; f--; ) {
|
|
440
|
-
const _ = t[f], {
|
|
441
|
-
name: m,
|
|
442
|
-
namespaceURI: D,
|
|
443
|
-
value: w
|
|
444
|
-
} = _, W = p(m), He = w;
|
|
445
|
-
let E = m === "value" ? He : It(He);
|
|
446
|
-
if (n.attrName = W, n.attrValue = E, n.keepAttr = !0, n.forceKeepAttr = void 0, M(R.uponSanitizeAttribute, e, n), E = n.attrValue, at && (W === "id" || W === "name") && (P(m, e), E = sn + E), re && A(/((--!?|])>)|<\/(style|title|textarea)/i, E)) {
|
|
447
|
-
P(m, e);
|
|
448
|
-
continue;
|
|
449
|
-
}
|
|
450
|
-
if (W === "attributename" && ge(E, "href")) {
|
|
451
|
-
P(m, e);
|
|
452
|
-
continue;
|
|
453
|
-
}
|
|
454
|
-
if (n.forceKeepAttr)
|
|
455
|
-
continue;
|
|
456
|
-
if (!n.keepAttr) {
|
|
457
|
-
P(m, e);
|
|
458
|
-
continue;
|
|
459
|
-
}
|
|
460
|
-
if (!ot && A(/\/>/i, E)) {
|
|
461
|
-
P(m, e);
|
|
462
|
-
continue;
|
|
463
|
-
}
|
|
464
|
-
U && te([ye, be, Le], (ht) => {
|
|
465
|
-
E = Y(E, ht, " ");
|
|
466
|
-
});
|
|
467
|
-
const At = p(e.nodeName);
|
|
468
|
-
if (!Et(At, W, E)) {
|
|
469
|
-
P(m, e);
|
|
470
|
-
continue;
|
|
471
|
-
}
|
|
472
|
-
if (S && typeof ie == "object" && typeof ie.getAttributeType == "function" && !D)
|
|
473
|
-
switch (ie.getAttributeType(At, W)) {
|
|
474
|
-
case "TrustedHTML": {
|
|
475
|
-
E = S.createHTML(E);
|
|
476
|
-
break;
|
|
477
|
-
}
|
|
478
|
-
case "TrustedScriptURL": {
|
|
479
|
-
E = S.createScriptURL(E);
|
|
480
|
-
break;
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
if (E !== He)
|
|
484
|
-
try {
|
|
485
|
-
D ? e.setAttributeNS(D, m, E) : e.setAttribute(m, E), Fe(e) ? I(e) : ze(o.removed);
|
|
486
|
-
} catch {
|
|
487
|
-
P(m, e);
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
M(R.afterSanitizeAttributes, e, null);
|
|
491
|
-
}, dn = function i(e) {
|
|
492
|
-
let t = null;
|
|
493
|
-
const n = pt(e);
|
|
494
|
-
for (M(R.beforeSanitizeShadowDOM, e, null); t = n.nextNode(); )
|
|
495
|
-
M(R.uponSanitizeShadowNode, t, null), Tt(t), gt(t), t.content instanceof O && i(t.content);
|
|
496
|
-
M(R.afterSanitizeShadowDOM, e, null);
|
|
497
|
-
};
|
|
498
|
-
return o.sanitize = function(i) {
|
|
499
|
-
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null, n = null, f = null, _ = null;
|
|
500
|
-
if (ve = !i, ve && (i = "<!-->"), typeof i != "string" && !dt(i))
|
|
501
|
-
if (typeof i.toString == "function") {
|
|
502
|
-
if (i = i.toString(), typeof i != "string")
|
|
503
|
-
throw X("dirty is not a string, aborting");
|
|
504
|
-
} else
|
|
505
|
-
throw X("toString is not a function");
|
|
506
|
-
if (!o.isSupported)
|
|
507
|
-
return i;
|
|
508
|
-
if (Ce || Ue(e), o.removed = [], typeof i == "string" && (J = !1), J) {
|
|
509
|
-
if (i.nodeName) {
|
|
510
|
-
const w = p(i.nodeName);
|
|
511
|
-
if (!d[w] || Z[w])
|
|
512
|
-
throw X("root node is forbidden and cannot be sanitized in-place");
|
|
513
|
-
}
|
|
514
|
-
} else if (i instanceof Oe)
|
|
515
|
-
t = mt("<!---->"), n = t.ownerDocument.importNode(i, !0), n.nodeType === V.element && n.nodeName === "BODY" || n.nodeName === "HTML" ? t = n : t.appendChild(n);
|
|
516
|
-
else {
|
|
517
|
-
if (!F && !U && !x && // eslint-disable-next-line unicorn/prefer-includes
|
|
518
|
-
i.indexOf("<") === -1)
|
|
519
|
-
return S && le ? S.createHTML(i) : i;
|
|
520
|
-
if (t = mt(i), !t)
|
|
521
|
-
return F ? null : le ? K : "";
|
|
522
|
-
}
|
|
523
|
-
t && Me && I(t.firstChild);
|
|
524
|
-
const m = pt(J ? i : t);
|
|
525
|
-
for (; f = m.nextNode(); )
|
|
526
|
-
Tt(f), gt(f), f.content instanceof O && dn(f.content);
|
|
527
|
-
if (J)
|
|
528
|
-
return i;
|
|
529
|
-
if (F) {
|
|
530
|
-
if (se)
|
|
531
|
-
for (_ = Qt.call(t.ownerDocument); t.firstChild; )
|
|
532
|
-
_.appendChild(t.firstChild);
|
|
533
|
-
else
|
|
534
|
-
_ = t;
|
|
535
|
-
return (T.shadowroot || T.shadowrootmode) && (_ = tn.call(a, _, !0)), _;
|
|
536
|
-
}
|
|
537
|
-
let D = x ? t.outerHTML : t.innerHTML;
|
|
538
|
-
return x && d["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && A(je, t.ownerDocument.doctype.name) && (D = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
|
|
539
|
-
` + D), U && te([ye, be, Le], (w) => {
|
|
540
|
-
D = Y(D, w, " ");
|
|
541
|
-
}), S && le ? S.createHTML(D) : D;
|
|
542
|
-
}, o.setConfig = function() {
|
|
543
|
-
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
544
|
-
Ue(i), Ce = !0;
|
|
545
|
-
}, o.clearConfig = function() {
|
|
546
|
-
G = null, Ce = !1;
|
|
547
|
-
}, o.isValidAttribute = function(i, e, t) {
|
|
548
|
-
G || Ue({});
|
|
549
|
-
const n = p(i), f = p(e);
|
|
550
|
-
return Et(n, f, t);
|
|
551
|
-
}, o.addHook = function(i, e) {
|
|
552
|
-
typeof e == "function" && B(R[i], e);
|
|
553
|
-
}, o.removeHook = function(i, e) {
|
|
554
|
-
if (e !== void 0) {
|
|
555
|
-
const t = bt(R[i], e);
|
|
556
|
-
return t === -1 ? void 0 : Lt(R[i], t, 1)[0];
|
|
557
|
-
}
|
|
558
|
-
return ze(R[i]);
|
|
559
|
-
}, o.removeHooks = function(i) {
|
|
560
|
-
R[i] = [];
|
|
561
|
-
}, o.removeAllHooks = function() {
|
|
562
|
-
R = $e();
|
|
563
|
-
}, o;
|
|
564
|
-
}
|
|
565
|
-
var Yt = qe();
|
|
566
|
-
return Yt;
|
|
567
|
-
});
|
|
568
|
-
})(St);
|
|
569
|
-
const gn = St.exports;
|
|
570
|
-
export {
|
|
571
|
-
gn as D
|
|
572
|
-
};
|