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