@incodetech/web 0.0.0-dev-20260416-bf5b221 → 0.0.0-dev-20260417-78468b3
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/{AsYouType-RC03ULcj.js → AsYouType-C9ozHT0m.js} +1 -1
- package/dist/{addressAutocomplete-n0bBMSty.js → addressAutocomplete-BPpO7rrX.js} +4 -4
- package/dist/ae-signature/ae-signature.es.js +2 -2
- package/dist/antifraud/antifraud.es.js +3 -3
- package/dist/authentication/authentication.es.js +3 -3
- package/dist/{button-BlHmZn6D.js → button-wmLHLQxG.js} +1 -1
- package/dist/{checkbox-BNgPsssk.js → checkbox-CM72oZfM.js} +2 -2
- package/dist/consent/consent.es.js +9 -9
- package/dist/cross-document-data-match/cross-document-data-match.es.js +3 -3
- package/dist/curp-validation/curp-validation.es.js +14 -14
- package/dist/{dateInputComposed-B8nKYsUG.js → dateInputComposed-CvIDakYb.js} +4 -4
- package/dist/dateInputComposed-fdBzdL8N.js +1 -0
- package/dist/{documentCapture-DHtlw3Lu.js → documentCapture-BAvYoKZ7.js} +65 -64
- package/dist/{dropdownComposed-CR1bc7Z9.js → dropdownComposed-BE7-ghHI.js} +3 -3
- package/dist/dropdownComposed-ChSksPc2.js +1 -0
- package/dist/ekyb/ekyb.es.js +1 -1
- package/dist/ekybModule-BeYiTLFg.js +2 -0
- package/dist/{ekybModule-BBSKwZZy.js → ekybModule-Dm6NrgtW.js} +14 -14
- package/dist/ekyc/ekyc.es.js +1 -1
- package/dist/{ekycModule-Dca-zhQw.js → ekycModule-ChHA8VPJ.js} +19 -19
- package/dist/ekycModule-zakzAXhB.js +2 -0
- package/dist/electronic-signature/electronic-signature.es.js +1 -1
- package/dist/{electronic-signature-DEAXKbsk.js → electronic-signature-CPfLwg-x.js} +9 -9
- package/dist/email/email.es.js +8 -8
- package/dist/{extensibility-BlGCucJR.js → extensibility-t-H5EpZ8.js} +96 -95
- package/dist/extensibility.es.js +22 -22
- package/dist/face-match/face-match.es.js +1 -1
- package/dist/faceMatch-B74pDVYi.js +2 -0
- package/dist/{faceMatch-D6HVVSiY.js → faceMatch-ClWhkFUE.js} +6 -6
- package/dist/flow/flow.es.js +206 -192
- package/dist/{formField-B9_nvbhW.js → formField-9ouSScYr.js} +2 -2
- package/dist/geolocation/geolocation.es.js +6 -6
- package/dist/governmentValidation/governmentValidation.es.js +8 -8
- package/dist/homeScreen-C0-81utl.js +210 -0
- package/dist/{i18n-DUMvrSNM.js → i18n-BpEDCZi_.js} +1 -1
- package/dist/{icons-CVO6RxwW.js → icons-G_Ct2lZU.js} +1 -1
- package/dist/id/id.es.js +6 -6
- package/dist/identity-reuse/identity-reuse.es.js +6 -6
- package/dist/incode-logo-DX016usY.js +4 -0
- package/dist/{loadingIcon-ahC-hZN7.js → incodeComponent-DIb7wDAq.js} +2 -42
- package/dist/index.es.js +1 -1
- package/dist/inputComposed-BqRIZ9pG.js +1 -0
- package/dist/{inputComposed-COz9TuR1.js → inputComposed-d8s1aPjr.js} +3 -3
- package/dist/loadingIcon-HWY04StG.js +42 -0
- package/dist/{mandatoryConsent-DWwvkGGf.js → mandatoryConsent-BVrqZJDU.js} +9 -9
- package/dist/{modal-D75YXA_d.js → modal-BQF9tPLH.js} +2 -2
- package/dist/{otpInput-CNAOHZxZ.js → otpInput-OtCx4bG4.js} +4 -4
- package/dist/{page-kB-LDkaO.js → page-D5Mt-0zn.js} +4 -3
- package/dist/phone/phone.es.js +8 -8
- package/dist/{phoneInput-CzcmqH3C.js → phoneInput-DHepphBa.js} +3 -3
- package/dist/{phoneInputComposed-w9tF4xYB.js → phoneInputComposed-DOuz7g1p.js} +6 -6
- package/dist/{processing-CR7zb0TX.js → processing-LdRzxpWv.js} +2 -2
- package/dist/qe-signature/qe-signature.es.js +2 -2
- package/dist/{redirectToMobile-CYt-uhqB.js → redirectToMobile-1oLWg6QJ.js} +23 -21
- package/dist/{richText-MNrzpRze.js → richText-gJTUJEMX.js} +1 -1
- package/dist/selfie/selfie.es.js +4 -4
- package/dist/{setup-IE6CqyVs.js → setup-D7-7VjBv.js} +1 -1
- package/dist/signature/signature.es.js +9 -9
- package/dist/spinner-CFvndzMU.js +1 -0
- package/dist/{spinner-BAVCJLTE.js → spinner-l6dvYqCg.js} +7 -7
- package/dist/{tutorial-Dqk1zedL.js → tutorial-DMwavp-V.js} +43 -42
- package/dist/{typography-7cXma7kl.js → typography-CNNFm2Bl.js} +1 -1
- package/dist/typography-ClOy6Kmo.js +1 -0
- package/dist/{useModuleLoader-DPGKFaMr.js → useModuleLoader-B6JxxJWR.js} +113 -75
- package/dist/{verificationResult-LpiTdYIu.js → verificationResult-WLz8qNU8.js} +6 -6
- package/dist/{verifiedByIncode-CMPwRtA2.js → verifiedByIncode-ChZBpqNy.js} +12 -15
- package/dist/watchlist/watchlist.es.js +22 -21
- package/dist/workflow/workflow.es.js +18 -18
- package/package.json +2 -2
- package/dist/dateInputComposed-DnYA7nZG.js +0 -1
- package/dist/dropdownComposed-P1FeTlTM.js +0 -1
- package/dist/ekybModule-qBQ8sJSr.js +0 -2
- package/dist/ekycModule-R0YaUzV3.js +0 -2
- package/dist/faceMatch-CFxHH3ic.js +0 -2
- package/dist/home/home.es.js +0 -224
- package/dist/home/styles.css +0 -172
- package/dist/inputComposed-BWxnXHJf.js +0 -1
- package/dist/spinner-B-jf992b.js +0 -1
- package/dist/types/home.d.ts +0 -30
- package/dist/typography-CsEiWMTG.js +0 -1
- /package/dist/{aligndevicelottie-B9K1XnzC.js → aligndevicelottie-BfnvOtwi.js} +0 -0
- /package/dist/{back-horizontal-hint-Dy_Qglma.js → back-horizontal-hint-CpDPt7Pn.js} +0 -0
- /package/dist/{back-tutorial-Cc5SwoLa.js → back-tutorial-DRNlpp1o.js} +0 -0
- /package/dist/{back-vertical-hint-Dg3OKUKF.js → back-vertical-hint-CMS6HTd5.js} +0 -0
- /package/dist/{backdevicelottie-DPvn_MCA.js → backdevicelottie-DqTioBhp.js} +0 -0
- /package/dist/{blurdevicelottie-DGpZjyZE.js → blurdevicelottie-BCYf_azj.js} +0 -0
- /package/dist/{browser-ponyfill-CTu_YiCx.js → browser-ponyfill-CRq2EKxP.js} +0 -0
- /package/dist/{countries-DKKNtuUp.js → countries-Bbn2lyxr.js} +0 -0
- /package/dist/{defineProperty-DXvyTpBq.js → defineProperty-CqT6YdHJ.js} +0 -0
- /package/dist/{flip-animation-DwJvEqyX.js → flip-animation-Dj8sBkxM.js} +0 -0
- /package/dist/{front-horizontal-hint-DgopDgUF.js → front-horizontal-hint-C204EjG5.js} +0 -0
- /package/dist/{front-vertical-hint-nOpxcjqw.js → front-vertical-hint-BT8dqgFS.js} +0 -0
- /package/dist/{frontdevicelottie-DBrRXwKx.js → frontdevicelottie-BOCUyhYK.js} +0 -0
- /package/dist/{glaredevicelottie-DvG7qeiM.js → glaredevicelottie-g5gLJDcn.js} +0 -0
- /package/dist/{id-laser-h-BrG7qvHh.js → id-laser-h-C9wj3dpL.js} +0 -0
- /package/dist/{id-laser-v-Bt1xfH5h.js → id-laser-v-Bmnxnt0M.js} +0 -0
- /package/dist/{id-tutorial-WgpG0ahL.js → id-tutorial-CFTli-M3.js} +0 -0
- /package/dist/{incodeModule-Di2OUZ5_.js → incodeModule-D_r2n18O.js} +0 -0
- /package/dist/{numberedStep-LYLcVRNh.js → numberedStep-CR4w_BpM.js} +0 -0
- /package/dist/{passport-horizontal-hint-DXzBzsri.js → passport-horizontal-hint-DQ_bncwr.js} +0 -0
- /package/dist/{passport-tutorial-DEr1yuAg.js → passport-tutorial-Bihd5YfK.js} +0 -0
- /package/dist/{passport-vertical-hint-B8Sap2l6.js → passport-vertical-hint-Bck8hVuX.js} +0 -0
- /package/dist/{selfieTutorial-B5l5ny8O.js → selfieTutorial-Cu9vXjss.js} +0 -0
- /package/dist/{successIcon-AHrfmJvv.js → successIcon-C4GI_9SU.js} +0 -0
package/dist/flow/flow.es.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { n as e } from "../i18n-
|
|
2
|
-
import { _ as t,
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import "../spinner-
|
|
7
|
-
import { t as
|
|
8
|
-
import { a as
|
|
9
|
-
import { getRequiredWasmPipelines as
|
|
1
|
+
import { n as e } from "../i18n-BpEDCZi_.js";
|
|
2
|
+
import { _ as t, c as n, l as r, o as i, p as a, v as o } from "../vendor-preact-D6SntenC.js";
|
|
3
|
+
import { t as s } from "../uiConfig-CwpQ-IM6.js";
|
|
4
|
+
import { o as c, t as l } from "../incodeComponent-DIb7wDAq.js";
|
|
5
|
+
import { t as u } from "../spinner-l6dvYqCg.js";
|
|
6
|
+
import "../spinner-CFvndzMU.js";
|
|
7
|
+
import { t as d } from "../incodeModule-D_r2n18O.js";
|
|
8
|
+
import { a as f, c as p, f as m, i as h, l as g, n as _, o as v, r as y, s as b, t as x, u as S } from "../useModuleLoader-B6JxxJWR.js";
|
|
9
|
+
import { getRequiredWasmPipelines as C } from "@incodetech/core/flow";
|
|
10
10
|
//#region src/modules/flow/preloadFlow.ts
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
let t =
|
|
11
|
+
var w = /* @__PURE__ */ new Map();
|
|
12
|
+
function T(e) {
|
|
13
|
+
let t = w.get(e);
|
|
14
14
|
if (!t) throw Error("Preload state not found");
|
|
15
15
|
return {
|
|
16
16
|
get isReady() {
|
|
@@ -26,16 +26,18 @@ function x(e) {
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
cancel() {
|
|
29
|
-
t.status === "loading" && (t.unsubscribe && t.unsubscribe(), t.flowManager.stop(), t.readyReject(/* @__PURE__ */ Error("Preload cancelled")),
|
|
29
|
+
t.status === "loading" && (t.unsubscribe && t.unsubscribe(), t.flowManager.stop(), t.readyReject(/* @__PURE__ */ Error("Preload cancelled")), w.delete(e));
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function E(e) {
|
|
34
34
|
let { token: t } = e;
|
|
35
|
-
if (
|
|
35
|
+
if (w.has(t)) return T(t);
|
|
36
36
|
let n, r, i = new Promise((e, t) => {
|
|
37
37
|
n = e, r = t;
|
|
38
|
-
}), a =
|
|
38
|
+
}), a = v(e);
|
|
39
|
+
a.getState().presentation.shouldPrefetchHome && S();
|
|
40
|
+
let o = {
|
|
39
41
|
status: "loading",
|
|
40
42
|
flowManager: a,
|
|
41
43
|
config: e,
|
|
@@ -43,49 +45,52 @@ function S(e) {
|
|
|
43
45
|
readyResolve: n,
|
|
44
46
|
readyReject: r
|
|
45
47
|
};
|
|
46
|
-
return
|
|
48
|
+
return w.set(t, o), (async () => {
|
|
47
49
|
try {
|
|
48
|
-
await
|
|
50
|
+
await p({
|
|
49
51
|
apiURL: e.apiURL,
|
|
50
52
|
token: e.token,
|
|
51
53
|
lang: e.lang,
|
|
52
54
|
flowManager: a
|
|
53
55
|
});
|
|
54
|
-
let t = e.disableDashboardTheme ? Promise.resolve({}) :
|
|
56
|
+
let t = e.disableDashboardTheme ? Promise.resolve({}) : b().then((e) => {
|
|
55
57
|
o.theme = e.theme, o.uiConfig = e.uiConfig;
|
|
56
58
|
});
|
|
57
59
|
o.unsubscribe = a.subscribe((t) => {
|
|
58
60
|
if (t.status === "ready") {
|
|
59
61
|
let n = t;
|
|
60
|
-
|
|
62
|
+
m(n, e.wasmConfig), g(n), o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "ready", o.readyResolve();
|
|
61
63
|
} else t.status === "error" && (o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "error", o.error = t.error, o.readyReject(Error(t.error)));
|
|
62
64
|
}), await t;
|
|
63
65
|
} catch (e) {
|
|
64
|
-
o.status = "error", o.error = e instanceof Error ? e.message : "Failed to preload", o.readyReject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to preload")),
|
|
66
|
+
o.status = "error", o.error = e instanceof Error ? e.message : "Failed to preload", o.readyReject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to preload")), w.delete(t);
|
|
65
67
|
}
|
|
66
|
-
})(),
|
|
68
|
+
})(), T(t);
|
|
67
69
|
}
|
|
68
|
-
function
|
|
69
|
-
return
|
|
70
|
+
function D(e) {
|
|
71
|
+
return w.get(e) ?? null;
|
|
70
72
|
}
|
|
71
|
-
function
|
|
72
|
-
let t =
|
|
73
|
-
return t &&
|
|
73
|
+
function O(e) {
|
|
74
|
+
let t = D(e);
|
|
75
|
+
return t && w.delete(e), t;
|
|
74
76
|
}
|
|
75
77
|
//#endregion
|
|
76
78
|
//#region src/modules/flow/useFlowInitialization.ts
|
|
77
|
-
function
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
function k(e) {
|
|
80
|
+
e.getState().presentation.shouldPrefetchHome && S();
|
|
81
|
+
}
|
|
82
|
+
function A(e) {
|
|
83
|
+
let { apiURL: n, token: i, lang: o, disableDashboardTheme: c, enableHome: l, onError: u } = e, d = r(null), [f, m] = a(() => {
|
|
84
|
+
let t = D(i);
|
|
80
85
|
if (t?.status === "ready") {
|
|
81
|
-
let e =
|
|
82
|
-
if (e) return
|
|
86
|
+
let e = O(i);
|
|
87
|
+
if (e) return d.current = e.flowManager, k(e.flowManager), e.uiConfig && s(e.uiConfig), {
|
|
83
88
|
status: "ready",
|
|
84
89
|
flowManager: e.flowManager
|
|
85
90
|
};
|
|
86
91
|
}
|
|
87
|
-
let n =
|
|
88
|
-
return
|
|
92
|
+
let n = v(e);
|
|
93
|
+
return d.current = n, k(n), t?.status === "error" ? {
|
|
89
94
|
status: "error",
|
|
90
95
|
error: t.error ?? "Preload failed",
|
|
91
96
|
flowManager: n
|
|
@@ -93,309 +98,318 @@ function T(e) {
|
|
|
93
98
|
status: "initializing",
|
|
94
99
|
flowManager: n
|
|
95
100
|
};
|
|
96
|
-
}),
|
|
101
|
+
}), h = r(!1);
|
|
97
102
|
return t(() => {
|
|
98
|
-
if (
|
|
99
|
-
let e =
|
|
103
|
+
if (f.status !== "initializing") return;
|
|
104
|
+
let e = D(i);
|
|
100
105
|
if (e?.status === "loading") {
|
|
101
106
|
e.readyPromise.then(() => {
|
|
102
|
-
let e =
|
|
103
|
-
e && (
|
|
107
|
+
let e = O(i);
|
|
108
|
+
e && (d.current = e.flowManager, k(e.flowManager), e.uiConfig && s(e.uiConfig), m({
|
|
104
109
|
status: "ready",
|
|
105
110
|
flowManager: e.flowManager
|
|
106
111
|
}));
|
|
107
112
|
}).catch((e) => {
|
|
108
113
|
let t = e instanceof Error ? e.message : "Preload failed";
|
|
109
|
-
|
|
114
|
+
m({
|
|
110
115
|
status: "error",
|
|
111
116
|
error: t,
|
|
112
|
-
flowManager:
|
|
113
|
-
}),
|
|
117
|
+
flowManager: f.flowManager
|
|
118
|
+
}), u?.(t);
|
|
114
119
|
});
|
|
115
120
|
return;
|
|
116
121
|
}
|
|
117
|
-
|
|
122
|
+
h.current || (h.current = !0, (async () => {
|
|
118
123
|
try {
|
|
119
|
-
await
|
|
120
|
-
apiURL:
|
|
121
|
-
token:
|
|
122
|
-
lang:
|
|
123
|
-
flowManager:
|
|
124
|
-
}), await (c ? Promise.resolve() :
|
|
125
|
-
e.uiConfig &&
|
|
126
|
-
})),
|
|
124
|
+
await p({
|
|
125
|
+
apiURL: n,
|
|
126
|
+
token: i,
|
|
127
|
+
lang: o,
|
|
128
|
+
flowManager: f.flowManager
|
|
129
|
+
}), await (c ? Promise.resolve() : b().then((e) => {
|
|
130
|
+
e.uiConfig && s(e.uiConfig);
|
|
131
|
+
})), m({
|
|
127
132
|
status: "ready",
|
|
128
|
-
flowManager:
|
|
133
|
+
flowManager: f.flowManager
|
|
129
134
|
});
|
|
130
135
|
} catch (e) {
|
|
131
136
|
let t = e instanceof Error ? e.message : "Failed to initialize SDK";
|
|
132
|
-
|
|
137
|
+
m({
|
|
133
138
|
status: "error",
|
|
134
139
|
error: t,
|
|
135
|
-
flowManager:
|
|
136
|
-
}),
|
|
140
|
+
flowManager: f.flowManager
|
|
141
|
+
}), u?.(t);
|
|
137
142
|
}
|
|
138
143
|
})());
|
|
139
144
|
}, [
|
|
145
|
+
n,
|
|
140
146
|
i,
|
|
141
147
|
o,
|
|
142
|
-
s,
|
|
143
148
|
c,
|
|
144
149
|
l,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
]),
|
|
150
|
+
u,
|
|
151
|
+
f
|
|
152
|
+
]), f;
|
|
148
153
|
}
|
|
149
154
|
//#endregion
|
|
150
155
|
//#region src/modules/flow/flow.tsx
|
|
151
|
-
var
|
|
152
|
-
let { t: s, i18n: l } = e(),
|
|
156
|
+
var j = n(() => import("../homeScreen-C0-81utl.js").then((e) => ({ default: e.HomeScreen }))), M = ({ config: n, onFinish: r, onError: a }) => {
|
|
157
|
+
let { t: s, i18n: l } = e(), d = A({
|
|
153
158
|
...n,
|
|
154
159
|
onError: a
|
|
155
|
-
}), [
|
|
156
|
-
moduleKey:
|
|
160
|
+
}), [p, g] = c(() => d.flowManager, { autoLoad: !1 }), v = p.presentation.lazyModuleKey, b = p.status === "ready" ? p.currentStep : void 0, w = x({
|
|
161
|
+
moduleKey: v,
|
|
157
162
|
modules: f,
|
|
158
163
|
onModuleLoading: n.onModuleLoading,
|
|
159
164
|
onModuleLoaded: n.onModuleLoaded,
|
|
160
165
|
onError: a
|
|
161
|
-
})
|
|
162
|
-
|
|
166
|
+
}), T = _({
|
|
167
|
+
moduleKey: p.status === "ready" && p.homeScreen.visible ? b : void 0,
|
|
168
|
+
modules: f
|
|
169
|
+
}), E = w.status === "loaded";
|
|
170
|
+
E === !1 && p.homeScreen.visible && (E = T);
|
|
171
|
+
let D = n.enableHome === !0 && p.status === "ready" && p.currentStepIndex === 0 && p.homeScreen.visible === !1 && w.status === "loading";
|
|
172
|
+
if (y(p?.status === "ready" ? p.steps : [], p?.status === "ready" ? p.currentStepIndex : -1, f, E), t(() => {
|
|
173
|
+
p.presentation.shouldPrefetchHome && S();
|
|
174
|
+
}, [p.presentation.shouldPrefetchHome]), t(() => {
|
|
163
175
|
n.lang && l.language !== n.lang && l.changeLanguage(n.lang);
|
|
164
176
|
}, [n.lang, l]), t(() => {
|
|
165
|
-
if (
|
|
166
|
-
let e =
|
|
167
|
-
t.length > 0 && (n.onWasmWarmup?.(t),
|
|
177
|
+
if (p?.status === "ready") {
|
|
178
|
+
let e = p, t = C(e.flow);
|
|
179
|
+
t.length > 0 && (n.onWasmWarmup?.(t), m(e, n.wasmConfig));
|
|
168
180
|
}
|
|
169
|
-
}, [
|
|
170
|
-
|
|
181
|
+
}, [p, n]), t(() => {
|
|
182
|
+
p?.status === "finished" && r(p.finishStatus);
|
|
171
183
|
}, [
|
|
172
|
-
|
|
184
|
+
p?.status,
|
|
173
185
|
r,
|
|
174
|
-
|
|
186
|
+
p
|
|
175
187
|
]), t(() => {
|
|
176
|
-
|
|
188
|
+
p?.status === "error" && a && a(p.error);
|
|
177
189
|
}, [
|
|
178
|
-
|
|
190
|
+
p?.status,
|
|
179
191
|
a,
|
|
180
|
-
|
|
192
|
+
p
|
|
181
193
|
]), t(() => {
|
|
182
|
-
|
|
183
|
-
}, [
|
|
194
|
+
p?.status === "ready" && p.currentStep === "ID" && p.steps.includes("TUTORIAL_ID") && g.completeModule();
|
|
195
|
+
}, [p, g]), d.status === "error") return /* @__PURE__ */ o("div", {
|
|
184
196
|
class: "IncodeFlow",
|
|
185
|
-
children: /* @__PURE__ */
|
|
197
|
+
children: /* @__PURE__ */ o("div", { children: ["Error: ", d.error] })
|
|
186
198
|
});
|
|
187
|
-
if (
|
|
199
|
+
if (p.homeScreen.visible || D) return /* @__PURE__ */ o("div", {
|
|
188
200
|
class: "IncodeFlow",
|
|
189
|
-
children: /* @__PURE__ */ i
|
|
201
|
+
children: /* @__PURE__ */ o(i, {
|
|
202
|
+
fallback: null,
|
|
203
|
+
children: /* @__PURE__ */ o(j, {
|
|
204
|
+
isContinueLoading: p.homeScreen.isContinueLoading || D,
|
|
205
|
+
onContinue: () => g.continueFromHome()
|
|
206
|
+
})
|
|
207
|
+
})
|
|
208
|
+
});
|
|
209
|
+
if (d.status === "initializing" || p.presentation.isAwaitingReady) return /* @__PURE__ */ o("div", {
|
|
210
|
+
class: "IncodeFlow",
|
|
211
|
+
children: /* @__PURE__ */ o(u, {
|
|
190
212
|
title: n.spinnerConfig?.title,
|
|
191
213
|
subtitle: n.spinnerConfig?.subtitle,
|
|
192
214
|
size: n.spinnerConfig?.size,
|
|
193
215
|
fullScreen: !0
|
|
194
216
|
})
|
|
195
217
|
});
|
|
196
|
-
if (
|
|
218
|
+
if (p.status === "error") return /* @__PURE__ */ o("div", {
|
|
197
219
|
class: "IncodeFlow",
|
|
198
|
-
children: /* @__PURE__ */
|
|
220
|
+
children: /* @__PURE__ */ o("div", { children: ["Error: ", p.error] })
|
|
199
221
|
});
|
|
200
|
-
if (
|
|
201
|
-
if (
|
|
202
|
-
let { currentStep: e, config: t, flow: { flowId: r } } =
|
|
203
|
-
if (!e || !t) return /* @__PURE__ */
|
|
222
|
+
if (p.status === "finished") return null;
|
|
223
|
+
if (p?.status === "ready") {
|
|
224
|
+
let { currentStep: e, config: t, flow: { flowId: r } } = p;
|
|
225
|
+
if (!e || !t) return /* @__PURE__ */ o("div", {
|
|
204
226
|
class: "IncodeFlow",
|
|
205
|
-
children: /* @__PURE__ */
|
|
227
|
+
children: /* @__PURE__ */ o(u, {
|
|
206
228
|
title: n.spinnerConfig?.title ?? s("loadingCircle.hangOn"),
|
|
207
229
|
subtitle: n.spinnerConfig?.subtitle ?? s("loadingCircle.validating"),
|
|
208
230
|
size: n.spinnerConfig?.size,
|
|
209
231
|
fullScreen: !0
|
|
210
232
|
})
|
|
211
233
|
});
|
|
212
|
-
if (
|
|
234
|
+
if (w.status === "unsupported") return /* @__PURE__ */ o("div", {
|
|
213
235
|
class: "IncodeFlow",
|
|
214
|
-
children: /* @__PURE__ */
|
|
236
|
+
children: /* @__PURE__ */ o(h, {
|
|
215
237
|
moduleKey: e,
|
|
216
|
-
onNext: () =>
|
|
238
|
+
onNext: () => g.completeModule()
|
|
217
239
|
})
|
|
218
240
|
});
|
|
219
|
-
if (
|
|
241
|
+
if (w.status === "idle" || w.status === "loading" || w.status === "error") return /* @__PURE__ */ o("div", {
|
|
220
242
|
class: "IncodeFlow",
|
|
221
|
-
children: /* @__PURE__ */
|
|
243
|
+
children: /* @__PURE__ */ o(u, {
|
|
222
244
|
title: n.spinnerConfig?.title,
|
|
223
245
|
subtitle: n.spinnerConfig?.subtitle,
|
|
224
246
|
size: n.spinnerConfig?.size,
|
|
225
247
|
fullScreen: !0
|
|
226
248
|
})
|
|
227
249
|
});
|
|
228
|
-
let { Component:
|
|
229
|
-
if (e === "REDIRECT_TO_MOBILE") return /* @__PURE__ */
|
|
230
|
-
class: "IncodeFlow",
|
|
231
|
-
children: /* @__PURE__ */ i(o, {
|
|
232
|
-
config: t,
|
|
233
|
-
onFinish: () => m.completeFlow(),
|
|
234
|
-
onContinue: () => m.completeModule(),
|
|
235
|
-
onError: a
|
|
236
|
-
}, `redirect-to-mobile-${d.currentStepIndex}`)
|
|
237
|
-
});
|
|
238
|
-
if (e === "HOME") return /* @__PURE__ */ i("div", {
|
|
250
|
+
let { Component: i } = w;
|
|
251
|
+
if (e === "REDIRECT_TO_MOBILE") return /* @__PURE__ */ o("div", {
|
|
239
252
|
class: "IncodeFlow",
|
|
240
|
-
children: /* @__PURE__ */ i
|
|
253
|
+
children: /* @__PURE__ */ o(i, {
|
|
241
254
|
config: t,
|
|
242
|
-
onFinish: () =>
|
|
255
|
+
onFinish: () => g.completeFlow(),
|
|
256
|
+
onContinue: () => g.completeModule(),
|
|
243
257
|
onError: a
|
|
244
|
-
}, `
|
|
258
|
+
}, `redirect-to-mobile-${p.currentStepIndex}`)
|
|
245
259
|
});
|
|
246
|
-
if (e === "SELFIE") return /* @__PURE__ */
|
|
260
|
+
if (e === "SELFIE") return /* @__PURE__ */ o("div", {
|
|
247
261
|
class: "IncodeFlow",
|
|
248
|
-
children: /* @__PURE__ */ i
|
|
262
|
+
children: /* @__PURE__ */ o(i, {
|
|
249
263
|
config: t,
|
|
250
|
-
onFinish: () =>
|
|
264
|
+
onFinish: () => g.completeModule(),
|
|
251
265
|
onError: (e) => {
|
|
252
266
|
a?.(e ?? "Selfie verification error");
|
|
253
267
|
}
|
|
254
|
-
}, `selfie-${
|
|
268
|
+
}, `selfie-${p.currentStepIndex}`)
|
|
255
269
|
});
|
|
256
|
-
if (e === "AUTHENTICATION") return /* @__PURE__ */
|
|
270
|
+
if (e === "AUTHENTICATION") return /* @__PURE__ */ o("div", {
|
|
257
271
|
class: "IncodeFlow",
|
|
258
|
-
children: /* @__PURE__ */ i
|
|
272
|
+
children: /* @__PURE__ */ o(i, {
|
|
259
273
|
config: {
|
|
260
274
|
...t,
|
|
261
275
|
authHint: n.authHint
|
|
262
276
|
},
|
|
263
|
-
onFinish: () =>
|
|
277
|
+
onFinish: () => g.completeModule(),
|
|
264
278
|
onError: (e) => {
|
|
265
279
|
a?.(e ?? "Authentication error");
|
|
266
280
|
}
|
|
267
|
-
}, `authentication-${
|
|
281
|
+
}, `authentication-${p.currentStepIndex}`)
|
|
268
282
|
});
|
|
269
|
-
if (e === "PHONE") return /* @__PURE__ */
|
|
283
|
+
if (e === "PHONE") return /* @__PURE__ */ o("div", {
|
|
270
284
|
class: "IncodeFlow",
|
|
271
|
-
children: /* @__PURE__ */ i
|
|
285
|
+
children: /* @__PURE__ */ o(i, {
|
|
272
286
|
config: t,
|
|
273
|
-
onFinish: () =>
|
|
287
|
+
onFinish: () => g.completeModule(),
|
|
274
288
|
onError: (e) => {
|
|
275
289
|
a?.(e ?? "Phone verification error");
|
|
276
290
|
}
|
|
277
|
-
}, `phone-${
|
|
291
|
+
}, `phone-${p.currentStepIndex}`)
|
|
278
292
|
});
|
|
279
293
|
if (e === "EMAIL") {
|
|
280
294
|
let e = t;
|
|
281
|
-
return !e || typeof e.otpVerification != "boolean" || typeof e.otpExpirationInMinutes != "number" ? /* @__PURE__ */
|
|
295
|
+
return !e || typeof e.otpVerification != "boolean" || typeof e.otpExpirationInMinutes != "number" ? /* @__PURE__ */ o("div", {
|
|
282
296
|
class: "IncodeFlow",
|
|
283
|
-
children: /* @__PURE__ */
|
|
284
|
-
}) : /* @__PURE__ */
|
|
297
|
+
children: /* @__PURE__ */ o("div", { children: "Error: Invalid email configuration" })
|
|
298
|
+
}) : /* @__PURE__ */ o("div", {
|
|
285
299
|
class: "IncodeFlow",
|
|
286
|
-
children: /* @__PURE__ */ i
|
|
300
|
+
children: /* @__PURE__ */ o(i, {
|
|
287
301
|
config: e,
|
|
288
|
-
onFinish: () =>
|
|
302
|
+
onFinish: () => g.completeModule(),
|
|
289
303
|
onError: (e) => {
|
|
290
304
|
a?.(e ?? "Email verification error");
|
|
291
305
|
}
|
|
292
|
-
}, `email-${
|
|
306
|
+
}, `email-${p.currentStepIndex}`)
|
|
293
307
|
});
|
|
294
308
|
}
|
|
295
309
|
if (e === "ID" || e === "SECOND_ID") {
|
|
296
310
|
let n = t;
|
|
297
|
-
return /* @__PURE__ */
|
|
311
|
+
return /* @__PURE__ */ o("div", {
|
|
298
312
|
class: "IncodeFlow",
|
|
299
|
-
children: /* @__PURE__ */ i
|
|
313
|
+
children: /* @__PURE__ */ o(i, {
|
|
300
314
|
config: e === "SECOND_ID" ? {
|
|
301
315
|
...n,
|
|
302
316
|
isSecondId: !0
|
|
303
317
|
} : n,
|
|
304
|
-
onFinish: () =>
|
|
318
|
+
onFinish: () => g.completeModule(),
|
|
305
319
|
onError: (e) => {
|
|
306
320
|
a?.(e ?? "ID capture error");
|
|
307
321
|
}
|
|
308
|
-
}, `id-${
|
|
322
|
+
}, `id-${p.currentStepIndex}`)
|
|
309
323
|
});
|
|
310
324
|
}
|
|
311
|
-
if (e === "FACE_MATCH") return /* @__PURE__ */
|
|
325
|
+
if (e === "FACE_MATCH") return /* @__PURE__ */ o("div", {
|
|
312
326
|
class: "IncodeFlow",
|
|
313
|
-
children: /* @__PURE__ */ i
|
|
327
|
+
children: /* @__PURE__ */ o(i, {
|
|
314
328
|
config: t,
|
|
315
|
-
onFinish: () =>
|
|
329
|
+
onFinish: () => g.completeModule(),
|
|
316
330
|
onError: (e) => {
|
|
317
331
|
a?.(e ?? "Face match error");
|
|
318
332
|
}
|
|
319
|
-
}, `face-match-${
|
|
333
|
+
}, `face-match-${p.currentStepIndex}`)
|
|
320
334
|
});
|
|
321
|
-
if (e === "CURP_VALIDATION") return /* @__PURE__ */
|
|
335
|
+
if (e === "CURP_VALIDATION") return /* @__PURE__ */ o("div", {
|
|
322
336
|
class: "IncodeFlow",
|
|
323
|
-
children: /* @__PURE__ */ i
|
|
337
|
+
children: /* @__PURE__ */ o(i, {
|
|
324
338
|
config: t,
|
|
325
|
-
onFinish: () =>
|
|
339
|
+
onFinish: () => g.completeModule(),
|
|
326
340
|
onError: (e) => {
|
|
327
341
|
a?.(e ?? "CURP validation error");
|
|
328
342
|
}
|
|
329
|
-
}, `curp-validation-${
|
|
343
|
+
}, `curp-validation-${p.currentStepIndex}`)
|
|
330
344
|
});
|
|
331
|
-
if (e === "GOVT_VALIDATION_PROVISIONING") return /* @__PURE__ */
|
|
345
|
+
if (e === "GOVT_VALIDATION_PROVISIONING") return /* @__PURE__ */ o("div", {
|
|
332
346
|
class: "IncodeFlow",
|
|
333
|
-
children: /* @__PURE__ */ i
|
|
347
|
+
children: /* @__PURE__ */ o(i, {
|
|
334
348
|
config: t,
|
|
335
|
-
onFinish: () =>
|
|
349
|
+
onFinish: () => g.completeModule(),
|
|
336
350
|
onError: (e) => {
|
|
337
351
|
a?.(e ?? "Government validation error");
|
|
338
352
|
}
|
|
339
|
-
}, `govt-validation-${
|
|
353
|
+
}, `govt-validation-${p.currentStepIndex}`)
|
|
340
354
|
});
|
|
341
|
-
if (e === "GEOLOCATION") return /* @__PURE__ */
|
|
355
|
+
if (e === "GEOLOCATION") return /* @__PURE__ */ o("div", {
|
|
342
356
|
class: "IncodeFlow",
|
|
343
|
-
children: /* @__PURE__ */ i
|
|
357
|
+
children: /* @__PURE__ */ o(i, {
|
|
344
358
|
config: t,
|
|
345
|
-
onFinish: () =>
|
|
359
|
+
onFinish: () => g.completeModule(),
|
|
346
360
|
onError: (e) => {
|
|
347
361
|
a?.(e ?? "Geolocation error");
|
|
348
362
|
}
|
|
349
|
-
}, `geolocation-${
|
|
363
|
+
}, `geolocation-${p.currentStepIndex}`)
|
|
350
364
|
});
|
|
351
|
-
if (e === "EXTERNAL_VERIFICATION") return /* @__PURE__ */
|
|
365
|
+
if (e === "EXTERNAL_VERIFICATION") return /* @__PURE__ */ o("div", {
|
|
352
366
|
class: "IncodeFlow",
|
|
353
|
-
children: /* @__PURE__ */ i
|
|
354
|
-
config: { flowId:
|
|
355
|
-
onFinish: () =>
|
|
367
|
+
children: /* @__PURE__ */ o(i, {
|
|
368
|
+
config: { flowId: p.flow.flowId },
|
|
369
|
+
onFinish: () => g.completeModule(),
|
|
356
370
|
onError: (e) => {
|
|
357
371
|
a?.(e ?? "External verification error");
|
|
358
372
|
}
|
|
359
|
-
}, `ekyc-${
|
|
373
|
+
}, `ekyc-${p.currentStepIndex}`)
|
|
360
374
|
});
|
|
361
|
-
if (e === "DOCUMENT_CAPTURE") return /* @__PURE__ */
|
|
375
|
+
if (e === "DOCUMENT_CAPTURE") return /* @__PURE__ */ o("div", {
|
|
362
376
|
class: "IncodeFlow",
|
|
363
|
-
children: /* @__PURE__ */ i
|
|
377
|
+
children: /* @__PURE__ */ o(i, {
|
|
364
378
|
config: t,
|
|
365
|
-
onFinish: () =>
|
|
379
|
+
onFinish: () => g.completeModule(),
|
|
366
380
|
onError: (e) => {
|
|
367
381
|
a?.(e ?? "Document capture error");
|
|
368
382
|
}
|
|
369
|
-
}, `document-capture-${
|
|
383
|
+
}, `document-capture-${p.currentStepIndex}`)
|
|
370
384
|
});
|
|
371
|
-
if (e === "ADDRESS") return /* @__PURE__ */
|
|
385
|
+
if (e === "ADDRESS") return /* @__PURE__ */ o("div", {
|
|
372
386
|
class: "IncodeFlow",
|
|
373
|
-
children: /* @__PURE__ */ i
|
|
387
|
+
children: /* @__PURE__ */ o(i, {
|
|
374
388
|
config: {
|
|
375
389
|
...t,
|
|
376
390
|
processingType: "addressStatement"
|
|
377
391
|
},
|
|
378
|
-
onFinish: () =>
|
|
392
|
+
onFinish: () => g.completeModule(),
|
|
379
393
|
onError: (e) => {
|
|
380
394
|
a?.(e ?? "Address capture error");
|
|
381
395
|
}
|
|
382
|
-
}, `address-${
|
|
396
|
+
}, `address-${p.currentStepIndex}`)
|
|
383
397
|
});
|
|
384
|
-
if (e === "SIGNATURE") return /* @__PURE__ */
|
|
398
|
+
if (e === "SIGNATURE") return /* @__PURE__ */ o("div", {
|
|
385
399
|
class: "IncodeFlow",
|
|
386
|
-
children: /* @__PURE__ */ i
|
|
400
|
+
children: /* @__PURE__ */ o(i, {
|
|
387
401
|
config: t,
|
|
388
|
-
onFinish: () =>
|
|
402
|
+
onFinish: () => g.completeModule(),
|
|
389
403
|
onError: (e) => {
|
|
390
404
|
a?.(e ?? "Signature capture error");
|
|
391
405
|
}
|
|
392
|
-
}, `signature-${
|
|
406
|
+
}, `signature-${p.currentStepIndex}`)
|
|
393
407
|
});
|
|
394
408
|
if (e === "EKYB") {
|
|
395
409
|
let e = t;
|
|
396
|
-
return /* @__PURE__ */
|
|
410
|
+
return /* @__PURE__ */ o("div", {
|
|
397
411
|
class: "IncodeFlow",
|
|
398
|
-
children: /* @__PURE__ */ i
|
|
412
|
+
children: /* @__PURE__ */ o(i, {
|
|
399
413
|
config: {
|
|
400
414
|
flowId: r,
|
|
401
415
|
checkBusinessName: e.checkBusinessName,
|
|
@@ -403,83 +417,83 @@ var E = ({ config: n, onFinish: r, onError: a }) => {
|
|
|
403
417
|
checkTaxId: e.checkTaxId,
|
|
404
418
|
checkUniqueBeneficialOwner: e.checkUniqueBeneficialOwner
|
|
405
419
|
},
|
|
406
|
-
onFinish: () =>
|
|
420
|
+
onFinish: () => g.completeModule(),
|
|
407
421
|
onError: (e) => {
|
|
408
422
|
a?.(e ?? "eKYB verification error");
|
|
409
423
|
}
|
|
410
|
-
}, `ekyb-${
|
|
424
|
+
}, `ekyb-${p.currentStepIndex}`)
|
|
411
425
|
});
|
|
412
426
|
}
|
|
413
|
-
if (e === "COMBINED_CONSENT") return /* @__PURE__ */
|
|
427
|
+
if (e === "COMBINED_CONSENT") return /* @__PURE__ */ o("div", {
|
|
414
428
|
class: "IncodeFlow",
|
|
415
|
-
children: /* @__PURE__ */ i
|
|
429
|
+
children: /* @__PURE__ */ o(i, {
|
|
416
430
|
config: t,
|
|
417
|
-
onFinish: () =>
|
|
431
|
+
onFinish: () => g.completeModule(),
|
|
418
432
|
onError: (e) => {
|
|
419
433
|
a?.(e ?? "Combined consent error");
|
|
420
434
|
}
|
|
421
|
-
}, `combined-consent-${
|
|
435
|
+
}, `combined-consent-${p.currentStepIndex}`)
|
|
422
436
|
});
|
|
423
|
-
if (e === "MANDATORY_CONSENT") return /* @__PURE__ */
|
|
437
|
+
if (e === "MANDATORY_CONSENT") return /* @__PURE__ */ o("div", {
|
|
424
438
|
class: "IncodeFlow",
|
|
425
|
-
children: /* @__PURE__ */ i
|
|
439
|
+
children: /* @__PURE__ */ o(i, {
|
|
426
440
|
config: t,
|
|
427
|
-
onFinish: () =>
|
|
441
|
+
onFinish: () => g.completeModule(),
|
|
428
442
|
onError: (e) => {
|
|
429
443
|
a?.(e ?? "Mandatory consent error");
|
|
430
444
|
}
|
|
431
|
-
}, `mandatory-consent-${
|
|
445
|
+
}, `mandatory-consent-${p.currentStepIndex}`)
|
|
432
446
|
});
|
|
433
447
|
if (e === "AE_SIGNATURE" || e === "QE_SIGNATURE") {
|
|
434
448
|
let n = t, r = e === "QE_SIGNATURE" ? "qe" : "ae";
|
|
435
|
-
return /* @__PURE__ */
|
|
449
|
+
return /* @__PURE__ */ o("div", {
|
|
436
450
|
class: "IncodeFlow",
|
|
437
|
-
children: /* @__PURE__ */ i
|
|
451
|
+
children: /* @__PURE__ */ o(i, {
|
|
438
452
|
config: {
|
|
439
453
|
uploadDocument: n.uploadDocument,
|
|
440
454
|
downloadDocument: n.downloadDocument
|
|
441
455
|
},
|
|
442
|
-
onFinish: () =>
|
|
456
|
+
onFinish: () => g.completeModule(),
|
|
443
457
|
onError: (e) => {
|
|
444
458
|
a?.(e ?? `${r.toUpperCase()} Signature error`);
|
|
445
459
|
}
|
|
446
|
-
}, `${r}-signature-${
|
|
460
|
+
}, `${r}-signature-${p.currentStepIndex}`)
|
|
447
461
|
});
|
|
448
462
|
}
|
|
449
|
-
if (e === "ANTIFRAUD") return /* @__PURE__ */
|
|
463
|
+
if (e === "ANTIFRAUD") return /* @__PURE__ */ o("div", {
|
|
450
464
|
class: "IncodeFlow",
|
|
451
|
-
children: /* @__PURE__ */ i
|
|
452
|
-
onFinish: () =>
|
|
465
|
+
children: /* @__PURE__ */ o(i, {
|
|
466
|
+
onFinish: () => g.completeModule(),
|
|
453
467
|
onError: (e) => {
|
|
454
468
|
a?.(e ?? "Antifraud check error");
|
|
455
469
|
}
|
|
456
|
-
}, `antifraud-${
|
|
470
|
+
}, `antifraud-${p.currentStepIndex}`)
|
|
457
471
|
});
|
|
458
|
-
if (e === "WATCHLIST") return /* @__PURE__ */
|
|
472
|
+
if (e === "WATCHLIST") return /* @__PURE__ */ o("div", {
|
|
459
473
|
class: "IncodeFlow",
|
|
460
|
-
children: /* @__PURE__ */ i
|
|
461
|
-
onFinish: () =>
|
|
474
|
+
children: /* @__PURE__ */ o(i, {
|
|
475
|
+
onFinish: () => g.completeModule(),
|
|
462
476
|
onError: (e) => {
|
|
463
477
|
a?.(e ?? "Watchlist check error");
|
|
464
478
|
}
|
|
465
|
-
}, `watchlist-${
|
|
479
|
+
}, `watchlist-${p.currentStepIndex}`)
|
|
466
480
|
});
|
|
467
|
-
if (e === "CROSS_DOCUMENT_DATA_MATCH") return /* @__PURE__ */
|
|
481
|
+
if (e === "CROSS_DOCUMENT_DATA_MATCH") return /* @__PURE__ */ o("div", {
|
|
468
482
|
class: "IncodeFlow",
|
|
469
|
-
children: /* @__PURE__ */ i
|
|
470
|
-
onFinish: () =>
|
|
483
|
+
children: /* @__PURE__ */ o(i, {
|
|
484
|
+
onFinish: () => g.completeModule(),
|
|
471
485
|
onError: (e) => {
|
|
472
486
|
a?.(e ?? "Cross document data match error");
|
|
473
487
|
}
|
|
474
|
-
}, `cross-document-data-match-${
|
|
488
|
+
}, `cross-document-data-match-${p.currentStepIndex}`)
|
|
475
489
|
});
|
|
476
490
|
}
|
|
477
491
|
return null;
|
|
478
|
-
},
|
|
492
|
+
}, N = ({ config: e, onFinish: t = () => {}, onError: n }) => /* @__PURE__ */ o(l, { children: e ? /* @__PURE__ */ o(M, {
|
|
479
493
|
config: e,
|
|
480
494
|
onFinish: t,
|
|
481
495
|
onError: n
|
|
482
496
|
}) : null });
|
|
483
|
-
|
|
497
|
+
d(N, "incode-flow");
|
|
484
498
|
//#endregion
|
|
485
|
-
export {
|
|
499
|
+
export { N as IncodeFlow, E as preloadIncodeFlow };
|