bry-biometric-collector 2.2.19-RC05 → 2.2.19
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/README.md +2 -0
- package/dist/DocumentCollector_db1e89c0_2.2.19.js +1023 -0
- package/dist/FaceCollector_046b1e47_2.2.19.js +2000 -0
- package/dist/TakePictureBtn_77d8280d_2.2.19.js +848 -0
- package/dist/bry-biometric-collector-main.js +2 -3
- package/dist/{en-us_901680c0_2.2.19-RC05.js → en-us_901680c0_2.2.19.js} +0 -1
- package/dist/{es-cl_1fe1aaa9_2.2.19-RC05.js → es-cl_1fe1aaa9_2.2.19.js} +0 -1
- package/dist/face_api_0e3ce8c8_2.2.19.js +36288 -0
- package/dist/fingersApi_d1426701_2.2.19.js +131 -0
- package/dist/index-no-detector_4b302e78_2.2.19.js +10414 -0
- package/dist/index.js +2 -3
- package/dist/main_b20b5c3f_2.2.19.js +23866 -0
- package/dist/{pt-br_bef1149f_2.2.19-RC05.js → pt-br_bef1149f_2.2.19.js} +0 -1
- package/package.json +1 -1
- package/dist/DocumentCollector_ffb1d6e6_2.2.19-RC05.js +0 -1356
- package/dist/FaceCollector_b42a3ef8_2.2.19-RC05.js +0 -2563
- package/dist/TakePictureBtn_dc6e7cc3_2.2.19-RC05.js +0 -1066
- package/dist/face_api_0e3ce8c8_2.2.19-RC05.js +0 -36289
- package/dist/fingersApi_2257fd5d_2.2.19-RC05.js +0 -132
- package/dist/index-no-detector_4b302e78_2.2.19-RC05.js +0 -10415
- package/dist/main_d1b0d385_2.2.19-RC05.js +0 -25658
@@ -0,0 +1,2000 @@
|
|
1
|
+
import { S as Mi, q as Wi, r as Xt, t as Ui, w as L, x as b, y as F, z as te, B as u, C as Re, D as c, E as me, G as U, H as S, I as N, J as lt, $ as Bi, K as d, L as oe, M as K, N as D, O as G, P as He, Q as ee, R as je, T as Mt, U as va, V as mt, W as Ne, X as Ea, Y as Le, Z as Be, _ as Wt, a0 as ni, a1 as Ut, a2 as wa, a3 as oi, a4 as Se, a5 as tt, a6 as re, a7 as Bt, a8 as Kt, a9 as ye, aa as Ca, ab as ka, ac as ya, ad as ri, ae as ht, af as _t, ag as Vt, ah as Ra, ai as bt, aj as ci, ak as ui, al as gt, am as fi, an as Oa, ao as Ta, ap as Ia, aq as Aa, ar as Pa, as as Ht, at as Na, au as H, av as pt, aw as vt, A as jt, ax as it, ay as Et, az as La, aA as di, aB as qt, d as wt, aC as Ct, aD as zt, aE as Sa, aF as Jt, aG as Da, aH as Fa, aI as Ma, aJ as Ke, aK as Wa, aL as mi, aM as Rt, aN as Ua, aO as qe, aP as ze, aQ as Je, aR as st, aS as Qt, aT as hi, aU as _i, j as kt, aV as Ba, aW as Ka, aX as Va, aY as Ve, aZ as at, a_ as Ha, a$ as ja, b0 as bi, b1 as qa, b2 as yt, b3 as za } from "./main_b20b5c3f_2.2.19.js";
|
2
|
+
import { C as j, c as ce, a as Ja, T as Xa, b as Qa } from "./TakePictureBtn_77d8280d_2.2.19.js";
|
3
|
+
function Ga(a) {
|
4
|
+
let e, t, l = (
|
5
|
+
/*$_*/
|
6
|
+
a[0]("buttons.startCapture") + ""
|
7
|
+
), s, n, m;
|
8
|
+
return {
|
9
|
+
c() {
|
10
|
+
e = b("div"), t = b("button"), s = F(l), this.c = te, u(t, "class", Re() ? "ce-dui-btn ce-dui-btn-primary text-base text-xl pb-[2px] absolute z-20 bottom-10" : "ce-dui-btn ce-dui-btn-primary text-base text-xl pb-[2px] absolute z-20 bottom-2"), u(e, "class", "flex justify-center items-center");
|
11
|
+
},
|
12
|
+
m(r, o) {
|
13
|
+
L(r, e, o), c(e, t), c(t, s), n || (m = me(
|
14
|
+
t,
|
15
|
+
"click",
|
16
|
+
/*click_handler*/
|
17
|
+
a[2]
|
18
|
+
), n = !0);
|
19
|
+
},
|
20
|
+
p(r, [o]) {
|
21
|
+
o & /*$_*/
|
22
|
+
1 && l !== (l = /*$_*/
|
23
|
+
r[0]("buttons.startCapture") + "") && U(s, l);
|
24
|
+
},
|
25
|
+
i: te,
|
26
|
+
o: te,
|
27
|
+
d(r) {
|
28
|
+
r && S(e), n = !1, m();
|
29
|
+
}
|
30
|
+
};
|
31
|
+
}
|
32
|
+
function Ya(a, e, t) {
|
33
|
+
let l, s;
|
34
|
+
N(a, lt, (r) => t(3, l = r)), N(a, Bi, (r) => t(0, s = r));
|
35
|
+
function n() {
|
36
|
+
d(lt, l = !0, l);
|
37
|
+
}
|
38
|
+
return [s, n, () => n()];
|
39
|
+
}
|
40
|
+
class Ki extends Mi {
|
41
|
+
constructor(e) {
|
42
|
+
super(), Wi(
|
43
|
+
this,
|
44
|
+
{
|
45
|
+
target: this.shadowRoot,
|
46
|
+
props: Ui(this.attributes),
|
47
|
+
customElement: !0
|
48
|
+
},
|
49
|
+
Ya,
|
50
|
+
Ga,
|
51
|
+
Xt,
|
52
|
+
{},
|
53
|
+
null
|
54
|
+
), e && e.target && L(e.target, this, e.anchor);
|
55
|
+
}
|
56
|
+
}
|
57
|
+
customElements.define("start-auto-capture-btn", Ki);
|
58
|
+
function gi(a, e, t) {
|
59
|
+
const l = a.slice();
|
60
|
+
return l[117] = e[t], l;
|
61
|
+
}
|
62
|
+
function Za(a) {
|
63
|
+
let e;
|
64
|
+
return {
|
65
|
+
c() {
|
66
|
+
e = b("idlive-face-capture"), e.hidden = !0, at(e, "mask_hidden", ""), at(e, "auto_capture_disabled", ""), at(e, "auto_close_disabled", ""), at(
|
67
|
+
e,
|
68
|
+
"device_id",
|
69
|
+
/*$selectedVideoDeviceId*/
|
70
|
+
a[21]
|
71
|
+
);
|
72
|
+
},
|
73
|
+
m(t, l) {
|
74
|
+
L(t, e, l), a[53](e);
|
75
|
+
},
|
76
|
+
p(t, l) {
|
77
|
+
l[0] & /*$selectedVideoDeviceId*/
|
78
|
+
2097152 && at(
|
79
|
+
e,
|
80
|
+
"device_id",
|
81
|
+
/*$selectedVideoDeviceId*/
|
82
|
+
t[21]
|
83
|
+
);
|
84
|
+
},
|
85
|
+
d(t) {
|
86
|
+
t && S(e), a[53](null);
|
87
|
+
}
|
88
|
+
};
|
89
|
+
}
|
90
|
+
function pi(a) {
|
91
|
+
let e, t, l;
|
92
|
+
return {
|
93
|
+
c() {
|
94
|
+
e = b("video"), u(e, "id", "bry-cc-camera-video-tag"), u(e, "class", "absolute -z-10"), e.playsInline = !0, e.muted = !0, e.autoplay = !0;
|
95
|
+
},
|
96
|
+
m(s, n) {
|
97
|
+
L(s, e, n), a[54](e), t || (l = [
|
98
|
+
me(
|
99
|
+
e,
|
100
|
+
"canplay",
|
101
|
+
/*canplay_handler*/
|
102
|
+
a[55]
|
103
|
+
),
|
104
|
+
me(
|
105
|
+
e,
|
106
|
+
"play",
|
107
|
+
/*play*/
|
108
|
+
a[8],
|
109
|
+
{ once: !0 }
|
110
|
+
)
|
111
|
+
], t = !0);
|
112
|
+
},
|
113
|
+
p: te,
|
114
|
+
d(s) {
|
115
|
+
s && S(e), a[54](null), t = !1, Rt(l);
|
116
|
+
}
|
117
|
+
};
|
118
|
+
}
|
119
|
+
function vi(a) {
|
120
|
+
let e, t;
|
121
|
+
return e = new Ua({}), {
|
122
|
+
c() {
|
123
|
+
qe(e.$$.fragment);
|
124
|
+
},
|
125
|
+
m(l, s) {
|
126
|
+
ze(e, l, s), t = !0;
|
127
|
+
},
|
128
|
+
i(l) {
|
129
|
+
t || (G(e.$$.fragment, l), t = !0);
|
130
|
+
},
|
131
|
+
o(l) {
|
132
|
+
ee(e.$$.fragment, l), t = !1;
|
133
|
+
},
|
134
|
+
d(l) {
|
135
|
+
Je(e, l);
|
136
|
+
}
|
137
|
+
};
|
138
|
+
}
|
139
|
+
function Ei(a) {
|
140
|
+
let e, t;
|
141
|
+
return e = new Ja({}), {
|
142
|
+
c() {
|
143
|
+
qe(e.$$.fragment);
|
144
|
+
},
|
145
|
+
m(l, s) {
|
146
|
+
ze(e, l, s), t = !0;
|
147
|
+
},
|
148
|
+
i(l) {
|
149
|
+
t || (G(e.$$.fragment, l), t = !0);
|
150
|
+
},
|
151
|
+
o(l) {
|
152
|
+
ee(e.$$.fragment, l), t = !1;
|
153
|
+
},
|
154
|
+
d(l) {
|
155
|
+
Je(e, l);
|
156
|
+
}
|
157
|
+
};
|
158
|
+
}
|
159
|
+
function wi(a) {
|
160
|
+
let e, t;
|
161
|
+
return e = new Ki({}), {
|
162
|
+
c() {
|
163
|
+
qe(e.$$.fragment);
|
164
|
+
},
|
165
|
+
m(l, s) {
|
166
|
+
ze(e, l, s), t = !0;
|
167
|
+
},
|
168
|
+
i(l) {
|
169
|
+
t || (G(e.$$.fragment, l), t = !0);
|
170
|
+
},
|
171
|
+
o(l) {
|
172
|
+
ee(e.$$.fragment, l), t = !1;
|
173
|
+
},
|
174
|
+
d(l) {
|
175
|
+
Je(e, l);
|
176
|
+
}
|
177
|
+
};
|
178
|
+
}
|
179
|
+
function Ci(a) {
|
180
|
+
let e, t;
|
181
|
+
return e = new Xa({
|
182
|
+
props: {
|
183
|
+
disabled: !/*$faceFound*/
|
184
|
+
a[36] && /*$enableFaceApi*/
|
185
|
+
a[34] || !/*$ready*/
|
186
|
+
a[35] && !/*$enableFaceApi*/
|
187
|
+
a[34],
|
188
|
+
hidden: (
|
189
|
+
/*$cameraStatusStore*/
|
190
|
+
a[20] !== j.OK || K() && /*idrndLoading*/
|
191
|
+
(a[16] || /*idrndClosed*/
|
192
|
+
a[17] || /*waitingIdrndCaptureEvent*/
|
193
|
+
a[18])
|
194
|
+
),
|
195
|
+
handler: (
|
196
|
+
/*capture*/
|
197
|
+
a[42]
|
198
|
+
)
|
199
|
+
}
|
200
|
+
}), {
|
201
|
+
c() {
|
202
|
+
qe(e.$$.fragment);
|
203
|
+
},
|
204
|
+
m(l, s) {
|
205
|
+
ze(e, l, s), t = !0;
|
206
|
+
},
|
207
|
+
p(l, s) {
|
208
|
+
const n = {};
|
209
|
+
s[1] & /*$faceFound, $enableFaceApi, $ready*/
|
210
|
+
56 && (n.disabled = !/*$faceFound*/
|
211
|
+
l[36] && /*$enableFaceApi*/
|
212
|
+
l[34] || !/*$ready*/
|
213
|
+
l[35] && !/*$enableFaceApi*/
|
214
|
+
l[34]), s[0] & /*$cameraStatusStore, idrndLoading, idrndClosed, waitingIdrndCaptureEvent*/
|
215
|
+
1507328 && (n.hidden = /*$cameraStatusStore*/
|
216
|
+
l[20] !== j.OK || K() && /*idrndLoading*/
|
217
|
+
(l[16] || /*idrndClosed*/
|
218
|
+
l[17] || /*waitingIdrndCaptureEvent*/
|
219
|
+
l[18])), e.$set(n);
|
220
|
+
},
|
221
|
+
i(l) {
|
222
|
+
t || (G(e.$$.fragment, l), t = !0);
|
223
|
+
},
|
224
|
+
o(l) {
|
225
|
+
ee(e.$$.fragment, l), t = !1;
|
226
|
+
},
|
227
|
+
d(l) {
|
228
|
+
Je(e, l);
|
229
|
+
}
|
230
|
+
};
|
231
|
+
}
|
232
|
+
function ki(a) {
|
233
|
+
let e, t = (
|
234
|
+
/*$_*/
|
235
|
+
a[32]("faceCollector.stayStill") + ""
|
236
|
+
), l;
|
237
|
+
return {
|
238
|
+
c() {
|
239
|
+
e = b("span"), l = F(t), u(e, "class", "absolute left-1/2 -translate-x-1/2 ce-dui-badge ce-dui-badge-lg h-[2em] text-2xl xl:text-base w-[12.1em] " + (Re() ? "top-[10%]" : "top-[3%]"));
|
240
|
+
},
|
241
|
+
m(s, n) {
|
242
|
+
L(s, e, n), c(e, l);
|
243
|
+
},
|
244
|
+
p(s, n) {
|
245
|
+
n[1] & /*$_*/
|
246
|
+
2 && t !== (t = /*$_*/
|
247
|
+
s[32]("faceCollector.stayStill") + "") && U(l, t);
|
248
|
+
},
|
249
|
+
d(s) {
|
250
|
+
s && S(e);
|
251
|
+
}
|
252
|
+
};
|
253
|
+
}
|
254
|
+
function yi(a) {
|
255
|
+
let e, t = (
|
256
|
+
/*$_*/
|
257
|
+
a[32](`${/*$faceValidationAlert*/
|
258
|
+
a[26]}`) + ""
|
259
|
+
), l;
|
260
|
+
return {
|
261
|
+
c() {
|
262
|
+
e = b("span"), l = F(t), u(e, "class", "absolute left-1/2 -translate-x-1/2 ce-dui-badge ce-dui-badge-lg h-[2em] text-2xl xl:text-base w-[12.1em] " + (Re() ? "top-[10%]" : "top-[3%]"));
|
263
|
+
},
|
264
|
+
m(s, n) {
|
265
|
+
L(s, e, n), c(e, l);
|
266
|
+
},
|
267
|
+
p(s, n) {
|
268
|
+
n[0] & /*$faceValidationAlert*/
|
269
|
+
67108864 | n[1] & /*$_*/
|
270
|
+
2 && t !== (t = /*$_*/
|
271
|
+
s[32](`${/*$faceValidationAlert*/
|
272
|
+
s[26]}`) + "") && U(l, t);
|
273
|
+
},
|
274
|
+
d(s) {
|
275
|
+
s && S(e);
|
276
|
+
}
|
277
|
+
};
|
278
|
+
}
|
279
|
+
function Ri(a) {
|
280
|
+
let e, t, l, s, n;
|
281
|
+
function m(f, h) {
|
282
|
+
return (
|
283
|
+
/*$isLoading*/
|
284
|
+
f[37] ? $a : xa
|
285
|
+
);
|
286
|
+
}
|
287
|
+
let r = m(a), o = r(a);
|
288
|
+
return {
|
289
|
+
c() {
|
290
|
+
e = b("slot"), t = b("div"), l = b("img"), n = D(), o.c(), st(l.src, s = Qt) || u(l, "src", s), u(l, "alt", "loading gif"), u(l, "class", "m-auto h-[10em] lg:h-[12em]"), u(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), u(e, "name", "loading-camera-gif"), u(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
|
291
|
+
},
|
292
|
+
m(f, h) {
|
293
|
+
L(f, e, h), c(e, t), c(t, l), c(t, n), o.m(t, null);
|
294
|
+
},
|
295
|
+
p(f, h) {
|
296
|
+
r === (r = m(f)) && o ? o.p(f, h) : (o.d(1), o = r(f), o && (o.c(), o.m(t, null)));
|
297
|
+
},
|
298
|
+
d(f) {
|
299
|
+
f && S(e), o.d();
|
300
|
+
}
|
301
|
+
};
|
302
|
+
}
|
303
|
+
function xa(a) {
|
304
|
+
let e, t = (
|
305
|
+
/*$_*/
|
306
|
+
a[32]("faceCollector.initiatingCamera") + ""
|
307
|
+
), l;
|
308
|
+
return {
|
309
|
+
c() {
|
310
|
+
e = b("span"), l = F(t), u(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
311
|
+
},
|
312
|
+
m(s, n) {
|
313
|
+
L(s, e, n), c(e, l);
|
314
|
+
},
|
315
|
+
p(s, n) {
|
316
|
+
n[1] & /*$_*/
|
317
|
+
2 && t !== (t = /*$_*/
|
318
|
+
s[32]("faceCollector.initiatingCamera") + "") && U(l, t);
|
319
|
+
},
|
320
|
+
d(s) {
|
321
|
+
s && S(e);
|
322
|
+
}
|
323
|
+
};
|
324
|
+
}
|
325
|
+
function $a(a) {
|
326
|
+
let e;
|
327
|
+
return {
|
328
|
+
c() {
|
329
|
+
e = b("span"), e.textContent = "Loading camera...", u(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
330
|
+
},
|
331
|
+
m(t, l) {
|
332
|
+
L(t, e, l);
|
333
|
+
},
|
334
|
+
p: te,
|
335
|
+
d(t) {
|
336
|
+
t && S(e);
|
337
|
+
}
|
338
|
+
};
|
339
|
+
}
|
340
|
+
function Oi(a) {
|
341
|
+
let e, t, l, s, n;
|
342
|
+
function m(f, h) {
|
343
|
+
return (
|
344
|
+
/*$isLoading*/
|
345
|
+
f[37] ? tl : el
|
346
|
+
);
|
347
|
+
}
|
348
|
+
let r = m(a), o = r(a);
|
349
|
+
return {
|
350
|
+
c() {
|
351
|
+
e = b("slot"), t = b("div"), l = b("img"), n = D(), o.c(), st(l.src, s = Qt) || u(l, "src", s), u(l, "alt", "loading gif"), u(l, "class", "m-auto h-[10em] lg:h-[12em]"), u(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), u(e, "name", "obtaining-photo-gif"), u(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
|
352
|
+
},
|
353
|
+
m(f, h) {
|
354
|
+
L(f, e, h), c(e, t), c(t, l), c(t, n), o.m(t, null);
|
355
|
+
},
|
356
|
+
p(f, h) {
|
357
|
+
r === (r = m(f)) && o ? o.p(f, h) : (o.d(1), o = r(f), o && (o.c(), o.m(t, null)));
|
358
|
+
},
|
359
|
+
d(f) {
|
360
|
+
f && S(e), o.d();
|
361
|
+
}
|
362
|
+
};
|
363
|
+
}
|
364
|
+
function el(a) {
|
365
|
+
let e, t = (
|
366
|
+
/*$_*/
|
367
|
+
a[32]("faceCollector.obtainingPicture") + ""
|
368
|
+
), l;
|
369
|
+
return {
|
370
|
+
c() {
|
371
|
+
e = b("span"), l = F(t), u(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
372
|
+
},
|
373
|
+
m(s, n) {
|
374
|
+
L(s, e, n), c(e, l);
|
375
|
+
},
|
376
|
+
p(s, n) {
|
377
|
+
n[1] & /*$_*/
|
378
|
+
2 && t !== (t = /*$_*/
|
379
|
+
s[32]("faceCollector.obtainingPicture") + "") && U(l, t);
|
380
|
+
},
|
381
|
+
d(s) {
|
382
|
+
s && S(e);
|
383
|
+
}
|
384
|
+
};
|
385
|
+
}
|
386
|
+
function tl(a) {
|
387
|
+
let e;
|
388
|
+
return {
|
389
|
+
c() {
|
390
|
+
e = b("span"), e.textContent = "Obtaining photo...", u(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
391
|
+
},
|
392
|
+
m(t, l) {
|
393
|
+
L(t, e, l);
|
394
|
+
},
|
395
|
+
p: te,
|
396
|
+
d(t) {
|
397
|
+
t && S(e);
|
398
|
+
}
|
399
|
+
};
|
400
|
+
}
|
401
|
+
function Ti(a) {
|
402
|
+
let e, t, l, s, n;
|
403
|
+
function m(f, h) {
|
404
|
+
return (
|
405
|
+
/*$isLoading*/
|
406
|
+
f[37] ? al : il
|
407
|
+
);
|
408
|
+
}
|
409
|
+
let r = m(a), o = r(a);
|
410
|
+
return {
|
411
|
+
c() {
|
412
|
+
e = b("slot"), t = b("div"), l = b("img"), n = D(), o.c(), st(l.src, s = Qt) || u(l, "src", s), u(l, "alt", "loading gif"), u(l, "class", "m-auto h-[10em] lg:h-[12em]"), u(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), u(e, "name", "loading-camera-gif"), u(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
|
413
|
+
},
|
414
|
+
m(f, h) {
|
415
|
+
L(f, e, h), c(e, t), c(t, l), c(t, n), o.m(t, null);
|
416
|
+
},
|
417
|
+
p(f, h) {
|
418
|
+
r === (r = m(f)) && o ? o.p(f, h) : (o.d(1), o = r(f), o && (o.c(), o.m(t, null)));
|
419
|
+
},
|
420
|
+
d(f) {
|
421
|
+
f && S(e), o.d();
|
422
|
+
}
|
423
|
+
};
|
424
|
+
}
|
425
|
+
function il(a) {
|
426
|
+
let e, t = (
|
427
|
+
/*$_*/
|
428
|
+
a[32]("faceCollector.initiatingCamera") + ""
|
429
|
+
), l;
|
430
|
+
return {
|
431
|
+
c() {
|
432
|
+
e = b("span"), l = F(t), u(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
433
|
+
},
|
434
|
+
m(s, n) {
|
435
|
+
L(s, e, n), c(e, l);
|
436
|
+
},
|
437
|
+
p(s, n) {
|
438
|
+
n[1] & /*$_*/
|
439
|
+
2 && t !== (t = /*$_*/
|
440
|
+
s[32]("faceCollector.initiatingCamera") + "") && U(l, t);
|
441
|
+
},
|
442
|
+
d(s) {
|
443
|
+
s && S(e);
|
444
|
+
}
|
445
|
+
};
|
446
|
+
}
|
447
|
+
function al(a) {
|
448
|
+
let e;
|
449
|
+
return {
|
450
|
+
c() {
|
451
|
+
e = b("span"), e.textContent = "Loading camera...", u(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
|
452
|
+
},
|
453
|
+
m(t, l) {
|
454
|
+
L(t, e, l);
|
455
|
+
},
|
456
|
+
p: te,
|
457
|
+
d(t) {
|
458
|
+
t && S(e);
|
459
|
+
}
|
460
|
+
};
|
461
|
+
}
|
462
|
+
function Ii(a) {
|
463
|
+
let e, t, l = (
|
464
|
+
/*$_*/
|
465
|
+
a[32]("faceCollector.finish") + ""
|
466
|
+
), s, n, m, r, o = (
|
467
|
+
/*$_*/
|
468
|
+
a[32]("faceCollector.retakePhoto") + ""
|
469
|
+
), f, h, p;
|
470
|
+
return {
|
471
|
+
c() {
|
472
|
+
e = b("div"), t = b("button"), s = F(l), m = D(), r = b("button"), f = F(o), t.disabled = n = /*$justification*/
|
473
|
+
a[30].length === 0, u(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), u(r, "id", "bry-cc-retake-button"), u(r, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), u(e, "class", "ce-dui-btn-group flex");
|
474
|
+
},
|
475
|
+
m(C, _) {
|
476
|
+
L(C, e, _), c(e, t), c(t, s), c(e, m), c(e, r), c(r, f), h || (p = [
|
477
|
+
me(
|
478
|
+
t,
|
479
|
+
"click",
|
480
|
+
/*click_handler*/
|
481
|
+
a[59]
|
482
|
+
),
|
483
|
+
me(
|
484
|
+
r,
|
485
|
+
"click",
|
486
|
+
/*click_handler_1*/
|
487
|
+
a[60]
|
488
|
+
)
|
489
|
+
], h = !0);
|
490
|
+
},
|
491
|
+
p(C, _) {
|
492
|
+
_[1] & /*$_*/
|
493
|
+
2 && l !== (l = /*$_*/
|
494
|
+
C[32]("faceCollector.finish") + "") && U(s, l), _[0] & /*$justification*/
|
495
|
+
1073741824 && n !== (n = /*$justification*/
|
496
|
+
C[30].length === 0) && (t.disabled = n), _[1] & /*$_*/
|
497
|
+
2 && o !== (o = /*$_*/
|
498
|
+
C[32]("faceCollector.retakePhoto") + "") && U(f, o);
|
499
|
+
},
|
500
|
+
d(C) {
|
501
|
+
C && S(e), h = !1, Rt(p);
|
502
|
+
}
|
503
|
+
};
|
504
|
+
}
|
505
|
+
function ll(a) {
|
506
|
+
let e, t;
|
507
|
+
return e = new Qa({ props: { handler: (
|
508
|
+
/*func*/
|
509
|
+
a[69]
|
510
|
+
) } }), {
|
511
|
+
c() {
|
512
|
+
qe(e.$$.fragment);
|
513
|
+
},
|
514
|
+
m(l, s) {
|
515
|
+
ze(e, l, s), t = !0;
|
516
|
+
},
|
517
|
+
p: te,
|
518
|
+
i(l) {
|
519
|
+
t || (G(e.$$.fragment, l), t = !0);
|
520
|
+
},
|
521
|
+
o(l) {
|
522
|
+
ee(e.$$.fragment, l), t = !1;
|
523
|
+
},
|
524
|
+
d(l) {
|
525
|
+
Je(e, l);
|
526
|
+
}
|
527
|
+
};
|
528
|
+
}
|
529
|
+
function sl(a) {
|
530
|
+
let e, t, l, s, n, m, r, o, f;
|
531
|
+
const h = [
|
532
|
+
ul,
|
533
|
+
cl,
|
534
|
+
rl,
|
535
|
+
ol,
|
536
|
+
nl
|
537
|
+
], p = [];
|
538
|
+
function C(_, k) {
|
539
|
+
return (
|
540
|
+
/*$captured*/
|
541
|
+
_[23] ? (
|
542
|
+
/*$unconformitiesStore*/
|
543
|
+
_[27].isLoading ? 1 : (
|
544
|
+
/*$requestResult*/
|
545
|
+
_[28] !== H.OK ? 2 : (
|
546
|
+
/*$saved*/
|
547
|
+
_[29] ? 4 : 3
|
548
|
+
)
|
549
|
+
)
|
550
|
+
) : 0
|
551
|
+
);
|
552
|
+
}
|
553
|
+
return m = C(a), r = p[m] = h[m](a), {
|
554
|
+
c() {
|
555
|
+
e = b("div"), t = b("img"), n = D(), r.c(), u(t, "class", "m-auto col-start-1 col-end-1 max-h-[23.2em]"), st(t.src, l = /*$dataTypePrefix*/
|
556
|
+
a[33] + "," + /*$image*/
|
557
|
+
a[31]) || u(t, "src", l), t.hidden = s = !/*$captured*/
|
558
|
+
a[23] || !/*$showFaceWhileValidating*/
|
559
|
+
a[38] && /*$unconformitiesStore*/
|
560
|
+
a[27].isLoading, u(t, "alt", ""), u(e, "class", o = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (!/*$showFaceWhileValidating*/
|
561
|
+
a[38] && /*$unconformitiesStore*/
|
562
|
+
a[27].isLoading ? "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible" : "grid m-[1em] overflow-hidden"));
|
563
|
+
},
|
564
|
+
m(_, k) {
|
565
|
+
L(_, e, k), c(e, t), c(e, n), p[m].m(e, null), f = !0;
|
566
|
+
},
|
567
|
+
p(_, k) {
|
568
|
+
(!f || k[1] & /*$dataTypePrefix, $image*/
|
569
|
+
5 && !st(t.src, l = /*$dataTypePrefix*/
|
570
|
+
_[33] + "," + /*$image*/
|
571
|
+
_[31])) && u(t, "src", l), (!f || k[0] & /*$captured, $unconformitiesStore*/
|
572
|
+
142606336 | k[1] & /*$showFaceWhileValidating*/
|
573
|
+
128 && s !== (s = !/*$captured*/
|
574
|
+
_[23] || !/*$showFaceWhileValidating*/
|
575
|
+
_[38] && /*$unconformitiesStore*/
|
576
|
+
_[27].isLoading)) && (t.hidden = s);
|
577
|
+
let v = m;
|
578
|
+
m = C(_), m === v ? p[m].p(_, k) : (He(), ee(p[v], 1, 1, () => {
|
579
|
+
p[v] = null;
|
580
|
+
}), je(), r = p[m], r ? r.p(_, k) : (r = p[m] = h[m](_), r.c()), G(r, 1), r.m(e, null)), (!f || k[0] & /*$unconformitiesStore*/
|
581
|
+
134217728 | k[1] & /*$showFaceWhileValidating*/
|
582
|
+
128 && o !== (o = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (!/*$showFaceWhileValidating*/
|
583
|
+
_[38] && /*$unconformitiesStore*/
|
584
|
+
_[27].isLoading ? "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible" : "grid m-[1em] overflow-hidden"))) && u(e, "class", o);
|
585
|
+
},
|
586
|
+
i(_) {
|
587
|
+
f || (G(r), f = !0);
|
588
|
+
},
|
589
|
+
o(_) {
|
590
|
+
ee(r), f = !1;
|
591
|
+
},
|
592
|
+
d(_) {
|
593
|
+
_ && S(e), p[m].d();
|
594
|
+
}
|
595
|
+
};
|
596
|
+
}
|
597
|
+
function nl(a) {
|
598
|
+
let e, t, l = (
|
599
|
+
/*$_*/
|
600
|
+
a[32]("faceCollector.captured") + ""
|
601
|
+
), s, n, m, r, o, f = (
|
602
|
+
/*$_*/
|
603
|
+
a[32]("faceCollector.retakePhoto") + ""
|
604
|
+
), h, p, C = kt(Ha).faceStrategy !== ja.DISABLED, _, k, v, w = (
|
605
|
+
/*$unconformitiesStore*/
|
606
|
+
a[27].unconformities.length !== 0 && Ai(a)
|
607
|
+
), O = C && fl();
|
608
|
+
return {
|
609
|
+
c() {
|
610
|
+
e = b("div"), t = b("h1"), s = F(l), n = D(), w && w.c(), m = D(), r = b("div"), o = b("button"), h = F(f), p = D(), O && O.c(), u(t, "class", "text-3xl font-bold pb-[1em] transition-opacity"), u(o, "id", "bry-cc-retake-button"), u(o, "class", "ce-dui-btn ce-dui-btn-block flex-shrink text-base"), u(r, "class", "flex flex-row"), bi(r, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
611
|
+
a[39]);
|
612
|
+
},
|
613
|
+
m(P, W) {
|
614
|
+
L(P, e, W), c(e, t), c(t, s), c(e, n), w && w.m(e, null), c(e, m), c(e, r), c(r, o), c(o, h), c(r, p), O && O.m(r, null), _ = !0, k || (v = me(
|
615
|
+
o,
|
616
|
+
"click",
|
617
|
+
/*click_handler_6*/
|
618
|
+
a[68]
|
619
|
+
), k = !0);
|
620
|
+
},
|
621
|
+
p(P, W) {
|
622
|
+
(!_ || W[1] & /*$_*/
|
623
|
+
2) && l !== (l = /*$_*/
|
624
|
+
P[32]("faceCollector.captured") + "") && U(s, l), /*$unconformitiesStore*/
|
625
|
+
P[27].unconformities.length !== 0 ? w ? w.p(P, W) : (w = Ai(P), w.c(), w.m(e, m)) : w && (w.d(1), w = null), (!_ || W[1] & /*$_*/
|
626
|
+
2) && f !== (f = /*$_*/
|
627
|
+
P[32]("faceCollector.retakePhoto") + "") && U(h, f), (!_ || W[1] & /*$exportButtonDisabled*/
|
628
|
+
256) && bi(r, "ce-dui-btn-group", !/*$exportButtonDisabled*/
|
629
|
+
P[39]);
|
630
|
+
},
|
631
|
+
i(P) {
|
632
|
+
_ || (G(O), _ = !0);
|
633
|
+
},
|
634
|
+
o(P) {
|
635
|
+
ee(O), _ = !1;
|
636
|
+
},
|
637
|
+
d(P) {
|
638
|
+
P && S(e), w && w.d(), O && O.d(), k = !1, v();
|
639
|
+
}
|
640
|
+
};
|
641
|
+
}
|
642
|
+
function ol(a) {
|
643
|
+
let e, t, l = (
|
644
|
+
/*evaluatePhoto*/
|
645
|
+
(a[1] ? (
|
646
|
+
/*$_*/
|
647
|
+
a[32]("faceCollector.unconformities")
|
648
|
+
) : (
|
649
|
+
/*$_*/
|
650
|
+
a[32]("faceCollector.previewCapture")
|
651
|
+
)) + ""
|
652
|
+
), s, n, m, r, o, f, h = (
|
653
|
+
/*$unconformitiesStore*/
|
654
|
+
a[27].unconformities
|
655
|
+
), p = [];
|
656
|
+
for (let v = 0; v < h.length; v += 1)
|
657
|
+
p[v] = Pi(gi(a, h, v));
|
658
|
+
let C = (
|
659
|
+
/*evaluatePhoto*/
|
660
|
+
a[1] && /*$unconformitiesStore*/
|
661
|
+
a[27].unconformities.length == 0 && Ni(a)
|
662
|
+
), _ = (
|
663
|
+
/*showJustificationField*/
|
664
|
+
a[7] && Li(a)
|
665
|
+
), k = (
|
666
|
+
/*$captured*/
|
667
|
+
a[23] && Si(a)
|
668
|
+
);
|
669
|
+
return {
|
670
|
+
c() {
|
671
|
+
e = b("div"), t = b("h1"), s = F(l), n = D(), m = b("div");
|
672
|
+
for (let v = 0; v < p.length; v += 1)
|
673
|
+
p[v].c();
|
674
|
+
r = D(), C && C.c(), o = D(), _ && _.c(), f = D(), k && k.c(), u(t, "class", "text-3xl font-bold transition-opacity"), u(m, "class", "flex flex-wrap"), u(e, "class", "flex flex-col justify-between");
|
675
|
+
},
|
676
|
+
m(v, w) {
|
677
|
+
L(v, e, w), c(e, t), c(t, s), c(e, n), c(e, m);
|
678
|
+
for (let O = 0; O < p.length; O += 1)
|
679
|
+
p[O] && p[O].m(m, null);
|
680
|
+
c(m, r), C && C.m(m, null), c(e, o), _ && _.m(e, null), c(e, f), k && k.m(e, null);
|
681
|
+
},
|
682
|
+
p(v, w) {
|
683
|
+
if (w[0] & /*evaluatePhoto*/
|
684
|
+
2 | w[1] & /*$_*/
|
685
|
+
2 && l !== (l = /*evaluatePhoto*/
|
686
|
+
(v[1] ? (
|
687
|
+
/*$_*/
|
688
|
+
v[32]("faceCollector.unconformities")
|
689
|
+
) : (
|
690
|
+
/*$_*/
|
691
|
+
v[32]("faceCollector.previewCapture")
|
692
|
+
)) + "") && U(s, l), w[0] & /*$unconformitiesStore*/
|
693
|
+
134217728) {
|
694
|
+
h = /*$unconformitiesStore*/
|
695
|
+
v[27].unconformities;
|
696
|
+
let O;
|
697
|
+
for (O = 0; O < h.length; O += 1) {
|
698
|
+
const P = gi(v, h, O);
|
699
|
+
p[O] ? p[O].p(P, w) : (p[O] = Pi(P), p[O].c(), p[O].m(m, r));
|
700
|
+
}
|
701
|
+
for (; O < p.length; O += 1)
|
702
|
+
p[O].d(1);
|
703
|
+
p.length = h.length;
|
704
|
+
}
|
705
|
+
/*evaluatePhoto*/
|
706
|
+
v[1] && /*$unconformitiesStore*/
|
707
|
+
v[27].unconformities.length == 0 ? C ? C.p(v, w) : (C = Ni(v), C.c(), C.m(m, null)) : C && (C.d(1), C = null), /*showJustificationField*/
|
708
|
+
v[7] ? _ ? _.p(v, w) : (_ = Li(v), _.c(), _.m(e, f)) : _ && (_.d(1), _ = null), /*$captured*/
|
709
|
+
v[23] ? k ? k.p(v, w) : (k = Si(v), k.c(), k.m(e, null)) : k && (k.d(1), k = null);
|
710
|
+
},
|
711
|
+
i: te,
|
712
|
+
o: te,
|
713
|
+
d(v) {
|
714
|
+
v && S(e), qa(p, v), C && C.d(), _ && _.d(), k && k.d();
|
715
|
+
}
|
716
|
+
};
|
717
|
+
}
|
718
|
+
function rl(a) {
|
719
|
+
let e, t, l, s, n = (
|
720
|
+
/*$_*/
|
721
|
+
a[32]("faceCollector.finish") + ""
|
722
|
+
), m, r, o, f = (
|
723
|
+
/*$_*/
|
724
|
+
a[32]("faceCollector.retakePhoto") + ""
|
725
|
+
), h, p, C;
|
726
|
+
function _(w, O) {
|
727
|
+
return (
|
728
|
+
/*$requestResult*/
|
729
|
+
w[28] === H.LIVENESS_DETECTION_FAILURE || /*$requestResult*/
|
730
|
+
w[28] === H.UNKNOWN_LIVENESS_ERROR ? gl : (
|
731
|
+
/*$requestResult*/
|
732
|
+
w[28] === H.LOW_LIVENESS_SCORE ? bl : (
|
733
|
+
/*$requestResult*/
|
734
|
+
w[28] === H.TEMPLATE_EXTRACTION_ERROR || /*$requestResult*/
|
735
|
+
w[28] === H.UNKNOWN_TEMPLATE_EXTRACTION_ERROR ? _l : (
|
736
|
+
/*$requestResult*/
|
737
|
+
w[28] === H.UNABLE_TO_COMMUNICATE_WITH_TEMPLATE_EXTRACTION_SERVICE ? hl : (
|
738
|
+
/*$requestResult*/
|
739
|
+
w[28] === H.LIVENESS_EVALUATION_ERROR ? ml : dl
|
740
|
+
)
|
741
|
+
)
|
742
|
+
)
|
743
|
+
)
|
744
|
+
);
|
745
|
+
}
|
746
|
+
let k = _(a), v = k(a);
|
747
|
+
return {
|
748
|
+
c() {
|
749
|
+
e = b("div"), v.c(), t = D(), l = b("div"), s = b("button"), m = F(n), r = D(), o = b("button"), h = F(f), s.disabled = !0, u(s, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), u(o, "id", "bry-cc-retake-button"), u(o, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), u(l, "class", "ce-dui-btn-group flex"), u(e, "class", "flex flex-col justify-between");
|
750
|
+
},
|
751
|
+
m(w, O) {
|
752
|
+
L(w, e, O), v.m(e, null), c(e, t), c(e, l), c(l, s), c(s, m), c(l, r), c(l, o), c(o, h), p || (C = [
|
753
|
+
me(
|
754
|
+
s,
|
755
|
+
"click",
|
756
|
+
/*click_handler_2*/
|
757
|
+
a[62]
|
758
|
+
),
|
759
|
+
me(
|
760
|
+
o,
|
761
|
+
"click",
|
762
|
+
/*click_handler_3*/
|
763
|
+
a[63]
|
764
|
+
)
|
765
|
+
], p = !0);
|
766
|
+
},
|
767
|
+
p(w, O) {
|
768
|
+
k === (k = _(w)) && v ? v.p(w, O) : (v.d(1), v = k(w), v && (v.c(), v.m(e, t))), O[1] & /*$_*/
|
769
|
+
2 && n !== (n = /*$_*/
|
770
|
+
w[32]("faceCollector.finish") + "") && U(m, n), O[1] & /*$_*/
|
771
|
+
2 && f !== (f = /*$_*/
|
772
|
+
w[32]("faceCollector.retakePhoto") + "") && U(h, f);
|
773
|
+
},
|
774
|
+
i: te,
|
775
|
+
o: te,
|
776
|
+
d(w) {
|
777
|
+
w && S(e), v.d(), p = !1, Rt(C);
|
778
|
+
}
|
779
|
+
};
|
780
|
+
}
|
781
|
+
function cl(a) {
|
782
|
+
let e, t, l = (
|
783
|
+
/*$_*/
|
784
|
+
a[32]("faceCollector.validating") + ""
|
785
|
+
), s, n, m;
|
786
|
+
return {
|
787
|
+
c() {
|
788
|
+
e = b("div"), t = b("h1"), s = F(l), n = D(), m = b("div"), u(t, "class", "inline-block text-3xl font-bold pb-[1em] transition-opacity"), u(m, "class", "ml-6 inline-block dot-typing"), u(e, "class", "min-w-[200px]");
|
789
|
+
},
|
790
|
+
m(r, o) {
|
791
|
+
L(r, e, o), c(e, t), c(t, s), c(e, n), c(e, m);
|
792
|
+
},
|
793
|
+
p(r, o) {
|
794
|
+
o[1] & /*$_*/
|
795
|
+
2 && l !== (l = /*$_*/
|
796
|
+
r[32]("faceCollector.validating") + "") && U(s, l);
|
797
|
+
},
|
798
|
+
i: te,
|
799
|
+
o: te,
|
800
|
+
d(r) {
|
801
|
+
r && S(e);
|
802
|
+
}
|
803
|
+
};
|
804
|
+
}
|
805
|
+
function ul(a) {
|
806
|
+
let e;
|
807
|
+
return {
|
808
|
+
c() {
|
809
|
+
e = b("div"), u(e, "class", "");
|
810
|
+
},
|
811
|
+
m(t, l) {
|
812
|
+
L(t, e, l);
|
813
|
+
},
|
814
|
+
p: te,
|
815
|
+
i: te,
|
816
|
+
o: te,
|
817
|
+
d(t) {
|
818
|
+
t && S(e);
|
819
|
+
}
|
820
|
+
};
|
821
|
+
}
|
822
|
+
function Ai(a) {
|
823
|
+
let e, t, l = (
|
824
|
+
/*$_*/
|
825
|
+
a[32]("faceCollector.justification") + ""
|
826
|
+
), s, n, m, r, o;
|
827
|
+
return {
|
828
|
+
c() {
|
829
|
+
e = b("label"), t = b("span"), s = F(l), n = D(), m = b("textarea"), u(t, "class", "ce-dui-label-text text-base"), u(e, "class", "ce-dui-label"), u(e, "for", "justification"), u(m, "contenteditable", ""), u(m, "id", "justification"), u(m, "class", "ce-dui-textarea ce-dui-textarea-bordered textarea-ghost h-[6em] w-full text-base");
|
830
|
+
},
|
831
|
+
m(f, h) {
|
832
|
+
L(f, e, h), c(e, t), c(t, s), L(f, n, h), L(f, m, h), yt(
|
833
|
+
m,
|
834
|
+
/*$justification*/
|
835
|
+
a[30]
|
836
|
+
), r || (o = me(
|
837
|
+
m,
|
838
|
+
"input",
|
839
|
+
/*textarea_input_handler_1*/
|
840
|
+
a[67]
|
841
|
+
), r = !0);
|
842
|
+
},
|
843
|
+
p(f, h) {
|
844
|
+
h[1] & /*$_*/
|
845
|
+
2 && l !== (l = /*$_*/
|
846
|
+
f[32]("faceCollector.justification") + "") && U(s, l), h[0] & /*$justification*/
|
847
|
+
1073741824 && yt(
|
848
|
+
m,
|
849
|
+
/*$justification*/
|
850
|
+
f[30]
|
851
|
+
);
|
852
|
+
},
|
853
|
+
d(f) {
|
854
|
+
f && S(e), f && S(n), f && S(m), r = !1, o();
|
855
|
+
}
|
856
|
+
};
|
857
|
+
}
|
858
|
+
function fl(a) {
|
859
|
+
let e, t;
|
860
|
+
return e = new za({
|
861
|
+
props: { cssClass: "ce-dui-btn-block flex-shrink" }
|
862
|
+
}), {
|
863
|
+
c() {
|
864
|
+
qe(e.$$.fragment);
|
865
|
+
},
|
866
|
+
m(l, s) {
|
867
|
+
ze(e, l, s), t = !0;
|
868
|
+
},
|
869
|
+
i(l) {
|
870
|
+
t || (G(e.$$.fragment, l), t = !0);
|
871
|
+
},
|
872
|
+
o(l) {
|
873
|
+
ee(e.$$.fragment, l), t = !1;
|
874
|
+
},
|
875
|
+
d(l) {
|
876
|
+
Je(e, l);
|
877
|
+
}
|
878
|
+
};
|
879
|
+
}
|
880
|
+
function Pi(a) {
|
881
|
+
let e, t = (
|
882
|
+
/*unconformity*/
|
883
|
+
a[117] + ""
|
884
|
+
), l;
|
885
|
+
return {
|
886
|
+
c() {
|
887
|
+
e = b("div"), l = F(t), u(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-error text-xl pb-[.25em] m-[.5em]");
|
888
|
+
},
|
889
|
+
m(s, n) {
|
890
|
+
L(s, e, n), c(e, l);
|
891
|
+
},
|
892
|
+
p(s, n) {
|
893
|
+
n[0] & /*$unconformitiesStore*/
|
894
|
+
134217728 && t !== (t = /*unconformity*/
|
895
|
+
s[117] + "") && U(l, t);
|
896
|
+
},
|
897
|
+
d(s) {
|
898
|
+
s && S(e);
|
899
|
+
}
|
900
|
+
};
|
901
|
+
}
|
902
|
+
function Ni(a) {
|
903
|
+
let e, t = (
|
904
|
+
/*$_*/
|
905
|
+
a[32]("faceCollector.noNonconformity") + ""
|
906
|
+
), l;
|
907
|
+
return {
|
908
|
+
c() {
|
909
|
+
e = b("div"), l = F(t), u(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-info text-xl pb-[.25em] m-[.5em]");
|
910
|
+
},
|
911
|
+
m(s, n) {
|
912
|
+
L(s, e, n), c(e, l);
|
913
|
+
},
|
914
|
+
p(s, n) {
|
915
|
+
n[1] & /*$_*/
|
916
|
+
2 && t !== (t = /*$_*/
|
917
|
+
s[32]("faceCollector.noNonconformity") + "") && U(l, t);
|
918
|
+
},
|
919
|
+
d(s) {
|
920
|
+
s && S(e);
|
921
|
+
}
|
922
|
+
};
|
923
|
+
}
|
924
|
+
function Li(a) {
|
925
|
+
let e, t, l, s = (
|
926
|
+
/*$_*/
|
927
|
+
a[32]("faceCollector.provideAReasonForTheLowQualityCapture") + ""
|
928
|
+
), n, m, r, o, f, h, p, C, _ = (
|
929
|
+
/*$_*/
|
930
|
+
a[32]("faceCollector.thisInformationIsRequired") + ""
|
931
|
+
), k, v, w, O;
|
932
|
+
return {
|
933
|
+
c() {
|
934
|
+
e = b("div"), t = b("label"), l = b("span"), n = F(s), m = D(), r = b("textarea"), f = D(), h = b("label"), p = b("span"), C = F("("), k = F(_), v = F(")"), u(l, "class", "ce-dui-label-text text-base"), u(t, "class", "ce-dui-label"), u(t, "for", "justification"), u(r, "contenteditable", ""), u(r, "id", "justification"), u(r, "class", "ce-dui-textarea ce-dui-textarea-bordered h-[6em] text-base"), u(r, "placeholder", o = /*$_*/
|
935
|
+
a[32]("faceCollector.yourJustification")), u(p, "class", "ce-dui-label-text-alt text-base"), u(h, "class", "ce-dui-label"), u(h, "for", "justification"), u(e, "class", "ce-dui-form-control");
|
936
|
+
},
|
937
|
+
m(P, W) {
|
938
|
+
L(P, e, W), c(e, t), c(t, l), c(l, n), c(e, m), c(e, r), yt(
|
939
|
+
r,
|
940
|
+
/*$justification*/
|
941
|
+
a[30]
|
942
|
+
), c(e, f), c(e, h), c(h, p), c(p, C), c(p, k), c(p, v), w || (O = me(
|
943
|
+
r,
|
944
|
+
"input",
|
945
|
+
/*textarea_input_handler*/
|
946
|
+
a[64]
|
947
|
+
), w = !0);
|
948
|
+
},
|
949
|
+
p(P, W) {
|
950
|
+
W[1] & /*$_*/
|
951
|
+
2 && s !== (s = /*$_*/
|
952
|
+
P[32]("faceCollector.provideAReasonForTheLowQualityCapture") + "") && U(n, s), W[1] & /*$_*/
|
953
|
+
2 && o !== (o = /*$_*/
|
954
|
+
P[32]("faceCollector.yourJustification")) && u(r, "placeholder", o), W[0] & /*$justification*/
|
955
|
+
1073741824 && yt(
|
956
|
+
r,
|
957
|
+
/*$justification*/
|
958
|
+
P[30]
|
959
|
+
), W[1] & /*$_*/
|
960
|
+
2 && _ !== (_ = /*$_*/
|
961
|
+
P[32]("faceCollector.thisInformationIsRequired") + "") && U(k, _);
|
962
|
+
},
|
963
|
+
d(P) {
|
964
|
+
P && S(e), w = !1, O();
|
965
|
+
}
|
966
|
+
};
|
967
|
+
}
|
968
|
+
function Si(a) {
|
969
|
+
let e, t, l = (
|
970
|
+
/*$_*/
|
971
|
+
a[32]("faceCollector.finish") + ""
|
972
|
+
), s, n, m, r, o = (
|
973
|
+
/*$_*/
|
974
|
+
a[32]("faceCollector.retakePhoto") + ""
|
975
|
+
), f, h, p;
|
976
|
+
return {
|
977
|
+
c() {
|
978
|
+
e = b("div"), t = b("button"), s = F(l), m = D(), r = b("button"), f = F(o), t.disabled = n = /*$justification*/
|
979
|
+
a[30].length === 0 && /*showJustificationField*/
|
980
|
+
a[7], u(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink text-base"), u(r, "id", "bry-cc-retake-button"), u(r, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink text-base"), u(e, "class", "ce-dui-btn-group flex");
|
981
|
+
},
|
982
|
+
m(C, _) {
|
983
|
+
L(C, e, _), c(e, t), c(t, s), c(e, m), c(e, r), c(r, f), h || (p = [
|
984
|
+
me(
|
985
|
+
t,
|
986
|
+
"click",
|
987
|
+
/*click_handler_4*/
|
988
|
+
a[65]
|
989
|
+
),
|
990
|
+
me(
|
991
|
+
r,
|
992
|
+
"click",
|
993
|
+
/*click_handler_5*/
|
994
|
+
a[66]
|
995
|
+
)
|
996
|
+
], h = !0);
|
997
|
+
},
|
998
|
+
p(C, _) {
|
999
|
+
_[1] & /*$_*/
|
1000
|
+
2 && l !== (l = /*$_*/
|
1001
|
+
C[32]("faceCollector.finish") + "") && U(s, l), _[0] & /*$justification, showJustificationField*/
|
1002
|
+
1073741952 && n !== (n = /*$justification*/
|
1003
|
+
C[30].length === 0 && /*showJustificationField*/
|
1004
|
+
C[7]) && (t.disabled = n), _[1] & /*$_*/
|
1005
|
+
2 && o !== (o = /*$_*/
|
1006
|
+
C[32]("faceCollector.retakePhoto") + "") && U(f, o);
|
1007
|
+
},
|
1008
|
+
d(C) {
|
1009
|
+
C && S(e), h = !1, Rt(p);
|
1010
|
+
}
|
1011
|
+
};
|
1012
|
+
}
|
1013
|
+
function dl(a) {
|
1014
|
+
let e, t = (
|
1015
|
+
/*$_*/
|
1016
|
+
a[32]("faceCollector.everythingOk") + ""
|
1017
|
+
), l;
|
1018
|
+
return {
|
1019
|
+
c() {
|
1020
|
+
e = b("h1"), l = F(t), u(e, "class", "text-3xl font-bold pb-[1em] transition-opacity");
|
1021
|
+
},
|
1022
|
+
m(s, n) {
|
1023
|
+
L(s, e, n), c(e, l);
|
1024
|
+
},
|
1025
|
+
p(s, n) {
|
1026
|
+
n[1] & /*$_*/
|
1027
|
+
2 && t !== (t = /*$_*/
|
1028
|
+
s[32]("faceCollector.everythingOk") + "") && U(l, t);
|
1029
|
+
},
|
1030
|
+
d(s) {
|
1031
|
+
s && S(e);
|
1032
|
+
}
|
1033
|
+
};
|
1034
|
+
}
|
1035
|
+
function ml(a) {
|
1036
|
+
let e, t = (
|
1037
|
+
/*$_*/
|
1038
|
+
a[32]("liveness.error.evaluationError") + ""
|
1039
|
+
), l;
|
1040
|
+
return {
|
1041
|
+
c() {
|
1042
|
+
e = b("h1"), l = F(t), u(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1043
|
+
},
|
1044
|
+
m(s, n) {
|
1045
|
+
L(s, e, n), c(e, l);
|
1046
|
+
},
|
1047
|
+
p(s, n) {
|
1048
|
+
n[1] & /*$_*/
|
1049
|
+
2 && t !== (t = /*$_*/
|
1050
|
+
s[32]("liveness.error.evaluationError") + "") && U(l, t);
|
1051
|
+
},
|
1052
|
+
d(s) {
|
1053
|
+
s && S(e);
|
1054
|
+
}
|
1055
|
+
};
|
1056
|
+
}
|
1057
|
+
function hl(a) {
|
1058
|
+
let e, t = (
|
1059
|
+
/*$_*/
|
1060
|
+
a[32]("faceCollector.unableToCompleteRequest") + ""
|
1061
|
+
), l;
|
1062
|
+
return {
|
1063
|
+
c() {
|
1064
|
+
e = b("h1"), l = F(t), u(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1065
|
+
},
|
1066
|
+
m(s, n) {
|
1067
|
+
L(s, e, n), c(e, l);
|
1068
|
+
},
|
1069
|
+
p(s, n) {
|
1070
|
+
n[1] & /*$_*/
|
1071
|
+
2 && t !== (t = /*$_*/
|
1072
|
+
s[32]("faceCollector.unableToCompleteRequest") + "") && U(l, t);
|
1073
|
+
},
|
1074
|
+
d(s) {
|
1075
|
+
s && S(e);
|
1076
|
+
}
|
1077
|
+
};
|
1078
|
+
}
|
1079
|
+
function _l(a) {
|
1080
|
+
let e, t = (
|
1081
|
+
/*$_*/
|
1082
|
+
a[32]("faceCollector.lowQualityCapture") + ""
|
1083
|
+
), l;
|
1084
|
+
return {
|
1085
|
+
c() {
|
1086
|
+
e = b("h1"), l = F(t), u(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1087
|
+
},
|
1088
|
+
m(s, n) {
|
1089
|
+
L(s, e, n), c(e, l);
|
1090
|
+
},
|
1091
|
+
p(s, n) {
|
1092
|
+
n[1] & /*$_*/
|
1093
|
+
2 && t !== (t = /*$_*/
|
1094
|
+
s[32]("faceCollector.lowQualityCapture") + "") && U(l, t);
|
1095
|
+
},
|
1096
|
+
d(s) {
|
1097
|
+
s && S(e);
|
1098
|
+
}
|
1099
|
+
};
|
1100
|
+
}
|
1101
|
+
function bl(a) {
|
1102
|
+
let e, t = (
|
1103
|
+
/*$_*/
|
1104
|
+
a[32]("liveness.error.error") + ""
|
1105
|
+
), l, s, n = (
|
1106
|
+
/*$_*/
|
1107
|
+
a[32]("faceCollector.unaliveCapture") + ""
|
1108
|
+
), m;
|
1109
|
+
return {
|
1110
|
+
c() {
|
1111
|
+
e = b("h1"), l = F(t), s = F(": "), m = F(n), u(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1112
|
+
},
|
1113
|
+
m(r, o) {
|
1114
|
+
L(r, e, o), c(e, l), c(e, s), c(e, m);
|
1115
|
+
},
|
1116
|
+
p(r, o) {
|
1117
|
+
o[1] & /*$_*/
|
1118
|
+
2 && t !== (t = /*$_*/
|
1119
|
+
r[32]("liveness.error.error") + "") && U(l, t), o[1] & /*$_*/
|
1120
|
+
2 && n !== (n = /*$_*/
|
1121
|
+
r[32]("faceCollector.unaliveCapture") + "") && U(m, n);
|
1122
|
+
},
|
1123
|
+
d(r) {
|
1124
|
+
r && S(e);
|
1125
|
+
}
|
1126
|
+
};
|
1127
|
+
}
|
1128
|
+
function gl(a) {
|
1129
|
+
let e, t = (
|
1130
|
+
/*$_*/
|
1131
|
+
a[32]("liveness.error.error") + ""
|
1132
|
+
), l, s, n = (
|
1133
|
+
/*$_*/
|
1134
|
+
a[32](
|
1135
|
+
/*livenessError*/
|
1136
|
+
a[19]
|
1137
|
+
) + ""
|
1138
|
+
), m, r;
|
1139
|
+
return {
|
1140
|
+
c() {
|
1141
|
+
e = b("h1"), l = F(t), s = F(": "), m = F(n), r = F("."), u(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
|
1142
|
+
},
|
1143
|
+
m(o, f) {
|
1144
|
+
L(o, e, f), c(e, l), c(e, s), c(e, m), c(e, r);
|
1145
|
+
},
|
1146
|
+
p(o, f) {
|
1147
|
+
f[1] & /*$_*/
|
1148
|
+
2 && t !== (t = /*$_*/
|
1149
|
+
o[32]("liveness.error.error") + "") && U(l, t), f[0] & /*livenessError*/
|
1150
|
+
524288 | f[1] & /*$_*/
|
1151
|
+
2 && n !== (n = /*$_*/
|
1152
|
+
o[32](
|
1153
|
+
/*livenessError*/
|
1154
|
+
o[19]
|
1155
|
+
) + "") && U(m, n);
|
1156
|
+
},
|
1157
|
+
d(o) {
|
1158
|
+
o && S(e);
|
1159
|
+
}
|
1160
|
+
};
|
1161
|
+
}
|
1162
|
+
function pl(a) {
|
1163
|
+
let e, t, l, s, n = K(), m, r = (
|
1164
|
+
/*unique*/
|
1165
|
+
a[13]
|
1166
|
+
), o, f, h, p, C, _, k, v, w, O, P, W, T, he, pe, q = !K() && !/*$ready*/
|
1167
|
+
a[35], ue, fe = K() && /*waitingIdrndCaptureEvent*/
|
1168
|
+
a[18], De, ve = K() && /*idrndLoading*/
|
1169
|
+
a[16] && /*$cameraStatusStore*/
|
1170
|
+
a[20] === j.OK, Oe, Te, Y, Z, we, Ee = n && Za(a), de = pi(a), x = (
|
1171
|
+
/*showConfigButton*/
|
1172
|
+
a[4] && /*$ready*/
|
1173
|
+
a[35] && vi()
|
1174
|
+
), $ = (
|
1175
|
+
/*showCameraButton*/
|
1176
|
+
a[6] && /*$ready*/
|
1177
|
+
a[35] && Ei()
|
1178
|
+
), V = (
|
1179
|
+
/*showAutoCaptureButton*/
|
1180
|
+
a[5] && !/*$automaticCapture*/
|
1181
|
+
a[24] && !/*showCaptureButton*/
|
1182
|
+
a[2] && /*$ready*/
|
1183
|
+
a[35] && wi()
|
1184
|
+
), z = (
|
1185
|
+
/*showCaptureButton*/
|
1186
|
+
a[2] && /*$ready*/
|
1187
|
+
a[35] && Ci(a)
|
1188
|
+
), ie = (
|
1189
|
+
/*isCountingDown*/
|
1190
|
+
a[12] && ki(a)
|
1191
|
+
), ae = (
|
1192
|
+
/*$enableFaceApi*/
|
1193
|
+
a[34] && !/*isCountingDown*/
|
1194
|
+
a[12] && /*$faceFound*/
|
1195
|
+
a[36] && !/*$faceValidated*/
|
1196
|
+
a[25] && /*$faceValidationAlert*/
|
1197
|
+
a[26] && yi(a)
|
1198
|
+
), le = q && Ri(a), R = fe && Oi(a), B = ve && Ti(a), J = (
|
1199
|
+
/*$captured*/
|
1200
|
+
a[23] && Ii(a)
|
1201
|
+
);
|
1202
|
+
const Ce = [sl, ll], _e = [];
|
1203
|
+
function Xe(g, M) {
|
1204
|
+
return (!/*idrndClosed*/
|
1205
|
+
g[17] || /*$captured*/
|
1206
|
+
g[23]) && /*showUnconformities*/
|
1207
|
+
g[3] ? 0 : (
|
1208
|
+
/*$cameraStatusStore*/
|
1209
|
+
g[20] !== j.OK ? 1 : -1
|
1210
|
+
);
|
1211
|
+
}
|
1212
|
+
return ~(Y = Xe(a)) && (Z = _e[Y] = Ce[Y](a)), {
|
1213
|
+
c() {
|
1214
|
+
e = b("div"), t = b("div"), l = b("div"), s = b("div"), Ee && Ee.c(), m = D(), de.c(), o = D(), x && x.c(), f = D(), $ && $.c(), h = D(), V && V.c(), p = D(), z && z.c(), C = D(), _ = b("canvas"), k = D(), v = b("canvas"), w = D(), O = b("canvas"), P = D(), ie && ie.c(), W = D(), ae && ae.c(), pe = D(), le && le.c(), ue = D(), R && R.c(), De = D(), B && B.c(), Oe = D(), J && J.c(), Te = D(), Z && Z.c(), this.c = te, u(_, "id", "bry-ce-displayCanvas"), u(_, "class", "max-w-full -scale-x-100"), u(v, "id", "bry-ce-detectionsCanvas"), u(v, "class", "absolute top-0 left-0 max-w-full -scale-x-100"), u(O, "id", "bry-ce-maskCanvas"), u(O, "class", "absolute top-0 left-0 max-w-full -scale-x-100"), u(s, "class", T = /*$ready*/
|
1215
|
+
a[35] ? "relative" : "relative w-0 h-0"), s.hidden = he = /*$cameraStatusStore*/
|
1216
|
+
a[20] !== j.OK || K() && /*idrndLoading*/
|
1217
|
+
(a[16] || /*idrndClosed*/
|
1218
|
+
a[17] || /*waitingIdrndCaptureEvent*/
|
1219
|
+
a[18]), u(l, "class", "relative mx-auto"), u(t, "class", "flex flex-col justify-between");
|
1220
|
+
},
|
1221
|
+
m(g, M) {
|
1222
|
+
L(g, e, M), c(e, t), c(t, l), c(l, s), Ee && Ee.m(s, null), c(s, m), de.m(s, null), c(s, o), x && x.m(s, null), c(s, f), $ && $.m(s, null), c(s, h), V && V.m(s, null), c(s, p), z && z.m(s, null), c(s, C), c(s, _), a[56](_), c(s, k), c(s, v), a[57](v), c(s, w), c(s, O), a[58](O), c(s, P), ie && ie.m(s, null), c(s, W), ae && ae.m(s, null), c(l, pe), le && le.m(l, null), c(l, ue), R && R.m(l, null), c(l, De), B && B.m(l, null), c(l, Oe), J && J.m(l, null), a[61](t), c(e, Te), ~Y && _e[Y].m(e, null), we = !0;
|
1223
|
+
},
|
1224
|
+
p(g, M) {
|
1225
|
+
n && Ee.p(g, M), M[0] & /*unique*/
|
1226
|
+
8192 && Xt(r, r = /*unique*/
|
1227
|
+
g[13]) ? (de.d(1), de = pi(g), de.c(), de.m(s, o)) : de.p(g, M), /*showConfigButton*/
|
1228
|
+
g[4] && /*$ready*/
|
1229
|
+
g[35] ? x ? M[0] & /*showConfigButton*/
|
1230
|
+
16 | M[1] & /*$ready*/
|
1231
|
+
16 && G(x, 1) : (x = vi(), x.c(), G(x, 1), x.m(s, f)) : x && (He(), ee(x, 1, 1, () => {
|
1232
|
+
x = null;
|
1233
|
+
}), je()), /*showCameraButton*/
|
1234
|
+
g[6] && /*$ready*/
|
1235
|
+
g[35] ? $ ? M[0] & /*showCameraButton*/
|
1236
|
+
64 | M[1] & /*$ready*/
|
1237
|
+
16 && G($, 1) : ($ = Ei(), $.c(), G($, 1), $.m(s, h)) : $ && (He(), ee($, 1, 1, () => {
|
1238
|
+
$ = null;
|
1239
|
+
}), je()), /*showAutoCaptureButton*/
|
1240
|
+
g[5] && !/*$automaticCapture*/
|
1241
|
+
g[24] && !/*showCaptureButton*/
|
1242
|
+
g[2] && /*$ready*/
|
1243
|
+
g[35] ? V ? M[0] & /*showAutoCaptureButton, $automaticCapture, showCaptureButton*/
|
1244
|
+
16777252 | M[1] & /*$ready*/
|
1245
|
+
16 && G(V, 1) : (V = wi(), V.c(), G(V, 1), V.m(s, p)) : V && (He(), ee(V, 1, 1, () => {
|
1246
|
+
V = null;
|
1247
|
+
}), je()), /*showCaptureButton*/
|
1248
|
+
g[2] && /*$ready*/
|
1249
|
+
g[35] ? z ? (z.p(g, M), M[0] & /*showCaptureButton*/
|
1250
|
+
4 | M[1] & /*$ready*/
|
1251
|
+
16 && G(z, 1)) : (z = Ci(g), z.c(), G(z, 1), z.m(s, C)) : z && (He(), ee(z, 1, 1, () => {
|
1252
|
+
z = null;
|
1253
|
+
}), je()), /*isCountingDown*/
|
1254
|
+
g[12] ? ie ? ie.p(g, M) : (ie = ki(g), ie.c(), ie.m(s, W)) : ie && (ie.d(1), ie = null), /*$enableFaceApi*/
|
1255
|
+
g[34] && !/*isCountingDown*/
|
1256
|
+
g[12] && /*$faceFound*/
|
1257
|
+
g[36] && !/*$faceValidated*/
|
1258
|
+
g[25] && /*$faceValidationAlert*/
|
1259
|
+
g[26] ? ae ? ae.p(g, M) : (ae = yi(g), ae.c(), ae.m(s, null)) : ae && (ae.d(1), ae = null), (!we || M[1] & /*$ready*/
|
1260
|
+
16 && T !== (T = /*$ready*/
|
1261
|
+
g[35] ? "relative" : "relative w-0 h-0")) && u(s, "class", T), (!we || M[0] & /*$cameraStatusStore, idrndLoading, idrndClosed, waitingIdrndCaptureEvent*/
|
1262
|
+
1507328 && he !== (he = /*$cameraStatusStore*/
|
1263
|
+
g[20] !== j.OK || K() && /*idrndLoading*/
|
1264
|
+
(g[16] || /*idrndClosed*/
|
1265
|
+
g[17] || /*waitingIdrndCaptureEvent*/
|
1266
|
+
g[18]))) && (s.hidden = he), M[1] & /*$ready*/
|
1267
|
+
16 && (q = !K() && !/*$ready*/
|
1268
|
+
g[35]), q ? le ? le.p(g, M) : (le = Ri(g), le.c(), le.m(l, ue)) : le && (le.d(1), le = null), M[0] & /*waitingIdrndCaptureEvent*/
|
1269
|
+
262144 && (fe = K() && /*waitingIdrndCaptureEvent*/
|
1270
|
+
g[18]), fe ? R ? R.p(g, M) : (R = Oi(g), R.c(), R.m(l, De)) : R && (R.d(1), R = null), M[0] & /*idrndLoading, $cameraStatusStore*/
|
1271
|
+
1114112 && (ve = K() && /*idrndLoading*/
|
1272
|
+
g[16] && /*$cameraStatusStore*/
|
1273
|
+
g[20] === j.OK), ve ? B ? B.p(g, M) : (B = Ti(g), B.c(), B.m(l, Oe)) : B && (B.d(1), B = null), /*$captured*/
|
1274
|
+
g[23] ? J ? J.p(g, M) : (J = Ii(g), J.c(), J.m(l, null)) : J && (J.d(1), J = null);
|
1275
|
+
let Ie = Y;
|
1276
|
+
Y = Xe(g), Y === Ie ? ~Y && _e[Y].p(g, M) : (Z && (He(), ee(_e[Ie], 1, 1, () => {
|
1277
|
+
_e[Ie] = null;
|
1278
|
+
}), je()), ~Y ? (Z = _e[Y], Z ? Z.p(g, M) : (Z = _e[Y] = Ce[Y](g), Z.c()), G(Z, 1), Z.m(e, null)) : Z = null);
|
1279
|
+
},
|
1280
|
+
i(g) {
|
1281
|
+
we || (G(x), G($), G(V), G(z), G(Z), we = !0);
|
1282
|
+
},
|
1283
|
+
o(g) {
|
1284
|
+
ee(x), ee($), ee(V), ee(z), ee(Z), we = !1;
|
1285
|
+
},
|
1286
|
+
d(g) {
|
1287
|
+
g && S(e), Ee && Ee.d(), de.d(g), x && x.d(), $ && $.d(), V && V.d(), z && z.d(), a[56](null), a[57](null), a[58](null), ie && ie.d(), ae && ae.d(), le && le.d(), R && R.d(), B && B.d(), J && J.d(), a[61](null), ~Y && _e[Y].d();
|
1288
|
+
}
|
1289
|
+
};
|
1290
|
+
}
|
1291
|
+
let vl = 5, Di = 3e3;
|
1292
|
+
function Fi(a, e, t) {
|
1293
|
+
const l = e.videoHeight >= e.videoWidth && t.height >= t.width || e.videoHeight < e.videoWidth && t.height < t.width;
|
1294
|
+
a.drawImage(
|
1295
|
+
e,
|
1296
|
+
l ? 0 : e.videoWidth / 2 - t.width,
|
1297
|
+
0,
|
1298
|
+
l ? e.videoWidth : e.videoHeight * (t.width / t.height),
|
1299
|
+
e.videoHeight,
|
1300
|
+
0,
|
1301
|
+
0,
|
1302
|
+
t.width,
|
1303
|
+
t.height
|
1304
|
+
);
|
1305
|
+
}
|
1306
|
+
function El(a, e, t) {
|
1307
|
+
let l, s, n, m, r, o, f, h, p, C, _, k, v, w, O, P, W, T, he, pe, q, ue, fe, De, ve, Oe, Te, Y, Z, we, Ee, de, x, $, V, z, ie, ae, le;
|
1308
|
+
N(a, Mt, (i) => t(78, l = i)), N(a, ce, (i) => t(20, n = i)), N(a, va, (i) => t(80, m = i)), N(a, mt, (i) => t(81, r = i)), N(a, Ne, (i) => t(21, o = i)), N(a, Ea, (i) => t(82, f = i)), N(a, Le, (i) => t(22, h = i)), N(a, Be, (i) => t(23, p = i)), N(a, Wt, (i) => t(83, C = i)), N(a, ni, (i) => t(84, _ = i)), N(a, lt, (i) => t(24, k = i)), N(a, Ut, (i) => t(25, v = i)), N(a, wa, (i) => t(85, w = i)), N(a, oi, (i) => t(26, O = i)), N(a, Se, (i) => t(27, P = i)), N(a, tt, (i) => t(86, W = i)), N(a, re, (i) => t(28, T = i)), N(a, Bt, (i) => t(29, he = i)), N(a, Kt, (i) => t(30, pe = i)), N(a, ye, (i) => t(31, q = i)), N(a, Bi, (i) => t(32, ue = i)), N(a, Ca, (i) => t(87, De = i)), N(a, ka, (i) => t(34, ve = i)), N(a, ya, (i) => t(88, Oe = i)), N(a, ri, (i) => t(89, Te = i)), N(a, ht, (i) => t(90, Y = i)), N(a, _t, (i) => t(35, Z = i)), N(a, Vt, (i) => t(91, we = i)), N(a, Ra, (i) => t(92, Ee = i)), N(a, bt, (i) => t(93, de = i)), N(a, ci, (i) => t(94, x = i)), N(a, ui, (i) => t(95, $ = i)), N(a, gt, (i) => t(96, V = i)), N(a, fi, (i) => t(36, z = i)), N(a, Oa, (i) => t(37, ie = i)), N(a, Ta, (i) => t(38, ae = i)), N(a, Ia, (i) => t(39, le = i));
|
1309
|
+
let R, B, J, Ce = !1, _e = {}, Xe = !1, { enableMinutiae: g } = e, { videoDimensions: M } = e, { noTabs: Ie } = e, { weightsPath: Ot } = e, { evaluatePhoto: ke } = e, { showCaptureButton: Tt } = e, { showUnconformities: Gt } = e, { videoOverlay: nt } = e, { videoOverlayTransparency: Qe } = e, { showConfigButton: Yt } = e, { showAutoCaptureButton: Ge } = e, { showCameraButton: Zt } = e, { showJustificationField: xt } = e, { minEyeToEyeDist: Ye } = e;
|
1310
|
+
const ot = hi(!1);
|
1311
|
+
N(a, ot, (i) => t(79, s = i));
|
1312
|
+
const Ze = hi("data:image/png;base64");
|
1313
|
+
N(a, Ze, (i) => t(33, fe = i));
|
1314
|
+
let { widgetInstance: ne } = e, Ae, X, rt = !1, $t = !1, ct = !0, be = !0, ut = !1, ei = 0, ge = "", It = 0, At = !0, Pt = 0, Nt = !1;
|
1315
|
+
const xe = Aa.mixin({
|
1316
|
+
toast: !0,
|
1317
|
+
position: "bottom-left",
|
1318
|
+
timer: 13e3,
|
1319
|
+
timerProgressBar: !0
|
1320
|
+
});
|
1321
|
+
Pa(async () => {
|
1322
|
+
d(ht, Y = !0, Y), d(_t, Z = !1, Z), d(fi, z = !1, z), d(Be, p = !1, p), d(mt, r = Ht.FRONT_CAMERA, r), d(ce, n = j.OK, n), Ge && d(lt, k = !1, k), K() && (import("./index-no-detector_4b302e78_2.2.19.js"), Vi()), ve && (await Na(Ot), Xe = !0), await Fe(), ji();
|
1323
|
+
});
|
1324
|
+
function Lt(i, E) {
|
1325
|
+
i.clearRect(0, 0, X.width, X.height), i.save(), nt != "none" ? (Qe > 0 && (i.globalAlpha = Qe / 100), i.fillStyle = nt, i.fillRect(0, 0, X.width, X.height)) : (i.beginPath(), i.rect(0, 0, X.width, X.height));
|
1326
|
+
let y = X.height * 0.8;
|
1327
|
+
const I = h.videoWidth / 2;
|
1328
|
+
let A = h.videoHeight * 0.5;
|
1329
|
+
(Ge || Tt) && (A = h.videoHeight * 0.44), Re() && (y = X.height * 0.65, A = h.videoHeight * 0.51);
|
1330
|
+
const Q = y / 1.45;
|
1331
|
+
d(gt, V.width = Q, V), d(gt, V.height = y, V), d(gt, V.y = A, V), i.ellipse(I, A, Q / 2, y / 2, 0, 0, 2 * Math.PI, !0), Qe == 0 && i.clip(), Fi(i, E, X), i.restore(), i.save(), i.beginPath();
|
1332
|
+
const We = window.getComputedStyle(X).getPropertyValue("--p"), Ue = window.getComputedStyle(X).getPropertyValue("--su");
|
1333
|
+
if (i.strokeStyle = `hsl(${We})`, i.lineWidth = 16, i.ellipse(I, A, Q / 2, y / 2, 0, 0, 2 * Math.PI), i.stroke(), Ce && !Nt) {
|
1334
|
+
const et = 1 - (Pt - (/* @__PURE__ */ new Date()).getTime()) / Di;
|
1335
|
+
i.save(), i.beginPath(), i.lineWidth = 16, i.strokeStyle = `hsl(${Ue})`, i.ellipse(I, A, Q / 2, y / 2, 0, 0 - Math.PI / 2, 1.5 * (Math.PI * 2 * et) - Math.PI / 2), i.stroke();
|
1336
|
+
}
|
1337
|
+
i.beginPath();
|
1338
|
+
const se = new Path2D();
|
1339
|
+
se.ellipse(I, A, Q / 2, y / 2, 0, 0, 2 * Math.PI), i.clip(se), Fi(i, E, X), i.restore();
|
1340
|
+
}
|
1341
|
+
function Vi() {
|
1342
|
+
ne.addEventListener("open", (i) => {
|
1343
|
+
const E = i.detail[0].video;
|
1344
|
+
d(
|
1345
|
+
ui,
|
1346
|
+
$ = {
|
1347
|
+
width: E.videoWidth,
|
1348
|
+
height: E.videoHeight
|
1349
|
+
},
|
1350
|
+
$
|
1351
|
+
), t(9, R.srcObject = E.srcObject, R), t(16, ct = !1);
|
1352
|
+
function y() {
|
1353
|
+
be || (Lt(X.getContext("2d"), E), Ke(R, y, !0));
|
1354
|
+
}
|
1355
|
+
y();
|
1356
|
+
}), ne.addEventListener("error", (i) => {
|
1357
|
+
console.error(i), i.detail[0].message === "Device in use" ? d(ce, n = j.CAMERA_IN_USE_ERROR, n) : i.detail[0].message === "Permission denied" || i.detail[0].message === "Permission dismissed" ? d(ce, n = j.CAMERA_DENIED_ERROR, n) : i.detail[0].message === "Requested device not found" && d(ce, n = j.DEVICE_NOT_FOUND_ERROR, n), t(16, ct = !1);
|
1358
|
+
}), ne.addEventListener("faceDetection", (i) => {
|
1359
|
+
}), ne.addEventListener("close", async (i) => {
|
1360
|
+
p || (rt = !1), t(17, be = !0), t(18, ut = !1), n === j.OK && d(ce, n = j.CAMERA_CLOSED_ERROR, n);
|
1361
|
+
}), ne.addEventListener("initialize", async (i) => {
|
1362
|
+
$t = !0, d(ci, x = !0, x);
|
1363
|
+
}), ne.addEventListener("capture", async (i) => {
|
1364
|
+
t(19, ge = "");
|
1365
|
+
const { encryptedFile: E, photo: y } = i.detail[0];
|
1366
|
+
d(bt, de = E, de), t(18, ut = !1), d(re, T = H.OK, T), d(Se, P.isLoading = !0, P), d(Be, p = !0, p), rt = !1;
|
1367
|
+
const I = (await pt(y)).split(",");
|
1368
|
+
if (d(Ze, fe = I[0], fe), d(ye, q = I[1], q), d(tt, W = I[1], W), !Ee) {
|
1369
|
+
let se, et;
|
1370
|
+
try {
|
1371
|
+
({ bodyParts: se, icaoWarnings: et } = await vt(W, ke, (await pt(E)).split(",")[1])), window.dispatchEvent(new CustomEvent(
|
1372
|
+
"face-unconformities-validated",
|
1373
|
+
{
|
1374
|
+
detail: {
|
1375
|
+
bodyParts: se,
|
1376
|
+
icaoWarnings: et,
|
1377
|
+
status: T
|
1378
|
+
}
|
1379
|
+
}
|
1380
|
+
));
|
1381
|
+
} catch (Pe) {
|
1382
|
+
console.error(Pe);
|
1383
|
+
let dt = it.UNKNOWN, Ft = [], li = [];
|
1384
|
+
if (Pe instanceof jt && Pe.response?.status === 400)
|
1385
|
+
if (Pe.response.data && Array.isArray(Pe.response.data.bodyParts)) {
|
1386
|
+
Ft = Pe.response.data.bodyParts, li = Pe.response.data.icaoWarnings;
|
1387
|
+
const si = Ft.find((pa) => pa.livenessResult.error);
|
1388
|
+
dt = si?.livenessResult.error_code, d(re, T = H.LIVENESS_DETECTION_FAILURE, T), si?.livenessResult.error_code || d(re, T = H.UNKNOWN_LIVENESS_ERROR, T), t(19, ge = it[dt]), console.error("Liveness error:", dt);
|
1389
|
+
} else
|
1390
|
+
d(re, T = H.TEMPLATE_EXTRACTION_ERROR, T);
|
1391
|
+
else
|
1392
|
+
d(re, T = H.UNKNOWN_TEMPLATE_EXTRACTION_ERROR, T), ke && (d(re, T = H.UNKNOWN_LIVENESS_ERROR, T), xe.fire({
|
1393
|
+
icon: "error",
|
1394
|
+
title: "Falha ao comunicar com serviço de Liveness"
|
1395
|
+
}));
|
1396
|
+
d(Se, P.isLoading = !1, P), window.dispatchEvent(new CustomEvent(
|
1397
|
+
"face-unconformities-validated",
|
1398
|
+
{
|
1399
|
+
detail: {
|
1400
|
+
bodyParts: Ft,
|
1401
|
+
errorCode: dt,
|
1402
|
+
translatedError: ue(ge),
|
1403
|
+
status: T,
|
1404
|
+
icaoWarnings: li
|
1405
|
+
}
|
1406
|
+
}
|
1407
|
+
));
|
1408
|
+
return;
|
1409
|
+
}
|
1410
|
+
if (T !== H.OK) {
|
1411
|
+
d(Se, P.isLoading = !1, P);
|
1412
|
+
return;
|
1413
|
+
}
|
1414
|
+
se[0].livenessResult && ii(se[0].livenessResult), se.length !== 0 && se[0].data && d(ye, q = se[0].data, q), Et(et);
|
1415
|
+
return;
|
1416
|
+
}
|
1417
|
+
let A, Q;
|
1418
|
+
try {
|
1419
|
+
Q = await La(E), ii(Q.data);
|
1420
|
+
} catch (se) {
|
1421
|
+
d(re, T = H.UNKNOWN_LIVENESS_ERROR, T), console.error(se), se instanceof jt && se.response?.status === 400 ? (A = se.response.data.error_code, t(19, ge = it[A]), console.error("Liveness error:", A), d(re, T = H.LIVENESS_DETECTION_FAILURE, T)) : xe.fire({
|
1422
|
+
icon: "error",
|
1423
|
+
title: "Falha ao comunicar com serviço de Liveness"
|
1424
|
+
});
|
1425
|
+
}
|
1426
|
+
if (T !== H.OK) {
|
1427
|
+
d(Se, P.isLoading = !1, P), window.dispatchEvent(new CustomEvent(
|
1428
|
+
"face-unconformities-validated",
|
1429
|
+
{
|
1430
|
+
detail: {
|
1431
|
+
bodyParts: [
|
1432
|
+
{
|
1433
|
+
bodyPart: "FACE",
|
1434
|
+
data: W,
|
1435
|
+
livenessBlob: (await pt(E)).split(",")[1],
|
1436
|
+
...Q && { livenessResult: Q }
|
1437
|
+
}
|
1438
|
+
],
|
1439
|
+
...A && { errorCode: A },
|
1440
|
+
...ge && { translatedError: ue(ge) },
|
1441
|
+
status: T
|
1442
|
+
}
|
1443
|
+
}
|
1444
|
+
));
|
1445
|
+
return;
|
1446
|
+
}
|
1447
|
+
let { bodyParts: We, icaoWarnings: Ue } = await vt(W, ke);
|
1448
|
+
window.dispatchEvent(new CustomEvent(
|
1449
|
+
"face-unconformities-validated",
|
1450
|
+
{
|
1451
|
+
detail: {
|
1452
|
+
bodyParts: We,
|
1453
|
+
icaoWarnings: Ue,
|
1454
|
+
status: T,
|
1455
|
+
errorCode: A,
|
1456
|
+
...ge && { translatedError: ue(ge) }
|
1457
|
+
}
|
1458
|
+
}
|
1459
|
+
)), We[0].data && d(ye, q = We[0].data, q), Et(Ue);
|
1460
|
+
});
|
1461
|
+
}
|
1462
|
+
async function Fe(i) {
|
1463
|
+
const [E, y] = (M ?? "")?.replaceAll(" ", "")?.split("x")?.map((I) => I ? parseInt(I) : void 0);
|
1464
|
+
if (!(!E || !y)) {
|
1465
|
+
if (d(Le, h = { videoWidth: E, videoHeight: y }, h), K() && y < E && Re() && d(Le, h = { videoWidth: y, videoHeight: E }, h), K()) {
|
1466
|
+
St();
|
1467
|
+
return;
|
1468
|
+
}
|
1469
|
+
await Hi(E, y, i);
|
1470
|
+
}
|
1471
|
+
}
|
1472
|
+
async function St() {
|
1473
|
+
if (K() && (d(ce, n = j.OK, n), ne && "openCamera" in ne && ne.openCamera(), rt = !0, t(17, be = !1), t(16, ct = !0), !f[0]?.deviceId)) {
|
1474
|
+
const [i, E] = (M ?? "")?.replaceAll(" ", "")?.split("x")?.map((y) => y ? parseInt(y) : void 0);
|
1475
|
+
if (!i || !E)
|
1476
|
+
return;
|
1477
|
+
await di(i, E, r), await qt();
|
1478
|
+
}
|
1479
|
+
}
|
1480
|
+
async function $e() {
|
1481
|
+
if (ve && !Xe)
|
1482
|
+
return Ke(R, $e);
|
1483
|
+
if (R) {
|
1484
|
+
if (we !== Jt.Face && !Ie)
|
1485
|
+
return Ke(R, $e);
|
1486
|
+
d(_t, Z = !0, Z), d(ht, Y = !1, Y), ve ? (s || d(ot, s = !0, s), K() || Lt(X.getContext("2d"), R), Ke(R, $e)) : (Lt(X.getContext("2d"), R), Ke(R, $e));
|
1487
|
+
}
|
1488
|
+
}
|
1489
|
+
async function ti() {
|
1490
|
+
if (Te && (mi(), d(ri, Te = !1, Te)), Ye > 0 && Oe < Ye) {
|
1491
|
+
let i = "FACE_MUITO_PEQUENA";
|
1492
|
+
const E = _i[i];
|
1493
|
+
i = _i.FACE_MUITO_PEQUENA, window.dispatchEvent(new CustomEvent(
|
1494
|
+
"low-quality-face",
|
1495
|
+
{
|
1496
|
+
detail: {
|
1497
|
+
errorCode: i,
|
1498
|
+
translatedError: ue(E),
|
1499
|
+
bodyParts: [
|
1500
|
+
{
|
1501
|
+
bodyPart: "FACE",
|
1502
|
+
minEyeToEyeDist: Ye,
|
1503
|
+
capturedEyeToEyeDist: Oe
|
1504
|
+
}
|
1505
|
+
]
|
1506
|
+
}
|
1507
|
+
}
|
1508
|
+
)), xe.fire({
|
1509
|
+
icon: "error",
|
1510
|
+
title: ue(E)
|
1511
|
+
});
|
1512
|
+
return;
|
1513
|
+
}
|
1514
|
+
if (d(re, T = H.OK, T), K()) {
|
1515
|
+
t(18, ut = !0), ne.takePhoto();
|
1516
|
+
return;
|
1517
|
+
}
|
1518
|
+
d(Be, p = !0, p);
|
1519
|
+
try {
|
1520
|
+
if (ve) {
|
1521
|
+
const [i] = await (await import("./face_api_0e3ce8c8_2.2.19.js")).extractFaces(R, [De]), E = i.toDataURL("image/jpeg").split(",");
|
1522
|
+
d(Ze, fe = E[0], fe), d(ye, q = E[1], q), d(tt, W = E[1], W);
|
1523
|
+
let y, I;
|
1524
|
+
({ bodyParts: y, icaoWarnings: I } = await vt(q, ke)), window.dispatchEvent(new CustomEvent(
|
1525
|
+
"face-unconformities-validated",
|
1526
|
+
{
|
1527
|
+
detail: {
|
1528
|
+
bodyParts: y,
|
1529
|
+
icaoWarnings: I,
|
1530
|
+
status: T
|
1531
|
+
}
|
1532
|
+
}
|
1533
|
+
)), y.length !== 0 && y[0].data && d(ye, q = y[0].data, q), Et(I);
|
1534
|
+
} else {
|
1535
|
+
const i = document.createElement("canvas"), E = i.getContext("2d");
|
1536
|
+
i.width = R.width, i.height = R.height, E?.drawImage(R, 0, 0, i.width, i.height);
|
1537
|
+
const y = i.toDataURL("image/jpeg").split(",");
|
1538
|
+
d(Ze, fe = y[0], fe), d(ye, q = y[1], q), d(tt, W = y[1], W);
|
1539
|
+
let { bodyParts: I, icaoWarnings: A } = await vt(q, ke);
|
1540
|
+
window.dispatchEvent(new CustomEvent(
|
1541
|
+
"face-unconformities-validated",
|
1542
|
+
{
|
1543
|
+
detail: {
|
1544
|
+
bodyParts: I,
|
1545
|
+
icaoWarnings: A,
|
1546
|
+
status: T
|
1547
|
+
}
|
1548
|
+
}
|
1549
|
+
)), I.length !== 0 && I[0].data && d(ye, q = I[0].data, q), Et(A);
|
1550
|
+
}
|
1551
|
+
} catch (i) {
|
1552
|
+
console.error(i);
|
1553
|
+
let E = it.UNKNOWN, y = [], I = [];
|
1554
|
+
if (i instanceof jt && i.response?.status === 400)
|
1555
|
+
if (i.response.data && Array.isArray(i.response.data.bodyParts)) {
|
1556
|
+
y = i.response.data.bodyParts, I = i.response.data.icaoWarnings;
|
1557
|
+
const A = y.find((Q) => Q.livenessResult.error);
|
1558
|
+
E = A?.livenessResult.error_code, d(re, T = H.LIVENESS_DETECTION_FAILURE, T), A?.livenessResult.error_code || d(re, T = H.UNKNOWN_LIVENESS_ERROR, T), t(19, ge = it[E]), console.error("Liveness error:", E);
|
1559
|
+
} else
|
1560
|
+
d(re, T = H.TEMPLATE_EXTRACTION_ERROR, T);
|
1561
|
+
else
|
1562
|
+
d(re, T = H.UNKNOWN_TEMPLATE_EXTRACTION_ERROR, T), ke && (d(re, T = H.UNKNOWN_LIVENESS_ERROR, T), xe.fire({
|
1563
|
+
icon: "error",
|
1564
|
+
title: "Falha ao comunicar com serviço de Liveness"
|
1565
|
+
}));
|
1566
|
+
d(Se, P.isLoading = !1, P), window.dispatchEvent(new CustomEvent(
|
1567
|
+
"face-unconformities-validated",
|
1568
|
+
{
|
1569
|
+
detail: {
|
1570
|
+
bodyParts: y,
|
1571
|
+
errorCode: E,
|
1572
|
+
translatedError: ue(ge),
|
1573
|
+
status: T,
|
1574
|
+
icaoWarnings: I
|
1575
|
+
}
|
1576
|
+
}
|
1577
|
+
));
|
1578
|
+
return;
|
1579
|
+
}
|
1580
|
+
}
|
1581
|
+
function ft() {
|
1582
|
+
const i = {
|
1583
|
+
bodyPart: "FACE",
|
1584
|
+
data: q,
|
1585
|
+
justification: pe
|
1586
|
+
};
|
1587
|
+
d(Bt, he = !0, he), kt(bt) && pt(kt(bt)).then((E) => {
|
1588
|
+
i.livenessBlob = E.split(",")[1];
|
1589
|
+
}), window.dispatchEvent(new CustomEvent("export-face", { detail: i }));
|
1590
|
+
}
|
1591
|
+
function Me() {
|
1592
|
+
window.dispatchEvent(new CustomEvent("face-scrapped")), d(Bt, he = !1, he), d(re, T = H.OK, T), d(Be, p = !1, p), d(tt, W = "", W), d(Se, P.unconformities = [], P);
|
1593
|
+
const i = kt(zt);
|
1594
|
+
i.closedMouth = !1, i.isPersonCloseEnough = !1, i.isPersonTooclose = !0, i.isPersonInFrame = !1, d(oi, O = "", O), d(Ut, v = !0, v), Ge && d(lt, k = !1, k), zt.set(i), be && St();
|
1595
|
+
}
|
1596
|
+
function ii(i) {
|
1597
|
+
let E = "", y = "success";
|
1598
|
+
i.isAlive ? E = `Vivacidade de face (${i.face_liveness.probability.toFixed(2)}) e de captura (${i.capture_liveness.probability}, ${i.capture_liveness.score.toFixed(2)}) verificados!` : i?.face_liveness?.probability && (y = "error", E = `Vivacidade de face (${i.face_liveness.probability.toFixed(2)}) e de captura (${i.capture_liveness.probability}, ${i.capture_liveness.score.toFixed(2)}) insuficientes!`), w && xe.fire({ icon: y, title: E });
|
1599
|
+
}
|
1600
|
+
async function Hi(i, E, y) {
|
1601
|
+
try {
|
1602
|
+
const { deviceId: I, width: A, height: Q, aspectRatio: We, facingMode: Ue, touchPoints: se } = await di(i, E, r, y);
|
1603
|
+
A < i && Q < E && d(
|
1604
|
+
Le,
|
1605
|
+
h = {
|
1606
|
+
videoWidth: A,
|
1607
|
+
videoHeight: Q
|
1608
|
+
},
|
1609
|
+
h
|
1610
|
+
), Re() && (!Ue || se <= 1) && A > Q && d(
|
1611
|
+
Le,
|
1612
|
+
h = {
|
1613
|
+
videoWidth: Q,
|
1614
|
+
videoHeight: A
|
1615
|
+
},
|
1616
|
+
h
|
1617
|
+
), d(Ne, o = I || f[0].deviceId, o);
|
1618
|
+
} catch (I) {
|
1619
|
+
const A = I;
|
1620
|
+
t(17, be = !0);
|
1621
|
+
const Q = wt(I) && I.constraint ? I.constraint : "";
|
1622
|
+
console.error(A, Q), wt(A) && "message" in A && A.message.includes("Permission denied") && (console.error("User didn't give permission to use camera!"), d(ce, n = j.CAMERA_DENIED_ERROR, n)), wt(A) && "message" in A && A.message.includes("Requested device not found") && d(ce, n = j.DEVICE_NOT_FOUND_ERROR, n), (Q.includes("width") || Q.includes("height")) && (console.error(`Camera does not meet the minimum supported requirements! (${Q})`), d(ce, n = j.CAMERA_UNSUPPORTED, n));
|
1623
|
+
}
|
1624
|
+
}
|
1625
|
+
async function Dt() {
|
1626
|
+
d(Ne, o = "", o), await Fe();
|
1627
|
+
}
|
1628
|
+
function ji() {
|
1629
|
+
navigator.mediaDevices.ondevicechange = async (i) => {
|
1630
|
+
await qt(), n !== j.OK ? await Dt() : (!K() && !_.active || K() && !be) && (Ct(ne), d(ce, n = j.DEVICE_NOT_FOUND_ERROR, n), t(17, be = !0));
|
1631
|
+
};
|
1632
|
+
}
|
1633
|
+
const qi = Le.subscribe((i) => {
|
1634
|
+
R && B && (t(9, R.width = i.videoWidth, R), t(9, R.height = i.videoHeight, R), t(10, B.width = i.videoWidth, B), t(10, B.height = i.videoHeight, B), t(14, Ae.width = i.videoWidth, Ae), t(14, Ae.height = i.videoHeight, Ae), t(15, X.width = i.videoWidth, X), t(15, X.height = i.videoHeight, X));
|
1635
|
+
}), zi = zt.subscribe((i) => {
|
1636
|
+
if (m == "DOCUMENT")
|
1637
|
+
return;
|
1638
|
+
let E = "", y = !1;
|
1639
|
+
if (i.isPersonCloseEnough ? i.isPersonTooclose ? E = "faceCollector.moveAwayCamera" : i.isPersonInFrame ? i.closedMouth ? y = !0 : E = "faceCollector.dontOpenMouth" : E = "faceCollector.stayInFrame" : E = "faceCollector.comeCloserCamera", Sa(y, E), !p && k && !Ce && i.isPersonInFrame && i.closedMouth && !(!i.isPersonCloseEnough || i.isPersonTooclose)) {
|
1640
|
+
t(12, Ce = !0), d(Ut, v = !0, v), Pt = (/* @__PURE__ */ new Date()).getTime() + Di;
|
1641
|
+
const I = setInterval(
|
1642
|
+
() => {
|
1643
|
+
if (!k || p || K() && be || !i.isPersonCloseEnough || i.isPersonTooclose || !i.closedMouth || !i.isPersonInFrame) {
|
1644
|
+
t(12, Ce = !1), Nt = !0, setTimeout(
|
1645
|
+
() => {
|
1646
|
+
Nt = !1;
|
1647
|
+
},
|
1648
|
+
1500
|
1649
|
+
), clearInterval(I);
|
1650
|
+
return;
|
1651
|
+
}
|
1652
|
+
const A = (/* @__PURE__ */ new Date()).getTime();
|
1653
|
+
Math.floor((Pt - A) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(I), t(12, Ce = !1), ti());
|
1654
|
+
},
|
1655
|
+
100
|
1656
|
+
);
|
1657
|
+
}
|
1658
|
+
}), Ji = Be.subscribe((i) => {
|
1659
|
+
J && (i ? (J.classList.remove("flex"), J.classList.add("hidden")) : (J.classList.add("flex"), J.classList.remove("hidden")));
|
1660
|
+
}), Xi = Wt.subscribe((i) => {
|
1661
|
+
R && i && (console.log("setting null in video srcObject"), t(9, R.srcObject = null, R), t(9, R.src = "", R), d(Ne, o = null, o));
|
1662
|
+
});
|
1663
|
+
Vt.subscribe(async (i) => {
|
1664
|
+
i === Jt.Face && (await qt(), K() && d(Ne, o = f[0]?.deviceId, o));
|
1665
|
+
});
|
1666
|
+
const Qi = Ne.subscribe(async (i) => {
|
1667
|
+
if (!i || m == "DOCUMENT" || K() && be)
|
1668
|
+
return;
|
1669
|
+
R || t(13, _e = {});
|
1670
|
+
const { videoHeight: E, videoWidth: y } = h;
|
1671
|
+
try {
|
1672
|
+
if (K()) {
|
1673
|
+
await Ct(ne), await St();
|
1674
|
+
return;
|
1675
|
+
}
|
1676
|
+
const I = await Da(y, E, i);
|
1677
|
+
t(9, R.srcObject = I, R), d(ni, _ = I, _), d(Wt, C = !1, C), At ? d(ce, n = j.OK, n) : d(ce, n = j.CAMERA_ORIENTATION_PORTRAIT, n), I.getTracks().forEach((A) => {
|
1678
|
+
A.readyState === "live" && console.log(`Camera ${A.label} opened successfully!`);
|
1679
|
+
});
|
1680
|
+
} catch (I) {
|
1681
|
+
const A = I;
|
1682
|
+
t(17, be = !0), wt(A) && "message" in A && A.message.includes("Requested device not found") && d(ce, n = j.DEVICE_NOT_FOUND_ERROR, n);
|
1683
|
+
}
|
1684
|
+
}), Gi = Vt.subscribe(async (i) => {
|
1685
|
+
i === Jt.Face && K() && !rt && !p && $t && await Fe();
|
1686
|
+
}), Yi = ot.subscribe(async (i) => {
|
1687
|
+
i && ai();
|
1688
|
+
}), Zi = Fa.subscribe(async (i) => {
|
1689
|
+
if (h) {
|
1690
|
+
if (Ct(), !Re()) {
|
1691
|
+
const y = (f.findIndex((A) => A.deviceId === o) + 1) % f.length, I = f[y].deviceId;
|
1692
|
+
K() ? d(Ne, o = I, o) : await Fe(I);
|
1693
|
+
return;
|
1694
|
+
}
|
1695
|
+
i ? (d(mt, r = Ht.REAR_CAMERA, r), await Fe()) : (d(mt, r = Ht.FRONT_CAMERA, r), await Fe());
|
1696
|
+
}
|
1697
|
+
}), xi = Ma.subscribe(async (i) => {
|
1698
|
+
!i.isSupported || !Re() || m != "FACE" || (At = i.orientation.includes("portrait"), At ? d(ce, n = j.OK, n) : d(ce, n = j.CAMERA_ORIENTATION_PORTRAIT, n));
|
1699
|
+
});
|
1700
|
+
async function ai() {
|
1701
|
+
let i;
|
1702
|
+
if (It >= vl) {
|
1703
|
+
It = 0;
|
1704
|
+
const E = await Ba(), y = await import("./face_api_0e3ce8c8_2.2.19.js");
|
1705
|
+
let I;
|
1706
|
+
I = y.detectSingleFace(X, E), i = await I.withFaceLandmarks(), B.getContext("2d")?.clearRect(0, 0, B.width, B.height);
|
1707
|
+
} else
|
1708
|
+
It++;
|
1709
|
+
i ? Ka(i, B, g) : Va(), s && Ke(R, ai);
|
1710
|
+
}
|
1711
|
+
Mt.subscribe(async (i) => {
|
1712
|
+
i && (Me(), d(Mt, l = !1, l));
|
1713
|
+
});
|
1714
|
+
const $i = _t.subscribe((i) => {
|
1715
|
+
i && window.dispatchEvent(new CustomEvent("brycc-camera-ready"));
|
1716
|
+
}), ea = ht.subscribe((i) => {
|
1717
|
+
i && window.dispatchEvent(new CustomEvent("brycc-face-initialized"));
|
1718
|
+
});
|
1719
|
+
Wa(() => {
|
1720
|
+
Ct(), Ji(), zi(), qi(), Xi(), Qi(), Gi(), clearInterval(ei), Yi(), Zi(), xi(), $i(), ea(), mi(), ei = 0;
|
1721
|
+
});
|
1722
|
+
function ta(i) {
|
1723
|
+
Ve[i ? "unshift" : "push"](() => {
|
1724
|
+
ne = i, t(0, ne);
|
1725
|
+
});
|
1726
|
+
}
|
1727
|
+
function ia(i) {
|
1728
|
+
Ve[i ? "unshift" : "push"](() => {
|
1729
|
+
R = i, t(9, R);
|
1730
|
+
});
|
1731
|
+
}
|
1732
|
+
const aa = () => {
|
1733
|
+
K() || d(
|
1734
|
+
Le,
|
1735
|
+
h = {
|
1736
|
+
videoHeight: R.videoHeight,
|
1737
|
+
videoWidth: R.videoWidth
|
1738
|
+
},
|
1739
|
+
h
|
1740
|
+
);
|
1741
|
+
};
|
1742
|
+
function la(i) {
|
1743
|
+
Ve[i ? "unshift" : "push"](() => {
|
1744
|
+
X = i, t(15, X);
|
1745
|
+
});
|
1746
|
+
}
|
1747
|
+
function sa(i) {
|
1748
|
+
Ve[i ? "unshift" : "push"](() => {
|
1749
|
+
B = i, t(10, B);
|
1750
|
+
});
|
1751
|
+
}
|
1752
|
+
function na(i) {
|
1753
|
+
Ve[i ? "unshift" : "push"](() => {
|
1754
|
+
Ae = i, t(14, Ae);
|
1755
|
+
});
|
1756
|
+
}
|
1757
|
+
const oa = () => ft(), ra = () => Me();
|
1758
|
+
function ca(i) {
|
1759
|
+
Ve[i ? "unshift" : "push"](() => {
|
1760
|
+
J = i, t(11, J);
|
1761
|
+
});
|
1762
|
+
}
|
1763
|
+
const ua = () => ft(), fa = () => Me();
|
1764
|
+
function da() {
|
1765
|
+
pe = this.value, Kt.set(pe);
|
1766
|
+
}
|
1767
|
+
const ma = () => ft(), ha = () => Me();
|
1768
|
+
function _a() {
|
1769
|
+
pe = this.value, Kt.set(pe);
|
1770
|
+
}
|
1771
|
+
const ba = () => Me(), ga = async () => {
|
1772
|
+
await Dt();
|
1773
|
+
};
|
1774
|
+
return a.$$set = (i) => {
|
1775
|
+
"enableMinutiae" in i && t(46, g = i.enableMinutiae), "videoDimensions" in i && t(47, M = i.videoDimensions), "noTabs" in i && t(48, Ie = i.noTabs), "weightsPath" in i && t(49, Ot = i.weightsPath), "evaluatePhoto" in i && t(1, ke = i.evaluatePhoto), "showCaptureButton" in i && t(2, Tt = i.showCaptureButton), "showUnconformities" in i && t(3, Gt = i.showUnconformities), "videoOverlay" in i && t(50, nt = i.videoOverlay), "videoOverlayTransparency" in i && t(51, Qe = i.videoOverlayTransparency), "showConfigButton" in i && t(4, Yt = i.showConfigButton), "showAutoCaptureButton" in i && t(5, Ge = i.showAutoCaptureButton), "showCameraButton" in i && t(6, Zt = i.showCameraButton), "showJustificationField" in i && t(7, xt = i.showJustificationField), "minEyeToEyeDist" in i && t(52, Ye = i.minEyeToEyeDist), "widgetInstance" in i && t(0, ne = i.widgetInstance);
|
1776
|
+
}, [
|
1777
|
+
ne,
|
1778
|
+
ke,
|
1779
|
+
Tt,
|
1780
|
+
Gt,
|
1781
|
+
Yt,
|
1782
|
+
Ge,
|
1783
|
+
Zt,
|
1784
|
+
xt,
|
1785
|
+
$e,
|
1786
|
+
R,
|
1787
|
+
B,
|
1788
|
+
J,
|
1789
|
+
Ce,
|
1790
|
+
_e,
|
1791
|
+
Ae,
|
1792
|
+
X,
|
1793
|
+
ct,
|
1794
|
+
be,
|
1795
|
+
ut,
|
1796
|
+
ge,
|
1797
|
+
n,
|
1798
|
+
o,
|
1799
|
+
h,
|
1800
|
+
p,
|
1801
|
+
k,
|
1802
|
+
v,
|
1803
|
+
O,
|
1804
|
+
P,
|
1805
|
+
T,
|
1806
|
+
he,
|
1807
|
+
pe,
|
1808
|
+
q,
|
1809
|
+
ue,
|
1810
|
+
fe,
|
1811
|
+
ve,
|
1812
|
+
Z,
|
1813
|
+
z,
|
1814
|
+
ie,
|
1815
|
+
ae,
|
1816
|
+
le,
|
1817
|
+
ot,
|
1818
|
+
Ze,
|
1819
|
+
ti,
|
1820
|
+
ft,
|
1821
|
+
Me,
|
1822
|
+
Dt,
|
1823
|
+
g,
|
1824
|
+
M,
|
1825
|
+
Ie,
|
1826
|
+
Ot,
|
1827
|
+
nt,
|
1828
|
+
Qe,
|
1829
|
+
Ye,
|
1830
|
+
ta,
|
1831
|
+
ia,
|
1832
|
+
aa,
|
1833
|
+
la,
|
1834
|
+
sa,
|
1835
|
+
na,
|
1836
|
+
oa,
|
1837
|
+
ra,
|
1838
|
+
ca,
|
1839
|
+
ua,
|
1840
|
+
fa,
|
1841
|
+
da,
|
1842
|
+
ma,
|
1843
|
+
ha,
|
1844
|
+
_a,
|
1845
|
+
ba,
|
1846
|
+
ga
|
1847
|
+
];
|
1848
|
+
}
|
1849
|
+
class wl extends Mi {
|
1850
|
+
constructor(e) {
|
1851
|
+
super(), Wi(
|
1852
|
+
this,
|
1853
|
+
{
|
1854
|
+
target: this.shadowRoot,
|
1855
|
+
props: Ui(this.attributes),
|
1856
|
+
customElement: !0
|
1857
|
+
},
|
1858
|
+
El,
|
1859
|
+
pl,
|
1860
|
+
Xt,
|
1861
|
+
{
|
1862
|
+
enableMinutiae: 46,
|
1863
|
+
videoDimensions: 47,
|
1864
|
+
noTabs: 48,
|
1865
|
+
weightsPath: 49,
|
1866
|
+
evaluatePhoto: 1,
|
1867
|
+
showCaptureButton: 2,
|
1868
|
+
showUnconformities: 3,
|
1869
|
+
videoOverlay: 50,
|
1870
|
+
videoOverlayTransparency: 51,
|
1871
|
+
showConfigButton: 4,
|
1872
|
+
showAutoCaptureButton: 5,
|
1873
|
+
showCameraButton: 6,
|
1874
|
+
showJustificationField: 7,
|
1875
|
+
minEyeToEyeDist: 52,
|
1876
|
+
widgetInstance: 0,
|
1877
|
+
play: 8
|
1878
|
+
},
|
1879
|
+
null,
|
1880
|
+
[-1, -1, -1, -1]
|
1881
|
+
), e && (e.target && L(e.target, this, e.anchor), e.props && (this.$set(e.props), oe()));
|
1882
|
+
}
|
1883
|
+
static get observedAttributes() {
|
1884
|
+
return [
|
1885
|
+
"enableMinutiae",
|
1886
|
+
"videoDimensions",
|
1887
|
+
"noTabs",
|
1888
|
+
"weightsPath",
|
1889
|
+
"evaluatePhoto",
|
1890
|
+
"showCaptureButton",
|
1891
|
+
"showUnconformities",
|
1892
|
+
"videoOverlay",
|
1893
|
+
"videoOverlayTransparency",
|
1894
|
+
"showConfigButton",
|
1895
|
+
"showAutoCaptureButton",
|
1896
|
+
"showCameraButton",
|
1897
|
+
"showJustificationField",
|
1898
|
+
"minEyeToEyeDist",
|
1899
|
+
"widgetInstance",
|
1900
|
+
"play"
|
1901
|
+
];
|
1902
|
+
}
|
1903
|
+
get enableMinutiae() {
|
1904
|
+
return this.$$.ctx[46];
|
1905
|
+
}
|
1906
|
+
set enableMinutiae(e) {
|
1907
|
+
this.$$set({ enableMinutiae: e }), oe();
|
1908
|
+
}
|
1909
|
+
get videoDimensions() {
|
1910
|
+
return this.$$.ctx[47];
|
1911
|
+
}
|
1912
|
+
set videoDimensions(e) {
|
1913
|
+
this.$$set({ videoDimensions: e }), oe();
|
1914
|
+
}
|
1915
|
+
get noTabs() {
|
1916
|
+
return this.$$.ctx[48];
|
1917
|
+
}
|
1918
|
+
set noTabs(e) {
|
1919
|
+
this.$$set({ noTabs: e }), oe();
|
1920
|
+
}
|
1921
|
+
get weightsPath() {
|
1922
|
+
return this.$$.ctx[49];
|
1923
|
+
}
|
1924
|
+
set weightsPath(e) {
|
1925
|
+
this.$$set({ weightsPath: e }), oe();
|
1926
|
+
}
|
1927
|
+
get evaluatePhoto() {
|
1928
|
+
return this.$$.ctx[1];
|
1929
|
+
}
|
1930
|
+
set evaluatePhoto(e) {
|
1931
|
+
this.$$set({ evaluatePhoto: e }), oe();
|
1932
|
+
}
|
1933
|
+
get showCaptureButton() {
|
1934
|
+
return this.$$.ctx[2];
|
1935
|
+
}
|
1936
|
+
set showCaptureButton(e) {
|
1937
|
+
this.$$set({ showCaptureButton: e }), oe();
|
1938
|
+
}
|
1939
|
+
get showUnconformities() {
|
1940
|
+
return this.$$.ctx[3];
|
1941
|
+
}
|
1942
|
+
set showUnconformities(e) {
|
1943
|
+
this.$$set({ showUnconformities: e }), oe();
|
1944
|
+
}
|
1945
|
+
get videoOverlay() {
|
1946
|
+
return this.$$.ctx[50];
|
1947
|
+
}
|
1948
|
+
set videoOverlay(e) {
|
1949
|
+
this.$$set({ videoOverlay: e }), oe();
|
1950
|
+
}
|
1951
|
+
get videoOverlayTransparency() {
|
1952
|
+
return this.$$.ctx[51];
|
1953
|
+
}
|
1954
|
+
set videoOverlayTransparency(e) {
|
1955
|
+
this.$$set({ videoOverlayTransparency: e }), oe();
|
1956
|
+
}
|
1957
|
+
get showConfigButton() {
|
1958
|
+
return this.$$.ctx[4];
|
1959
|
+
}
|
1960
|
+
set showConfigButton(e) {
|
1961
|
+
this.$$set({ showConfigButton: e }), oe();
|
1962
|
+
}
|
1963
|
+
get showAutoCaptureButton() {
|
1964
|
+
return this.$$.ctx[5];
|
1965
|
+
}
|
1966
|
+
set showAutoCaptureButton(e) {
|
1967
|
+
this.$$set({ showAutoCaptureButton: e }), oe();
|
1968
|
+
}
|
1969
|
+
get showCameraButton() {
|
1970
|
+
return this.$$.ctx[6];
|
1971
|
+
}
|
1972
|
+
set showCameraButton(e) {
|
1973
|
+
this.$$set({ showCameraButton: e }), oe();
|
1974
|
+
}
|
1975
|
+
get showJustificationField() {
|
1976
|
+
return this.$$.ctx[7];
|
1977
|
+
}
|
1978
|
+
set showJustificationField(e) {
|
1979
|
+
this.$$set({ showJustificationField: e }), oe();
|
1980
|
+
}
|
1981
|
+
get minEyeToEyeDist() {
|
1982
|
+
return this.$$.ctx[52];
|
1983
|
+
}
|
1984
|
+
set minEyeToEyeDist(e) {
|
1985
|
+
this.$$set({ minEyeToEyeDist: e }), oe();
|
1986
|
+
}
|
1987
|
+
get widgetInstance() {
|
1988
|
+
return this.$$.ctx[0];
|
1989
|
+
}
|
1990
|
+
set widgetInstance(e) {
|
1991
|
+
this.$$set({ widgetInstance: e }), oe();
|
1992
|
+
}
|
1993
|
+
get play() {
|
1994
|
+
return this.$$.ctx[8];
|
1995
|
+
}
|
1996
|
+
}
|
1997
|
+
customElements.define("face-collector", wl);
|
1998
|
+
export {
|
1999
|
+
wl as default
|
2000
|
+
};
|