@ranty/ranty-sdk 4.0.0-beta.0 → 4.0.0-beta.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ranty/ranty-sdk",
3
- "version": "4.0.0-beta.0",
3
+ "version": "4.0.0-beta.1",
4
4
  "description": "Ranty sdk",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
@@ -88,7 +88,7 @@
88
88
  "jsencrypt": "^3.3.2",
89
89
  "jspdf": "^4.2.1",
90
90
  "lit": "^2.8.0",
91
- "nave-ui-library": "^1.0.0-beta.58",
91
+ "nave-ui-library": "^1.0.0-beta.62",
92
92
  "normalize.css": "^8.0.1",
93
93
  "qrcode": "^1.5.4",
94
94
  "recaptcha-v3": "^1.11.3",
@@ -1,596 +0,0 @@
1
- /*! @license DOMPurify 3.4.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.2/LICENSE */
2
- const {
3
- entries: yt,
4
- setPrototypeOf: mt,
5
- isFrozen: Kt,
6
- getPrototypeOf: Zt,
7
- getOwnPropertyDescriptor: Jt
8
- } = Object;
9
- let {
10
- freeze: y,
11
- seal: N,
12
- create: X
13
- } = Object, {
14
- apply: Fe,
15
- construct: He
16
- } = typeof Reflect != "undefined" && Reflect;
17
- y || (y = function(n) {
18
- return n;
19
- });
20
- N || (N = function(n) {
21
- return n;
22
- });
23
- Fe || (Fe = function(n, l) {
24
- for (var a = arguments.length, f = new Array(a > 2 ? a - 2 : 0), b = 2; b < a; b++)
25
- f[b - 2] = arguments[b];
26
- return n.apply(l, f);
27
- });
28
- He || (He = function(n) {
29
- for (var l = arguments.length, a = new Array(l > 1 ? l - 1 : 0), f = 1; f < l; f++)
30
- a[f - 1] = arguments[f];
31
- return new n(...a);
32
- });
33
- const ee = T(Array.prototype.forEach), Qt = T(Array.prototype.lastIndexOf), pt = T(Array.prototype.pop), te = T(Array.prototype.push), en = T(Array.prototype.splice), O = Array.isArray, ie = T(String.prototype.toLowerCase), Pe = T(String.prototype.toString), Tt = T(String.prototype.match), Y = T(String.prototype.replace), dt = T(String.prototype.indexOf), tn = T(String.prototype.trim), nn = T(Number.prototype.toString), on = T(Boolean.prototype.toString), _t = typeof BigInt == "undefined" ? null : T(BigInt.prototype.toString), Et = typeof Symbol == "undefined" ? null : T(Symbol.prototype.toString), u = T(Object.prototype.hasOwnProperty), ne = T(Object.prototype.toString), g = T(RegExp.prototype.test), de = rn(TypeError);
34
- function T(i) {
35
- return function(n) {
36
- n instanceof RegExp && (n.lastIndex = 0);
37
- for (var l = arguments.length, a = new Array(l > 1 ? l - 1 : 0), f = 1; f < l; f++)
38
- a[f - 1] = arguments[f];
39
- return Fe(i, n, a);
40
- };
41
- }
42
- function rn(i) {
43
- return function() {
44
- for (var n = arguments.length, l = new Array(n), a = 0; a < n; a++)
45
- l[a] = arguments[a];
46
- return He(i, l);
47
- };
48
- }
49
- function s(i, n) {
50
- let l = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ie;
51
- if (mt && mt(i, null), !O(n))
52
- return i;
53
- let a = n.length;
54
- for (; a--; ) {
55
- let f = n[a];
56
- if (typeof f == "string") {
57
- const b = l(f);
58
- b !== f && (Kt(n) || (n[a] = b), f = b);
59
- }
60
- i[f] = !0;
61
- }
62
- return i;
63
- }
64
- function an(i) {
65
- for (let n = 0; n < i.length; n++)
66
- u(i, n) || (i[n] = null);
67
- return i;
68
- }
69
- function I(i) {
70
- const n = X(null);
71
- for (const [l, a] of yt(i))
72
- u(i, l) && (O(a) ? n[l] = an(a) : a && typeof a == "object" && a.constructor === Object ? n[l] = I(a) : n[l] = a);
73
- return n;
74
- }
75
- function sn(i) {
76
- switch (typeof i) {
77
- case "string":
78
- return i;
79
- case "number":
80
- return nn(i);
81
- case "boolean":
82
- return on(i);
83
- case "bigint":
84
- return _t ? _t(i) : "0";
85
- case "symbol":
86
- return Et ? Et(i) : "Symbol()";
87
- case "undefined":
88
- return ne(i);
89
- case "function":
90
- case "object": {
91
- if (i === null)
92
- return ne(i);
93
- const n = i, l = j(n, "toString");
94
- if (typeof l == "function") {
95
- const a = l(n);
96
- return typeof a == "string" ? a : ne(a);
97
- }
98
- return ne(i);
99
- }
100
- default:
101
- return ne(i);
102
- }
103
- }
104
- function j(i, n) {
105
- for (; i !== null; ) {
106
- const a = Jt(i, n);
107
- if (a) {
108
- if (a.get)
109
- return T(a.get);
110
- if (typeof a.value == "function")
111
- return T(a.value);
112
- }
113
- i = Zt(i);
114
- }
115
- function l() {
116
- return null;
117
- }
118
- return l;
119
- }
120
- function ln(i) {
121
- try {
122
- return g(i, ""), !0;
123
- } catch (n) {
124
- return !1;
125
- }
126
- }
127
- const At = 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", "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"]), xe = y(["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"]), ke = y(["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"]), cn = y(["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"]), Ue = 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", "mprescripts"]), fn = y(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), gt = y(["#text"]), ht = 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", "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"]), ve = y(["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"]), St = y(["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"]), _e = y(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), un = N(/\{\{[\w\W]*|[\w\W]*\}\}/gm), mn = N(/<%[\w\W]*|[\w\W]*%>/gm), pn = N(/\$\{[\w\W]*/gm), Tn = N(/^data-[\-\w.\u00B7-\uFFFF]+$/), dn = N(/^aria-[\-\w]+$/), bt = N(
128
- /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
129
- // eslint-disable-line no-useless-escape
130
- ), _n = N(/^(?:\w+script|data):/i), En = N(
131
- /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
132
- // eslint-disable-line no-control-regex
133
- ), Dt = N(/^html$/i), An = N(/^[a-z][.\w]*(-[.\w]+)+$/i);
134
- var Rt = /* @__PURE__ */ Object.freeze({
135
- __proto__: null,
136
- ARIA_ATTR: dn,
137
- ATTR_WHITESPACE: En,
138
- CUSTOM_ELEMENT: An,
139
- DATA_ATTR: Tn,
140
- DOCTYPE_NAME: Dt,
141
- ERB_EXPR: mn,
142
- IS_ALLOWED_URI: bt,
143
- IS_SCRIPT_OR_DATA: _n,
144
- MUSTACHE_EXPR: un,
145
- TMPLIT_EXPR: pn
146
- });
147
- const oe = {
148
- element: 1,
149
- text: 3,
150
- // Deprecated
151
- progressingInstruction: 7,
152
- comment: 8,
153
- document: 9
154
- }, gn = function() {
155
- return typeof window == "undefined" ? null : window;
156
- }, hn = function(n, l) {
157
- if (typeof n != "object" || typeof n.createPolicy != "function")
158
- return null;
159
- let a = null;
160
- const f = "data-tt-policy-suffix";
161
- l && l.hasAttribute(f) && (a = l.getAttribute(f));
162
- const b = "dompurify" + (a ? "#" + a : "");
163
- try {
164
- return n.createPolicy(b, {
165
- createHTML(H) {
166
- return H;
167
- },
168
- createScriptURL(H) {
169
- return H;
170
- }
171
- });
172
- } catch (H) {
173
- return console.warn("TrustedTypes policy " + b + " could not be created."), null;
174
- }
175
- }, Ot = function() {
176
- return {
177
- afterSanitizeAttributes: [],
178
- afterSanitizeElements: [],
179
- afterSanitizeShadowDOM: [],
180
- beforeSanitizeAttributes: [],
181
- beforeSanitizeElements: [],
182
- beforeSanitizeShadowDOM: [],
183
- uponSanitizeAttribute: [],
184
- uponSanitizeElement: [],
185
- uponSanitizeShadowNode: []
186
- };
187
- };
188
- function It() {
189
- let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : gn();
190
- const n = (r) => It(r);
191
- if (n.version = "3.4.2", n.removed = [], !i || !i.document || i.document.nodeType !== oe.document || !i.Element)
192
- return n.isSupported = !1, n;
193
- let {
194
- document: l
195
- } = i;
196
- const a = l, f = a.currentScript, {
197
- DocumentFragment: b,
198
- HTMLTemplateElement: H,
199
- Node: Ee,
200
- Element: ze,
201
- NodeFilter: V,
202
- NamedNodeMap: Lt = i.NamedNodeMap || i.MozNamedAttrMap,
203
- HTMLFormElement: Nt,
204
- DOMParser: Ct,
205
- trustedTypes: re
206
- } = i, $ = ze.prototype, Mt = j($, "cloneNode"), wt = j($, "remove"), Pt = j($, "nextSibling"), xt = j($, "childNodes"), ae = j($, "parentNode");
207
- if (typeof H == "function") {
208
- const r = l.createElement("template");
209
- r.content && r.content.ownerDocument && (l = r.content.ownerDocument);
210
- }
211
- let S, q = "";
212
- const {
213
- implementation: Ae,
214
- createNodeIterator: kt,
215
- createDocumentFragment: Ut,
216
- getElementsByTagName: vt
217
- } = l, {
218
- importNode: Ft
219
- } = a;
220
- let R = Ot();
221
- n.isSupported = typeof yt == "function" && typeof ae == "function" && Ae && Ae.createHTMLDocument !== void 0;
222
- const {
223
- MUSTACHE_EXPR: se,
224
- ERB_EXPR: le,
225
- TMPLIT_EXPR: ce,
226
- DATA_ATTR: Ht,
227
- ARIA_ATTR: zt,
228
- IS_SCRIPT_OR_DATA: Gt,
229
- ATTR_WHITESPACE: Ge,
230
- CUSTOM_ELEMENT: Bt
231
- } = Rt;
232
- let {
233
- IS_ALLOWED_URI: Be
234
- } = Rt, _ = null;
235
- const We = s({}, [...At, ...xe, ...ke, ...Ue, ...gt]);
236
- let A = null;
237
- const Ye = s({}, [...ht, ...ve, ...St, ..._e]);
238
- let m = Object.seal(X(null, {
239
- tagNameCheck: {
240
- writable: !0,
241
- configurable: !1,
242
- enumerable: !0,
243
- value: null
244
- },
245
- attributeNameCheck: {
246
- writable: !0,
247
- configurable: !1,
248
- enumerable: !0,
249
- value: null
250
- },
251
- allowCustomizedBuiltInElements: {
252
- writable: !0,
253
- configurable: !1,
254
- enumerable: !0,
255
- value: !1
256
- }
257
- })), K = null, fe = null;
258
- const k = Object.seal(X(null, {
259
- tagCheck: {
260
- writable: !0,
261
- configurable: !1,
262
- enumerable: !0,
263
- value: null
264
- },
265
- attributeCheck: {
266
- writable: !0,
267
- configurable: !1,
268
- enumerable: !0,
269
- value: null
270
- }
271
- }));
272
- let Xe = !0, ge = !0, je = !1, Ve = !0, U = !1, Z = !0, v = !1, he = !1, Se = !1, z = !1, ue = !1, me = !1, $e = !0, qe = !1;
273
- const Ke = "user-content-";
274
- let Re = !0, J = !1, G = {}, w = null;
275
- const Oe = s({}, ["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"]);
276
- let Ze = null;
277
- const Je = s({}, ["audio", "video", "img", "source", "image", "track"]);
278
- let ye = null;
279
- const Qe = s({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), pe = "http://www.w3.org/1998/Math/MathML", Te = "http://www.w3.org/2000/svg", P = "http://www.w3.org/1999/xhtml";
280
- let B = P, be = !1, De = null;
281
- const Wt = s({}, [pe, Te, P], Pe);
282
- let Ie = s({}, ["mi", "mo", "mn", "ms", "mtext"]), Le = s({}, ["annotation-xml"]);
283
- const Yt = s({}, ["title", "style", "font", "a", "script"]);
284
- let Q = null;
285
- const Xt = ["application/xhtml+xml", "text/html"], jt = "text/html";
286
- let d = null, W = null;
287
- const Vt = l.createElement("form"), et = function(e) {
288
- return e instanceof RegExp || e instanceof Function;
289
- }, Ne = function() {
290
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
291
- if (W && W === e)
292
- return;
293
- (!e || typeof e != "object") && (e = {}), e = I(e), Q = // eslint-disable-next-line unicorn/prefer-includes
294
- Xt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? jt : e.PARSER_MEDIA_TYPE, d = Q === "application/xhtml+xml" ? Pe : ie, _ = u(e, "ALLOWED_TAGS") && O(e.ALLOWED_TAGS) ? s({}, e.ALLOWED_TAGS, d) : We, A = u(e, "ALLOWED_ATTR") && O(e.ALLOWED_ATTR) ? s({}, e.ALLOWED_ATTR, d) : Ye, De = u(e, "ALLOWED_NAMESPACES") && O(e.ALLOWED_NAMESPACES) ? s({}, e.ALLOWED_NAMESPACES, Pe) : Wt, ye = u(e, "ADD_URI_SAFE_ATTR") && O(e.ADD_URI_SAFE_ATTR) ? s(I(Qe), e.ADD_URI_SAFE_ATTR, d) : Qe, Ze = u(e, "ADD_DATA_URI_TAGS") && O(e.ADD_DATA_URI_TAGS) ? s(I(Je), e.ADD_DATA_URI_TAGS, d) : Je, w = u(e, "FORBID_CONTENTS") && O(e.FORBID_CONTENTS) ? s({}, e.FORBID_CONTENTS, d) : Oe, K = u(e, "FORBID_TAGS") && O(e.FORBID_TAGS) ? s({}, e.FORBID_TAGS, d) : I({}), fe = u(e, "FORBID_ATTR") && O(e.FORBID_ATTR) ? s({}, e.FORBID_ATTR, d) : I({}), G = u(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? I(e.USE_PROFILES) : e.USE_PROFILES : !1, Xe = e.ALLOW_ARIA_ATTR !== !1, ge = e.ALLOW_DATA_ATTR !== !1, je = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ve = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, U = e.SAFE_FOR_TEMPLATES || !1, Z = e.SAFE_FOR_XML !== !1, v = e.WHOLE_DOCUMENT || !1, z = e.RETURN_DOM || !1, ue = e.RETURN_DOM_FRAGMENT || !1, me = e.RETURN_TRUSTED_TYPE || !1, Se = e.FORCE_BODY || !1, $e = e.SANITIZE_DOM !== !1, qe = e.SANITIZE_NAMED_PROPS || !1, Re = e.KEEP_CONTENT !== !1, J = e.IN_PLACE || !1, Be = ln(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : bt, B = typeof e.NAMESPACE == "string" ? e.NAMESPACE : P, Ie = u(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? I(e.MATHML_TEXT_INTEGRATION_POINTS) : s({}, ["mi", "mo", "mn", "ms", "mtext"]), Le = u(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? I(e.HTML_INTEGRATION_POINTS) : s({}, ["annotation-xml"]);
295
- const t = u(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? I(e.CUSTOM_ELEMENT_HANDLING) : X(null);
296
- if (m = X(null), u(t, "tagNameCheck") && et(t.tagNameCheck) && (m.tagNameCheck = t.tagNameCheck), u(t, "attributeNameCheck") && et(t.attributeNameCheck) && (m.attributeNameCheck = t.attributeNameCheck), u(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (m.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), U && (ge = !1), ue && (z = !0), G && (_ = s({}, gt), A = X(null), G.html === !0 && (s(_, At), s(A, ht)), G.svg === !0 && (s(_, xe), s(A, ve), s(A, _e)), G.svgFilters === !0 && (s(_, ke), s(A, ve), s(A, _e)), G.mathMl === !0 && (s(_, Ue), s(A, St), s(A, _e))), k.tagCheck = null, k.attributeCheck = null, u(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? k.tagCheck = e.ADD_TAGS : O(e.ADD_TAGS) && (_ === We && (_ = I(_)), s(_, e.ADD_TAGS, d))), u(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? k.attributeCheck = e.ADD_ATTR : O(e.ADD_ATTR) && (A === Ye && (A = I(A)), s(A, e.ADD_ATTR, d))), u(e, "ADD_URI_SAFE_ATTR") && O(e.ADD_URI_SAFE_ATTR) && s(ye, e.ADD_URI_SAFE_ATTR, d), u(e, "FORBID_CONTENTS") && O(e.FORBID_CONTENTS) && (w === Oe && (w = I(w)), s(w, e.FORBID_CONTENTS, d)), u(e, "ADD_FORBID_CONTENTS") && O(e.ADD_FORBID_CONTENTS) && (w === Oe && (w = I(w)), s(w, e.ADD_FORBID_CONTENTS, d)), Re && (_["#text"] = !0), v && s(_, ["html", "head", "body"]), _.table && (s(_, ["tbody"]), delete K.tbody), e.TRUSTED_TYPES_POLICY) {
297
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
298
- throw de('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
299
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
300
- throw de('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
301
- S = e.TRUSTED_TYPES_POLICY, q = S.createHTML("");
302
- } else
303
- S === void 0 && (S = hn(re, f)), S !== null && typeof q == "string" && (q = S.createHTML(""));
304
- y && y(e), W = e;
305
- }, tt = s({}, [...xe, ...ke, ...cn]), nt = s({}, [...Ue, ...fn]), $t = function(e) {
306
- let t = ae(e);
307
- (!t || !t.tagName) && (t = {
308
- namespaceURI: B,
309
- tagName: "template"
310
- });
311
- const o = ie(e.tagName), c = ie(t.tagName);
312
- return De[e.namespaceURI] ? e.namespaceURI === Te ? t.namespaceURI === P ? o === "svg" : t.namespaceURI === pe ? o === "svg" && (c === "annotation-xml" || Ie[c]) : !!tt[o] : e.namespaceURI === pe ? t.namespaceURI === P ? o === "math" : t.namespaceURI === Te ? o === "math" && Le[c] : !!nt[o] : e.namespaceURI === P ? t.namespaceURI === Te && !Le[c] || t.namespaceURI === pe && !Ie[c] ? !1 : !nt[o] && (Yt[o] || !tt[o]) : !!(Q === "application/xhtml+xml" && De[e.namespaceURI]) : !1;
313
- }, C = function(e) {
314
- te(n.removed, {
315
- element: e
316
- });
317
- try {
318
- ae(e).removeChild(e);
319
- } catch (t) {
320
- wt(e);
321
- }
322
- }, F = function(e, t) {
323
- try {
324
- te(n.removed, {
325
- attribute: t.getAttributeNode(e),
326
- from: t
327
- });
328
- } catch (o) {
329
- te(n.removed, {
330
- attribute: null,
331
- from: t
332
- });
333
- }
334
- if (t.removeAttribute(e), e === "is")
335
- if (z || ue)
336
- try {
337
- C(t);
338
- } catch (o) {
339
- }
340
- else
341
- try {
342
- t.setAttribute(e, "");
343
- } catch (o) {
344
- }
345
- }, ot = function(e) {
346
- let t = null, o = null;
347
- if (Se)
348
- e = "<remove></remove>" + e;
349
- else {
350
- const p = Tt(e, /^[\r\n\t ]+/);
351
- o = p && p[0];
352
- }
353
- Q === "application/xhtml+xml" && B === P && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
354
- const c = S ? S.createHTML(e) : e;
355
- if (B === P)
356
- try {
357
- t = new Ct().parseFromString(c, Q);
358
- } catch (p) {
359
- }
360
- if (!t || !t.documentElement) {
361
- t = Ae.createDocument(B, "template", null);
362
- try {
363
- t.documentElement.innerHTML = be ? q : c;
364
- } catch (p) {
365
- }
366
- }
367
- const h = t.body || t.documentElement;
368
- return e && o && h.insertBefore(l.createTextNode(o), h.childNodes[0] || null), B === P ? vt.call(t, v ? "html" : "body")[0] : v ? t.documentElement : h;
369
- }, it = function(e) {
370
- return kt.call(
371
- e.ownerDocument || e,
372
- e,
373
- // eslint-disable-next-line no-bitwise
374
- V.SHOW_ELEMENT | V.SHOW_COMMENT | V.SHOW_TEXT | V.SHOW_PROCESSING_INSTRUCTION | V.SHOW_CDATA_SECTION,
375
- null
376
- );
377
- }, Ce = function(e) {
378
- return e instanceof Nt && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof Lt) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
379
- }, Me = function(e) {
380
- return typeof Ee == "function" && e instanceof Ee;
381
- };
382
- function x(r, e, t) {
383
- ee(r, (o) => {
384
- o.call(n, e, t, W);
385
- });
386
- }
387
- const rt = function(e) {
388
- let t = null;
389
- if (x(R.beforeSanitizeElements, e, null), Ce(e))
390
- return C(e), !0;
391
- const o = d(e.nodeName);
392
- if (x(R.uponSanitizeElement, e, {
393
- tagName: o,
394
- allowedTags: _
395
- }), Z && e.hasChildNodes() && !Me(e.firstElementChild) && g(/<[/\w!]/g, e.innerHTML) && g(/<[/\w!]/g, e.textContent) || Z && e.namespaceURI === P && o === "style" && Me(e.firstElementChild) || e.nodeType === oe.progressingInstruction || Z && e.nodeType === oe.comment && g(/<[/\w]/g, e.data))
396
- return C(e), !0;
397
- if (K[o] || !(k.tagCheck instanceof Function && k.tagCheck(o)) && !_[o]) {
398
- if (!K[o] && st(o) && (m.tagNameCheck instanceof RegExp && g(m.tagNameCheck, o) || m.tagNameCheck instanceof Function && m.tagNameCheck(o)))
399
- return !1;
400
- if (Re && !w[o]) {
401
- const c = ae(e) || e.parentNode, h = xt(e) || e.childNodes;
402
- if (h && c) {
403
- const p = h.length;
404
- for (let D = p - 1; D >= 0; --D) {
405
- const L = Mt(h[D], !0);
406
- c.insertBefore(L, Pt(e));
407
- }
408
- }
409
- }
410
- return C(e), !0;
411
- }
412
- return e instanceof ze && !$t(e) || (o === "noscript" || o === "noembed" || o === "noframes") && g(/<\/no(script|embed|frames)/i, e.innerHTML) ? (C(e), !0) : (U && e.nodeType === oe.text && (t = e.textContent, ee([se, le, ce], (c) => {
413
- t = Y(t, c, " ");
414
- }), e.textContent !== t && (te(n.removed, {
415
- element: e.cloneNode()
416
- }), e.textContent = t)), x(R.afterSanitizeElements, e, null), !1);
417
- }, at = function(e, t, o) {
418
- if (fe[t] || $e && (t === "id" || t === "name") && (o in l || o in Vt))
419
- return !1;
420
- const c = A[t] || k.attributeCheck instanceof Function && k.attributeCheck(t, e);
421
- if (!(ge && !fe[t] && g(Ht, t))) {
422
- if (!(Xe && g(zt, t))) {
423
- if (!c || fe[t]) {
424
- if (
425
- // First condition does a very basic check if a) it's basically a valid custom element tagname AND
426
- // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
427
- // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
428
- !(st(e) && (m.tagNameCheck instanceof RegExp && g(m.tagNameCheck, e) || m.tagNameCheck instanceof Function && m.tagNameCheck(e)) && (m.attributeNameCheck instanceof RegExp && g(m.attributeNameCheck, t) || m.attributeNameCheck instanceof Function && m.attributeNameCheck(t, e)) || // Alternative, second condition checks if it's an `is`-attribute, AND
429
- // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
430
- t === "is" && m.allowCustomizedBuiltInElements && (m.tagNameCheck instanceof RegExp && g(m.tagNameCheck, o) || m.tagNameCheck instanceof Function && m.tagNameCheck(o)))
431
- )
432
- return !1;
433
- } else if (!ye[t]) {
434
- if (!g(Be, Y(o, Ge, ""))) {
435
- if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && dt(o, "data:") === 0 && Ze[e])) {
436
- if (!(je && !g(Gt, Y(o, Ge, "")))) {
437
- if (o)
438
- return !1;
439
- }
440
- }
441
- }
442
- }
443
- }
444
- }
445
- return !0;
446
- }, qt = s({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), st = function(e) {
447
- return !qt[ie(e)] && g(Bt, e);
448
- }, lt = function(e) {
449
- x(R.beforeSanitizeAttributes, e, null);
450
- const {
451
- attributes: t
452
- } = e;
453
- if (!t || Ce(e))
454
- return;
455
- const o = {
456
- attrName: "",
457
- attrValue: "",
458
- keepAttr: !0,
459
- allowedAttributes: A,
460
- forceKeepAttr: void 0
461
- };
462
- let c = t.length;
463
- for (; c--; ) {
464
- const h = t[c], {
465
- name: p,
466
- namespaceURI: D,
467
- value: L
468
- } = h, M = d(p), we = L;
469
- let E = p === "value" ? we : tn(we);
470
- if (o.attrName = M, o.attrValue = E, o.keepAttr = !0, o.forceKeepAttr = void 0, x(R.uponSanitizeAttribute, e, o), E = o.attrValue, qe && (M === "id" || M === "name") && dt(E, Ke) !== 0 && (F(p, e), E = Ke + E), Z && g(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, E)) {
471
- F(p, e);
472
- continue;
473
- }
474
- if (M === "attributename" && Tt(E, "href")) {
475
- F(p, e);
476
- continue;
477
- }
478
- if (o.forceKeepAttr)
479
- continue;
480
- if (!o.keepAttr) {
481
- F(p, e);
482
- continue;
483
- }
484
- if (!Ve && g(/\/>/i, E)) {
485
- F(p, e);
486
- continue;
487
- }
488
- U && ee([se, le, ce], (ut) => {
489
- E = Y(E, ut, " ");
490
- });
491
- const ft = d(e.nodeName);
492
- if (!at(ft, M, E)) {
493
- F(p, e);
494
- continue;
495
- }
496
- if (S && typeof re == "object" && typeof re.getAttributeType == "function" && !D)
497
- switch (re.getAttributeType(ft, M)) {
498
- case "TrustedHTML": {
499
- E = S.createHTML(E);
500
- break;
501
- }
502
- case "TrustedScriptURL": {
503
- E = S.createScriptURL(E);
504
- break;
505
- }
506
- }
507
- if (E !== we)
508
- try {
509
- D ? e.setAttributeNS(D, p, E) : e.setAttribute(p, E), Ce(e) ? C(e) : pt(n.removed);
510
- } catch (ut) {
511
- F(p, e);
512
- }
513
- }
514
- x(R.afterSanitizeAttributes, e, null);
515
- }, ct = function(e) {
516
- let t = null;
517
- const o = it(e);
518
- for (x(R.beforeSanitizeShadowDOM, e, null); t = o.nextNode(); )
519
- x(R.uponSanitizeShadowNode, t, null), rt(t), lt(t), t.content instanceof b && ct(t.content);
520
- x(R.afterSanitizeShadowDOM, e, null);
521
- };
522
- return n.sanitize = function(r) {
523
- let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null, o = null, c = null, h = null;
524
- if (be = !r, be && (r = "<!-->"), typeof r != "string" && !Me(r) && (r = sn(r), typeof r != "string"))
525
- throw de("dirty is not a string, aborting");
526
- if (!n.isSupported)
527
- return r;
528
- if (he || Ne(e), n.removed = [], typeof r == "string" && (J = !1), J) {
529
- const L = r.nodeName;
530
- if (typeof L == "string") {
531
- const M = d(L);
532
- if (!_[M] || K[M])
533
- throw de("root node is forbidden and cannot be sanitized in-place");
534
- }
535
- } else if (r instanceof Ee)
536
- t = ot("<!---->"), o = t.ownerDocument.importNode(r, !0), o.nodeType === oe.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? t = o : t.appendChild(o);
537
- else {
538
- if (!z && !U && !v && // eslint-disable-next-line unicorn/prefer-includes
539
- r.indexOf("<") === -1)
540
- return S && me ? S.createHTML(r) : r;
541
- if (t = ot(r), !t)
542
- return z ? null : me ? q : "";
543
- }
544
- t && Se && C(t.firstChild);
545
- const p = it(J ? r : t);
546
- for (; c = p.nextNode(); )
547
- rt(c), lt(c), c.content instanceof b && ct(c.content);
548
- if (J)
549
- return r;
550
- if (z) {
551
- if (U) {
552
- t.normalize();
553
- let L = t.innerHTML;
554
- ee([se, le, ce], (M) => {
555
- L = Y(L, M, " ");
556
- }), t.innerHTML = L;
557
- }
558
- if (ue)
559
- for (h = Ut.call(t.ownerDocument); t.firstChild; )
560
- h.appendChild(t.firstChild);
561
- else
562
- h = t;
563
- return (A.shadowroot || A.shadowrootmode) && (h = Ft.call(a, h, !0)), h;
564
- }
565
- let D = v ? t.outerHTML : t.innerHTML;
566
- return v && _["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && g(Dt, t.ownerDocument.doctype.name) && (D = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
567
- ` + D), U && ee([se, le, ce], (L) => {
568
- D = Y(D, L, " ");
569
- }), S && me ? S.createHTML(D) : D;
570
- }, n.setConfig = function() {
571
- let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
572
- Ne(r), he = !0;
573
- }, n.clearConfig = function() {
574
- W = null, he = !1;
575
- }, n.isValidAttribute = function(r, e, t) {
576
- W || Ne({});
577
- const o = d(r), c = d(e);
578
- return at(o, c, t);
579
- }, n.addHook = function(r, e) {
580
- typeof e == "function" && te(R[r], e);
581
- }, n.removeHook = function(r, e) {
582
- if (e !== void 0) {
583
- const t = Qt(R[r], e);
584
- return t === -1 ? void 0 : en(R[r], t, 1)[0];
585
- }
586
- return pt(R[r]);
587
- }, n.removeHooks = function(r) {
588
- R[r] = [];
589
- }, n.removeAllHooks = function() {
590
- R = Ot();
591
- }, n;
592
- }
593
- var Sn = It();
594
- export {
595
- Sn as default
596
- };
File without changes