youverify-liveness-web 1.0.8 → 1.0.9
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/index.js +138 -129
- package/dist/index.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -47,12 +47,12 @@ function Qt(e) {
|
|
|
47
47
|
}
|
|
48
48
|
function _t() {
|
|
49
49
|
var e, t, n, r, o, i, s, a;
|
|
50
|
-
for (xe.sort(Xt); e = xe.shift(); ) e.__d && (t = xe.length, r = void 0, i = (o = (n = e).__v).__e, s = [], a = [], n.__P && ((r = ve({}, o)).__v = o.__v + 1, H.vnode && H.vnode(r), _n(n.__P, r, o, n.__n, n.__P.namespaceURI, 32 & o.__u ? [i] : null, s, i ?? Ae(o), !!(32 & o.__u), a), r.__v = o.__v, r.__.__k[r.__i] = r,
|
|
50
|
+
for (xe.sort(Xt); e = xe.shift(); ) e.__d && (t = xe.length, r = void 0, i = (o = (n = e).__v).__e, s = [], a = [], n.__P && ((r = ve({}, o)).__v = o.__v + 1, H.vnode && H.vnode(r), _n(n.__P, r, o, n.__n, n.__P.namespaceURI, 32 & o.__u ? [i] : null, s, i ?? Ae(o), !!(32 & o.__u), a), r.__v = o.__v, r.__.__k[r.__i] = r, Ir(s, r, a), r.__e != i && Ar(r)), xe.length > t && xe.sort(Xt));
|
|
51
51
|
_t.__r = 0;
|
|
52
52
|
}
|
|
53
53
|
function Rr(e, t, n, r, o, i, s, a, l, u, d) {
|
|
54
54
|
var c, f, p, _, y, v = r && r.__k || Nr, m = t.length;
|
|
55
|
-
for (n.__d = l, Xo(n, t, v), l = n.__d, c = 0; c < m; c++) (p = n.__k[c]) != null && typeof p != "boolean" && typeof p != "function" && (f = p.__i === -1 ? rt : v[p.__i] || rt, p.__i = c, _n(e, p, f, o, i, s, a, l, u, d), _ = p.__e, p.ref && f.ref != p.ref && (f.ref && yn(f.ref, null, p), d.push(p.ref, p.__c || _, p)), y == null && _ != null && (y = _), 65536 & p.__u || f.__k === p.__k ? l =
|
|
55
|
+
for (n.__d = l, Xo(n, t, v), l = n.__d, c = 0; c < m; c++) (p = n.__k[c]) != null && typeof p != "boolean" && typeof p != "function" && (f = p.__i === -1 ? rt : v[p.__i] || rt, p.__i = c, _n(e, p, f, o, i, s, a, l, u, d), _ = p.__e, p.ref && f.ref != p.ref && (f.ref && yn(f.ref, null, p), d.push(p.ref, p.__c || _, p)), y == null && _ != null && (y = _), 65536 & p.__u || f.__k === p.__k ? l = Dr(p, l, e) : typeof p.type == "function" && p.__d !== void 0 ? l = p.__d : _ && (l = _.nextSibling), p.__d = void 0, p.__u &= -196609);
|
|
56
56
|
n.__d = l, n.__e = y;
|
|
57
57
|
}
|
|
58
58
|
function Xo(e, t, n) {
|
|
@@ -60,10 +60,10 @@ function Xo(e, t, n) {
|
|
|
60
60
|
for (e.__k = [], r = 0; r < l; r++) s = r + c, (o = e.__k[r] = (o = t[r]) == null || typeof o == "boolean" || typeof o == "function" ? null : typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? Je(null, o, null, null, null) : Tt(o) ? Je(G, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? Je(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : o) != null ? (o.__ = e, o.__b = e.__b + 1, a = Zo(o, n, s, d), o.__i = a, i = null, a !== -1 && (d--, (i = n[a]) && (i.__u |= 131072)), i == null || i.__v === null ? (a == -1 && c--, typeof o.type != "function" && (o.__u |= 65536)) : a !== s && (a == s - 1 ? c = a - s : a == s + 1 ? c++ : a > s ? d > l - s ? c += a - s : c-- : a < s && c++, a !== r + c && (o.__u |= 65536))) : (i = n[s]) && i.key == null && i.__e && !(131072 & i.__u) && (i.__e == e.__d && (e.__d = Ae(i)), en(i, i, !1), n[s] = null, d--);
|
|
61
61
|
if (d) for (r = 0; r < u; r++) (i = n[r]) != null && !(131072 & i.__u) && (i.__e == e.__d && (e.__d = Ae(i)), en(i, i));
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function Dr(e, t, n) {
|
|
64
64
|
var r, o;
|
|
65
65
|
if (typeof e.type == "function") {
|
|
66
|
-
for (r = e.__k, o = 0; r && o < r.length; o++) r[o] && (r[o].__ = e, t =
|
|
66
|
+
for (r = e.__k, o = 0; r && o < r.length; o++) r[o] && (r[o].__ = e, t = Dr(r[o], t, n));
|
|
67
67
|
return t;
|
|
68
68
|
}
|
|
69
69
|
e.__e != t && (t && e.type && !n.contains(t) && (t = Ae(e)), n.insertBefore(e.__e, t || null), t = e.__e);
|
|
@@ -131,8 +131,8 @@ function _n(e, t, n, r, o, i, s, a, l, u) {
|
|
|
131
131
|
if (m = t.props, g = "prototype" in b && b.prototype.render, E = (d = b.contextType) && r[d.__c], $ = d ? E ? E.props.value : d.__ : r, n.__c ? v = (c = t.__c = n.__c).__ = c.__E : (g ? t.__c = c = new b(m, $) : (t.__c = c = new ue(m, $), c.constructor = b, c.render = Qo), E && E.sub(c), c.props = m, c.state || (c.state = {}), c.context = $, c.__n = r, f = c.__d = !0, c.__h = [], c._sb = []), g && c.__s == null && (c.__s = c.state), g && b.getDerivedStateFromProps != null && (c.__s == c.state && (c.__s = ve({}, c.__s)), ve(c.__s, b.getDerivedStateFromProps(m, c.__s))), p = c.props, _ = c.state, c.__v = t, f) g && b.getDerivedStateFromProps == null && c.componentWillMount != null && c.componentWillMount(), g && c.componentDidMount != null && c.__h.push(c.componentDidMount);
|
|
132
132
|
else {
|
|
133
133
|
if (g && b.getDerivedStateFromProps == null && m !== p && c.componentWillReceiveProps != null && c.componentWillReceiveProps(m, $), !c.__e && (c.shouldComponentUpdate != null && c.shouldComponentUpdate(m, c.__s, $) === !1 || t.__v === n.__v)) {
|
|
134
|
-
for (t.__v !== n.__v && (c.props = m, c.state = c.__s, c.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.forEach(function(
|
|
135
|
-
|
|
134
|
+
for (t.__v !== n.__v && (c.props = m, c.state = c.__s, c.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.forEach(function(D) {
|
|
135
|
+
D && (D.__ = t);
|
|
136
136
|
}), S = 0; S < c._sb.length; S++) c.__h.push(c._sb[S]);
|
|
137
137
|
c._sb = [], c.__h.length && s.push(c);
|
|
138
138
|
break e;
|
|
@@ -148,17 +148,17 @@ function _n(e, t, n, r, o, i, s, a, l, u) {
|
|
|
148
148
|
c.__d = !1, M && M(t), d = c.render(c.props, c.state, c.context), c.state = c.__s;
|
|
149
149
|
while (c.__d && ++R < 25);
|
|
150
150
|
c.state = c.__s, c.getChildContext != null && (r = ve(ve({}, r), c.getChildContext())), g && !f && c.getSnapshotBeforeUpdate != null && (y = c.getSnapshotBeforeUpdate(p, _)), Rr(e, Tt(F = d != null && d.type === G && d.key == null ? d.props.children : d) ? F : [F], t, n, r, o, i, s, a, l, u), c.base = t.__e, t.__u &= -161, c.__h.length && s.push(c), v && (c.__E = c.__ = null);
|
|
151
|
-
} catch (
|
|
151
|
+
} catch (D) {
|
|
152
152
|
if (t.__v = null, l || i != null) {
|
|
153
153
|
for (t.__u |= l ? 160 : 32; a && a.nodeType === 8 && a.nextSibling; ) a = a.nextSibling;
|
|
154
154
|
i[i.indexOf(a)] = null, t.__e = a;
|
|
155
155
|
} else t.__e = n.__e, t.__k = n.__k;
|
|
156
|
-
H.__e(
|
|
156
|
+
H.__e(D, t, n);
|
|
157
157
|
}
|
|
158
158
|
else i == null && t.__v === n.__v ? (t.__k = n.__k, t.__e = n.__e) : t.__e = Jo(n.__e, t, n, r, o, i, s, l, u);
|
|
159
159
|
(d = H.diffed) && d(t);
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function Ir(e, t, n) {
|
|
162
162
|
t.__d = void 0;
|
|
163
163
|
for (var r = 0; r < n.length; r++) yn(n[r], n[++r], n[++r]);
|
|
164
164
|
H.__c && H.__c(t, e), e.some(function(o) {
|
|
@@ -228,7 +228,7 @@ function Qo(e, t, n) {
|
|
|
228
228
|
}
|
|
229
229
|
function Ue(e, t, n) {
|
|
230
230
|
var r, o, i, s;
|
|
231
|
-
H.__ && H.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, i = [], s = [], _n(t, e = (!r && n || t).__k = de(G, null, [e]), o || rt, rt, t.namespaceURI, !r && n ? [n] : o ? null : t.firstChild ? ot.call(t.childNodes) : null, i, !r && n ? n : o ? o.__e : t.firstChild, r, s),
|
|
231
|
+
H.__ && H.__(e, t), o = (r = typeof n == "function") ? null : n && n.__k || t.__k, i = [], s = [], _n(t, e = (!r && n || t).__k = de(G, null, [e]), o || rt, rt, t.namespaceURI, !r && n ? [n] : o ? null : t.firstChild ? ot.call(t.childNodes) : null, i, !r && n ? n : o ? o.__e : t.firstChild, r, s), Ir(i, e, s);
|
|
232
232
|
}
|
|
233
233
|
function Or(e, t) {
|
|
234
234
|
Ue(e, t, Or);
|
|
@@ -286,7 +286,7 @@ function h(e, t, n, r, o, i) {
|
|
|
286
286
|
return H.vnode && H.vnode(u), u;
|
|
287
287
|
}
|
|
288
288
|
var ge, Y, Ht, Un, ze = 0, Hr = [], J = H, zn = J.__b, Vn = J.__r, jn = J.diffed, Bn = J.__c, qn = J.unmount, Yn = J.__;
|
|
289
|
-
function
|
|
289
|
+
function De(e, t) {
|
|
290
290
|
J.__h && J.__h(Y, e, ze || t), ze = 0;
|
|
291
291
|
var n = Y.__H || (Y.__H = { __: [], __h: [] });
|
|
292
292
|
return e >= n.__.length && n.__.push({}), n.__[e];
|
|
@@ -295,7 +295,7 @@ function x(e) {
|
|
|
295
295
|
return ze = 1, it(Wr, e);
|
|
296
296
|
}
|
|
297
297
|
function it(e, t, n) {
|
|
298
|
-
var r =
|
|
298
|
+
var r = De(ge++, 2);
|
|
299
299
|
if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Wr(void 0, t), function(a) {
|
|
300
300
|
var l = r.__N ? r.__N[0] : r.__[0], u = r.t(l, a);
|
|
301
301
|
l !== u && (r.__N = [u, r.__[1]], r.__c.setState({}));
|
|
@@ -329,11 +329,11 @@ function it(e, t, n) {
|
|
|
329
329
|
return r.__N || r.__;
|
|
330
330
|
}
|
|
331
331
|
function W(e, t) {
|
|
332
|
-
var n =
|
|
332
|
+
var n = De(ge++, 3);
|
|
333
333
|
!J.__s && bn(n.__H, t) && (n.__ = e, n.i = t, Y.__H.__h.push(n));
|
|
334
334
|
}
|
|
335
|
-
function
|
|
336
|
-
var n =
|
|
335
|
+
function Ie(e, t) {
|
|
336
|
+
var n = De(ge++, 4);
|
|
337
337
|
!J.__s && bn(n.__H, t) && (n.__ = e, n.i = t, Y.__h.push(n));
|
|
338
338
|
}
|
|
339
339
|
function w(e) {
|
|
@@ -342,7 +342,7 @@ function w(e) {
|
|
|
342
342
|
}, []);
|
|
343
343
|
}
|
|
344
344
|
function gn(e, t, n) {
|
|
345
|
-
ze = 6,
|
|
345
|
+
ze = 6, Ie(function() {
|
|
346
346
|
return typeof e == "function" ? (e(t()), function() {
|
|
347
347
|
return e(null);
|
|
348
348
|
}) : e ? (e.current = t(), function() {
|
|
@@ -351,7 +351,7 @@ function gn(e, t, n) {
|
|
|
351
351
|
}, n == null ? n : n.concat(e));
|
|
352
352
|
}
|
|
353
353
|
function j(e, t) {
|
|
354
|
-
var n =
|
|
354
|
+
var n = De(ge++, 7);
|
|
355
355
|
return bn(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
|
|
356
356
|
}
|
|
357
357
|
function V(e, t) {
|
|
@@ -360,14 +360,14 @@ function V(e, t) {
|
|
|
360
360
|
}, t);
|
|
361
361
|
}
|
|
362
362
|
function te(e) {
|
|
363
|
-
var t = Y.context[e.__c], n =
|
|
363
|
+
var t = Y.context[e.__c], n = De(ge++, 9);
|
|
364
364
|
return n.c = e, t ? (n.__ == null && (n.__ = !0, t.sub(Y)), t.props.value) : e.__;
|
|
365
365
|
}
|
|
366
366
|
function wn(e, t) {
|
|
367
367
|
J.useDebugValue && J.useDebugValue(t ? t(e) : e);
|
|
368
368
|
}
|
|
369
369
|
function ni(e) {
|
|
370
|
-
var t =
|
|
370
|
+
var t = De(ge++, 10), n = x();
|
|
371
371
|
return t.__ = e, Y.componentDidCatch || (Y.componentDidCatch = function(r, o) {
|
|
372
372
|
t.__ && t.__(r, o), n[1](r);
|
|
373
373
|
}), [n[0], function() {
|
|
@@ -375,7 +375,7 @@ function ni(e) {
|
|
|
375
375
|
}];
|
|
376
376
|
}
|
|
377
377
|
function ke() {
|
|
378
|
-
var e =
|
|
378
|
+
var e = De(ge++, 11);
|
|
379
379
|
if (!e.__) {
|
|
380
380
|
for (var t = Y.__v; t !== null && !t.__m && t.__ !== null; ) t = t.__;
|
|
381
381
|
var n = t.__m || (t.__m = [0, 0]);
|
|
@@ -684,7 +684,7 @@ H.diffed = function(e) {
|
|
|
684
684
|
};
|
|
685
685
|
var Zr = { ReactCurrentDispatcher: { current: { readContext: function(e) {
|
|
686
686
|
return $n.__n[e.__c].props.value;
|
|
687
|
-
}, useCallback: V, useContext: te, useDebugValue: wn, useDeferredValue: Sn, useEffect: W, useId: ke, useImperativeHandle: gn, useInsertionEffect: Fn, useLayoutEffect:
|
|
687
|
+
}, useCallback: V, useContext: te, useDebugValue: wn, useDeferredValue: Sn, useEffect: W, useId: ke, useImperativeHandle: gn, useInsertionEffect: Fn, useLayoutEffect: Ie, useMemo: j, useReducer: it, useRef: w, useState: x, useSyncExternalStore: St, useTransition: Cn } } }, yi = "17.0.2";
|
|
688
688
|
function Jr(e) {
|
|
689
689
|
return de.bind(null, e);
|
|
690
690
|
}
|
|
@@ -720,10 +720,10 @@ function Sn(e) {
|
|
|
720
720
|
function Cn() {
|
|
721
721
|
return [!1, kn];
|
|
722
722
|
}
|
|
723
|
-
var Fn =
|
|
723
|
+
var Fn = Ie, so = je;
|
|
724
724
|
function St(e, t) {
|
|
725
725
|
var n = t(), r = x({ h: { __: n, v: t } }), o = r[0].h, i = r[1];
|
|
726
|
-
return
|
|
726
|
+
return Ie(function() {
|
|
727
727
|
o.__ = n, o.v = t, Wt(o) && i({ h: o });
|
|
728
728
|
}, [e, n, t]), W(function() {
|
|
729
729
|
return Wt(o) && i({ h: o }), e(function() {
|
|
@@ -740,7 +740,7 @@ function Wt(e) {
|
|
|
740
740
|
return !0;
|
|
741
741
|
}
|
|
742
742
|
}
|
|
743
|
-
var A = { useState: x, useId: ke, useReducer: it, useEffect: W, useLayoutEffect:
|
|
743
|
+
var A = { useState: x, useId: ke, useReducer: it, useEffect: W, useLayoutEffect: Ie, useInsertionEffect: Fn, useTransition: Cn, useDeferredValue: Sn, useSyncExternalStore: St, startTransition: kn, useRef: w, useImperativeHandle: gn, useMemo: j, useCallback: V, useContext: te, useDebugValue: wn, version: "17.0.2", Children: Vr, render: Kr, hydrate: Xr, unmountComponentAtNode: to, createPortal: kt, createElement: de, createContext: ie, createFactory: Jr, cloneElement: Tn, createRef: vn, Fragment: G, isValidElement: je, isElement: so, isFragment: Qr, isMemo: eo, findDOMNode: no, Component: ue, PureComponent: yt, memo: zr, forwardRef: En, flushSync: oo, unstable_batchedUpdates: ro, StrictMode: io, Suspense: Qe, SuspenseList: We, lazy: Yr, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Zr };
|
|
744
744
|
const rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
745
745
|
__proto__: null,
|
|
746
746
|
Children: Vr,
|
|
@@ -781,7 +781,7 @@ const rr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
781
781
|
useId: ke,
|
|
782
782
|
useImperativeHandle: gn,
|
|
783
783
|
useInsertionEffect: Fn,
|
|
784
|
-
useLayoutEffect:
|
|
784
|
+
useLayoutEffect: Ie,
|
|
785
785
|
useMemo: j,
|
|
786
786
|
useReducer: it,
|
|
787
787
|
useRef: w,
|
|
@@ -1095,7 +1095,7 @@ function Ri(e) {
|
|
|
1095
1095
|
isHovered: i
|
|
1096
1096
|
};
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1098
|
+
function Di(e = {}) {
|
|
1099
1099
|
let { autoFocus: t = !1, isTextInput: n, within: r } = e, o = w({
|
|
1100
1100
|
isFocused: !1,
|
|
1101
1101
|
isFocusVisible: t || ho()
|
|
@@ -1122,7 +1122,7 @@ function Ii(e = {}) {
|
|
|
1122
1122
|
focusProps: r ? f : c
|
|
1123
1123
|
};
|
|
1124
1124
|
}
|
|
1125
|
-
var
|
|
1125
|
+
var Ii = Object.defineProperty, Oi = (e, t, n) => t in e ? Ii(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, zt = (e, t, n) => (Oi(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
1126
1126
|
let Hi = class {
|
|
1127
1127
|
constructor() {
|
|
1128
1128
|
zt(this, "current", this.detect()), zt(this, "handoffState", "pending"), zt(this, "currentId", 0);
|
|
@@ -1201,7 +1201,7 @@ function xt() {
|
|
|
1201
1201
|
return W(() => () => e.dispose(), [e]), e;
|
|
1202
1202
|
}
|
|
1203
1203
|
let re = (e, t) => {
|
|
1204
|
-
Le.isServer ? W(e, t) :
|
|
1204
|
+
Le.isServer ? W(e, t) : Ie(e, t);
|
|
1205
1205
|
};
|
|
1206
1206
|
function Oe(e) {
|
|
1207
1207
|
let t = w(e);
|
|
@@ -1349,7 +1349,7 @@ function Vt(e, t = []) {
|
|
|
1349
1349
|
let qi = "button";
|
|
1350
1350
|
function Yi(e, t) {
|
|
1351
1351
|
var n;
|
|
1352
|
-
let r = mo(), { disabled: o = r || !1, autoFocus: i = !1, ...s } = e, { isFocusVisible: a, focusProps: l } =
|
|
1352
|
+
let r = mo(), { disabled: o = r || !1, autoFocus: i = !1, ...s } = e, { isFocusVisible: a, focusProps: l } = Di({ autoFocus: i }), { isHovered: u, hoverProps: d } = Ri({ isDisabled: o }), { pressed: c, pressProps: f } = zi({ disabled: o }), p = Bi({ ref: t, type: (n = s.type) != null ? n : "button", disabled: o || void 0, autoFocus: i }, l, d, f), _ = j(() => ({ disabled: o, hover: u, focus: a, active: c, autofocus: i }), [o, u, a, c, i]);
|
|
1353
1353
|
return ae({ ourProps: p, theirProps: s, slot: _, defaultTag: qi, name: "Button" });
|
|
1354
1354
|
}
|
|
1355
1355
|
let Gi = oe(Yi), Ki = "div";
|
|
@@ -1840,10 +1840,10 @@ var ce = ((e) => (e[e.Open = 1] = "Open", e[e.Closed = 2] = "Closed", e[e.Closin
|
|
|
1840
1840
|
function Pt() {
|
|
1841
1841
|
return te(Mt);
|
|
1842
1842
|
}
|
|
1843
|
-
function
|
|
1843
|
+
function Ds({ value: e, children: t }) {
|
|
1844
1844
|
return A.createElement(Mt.Provider, { value: e }, t);
|
|
1845
1845
|
}
|
|
1846
|
-
function
|
|
1846
|
+
function Is({ children: e }) {
|
|
1847
1847
|
return A.createElement(Mt.Provider, { value: null }, e);
|
|
1848
1848
|
}
|
|
1849
1849
|
function Os(e) {
|
|
@@ -2091,7 +2091,7 @@ function Lo(e, t) {
|
|
|
2091
2091
|
}
|
|
2092
2092
|
function Ao(e) {
|
|
2093
2093
|
var t;
|
|
2094
|
-
return !!(e.enter || e.enterFrom || e.enterTo || e.leave || e.leaveFrom || e.leaveTo) || ((t = e.as) != null ? t :
|
|
2094
|
+
return !!(e.enter || e.enterFrom || e.enterTo || e.leave || e.leaveFrom || e.leaveTo) || ((t = e.as) != null ? t : Do) !== G || A.Children.count(e.children) === 1;
|
|
2095
2095
|
}
|
|
2096
2096
|
let Nt = ie(null);
|
|
2097
2097
|
Nt.displayName = "TransitionContext";
|
|
@@ -2139,23 +2139,23 @@ function Ro(e, t) {
|
|
|
2139
2139
|
});
|
|
2140
2140
|
return j(() => ({ children: r, register: a, unregister: s, onStart: c, onStop: f, wait: u, chains: d }), [a, s, r, c, f, d, u]);
|
|
2141
2141
|
}
|
|
2142
|
-
let
|
|
2142
|
+
let Do = G, Io = bt.RenderStrategy;
|
|
2143
2143
|
function ua(e, t) {
|
|
2144
2144
|
var n, r;
|
|
2145
|
-
let { transition: o = !0, beforeEnter: i, afterEnter: s, beforeLeave: a, afterLeave: l, enter: u, enterFrom: d, enterTo: c, entered: f, leave: p, leaveFrom: _, leaveTo: y, ...v } = e, m = w(null), g = Ao(e), E = he(...g ? [m, t] : t === null ? [] : [t]), $ = (n = v.unmount) == null || n ? Ee.Unmount : Ee.Hidden, { show: S, appear: M, initial: R } = la(), [U, F] = x(S ? "visible" : "hidden"), b = ca(), { register:
|
|
2146
|
-
re(() =>
|
|
2145
|
+
let { transition: o = !0, beforeEnter: i, afterEnter: s, beforeLeave: a, afterLeave: l, enter: u, enterFrom: d, enterTo: c, entered: f, leave: p, leaveFrom: _, leaveTo: y, ...v } = e, m = w(null), g = Ao(e), E = he(...g ? [m, t] : t === null ? [] : [t]), $ = (n = v.unmount) == null || n ? Ee.Unmount : Ee.Hidden, { show: S, appear: M, initial: R } = la(), [U, F] = x(S ? "visible" : "hidden"), b = ca(), { register: D, unregister: B } = b;
|
|
2146
|
+
re(() => D(m), [D, m]), re(() => {
|
|
2147
2147
|
if ($ === Ee.Hidden && m.current) {
|
|
2148
2148
|
if (S && U !== "visible") {
|
|
2149
2149
|
F("visible");
|
|
2150
2150
|
return;
|
|
2151
2151
|
}
|
|
2152
|
-
return Te(U, { hidden: () => B(m), visible: () =>
|
|
2152
|
+
return Te(U, { hidden: () => B(m), visible: () => D(m) });
|
|
2153
2153
|
}
|
|
2154
|
-
}, [U, m,
|
|
2155
|
-
let
|
|
2154
|
+
}, [U, m, D, B, S, $]);
|
|
2155
|
+
let I = ct();
|
|
2156
2156
|
re(() => {
|
|
2157
|
-
if (g &&
|
|
2158
|
-
}, [m, U,
|
|
2157
|
+
if (g && I && U === "visible" && m.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
|
|
2158
|
+
}, [m, U, I, g]);
|
|
2159
2159
|
let K = R && !M, Q = M && S && R, Z = w(!1), k = Ro(() => {
|
|
2160
2160
|
Z.current || (F("hidden"), B(m));
|
|
2161
2161
|
}, b), C = X((q) => {
|
|
@@ -2173,8 +2173,8 @@ function ua(e, t) {
|
|
|
2173
2173
|
W(() => {
|
|
2174
2174
|
g && o || (C(S), L(S));
|
|
2175
2175
|
}, [S, g, o]);
|
|
2176
|
-
let N = !(!o || !g || !
|
|
2177
|
-
return U === "visible" && (O |= ce.Open), U === "hidden" && (O |= ce.Closed), T.enter && (O |= ce.Opening), T.leave && (O |= ce.Closing), A.createElement(Lt.Provider, { value: k }, A.createElement(
|
|
2176
|
+
let N = !(!o || !g || !I || K), [, T] = Ns(N, m, S, { start: C, end: L }), P = Fe({ ref: E, className: ((r = ln(v.className, Q && u, Q && d, T.enter && u, T.enter && T.closed && d, T.enter && !T.closed && c, T.leave && p, T.leave && !T.closed && _, T.leave && T.closed && y, !T.transition && S && f)) == null ? void 0 : r.trim()) || void 0, ...Ps(T) }), O = 0;
|
|
2177
|
+
return U === "visible" && (O |= ce.Open), U === "hidden" && (O |= ce.Closed), T.enter && (O |= ce.Opening), T.leave && (O |= ce.Closing), A.createElement(Lt.Provider, { value: k }, A.createElement(Ds, { value: O }, ae({ ourProps: P, theirProps: v, defaultTag: Do, features: Io, visible: U === "visible", name: "Transition.Child" })));
|
|
2178
2178
|
}
|
|
2179
2179
|
function da(e, t) {
|
|
2180
2180
|
let { show: n, appear: r = !1, unmount: o = !0, ...i } = e, s = w(null), a = Ao(e), l = he(...a ? [s, t] : t === null ? [] : [t]);
|
|
@@ -2198,7 +2198,7 @@ function da(e, t) {
|
|
|
2198
2198
|
var $;
|
|
2199
2199
|
p && _(!1), ($ = e.beforeLeave) == null || $.call(e);
|
|
2200
2200
|
});
|
|
2201
|
-
return A.createElement(Lt.Provider, { value: f }, A.createElement(Nt.Provider, { value: v }, ae({ ourProps: { ...m, as: G, children: A.createElement(Oo, { ref: l, ...m, ...i, beforeEnter: g, beforeLeave: E }) }, theirProps: {}, defaultTag: G, features:
|
|
2201
|
+
return A.createElement(Lt.Provider, { value: f }, A.createElement(Nt.Provider, { value: v }, ae({ ourProps: { ...m, as: G, children: A.createElement(Oo, { ref: l, ...m, ...i, beforeEnter: g, beforeLeave: E }) }, theirProps: {}, defaultTag: G, features: Io, visible: d === "visible", name: "Transition" })));
|
|
2202
2202
|
}
|
|
2203
2203
|
function fa(e, t) {
|
|
2204
2204
|
let n = te(Nt) !== null, r = Pt() !== null;
|
|
@@ -2231,7 +2231,7 @@ let cr = oe(function(e, t) {
|
|
|
2231
2231
|
let p = w(null), _ = he(p, t), y = lt(p), v = o ? 0 : 1, [m, g] = it(va, { titleId: null, descriptionId: null, panelRef: vn() }), E = X(() => i(!1)), $ = X((N) => g({ type: 0, id: N })), S = ct() ? v === 0 : !1, [M, R] = qs(), U = { get current() {
|
|
2232
2232
|
var N;
|
|
2233
2233
|
return (N = m.panelRef.current) != null ? N : p.current;
|
|
2234
|
-
} }, { resolveContainers: F, mainTreeNodeRef: b, MainTreeNode:
|
|
2234
|
+
} }, { resolveContainers: F, mainTreeNodeRef: b, MainTreeNode: D } = Zs({ portals: M, defaultContainers: [U] }), B = f !== null ? (f & ce.Closing) === ce.Closing : !1;
|
|
2235
2235
|
cs(u || B ? !1 : S, { allowed: X(() => {
|
|
2236
2236
|
var N, T;
|
|
2237
2237
|
return [(T = (N = p.current) == null ? void 0 : N.closest("[data-headlessui-portal]")) != null ? T : null];
|
|
@@ -2243,8 +2243,8 @@ let cr = oe(function(e, t) {
|
|
|
2243
2243
|
}), Ks(S, y == null ? void 0 : y.defaultView, (N) => {
|
|
2244
2244
|
N.preventDefault(), N.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), E();
|
|
2245
2245
|
}), Cs(u || B ? !1 : S, y, F), Eo(S, p, E);
|
|
2246
|
-
let [
|
|
2247
|
-
return S && !u && (L |= Me.RestoreFocus, L |= Me.TabLock, l && (L |= Me.AutoFocus), C && (L |= Me.InitialFocus)), A.createElement(
|
|
2246
|
+
let [I, K] = es(), Q = j(() => [{ dialogState: v, close: E, setTitleId: $ }, m], [v, m, E, $]), Z = j(() => ({ open: v === 0 }), [v]), k = { ref: _, id: r, role: a, tabIndex: -1, "aria-modal": u ? void 0 : v === 0 ? !0 : void 0, "aria-labelledby": m.titleId, "aria-describedby": I }, C = !Xs(), L = Me.None;
|
|
2247
|
+
return S && !u && (L |= Me.RestoreFocus, L |= Me.TabLock, l && (L |= Me.AutoFocus), C && (L |= Me.InitialFocus)), A.createElement(Is, null, A.createElement(lr, { force: !0 }, A.createElement(Gs, null, A.createElement(An.Provider, { value: Q }, A.createElement(Po, { target: p }, A.createElement(lr, { force: !1 }, A.createElement(K, { slot: Z }, A.createElement(R, null, A.createElement(na, { initialFocus: s, initialFocusFallback: p, containers: F, features: L }, A.createElement(ss, { value: E }, ae({ ourProps: k, theirProps: d, slot: Z, defaultTag: _a, features: ya, visible: v === 0, name: "Dialog" })))))))))), A.createElement(Ji, null, A.createElement(D, null)));
|
|
2248
2248
|
}), _a = "div", ya = bt.RenderStrategy | bt.Static;
|
|
2249
2249
|
function ga(e, t) {
|
|
2250
2250
|
let { transition: n = !1, open: r, ...o } = e, i = Pt(), s = e.hasOwnProperty("open") || i !== null, a = e.hasOwnProperty("onClose");
|
|
@@ -2320,14 +2320,14 @@ const xa = "_root_1duny_1", Ma = "_modal_1duny_10", Pa = "_container_1duny_13",
|
|
|
2320
2320
|
children: t
|
|
2321
2321
|
}
|
|
2322
2322
|
);
|
|
2323
|
-
},
|
|
2323
|
+
}, Da = (e) => /* @__PURE__ */ h(we, { ...e, children: /* @__PURE__ */ h("path", { d: "M10 2a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 2zM10 15a.75.75 0 01.75.75v1.5a.75.75 0 01-1.5 0v-1.5A.75.75 0 0110 15zM10 7a3 3 0 100 6 3 3 0 000-6zM15.657 5.404a.75.75 0 10-1.06-1.06l-1.061 1.06a.75.75 0 001.06 1.06l1.06-1.06zM6.464 14.596a.75.75 0 10-1.06-1.06l-1.06 1.06a.75.75 0 001.06 1.06l1.06-1.06zM18 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 0118 10zM5 10a.75.75 0 01-.75.75h-1.5a.75.75 0 010-1.5h1.5A.75.75 0 015 10zM14.596 15.657a.75.75 0 001.06-1.06l-1.06-1.061a.75.75 0 10-1.06 1.06l1.06 1.06zM5.404 6.464a.75.75 0 001.06-1.06l-1.06-1.06a.75.75 0 10-1.061 1.06l1.06 1.06z" }) }), Wo = (e) => /* @__PURE__ */ h(we, { ...e, children: /* @__PURE__ */ h(
|
|
2324
2324
|
"path",
|
|
2325
2325
|
{
|
|
2326
2326
|
fillRule: "evenodd",
|
|
2327
2327
|
d: "M7.455 2.004a.75.75 0 01.26.77 7 7 0 009.958 7.967.75.75 0 011.067.853A8.5 8.5 0 116.647 1.921a.75.75 0 01.808.083z",
|
|
2328
2328
|
clipRule: "evenodd"
|
|
2329
2329
|
}
|
|
2330
|
-
) }),
|
|
2330
|
+
) }), Ia = (e) => /* @__PURE__ */ h(we, { ...e, viewBox: "0 0 24 24", children: [
|
|
2331
2331
|
/* @__PURE__ */ h("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
2332
2332
|
/* @__PURE__ */ h("path", { d: "M19.07 4.93l-1.41 1.41C19.1 7.79 20 9.79 20 12c0 4.42-3.58 8-8 8s-8-3.58-8-8c0-4.08 3.05-7.44 7-7.93v2.02C8.16 6.57 6 9.03 6 12c0 3.31 2.69 6 6 6s6-2.69 6-6c0-1.66-.67-3.16-1.76-4.24l-1.41 1.41C15.55 9.9 16 10.9 16 12c0 2.21-1.79 4-4 4s-4-1.79-4-4c0-1.86 1.28-3.41 3-3.86v2.14c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2s2-.9 2-2c0-.74-.4-1.38-1-1.72V2h-1C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-2.76-1.12-5.26-2.93-7.07z" })
|
|
2333
2333
|
] }), Oa = (e) => /* @__PURE__ */ h(we, { ...e, viewBox: "0 0 24 24", children: [
|
|
@@ -2658,7 +2658,7 @@ const Xa = 360, Za = "#125766", Ja = "https://cdn.youverify.co/1721901834404-q2n
|
|
|
2658
2658
|
}
|
|
2659
2659
|
}, el = {
|
|
2660
2660
|
"complete-the-circle": {
|
|
2661
|
-
Icon:
|
|
2661
|
+
Icon: Ia,
|
|
2662
2662
|
name: "Complete The Circle ⭕️",
|
|
2663
2663
|
description: "First position your face in the camera frame. Then move your head in a circle to show all the angles of your face"
|
|
2664
2664
|
},
|
|
@@ -2730,7 +2730,7 @@ function tl(e) {
|
|
|
2730
2730
|
sessionId: _,
|
|
2731
2731
|
sessionToken: y,
|
|
2732
2732
|
forceDevUrl: v
|
|
2733
|
-
} = e, [m, g] = x(0), [E, $] = x(0), [S, M] = x(null), [R, U] = x(!1), { saveStream: F, savePhoto: b, savedPhoto:
|
|
2733
|
+
} = e, [m, g] = x(0), [E, $] = x(0), [S, M] = x(null), [R, U] = x(!1), { saveStream: F, savePhoto: b, savedPhoto: D, clearSavedPhoto: B, savedStreams: I } = zo(), { postData: K, validateSessionId: Q } = Ka(
|
|
2734
2734
|
f,
|
|
2735
2735
|
v,
|
|
2736
2736
|
t,
|
|
@@ -2747,7 +2747,7 @@ function tl(e) {
|
|
|
2747
2747
|
$e.detectFaces(P, q);
|
|
2748
2748
|
};
|
|
2749
2749
|
}, N = async () => {
|
|
2750
|
-
if (!
|
|
2750
|
+
if (!D.current) {
|
|
2751
2751
|
u({
|
|
2752
2752
|
faceImage: "",
|
|
2753
2753
|
passed: !1,
|
|
@@ -2756,21 +2756,21 @@ function tl(e) {
|
|
|
2756
2756
|
key: "image_capture_failed",
|
|
2757
2757
|
message: "No face image captured. Image capture failed. Please try again."
|
|
2758
2758
|
}
|
|
2759
|
-
}), a();
|
|
2759
|
+
}), a("failure");
|
|
2760
2760
|
return;
|
|
2761
2761
|
}
|
|
2762
2762
|
if (!Z.current) {
|
|
2763
2763
|
Z.current = !0;
|
|
2764
2764
|
try {
|
|
2765
2765
|
const P = await K({
|
|
2766
|
-
faceImage:
|
|
2767
|
-
video: new Blob(
|
|
2766
|
+
faceImage: D.current,
|
|
2767
|
+
video: new Blob(I.current, { type: "video/mp4" }),
|
|
2768
2768
|
publicKey: t,
|
|
2769
2769
|
passed: !0,
|
|
2770
2770
|
metadata: d,
|
|
2771
2771
|
sessionId: _
|
|
2772
2772
|
});
|
|
2773
|
-
l(P), a();
|
|
2773
|
+
l(P), a("success");
|
|
2774
2774
|
} catch (P) {
|
|
2775
2775
|
let O = {
|
|
2776
2776
|
key: "API_ERROR",
|
|
@@ -2796,7 +2796,7 @@ function tl(e) {
|
|
|
2796
2796
|
passed: !1,
|
|
2797
2797
|
metadata: d,
|
|
2798
2798
|
error: O
|
|
2799
|
-
}), a(), new Error(O.message);
|
|
2799
|
+
}), a("error"), new Error(O.message);
|
|
2800
2800
|
}
|
|
2801
2801
|
}
|
|
2802
2802
|
}, T = async () => {
|
|
@@ -2907,7 +2907,7 @@ function vl() {
|
|
|
2907
2907
|
{
|
|
2908
2908
|
type: "button",
|
|
2909
2909
|
className: "yvlw-text-sm yvlw-rounded yvlw-px-3 yvlw-py-2 yvlw-border yvlw-border-gray-300 dark:yvlw-border-gray-700",
|
|
2910
|
-
onClick: () => n(),
|
|
2910
|
+
onClick: () => n("user"),
|
|
2911
2911
|
children: "Close"
|
|
2912
2912
|
}
|
|
2913
2913
|
)
|
|
@@ -3051,7 +3051,7 @@ function Bo() {
|
|
|
3051
3051
|
throw new Error("Position head in frame");
|
|
3052
3052
|
} };
|
|
3053
3053
|
}
|
|
3054
|
-
function
|
|
3054
|
+
function Dt(e = {}) {
|
|
3055
3055
|
const {
|
|
3056
3056
|
validations: t = ["zoom"],
|
|
3057
3057
|
frameSize: n,
|
|
@@ -3137,11 +3137,11 @@ const Cl = "_root_5hgaj_1", Fl = "_container_5hgaj_4", xl = "_progress_5hgaj_7",
|
|
|
3137
3137
|
branding: Nl,
|
|
3138
3138
|
instructionsContainer: Ll,
|
|
3139
3139
|
instructions: Al
|
|
3140
|
-
}, Rl = "_root_h5elg_1",
|
|
3140
|
+
}, Rl = "_root_h5elg_1", Dl = "_spinner_h5elg_22", _r = {
|
|
3141
3141
|
root: Rl,
|
|
3142
|
-
spinner:
|
|
3143
|
-
},
|
|
3144
|
-
container:
|
|
3142
|
+
spinner: Dl
|
|
3143
|
+
}, Il = "_container_1vep2_1", Ol = "_spin_1vep2_1", Hl = "_md_1vep2_7", Wl = "_lg_1vep2_10", yr = {
|
|
3144
|
+
container: Il,
|
|
3145
3145
|
spin: Ol,
|
|
3146
3146
|
md: Hl,
|
|
3147
3147
|
lg: Wl
|
|
@@ -3182,7 +3182,7 @@ function $t(e) {
|
|
|
3182
3182
|
] });
|
|
3183
3183
|
}
|
|
3184
3184
|
const gr = "yvlw-absolute yvlw-w-full yvlw-h-full", wr = "yvlw-transform yvlw-transition yvlw-ease-in yvlw-duration-300", br = "yvlw-transform yvlw-transition yvlw-ease-in yvlw-duration-300";
|
|
3185
|
-
function
|
|
3185
|
+
function It(e) {
|
|
3186
3186
|
const {
|
|
3187
3187
|
children: t,
|
|
3188
3188
|
instruction: n,
|
|
@@ -3301,13 +3301,13 @@ function zl(e) {
|
|
|
3301
3301
|
} = Ot({ timeout: n }), E = () => {
|
|
3302
3302
|
i([]), a(Er), u(!1), c(!1), f.current = /* @__PURE__ */ new Set(), p.current = !1, _.current = null, y();
|
|
3303
3303
|
}, $ = (b) => {
|
|
3304
|
-
const
|
|
3304
|
+
const D = b * Bt, B = Math.ceil((D + 1) / Xa);
|
|
3305
3305
|
f.current.has(B) || (f.current.add(B), i(Array.from(f.current))), f.current.size >= Bt && (m(), setTimeout(() => {
|
|
3306
3306
|
c(!0);
|
|
3307
3307
|
}, 1e3));
|
|
3308
|
-
}, S = (b,
|
|
3309
|
-
let
|
|
3310
|
-
return
|
|
3308
|
+
}, S = (b, D) => {
|
|
3309
|
+
let I = Math.atan2(D, b) * (180 / Math.PI);
|
|
3310
|
+
return I < 0 && (I += 360), I;
|
|
3311
3311
|
}, M = V(() => {
|
|
3312
3312
|
if (f.current.size === 0)
|
|
3313
3313
|
return 25;
|
|
@@ -3320,22 +3320,22 @@ function zl(e) {
|
|
|
3320
3320
|
return 10;
|
|
3321
3321
|
}
|
|
3322
3322
|
}, []), R = (b) => {
|
|
3323
|
-
const { keypoints:
|
|
3323
|
+
const { keypoints: D, box: B } = b, I = { x: B.width * 0.5, y: B.height * 0.5 }, K = D[Ul], Q = { y: K.y - B.yMin, x: K.x - B.xMin }, Z = I.x - Q.x, k = Q.y - I.y, C = M();
|
|
3324
3324
|
return Math.abs(Z) < C && Math.abs(k) < C ? null : S(Z, k);
|
|
3325
|
-
}, { detectFaces: U } =
|
|
3325
|
+
}, { detectFaces: U } = Dt({
|
|
3326
3326
|
frameSize: 280,
|
|
3327
3327
|
validations: ["zoom", "in-frame"],
|
|
3328
3328
|
onFace: (b) => {
|
|
3329
3329
|
u(!0), a("Slowly move head around to complete circle");
|
|
3330
|
-
const
|
|
3331
|
-
|
|
3330
|
+
const D = R(b);
|
|
3331
|
+
D && $(D);
|
|
3332
3332
|
},
|
|
3333
3333
|
onError: (b) => {
|
|
3334
3334
|
a(b), i([]), f.current.clear(), _.current = null, p.current = !1;
|
|
3335
3335
|
}
|
|
3336
3336
|
});
|
|
3337
3337
|
return /* @__PURE__ */ h(G, { children: /* @__PURE__ */ h(
|
|
3338
|
-
|
|
3338
|
+
It,
|
|
3339
3339
|
{
|
|
3340
3340
|
instruction: {
|
|
3341
3341
|
title: s,
|
|
@@ -3350,8 +3350,8 @@ function zl(e) {
|
|
|
3350
3350
|
try {
|
|
3351
3351
|
if (!b.current || d)
|
|
3352
3352
|
return;
|
|
3353
|
-
const { videoWidth:
|
|
3354
|
-
U({ ref: b, frameSize:
|
|
3353
|
+
const { videoWidth: D } = b.current;
|
|
3354
|
+
U({ ref: b, frameSize: D });
|
|
3355
3355
|
} catch {
|
|
3356
3356
|
}
|
|
3357
3357
|
}, onRecord: r, children: /* @__PURE__ */ h(
|
|
@@ -3400,11 +3400,11 @@ function Xl(e) {
|
|
|
3400
3400
|
onTimeout: m
|
|
3401
3401
|
}), M = () => {
|
|
3402
3402
|
i($r), a(!1), u(!1), c.current = "inactive", f.current = 0, p.current = !1, g();
|
|
3403
|
-
}, R = (
|
|
3404
|
-
const { keypoints: K } =
|
|
3403
|
+
}, R = (I) => {
|
|
3404
|
+
const { keypoints: K } = I, Q = K[1], Z = K[9], k = Q.x - Z.x, C = Q.y - Z.y;
|
|
3405
3405
|
return 90 - Math.atan2(C, k) * (180 / Math.PI);
|
|
3406
|
-
}, U = (
|
|
3407
|
-
c.current = "inactive", i(n[
|
|
3406
|
+
}, U = (I) => {
|
|
3407
|
+
c.current = "inactive", i(n[I].question), _.current = setTimeout(() => {
|
|
3408
3408
|
c.current = "active";
|
|
3409
3409
|
}, 2e3);
|
|
3410
3410
|
}, F = j(() => {
|
|
@@ -3416,11 +3416,11 @@ function Xl(e) {
|
|
|
3416
3416
|
default:
|
|
3417
3417
|
return 4;
|
|
3418
3418
|
}
|
|
3419
|
-
}, []), b = (
|
|
3419
|
+
}, []), b = (I) => {
|
|
3420
3420
|
try {
|
|
3421
|
-
if (c.current = "inactive", Math.abs(
|
|
3421
|
+
if (c.current = "inactive", Math.abs(I) < F)
|
|
3422
3422
|
throw new Error("Tilt head further to answer");
|
|
3423
|
-
const K =
|
|
3423
|
+
const K = I > 0, Q = n[f.current].answer;
|
|
3424
3424
|
if (K === Q)
|
|
3425
3425
|
f.current += 1, f.current === n.length ? (u(!0), $()) : U(f.current);
|
|
3426
3426
|
else
|
|
@@ -3432,28 +3432,28 @@ function Xl(e) {
|
|
|
3432
3432
|
U(f.current);
|
|
3433
3433
|
}, 2e3);
|
|
3434
3434
|
}
|
|
3435
|
-
}, { detectFaces:
|
|
3436
|
-
onFace: (
|
|
3435
|
+
}, { detectFaces: D } = Dt({
|
|
3436
|
+
onFace: (I) => {
|
|
3437
3437
|
if (p.current || (a(!0), p.current = !0, U(f.current)), c.current === "inactive")
|
|
3438
3438
|
return;
|
|
3439
|
-
const K = R(
|
|
3439
|
+
const K = R(I);
|
|
3440
3440
|
b(K);
|
|
3441
3441
|
},
|
|
3442
|
-
onError: (
|
|
3443
|
-
i(
|
|
3442
|
+
onError: (I) => {
|
|
3443
|
+
i(I);
|
|
3444
3444
|
}
|
|
3445
|
-
}), B = (
|
|
3445
|
+
}), B = (I) => {
|
|
3446
3446
|
try {
|
|
3447
|
-
if (!
|
|
3447
|
+
if (!I.current || l)
|
|
3448
3448
|
return;
|
|
3449
|
-
v.current =
|
|
3450
|
-
const { videoWidth: K } =
|
|
3451
|
-
|
|
3449
|
+
v.current = I.current;
|
|
3450
|
+
const { videoWidth: K } = I.current;
|
|
3451
|
+
D({ ref: I, frameSize: K });
|
|
3452
3452
|
} catch {
|
|
3453
3453
|
}
|
|
3454
3454
|
};
|
|
3455
3455
|
return W(() => m, []), /* @__PURE__ */ h(
|
|
3456
|
-
|
|
3456
|
+
It,
|
|
3457
3457
|
{
|
|
3458
3458
|
instruction: {
|
|
3459
3459
|
title: o,
|
|
@@ -3680,7 +3680,7 @@ function nc(e) {
|
|
|
3680
3680
|
difficulty: t,
|
|
3681
3681
|
onMessage: (b) => a(b),
|
|
3682
3682
|
onComplete: g
|
|
3683
|
-
}), { detectFaces: M } =
|
|
3683
|
+
}), { detectFaces: M } = Dt({
|
|
3684
3684
|
onFace: (b) => {
|
|
3685
3685
|
switch (f.current || (f.current = !0), Tr[i.current]) {
|
|
3686
3686
|
case "open_mouth":
|
|
@@ -3700,14 +3700,14 @@ function nc(e) {
|
|
|
3700
3700
|
try {
|
|
3701
3701
|
if (!b.current || l)
|
|
3702
3702
|
return;
|
|
3703
|
-
const { videoWidth:
|
|
3704
|
-
await M({ ref: b, frameSize:
|
|
3703
|
+
const { videoWidth: D } = b.current;
|
|
3704
|
+
await M({ ref: b, frameSize: D, throttleInterval: 500 });
|
|
3705
3705
|
} catch {
|
|
3706
3706
|
}
|
|
3707
3707
|
}, F = async () => {
|
|
3708
3708
|
};
|
|
3709
3709
|
return /* @__PURE__ */ h(
|
|
3710
|
-
|
|
3710
|
+
It,
|
|
3711
3711
|
{
|
|
3712
3712
|
instruction: {
|
|
3713
3713
|
title: s,
|
|
@@ -3738,7 +3738,7 @@ function rc(e) {
|
|
|
3738
3738
|
difficulty: t,
|
|
3739
3739
|
onMessage: (M) => i(M),
|
|
3740
3740
|
onComplete: v
|
|
3741
|
-
}), { detectFaces: g } =
|
|
3741
|
+
}), { detectFaces: g } = Dt({
|
|
3742
3742
|
onFace: (M) => {
|
|
3743
3743
|
d.current || (d.current = !0), m.evaluate(M);
|
|
3744
3744
|
},
|
|
@@ -3758,7 +3758,7 @@ function rc(e) {
|
|
|
3758
3758
|
}, S = async () => {
|
|
3759
3759
|
};
|
|
3760
3760
|
return /* @__PURE__ */ h(
|
|
3761
|
-
|
|
3761
|
+
It,
|
|
3762
3762
|
{
|
|
3763
3763
|
instruction: {
|
|
3764
3764
|
title: o,
|
|
@@ -3835,7 +3835,7 @@ function sc(e = {}) {
|
|
|
3835
3835
|
0.299 * T[z] + 0.587 * T[z + 1] + 0.114 * T[z + 2] > 250 && O++;
|
|
3836
3836
|
const q = T.length / 4;
|
|
3837
3837
|
return P = O / q, P > 0.01;
|
|
3838
|
-
},
|
|
3838
|
+
}, D = (k, C, L, N) => {
|
|
3839
3839
|
const T = C.current, P = T == null ? void 0 : T.parentElement;
|
|
3840
3840
|
if (!(!T || !P))
|
|
3841
3841
|
for (const O of N)
|
|
@@ -3884,7 +3884,7 @@ function sc(e = {}) {
|
|
|
3884
3884
|
return !1;
|
|
3885
3885
|
}
|
|
3886
3886
|
return !0;
|
|
3887
|
-
},
|
|
3887
|
+
}, I = (k, C) => {
|
|
3888
3888
|
const L = k.getContext("2d");
|
|
3889
3889
|
if (!L || C.width === 0 || C.height === 0)
|
|
3890
3890
|
return !1;
|
|
@@ -3908,8 +3908,8 @@ function sc(e = {}) {
|
|
|
3908
3908
|
if (S.current.push(C), S.current.length > M && S.current.shift(), S.current.length < M) return !1;
|
|
3909
3909
|
let L = 0, N = 0, T = 0;
|
|
3910
3910
|
for (let ee = 1; ee < S.current.length; ee++) {
|
|
3911
|
-
const He = S.current[ee - 1], dt = S.current[ee], qe = dt.x - He.x,
|
|
3912
|
-
|
|
3911
|
+
const He = S.current[ee - 1], dt = S.current[ee], qe = dt.x - He.x, Dn = dt.y - He.y, In = Math.sqrt(qe * qe + Dn * Dn);
|
|
3912
|
+
In >= 2 && (L += In, ee > 1 && Math.sign(qe) !== Math.sign(T) && Math.abs(qe) > 3 && N++, T = qe);
|
|
3913
3913
|
}
|
|
3914
3914
|
const O = L / (M - 1) > R, q = N >= U, z = O || q;
|
|
3915
3915
|
return z && i("🚨 Head shake detected!"), z;
|
|
@@ -3924,7 +3924,7 @@ function sc(e = {}) {
|
|
|
3924
3924
|
const T = k[0];
|
|
3925
3925
|
let P = "", O = !0;
|
|
3926
3926
|
try {
|
|
3927
|
-
|
|
3927
|
+
D(T, f, n, t);
|
|
3928
3928
|
} catch (ee) {
|
|
3929
3929
|
P = ee.message, O = !1;
|
|
3930
3930
|
}
|
|
@@ -3941,7 +3941,7 @@ function sc(e = {}) {
|
|
|
3941
3941
|
return;
|
|
3942
3942
|
}
|
|
3943
3943
|
if (!p.current) {
|
|
3944
|
-
if (
|
|
3944
|
+
if (I(E.current, T.box)) {
|
|
3945
3945
|
i("Too dark – move to a well-lit area");
|
|
3946
3946
|
return;
|
|
3947
3947
|
}
|
|
@@ -4058,31 +4058,31 @@ function pc(e) {
|
|
|
4058
4058
|
if (m.length === 3) {
|
|
4059
4059
|
const F = JSON.parse(atob(m[1]));
|
|
4060
4060
|
if (F.face) {
|
|
4061
|
-
const b = JSON.parse(F.face),
|
|
4062
|
-
if (b.endpoint && (
|
|
4061
|
+
const b = JSON.parse(F.face), D = /^https:\/\/[^/:]+\.(api\.cognitive\.microsoft|cognitiveservices\.azure)\.com$/;
|
|
4062
|
+
if (b.endpoint && (D.test(b.endpoint) || b.endpoint === "https://virginia.api.cognitive.microsoft.us")) {
|
|
4063
4063
|
s.current.setEndpoint(b.endpoint);
|
|
4064
|
-
const
|
|
4065
|
-
if (
|
|
4066
|
-
const K = (R =
|
|
4064
|
+
const I = JSON.parse(F["allowed-paths"]);
|
|
4065
|
+
if (I) {
|
|
4066
|
+
const K = (R = I.find(
|
|
4067
4067
|
(N) => N.path.toLocaleLowerCase().endsWith("/session/start")
|
|
4068
4068
|
)) == null ? void 0 : R.path;
|
|
4069
4069
|
s.current.setSessionStartPath(K);
|
|
4070
|
-
const Q = (U =
|
|
4070
|
+
const Q = (U = I.find(
|
|
4071
4071
|
(N) => N.path.toLocaleLowerCase().endsWith("/session/attempt/end")
|
|
4072
4072
|
)) == null ? void 0 : U.path;
|
|
4073
4073
|
s.current.setAttemptEndPath(Q);
|
|
4074
|
-
const Z =
|
|
4074
|
+
const Z = I.find(
|
|
4075
4075
|
(N) => N.path.endsWith("/detectLiveness/singleModal")
|
|
4076
4076
|
);
|
|
4077
4077
|
Z && ({ path: E, quota: M } = Z, s.current.setLivenessPath(E));
|
|
4078
|
-
const k =
|
|
4078
|
+
const k = I.find(
|
|
4079
4079
|
(N) => N.path.endsWith("/detectLivenessWithVerify/singleModal")
|
|
4080
4080
|
);
|
|
4081
4081
|
k && ({ path: $, quota: M } = k, s.current.setLivenessWithVerifyPath(
|
|
4082
4082
|
$
|
|
4083
4083
|
));
|
|
4084
4084
|
const C = new Set(
|
|
4085
|
-
|
|
4085
|
+
I.map(
|
|
4086
4086
|
(N) => {
|
|
4087
4087
|
var T;
|
|
4088
4088
|
return (T = N.path) == null ? void 0 : T.split("/")[1];
|
|
@@ -4258,8 +4258,8 @@ function hc({
|
|
|
4258
4258
|
validations: ["zoom", "features"],
|
|
4259
4259
|
frameSize: _,
|
|
4260
4260
|
livenessTimeout: 1e4,
|
|
4261
|
-
onFace: async (F, b,
|
|
4262
|
-
p.current = b, b && d.current === "findingFace" && !v.current &&
|
|
4261
|
+
onFace: async (F, b, D) => {
|
|
4262
|
+
p.current = b, b && d.current === "findingFace" && !v.current && D && (v.current = !0, g(!0));
|
|
4263
4263
|
},
|
|
4264
4264
|
onPhotoSaved: () => {
|
|
4265
4265
|
},
|
|
@@ -4291,14 +4291,14 @@ function hc({
|
|
|
4291
4291
|
else
|
|
4292
4292
|
throw new Error("Session token could not be retrieved.");
|
|
4293
4293
|
} catch (b) {
|
|
4294
|
-
const
|
|
4295
|
-
r && r(
|
|
4294
|
+
const D = b instanceof Error ? b.message : "Failed to start liveness check.";
|
|
4295
|
+
r && r(D), i({
|
|
4296
4296
|
faceImage: "",
|
|
4297
4297
|
passed: !1,
|
|
4298
4298
|
metadata: {},
|
|
4299
4299
|
error: {
|
|
4300
4300
|
key: "session_token_error",
|
|
4301
|
-
message:
|
|
4301
|
+
message: D
|
|
4302
4302
|
}
|
|
4303
4303
|
}), u(!0);
|
|
4304
4304
|
}
|
|
@@ -4380,12 +4380,12 @@ function vc() {
|
|
|
4380
4380
|
clearSavedPhoto: c,
|
|
4381
4381
|
branding: f,
|
|
4382
4382
|
isMobileAppWebView: p
|
|
4383
|
-
} = fe(), [_, y] = x(!1), [v, m] = x(!1), [g, E] = x(null), [$, S] = x(!1), [M, R] = x(!1), [U, F] = x(0), [b,
|
|
4383
|
+
} = fe(), [_, y] = x(!1), [v, m] = x(!1), [g, E] = x(null), [$, S] = x(!1), [M, R] = x(!1), [U, F] = x(0), [b, D] = x(null);
|
|
4384
4384
|
W(() => {
|
|
4385
4385
|
const k = t();
|
|
4386
4386
|
n(k);
|
|
4387
4387
|
}, []), W(() => {
|
|
4388
|
-
s && !$ && b === null &&
|
|
4388
|
+
s && !$ && b === null && D(5);
|
|
4389
4389
|
}, [s, $, b]);
|
|
4390
4390
|
const B = V(async () => {
|
|
4391
4391
|
try {
|
|
@@ -4404,17 +4404,17 @@ function vc() {
|
|
|
4404
4404
|
return;
|
|
4405
4405
|
}
|
|
4406
4406
|
const k = setTimeout(() => {
|
|
4407
|
-
|
|
4407
|
+
D((C) => (C ?? 1) - 1);
|
|
4408
4408
|
}, 1e3);
|
|
4409
4409
|
return () => {
|
|
4410
4410
|
clearTimeout(k);
|
|
4411
4411
|
};
|
|
4412
4412
|
}, [b, $]);
|
|
4413
|
-
const { sessionToken:
|
|
4413
|
+
const { sessionToken: I } = fe(), K = async () => (!I && !Xe && (Xe = Promise.reject(
|
|
4414
4414
|
new Error(
|
|
4415
4415
|
"sessionToken not provided. Generate a sessionToken on your backend and pass it to the SDK."
|
|
4416
4416
|
)
|
|
4417
|
-
)),
|
|
4417
|
+
)), I ?? Xe), Q = V(
|
|
4418
4418
|
(k) => k === i ? ne.active : i > k ? ne.completed : "subtext",
|
|
4419
4419
|
[i]
|
|
4420
4420
|
);
|
|
@@ -4442,7 +4442,7 @@ function vc() {
|
|
|
4442
4442
|
] }) }),
|
|
4443
4443
|
/* @__PURE__ */ h("div", { onClick: () => e(), role: "button", children: [
|
|
4444
4444
|
/* @__PURE__ */ h("div", { className: "dark:yvlw-hidden", children: /* @__PURE__ */ h(Wo, {}) }),
|
|
4445
|
-
/* @__PURE__ */ h("div", { className: "yvlw-hidden dark:yvlw-block", children: /* @__PURE__ */ h(
|
|
4445
|
+
/* @__PURE__ */ h("div", { className: "yvlw-hidden dark:yvlw-block", children: /* @__PURE__ */ h(Da, {}) })
|
|
4446
4446
|
] })
|
|
4447
4447
|
] })
|
|
4448
4448
|
] }),
|
|
@@ -4596,8 +4596,8 @@ function _c(e) {
|
|
|
4596
4596
|
sessionId: p,
|
|
4597
4597
|
sessionToken: _,
|
|
4598
4598
|
forceDevUrl: y
|
|
4599
|
-
} = e, [v, m] = x(e.show), g = () => {
|
|
4600
|
-
m(!1), s();
|
|
4599
|
+
} = e, [v, m] = x(e.show), g = ($) => {
|
|
4600
|
+
u !== "page" && m(!1), (!$ || $ !== "success") && s();
|
|
4601
4601
|
};
|
|
4602
4602
|
return /* @__PURE__ */ h(
|
|
4603
4603
|
tl,
|
|
@@ -4622,15 +4622,24 @@ function _c(e) {
|
|
|
4622
4622
|
{
|
|
4623
4623
|
id: n,
|
|
4624
4624
|
open: u === "page" ? !0 : v,
|
|
4625
|
-
onClose:
|
|
4625
|
+
onClose: () => {
|
|
4626
|
+
g("user");
|
|
4627
|
+
},
|
|
4626
4628
|
transition: !0,
|
|
4627
4629
|
className: `${Ra.root} ${ht.root} ${ht[u]}`,
|
|
4628
4630
|
style: {
|
|
4629
4631
|
"--branding-color": (o == null ? void 0 : o.color) ?? Za
|
|
4630
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4631
4632
|
},
|
|
4632
4633
|
children: [
|
|
4633
|
-
u === "modal" && /* @__PURE__ */ h(
|
|
4634
|
+
u === "modal" && /* @__PURE__ */ h(
|
|
4635
|
+
"div",
|
|
4636
|
+
{
|
|
4637
|
+
onClick: () => g("user"),
|
|
4638
|
+
role: "button",
|
|
4639
|
+
className: ht.close,
|
|
4640
|
+
children: /* @__PURE__ */ h(Ua, { className: "yvlw-text-white" })
|
|
4641
|
+
}
|
|
4642
|
+
),
|
|
4634
4643
|
/* @__PURE__ */ h(Ho, { className: `${ht.container}`, children: /* @__PURE__ */ h(vc, {}) })
|
|
4635
4644
|
]
|
|
4636
4645
|
}
|