mapicgc-gl-js 0.0.78 → 0.0.80
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/.github/workflows/npm-publish.yml +2 -2
- package/README.md +13 -10
- package/dist/{html2canvas.esm-DbilGY6A-DB3xAFLF.mjs → html2canvas.esm-CKxSAI8P-DSC9_HHp.mjs} +2 -2
- package/dist/{index-k0DrX4BJ.mjs → index-58U3KmRv.mjs} +20029 -20169
- package/dist/{index.es-BR8y8uSW-D6xEGnjs.mjs → index.es-BWyxJuJN-BMkqIbwq.mjs} +3 -4
- package/dist/mapicgc-gl.js +206 -206
- package/dist/mapicgc-gl.mjs +1 -1
- package/dist/mapicgc-gl.umd.js +206 -206
- package/dist/purify.es-CLxMp-4V-DmiRgNNX.mjs +476 -0
- package/package.json +2 -2
- package/src/map/Map.js +1 -0
- package/src/mapicgc-config.json +13 -3
- package/test/exemples/addVectorLayerICGC.html +6 -6
- package/dist/purify.es-C-d0AVPf-BZqXIm-R.mjs +0 -464
|
@@ -1,464 +0,0 @@
|
|
|
1
|
-
/*! @license DOMPurify 2.5.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.0/LICENSE */
|
|
2
|
-
function R(n) {
|
|
3
|
-
"@babel/helpers - typeof";
|
|
4
|
-
return R = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o) {
|
|
5
|
-
return typeof o;
|
|
6
|
-
} : function(o) {
|
|
7
|
-
return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
8
|
-
}, R(n);
|
|
9
|
-
}
|
|
10
|
-
function Dt(n, o) {
|
|
11
|
-
return Dt = Object.setPrototypeOf || function(a, l) {
|
|
12
|
-
return a.__proto__ = l, a;
|
|
13
|
-
}, Dt(n, o);
|
|
14
|
-
}
|
|
15
|
-
function ze() {
|
|
16
|
-
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
|
|
17
|
-
return !1;
|
|
18
|
-
if (typeof Proxy == "function")
|
|
19
|
-
return !0;
|
|
20
|
-
try {
|
|
21
|
-
return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
22
|
-
})), !0;
|
|
23
|
-
} catch {
|
|
24
|
-
return !1;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function at(n, o, a) {
|
|
28
|
-
return ze() ? at = Reflect.construct : at = function(l, p, b) {
|
|
29
|
-
var A = [null];
|
|
30
|
-
A.push.apply(A, p);
|
|
31
|
-
var K = Function.bind.apply(l, A), C = new K();
|
|
32
|
-
return b && Dt(C, b.prototype), C;
|
|
33
|
-
}, at.apply(null, arguments);
|
|
34
|
-
}
|
|
35
|
-
function _(n) {
|
|
36
|
-
return Pe(n) || je(n) || Be(n) || Ge();
|
|
37
|
-
}
|
|
38
|
-
function Pe(n) {
|
|
39
|
-
if (Array.isArray(n))
|
|
40
|
-
return Mt(n);
|
|
41
|
-
}
|
|
42
|
-
function je(n) {
|
|
43
|
-
if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null)
|
|
44
|
-
return Array.from(n);
|
|
45
|
-
}
|
|
46
|
-
function Be(n, o) {
|
|
47
|
-
if (n) {
|
|
48
|
-
if (typeof n == "string")
|
|
49
|
-
return Mt(n, o);
|
|
50
|
-
var a = Object.prototype.toString.call(n).slice(8, -1);
|
|
51
|
-
if (a === "Object" && n.constructor && (a = n.constructor.name), a === "Map" || a === "Set")
|
|
52
|
-
return Array.from(n);
|
|
53
|
-
if (a === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))
|
|
54
|
-
return Mt(n, o);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
function Mt(n, o) {
|
|
58
|
-
(o == null || o > n.length) && (o = n.length);
|
|
59
|
-
for (var a = 0, l = new Array(o); a < o; a++)
|
|
60
|
-
l[a] = n[a];
|
|
61
|
-
return l;
|
|
62
|
-
}
|
|
63
|
-
function Ge() {
|
|
64
|
-
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
65
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
66
|
-
}
|
|
67
|
-
var We = Object.hasOwnProperty, le = Object.setPrototypeOf, qe = Object.isFrozen, $e = Object.getPrototypeOf, Ye = Object.getOwnPropertyDescriptor, y = Object.freeze, E = Object.seal, Ke = Object.create, de = typeof Reflect < "u" && Reflect, lt = de.apply, It = de.construct;
|
|
68
|
-
lt || (lt = function(n, o, a) {
|
|
69
|
-
return n.apply(o, a);
|
|
70
|
-
});
|
|
71
|
-
y || (y = function(n) {
|
|
72
|
-
return n;
|
|
73
|
-
});
|
|
74
|
-
E || (E = function(n) {
|
|
75
|
-
return n;
|
|
76
|
-
});
|
|
77
|
-
It || (It = function(n, o) {
|
|
78
|
-
return at(n, _(o));
|
|
79
|
-
});
|
|
80
|
-
var Ve = v(Array.prototype.forEach), ce = v(Array.prototype.pop), Y = v(Array.prototype.push), it = v(String.prototype.toLowerCase), kt = v(String.prototype.toString), ue = v(String.prototype.match), w = v(String.prototype.replace), Xe = v(String.prototype.indexOf), Ze = v(String.prototype.trim), g = v(RegExp.prototype.test), xt = Je(TypeError);
|
|
81
|
-
function v(n) {
|
|
82
|
-
return function(o) {
|
|
83
|
-
for (var a = arguments.length, l = new Array(a > 1 ? a - 1 : 0), p = 1; p < a; p++)
|
|
84
|
-
l[p - 1] = arguments[p];
|
|
85
|
-
return lt(n, o, l);
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
function Je(n) {
|
|
89
|
-
return function() {
|
|
90
|
-
for (var o = arguments.length, a = new Array(o), l = 0; l < o; l++)
|
|
91
|
-
a[l] = arguments[l];
|
|
92
|
-
return It(n, a);
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
function i(n, o, a) {
|
|
96
|
-
var l;
|
|
97
|
-
a = (l = a) !== null && l !== void 0 ? l : it, le && le(n, null);
|
|
98
|
-
for (var p = o.length; p--; ) {
|
|
99
|
-
var b = o[p];
|
|
100
|
-
if (typeof b == "string") {
|
|
101
|
-
var A = a(b);
|
|
102
|
-
A !== b && (qe(o) || (o[p] = A), b = A);
|
|
103
|
-
}
|
|
104
|
-
n[b] = !0;
|
|
105
|
-
}
|
|
106
|
-
return n;
|
|
107
|
-
}
|
|
108
|
-
function I(n) {
|
|
109
|
-
var o = Ke(null), a;
|
|
110
|
-
for (a in n)
|
|
111
|
-
lt(We, n, [a]) === !0 && (o[a] = n[a]);
|
|
112
|
-
return o;
|
|
113
|
-
}
|
|
114
|
-
function rt(n, o) {
|
|
115
|
-
for (; n !== null; ) {
|
|
116
|
-
var a = Ye(n, o);
|
|
117
|
-
if (a) {
|
|
118
|
-
if (a.get)
|
|
119
|
-
return v(a.get);
|
|
120
|
-
if (typeof a.value == "function")
|
|
121
|
-
return v(a.value);
|
|
122
|
-
}
|
|
123
|
-
n = $e(n);
|
|
124
|
-
}
|
|
125
|
-
function l(p) {
|
|
126
|
-
return console.warn("fallback value for", p), null;
|
|
127
|
-
}
|
|
128
|
-
return l;
|
|
129
|
-
}
|
|
130
|
-
var se = y(["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", "section", "select", "shadow", "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"]), Ot = y(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Lt = y(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Qe = y(["animate", "color-profile", "cursor", "discard", "fedropshadow", "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"]), Ct = y(["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"]), tn = y(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), me = y(["#text"]), pe = y(["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", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "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", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]), Rt = y(["accent-height", "accumulate", "additive", "alignment-baseline", "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", "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", "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", "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", "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", "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"]), fe = y(["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"]), ot = y(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), en = E(/\{\{[\w\W]*|[\w\W]*\}\}/gm), nn = E(/<%[\w\W]*|[\w\W]*%>/gm), rn = E(/\${[\w\W]*}/gm), on = E(/^data-[\-\w.\u00B7-\uFFFF]/), an = E(/^aria-[\-\w]+$/), ln = E(
|
|
131
|
-
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
132
|
-
// eslint-disable-line no-useless-escape
|
|
133
|
-
), cn = E(/^(?:\w+script|data):/i), un = E(
|
|
134
|
-
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
135
|
-
// eslint-disable-line no-control-regex
|
|
136
|
-
), sn = E(/^html$/i), mn = E(/^[a-z][.\w]*(-[.\w]+)+$/i), pn = function() {
|
|
137
|
-
return typeof window > "u" ? null : window;
|
|
138
|
-
}, fn = function(n, o) {
|
|
139
|
-
if (R(n) !== "object" || typeof n.createPolicy != "function")
|
|
140
|
-
return null;
|
|
141
|
-
var a = null, l = "data-tt-policy-suffix";
|
|
142
|
-
o.currentScript && o.currentScript.hasAttribute(l) && (a = o.currentScript.getAttribute(l));
|
|
143
|
-
var p = "dompurify" + (a ? "#" + a : "");
|
|
144
|
-
try {
|
|
145
|
-
return n.createPolicy(p, {
|
|
146
|
-
createHTML: function(b) {
|
|
147
|
-
return b;
|
|
148
|
-
},
|
|
149
|
-
createScriptURL: function(b) {
|
|
150
|
-
return b;
|
|
151
|
-
}
|
|
152
|
-
});
|
|
153
|
-
} catch {
|
|
154
|
-
return console.warn("TrustedTypes policy " + p + " could not be created."), null;
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
function he() {
|
|
158
|
-
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : pn(), o = function(t) {
|
|
159
|
-
return he(t);
|
|
160
|
-
};
|
|
161
|
-
if (o.version = "2.5.0", o.removed = [], !n || !n.document || n.document.nodeType !== 9)
|
|
162
|
-
return o.isSupported = !1, o;
|
|
163
|
-
var a = n.document, l = n.document, p = n.DocumentFragment, b = n.HTMLTemplateElement, A = n.Node, K = n.Element, C = n.NodeFilter, Ft = n.NamedNodeMap, ge = Ft === void 0 ? n.NamedNodeMap || n.MozNamedAttrMap : Ft, ye = n.HTMLFormElement, be = n.DOMParser, V = n.trustedTypes, X = K.prototype, Te = rt(X, "cloneNode"), Ne = rt(X, "nextSibling"), Ee = rt(X, "childNodes"), ct = rt(X, "parentNode");
|
|
164
|
-
if (typeof b == "function") {
|
|
165
|
-
var ut = l.createElement("template");
|
|
166
|
-
ut.content && ut.content.ownerDocument && (l = ut.content.ownerDocument);
|
|
167
|
-
}
|
|
168
|
-
var S = fn(V, a), st = S ? S.createHTML("") : "", Z = l, mt = Z.implementation, ve = Z.createNodeIterator, Ae = Z.createDocumentFragment, Se = Z.getElementsByTagName, we = a.importNode, Ut = {};
|
|
169
|
-
try {
|
|
170
|
-
Ut = I(l).documentMode ? l.documentMode : {};
|
|
171
|
-
} catch {
|
|
172
|
-
}
|
|
173
|
-
var k = {};
|
|
174
|
-
o.isSupported = typeof ct == "function" && mt && mt.createHTMLDocument !== void 0 && Ut !== 9;
|
|
175
|
-
var pt = en, ft = nn, dt = rn, _e = on, ke = an, xe = cn, Ht = un, Oe = mn, ht = ln, f = null, zt = i({}, [].concat(_(se), _(Ot), _(Lt), _(Ct), _(me))), d = null, Pt = i({}, [].concat(_(pe), _(Rt), _(fe), _(ot))), u = Object.seal(Object.create(null, {
|
|
176
|
-
tagNameCheck: {
|
|
177
|
-
writable: !0,
|
|
178
|
-
configurable: !1,
|
|
179
|
-
enumerable: !0,
|
|
180
|
-
value: null
|
|
181
|
-
},
|
|
182
|
-
attributeNameCheck: {
|
|
183
|
-
writable: !0,
|
|
184
|
-
configurable: !1,
|
|
185
|
-
enumerable: !0,
|
|
186
|
-
value: null
|
|
187
|
-
},
|
|
188
|
-
allowCustomizedBuiltInElements: {
|
|
189
|
-
writable: !0,
|
|
190
|
-
configurable: !1,
|
|
191
|
-
enumerable: !0,
|
|
192
|
-
value: !1
|
|
193
|
-
}
|
|
194
|
-
})), G = null, gt = null, jt = !0, yt = !0, Bt = !1, Gt = !0, F = !1, Wt = !0, D = !1, bt = !1, Tt = !1, U = !1, J = !1, Q = !1, qt = !0, $t = !1, Le = "user-content-", Nt = !0, W = !1, H = {}, z = null, Yt = i({}, ["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"]), Kt = null, Vt = i({}, ["audio", "video", "img", "source", "image", "track"]), Et = null, Xt = i({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), tt = "http://www.w3.org/1998/Math/MathML", et = "http://www.w3.org/2000/svg", x = "http://www.w3.org/1999/xhtml", P = x, vt = !1, At = null, Ce = i({}, [tt, et, x], kt), M, Re = ["application/xhtml+xml", "text/html"], De = "text/html", h, j = null, Me = l.createElement("form"), Zt = function(t) {
|
|
195
|
-
return t instanceof RegExp || t instanceof Function;
|
|
196
|
-
}, St = function(t) {
|
|
197
|
-
j && j === t || ((!t || R(t) !== "object") && (t = {}), t = I(t), M = // eslint-disable-next-line unicorn/prefer-includes
|
|
198
|
-
Re.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? M = De : M = t.PARSER_MEDIA_TYPE, h = M === "application/xhtml+xml" ? kt : it, f = "ALLOWED_TAGS" in t ? i({}, t.ALLOWED_TAGS, h) : zt, d = "ALLOWED_ATTR" in t ? i({}, t.ALLOWED_ATTR, h) : Pt, At = "ALLOWED_NAMESPACES" in t ? i({}, t.ALLOWED_NAMESPACES, kt) : Ce, Et = "ADD_URI_SAFE_ATTR" in t ? i(
|
|
199
|
-
I(Xt),
|
|
200
|
-
// eslint-disable-line indent
|
|
201
|
-
t.ADD_URI_SAFE_ATTR,
|
|
202
|
-
// eslint-disable-line indent
|
|
203
|
-
h
|
|
204
|
-
// eslint-disable-line indent
|
|
205
|
-
) : Xt, Kt = "ADD_DATA_URI_TAGS" in t ? i(
|
|
206
|
-
I(Vt),
|
|
207
|
-
// eslint-disable-line indent
|
|
208
|
-
t.ADD_DATA_URI_TAGS,
|
|
209
|
-
// eslint-disable-line indent
|
|
210
|
-
h
|
|
211
|
-
// eslint-disable-line indent
|
|
212
|
-
) : Vt, z = "FORBID_CONTENTS" in t ? i({}, t.FORBID_CONTENTS, h) : Yt, G = "FORBID_TAGS" in t ? i({}, t.FORBID_TAGS, h) : {}, gt = "FORBID_ATTR" in t ? i({}, t.FORBID_ATTR, h) : {}, H = "USE_PROFILES" in t ? t.USE_PROFILES : !1, jt = t.ALLOW_ARIA_ATTR !== !1, yt = t.ALLOW_DATA_ATTR !== !1, Bt = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Gt = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, F = t.SAFE_FOR_TEMPLATES || !1, Wt = t.SAFE_FOR_XML !== !1, D = t.WHOLE_DOCUMENT || !1, U = t.RETURN_DOM || !1, J = t.RETURN_DOM_FRAGMENT || !1, Q = t.RETURN_TRUSTED_TYPE || !1, Tt = t.FORCE_BODY || !1, qt = t.SANITIZE_DOM !== !1, $t = t.SANITIZE_NAMED_PROPS || !1, Nt = t.KEEP_CONTENT !== !1, W = t.IN_PLACE || !1, ht = t.ALLOWED_URI_REGEXP || ht, P = t.NAMESPACE || x, u = t.CUSTOM_ELEMENT_HANDLING || {}, t.CUSTOM_ELEMENT_HANDLING && Zt(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (u.tagNameCheck = t.CUSTOM_ELEMENT_HANDLING.tagNameCheck), t.CUSTOM_ELEMENT_HANDLING && Zt(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (u.attributeNameCheck = t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), t.CUSTOM_ELEMENT_HANDLING && typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (u.allowCustomizedBuiltInElements = t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), F && (yt = !1), J && (U = !0), H && (f = i({}, _(me)), d = [], H.html === !0 && (i(f, se), i(d, pe)), H.svg === !0 && (i(f, Ot), i(d, Rt), i(d, ot)), H.svgFilters === !0 && (i(f, Lt), i(d, Rt), i(d, ot)), H.mathMl === !0 && (i(f, Ct), i(d, fe), i(d, ot))), t.ADD_TAGS && (f === zt && (f = I(f)), i(f, t.ADD_TAGS, h)), t.ADD_ATTR && (d === Pt && (d = I(d)), i(d, t.ADD_ATTR, h)), t.ADD_URI_SAFE_ATTR && i(Et, t.ADD_URI_SAFE_ATTR, h), t.FORBID_CONTENTS && (z === Yt && (z = I(z)), i(z, t.FORBID_CONTENTS, h)), Nt && (f["#text"] = !0), D && i(f, ["html", "head", "body"]), f.table && (i(f, ["tbody"]), delete G.tbody), y && y(t), j = t);
|
|
213
|
-
}, Jt = i({}, ["mi", "mo", "mn", "ms", "mtext"]), Qt = i({}, ["foreignobject", "desc", "title", "annotation-xml"]), Ie = i({}, ["title", "style", "font", "a", "script"]), nt = i({}, Ot);
|
|
214
|
-
i(nt, Lt), i(nt, Qe);
|
|
215
|
-
var wt = i({}, Ct);
|
|
216
|
-
i(wt, tn);
|
|
217
|
-
var Fe = function(t) {
|
|
218
|
-
var r = ct(t);
|
|
219
|
-
(!r || !r.tagName) && (r = {
|
|
220
|
-
namespaceURI: P,
|
|
221
|
-
tagName: "template"
|
|
222
|
-
});
|
|
223
|
-
var e = it(t.tagName), c = it(r.tagName);
|
|
224
|
-
return At[t.namespaceURI] ? t.namespaceURI === et ? r.namespaceURI === x ? e === "svg" : r.namespaceURI === tt ? e === "svg" && (c === "annotation-xml" || Jt[c]) : !!nt[e] : t.namespaceURI === tt ? r.namespaceURI === x ? e === "math" : r.namespaceURI === et ? e === "math" && Qt[c] : !!wt[e] : t.namespaceURI === x ? r.namespaceURI === et && !Qt[c] || r.namespaceURI === tt && !Jt[c] ? !1 : !wt[e] && (Ie[e] || !nt[e]) : !!(M === "application/xhtml+xml" && At[t.namespaceURI]) : !1;
|
|
225
|
-
}, B = function(t) {
|
|
226
|
-
Y(o.removed, {
|
|
227
|
-
element: t
|
|
228
|
-
});
|
|
229
|
-
try {
|
|
230
|
-
t.parentNode.removeChild(t);
|
|
231
|
-
} catch {
|
|
232
|
-
try {
|
|
233
|
-
t.outerHTML = st;
|
|
234
|
-
} catch {
|
|
235
|
-
t.remove();
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}, _t = function(t, r) {
|
|
239
|
-
try {
|
|
240
|
-
Y(o.removed, {
|
|
241
|
-
attribute: r.getAttributeNode(t),
|
|
242
|
-
from: r
|
|
243
|
-
});
|
|
244
|
-
} catch {
|
|
245
|
-
Y(o.removed, {
|
|
246
|
-
attribute: null,
|
|
247
|
-
from: r
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
if (r.removeAttribute(t), t === "is" && !d[t])
|
|
251
|
-
if (U || J)
|
|
252
|
-
try {
|
|
253
|
-
B(r);
|
|
254
|
-
} catch {
|
|
255
|
-
}
|
|
256
|
-
else
|
|
257
|
-
try {
|
|
258
|
-
r.setAttribute(t, "");
|
|
259
|
-
} catch {
|
|
260
|
-
}
|
|
261
|
-
}, te = function(t) {
|
|
262
|
-
var r, e;
|
|
263
|
-
if (Tt)
|
|
264
|
-
t = "<remove></remove>" + t;
|
|
265
|
-
else {
|
|
266
|
-
var c = ue(t, /^[\r\n\t ]+/);
|
|
267
|
-
e = c && c[0];
|
|
268
|
-
}
|
|
269
|
-
M === "application/xhtml+xml" && P === x && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
|
|
270
|
-
var s = S ? S.createHTML(t) : t;
|
|
271
|
-
if (P === x)
|
|
272
|
-
try {
|
|
273
|
-
r = new be().parseFromString(s, M);
|
|
274
|
-
} catch {
|
|
275
|
-
}
|
|
276
|
-
if (!r || !r.documentElement) {
|
|
277
|
-
r = mt.createDocument(P, "template", null);
|
|
278
|
-
try {
|
|
279
|
-
r.documentElement.innerHTML = vt ? st : s;
|
|
280
|
-
} catch {
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
var N = r.body || r.documentElement;
|
|
284
|
-
return t && e && N.insertBefore(l.createTextNode(e), N.childNodes[0] || null), P === x ? Se.call(r, D ? "html" : "body")[0] : D ? r.documentElement : N;
|
|
285
|
-
}, ee = function(t) {
|
|
286
|
-
return ve.call(
|
|
287
|
-
t.ownerDocument || t,
|
|
288
|
-
t,
|
|
289
|
-
// eslint-disable-next-line no-bitwise
|
|
290
|
-
C.SHOW_ELEMENT | C.SHOW_COMMENT | C.SHOW_TEXT | C.SHOW_PROCESSING_INSTRUCTION | C.SHOW_CDATA_SECTION,
|
|
291
|
-
null,
|
|
292
|
-
!1
|
|
293
|
-
);
|
|
294
|
-
}, Ue = function(t) {
|
|
295
|
-
return t instanceof ye && (typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || !(t.attributes instanceof ge) || typeof t.removeAttribute != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function");
|
|
296
|
-
}, q = function(t) {
|
|
297
|
-
return R(A) === "object" ? t instanceof A : t && R(t) === "object" && typeof t.nodeType == "number" && typeof t.nodeName == "string";
|
|
298
|
-
}, O = function(t, r, e) {
|
|
299
|
-
k[t] && Ve(k[t], function(c) {
|
|
300
|
-
c.call(o, r, e, j);
|
|
301
|
-
});
|
|
302
|
-
}, ne = function(t) {
|
|
303
|
-
var r;
|
|
304
|
-
if (O("beforeSanitizeElements", t, null), Ue(t) || g(/[\u0080-\uFFFF]/, t.nodeName))
|
|
305
|
-
return B(t), !0;
|
|
306
|
-
var e = h(t.nodeName);
|
|
307
|
-
if (O("uponSanitizeElement", t, {
|
|
308
|
-
tagName: e,
|
|
309
|
-
allowedTags: f
|
|
310
|
-
}), t.hasChildNodes() && !q(t.firstElementChild) && (!q(t.content) || !q(t.content.firstElementChild)) && g(/<[/\w]/g, t.innerHTML) && g(/<[/\w]/g, t.textContent) || e === "select" && g(/<template/i, t.innerHTML) || t.nodeType === 7 || Wt && t.nodeType === 8 && g(/<[/\w]/g, t.data))
|
|
311
|
-
return B(t), !0;
|
|
312
|
-
if (!f[e] || G[e]) {
|
|
313
|
-
if (!G[e] && oe(e) && (u.tagNameCheck instanceof RegExp && g(u.tagNameCheck, e) || u.tagNameCheck instanceof Function && u.tagNameCheck(e)))
|
|
314
|
-
return !1;
|
|
315
|
-
if (Nt && !z[e]) {
|
|
316
|
-
var c = ct(t) || t.parentNode, s = Ee(t) || t.childNodes;
|
|
317
|
-
if (s && c)
|
|
318
|
-
for (var N = s.length, m = N - 1; m >= 0; --m)
|
|
319
|
-
c.insertBefore(Te(s[m], !0), Ne(t));
|
|
320
|
-
}
|
|
321
|
-
return B(t), !0;
|
|
322
|
-
}
|
|
323
|
-
return t instanceof K && !Fe(t) || (e === "noscript" || e === "noembed" || e === "noframes") && g(/<\/no(script|embed|frames)/i, t.innerHTML) ? (B(t), !0) : (F && t.nodeType === 3 && (r = t.textContent, r = w(r, pt, " "), r = w(r, ft, " "), r = w(r, dt, " "), t.textContent !== r && (Y(o.removed, {
|
|
324
|
-
element: t.cloneNode()
|
|
325
|
-
}), t.textContent = r)), O("afterSanitizeElements", t, null), !1);
|
|
326
|
-
}, re = function(t, r, e) {
|
|
327
|
-
if (qt && (r === "id" || r === "name") && (e in l || e in Me))
|
|
328
|
-
return !1;
|
|
329
|
-
if (!(yt && !gt[r] && g(_e, r)) && !(jt && g(ke, r))) {
|
|
330
|
-
if (!d[r] || gt[r]) {
|
|
331
|
-
if (
|
|
332
|
-
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
333
|
-
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
334
|
-
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
335
|
-
!(oe(t) && (u.tagNameCheck instanceof RegExp && g(u.tagNameCheck, t) || u.tagNameCheck instanceof Function && u.tagNameCheck(t)) && (u.attributeNameCheck instanceof RegExp && g(u.attributeNameCheck, r) || u.attributeNameCheck instanceof Function && u.attributeNameCheck(r)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
336
|
-
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
337
|
-
r === "is" && u.allowCustomizedBuiltInElements && (u.tagNameCheck instanceof RegExp && g(u.tagNameCheck, e) || u.tagNameCheck instanceof Function && u.tagNameCheck(e)))
|
|
338
|
-
)
|
|
339
|
-
return !1;
|
|
340
|
-
} else if (!Et[r] && !g(ht, w(e, Ht, "")) && !((r === "src" || r === "xlink:href" || r === "href") && t !== "script" && Xe(e, "data:") === 0 && Kt[t]) && !(Bt && !g(xe, w(e, Ht, ""))) && e)
|
|
341
|
-
return !1;
|
|
342
|
-
}
|
|
343
|
-
return !0;
|
|
344
|
-
}, oe = function(t) {
|
|
345
|
-
return t !== "annotation-xml" && ue(t, Oe);
|
|
346
|
-
}, ae = function(t) {
|
|
347
|
-
var r, e, c, s;
|
|
348
|
-
O("beforeSanitizeAttributes", t, null);
|
|
349
|
-
var N = t.attributes;
|
|
350
|
-
if (N) {
|
|
351
|
-
var m = {
|
|
352
|
-
attrName: "",
|
|
353
|
-
attrValue: "",
|
|
354
|
-
keepAttr: !0,
|
|
355
|
-
allowedAttributes: d
|
|
356
|
-
};
|
|
357
|
-
for (s = N.length; s--; ) {
|
|
358
|
-
r = N[s];
|
|
359
|
-
var $ = r, L = $.name, T = $.namespaceURI;
|
|
360
|
-
if (e = L === "value" ? r.value : Ze(r.value), c = h(L), m.attrName = c, m.attrValue = e, m.keepAttr = !0, m.forceKeepAttr = void 0, O("uponSanitizeAttribute", t, m), e = m.attrValue, !m.forceKeepAttr && (_t(L, t), !!m.keepAttr)) {
|
|
361
|
-
if (!Gt && g(/\/>/i, e)) {
|
|
362
|
-
_t(L, t);
|
|
363
|
-
continue;
|
|
364
|
-
}
|
|
365
|
-
F && (e = w(e, pt, " "), e = w(e, ft, " "), e = w(e, dt, " "));
|
|
366
|
-
var ie = h(t.nodeName);
|
|
367
|
-
if (re(ie, c, e)) {
|
|
368
|
-
if ($t && (c === "id" || c === "name") && (_t(L, t), e = Le + e), S && R(V) === "object" && typeof V.getAttributeType == "function" && !T)
|
|
369
|
-
switch (V.getAttributeType(ie, c)) {
|
|
370
|
-
case "TrustedHTML": {
|
|
371
|
-
e = S.createHTML(e);
|
|
372
|
-
break;
|
|
373
|
-
}
|
|
374
|
-
case "TrustedScriptURL": {
|
|
375
|
-
e = S.createScriptURL(e);
|
|
376
|
-
break;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
try {
|
|
380
|
-
T ? t.setAttributeNS(T, L, e) : t.setAttribute(L, e), ce(o.removed);
|
|
381
|
-
} catch {
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
O("afterSanitizeAttributes", t, null);
|
|
387
|
-
}
|
|
388
|
-
}, He = function t(r) {
|
|
389
|
-
var e, c = ee(r);
|
|
390
|
-
for (O("beforeSanitizeShadowDOM", r, null); e = c.nextNode(); )
|
|
391
|
-
O("uponSanitizeShadowNode", e, null), !ne(e) && (e.content instanceof p && t(e.content), ae(e));
|
|
392
|
-
O("afterSanitizeShadowDOM", r, null);
|
|
393
|
-
};
|
|
394
|
-
return o.sanitize = function(t) {
|
|
395
|
-
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e, c, s, N, m;
|
|
396
|
-
if (vt = !t, vt && (t = "<!-->"), typeof t != "string" && !q(t))
|
|
397
|
-
if (typeof t.toString == "function") {
|
|
398
|
-
if (t = t.toString(), typeof t != "string")
|
|
399
|
-
throw xt("dirty is not a string, aborting");
|
|
400
|
-
} else
|
|
401
|
-
throw xt("toString is not a function");
|
|
402
|
-
if (!o.isSupported) {
|
|
403
|
-
if (R(n.toStaticHTML) === "object" || typeof n.toStaticHTML == "function") {
|
|
404
|
-
if (typeof t == "string")
|
|
405
|
-
return n.toStaticHTML(t);
|
|
406
|
-
if (q(t))
|
|
407
|
-
return n.toStaticHTML(t.outerHTML);
|
|
408
|
-
}
|
|
409
|
-
return t;
|
|
410
|
-
}
|
|
411
|
-
if (bt || St(r), o.removed = [], typeof t == "string" && (W = !1), W) {
|
|
412
|
-
if (t.nodeName) {
|
|
413
|
-
var $ = h(t.nodeName);
|
|
414
|
-
if (!f[$] || G[$])
|
|
415
|
-
throw xt("root node is forbidden and cannot be sanitized in-place");
|
|
416
|
-
}
|
|
417
|
-
} else if (t instanceof A)
|
|
418
|
-
e = te("<!---->"), c = e.ownerDocument.importNode(t, !0), c.nodeType === 1 && c.nodeName === "BODY" || c.nodeName === "HTML" ? e = c : e.appendChild(c);
|
|
419
|
-
else {
|
|
420
|
-
if (!U && !F && !D && // eslint-disable-next-line unicorn/prefer-includes
|
|
421
|
-
t.indexOf("<") === -1)
|
|
422
|
-
return S && Q ? S.createHTML(t) : t;
|
|
423
|
-
if (e = te(t), !e)
|
|
424
|
-
return U ? null : Q ? st : "";
|
|
425
|
-
}
|
|
426
|
-
e && Tt && B(e.firstChild);
|
|
427
|
-
for (var L = ee(W ? t : e); s = L.nextNode(); )
|
|
428
|
-
s.nodeType === 3 && s === N || ne(s) || (s.content instanceof p && He(s.content), ae(s), N = s);
|
|
429
|
-
if (N = null, W)
|
|
430
|
-
return t;
|
|
431
|
-
if (U) {
|
|
432
|
-
if (J)
|
|
433
|
-
for (m = Ae.call(e.ownerDocument); e.firstChild; )
|
|
434
|
-
m.appendChild(e.firstChild);
|
|
435
|
-
else
|
|
436
|
-
m = e;
|
|
437
|
-
return (d.shadowroot || d.shadowrootmod) && (m = we.call(a, m, !0)), m;
|
|
438
|
-
}
|
|
439
|
-
var T = D ? e.outerHTML : e.innerHTML;
|
|
440
|
-
return D && f["!doctype"] && e.ownerDocument && e.ownerDocument.doctype && e.ownerDocument.doctype.name && g(sn, e.ownerDocument.doctype.name) && (T = "<!DOCTYPE " + e.ownerDocument.doctype.name + `>
|
|
441
|
-
` + T), F && (T = w(T, pt, " "), T = w(T, ft, " "), T = w(T, dt, " ")), S && Q ? S.createHTML(T) : T;
|
|
442
|
-
}, o.setConfig = function(t) {
|
|
443
|
-
St(t), bt = !0;
|
|
444
|
-
}, o.clearConfig = function() {
|
|
445
|
-
j = null, bt = !1;
|
|
446
|
-
}, o.isValidAttribute = function(t, r, e) {
|
|
447
|
-
j || St({});
|
|
448
|
-
var c = h(t), s = h(r);
|
|
449
|
-
return re(c, s, e);
|
|
450
|
-
}, o.addHook = function(t, r) {
|
|
451
|
-
typeof r == "function" && (k[t] = k[t] || [], Y(k[t], r));
|
|
452
|
-
}, o.removeHook = function(t) {
|
|
453
|
-
if (k[t])
|
|
454
|
-
return ce(k[t]);
|
|
455
|
-
}, o.removeHooks = function(t) {
|
|
456
|
-
k[t] && (k[t] = []);
|
|
457
|
-
}, o.removeAllHooks = function() {
|
|
458
|
-
k = {};
|
|
459
|
-
}, o;
|
|
460
|
-
}
|
|
461
|
-
var dn = he();
|
|
462
|
-
export {
|
|
463
|
-
dn as default
|
|
464
|
-
};
|