UNPKG

bry-biometric-collector

Version:

BRy web-collector component for biometric capture.

1,633 lines (1,632 loc) 74.4 kB
import { w as jt, S as ut, q as ft, r as dt, t as ht, x as R, y as V, z as p, B as X, C as d, D as H, E as Ke, G as Q, H as ze, I as D, J as I, K as We, L as je, M as re, N as g, O as ue, P as fe, Q as de, R as K, T as M, U as N, V as ji, $ as Ki, W as zi, X as q, Y as Ts, Z as Ve, _ as P, a0 as He, a1 as zt, a2 as b, a3 as B, a4 as Ft, a5 as xe, a6 as Os, a7 as $e, a8 as _e, a9 as Rs, aa as Oe, ab as gi, ac as St, ad as bi, ae as Is, af as Be, ag as pe, ah as Ds, ai as As, aj as Nt, ak as Pt, al as ce, am as $, an as we, ao as vi, ap as et, aq as Wt, ar as Ls, as as tt, at as pi, au as wi, av as Fs, aw as Ss, ax as Ns, ay as Ps, az as Ws, aA as Bs, aB as Bt, aC as z, j as rt, aD as Mt, aE as Ms, aF as Ci, aG as Us, aH as it, aI as st, aJ as Ei, aK as Vs, aL as ot, A as Ut, aM as Ce, aN as js, aO as Me, aP as Ks, aQ as yi, d as Re, aR as Vt, aS as nt, aT as zs, aU as Hs, aV as qs, aW as Js, aX as Qs, aY as Xs, aZ as Gs, a_ as Ue, a$ as Ys, b0 as Zs, b1 as at, b2 as oe, b3 as mt, b4 as xs, b5 as $s, b6 as eo, b7 as to, b8 as lt, b9 as se, ba as io, bb as so, bc as ki, bd as Hi, be as ct, bf as oo } from "./main_f7bde95f_3.2.1.js"; import { W as no, C as ao, V as lo, a as ro } from "./ValidationAlert_71ec43a1_3.2.1.js"; import { detectSingleFace as co, matchDimensions as uo, resizeResults as fo } from "./face_api_0e3ce8c8_3.2.1.js"; const Kt = jt(!1); class ho { isDevToolsOpen = !1; detectionCount = 0; checkSizeTimeout = null; detectionInterval = null; detectDevToolsBySize() { const e = window.outerWidth - window.innerWidth > 200, t = window.outerHeight - window.innerHeight > 200; return e || t; } checkForDevTools = () => { this.detectDevToolsBySize() ? (this.detectionCount++, this.detectionCount >= 2 && !this.isDevToolsOpen && (this.isDevToolsOpen = !0, Kt.set(this.isDevToolsOpen))) : (this.detectionCount = 0, this.isDevToolsOpen && (this.isDevToolsOpen = !1, Kt.set(this.isDevToolsOpen))); }; startDetection() { this.stopDetection(), window.addEventListener("resize", () => { this.checkSizeTimeout && clearTimeout(this.checkSizeTimeout), this.checkSizeTimeout = window.setTimeout(this.checkForDevTools, 500); }), window.addEventListener("focus", () => setTimeout(this.checkForDevTools, 300)), this.detectionInterval = window.setInterval(this.checkForDevTools, 1e3), this.checkForDevTools(); } stopDetection() { this.detectionInterval && (clearInterval(this.detectionInterval), this.detectionInterval = null), this.checkSizeTimeout && (clearTimeout(this.checkSizeTimeout), this.checkSizeTimeout = null); } } function Ti(i) { let e, t; return e = new no({}), { c() { ue(e.$$.fragment); }, m(o, n) { fe(e, o, n), t = !0; }, i(o) { t || (H(e.$$.fragment, o), t = !0); }, o(o) { Q(e.$$.fragment, o), t = !1; }, d(o) { de(e, o); } }; } function mo(i) { let e, t, o, n = ( /*showWatermark*/ i[1] && Ti() ); return { c() { e = p("div"), n && n.c(), this.c = X, d(e, "id", "face-oval"), d(e, "class", t = "loader " + /*loading*/ (i[0] ? "loading" : "") + " z-10"), d( e, "style", /*styleVars*/ i[2] ); }, m(r, l) { R(r, e, l), n && n.m(e, null), o = !0; }, p(r, [l]) { /*showWatermark*/ r[1] ? n ? l & /*showWatermark*/ 2 && H(n, 1) : (n = Ti(), n.c(), H(n, 1), n.m(e, null)) : n && (Ke(), Q(n, 1, 1, () => { n = null; }), ze()), (!o || l & /*loading*/ 1 && t !== (t = "loader " + /*loading*/ (r[0] ? "loading" : "") + " z-10")) && d(e, "class", t), (!o || l & /*styleVars*/ 4) && d( e, "style", /*styleVars*/ r[2] ); }, i(r) { o || (H(n), o = !0); }, o(r) { Q(n), o = !1; }, d(r) { r && D(e), n && n.d(); } }; } const _o = "hsl(var(--p))", go = "hsl(var(--su))"; function bo(i, e, t) { let o, n, r; I(i, We, (_) => t(8, n = _)), I(i, je, (_) => t(9, r = _)); let { loading: l } = e, { showWatermark: a } = e, u, f, c = 0.8, h = 8, m = 0.15; return re() && (c = 0.65, h = 10, m = 0.25), i.$$set = (_) => { "loading" in _ && t(0, l = _.loading), "showWatermark" in _ && t(1, a = _.showWatermark); }, i.$$.update = () => { if (i.$$.dirty & /*$videoStore, percentage, ovalHeight, ovalWidth, $ovalDimensions, captureBarPercentage*/ 952 && r) { t(4, f = r.videoHeight * c), t(3, u = f / 1.45), g(We, n.width = u, n), g(We, n.height = f, n), g(We, n.x = (r.videoWidth - n.width) / 2, n); let _ = r.videoHeight - r.videoHeight * m; g(We, n.y = _ - n.height, n); } i.$$.dirty & /*ovalWidth, ovalHeight, borderWidth*/ 88 && t(2, o = ` --oval-width: ${u}px; --oval-height: ${f}px; --border-color: ${_o}; --border-color-animation: ${go}; --oval-border: ${h}px; `); }, [ l, a, o, u, f, c, h, m, n, r ]; } class qi extends ut { constructor(e) { super(), ft( this, { target: this.shadowRoot, props: ht(this.attributes), customElement: !0 }, bo, mo, dt, { loading: 0, showWatermark: 1 }, null ), e && (e.target && R(e.target, this, e.anchor), e.props && (this.$set(e.props), V())); } static get observedAttributes() { return ["loading", "showWatermark"]; } get loading() { return this.$$.ctx[0]; } set loading(e) { this.$$set({ loading: e }), V(); } get showWatermark() { return this.$$.ctx[1]; } set showWatermark(e) { this.$$set({ showWatermark: e }), V(); } } customElements.define("face-oval", qi); function vo(i) { let e; return { c() { e = p("div"), this.c = X, d(e, "class", "video-overlay z-0"), d( e, "style", /*styleVars*/ i[0] ); }, m(t, o) { R(t, e, o); }, p(t, [o]) { o & /*styleVars*/ 1 && d( e, "style", /*styleVars*/ t[0] ); }, i: X, o: X, d(t) { t && D(e); } }; } function po(i, e, t) { let o, n; I(i, je, (c) => t(6, n = c)); let r, l, a = 0.8, { overlayColor: u } = e, { overlayTransparency: f } = e; return re() && (a = 0.65), i.$$set = (c) => { "overlayColor" in c && t(1, u = c.overlayColor), "overlayTransparency" in c && t(2, f = c.overlayTransparency); }, i.$$.update = () => { i.$$.dirty & /*$videoStore, percentage, ovalHeight*/ 112 && n && (t(4, l = n.videoHeight * a), t(3, r = l / 1.45)), i.$$.dirty & /*ovalWidth, ovalHeight, overlayColor, overlayTransparency*/ 30 && t(0, o = ` --oval-width: ${r}px; --oval-height: ${l}px; --overlay-color: ${u}; --overlay-transparency: ${f}; `); }, [ o, u, f, r, l, a, n ]; } class Ji extends ut { constructor(e) { super(), ft( this, { target: this.shadowRoot, props: ht(this.attributes), customElement: !0 }, po, vo, dt, { overlayColor: 1, overlayTransparency: 2 }, null ), e && (e.target && R(e.target, this, e.anchor), e.props && (this.$set(e.props), V())); } static get observedAttributes() { return ["overlayColor", "overlayTransparency"]; } get overlayColor() { return this.$$.ctx[1]; } set overlayColor(e) { this.$$set({ overlayColor: e }), V(); } get overlayTransparency() { return this.$$.ctx[2]; } set overlayTransparency(e) { this.$$set({ overlayTransparency: e }), V(); } } customElements.define("overlay-oval", Ji); function Oi(i) { let e, t, o, n, r, l, a = ( /*$_*/ i[2]("faceCollector.obtainingPicture") + "" ), u; return { c() { e = p("slot"), t = p("div"), o = p("img"), r = N(), l = p("span"), u = P(a), He(o.src, n = zt) || d(o, "src", n), d(o, "alt", "loading gif"), d(o, "class", "m-auto h-[10em] lg:h-[12em]"), d(l, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center"), d(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), d(e, "name", "loading-camera-gif"), d(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]"); }, m(f, c) { R(f, e, c), b(e, t), b(t, o), b(t, r), b(t, l), b(l, u); }, p(f, c) { c & /*$_*/ 4 && a !== (a = /*$_*/ f[2]("faceCollector.obtainingPicture") + "") && B(u, a); }, d(f) { f && D(e); } }; } function Ri(i) { let e, t, o, n, r, l; function a(c, h) { return ( /*$isLoading*/ c[5] ? Co : wo ); } let u = a(i), f = u(i); return { c() { e = p("div"), t = p("slot"), o = p("div"), n = p("img"), l = N(), f.c(), He(n.src, r = zt) || d(n, "src", r), d(n, "alt", "loading gif"), d(n, "class", "m-auto h-[10em] lg:h-[12em]"), d(o, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), d(t, "name", "loading-camera-gif"), d(t, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]"), d(e, "class", "bg-white absolute inset-0 z-10 flex items-center justify-center"); }, m(c, h) { R(c, e, h), b(e, t), b(t, o), b(o, n), b(o, l), f.m(o, null); }, p(c, h) { u === (u = a(c)) && f ? f.p(c, h) : (f.d(1), f = u(c), f && (f.c(), f.m(o, null))); }, d(c) { c && D(e), f.d(); } }; } function wo(i) { let e, t = ( /*$_*/ i[2]("faceCollector.obtainingPicture") + "" ), o; return { c() { e = p("span"), o = P(t), d(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center"); }, m(n, r) { R(n, e, r), b(e, o); }, p(n, r) { r & /*$_*/ 4 && t !== (t = /*$_*/ n[2]("faceCollector.obtainingPicture") + "") && B(o, t); }, d(n) { n && D(e); } }; } function Co(i) { let e; return { c() { e = p("span"), e.textContent = "Obtaining photo...", d(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center"); }, m(t, o) { R(t, e, o); }, p: X, d(t) { t && D(e); } }; } function Ii(i) { let e, t, o, n, r; function l(f, c) { return ( /*$isLoading*/ f[5] ? yo : Eo ); } let a = l(i), u = a(i); return { c() { e = p("slot"), t = p("div"), o = p("img"), r = N(), u.c(), He(o.src, n = zt) || d(o, "src", n), d(o, "alt", "loading gif"), d(o, "class", "m-auto h-[10em] lg:h-[12em]"), d(t, "class", "translate-y-1/3 md:translate-y-1/4 xl:translate-y-1/2"), d(e, "name", "loading-camera-gif"), d(e, "class", "block h-[17em] lg:h-[21.6em] xl:h-[30em]"); }, m(f, c) { R(f, e, c), b(e, t), b(t, o), b(t, r), u.m(t, null); }, p(f, c) { a === (a = l(f)) && u ? u.p(f, c) : (u.d(1), u = a(f), u && (u.c(), u.m(t, null))); }, d(f) { f && D(e), u.d(); } }; } function Eo(i) { let e, t = ( /*$_*/ i[2]("faceCollector.initiatingCamera") + "" ), o; return { c() { e = p("span"), o = P(t), d(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center"); }, m(n, r) { R(n, e, r), b(e, o); }, p(n, r) { r & /*$_*/ 4 && t !== (t = /*$_*/ n[2]("faceCollector.initiatingCamera") + "") && B(o, t); }, d(n) { n && D(e); } }; } function yo(i) { let e; return { c() { e = p("span"), e.textContent = "Loading camera...", d(e, "class", "2xl:text-2xl lg:text-2xl text-md block p-2 m-auto text-center"); }, m(t, o) { R(t, e, o); }, p: X, d(t) { t && D(e); } }; } function ko(i) { let e = K() && /*waitingIdrndCaptureEvent*/ i[0], t, o, n = (K() && /*idrndLoading*/ (i[1] || !/*$ready*/ i[6]) || !K() && !/*$ready*/ i[6]) && /*$cameraStatusStore*/ i[4] === M.OK, r, l = e && Oi(i), a = ( /*$detectingFace*/ i[3] && /*$cameraStatusStore*/ i[4] === M.OK && Ri(i) ), u = n && Ii(i); return { c() { l && l.c(), t = N(), a && a.c(), o = N(), u && u.c(), r = ji(), this.c = X; }, m(f, c) { l && l.m(f, c), R(f, t, c), a && a.m(f, c), R(f, o, c), u && u.m(f, c), R(f, r, c); }, p(f, [c]) { c & /*waitingIdrndCaptureEvent*/ 1 && (e = K() && /*waitingIdrndCaptureEvent*/ f[0]), e ? l ? l.p(f, c) : (l = Oi(f), l.c(), l.m(t.parentNode, t)) : l && (l.d(1), l = null), /*$detectingFace*/ f[3] && /*$cameraStatusStore*/ f[4] === M.OK ? a ? a.p(f, c) : (a = Ri(f), a.c(), a.m(o.parentNode, o)) : a && (a.d(1), a = null), c & /*idrndLoading, $ready, $cameraStatusStore*/ 82 && (n = (K() && /*idrndLoading*/ (f[1] || !/*$ready*/ f[6]) || !K() && !/*$ready*/ f[6]) && /*$cameraStatusStore*/ f[4] === M.OK), n ? u ? u.p(f, c) : (u = Ii(f), u.c(), u.m(r.parentNode, r)) : u && (u.d(1), u = null); }, i: X, o: X, d(f) { l && l.d(f), f && D(t), a && a.d(f), f && D(o), u && u.d(f), f && D(r); } }; } function To(i, e, t) { let o, n, r, l, a; I(i, Ki, (c) => t(2, o = c)), I(i, zi, (c) => t(3, n = c)), I(i, q, (c) => t(4, r = c)), I(i, Ts, (c) => t(5, l = c)), I(i, Ve, (c) => t(6, a = c)); let { waitingIdrndCaptureEvent: u } = e, { idrndLoading: f } = e; return i.$$set = (c) => { "waitingIdrndCaptureEvent" in c && t(0, u = c.waitingIdrndCaptureEvent), "idrndLoading" in c && t(1, f = c.idrndLoading); }, [ u, f, o, n, r, l, a ]; } class Qi extends ut { constructor(e) { super(), ft( this, { target: this.shadowRoot, props: ht(this.attributes), customElement: !0 }, To, ko, dt, { waitingIdrndCaptureEvent: 0, idrndLoading: 1 }, null ), e && (e.target && R(e.target, this, e.anchor), e.props && (this.$set(e.props), V())); } static get observedAttributes() { return ["waitingIdrndCaptureEvent", "idrndLoading"]; } get waitingIdrndCaptureEvent() { return this.$$.ctx[0]; } set waitingIdrndCaptureEvent(e) { this.$$set({ waitingIdrndCaptureEvent: e }), V(); } get idrndLoading() { return this.$$.ctx[1]; } set idrndLoading(e) { this.$$set({ idrndLoading: e }), V(); } } customElements.define("loading-component", Qi); function Di(i, e, t) { const o = i.slice(); return o[120] = e[t], o; } function Ai(i, e, t) { const o = i.slice(); return o[120] = e[t], o; } function Li(i) { let e, t, o = K(), n, r, l, a, u, f, c, h, m, _, y, w, v, E, k, F, Ee, ne = o && Oo(i), j = ( /*$ready*/ i[22] && !/*$detectingFace*/ i[25] && Fi(i) ); return _ = new Zs({}), w = new ao({ props: { showConfigButton: ( /*showConfigButton*/ i[4] ), showAutoCaptureButton: ( /*showAutoCaptureButton*/ i[5] ), showCaptureButton: ( /*showCaptureButton*/ i[0] ), showCameraButton: ( /*showCameraButton*/ i[6] ), enableCaptureButton: ( /*enableCaptureButton*/ i[16] ), videoOverlay: ( /*videoOverlay*/ i[9] ), videoOverlayTransparency: ( /*videoOverlayTransparency*/ i[10] ), idrndClosed: ( /*idrndClosed*/ i[18] ), idrndLoading: ( /*idrndLoading*/ i[17] ), waitingIdrndCaptureEvent: ( /*waitingIdrndCaptureEvent*/ i[19] ), handler: ( /*capture*/ i[38] ) } }), { c() { e = p("div"), t = p("div"), ne && ne.c(), n = N(), r = p("video"), a = N(), u = p("canvas"), f = N(), c = p("div"), h = p("div"), j && j.c(), m = N(), ue(_.$$.fragment), y = N(), ue(w.$$.fragment), d(r, "id", "bry-cc-camera-video-tag"), d(r, "class", l = /*$ready*/ i[22] ? re() ? "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, d(u, "id", "bry-ce-detectionsCanvas"), d(u, "class", "absolute top-0 left-0 max-w-full -scale-x-100"), d(t, "class", "overflow-hidden"), at( t, "width", /*$videoStore*/ i[33].videoWidth + "px" ), at( t, "height", /*$videoStore*/ i[33].videoHeight + "px" ), d(h, "class", "flex flex-grow w-full items-center justify-center relative"), d(c, "class", "absolute inset-0 flex flex-col items-center justify-between w-full h-full"), d(e, "class", v = /*$ready*/ i[22] ? "relative" : "relative w-0 h-0"), e.hidden = E = /*$cameraStatusStore*/ i[21] !== M.OK || K() && /*idrndLoading*/ (i[17] || /*idrndClosed*/ i[18] || /*waitingIdrndCaptureEvent*/ i[19]); }, m(L, A) { R(L, e, A), b(e, t), ne && ne.m(t, null), b(t, n), b(t, r), i[49](r), b(t, a), b(t, u), i[51](u), b(e, f), b(e, c), b(c, h), j && j.m(h, null), b(c, m), fe(_, c, null), b(c, y), fe(w, c, null), k = !0, F || (Ee = [ oe( r, "canplay", /*canplay_handler*/ i[50] ), oe( r, "play", /*play*/ i[11], { once: !0 } ) ], F = !0); }, p(L, A) { o && ne.p(L, A), (!k || A[0] & /*$ready*/ 4194304 && l !== (l = /*$ready*/ L[22] ? re() ? "absolute inset-0 -scale-x-100" : "w-full h-full object-cover -scale-x-100" : "w-0 h-0")) && d(r, "class", l), (!k || A[1] & /*$videoStore*/ 4) && at( t, "width", /*$videoStore*/ L[33].videoWidth + "px" ), (!k || A[1] & /*$videoStore*/ 4) && at( t, "height", /*$videoStore*/ L[33].videoHeight + "px" ), /*$ready*/ L[22] && !/*$detectingFace*/ L[25] ? j ? (j.p(L, A), A[0] & /*$ready, $detectingFace*/ 37748736 && H(j, 1)) : (j = Fi(L), j.c(), H(j, 1), j.m(h, null)) : j && (Ke(), Q(j, 1, 1, () => { j = null; }), ze()); const O = {}; A[0] & /*showConfigButton*/ 16 && (O.showConfigButton = /*showConfigButton*/ L[4]), A[0] & /*showAutoCaptureButton*/ 32 && (O.showAutoCaptureButton = /*showAutoCaptureButton*/ L[5]), A[0] & /*showCaptureButton*/ 1 && (O.showCaptureButton = /*showCaptureButton*/ L[0]), A[0] & /*showCameraButton*/ 64 && (O.showCameraButton = /*showCameraButton*/ L[6]), A[0] & /*enableCaptureButton*/ 65536 && (O.enableCaptureButton = /*enableCaptureButton*/ L[16]), A[0] & /*videoOverlay*/ 512 && (O.videoOverlay = /*videoOverlay*/ L[9]), A[0] & /*videoOverlayTransparency*/ 1024 && (O.videoOverlayTransparency = /*videoOverlayTransparency*/ L[10]), A[0] & /*idrndClosed*/ 262144 && (O.idrndClosed = /*idrndClosed*/ L[18]), A[0] & /*idrndLoading*/ 131072 && (O.idrndLoading = /*idrndLoading*/ L[17]), A[0] & /*waitingIdrndCaptureEvent*/ 524288 && (O.waitingIdrndCaptureEvent = /*waitingIdrndCaptureEvent*/ L[19]), w.$set(O), (!k || A[0] & /*$ready*/ 4194304 && v !== (v = /*$ready*/ L[22] ? "relative" : "relative w-0 h-0")) && d(e, "class", v), (!k || A[0] & /*$cameraStatusStore, idrndLoading, idrndClosed, waitingIdrndCaptureEvent*/ 3014656 && E !== (E = /*$cameraStatusStore*/ L[21] !== M.OK || K() && /*idrndLoading*/ (L[17] || /*idrndClosed*/ L[18] || /*waitingIdrndCaptureEvent*/ L[19]))) && (e.hidden = E); }, i(L) { k || (H(j), H(_.$$.fragment, L), H(w.$$.fragment, L), k = !0); }, o(L) { Q(j), Q(_.$$.fragment, L), Q(w.$$.fragment, L), k = !1; }, d(L) { L && D(e), ne && ne.d(), i[49](null), i[51](null), j && j.d(), de(_), de(w), F = !1, mt(Ee); } }; } function Oo(i) { let e; return { c() { e = p("idlive-face-capture"), e.hidden = !0, se(e, "mask_hidden", ""), se(e, "auto_capture_disabled", ""), se(e, "auto_close_disabled", ""), se( e, "device_id", /*$selectedVideoDeviceId*/ i[23] ), se(e, "face_not_centered_check_enabled", ""), se(e, "sunglasses_detected_check_enabled", ""), se(e, "mouth_open_check_enabled", ""), se(e, "face_blurry_check_enabled", ""), se(e, "dark_image_check_enabled", ""), se(e, "eyes_closed_check_enabled", ""); }, m(t, o) { R(t, e, o), i[48](e); }, p(t, o) { o[0] & /*$selectedVideoDeviceId*/ 8388608 && se( e, "device_id", /*$selectedVideoDeviceId*/ t[23] ); }, d(t) { t && D(e), i[48](null); } }; } function Fi(i) { let e, t, o, n, r, l; return e = new lo({ props: { isCountingDown: ( /*isCountingDown*/ i[15] ) } }), o = new qi({ props: { loading: ( /*isCountingDown*/ i[15] ), showWatermark: ( /*showWatermark*/ i[8] ) } }), r = new Ji({ props: { overlayColor: ( /*videoOverlay*/ i[9] ), overlayTransparency: ( /*videoOverlayTransparency*/ i[10] ) } }), { c() { ue(e.$$.fragment), t = N(), ue(o.$$.fragment), n = N(), ue(r.$$.fragment); }, m(a, u) { fe(e, a, u), R(a, t, u), fe(o, a, u), R(a, n, u), fe(r, a, u), l = !0; }, p(a, u) { const f = {}; u[0] & /*isCountingDown*/ 32768 && (f.isCountingDown = /*isCountingDown*/ a[15]), e.$set(f); const c = {}; u[0] & /*isCountingDown*/ 32768 && (c.loading = /*isCountingDown*/ a[15]), u[0] & /*showWatermark*/ 256 && (c.showWatermark = /*showWatermark*/ a[8]), o.$set(c); const h = {}; u[0] & /*videoOverlay*/ 512 && (h.overlayColor = /*videoOverlay*/ a[9]), u[0] & /*videoOverlayTransparency*/ 1024 && (h.overlayTransparency = /*videoOverlayTransparency*/ a[10]), r.$set(h); }, i(a) { l || (H(e.$$.fragment, a), H(o.$$.fragment, a), H(r.$$.fragment, a), l = !0); }, o(a) { Q(e.$$.fragment, a), Q(o.$$.fragment, a), Q(r.$$.fragment, a), l = !1; }, d(a) { de(e, a), a && D(t), de(o, a), a && D(n), de(r, a); } }; } function Si(i) { let e, t, o = ( /*$_*/ i[30]("faceCollector.finish") + "" ), n, r, l, a, u = ( /*$_*/ i[30]("faceCollector.retakePhoto") + "" ), f, c, h; return { c() { e = p("div"), t = p("button"), n = P(o), l = N(), a = p("button"), f = P(u), t.disabled = r = /*$justification*/ i[27].length === 0, d(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), d(a, "id", "bry-cc-retake-button"), d(a, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), d(e, "class", "ce-dui-btn-group flex"); }, m(m, _) { R(m, e, _), b(e, t), b(t, n), b(e, l), b(e, a), b(a, f), c || (h = [ oe( t, "click", /*click_handler*/ i[52] ), oe( a, "click", /*click_handler_1*/ i[53] ) ], c = !0); }, p(m, _) { _[0] & /*$_*/ 1073741824 && o !== (o = /*$_*/ m[30]("faceCollector.finish") + "") && B(n, o), _[0] & /*$justification*/ 134217728 && r !== (r = /*$justification*/ m[27].length === 0) && (t.disabled = r), _[0] & /*$_*/ 1073741824 && u !== (u = /*$_*/ m[30]("faceCollector.retakePhoto") + "") && B(f, u); }, d(m) { m && D(e), c = !1, mt(h); } }; } function Ro(i) { let e, t; return e = new ro({ props: { handler: ( /*func*/ i[62] ) } }), { c() { ue(e.$$.fragment); }, m(o, n) { fe(e, o, n), t = !0; }, p: X, i(o) { t || (H(e.$$.fragment, o), t = !0); }, o(o) { Q(e.$$.fragment, o), t = !1; }, d(o) { de(e, o); } }; } function Io(i) { let e, t, o, n, r, l, a, u, f; const c = [ So, Fo, Lo, Ao, Do ], h = []; function m(_, y) { return ( /*$captured*/ _[24] ? ( /*$unconformitiesStore*/ _[31].isLoading ? 1 : ( /*$requestResult*/ _[29] !== z.OK ? 2 : ( /*$saved*/ _[26] ? 4 : 3 ) ) ) : 0 ); } return l = m(i), a = h[l] = c[l](i), { c() { e = p("div"), t = p("img"), r = N(), a.c(), d(t, "class", "m-auto col-start-1 col-end-1 max-h-[23.2em]"), He(t.src, o = /*$dataTypePrefix*/ i[32] + "," + /*$image*/ i[28]) || d(t, "src", o), t.hidden = n = !/*$captured*/ i[24] || !/*$showFaceWhileValidating*/ i[34] && /*$unconformitiesStore*/ i[31].isLoading, d(t, "alt", ""), d(e, "class", u = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (!/*$showFaceWhileValidating*/ i[34] && /*$unconformitiesStore*/ i[31].isLoading ? "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible" : "grid overflow-hidden")); }, m(_, y) { R(_, e, y), b(e, t), b(e, r), h[l].m(e, null), f = !0; }, p(_, y) { (!f || y[0] & /*$image*/ 268435456 | y[1] & /*$dataTypePrefix*/ 2 && !He(t.src, o = /*$dataTypePrefix*/ _[32] + "," + /*$image*/ _[28])) && d(t, "src", o), (!f || y[0] & /*$captured*/ 16777216 | y[1] & /*$showFaceWhileValidating, $unconformitiesStore*/ 9 && n !== (n = !/*$captured*/ _[24] || !/*$showFaceWhileValidating*/ _[34] && /*$unconformitiesStore*/ _[31].isLoading)) && (t.hidden = n); let w = l; l = m(_), l === w ? h[l].p(_, y) : (Ke(), Q(h[w], 1, 1, () => { h[w] = null; }), ze(), a = h[l], a ? a.p(_, y) : (a = h[l] = c[l](_), a.c()), H(a, 1), a.m(e, null)), (!f || y[1] & /*$showFaceWhileValidating, $unconformitiesStore*/ 9 && u !== (u = "grid-cols-1 grid-rows-2 sm:grid-cols-2 sm:grid-rows-1 gap-[.5em] " + (!/*$showFaceWhileValidating*/ _[34] && /*$unconformitiesStore*/ _[31].isLoading ? "absolute -translate-y-1/2 -translate-x-1/2 top-1/2 left-1/2 overflow-visible" : "grid overflow-hidden"))) && d(e, "class", u); }, i(_) { f || (H(a), f = !0); }, o(_) { Q(a), f = !1; }, d(_) { _ && D(e), h[l].d(); } }; } function Do(i) { let e, t, o = ( /*$_*/ i[30]("faceCollector.captured") + "" ), n, r, l, a, u, f = ( /*$_*/ i[30]("faceCollector.retakePhoto") + "" ), c, h, m = rt(io).faceStrategy !== so.DISABLED, _, y, w, v = ( /*$unconformitiesStore*/ i[31].unconformities.length !== 0 && Ni(i) ), E = m && No(); return { c() { e = p("div"), t = p("h1"), n = P(o), r = N(), v && v.c(), l = N(), a = p("div"), u = p("button"), c = P(f), h = N(), E && E.c(), d(t, "class", "text-3xl font-bold pb-[1em] transition-opacity"), d(u, "id", "bry-cc-retake-button"), d(u, "class", "ce-dui-btn ce-dui-btn-block flex-shrink text-base"), d(a, "class", "flex flex-row"), ki(a, "ce-dui-btn-group", !/*$exportButtonDisabled*/ i[35]); }, m(k, F) { R(k, e, F), b(e, t), b(t, n), b(e, r), v && v.m(e, null), b(e, l), b(e, a), b(a, u), b(u, c), b(a, h), E && E.m(a, null), _ = !0, y || (w = oe( u, "click", /*click_handler_6*/ i[61] ), y = !0); }, p(k, F) { (!_ || F[0] & /*$_*/ 1073741824) && o !== (o = /*$_*/ k[30]("faceCollector.captured") + "") && B(n, o), /*$unconformitiesStore*/ k[31].unconformities.length !== 0 ? v ? v.p(k, F) : (v = Ni(k), v.c(), v.m(e, l)) : v && (v.d(1), v = null), (!_ || F[0] & /*$_*/ 1073741824) && f !== (f = /*$_*/ k[30]("faceCollector.retakePhoto") + "") && B(c, f), (!_ || F[1] & /*$exportButtonDisabled*/ 16) && ki(a, "ce-dui-btn-group", !/*$exportButtonDisabled*/ k[35]); }, i(k) { _ || (H(E), _ = !0); }, o(k) { Q(E), _ = !1; }, d(k) { k && D(e), v && v.d(), E && E.d(), y = !1, w(); } }; } function Ao(i) { let e, t, o = ( /*evaluatePhoto*/ (i[2] ? ( /*$unconformitiesStore*/ i[31].unconformities.length === 0 ? ( /*$_*/ i[30]("faceCollector.everythingOk") ) : ( /*$_*/ i[30]("faceCollector.unconformities") ) ) : ( /*$_*/ i[30]("faceCollector.previewCapture") )) + "" ), n, r, l, a, u, f, c = ( /*$unconformitiesStore*/ i[31].unconformities ), h = []; for (let w = 0; w < c.length; w += 1) h[w] = Pi(Di(i, c, w)); let m = ( /*evaluatePhoto*/ i[2] && /*$unconformitiesStore*/ i[31].unconformities.length == 0 && Wi(i) ), _ = ( /*showJustificationField*/ i[7] && /*$unconformitiesStore*/ i[31].unconformities.length > 0 && Bi(i) ), y = ( /*$captured*/ i[24] && Mi(i) ); return { c() { e = p("div"), t = p("h1"), n = P(o), r = N(), l = p("div"); for (let w = 0; w < h.length; w += 1) h[w].c(); a = N(), m && m.c(), u = N(), _ && _.c(), f = N(), y && y.c(), d(t, "class", "text-3xl font-bold transition-opacity"), d(l, "class", "flex flex-wrap"), d(e, "class", "flex flex-col justify-between"); }, m(w, v) { R(w, e, v), b(e, t), b(t, n), b(e, r), b(e, l); for (let E = 0; E < h.length; E += 1) h[E] && h[E].m(l, null); b(l, a), m && m.m(l, null), b(e, u), _ && _.m(e, null), b(e, f), y && y.m(e, null); }, p(w, v) { if (v[0] & /*evaluatePhoto, $_*/ 1073741828 | v[1] & /*$unconformitiesStore*/ 1 && o !== (o = /*evaluatePhoto*/ (w[2] ? ( /*$unconformitiesStore*/ w[31].unconformities.length === 0 ? ( /*$_*/ w[30]("faceCollector.everythingOk") ) : ( /*$_*/ w[30]("faceCollector.unconformities") ) ) : ( /*$_*/ w[30]("faceCollector.previewCapture") )) + "") && B(n, o), v[1] & /*$unconformitiesStore*/ 1) { c = /*$unconformitiesStore*/ w[31].unconformities; let E; for (E = 0; E < c.length; E += 1) { const k = Di(w, c, E); h[E] ? h[E].p(k, v) : (h[E] = Pi(k), h[E].c(), h[E].m(l, a)); } for (; E < h.length; E += 1) h[E].d(1); h.length = c.length; } /*evaluatePhoto*/ w[2] && /*$unconformitiesStore*/ w[31].unconformities.length == 0 ? m ? m.p(w, v) : (m = Wi(w), m.c(), m.m(l, null)) : m && (m.d(1), m = null), /*showJustificationField*/ w[7] && /*$unconformitiesStore*/ w[31].unconformities.length > 0 ? _ ? _.p(w, v) : (_ = Bi(w), _.c(), _.m(e, f)) : _ && (_.d(1), _ = null), /*$captured*/ w[24] ? y ? y.p(w, v) : (y = Mi(w), y.c(), y.m(e, null)) : y && (y.d(1), y = null); }, i: X, o: X, d(w) { w && D(e), Hi(h, w), m && m.d(), _ && _.d(), y && y.d(); } }; } function Lo(i) { let e, t, o, n, r = ( /*$_*/ i[30]("faceCollector.finish") + "" ), l, a, u, f = ( /*$_*/ i[30]("faceCollector.retakePhoto") + "" ), c, h, m; function _(v, E) { return ( /*$requestResult*/ v[29] === z.LIVENESS_DETECTION_FAILURE || /*$requestResult*/ v[29] === z.UNKNOWN_LIVENESS_ERROR ? jo : ( /*$requestResult*/ v[29] === z.LOW_LIVENESS_SCORE ? Vo : ( /*$requestResult*/ v[29] === z.TEMPLATE_EXTRACTION_ERROR || /*$requestResult*/ v[29] === z.UNKNOWN_TEMPLATE_EXTRACTION_ERROR ? Uo : ( /*$requestResult*/ v[29] === z.UNABLE_TO_COMMUNICATE_WITH_TEMPLATE_EXTRACTION_SERVICE ? Mo : ( /*$requestResult*/ v[29] === z.LIVENESS_EVALUATION_ERROR ? Bo : ( /*$requestResult*/ v[29] === z.INSUFFICIENT_FACE_QUALITY ? Wo : Po ) ) ) ) ) ); } let y = _(i), w = y(i); return { c() { e = p("div"), w.c(), t = N(), o = p("div"), n = p("button"), l = P(r), a = N(), u = p("button"), c = P(f), n.disabled = !0, d(n, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink"), d(u, "id", "bry-cc-retake-button"), d(u, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink"), d(o, "class", "ce-dui-btn-group flex"), d(e, "class", "flex flex-col justify-between"); }, m(v, E) { R(v, e, E), w.m(e, null), b(e, t), b(e, o), b(o, n), b(n, l), b(o, a), b(o, u), b(u, c), h || (m = [ oe( n, "click", /*click_handler_2*/ i[55] ), oe( u, "click", /*click_handler_3*/ i[56] ) ], h = !0); }, p(v, E) { y === (y = _(v)) && w ? w.p(v, E) : (w.d(1), w = y(v), w && (w.c(), w.m(e, t))), E[0] & /*$_*/ 1073741824 && r !== (r = /*$_*/ v[30]("faceCollector.finish") + "") && B(l, r), E[0] & /*$_*/ 1073741824 && f !== (f = /*$_*/ v[30]("faceCollector.retakePhoto") + "") && B(c, f); }, i: X, o: X, d(v) { v && D(e), w.d(), h = !1, mt(m); } }; } function Fo(i) { let e, t, o = ( /*$_*/ i[30]("faceCollector.validating") + "" ), n, r, l; return { c() { e = p("div"), t = p("h1"), n = P(o), r = N(), l = p("div"), d(t, "class", "inline-block text-3xl font-bold pb-[1em] transition-opacity"), d(l, "class", "ml-6 inline-block dot-typing"), d(e, "class", "min-w-[200px]"); }, m(a, u) { R(a, e, u), b(e, t), b(t, n), b(e, r), b(e, l); }, p(a, u) { u[0] & /*$_*/ 1073741824 && o !== (o = /*$_*/ a[30]("faceCollector.validating") + "") && B(n, o); }, i: X, o: X, d(a) { a && D(e); } }; } function So(i) { let e; return { c() { e = p("div"), d(e, "class", ""); }, m(t, o) { R(t, e, o); }, p: X, i: X, o: X, d(t) { t && D(e); } }; } function Ni(i) { let e, t, o = ( /*$_*/ i[30]("faceCollector.justification") + "" ), n, r, l, a, u; return { c() { e = p("label"), t = p("span"), n = P(o), r = N(), l = p("textarea"), d(t, "class", "ce-dui-label-text text-base"), d(e, "class", "ce-dui-label"), d(e, "for", "justification"), d(l, "contenteditable", ""), d(l, "id", "justification"), d(l, "class", "ce-dui-textarea ce-dui-textarea-bordered textarea-ghost h-[6em] w-full text-base"); }, m(f, c) { R(f, e, c), b(e, t), b(t, n), R(f, r, c), R(f, l, c), ct( l, /*$justification*/ i[27] ), a || (u = oe( l, "input", /*textarea_input_handler_1*/ i[60] ), a = !0); }, p(f, c) { c[0] & /*$_*/ 1073741824 && o !== (o = /*$_*/ f[30]("faceCollector.justification") + "") && B(n, o), c[0] & /*$justification*/ 134217728 && ct( l, /*$justification*/ f[27] ); }, d(f) { f && D(e), f && D(r), f && D(l), a = !1, u(); } }; } function No(i) { let e, t; return e = new oo({ props: { cssClass: "ce-dui-btn-block flex-shrink" } }), { c() { ue(e.$$.fragment); }, m(o, n) { fe(e, o, n), t = !0; }, i(o) { t || (H(e.$$.fragment, o), t = !0); }, o(o) { Q(e.$$.fragment, o), t = !1; }, d(o) { de(e, o); } }; } function Pi(i) { let e, t = ( /*unconformity*/ i[120] + "" ), o; return { c() { e = p("div"), o = P(t), d(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-error text-xl pb-[.25em] m-[.5em]"); }, m(n, r) { R(n, e, r), b(e, o); }, p(n, r) { r[1] & /*$unconformitiesStore*/ 1 && t !== (t = /*unconformity*/ n[120] + "") && B(o, t); }, d(n) { n && D(e); } }; } function Wi(i) { let e, t = ( /*$_*/ i[30]("faceCollector.noNonconformity") + "" ), o; return { c() { e = p("div"), o = P(t), d(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-info text-xl pb-[.25em] m-[.5em]"); }, m(n, r) { R(n, e, r), b(e, o); }, p(n, r) { r[0] & /*$_*/ 1073741824 && t !== (t = /*$_*/ n[30]("faceCollector.noNonconformity") + "") && B(o, t); }, d(n) { n && D(e); } }; } function Bi(i) { let e, t, o, n = ( /*$_*/ i[30]("faceCollector.provideAReasonForTheLowQualityCapture") + "" ), r, l, a, u, f, c, h, m, _ = ( /*$_*/ i[30]("faceCollector.thisInformationIsRequired") + "" ), y, w, v, E; return { c() { e = p("div"), t = p("label"), o = p("span"), r = P(n), l = N(), a = p("textarea"), f = N(), c = p("label"), h = p("span"), m = P("("), y = P(_), w = P(")"), d(o, "class", "ce-dui-label-text text-base"), d(t, "class", "ce-dui-label"), d(t, "for", "justification"), d(a, "contenteditable", ""), d(a, "id", "justification"), d(a, "class", "ce-dui-textarea ce-dui-textarea-bordered h-[6em] text-base"), d(a, "placeholder", u = /*$_*/ i[30]("faceCollector.yourJustification")), d(h, "class", "ce-dui-label-text-alt text-base"), d(c, "class", "ce-dui-label"), d(c, "for", "justification"), d(e, "class", "ce-dui-form-control"); }, m(k, F) { R(k, e, F), b(e, t), b(t, o), b(o, r), b(e, l), b(e, a), ct( a, /*$justification*/ i[27] ), b(e, f), b(e, c), b(c, h), b(h, m), b(h, y), b(h, w), v || (E = oe( a, "input", /*textarea_input_handler*/ i[57] ), v = !0); }, p(k, F) { F[0] & /*$_*/ 1073741824 && n !== (n = /*$_*/ k[30]("faceCollector.provideAReasonForTheLowQualityCapture") + "") && B(r, n), F[0] & /*$_*/ 1073741824 && u !== (u = /*$_*/ k[30]("faceCollector.yourJustification")) && d(a, "placeholder", u), F[0] & /*$justification*/ 134217728 && ct( a, /*$justification*/ k[27] ), F[0] & /*$_*/ 1073741824 && _ !== (_ = /*$_*/ k[30]("faceCollector.thisInformationIsRequired") + "") && B(y, _); }, d(k) { k && D(e), v = !1, E(); } }; } function Mi(i) { let e, t, o = ( /*$_*/ i[30]("faceCollector.finish") + "" ), n, r, l, a, u = ( /*$_*/ i[30]("faceCollector.retakePhoto") + "" ), f, c, h; return { c() { e = p("div"), t = p("button"), n = P(o), l = N(), a = p("button"), f = P(u), t.disabled = r = /*evaluatePhoto*/ i[2] && /*showJustificationField*/ i[7] && /*$justification*/ i[27].length === 0 && /*$unconformitiesStore*/ i[31].unconformities.length !== 0, d(t, "class", "ce-dui-btn ce-dui-btn-primary ce-dui-btn-block flex-shrink text-base"), d(a, "id", "bry-cc-retake-button"), d(a, "class", "ce-dui-btn ce-dui-btn-block ce-dui-btn-outline flex-shrink text-base"), d(e, "class", "ce-dui-btn-group flex"); }, m(m, _) { R(m, e, _), b(e, t), b(t, n), b(e, l), b(e, a), b(a, f), c || (h = [ oe( t, "click", /*click_handler_4*/ i[58] ), oe( a, "click", /*click_handler_5*/ i[59] ) ], c = !0); }, p(m, _) { _[0] & /*$_*/ 1073741824 && o !== (o = /*$_*/ m[30]("faceCollector.finish") + "") && B(n, o), _[0] & /*evaluatePhoto, showJustificationField, $justification*/ 134217860 | _[1] & /*$unconformitiesStore*/ 1 && r !== (r = /*evaluatePhoto*/ m[2] && /*showJustificationField*/ m[7] && /*$justification*/ m[27].length === 0 && /*$unconformitiesStore*/ m[31].unconformities.length !== 0) && (t.disabled = r), _[0] & /*$_*/ 1073741824 && u !== (u = /*$_*/ m[30]("faceCollector.retakePhoto") + "") && B(f, u); }, d(m) { m && D(e), c = !1, mt(h); } }; } function Po(i) { let e, t = ( /*$_*/ i[30]("faceCollector.everythingOk") + "" ), o; return { c() { e = p("h1"), o = P(t), d(e, "class", "text-3xl font-bold pb-[1em] transition-opacity"); }, m(n, r) { R(n, e, r), b(e, o); }, p(n, r) { r[0] & /*$_*/ 1073741824 && t !== (t = /*$_*/ n[30]("faceCollector.everythingOk") + "") && B(o, t); }, d(n) { n && D(e); } }; } function Wo(i) { let e, t, o, n, r = ( /*$_*/ i[30]("liveness.error.faceQualityInsufficient") + "" ), l, a = ( /*$unconformitiesStore*/ i[31].unconformities ), u = []; for (let c = 0; c < a.length; c += 1) u[c] = Ui(Ai(i, a, c)); let f = ( /*evaluatePhoto*/ i[2] && /*$unconformitiesStore*/ i[31].unconformities.length == 0 && Vi(i) ); return { c() { e = p("div"); for (let c = 0; c < u.length; c += 1) u[c].c(); t = N(), f && f.c(), o = N(), n = p("h1"), l = P(r), d(e, "class", "flex flex-wrap"), d(n, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error"); }, m(c, h) { R(c, e, h); for (let m = 0; m < u.length; m += 1) u[m] && u[m].m(e, null); b(e, t), f && f.m(e, null), R(c, o, h), R(c, n, h), b(n, l); }, p(c, h) { if (h[1] & /*$unconformitiesStore*/ 1) { a = /*$unconformitiesStore*/ c[31].unconformities; let m; for (m = 0; m < a.length; m += 1) { const _ = Ai(c, a, m); u[m] ? u[m].p(_, h) : (u[m] = Ui(_), u[m].c(), u[m].m(e, t)); } for (; m < u.length; m += 1) u[m].d(1); u.length = a.length; } /*evaluatePhoto*/ c[2] && /*$unconformitiesStore*/ c[31].unconformities.length == 0 ? f ? f.p(c, h) : (f = Vi(c), f.c(), f.m(e, null)) : f && (f.d(1), f = null), h[0] & /*$_*/ 1073741824 && r !== (r = /*$_*/ c[30]("liveness.error.faceQualityInsufficient") + "") && B(l, r); }, d(c) { c && D(e), Hi(u, c), f && f.d(), c && D(o), c && D(n); } }; } function Bo(i) { let e, t = ( /*$_*/ i[30]("liveness.error.evaluationError") + "" ), o; return { c() { e = p("h1"), o = P(t), d(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error"); }, m(n, r) { R(n, e, r), b(e, o); }, p(n, r) { r[0] & /*$_*/ 1073741824 && t !== (t = /*$_*/ n[30]("liveness.error.evaluationError") + "") && B(o, t); }, d(n) { n && D(e); } }; } function Mo(i) { let e, t = ( /*$_*/ i[30]("faceCollector.unableToCompleteRequest") + "" ), o; return { c() { e = p("h1"), o = P(t), d(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error"); }, m(n, r) { R(n, e, r), b(e, o); }, p(n, r) { r[0] & /*$_*/ 1073741824 && t !== (t = /*$_*/ n[30]("faceCollector.unableToCompleteRequest") + "") && B(o, t); }, d(n) { n && D(e); } }; } function Uo(i) { let e, t = ( /*$_*/ i[30]("faceCollector.lowQualityCapture") + "" ), o; return { c() { e = p("h1"), o = P(t), d(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error"); }, m(n, r) { R(n, e, r), b(e, o); }, p(n, r) { r[0] & /*$_*/ 1073741824 && t !== (t = /*$_*/ n[30]("faceCollector.lowQualityCapture") + "") && B(o, t); }, d(n) { n && D(e); } }; } function Vo(i) { let e, t = ( /*$_*/ i[30]("liveness.error.error") + "" ), o, n, r = ( /*$_*/ i[30]("faceCollector.unaliveCapture") + "" ), l; return { c() { e = p("h1"), o = P(t), n = P(": "), l = P(r), d(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error"); }, m(a, u) { R(a, e, u), b(e, o), b(e, n), b(e, l); }, p(a, u) { u[0] & /*$_*/ 1073741824 && t !== (t = /*$_*/ a[30]("liveness.error.error") + "") && B(o, t), u[0] & /*$_*/ 1073741824 && r !== (r = /*$_*/ a[30]("faceCollector.unaliveCapture") + "") && B(l, r); }, d(a) { a && D(e); } }; } function jo(i) { let e, t = ( /*$_*/ i[30]("liveness.error.error") + "" ), o, n, r = ( /*$_*/ i[30]( /*livenessError*/ i[20] ) + "" ), l; return { c() { e = p("h1"), o = P(t), n = P(": "), l = P(r), d(e, "class", "text-3xl font-bold pb-[1em] transition-opacity text-error"); }, m(a, u) { R(a, e, u), b(e, o), b(e, n), b(e, l); }, p(a, u) { u[0] & /*$_*/ 1073741824 && t !== (t = /*$_*/ a[30]("liveness.error.error") + "") && B(o, t), u[0] & /*$_, livenessError*/ 1074790400 && r !== (r = /*$_*/ a[30]( /*livenessError*/ a[20] ) + "") && B(l, r); }, d(a) { a && D(e); } }; } function Ui(i) { let e, t = ( /*unconformity*/ i[120] + "" ), o; return { c() { e = p("div"), o = P(t), d(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-error text-xl pb-[.25em] m-[.5em]"); }, m(n, r) { R(n, e, r), b(e, o); }, p(n, r) { r[1] & /*$unconformitiesStore*/ 1 && t !== (t = /*unconformity*/ n[120] + "") && B(o, t); }, d(n) { n && D(e); } }; } function Vi(i) { let e, t = ( /*$_*/ i[30]("faceCollector.noNonconformity") + "" ), o; return { c() { e = p("div"), o = P(t), d(e, "class", "ce-dui-badge ce-dui-badge-lg h-[2em] ce-dui-badge-info text-xl pb-[.25em] m-[.5em]"); }, m(n, r) { R(n, e, r), b(e, o); }, p(n, r) { r[0] & /*$_*/ 1073741824 && t !== (t = /*$_*/ n[30]("faceCollector.noNonconformity") + "") && B(o, t); }, d(n) { n && D(e); } }; } function Ko(i) { let e, t, o, n, r, l, a, u, f, c, h = ( /*$videoStore*/ i[33] && Li(i) ); n = new Qi({ props: { waitingIdrndCaptureEvent: ( /*waitingIdrndCaptureEvent*/ i[19] ), idrndLoading: ( /*idrndLoading*/ i[17] ) } }); let m = ( /*$captured*/ i[24] && Si(i) ); const _ = [Io, Ro], y = []; function w(v, E) { return (!/*idrndClosed*/ v[18] || /*$captured*/ v[24]) && /*showUnconformities*/ v[3] ? 0 : ( /*$cameraStatusStore*/ v[21] !== M.OK ? 1 : -1 ); } return ~(a = w(i)) && (u = y[a] = _[a](i)), { c() { e = p("div"), t = p("div"), h && h.c(), o = N(), ue(n.$$.fragment), r = N(), m && m.c(), l = N(), u && u.c(), f = ji(), this.c = X, d(t, "class", "relative mx-auto"), d(e, "class", "flex flex-col justify-between"); }, m(v, E) { R(v, e, E), b(e, t), h && h.m(t, null), b(t, o), fe(n, t, null), b(t, r), m && m.m(t, null), i[54](e), R(v, l, E), ~a && y[a].m(v, E), R(v, f, E), c = !0; }, p(v, E) { /*$videoStore*/ v[33] ? h ? (h.p(v, E), E[1] & /*$videoStore*/ 4 && H(h, 1)) : (h = Li(v), h.c(), H(h, 1), h.m(t, o)) : h && (Ke(), Q(h, 1, 1, () => { h = null; }), ze()); const k = {}; E[0] & /*waitingIdrndCaptureEvent*/ 524288 && (k.waitingIdrndCaptureEvent = /*waitingIdrndCaptureEvent*/ v[19]), E[0] & /*idrndLoading*/ 131072 && (k.idrndLoading = /*idrndLoading*/ v[17]), n.$set(k), /*$captured*/ v[24] ? m ? m.p(v, E) : (m = Si(v), m.c(), m.m(t, null)) : m && (m.d(1), m = null); let F = a; a = w(v), a === F ? ~a && y[a].p(v, E) : (u && (Ke(), Q(y[F], 1, 1, () => { y[F] = null; }), ze()), ~a ? (u = y[a], u ? u.p(v, E) : (u = y[a] = _[a](v), u.c()), H(u, 1), u.m(f.parentNode, f)) : u = null); }, i(v) { c || (H(h), H(n.$$.fragment, v), H(u), c = !0); }, o(v) { Q(h), Q(n.$$.fragment, v), Q(u), c = !1; }, d(v) { v && D(e), h && h.d(), de(n), m && m.d(), i[54](null), v && D(l), ~a && y[a].d(v), v && D(f); } }; } let zo = 0, Ho = 3e3; function qo() { ({}).VITE_USE_DEV === "true" ? import("./index-idlf-detector_39cfdffa_3.2.1.js") : import("./index-idlf-detector_a819b3c8_3.2.1.js"); } function Jo(i, e, t) { let o, n, r, l, a, u, f, c, h, m, _, y, w, v, E, k, F, Ee, ne, j, L, A, O, ye, Z, ae, ge, Ie, _t, te, Ht, gt, bt, vt, qt, Jt; I(i, Ft, (s) => t(74, o = s)), I(i, xe, (s) => t(76, r = s)), I(i, q, (s) => t(21, l = s)), I(i, Ve, (s) => t(22, a = s)), I(i, Os, (s) => t(77, u = s)), I(i, $e, (s) => t(78, f = s)), I(i, _e, (s) => t(23, c = s)), I(i, Rs, (s) => t(79, h = s)), I(i, Oe, (s) => t(24, m = s)), I(i, gi, (s) => t(80, _ = s)), I(i, St, (s) => t(81, y = s)), I(i, zi, (s) => t(25, w = s)), I(i, bi, (s) => t(82, v = s)), I(i, Is, (s) => t(83, E = s)), I(i, Be, (s) => t(84, k = s)), I(i, pe, (s) => t(85, F = s)), I(i, Ds, (s) => t(86, Ee = s)), I(i, As, (s) => t(87, ne = s)), I(i, Nt, (s) => t(26, j = s)), I(i, Pt, (s) => t(27, L = s)), I(i, ce, (s) => t(28, A = s)), I(i, $, (s) => t(29, O = s)), I(i, Ki, (s) => t(30, ye = s)), I(i, we, (s) => t(31, Z = s)), I(i, vi, (s) => t(88, ge = s)), I(i, et, (s) => t(89, Ie = s)), I(i, Wt, (s) => t(90, _t = s)), I(i, je, (s) => t(33, te = s)), I(i, Ls, (s) => t(91, Ht = s)), I(i, tt, (s) => t(92, gt = s)), I(i, pi, (s) => t(93, bt = s)), I(i, wi, (s) => t(94, vt = s)), I(i, Fs, (s) => t(34, qt = s)), I(i, Ss, (s) => t(35, Jt = s)); let S, ee, he, Qt, Xt = !1, De = !1, pt = !1, wt = !1, Ct = (/* @__PURE__ */ new Date()).getTime(), { enableMinutiae: Et } = e, { videoDimensions: yt } = e, { noTabs: kt } = e, { weightsPath: Tt } = e, { evaluatePhoto: me } = e, { showCaptureButton: Ot } = e, { showUnconformities: Gt } = e, { showConfigButton: Yt } = e, { showAutoCaptureButton: Rt } = e, { showCameraButton: Zt } = e, { showJustificationField: xt } = e, { minEyeToEyeDist: Ae } = e, { showWatermark: $t } = e, { videoOverlay: ei } = e, { videoOverlayTransparency: ti } = e, { faceDetectionSensitivity: It } = e; const qe = jt(!1); I(i, qe, (s) => t(75, n = s)); const ke = jt("data:image/png;base64"); I(i, ke, (s) => t(32, ae = s)); let { widgetInstance: J } = e, ii = new ho(), Le = !1, Dt = !1, Je = !0, le = !0, Fe = !1, si = 0, x = "", At = 0, Qe = !0, oi = 0; const Xe = Ns.mixin({