@incodetech/web 0.0.0-dev-20260428-b98ce65 → 0.0.0-dev-20260428-a6473dd

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