bry-biometric-collector 2.2.6 → 2.2.7

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