@incodetech/web 0.0.0-dev-20260527-d2899d7c → 0.0.0-dev-20260527-67542989

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.
@@ -5,12 +5,12 @@ import { c as u } from "../hooks-CLjlsC2g.js";
5
5
  import { t as d } from "../incodeComponent-MZEyrb1V.js";
6
6
  import { t as f } from "../transitionSpinner-BWCiDYAb.js";
7
7
  import { t as p } from "../incodeModule-CHzKl22Y.js";
8
- import { a as m, c as h, d as g, f as _, g as v, l as y, m as b, n as x, o as S, p as C, r as w, s as T, t as E, u as D, v as O } from "../useModuleLoader-BcTaTo9L.js";
9
- import { getDeviceClass as k } from "@incodetech/core/device";
10
- import { getRequiredWasmPipelines as A } from "@incodetech/core/flow";
11
- import { bootstrapSession as j, refreshQrUrlUuid as M } from "@incodetech/core/session";
8
+ import { _ as m, a as h, c as g, d as _, f as v, h as y, l as b, m as x, n as S, o as C, p as w, r as T, s as E, t as D, u as O, y as k } from "../useModuleLoader-CXzqdNSv.js";
9
+ import { getDeviceClass as A } from "@incodetech/core/device";
10
+ import { getRequiredWasmPipelines as j } from "@incodetech/core/flow";
11
+ import { bootstrapSession as M, refreshQrUrlUuid as N } from "@incodetech/core/session";
12
12
  //#region src/shared/processing/useDelayedFlag.ts
13
- function N(e, t) {
13
+ function P(e, t) {
14
14
  let [r, i] = s(!1);
15
15
  return n(() => {
16
16
  if (e === !1) {
@@ -27,21 +27,8 @@ function N(e, t) {
27
27
  }
28
28
  //#endregion
29
29
  //#region src/modules/flow/createFlowSession.ts
30
- function P(e) {
31
- return Array.from(new Uint8Array(e), (e) => e.toString(16).padStart(2, "0")).join("");
32
- }
33
- async function F(e) {
34
- let t = globalThis.crypto?.subtle;
35
- if (!t) throw Error("SHA-1 is not available in this environment");
36
- return P(await t.digest("SHA-1", new TextEncoder().encode(e)));
37
- }
38
- async function I(e) {
39
- if (typeof e.apiKey == "string") return e.apiKey;
40
- if (typeof e.clientId == "string") return F(e.clientId);
41
- throw Error("Flow self-loading mode requires apiKey or clientId");
42
- }
43
- async function L(e, t) {
44
- return j(await I(e), {
30
+ async function F(e, t) {
31
+ return M(await h(e), {
45
32
  configurationId: e.configurationId,
46
33
  externalId: e.externalId,
47
34
  externalCustomerId: e.externalCustomerId,
@@ -50,23 +37,24 @@ async function L(e, t) {
50
37
  uuid: e.uuid,
51
38
  urlUuid: e.urlUuid,
52
39
  interviewId: e.interviewId,
40
+ loginHint: e.loginHint,
53
41
  onUrlUuidRefreshed: e.onUrlUuidRefreshed
54
42
  }, t);
55
43
  }
56
44
  //#endregion
57
45
  //#region src/modules/flow/flowConfig.ts
58
- function R(e) {
46
+ function I(e) {
59
47
  return typeof e.token == "string";
60
48
  }
61
- function z(e) {
49
+ function L(e) {
62
50
  let t = e;
63
51
  return typeof t.configurationId == "string" && (typeof t.apiKey == "string" || typeof t.clientId == "string");
64
52
  }
65
53
  //#endregion
66
54
  //#region src/modules/flow/preloadFlow.ts
67
- var B = /* @__PURE__ */ new Map();
68
- function V(e) {
69
- let t = B.get(e);
55
+ var R = /* @__PURE__ */ new Map();
56
+ function z(e) {
57
+ let t = R.get(e);
70
58
  if (!t) throw Error("Preload state not found");
71
59
  return {
72
60
  get isReady() {
@@ -82,18 +70,18 @@ function V(e) {
82
70
  }
83
71
  },
84
72
  cancel() {
85
- t.status === "loading" && (t.unsubscribe && t.unsubscribe(), t.flowManager.stop(), t.readyReject(/* @__PURE__ */ Error("Preload cancelled")), B.delete(e));
73
+ t.status === "loading" && (t.unsubscribe && t.unsubscribe(), t.flowManager.stop(), t.readyReject(/* @__PURE__ */ Error("Preload cancelled")), R.delete(e));
86
74
  }
87
75
  };
88
76
  }
89
- function H(e) {
77
+ function B(e) {
90
78
  let { token: t } = e;
91
79
  if (e.urlUuid) throw Error("preloadIncodeFlow does not support urlUuid; pass it to <IncodeFlow> directly so the SDK can rotate it on mount.");
92
- if (B.has(t)) return V(t);
80
+ if (R.has(t)) return z(t);
93
81
  let n, r, i = new Promise((e, t) => {
94
82
  n = e, r = t;
95
- }), a = y(e);
96
- a.getState().presentation.shouldPrefetchHome && C();
83
+ }), a = O(e);
84
+ a.getState().presentation.shouldPrefetchHome && x();
97
85
  let o = {
98
86
  status: "loading",
99
87
  flowManager: a,
@@ -102,59 +90,59 @@ function H(e) {
102
90
  readyResolve: n,
103
91
  readyReject: r
104
92
  };
105
- return B.set(t, o), (async () => {
93
+ return R.set(t, o), (async () => {
106
94
  try {
107
- await g({
95
+ await v({
108
96
  token: e.token,
109
97
  lang: e.lang,
110
98
  flowManager: a
111
99
  });
112
- let t = e.disableDashboardTheme ? Promise.resolve({}) : D().then((e) => {
100
+ let t = e.disableDashboardTheme ? Promise.resolve({}) : _().then((e) => {
113
101
  o.theme = e.theme, o.uiConfig = e.uiConfig;
114
102
  });
115
103
  o.unsubscribe = a.subscribe((t) => {
116
104
  if (t.status === "ready") {
117
105
  let n = t;
118
- v(n, e.wasmConfig), _(n), o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "ready", o.readyResolve();
106
+ m(n, e.wasmConfig), w(n), o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "ready", o.readyResolve();
119
107
  } else t.status === "error" && (o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "error", o.error = t.error, o.readyReject(Error(t.error)));
120
108
  }), await t;
121
109
  } catch (e) {
122
- o.status = "error", o.error = e instanceof Error ? e.message : "Failed to preload", o.readyReject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to preload")), B.delete(t);
110
+ o.status = "error", o.error = e instanceof Error ? e.message : "Failed to preload", o.readyReject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to preload")), R.delete(t);
123
111
  }
124
- })(), V(t);
112
+ })(), z(t);
125
113
  }
126
- function U(e) {
127
- return B.get(e) ?? null;
114
+ function V(e) {
115
+ return R.get(e) ?? null;
128
116
  }
129
- function W(e) {
130
- let t = U(e);
131
- return t && B.delete(e), t;
117
+ function H(e) {
118
+ let t = V(e);
119
+ return t && R.delete(e), t;
132
120
  }
133
121
  //#endregion
134
122
  //#region src/modules/flow/useFlowInitialization.ts
135
- function G(e) {
136
- e.getState().presentation.shouldPrefetchHome && C();
123
+ function U(e) {
124
+ e.getState().presentation.shouldPrefetchHome && x();
137
125
  }
138
- function K() {
139
- k() === "desktop" && b();
126
+ function W() {
127
+ A() === "desktop" && y();
140
128
  }
141
- function q(e) {
142
- let { lang: t, disableDashboardTheme: r, enableHome: i, onError: o, useCPF: c } = e, u = R(e) ? e.token : void 0, d = a(null), [f, p] = s(() => {
143
- let t = u ? U(u) : null;
129
+ function G(e) {
130
+ let { lang: t, disableDashboardTheme: r, enableHome: i, onError: o, useCPF: c } = e, u = I(e) ? e.token : void 0, d = a(null), [f, p] = s(() => {
131
+ let t = u ? V(u) : null;
144
132
  if (u && t?.status === "ready") {
145
- let e = W(u);
146
- if (e) return d.current = e.flowManager, G(e.flowManager), K(), e.uiConfig && l(e.uiConfig), {
133
+ let e = H(u);
134
+ if (e) return d.current = e.flowManager, U(e.flowManager), W(), e.uiConfig && l(e.uiConfig), {
147
135
  status: "ready",
148
136
  flowManager: e.flowManager
149
137
  };
150
138
  }
151
- let n = y({
139
+ let n = O({
152
140
  authHint: e.authHint,
153
141
  lang: e.lang,
154
142
  enableHome: e.enableHome,
155
143
  useCPF: e.useCPF
156
144
  });
157
- return d.current = n, G(n), K(), t?.status === "error" ? {
145
+ return d.current = n, U(n), W(), t?.status === "error" ? {
158
146
  status: "error",
159
147
  error: t.error ?? "Preload failed",
160
148
  flowManager: n
@@ -162,19 +150,19 @@ function q(e) {
162
150
  status: "initializing",
163
151
  flowManager: n
164
152
  };
165
- }), h = a(!1);
153
+ }), m = a(!1);
166
154
  return n(() => {
167
155
  if (f.status !== "initializing") return;
168
- let n = u ? U(u) : null;
156
+ let n = u ? V(u) : null;
169
157
  if (u && n?.status === "loading") {
170
158
  n.readyPromise.then(() => {
171
- let e = W(u);
172
- e && (d.current = e.flowManager, G(e.flowManager), K(), e.uiConfig && l(e.uiConfig), p({
159
+ let e = H(u);
160
+ e && (d.current = e.flowManager, U(e.flowManager), W(), e.uiConfig && l(e.uiConfig), p({
173
161
  status: "ready",
174
162
  flowManager: e.flowManager
175
163
  }));
176
164
  }).catch((e) => {
177
- let t = e instanceof Error ? e.message : "Preload failed", n = m(e);
165
+ let t = e instanceof Error ? e.message : "Preload failed", n = C(e);
178
166
  p({
179
167
  status: "error",
180
168
  error: t,
@@ -184,25 +172,25 @@ function q(e) {
184
172
  });
185
173
  return;
186
174
  }
187
- if (h.current) return;
188
- h.current = !0;
175
+ if (m.current) return;
176
+ m.current = !0;
189
177
  let i = new AbortController(), { signal: a } = i;
190
178
  return (async () => {
191
179
  try {
192
180
  let n;
193
- if (R(e)) n = e.token, e.urlUuid && await M({
181
+ if (I(e)) n = e.token, e.urlUuid && await N({
194
182
  urlUuid: e.urlUuid,
195
183
  onboardingId: null,
196
184
  onRefreshed: e.onUrlUuidRefreshed
197
185
  }, a);
198
- else if (z(e)) n = (await L(e, a)).token;
186
+ else if (L(e)) n = (await F(e, a)).token;
199
187
  else throw Error("Flow requires token, or configurationId with apiKey or clientId");
200
- await g({
188
+ await v({
201
189
  token: n,
202
190
  lang: t,
203
191
  flowManager: f.flowManager
204
192
  });
205
- let i = r ? Promise.resolve() : D().then((e) => {
193
+ let i = r ? Promise.resolve() : _().then((e) => {
206
194
  e.uiConfig && l(e.uiConfig);
207
195
  }), o = f.flowManager.waitForReady();
208
196
  await Promise.all([o, i]), p({
@@ -211,7 +199,7 @@ function q(e) {
211
199
  });
212
200
  } catch (e) {
213
201
  if (a.aborted) return;
214
- let t = e instanceof Error ? e.message : "Failed to initialize SDK", n = m(e);
202
+ let t = e instanceof Error ? e.message : "Failed to initialize SDK", n = C(e);
215
203
  p({
216
204
  status: "error",
217
205
  error: t,
@@ -233,68 +221,68 @@ function q(e) {
233
221
  }
234
222
  //#endregion
235
223
  //#region src/modules/flow/flow.tsx
236
- var J = r(() => import("../homeScreen-CqWZqT00.js").then((e) => ({ default: e.HomeScreen }))), Y = ({ config: r, onFinish: s, onError: l }) => {
237
- let { i18n: d } = e(), p = q(i(() => ({
224
+ var K = r(() => import("../homeScreen-CqWZqT00.js").then((e) => ({ default: e.HomeScreen }))), q = ({ config: r, onFinish: s, onError: l }) => {
225
+ let { i18n: d } = e(), p = G(i(() => ({
238
226
  ...r,
239
227
  onError: l
240
- }), [r, l])), [m, g] = u(() => p.flowManager, { autoLoad: !1 }), _ = m.presentation.lazyModuleKey, y = m.status === "ready" ? m.currentStep : void 0, b = E({
241
- moduleKey: _,
242
- modules: h,
228
+ }), [r, l])), [h, _] = u(() => p.flowManager, { autoLoad: !1 }), v = h.presentation.lazyModuleKey, y = h.status === "ready" ? h.currentStep : void 0, C = D({
229
+ moduleKey: v,
230
+ modules: b,
243
231
  onModuleLoading: r.onModuleLoading,
244
232
  onModuleLoaded: r.onModuleLoaded,
245
233
  onError: l
246
234
  });
247
- x({
248
- moduleKey: m.status === "ready" && m.homeScreen.visible ? y : void 0,
249
- modules: h
235
+ S({
236
+ moduleKey: h.status === "ready" && h.homeScreen.visible ? y : void 0,
237
+ modules: b
250
238
  });
251
- let D = b.status === "loaded", k = r.enableHome === !0 && m.status === "ready" && m.flow.disableLaunchScreen !== !0 && m.currentStepIndex === 0 && m.homeScreen.visible === !1 && b.status === "loading", j = N(m.presentation.isAwaitingReady === !0, 150), M = N(m.status === "ready" && (b.status === "idle" || b.status === "loading" || b.status === "error"), 150);
252
- w(m?.status === "ready" ? m.steps : [], m?.status === "ready" ? m.currentStepIndex : -1, h, D), n(() => {
253
- if (r.onFlowEvent) return g.subscribeFlowEvent(r.onFlowEvent);
254
- }, [g, r.onFlowEvent]), n(() => {
255
- m.presentation.shouldPrefetchHome && C();
256
- }, [m.presentation.shouldPrefetchHome]), n(() => {
239
+ let w = C.status === "loaded", O = r.enableHome === !0 && h.status === "ready" && h.flow.disableLaunchScreen !== !0 && h.currentStepIndex === 0 && h.homeScreen.visible === !1 && C.status === "loading", A = P(h.presentation.isAwaitingReady === !0, 150), M = P(h.status === "ready" && (C.status === "idle" || C.status === "loading" || C.status === "error"), 150);
240
+ T(h?.status === "ready" ? h.steps : [], h?.status === "ready" ? h.currentStepIndex : -1, b, w), n(() => {
241
+ if (r.onFlowEvent) return _.subscribeFlowEvent(r.onFlowEvent);
242
+ }, [_, r.onFlowEvent]), n(() => {
243
+ h.presentation.shouldPrefetchHome && x();
244
+ }, [h.presentation.shouldPrefetchHome]), n(() => {
257
245
  t() || r.lang && d.language !== r.lang && d.changeLanguage(r.lang);
258
246
  }, [r.lang, d]), n(() => {
259
- if (m?.status !== "ready" || m.currentStep === "REDIRECT_TO_MOBILE") return;
260
- let e = m, t = A(e.flow);
261
- t.length > 0 && (r.onWasmWarmup?.(t), v(e, r.wasmConfig));
262
- }, [m, r]);
263
- let P = a(!1);
247
+ if (h?.status !== "ready" || h.currentStep === "REDIRECT_TO_MOBILE") return;
248
+ let e = h, t = j(e.flow);
249
+ t.length > 0 && (r.onWasmWarmup?.(t), m(e, r.wasmConfig));
250
+ }, [h, r]);
251
+ let N = a(!1);
264
252
  n(() => {
265
- if (!P.current) {
266
- if (m?.status === "finished") {
267
- P.current = !0;
268
- let e = m.finishStatus;
253
+ if (!N.current) {
254
+ if (h?.status === "finished") {
255
+ N.current = !0;
256
+ let e = h.finishStatus;
269
257
  queueMicrotask(() => s(e));
270
258
  return;
271
259
  }
272
- if (m?.status === "error" && l) {
273
- P.current = !0;
274
- let { error: e, errorCode: t } = m;
260
+ if (h?.status === "error" && l) {
261
+ N.current = !0;
262
+ let { error: e, errorCode: t } = h;
275
263
  queueMicrotask(() => l(e, t));
276
264
  }
277
265
  }
278
266
  }, [
279
- m?.status,
267
+ h?.status,
280
268
  s,
281
269
  l,
282
- m
270
+ h
283
271
  ]), n(() => {
284
- m?.status === "ready" && m.currentStep === "ID" && m.steps.includes("TUTORIAL_ID") && g.completeModule();
285
- }, [m, g]);
272
+ h?.status === "ready" && h.currentStep === "ID" && h.steps.includes("TUTORIAL_ID") && _.completeModule();
273
+ }, [h, _]);
286
274
  let F = !(r.spinnerConfig?.title || r.spinnerConfig?.subtitle);
287
275
  if (p.status === "error") return /* @__PURE__ */ c("div", {
288
276
  class: "IncodeFlow",
289
- children: /* @__PURE__ */ c(O, { message: p.error })
277
+ children: /* @__PURE__ */ c(k, { message: p.error })
290
278
  });
291
- if (m.homeScreen.visible || k) return /* @__PURE__ */ c("div", {
279
+ if (h.homeScreen.visible || O) return /* @__PURE__ */ c("div", {
292
280
  class: "IncodeFlow",
293
281
  children: /* @__PURE__ */ c(o, {
294
282
  fallback: null,
295
- children: /* @__PURE__ */ c(J, {
296
- isContinueLoading: m.homeScreen.isContinueLoading || k,
297
- onContinue: () => g.continueFromHome()
283
+ children: /* @__PURE__ */ c(K, {
284
+ isContinueLoading: h.homeScreen.isContinueLoading || O,
285
+ onContinue: () => _.continueFromHome()
298
286
  })
299
287
  })
300
288
  });
@@ -305,20 +293,20 @@ var J = r(() => import("../homeScreen-CqWZqT00.js").then((e) => ({ default: e.Ho
305
293
  hideText: F
306
294
  })
307
295
  });
308
- if (m.presentation.isAwaitingReady) return j ? /* @__PURE__ */ c("div", {
296
+ if (h.presentation.isAwaitingReady) return A ? /* @__PURE__ */ c("div", {
309
297
  class: "IncodeFlow",
310
298
  children: /* @__PURE__ */ c(f, {
311
299
  spinnerConfig: r.spinnerConfig,
312
300
  hideText: F
313
301
  })
314
302
  }) : /* @__PURE__ */ c("div", { class: "IncodeFlow" });
315
- if (m.status === "error") return /* @__PURE__ */ c("div", {
303
+ if (h.status === "error") return /* @__PURE__ */ c("div", {
316
304
  class: "IncodeFlow",
317
- children: /* @__PURE__ */ c(O, { message: m.error })
305
+ children: /* @__PURE__ */ c(k, { message: h.error })
318
306
  });
319
- if (m.status === "finished") return null;
320
- if (m?.status === "ready") {
321
- let { currentStep: e, config: t, flow: n } = m, { flowId: i } = n;
307
+ if (h.status === "finished") return null;
308
+ if (h?.status === "ready") {
309
+ let { currentStep: e, config: t, flow: n } = h, { flowId: i } = n;
322
310
  if (!e || !t) return /* @__PURE__ */ c("div", {
323
311
  class: "IncodeFlow",
324
312
  children: /* @__PURE__ */ c(f, {
@@ -326,40 +314,40 @@ var J = r(() => import("../homeScreen-CqWZqT00.js").then((e) => ({ default: e.Ho
326
314
  hideText: F
327
315
  })
328
316
  });
329
- if (T.has(e)) return /* @__PURE__ */ c("div", { class: "IncodeFlow" });
330
- if (b.status === "unsupported") return /* @__PURE__ */ c("div", {
317
+ if (g.has(e)) return /* @__PURE__ */ c("div", { class: "IncodeFlow" });
318
+ if (C.status === "unsupported") return /* @__PURE__ */ c("div", {
331
319
  class: "IncodeFlow",
332
- children: /* @__PURE__ */ c(S, {
320
+ children: /* @__PURE__ */ c(E, {
333
321
  moduleKey: e,
334
- onNext: () => g.completeModule()
322
+ onNext: () => _.completeModule()
335
323
  })
336
324
  });
337
- if (b.status === "idle" || b.status === "loading" || b.status === "error") return M ? /* @__PURE__ */ c("div", {
325
+ if (C.status === "idle" || C.status === "loading" || C.status === "error") return M ? /* @__PURE__ */ c("div", {
338
326
  class: "IncodeFlow",
339
327
  children: /* @__PURE__ */ c(f, {
340
328
  spinnerConfig: r.spinnerConfig,
341
329
  hideText: F
342
330
  })
343
331
  }) : /* @__PURE__ */ c("div", { class: "IncodeFlow" });
344
- let { Component: a } = b;
332
+ let { Component: a } = C;
345
333
  if (e === "REDIRECT_TO_MOBILE") return /* @__PURE__ */ c("div", {
346
334
  class: "IncodeFlow",
347
335
  children: /* @__PURE__ */ c(a, {
348
336
  config: t,
349
- onFinish: () => g.completeFlow(),
350
- onContinue: () => g.completeModule(),
337
+ onFinish: () => _.completeFlow(),
338
+ onContinue: () => _.completeModule(),
351
339
  onError: l
352
- }, `redirect-to-mobile-${m.currentStepIndex}`)
340
+ }, `redirect-to-mobile-${h.currentStepIndex}`)
353
341
  });
354
342
  if (e === "SELFIE") return /* @__PURE__ */ c("div", {
355
343
  class: "IncodeFlow",
356
344
  children: /* @__PURE__ */ c(a, {
357
345
  config: t,
358
- onFinish: () => g.completeModule(),
346
+ onFinish: () => _.completeModule(),
359
347
  onError: (e) => {
360
348
  l?.(e ?? "Selfie verification error");
361
349
  }
362
- }, `selfie-${m.currentStepIndex}`)
350
+ }, `selfie-${h.currentStepIndex}`)
363
351
  });
364
352
  if (e === "AUTHENTICATION") return /* @__PURE__ */ c("div", {
365
353
  class: "IncodeFlow",
@@ -368,21 +356,21 @@ var J = r(() => import("../homeScreen-CqWZqT00.js").then((e) => ({ default: e.Ho
368
356
  ...t,
369
357
  authHint: r.authHint
370
358
  },
371
- onFinish: () => g.completeModule(),
359
+ onFinish: () => _.completeModule(),
372
360
  onError: (e) => {
373
361
  l?.(e ?? "Authentication error");
374
362
  }
375
- }, `authentication-${m.currentStepIndex}`)
363
+ }, `authentication-${h.currentStepIndex}`)
376
364
  });
377
365
  if (e === "PHONE") return /* @__PURE__ */ c("div", {
378
366
  class: "IncodeFlow",
379
367
  children: /* @__PURE__ */ c(a, {
380
368
  config: t,
381
- onFinish: () => g.completeModule(),
369
+ onFinish: () => _.completeModule(),
382
370
  onError: (e) => {
383
371
  l?.(e ?? "Phone verification error");
384
372
  }
385
- }, `phone-${m.currentStepIndex}`)
373
+ }, `phone-${h.currentStepIndex}`)
386
374
  });
387
375
  if (e === "EMAIL") {
388
376
  let e = t;
@@ -393,11 +381,11 @@ var J = r(() => import("../homeScreen-CqWZqT00.js").then((e) => ({ default: e.Ho
393
381
  class: "IncodeFlow",
394
382
  children: /* @__PURE__ */ c(a, {
395
383
  config: e,
396
- onFinish: () => g.completeModule(),
384
+ onFinish: () => _.completeModule(),
397
385
  onError: (e) => {
398
386
  l?.(e ?? "Email verification error");
399
387
  }
400
- }, `email-${m.currentStepIndex}`)
388
+ }, `email-${h.currentStepIndex}`)
401
389
  });
402
390
  }
403
391
  if (e === "ID" || e === "SECOND_ID") {
@@ -409,15 +397,15 @@ var J = r(() => import("../homeScreen-CqWZqT00.js").then((e) => ({ default: e.Ho
409
397
  ...n,
410
398
  isSecondId: !0
411
399
  } : n,
412
- onFinish: () => g.completeModule(),
400
+ onFinish: () => _.completeModule(),
413
401
  onError: (e) => {
414
402
  l?.(e ?? "ID capture error");
415
403
  }
416
- }, `id-${m.currentStepIndex}`)
404
+ }, `id-${h.currentStepIndex}`)
417
405
  });
418
406
  }
419
407
  if (e === "ID_OCR") {
420
- let e = t, n = m.steps.includes("SECOND_ID");
408
+ let e = t, n = h.steps.includes("SECOND_ID");
421
409
  return /* @__PURE__ */ c("div", {
422
410
  class: "IncodeFlow",
423
411
  children: /* @__PURE__ */ c(a, {
@@ -426,81 +414,81 @@ var J = r(() => import("../homeScreen-CqWZqT00.js").then((e) => ({ default: e.Ho
426
414
  secondId: e.secondId ?? n,
427
415
  flowId: i
428
416
  },
429
- onFinish: () => g.completeModule(),
417
+ onFinish: () => _.completeModule(),
430
418
  onError: (e) => {
431
419
  l?.(e ?? "ID OCR error");
432
420
  }
433
- }, `id-ocr-${m.currentStepIndex}`)
421
+ }, `id-ocr-${h.currentStepIndex}`)
434
422
  });
435
423
  }
436
424
  if (e === "CPF_OCR") return /* @__PURE__ */ c("div", {
437
425
  class: "IncodeFlow",
438
426
  children: /* @__PURE__ */ c(a, {
439
- onFinish: () => g.completeModule(),
427
+ onFinish: () => _.completeModule(),
440
428
  onError: (e) => {
441
429
  l?.(e ?? "CPF OCR error");
442
430
  }
443
- }, `cpf-ocr-${m.currentStepIndex}`)
431
+ }, `cpf-ocr-${h.currentStepIndex}`)
444
432
  });
445
433
  if (e === "FACE_MATCH") return /* @__PURE__ */ c("div", {
446
434
  class: "IncodeFlow",
447
435
  children: /* @__PURE__ */ c(a, {
448
436
  config: t,
449
- onFinish: () => g.completeModule(),
437
+ onFinish: () => _.completeModule(),
450
438
  onError: (e) => {
451
439
  l?.(e ?? "Face match error");
452
440
  }
453
- }, `face-match-${m.currentStepIndex}`)
441
+ }, `face-match-${h.currentStepIndex}`)
454
442
  });
455
443
  if (e === "CURP_VALIDATION") return /* @__PURE__ */ c("div", {
456
444
  class: "IncodeFlow",
457
445
  children: /* @__PURE__ */ c(a, {
458
446
  config: t,
459
- onFinish: () => g.completeModule(),
447
+ onFinish: () => _.completeModule(),
460
448
  onError: (e) => {
461
449
  l?.(e ?? "CURP validation error");
462
450
  }
463
- }, `curp-validation-${m.currentStepIndex}`)
451
+ }, `curp-validation-${h.currentStepIndex}`)
464
452
  });
465
453
  if (e === "GOVT_VALIDATION_PROVISIONING") return /* @__PURE__ */ c("div", {
466
454
  class: "IncodeFlow",
467
455
  children: /* @__PURE__ */ c(a, {
468
456
  config: t,
469
- onFinish: () => g.completeModule(),
457
+ onFinish: () => _.completeModule(),
470
458
  onError: (e) => {
471
459
  l?.(e ?? "Government validation error");
472
460
  }
473
- }, `govt-validation-${m.currentStepIndex}`)
461
+ }, `govt-validation-${h.currentStepIndex}`)
474
462
  });
475
463
  if (e === "GEOLOCATION") return /* @__PURE__ */ c("div", {
476
464
  class: "IncodeFlow",
477
465
  children: /* @__PURE__ */ c(a, {
478
466
  config: t,
479
- onFinish: () => g.completeModule(),
467
+ onFinish: () => _.completeModule(),
480
468
  onError: (e) => {
481
469
  l?.(e ?? "Geolocation error");
482
470
  }
483
- }, `geolocation-${m.currentStepIndex}`)
471
+ }, `geolocation-${h.currentStepIndex}`)
484
472
  });
485
473
  if (e === "EXTERNAL_VERIFICATION") return /* @__PURE__ */ c("div", {
486
474
  class: "IncodeFlow",
487
475
  children: /* @__PURE__ */ c(a, {
488
- config: { flowId: m.flow.flowId },
489
- onFinish: () => g.completeModule(),
476
+ config: { flowId: h.flow.flowId },
477
+ onFinish: () => _.completeModule(),
490
478
  onError: (e) => {
491
479
  l?.(e ?? "External verification error");
492
480
  }
493
- }, `ekyc-${m.currentStepIndex}`)
481
+ }, `ekyc-${h.currentStepIndex}`)
494
482
  });
495
483
  if (e === "DOCUMENT_CAPTURE") return /* @__PURE__ */ c("div", {
496
484
  class: "IncodeFlow",
497
485
  children: /* @__PURE__ */ c(a, {
498
486
  config: t,
499
- onFinish: () => g.completeModule(),
487
+ onFinish: () => _.completeModule(),
500
488
  onError: (e) => {
501
489
  l?.(e ?? "Document capture error");
502
490
  }
503
- }, `document-capture-${m.currentStepIndex}`)
491
+ }, `document-capture-${h.currentStepIndex}`)
504
492
  });
505
493
  if (e === "ADDRESS") return /* @__PURE__ */ c("div", {
506
494
  class: "IncodeFlow",
@@ -509,21 +497,21 @@ var J = r(() => import("../homeScreen-CqWZqT00.js").then((e) => ({ default: e.Ho
509
497
  ...t,
510
498
  processingType: "addressStatement"
511
499
  },
512
- onFinish: () => g.completeModule(),
500
+ onFinish: () => _.completeModule(),
513
501
  onError: (e) => {
514
502
  l?.(e ?? "Address capture error");
515
503
  }
516
- }, `address-${m.currentStepIndex}`)
504
+ }, `address-${h.currentStepIndex}`)
517
505
  });
518
506
  if (e === "SIGNATURE") return /* @__PURE__ */ c("div", {
519
507
  class: "IncodeFlow",
520
508
  children: /* @__PURE__ */ c(a, {
521
509
  config: t,
522
- onFinish: () => g.completeModule(),
510
+ onFinish: () => _.completeModule(),
523
511
  onError: (e) => {
524
512
  l?.(e ?? "Signature capture error");
525
513
  }
526
- }, `signature-${m.currentStepIndex}`)
514
+ }, `signature-${h.currentStepIndex}`)
527
515
  });
528
516
  if (e === "EKYB") {
529
517
  let e = t;
@@ -537,32 +525,32 @@ var J = r(() => import("../homeScreen-CqWZqT00.js").then((e) => ({ default: e.Ho
537
525
  checkTaxId: e.checkTaxId,
538
526
  checkUniqueBeneficialOwner: e.checkUniqueBeneficialOwner
539
527
  },
540
- onFinish: () => g.completeModule(),
528
+ onFinish: () => _.completeModule(),
541
529
  onError: (e) => {
542
530
  l?.(e ?? "eKYB verification error");
543
531
  }
544
- }, `ekyb-${m.currentStepIndex}`)
532
+ }, `ekyb-${h.currentStepIndex}`)
545
533
  });
546
534
  }
547
535
  if (e === "COMBINED_CONSENT") return /* @__PURE__ */ c("div", {
548
536
  class: "IncodeFlow",
549
537
  children: /* @__PURE__ */ c(a, {
550
538
  config: t,
551
- onFinish: () => g.completeModule(),
539
+ onFinish: () => _.completeModule(),
552
540
  onError: (e) => {
553
541
  l?.(e ?? "Combined consent error");
554
542
  }
555
- }, `combined-consent-${m.currentStepIndex}`)
543
+ }, `combined-consent-${h.currentStepIndex}`)
556
544
  });
557
545
  if (e === "MANDATORY_CONSENT") return /* @__PURE__ */ c("div", {
558
546
  class: "IncodeFlow",
559
547
  children: /* @__PURE__ */ c(a, {
560
548
  config: t,
561
- onFinish: () => g.completeModule(),
549
+ onFinish: () => _.completeModule(),
562
550
  onError: (e) => {
563
551
  l?.(e ?? "Mandatory consent error");
564
552
  }
565
- }, `mandatory-consent-${m.currentStepIndex}`)
553
+ }, `mandatory-consent-${h.currentStepIndex}`)
566
554
  });
567
555
  if (e === "AE_SIGNATURE" || e === "QE_SIGNATURE") {
568
556
  let n = t, r = e === "QE_SIGNATURE" ? "qe" : "ae";
@@ -573,68 +561,68 @@ var J = r(() => import("../homeScreen-CqWZqT00.js").then((e) => ({ default: e.Ho
573
561
  uploadDocument: n.uploadDocument,
574
562
  downloadDocument: n.downloadDocument
575
563
  },
576
- onFinish: () => g.completeModule(),
564
+ onFinish: () => _.completeModule(),
577
565
  onError: (e) => {
578
566
  l?.(e ?? `${r.toUpperCase()} Signature error`);
579
567
  }
580
- }, `${r}-signature-${m.currentStepIndex}`)
568
+ }, `${r}-signature-${h.currentStepIndex}`)
581
569
  });
582
570
  }
583
571
  if (e === "ANTIFRAUD") return /* @__PURE__ */ c("div", {
584
572
  class: "IncodeFlow",
585
573
  children: /* @__PURE__ */ c(a, {
586
- onFinish: () => g.completeModule(),
574
+ onFinish: () => _.completeModule(),
587
575
  onError: (e) => {
588
576
  l?.(e ?? "Antifraud check error");
589
577
  }
590
- }, `antifraud-${m.currentStepIndex}`)
578
+ }, `antifraud-${h.currentStepIndex}`)
591
579
  });
592
580
  if (e === "CUSTOM_FIELDS") return /* @__PURE__ */ c("div", {
593
581
  class: "IncodeFlow",
594
582
  children: /* @__PURE__ */ c(a, {
595
583
  config: t,
596
- onFinish: () => g.completeModule(),
584
+ onFinish: () => _.completeModule(),
597
585
  onError: (e) => {
598
586
  l?.(e ?? "Custom fields error");
599
587
  }
600
- }, `custom-fields-${m.currentStepIndex}`)
588
+ }, `custom-fields-${h.currentStepIndex}`)
601
589
  });
602
590
  if (e === "WATCHLIST") return /* @__PURE__ */ c("div", {
603
591
  class: "IncodeFlow",
604
592
  children: /* @__PURE__ */ c(a, {
605
- onFinish: () => g.completeModule(),
593
+ onFinish: () => _.completeModule(),
606
594
  onError: (e) => {
607
595
  l?.(e ?? "Watchlist check error");
608
596
  }
609
- }, `watchlist-${m.currentStepIndex}`)
597
+ }, `watchlist-${h.currentStepIndex}`)
610
598
  });
611
599
  if (e === "WATCHLIST_BUSINESS") return /* @__PURE__ */ c("div", {
612
600
  class: "IncodeFlow",
613
601
  children: /* @__PURE__ */ c(a, {
614
- onFinish: () => g.completeModule(),
602
+ onFinish: () => _.completeModule(),
615
603
  onError: (e) => {
616
604
  l?.(e ?? "Watchlist for business check error");
617
605
  }
618
- }, `watchlist-for-business-${m.currentStepIndex}`)
606
+ }, `watchlist-for-business-${h.currentStepIndex}`)
619
607
  });
620
608
  if (e === "INCODE_WATCHLIST") return /* @__PURE__ */ c("div", {
621
609
  class: "IncodeFlow",
622
610
  children: /* @__PURE__ */ c(a, {
623
611
  config: t,
624
- onFinish: () => g.completeModule(),
612
+ onFinish: () => _.completeModule(),
625
613
  onError: (e) => {
626
614
  l?.(e ?? "Custom watchlist check error");
627
615
  }
628
- }, `incode-watchlist-${m.currentStepIndex}`)
616
+ }, `incode-watchlist-${h.currentStepIndex}`)
629
617
  });
630
618
  if (e === "CROSS_DOCUMENT_DATA_MATCH") return /* @__PURE__ */ c("div", {
631
619
  class: "IncodeFlow",
632
620
  children: /* @__PURE__ */ c(a, {
633
- onFinish: () => g.completeModule(),
621
+ onFinish: () => _.completeModule(),
634
622
  onError: (e) => {
635
623
  l?.(e ?? "Cross document data match error");
636
624
  }
637
- }, `cross-document-data-match-${m.currentStepIndex}`)
625
+ }, `cross-document-data-match-${h.currentStepIndex}`)
638
626
  });
639
627
  if (e === "DYNAMIC_FORMS") return /* @__PURE__ */ c("div", {
640
628
  class: "IncodeFlow",
@@ -652,19 +640,19 @@ var J = r(() => import("../homeScreen-CqWZqT00.js").then((e) => ({ default: e.Ho
652
640
  options: e.options
653
641
  }))
654
642
  })) },
655
- onFinish: () => g.completeModule(),
643
+ onFinish: () => _.completeModule(),
656
644
  onError: (e) => {
657
645
  l?.(e ?? "Dynamic forms error");
658
646
  }
659
- }, `dynamic-forms-${m.currentStepIndex}`)
647
+ }, `dynamic-forms-${h.currentStepIndex}`)
660
648
  });
661
649
  }
662
650
  return null;
663
- }, X = ({ config: e, onFinish: t = () => {}, onError: n }) => /* @__PURE__ */ c(d, { children: e ? /* @__PURE__ */ c(Y, {
651
+ }, J = ({ config: e, onFinish: t = () => {}, onError: n }) => /* @__PURE__ */ c(d, { children: e ? /* @__PURE__ */ c(q, {
664
652
  config: e,
665
653
  onFinish: t,
666
654
  onError: n
667
655
  }) : null });
668
- p(X, "incode-flow");
656
+ p(J, "incode-flow");
669
657
  //#endregion
670
- export { X as IncodeFlow, H as preloadIncodeFlow };
658
+ export { J as IncodeFlow, B as preloadIncodeFlow };