bry-biometric-collector 3.3.0-RC05 → 3.3.0-RC06

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.
Files changed (21) hide show
  1. package/README.md +2 -2
  2. package/dist/{DocumentCollector_fac8e88e_3.3.0-RC05.js → DocumentCollector_ec54949a_3.3.0-RC06.js} +105 -105
  3. package/dist/FaceCollector_d7b7f7c7_3.3.0-RC06.js +2390 -0
  4. package/dist/{ValidationAlert_51a3395e_3.3.0-RC05.js → ValidationAlert_ac046013_3.3.0-RC06.js} +1 -1
  5. package/dist/{___vite-browser-external_commonjs-proxy_9c968044_3.3.0-RC05.js → ___vite-browser-external_commonjs-proxy_ed53a62c_3.3.0-RC06.js} +3 -3
  6. package/dist/bry-biometric-collector-main.js +2 -2
  7. package/dist/{fingersApi_22e412a3_3.3.0-RC05.js → fingersApi_e3b0a904_3.3.0-RC06.js} +2 -2
  8. package/dist/index.js +2 -2
  9. package/dist/{index_8a9061ba_3.3.0-RC05.js → index_10ec837c_3.3.0-RC06.js} +3 -3
  10. package/dist/{index_a05d6356_3.3.0-RC05.js → index_2611392a_3.3.0-RC06.js} +3 -3
  11. package/dist/{main_35f2cba0_3.3.0-RC05.js → main_1dfbf19c_3.3.0-RC06.js} +5753 -5737
  12. package/dist/style.css +1 -1
  13. package/package.json +1 -1
  14. package/dist/FaceCollector_d7a5f6dd_3.3.0-RC05.js +0 -2387
  15. package/dist/faceApi_a8b6f8d4_3.3.0-RC05.js +0 -15
  16. /package/dist/{en-us_e83efd5d_3.3.0-RC05.js → en-us_e83efd5d_3.3.0-RC06.js} +0 -0
  17. /package/dist/{es-cl_5939150a_3.3.0-RC05.js → es-cl_5939150a_3.3.0-RC06.js} +0 -0
  18. /package/dist/{face_api_0e3ce8c8_3.3.0-RC05.js → face_api_0e3ce8c8_3.3.0-RC06.js} +0 -0
  19. /package/dist/{index-idlf-detector_39cfdffa_3.3.0-RC05.js → index-idlf-detector_39cfdffa_3.3.0-RC06.js} +0 -0
  20. /package/dist/{index-idlf-detector_a819b3c8_3.3.0-RC05.js → index-idlf-detector_a819b3c8_3.3.0-RC06.js} +0 -0
  21. /package/dist/{pt-br_fae15356_3.3.0-RC05.js → pt-br_fae15356_3.3.0-RC06.js} +0 -0
@@ -1,2387 +0,0 @@
1
- import { z as xt, S as gt, B as vt, C as pt, D as wt, E as T, G as N, H as w, I as Y, J as h, K as H, L as Qe, M as G, N as Xe, O as D, P as O, Q as ze, R as Je, T as he, U as m, V as _e, W as be, X as ge, Y as z, Z as B, _ as F, a0 as Yi, $ as Zi, a1 as xi, a2 as Q, a3 as Bs, a4 as qe, a5 as S, a6 as Ge, a7 as ei, a8 as b, a9 as P, aa as jt, ab as Kt, ac as it, x as st, y as at, ad as Ws, ae as nt, af as we, ag as Ms, ah as Le, ai as Ht, aj as ki, ak as Us, al as je, am as ke, an as Vs, ao as zs, ap as qt, aq as Jt, ar as me, as as ae, at as Te, au as Ti, av as ot, aw as Qt, ax as js, ay as lt, az as Oi, aA as Ri, aB as Ks, aC as Hs, aD as qs, aE as Js, f as Di, aF as Qs, aG as Xs, aH as Gs, aI as Xt, aJ as j, m as _t, aK as Gt, aL as Ys, l as oe, aM as Ii, aN as Zs, aO as rt, aP as ct, aQ as Ai, aR as xs, aS as ut, A as Yt, aT as Oe, aU as $s, aV as Ke, aW as ea, aX as Li, e as Fe, aY as Zt, aZ as ft, a_ as ta, w as dt, a$ as ia, b0 as sa, b1 as aa, b2 as na, b3 as oa, b4 as la, b5 as He, b6 as ra, b7 as ca, b8 as ht, b9 as fe, ba as Ct, bb as ua, bc as fa, d as Fi, bd as da, be as mt, bf as le, bg as ha, bh as ma, bi as Si, bj as $i, bk as bt, bl as _a } from "./main_35f2cba0_3.3.0-RC05.js";
2
- import { W as ba, C as ga, V as va, a as pa } from "./ValidationAlert_51a3395e_3.3.0-RC05.js";
3
- import { detectSingleFace as wa, matchDimensions as Ca, resizeResults as Ea } from "./face_api_0e3ce8c8_3.3.0-RC05.js";
4
- const $t = xt(!1);
5
- class ya {
6
- isDevToolsOpen = !1;
7
- detectionCount = 0;
8
- checkSizeTimeout = null;
9
- detectionInterval = null;
10
- detectDevToolsBySize() {
11
- const e = window.outerWidth - window.innerWidth > 200, t = window.outerHeight - window.innerHeight > 200;
12
- return e || t;
13
- }
14
- checkForDevTools = () => {
15
- this.detectDevToolsBySize() ? (this.detectionCount++, this.detectionCount >= 2 && !this.isDevToolsOpen && (this.isDevToolsOpen = !0, $t.set(this.isDevToolsOpen))) : (this.detectionCount = 0, this.isDevToolsOpen && (this.isDevToolsOpen = !1, $t.set(this.isDevToolsOpen)));
16
- };
17
- startDetection() {
18
- this.stopDetection(), window.addEventListener("resize", () => {
19
- this.checkSizeTimeout && clearTimeout(this.checkSizeTimeout), this.checkSizeTimeout = window.setTimeout(this.checkForDevTools, 500);
20
- }), window.addEventListener("focus", () => setTimeout(this.checkForDevTools, 300)), this.detectionInterval = window.setInterval(this.checkForDevTools, 1e3), this.checkForDevTools();
21
- }
22
- stopDetection() {
23
- this.detectionInterval && (clearInterval(this.detectionInterval), this.detectionInterval = null), this.checkSizeTimeout && (clearTimeout(this.checkSizeTimeout), this.checkSizeTimeout = null);
24
- }
25
- }
26
- function Ni(i) {
27
- let e, t;
28
- return e = new ba({}), {
29
- c() {
30
- _e(e.$$.fragment);
31
- },
32
- m(a, n) {
33
- be(e, a, n), t = !0;
34
- },
35
- i(a) {
36
- t || (H(e.$$.fragment, a), t = !0);
37
- },
38
- o(a) {
39
- G(e.$$.fragment, a), t = !1;
40
- },
41
- d(a) {
42
- ge(e, a);
43
- }
44
- };
45
- }
46
- function ka(i) {
47
- let e, t, a, n = (
48
- /*showWatermark*/
49
- i[1] && Ni()
50
- );
51
- return {
52
- c() {
53
- e = w("div"), n && n.c(), this.c = Y, h(e, "id", "face-oval"), h(e, "class", t = "loader " + /*loading*/
54
- (i[0] ? "loading" : "") + " z-10"), h(
55
- e,
56
- "style",
57
- /*styleVars*/
58
- i[2]
59
- );
60
- },
61
- m(r, f) {
62
- T(r, e, f), n && n.m(e, null), a = !0;
63
- },
64
- p(r, [f]) {
65
- /*showWatermark*/
66
- r[1] ? n ? f & /*showWatermark*/
67
- 2 && H(n, 1) : (n = Ni(), n.c(), H(n, 1), n.m(e, null)) : n && (Qe(), G(n, 1, 1, () => {
68
- n = null;
69
- }), Xe()), (!a || f & /*loading*/
70
- 1 && t !== (t = "loader " + /*loading*/
71
- (r[0] ? "loading" : "") + " z-10")) && h(e, "class", t), (!a || f & /*styleVars*/
72
- 4) && h(
73
- e,
74
- "style",
75
- /*styleVars*/
76
- r[2]
77
- );
78
- },
79
- i(r) {
80
- a || (H(n), a = !0);
81
- },
82
- o(r) {
83
- G(n), a = !1;
84
- },
85
- d(r) {
86
- r && D(e), n && n.d();
87
- }
88
- };
89
- }
90
- const Ta = "hsl(var(--p))", Oa = "hsl(var(--su))";
91
- function Ra(i, e, t) {
92
- let a, n, r;
93
- O(i, ze, (d) => t(8, n = d)), O(i, Je, (d) => t(9, r = d));
94
- let { loading: f } = e, { showWatermark: l } = e, c, o, u = 0.8, _ = 8, g = 0.15;
95
- return he() && (u = 0.65, _ = 10, g = 0.25), i.$$set = (d) => {
96
- "loading" in d && t(0, f = d.loading), "showWatermark" in d && t(1, l = d.showWatermark);
97
- }, i.$$.update = () => {
98
- if (i.$$.dirty & /*$videoStore, percentage, ovalHeight, ovalWidth, $ovalDimensions, captureBarPercentage*/
99
- 952 && r) {
100
- t(4, o = r.videoHeight * u), t(3, c = o / 1.45), m(ze, n.width = c, n), m(ze, n.height = o, n), m(ze, n.x = (r.videoWidth - n.width) / 2, n);
101
- let d = r.videoHeight - r.videoHeight * g;
102
- m(ze, n.y = d - n.height, n);
103
- }
104
- i.$$.dirty & /*ovalWidth, ovalHeight, borderWidth*/
105
- 88 && t(2, a = `
106
- --oval-width: ${c}px;
107
- --oval-height: ${o}px;
108
- --border-color: ${Ta};
109
- --border-color-animation: ${Oa};
110
- --oval-border: ${_}px;
111
- `);
112
- }, [
113
- f,
114
- l,
115
- a,
116
- c,
117
- o,
118
- u,
119
- _,
120
- g,
121
- n,
122
- r
123
- ];
124
- }
125
- class es extends gt {
126
- constructor(e) {
127
- super(), vt(
128
- this,
129
- {
130
- target: this.shadowRoot,
131
- props: wt(this.attributes),
132
- customElement: !0
133
- },
134
- Ra,
135
- ka,
136
- pt,
137
- { loading: 0, showWatermark: 1 },
138
- null
139
- ), e && (e.target && T(e.target, this, e.anchor), e.props && (this.$set(e.props), N()));
140
- }
141
- static get observedAttributes() {
142
- return ["loading", "showWatermark"];
143
- }
144
- get loading() {
145
- return this.$$.ctx[0];
146
- }
147
- set loading(e) {
148
- this.$$set({ loading: e }), N();
149
- }
150
- get showWatermark() {
151
- return this.$$.ctx[1];
152
- }
153
- set showWatermark(e) {
154
- this.$$set({ showWatermark: e }), N();
155
- }
156
- }
157
- customElements.define("face-oval", es);
158
- function Da(i) {
159
- let e;
160
- return {
161
- c() {
162
- e = w("div"), this.c = Y, h(e, "class", "video-overlay z-0"), h(
163
- e,
164
- "style",
165
- /*styleVars*/
166
- i[0]
167
- );
168
- },
169
- m(t, a) {
170
- T(t, e, a);
171
- },
172
- p(t, [a]) {
173
- a & /*styleVars*/
174
- 1 && h(
175
- e,
176
- "style",
177
- /*styleVars*/
178
- t[0]
179
- );
180
- },
181
- i: Y,
182
- o: Y,
183
- d(t) {
184
- t && D(e);
185
- }
186
- };
187
- }
188
- function Ia(i, e, t) {
189
- let a, n;
190
- O(i, Je, (u) => t(6, n = u));
191
- let r, f, l = 0.8, { overlayColor: c } = e, { overlayTransparency: o } = e;
192
- return he() && (l = 0.65), i.$$set = (u) => {
193
- "overlayColor" in u && t(1, c = u.overlayColor), "overlayTransparency" in u && t(2, o = u.overlayTransparency);
194
- }, i.$$.update = () => {
195
- i.$$.dirty & /*$videoStore, percentage, ovalHeight*/
196
- 112 && n && (t(4, f = n.videoHeight * l), t(3, r = f / 1.45)), i.$$.dirty & /*ovalWidth, ovalHeight, overlayColor, overlayTransparency*/
197
- 30 && t(0, a = `
198
- --oval-width: ${r}px;
199
- --oval-height: ${f}px;
200
- --overlay-color: ${c};
201
- --overlay-transparency: ${o};
202
- `);
203
- }, [
204
- a,
205
- c,
206
- o,
207
- r,
208
- f,
209
- l,
210
- n
211
- ];
212
- }
213
- class ts extends gt {
214
- constructor(e) {
215
- super(), vt(
216
- this,
217
- {
218
- target: this.shadowRoot,
219
- props: wt(this.attributes),
220
- customElement: !0
221
- },
222
- Ia,
223
- Da,
224
- pt,
225
- { overlayColor: 1, overlayTransparency: 2 },
226
- null
227
- ), e && (e.target && T(e.target, this, e.anchor), e.props && (this.$set(e.props), N()));
228
- }
229
- static get observedAttributes() {
230
- return ["overlayColor", "overlayTransparency"];
231
- }
232
- get overlayColor() {
233
- return this.$$.ctx[1];
234
- }
235
- set overlayColor(e) {
236
- this.$$set({ overlayColor: e }), N();
237
- }
238
- get overlayTransparency() {
239
- return this.$$.ctx[2];
240
- }
241
- set overlayTransparency(e) {
242
- this.$$set({ overlayTransparency: e }), N();
243
- }
244
- }
245
- customElements.define("overlay-oval", ts);
246
- function Pi(i) {
247
- let e, t, a, n, r, f, l = (
248
- /*$_*/
249
- i[2]("faceCollector.obtainingPicture") + ""
250
- ), c;
251
- return {
252
- c() {
253
- e = w("slot"), t = w("div"), a = w("img"), r = F(), f = w("span"), c = S(l), Ge(a.src, n = ei) || h(a, "src", n), h(a, "alt", "loading gif"), h(a, "class", "m-auto h-[10em] lg:h-[12em]"), h(f, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center"), h(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), h(e, "name", "loading-camera-gif"), h(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
254
- },
255
- m(o, u) {
256
- T(o, e, u), b(e, t), b(t, a), b(t, r), b(t, f), b(f, c);
257
- },
258
- p(o, u) {
259
- u & /*$_*/
260
- 4 && l !== (l = /*$_*/
261
- o[2]("faceCollector.obtainingPicture") + "") && P(c, l);
262
- },
263
- d(o) {
264
- o && D(e);
265
- }
266
- };
267
- }
268
- function Bi(i) {
269
- let e, t, a, n, r, f;
270
- function l(u, _) {
271
- return (
272
- /*$isLoading*/
273
- u[5] ? La : Aa
274
- );
275
- }
276
- let c = l(i), o = c(i);
277
- return {
278
- c() {
279
- e = w("div"), t = w("slot"), a = w("div"), n = w("img"), f = F(), o.c(), Ge(n.src, r = ei) || h(n, "src", r), h(n, "alt", "loading gif"), h(n, "class", "m-auto h-[10em] lg:h-[12em]"), h(a, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), h(t, "name", "loading-camera-gif"), h(t, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]"), h(e, "class", "bg-white absolute inset-0 z-10 flex items-center justify-center");
280
- },
281
- m(u, _) {
282
- T(u, e, _), b(e, t), b(t, a), b(a, n), b(a, f), o.m(a, null);
283
- },
284
- p(u, _) {
285
- c === (c = l(u)) && o ? o.p(u, _) : (o.d(1), o = c(u), o && (o.c(), o.m(a, null)));
286
- },
287
- d(u) {
288
- u && D(e), o.d();
289
- }
290
- };
291
- }
292
- function Aa(i) {
293
- let e, t = (
294
- /*$_*/
295
- i[2]("faceCollector.obtainingPicture") + ""
296
- ), a;
297
- return {
298
- c() {
299
- e = w("span"), a = S(t), h(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
300
- },
301
- m(n, r) {
302
- T(n, e, r), b(e, a);
303
- },
304
- p(n, r) {
305
- r & /*$_*/
306
- 4 && t !== (t = /*$_*/
307
- n[2]("faceCollector.obtainingPicture") + "") && P(a, t);
308
- },
309
- d(n) {
310
- n && D(e);
311
- }
312
- };
313
- }
314
- function La(i) {
315
- let e;
316
- return {
317
- c() {
318
- e = w("span"), e.textContent = "Obtaining photo...", h(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
319
- },
320
- m(t, a) {
321
- T(t, e, a);
322
- },
323
- p: Y,
324
- d(t) {
325
- t && D(e);
326
- }
327
- };
328
- }
329
- function Wi(i) {
330
- let e, t, a, n, r;
331
- function f(o, u) {
332
- return (
333
- /*$isLoading*/
334
- o[5] ? Sa : Fa
335
- );
336
- }
337
- let l = f(i), c = l(i);
338
- return {
339
- c() {
340
- e = w("slot"), t = w("div"), a = w("img"), r = F(), c.c(), Ge(a.src, n = ei) || h(a, "src", n), h(a, "alt", "loading gif"), h(a, "class", "m-auto h-[10em] lg:h-[12em]"), h(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), h(e, "name", "loading-camera-gif"), h(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]");
341
- },
342
- m(o, u) {
343
- T(o, e, u), b(e, t), b(t, a), b(t, r), c.m(t, null);
344
- },
345
- p(o, u) {
346
- l === (l = f(o)) && c ? c.p(o, u) : (c.d(1), c = l(o), c && (c.c(), c.m(t, null)));
347
- },
348
- d(o) {
349
- o && D(e), c.d();
350
- }
351
- };
352
- }
353
- function Fa(i) {
354
- let e, t = (
355
- /*$_*/
356
- i[2]("faceCollector.initiatingCamera") + ""
357
- ), a;
358
- return {
359
- c() {
360
- e = w("span"), a = S(t), h(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
361
- },
362
- m(n, r) {
363
- T(n, e, r), b(e, a);
364
- },
365
- p(n, r) {
366
- r & /*$_*/
367
- 4 && t !== (t = /*$_*/
368
- n[2]("faceCollector.initiatingCamera") + "") && P(a, t);
369
- },
370
- d(n) {
371
- n && D(e);
372
- }
373
- };
374
- }
375
- function Sa(i) {
376
- let e;
377
- return {
378
- c() {
379
- e = w("span"), e.textContent = "Loading camera...", h(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center");
380
- },
381
- m(t, a) {
382
- T(t, e, a);
383
- },
384
- p: Y,
385
- d(t) {
386
- t && D(e);
387
- }
388
- };
389
- }
390
- function Na(i) {
391
- let e = z() && /*waitingIdrndCaptureEvent*/
392
- i[0], t, a, n = (z() && /*idrndLoading*/
393
- (i[1] || !/*$ready*/
394
- i[6]) || !z() && !/*$ready*/
395
- i[6]) && /*$cameraStatusStore*/
396
- i[4] === B.OK, r, f = e && Pi(i), l = (
397
- /*$detectingFace*/
398
- i[3] && /*$cameraStatusStore*/
399
- i[4] === B.OK && Bi(i)
400
- ), c = n && Wi(i);
401
- return {
402
- c() {
403
- f && f.c(), t = F(), l && l.c(), a = F(), c && c.c(), r = Yi(), this.c = Y;
404
- },
405
- m(o, u) {
406
- f && f.m(o, u), T(o, t, u), l && l.m(o, u), T(o, a, u), c && c.m(o, u), T(o, r, u);
407
- },
408
- p(o, [u]) {
409
- u & /*waitingIdrndCaptureEvent*/
410
- 1 && (e = z() && /*waitingIdrndCaptureEvent*/
411
- o[0]), e ? f ? f.p(o, u) : (f = Pi(o), f.c(), f.m(t.parentNode, t)) : f && (f.d(1), f = null), /*$detectingFace*/
412
- o[3] && /*$cameraStatusStore*/
413
- o[4] === B.OK ? l ? l.p(o, u) : (l = Bi(o), l.c(), l.m(a.parentNode, a)) : l && (l.d(1), l = null), u & /*idrndLoading, $ready, $cameraStatusStore*/
414
- 82 && (n = (z() && /*idrndLoading*/
415
- (o[1] || !/*$ready*/
416
- o[6]) || !z() && !/*$ready*/
417
- o[6]) && /*$cameraStatusStore*/
418
- o[4] === B.OK), n ? c ? c.p(o, u) : (c = Wi(o), c.c(), c.m(r.parentNode, r)) : c && (c.d(1), c = null);
419
- },
420
- i: Y,
421
- o: Y,
422
- d(o) {
423
- f && f.d(o), o && D(t), l && l.d(o), o && D(a), c && c.d(o), o && D(r);
424
- }
425
- };
426
- }
427
- function Pa(i, e, t) {
428
- let a, n, r, f, l;
429
- O(i, Zi, (u) => t(2, a = u)), O(i, xi, (u) => t(3, n = u)), O(i, Q, (u) => t(4, r = u)), O(i, Bs, (u) => t(5, f = u)), O(i, qe, (u) => t(6, l = u));
430
- let { waitingIdrndCaptureEvent: c } = e, { idrndLoading: o } = e;
431
- return i.$$set = (u) => {
432
- "waitingIdrndCaptureEvent" in u && t(0, c = u.waitingIdrndCaptureEvent), "idrndLoading" in u && t(1, o = u.idrndLoading);
433
- }, [
434
- c,
435
- o,
436
- a,
437
- n,
438
- r,
439
- f,
440
- l
441
- ];
442
- }
443
- class is extends gt {
444
- constructor(e) {
445
- super(), vt(
446
- this,
447
- {
448
- target: this.shadowRoot,
449
- props: wt(this.attributes),
450
- customElement: !0
451
- },
452
- Pa,
453
- Na,
454
- pt,
455
- {
456
- waitingIdrndCaptureEvent: 0,
457
- idrndLoading: 1
458
- },
459
- null
460
- ), e && (e.target && T(e.target, this, e.anchor), e.props && (this.$set(e.props), N()));
461
- }
462
- static get observedAttributes() {
463
- return ["waitingIdrndCaptureEvent", "idrndLoading"];
464
- }
465
- get waitingIdrndCaptureEvent() {
466
- return this.$$.ctx[0];
467
- }
468
- set waitingIdrndCaptureEvent(e) {
469
- this.$$set({ waitingIdrndCaptureEvent: e }), N();
470
- }
471
- get idrndLoading() {
472
- return this.$$.ctx[1];
473
- }
474
- set idrndLoading(e) {
475
- this.$$set({ idrndLoading: e }), N();
476
- }
477
- }
478
- customElements.define("loading-component", is);
479
- function Mi(i, e, t) {
480
- const a = i.slice();
481
- return a[125] = e[t], a;
482
- }
483
- function Ui(i, e, t) {
484
- const a = i.slice();
485
- return a[125] = e[t], a;
486
- }
487
- function Vi(i) {
488
- let e, t, a = z(), n, r, f, l, c, o, u, _, g, d, C, p, v, E, R, V, x, K = a && Ba(i), q = (
489
- /*$ready*/
490
- i[23] && !/*$detectingFace*/
491
- i[26] && zi(i)
492
- );
493
- return d = new ca({}), p = new ga({
494
- props: {
495
- showConfigButton: (
496
- /*showConfigButton*/
497
- i[4]
498
- ),
499
- showAutoCaptureButton: (
500
- /*showAutoCaptureButton*/
501
- i[5]
502
- ),
503
- showCaptureButton: (
504
- /*showCaptureButton*/
505
- i[0]
506
- ),
507
- showCameraButton: (
508
- /*showCameraButton*/
509
- i[6]
510
- ),
511
- enableCaptureButton: (
512
- /*enableCaptureButton*/
513
- i[17]
514
- ),
515
- videoOverlay: (
516
- /*videoOverlay*/
517
- i[9]
518
- ),
519
- videoOverlayTransparency: (
520
- /*videoOverlayTransparency*/
521
- i[10]
522
- ),
523
- idrndClosed: (
524
- /*idrndClosed*/
525
- i[19]
526
- ),
527
- idrndLoading: (
528
- /*idrndLoading*/
529
- i[18]
530
- ),
531
- waitingIdrndCaptureEvent: (
532
- /*waitingIdrndCaptureEvent*/
533
- i[20]
534
- ),
535
- handler: (
536
- /*capture*/
537
- i[39]
538
- )
539
- }
540
- }), {
541
- c() {
542
- e = w("div"), t = w("div"), K && K.c(), n = F(), r = w("video"), l = F(), c = w("canvas"), o = F(), u = w("div"), _ = w("div"), q && q.c(), g = F(), _e(d.$$.fragment), C = F(), _e(p.$$.fragment), h(r, "id", "bry-cc-camera-video-tag"), h(r, "class", f = /*$ready*/
543
- i[23] ? he() ? "absolute inset-0 -scale-x-100" : "w-full h-full object-cover -scale-x-100" : "w-0 h-0"), r.playsInline = !0, r.muted = !0, r.autoplay = !0, h(c, "id", "bry-ce-detectionsCanvas"), h(c, "class", "absolute top-0 left-0 max-w-full -scale-x-100"), h(t, "class", "overflow-hidden"), ht(
544
- t,
545
- "width",
546
- /*$videoStore*/
547
- i[34].videoWidth + "px"
548
- ), ht(
549
- t,
550
- "height",
551
- /*$videoStore*/
552
- i[34].videoHeight + "px"
553
- ), h(_, "class", "flex flex-grow w-full items-center justify-center relative"), h(u, "class", "absolute inset-0 flex flex-col items-center justify-between w-full h-full"), h(e, "class", v = /*$ready*/
554
- i[23] ? "relative" : "relative w-0 h-0"), e.hidden = E = /*$cameraStatusStore*/
555
- i[22] !== B.OK || z() && /*idrndLoading*/
556
- (i[18] || /*idrndClosed*/
557
- i[19] || /*waitingIdrndCaptureEvent*/
558
- i[20]);
559
- },
560
- m(A, W) {
561
- T(A, e, W), b(e, t), K && K.m(t, null), b(t, n), b(t, r), i[51](r), b(t, l), b(t, c), i[53](c), b(e, o), b(e, u), b(u, _), q && q.m(_, null), b(u, g), be(d, u, null), b(u, C), be(p, u, null), R = !0, V || (x = [
562
- fe(
563
- r,
564
- "canplay",
565
- /*canplay_handler*/
566
- i[52]
567
- ),
568
- fe(
569
- r,
570
- "play",
571
- /*play*/
572
- i[12],
573
- { once: !0 }
574
- )
575
- ], V = !0);
576
- },
577
- p(A, W) {
578
- a && K.p(A, W), (!R || W[0] & /*$ready*/
579
- 8388608 && f !== (f = /*$ready*/
580
- A[23] ? he() ? "absolute inset-0 -scale-x-100" : "w-full h-full object-cover -scale-x-100" : "w-0 h-0")) && h(r, "class", f), (!R || W[1] & /*$videoStore*/
581
- 8) && ht(
582
- t,
583
- "width",
584
- /*$videoStore*/
585
- A[34].videoWidth + "px"
586
- ), (!R || W[1] & /*$videoStore*/
587
- 8) && ht(
588
- t,
589
- "height",
590
- /*$videoStore*/
591
- A[34].videoHeight + "px"
592
- ), /*$ready*/
593
- A[23] && !/*$detectingFace*/
594
- A[26] ? q ? (q.p(A, W), W[0] & /*$ready, $detectingFace*/
595
- 75497472 && H(q, 1)) : (q = zi(A), q.c(), H(q, 1), q.m(_, null)) : q && (Qe(), G(q, 1, 1, () => {
596
- q = null;
597
- }), Xe());
598
- const Z = {};
599
- W[0] & /*showConfigButton*/
600
- 16 && (Z.showConfigButton = /*showConfigButton*/
601
- A[4]), W[0] & /*showAutoCaptureButton*/
602
- 32 && (Z.showAutoCaptureButton = /*showAutoCaptureButton*/
603
- A[5]), W[0] & /*showCaptureButton*/
604
- 1 && (Z.showCaptureButton = /*showCaptureButton*/
605
- A[0]), W[0] & /*showCameraButton*/
606
- 64 && (Z.showCameraButton = /*showCameraButton*/
607
- A[6]), W[0] & /*enableCaptureButton*/
608
- 131072 && (Z.enableCaptureButton = /*enableCaptureButton*/
609
- A[17]), W[0] & /*videoOverlay*/
610
- 512 && (Z.videoOverlay = /*videoOverlay*/
611
- A[9]), W[0] & /*videoOverlayTransparency*/
612
- 1024 && (Z.videoOverlayTransparency = /*videoOverlayTransparency*/
613
- A[10]), W[0] & /*idrndClosed*/
614
- 524288 && (Z.idrndClosed = /*idrndClosed*/
615
- A[19]), W[0] & /*idrndLoading*/
616
- 262144 && (Z.idrndLoading = /*idrndLoading*/
617
- A[18]), W[0] & /*waitingIdrndCaptureEvent*/
618
- 1048576 && (Z.waitingIdrndCaptureEvent = /*waitingIdrndCaptureEvent*/
619
- A[20]), p.$set(Z), (!R || W[0] & /*$ready*/
620
- 8388608 && v !== (v = /*$ready*/
621
- A[23] ? "relative" : "relative w-0 h-0")) && h(e, "class", v), (!R || W[0] & /*$cameraStatusStore, idrndLoading, idrndClosed, waitingIdrndCaptureEvent*/
622
- 6029312 && E !== (E = /*$cameraStatusStore*/
623
- A[22] !== B.OK || z() && /*idrndLoading*/
624
- (A[18] || /*idrndClosed*/
625
- A[19] || /*waitingIdrndCaptureEvent*/
626
- A[20]))) && (e.hidden = E);
627
- },
628
- i(A) {
629
- R || (H(q), H(d.$$.fragment, A), H(p.$$.fragment, A), R = !0);
630
- },
631
- o(A) {
632
- G(q), G(d.$$.fragment, A), G(p.$$.fragment, A), R = !1;
633
- },
634
- d(A) {
635
- A && D(e), K && K.d(), i[51](null), i[53](null), q && q.d(), ge(d), ge(p), V = !1, Ct(x);
636
- }
637
- };
638
- }
639
- function Ba(i) {
640
- let e;
641
- return {
642
- c() {
643
- e = w("idlive-face-capture"), e.hidden = !0, le(e, "mask_hidden", ""), le(e, "auto_capture_disabled", ""), le(e, "auto_close_disabled", ""), le(
644
- e,
645
- "device_id",
646
- /*$selectedVideoDeviceId*/
647
- i[24]
648
- ), le(e, "face_not_centered_check_enabled", ""), le(e, "sunglasses_detected_check_enabled", ""), le(e, "mouth_open_check_enabled", ""), le(e, "face_blurry_check_enabled", ""), le(e, "dark_image_check_enabled", ""), le(e, "eyes_closed_check_enabled", ""), le(
649
- e,
650
- "payload_size",
651
- /*livenessBlobSize*/
652
- i[11]
653
- );
654
- },
655
- m(t, a) {
656
- T(t, e, a), i[50](e);
657
- },
658
- p(t, a) {
659
- a[0] & /*$selectedVideoDeviceId*/
660
- 16777216 && le(
661
- e,
662
- "device_id",
663
- /*$selectedVideoDeviceId*/
664
- t[24]
665
- ), a[0] & /*livenessBlobSize*/
666
- 2048 && le(
667
- e,
668
- "payload_size",
669
- /*livenessBlobSize*/
670
- t[11]
671
- );
672
- },
673
- d(t) {
674
- t && D(e), i[50](null);
675
- }
676
- };
677
- }
678
- function zi(i) {
679
- let e, t, a, n, r, f;
680
- return e = new va({
681
- props: {
682
- isCountingDown: (
683
- /*isCountingDown*/
684
- i[16]
685
- )
686
- }
687
- }), a = new es({
688
- props: {
689
- loading: (
690
- /*isCountingDown*/
691
- i[16]
692
- ),
693
- showWatermark: (
694
- /*showWatermark*/
695
- i[8]
696
- )
697
- }
698
- }), r = new ts({
699
- props: {
700
- overlayColor: (
701
- /*videoOverlay*/
702
- i[9]
703
- ),
704
- overlayTransparency: (
705
- /*videoOverlayTransparency*/
706
- i[10]
707
- )
708
- }
709
- }), {
710
- c() {
711
- _e(e.$$.fragment), t = F(), _e(a.$$.fragment), n = F(), _e(r.$$.fragment);
712
- },
713
- m(l, c) {
714
- be(e, l, c), T(l, t, c), be(a, l, c), T(l, n, c), be(r, l, c), f = !0;
715
- },
716
- p(l, c) {
717
- const o = {};
718
- c[0] & /*isCountingDown*/
719
- 65536 && (o.isCountingDown = /*isCountingDown*/
720
- l[16]), e.$set(o);
721
- const u = {};
722
- c[0] & /*isCountingDown*/
723
- 65536 && (u.loading = /*isCountingDown*/
724
- l[16]), c[0] & /*showWatermark*/
725
- 256 && (u.showWatermark = /*showWatermark*/
726
- l[8]), a.$set(u);
727
- const _ = {};
728
- c[0] & /*videoOverlay*/
729
- 512 && (_.overlayColor = /*videoOverlay*/
730
- l[9]), c[0] & /*videoOverlayTransparency*/
731
- 1024 && (_.overlayTransparency = /*videoOverlayTransparency*/
732
- l[10]), r.$set(_);
733
- },
734
- i(l) {
735
- f || (H(e.$$.fragment, l), H(a.$$.fragment, l), H(r.$$.fragment, l), f = !0);
736
- },
737
- o(l) {
738
- G(e.$$.fragment, l), G(a.$$.fragment, l), G(r.$$.fragment, l), f = !1;
739
- },
740
- d(l) {
741
- ge(e, l), l && D(t), ge(a, l), l && D(n), ge(r, l);
742
- }
743
- };
744
- }
745
- function ji(i) {
746
- let e, t, a = (
747
- /*$_*/
748
- i[31]("faceCollector.finish") + ""
749
- ), n, r, f, l, c = (
750
- /*$_*/
751
- i[31]("faceCollector.retakePhoto") + ""
752
- ), o, u, _;
753
- return {
754
- c() {
755
- e = w("div"), t = w("button"), n = S(a), f = F(), l = w("button"), o = S(c), t.disabled = r = /*$justification*/
756
- i[28].length === 0, h(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), h(l, "id", "bry-cc-retake-button"), h(l, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), h(e, "class", "ce-dui-btn-group flex");
757
- },
758
- m(g, d) {
759
- T(g, e, d), b(e, t), b(t, n), b(e, f), b(e, l), b(l, o), u || (_ = [
760
- fe(
761
- t,
762
- "click",
763
- /*click_handler*/
764
- i[54]
765
- ),
766
- fe(
767
- l,
768
- "click",
769
- /*click_handler_1*/
770
- i[55]
771
- )
772
- ], u = !0);
773
- },
774
- p(g, d) {
775
- d[1] & /*$_*/
776
- 1 && a !== (a = /*$_*/
777
- g[31]("faceCollector.finish") + "") && P(n, a), d[0] & /*$justification*/
778
- 268435456 && r !== (r = /*$justification*/
779
- g[28].length === 0) && (t.disabled = r), d[1] & /*$_*/
780
- 1 && c !== (c = /*$_*/
781
- g[31]("faceCollector.retakePhoto") + "") && P(o, c);
782
- },
783
- d(g) {
784
- g && D(e), u = !1, Ct(_);
785
- }
786
- };
787
- }
788
- function Wa(i) {
789
- let e, t;
790
- return e = new pa({ props: { handler: (
791
- /*func*/
792
- i[64]
793
- ) } }), {
794
- c() {
795
- _e(e.$$.fragment);
796
- },
797
- m(a, n) {
798
- be(e, a, n), t = !0;
799
- },
800
- p: Y,
801
- i(a) {
802
- t || (H(e.$$.fragment, a), t = !0);
803
- },
804
- o(a) {
805
- G(e.$$.fragment, a), t = !1;
806
- },
807
- d(a) {
808
- ge(e, a);
809
- }
810
- };
811
- }
812
- function Ma(i) {
813
- let e, t, a, n, r, f, l, c, o;
814
- const u = [
815
- Ka,
816
- ja,
817
- za,
818
- Va,
819
- Ua
820
- ], _ = [];
821
- function g(d, C) {
822
- return (
823
- /*$captured*/
824
- d[25] ? (
825
- /*$unconformitiesStore*/
826
- d[32].isLoading ? 1 : (
827
- /*$requestResult*/
828
- d[30] !== j.OK ? 2 : (
829
- /*$saved*/
830
- d[27] ? 4 : 3
831
- )
832
- )
833
- ) : 0
834
- );
835
- }
836
- return f = g(i), l = _[f] = u[f](i), {
837
- c() {
838
- e = w("div"), t = w("img"), r = F(), l.c(), h(t, "class", "m-auto col-start-1 col-end-1 max-h-[23.2em]"), Ge(t.src, a = /*$dataTypePrefix*/
839
- i[33] + "," + /*$image*/
840
- i[29]) || h(t, "src", a), t.hidden = n = !/*$captured*/
841
- i[25] || !/*$showFaceWhileValidating*/
842
- i[35] && /*$unconformitiesStore*/
843
- i[32].isLoading, h(t, "alt", ""), h(e, "class", c = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (!/*$showFaceWhileValidating*/
844
- i[35] && /*$unconformitiesStore*/
845
- i[32].isLoading ? "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible" : "grid overflow-hidden"));
846
- },
847
- m(d, C) {
848
- T(d, e, C), b(e, t), b(e, r), _[f].m(e, null), o = !0;
849
- },
850
- p(d, C) {
851
- (!o || C[0] & /*$image*/
852
- 536870912 | C[1] & /*$dataTypePrefix*/
853
- 4 && !Ge(t.src, a = /*$dataTypePrefix*/
854
- d[33] + "," + /*$image*/
855
- d[29])) && h(t, "src", a), (!o || C[0] & /*$captured*/
856
- 33554432 | C[1] & /*$showFaceWhileValidating, $unconformitiesStore*/
857
- 18 && n !== (n = !/*$captured*/
858
- d[25] || !/*$showFaceWhileValidating*/
859
- d[35] && /*$unconformitiesStore*/
860
- d[32].isLoading)) && (t.hidden = n);
861
- let p = f;
862
- f = g(d), f === p ? _[f].p(d, C) : (Qe(), G(_[p], 1, 1, () => {
863
- _[p] = null;
864
- }), Xe(), l = _[f], l ? l.p(d, C) : (l = _[f] = u[f](d), l.c()), H(l, 1), l.m(e, null)), (!o || C[1] & /*$showFaceWhileValidating, $unconformitiesStore*/
865
- 18 && c !== (c = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (!/*$showFaceWhileValidating*/
866
- d[35] && /*$unconformitiesStore*/
867
- d[32].isLoading ? "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible" : "grid overflow-hidden"))) && h(e, "class", c);
868
- },
869
- i(d) {
870
- o || (H(l), o = !0);
871
- },
872
- o(d) {
873
- G(l), o = !1;
874
- },
875
- d(d) {
876
- d && D(e), _[f].d();
877
- }
878
- };
879
- }
880
- function Ua(i) {
881
- let e, t, a = (
882
- /*$_*/
883
- i[31]("faceCollector.captured") + ""
884
- ), n, r, f, l, c, o = (
885
- /*$_*/
886
- i[31]("faceCollector.retakePhoto") + ""
887
- ), u, _, g = _t(ha).faceStrategy !== ma.DISABLED, d, C, p, v = (
888
- /*$unconformitiesStore*/
889
- i[32].unconformities.length !== 0 && Ki(i)
890
- ), E = g && Ha();
891
- return {
892
- c() {
893
- e = w("div"), t = w("h1"), n = S(a), r = F(), v && v.c(), f = F(), l = w("div"), c = w("button"), u = S(o), _ = F(), E && E.c(), h(t, "class", "text-3xl font-bold pb-[1em] transition-opacity"), h(c, "id", "bry-cc-retake-button"), h(c, "class", "ce-dui-btn ce-dui-btn-block flex-shrink text-base"), h(l, "class", "flex flex-row"), Si(l, "ce-dui-btn-group", !/*$exportButtonDisabled*/
894
- i[36]);
895
- },
896
- m(R, V) {
897
- T(R, e, V), b(e, t), b(t, n), b(e, r), v && v.m(e, null), b(e, f), b(e, l), b(l, c), b(c, u), b(l, _), E && E.m(l, null), d = !0, C || (p = fe(
898
- c,
899
- "click",
900
- /*click_handler_6*/
901
- i[63]
902
- ), C = !0);
903
- },
904
- p(R, V) {
905
- (!d || V[1] & /*$_*/
906
- 1) && a !== (a = /*$_*/
907
- R[31]("faceCollector.captured") + "") && P(n, a), /*$unconformitiesStore*/
908
- R[32].unconformities.length !== 0 ? v ? v.p(R, V) : (v = Ki(R), v.c(), v.m(e, f)) : v && (v.d(1), v = null), (!d || V[1] & /*$_*/
909
- 1) && o !== (o = /*$_*/
910
- R[31]("faceCollector.retakePhoto") + "") && P(u, o), (!d || V[1] & /*$exportButtonDisabled*/
911
- 32) && Si(l, "ce-dui-btn-group", !/*$exportButtonDisabled*/
912
- R[36]);
913
- },
914
- i(R) {
915
- d || (H(E), d = !0);
916
- },
917
- o(R) {
918
- G(E), d = !1;
919
- },
920
- d(R) {
921
- R && D(e), v && v.d(), E && E.d(), C = !1, p();
922
- }
923
- };
924
- }
925
- function Va(i) {
926
- let e, t, a = (
927
- /*evaluatePhoto*/
928
- (i[2] ? (
929
- /*$unconformitiesStore*/
930
- i[32].unconformities.length === 0 ? (
931
- /*$_*/
932
- i[31]("faceCollector.everythingOk")
933
- ) : (
934
- /*$_*/
935
- i[31]("faceCollector.unconformities")
936
- )
937
- ) : (
938
- /*$_*/
939
- i[31]("faceCollector.previewCapture")
940
- )) + ""
941
- ), n, r, f, l, c, o, u = (
942
- /*$unconformitiesStore*/
943
- i[32].unconformities
944
- ), _ = [];
945
- for (let p = 0; p < u.length; p += 1)
946
- _[p] = Hi(Mi(i, u, p));
947
- let g = (
948
- /*evaluatePhoto*/
949
- i[2] && /*$unconformitiesStore*/
950
- i[32].unconformities.length == 0 && qi(i)
951
- ), d = (
952
- /*showJustificationField*/
953
- i[7] && /*$unconformitiesStore*/
954
- i[32].unconformities.length > 0 && Ji(i)
955
- ), C = (
956
- /*$captured*/
957
- i[25] && Qi(i)
958
- );
959
- return {
960
- c() {
961
- e = w("div"), t = w("h1"), n = S(a), r = F(), f = w("div");
962
- for (let p = 0; p < _.length; p += 1)
963
- _[p].c();
964
- l = F(), g && g.c(), c = F(), d && d.c(), o = F(), C && C.c(), h(t, "class", "text-3xl font-bold transition-opacity"), h(f, "class", "flex flex-wrap"), h(e, "class", "flex flex-col justify-between");
965
- },
966
- m(p, v) {
967
- T(p, e, v), b(e, t), b(t, n), b(e, r), b(e, f);
968
- for (let E = 0; E < _.length; E += 1)
969
- _[E] && _[E].m(f, null);
970
- b(f, l), g && g.m(f, null), b(e, c), d && d.m(e, null), b(e, o), C && C.m(e, null);
971
- },
972
- p(p, v) {
973
- if (v[0] & /*evaluatePhoto*/
974
- 4 | v[1] & /*$unconformitiesStore, $_*/
975
- 3 && a !== (a = /*evaluatePhoto*/
976
- (p[2] ? (
977
- /*$unconformitiesStore*/
978
- p[32].unconformities.length === 0 ? (
979
- /*$_*/
980
- p[31]("faceCollector.everythingOk")
981
- ) : (
982
- /*$_*/
983
- p[31]("faceCollector.unconformities")
984
- )
985
- ) : (
986
- /*$_*/
987
- p[31]("faceCollector.previewCapture")
988
- )) + "") && P(n, a), v[1] & /*$unconformitiesStore*/
989
- 2) {
990
- u = /*$unconformitiesStore*/
991
- p[32].unconformities;
992
- let E;
993
- for (E = 0; E < u.length; E += 1) {
994
- const R = Mi(p, u, E);
995
- _[E] ? _[E].p(R, v) : (_[E] = Hi(R), _[E].c(), _[E].m(f, l));
996
- }
997
- for (; E < _.length; E += 1)
998
- _[E].d(1);
999
- _.length = u.length;
1000
- }
1001
- /*evaluatePhoto*/
1002
- p[2] && /*$unconformitiesStore*/
1003
- p[32].unconformities.length == 0 ? g ? g.p(p, v) : (g = qi(p), g.c(), g.m(f, null)) : g && (g.d(1), g = null), /*showJustificationField*/
1004
- p[7] && /*$unconformitiesStore*/
1005
- p[32].unconformities.length > 0 ? d ? d.p(p, v) : (d = Ji(p), d.c(), d.m(e, o)) : d && (d.d(1), d = null), /*$captured*/
1006
- p[25] ? C ? C.p(p, v) : (C = Qi(p), C.c(), C.m(e, null)) : C && (C.d(1), C = null);
1007
- },
1008
- i: Y,
1009
- o: Y,
1010
- d(p) {
1011
- p && D(e), $i(_, p), g && g.d(), d && d.d(), C && C.d();
1012
- }
1013
- };
1014
- }
1015
- function za(i) {
1016
- let e, t, a, n, r = (
1017
- /*$_*/
1018
- i[31]("faceCollector.finish") + ""
1019
- ), f, l, c, o = (
1020
- /*$_*/
1021
- i[31]("faceCollector.retakePhoto") + ""
1022
- ), u, _, g;
1023
- function d(v, E) {
1024
- return (
1025
- /*$requestResult*/
1026
- v[30] === j.LIVENESS_DETECTION_FAILURE || /*$requestResult*/
1027
- v[30] === j.UNKNOWN_LIVENESS_ERROR ? Za : (
1028
- /*$requestResult*/
1029
- v[30] === j.LOW_LIVENESS_SCORE ? Ya : (
1030
- /*$requestResult*/
1031
- v[30] === j.TEMPLATE_EXTRACTION_ERROR || /*$requestResult*/
1032
- v[30] === j.UNKNOWN_TEMPLATE_EXTRACTION_ERROR ? Ga : (
1033
- /*$requestResult*/
1034
- v[30] === j.UNABLE_TO_COMMUNICATE_WITH_TEMPLATE_EXTRACTION_SERVICE ? Xa : (
1035
- /*$requestResult*/
1036
- v[30] === j.LIVENESS_EVALUATION_ERROR ? Qa : (
1037
- /*$requestResult*/
1038
- v[30] === j.INSUFFICIENT_FACE_QUALITY ? Ja : qa
1039
- )
1040
- )
1041
- )
1042
- )
1043
- )
1044
- );
1045
- }
1046
- let C = d(i), p = C(i);
1047
- return {
1048
- c() {
1049
- e = w("div"), p.c(), t = F(), a = w("div"), n = w("button"), f = S(r), l = F(), c = w("button"), u = S(o), n.disabled = !0, h(n, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), h(c, "id", "bry-cc-retake-button"), h(c, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), h(a, "class", "ce-dui-btn-group flex"), h(e, "class", "flex flex-col justify-between");
1050
- },
1051
- m(v, E) {
1052
- T(v, e, E), p.m(e, null), b(e, t), b(e, a), b(a, n), b(n, f), b(a, l), b(a, c), b(c, u), _ || (g = [
1053
- fe(
1054
- n,
1055
- "click",
1056
- /*click_handler_2*/
1057
- i[57]
1058
- ),
1059
- fe(
1060
- c,
1061
- "click",
1062
- /*click_handler_3*/
1063
- i[58]
1064
- )
1065
- ], _ = !0);
1066
- },
1067
- p(v, E) {
1068
- C === (C = d(v)) && p ? p.p(v, E) : (p.d(1), p = C(v), p && (p.c(), p.m(e, t))), E[1] & /*$_*/
1069
- 1 && r !== (r = /*$_*/
1070
- v[31]("faceCollector.finish") + "") && P(f, r), E[1] & /*$_*/
1071
- 1 && o !== (o = /*$_*/
1072
- v[31]("faceCollector.retakePhoto") + "") && P(u, o);
1073
- },
1074
- i: Y,
1075
- o: Y,
1076
- d(v) {
1077
- v && D(e), p.d(), _ = !1, Ct(g);
1078
- }
1079
- };
1080
- }
1081
- function ja(i) {
1082
- let e, t, a = (
1083
- /*$_*/
1084
- i[31]("faceCollector.validating") + ""
1085
- ), n, r, f;
1086
- return {
1087
- c() {
1088
- e = w("div"), t = w("h1"), n = S(a), r = F(), f = w("div"), h(t, "class", "inline-block text-3xl font-bold pb-[1em] transition-opacity"), h(f, "class", "ml-6 inline-block dot-typing"), h(e, "class", "min-w-[200px]");
1089
- },
1090
- m(l, c) {
1091
- T(l, e, c), b(e, t), b(t, n), b(e, r), b(e, f);
1092
- },
1093
- p(l, c) {
1094
- c[1] & /*$_*/
1095
- 1 && a !== (a = /*$_*/
1096
- l[31]("faceCollector.validating") + "") && P(n, a);
1097
- },
1098
- i: Y,
1099
- o: Y,
1100
- d(l) {
1101
- l && D(e);
1102
- }
1103
- };
1104
- }
1105
- function Ka(i) {
1106
- let e;
1107
- return {
1108
- c() {
1109
- e = w("div"), h(e, "class", "");
1110
- },
1111
- m(t, a) {
1112
- T(t, e, a);
1113
- },
1114
- p: Y,
1115
- i: Y,
1116
- o: Y,
1117
- d(t) {
1118
- t && D(e);
1119
- }
1120
- };
1121
- }
1122
- function Ki(i) {
1123
- let e, t, a = (
1124
- /*$_*/
1125
- i[31]("faceCollector.justification") + ""
1126
- ), n, r, f, l, c;
1127
- return {
1128
- c() {
1129
- e = w("label"), t = w("span"), n = S(a), r = F(), f = w("textarea"), h(t, "class", "ce-dui-label-text text-base"), h(e, "class", "ce-dui-label"), h(e, "for", "justification"), h(f, "contenteditable", ""), h(f, "id", "justification"), h(f, "class", "ce-dui-textarea ce-dui-textarea-bordered textarea-ghost h-[6em] w-full text-base");
1130
- },
1131
- m(o, u) {
1132
- T(o, e, u), b(e, t), b(t, n), T(o, r, u), T(o, f, u), bt(
1133
- f,
1134
- /*$justification*/
1135
- i[28]
1136
- ), l || (c = fe(
1137
- f,
1138
- "input",
1139
- /*textarea_input_handler_1*/
1140
- i[62]
1141
- ), l = !0);
1142
- },
1143
- p(o, u) {
1144
- u[1] & /*$_*/
1145
- 1 && a !== (a = /*$_*/
1146
- o[31]("faceCollector.justification") + "") && P(n, a), u[0] & /*$justification*/
1147
- 268435456 && bt(
1148
- f,
1149
- /*$justification*/
1150
- o[28]
1151
- );
1152
- },
1153
- d(o) {
1154
- o && D(e), o && D(r), o && D(f), l = !1, c();
1155
- }
1156
- };
1157
- }
1158
- function Ha(i) {
1159
- let e, t;
1160
- return e = new _a({
1161
- props: { cssClass: "ce-dui-btn-block flex-shrink" }
1162
- }), {
1163
- c() {
1164
- _e(e.$$.fragment);
1165
- },
1166
- m(a, n) {
1167
- be(e, a, n), t = !0;
1168
- },
1169
- i(a) {
1170
- t || (H(e.$$.fragment, a), t = !0);
1171
- },
1172
- o(a) {
1173
- G(e.$$.fragment, a), t = !1;
1174
- },
1175
- d(a) {
1176
- ge(e, a);
1177
- }
1178
- };
1179
- }
1180
- function Hi(i) {
1181
- let e, t = (
1182
- /*unconformity*/
1183
- i[125] + ""
1184
- ), a;
1185
- return {
1186
- c() {
1187
- e = w("div"), a = S(t), h(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-error text-xl pb-[.25em] m-[.5em]");
1188
- },
1189
- m(n, r) {
1190
- T(n, e, r), b(e, a);
1191
- },
1192
- p(n, r) {
1193
- r[1] & /*$unconformitiesStore*/
1194
- 2 && t !== (t = /*unconformity*/
1195
- n[125] + "") && P(a, t);
1196
- },
1197
- d(n) {
1198
- n && D(e);
1199
- }
1200
- };
1201
- }
1202
- function qi(i) {
1203
- let e, t = (
1204
- /*$_*/
1205
- i[31]("faceCollector.noNonconformity") + ""
1206
- ), a;
1207
- return {
1208
- c() {
1209
- e = w("div"), a = S(t), h(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-info text-xl pb-[.25em] m-[.5em]");
1210
- },
1211
- m(n, r) {
1212
- T(n, e, r), b(e, a);
1213
- },
1214
- p(n, r) {
1215
- r[1] & /*$_*/
1216
- 1 && t !== (t = /*$_*/
1217
- n[31]("faceCollector.noNonconformity") + "") && P(a, t);
1218
- },
1219
- d(n) {
1220
- n && D(e);
1221
- }
1222
- };
1223
- }
1224
- function Ji(i) {
1225
- let e, t, a, n = (
1226
- /*$_*/
1227
- i[31]("faceCollector.provideAReasonForTheLowQualityCapture") + ""
1228
- ), r, f, l, c, o, u, _, g, d = (
1229
- /*$_*/
1230
- i[31]("faceCollector.thisInformationIsRequired") + ""
1231
- ), C, p, v, E;
1232
- return {
1233
- c() {
1234
- e = w("div"), t = w("label"), a = w("span"), r = S(n), f = F(), l = w("textarea"), o = F(), u = w("label"), _ = w("span"), g = S("("), C = S(d), p = S(")"), h(a, "class", "ce-dui-label-text text-base"), h(t, "class", "ce-dui-label"), h(t, "for", "justification"), h(l, "contenteditable", ""), h(l, "id", "justification"), h(l, "class", "ce-dui-textarea ce-dui-textarea-bordered h-[6em] text-base"), h(l, "placeholder", c = /*$_*/
1235
- i[31]("faceCollector.yourJustification")), h(_, "class", "ce-dui-label-text-alt text-base"), h(u, "class", "ce-dui-label"), h(u, "for", "justification"), h(e, "class", "ce-dui-form-control");
1236
- },
1237
- m(R, V) {
1238
- T(R, e, V), b(e, t), b(t, a), b(a, r), b(e, f), b(e, l), bt(
1239
- l,
1240
- /*$justification*/
1241
- i[28]
1242
- ), b(e, o), b(e, u), b(u, _), b(_, g), b(_, C), b(_, p), v || (E = fe(
1243
- l,
1244
- "input",
1245
- /*textarea_input_handler*/
1246
- i[59]
1247
- ), v = !0);
1248
- },
1249
- p(R, V) {
1250
- V[1] & /*$_*/
1251
- 1 && n !== (n = /*$_*/
1252
- R[31]("faceCollector.provideAReasonForTheLowQualityCapture") + "") && P(r, n), V[1] & /*$_*/
1253
- 1 && c !== (c = /*$_*/
1254
- R[31]("faceCollector.yourJustification")) && h(l, "placeholder", c), V[0] & /*$justification*/
1255
- 268435456 && bt(
1256
- l,
1257
- /*$justification*/
1258
- R[28]
1259
- ), V[1] & /*$_*/
1260
- 1 && d !== (d = /*$_*/
1261
- R[31]("faceCollector.thisInformationIsRequired") + "") && P(C, d);
1262
- },
1263
- d(R) {
1264
- R && D(e), v = !1, E();
1265
- }
1266
- };
1267
- }
1268
- function Qi(i) {
1269
- let e, t, a = (
1270
- /*$_*/
1271
- i[31]("faceCollector.finish") + ""
1272
- ), n, r, f, l, c = (
1273
- /*$_*/
1274
- i[31]("faceCollector.retakePhoto") + ""
1275
- ), o, u, _;
1276
- return {
1277
- c() {
1278
- e = w("div"), t = w("button"), n = S(a), f = F(), l = w("button"), o = S(c), t.disabled = r = /*evaluatePhoto*/
1279
- i[2] && /*showJustificationField*/
1280
- i[7] && /*$justification*/
1281
- i[28].length === 0 && /*$unconformitiesStore*/
1282
- i[32].unconformities.length !== 0, h(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink text-base"), h(l, "id", "bry-cc-retake-button"), h(l, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink text-base"), h(e, "class", "ce-dui-btn-group flex");
1283
- },
1284
- m(g, d) {
1285
- T(g, e, d), b(e, t), b(t, n), b(e, f), b(e, l), b(l, o), u || (_ = [
1286
- fe(
1287
- t,
1288
- "click",
1289
- /*click_handler_4*/
1290
- i[60]
1291
- ),
1292
- fe(
1293
- l,
1294
- "click",
1295
- /*click_handler_5*/
1296
- i[61]
1297
- )
1298
- ], u = !0);
1299
- },
1300
- p(g, d) {
1301
- d[1] & /*$_*/
1302
- 1 && a !== (a = /*$_*/
1303
- g[31]("faceCollector.finish") + "") && P(n, a), d[0] & /*evaluatePhoto, showJustificationField, $justification*/
1304
- 268435588 | d[1] & /*$unconformitiesStore*/
1305
- 2 && r !== (r = /*evaluatePhoto*/
1306
- g[2] && /*showJustificationField*/
1307
- g[7] && /*$justification*/
1308
- g[28].length === 0 && /*$unconformitiesStore*/
1309
- g[32].unconformities.length !== 0) && (t.disabled = r), d[1] & /*$_*/
1310
- 1 && c !== (c = /*$_*/
1311
- g[31]("faceCollector.retakePhoto") + "") && P(o, c);
1312
- },
1313
- d(g) {
1314
- g && D(e), u = !1, Ct(_);
1315
- }
1316
- };
1317
- }
1318
- function qa(i) {
1319
- let e, t = (
1320
- /*$_*/
1321
- i[31]("faceCollector.everythingOk") + ""
1322
- ), a;
1323
- return {
1324
- c() {
1325
- e = w("h1"), a = S(t), h(e, "class", "text-3xl font-bold pb-[1em] transition-opacity");
1326
- },
1327
- m(n, r) {
1328
- T(n, e, r), b(e, a);
1329
- },
1330
- p(n, r) {
1331
- r[1] & /*$_*/
1332
- 1 && t !== (t = /*$_*/
1333
- n[31]("faceCollector.everythingOk") + "") && P(a, t);
1334
- },
1335
- d(n) {
1336
- n && D(e);
1337
- }
1338
- };
1339
- }
1340
- function Ja(i) {
1341
- let e, t, a, n, r = (
1342
- /*$_*/
1343
- i[31]("liveness.error.faceQualityInsufficient") + ""
1344
- ), f, l = (
1345
- /*$unconformitiesStore*/
1346
- i[32].unconformities
1347
- ), c = [];
1348
- for (let u = 0; u < l.length; u += 1)
1349
- c[u] = Xi(Ui(i, l, u));
1350
- let o = (
1351
- /*evaluatePhoto*/
1352
- i[2] && /*$unconformitiesStore*/
1353
- i[32].unconformities.length == 0 && Gi(i)
1354
- );
1355
- return {
1356
- c() {
1357
- e = w("div");
1358
- for (let u = 0; u < c.length; u += 1)
1359
- c[u].c();
1360
- t = F(), o && o.c(), a = F(), n = w("h1"), f = S(r), h(e, "class", "flex flex-wrap"), h(n, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
1361
- },
1362
- m(u, _) {
1363
- T(u, e, _);
1364
- for (let g = 0; g < c.length; g += 1)
1365
- c[g] && c[g].m(e, null);
1366
- b(e, t), o && o.m(e, null), T(u, a, _), T(u, n, _), b(n, f);
1367
- },
1368
- p(u, _) {
1369
- if (_[1] & /*$unconformitiesStore*/
1370
- 2) {
1371
- l = /*$unconformitiesStore*/
1372
- u[32].unconformities;
1373
- let g;
1374
- for (g = 0; g < l.length; g += 1) {
1375
- const d = Ui(u, l, g);
1376
- c[g] ? c[g].p(d, _) : (c[g] = Xi(d), c[g].c(), c[g].m(e, t));
1377
- }
1378
- for (; g < c.length; g += 1)
1379
- c[g].d(1);
1380
- c.length = l.length;
1381
- }
1382
- /*evaluatePhoto*/
1383
- u[2] && /*$unconformitiesStore*/
1384
- u[32].unconformities.length == 0 ? o ? o.p(u, _) : (o = Gi(u), o.c(), o.m(e, null)) : o && (o.d(1), o = null), _[1] & /*$_*/
1385
- 1 && r !== (r = /*$_*/
1386
- u[31]("liveness.error.faceQualityInsufficient") + "") && P(f, r);
1387
- },
1388
- d(u) {
1389
- u && D(e), $i(c, u), o && o.d(), u && D(a), u && D(n);
1390
- }
1391
- };
1392
- }
1393
- function Qa(i) {
1394
- let e, t = (
1395
- /*$_*/
1396
- i[31]("liveness.error.evaluationError") + ""
1397
- ), a;
1398
- return {
1399
- c() {
1400
- e = w("h1"), a = S(t), h(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
1401
- },
1402
- m(n, r) {
1403
- T(n, e, r), b(e, a);
1404
- },
1405
- p(n, r) {
1406
- r[1] & /*$_*/
1407
- 1 && t !== (t = /*$_*/
1408
- n[31]("liveness.error.evaluationError") + "") && P(a, t);
1409
- },
1410
- d(n) {
1411
- n && D(e);
1412
- }
1413
- };
1414
- }
1415
- function Xa(i) {
1416
- let e, t = (
1417
- /*$_*/
1418
- i[31]("faceCollector.unableToCompleteRequest") + ""
1419
- ), a;
1420
- return {
1421
- c() {
1422
- e = w("h1"), a = S(t), h(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
1423
- },
1424
- m(n, r) {
1425
- T(n, e, r), b(e, a);
1426
- },
1427
- p(n, r) {
1428
- r[1] & /*$_*/
1429
- 1 && t !== (t = /*$_*/
1430
- n[31]("faceCollector.unableToCompleteRequest") + "") && P(a, t);
1431
- },
1432
- d(n) {
1433
- n && D(e);
1434
- }
1435
- };
1436
- }
1437
- function Ga(i) {
1438
- let e, t = (
1439
- /*$_*/
1440
- i[31]("faceCollector.lowQualityCapture") + ""
1441
- ), a;
1442
- return {
1443
- c() {
1444
- e = w("h1"), a = S(t), h(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
1445
- },
1446
- m(n, r) {
1447
- T(n, e, r), b(e, a);
1448
- },
1449
- p(n, r) {
1450
- r[1] & /*$_*/
1451
- 1 && t !== (t = /*$_*/
1452
- n[31]("faceCollector.lowQualityCapture") + "") && P(a, t);
1453
- },
1454
- d(n) {
1455
- n && D(e);
1456
- }
1457
- };
1458
- }
1459
- function Ya(i) {
1460
- let e, t = (
1461
- /*$_*/
1462
- i[31]("liveness.error.error") + ""
1463
- ), a, n, r = (
1464
- /*$_*/
1465
- i[31]("faceCollector.unaliveCapture") + ""
1466
- ), f;
1467
- return {
1468
- c() {
1469
- e = w("h1"), a = S(t), n = S(": "), f = S(r), h(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
1470
- },
1471
- m(l, c) {
1472
- T(l, e, c), b(e, a), b(e, n), b(e, f);
1473
- },
1474
- p(l, c) {
1475
- c[1] & /*$_*/
1476
- 1 && t !== (t = /*$_*/
1477
- l[31]("liveness.error.error") + "") && P(a, t), c[1] & /*$_*/
1478
- 1 && r !== (r = /*$_*/
1479
- l[31]("faceCollector.unaliveCapture") + "") && P(f, r);
1480
- },
1481
- d(l) {
1482
- l && D(e);
1483
- }
1484
- };
1485
- }
1486
- function Za(i) {
1487
- let e, t = (
1488
- /*$_*/
1489
- i[31]("liveness.error.error") + ""
1490
- ), a, n, r = (
1491
- /*$_*/
1492
- i[31](
1493
- /*livenessError*/
1494
- i[21]
1495
- ) + ""
1496
- ), f;
1497
- return {
1498
- c() {
1499
- e = w("h1"), a = S(t), n = S(": "), f = S(r), h(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error");
1500
- },
1501
- m(l, c) {
1502
- T(l, e, c), b(e, a), b(e, n), b(e, f);
1503
- },
1504
- p(l, c) {
1505
- c[1] & /*$_*/
1506
- 1 && t !== (t = /*$_*/
1507
- l[31]("liveness.error.error") + "") && P(a, t), c[0] & /*livenessError*/
1508
- 2097152 | c[1] & /*$_*/
1509
- 1 && r !== (r = /*$_*/
1510
- l[31](
1511
- /*livenessError*/
1512
- l[21]
1513
- ) + "") && P(f, r);
1514
- },
1515
- d(l) {
1516
- l && D(e);
1517
- }
1518
- };
1519
- }
1520
- function Xi(i) {
1521
- let e, t = (
1522
- /*unconformity*/
1523
- i[125] + ""
1524
- ), a;
1525
- return {
1526
- c() {
1527
- e = w("div"), a = S(t), h(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-error text-xl pb-[.25em] m-[.5em]");
1528
- },
1529
- m(n, r) {
1530
- T(n, e, r), b(e, a);
1531
- },
1532
- p(n, r) {
1533
- r[1] & /*$unconformitiesStore*/
1534
- 2 && t !== (t = /*unconformity*/
1535
- n[125] + "") && P(a, t);
1536
- },
1537
- d(n) {
1538
- n && D(e);
1539
- }
1540
- };
1541
- }
1542
- function Gi(i) {
1543
- let e, t = (
1544
- /*$_*/
1545
- i[31]("faceCollector.noNonconformity") + ""
1546
- ), a;
1547
- return {
1548
- c() {
1549
- e = w("div"), a = S(t), h(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-info text-xl pb-[.25em] m-[.5em]");
1550
- },
1551
- m(n, r) {
1552
- T(n, e, r), b(e, a);
1553
- },
1554
- p(n, r) {
1555
- r[1] & /*$_*/
1556
- 1 && t !== (t = /*$_*/
1557
- n[31]("faceCollector.noNonconformity") + "") && P(a, t);
1558
- },
1559
- d(n) {
1560
- n && D(e);
1561
- }
1562
- };
1563
- }
1564
- function xa(i) {
1565
- let e, t, a, n, r, f, l, c, o, u, _ = (
1566
- /*$videoStore*/
1567
- i[34] && Vi(i)
1568
- );
1569
- n = new is({
1570
- props: {
1571
- waitingIdrndCaptureEvent: (
1572
- /*waitingIdrndCaptureEvent*/
1573
- i[20]
1574
- ),
1575
- idrndLoading: (
1576
- /*idrndLoading*/
1577
- i[18]
1578
- )
1579
- }
1580
- });
1581
- let g = (
1582
- /*$captured*/
1583
- i[25] && ji(i)
1584
- );
1585
- const d = [Ma, Wa], C = [];
1586
- function p(v, E) {
1587
- return (!/*idrndClosed*/
1588
- v[19] || /*$captured*/
1589
- v[25]) && /*showUnconformities*/
1590
- v[3] ? 0 : (
1591
- /*$cameraStatusStore*/
1592
- v[22] !== B.OK ? 1 : -1
1593
- );
1594
- }
1595
- return ~(l = p(i)) && (c = C[l] = d[l](i)), {
1596
- c() {
1597
- e = w("div"), t = w("div"), _ && _.c(), a = F(), _e(n.$$.fragment), r = F(), g && g.c(), f = F(), c && c.c(), o = Yi(), this.c = Y, h(t, "class", "relative mx-auto"), h(e, "class", "flex flex-col justify-between");
1598
- },
1599
- m(v, E) {
1600
- T(v, e, E), b(e, t), _ && _.m(t, null), b(t, a), be(n, t, null), b(t, r), g && g.m(t, null), i[56](e), T(v, f, E), ~l && C[l].m(v, E), T(v, o, E), u = !0;
1601
- },
1602
- p(v, E) {
1603
- /*$videoStore*/
1604
- v[34] ? _ ? (_.p(v, E), E[1] & /*$videoStore*/
1605
- 8 && H(_, 1)) : (_ = Vi(v), _.c(), H(_, 1), _.m(t, a)) : _ && (Qe(), G(_, 1, 1, () => {
1606
- _ = null;
1607
- }), Xe());
1608
- const R = {};
1609
- E[0] & /*waitingIdrndCaptureEvent*/
1610
- 1048576 && (R.waitingIdrndCaptureEvent = /*waitingIdrndCaptureEvent*/
1611
- v[20]), E[0] & /*idrndLoading*/
1612
- 262144 && (R.idrndLoading = /*idrndLoading*/
1613
- v[18]), n.$set(R), /*$captured*/
1614
- v[25] ? g ? g.p(v, E) : (g = ji(v), g.c(), g.m(t, null)) : g && (g.d(1), g = null);
1615
- let V = l;
1616
- l = p(v), l === V ? ~l && C[l].p(v, E) : (c && (Qe(), G(C[V], 1, 1, () => {
1617
- C[V] = null;
1618
- }), Xe()), ~l ? (c = C[l], c ? c.p(v, E) : (c = C[l] = d[l](v), c.c()), H(c, 1), c.m(o.parentNode, o)) : c = null);
1619
- },
1620
- i(v) {
1621
- u || (H(_), H(n.$$.fragment, v), H(c), u = !0);
1622
- },
1623
- o(v) {
1624
- G(_), G(n.$$.fragment, v), G(c), u = !1;
1625
- },
1626
- d(v) {
1627
- v && D(e), _ && _.d(), ge(n), g && g.d(), i[56](null), v && D(f), ~l && C[l].d(v), v && D(o);
1628
- }
1629
- };
1630
- }
1631
- let $a = 0, en = 3e3;
1632
- function tn() {
1633
- ({}).VITE_USE_DEV === "true" ? import("./index-idlf-detector_39cfdffa_3.3.0-RC05.js") : import("./index-idlf-detector_a819b3c8_3.3.0-RC05.js");
1634
- }
1635
- function sn(i, e, t) {
1636
- let a, n, r, f, l, c, o, u, _, g, d, C, p, v, E, R, V, x, K, q, A, W, Z, J, I, Re, ie, de, Ce, Se, Et, re, ti, yt, kt, Tt, ii, si;
1637
- O(i, jt, (s) => t(76, a = s)), O(i, Kt, (s) => t(77, n = s)), O(i, it, (s) => t(79, f = s)), O(i, st, (s) => t(80, l = s)), O(i, at, (s) => t(81, c = s)), O(i, Q, (s) => t(22, o = s)), O(i, qe, (s) => t(23, u = s)), O(i, Ws, (s) => t(82, _ = s)), O(i, nt, (s) => t(83, g = s)), O(i, we, (s) => t(24, d = s)), O(i, Ms, (s) => t(84, C = s)), O(i, Le, (s) => t(25, p = s)), O(i, Ht, (s) => t(85, v = s)), O(i, xi, (s) => t(26, E = s)), O(i, ki, (s) => t(86, R = s)), O(i, Us, (s) => t(87, V = s)), O(i, je, (s) => t(88, x = s)), O(i, ke, (s) => t(89, K = s)), O(i, Vs, (s) => t(90, q = s)), O(i, zs, (s) => t(91, A = s)), O(i, qt, (s) => t(27, W = s)), O(i, Jt, (s) => t(28, Z = s)), O(i, me, (s) => t(29, J = s)), O(i, ae, (s) => t(30, I = s)), O(i, Zi, (s) => t(31, Re = s)), O(i, Te, (s) => t(32, ie = s)), O(i, Ti, (s) => t(92, Ce = s)), O(i, ot, (s) => t(93, Se = s)), O(i, Qt, (s) => t(94, Et = s)), O(i, Je, (s) => t(34, re = s)), O(i, js, (s) => t(95, ti = s)), O(i, lt, (s) => t(96, yt = s)), O(i, Oi, (s) => t(97, kt = s)), O(i, Ri, (s) => t(98, Tt = s)), O(i, Ks, (s) => t(35, ii = s)), O(i, Hs, (s) => t(36, si = s));
1638
- let L, ne, ve, ai, ni = !1, Ne = !1, Ot = !1, Rt = !1, Dt = (/* @__PURE__ */ new Date()).getTime(), { enableMinutiae: It } = e, { videoDimensions: At } = e, { noTabs: Lt } = e, { weightsPath: Ft } = e, { evaluatePhoto: pe } = e, { showCaptureButton: St } = e, { showUnconformities: oi } = e, { showConfigButton: li } = e, { showAutoCaptureButton: Nt } = e, { showCameraButton: ri } = e, { showJustificationField: ci } = e, { minEyeToEyeDist: Pe } = e, { showWatermark: ui } = e, { videoOverlay: fi } = e, { videoOverlayTransparency: di } = e, { faceDetectionSensitivity: Pt } = e, { hidden: Bt } = e, { livenessBlobSize: hi } = e;
1639
- const Ye = xt(!1);
1640
- O(i, Ye, (s) => t(78, r = s));
1641
- const De = xt("data:image/png;base64");
1642
- O(i, De, (s) => t(33, de = s));
1643
- let { widgetInstance: X } = e, ss = new ya(), Be = !1, Wt = !1, Ze = !0, ce = !0, We = !1, mi = 0, se = "", Mt = 0, xe = !0, _i = 0;
1644
- const $e = qs.mixin({
1645
- toast: !0,
1646
- position: "bottom-left",
1647
- timer: 13e3,
1648
- timerProgressBar: !0
1649
- });
1650
- Js(async () => {
1651
- if (Di("Mounting Face Collector!"), m(ot, Se = !0, Se), m(qe, u = !1, u), bi(), Ut(), z() ? (tn(), as()) : await Ee(), Ce)
1652
- try {
1653
- await Qs(Ft), ni = !0, ai = await Xs();
1654
- } catch {
1655
- m(Ti, Ce = !1, Ce), t(0, St = !0);
1656
- }
1657
- he() || os();
1658
- });
1659
- async function Ut() {
1660
- const [s, y] = (At ?? "")?.replaceAll(" ", "")?.split("x")?.map((k) => k ? parseInt(k) : void 0);
1661
- !s || !y || (he() ? (await Gs(), m(
1662
- Je,
1663
- re = {
1664
- videoWidth: window.innerWidth,
1665
- videoHeight: window.innerHeight
1666
- },
1667
- re
1668
- )) : m(Je, re = { videoWidth: s, videoHeight: y }, re));
1669
- }
1670
- function bi() {
1671
- m(it, f = !1, f), m(Le, p = !1, p), m(nt, g = Xt.FRONT_CAMERA, g), Nt && m(ki, R = !1, R), m(qt, W = !1, W), m(ae, I = j.OK, I), m(je, x = "", x), m(Te, ie.unconformities = [], ie);
1672
- const s = _t(Gt);
1673
- s.closedMouth = !1, s.isPersonCloseEnough = !1, s.isPersonTooclose = !0, s.isPersonInFrame = !1, Gt.set(s), m(ke, K = "", K), m(at, c = !1, c), m(st, l = !0, l);
1674
- }
1675
- function as() {
1676
- X.addEventListener("open", (s) => {
1677
- const y = s.detail[0].video;
1678
- m(
1679
- Ri,
1680
- Tt = {
1681
- width: y.videoWidth,
1682
- height: y.videoHeight
1683
- },
1684
- Tt
1685
- ), t(13, L.srcObject = y.srcObject, L), m(jt, a = L.srcObject, a), t(18, Ze = !1), l || Ys(X), window.dispatchEvent(new CustomEvent("brycc-camera-ready", { detail: { stream: a } }));
1686
- function k() {
1687
- ce || He(L, k, !0);
1688
- }
1689
- k();
1690
- }), X.addEventListener("error", (s) => {
1691
- oe(s), s.detail[0].message.toLowerCase().includes("device in use") ? m(Q, o = B.CAMERA_IN_USE_ERROR, o) : s.detail[0].message.toLowerCase().includes("permission") ? m(Q, o = B.CAMERA_DENIED_ERROR, o) : s.detail[0].message.toLowerCase().includes("not found") && !he() ? m(Q, o = B.DEVICE_NOT_FOUND_ERROR, o) : m(Q, o = B.CAMERA_DENIED_ERROR, o), t(18, Ze = !1);
1692
- }), X.addEventListener("faceDetection", (s) => {
1693
- s.detail[0].errors.length > 0 && Ii(s.detail[0].errors);
1694
- }), X.addEventListener("detection", (s) => {
1695
- s.detail[0].errors.length > 0 && Ii(s.detail[0].errors);
1696
- }), X.addEventListener("close", async (s) => {
1697
- p || (Be = !1), t(19, ce = !0), t(20, We = !1), o === B.OK && (m(Q, o = B.CAMERA_CLOSED_ERROR, o), setTimeout(
1698
- () => {
1699
- ce && Bt && (Di("Reopening camera after close (lost focus on widget)"), Me());
1700
- },
1701
- 1e3
1702
- ));
1703
- }), X.addEventListener("initialize", async (s) => {
1704
- Wt = !0, m(Oi, kt = !0, kt);
1705
- try {
1706
- X.setLicense(Zs, "faceDetector");
1707
- } catch (y) {
1708
- oe("Error setting license:", y);
1709
- }
1710
- Et === rt.Face && !Be && !p && Wt && await Vt();
1711
- }), X.addEventListener("capture", async (s) => {
1712
- t(21, se = "");
1713
- const { encryptedFile: y, photo: k } = s.detail[0];
1714
- m(lt, yt = y, yt);
1715
- const M = (await ct(k)).split(",");
1716
- if (t(20, We = !1), m(ae, I = j.OK, I), m(Te, ie.isLoading = !0, ie), m(Le, p = !0, p), Be = !1, m(De, de = M[0], de), m(me, J = M[1], J), m(je, x = M[1], x), !ti) {
1717
- let ee, Ue, Ci, Ei;
1718
- try {
1719
- if (l && !Ai(Pe))
1720
- throw new Error("FACE_TOO_SMALL");
1721
- const te = xs();
1722
- if (l && te)
1723
- throw new Error(te);
1724
- ({ bodyParts: ee, icaoWarnings: Ue } = await ut(x, pe, (await ct(y)).split(",")[1])), window.dispatchEvent(new CustomEvent(
1725
- "face-unconformities-validated",
1726
- {
1727
- detail: {
1728
- bodyParts: ee,
1729
- icaoWarnings: Ue,
1730
- status: I
1731
- }
1732
- }
1733
- ));
1734
- } catch (te) {
1735
- oe(te);
1736
- let ye = Oe.UNKNOWN, Ve = [], yi = [];
1737
- te instanceof Yt && te.response?.status === 400 ? te.response.data && Array.isArray(te.response.data.bodyParts) ? (Ve = te.response.data.bodyParts, yi = te.response.data.icaoWarnings, Ci = te.response.data.invalidLivenessCounter, Ei = te.response.data.invalidLivenessLimit, ye = Ve.find((Ps) => Ps.livenessResult.error)?.livenessResult.error_code, m(ae, I = j.LIVENESS_DETECTION_FAILURE, I), t(21, se = Oe[ye]), oe("Liveness error:", ye)) : m(ae, I = j.TEMPLATE_EXTRACTION_ERROR, I) : te instanceof Error && $s.includes(te.message) ? (m(ae, I = j.UNKNOWN_LIVENESS_ERROR, I), ye = te.message, t(21, se = Oe[ye]), Ve = pi(), Ve[0].livenessResult = {
1738
- error: se,
1739
- error_code: ye
1740
- }) : pe && $e.fire({
1741
- icon: "error",
1742
- title: "Falha ao comunicar com serviço de Liveness"
1743
- }), m(Te, ie.isLoading = !1, ie), window.dispatchEvent(new CustomEvent(
1744
- "face-unconformities-validated",
1745
- {
1746
- detail: {
1747
- bodyParts: Ve,
1748
- errorCode: ye,
1749
- translatedError: Re(se),
1750
- status: I,
1751
- icaoWarnings: yi,
1752
- invalidLivenessCounter: Ci,
1753
- invalidLivenessLimit: Ei
1754
- }
1755
- }
1756
- ));
1757
- return;
1758
- }
1759
- if (I !== j.OK) {
1760
- Ue && Ke(Ue), m(Te, ie.isLoading = !1, ie);
1761
- return;
1762
- }
1763
- ee[0].livenessResult && gi(ee[0].livenessResult), ee.length !== 0 && ee[0].data && m(me, J = ee[0].data, J), Ke(Ue);
1764
- return;
1765
- }
1766
- let U, $;
1767
- try {
1768
- $ = await ea(y), gi($.data);
1769
- } catch (ee) {
1770
- m(ae, I = j.UNKNOWN_LIVENESS_ERROR, I), oe(ee), ee instanceof Yt && ee.response?.status === 400 ? (U = ee.response.data.error_code, t(21, se = Oe[U]), oe("Liveness error:", U), m(ae, I = j.LIVENESS_DETECTION_FAILURE, I)) : $e.fire({
1771
- icon: "error",
1772
- title: "Falha ao comunicar com serviço de Liveness"
1773
- });
1774
- }
1775
- if (I !== j.OK) {
1776
- m(Te, ie.isLoading = !1, ie), window.dispatchEvent(new CustomEvent(
1777
- "face-unconformities-validated",
1778
- {
1779
- detail: {
1780
- bodyParts: [
1781
- {
1782
- bodyPart: "FACE",
1783
- data: x,
1784
- livenessBlob: (await ct(y)).split(",")[1],
1785
- ...$ && { livenessResult: $ }
1786
- }
1787
- ],
1788
- ...U && { errorCode: U },
1789
- ...se && { translatedError: Re(se) },
1790
- status: I
1791
- }
1792
- }
1793
- ));
1794
- return;
1795
- }
1796
- let { bodyParts: ue, icaoWarnings: Ae } = await ut(x, pe);
1797
- window.dispatchEvent(new CustomEvent(
1798
- "face-unconformities-validated",
1799
- {
1800
- detail: {
1801
- bodyParts: ue,
1802
- icaoWarnings: Ae,
1803
- status: I,
1804
- errorCode: U,
1805
- ...se && { translatedError: Re(se) }
1806
- }
1807
- }
1808
- )), ue[0].data && m(me, J = ue[0].data, J), Ke(Ae);
1809
- });
1810
- }
1811
- async function Ee(s) {
1812
- if (!xe) {
1813
- m(Q, o = B.CAMERA_ORIENTATION_PORTRAIT, o);
1814
- return;
1815
- }
1816
- await Ut(), z() ? Vt() : await ns(re.videoWidth, re.videoHeight, s);
1817
- }
1818
- async function Vt() {
1819
- if (z()) {
1820
- if (await Ut(), !C[0]?.deviceId) {
1821
- try {
1822
- await Li(640, 480);
1823
- } catch (s) {
1824
- const y = s, k = Fe(s) && s.constraint ? s.constraint : "";
1825
- oe(y.message, k), Fe(y) && "message" in y && y.message.includes("Requested device not found") && m(Q, o = B.DEVICE_NOT_FOUND_ERROR, o);
1826
- }
1827
- await Zt(), m(we, d = C[0].deviceId, d);
1828
- }
1829
- m(Q, o = B.OK, o), X && "openCamera" in X && X.openCamera(), Be = !0, t(19, ce = !1), t(18, Ze = !0);
1830
- }
1831
- }
1832
- async function et() {
1833
- if (Ce && !ni)
1834
- return He(L, et);
1835
- if (L) {
1836
- if (Et !== rt.Face && !Lt)
1837
- return He(L, et);
1838
- m(qe, u = !0, u), m(ot, Se = !1, Se), Ce && (r || m(Ye, r = !0, r)), He(L, et);
1839
- }
1840
- }
1841
- async function zt() {
1842
- if (m(ae, I = j.OK, I), z()) {
1843
- t(20, We = !0), X.takePhoto();
1844
- return;
1845
- }
1846
- let s = null;
1847
- try {
1848
- if (Ce) {
1849
- const U = await ua(L, Pt);
1850
- if (s = U.canvas, m(Le, p = !0, p), !U.result) {
1851
- const ee = s.toDataURL("image/jpeg").split(",");
1852
- throw m(De, de = ee[0], de), m(me, J = ee[1], J), new Error("FACE_NOT_FOUND");
1853
- }
1854
- const $ = s.toDataURL("image/jpeg").split(",");
1855
- m(De, de = $[0], de), m(me, J = $[1], J), m(je, x = $[1], x);
1856
- let ue, Ae;
1857
- if (!Ai(Pe))
1858
- throw new Error("FACE_TOO_SMALL");
1859
- ({ bodyParts: ue, icaoWarnings: Ae } = await ut(J, pe)), window.dispatchEvent(new CustomEvent(
1860
- "face-unconformities-validated",
1861
- {
1862
- detail: {
1863
- bodyParts: ue,
1864
- icaoWarnings: Ae,
1865
- status: I
1866
- }
1867
- }
1868
- )), ue.length !== 0 && ue[0].data && m(me, J = ue[0].data, J), Ke(Ae);
1869
- return;
1870
- }
1871
- m(Le, p = !0, p);
1872
- const y = await ls();
1873
- m(De, de = y[0], de), m(me, J = y[1], J), m(je, x = y[1], x);
1874
- let { bodyParts: k, icaoWarnings: M } = await ut(J, pe);
1875
- window.dispatchEvent(new CustomEvent(
1876
- "face-unconformities-validated",
1877
- {
1878
- detail: {
1879
- bodyParts: k,
1880
- icaoWarnings: M,
1881
- status: I
1882
- }
1883
- }
1884
- )), k.length !== 0 && k[0].data && m(me, J = k[0].data, J), Ke(M);
1885
- } catch (y) {
1886
- oe(y);
1887
- let k = Oe.UNKNOWN, M = [], U = [];
1888
- if (y instanceof Yt && y.response?.status === 400)
1889
- if (y.response.data && Array.isArray(y.response.data.bodyParts)) {
1890
- M = y.response.data.bodyParts, U = y.response.data.icaoWarnings;
1891
- const $ = M.find((ue) => ue.livenessResult.error);
1892
- k = $?.livenessResult.error_code, m(ae, I = j.LIVENESS_DETECTION_FAILURE, I), $?.livenessResult.error_code || m(ae, I = j.UNKNOWN_LIVENESS_ERROR, I), t(21, se = Oe[k]), oe("Liveness error:", k);
1893
- } else
1894
- m(ae, I = j.TEMPLATE_EXTRACTION_ERROR, I);
1895
- else
1896
- y instanceof Error && ["FACE_NOT_FOUND", "FACE_TOO_SMALL"].includes(y.message) ? (m(ae, I = j.LIVENESS_DETECTION_FAILURE, I), k = y.message, t(21, se = Oe[k]), M = pi()) : (m(ae, I = j.UNABLE_TO_COMMUNICATE_WITH_TEMPLATE_EXTRACTION_SERVICE, I), pe && $e.fire({
1897
- icon: "error",
1898
- title: "Falha ao comunicar com serviço de Liveness"
1899
- }));
1900
- m(Te, ie.isLoading = !1, ie), window.dispatchEvent(new CustomEvent(
1901
- "face-unconformities-validated",
1902
- {
1903
- detail: {
1904
- bodyParts: M,
1905
- errorCode: k,
1906
- translatedError: Re(se),
1907
- status: I,
1908
- icaoWarnings: U
1909
- }
1910
- }
1911
- ));
1912
- }
1913
- }
1914
- function tt() {
1915
- const s = {
1916
- bodyPart: "FACE",
1917
- data: J,
1918
- justification: Z
1919
- };
1920
- m(qt, W = !0, W), _t(lt) && ct(_t(lt)).then((y) => {
1921
- s.livenessBlob = y.split(",")[1];
1922
- }), window.dispatchEvent(new CustomEvent("export-face", { detail: s }));
1923
- }
1924
- function Ie() {
1925
- window.dispatchEvent(new CustomEvent("face-scrapped")), bi(), ce && Vt();
1926
- }
1927
- function gi(s) {
1928
- let y = "", k = "success";
1929
- s.isAlive ? y = `Vivacidade de face (${s.face_liveness.probability.toFixed(2)}) e de captura (${s.capture_liveness.probability}, ${s.capture_liveness.score.toFixed(2)}) verificados!` : s?.face_liveness?.probability && (k = "error", y = `Vivacidade de face (${s.face_liveness.probability.toFixed(2)}) e de captura (${s.capture_liveness.probability}, ${s.capture_liveness.score.toFixed(2)}) insuficientes!`), A && $e.fire({ icon: k, title: y });
1930
- }
1931
- async function ns(s, y, k) {
1932
- try {
1933
- const { stream: M, deviceId: U } = await Li(q.width, q.height, g, k);
1934
- m(jt, a = M, a), m(we, d = U || C[0].deviceId, d);
1935
- } catch (M) {
1936
- const U = M, $ = Fe(M) && M.constraint ? M.constraint : "";
1937
- oe(U.message, $), Fe(U) && "message" in U && U.message.toLowerCase().includes("permission") ? (oe("User didn't give permission to use camera!"), m(Q, o = B.CAMERA_DENIED_ERROR, o)) : Fe(U) && "message" in U && U.message.toLowerCase().includes("not found") && !he() ? m(Q, o = B.DEVICE_NOT_FOUND_ERROR, o) : $.includes("width") || $.includes("height") ? (oe(`Camera does not meet the minimum supported requirements! (${$})`), m(Q, o = B.CAMERA_UNSUPPORTED, o)) : (m(Q, o = B.CAMERA_DENIED_ERROR, o), oe("Unable to open camera!"));
1938
- }
1939
- }
1940
- async function Me() {
1941
- m(we, d = "", d), await Ee();
1942
- }
1943
- function os() {
1944
- navigator.mediaDevices.ondevicechange = async (s) => {
1945
- s.type == "devicechange" && (await Zt(), o !== B.OK ? await Me() : (!z() && !a.active || z() && !ce) && (ft(X), m(Q, o = B.DEVICE_NOT_FOUND_ERROR, o), t(19, ce = !0)));
1946
- };
1947
- }
1948
- async function vi() {
1949
- m(it, f = !1, f);
1950
- const s = (/* @__PURE__ */ new Date()).getTime();
1951
- if (s - Dt > 5e3) {
1952
- Dt = s;
1953
- try {
1954
- if (L.width === 0 || L.height === 0)
1955
- return;
1956
- const k = await fa(L);
1957
- if (k < 50) {
1958
- m(ke, K = "faceCollector.illuminationTooLow", K);
1959
- return;
1960
- }
1961
- if (k > 180) {
1962
- m(ke, K = "faceCollector.illuminationTooHigh", K);
1963
- return;
1964
- }
1965
- } catch (k) {
1966
- Fi("An error occurred while getting the video lighting level: ", k);
1967
- }
1968
- try {
1969
- if (await da(L) < 4.5) {
1970
- m(ke, K = "faceCollector.lowSharpness", K);
1971
- return;
1972
- }
1973
- } catch (k) {
1974
- Fi("An error occurred while getting the video sharpness level: ", k);
1975
- }
1976
- m(ke, K = "faceCollector.faceWasNotFound", K);
1977
- } else
1978
- Ot || (Ot = !0, setTimeout(
1979
- () => {
1980
- let k = [
1981
- "faceCollector.faceWasNotFound",
1982
- "faceCollector.illuminationTooLow",
1983
- "faceCollector.lowSharpness",
1984
- "faceCollector.illuminationTooHigh"
1985
- ];
1986
- Ot = !1, t(17, Rt = !1), K && !k.includes(K) && m(ke, K = "", K);
1987
- },
1988
- 1500
1989
- ));
1990
- }
1991
- function pi() {
1992
- return [
1993
- {
1994
- bodyPart: "FACE",
1995
- data: x,
1996
- format: "jpg",
1997
- capturedEyeToEyeDist: V,
1998
- minEyeToEyeDist: Pe
1999
- }
2000
- ];
2001
- }
2002
- async function ls() {
2003
- const s = document.createElement("canvas"), y = s.getContext("2d");
2004
- return s.width = L.width, s.height = L.height, y?.drawImage(L, 0, 0, s.width, s.height), s.toDataURL("image/jpeg").split(",");
2005
- }
2006
- const rs = Gt.subscribe((s) => {
2007
- let y = "";
2008
- if (s.isPersonCloseEnough ? s.isPersonTooclose ? y = "faceCollector.moveAwayCamera" : s.isPersonInFrame ? s.closedMouth || (y = "faceCollector.dontOpenMouth") : y = "faceCollector.stayInFrame" : y = "faceCollector.comeCloserCamera", f && ta(y), !p && R && f && !E && !Ne && s.isPersonInFrame && s.closedMouth && !(!s.isPersonCloseEnough || s.isPersonTooclose)) {
2009
- t(16, Ne = !0), _i = (/* @__PURE__ */ new Date()).getTime() + en;
2010
- const k = setInterval(
2011
- async () => {
2012
- if (!R || p || E || We || z() && ce || !s.isPersonCloseEnough || s.isPersonTooclose || !s.closedMouth || !s.isPersonInFrame) {
2013
- t(16, Ne = !1), setTimeout(
2014
- () => {
2015
- },
2016
- 1500
2017
- ), clearInterval(k);
2018
- return;
2019
- }
2020
- const M = (/* @__PURE__ */ new Date()).getTime();
2021
- Math.floor((_i - M) % (1e3 * 60) / 1e3) <= 0 && (clearInterval(k), t(16, Ne = !1), zt());
2022
- },
2023
- 100
2024
- );
2025
- }
2026
- }), cs = Le.subscribe((s) => {
2027
- ve && (s ? (ve.classList.remove("flex"), ve.classList.add("hidden")) : (ve.classList.add("flex"), ve.classList.remove("hidden")));
2028
- }), us = Ht.subscribe((s) => {
2029
- L && s && (dt("setting null in video srcObject"), t(13, L.srcObject = null, L), t(13, L.src = "", L), m(we, d = null, d));
2030
- });
2031
- Qt.subscribe(async (s) => {
2032
- s === rt.Face && (await Zt(), z() && m(we, d = C[0]?.deviceId, d));
2033
- });
2034
- const fs = we.subscribe(async (s) => {
2035
- if (!(!z() && !a || !s || z() && ce))
2036
- try {
2037
- if (z()) {
2038
- await ft(X), await Ee();
2039
- return;
2040
- }
2041
- t(13, L.srcObject = a, L), m(Ht, v = !1, v), xe ? m(Q, o = B.OK, o) : m(Q, o = B.CAMERA_ORIENTATION_PORTRAIT, o), a.getTracks().forEach((y) => {
2042
- y.readyState === "live" && dt(`Camera ${y.label} (${y.id}) opened successfully!`);
2043
- }), m(Q, o = B.OK, o), ia(L);
2044
- } catch (y) {
2045
- const k = y;
2046
- t(19, ce = !0), Fe(k) && "message" in k && k.message.includes("Requested device not found") && m(Q, o = B.DEVICE_NOT_FOUND_ERROR, o);
2047
- }
2048
- }), ds = Qt.subscribe(async (s) => {
2049
- s === rt.Face && z() && !Be && !p && Wt && await Ee();
2050
- }), hs = Ye.subscribe(async (s) => {
2051
- s && wi();
2052
- }), ms = sa.subscribe(async (s) => {
2053
- if (C[0]?.deviceId) {
2054
- if (ft(), !he() || z()) {
2055
- const k = (C.findIndex((U) => U.deviceId === d) + 1) % C.length, M = C[k].deviceId;
2056
- z() ? m(we, d = M, d) : await Ee(M);
2057
- return;
2058
- }
2059
- s ? (m(nt, g = Xt.REAR_CAMERA, g), await Ee()) : (m(nt, g = Xt.FRONT_CAMERA, g), await Ee());
2060
- }
2061
- }), _s = aa.subscribe(async (s) => {
2062
- !s.isSupported || !he() || _ != "FACE" || (xe = s.orientation.includes("portrait"), xe ? L && !u ? await Me() : u && m(Q, o = B.OK, o) : m(Q, o = B.CAMERA_ORIENTATION_PORTRAIT, o));
2063
- }), bs = $t.subscribe((s) => {
2064
- s && window.dispatchEvent(new CustomEvent("console-open-status", { detail: { isOpen: s } }));
2065
- }), gs = at.subscribe(async (s) => {
2066
- dt("CaptureFace event received:", s), s && (m(st, l = !1, l), await zt(), m(at, c = !1, c), m(st, l = !0, l));
2067
- });
2068
- async function wi() {
2069
- let s;
2070
- try {
2071
- if (Mt >= $a) {
2072
- Mt = 0;
2073
- let y;
2074
- if (y = wa(L, ai), s = await y.withFaceLandmarks(), ne.getContext("2d")?.clearRect(0, 0, ne.width, ne.height), s != null) {
2075
- const k = Ca(ne, L, !0);
2076
- na(ne, L, k);
2077
- const M = Ea(s, k);
2078
- oa(M) ? (la(M, ne, It), m(it, f = !0, f), t(17, Rt = !0), Dt = (/* @__PURE__ */ new Date()).getTime()) : vi();
2079
- } else
2080
- vi();
2081
- } else
2082
- Mt++;
2083
- } catch {
2084
- } finally {
2085
- r && He(L, wi);
2086
- }
2087
- }
2088
- Kt.subscribe(async (s) => {
2089
- s && (Ie(), m(Kt, n = !1, n));
2090
- });
2091
- const vs = qe.subscribe((s) => {
2092
- s && window.dispatchEvent(new CustomEvent("brycc-camera-ready", { detail: { stream: a } }));
2093
- }), ps = ot.subscribe((s) => {
2094
- s && window.dispatchEvent(new CustomEvent("brycc-face-initialized"));
2095
- });
2096
- ra(() => {
2097
- dt("Destroying face collector"), ft(X), cs(), rs(), us(), fs(), ds(), clearInterval(mi), hs(), ms(), _s(), bs(), gs(), vs(), ps(), mi = 0, ss.stopDetection();
2098
- });
2099
- function ws(s) {
2100
- mt[s ? "unshift" : "push"](() => {
2101
- X = s, t(1, X);
2102
- });
2103
- }
2104
- function Cs(s) {
2105
- mt[s ? "unshift" : "push"](() => {
2106
- L = s, t(13, L);
2107
- });
2108
- }
2109
- const Es = () => {
2110
- z() || (t(13, L.width = re.videoWidth, L), t(13, L.height = re.videoHeight, L), t(14, ne.width = re.videoWidth, ne), t(14, ne.height = re.videoHeight, ne));
2111
- };
2112
- function ys(s) {
2113
- mt[s ? "unshift" : "push"](() => {
2114
- ne = s, t(14, ne);
2115
- });
2116
- }
2117
- const ks = () => tt(), Ts = () => Ie();
2118
- function Os(s) {
2119
- mt[s ? "unshift" : "push"](() => {
2120
- ve = s, t(15, ve);
2121
- });
2122
- }
2123
- const Rs = () => tt(), Ds = () => Ie();
2124
- function Is() {
2125
- Z = this.value, Jt.set(Z);
2126
- }
2127
- const As = () => tt(), Ls = () => Ie();
2128
- function Fs() {
2129
- Z = this.value, Jt.set(Z);
2130
- }
2131
- const Ss = () => Ie(), Ns = async () => {
2132
- await Me();
2133
- };
2134
- return i.$$set = (s) => {
2135
- "enableMinutiae" in s && t(43, It = s.enableMinutiae), "videoDimensions" in s && t(44, At = s.videoDimensions), "noTabs" in s && t(45, Lt = s.noTabs), "weightsPath" in s && t(46, Ft = s.weightsPath), "evaluatePhoto" in s && t(2, pe = s.evaluatePhoto), "showCaptureButton" in s && t(0, St = s.showCaptureButton), "showUnconformities" in s && t(3, oi = s.showUnconformities), "showConfigButton" in s && t(4, li = s.showConfigButton), "showAutoCaptureButton" in s && t(5, Nt = s.showAutoCaptureButton), "showCameraButton" in s && t(6, ri = s.showCameraButton), "showJustificationField" in s && t(7, ci = s.showJustificationField), "minEyeToEyeDist" in s && t(47, Pe = s.minEyeToEyeDist), "showWatermark" in s && t(8, ui = s.showWatermark), "videoOverlay" in s && t(9, fi = s.videoOverlay), "videoOverlayTransparency" in s && t(10, di = s.videoOverlayTransparency), "faceDetectionSensitivity" in s && t(48, Pt = s.faceDetectionSensitivity), "hidden" in s && t(49, Bt = s.hidden), "livenessBlobSize" in s && t(11, hi = s.livenessBlobSize), "widgetInstance" in s && t(1, X = s.widgetInstance);
2136
- }, [
2137
- St,
2138
- X,
2139
- pe,
2140
- oi,
2141
- li,
2142
- Nt,
2143
- ri,
2144
- ci,
2145
- ui,
2146
- fi,
2147
- di,
2148
- hi,
2149
- et,
2150
- L,
2151
- ne,
2152
- ve,
2153
- Ne,
2154
- Rt,
2155
- Ze,
2156
- ce,
2157
- We,
2158
- se,
2159
- o,
2160
- u,
2161
- d,
2162
- p,
2163
- E,
2164
- W,
2165
- Z,
2166
- J,
2167
- I,
2168
- Re,
2169
- ie,
2170
- de,
2171
- re,
2172
- ii,
2173
- si,
2174
- Ye,
2175
- De,
2176
- zt,
2177
- tt,
2178
- Ie,
2179
- Me,
2180
- It,
2181
- At,
2182
- Lt,
2183
- Ft,
2184
- Pe,
2185
- Pt,
2186
- Bt,
2187
- ws,
2188
- Cs,
2189
- Es,
2190
- ys,
2191
- ks,
2192
- Ts,
2193
- Os,
2194
- Rs,
2195
- Ds,
2196
- Is,
2197
- As,
2198
- Ls,
2199
- Fs,
2200
- Ss,
2201
- Ns
2202
- ];
2203
- }
2204
- class an extends gt {
2205
- constructor(e) {
2206
- super(), vt(
2207
- this,
2208
- {
2209
- target: this.shadowRoot,
2210
- props: wt(this.attributes),
2211
- customElement: !0
2212
- },
2213
- sn,
2214
- xa,
2215
- pt,
2216
- {
2217
- enableMinutiae: 43,
2218
- videoDimensions: 44,
2219
- noTabs: 45,
2220
- weightsPath: 46,
2221
- evaluatePhoto: 2,
2222
- showCaptureButton: 0,
2223
- showUnconformities: 3,
2224
- showConfigButton: 4,
2225
- showAutoCaptureButton: 5,
2226
- showCameraButton: 6,
2227
- showJustificationField: 7,
2228
- minEyeToEyeDist: 47,
2229
- showWatermark: 8,
2230
- videoOverlay: 9,
2231
- videoOverlayTransparency: 10,
2232
- faceDetectionSensitivity: 48,
2233
- hidden: 49,
2234
- livenessBlobSize: 11,
2235
- widgetInstance: 1,
2236
- play: 12
2237
- },
2238
- null,
2239
- [-1, -1, -1, -1, -1]
2240
- ), e && (e.target && T(e.target, this, e.anchor), e.props && (this.$set(e.props), N()));
2241
- }
2242
- static get observedAttributes() {
2243
- return [
2244
- "enableMinutiae",
2245
- "videoDimensions",
2246
- "noTabs",
2247
- "weightsPath",
2248
- "evaluatePhoto",
2249
- "showCaptureButton",
2250
- "showUnconformities",
2251
- "showConfigButton",
2252
- "showAutoCaptureButton",
2253
- "showCameraButton",
2254
- "showJustificationField",
2255
- "minEyeToEyeDist",
2256
- "showWatermark",
2257
- "videoOverlay",
2258
- "videoOverlayTransparency",
2259
- "faceDetectionSensitivity",
2260
- "hidden",
2261
- "livenessBlobSize",
2262
- "widgetInstance",
2263
- "play"
2264
- ];
2265
- }
2266
- get enableMinutiae() {
2267
- return this.$$.ctx[43];
2268
- }
2269
- set enableMinutiae(e) {
2270
- this.$$set({ enableMinutiae: e }), N();
2271
- }
2272
- get videoDimensions() {
2273
- return this.$$.ctx[44];
2274
- }
2275
- set videoDimensions(e) {
2276
- this.$$set({ videoDimensions: e }), N();
2277
- }
2278
- get noTabs() {
2279
- return this.$$.ctx[45];
2280
- }
2281
- set noTabs(e) {
2282
- this.$$set({ noTabs: e }), N();
2283
- }
2284
- get weightsPath() {
2285
- return this.$$.ctx[46];
2286
- }
2287
- set weightsPath(e) {
2288
- this.$$set({ weightsPath: e }), N();
2289
- }
2290
- get evaluatePhoto() {
2291
- return this.$$.ctx[2];
2292
- }
2293
- set evaluatePhoto(e) {
2294
- this.$$set({ evaluatePhoto: e }), N();
2295
- }
2296
- get showCaptureButton() {
2297
- return this.$$.ctx[0];
2298
- }
2299
- set showCaptureButton(e) {
2300
- this.$$set({ showCaptureButton: e }), N();
2301
- }
2302
- get showUnconformities() {
2303
- return this.$$.ctx[3];
2304
- }
2305
- set showUnconformities(e) {
2306
- this.$$set({ showUnconformities: e }), N();
2307
- }
2308
- get showConfigButton() {
2309
- return this.$$.ctx[4];
2310
- }
2311
- set showConfigButton(e) {
2312
- this.$$set({ showConfigButton: e }), N();
2313
- }
2314
- get showAutoCaptureButton() {
2315
- return this.$$.ctx[5];
2316
- }
2317
- set showAutoCaptureButton(e) {
2318
- this.$$set({ showAutoCaptureButton: e }), N();
2319
- }
2320
- get showCameraButton() {
2321
- return this.$$.ctx[6];
2322
- }
2323
- set showCameraButton(e) {
2324
- this.$$set({ showCameraButton: e }), N();
2325
- }
2326
- get showJustificationField() {
2327
- return this.$$.ctx[7];
2328
- }
2329
- set showJustificationField(e) {
2330
- this.$$set({ showJustificationField: e }), N();
2331
- }
2332
- get minEyeToEyeDist() {
2333
- return this.$$.ctx[47];
2334
- }
2335
- set minEyeToEyeDist(e) {
2336
- this.$$set({ minEyeToEyeDist: e }), N();
2337
- }
2338
- get showWatermark() {
2339
- return this.$$.ctx[8];
2340
- }
2341
- set showWatermark(e) {
2342
- this.$$set({ showWatermark: e }), N();
2343
- }
2344
- get videoOverlay() {
2345
- return this.$$.ctx[9];
2346
- }
2347
- set videoOverlay(e) {
2348
- this.$$set({ videoOverlay: e }), N();
2349
- }
2350
- get videoOverlayTransparency() {
2351
- return this.$$.ctx[10];
2352
- }
2353
- set videoOverlayTransparency(e) {
2354
- this.$$set({ videoOverlayTransparency: e }), N();
2355
- }
2356
- get faceDetectionSensitivity() {
2357
- return this.$$.ctx[48];
2358
- }
2359
- set faceDetectionSensitivity(e) {
2360
- this.$$set({ faceDetectionSensitivity: e }), N();
2361
- }
2362
- get hidden() {
2363
- return this.$$.ctx[49];
2364
- }
2365
- set hidden(e) {
2366
- this.$$set({ hidden: e }), N();
2367
- }
2368
- get livenessBlobSize() {
2369
- return this.$$.ctx[11];
2370
- }
2371
- set livenessBlobSize(e) {
2372
- this.$$set({ livenessBlobSize: e }), N();
2373
- }
2374
- get widgetInstance() {
2375
- return this.$$.ctx[1];
2376
- }
2377
- set widgetInstance(e) {
2378
- this.$$set({ widgetInstance: e }), N();
2379
- }
2380
- get play() {
2381
- return this.$$.ctx[12];
2382
- }
2383
- }
2384
- customElements.define("face-collector", an);
2385
- export {
2386
- an as default
2387
- };