bry-biometric-collector 3.1.0-RC01 → 3.1.0-RC03
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/{DocumentCollector_1bc4afad_3.1.0-RC01.js → DocumentCollector_9474f250_3.1.0-RC03.js} +72 -72
- package/dist/{FaceCollector_4619d9e9_3.1.0-RC01.js → FaceCollector_067efaea_3.1.0-RC03.js} +562 -552
- package/dist/{ValidationAlert_02715bcd_3.1.0-RC01.js → ValidationAlert_de35f79f_3.1.0-RC03.js} +40 -40
- package/dist/{___vite-browser-external_commonjs-proxy_97217485_3.1.0-RC01.js → ___vite-browser-external_commonjs-proxy_1b577ab2_3.1.0-RC03.js} +36 -36
- package/dist/bry-biometric-collector-main.js +2 -2
- package/dist/{en-us_74e59471_3.1.0-RC01.js → en-us_793b081f_3.1.0-RC03.js} +6 -1
- package/dist/{es-cl_19d31389_3.1.0-RC01.js → es-cl_b2f1fc4e_3.1.0-RC03.js} +6 -1
- package/dist/{fingersApi_7958be7e_3.1.0-RC01.js → fingersApi_7ab23b24_3.1.0-RC03.js} +2 -2
- package/dist/index-idlf-detector_39cfdffa_3.1.0-RC03.js +15665 -0
- package/dist/index-idlf-detector_a819b3c8_3.1.0-RC03.js +10910 -0
- package/dist/index.js +2 -2
- package/dist/{index_97dc93b7_3.1.0-RC01.js → index_11cf6399_3.1.0-RC03.js} +3 -3
- package/dist/{index_5cf0548d_3.1.0-RC01.js → index_df5e7131_3.1.0-RC03.js} +3 -3
- package/dist/{main_fa801848_3.1.0-RC01.js → main_11e1c290_3.1.0-RC03.js} +3263 -3227
- package/dist/{pt-br_c6f68a68_3.1.0-RC01.js → pt-br_b093cbbf_3.1.0-RC03.js} +12 -7
- package/package.json +3 -3
- package/dist/index-no-detector_281a271b_3.1.0-RC01.js +0 -15045
- package/dist/index-no-detector_56051121_3.1.0-RC01.js +0 -10830
- /package/dist/{face_api_0e3ce8c8_3.1.0-RC01.js → face_api_0e3ce8c8_3.1.0-RC03.js} +0 -0
@@ -1,11 +1,11 @@
|
|
1
|
-
import { S as Ut, q as Vt, r as jt, t as Ht, w as A, x as q, y as C, z as
|
2
|
-
import { W as
|
3
|
-
import { detectSingleFace as
|
4
|
-
function
|
1
|
+
import { S as Ut, q as Vt, r as jt, t as Ht, w as A, x as q, y as C, z as ge, B as G, C as h, D as ve, E as J, G as Y, H as L, I as pe, J as F, K as Pe, L as Ve, M as be, N as m, O as H, P as j, Q as W, R as ga, T as b, U as lt, V as rt, W as Lt, X as Ye, Y as X, Z as Ge, _ as va, a0 as Ze, a1 as _e, a2 as pa, a3 as Be, a4 as di, a5 as Dt, a6 as hi, a7 as wa, a8 as Ca, a9 as We, aa as Ee, ab as Ea, ac as Ft, ad as Nt, ae as fe, af as ie, $ as ya, ag as ye, ah as mi, ai as xe, aj as St, ak as Ta, al as $e, am as _i, an as bi, ao as ka, ap as Oa, aq as Ra, ar as Aa, as as Ia, at as La, au as Da, av as Pt, aw as K, j as nt, ax as Bt, ay as Fa, az as gi, aA as Na, aB as et, aC as tt, aD as Sa, aE as vi, aF as pi, aG as Pa, aH as it, A as Wt, aI as Te, aJ as Ba, aK as Me, aL as Wa, aM as wi, d as Re, aN as Mt, aO as at, aP as Ma, aQ as Ua, aR as Va, aS as ja, aT as Ha, aU as Ka, aV as qa, aW as Ue, aX as za, aY as Ja, aZ as ot, a_ as le, a$ as ft, b0 as ct, b1 as Wi, b2 as B, b3 as V, b4 as Ci, b5 as Qa, b6 as Xa, b7 as Ya, b8 as st, b9 as ne, ba as Ga, bb as Za, bc as Ei, bd as Mi, be as ut, bf as xa } from "./main_11e1c290_3.1.0-RC03.js";
|
2
|
+
import { W as $a, C as eo, V as to, a as io } from "./ValidationAlert_de35f79f_3.1.0-RC03.js";
|
3
|
+
import { detectSingleFace as ao, matchDimensions as oo, resizeResults as so, Box as no } from "./face_api_0e3ce8c8_3.1.0-RC03.js";
|
4
|
+
function lo(i) {
|
5
5
|
let e, t, o, s;
|
6
|
-
return t = new
|
6
|
+
return t = new $a({}), {
|
7
7
|
c() {
|
8
|
-
e = C("div"),
|
8
|
+
e = C("div"), ge(t.$$.fragment), this.c = G, h(e, "id", "face-oval"), h(e, "class", o = "loader " + /*loading*/
|
9
9
|
(i[0] ? "loading" : "") + " z-10"), h(
|
10
10
|
e,
|
11
11
|
"style",
|
@@ -14,7 +14,7 @@ function io(i) {
|
|
14
14
|
);
|
15
15
|
},
|
16
16
|
m(n, r) {
|
17
|
-
A(n, e, r),
|
17
|
+
A(n, e, r), ve(t, e, null), s = !0;
|
18
18
|
},
|
19
19
|
p(n, [r]) {
|
20
20
|
(!s || r & /*loading*/
|
@@ -31,33 +31,33 @@ function io(i) {
|
|
31
31
|
s || (J(t.$$.fragment, n), s = !0);
|
32
32
|
},
|
33
33
|
o(n) {
|
34
|
-
|
34
|
+
Y(t.$$.fragment, n), s = !1;
|
35
35
|
},
|
36
36
|
d(n) {
|
37
|
-
n && L(e),
|
37
|
+
n && L(e), pe(t);
|
38
38
|
}
|
39
39
|
};
|
40
40
|
}
|
41
|
-
const
|
42
|
-
function
|
41
|
+
const ro = "hsl(var(--p))", co = "hsl(var(--su))";
|
42
|
+
function uo(i, e, t) {
|
43
43
|
let o, s, n;
|
44
|
-
F(i,
|
44
|
+
F(i, Pe, (_) => t(7, s = _)), F(i, Ve, (_) => t(8, n = _));
|
45
45
|
let { loading: r } = e, l, c, f = 0.8, u = 8, g = 0.15;
|
46
|
-
return
|
47
|
-
"loading" in
|
46
|
+
return be() && (f = 0.65, u = 10, g = 0.25), i.$$set = (_) => {
|
47
|
+
"loading" in _ && t(0, r = _.loading);
|
48
48
|
}, i.$$.update = () => {
|
49
49
|
if (i.$$.dirty & /*$videoStore, percentage, ovalHeight, ovalWidth, $ovalDimensions, captureBarPercentage*/
|
50
50
|
476 && n) {
|
51
|
-
t(3, c = n.videoHeight * f), t(2, l = c / 1.45),
|
52
|
-
let
|
53
|
-
|
51
|
+
t(3, c = n.videoHeight * f), t(2, l = c / 1.45), m(Pe, s.width = l, s), m(Pe, s.height = c, s), m(Pe, s.x = (n.videoWidth - s.width) / 2, s);
|
52
|
+
let _ = n.videoHeight - n.videoHeight * g;
|
53
|
+
m(Pe, s.y = _ - s.height, s);
|
54
54
|
}
|
55
55
|
i.$$.dirty & /*ovalWidth, ovalHeight, borderWidth*/
|
56
56
|
44 && t(1, o = `
|
57
57
|
--oval-width: ${l}px;
|
58
58
|
--oval-height: ${c}px;
|
59
|
-
--border-color: ${
|
60
|
-
--border-color-animation: ${
|
59
|
+
--border-color: ${ro};
|
60
|
+
--border-color-animation: ${co};
|
61
61
|
--oval-border: ${u}px;
|
62
62
|
`);
|
63
63
|
}, [
|
@@ -72,7 +72,7 @@ function so(i, e, t) {
|
|
72
72
|
n
|
73
73
|
];
|
74
74
|
}
|
75
|
-
class
|
75
|
+
class Ui extends Ut {
|
76
76
|
constructor(e) {
|
77
77
|
super(), Vt(
|
78
78
|
this,
|
@@ -81,8 +81,8 @@ class Wi extends Ut {
|
|
81
81
|
props: Ht(this.attributes),
|
82
82
|
customElement: !0
|
83
83
|
},
|
84
|
-
|
85
|
-
|
84
|
+
uo,
|
85
|
+
lo,
|
86
86
|
jt,
|
87
87
|
{ loading: 0 },
|
88
88
|
null
|
@@ -98,12 +98,12 @@ class Wi extends Ut {
|
|
98
98
|
this.$$set({ loading: e }), q();
|
99
99
|
}
|
100
100
|
}
|
101
|
-
customElements.define("face-oval",
|
102
|
-
function
|
101
|
+
customElements.define("face-oval", Ui);
|
102
|
+
function fo(i) {
|
103
103
|
let e;
|
104
104
|
return {
|
105
105
|
c() {
|
106
|
-
e = C("div"), this.c =
|
106
|
+
e = C("div"), this.c = G, h(e, "class", "video-overlay z-0"), h(
|
107
107
|
e,
|
108
108
|
"style",
|
109
109
|
/*styleVars*/
|
@@ -122,18 +122,18 @@ function no(i) {
|
|
122
122
|
t[0]
|
123
123
|
);
|
124
124
|
},
|
125
|
-
i:
|
126
|
-
o:
|
125
|
+
i: G,
|
126
|
+
o: G,
|
127
127
|
d(t) {
|
128
128
|
t && L(e);
|
129
129
|
}
|
130
130
|
};
|
131
131
|
}
|
132
|
-
function
|
132
|
+
function ho(i, e, t) {
|
133
133
|
let o, s;
|
134
|
-
F(i,
|
134
|
+
F(i, Ve, (u) => t(6, s = u));
|
135
135
|
let n, r, l = 0.8, { overlayColor: c } = e, { overlayTransparency: f } = e;
|
136
|
-
return
|
136
|
+
return be() && (l = 0.65), i.$$set = (u) => {
|
137
137
|
"overlayColor" in u && t(1, c = u.overlayColor), "overlayTransparency" in u && t(2, f = u.overlayTransparency);
|
138
138
|
}, i.$$.update = () => {
|
139
139
|
i.$$.dirty & /*$videoStore, percentage, ovalHeight*/
|
@@ -154,7 +154,7 @@ function lo(i, e, t) {
|
|
154
154
|
s
|
155
155
|
];
|
156
156
|
}
|
157
|
-
class
|
157
|
+
class Vi extends Ut {
|
158
158
|
constructor(e) {
|
159
159
|
super(), Vt(
|
160
160
|
this,
|
@@ -163,8 +163,8 @@ class Mi extends Ut {
|
|
163
163
|
props: Ht(this.attributes),
|
164
164
|
customElement: !0
|
165
165
|
},
|
166
|
-
|
167
|
-
|
166
|
+
ho,
|
167
|
+
fo,
|
168
168
|
jt,
|
169
169
|
{ overlayColor: 1, overlayTransparency: 2 },
|
170
170
|
null
|
@@ -186,21 +186,21 @@ class Mi extends Ut {
|
|
186
186
|
this.$$set({ overlayTransparency: e }), q();
|
187
187
|
}
|
188
188
|
}
|
189
|
-
customElements.define("overlay-oval",
|
190
|
-
function
|
189
|
+
customElements.define("overlay-oval", Vi);
|
190
|
+
function yi(i, e, t) {
|
191
191
|
const o = i.slice();
|
192
|
-
return o[
|
192
|
+
return o[119] = e[t], o;
|
193
193
|
}
|
194
|
-
function
|
194
|
+
function Ti(i, e, t) {
|
195
195
|
const o = i.slice();
|
196
|
-
return o[
|
196
|
+
return o[119] = e[t], o;
|
197
197
|
}
|
198
|
-
function
|
199
|
-
let e, t, o = H(), s, n, r, l, c, f, u, g,
|
198
|
+
function ki(i) {
|
199
|
+
let e, t, o = H(), s, n, r, l, c, f, u, g, _, d, E, v, p, R, k, N, I, M = o && mo(i), U = (
|
200
200
|
/*$ready*/
|
201
|
-
i[21] &&
|
201
|
+
i[21] && Oi(i)
|
202
202
|
);
|
203
|
-
return d = new
|
203
|
+
return d = new Ja({}), v = new eo({
|
204
204
|
props: {
|
205
205
|
showConfigButton: (
|
206
206
|
/*showConfigButton*/
|
@@ -249,8 +249,8 @@ function yi(i) {
|
|
249
249
|
}
|
250
250
|
}), {
|
251
251
|
c() {
|
252
|
-
e = C("div"), t = C("div"), M && M.c(), s = W(), n = C("video"), l = W(), c = C("canvas"), f = W(), u = C("div"), g = C("div"), U && U.c(),
|
253
|
-
i[21] ?
|
252
|
+
e = C("div"), t = C("div"), M && M.c(), s = W(), n = C("video"), l = W(), c = C("canvas"), f = W(), u = C("div"), g = C("div"), U && U.c(), _ = W(), ge(d.$$.fragment), E = W(), ge(v.$$.fragment), h(n, "id", "bry-cc-camera-video-tag"), h(n, "class", r = /*$ready*/
|
253
|
+
i[21] ? be() ? "absolute inset-0 -scale-x-100" : "w-full h-full object-cover -scale-x-100" : "w-0 h-0"), n.playsInline = !0, n.muted = !0, n.autoplay = !0, h(c, "id", "bry-ce-detectionsCanvas"), h(c, "class", "absolute top-0 left-0 max-w-full -scale-x-100"), h(t, "class", "overflow-hidden"), ot(
|
254
254
|
t,
|
255
255
|
"width",
|
256
256
|
/*$videoStore*/
|
@@ -267,15 +267,15 @@ function yi(i) {
|
|
267
267
|
i[17] || /*waitingIdrndCaptureEvent*/
|
268
268
|
i[18]);
|
269
269
|
},
|
270
|
-
m(
|
271
|
-
A(
|
272
|
-
|
270
|
+
m(O, T) {
|
271
|
+
A(O, e, T), b(e, t), M && M.m(t, null), b(t, s), b(t, n), i[47](n), b(t, l), b(t, c), i[49](c), b(e, f), b(e, u), b(u, g), U && U.m(g, null), b(u, _), ve(d, u, null), b(u, E), ve(v, u, null), k = !0, N || (I = [
|
272
|
+
le(
|
273
273
|
n,
|
274
274
|
"canplay",
|
275
275
|
/*canplay_handler*/
|
276
276
|
i[48]
|
277
277
|
),
|
278
|
-
|
278
|
+
le(
|
279
279
|
n,
|
280
280
|
"play",
|
281
281
|
/*play*/
|
@@ -284,84 +284,84 @@ function yi(i) {
|
|
284
284
|
)
|
285
285
|
], N = !0);
|
286
286
|
},
|
287
|
-
p(
|
288
|
-
o && M.p(
|
287
|
+
p(O, T) {
|
288
|
+
o && M.p(O, T), (!k || T[0] & /*$ready*/
|
289
289
|
2097152 && r !== (r = /*$ready*/
|
290
|
-
|
290
|
+
O[21] ? be() ? "absolute inset-0 -scale-x-100" : "w-full h-full object-cover -scale-x-100" : "w-0 h-0")) && h(n, "class", r), (!k || T[1] & /*$videoStore*/
|
291
291
|
1) && ot(
|
292
292
|
t,
|
293
293
|
"width",
|
294
294
|
/*$videoStore*/
|
295
|
-
|
296
|
-
), (!
|
295
|
+
O[31].videoWidth + "px"
|
296
|
+
), (!k || T[1] & /*$videoStore*/
|
297
297
|
1) && ot(
|
298
298
|
t,
|
299
299
|
"height",
|
300
300
|
/*$videoStore*/
|
301
|
-
|
301
|
+
O[31].videoHeight + "px"
|
302
302
|
), /*$ready*/
|
303
|
-
|
304
|
-
2097152 && J(U, 1)) : (U =
|
303
|
+
O[21] ? U ? (U.p(O, T), T[0] & /*$ready*/
|
304
|
+
2097152 && J(U, 1)) : (U = Oi(O), U.c(), J(U, 1), U.m(g, null)) : U && (lt(), Y(U, 1, 1, () => {
|
305
305
|
U = null;
|
306
306
|
}), rt());
|
307
307
|
const Q = {};
|
308
|
-
|
308
|
+
T[0] & /*showConfigButton*/
|
309
309
|
16 && (Q.showConfigButton = /*showConfigButton*/
|
310
|
-
|
310
|
+
O[4]), T[0] & /*showAutoCaptureButton*/
|
311
311
|
32 && (Q.showAutoCaptureButton = /*showAutoCaptureButton*/
|
312
|
-
|
312
|
+
O[5]), T[0] & /*showCaptureButton*/
|
313
313
|
1 && (Q.showCaptureButton = /*showCaptureButton*/
|
314
|
-
|
314
|
+
O[0]), T[0] & /*showCameraButton*/
|
315
315
|
64 && (Q.showCameraButton = /*showCameraButton*/
|
316
|
-
|
316
|
+
O[6]), T[0] & /*enableCaptureButton*/
|
317
317
|
32768 && (Q.enableCaptureButton = /*enableCaptureButton*/
|
318
|
-
|
318
|
+
O[15]), T[0] & /*videoOverlay*/
|
319
319
|
256 && (Q.videoOverlay = /*videoOverlay*/
|
320
|
-
|
320
|
+
O[8]), T[0] & /*videoOverlayTransparency*/
|
321
321
|
512 && (Q.videoOverlayTransparency = /*videoOverlayTransparency*/
|
322
|
-
|
322
|
+
O[9]), T[0] & /*idrndClosed*/
|
323
323
|
131072 && (Q.idrndClosed = /*idrndClosed*/
|
324
|
-
|
324
|
+
O[17]), T[0] & /*idrndLoading*/
|
325
325
|
65536 && (Q.idrndLoading = /*idrndLoading*/
|
326
|
-
|
326
|
+
O[16]), T[0] & /*waitingIdrndCaptureEvent*/
|
327
327
|
262144 && (Q.waitingIdrndCaptureEvent = /*waitingIdrndCaptureEvent*/
|
328
|
-
|
328
|
+
O[18]), v.$set(Q), (!k || T[0] & /*$ready*/
|
329
329
|
2097152 && p !== (p = /*$ready*/
|
330
|
-
|
330
|
+
O[21] ? "relative" : "relative w-0 h-0")) && h(e, "class", p), (!k || T[0] & /*$cameraStatusStore, idrndLoading, idrndClosed, waitingIdrndCaptureEvent*/
|
331
331
|
1507328 && R !== (R = /*$cameraStatusStore*/
|
332
|
-
|
333
|
-
(
|
334
|
-
|
335
|
-
|
332
|
+
O[20] !== j.OK || H() && /*idrndLoading*/
|
333
|
+
(O[16] || /*idrndClosed*/
|
334
|
+
O[17] || /*waitingIdrndCaptureEvent*/
|
335
|
+
O[18]))) && (e.hidden = R);
|
336
336
|
},
|
337
|
-
i(
|
338
|
-
|
337
|
+
i(O) {
|
338
|
+
k || (J(U), J(d.$$.fragment, O), J(v.$$.fragment, O), k = !0);
|
339
339
|
},
|
340
|
-
o(
|
341
|
-
|
340
|
+
o(O) {
|
341
|
+
Y(U), Y(d.$$.fragment, O), Y(v.$$.fragment, O), k = !1;
|
342
342
|
},
|
343
|
-
d(
|
344
|
-
|
343
|
+
d(O) {
|
344
|
+
O && L(e), M && M.d(), i[47](null), i[49](null), U && U.d(), pe(d), pe(v), N = !1, ft(I);
|
345
345
|
}
|
346
346
|
};
|
347
347
|
}
|
348
|
-
function
|
348
|
+
function mo(i) {
|
349
349
|
let e;
|
350
350
|
return {
|
351
351
|
c() {
|
352
|
-
e = C("idlive-face-capture"), e.hidden = !0,
|
352
|
+
e = C("idlive-face-capture"), e.hidden = !0, ne(e, "mask_hidden", ""), ne(e, "auto_capture_disabled", ""), ne(e, "auto_close_disabled", ""), ne(
|
353
353
|
e,
|
354
354
|
"device_id",
|
355
355
|
/*$selectedVideoDeviceId*/
|
356
356
|
i[22]
|
357
|
-
);
|
357
|
+
), ne(e, "face_not_centered_check_enabled", ""), ne(e, "sunglasses_detected_check_enabled", ""), ne(e, "mouth_open_check_enabled", ""), ne(e, "face_blurry_check_enabled", ""), ne(e, "dark_image_check_enabled", ""), ne(e, "eyes_closed_check_enabled", "");
|
358
358
|
},
|
359
359
|
m(t, o) {
|
360
360
|
A(t, e, o), i[46](e);
|
361
361
|
},
|
362
362
|
p(t, o) {
|
363
363
|
o[0] & /*$selectedVideoDeviceId*/
|
364
|
-
4194304 &&
|
364
|
+
4194304 && ne(
|
365
365
|
e,
|
366
366
|
"device_id",
|
367
367
|
/*$selectedVideoDeviceId*/
|
@@ -373,21 +373,21 @@ function ro(i) {
|
|
373
373
|
}
|
374
374
|
};
|
375
375
|
}
|
376
|
-
function
|
376
|
+
function Oi(i) {
|
377
377
|
let e, t, o, s, n, r;
|
378
|
-
return e = new
|
378
|
+
return e = new to({
|
379
379
|
props: {
|
380
380
|
isCountingDown: (
|
381
381
|
/*isCountingDown*/
|
382
382
|
i[14]
|
383
383
|
)
|
384
384
|
}
|
385
|
-
}), o = new
|
385
|
+
}), o = new Ui({
|
386
386
|
props: { loading: (
|
387
387
|
/*isCountingDown*/
|
388
388
|
i[14]
|
389
389
|
) }
|
390
|
-
}), n = new
|
390
|
+
}), n = new Vi({
|
391
391
|
props: {
|
392
392
|
overlayColor: (
|
393
393
|
/*videoOverlay*/
|
@@ -400,10 +400,10 @@ function Ti(i) {
|
|
400
400
|
}
|
401
401
|
}), {
|
402
402
|
c() {
|
403
|
-
|
403
|
+
ge(e.$$.fragment), t = W(), ge(o.$$.fragment), s = W(), ge(n.$$.fragment);
|
404
404
|
},
|
405
405
|
m(l, c) {
|
406
|
-
|
406
|
+
ve(e, l, c), A(l, t, c), ve(o, l, c), A(l, s, c), ve(n, l, c), r = !0;
|
407
407
|
},
|
408
408
|
p(l, c) {
|
409
409
|
const f = {};
|
@@ -425,25 +425,25 @@ function Ti(i) {
|
|
425
425
|
r || (J(e.$$.fragment, l), J(o.$$.fragment, l), J(n.$$.fragment, l), r = !0);
|
426
426
|
},
|
427
427
|
o(l) {
|
428
|
-
|
428
|
+
Y(e.$$.fragment, l), Y(o.$$.fragment, l), Y(n.$$.fragment, l), r = !1;
|
429
429
|
},
|
430
430
|
d(l) {
|
431
|
-
|
431
|
+
pe(e, l), l && L(t), pe(o, l), l && L(s), pe(n, l);
|
432
432
|
}
|
433
433
|
};
|
434
434
|
}
|
435
|
-
function
|
435
|
+
function Ri(i) {
|
436
436
|
let e, t, o, s, n;
|
437
437
|
function r(f, u) {
|
438
438
|
return (
|
439
439
|
/*$isLoading*/
|
440
|
-
f[32] ?
|
440
|
+
f[32] ? bo : _o
|
441
441
|
);
|
442
442
|
}
|
443
443
|
let l = r(i), c = l(i);
|
444
444
|
return {
|
445
445
|
c() {
|
446
|
-
e = C("slot"), t = C("div"), o = C("img"), n = W(), c.c(), ct(o.src, s =
|
446
|
+
e = C("slot"), t = C("div"), o = C("img"), n = W(), c.c(), ct(o.src, s = Wi) || h(o, "src", s), h(o, "alt", "loading gif"), h(o, "class", "m-auto h-[10em] lg:h-[12em]"), h(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), h(e, "name", "obtaining-photo-gif"), h(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
|
447
447
|
},
|
448
448
|
m(f, u) {
|
449
449
|
A(f, e, u), b(e, t), b(t, o), b(t, n), c.m(t, null);
|
@@ -456,7 +456,7 @@ function Oi(i) {
|
|
456
456
|
}
|
457
457
|
};
|
458
458
|
}
|
459
|
-
function
|
459
|
+
function _o(i) {
|
460
460
|
let e, t = (
|
461
461
|
/*$_*/
|
462
462
|
i[28]("faceCollector.obtainingPicture") + ""
|
@@ -478,7 +478,7 @@ function co(i) {
|
|
478
478
|
}
|
479
479
|
};
|
480
480
|
}
|
481
|
-
function
|
481
|
+
function bo(i) {
|
482
482
|
let e;
|
483
483
|
return {
|
484
484
|
c() {
|
@@ -487,24 +487,24 @@ function uo(i) {
|
|
487
487
|
m(t, o) {
|
488
488
|
A(t, e, o);
|
489
489
|
},
|
490
|
-
p:
|
490
|
+
p: G,
|
491
491
|
d(t) {
|
492
492
|
t && L(e);
|
493
493
|
}
|
494
494
|
};
|
495
495
|
}
|
496
|
-
function
|
496
|
+
function Ai(i) {
|
497
497
|
let e, t, o, s, n;
|
498
498
|
function r(f, u) {
|
499
499
|
return (
|
500
500
|
/*$isLoading*/
|
501
|
-
f[32] ?
|
501
|
+
f[32] ? vo : go
|
502
502
|
);
|
503
503
|
}
|
504
504
|
let l = r(i), c = l(i);
|
505
505
|
return {
|
506
506
|
c() {
|
507
|
-
e = C("slot"), t = C("div"), o = C("img"), n = W(), c.c(), ct(o.src, s =
|
507
|
+
e = C("slot"), t = C("div"), o = C("img"), n = W(), c.c(), ct(o.src, s = Wi) || h(o, "src", s), h(o, "alt", "loading gif"), h(o, "class", "m-auto h-[10em] lg:h-[12em]"), h(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), h(e, "name", "loading-camera-gif"), h(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
|
508
508
|
},
|
509
509
|
m(f, u) {
|
510
510
|
A(f, e, u), b(e, t), b(t, o), b(t, n), c.m(t, null);
|
@@ -517,7 +517,7 @@ function ki(i) {
|
|
517
517
|
}
|
518
518
|
};
|
519
519
|
}
|
520
|
-
function
|
520
|
+
function go(i) {
|
521
521
|
let e, t = (
|
522
522
|
/*$_*/
|
523
523
|
i[28]("faceCollector.initiatingCamera") + ""
|
@@ -539,7 +539,7 @@ function fo(i) {
|
|
539
539
|
}
|
540
540
|
};
|
541
541
|
}
|
542
|
-
function
|
542
|
+
function vo(i) {
|
543
543
|
let e;
|
544
544
|
return {
|
545
545
|
c() {
|
@@ -548,13 +548,13 @@ function ho(i) {
|
|
548
548
|
m(t, o) {
|
549
549
|
A(t, e, o);
|
550
550
|
},
|
551
|
-
p:
|
551
|
+
p: G,
|
552
552
|
d(t) {
|
553
553
|
t && L(e);
|
554
554
|
}
|
555
555
|
};
|
556
556
|
}
|
557
|
-
function
|
557
|
+
function Ii(i) {
|
558
558
|
let e, t, o = (
|
559
559
|
/*$_*/
|
560
560
|
i[28]("faceCollector.finish") + ""
|
@@ -567,15 +567,15 @@ function Ri(i) {
|
|
567
567
|
e = C("div"), t = C("button"), s = B(o), r = W(), l = C("button"), f = B(c), t.disabled = n = /*$justification*/
|
568
568
|
i[25].length === 0, h(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), h(l, "id", "bry-cc-retake-button"), h(l, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), h(e, "class", "ce-dui-btn-group flex");
|
569
569
|
},
|
570
|
-
m(
|
571
|
-
A(
|
572
|
-
|
570
|
+
m(_, d) {
|
571
|
+
A(_, e, d), b(e, t), b(t, s), b(e, r), b(e, l), b(l, f), u || (g = [
|
572
|
+
le(
|
573
573
|
t,
|
574
574
|
"click",
|
575
575
|
/*click_handler*/
|
576
576
|
i[50]
|
577
577
|
),
|
578
|
-
|
578
|
+
le(
|
579
579
|
l,
|
580
580
|
"click",
|
581
581
|
/*click_handler_1*/
|
@@ -583,54 +583,54 @@ function Ri(i) {
|
|
583
583
|
)
|
584
584
|
], u = !0);
|
585
585
|
},
|
586
|
-
p(
|
586
|
+
p(_, d) {
|
587
587
|
d[0] & /*$_*/
|
588
588
|
268435456 && o !== (o = /*$_*/
|
589
|
-
|
589
|
+
_[28]("faceCollector.finish") + "") && V(s, o), d[0] & /*$justification*/
|
590
590
|
33554432 && n !== (n = /*$justification*/
|
591
|
-
|
591
|
+
_[25].length === 0) && (t.disabled = n), d[0] & /*$_*/
|
592
592
|
268435456 && c !== (c = /*$_*/
|
593
|
-
|
593
|
+
_[28]("faceCollector.retakePhoto") + "") && V(f, c);
|
594
594
|
},
|
595
|
-
d(
|
596
|
-
|
595
|
+
d(_) {
|
596
|
+
_ && L(e), u = !1, ft(g);
|
597
597
|
}
|
598
598
|
};
|
599
599
|
}
|
600
|
-
function
|
600
|
+
function po(i) {
|
601
601
|
let e, t;
|
602
|
-
return e = new
|
602
|
+
return e = new io({ props: { handler: (
|
603
603
|
/*func*/
|
604
604
|
i[60]
|
605
605
|
) } }), {
|
606
606
|
c() {
|
607
|
-
|
607
|
+
ge(e.$$.fragment);
|
608
608
|
},
|
609
609
|
m(o, s) {
|
610
|
-
|
610
|
+
ve(e, o, s), t = !0;
|
611
611
|
},
|
612
|
-
p:
|
612
|
+
p: G,
|
613
613
|
i(o) {
|
614
614
|
t || (J(e.$$.fragment, o), t = !0);
|
615
615
|
},
|
616
616
|
o(o) {
|
617
|
-
|
617
|
+
Y(e.$$.fragment, o), t = !1;
|
618
618
|
},
|
619
619
|
d(o) {
|
620
|
-
|
620
|
+
pe(e, o);
|
621
621
|
}
|
622
622
|
};
|
623
623
|
}
|
624
|
-
function
|
624
|
+
function wo(i) {
|
625
625
|
let e, t, o, s, n, r, l, c, f;
|
626
626
|
const u = [
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
627
|
+
ko,
|
628
|
+
To,
|
629
|
+
yo,
|
630
|
+
Eo,
|
631
|
+
Co
|
632
632
|
], g = [];
|
633
|
-
function
|
633
|
+
function _(d, E) {
|
634
634
|
return (
|
635
635
|
/*$captured*/
|
636
636
|
d[23] ? (
|
@@ -645,7 +645,7 @@ function _o(i) {
|
|
645
645
|
) : 0
|
646
646
|
);
|
647
647
|
}
|
648
|
-
return r =
|
648
|
+
return r = _(i), l = g[r] = u[r](i), {
|
649
649
|
c() {
|
650
650
|
e = C("div"), t = C("img"), n = W(), l.c(), h(t, "class", "m-auto col-start-1 col-end-1 max-h-[23.2em]"), ct(t.src, o = /*$dataTypePrefix*/
|
651
651
|
i[30] + "," + /*$image*/
|
@@ -670,7 +670,7 @@ function _o(i) {
|
|
670
670
|
d[33] && /*$unconformitiesStore*/
|
671
671
|
d[29].isLoading)) && (t.hidden = s);
|
672
672
|
let v = r;
|
673
|
-
r =
|
673
|
+
r = _(d), r === v ? g[r].p(d, E) : (lt(), Y(g[v], 1, 1, () => {
|
674
674
|
g[v] = null;
|
675
675
|
}), rt(), l = g[r], l ? l.p(d, E) : (l = g[r] = u[r](d), l.c()), J(l, 1), l.m(e, null)), (!f || E[0] & /*$unconformitiesStore*/
|
676
676
|
536870912 | E[1] & /*$showFaceWhileValidating*/
|
@@ -682,59 +682,59 @@ function _o(i) {
|
|
682
682
|
f || (J(l), f = !0);
|
683
683
|
},
|
684
684
|
o(d) {
|
685
|
-
|
685
|
+
Y(l), f = !1;
|
686
686
|
},
|
687
687
|
d(d) {
|
688
688
|
d && L(e), g[r].d();
|
689
689
|
}
|
690
690
|
};
|
691
691
|
}
|
692
|
-
function
|
692
|
+
function Co(i) {
|
693
693
|
let e, t, o = (
|
694
694
|
/*$_*/
|
695
695
|
i[28]("faceCollector.captured") + ""
|
696
696
|
), s, n, r, l, c, f = (
|
697
697
|
/*$_*/
|
698
698
|
i[28]("faceCollector.retakePhoto") + ""
|
699
|
-
), u, g,
|
699
|
+
), u, g, _ = nt(Ga).faceStrategy !== Za.DISABLED, d, E, v, p = (
|
700
700
|
/*$unconformitiesStore*/
|
701
|
-
i[29].unconformities.length !== 0 &&
|
702
|
-
), R =
|
701
|
+
i[29].unconformities.length !== 0 && Li(i)
|
702
|
+
), R = _ && Oo();
|
703
703
|
return {
|
704
704
|
c() {
|
705
|
-
e = C("div"), t = C("h1"), s = B(o), n = W(), p && p.c(), r = W(), l = C("div"), c = C("button"), u = B(f), g = W(), R && R.c(), h(t, "class", "text-3xl font-bold pb-[1em] transition-opacity"), h(c, "id", "bry-cc-retake-button"), h(c, "class", "ce-dui-btn ce-dui-btn-block flex-shrink text-base"), h(l, "class", "flex flex-row"),
|
705
|
+
e = C("div"), t = C("h1"), s = B(o), n = W(), p && p.c(), r = W(), l = C("div"), c = C("button"), u = B(f), g = W(), R && R.c(), h(t, "class", "text-3xl font-bold pb-[1em] transition-opacity"), h(c, "id", "bry-cc-retake-button"), h(c, "class", "ce-dui-btn ce-dui-btn-block flex-shrink text-base"), h(l, "class", "flex flex-row"), Ei(l, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
706
706
|
i[34]);
|
707
707
|
},
|
708
|
-
m(
|
709
|
-
A(
|
708
|
+
m(k, N) {
|
709
|
+
A(k, e, N), b(e, t), b(t, s), b(e, n), p && p.m(e, null), b(e, r), b(e, l), b(l, c), b(c, u), b(l, g), R && R.m(l, null), d = !0, E || (v = le(
|
710
710
|
c,
|
711
711
|
"click",
|
712
712
|
/*click_handler_6*/
|
713
713
|
i[59]
|
714
714
|
), E = !0);
|
715
715
|
},
|
716
|
-
p(
|
716
|
+
p(k, N) {
|
717
717
|
(!d || N[0] & /*$_*/
|
718
718
|
268435456) && o !== (o = /*$_*/
|
719
|
-
|
720
|
-
|
719
|
+
k[28]("faceCollector.captured") + "") && V(s, o), /*$unconformitiesStore*/
|
720
|
+
k[29].unconformities.length !== 0 ? p ? p.p(k, N) : (p = Li(k), p.c(), p.m(e, r)) : p && (p.d(1), p = null), (!d || N[0] & /*$_*/
|
721
721
|
268435456) && f !== (f = /*$_*/
|
722
|
-
|
723
|
-
8) &&
|
724
|
-
|
722
|
+
k[28]("faceCollector.retakePhoto") + "") && V(u, f), (!d || N[1] & /*$exportButtonDisabled*/
|
723
|
+
8) && Ei(l, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
724
|
+
k[34]);
|
725
725
|
},
|
726
|
-
i(
|
726
|
+
i(k) {
|
727
727
|
d || (J(R), d = !0);
|
728
728
|
},
|
729
|
-
o(
|
730
|
-
|
729
|
+
o(k) {
|
730
|
+
Y(R), d = !1;
|
731
731
|
},
|
732
|
-
d(
|
733
|
-
|
732
|
+
d(k) {
|
733
|
+
k && L(e), p && p.d(), R && R.d(), E = !1, v();
|
734
734
|
}
|
735
735
|
};
|
736
736
|
}
|
737
|
-
function
|
737
|
+
function Eo(i) {
|
738
738
|
let e, t, o = (
|
739
739
|
/*evaluatePhoto*/
|
740
740
|
(i[2] ? (
|
@@ -755,31 +755,31 @@ function go(i) {
|
|
755
755
|
i[29].unconformities
|
756
756
|
), g = [];
|
757
757
|
for (let v = 0; v < u.length; v += 1)
|
758
|
-
g[v] =
|
759
|
-
let
|
758
|
+
g[v] = Di(yi(i, u, v));
|
759
|
+
let _ = (
|
760
760
|
/*evaluatePhoto*/
|
761
761
|
i[2] && /*$unconformitiesStore*/
|
762
|
-
i[29].unconformities.length == 0 &&
|
762
|
+
i[29].unconformities.length == 0 && Fi(i)
|
763
763
|
), d = (
|
764
764
|
/*showJustificationField*/
|
765
765
|
i[7] && /*$unconformitiesStore*/
|
766
|
-
i[29].unconformities.length > 0 &&
|
766
|
+
i[29].unconformities.length > 0 && Ni(i)
|
767
767
|
), E = (
|
768
768
|
/*$captured*/
|
769
|
-
i[23] &&
|
769
|
+
i[23] && Si(i)
|
770
770
|
);
|
771
771
|
return {
|
772
772
|
c() {
|
773
773
|
e = C("div"), t = C("h1"), s = B(o), n = W(), r = C("div");
|
774
774
|
for (let v = 0; v < g.length; v += 1)
|
775
775
|
g[v].c();
|
776
|
-
l = W(),
|
776
|
+
l = W(), _ && _.c(), c = W(), d && d.c(), f = W(), E && E.c(), h(t, "class", "text-3xl font-bold transition-opacity"), h(r, "class", "flex flex-wrap"), h(e, "class", "flex flex-col justify-between");
|
777
777
|
},
|
778
778
|
m(v, p) {
|
779
779
|
A(v, e, p), b(e, t), b(t, s), b(e, n), b(e, r);
|
780
780
|
for (let R = 0; R < g.length; R += 1)
|
781
781
|
g[R] && g[R].m(r, null);
|
782
|
-
b(r, l),
|
782
|
+
b(r, l), _ && _.m(r, null), b(e, c), d && d.m(e, null), b(e, f), E && E.m(e, null);
|
783
783
|
},
|
784
784
|
p(v, p) {
|
785
785
|
if (p[0] & /*evaluatePhoto, $unconformitiesStore, $_*/
|
@@ -802,8 +802,8 @@ function go(i) {
|
|
802
802
|
v[29].unconformities;
|
803
803
|
let R;
|
804
804
|
for (R = 0; R < u.length; R += 1) {
|
805
|
-
const
|
806
|
-
g[R] ? g[R].p(
|
805
|
+
const k = yi(v, u, R);
|
806
|
+
g[R] ? g[R].p(k, p) : (g[R] = Di(k), g[R].c(), g[R].m(r, l));
|
807
807
|
}
|
808
808
|
for (; R < g.length; R += 1)
|
809
809
|
g[R].d(1);
|
@@ -811,42 +811,42 @@ function go(i) {
|
|
811
811
|
}
|
812
812
|
/*evaluatePhoto*/
|
813
813
|
v[2] && /*$unconformitiesStore*/
|
814
|
-
v[29].unconformities.length == 0 ?
|
814
|
+
v[29].unconformities.length == 0 ? _ ? _.p(v, p) : (_ = Fi(v), _.c(), _.m(r, null)) : _ && (_.d(1), _ = null), /*showJustificationField*/
|
815
815
|
v[7] && /*$unconformitiesStore*/
|
816
|
-
v[29].unconformities.length > 0 ? d ? d.p(v, p) : (d =
|
817
|
-
v[23] ? E ? E.p(v, p) : (E =
|
816
|
+
v[29].unconformities.length > 0 ? d ? d.p(v, p) : (d = Ni(v), d.c(), d.m(e, f)) : d && (d.d(1), d = null), /*$captured*/
|
817
|
+
v[23] ? E ? E.p(v, p) : (E = Si(v), E.c(), E.m(e, null)) : E && (E.d(1), E = null);
|
818
818
|
},
|
819
|
-
i:
|
820
|
-
o:
|
819
|
+
i: G,
|
820
|
+
o: G,
|
821
821
|
d(v) {
|
822
|
-
v && L(e),
|
822
|
+
v && L(e), Mi(g, v), _ && _.d(), d && d.d(), E && E.d();
|
823
823
|
}
|
824
824
|
};
|
825
825
|
}
|
826
|
-
function
|
826
|
+
function yo(i) {
|
827
827
|
let e, t, o, s, n = (
|
828
828
|
/*$_*/
|
829
829
|
i[28]("faceCollector.finish") + ""
|
830
830
|
), r, l, c, f = (
|
831
831
|
/*$_*/
|
832
832
|
i[28]("faceCollector.retakePhoto") + ""
|
833
|
-
), u, g,
|
833
|
+
), u, g, _;
|
834
834
|
function d(p, R) {
|
835
835
|
return (
|
836
836
|
/*$requestResult*/
|
837
837
|
p[27] === K.LIVENESS_DETECTION_FAILURE || /*$requestResult*/
|
838
|
-
p[27] === K.UNKNOWN_LIVENESS_ERROR ?
|
838
|
+
p[27] === K.UNKNOWN_LIVENESS_ERROR ? No : (
|
839
839
|
/*$requestResult*/
|
840
|
-
p[27] === K.LOW_LIVENESS_SCORE ?
|
840
|
+
p[27] === K.LOW_LIVENESS_SCORE ? Fo : (
|
841
841
|
/*$requestResult*/
|
842
842
|
p[27] === K.TEMPLATE_EXTRACTION_ERROR || /*$requestResult*/
|
843
|
-
p[27] === K.UNKNOWN_TEMPLATE_EXTRACTION_ERROR ?
|
843
|
+
p[27] === K.UNKNOWN_TEMPLATE_EXTRACTION_ERROR ? Do : (
|
844
844
|
/*$requestResult*/
|
845
|
-
p[27] === K.UNABLE_TO_COMMUNICATE_WITH_TEMPLATE_EXTRACTION_SERVICE ?
|
845
|
+
p[27] === K.UNABLE_TO_COMMUNICATE_WITH_TEMPLATE_EXTRACTION_SERVICE ? Lo : (
|
846
846
|
/*$requestResult*/
|
847
|
-
p[27] === K.LIVENESS_EVALUATION_ERROR ?
|
847
|
+
p[27] === K.LIVENESS_EVALUATION_ERROR ? Io : (
|
848
848
|
/*$requestResult*/
|
849
|
-
p[27] === K.INSUFFICIENT_FACE_QUALITY ?
|
849
|
+
p[27] === K.INSUFFICIENT_FACE_QUALITY ? Ao : Ro
|
850
850
|
)
|
851
851
|
)
|
852
852
|
)
|
@@ -860,14 +860,14 @@ function vo(i) {
|
|
860
860
|
e = C("div"), v.c(), t = W(), o = C("div"), s = C("button"), r = B(n), l = W(), c = C("button"), u = B(f), s.disabled = !0, h(s, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), h(c, "id", "bry-cc-retake-button"), h(c, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), h(o, "class", "ce-dui-btn-group flex"), h(e, "class", "flex flex-col justify-between");
|
861
861
|
},
|
862
862
|
m(p, R) {
|
863
|
-
A(p, e, R), v.m(e, null), b(e, t), b(e, o), b(o, s), b(s, r), b(o, l), b(o, c), b(c, u), g || (
|
864
|
-
|
863
|
+
A(p, e, R), v.m(e, null), b(e, t), b(e, o), b(o, s), b(s, r), b(o, l), b(o, c), b(c, u), g || (_ = [
|
864
|
+
le(
|
865
865
|
s,
|
866
866
|
"click",
|
867
867
|
/*click_handler_2*/
|
868
868
|
i[53]
|
869
869
|
),
|
870
|
-
|
870
|
+
le(
|
871
871
|
c,
|
872
872
|
"click",
|
873
873
|
/*click_handler_3*/
|
@@ -882,14 +882,14 @@ function vo(i) {
|
|
882
882
|
268435456 && f !== (f = /*$_*/
|
883
883
|
p[28]("faceCollector.retakePhoto") + "") && V(u, f);
|
884
884
|
},
|
885
|
-
i:
|
886
|
-
o:
|
885
|
+
i: G,
|
886
|
+
o: G,
|
887
887
|
d(p) {
|
888
|
-
p && L(e), v.d(), g = !1, ft(
|
888
|
+
p && L(e), v.d(), g = !1, ft(_);
|
889
889
|
}
|
890
890
|
};
|
891
891
|
}
|
892
|
-
function
|
892
|
+
function To(i) {
|
893
893
|
let e, t, o = (
|
894
894
|
/*$_*/
|
895
895
|
i[28]("faceCollector.validating") + ""
|
@@ -906,14 +906,14 @@ function po(i) {
|
|
906
906
|
268435456 && o !== (o = /*$_*/
|
907
907
|
l[28]("faceCollector.validating") + "") && V(s, o);
|
908
908
|
},
|
909
|
-
i:
|
910
|
-
o:
|
909
|
+
i: G,
|
910
|
+
o: G,
|
911
911
|
d(l) {
|
912
912
|
l && L(e);
|
913
913
|
}
|
914
914
|
};
|
915
915
|
}
|
916
|
-
function
|
916
|
+
function ko(i) {
|
917
917
|
let e;
|
918
918
|
return {
|
919
919
|
c() {
|
@@ -922,15 +922,15 @@ function wo(i) {
|
|
922
922
|
m(t, o) {
|
923
923
|
A(t, e, o);
|
924
924
|
},
|
925
|
-
p:
|
926
|
-
i:
|
927
|
-
o:
|
925
|
+
p: G,
|
926
|
+
i: G,
|
927
|
+
o: G,
|
928
928
|
d(t) {
|
929
929
|
t && L(e);
|
930
930
|
}
|
931
931
|
};
|
932
932
|
}
|
933
|
-
function
|
933
|
+
function Li(i) {
|
934
934
|
let e, t, o = (
|
935
935
|
/*$_*/
|
936
936
|
i[28]("faceCollector.justification") + ""
|
@@ -944,7 +944,7 @@ function Ai(i) {
|
|
944
944
|
r,
|
945
945
|
/*$justification*/
|
946
946
|
i[25]
|
947
|
-
), l || (c =
|
947
|
+
), l || (c = le(
|
948
948
|
r,
|
949
949
|
"input",
|
950
950
|
/*textarea_input_handler_1*/
|
@@ -966,32 +966,32 @@ function Ai(i) {
|
|
966
966
|
}
|
967
967
|
};
|
968
968
|
}
|
969
|
-
function
|
969
|
+
function Oo(i) {
|
970
970
|
let e, t;
|
971
|
-
return e = new
|
971
|
+
return e = new xa({
|
972
972
|
props: { cssClass: "ce-dui-btn-block flex-shrink" }
|
973
973
|
}), {
|
974
974
|
c() {
|
975
|
-
|
975
|
+
ge(e.$$.fragment);
|
976
976
|
},
|
977
977
|
m(o, s) {
|
978
|
-
|
978
|
+
ve(e, o, s), t = !0;
|
979
979
|
},
|
980
980
|
i(o) {
|
981
981
|
t || (J(e.$$.fragment, o), t = !0);
|
982
982
|
},
|
983
983
|
o(o) {
|
984
|
-
|
984
|
+
Y(e.$$.fragment, o), t = !1;
|
985
985
|
},
|
986
986
|
d(o) {
|
987
|
-
|
987
|
+
pe(e, o);
|
988
988
|
}
|
989
989
|
};
|
990
990
|
}
|
991
|
-
function
|
991
|
+
function Di(i) {
|
992
992
|
let e, t = (
|
993
993
|
/*unconformity*/
|
994
|
-
i[
|
994
|
+
i[119] + ""
|
995
995
|
), o;
|
996
996
|
return {
|
997
997
|
c() {
|
@@ -1003,14 +1003,14 @@ function Ii(i) {
|
|
1003
1003
|
p(s, n) {
|
1004
1004
|
n[0] & /*$unconformitiesStore*/
|
1005
1005
|
536870912 && t !== (t = /*unconformity*/
|
1006
|
-
s[
|
1006
|
+
s[119] + "") && V(o, t);
|
1007
1007
|
},
|
1008
1008
|
d(s) {
|
1009
1009
|
s && L(e);
|
1010
1010
|
}
|
1011
1011
|
};
|
1012
1012
|
}
|
1013
|
-
function
|
1013
|
+
function Fi(i) {
|
1014
1014
|
let e, t = (
|
1015
1015
|
/*$_*/
|
1016
1016
|
i[28]("faceCollector.noNonconformity") + ""
|
@@ -1032,51 +1032,51 @@ function Li(i) {
|
|
1032
1032
|
}
|
1033
1033
|
};
|
1034
1034
|
}
|
1035
|
-
function
|
1035
|
+
function Ni(i) {
|
1036
1036
|
let e, t, o, s = (
|
1037
1037
|
/*$_*/
|
1038
1038
|
i[28]("faceCollector.provideAReasonForTheLowQualityCapture") + ""
|
1039
|
-
), n, r, l, c, f, u, g,
|
1039
|
+
), n, r, l, c, f, u, g, _, d = (
|
1040
1040
|
/*$_*/
|
1041
1041
|
i[28]("faceCollector.thisInformationIsRequired") + ""
|
1042
1042
|
), E, v, p, R;
|
1043
1043
|
return {
|
1044
1044
|
c() {
|
1045
|
-
e = C("div"), t = C("label"), o = C("span"), n = B(s), r = W(), l = C("textarea"), f = W(), u = C("label"), g = C("span"),
|
1045
|
+
e = C("div"), t = C("label"), o = C("span"), n = B(s), r = W(), l = C("textarea"), f = W(), u = C("label"), g = C("span"), _ = B("("), E = B(d), v = B(")"), h(o, "class", "ce-dui-label-text text-base"), h(t, "class", "ce-dui-label"), h(t, "for", "justification"), h(l, "contenteditable", ""), h(l, "id", "justification"), h(l, "class", "ce-dui-textarea ce-dui-textarea-bordered h-[6em] text-base"), h(l, "placeholder", c = /*$_*/
|
1046
1046
|
i[28]("faceCollector.yourJustification")), h(g, "class", "ce-dui-label-text-alt text-base"), h(u, "class", "ce-dui-label"), h(u, "for", "justification"), h(e, "class", "ce-dui-form-control");
|
1047
1047
|
},
|
1048
|
-
m(
|
1049
|
-
A(
|
1048
|
+
m(k, N) {
|
1049
|
+
A(k, e, N), b(e, t), b(t, o), b(o, n), b(e, r), b(e, l), ut(
|
1050
1050
|
l,
|
1051
1051
|
/*$justification*/
|
1052
1052
|
i[25]
|
1053
|
-
), b(e, f), b(e, u), b(u, g), b(g,
|
1053
|
+
), b(e, f), b(e, u), b(u, g), b(g, _), b(g, E), b(g, v), p || (R = le(
|
1054
1054
|
l,
|
1055
1055
|
"input",
|
1056
1056
|
/*textarea_input_handler*/
|
1057
1057
|
i[55]
|
1058
1058
|
), p = !0);
|
1059
1059
|
},
|
1060
|
-
p(
|
1060
|
+
p(k, N) {
|
1061
1061
|
N[0] & /*$_*/
|
1062
1062
|
268435456 && s !== (s = /*$_*/
|
1063
|
-
|
1063
|
+
k[28]("faceCollector.provideAReasonForTheLowQualityCapture") + "") && V(n, s), N[0] & /*$_*/
|
1064
1064
|
268435456 && c !== (c = /*$_*/
|
1065
|
-
|
1065
|
+
k[28]("faceCollector.yourJustification")) && h(l, "placeholder", c), N[0] & /*$justification*/
|
1066
1066
|
33554432 && ut(
|
1067
1067
|
l,
|
1068
1068
|
/*$justification*/
|
1069
|
-
|
1069
|
+
k[25]
|
1070
1070
|
), N[0] & /*$_*/
|
1071
1071
|
268435456 && d !== (d = /*$_*/
|
1072
|
-
|
1072
|
+
k[28]("faceCollector.thisInformationIsRequired") + "") && V(E, d);
|
1073
1073
|
},
|
1074
|
-
d(
|
1075
|
-
|
1074
|
+
d(k) {
|
1075
|
+
k && L(e), p = !1, R();
|
1076
1076
|
}
|
1077
1077
|
};
|
1078
1078
|
}
|
1079
|
-
function
|
1079
|
+
function Si(i) {
|
1080
1080
|
let e, t, o = (
|
1081
1081
|
/*$_*/
|
1082
1082
|
i[28]("faceCollector.finish") + ""
|
@@ -1092,15 +1092,15 @@ function Di(i) {
|
|
1092
1092
|
i[25].length === 0 && /*$unconformitiesStore*/
|
1093
1093
|
i[29].unconformities.length !== 0, h(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink text-base"), h(l, "id", "bry-cc-retake-button"), h(l, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink text-base"), h(e, "class", "ce-dui-btn-group flex");
|
1094
1094
|
},
|
1095
|
-
m(
|
1096
|
-
A(
|
1097
|
-
|
1095
|
+
m(_, d) {
|
1096
|
+
A(_, e, d), b(e, t), b(t, s), b(e, r), b(e, l), b(l, f), u || (g = [
|
1097
|
+
le(
|
1098
1098
|
t,
|
1099
1099
|
"click",
|
1100
1100
|
/*click_handler_4*/
|
1101
1101
|
i[56]
|
1102
1102
|
),
|
1103
|
-
|
1103
|
+
le(
|
1104
1104
|
l,
|
1105
1105
|
"click",
|
1106
1106
|
/*click_handler_5*/
|
@@ -1108,24 +1108,24 @@ function Di(i) {
|
|
1108
1108
|
)
|
1109
1109
|
], u = !0);
|
1110
1110
|
},
|
1111
|
-
p(
|
1111
|
+
p(_, d) {
|
1112
1112
|
d[0] & /*$_*/
|
1113
1113
|
268435456 && o !== (o = /*$_*/
|
1114
|
-
|
1114
|
+
_[28]("faceCollector.finish") + "") && V(s, o), d[0] & /*evaluatePhoto, showJustificationField, $justification, $unconformitiesStore*/
|
1115
1115
|
570425476 && n !== (n = /*evaluatePhoto*/
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1116
|
+
_[2] && /*showJustificationField*/
|
1117
|
+
_[7] && /*$justification*/
|
1118
|
+
_[25].length === 0 && /*$unconformitiesStore*/
|
1119
|
+
_[29].unconformities.length !== 0) && (t.disabled = n), d[0] & /*$_*/
|
1120
1120
|
268435456 && c !== (c = /*$_*/
|
1121
|
-
|
1121
|
+
_[28]("faceCollector.retakePhoto") + "") && V(f, c);
|
1122
1122
|
},
|
1123
|
-
d(
|
1124
|
-
|
1123
|
+
d(_) {
|
1124
|
+
_ && L(e), u = !1, ft(g);
|
1125
1125
|
}
|
1126
1126
|
};
|
1127
1127
|
}
|
1128
|
-
function
|
1128
|
+
function Ro(i) {
|
1129
1129
|
let e, t = (
|
1130
1130
|
/*$_*/
|
1131
1131
|
i[28]("faceCollector.everythingOk") + ""
|
@@ -1147,7 +1147,7 @@ function Eo(i) {
|
|
1147
1147
|
}
|
1148
1148
|
};
|
1149
1149
|
}
|
1150
|
-
function
|
1150
|
+
function Ao(i) {
|
1151
1151
|
let e, t, o, s, n = (
|
1152
1152
|
/*$_*/
|
1153
1153
|
i[28]("liveness.error.faceQualityInsufficient") + ""
|
@@ -1156,11 +1156,11 @@ function yo(i) {
|
|
1156
1156
|
i[29].unconformities
|
1157
1157
|
), c = [];
|
1158
1158
|
for (let u = 0; u < l.length; u += 1)
|
1159
|
-
c[u] =
|
1159
|
+
c[u] = Pi(Ti(i, l, u));
|
1160
1160
|
let f = (
|
1161
1161
|
/*evaluatePhoto*/
|
1162
1162
|
i[2] && /*$unconformitiesStore*/
|
1163
|
-
i[29].unconformities.length == 0 &&
|
1163
|
+
i[29].unconformities.length == 0 && Bi(i)
|
1164
1164
|
);
|
1165
1165
|
return {
|
1166
1166
|
c() {
|
@@ -1171,8 +1171,8 @@ function yo(i) {
|
|
1171
1171
|
},
|
1172
1172
|
m(u, g) {
|
1173
1173
|
A(u, e, g);
|
1174
|
-
for (let
|
1175
|
-
c[
|
1174
|
+
for (let _ = 0; _ < c.length; _ += 1)
|
1175
|
+
c[_] && c[_].m(e, null);
|
1176
1176
|
b(e, t), f && f.m(e, null), A(u, o, g), A(u, s, g), b(s, r);
|
1177
1177
|
},
|
1178
1178
|
p(u, g) {
|
@@ -1180,27 +1180,27 @@ function yo(i) {
|
|
1180
1180
|
536870912) {
|
1181
1181
|
l = /*$unconformitiesStore*/
|
1182
1182
|
u[29].unconformities;
|
1183
|
-
let
|
1184
|
-
for (
|
1185
|
-
const d =
|
1186
|
-
c[
|
1183
|
+
let _;
|
1184
|
+
for (_ = 0; _ < l.length; _ += 1) {
|
1185
|
+
const d = Ti(u, l, _);
|
1186
|
+
c[_] ? c[_].p(d, g) : (c[_] = Pi(d), c[_].c(), c[_].m(e, t));
|
1187
1187
|
}
|
1188
|
-
for (;
|
1189
|
-
c[
|
1188
|
+
for (; _ < c.length; _ += 1)
|
1189
|
+
c[_].d(1);
|
1190
1190
|
c.length = l.length;
|
1191
1191
|
}
|
1192
1192
|
/*evaluatePhoto*/
|
1193
1193
|
u[2] && /*$unconformitiesStore*/
|
1194
|
-
u[29].unconformities.length == 0 ? f ? f.p(u, g) : (f =
|
1194
|
+
u[29].unconformities.length == 0 ? f ? f.p(u, g) : (f = Bi(u), f.c(), f.m(e, null)) : f && (f.d(1), f = null), g[0] & /*$_*/
|
1195
1195
|
268435456 && n !== (n = /*$_*/
|
1196
1196
|
u[28]("liveness.error.faceQualityInsufficient") + "") && V(r, n);
|
1197
1197
|
},
|
1198
1198
|
d(u) {
|
1199
|
-
u && L(e),
|
1199
|
+
u && L(e), Mi(c, u), f && f.d(), u && L(o), u && L(s);
|
1200
1200
|
}
|
1201
1201
|
};
|
1202
1202
|
}
|
1203
|
-
function
|
1203
|
+
function Io(i) {
|
1204
1204
|
let e, t = (
|
1205
1205
|
/*$_*/
|
1206
1206
|
i[28]("liveness.error.evaluationError") + ""
|
@@ -1222,7 +1222,7 @@ function To(i) {
|
|
1222
1222
|
}
|
1223
1223
|
};
|
1224
1224
|
}
|
1225
|
-
function
|
1225
|
+
function Lo(i) {
|
1226
1226
|
let e, t = (
|
1227
1227
|
/*$_*/
|
1228
1228
|
i[28]("faceCollector.unableToCompleteRequest") + ""
|
@@ -1244,7 +1244,7 @@ function Oo(i) {
|
|
1244
1244
|
}
|
1245
1245
|
};
|
1246
1246
|
}
|
1247
|
-
function
|
1247
|
+
function Do(i) {
|
1248
1248
|
let e, t = (
|
1249
1249
|
/*$_*/
|
1250
1250
|
i[28]("faceCollector.lowQualityCapture") + ""
|
@@ -1266,7 +1266,7 @@ function ko(i) {
|
|
1266
1266
|
}
|
1267
1267
|
};
|
1268
1268
|
}
|
1269
|
-
function
|
1269
|
+
function Fo(i) {
|
1270
1270
|
let e, t = (
|
1271
1271
|
/*$_*/
|
1272
1272
|
i[28]("liveness.error.error") + ""
|
@@ -1293,7 +1293,7 @@ function Ro(i) {
|
|
1293
1293
|
}
|
1294
1294
|
};
|
1295
1295
|
}
|
1296
|
-
function
|
1296
|
+
function No(i) {
|
1297
1297
|
let e, t = (
|
1298
1298
|
/*$_*/
|
1299
1299
|
i[28]("liveness.error.error") + ""
|
@@ -1303,33 +1303,33 @@ function Ao(i) {
|
|
1303
1303
|
/*livenessError*/
|
1304
1304
|
i[19]
|
1305
1305
|
) + ""
|
1306
|
-
), r
|
1306
|
+
), r;
|
1307
1307
|
return {
|
1308
1308
|
c() {
|
1309
|
-
e = C("h1"), o = B(t), s = B(": "), r = B(n),
|
1309
|
+
e = C("h1"), o = B(t), s = B(": "), r = B(n), h(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1310
1310
|
},
|
1311
|
-
m(
|
1312
|
-
A(
|
1311
|
+
m(l, c) {
|
1312
|
+
A(l, e, c), b(e, o), b(e, s), b(e, r);
|
1313
1313
|
},
|
1314
|
-
p(
|
1315
|
-
|
1314
|
+
p(l, c) {
|
1315
|
+
c[0] & /*$_*/
|
1316
1316
|
268435456 && t !== (t = /*$_*/
|
1317
|
-
|
1317
|
+
l[28]("liveness.error.error") + "") && V(o, t), c[0] & /*$_, livenessError*/
|
1318
1318
|
268959744 && n !== (n = /*$_*/
|
1319
|
-
|
1319
|
+
l[28](
|
1320
1320
|
/*livenessError*/
|
1321
|
-
|
1321
|
+
l[19]
|
1322
1322
|
) + "") && V(r, n);
|
1323
1323
|
},
|
1324
|
-
d(
|
1325
|
-
|
1324
|
+
d(l) {
|
1325
|
+
l && L(e);
|
1326
1326
|
}
|
1327
1327
|
};
|
1328
1328
|
}
|
1329
|
-
function
|
1329
|
+
function Pi(i) {
|
1330
1330
|
let e, t = (
|
1331
1331
|
/*unconformity*/
|
1332
|
-
i[
|
1332
|
+
i[119] + ""
|
1333
1333
|
), o;
|
1334
1334
|
return {
|
1335
1335
|
c() {
|
@@ -1341,14 +1341,14 @@ function Ni(i) {
|
|
1341
1341
|
p(s, n) {
|
1342
1342
|
n[0] & /*$unconformitiesStore*/
|
1343
1343
|
536870912 && t !== (t = /*unconformity*/
|
1344
|
-
s[
|
1344
|
+
s[119] + "") && V(o, t);
|
1345
1345
|
},
|
1346
1346
|
d(s) {
|
1347
1347
|
s && L(e);
|
1348
1348
|
}
|
1349
1349
|
};
|
1350
1350
|
}
|
1351
|
-
function
|
1351
|
+
function Bi(i) {
|
1352
1352
|
let e, t = (
|
1353
1353
|
/*$_*/
|
1354
1354
|
i[28]("faceCollector.noNonconformity") + ""
|
@@ -1370,20 +1370,20 @@ function Si(i) {
|
|
1370
1370
|
}
|
1371
1371
|
};
|
1372
1372
|
}
|
1373
|
-
function
|
1373
|
+
function So(i) {
|
1374
1374
|
let e, t, o, s = H() && /*waitingIdrndCaptureEvent*/
|
1375
1375
|
i[18], n, r = (H() && /*idrndLoading*/
|
1376
1376
|
(i[16] || !/*$ready*/
|
1377
1377
|
i[21]) || !H() && !/*$ready*/
|
1378
1378
|
i[21]) && /*$cameraStatusStore*/
|
1379
|
-
i[20] === j.OK, l, c, f, u, g,
|
1379
|
+
i[20] === j.OK, l, c, f, u, g, _, d = (
|
1380
1380
|
/*$videoStore*/
|
1381
|
-
i[31] &&
|
1382
|
-
), E = s &&
|
1381
|
+
i[31] && ki(i)
|
1382
|
+
), E = s && Ri(i), v = r && Ai(i), p = (
|
1383
1383
|
/*$captured*/
|
1384
|
-
i[23] &&
|
1384
|
+
i[23] && Ii(i)
|
1385
1385
|
);
|
1386
|
-
const R = [
|
1386
|
+
const R = [wo, po], k = [];
|
1387
1387
|
function N(I, M) {
|
1388
1388
|
return (!/*idrndClosed*/
|
1389
1389
|
I[17] || /*$captured*/
|
@@ -1393,395 +1393,401 @@ function Io(i) {
|
|
1393
1393
|
I[20] !== j.OK ? 1 : -1
|
1394
1394
|
);
|
1395
1395
|
}
|
1396
|
-
return ~(f = N(i)) && (u =
|
1396
|
+
return ~(f = N(i)) && (u = k[f] = R[f](i)), {
|
1397
1397
|
c() {
|
1398
|
-
e = C("div"), t = C("div"), d && d.c(), o = W(), E && E.c(), n = W(), v && v.c(), l = W(), p && p.c(), c = W(), u && u.c(), g =
|
1398
|
+
e = C("div"), t = C("div"), d && d.c(), o = W(), E && E.c(), n = W(), v && v.c(), l = W(), p && p.c(), c = W(), u && u.c(), g = ga(), this.c = G, h(t, "class", "relative mx-auto"), h(e, "class", "flex flex-col justify-between");
|
1399
1399
|
},
|
1400
1400
|
m(I, M) {
|
1401
|
-
A(I, e, M), b(e, t), d && d.m(t, null), b(t, o), E && E.m(t, null), b(t, n), v && v.m(t, null), b(t, l), p && p.m(t, null), i[52](e), A(I, c, M), ~f &&
|
1401
|
+
A(I, e, M), b(e, t), d && d.m(t, null), b(t, o), E && E.m(t, null), b(t, n), v && v.m(t, null), b(t, l), p && p.m(t, null), i[52](e), A(I, c, M), ~f && k[f].m(I, M), A(I, g, M), _ = !0;
|
1402
1402
|
},
|
1403
1403
|
p(I, M) {
|
1404
1404
|
/*$videoStore*/
|
1405
1405
|
I[31] ? d ? (d.p(I, M), M[1] & /*$videoStore*/
|
1406
|
-
1 && J(d, 1)) : (d =
|
1406
|
+
1 && J(d, 1)) : (d = ki(I), d.c(), J(d, 1), d.m(t, o)) : d && (lt(), Y(d, 1, 1, () => {
|
1407
1407
|
d = null;
|
1408
1408
|
}), rt()), M[0] & /*waitingIdrndCaptureEvent*/
|
1409
1409
|
262144 && (s = H() && /*waitingIdrndCaptureEvent*/
|
1410
|
-
I[18]), s ? E ? E.p(I, M) : (E =
|
1410
|
+
I[18]), s ? E ? E.p(I, M) : (E = Ri(I), E.c(), E.m(t, n)) : E && (E.d(1), E = null), M[0] & /*idrndLoading, $ready, $cameraStatusStore*/
|
1411
1411
|
3211264 && (r = (H() && /*idrndLoading*/
|
1412
1412
|
(I[16] || !/*$ready*/
|
1413
1413
|
I[21]) || !H() && !/*$ready*/
|
1414
1414
|
I[21]) && /*$cameraStatusStore*/
|
1415
|
-
I[20] === j.OK), r ? v ? v.p(I, M) : (v =
|
1416
|
-
I[23] ? p ? p.p(I, M) : (p =
|
1415
|
+
I[20] === j.OK), r ? v ? v.p(I, M) : (v = Ai(I), v.c(), v.m(t, l)) : v && (v.d(1), v = null), /*$captured*/
|
1416
|
+
I[23] ? p ? p.p(I, M) : (p = Ii(I), p.c(), p.m(t, null)) : p && (p.d(1), p = null);
|
1417
1417
|
let U = f;
|
1418
|
-
f = N(I), f === U ? ~f &&
|
1419
|
-
|
1420
|
-
}), rt()), ~f ? (u =
|
1418
|
+
f = N(I), f === U ? ~f && k[f].p(I, M) : (u && (lt(), Y(k[U], 1, 1, () => {
|
1419
|
+
k[U] = null;
|
1420
|
+
}), rt()), ~f ? (u = k[f], u ? u.p(I, M) : (u = k[f] = R[f](I), u.c()), J(u, 1), u.m(g.parentNode, g)) : u = null);
|
1421
1421
|
},
|
1422
1422
|
i(I) {
|
1423
|
-
|
1423
|
+
_ || (J(d), J(u), _ = !0);
|
1424
1424
|
},
|
1425
1425
|
o(I) {
|
1426
|
-
|
1426
|
+
Y(d), Y(u), _ = !1;
|
1427
1427
|
},
|
1428
1428
|
d(I) {
|
1429
|
-
I && L(e), d && d.d(), E && E.d(), v && v.d(), p && p.d(), i[52](null), I && L(c), ~f &&
|
1429
|
+
I && L(e), d && d.d(), E && E.d(), v && v.d(), p && p.d(), i[52](null), I && L(c), ~f && k[f].d(I), I && L(g);
|
1430
1430
|
}
|
1431
1431
|
};
|
1432
1432
|
}
|
1433
|
-
let
|
1434
|
-
function
|
1435
|
-
({}).VITE_USE_DEV === "true" ? import("./index-
|
1433
|
+
let Po = 0, Bo = 3e3;
|
1434
|
+
function Wo() {
|
1435
|
+
({}).VITE_USE_DEV === "true" ? import("./index-idlf-detector_39cfdffa_3.1.0-RC03.js") : import("./index-idlf-detector_a819b3c8_3.1.0-RC03.js");
|
1436
1436
|
}
|
1437
|
-
function
|
1437
|
+
function Mo(i, e, t) {
|
1438
1438
|
const o = e.videoWidth / e.videoHeight, s = t.width / t.height;
|
1439
1439
|
let n = 0, r = 0, l = e.videoWidth, c = e.videoHeight;
|
1440
1440
|
o > s ? (l = e.videoHeight * s, n = (e.videoWidth - l) / 2) : o < s && (c = e.videoWidth / s, r = (e.videoHeight - c) / 2), i.drawImage(e, n, r, l, c, 0, 0, t.width, t.height);
|
1441
1441
|
}
|
1442
|
-
function
|
1443
|
-
let o, s, n, r, l, c, f, u, g,
|
1444
|
-
F(i, Lt, (a) => t(73, o = a)), F(i, Ye, (a) => t(75, n = a)), F(i,
|
1445
|
-
let D,
|
1446
|
-
const
|
1447
|
-
F(i,
|
1448
|
-
const
|
1449
|
-
F(i,
|
1450
|
-
let { widgetInstance:
|
1451
|
-
const
|
1442
|
+
function Uo(i, e, t) {
|
1443
|
+
let o, s, n, r, l, c, f, u, g, _, d, E, v, p, R, k, N, I, M, U, O, T, Q, $, re, we, Ae, dt, oe, Kt, ht, mt, _t, qt, zt, Jt;
|
1444
|
+
F(i, Lt, (a) => t(73, o = a)), F(i, Ye, (a) => t(75, n = a)), F(i, X, (a) => t(20, r = a)), F(i, Ge, (a) => t(21, l = a)), F(i, va, (a) => t(76, c = a)), F(i, Ze, (a) => t(77, f = a)), F(i, _e, (a) => t(22, u = a)), F(i, pa, (a) => t(78, g = a)), F(i, Be, (a) => t(23, _ = a)), F(i, di, (a) => t(79, d = a)), F(i, Dt, (a) => t(80, E = a)), F(i, hi, (a) => t(81, v = a)), F(i, wa, (a) => t(82, p = a)), F(i, Ca, (a) => t(83, R = a)), F(i, We, (a) => t(84, k = a)), F(i, Ee, (a) => t(85, N = a)), F(i, Ea, (a) => t(86, I = a)), F(i, Ft, (a) => t(24, M = a)), F(i, Nt, (a) => t(25, U = a)), F(i, fe, (a) => t(26, O = a)), F(i, ie, (a) => t(27, T = a)), F(i, ya, (a) => t(28, Q = a)), F(i, ye, (a) => t(29, $ = a)), F(i, mi, (a) => t(87, we = a)), F(i, xe, (a) => t(88, Ae = a)), F(i, St, (a) => t(89, dt = a)), F(i, Ve, (a) => t(31, oe = a)), F(i, Ta, (a) => t(90, Kt = a)), F(i, $e, (a) => t(91, ht = a)), F(i, _i, (a) => t(92, mt = a)), F(i, bi, (a) => t(93, _t = a)), F(i, ka, (a) => t(32, qt = a)), F(i, Oa, (a) => t(33, zt = a)), F(i, Ra, (a) => t(34, Jt = a));
|
1445
|
+
let D, ae, de, Qt, Xt = !1, Ie = !1, bt = !1, gt = !1, vt = (/* @__PURE__ */ new Date()).getTime(), pt = { width: 1280, height: 720 }, { enableMinutiae: wt } = e, { videoDimensions: Ct } = e, { noTabs: Et } = e, { weightsPath: yt } = e, { evaluatePhoto: he } = e, { showCaptureButton: Tt } = e, { showUnconformities: Yt } = e, { showConfigButton: Gt } = e, { showAutoCaptureButton: kt } = e, { showCameraButton: Zt } = e, { showJustificationField: xt } = e, { minEyeToEyeDist: Le } = e, { videoOverlay: $t } = e, { videoOverlayTransparency: ei } = e;
|
1446
|
+
const je = Ci(!1);
|
1447
|
+
F(i, je, (a) => t(74, s = a));
|
1448
|
+
const ke = Ci("data:image/png;base64");
|
1449
|
+
F(i, ke, (a) => t(30, re = a));
|
1450
|
+
let { widgetInstance: z } = e, De = !1, Ot = !1, He = !0, ce = !0, Fe = !1, ti = 0, ee = "", Rt = 0, Ke = !0, ii = 0;
|
1451
|
+
const qe = Aa.mixin({
|
1452
1452
|
toast: !0,
|
1453
1453
|
position: "bottom-left",
|
1454
1454
|
timer: 13e3,
|
1455
1455
|
timerProgressBar: !0
|
1456
1456
|
});
|
1457
|
-
|
1458
|
-
if (
|
1457
|
+
Ia(async () => {
|
1458
|
+
if (m(xe, Ae = !0, Ae), m(Ge, l = !1, l), oi(), we)
|
1459
1459
|
try {
|
1460
|
-
await
|
1460
|
+
await La(yt), Xt = !0, Qt = await Da();
|
1461
1461
|
} catch {
|
1462
|
-
|
1462
|
+
m(mi, we = !1, we), t(0, Tt = !0);
|
1463
1463
|
}
|
1464
|
-
H() ? (
|
1464
|
+
H() ? (Wo(), ji()) : await Ce(), be() || Ki();
|
1465
1465
|
});
|
1466
1466
|
async function ai() {
|
1467
|
-
const [a, w] = (Ct ?? "")?.replaceAll(" ", "")?.split("x")?.map((
|
1468
|
-
!a || !w || (
|
1469
|
-
|
1470
|
-
|
1467
|
+
const [a, w] = (Ct ?? "")?.replaceAll(" ", "")?.split("x")?.map((y) => y ? parseInt(y) : void 0);
|
1468
|
+
!a || !w || (be() ? (await Qa(), m(
|
1469
|
+
Ve,
|
1470
|
+
oe = {
|
1471
1471
|
videoWidth: window.innerWidth,
|
1472
1472
|
videoHeight: window.innerHeight
|
1473
1473
|
},
|
1474
|
-
|
1475
|
-
)) :
|
1474
|
+
oe
|
1475
|
+
)) : m(Ve, oe = { videoWidth: a, videoHeight: w }, oe));
|
1476
1476
|
}
|
1477
1477
|
function oi() {
|
1478
|
-
|
1478
|
+
m(Ye, n = !1, n), m(Be, _ = !1, _), m(Ze, f = Pt.FRONT_CAMERA, f), kt && m(hi, v = !1, v), m(Ft, M = !1, M), m(ie, T = K.OK, T), m(We, k = "", k), m(ye, $.unconformities = [], $);
|
1479
1479
|
const a = nt(Bt);
|
1480
|
-
a.closedMouth = !1, a.isPersonCloseEnough = !1, a.isPersonTooclose = !0, a.isPersonInFrame = !1, Bt.set(a),
|
1480
|
+
a.closedMouth = !1, a.isPersonCloseEnough = !1, a.isPersonTooclose = !0, a.isPersonInFrame = !1, Bt.set(a), m(Ee, N = "", N);
|
1481
1481
|
}
|
1482
|
-
function
|
1483
|
-
|
1482
|
+
function ji() {
|
1483
|
+
z.addEventListener("open", (a) => {
|
1484
1484
|
const w = a.detail[0].video;
|
1485
|
-
|
1486
|
-
|
1485
|
+
m(
|
1486
|
+
bi,
|
1487
1487
|
_t = {
|
1488
1488
|
width: w.videoWidth,
|
1489
1489
|
height: w.videoHeight
|
1490
1490
|
},
|
1491
1491
|
_t
|
1492
|
-
), t(11, D.srcObject = w.srcObject, D), t(16,
|
1493
|
-
function
|
1494
|
-
|
1492
|
+
), t(11, D.srcObject = w.srcObject, D), t(16, He = !1), Fa(z);
|
1493
|
+
function y() {
|
1494
|
+
ce || Ue(D, y, !0);
|
1495
1495
|
}
|
1496
|
-
|
1497
|
-
}),
|
1498
|
-
console.error(a), a.detail[0].message === "Device in use" ?
|
1499
|
-
}),
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
1520
|
-
}
|
1521
|
-
if (t(18, ye = !1), _(ee, y = K.OK, y), _(Ce, $.isLoading = !0, $), _(Se, m = !0, m), Fe = !1, _(Le, ce = P[0], ce), _(me, k = P[1], k), _(Pe, T = P[1], T), !Kt) {
|
1522
|
-
let z, se, It, Qe;
|
1496
|
+
y();
|
1497
|
+
}), z.addEventListener("error", (a) => {
|
1498
|
+
console.error(a), a.detail[0].message === "Device in use" ? m(X, r = j.CAMERA_IN_USE_ERROR, r) : a.detail[0].message === "Permission denied" || a.detail[0].message === "Permission dismissed" ? m(X, r = j.CAMERA_DENIED_ERROR, r) : a.detail[0].message === "Requested device not found" && m(X, r = j.DEVICE_NOT_FOUND_ERROR, r), t(16, He = !1);
|
1499
|
+
}), z.addEventListener("faceDetection", (a) => {
|
1500
|
+
a.detail[0].errors.length > 0 && gi(a.detail[0].errors);
|
1501
|
+
}), z.addEventListener("detection", (a) => {
|
1502
|
+
a.detail[0].errors.length > 0 && gi(a.detail[0].errors);
|
1503
|
+
}), z.addEventListener("close", async (a) => {
|
1504
|
+
_ || (De = !1), t(17, ce = !0), t(18, Fe = !1), r === j.OK && m(X, r = j.CAMERA_CLOSED_ERROR, r);
|
1505
|
+
}), z.addEventListener("initialize", async (a) => {
|
1506
|
+
Ot = !0, m(_i, mt = !0, mt);
|
1507
|
+
try {
|
1508
|
+
z.setLicense(Na, "faceDetector");
|
1509
|
+
} catch (w) {
|
1510
|
+
console.error("Error setting license:", w);
|
1511
|
+
}
|
1512
|
+
dt === et.Face && !De && !_ && Ot && await At();
|
1513
|
+
}), z.addEventListener("capture", async (a) => {
|
1514
|
+
t(19, ee = "");
|
1515
|
+
const { encryptedFile: w, photo: y } = a.detail[0];
|
1516
|
+
m($e, ht = w, ht);
|
1517
|
+
const P = (await tt(y)).split(",");
|
1518
|
+
if (t(18, Fe = !1), m(ie, T = K.OK, T), m(ye, $.isLoading = !0, $), m(Be, _ = !0, _), De = !1, m(ke, re = P[0], re), m(fe, O = P[1], O), m(We, k = P[1], k), !Kt) {
|
1519
|
+
let Z, se, It, Xe;
|
1523
1520
|
try {
|
1524
|
-
|
1521
|
+
let te = await Sa(y);
|
1522
|
+
if (!await vi(te))
|
1523
|
+
throw new Error("FACE_NOT_FOUND");
|
1524
|
+
if (!pi(Le))
|
1525
1525
|
throw new Error("FACE_TOO_SMALL");
|
1526
|
-
|
1526
|
+
const ue = Pa();
|
1527
|
+
if (ue)
|
1528
|
+
throw new Error(ue);
|
1529
|
+
({ bodyParts: Z, icaoWarnings: se } = await it(k, he, (await tt(w)).split(",")[1])), window.dispatchEvent(new CustomEvent(
|
1527
1530
|
"face-unconformities-validated",
|
1528
1531
|
{
|
1529
1532
|
detail: {
|
1530
|
-
bodyParts:
|
1533
|
+
bodyParts: Z,
|
1531
1534
|
icaoWarnings: se,
|
1532
|
-
status:
|
1535
|
+
status: T
|
1533
1536
|
}
|
1534
1537
|
}
|
1535
1538
|
));
|
1536
|
-
} catch (
|
1537
|
-
console.error(
|
1538
|
-
let
|
1539
|
-
|
1539
|
+
} catch (te) {
|
1540
|
+
console.error(te);
|
1541
|
+
let ue = Te.UNKNOWN, Se = [], fi = [];
|
1542
|
+
te instanceof Wt && te.response?.status === 400 ? te.response.data && Array.isArray(te.response.data.bodyParts) ? (Se = te.response.data.bodyParts, fi = te.response.data.icaoWarnings, It = te.response.data.invalidLivenessCounter, Xe = te.response.data.invalidLivenessLimit, ue = Se.find((ba) => ba.livenessResult.error)?.livenessResult.error_code, m(ie, T = K.LIVENESS_DETECTION_FAILURE, T), t(19, ee = Te[ue]), console.error("Liveness error:", ue)) : m(ie, T = K.TEMPLATE_EXTRACTION_ERROR, T) : te instanceof Error && Ba.includes(te.message) ? (m(ie, T = K.UNKNOWN_LIVENESS_ERROR, T), ue = te.message, t(19, ee = Te[ue]), Se = ri(), Se[0].livenessResult = {
|
1543
|
+
error: ee,
|
1544
|
+
error_code: ue
|
1545
|
+
}) : he && qe.fire({
|
1540
1546
|
icon: "error",
|
1541
1547
|
title: "Falha ao comunicar com serviço de Liveness"
|
1542
|
-
}),
|
1548
|
+
}), m(ye, $.isLoading = !1, $), window.dispatchEvent(new CustomEvent(
|
1543
1549
|
"face-unconformities-validated",
|
1544
1550
|
{
|
1545
1551
|
detail: {
|
1546
|
-
bodyParts:
|
1547
|
-
errorCode:
|
1548
|
-
translatedError: Q(
|
1549
|
-
status:
|
1550
|
-
icaoWarnings:
|
1552
|
+
bodyParts: Se,
|
1553
|
+
errorCode: ue,
|
1554
|
+
translatedError: Q(ee),
|
1555
|
+
status: T,
|
1556
|
+
icaoWarnings: fi,
|
1551
1557
|
invalidLivenessCounter: It,
|
1552
|
-
invalidLivenessLimit:
|
1558
|
+
invalidLivenessLimit: Xe
|
1553
1559
|
}
|
1554
1560
|
}
|
1555
1561
|
));
|
1556
1562
|
return;
|
1557
1563
|
}
|
1558
|
-
if (
|
1559
|
-
se &&
|
1564
|
+
if (T !== K.OK) {
|
1565
|
+
se && Me(se), m(ye, $.isLoading = !1, $);
|
1560
1566
|
return;
|
1561
1567
|
}
|
1562
|
-
|
1568
|
+
Z[0].livenessResult && ni(Z[0].livenessResult), Z.length !== 0 && Z[0].data && m(fe, O = Z[0].data, O), Me(se);
|
1563
1569
|
return;
|
1564
1570
|
}
|
1565
|
-
let S,
|
1571
|
+
let S, x;
|
1566
1572
|
try {
|
1567
|
-
|
1568
|
-
} catch (
|
1569
|
-
|
1573
|
+
x = await Wa(w), ni(x.data);
|
1574
|
+
} catch (Z) {
|
1575
|
+
m(ie, T = K.UNKNOWN_LIVENESS_ERROR, T), console.error(Z), Z instanceof Wt && Z.response?.status === 400 ? (S = Z.response.data.error_code, t(19, ee = Te[S]), console.error("Liveness error:", S), m(ie, T = K.LIVENESS_DETECTION_FAILURE, T)) : qe.fire({
|
1570
1576
|
icon: "error",
|
1571
1577
|
title: "Falha ao comunicar com serviço de Liveness"
|
1572
1578
|
});
|
1573
1579
|
}
|
1574
|
-
if (
|
1575
|
-
|
1580
|
+
if (T !== K.OK) {
|
1581
|
+
m(ye, $.isLoading = !1, $), window.dispatchEvent(new CustomEvent(
|
1576
1582
|
"face-unconformities-validated",
|
1577
1583
|
{
|
1578
1584
|
detail: {
|
1579
1585
|
bodyParts: [
|
1580
1586
|
{
|
1581
1587
|
bodyPart: "FACE",
|
1582
|
-
data:
|
1588
|
+
data: k,
|
1583
1589
|
livenessBlob: (await tt(w)).split(",")[1],
|
1584
|
-
...
|
1590
|
+
...x && { livenessResult: x }
|
1585
1591
|
}
|
1586
1592
|
],
|
1587
1593
|
...S && { errorCode: S },
|
1588
|
-
...
|
1589
|
-
status:
|
1594
|
+
...ee && { translatedError: Q(ee) },
|
1595
|
+
status: T
|
1590
1596
|
}
|
1591
1597
|
}
|
1592
1598
|
));
|
1593
1599
|
return;
|
1594
1600
|
}
|
1595
|
-
let { bodyParts:
|
1601
|
+
let { bodyParts: me, icaoWarnings: Ne } = await it(k, he);
|
1596
1602
|
window.dispatchEvent(new CustomEvent(
|
1597
1603
|
"face-unconformities-validated",
|
1598
1604
|
{
|
1599
1605
|
detail: {
|
1600
|
-
bodyParts:
|
1601
|
-
icaoWarnings:
|
1602
|
-
status:
|
1606
|
+
bodyParts: me,
|
1607
|
+
icaoWarnings: Ne,
|
1608
|
+
status: T,
|
1603
1609
|
errorCode: S,
|
1604
|
-
...
|
1610
|
+
...ee && { translatedError: Q(ee) }
|
1605
1611
|
}
|
1606
1612
|
}
|
1607
|
-
)),
|
1613
|
+
)), me[0].data && m(fe, O = me[0].data, O), Me(Ne);
|
1608
1614
|
});
|
1609
1615
|
}
|
1610
|
-
async function
|
1611
|
-
if (!
|
1612
|
-
|
1616
|
+
async function Ce(a) {
|
1617
|
+
if (!Ke) {
|
1618
|
+
m(X, r = j.CAMERA_ORIENTATION_PORTRAIT, r);
|
1613
1619
|
return;
|
1614
1620
|
}
|
1615
|
-
await ai(), H() ? At() : await
|
1621
|
+
await ai(), H() ? At() : await Hi(oe.videoWidth, oe.videoHeight, a);
|
1616
1622
|
}
|
1617
1623
|
async function At() {
|
1618
1624
|
if (H()) {
|
1619
1625
|
if (await ai(), !g[0]?.deviceId) {
|
1620
1626
|
try {
|
1621
|
-
await
|
1627
|
+
await wi(640, 480);
|
1622
1628
|
} catch (a) {
|
1623
|
-
const w = a,
|
1624
|
-
console.error(w.message,
|
1629
|
+
const w = a, y = Re(a) && a.constraint ? a.constraint : "";
|
1630
|
+
console.error(w.message, y), Re(w) && "message" in w && w.message.includes("Requested device not found") && m(X, r = j.DEVICE_NOT_FOUND_ERROR, r);
|
1625
1631
|
}
|
1626
|
-
await Mt(),
|
1632
|
+
await Mt(), m(_e, u = g[0].deviceId, u);
|
1627
1633
|
}
|
1628
|
-
|
1634
|
+
m(X, r = j.OK, r), z && "openCamera" in z && z.openCamera(), De = !0, t(17, ce = !1), t(16, He = !0);
|
1629
1635
|
}
|
1630
1636
|
}
|
1631
|
-
async function
|
1632
|
-
if (
|
1633
|
-
return
|
1637
|
+
async function ze() {
|
1638
|
+
if (we && !Xt)
|
1639
|
+
return Ue(D, ze);
|
1634
1640
|
if (D) {
|
1635
1641
|
if (dt !== et.Face && !Et)
|
1636
|
-
return
|
1637
|
-
|
1642
|
+
return Ue(D, ze);
|
1643
|
+
m(Ge, l = !0, l), m(xe, Ae = !1, Ae), we && (s || m(je, s = !0, s)), Ue(D, ze);
|
1638
1644
|
}
|
1639
1645
|
}
|
1640
1646
|
async function si() {
|
1641
|
-
if (
|
1642
|
-
t(18,
|
1647
|
+
if (m(ie, T = K.OK, T), H()) {
|
1648
|
+
t(18, Fe = !0), z.takePhoto();
|
1643
1649
|
return;
|
1644
1650
|
}
|
1645
1651
|
let a = null;
|
1646
|
-
|
1647
|
-
console.warn("Face capture - face not detected! Resetting capture.");
|
1648
|
-
return;
|
1649
|
-
}
|
1650
|
-
_(Se, m = !0, m);
|
1652
|
+
m(Be, _ = !0, _);
|
1651
1653
|
try {
|
1652
|
-
if (
|
1654
|
+
if (we) {
|
1655
|
+
if (a = await qi(), !await vi(a)) {
|
1656
|
+
const S = await ci();
|
1657
|
+
throw m(ke, re = S[0], re), m(fe, O = S[1], O), new Error("FACE_NOT_FOUND");
|
1658
|
+
}
|
1653
1659
|
const w = a.toDataURL("image/jpeg").split(",");
|
1654
|
-
|
1655
|
-
let
|
1656
|
-
if (!
|
1660
|
+
m(ke, re = w[0], re), m(fe, O = w[1], O), m(We, k = w[1], k);
|
1661
|
+
let y, P;
|
1662
|
+
if (!pi(Le))
|
1657
1663
|
throw new Error("FACE_TOO_SMALL");
|
1658
|
-
({ bodyParts:
|
1664
|
+
({ bodyParts: y, icaoWarnings: P } = await it(O, he)), window.dispatchEvent(new CustomEvent(
|
1659
1665
|
"face-unconformities-validated",
|
1660
1666
|
{
|
1661
1667
|
detail: {
|
1662
|
-
bodyParts:
|
1668
|
+
bodyParts: y,
|
1663
1669
|
icaoWarnings: P,
|
1664
|
-
status:
|
1670
|
+
status: T
|
1665
1671
|
}
|
1666
1672
|
}
|
1667
|
-
)),
|
1673
|
+
)), y.length !== 0 && y[0].data && m(fe, O = y[0].data, O), Me(P);
|
1668
1674
|
} else {
|
1669
|
-
const w =
|
1670
|
-
|
1671
|
-
|
1672
|
-
_(Le, ce = P[0], ce), _(me, k = P[1], k), _(Pe, T = P[1], T);
|
1673
|
-
let { bodyParts: S, icaoWarnings: Y } = await it(k, fe);
|
1675
|
+
const w = await ci();
|
1676
|
+
m(ke, re = w[0], re), m(fe, O = w[1], O), m(We, k = w[1], k);
|
1677
|
+
let { bodyParts: y, icaoWarnings: P } = await it(O, he);
|
1674
1678
|
window.dispatchEvent(new CustomEvent(
|
1675
1679
|
"face-unconformities-validated",
|
1676
1680
|
{
|
1677
1681
|
detail: {
|
1678
|
-
bodyParts:
|
1679
|
-
icaoWarnings:
|
1680
|
-
status:
|
1682
|
+
bodyParts: y,
|
1683
|
+
icaoWarnings: P,
|
1684
|
+
status: T
|
1681
1685
|
}
|
1682
1686
|
}
|
1683
|
-
)),
|
1687
|
+
)), y.length !== 0 && y[0].data && m(fe, O = y[0].data, O), Me(P);
|
1684
1688
|
}
|
1685
1689
|
} catch (w) {
|
1686
1690
|
console.error(w);
|
1687
|
-
let
|
1691
|
+
let y = Te.UNKNOWN, P = [], S = [];
|
1688
1692
|
if (w instanceof Wt && w.response?.status === 400)
|
1689
1693
|
if (w.response.data && Array.isArray(w.response.data.bodyParts)) {
|
1690
1694
|
P = w.response.data.bodyParts, S = w.response.data.icaoWarnings;
|
1691
|
-
const
|
1692
|
-
|
1695
|
+
const x = P.find((me) => me.livenessResult.error);
|
1696
|
+
y = x?.livenessResult.error_code, m(ie, T = K.LIVENESS_DETECTION_FAILURE, T), x?.livenessResult.error_code || m(ie, T = K.UNKNOWN_LIVENESS_ERROR, T), t(19, ee = Te[y]), console.error("Liveness error:", y);
|
1693
1697
|
} else
|
1694
|
-
|
1698
|
+
m(ie, T = K.TEMPLATE_EXTRACTION_ERROR, T);
|
1695
1699
|
else
|
1696
|
-
w instanceof Error && ["FACE_NOT_FOUND", "FACE_TOO_SMALL"].includes(w.message) ? (
|
1700
|
+
w instanceof Error && ["FACE_NOT_FOUND", "FACE_TOO_SMALL"].includes(w.message) ? (m(ie, T = K.LIVENESS_DETECTION_FAILURE, T), y = w.message, t(19, ee = Te[y]), P = ri()) : (m(ie, T = K.UNABLE_TO_COMMUNICATE_WITH_TEMPLATE_EXTRACTION_SERVICE, T), he && qe.fire({
|
1697
1701
|
icon: "error",
|
1698
1702
|
title: "Falha ao comunicar com serviço de Liveness"
|
1699
1703
|
}));
|
1700
|
-
|
1704
|
+
m(ye, $.isLoading = !1, $), window.dispatchEvent(new CustomEvent(
|
1701
1705
|
"face-unconformities-validated",
|
1702
1706
|
{
|
1703
1707
|
detail: {
|
1704
1708
|
bodyParts: P,
|
1705
|
-
errorCode:
|
1706
|
-
translatedError: Q(
|
1707
|
-
status:
|
1709
|
+
errorCode: y,
|
1710
|
+
translatedError: Q(ee),
|
1711
|
+
status: T,
|
1708
1712
|
icaoWarnings: S
|
1709
1713
|
}
|
1710
1714
|
}
|
1711
1715
|
));
|
1712
1716
|
}
|
1713
1717
|
}
|
1714
|
-
function
|
1718
|
+
function Je() {
|
1715
1719
|
const a = {
|
1716
1720
|
bodyPart: "FACE",
|
1717
|
-
data:
|
1721
|
+
data: O,
|
1718
1722
|
justification: U
|
1719
1723
|
};
|
1720
|
-
|
1724
|
+
m(Ft, M = !0, M), nt($e) && tt(nt($e)).then((w) => {
|
1721
1725
|
a.livenessBlob = w.split(",")[1];
|
1722
1726
|
}), window.dispatchEvent(new CustomEvent("export-face", { detail: a }));
|
1723
1727
|
}
|
1724
|
-
function
|
1725
|
-
window.dispatchEvent(new CustomEvent("face-scrapped")), oi(),
|
1728
|
+
function Oe() {
|
1729
|
+
window.dispatchEvent(new CustomEvent("face-scrapped")), oi(), ce && At();
|
1726
1730
|
}
|
1727
1731
|
function ni(a) {
|
1728
|
-
let w = "",
|
1729
|
-
a.isAlive ? w = `Vivacidade de face (${a.face_liveness.probability.toFixed(2)}) e de captura (${a.capture_liveness.probability}, ${a.capture_liveness.score.toFixed(2)}) verificados!` : a?.face_liveness?.probability && (
|
1732
|
+
let w = "", y = "success";
|
1733
|
+
a.isAlive ? w = `Vivacidade de face (${a.face_liveness.probability.toFixed(2)}) e de captura (${a.capture_liveness.probability}, ${a.capture_liveness.score.toFixed(2)}) verificados!` : a?.face_liveness?.probability && (y = "error", w = `Vivacidade de face (${a.face_liveness.probability.toFixed(2)}) e de captura (${a.capture_liveness.probability}, ${a.capture_liveness.score.toFixed(2)}) insuficientes!`), I && qe.fire({ icon: y, title: w });
|
1730
1734
|
}
|
1731
|
-
async function
|
1735
|
+
async function Hi(a, w, y) {
|
1732
1736
|
try {
|
1733
|
-
const { stream: P, deviceId: S } = await
|
1734
|
-
|
1737
|
+
const { stream: P, deviceId: S } = await wi(pt.width, pt.height, f, y);
|
1738
|
+
m(di, d = P, d), m(_e, u = S || g[0].deviceId, u);
|
1735
1739
|
} catch (P) {
|
1736
|
-
const S = P,
|
1737
|
-
console.error(S.message,
|
1740
|
+
const S = P, x = Re(P) && P.constraint ? P.constraint : "";
|
1741
|
+
console.error(S.message, x), Re(S) && "message" in S && S.message.includes("Permission denied") && (console.error("User didn't give permission to use camera!"), m(X, r = j.CAMERA_DENIED_ERROR, r)), Re(S) && "message" in S && S.message.includes("Requested device not found") && m(X, r = j.DEVICE_NOT_FOUND_ERROR, r), (x.includes("width") || x.includes("height")) && (console.error(`Camera does not meet the minimum supported requirements! (${x})`), m(X, r = j.CAMERA_UNSUPPORTED, r));
|
1738
1742
|
}
|
1739
1743
|
}
|
1740
|
-
async function
|
1741
|
-
|
1744
|
+
async function Qe() {
|
1745
|
+
m(_e, u = "", u), await Ce();
|
1742
1746
|
}
|
1743
|
-
function
|
1747
|
+
function Ki() {
|
1744
1748
|
navigator.mediaDevices.ondevicechange = async (a) => {
|
1745
|
-
a.type == "devicechange" && (await Mt(), r !== j.OK ? await
|
1749
|
+
a.type == "devicechange" && (await Mt(), r !== j.OK ? await Qe() : (!H() && !d.active || H() && !ce) && (at(z), m(X, r = j.DEVICE_NOT_FOUND_ERROR, r), t(17, ce = !0)));
|
1746
1750
|
};
|
1747
1751
|
}
|
1748
1752
|
async function li() {
|
1749
|
-
|
1753
|
+
m(Ye, n = !1, n);
|
1750
1754
|
const a = (/* @__PURE__ */ new Date()).getTime();
|
1751
1755
|
if (a - vt > 5e3) {
|
1752
1756
|
vt = a;
|
1753
1757
|
try {
|
1754
|
-
|
1755
|
-
|
1756
|
-
|
1758
|
+
if (D.width === 0 || D.height === 0)
|
1759
|
+
return;
|
1760
|
+
const y = await Xa(D);
|
1761
|
+
if (y < 50) {
|
1762
|
+
m(Ee, N = "faceCollector.illuminationTooLow", N);
|
1757
1763
|
return;
|
1758
1764
|
}
|
1759
|
-
if (
|
1760
|
-
|
1765
|
+
if (y > 180) {
|
1766
|
+
m(Ee, N = "faceCollector.illuminationTooHigh", N);
|
1761
1767
|
return;
|
1762
1768
|
}
|
1763
|
-
} catch (
|
1764
|
-
console.warn("An error occurred while getting the video lighting level: ",
|
1769
|
+
} catch (y) {
|
1770
|
+
console.warn("An error occurred while getting the video lighting level: ", y);
|
1765
1771
|
}
|
1766
1772
|
try {
|
1767
|
-
if (await
|
1768
|
-
|
1773
|
+
if (await Ya(D) < 4.5) {
|
1774
|
+
m(Ee, N = "faceCollector.lowSharpness", N);
|
1769
1775
|
return;
|
1770
1776
|
}
|
1771
|
-
} catch (
|
1772
|
-
console.warn("An error occurred while getting the video sharpness level: ",
|
1777
|
+
} catch (y) {
|
1778
|
+
console.warn("An error occurred while getting the video sharpness level: ", y);
|
1773
1779
|
}
|
1774
|
-
|
1780
|
+
m(Ee, N = "faceCollector.faceWasNotFound", N);
|
1775
1781
|
} else
|
1776
1782
|
bt || (bt = !0, setTimeout(
|
1777
1783
|
() => {
|
1778
|
-
let
|
1784
|
+
let y = [
|
1779
1785
|
"faceCollector.faceWasNotFound",
|
1780
1786
|
"faceCollector.illuminationTooLow",
|
1781
1787
|
"faceCollector.lowSharpness",
|
1782
1788
|
"faceCollector.illuminationTooHigh"
|
1783
1789
|
];
|
1784
|
-
bt = !1, t(15, gt = !1), N && !
|
1790
|
+
bt = !1, t(15, gt = !1), N && !y.includes(N) && m(Ee, N = "", N);
|
1785
1791
|
},
|
1786
1792
|
1500
|
1787
1793
|
));
|
@@ -1790,95 +1796,99 @@ function So(i, e, t) {
|
|
1790
1796
|
return [
|
1791
1797
|
{
|
1792
1798
|
bodyPart: "FACE",
|
1793
|
-
data:
|
1799
|
+
data: k,
|
1794
1800
|
format: "jpg",
|
1795
1801
|
capturedEyeToEyeDist: R,
|
1796
|
-
minEyeToEyeDist:
|
1802
|
+
minEyeToEyeDist: Le
|
1797
1803
|
}
|
1798
1804
|
];
|
1799
1805
|
}
|
1800
|
-
async function
|
1801
|
-
const a = D.width, w = D.height,
|
1802
|
-
S.width =
|
1803
|
-
const
|
1804
|
-
x: p.x *
|
1805
|
-
y: p.y *
|
1806
|
-
width: p.width *
|
1807
|
-
height: p.height *
|
1806
|
+
async function qi() {
|
1807
|
+
const a = D.width, w = D.height, y = pt.height, P = w / a * y, S = document.createElement("canvas"), x = S.getContext("2d");
|
1808
|
+
S.width = y, S.height = P;
|
1809
|
+
const me = S.width / D.width, Ne = S.height / D.height, Z = new no({
|
1810
|
+
x: p.x * me,
|
1811
|
+
y: p.y * Ne,
|
1812
|
+
width: p.width * me,
|
1813
|
+
height: p.height * Ne
|
1808
1814
|
}), se = document.createElement("canvas");
|
1809
|
-
se.width =
|
1810
|
-
const [
|
1811
|
-
return
|
1815
|
+
se.width = Z.width, se.height = Z.height, se.getContext("2d")?.clearRect(0, 0, se.width, se.height), x && Mo(x, D, S);
|
1816
|
+
const [Xe] = await (await import("./face_api_0e3ce8c8_3.1.0-RC03.js")).extractFaces(S, [Z]);
|
1817
|
+
return Xe;
|
1818
|
+
}
|
1819
|
+
async function ci() {
|
1820
|
+
const a = document.createElement("canvas"), w = a.getContext("2d");
|
1821
|
+
return a.width = D.width, a.height = D.height, w?.drawImage(D, 0, 0, a.width, a.height), a.toDataURL("image/jpeg").split(",");
|
1812
1822
|
}
|
1813
|
-
const
|
1823
|
+
const zi = Bt.subscribe((a) => {
|
1814
1824
|
let w = "";
|
1815
|
-
if (a.isPersonCloseEnough ? a.isPersonTooclose ? w = "faceCollector.moveAwayCamera" : a.isPersonInFrame ? a.closedMouth || (w = "faceCollector.dontOpenMouth") : w = "faceCollector.stayInFrame" : w = "faceCollector.comeCloserCamera", n &&
|
1816
|
-
t(14,
|
1817
|
-
const
|
1825
|
+
if (a.isPersonCloseEnough ? a.isPersonTooclose ? w = "faceCollector.moveAwayCamera" : a.isPersonInFrame ? a.closedMouth || (w = "faceCollector.dontOpenMouth") : w = "faceCollector.stayInFrame" : w = "faceCollector.comeCloserCamera", n && Ma(w), !_ && v && n && !Ie && a.isPersonInFrame && a.closedMouth && !(!a.isPersonCloseEnough || a.isPersonTooclose)) {
|
1826
|
+
t(14, Ie = !0), ii = (/* @__PURE__ */ new Date()).getTime() + Bo;
|
1827
|
+
const y = setInterval(
|
1818
1828
|
async () => {
|
1819
|
-
if (!v ||
|
1820
|
-
t(14,
|
1829
|
+
if (!v || _ || Fe || H() && ce || !a.isPersonCloseEnough || a.isPersonTooclose || !a.closedMouth || !a.isPersonInFrame) {
|
1830
|
+
t(14, Ie = !1), setTimeout(
|
1821
1831
|
() => {
|
1822
1832
|
},
|
1823
1833
|
1500
|
1824
|
-
), clearInterval(
|
1834
|
+
), clearInterval(y);
|
1825
1835
|
return;
|
1826
1836
|
}
|
1827
1837
|
const P = (/* @__PURE__ */ new Date()).getTime();
|
1828
|
-
Math.floor((ii - P) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(
|
1838
|
+
Math.floor((ii - P) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(y), t(14, Ie = !1), si());
|
1829
1839
|
},
|
1830
1840
|
100
|
1831
1841
|
);
|
1832
1842
|
}
|
1833
|
-
}),
|
1834
|
-
|
1835
|
-
}),
|
1836
|
-
D && a && (console.log("setting null in video srcObject"), t(11, D.srcObject = null, D), t(11, D.src = "", D),
|
1843
|
+
}), Ji = Be.subscribe((a) => {
|
1844
|
+
de && (a ? (de.classList.remove("flex"), de.classList.add("hidden")) : (de.classList.add("flex"), de.classList.remove("hidden")));
|
1845
|
+
}), Qi = Dt.subscribe((a) => {
|
1846
|
+
D && a && (console.log("setting null in video srcObject"), t(11, D.srcObject = null, D), t(11, D.src = "", D), m(_e, u = null, u));
|
1837
1847
|
});
|
1838
1848
|
St.subscribe(async (a) => {
|
1839
|
-
a === et.Face && (await Mt(), H() &&
|
1849
|
+
a === et.Face && (await Mt(), H() && m(_e, u = g[0]?.deviceId, u));
|
1840
1850
|
});
|
1841
|
-
const
|
1842
|
-
if (!(!H() && !d || !a || H() &&
|
1851
|
+
const Xi = _e.subscribe(async (a) => {
|
1852
|
+
if (!(!H() && !d || !a || H() && ce))
|
1843
1853
|
try {
|
1844
1854
|
if (H()) {
|
1845
|
-
await at(
|
1855
|
+
await at(z), await Ce();
|
1846
1856
|
return;
|
1847
1857
|
}
|
1848
|
-
t(11, D.srcObject = d, D),
|
1858
|
+
t(11, D.srcObject = d, D), m(Dt, E = !1, E), Ke ? m(X, r = j.OK, r) : m(X, r = j.CAMERA_ORIENTATION_PORTRAIT, r), d.getTracks().forEach((w) => {
|
1849
1859
|
w.readyState === "live" && console.log(`Camera ${w.label} opened successfully!`);
|
1850
|
-
}),
|
1860
|
+
}), m(X, r = j.OK, r), Ua(D);
|
1851
1861
|
} catch (w) {
|
1852
|
-
const
|
1853
|
-
t(17,
|
1862
|
+
const y = w;
|
1863
|
+
t(17, ce = !0), Re(y) && "message" in y && y.message.includes("Requested device not found") && m(X, r = j.DEVICE_NOT_FOUND_ERROR, r);
|
1854
1864
|
}
|
1855
|
-
}),
|
1856
|
-
a === et.Face && H() && !
|
1857
|
-
}),
|
1858
|
-
a &&
|
1859
|
-
}),
|
1865
|
+
}), Yi = St.subscribe(async (a) => {
|
1866
|
+
a === et.Face && H() && !De && !_ && Ot && await Ce();
|
1867
|
+
}), Gi = je.subscribe(async (a) => {
|
1868
|
+
a && ui();
|
1869
|
+
}), Zi = Va.subscribe(async (a) => {
|
1860
1870
|
if (g[0]?.deviceId) {
|
1861
|
-
if (at(), !
|
1862
|
-
const
|
1863
|
-
H() ?
|
1871
|
+
if (at(), !be() || H()) {
|
1872
|
+
const y = (g.findIndex((S) => S.deviceId === u) + 1) % g.length, P = g[y].deviceId;
|
1873
|
+
H() ? m(_e, u = P, u) : await Ce(P);
|
1864
1874
|
return;
|
1865
1875
|
}
|
1866
|
-
a ? (
|
1876
|
+
a ? (m(Ze, f = Pt.REAR_CAMERA, f), await Ce()) : (m(Ze, f = Pt.FRONT_CAMERA, f), await Ce());
|
1867
1877
|
}
|
1868
|
-
}),
|
1869
|
-
!a.isSupported || !
|
1878
|
+
}), xi = ja.subscribe(async (a) => {
|
1879
|
+
!a.isSupported || !be() || c != "FACE" || (Ke = a.orientation.includes("portrait"), Ke ? D && !l ? await Qe() : m(X, r = j.OK, r) : m(X, r = j.CAMERA_ORIENTATION_PORTRAIT, r));
|
1870
1880
|
});
|
1871
|
-
async function
|
1881
|
+
async function ui() {
|
1872
1882
|
let a;
|
1873
1883
|
try {
|
1874
|
-
if (Rt >=
|
1884
|
+
if (Rt >= Po) {
|
1875
1885
|
Rt = 0;
|
1876
1886
|
let w;
|
1877
|
-
if (w =
|
1878
|
-
const
|
1879
|
-
|
1880
|
-
const P =
|
1881
|
-
|
1887
|
+
if (w = ao(D, Qt), a = await w.withFaceLandmarks(), ae.getContext("2d")?.clearRect(0, 0, ae.width, ae.height), a != null) {
|
1888
|
+
const y = oo(ae, D, !0);
|
1889
|
+
Ha(ae, D, y);
|
1890
|
+
const P = so(a, y);
|
1891
|
+
Ka(P) ? (qa(P, ae, wt), m(Ye, n = !0, n), t(15, gt = !0), vt = (/* @__PURE__ */ new Date()).getTime()) : li();
|
1882
1892
|
} else
|
1883
1893
|
li();
|
1884
1894
|
} else
|
@@ -1886,106 +1896,104 @@ function So(i, e, t) {
|
|
1886
1896
|
} catch (w) {
|
1887
1897
|
console.warn(`FaceapiLoop: ${w}`);
|
1888
1898
|
} finally {
|
1889
|
-
s &&
|
1899
|
+
s && Ue(D, ui);
|
1890
1900
|
}
|
1891
1901
|
}
|
1892
1902
|
Lt.subscribe(async (a) => {
|
1893
|
-
a && (
|
1903
|
+
a && (Oe(), m(Lt, o = !1, o));
|
1894
1904
|
});
|
1895
|
-
const
|
1905
|
+
const $i = Ge.subscribe((a) => {
|
1896
1906
|
a && window.dispatchEvent(new CustomEvent("brycc-camera-ready"));
|
1897
|
-
}),
|
1907
|
+
}), ea = xe.subscribe((a) => {
|
1898
1908
|
a && window.dispatchEvent(new CustomEvent("brycc-face-initialized"));
|
1899
1909
|
});
|
1900
|
-
|
1901
|
-
console.log("Destroying face collector"), at(
|
1910
|
+
za(() => {
|
1911
|
+
console.log("Destroying face collector"), at(z), Ji(), zi(), Qi(), Xi(), Yi(), clearInterval(ti), Gi(), Zi(), xi(), $i(), ea(), ti = 0;
|
1902
1912
|
});
|
1903
|
-
function
|
1913
|
+
function ta(a) {
|
1904
1914
|
st[a ? "unshift" : "push"](() => {
|
1905
|
-
|
1915
|
+
z = a, t(1, z);
|
1906
1916
|
});
|
1907
1917
|
}
|
1908
|
-
function
|
1918
|
+
function ia(a) {
|
1909
1919
|
st[a ? "unshift" : "push"](() => {
|
1910
1920
|
D = a, t(11, D);
|
1911
1921
|
});
|
1912
1922
|
}
|
1913
|
-
const
|
1914
|
-
H() || (t(11, D.width =
|
1923
|
+
const aa = () => {
|
1924
|
+
H() || (t(11, D.width = oe.videoWidth, D), t(11, D.height = oe.videoHeight, D), t(12, ae.width = oe.videoWidth, ae), t(12, ae.height = oe.videoHeight, ae));
|
1915
1925
|
};
|
1916
|
-
function
|
1926
|
+
function oa(a) {
|
1917
1927
|
st[a ? "unshift" : "push"](() => {
|
1918
|
-
|
1928
|
+
ae = a, t(12, ae);
|
1919
1929
|
});
|
1920
1930
|
}
|
1921
|
-
const
|
1922
|
-
function
|
1931
|
+
const sa = () => Je(), na = () => Oe();
|
1932
|
+
function la(a) {
|
1923
1933
|
st[a ? "unshift" : "push"](() => {
|
1924
|
-
|
1934
|
+
de = a, t(13, de);
|
1925
1935
|
});
|
1926
1936
|
}
|
1927
|
-
const
|
1928
|
-
function
|
1937
|
+
const ra = () => Je(), ca = () => Oe();
|
1938
|
+
function ua() {
|
1929
1939
|
U = this.value, Nt.set(U);
|
1930
1940
|
}
|
1931
|
-
const
|
1932
|
-
function
|
1941
|
+
const fa = () => Je(), da = () => Oe();
|
1942
|
+
function ha() {
|
1933
1943
|
U = this.value, Nt.set(U);
|
1934
1944
|
}
|
1935
|
-
const
|
1936
|
-
await
|
1945
|
+
const ma = () => Oe(), _a = async () => {
|
1946
|
+
await Qe();
|
1937
1947
|
};
|
1938
1948
|
return i.$$set = (a) => {
|
1939
|
-
"enableMinutiae" in a && t(41, wt = a.enableMinutiae), "videoDimensions" in a && t(42, Ct = a.videoDimensions), "noTabs" in a && t(43, Et = a.noTabs), "weightsPath" in a && t(44, yt = a.weightsPath), "evaluatePhoto" in a && t(2,
|
1949
|
+
"enableMinutiae" in a && t(41, wt = a.enableMinutiae), "videoDimensions" in a && t(42, Ct = a.videoDimensions), "noTabs" in a && t(43, Et = a.noTabs), "weightsPath" in a && t(44, yt = a.weightsPath), "evaluatePhoto" in a && t(2, he = a.evaluatePhoto), "showCaptureButton" in a && t(0, Tt = a.showCaptureButton), "showUnconformities" in a && t(3, Yt = a.showUnconformities), "showConfigButton" in a && t(4, Gt = a.showConfigButton), "showAutoCaptureButton" in a && t(5, kt = a.showAutoCaptureButton), "showCameraButton" in a && t(6, Zt = a.showCameraButton), "showJustificationField" in a && t(7, xt = a.showJustificationField), "minEyeToEyeDist" in a && t(45, Le = a.minEyeToEyeDist), "videoOverlay" in a && t(8, $t = a.videoOverlay), "videoOverlayTransparency" in a && t(9, ei = a.videoOverlayTransparency), "widgetInstance" in a && t(1, z = a.widgetInstance);
|
1940
1950
|
}, [
|
1941
1951
|
Tt,
|
1942
|
-
|
1943
|
-
|
1952
|
+
z,
|
1953
|
+
he,
|
1944
1954
|
Yt,
|
1945
1955
|
Gt,
|
1946
|
-
|
1956
|
+
kt,
|
1947
1957
|
Zt,
|
1948
1958
|
xt,
|
1949
1959
|
$t,
|
1950
1960
|
ei,
|
1951
|
-
|
1961
|
+
ze,
|
1952
1962
|
D,
|
1953
|
-
|
1954
|
-
|
1955
|
-
|
1963
|
+
ae,
|
1964
|
+
de,
|
1965
|
+
Ie,
|
1956
1966
|
gt,
|
1957
|
-
|
1958
|
-
|
1959
|
-
|
1960
|
-
|
1967
|
+
He,
|
1968
|
+
ce,
|
1969
|
+
Fe,
|
1970
|
+
ee,
|
1961
1971
|
r,
|
1962
1972
|
l,
|
1963
1973
|
u,
|
1964
|
-
|
1974
|
+
_,
|
1965
1975
|
M,
|
1966
1976
|
U,
|
1967
|
-
|
1968
|
-
|
1977
|
+
O,
|
1978
|
+
T,
|
1969
1979
|
Q,
|
1970
1980
|
$,
|
1971
|
-
|
1972
|
-
|
1981
|
+
re,
|
1982
|
+
oe,
|
1973
1983
|
qt,
|
1974
1984
|
zt,
|
1975
1985
|
Jt,
|
1976
|
-
|
1977
|
-
|
1986
|
+
je,
|
1987
|
+
ke,
|
1978
1988
|
si,
|
1979
|
-
ze,
|
1980
|
-
Te,
|
1981
1989
|
Je,
|
1990
|
+
Oe,
|
1991
|
+
Qe,
|
1982
1992
|
wt,
|
1983
1993
|
Ct,
|
1984
1994
|
Et,
|
1985
1995
|
yt,
|
1986
|
-
|
1987
|
-
$i,
|
1988
|
-
ea,
|
1996
|
+
Le,
|
1989
1997
|
ta,
|
1990
1998
|
ia,
|
1991
1999
|
aa,
|
@@ -1998,10 +2006,12 @@ function So(i, e, t) {
|
|
1998
2006
|
ua,
|
1999
2007
|
fa,
|
2000
2008
|
da,
|
2001
|
-
ha
|
2009
|
+
ha,
|
2010
|
+
ma,
|
2011
|
+
_a
|
2002
2012
|
];
|
2003
2013
|
}
|
2004
|
-
class
|
2014
|
+
class Vo extends Ut {
|
2005
2015
|
constructor(e) {
|
2006
2016
|
super(), Vt(
|
2007
2017
|
this,
|
@@ -2010,8 +2020,8 @@ class Po extends Ut {
|
|
2010
2020
|
props: Ht(this.attributes),
|
2011
2021
|
customElement: !0
|
2012
2022
|
},
|
2023
|
+
Uo,
|
2013
2024
|
So,
|
2014
|
-
Io,
|
2015
2025
|
jt,
|
2016
2026
|
{
|
2017
2027
|
enableMinutiae: 41,
|
@@ -2149,7 +2159,7 @@ class Po extends Ut {
|
|
2149
2159
|
return this.$$.ctx[10];
|
2150
2160
|
}
|
2151
2161
|
}
|
2152
|
-
customElements.define("face-collector",
|
2162
|
+
customElements.define("face-collector", Vo);
|
2153
2163
|
export {
|
2154
|
-
|
2164
|
+
Vo as default
|
2155
2165
|
};
|