@incodetech/web 2.1.1 → 2.2.0-rc.0
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/dist/ae-signature/ae-signature.es.js +7 -4
- package/dist/antifraud/antifraud.es.js +6 -6
- package/dist/authentication/authentication.es.js +7 -7
- package/dist/{autoFocusTitle-CuRu2lPg.js → autoFocusTitle-gLba2mgp.js} +6 -3
- package/dist/{back-horizontal-hint-xTnSQbzn.js → back-horizontal-hint-BBGuJ75y.js} +1 -1
- package/dist/{back-vertical-hint-BWWlHfX2.js → back-vertical-hint-B9usJ5lY.js} +1 -1
- package/dist/base.css +425 -3290
- package/dist/{bottomSheet-CnWbbUAM.js → bottomSheet-Cp8DLulN.js} +7 -8
- package/dist/certificate-issuance/certificate-issuance.es.js +34 -87
- package/dist/certificate-issuance/styles.css +0 -41
- package/dist/{checkbox-1wUHSoaK.js → checkbox-C38Elx0O.js} +5 -5
- package/dist/connectionError-DAeXp8sE.js +45 -0
- package/dist/consent/consent.es.js +10 -12
- package/dist/consent/styles.css +5 -4
- package/dist/{countrySelector-SvUOyPo0.js → countrySelector-2t-ZTgGo.js} +3 -3
- package/dist/cross-document-data-match/cross-document-data-match.es.js +13 -10
- package/dist/curp-validation/curp-validation.es.js +28 -29
- package/dist/curp-validation/styles.css +47 -0
- package/dist/{customFields-BDsXR7A-.js → customFields-B8HQZ7Mh.js} +13 -14
- package/dist/{customWatchlist-CYoRNCim.js → customWatchlist-_tUmZ855.js} +9 -9
- package/dist/dashboardTheme-CVliZSR-.js +223 -0
- package/dist/{dateInputComposed-DuaofcBl.js → dateInputComposed-eRcbt_SL.js} +5 -5
- package/dist/dateInputComposed-ks0-opuq.js +1 -0
- package/dist/document-capture/document-capture.es.js +1 -1
- package/dist/document-capture/styles.css +85 -70
- package/dist/{documentCapture-DhbO-A-V.js → documentCapture-BvEGCYj-.js} +218 -136
- package/dist/documentCapture-DdHdRPzR.js +2 -0
- package/dist/{dropdownComposed-CoU0enG6.js → dropdownComposed-OHDHzt1Q.js} +18 -11
- package/dist/dropdownComposed-kjG4UblM.js +1 -0
- package/dist/dynamic-forms/styles.css +58 -6
- package/dist/{dynamicForms-BifGbC9F.js → dynamicForms-P-4E42IA.js} +53 -45
- package/dist/ekyb/ekyb.es.js +1 -1
- package/dist/ekyb/styles.css +1 -28
- package/dist/ekybModule-CiaxFHXo.js +2 -0
- package/dist/{ekybModule-DGnTw5UV.js → ekybModule-DmjkzVWE.js} +51 -27
- package/dist/ekyc/ekyc.es.js +1 -1
- package/dist/ekyc/styles.css +2 -2
- package/dist/ekycModule-BVt10kgv.js +2 -0
- package/dist/{ekycModule-Dxpdd0ns.js → ekycModule-Da1Fm7ai.js} +45 -19
- package/dist/electronic-signature/electronic-signature.es.js +1 -1
- package/dist/{ae-signature → electronic-signature}/styles.css +2 -2
- package/dist/{electronic-signature-Ueoffasr.js → electronic-signature-yamI6zHM.js} +31 -23
- package/dist/email/email.es.js +10 -11
- package/dist/{emailInput-DsLkDtER.js → emailInput-B0P2Q-pk.js} +4 -4
- package/dist/{expiredId-BZXLrLk-.js → expiredId-BXXE3srN.js} +6 -6
- package/dist/{extensibility-7sRIN0JC.js → extensibility-iJYzpW6H.js} +440 -374
- package/dist/extensibility.es.js +24 -28
- package/dist/face-match/face-match.es.js +1 -1
- package/dist/face-match/styles.css +9 -609
- package/dist/faceMatch-D4XFihTc.js +2 -0
- package/dist/{faceMatch-DyTBoMDm.js → faceMatch-VtEZvsen.js} +71 -79
- package/dist/field-comparison/field-comparison.es.js +1 -1
- package/dist/fieldComparison-B_r9Bal7.js +2 -0
- package/dist/{fieldComparison-L_knHqgw.js → fieldComparison-NLdDSOEh.js} +11 -12
- package/dist/finalSuccessScreen-DryADx1n.js +500 -0
- package/dist/fiscal-qr/fiscal-qr.es.js +12 -12
- package/dist/flip-animation-CvN8FLNc.js +6996 -0
- package/dist/flow/flow.es.js +81 -45
- package/dist/flow/styles.css +908 -5423
- package/dist/{front-horizontal-hint-B84GgTO1.js → front-horizontal-hint-D3CrWViZ.js} +1 -1
- package/dist/{front-vertical-hint-Bs_avngq.js → front-vertical-hint-BoLZvyx5.js} +1 -1
- package/dist/geolocation/geolocation.es.js +36 -13
- package/dist/geolocation/styles.css +1 -1
- package/dist/government-validation/government-validation.es.js +11 -12
- package/dist/{homeScreen-B6T0JVh8.js → homeScreen-Pv3v_0ji.js} +7 -9
- package/dist/{icons-CJJbIpBq.js → icons--ezYG2Fb.js} +92 -7
- package/dist/id/id.es.js +222 -52
- package/dist/id/styles.css +290 -10
- package/dist/id-back-of-card-DO593HH8.js +83 -0
- package/dist/id-back-of-card-vertical-DArEQ0hE.js +88 -0
- package/dist/id-front-of-card-Bcit7Pnq.js +308 -0
- package/dist/id-front-of-card-vertical-Bcr-KXcl.js +278 -0
- package/dist/id-laser-h-BaUHzX-d.js +480 -0
- package/dist/{id-laser-v-BiUXkM4x.js → id-laser-v-Dv9yEYJE.js} +7 -17
- package/dist/id-selfie-flow/id-selfie-flow.es.js +239 -0
- package/dist/id-selfie-flow/styles.css +749 -0
- package/dist/id-verification/id-verification.es.js +13 -9
- package/dist/{idOcr-WFBvqy3b.js → idOcr-gsIXHq6R.js} +14 -15
- package/dist/identity-reuse/identity-reuse.es.js +6 -8
- package/dist/identity-reuse/styles.css +1 -1
- package/dist/{incode-logo-57XFniXU.js → incode-logo-rGFjZHqi.js} +64 -1
- package/dist/incodeComponent-K9ZWg302.js +713 -0
- package/dist/incodeModule-CcLzar_X.js +25 -0
- package/dist/index.es.js +16 -5
- package/dist/{inputComposed-C1R2LAa3.js → inputComposed-BeROn635.js} +9 -9
- package/dist/inputComposed-CADVQW-o.js +1 -0
- package/dist/{mandatoryConsent-D0GTKu-H.js → mandatoryConsent-BtqB-FxY.js} +9 -11
- package/dist/{capture-CkGvdDNH.js → manualCaptureButton-quGa2ufS.js} +68 -198
- package/dist/manualCaptureButton-t_oIol88.js +300 -0
- package/dist/{modal-OxkFuuiR.js → modal-BjjJFpZu.js} +4 -4
- package/dist/{modal.hooks-ZrzmHAUa.js → modal.hooks-BvXzNWvY.js} +1 -1
- package/dist/{numberedStep-CEb-lFJm.js → numberedStep-DUs77Gy3.js} +1 -1
- package/dist/{optionAccessibleLabel-gfF-58Mv.js → optionAccessibleLabel-DgfHD_mx.js} +6 -6
- package/dist/{otpInput-CnDc6pQm.js → otpInput-D5dLXrmC.js} +72 -36
- package/dist/{passport-horizontal-hint-Bj0ZJY0g.js → passport-horizontal-hint-DgnU-8bl.js} +1 -1
- package/dist/{passport-vertical-hint-Dfk77xUJ.js → passport-vertical-hint-Dd2Wknw7.js} +1 -1
- package/dist/{pdf-BqtJTlor.js → pdf-BUoY_2gv.js} +1 -1
- package/dist/pdfViewer-CZb6obcZ.js +2 -0
- package/dist/{pdfViewer-B97DmT9m.js → pdfViewer-vud1VZv6.js} +5 -7
- package/dist/phone/phone.es.js +13 -12
- package/dist/{phoneInputComposed-DMiXfF-1.js → phoneInputComposed-CeVWTS_O.js} +7 -6
- package/dist/{processing-BeUMfdJJ.js → processing-BsvHyDWa.js} +2 -2
- package/dist/qe-signature/qe-signature.es.js +7 -4
- package/dist/{radioGroupComposed-DuQxslB2.js → radioGroupComposed-DzNGUbZQ.js} +16 -15
- package/dist/redirect-to-mobile/redirect-to-mobile.es.js +132 -45
- package/dist/redirect-to-mobile/styles.css +20 -10
- package/dist/{registerIncodeElement-DaNjbAwZ.js → registerIncodeElement-BduCekz5.js} +1 -1
- package/dist/{richText-CB1fmegc.js → richText-CTHBpZOw.js} +3 -1607
- package/dist/selfie/selfie.es.js +10 -10
- package/dist/selfie/styles.css +16 -949
- package/dist/signature/signature.es.js +27 -19
- package/dist/{ae-signature/styles2.css → signature/styles.css} +4 -4
- package/dist/{snackbar-DS7Mv62v.js → snackbar-C9Mqrh0e.js} +2 -2
- package/dist/spacer-CDlQd12V.js +2344 -0
- package/dist/{spinner-BMeIEK1d.js → spinner-CLZ2fz4u.js} +45 -4
- package/dist/statusPage--GVFSUJp.js +36 -0
- package/dist/{successIcon-B5mGvdx1.js → successIcon-Bj8Y9CuI.js} +1 -1
- package/dist/{tabs-C__chW-u.js → tabs-DweBZTV2.js} +4 -3
- package/dist/themes/dark.css +35 -0
- package/dist/themes/light.css +35 -0
- package/dist/{tutorial-CCfPuVKX.js → tutorial-BZZC93Ur.js} +222 -180
- package/dist/types/ae-signature.d.ts +91 -5
- package/dist/types/antifraud.d.ts +86 -3
- package/dist/types/authentication.d.ts +86 -3
- package/dist/types/certificate-issuance.d.ts +86 -3
- package/dist/types/consent.d.ts +86 -3
- package/dist/types/cross-document-data-match.d.ts +88 -4
- package/dist/types/curp-validation.d.ts +86 -3
- package/dist/types/document-capture.d.ts +88 -4
- package/dist/types/ekyb.d.ts +88 -4
- package/dist/types/ekyc.d.ts +88 -4
- package/dist/types/electronic-signature.d.ts +87 -4
- package/dist/types/email.d.ts +82 -22
- package/dist/types/extensibility.d.ts +157 -5
- package/dist/types/face-match.d.ts +84 -22
- package/dist/types/field-comparison.d.ts +86 -3
- package/dist/types/fiscal-qr.d.ts +89 -5
- package/dist/types/flow.d.ts +92 -2
- package/dist/types/geolocation.d.ts +86 -3
- package/dist/types/government-validation.d.ts +86 -3
- package/dist/types/id-selfie-flow.d.ts +161 -0
- package/dist/types/id-verification.d.ts +87 -4
- package/dist/types/id.d.ts +88 -5
- package/dist/types/identity-reuse.d.ts +82 -2
- package/dist/types/index.d.ts +106 -1
- package/dist/types/phone.d.ts +83 -24
- package/dist/types/qe-signature.d.ts +91 -5
- package/dist/types/redirect-to-mobile.d.ts +4 -1
- package/dist/types/selfie.d.ts +86 -3
- package/dist/types/signature.d.ts +91 -5
- package/dist/types/video-selfie.d.ts +83 -6
- package/dist/types/watchlist.d.ts +91 -5
- package/dist/types/workflow.d.ts +85 -2
- package/dist/{i18n-CU4xq8qC.js → uiConfig-B5ASPUL4.js} +26 -3
- package/dist/{useModuleLoader-Bi26kJbg.js → useModuleLoader-D_YpuVsS.js} +37 -248
- package/dist/{vendor-preact-DThS2ZQ_.js → vendor-preact-mvwZ8mJj.js} +1 -1
- package/dist/{verificationResult-BWWkmeiA.js → verificationResult-B8HwR07t.js} +26 -15
- package/dist/video-selfie/styles.css +349 -1202
- package/dist/video-selfie/video-selfie.es.js +120 -381
- package/dist/watchlist/watchlist.es.js +16 -13
- package/dist/{watchlistForBusiness-D2Uo_TwF.js → watchlistForBusiness-D8Is99bZ.js} +12 -13
- package/dist/workflow/styles.css +501 -3977
- package/dist/workflow/workflow.es.js +25 -18
- package/package.json +22 -20
- package/dist/button-Dz6AsbmF.js +0 -40
- package/dist/cameraView-DIEzM5ru.js +0 -47
- package/dist/cpf-ocr/cpf-ocr.es.js +0 -2
- package/dist/cpf-ocr/styles.css +0 -45
- package/dist/cpfOcr-B79245-3.js +0 -2
- package/dist/cpfOcr-BhxT-lRN.js +0 -92
- package/dist/dateInputComposed-DRzZi6uy.js +0 -1
- package/dist/documentCapture-DXYYyxZl.js +0 -2
- package/dist/dropdownComposed-BAoxIIsE.js +0 -1
- package/dist/ekybModule-C6Nttked.js +0 -2
- package/dist/ekycModule-CDIEjI6V.js +0 -2
- package/dist/errorIcon-BA4T6iy-.js +0 -26
- package/dist/faceMatch-B_HvxLm_.js +0 -2
- package/dist/fieldComparison-DfNEuEE5.js +0 -2
- package/dist/flip-animation-CZYSUtMm.js +0 -6983
- package/dist/hooks-CNu7o-v8.js +0 -186
- package/dist/id-laser-h-CzPegPMn.js +0 -467
- package/dist/incodeComponent-CfzJGETt.js +0 -64
- package/dist/incodeModule-B-4_3JrK.js +0 -13
- package/dist/inputComposed-BaY5q9WM.js +0 -1
- package/dist/loadingIcon-B0ysgiNq.js +0 -148
- package/dist/page-DidH_RkX.js +0 -171
- package/dist/spinner-BCDCoi9C.js +0 -1
- package/dist/statusPage-Bk8nJwXV.js +0 -28
- package/dist/transitionSpinner-CuNCqHNi.js +0 -30
- package/dist/types/cpf-ocr.d.ts +0 -12
- package/dist/typography-BZIpjo97.js +0 -45
- package/dist/uiConfig-D2_wawvr.js +0 -25
- /package/dist/{aligndevicelottie-DFscByAI.js → aligndevicelottie-CfoZ5Uus.js} +0 -0
- /package/dist/{back-tutorial-cI_4VHmE.js → back-tutorial-BHyRHyET.js} +0 -0
- /package/dist/{backdevicelottie-COyhTrxM.js → backdevicelottie-yKkczgFy.js} +0 -0
- /package/dist/{blurdevicelottie-BLVeJHEG.js → blurdevicelottie-8BbophdM.js} +0 -0
- /package/dist/{browser-ponyfill-Df13Th-G.js → browser-ponyfill-CBjGwwPW.js} +0 -0
- /package/dist/{defineProperty-Qjefk7Uf.js → defineProperty-BbpBna-2.js} +0 -0
- /package/dist/{frontdevicelottie-B4tE2PYQ.js → frontdevicelottie-CFcahVLk.js} +0 -0
- /package/dist/{glaredevicelottie-D1pR73sx.js → glaredevicelottie-Cnvah0kz.js} +0 -0
- /package/dist/{id-tutorial-DwO90SAm.js → id-tutorial-BOOsXlAJ.js} +0 -0
- /package/dist/{lottie_light-C6B2ec41.js → lottie_light-Bv56F2Ae.js} +0 -0
- /package/dist/{passport-tutorial-D9JNsMsM.js → passport-tutorial-CeSup6m9.js} +0 -0
- /package/dist/{requiredLabelHint-D0RhuMed.js → requiredLabelHint-Dx0WS2cR.js} +0 -0
- /package/dist/{selfieTutorial-pB-N-fj5.js → selfieTutorial-CYa8bq6B.js} +0 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { i as useTranslation } from "./uiConfig-B5ASPUL4.js";
|
|
2
|
+
import { S as k, _ as y, a as D, h as q, l as A, p as d, v as u } from "./vendor-preact-mvwZ8mJj.js";
|
|
3
|
+
import { o as Lottie, t as Spacer, u as cn } from "./spacer-CDlQd12V.js";
|
|
4
|
+
import { r as Button } from "./incode-logo-rGFjZHqi.js";
|
|
5
|
+
import { h as CaptureButtonIcon } from "./icons--ezYG2Fb.js";
|
|
6
|
+
//#region src/shared/cameraOverlay/cameraFrame.tsx
|
|
7
|
+
var CameraFrame = D(({ variant, aspectRatio, orientation = "horizontal", frameState = "idle", className, children }, ref) => {
|
|
8
|
+
const stateClass = `IncodeCameraFrame${frameState.charAt(0).toUpperCase()}${frameState.slice(1)}`;
|
|
9
|
+
return /* @__PURE__ */ u("div", {
|
|
10
|
+
ref,
|
|
11
|
+
class: cn("IncodeCameraFrame", variant === "fill" && "IncodeCameraFrameFill", variant === "locked" && "IncodeCameraFrameLocked", variant === "locked" && orientation === "horizontal" && "IncodeCameraFrameHorizontal", variant === "locked" && orientation === "vertical" && "IncodeCameraFrameVertical", stateClass, className),
|
|
12
|
+
style: aspectRatio ? { aspectRatio } : void 0,
|
|
13
|
+
"aria-hidden": true,
|
|
14
|
+
children
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/shared/cameraOverlay/cameraView.tsx
|
|
19
|
+
var CameraView = ({ stream, children, videoRef: externalVideoRef, onPlaying, className, mirrored, ...rest }) => {
|
|
20
|
+
const internalVideoRef = A(null);
|
|
21
|
+
const setVideoRef = (el) => {
|
|
22
|
+
internalVideoRef.current = el;
|
|
23
|
+
if (typeof externalVideoRef === "function") externalVideoRef(el);
|
|
24
|
+
else if (externalVideoRef) externalVideoRef.current = el;
|
|
25
|
+
};
|
|
26
|
+
y(() => {
|
|
27
|
+
if (internalVideoRef.current && stream) {
|
|
28
|
+
internalVideoRef.current.srcObject = stream;
|
|
29
|
+
internalVideoRef.current.play().catch(() => {});
|
|
30
|
+
}
|
|
31
|
+
}, [stream]);
|
|
32
|
+
return /* @__PURE__ */ u("div", {
|
|
33
|
+
class: cn("IncodeCameraView", className),
|
|
34
|
+
...rest,
|
|
35
|
+
children: [/* @__PURE__ */ u("div", {
|
|
36
|
+
class: "IncodeCameraViewVideo",
|
|
37
|
+
children: /* @__PURE__ */ u("video", {
|
|
38
|
+
ref: setVideoRef,
|
|
39
|
+
autoplay: true,
|
|
40
|
+
playsInline: true,
|
|
41
|
+
muted: true,
|
|
42
|
+
onPlaying,
|
|
43
|
+
"aria-hidden": "true",
|
|
44
|
+
class: cn("IncodeCameraViewVideoElement", mirrored && "IncodeCameraViewVideoMirrored")
|
|
45
|
+
})
|
|
46
|
+
}), children]
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/modules/id/capture/useCaptureNotification.ts
|
|
51
|
+
var animationCache = /* @__PURE__ */ new Map();
|
|
52
|
+
var preloadPromise = null;
|
|
53
|
+
var animationLoaders = {
|
|
54
|
+
blur: () => import("./blurdevicelottie-8BbophdM.js"),
|
|
55
|
+
glare: () => import("./glaredevicelottie-Cnvah0kz.js"),
|
|
56
|
+
align: () => import("./aligndevicelottie-CfoZ5Uus.js"),
|
|
57
|
+
front: () => import("./frontdevicelottie-CFcahVLk.js"),
|
|
58
|
+
back: () => import("./backdevicelottie-yKkczgFy.js")
|
|
59
|
+
};
|
|
60
|
+
function startPreload() {
|
|
61
|
+
preloadPromise ??= Promise.all([
|
|
62
|
+
animationLoaders.blur(),
|
|
63
|
+
animationLoaders.glare(),
|
|
64
|
+
animationLoaders.align(),
|
|
65
|
+
animationLoaders.front(),
|
|
66
|
+
animationLoaders.back()
|
|
67
|
+
]).then(([blur, glare, align, front, back]) => {
|
|
68
|
+
animationCache.set("blur", blur.default);
|
|
69
|
+
animationCache.set("glare", glare.default);
|
|
70
|
+
animationCache.set("align", align.default);
|
|
71
|
+
animationCache.set("front", front.default);
|
|
72
|
+
animationCache.set("back", back.default);
|
|
73
|
+
}).catch(() => {});
|
|
74
|
+
return preloadPromise;
|
|
75
|
+
}
|
|
76
|
+
function preloadCaptureAnimations() {
|
|
77
|
+
startPreload();
|
|
78
|
+
}
|
|
79
|
+
function usePreloadCaptureAnimations() {
|
|
80
|
+
y(() => {
|
|
81
|
+
preloadCaptureAnimations();
|
|
82
|
+
}, []);
|
|
83
|
+
}
|
|
84
|
+
function useCaptureNotification(detectionStatus, mode) {
|
|
85
|
+
const { t } = useTranslation();
|
|
86
|
+
const [, forceUpdate] = d(0);
|
|
87
|
+
y(() => {
|
|
88
|
+
let mounted = true;
|
|
89
|
+
startPreload().then(() => {
|
|
90
|
+
if (mounted) forceUpdate((n) => n + 1);
|
|
91
|
+
});
|
|
92
|
+
return () => {
|
|
93
|
+
mounted = false;
|
|
94
|
+
};
|
|
95
|
+
}, []);
|
|
96
|
+
if (detectionStatus === "blur") return {
|
|
97
|
+
title: t("idv2.capture.notifications.blur.title"),
|
|
98
|
+
description: t("idv2.capture.notifications.blur.description"),
|
|
99
|
+
animationData: animationCache.get("blur") ?? null
|
|
100
|
+
};
|
|
101
|
+
if (detectionStatus === "glare") return {
|
|
102
|
+
title: t("idv2.capture.notifications.glare.title"),
|
|
103
|
+
description: t("idv2.capture.notifications.glare.description"),
|
|
104
|
+
animationData: animationCache.get("glare") ?? null
|
|
105
|
+
};
|
|
106
|
+
if (detectionStatus === "farAway") return {
|
|
107
|
+
title: t("idv2.capture.notifications.notAligned.title"),
|
|
108
|
+
description: t("idv2.capture.notifications.notAligned.description"),
|
|
109
|
+
animationData: animationCache.get("align") ?? null
|
|
110
|
+
};
|
|
111
|
+
if (detectionStatus === "wrongSide") {
|
|
112
|
+
const isBack = mode === "back";
|
|
113
|
+
return {
|
|
114
|
+
title: isBack ? t("idv2.capture.notifications.showBack.title") : t("idv2.capture.notifications.showFront.title"),
|
|
115
|
+
description: isBack ? t("idv2.capture.notifications.showBack.description") : t("idv2.capture.notifications.showFront.description"),
|
|
116
|
+
animationData: animationCache.get(isBack ? "back" : "front") ?? null
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region src/modules/id/capture/captureNotification.tsx
|
|
123
|
+
var CaptureNotification = ({ detectionStatus, mode, isCapturing }) => {
|
|
124
|
+
const { t } = useTranslation();
|
|
125
|
+
const notification = useCaptureNotification(detectionStatus, mode);
|
|
126
|
+
const liveRef = A(null);
|
|
127
|
+
const lastAnnouncedRef = A({
|
|
128
|
+
message: "",
|
|
129
|
+
at: 0
|
|
130
|
+
});
|
|
131
|
+
const prevDetectionStatusRef = A(detectionStatus);
|
|
132
|
+
const hasAnnouncedInstructionsRef = A(false);
|
|
133
|
+
const clearTimerRef = A();
|
|
134
|
+
const outerTimerRef = A();
|
|
135
|
+
const isIdle = detectionStatus === "detecting" || detectionStatus === "idNotDetected" || detectionStatus === "manualCapture";
|
|
136
|
+
const isManualCapture = detectionStatus === "manualCapture";
|
|
137
|
+
const isWrongSide = detectionStatus === "wrongSide";
|
|
138
|
+
const isFarAway = detectionStatus === "farAway";
|
|
139
|
+
const isGlare = detectionStatus === "glare";
|
|
140
|
+
const isBlur = detectionStatus === "blur";
|
|
141
|
+
const announce = q((message) => {
|
|
142
|
+
const now = Date.now();
|
|
143
|
+
const last = lastAnnouncedRef.current;
|
|
144
|
+
if (message === last.message && now - last.at < 200) return;
|
|
145
|
+
lastAnnouncedRef.current = {
|
|
146
|
+
message,
|
|
147
|
+
at: now
|
|
148
|
+
};
|
|
149
|
+
const node = liveRef.current;
|
|
150
|
+
if (!node) return;
|
|
151
|
+
clearTimeout(clearTimerRef.current);
|
|
152
|
+
node.textContent = "";
|
|
153
|
+
outerTimerRef.current = setTimeout(() => {
|
|
154
|
+
node.textContent = message;
|
|
155
|
+
clearTimerRef.current = setTimeout(() => {
|
|
156
|
+
node.textContent = "";
|
|
157
|
+
}, 3e3);
|
|
158
|
+
}, 50);
|
|
159
|
+
}, []);
|
|
160
|
+
const getIdleMessage = q(() => {
|
|
161
|
+
if (mode === "passport") return t("idv2.capture.fillFramePassport");
|
|
162
|
+
if (mode === "back") return t("idv2.capture.fillFrameBack");
|
|
163
|
+
return t("idv2.capture.fillFrameFront");
|
|
164
|
+
}, [mode, t]);
|
|
165
|
+
y(() => {
|
|
166
|
+
if (isManualCapture) {
|
|
167
|
+
hasAnnouncedInstructionsRef.current = false;
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
if (hasAnnouncedInstructionsRef.current) return;
|
|
171
|
+
if (!isIdle) return;
|
|
172
|
+
const timer = setTimeout(() => {
|
|
173
|
+
hasAnnouncedInstructionsRef.current = true;
|
|
174
|
+
announce(getIdleMessage());
|
|
175
|
+
}, 500);
|
|
176
|
+
return () => clearTimeout(timer);
|
|
177
|
+
}, [
|
|
178
|
+
isIdle,
|
|
179
|
+
isManualCapture,
|
|
180
|
+
announce,
|
|
181
|
+
getIdleMessage
|
|
182
|
+
]);
|
|
183
|
+
y(() => {
|
|
184
|
+
const prev = prevDetectionStatusRef.current;
|
|
185
|
+
prevDetectionStatusRef.current = detectionStatus;
|
|
186
|
+
if (prev !== "manualCapture" && isManualCapture) announce(t("idv2.capture.manualCapture.modeSwitchAriaAnnouncement"));
|
|
187
|
+
}, [
|
|
188
|
+
announce,
|
|
189
|
+
detectionStatus,
|
|
190
|
+
isManualCapture,
|
|
191
|
+
t
|
|
192
|
+
]);
|
|
193
|
+
y(() => {
|
|
194
|
+
if (isCapturing) return;
|
|
195
|
+
if (isWrongSide) {
|
|
196
|
+
const baseKey = mode === "front" || mode === "passport" ? "idv2.capture.notifications.showFront" : "idv2.capture.notifications.showBack";
|
|
197
|
+
announce(`${t(`${baseKey}.title`)}. ${t(`${baseKey}.description`)}`);
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
if (isFarAway) {
|
|
201
|
+
announce(`${t("idv2.capture.notifications.notAligned.title")}.`);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (isGlare) {
|
|
205
|
+
announce(`${t("idv2.capture.notifications.glare.title")}.`);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
if (isBlur) {
|
|
209
|
+
announce(`${t("idv2.capture.notifications.blur.title")}.`);
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
if (isIdle && hasAnnouncedInstructionsRef.current) announce(getIdleMessage());
|
|
213
|
+
}, [
|
|
214
|
+
announce,
|
|
215
|
+
isBlur,
|
|
216
|
+
isCapturing,
|
|
217
|
+
isFarAway,
|
|
218
|
+
isGlare,
|
|
219
|
+
isIdle,
|
|
220
|
+
isWrongSide,
|
|
221
|
+
mode,
|
|
222
|
+
t,
|
|
223
|
+
getIdleMessage
|
|
224
|
+
]);
|
|
225
|
+
y(() => {
|
|
226
|
+
return () => {
|
|
227
|
+
clearTimeout(outerTimerRef.current);
|
|
228
|
+
clearTimeout(clearTimerRef.current);
|
|
229
|
+
};
|
|
230
|
+
}, []);
|
|
231
|
+
return /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u("div", {
|
|
232
|
+
ref: liveRef,
|
|
233
|
+
class: "IncodeSrOnly",
|
|
234
|
+
"aria-live": "assertive",
|
|
235
|
+
"aria-atomic": "true"
|
|
236
|
+
}), notification ? /* @__PURE__ */ u("div", {
|
|
237
|
+
class: cn("IncodeIdCaptureNotification"),
|
|
238
|
+
"aria-hidden": "true",
|
|
239
|
+
children: /* @__PURE__ */ u("div", {
|
|
240
|
+
class: "IncodeIdCaptureNotificationContent",
|
|
241
|
+
children: [
|
|
242
|
+
/* @__PURE__ */ u("div", {
|
|
243
|
+
class: cn("IncodeIdCaptureNotificationText"),
|
|
244
|
+
children: [/* @__PURE__ */ u("div", {
|
|
245
|
+
class: "IncodeIdCaptureNotificationTitle",
|
|
246
|
+
children: notification.title
|
|
247
|
+
}), notification.description && /* @__PURE__ */ u("div", {
|
|
248
|
+
class: "IncodeIdCaptureNotificationDescription",
|
|
249
|
+
children: notification.description
|
|
250
|
+
})]
|
|
251
|
+
}),
|
|
252
|
+
/* @__PURE__ */ u(Spacer, {
|
|
253
|
+
size: 16,
|
|
254
|
+
direction: "horizontal"
|
|
255
|
+
}),
|
|
256
|
+
notification.animationData && /* @__PURE__ */ u("div", {
|
|
257
|
+
class: "IncodeIdCaptureNotificationAnimation",
|
|
258
|
+
children: /* @__PURE__ */ u(Lottie, {
|
|
259
|
+
animationData: notification.animationData,
|
|
260
|
+
loop: true,
|
|
261
|
+
autoStop: true,
|
|
262
|
+
stopFramePosition: "last"
|
|
263
|
+
})
|
|
264
|
+
})
|
|
265
|
+
]
|
|
266
|
+
})
|
|
267
|
+
}) : null] });
|
|
268
|
+
};
|
|
269
|
+
//#endregion
|
|
270
|
+
//#region src/modules/id/capture/manualCaptureButton.tsx
|
|
271
|
+
var ManualCaptureButton = ({ onClick, disabled, isPassport }) => {
|
|
272
|
+
const { t } = useTranslation();
|
|
273
|
+
const firstStepKey = isPassport ? "idv2.commonIssues.firstStepPassport" : "idv2.commonIssues.firstStep";
|
|
274
|
+
return /* @__PURE__ */ u("div", {
|
|
275
|
+
class: "IncodeIdManualCaptureButton",
|
|
276
|
+
"data-testid": "manual-capture-button",
|
|
277
|
+
children: [/* @__PURE__ */ u("div", {
|
|
278
|
+
class: "IncodeIdManualCaptureTooltipContainer",
|
|
279
|
+
children: /* @__PURE__ */ u("div", {
|
|
280
|
+
class: "IncodeIdManualCaptureTooltip",
|
|
281
|
+
children: /* @__PURE__ */ u("ol", {
|
|
282
|
+
class: "IncodeIdManualCaptureTooltipList",
|
|
283
|
+
children: [/* @__PURE__ */ u("li", { children: t(firstStepKey) }), /* @__PURE__ */ u("li", { children: t("idv2.commonIssues.secondStep") })]
|
|
284
|
+
})
|
|
285
|
+
})
|
|
286
|
+
}), /* @__PURE__ */ u("div", {
|
|
287
|
+
class: "IncodeIdManualCaptureButtonContent",
|
|
288
|
+
children: /* @__PURE__ */ u(Button, {
|
|
289
|
+
variant: "link",
|
|
290
|
+
onClick,
|
|
291
|
+
disabled,
|
|
292
|
+
class: "IncodeIdManualCaptureButtonButton",
|
|
293
|
+
"aria-label": t("manualCapture.ariaLabel"),
|
|
294
|
+
children: /* @__PURE__ */ u(CaptureButtonIcon, {})
|
|
295
|
+
})
|
|
296
|
+
})]
|
|
297
|
+
});
|
|
298
|
+
};
|
|
299
|
+
//#endregion
|
|
300
|
+
export { CameraView as a, usePreloadCaptureAnimations as i, CaptureNotification as n, CameraFrame as o, preloadCaptureAnimations as r, ManualCaptureButton as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { b as Q, d as T, f as _, g as x, h as q, l as A, p as d, r as $, v as u } from "./vendor-preact-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { a as useModalPortalTarget, i as useModalFocusCapture, n as useModalBodyScrollLock, o as useModalTabCycle, r as useModalEscapeDismiss, t as MODAL_TITLE_ID } from "./modal.hooks-
|
|
1
|
+
import { b as Q, d as T, f as _, g as x, h as q, l as A, p as d, r as $, v as u } from "./vendor-preact-mvwZ8mJj.js";
|
|
2
|
+
import { u as cn } from "./spacer-CDlQd12V.js";
|
|
3
|
+
import { l as CloseIcon } from "./icons--ezYG2Fb.js";
|
|
4
|
+
import { a as useModalPortalTarget, i as useModalFocusCapture, n as useModalBodyScrollLock, o as useModalTabCycle, r as useModalEscapeDismiss, t as MODAL_TITLE_ID } from "./modal.hooks-BvXzNWvY.js";
|
|
5
5
|
//#region src/shared/modal/modal.tsx
|
|
6
6
|
var ModalContext = Q(null);
|
|
7
7
|
function useModalContext() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as y, p as d } from "./vendor-preact-
|
|
1
|
+
import { _ as y, p as d } from "./vendor-preact-mvwZ8mJj.js";
|
|
2
2
|
//#region src/shared/modal/modal.hooks.ts
|
|
3
3
|
var MODAL_SCROLL_LOCK_CLASS = "IncodeModalScrollLock";
|
|
4
4
|
/** `id` of the `Modal.Title` heading; also the dialog's `aria-labelledby`. */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as y, h as q, l as A, p as d, v as u } from "./vendor-preact-
|
|
3
|
-
import {
|
|
4
|
-
import { t as InputComposed } from "./inputComposed-
|
|
5
|
-
import { i as translateError } from "./radioGroupComposed-
|
|
6
|
-
import { t as BottomSheet } from "./bottomSheet-
|
|
1
|
+
import { i as useTranslation } from "./uiConfig-B5ASPUL4.js";
|
|
2
|
+
import { _ as y, h as q, l as A, p as d, v as u } from "./vendor-preact-mvwZ8mJj.js";
|
|
3
|
+
import { m as useIsMobileDeviceWidth } from "./incodeComponent-K9ZWg302.js";
|
|
4
|
+
import { t as InputComposed } from "./inputComposed-BeROn635.js";
|
|
5
|
+
import { i as translateError } from "./radioGroupComposed-DzNGUbZQ.js";
|
|
6
|
+
import { t as BottomSheet } from "./bottomSheet-Cp8DLulN.js";
|
|
7
7
|
//#region src/shared/addressAutocomplete/addressAutocomplete.tsx
|
|
8
8
|
var AddressAutocomplete = ({ label, value, error, errorParams, suggestions, readonly, required, labelHint, onChange, onSearch, onSelect, onBlur }) => {
|
|
9
9
|
const { t } = useTranslation();
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as y, h as q, l as A, v as u } from "./vendor-preact-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as InputComposed } from "./inputComposed-
|
|
6
|
-
import "./inputComposed-
|
|
7
|
-
//#region src/shared/
|
|
8
|
-
var
|
|
1
|
+
import { i as useTranslation } from "./uiConfig-B5ASPUL4.js";
|
|
2
|
+
import { _ as y, h as q, l as A, v as u } from "./vendor-preact-mvwZ8mJj.js";
|
|
3
|
+
import { t as Spacer } from "./spacer-CDlQd12V.js";
|
|
4
|
+
import { r as Button } from "./incode-logo-rGFjZHqi.js";
|
|
5
|
+
import { t as InputComposed } from "./inputComposed-BeROn635.js";
|
|
6
|
+
import "./inputComposed-CADVQW-o.js";
|
|
7
|
+
//#region src/shared/resendTimer.ts
|
|
8
|
+
var formatResendTimer = (seconds) => {
|
|
9
9
|
return `${Math.floor(seconds / 60)}:${(seconds % 60).toString().padStart(2, "0")}`;
|
|
10
10
|
};
|
|
11
|
-
var
|
|
12
|
-
|
|
11
|
+
var DEFAULT_ANNOUNCEMENT_KEYS = {
|
|
12
|
+
resendAvailable: "otp.resendCodeAvailable",
|
|
13
|
+
timerStarted: "otp.timerStarted",
|
|
14
|
+
timerTenSeconds: "otp.timerTenSeconds",
|
|
15
|
+
timerFiveSeconds: "otp.timerFiveSeconds"
|
|
13
16
|
};
|
|
14
|
-
|
|
17
|
+
function useResendTimerAnnouncements({ canResend, resendTimer, disabled = false, i18nKeys }) {
|
|
15
18
|
const { t } = useTranslation();
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
const announcementKeys = {
|
|
20
|
+
...DEFAULT_ANNOUNCEMENT_KEYS,
|
|
21
|
+
...i18nKeys
|
|
22
|
+
};
|
|
19
23
|
const liveRef = A(null);
|
|
20
24
|
const prevCanResendRef = A(canResend);
|
|
21
25
|
const hasAnnouncedStartRef = A(false);
|
|
@@ -30,15 +34,65 @@ var OtpInput = ({ value, otpLength, resendTimer, canResend, error, validationErr
|
|
|
30
34
|
}, 50);
|
|
31
35
|
}, []);
|
|
32
36
|
y(() => {
|
|
37
|
+
return () => clearTimeout(announceTimerRef.current);
|
|
38
|
+
}, []);
|
|
39
|
+
y(() => {
|
|
40
|
+
if (disabled) {
|
|
41
|
+
prevCanResendRef.current = canResend;
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
33
44
|
const wasUnavailable = !prevCanResendRef.current;
|
|
34
45
|
prevCanResendRef.current = canResend;
|
|
35
|
-
if (wasUnavailable && canResend) announce(t(
|
|
36
|
-
return () => clearTimeout(announceTimerRef.current);
|
|
46
|
+
if (wasUnavailable && canResend) announce(t(announcementKeys.resendAvailable));
|
|
37
47
|
}, [
|
|
38
48
|
canResend,
|
|
49
|
+
disabled,
|
|
50
|
+
announcementKeys.resendAvailable,
|
|
39
51
|
announce,
|
|
40
52
|
t
|
|
41
53
|
]);
|
|
54
|
+
y(() => {
|
|
55
|
+
if (disabled) {
|
|
56
|
+
hasAnnouncedStartRef.current = false;
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (canResend || resendTimer <= 0) {
|
|
60
|
+
hasAnnouncedStartRef.current = false;
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (!hasAnnouncedStartRef.current) {
|
|
64
|
+
hasAnnouncedStartRef.current = true;
|
|
65
|
+
announce(t(announcementKeys.timerStarted, { time: String(resendTimer) }));
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (resendTimer === 10) announce(t(announcementKeys.timerTenSeconds));
|
|
69
|
+
else if (resendTimer === 5) announce(t(announcementKeys.timerFiveSeconds));
|
|
70
|
+
}, [
|
|
71
|
+
resendTimer,
|
|
72
|
+
canResend,
|
|
73
|
+
disabled,
|
|
74
|
+
announcementKeys.timerStarted,
|
|
75
|
+
announcementKeys.timerTenSeconds,
|
|
76
|
+
announcementKeys.timerFiveSeconds,
|
|
77
|
+
announce,
|
|
78
|
+
t
|
|
79
|
+
]);
|
|
80
|
+
return liveRef;
|
|
81
|
+
}
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region src/shared/otpInput/otpInput.tsx
|
|
84
|
+
var normalizeOtp = (value, maxLength) => {
|
|
85
|
+
return value.replace(/[^a-zA-Z0-9]/g, "").toUpperCase().slice(0, maxLength);
|
|
86
|
+
};
|
|
87
|
+
var OtpInput = ({ value, otpLength, resendTimer, canResend, error, validationError, isValid = true, onSubmit, onChange, onValidate, onResend, onBack, backLinkText = "otp.changePhoneNumber", disabled = false, isLoading = false }) => {
|
|
88
|
+
const { t } = useTranslation();
|
|
89
|
+
const inputRef = A(null);
|
|
90
|
+
const prevCodeLengthRef = A(value.length);
|
|
91
|
+
const lastSubmittedCodeRef = A(null);
|
|
92
|
+
const liveRef = useResendTimerAnnouncements({
|
|
93
|
+
canResend,
|
|
94
|
+
resendTimer
|
|
95
|
+
});
|
|
42
96
|
y(() => {
|
|
43
97
|
if (error) {
|
|
44
98
|
lastSubmittedCodeRef.current = null;
|
|
@@ -85,24 +139,6 @@ var OtpInput = ({ value, otpLength, resendTimer, canResend, error, validationErr
|
|
|
85
139
|
submitCode(value);
|
|
86
140
|
};
|
|
87
141
|
const displayedError = error ?? validationError;
|
|
88
|
-
y(() => {
|
|
89
|
-
if (canResend || resendTimer <= 0) {
|
|
90
|
-
hasAnnouncedStartRef.current = false;
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
if (!hasAnnouncedStartRef.current) {
|
|
94
|
-
hasAnnouncedStartRef.current = true;
|
|
95
|
-
announce(t("otp.timerStarted", { time: String(resendTimer) }));
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
if (resendTimer === 10) announce(t("otp.timerTenSeconds"));
|
|
99
|
-
else if (resendTimer === 5) announce(t("otp.timerFiveSeconds"));
|
|
100
|
-
}, [
|
|
101
|
-
resendTimer,
|
|
102
|
-
canResend,
|
|
103
|
-
announce,
|
|
104
|
-
t
|
|
105
|
-
]);
|
|
106
142
|
const renderActions = () => {
|
|
107
143
|
if (!canResend && resendTimer > 0) return /* @__PURE__ */ u("div", {
|
|
108
144
|
class: "IncodeOtpInputActions",
|
|
@@ -110,7 +146,7 @@ var OtpInput = ({ value, otpLength, resendTimer, canResend, error, validationErr
|
|
|
110
146
|
children: /* @__PURE__ */ u(Button, {
|
|
111
147
|
variant: "link",
|
|
112
148
|
disabled: true,
|
|
113
|
-
children: t("otp.resendCountdown", { time:
|
|
149
|
+
children: t("otp.resendCountdown", { time: formatResendTimer(resendTimer) })
|
|
114
150
|
})
|
|
115
151
|
});
|
|
116
152
|
const handleResend = () => {
|
|
@@ -193,4 +229,4 @@ var OtpInput = ({ value, otpLength, resendTimer, canResend, error, validationErr
|
|
|
193
229
|
});
|
|
194
230
|
};
|
|
195
231
|
//#endregion
|
|
196
|
-
export { OtpInput as t };
|
|
232
|
+
export { formatResendTimer as n, useResendTimerAnnouncements as r, OtpInput as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v as u } from "./vendor-preact-
|
|
1
|
+
import { v as u } from "./vendor-preact-mvwZ8mJj.js";
|
|
2
2
|
//#region src/modules/id/capture/assets/hints/passport-horizontal-hint.svg?react
|
|
3
3
|
var SvgPassportHorizontalHint = (props) => /* @__PURE__ */ u("svg", {
|
|
4
4
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v as u } from "./vendor-preact-
|
|
1
|
+
import { v as u } from "./vendor-preact-mvwZ8mJj.js";
|
|
2
2
|
//#region src/modules/id/capture/assets/hints/passport-vertical-hint.svg?react
|
|
3
3
|
var SvgPassportVerticalHint = (props) => /* @__PURE__ */ u("svg", {
|
|
4
4
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as _defineProperty } from "./defineProperty-
|
|
1
|
+
import { t as _defineProperty } from "./defineProperty-BbpBna-2.js";
|
|
2
2
|
//#region \0@oxc-project+runtime@0.122.0/helpers/assertClassBrand.js
|
|
3
3
|
function _assertClassBrand(e, t, n) {
|
|
4
4
|
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|