vult-security-kyc 0.0.5 → 0.0.6
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.
|
@@ -5,10 +5,10 @@ function Ln(s) {
|
|
|
5
5
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
6
6
|
}
|
|
7
7
|
/*! @license DOMPurify 3.3.0 | (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.0/LICENSE */
|
|
8
|
-
var Ve,
|
|
9
|
-
function
|
|
10
|
-
if (
|
|
11
|
-
|
|
8
|
+
var Ve, Ct;
|
|
9
|
+
function vt() {
|
|
10
|
+
if (Ct) return Ve;
|
|
11
|
+
Ct = 1;
|
|
12
12
|
const {
|
|
13
13
|
entries: s,
|
|
14
14
|
setPrototypeOf: i,
|
|
@@ -29,8 +29,8 @@ function Ct() {
|
|
|
29
29
|
}), m || (m = function(o) {
|
|
30
30
|
return o;
|
|
31
31
|
}), J || (J = function(o, f) {
|
|
32
|
-
for (var a = arguments.length, p = new Array(a > 2 ? a - 2 : 0),
|
|
33
|
-
p[
|
|
32
|
+
for (var a = arguments.length, p = new Array(a > 2 ? a - 2 : 0), C = 2; C < a; C++)
|
|
33
|
+
p[C - 2] = arguments[C];
|
|
34
34
|
return o.apply(f, p);
|
|
35
35
|
}), F || (F = function(o) {
|
|
36
36
|
for (var f = arguments.length, a = new Array(f > 1 ? f - 1 : 0), p = 1; p < f; p++)
|
|
@@ -60,8 +60,8 @@ function Ct() {
|
|
|
60
60
|
for (; a--; ) {
|
|
61
61
|
let p = o[a];
|
|
62
62
|
if (typeof p == "string") {
|
|
63
|
-
const
|
|
64
|
-
|
|
63
|
+
const C = f(p);
|
|
64
|
+
C !== p && (u(o) || (o[a] = C), p = C);
|
|
65
65
|
}
|
|
66
66
|
c[p] = !0;
|
|
67
67
|
}
|
|
@@ -129,9 +129,9 @@ function Ct() {
|
|
|
129
129
|
let a = null;
|
|
130
130
|
const p = "data-tt-policy-suffix";
|
|
131
131
|
f && f.hasAttribute(p) && (a = f.getAttribute(p));
|
|
132
|
-
const
|
|
132
|
+
const C = "dompurify" + (a ? "#" + a : "");
|
|
133
133
|
try {
|
|
134
|
-
return o.createPolicy(
|
|
134
|
+
return o.createPolicy(C, {
|
|
135
135
|
createHTML(G) {
|
|
136
136
|
return G;
|
|
137
137
|
},
|
|
@@ -140,7 +140,7 @@ function Ct() {
|
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
142
|
} catch {
|
|
143
|
-
return console.warn("TrustedTypes policy " +
|
|
143
|
+
return console.warn("TrustedTypes policy " + C + " could not be created."), null;
|
|
144
144
|
}
|
|
145
145
|
}, nt = function() {
|
|
146
146
|
return {
|
|
@@ -164,9 +164,9 @@ function Ct() {
|
|
|
164
164
|
document: f
|
|
165
165
|
} = c;
|
|
166
166
|
const a = f, p = a.currentScript, {
|
|
167
|
-
DocumentFragment:
|
|
167
|
+
DocumentFragment: C,
|
|
168
168
|
HTMLTemplateElement: G,
|
|
169
|
-
Node:
|
|
169
|
+
Node: Ce,
|
|
170
170
|
Element: ot,
|
|
171
171
|
NodeFilter: re,
|
|
172
172
|
NamedNodeMap: tn = c.NamedNodeMap || c.MozNamedAttrMap,
|
|
@@ -180,7 +180,7 @@ function Ct() {
|
|
|
180
180
|
}
|
|
181
181
|
let b, ae = "";
|
|
182
182
|
const {
|
|
183
|
-
implementation:
|
|
183
|
+
implementation: ve,
|
|
184
184
|
createNodeIterator: cn,
|
|
185
185
|
createDocumentFragment: un,
|
|
186
186
|
getElementsByTagName: fn
|
|
@@ -188,7 +188,7 @@ function Ct() {
|
|
|
188
188
|
importNode: mn
|
|
189
189
|
} = a;
|
|
190
190
|
let O = nt();
|
|
191
|
-
o.isSupported = typeof s == "function" && typeof ge == "function" &&
|
|
191
|
+
o.isSupported = typeof s == "function" && typeof ge == "function" && ve && ve.createHTMLDocument !== void 0;
|
|
192
192
|
const {
|
|
193
193
|
MUSTACHE_EXPR: Me,
|
|
194
194
|
ERB_EXPR: Ne,
|
|
@@ -326,7 +326,7 @@ function Ct() {
|
|
|
326
326
|
} catch {
|
|
327
327
|
}
|
|
328
328
|
if (!t || !t.documentElement) {
|
|
329
|
-
t =
|
|
329
|
+
t = ve.createDocument(X, "template", null);
|
|
330
330
|
try {
|
|
331
331
|
t.documentElement.innerHTML = Fe ? ae : h;
|
|
332
332
|
} catch {
|
|
@@ -345,7 +345,7 @@ function Ct() {
|
|
|
345
345
|
}, Ye = function(e) {
|
|
346
346
|
return e instanceof nn && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof tn) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
|
|
347
347
|
}, yt = function(e) {
|
|
348
|
-
return typeof
|
|
348
|
+
return typeof Ce == "function" && e instanceof Ce;
|
|
349
349
|
};
|
|
350
350
|
function H(r, e, t) {
|
|
351
351
|
me(r, (n) => {
|
|
@@ -369,8 +369,8 @@ function Ct() {
|
|
|
369
369
|
const h = ge(e) || e.parentNode, R = ln(e) || e.childNodes;
|
|
370
370
|
if (R && h) {
|
|
371
371
|
const _ = R.length;
|
|
372
|
-
for (let
|
|
373
|
-
const W = rn(R[
|
|
372
|
+
for (let v = _ - 1; v >= 0; --v) {
|
|
373
|
+
const W = rn(R[v], !0);
|
|
374
374
|
W.__removalCount = (e.__removalCount || 0) + 1, h.insertBefore(W, an(e));
|
|
375
375
|
}
|
|
376
376
|
}
|
|
@@ -431,7 +431,7 @@ function Ct() {
|
|
|
431
431
|
for (; h--; ) {
|
|
432
432
|
const R = t[h], {
|
|
433
433
|
name: _,
|
|
434
|
-
namespaceURI:
|
|
434
|
+
namespaceURI: v,
|
|
435
435
|
value: W
|
|
436
436
|
} = R, q = S(_), $e = W;
|
|
437
437
|
let I = _ === "value" ? $e : Ut($e);
|
|
@@ -461,7 +461,7 @@ function Ct() {
|
|
|
461
461
|
z(_, e);
|
|
462
462
|
continue;
|
|
463
463
|
}
|
|
464
|
-
if (b && typeof he == "object" && typeof he.getAttributeType == "function" && !
|
|
464
|
+
if (b && typeof he == "object" && typeof he.getAttributeType == "function" && !v)
|
|
465
465
|
switch (he.getAttributeType(bt, q)) {
|
|
466
466
|
case "TrustedHTML": {
|
|
467
467
|
I = b.createHTML(I);
|
|
@@ -474,7 +474,7 @@ function Ct() {
|
|
|
474
474
|
}
|
|
475
475
|
if (I !== $e)
|
|
476
476
|
try {
|
|
477
|
-
|
|
477
|
+
v ? e.setAttributeNS(v, _, I) : e.setAttribute(_, I), Ye(e) ? x(e) : Xe(o.removed);
|
|
478
478
|
} catch {
|
|
479
479
|
z(_, e);
|
|
480
480
|
}
|
|
@@ -484,7 +484,7 @@ function Ct() {
|
|
|
484
484
|
let t = null;
|
|
485
485
|
const n = St(e);
|
|
486
486
|
for (H(O.beforeSanitizeShadowDOM, e, null); t = n.nextNode(); )
|
|
487
|
-
H(O.uponSanitizeShadowNode, t, null), It(t), Lt(t), t.content instanceof
|
|
487
|
+
H(O.uponSanitizeShadowNode, t, null), It(t), Lt(t), t.content instanceof C && r(t.content);
|
|
488
488
|
H(O.afterSanitizeShadowDOM, e, null);
|
|
489
489
|
};
|
|
490
490
|
return o.sanitize = function(r) {
|
|
@@ -503,7 +503,7 @@ function Ct() {
|
|
|
503
503
|
if (!w[W] || le[W])
|
|
504
504
|
throw ne("root node is forbidden and cannot be sanitized in-place");
|
|
505
505
|
}
|
|
506
|
-
} else if (r instanceof
|
|
506
|
+
} else if (r instanceof Ce)
|
|
507
507
|
t = wt("<!---->"), n = t.ownerDocument.importNode(r, !0), n.nodeType === oe.element && n.nodeName === "BODY" || n.nodeName === "HTML" ? t = n : t.appendChild(n);
|
|
508
508
|
else {
|
|
509
509
|
if (!$ && !Y && !U && // eslint-disable-next-line unicorn/prefer-includes
|
|
@@ -515,7 +515,7 @@ function Ct() {
|
|
|
515
515
|
t && We && x(t.firstChild);
|
|
516
516
|
const _ = St(ce ? r : t);
|
|
517
517
|
for (; h = _.nextNode(); )
|
|
518
|
-
It(h), Lt(h), h.content instanceof
|
|
518
|
+
It(h), Lt(h), h.content instanceof C && In(h.content);
|
|
519
519
|
if (ce)
|
|
520
520
|
return r;
|
|
521
521
|
if ($) {
|
|
@@ -526,11 +526,11 @@ function Ct() {
|
|
|
526
526
|
R = t;
|
|
527
527
|
return (y.shadowroot || y.shadowrootmode) && (R = mn.call(a, R, !0)), R;
|
|
528
528
|
}
|
|
529
|
-
let
|
|
530
|
-
return U && w["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && D(et, t.ownerDocument.doctype.name) && (
|
|
531
|
-
` +
|
|
532
|
-
|
|
533
|
-
}), b && _e ? b.createHTML(
|
|
529
|
+
let v = U ? t.outerHTML : t.innerHTML;
|
|
530
|
+
return U && w["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && D(et, t.ownerDocument.doctype.name) && (v = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
|
|
531
|
+
` + v), Y && me([Me, Ne, xe], (W) => {
|
|
532
|
+
v = te(v, W, " ");
|
|
533
|
+
}), b && _e ? b.createHTML(v) : v;
|
|
534
534
|
}, o.setConfig = function() {
|
|
535
535
|
let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
536
536
|
Be(r), He = !0;
|
|
@@ -559,10 +559,10 @@ function Ct() {
|
|
|
559
559
|
}
|
|
560
560
|
var je, Mt;
|
|
561
561
|
function bn() {
|
|
562
|
-
return Mt || (Mt = 1, je = window.DOMPurify || (window.DOMPurify =
|
|
562
|
+
return Mt || (Mt = 1, je = window.DOMPurify || (window.DOMPurify = vt().default || vt())), je;
|
|
563
563
|
}
|
|
564
564
|
var On = bn();
|
|
565
|
-
const
|
|
565
|
+
const Cn = /* @__PURE__ */ Ln(On), vn = ({ color: s }) => {
|
|
566
566
|
const i = `
|
|
567
567
|
<svg
|
|
568
568
|
width="48"
|
|
@@ -605,7 +605,7 @@ const vn = /* @__PURE__ */ Ln(On), Cn = ({ color: s }) => {
|
|
|
605
605
|
/>
|
|
606
606
|
</svg>
|
|
607
607
|
`;
|
|
608
|
-
return
|
|
608
|
+
return Cn.sanitize(i, {
|
|
609
609
|
ALLOWED_TAGS: ["style", "def"],
|
|
610
610
|
ALLOWED_ATTR: ["class"],
|
|
611
611
|
USE_PROFILES: { svg: !0 }
|
|
@@ -642,7 +642,7 @@ const Mn = ({
|
|
|
642
642
|
}, A = document.createElement("div"), E = () => {
|
|
643
643
|
s(), i && i();
|
|
644
644
|
}, m = document.createElement("div");
|
|
645
|
-
return m.innerHTML =
|
|
645
|
+
return m.innerHTML = vn({ color: "#d9d9d9" }), fe({
|
|
646
646
|
element: A,
|
|
647
647
|
event: "click",
|
|
648
648
|
handler: E
|
|
@@ -670,7 +670,7 @@ function Pt(s) {
|
|
|
670
670
|
production: "prod"
|
|
671
671
|
}[i] || i, A = {
|
|
672
672
|
dev: "https://face-dev.vultpayments.dev",
|
|
673
|
-
stage: "https://face-stage.
|
|
673
|
+
stage: "https://face-stage.vultsecurity.com",
|
|
674
674
|
demo: "https://face-demo.vultsecurity.com",
|
|
675
675
|
prod: "https://face.vultsecurity.com"
|
|
676
676
|
};
|