@vpdev2/metakyc 1.0.80 → 1.0.82

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/index.js CHANGED
@@ -238,7 +238,7 @@ class rr {
238
238
  }
239
239
  response(t, a, r, n, o) {
240
240
  if (!this.shouldLog("debug")) return;
241
- const l = r >= 200 && r < 300, c = [
241
+ const l = r >= 200 && r < 300, d = [
242
242
  `%c[MetaKYC]%c ←%c ${r}%c ${t} ${a.split("/").pop()} %c(${n}ms)`,
243
243
  xe.prefix,
244
244
  xe.arrow,
@@ -246,7 +246,7 @@ class rr {
246
246
  xe.dim,
247
247
  xe.timing
248
248
  ];
249
- o && this.shouldLog("debug") ? (console.groupCollapsed(...c), console.log("%cResponse:", xe.dim, o), console.groupEnd()) : console.log(...c);
249
+ o && this.shouldLog("debug") ? (console.groupCollapsed(...d), console.log("%cResponse:", xe.dim, o), console.groupEnd()) : console.log(...d);
250
250
  }
251
251
  error(t, a, r, n) {
252
252
  this.shouldLog("error") && (console.log(
@@ -283,19 +283,19 @@ function Ht(e) {
283
283
  return a;
284
284
  }
285
285
  async function nr(e, t) {
286
- const a = crypto.getRandomValues(new Uint8Array(ar)), r = new TextEncoder().encode(t), n = await crypto.subtle.importKey("raw", e, { name: "AES-CBC" }, !1, ["encrypt"]), o = await crypto.subtle.encrypt({ name: "AES-CBC", iv: a }, n, r), l = new Uint8Array(o), c = await crypto.subtle.importKey("raw", e, { name: "HMAC", hash: "SHA-256" }, !1, ["sign"]), u = new Uint8Array(a.length + l.length);
286
+ const a = crypto.getRandomValues(new Uint8Array(ar)), r = new TextEncoder().encode(t), n = await crypto.subtle.importKey("raw", e, { name: "AES-CBC" }, !1, ["encrypt"]), o = await crypto.subtle.encrypt({ name: "AES-CBC", iv: a }, n, r), l = new Uint8Array(o), d = await crypto.subtle.importKey("raw", e, { name: "HMAC", hash: "SHA-256" }, !1, ["sign"]), u = new Uint8Array(a.length + l.length);
287
287
  u.set(a, 0), u.set(l, a.length);
288
- const p = new Uint8Array(await crypto.subtle.sign("HMAC", c, u)), f = new Uint8Array(l.length + p.length);
289
- return f.set(l, 0), f.set(p, l.length), {
288
+ const m = new Uint8Array(await crypto.subtle.sign("HMAC", d, u)), g = new Uint8Array(l.length + m.length);
289
+ return g.set(l, 0), g.set(m, l.length), {
290
290
  iv: ai(a.buffer),
291
- data: ai(f.buffer)
291
+ data: ai(g.buffer)
292
292
  };
293
293
  }
294
294
  async function or(e, t) {
295
- const a = Ht(t.iv), r = Ht(t.data), n = r.slice(0, r.length - ri), o = r.slice(r.length - ri), l = await crypto.subtle.importKey("raw", e, { name: "HMAC", hash: "SHA-256" }, !1, ["verify"]), c = new Uint8Array(a.length + n.length);
296
- if (c.set(a, 0), c.set(n, a.length), !await crypto.subtle.verify("HMAC", l, o, c)) throw new Error("HMAC verification failed — payload may have been tampered with");
297
- const p = await crypto.subtle.importKey("raw", e, { name: "AES-CBC" }, !1, ["decrypt"]), f = await crypto.subtle.decrypt({ name: "AES-CBC", iv: a.buffer }, p, n);
298
- return new TextDecoder().decode(f);
295
+ const a = Ht(t.iv), r = Ht(t.data), n = r.slice(0, r.length - ri), o = r.slice(r.length - ri), l = await crypto.subtle.importKey("raw", e, { name: "HMAC", hash: "SHA-256" }, !1, ["verify"]), d = new Uint8Array(a.length + n.length);
296
+ if (d.set(a, 0), d.set(n, a.length), !await crypto.subtle.verify("HMAC", l, o, d)) throw new Error("HMAC verification failed — payload may have been tampered with");
297
+ const m = await crypto.subtle.importKey("raw", e, { name: "AES-CBC" }, !1, ["decrypt"]), g = await crypto.subtle.decrypt({ name: "AES-CBC", iv: a.buffer }, m, n);
298
+ return new TextDecoder().decode(g);
299
299
  }
300
300
  const ni = 200;
301
301
  class sr {
@@ -357,18 +357,18 @@ class sr {
357
357
  const n = this.buildEndpoint(t, a), o = this.dedupKey(n, r), l = this.inflightGets.get(o);
358
358
  if (l && Date.now() - l.timestamp < ni)
359
359
  return _.debug(`Dedup → reusing in-flight GET ${a}`), l.promise;
360
- const c = performance.now();
360
+ const d = performance.now();
361
361
  _.request("GET", n, r);
362
362
  const u = (async () => {
363
- var p;
363
+ var m;
364
364
  try {
365
- const f = await this.axiosInstance.get(n, {
365
+ const g = await this.axiosInstance.get(n, {
366
366
  params: r
367
- }), y = Math.round(performance.now() - c);
368
- return _.response("GET", n, f.status, y, (p = f.data) == null ? void 0 : p.result), this.handleResponse(f);
369
- } catch (f) {
370
- const y = Math.round(performance.now() - c);
371
- throw _.error("GET", n, f, y), Tt.handleAxiosError(f);
367
+ }), y = Math.round(performance.now() - d);
368
+ return _.response("GET", n, g.status, y, (m = g.data) == null ? void 0 : m.result), this.handleResponse(g);
369
+ } catch (g) {
370
+ const y = Math.round(performance.now() - d);
371
+ throw _.error("GET", n, g, y), Tt.handleAxiosError(g);
372
372
  } finally {
373
373
  setTimeout(() => this.inflightGets.delete(o), ni);
374
374
  }
@@ -380,11 +380,11 @@ class sr {
380
380
  const n = this.buildEndpoint(t, a), o = performance.now();
381
381
  _.request("POST", n, r);
382
382
  try {
383
- const c = await this.axiosInstance.post(n, r), u = Math.round(performance.now() - o);
384
- return _.response("POST", n, c.status, u, (l = c.data) == null ? void 0 : l.result), this.handleResponse(c);
385
- } catch (c) {
383
+ const d = await this.axiosInstance.post(n, r), u = Math.round(performance.now() - o);
384
+ return _.response("POST", n, d.status, u, (l = d.data) == null ? void 0 : l.result), this.handleResponse(d);
385
+ } catch (d) {
386
386
  const u = Math.round(performance.now() - o);
387
- throw _.error("POST", n, c, u), Tt.handleAxiosError(c);
387
+ throw _.error("POST", n, d, u), Tt.handleAxiosError(d);
388
388
  }
389
389
  }
390
390
  async put(t, a, r) {
@@ -392,11 +392,11 @@ class sr {
392
392
  const n = this.buildEndpoint(t, a), o = performance.now();
393
393
  _.request("PUT", n, r);
394
394
  try {
395
- const c = await this.axiosInstance.put(n, r), u = Math.round(performance.now() - o);
396
- return _.response("PUT", n, c.status, u, (l = c.data) == null ? void 0 : l.result), this.handleResponse(c);
397
- } catch (c) {
395
+ const d = await this.axiosInstance.put(n, r), u = Math.round(performance.now() - o);
396
+ return _.response("PUT", n, d.status, u, (l = d.data) == null ? void 0 : l.result), this.handleResponse(d);
397
+ } catch (d) {
398
398
  const u = Math.round(performance.now() - o);
399
- throw _.error("PUT", n, c, u), Tt.handleAxiosError(c);
399
+ throw _.error("PUT", n, d, u), Tt.handleAxiosError(d);
400
400
  }
401
401
  }
402
402
  async delete(t, a, r) {
@@ -404,13 +404,13 @@ class sr {
404
404
  const n = this.buildEndpoint(t, a), o = performance.now();
405
405
  _.request("DELETE", n, r);
406
406
  try {
407
- const c = await this.axiosInstance.delete(n, {
407
+ const d = await this.axiosInstance.delete(n, {
408
408
  params: r
409
409
  }), u = Math.round(performance.now() - o);
410
- return _.response("DELETE", n, c.status, u, (l = c.data) == null ? void 0 : l.result), this.handleResponse(c);
411
- } catch (c) {
410
+ return _.response("DELETE", n, d.status, u, (l = d.data) == null ? void 0 : l.result), this.handleResponse(d);
411
+ } catch (d) {
412
412
  const u = Math.round(performance.now() - o);
413
- throw _.error("DELETE", n, c, u), Tt.handleAxiosError(c);
413
+ throw _.error("DELETE", n, d, u), Tt.handleAxiosError(d);
414
414
  }
415
415
  }
416
416
  handleResponse(t) {
@@ -428,23 +428,23 @@ class sr {
428
428
  }
429
429
  class Tn {
430
430
  static async createToken(t) {
431
- const { baseUrl: a, apiKey: r, secretKey: n, tenantId: o, clientId: l, externalRefId: c, workflowKey: u, email: p, isCompany: f, tenantClientId: y, applicant: x } = t, A = t.enableEncryption !== !1;
431
+ const { baseUrl: a, apiKey: r, secretKey: n, tenantId: o, clientId: l, externalRefId: d, workflowKey: u, email: m, isCompany: g, tenantClientId: y, applicant: x } = t, A = t.enableEncryption !== !1;
432
432
  if (!o && !l)
433
433
  throw new Error("Either tenantId or clientId must be provided.");
434
- if (!c)
434
+ if (!d)
435
435
  throw new Error("externalRefId is required. Pass your user's unique ID.");
436
436
  if (!u)
437
437
  throw new Error("workflowKey is required. Pass the workflow key for this KYC session.");
438
- if (!p)
438
+ if (!m)
439
439
  throw new Error("email is required. Pass the applicant's email address.");
440
440
  const S = {
441
441
  apiKey: r,
442
442
  secretKey: n,
443
- externalRefId: c,
443
+ externalRefId: d,
444
444
  workflowKey: u,
445
- email: p
445
+ email: m
446
446
  };
447
- o != null && (S.tenantId = o), l && (S.clientId = l), f != null && (S.isCompany = f), y != null && (S.tenantClientId = y), x && (S.applicant = x), A && (S.sdkPublicKey = "1");
447
+ o != null && (S.tenantId = o), l && (S.clientId = l), g != null && (S.isCompany = g), y != null && (S.tenantClientId = y), x && (S.applicant = x), A && (S.sdkPublicKey = "1");
448
448
  const N = (await Si.post(
449
449
  `${a.replace(/\/+$/, "")}/api/SdkSession/CreateToken`,
450
450
  S,
@@ -1142,13 +1142,13 @@ class Sr {
1142
1142
  }), n.result.applicantFormVisibleFields && n.result.applicantFormVisibleFields.length > 0 && (o.applicantFormVisibleFields = n.result.applicantFormVisibleFields), n.result.applicantFormRequiredFields && n.result.applicantFormRequiredFields.length > 0 && (o.applicantFormRequiredFields = n.result.applicantFormRequiredFields), n.result.allowedLanguages && n.result.allowedLanguages.length > 0 && (o.allowedLanguages = n.result.allowedLanguages), n.result.applicantFormPages)
1143
1143
  try {
1144
1144
  const l = typeof n.result.applicantFormPages == "string" ? JSON.parse(n.result.applicantFormPages) : n.result.applicantFormPages;
1145
- Array.isArray(l) && l.length > 0 && (o.applicantFormPages = l.map((c) => {
1146
- const u = !c._v || c._v < 4;
1145
+ Array.isArray(l) && l.length > 0 && (o.applicantFormPages = l.map((d) => {
1146
+ const u = !d._v || d._v < 4;
1147
1147
  return {
1148
- ...c,
1149
- fields: (c.fields || []).map((p) => ({
1150
- ...p,
1151
- colSpan: u ? p.colSpan === 1 ? 2 : 4 : Math.min(4, Math.max(1, p.colSpan ?? 4))
1148
+ ...d,
1149
+ fields: (d.fields || []).map((m) => ({
1150
+ ...m,
1151
+ colSpan: u ? m.colSpan === 1 ? 2 : 4 : Math.min(4, Math.max(1, m.colSpan ?? 4))
1152
1152
  }))
1153
1153
  };
1154
1154
  }));
@@ -1163,13 +1163,13 @@ class Sr {
1163
1163
  if (n.result.reviewPageDisabled && (o.reviewPageDisabled = !0), n.result.fieldLabelMode === "placeholder" && (o.fieldLabelMode = "placeholder"), n.result.companyFormVisibleFields && n.result.companyFormVisibleFields.length > 0 && (o.companyFormVisibleFields = n.result.companyFormVisibleFields), n.result.companyFormRequiredFields && n.result.companyFormRequiredFields.length > 0 && (o.companyFormRequiredFields = n.result.companyFormRequiredFields), n.result.companyFormPages)
1164
1164
  try {
1165
1165
  const l = typeof n.result.companyFormPages == "string" ? JSON.parse(n.result.companyFormPages) : n.result.companyFormPages;
1166
- Array.isArray(l) && l.length > 0 && (o.companyFormPages = l.map((c) => {
1167
- const u = !c._v || c._v < 4;
1166
+ Array.isArray(l) && l.length > 0 && (o.companyFormPages = l.map((d) => {
1167
+ const u = !d._v || d._v < 4;
1168
1168
  return {
1169
- ...c,
1170
- fields: (c.fields || []).map((p) => ({
1171
- ...p,
1172
- colSpan: u ? p.colSpan === 1 ? 2 : 4 : Math.min(4, Math.max(1, p.colSpan ?? 4))
1169
+ ...d,
1170
+ fields: (d.fields || []).map((m) => ({
1171
+ ...m,
1172
+ colSpan: u ? m.colSpan === 1 ? 2 : 4 : Math.min(4, Math.max(1, m.colSpan ?? 4))
1173
1173
  }))
1174
1174
  };
1175
1175
  }));
@@ -1464,7 +1464,7 @@ class Rr {
1464
1464
  }
1465
1465
  }
1466
1466
  class Ar {
1467
- constructor(t, a, r, n, o, l, c, u) {
1467
+ constructor(t, a, r, n, o, l, d, u) {
1468
1468
  be(this, "state");
1469
1469
  be(this, "stepRouter");
1470
1470
  this.applicantService = t, this.questionnaireService = a, this.uploadDocumentService = r, this.appropriatenessTestService = n, this.overviewService = o, this.riskScoringService = l, this.investorCategorizationService = u, this.state = new Nr(), this.stepRouter = new Rr(), this.registerStepHandlers();
@@ -1634,7 +1634,7 @@ function it(e, t) {
1634
1634
  }
1635
1635
  }
1636
1636
  function zr() {
1637
- const e = it("--metakyc-primary", "#2563eb"), t = it("--metakyc-primary-hover", "#1d4ed8"), a = it("--metakyc-background", "#ffffff"), r = it("--metakyc-surface", "#f9fafb"), n = it("--metakyc-text-primary", "#111827"), o = it("--metakyc-text-secondary", "#6b7280"), l = it("--metakyc-text-muted", "#9ca3af"), c = it("--metakyc-border", "#e5e7eb");
1637
+ const e = it("--metakyc-primary", "#2563eb"), t = it("--metakyc-primary-hover", "#1d4ed8"), a = it("--metakyc-background", "#ffffff"), r = it("--metakyc-surface", "#f9fafb"), n = it("--metakyc-text-primary", "#111827"), o = it("--metakyc-text-secondary", "#6b7280"), l = it("--metakyc-text-muted", "#9ca3af"), d = it("--metakyc-border", "#e5e7eb");
1638
1638
  return `
1639
1639
  body, html { font-family: ${it(
1640
1640
  "--metakyc-font-family",
@@ -1643,17 +1643,17 @@ body, html { font-family: ${it(
1643
1643
  p, span, label, div { color: ${n}; }
1644
1644
  h1, h2, h3, h4 { color: ${n}; }
1645
1645
  .step-desc { color: ${o}; }
1646
- section.content { background-color: ${r}; color: ${n}; padding: 32px 32px 16px; box-shadow: none; border-radius: 10px; border: 1px solid ${c}; }
1647
- input { color: ${n}; font-weight: 500; outline: none; background-color: ${a}; border: 1px solid ${c}; border-radius: 6px; }
1646
+ section.content { background-color: ${r}; color: ${n}; padding: 32px 32px 16px; box-shadow: none; border-radius: 10px; border: 1px solid ${d}; }
1647
+ input { color: ${n}; font-weight: 500; outline: none; background-color: ${a}; border: 1px solid ${d}; border-radius: 6px; }
1648
1648
  input:focus { border-color: ${e}; box-shadow: 0 0 0 2px ${e}33; }
1649
1649
  button.submit, button.back { border-radius: 8px; height: 44px; padding: 0 24px; font-size: 14px; font-weight: 600; background-image: none !important; transform: none !important; box-shadow: none !important; transition: all 0.15s ease; cursor: pointer; }
1650
1650
  button.submit { min-width: 120px; background: none; background-color: ${e}; color: #ffffff; border: none; }
1651
1651
  button.submit:hover { background-color: ${t}; }
1652
- button.back { background: none; background-color: ${a}; border: 1px solid ${c}; color: ${n}; }
1652
+ button.back { background: none; background-color: ${a}; border: 1px solid ${d}; color: ${n}; }
1653
1653
  button.back:hover { background-color: ${r}; }
1654
1654
  .round-icon { background-color: ${e} !important; background-image: none !important; }
1655
- .upload-item, .document-status { border-color: ${c} !important; }
1656
- select { background-color: ${a}; color: ${n}; border: 1px solid ${c}; border-radius: 6px; }
1655
+ .upload-item, .document-status { border-color: ${d} !important; }
1656
+ select { background-color: ${a}; color: ${n}; border: 1px solid ${d}; border-radius: 6px; }
1657
1657
  .description { color: ${o}; }
1658
1658
  .subtitle { color: ${l}; }
1659
1659
  a { color: ${e}; }
@@ -1858,14 +1858,14 @@ class Dr {
1858
1858
  // Default false
1859
1859
  region: this.config.region,
1860
1860
  // Callback for device response (deprecated but kept for compatibility)
1861
- onDeviceResponse: (c) => {
1862
- console.log(`[SardinAI] Device ID: ${c.deviceId}`);
1861
+ onDeviceResponse: (d) => {
1862
+ console.log(`[SardinAI] Device ID: ${d.deviceId}`);
1863
1863
  },
1864
1864
  // New callback for session updates
1865
- onConfigUpdate: (c, u, p) => {
1866
- switch (c) {
1865
+ onConfigUpdate: (d, u, m) => {
1866
+ switch (d) {
1867
1867
  case "SESSION_UPDATE_FAILED":
1868
- console.error("[SardinAI] Session update failed:", p);
1868
+ console.error("[SardinAI] Session update failed:", m);
1869
1869
  break;
1870
1870
  case "SESSION_UPDATED":
1871
1871
  console.log("[SardinAI] Session updated:", u);
@@ -1874,7 +1874,7 @@ class Dr {
1874
1874
  console.log("[SardinAI] No session update");
1875
1875
  break;
1876
1876
  default:
1877
- console.warn("[SardinAI] Unknown event:", c);
1877
+ console.warn("[SardinAI] Unknown event:", d);
1878
1878
  }
1879
1879
  }
1880
1880
  }), this.addNoScriptFallback(t), console.log("[SardinAI] SDK initialized with sessionKey:", this.sessionKey);
@@ -1967,15 +1967,15 @@ class ct {
1967
1967
  token: a.token || a.sdkToken
1968
1968
  };
1969
1969
  case Ge.SardinAI:
1970
- const c = ((o = r == null ? void 0 : r.identityProviders) == null ? void 0 : o.sardinai) || {};
1970
+ const d = ((o = r == null ? void 0 : r.identityProviders) == null ? void 0 : o.sardinai) || {};
1971
1971
  return {
1972
- clientId: c.clientId || a.clientId,
1973
- sessionKey: c.sessionKey || a.sessionKey,
1974
- environment: c.environment || a.environment || "production",
1975
- flow: c.flow || a.flow,
1976
- region: c.region,
1977
- enableBiometrics: c.enableBiometrics,
1978
- enablePortScanning: c.enablePortScanning
1972
+ clientId: d.clientId || a.clientId,
1973
+ sessionKey: d.sessionKey || a.sessionKey,
1974
+ environment: d.environment || a.environment || "production",
1975
+ flow: d.flow || a.flow,
1976
+ region: d.region,
1977
+ enableBiometrics: d.enableBiometrics,
1978
+ enablePortScanning: d.enablePortScanning
1979
1979
  };
1980
1980
  default:
1981
1981
  throw new Error(`Unsupported identity provider: ${t}`);
@@ -2000,7 +2000,7 @@ class Pr {
2000
2000
  * Scoping to .metakyc-sdk means host-app variables can never interfere.
2001
2001
  */
2002
2002
  injectThemeCSS() {
2003
- var c;
2003
+ var d;
2004
2004
  this.themeStyleElement && this.themeStyleElement.remove();
2005
2005
  const t = this.currentTheme.colors, a = this.currentTheme.typography, r = this.currentTheme.spacing, n = {
2006
2006
  primary: t.primary,
@@ -2030,19 +2030,19 @@ class Pr {
2030
2030
  "warning-bg": t.warningBg,
2031
2031
  "info-bg": t.infoBg
2032
2032
  };
2033
- a != null && a.fontFamily && (n["font-family"] = a.fontFamily), a != null && a.headingFont && (n["heading-font"] = a.headingFont), a != null && a.fontSize && Object.entries(a.fontSize).forEach(([u, p]) => {
2034
- n[`font-size-${u}`] = p;
2035
- }), a != null && a.fontWeight && Object.entries(a.fontWeight).forEach(([u, p]) => {
2036
- n[`font-weight-${u}`] = String(p);
2037
- }), r && Object.entries(r).forEach(([u, p]) => {
2038
- n[this.kebabCase(u)] = p;
2033
+ a != null && a.fontFamily && (n["font-family"] = a.fontFamily), a != null && a.headingFont && (n["heading-font"] = a.headingFont), a != null && a.fontSize && Object.entries(a.fontSize).forEach(([u, m]) => {
2034
+ n[`font-size-${u}`] = m;
2035
+ }), a != null && a.fontWeight && Object.entries(a.fontWeight).forEach(([u, m]) => {
2036
+ n[`font-weight-${u}`] = String(m);
2037
+ }), r && Object.entries(r).forEach(([u, m]) => {
2038
+ n[this.kebabCase(u)] = m;
2039
2039
  });
2040
2040
  const l = `
2041
2041
  /* ── metakyc-theme-vars: scoped CSS variables ──────────────────────────────── */
2042
2042
  .metakyc-sdk,
2043
2043
  .metakyc-searchable-select-dropdown,
2044
2044
  .metakyc-multiselect-dropdown {
2045
- ${Object.entries(n).filter(([, u]) => !!u).map(([u, p]) => ` --metakyc-${u}: ${p} !important;`).join(`
2045
+ ${Object.entries(n).filter(([, u]) => !!u).map(([u, m]) => ` --metakyc-${u}: ${m} !important;`).join(`
2046
2046
  `)}
2047
2047
  }
2048
2048
 
@@ -2091,7 +2091,7 @@ ${Object.entries(n).filter(([, u]) => !!u).map(([u, p]) => ` --metakyc-${u}: ${
2091
2091
  border-color: var(--metakyc-input-border, var(--metakyc-border, #d1d5db)) !important;
2092
2092
  }
2093
2093
  `;
2094
- this.themeStyleElement = document.createElement("style"), this.themeStyleElement.id = "metakyc-theme-vars", this.themeStyleElement.textContent = l, (c = this.customStyleElement) != null && c.parentNode ? document.head.insertBefore(this.themeStyleElement, this.customStyleElement) : document.head.appendChild(this.themeStyleElement);
2094
+ this.themeStyleElement = document.createElement("style"), this.themeStyleElement.id = "metakyc-theme-vars", this.themeStyleElement.textContent = l, (d = this.customStyleElement) != null && d.parentNode ? document.head.insertBefore(this.themeStyleElement, this.customStyleElement) : document.head.appendChild(this.themeStyleElement);
2095
2095
  }
2096
2096
  /**
2097
2097
  * Inject custom CSS into document
@@ -7155,7 +7155,7 @@ function ie(e, t) {
7155
7155
  const r = Jr.exec(a);
7156
7156
  return r ? t(r[1]) : e;
7157
7157
  }
7158
- const Yt = "1.0.80", Ri = Gt(null), di = `metakyc-translations-${Yt}-`, ea = ({
7158
+ const Yt = "1.0.82", Ri = Gt(null), di = `metakyc-translations-${Yt}-`, ea = ({
7159
7159
  locale: e,
7160
7160
  fetchTranslations: t,
7161
7161
  children: a
@@ -7164,8 +7164,8 @@ const Yt = "1.0.80", Ri = Gt(null), di = `metakyc-translations-${Yt}-`, ea = ({
7164
7164
  const u = $t(r);
7165
7165
  if (typeof window > "u") return u;
7166
7166
  try {
7167
- const p = localStorage.getItem(di + r);
7168
- if (p) return si(u, JSON.parse(p));
7167
+ const m = localStorage.getItem(di + r);
7168
+ if (m) return si(u, JSON.parse(m));
7169
7169
  } catch {
7170
7170
  }
7171
7171
  return u;
@@ -7175,31 +7175,31 @@ const Yt = "1.0.80", Ri = Gt(null), di = `metakyc-translations-${Yt}-`, ea = ({
7175
7175
  }, [n]), fe(() => {
7176
7176
  if (!t) return;
7177
7177
  let u = !1;
7178
- return t(r).then((p) => {
7178
+ return t(r).then((m) => {
7179
7179
  if (u) return;
7180
- if (!p || Object.keys(p).length === 0) {
7180
+ if (!m || Object.keys(m).length === 0) {
7181
7181
  _.debug(`No remote translation overrides for locale: ${r}`);
7182
7182
  return;
7183
7183
  }
7184
7184
  _.debug(`Remote translation overrides loaded for locale: ${r}`);
7185
- const f = $t(r), y = si(f, p);
7185
+ const g = $t(r), y = si(g, m);
7186
7186
  l(y);
7187
7187
  try {
7188
- localStorage.setItem(di + r, JSON.stringify(p));
7188
+ localStorage.setItem(di + r, JSON.stringify(m));
7189
7189
  } catch {
7190
7190
  }
7191
- }).catch((p) => {
7192
- _.warn(`Failed to fetch remote translations: ${p}`);
7191
+ }).catch((m) => {
7192
+ _.warn(`Failed to fetch remote translations: ${m}`);
7193
7193
  }), () => {
7194
7194
  u = !0;
7195
7195
  };
7196
7196
  }, [r, t]);
7197
- const c = Ue(() => ({
7197
+ const d = Ue(() => ({
7198
7198
  t: Ni(o),
7199
7199
  locale: r,
7200
7200
  dictionary: o
7201
7201
  }), [o, r]);
7202
- return /* @__PURE__ */ i(Ri.Provider, { value: c, children: a });
7202
+ return /* @__PURE__ */ i(Ri.Provider, { value: d, children: a });
7203
7203
  };
7204
7204
  function Ie() {
7205
7205
  const e = Qt(Ri);
@@ -7222,7 +7222,7 @@ function ia() {
7222
7222
  }
7223
7223
  const mi = "metakyc-theme-cache", An = ({ config: e, children: t }) => {
7224
7224
  ia();
7225
- const [a, r] = T(null), [n, o] = T(e.locale || "en"), l = ye.useRef(!1), c = ye.useRef(!1), u = Ue(() => {
7225
+ const [a, r] = T(null), [n, o] = T(e.locale || "en"), l = ye.useRef(!1), d = ye.useRef(!1), u = Ue(() => {
7226
7226
  _.setLevel(e.debug ?? e.logLevel ?? "none"), _.info(`SDK v${Yt} initializing — baseUrl=${e.baseUrl}`);
7227
7227
  const x = new sr(e), A = new lr(x), S = new cr(x), B = new dr(x), N = new ur(x), U = new mr(x), K = new pr(x), O = new gr(x), M = new fr(x), Y = new yr(x), G = new Sr(x), Q = new Cr(x), v = new Pr();
7228
7228
  if (typeof document < "u")
@@ -7250,9 +7250,9 @@ const mi = "metakyc-theme-cache", An = ({ config: e, children: t }) => {
7250
7250
  translationService: Q,
7251
7251
  themeManager: v
7252
7252
  };
7253
- }, [e]), p = ee((x) => {
7253
+ }, [e]), m = ee((x) => {
7254
7254
  o(x.toLowerCase().split(/[-_]/)[0]);
7255
- }, []), f = Ue(() => ({
7255
+ }, []), g = Ue(() => ({
7256
7256
  config: e,
7257
7257
  ...u,
7258
7258
  currentTheme: a,
@@ -7267,29 +7267,29 @@ const mi = "metakyc-theme-cache", An = ({ config: e, children: t }) => {
7267
7267
  u.investorCategorizationService
7268
7268
  ),
7269
7269
  locale: n,
7270
- setLocale: p
7271
- }), [e, u, a, n, p]);
7270
+ setLocale: m
7271
+ }), [e, u, a, n, m]);
7272
7272
  fe(() => ((async () => {
7273
- if (l.current || c.current) {
7273
+ if (l.current || d.current) {
7274
7274
  _.debug("Theme already loading or loaded, skipping");
7275
7275
  return;
7276
7276
  }
7277
7277
  l.current = !0;
7278
7278
  try {
7279
7279
  if (e.theme) {
7280
- _.debug("Applying static theme from config"), u.themeManager.applyTheme(e.theme), r(u.themeManager.getCurrentTheme()), c.current = !0;
7280
+ _.debug("Applying static theme from config"), u.themeManager.applyTheme(e.theme), r(u.themeManager.getCurrentTheme()), d.current = !0;
7281
7281
  return;
7282
7282
  }
7283
7283
  _.debug("Fetching theme from backend...");
7284
7284
  const A = await u.themeService.getThemeConfiguration(e.configVersion);
7285
- u.themeManager.applyTheme(A), r(u.themeManager.getCurrentTheme()), c.current = !0;
7285
+ u.themeManager.applyTheme(A), r(u.themeManager.getCurrentTheme()), d.current = !0;
7286
7286
  try {
7287
7287
  localStorage.setItem(mi, JSON.stringify(A));
7288
7288
  } catch {
7289
7289
  }
7290
7290
  _.info("Theme loaded and applied");
7291
7291
  } catch {
7292
- _.warn("Failed to load theme, using default"), r(u.themeManager.getCurrentTheme()), c.current = !0;
7292
+ _.warn("Failed to load theme, using default"), r(u.themeManager.getCurrentTheme()), d.current = !0;
7293
7293
  } finally {
7294
7294
  l.current = !1;
7295
7295
  }
@@ -7300,7 +7300,7 @@ const mi = "metakyc-theme-cache", An = ({ config: e, children: t }) => {
7300
7300
  (x) => u.translationService.getTranslations(x),
7301
7301
  [u.translationService]
7302
7302
  );
7303
- return /* @__PURE__ */ i(Ai.Provider, { value: f, children: /* @__PURE__ */ s(
7303
+ return /* @__PURE__ */ i(Ai.Provider, { value: g, children: /* @__PURE__ */ s(
7304
7304
  ea,
7305
7305
  {
7306
7306
  locale: n,
@@ -7410,49 +7410,49 @@ function Mn() {
7410
7410
  aa(), oa();
7411
7411
  }
7412
7412
  function sa(e) {
7413
- const { createOrchestrator: t, config: a } = Se(), [r, n] = T(null), [o, l] = T(!1), [c, u] = T(null), p = pe(null), f = e || a.applicantId || void 0;
7413
+ const { createOrchestrator: t, config: a } = Se(), [r, n] = T(null), [o, l] = T(!1), [d, u] = T(null), m = pe(null), g = e || a.applicantId || void 0;
7414
7414
  fe(() => {
7415
- p.current || (p.current = t());
7415
+ m.current || (m.current = t());
7416
7416
  }, [t]), fe(() => {
7417
7417
  var M;
7418
- r && f && na({
7419
- applicantId: f,
7418
+ r && g && na({
7419
+ applicantId: g,
7420
7420
  currentStepOrder: (M = r.currentStep) == null ? void 0 : M.order,
7421
7421
  status: r.status,
7422
7422
  lastUpdated: (/* @__PURE__ */ new Date()).toISOString(),
7423
7423
  workflowKey: r.workFlowKey,
7424
7424
  nextWorkflowKey: r.nextWorkflowKey
7425
7425
  });
7426
- }, [r, f]);
7426
+ }, [r, g]);
7427
7427
  const y = pe(!1), x = pe(void 0), A = ee(async () => {
7428
- if (!(!f || !p.current)) {
7428
+ if (!(!g || !m.current)) {
7429
7429
  if (y.current) {
7430
7430
  _.debug("Workflow load already in progress, skipping");
7431
7431
  return;
7432
7432
  }
7433
7433
  y.current = !0, l(!0), u(null);
7434
7434
  try {
7435
- const M = await p.current.initialize(f);
7436
- n(M), x.current = f;
7435
+ const M = await m.current.initialize(g);
7436
+ n(M), x.current = g;
7437
7437
  } catch (M) {
7438
7438
  u(M);
7439
7439
  } finally {
7440
7440
  l(!1), y.current = !1;
7441
7441
  }
7442
7442
  }
7443
- }, [f]);
7443
+ }, [g]);
7444
7444
  fe(() => {
7445
- f && x.current !== f && A();
7446
- }, [f, A]);
7445
+ g && x.current !== g && A();
7446
+ }, [g, A]);
7447
7447
  const S = ee(async () => {
7448
- if (p.current) {
7448
+ if (m.current) {
7449
7449
  if (y.current) {
7450
7450
  _.debug("Workflow refresh already in progress, skipping");
7451
7451
  return;
7452
7452
  }
7453
7453
  y.current = !0, l(!0), u(null);
7454
7454
  try {
7455
- const M = await p.current.refreshProgress();
7455
+ const M = await m.current.refreshProgress();
7456
7456
  n(M);
7457
7457
  } catch (M) {
7458
7458
  u(M);
@@ -7461,10 +7461,10 @@ function sa(e) {
7461
7461
  }
7462
7462
  }
7463
7463
  }, []), B = ee(async () => {
7464
- if (p.current) {
7464
+ if (m.current) {
7465
7465
  l(!0), u(null);
7466
7466
  try {
7467
- const M = await p.current.moveToNextStep();
7467
+ const M = await m.current.moveToNextStep();
7468
7468
  n(M);
7469
7469
  } catch (M) {
7470
7470
  u(M);
@@ -7473,10 +7473,10 @@ function sa(e) {
7473
7473
  }
7474
7474
  }
7475
7475
  }, []), N = ee(async () => {
7476
- if (p.current) {
7476
+ if (m.current) {
7477
7477
  l(!0), u(null);
7478
7478
  try {
7479
- const M = await p.current.moveToPreviousStep();
7479
+ const M = await m.current.moveToPreviousStep();
7480
7480
  n(M);
7481
7481
  } catch (M) {
7482
7482
  u(M);
@@ -7485,11 +7485,11 @@ function sa(e) {
7485
7485
  }
7486
7486
  }
7487
7487
  }, []), U = ee(async (M) => {
7488
- if (p.current) {
7488
+ if (m.current) {
7489
7489
  l(!0), u(null);
7490
7490
  try {
7491
- await p.current.submitCurrentStep(M);
7492
- const Y = await p.current.refreshProgress();
7491
+ await m.current.submitCurrentStep(M);
7492
+ const Y = await m.current.refreshProgress();
7493
7493
  n(Y);
7494
7494
  } catch (Y) {
7495
7495
  throw u(Y), Y;
@@ -7500,7 +7500,7 @@ function sa(e) {
7500
7500
  }, []), K = ei.useMemo(() => r != null && r.stepInfoList ? [...r.stepInfoList].sort((M, Y) => M.order - Y.order) : [], [r == null ? void 0 : r.stepInfoList]), O = ei.useMemo(() => r ? r.nextWorkflowKey && r.nextWorkflowKey !== r.workFlowKey : !1, [r]);
7501
7501
  return {
7502
7502
  progress: r,
7503
- applicantId: f,
7503
+ applicantId: g,
7504
7504
  currentStep: (r == null ? void 0 : r.currentStep) || null,
7505
7505
  steps: K,
7506
7506
  status: (r == null ? void 0 : r.status) || qe.None,
@@ -7509,19 +7509,19 @@ function sa(e) {
7509
7509
  nextWorkflowKey: r == null ? void 0 : r.nextWorkflowKey,
7510
7510
  hasWorkflowChanged: O,
7511
7511
  isLoading: o,
7512
- error: c,
7512
+ error: d,
7513
7513
  isComplete: (r == null ? void 0 : r.status) === qe.Finished,
7514
7514
  isOnHold: (r == null ? void 0 : r.status) === qe.OnHold,
7515
7515
  refreshProgress: S,
7516
7516
  moveToNext: B,
7517
7517
  moveBack: N,
7518
7518
  submitCurrentStep: U,
7519
- orchestrator: p.current
7519
+ orchestrator: m.current
7520
7520
  };
7521
7521
  }
7522
7522
  function la(e) {
7523
7523
  var Y;
7524
- const { applicantService: t, config: a } = Se(), [r, n] = T(null), [o, l] = T(!0), [c, u] = T(null), [p, f] = T(), [y, x] = T(), A = pe(!1), S = ee(async () => {
7524
+ const { applicantService: t, config: a } = Se(), [r, n] = T(null), [o, l] = T(!0), [d, u] = T(null), [m, g] = T(), [y, x] = T(), A = pe(!1), S = ee(async () => {
7525
7525
  try {
7526
7526
  l(!0), u(null);
7527
7527
  const G = await t.getSdkState();
@@ -7536,16 +7536,16 @@ function la(e) {
7536
7536
  A.current || S();
7537
7537
  }, [S]);
7538
7538
  const B = ee((G) => {
7539
- _.info(`Transitioning to workflow → applicantId=${G}`), f(G), x("workflow");
7539
+ _.info(`Transitioning to workflow → applicantId=${G}`), g(G), x("workflow");
7540
7540
  }, []), N = ee((G) => {
7541
- _.info(`Switching applicant → newApplicantId=${G}`), f(G), x("workflow");
7542
- }, []), U = y || (r == null ? void 0 : r.phase) || "loading", K = p || (r == null ? void 0 : r.applicantId), O = e ?? (r == null ? void 0 : r.isCompany) ?? !1, M = (r == null ? void 0 : r.workflowKey) || ((Y = a.applicantForm) == null ? void 0 : Y.workflowKey);
7541
+ _.info(`Switching applicant → newApplicantId=${G}`), g(G), x("workflow");
7542
+ }, []), U = y || (r == null ? void 0 : r.phase) || "loading", K = m || (r == null ? void 0 : r.applicantId), O = e ?? (r == null ? void 0 : r.isCompany) ?? !1, M = (r == null ? void 0 : r.workflowKey) || ((Y = a.applicantForm) == null ? void 0 : Y.workflowKey);
7543
7543
  return {
7544
- phase: c ? "error" : o ? "loading" : U,
7544
+ phase: d ? "error" : o ? "loading" : U,
7545
7545
  applicantId: K,
7546
7546
  isCompany: O,
7547
7547
  workflowKey: M,
7548
- error: c || void 0,
7548
+ error: d || void 0,
7549
7549
  isLoading: o,
7550
7550
  transitionToWorkflow: B,
7551
7551
  switchApplicant: N,
@@ -7553,7 +7553,7 @@ function la(e) {
7553
7553
  };
7554
7554
  }
7555
7555
  function ca(e) {
7556
- const { questionnaireService: t, applicantService: a } = Se(), [r, n] = T(null), [o, l] = T({}), [c, u] = T(!1), [p, f] = T(!1), [y, x] = T(null), A = pe(!1), S = pe(null), B = ee(async () => {
7556
+ const { questionnaireService: t, applicantService: a } = Se(), [r, n] = T(null), [o, l] = T({}), [d, u] = T(!1), [m, g] = T(!1), [y, x] = T(null), A = pe(!1), S = pe(null), B = ee(async () => {
7557
7557
  var U, K;
7558
7558
  if (e) {
7559
7559
  if (A.current) {
@@ -7590,13 +7590,13 @@ function ca(e) {
7590
7590
  }, [e]);
7591
7591
  const N = ee(
7592
7592
  async (U) => {
7593
- f(!0), x(null);
7593
+ g(!0), x(null);
7594
7594
  try {
7595
7595
  return await t.fillQuestionnaire(U);
7596
7596
  } catch (K) {
7597
7597
  throw x(K), K;
7598
7598
  } finally {
7599
- f(!1);
7599
+ g(!1);
7600
7600
  }
7601
7601
  },
7602
7602
  [t]
@@ -7604,15 +7604,15 @@ function ca(e) {
7604
7604
  return {
7605
7605
  questionnaire: r,
7606
7606
  initialAnswers: o,
7607
- isLoading: c,
7608
- isSubmitting: p,
7607
+ isLoading: d,
7608
+ isSubmitting: m,
7609
7609
  error: y,
7610
7610
  load: B,
7611
7611
  submit: N
7612
7612
  };
7613
7613
  }
7614
7614
  function da(e) {
7615
- const { uploadDocumentService: t } = Se(), [a, r] = T(null), [n, o] = T(!1), [l, c] = T(!1), [u, p] = T(0), [f, y] = T(null), x = pe(!1), A = pe(null), S = ee(async () => {
7615
+ const { uploadDocumentService: t } = Se(), [a, r] = T(null), [n, o] = T(!1), [l, d] = T(!1), [u, m] = T(0), [g, y] = T(null), x = pe(!1), A = pe(null), S = ee(async () => {
7616
7616
  if (e) {
7617
7617
  if (x.current) {
7618
7618
  _.debug("UploadDocument load already in progress, skipping");
@@ -7634,13 +7634,13 @@ function da(e) {
7634
7634
  }, [e]);
7635
7635
  const B = ee(
7636
7636
  async (N) => {
7637
- c(!0), p(0), y(null);
7637
+ d(!0), m(0), y(null);
7638
7638
  try {
7639
- await t.fillUploadDocument(N), p(100);
7639
+ await t.fillUploadDocument(N), m(100);
7640
7640
  } catch (U) {
7641
7641
  throw y(U), U;
7642
7642
  } finally {
7643
- c(!1);
7643
+ d(!1);
7644
7644
  }
7645
7645
  },
7646
7646
  [t]
@@ -7650,24 +7650,24 @@ function da(e) {
7650
7650
  isLoading: n,
7651
7651
  isSubmitting: l,
7652
7652
  uploadProgress: u,
7653
- error: f,
7653
+ error: g,
7654
7654
  load: S,
7655
7655
  submit: B
7656
7656
  };
7657
7657
  }
7658
7658
  function jn(e) {
7659
- const { appropriatenessTestService: t } = Se(), [a, r] = T(null), [n, o] = T(!1), [l, c] = T(!1), [u, p] = T(null), [f, y] = T(null), x = pe(!1), A = pe(null), S = ee(async () => {
7659
+ const { appropriatenessTestService: t } = Se(), [a, r] = T(null), [n, o] = T(!1), [l, d] = T(!1), [u, m] = T(null), [g, y] = T(null), x = pe(!1), A = pe(null), S = ee(async () => {
7660
7660
  if (e) {
7661
7661
  if (x.current) {
7662
7662
  _.debug("AppropriatenessTest load already in progress, skipping");
7663
7663
  return;
7664
7664
  }
7665
- x.current = !0, o(!0), p(null);
7665
+ x.current = !0, o(!0), m(null);
7666
7666
  try {
7667
7667
  const N = await t.getAppropriatenessTest(e);
7668
7668
  r(N), A.current = e;
7669
7669
  } catch (N) {
7670
- p(N);
7670
+ m(N);
7671
7671
  } finally {
7672
7672
  o(!1), x.current = !1;
7673
7673
  }
@@ -7678,21 +7678,21 @@ function jn(e) {
7678
7678
  }, [e]);
7679
7679
  const B = ee(
7680
7680
  async (N) => {
7681
- c(!0), p(null);
7681
+ d(!0), m(null);
7682
7682
  try {
7683
7683
  const U = await t.fillAppropriatenessTest(N);
7684
7684
  return y(U), U;
7685
7685
  } catch (U) {
7686
- throw p(U), U;
7686
+ throw m(U), U;
7687
7687
  } finally {
7688
- c(!1);
7688
+ d(!1);
7689
7689
  }
7690
7690
  },
7691
7691
  [t]
7692
7692
  );
7693
7693
  return {
7694
7694
  test: a,
7695
- result: f,
7695
+ result: g,
7696
7696
  isLoading: n,
7697
7697
  isSubmitting: l,
7698
7698
  error: u,
@@ -7701,20 +7701,20 @@ function jn(e) {
7701
7701
  };
7702
7702
  }
7703
7703
  function ua(e) {
7704
- const { overviewService: t } = Se(), [a, r] = T(null), [n, o] = T(!1), [l, c] = T(!1), [u, p] = T(null), f = pe(!1), y = pe(null), x = ee(async () => {
7704
+ const { overviewService: t } = Se(), [a, r] = T(null), [n, o] = T(!1), [l, d] = T(!1), [u, m] = T(null), g = pe(!1), y = pe(null), x = ee(async () => {
7705
7705
  if (e) {
7706
- if (f.current) {
7706
+ if (g.current) {
7707
7707
  _.debug("Overview load already in progress, skipping");
7708
7708
  return;
7709
7709
  }
7710
- f.current = !0, o(!0), p(null);
7710
+ g.current = !0, o(!0), m(null);
7711
7711
  try {
7712
7712
  const S = await t.getOverviewData(e);
7713
7713
  r(S), y.current = e;
7714
7714
  } catch (S) {
7715
- p(S);
7715
+ m(S);
7716
7716
  } finally {
7717
- o(!1), f.current = !1;
7717
+ o(!1), g.current = !1;
7718
7718
  }
7719
7719
  }
7720
7720
  }, [e, t]);
@@ -7723,13 +7723,13 @@ function ua(e) {
7723
7723
  }, [e]);
7724
7724
  const A = ee(async () => {
7725
7725
  if (e) {
7726
- c(!0), p(null);
7726
+ d(!0), m(null);
7727
7727
  try {
7728
7728
  await t.passOverview(e);
7729
7729
  } catch (S) {
7730
- throw p(S), S;
7730
+ throw m(S), S;
7731
7731
  } finally {
7732
- c(!1);
7732
+ d(!1);
7733
7733
  }
7734
7734
  }
7735
7735
  }, [e, t]);
@@ -7745,14 +7745,14 @@ function ua(e) {
7745
7745
  function ma(e) {
7746
7746
  const { identityService: t } = Se(), [a, r] = T(
7747
7747
  null
7748
- ), [n, o] = T(!1), [l, c] = T(null), u = pe(!1), p = ee(
7748
+ ), [n, o] = T(!1), [l, d] = T(null), u = pe(!1), m = ee(
7749
7749
  async (x, A) => {
7750
7750
  if (e) {
7751
7751
  if (u.current) {
7752
7752
  _.debug("Identity request already in progress, skipping");
7753
7753
  return;
7754
7754
  }
7755
- u.current = !0, o(!0), c(null);
7755
+ u.current = !0, o(!0), d(null);
7756
7756
  try {
7757
7757
  const S = {
7758
7758
  applicantId: e,
@@ -7764,17 +7764,17 @@ function ma(e) {
7764
7764
  const B = await t.identityRequest(S);
7765
7765
  return _.debug("Identity request result:", B), r(B), B;
7766
7766
  } catch (S) {
7767
- throw c(S), S;
7767
+ throw d(S), S;
7768
7768
  } finally {
7769
7769
  o(!1), u.current = !1;
7770
7770
  }
7771
7771
  }
7772
7772
  },
7773
7773
  [e, t]
7774
- ), f = ee(
7774
+ ), g = ee(
7775
7775
  async (x, A) => {
7776
7776
  if (e) {
7777
- o(!0), c(null);
7777
+ o(!0), d(null);
7778
7778
  try {
7779
7779
  const S = {
7780
7780
  applicantId: e,
@@ -7784,7 +7784,7 @@ function ma(e) {
7784
7784
  }, B = await t.identityCompanyRequest(S);
7785
7785
  return r(B), B;
7786
7786
  } catch (S) {
7787
- throw c(S), S;
7787
+ throw d(S), S;
7788
7788
  } finally {
7789
7789
  o(!1);
7790
7790
  }
@@ -7797,7 +7797,7 @@ function ma(e) {
7797
7797
  _.debug("Identity restart already in progress, skipping");
7798
7798
  return;
7799
7799
  }
7800
- u.current = !0, o(!0), c(null);
7800
+ u.current = !0, o(!0), d(null);
7801
7801
  try {
7802
7802
  const x = {
7803
7803
  applicantId: e,
@@ -7809,7 +7809,7 @@ function ma(e) {
7809
7809
  const A = await t.identityRequest(x);
7810
7810
  return _.debug("Restart identity result:", A), r(A), A;
7811
7811
  } catch (x) {
7812
- throw c(x), x;
7812
+ throw d(x), x;
7813
7813
  } finally {
7814
7814
  o(!1), u.current = !1;
7815
7815
  }
@@ -7821,13 +7821,13 @@ function ma(e) {
7821
7821
  token: (a == null ? void 0 : a.publicProviderTokenObject) || null,
7822
7822
  isLoading: n,
7823
7823
  error: l,
7824
- requestIdentity: p,
7825
- requestCompanyIdentity: f,
7824
+ requestIdentity: m,
7825
+ requestCompanyIdentity: g,
7826
7826
  restartIdentity: y
7827
7827
  };
7828
7828
  }
7829
7829
  function pa(e) {
7830
- const { riskScoringService: t, applicantService: a } = Se(), [r, n] = T(null), [o, l] = T({}), [c, u] = T(!1), [p, f] = T(!1), [y, x] = T(null), [A, S] = T(null), B = pe(!1), N = pe(null), U = ee(async () => {
7830
+ const { riskScoringService: t, applicantService: a } = Se(), [r, n] = T(null), [o, l] = T({}), [d, u] = T(!1), [m, g] = T(!1), [y, x] = T(null), [A, S] = T(null), B = pe(!1), N = pe(null), U = ee(async () => {
7831
7831
  var O;
7832
7832
  if (e) {
7833
7833
  if (B.current) {
@@ -7864,14 +7864,14 @@ function pa(e) {
7864
7864
  }, [e]);
7865
7865
  const K = ee(
7866
7866
  async (O) => {
7867
- f(!0), x(null);
7867
+ g(!0), x(null);
7868
7868
  try {
7869
7869
  const M = await t.submitRiskScoring(O);
7870
7870
  return S(M), M;
7871
7871
  } catch (M) {
7872
7872
  throw x(M), M;
7873
7873
  } finally {
7874
- f(!1);
7874
+ g(!1);
7875
7875
  }
7876
7876
  },
7877
7877
  [t]
@@ -7880,18 +7880,18 @@ function pa(e) {
7880
7880
  criteria: r,
7881
7881
  initialAnswers: o,
7882
7882
  result: A,
7883
- isLoading: c,
7884
- isSubmitting: p,
7883
+ isLoading: d,
7884
+ isSubmitting: m,
7885
7885
  error: y,
7886
7886
  load: U,
7887
7887
  submit: K
7888
7888
  };
7889
7889
  }
7890
7890
  function Ii() {
7891
- const { applicantService: e, config: t } = Se(), [a, r] = T(!1), [n, o] = T(null), l = pe(!1), c = pe(!1), u = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(A) {
7891
+ const { applicantService: e, config: t } = Se(), [a, r] = T(!1), [n, o] = T(null), l = pe(!1), d = pe(!1), u = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(A) {
7892
7892
  const S = Math.random() * 16 | 0;
7893
7893
  return (A === "x" ? S : S & 3 | 8).toString(16);
7894
- }), p = ee(
7894
+ }), m = ee(
7895
7895
  async (A) => {
7896
7896
  var S;
7897
7897
  if (l.current)
@@ -7913,7 +7913,7 @@ function Ii() {
7913
7913
  }
7914
7914
  },
7915
7915
  [e, t]
7916
- ), f = ee(
7916
+ ), g = ee(
7917
7917
  async (A) => {
7918
7918
  r(!0), o(null);
7919
7919
  try {
@@ -7927,13 +7927,13 @@ function Ii() {
7927
7927
  [e]
7928
7928
  ), y = ee(
7929
7929
  async (A) => {
7930
- c.current = !0, r(!0), o(null);
7930
+ d.current = !0, r(!0), o(null);
7931
7931
  try {
7932
7932
  return await e.getApplicantData(A);
7933
7933
  } catch (S) {
7934
7934
  throw o(S), S;
7935
7935
  } finally {
7936
- r(!1), c.current = !1;
7936
+ r(!1), d.current = !1;
7937
7937
  }
7938
7938
  },
7939
7939
  [e]
@@ -7953,8 +7953,8 @@ function Ii() {
7953
7953
  return {
7954
7954
  isLoading: a,
7955
7955
  error: n,
7956
- createApplicant: p,
7957
- createCompanyApplicant: f,
7956
+ createApplicant: m,
7957
+ createCompanyApplicant: g,
7958
7958
  getApplicantData: y,
7959
7959
  stopProgress: x
7960
7960
  };
@@ -7993,13 +7993,13 @@ const ga = {
7993
7993
  disabled: n,
7994
7994
  className: o,
7995
7995
  style: l,
7996
- ...c
7996
+ ...d
7997
7997
  }) => {
7998
- const u = "inline-flex items-center justify-center rounded-lg font-medium transition-opacity border focus:outline-none focus:ring-2 focus:ring-offset-1 disabled:opacity-50 disabled:cursor-not-allowed", p = {
7998
+ const u = "inline-flex items-center justify-center rounded-lg font-medium transition-opacity border focus:outline-none focus:ring-2 focus:ring-offset-1 disabled:opacity-50 disabled:cursor-not-allowed", m = {
7999
7999
  sm: "px-3 py-1.5 text-sm",
8000
8000
  md: "px-4 py-2 text-sm",
8001
8001
  lg: "px-6 py-3 text-base"
8002
- }, f = {
8002
+ }, g = {
8003
8003
  sm: { padding: "0.375rem 0.75rem", fontSize: "0.875rem" },
8004
8004
  md: { padding: "0.5rem 1rem", fontSize: "0.875rem" },
8005
8005
  lg: { padding: "0.75rem 1.5rem", fontSize: "1rem" }
@@ -8007,7 +8007,7 @@ const ga = {
8007
8007
  return /* @__PURE__ */ s(
8008
8008
  "button",
8009
8009
  {
8010
- className: We(u, p[a], o),
8010
+ className: We(u, m[a], o),
8011
8011
  style: {
8012
8012
  display: "inline-flex",
8013
8013
  alignItems: "center",
@@ -8019,12 +8019,12 @@ const ga = {
8019
8019
  cursor: n || r ? "not-allowed" : "pointer",
8020
8020
  opacity: n || r ? 0.5 : 1,
8021
8021
  lineHeight: "1.25rem",
8022
- ...f[a],
8022
+ ...g[a],
8023
8023
  ...ga[t],
8024
8024
  ...l
8025
8025
  },
8026
8026
  disabled: n || r,
8027
- ...c,
8027
+ ...d,
8028
8028
  children: [
8029
8029
  r && /* @__PURE__ */ s(
8030
8030
  "svg",
@@ -8061,7 +8061,7 @@ const ga = {
8061
8061
  }
8062
8062
  );
8063
8063
  }, Te = At(
8064
- ({ label: e, error: t, helperText: a, leftIcon: r, rightIcon: n, className: o, style: l, ...c }, u) => /* @__PURE__ */ s("div", { className: "w-full", children: [
8064
+ ({ label: e, error: t, helperText: a, leftIcon: r, rightIcon: n, className: o, style: l, ...d }, u) => /* @__PURE__ */ s("div", { className: "w-full", children: [
8065
8065
  e && /* @__PURE__ */ s(
8066
8066
  "label",
8067
8067
  {
@@ -8069,7 +8069,7 @@ const ga = {
8069
8069
  style: { color: "var(--metakyc-text-primary, #374151)" },
8070
8070
  children: [
8071
8071
  e,
8072
- c.required && /* @__PURE__ */ i("span", { className: "text-danger-500 ml-1", children: "*" })
8072
+ d.required && /* @__PURE__ */ i("span", { className: "text-danger-500 ml-1", children: "*" })
8073
8073
  ]
8074
8074
  }
8075
8075
  ),
@@ -8089,13 +8089,13 @@ const ga = {
8089
8089
  ),
8090
8090
  style: {
8091
8091
  minHeight: "38px",
8092
- backgroundColor: c.readOnly ? "var(--metakyc-surface, #f3f4f6)" : "var(--metakyc-input-bg, #ffffff)",
8092
+ backgroundColor: d.readOnly ? "var(--metakyc-surface, #f3f4f6)" : "var(--metakyc-input-bg, #ffffff)",
8093
8093
  color: "var(--metakyc-input-text, var(--metakyc-text-primary, #111827))",
8094
8094
  borderColor: t ? "var(--metakyc-danger, #ef4444)" : "var(--metakyc-input-border, var(--metakyc-border, #d1d5db))",
8095
- cursor: c.readOnly ? "default" : void 0,
8095
+ cursor: d.readOnly ? "default" : void 0,
8096
8096
  ...l
8097
8097
  },
8098
- ...c
8098
+ ...d
8099
8099
  }
8100
8100
  ),
8101
8101
  n && /* @__PURE__ */ i("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none", children: n })
@@ -8186,11 +8186,11 @@ const ne = ({ children: e, className: t, style: a, ...r }) => /* @__PURE__ */ i(
8186
8186
  role: "checkbox",
8187
8187
  "aria-checked": e,
8188
8188
  tabIndex: 0,
8189
- onClick: (c) => {
8190
- c.stopPropagation(), a || t(!e);
8189
+ onClick: (d) => {
8190
+ d.stopPropagation(), a || t(!e);
8191
8191
  },
8192
- onKeyDown: (c) => {
8193
- (c.key === " " || c.key === "Enter") && (c.preventDefault(), a || t(!e));
8192
+ onKeyDown: (d) => {
8193
+ (d.key === " " || d.key === "Enter") && (d.preventDefault(), a || t(!e));
8194
8194
  },
8195
8195
  style: {
8196
8196
  ...fa,
@@ -8294,7 +8294,7 @@ const ne = ({ children: e, className: t, style: a, ...r }) => /* @__PURE__ */ i(
8294
8294
  }
8295
8295
  ) });
8296
8296
  }, Xt = At(
8297
- ({ label: e, error: t, helperText: a, options: r, placeholder: n, className: o, style: l, ...c }, u) => /* @__PURE__ */ s("div", { className: "w-full", children: [
8297
+ ({ label: e, error: t, helperText: a, options: r, placeholder: n, className: o, style: l, ...d }, u) => /* @__PURE__ */ s("div", { className: "w-full", children: [
8298
8298
  e && /* @__PURE__ */ s(
8299
8299
  "label",
8300
8300
  {
@@ -8302,7 +8302,7 @@ const ne = ({ children: e, className: t, style: a, ...r }) => /* @__PURE__ */ i(
8302
8302
  style: { color: "var(--metakyc-text-primary, #374151)" },
8303
8303
  children: [
8304
8304
  e,
8305
- c.required && /* @__PURE__ */ i("span", { className: "text-danger-500 ml-1", children: "*" })
8305
+ d.required && /* @__PURE__ */ i("span", { className: "text-danger-500 ml-1", children: "*" })
8306
8306
  ]
8307
8307
  }
8308
8308
  ),
@@ -8324,7 +8324,7 @@ const ne = ({ children: e, className: t, style: a, ...r }) => /* @__PURE__ */ i(
8324
8324
  borderColor: t ? "var(--metakyc-danger, #ef4444)" : "var(--metakyc-input-border, var(--metakyc-border, #d1d5db))",
8325
8325
  ...l
8326
8326
  },
8327
- ...c,
8327
+ ...d,
8328
8328
  children: [
8329
8329
  n && /* @__PURE__ */ i(
8330
8330
  "option",
@@ -8339,18 +8339,18 @@ const ne = ({ children: e, className: t, style: a, ...r }) => /* @__PURE__ */ i(
8339
8339
  },
8340
8340
  "__placeholder__"
8341
8341
  ),
8342
- r.map((p, f) => /* @__PURE__ */ i(
8342
+ r.map((m, g) => /* @__PURE__ */ i(
8343
8343
  "option",
8344
8344
  {
8345
- value: p.value,
8346
- disabled: p.disabled,
8345
+ value: m.value,
8346
+ disabled: m.disabled,
8347
8347
  style: {
8348
8348
  backgroundColor: "var(--metakyc-input-bg, #ffffff)",
8349
- color: p.disabled ? "var(--metakyc-text-muted, #9ca3af)" : "var(--metakyc-input-text, var(--metakyc-text-primary, #111827))"
8349
+ color: m.disabled ? "var(--metakyc-text-muted, #9ca3af)" : "var(--metakyc-input-text, var(--metakyc-text-primary, #111827))"
8350
8350
  },
8351
- children: p.label
8351
+ children: m.label
8352
8352
  },
8353
- p.value || `option-${f}`
8353
+ m.value || `option-${g}`
8354
8354
  ))
8355
8355
  ]
8356
8356
  }
@@ -8368,9 +8368,9 @@ const pi = 280, ha = ({
8368
8368
  placeholder: n,
8369
8369
  disabled: o = !1,
8370
8370
  readOnly: l = !1,
8371
- required: c = !1
8371
+ required: d = !1
8372
8372
  }) => {
8373
- const { t: u } = Ie(), p = n ?? u("common.select"), f = o || l, [y, x] = T(!1), [A, S] = T(""), [B, N] = T(null), [U, K] = T({
8373
+ const { t: u } = Ie(), m = n ?? u("common.select"), g = o || l, [y, x] = T(!1), [A, S] = T(""), [B, N] = T(null), [U, K] = T({
8374
8374
  bg: "#ffffff",
8375
8375
  borderColor: "#d1d5db",
8376
8376
  textPrimary: "#111827",
@@ -8394,11 +8394,11 @@ const pi = 280, ha = ({
8394
8394
  hoverBg: P("--metakyc-surface", j)
8395
8395
  });
8396
8396
  }, []), v = ee(() => {
8397
- if (f) return;
8397
+ if (g) return;
8398
8398
  Q();
8399
8399
  const R = G();
8400
8400
  R && N(R), x(!0);
8401
- }, [f, G, Q]), z = ee(() => {
8401
+ }, [g, G, Q]), z = ee(() => {
8402
8402
  x(!1), S("");
8403
8403
  }, []);
8404
8404
  fe(() => {
@@ -8422,9 +8422,9 @@ const pi = 280, ha = ({
8422
8422
  const F = r.filter(
8423
8423
  (R) => R.label.toLowerCase().includes(A.toLowerCase())
8424
8424
  ), X = (R) => {
8425
- f || a(t.includes(R) ? t.filter((P) => P !== R) : [...t, R]);
8425
+ g || a(t.includes(R) ? t.filter((P) => P !== R) : [...t, R]);
8426
8426
  }, te = (R, P) => {
8427
- P.stopPropagation(), f || a(t.filter((j) => j !== R));
8427
+ P.stopPropagation(), g || a(t.filter((j) => j !== R));
8428
8428
  }, H = (R) => {
8429
8429
  var P;
8430
8430
  return ((P = r.find((j) => j.value === R)) == null ? void 0 : P.label) || R;
@@ -8544,7 +8544,7 @@ const pi = 280, ha = ({
8544
8544
  style: { color: "var(--metakyc-text-primary, #374151)" },
8545
8545
  children: [
8546
8546
  e,
8547
- c && /* @__PURE__ */ i("span", { style: { color: "var(--metakyc-error, #ef4444)", marginLeft: "4px" }, children: "*" })
8547
+ d && /* @__PURE__ */ i("span", { style: { color: "var(--metakyc-error, #ef4444)", marginLeft: "4px" }, children: "*" })
8548
8548
  ]
8549
8549
  }
8550
8550
  ),
@@ -8556,7 +8556,7 @@ const pi = 280, ha = ({
8556
8556
  className: We(
8557
8557
  "metakyc-multiselect-trigger",
8558
8558
  "w-full px-3 py-2 rounded-lg border text-sm transition-colors relative",
8559
- f ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
8559
+ g ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
8560
8560
  ),
8561
8561
  style: {
8562
8562
  minHeight: "38px",
@@ -8571,7 +8571,7 @@ const pi = 280, ha = ({
8571
8571
  {
8572
8572
  className: "metakyc-multiselect-placeholder leading-6",
8573
8573
  style: { color: "var(--metakyc-text-secondary, #9ca3af)" },
8574
- children: p
8574
+ children: m
8575
8575
  }
8576
8576
  ) : /* @__PURE__ */ i("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((R) => /* @__PURE__ */ s(
8577
8577
  "span",
@@ -8583,7 +8583,7 @@ const pi = 280, ha = ({
8583
8583
  },
8584
8584
  children: [
8585
8585
  H(R),
8586
- !f && /* @__PURE__ */ i(
8586
+ !g && /* @__PURE__ */ i(
8587
8587
  "button",
8588
8588
  {
8589
8589
  type: "button",
@@ -8636,13 +8636,13 @@ const pi = 280, ha = ({
8636
8636
  placeholder: n,
8637
8637
  value: o,
8638
8638
  onChange: l,
8639
- disabled: c = !1,
8639
+ disabled: d = !1,
8640
8640
  readOnly: u = !1,
8641
- required: p = !1,
8642
- className: f
8641
+ required: m = !1,
8642
+ className: g
8643
8643
  }) => {
8644
8644
  var ge;
8645
- const { t: y } = Ie(), x = n ?? y("common.select"), A = c || u, [S, B] = T(!1), [N, U] = T(""), [K, O] = T(null), [M, Y] = T({
8645
+ const { t: y } = Ie(), x = n ?? y("common.select"), A = d || u, [S, B] = T(!1), [N, U] = T(""), [K, O] = T(null), [M, Y] = T({
8646
8646
  bg: "#ffffff",
8647
8647
  border: "#d1d5db",
8648
8648
  text: "#111827",
@@ -8800,7 +8800,7 @@ const pi = 280, ha = ({
8800
8800
  return /* @__PURE__ */ s(
8801
8801
  "div",
8802
8802
  {
8803
- className: We("w-full metakyc-searchable-select", f),
8803
+ className: We("w-full metakyc-searchable-select", g),
8804
8804
  ref: Q,
8805
8805
  children: [
8806
8806
  e && /* @__PURE__ */ s(
@@ -8810,7 +8810,7 @@ const pi = 280, ha = ({
8810
8810
  style: { color: "var(--metakyc-text-primary, #374151)" },
8811
8811
  children: [
8812
8812
  e,
8813
- p && /* @__PURE__ */ i("span", { style: { color: "var(--metakyc-error, #ef4444)", marginLeft: "4px" }, children: "*" })
8813
+ m && /* @__PURE__ */ i("span", { style: { color: "var(--metakyc-error, #ef4444)", marginLeft: "4px" }, children: "*" })
8814
8814
  ]
8815
8815
  }
8816
8816
  ),
@@ -8872,11 +8872,11 @@ const va = ({
8872
8872
  multiple: n = !1,
8873
8873
  maxSize: o,
8874
8874
  required: l,
8875
- onChange: c,
8875
+ onChange: d,
8876
8876
  value: u = [],
8877
- className: p
8877
+ className: m
8878
8878
  }) => {
8879
- const { t: f } = Ie(), [y, x] = T(!1), [A, S] = T(null), B = pe(null), N = ee((v) => {
8879
+ const { t: g } = Ie(), [y, x] = T(!1), [A, S] = T(null), B = pe(null), N = ee((v) => {
8880
8880
  if (!v) return;
8881
8881
  S(null);
8882
8882
  const z = Array.from(v);
@@ -8884,8 +8884,8 @@ const va = ({
8884
8884
  S(`File exceeds the maximum size of ${Bt(o)}`);
8885
8885
  return;
8886
8886
  }
8887
- c == null || c(n ? [...u, ...z] : [z[0]]);
8888
- }, [o, n, c, u]), U = ee((v) => {
8887
+ d == null || d(n ? [...u, ...z] : [z[0]]);
8888
+ }, [o, n, d, u]), U = ee((v) => {
8889
8889
  v.preventDefault(), v.stopPropagation(), x(!0);
8890
8890
  }, []), K = ee((v) => {
8891
8891
  v.preventDefault(), v.stopPropagation(), x(!1);
@@ -8897,9 +8897,9 @@ const va = ({
8897
8897
  }, Y = (v) => {
8898
8898
  S(null);
8899
8899
  const z = u.filter((F, X) => X !== v);
8900
- c == null || c(z);
8900
+ d == null || d(z);
8901
8901
  }, G = a || A, Q = u.length > 0;
8902
- return /* @__PURE__ */ s("div", { className: We("metakyc-file-upload", p), style: { width: "100%" }, children: [
8902
+ return /* @__PURE__ */ s("div", { className: We("metakyc-file-upload", m), style: { width: "100%" }, children: [
8903
8903
  e && /* @__PURE__ */ s("div", { style: { marginBottom: "8px" }, children: [
8904
8904
  /* @__PURE__ */ s(
8905
8905
  "label",
@@ -8986,14 +8986,14 @@ const va = ({
8986
8986
  ),
8987
8987
  /* @__PURE__ */ s("div", { children: [
8988
8988
  /* @__PURE__ */ s("p", { style: { fontSize: "14px", color: "var(--metakyc-text-secondary, #6b7280)", margin: 0 }, children: [
8989
- /* @__PURE__ */ i("span", { style: { fontWeight: 600, color: "var(--metakyc-primary, #2563eb)" }, children: f("uploadDocument.clickToUpload") }),
8989
+ /* @__PURE__ */ i("span", { style: { fontWeight: 600, color: "var(--metakyc-primary, #2563eb)" }, children: g("uploadDocument.clickToUpload") }),
8990
8990
  " ",
8991
- f("uploadDocument.orDragDrop")
8991
+ g("uploadDocument.orDragDrop")
8992
8992
  ] }),
8993
8993
  (r || o) && /* @__PURE__ */ s("p", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "4px" }, children: [
8994
8994
  r && /* @__PURE__ */ i("span", { children: r }),
8995
8995
  r && o && /* @__PURE__ */ i("span", { children: " · " }),
8996
- o && /* @__PURE__ */ i("span", { children: f("uploadDocument.maxSize", { size: Bt(o) }) })
8996
+ o && /* @__PURE__ */ i("span", { children: g("uploadDocument.maxSize", { size: Bt(o) }) })
8997
8997
  ] })
8998
8998
  ] })
8999
8999
  ] })
@@ -9229,7 +9229,7 @@ const Ta = At(
9229
9229
  className: n = "",
9230
9230
  children: o,
9231
9231
  iconNode: l,
9232
- ...c
9232
+ ...d
9233
9233
  }, u) => Wt(
9234
9234
  "svg",
9235
9235
  {
@@ -9240,11 +9240,11 @@ const Ta = At(
9240
9240
  stroke: e,
9241
9241
  strokeWidth: r ? Number(a) * 24 / Number(t) : a,
9242
9242
  className: Li("lucide", n),
9243
- ...!o && !Ca(c) && { "aria-hidden": "true" },
9244
- ...c
9243
+ ...!o && !Ca(d) && { "aria-hidden": "true" },
9244
+ ...d
9245
9245
  },
9246
9246
  [
9247
- ...l.map(([p, f]) => Wt(p, f)),
9247
+ ...l.map(([m, g]) => Wt(m, g)),
9248
9248
  ...Array.isArray(o) ? o : [o]
9249
9249
  ]
9250
9250
  )
@@ -9328,9 +9328,9 @@ const za = ({
9328
9328
  onComplete: t,
9329
9329
  onBack: a
9330
9330
  }) => {
9331
- const { t: r } = Ie(), { questionnaire: n, initialAnswers: o, isLoading: l, isSubmitting: c, error: u, submit: p } = ca(e), [f, y] = T({}), [x, A] = T({}), [S, B] = T(0);
9331
+ const { t: r } = Ie(), { questionnaire: n, initialAnswers: o, isLoading: l, isSubmitting: d, error: u, submit: m } = ca(e), [g, y] = T({}), [x, A] = T({}), [S, B] = T(0);
9332
9332
  ye.useEffect(() => {
9333
- o && Object.keys(o).length > 0 && Object.keys(f).length === 0 && y(o);
9333
+ o && Object.keys(o).length > 0 && Object.keys(g).length === 0 && y(o);
9334
9334
  }, [o]);
9335
9335
  const N = Ue(
9336
9336
  () => n ? Ia(n.questionGroups) : [],
@@ -9343,11 +9343,11 @@ const za = ({
9343
9343
  }, []), M = ee(() => {
9344
9344
  const v = {};
9345
9345
  for (const { question: z } of K) {
9346
- const F = Aa(z, f[z.id] ?? []);
9346
+ const F = Aa(z, g[z.id] ?? []);
9347
9347
  F && (v[z.id] = F);
9348
9348
  }
9349
9349
  return A((z) => ({ ...z, ...v })), Object.keys(v).length === 0;
9350
- }, [K, f]), Y = () => {
9350
+ }, [K, g]), Y = () => {
9351
9351
  M() && B((v) => v + 1);
9352
9352
  }, G = () => {
9353
9353
  S > 0 ? B((v) => v - 1) : a == null || a();
@@ -9357,14 +9357,14 @@ const za = ({
9357
9357
  const v = n.questionGroups.flatMap(
9358
9358
  (F) => (F.questions ?? []).map((X) => ({
9359
9359
  questionId: X.id,
9360
- values: f[X.id] ?? []
9360
+ values: g[X.id] ?? []
9361
9361
  }))
9362
9362
  ), z = {
9363
9363
  applicantId: e,
9364
9364
  questionnarieId: n.id,
9365
9365
  questionResults: v
9366
9366
  };
9367
- await p(z), t == null || t();
9367
+ await m(z), t == null || t();
9368
9368
  } catch (v) {
9369
9369
  console.error("Questionnaire submit error:", v);
9370
9370
  }
@@ -9397,7 +9397,7 @@ const za = ({
9397
9397
  La,
9398
9398
  {
9399
9399
  question: v,
9400
- value: f[v.id] ?? [],
9400
+ value: g[v.id] ?? [],
9401
9401
  error: x[v.id],
9402
9402
  onChange: (z) => O(v.id, z)
9403
9403
  },
@@ -9421,7 +9421,7 @@ const za = ({
9421
9421
  se,
9422
9422
  {
9423
9423
  type: "button",
9424
- isLoading: c,
9424
+ isLoading: d,
9425
9425
  onClick: Q,
9426
9426
  children: r("common.continue")
9427
9427
  }
@@ -9444,8 +9444,8 @@ const za = ({
9444
9444
  }, children: /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: u.message }) })
9445
9445
  ] }) : null;
9446
9446
  }, La = ({ question: e, value: t, error: a, onChange: r }) => {
9447
- var c;
9448
- const { t: n } = Ie(), l = (((c = e.defaultAnswers) == null ? void 0 : c.length) ?? 0) > 0 ? e.showAsDropdown ? e.canMultipleAnswer ? "multi-select" : "single-select" : e.canMultipleAnswer ? "checkbox" : "radio" : "text";
9447
+ var d;
9448
+ const { t: n } = Ie(), l = (((d = e.defaultAnswers) == null ? void 0 : d.length) ?? 0) > 0 ? e.showAsDropdown ? e.canMultipleAnswer ? "multi-select" : "single-select" : e.canMultipleAnswer ? "checkbox" : "radio" : "text";
9449
9449
  return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
9450
9450
  /* @__PURE__ */ s("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
9451
9451
  e.text,
@@ -9488,7 +9488,7 @@ const za = ({
9488
9488
  type: "radio",
9489
9489
  checked: t[0] === u,
9490
9490
  onChange: () => r([u]),
9491
- onClick: (p) => p.stopPropagation(),
9491
+ onClick: (m) => m.stopPropagation(),
9492
9492
  className: "metakyc-option-input",
9493
9493
  style: {
9494
9494
  width: "16px",
@@ -9514,17 +9514,17 @@ const za = ({
9514
9514
  ] }),
9515
9515
  (l === "checkbox" || l === "multi-select") && /* @__PURE__ */ s("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
9516
9516
  (e.defaultAnswers ?? []).map((u) => {
9517
- const p = t.includes(u), f = () => {
9518
- r(p ? t.filter((y) => y !== u) : [...t, u]);
9517
+ const m = t.includes(u), g = () => {
9518
+ r(m ? t.filter((y) => y !== u) : [...t, u]);
9519
9519
  };
9520
9520
  return /* @__PURE__ */ s(
9521
9521
  "div",
9522
9522
  {
9523
9523
  className: "metakyc-option-label",
9524
- onClick: f,
9524
+ onClick: g,
9525
9525
  style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
9526
9526
  children: [
9527
- /* @__PURE__ */ i(Xe, { checked: p, onChange: () => f() }),
9527
+ /* @__PURE__ */ i(Xe, { checked: m, onChange: () => g() }),
9528
9528
  /* @__PURE__ */ i("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: u })
9529
9529
  ]
9530
9530
  },
@@ -9549,15 +9549,15 @@ const Da = ({
9549
9549
  onComplete: t,
9550
9550
  onBack: a
9551
9551
  }) => {
9552
- const { t: r } = Ie(), { uploadDocument: n, isLoading: o, isSubmitting: l, error: c, submit: u } = da(e), [p, f] = T({}), [y, x] = T(null), [A, S] = T(0), [B, N] = T({}), U = Ue(
9552
+ const { t: r } = Ie(), { uploadDocument: n, isLoading: o, isSubmitting: l, error: d, submit: u } = da(e), [m, g] = T({}), [y, x] = T(null), [A, S] = T(0), [B, N] = T({}), U = Ue(
9553
9553
  () => n ? Ea(n.uploadDocumentFiles) : [],
9554
9554
  [n]
9555
9555
  ), K = U[A] ?? [], O = A === U.length - 1, M = U.length, Y = ee(() => {
9556
9556
  const z = {};
9557
9557
  for (const F of K)
9558
- F.isRequired && (p[F.id] || []).length === 0 && (z[F.id] = `${F.displayName} is required`);
9558
+ F.isRequired && (m[F.id] || []).length === 0 && (z[F.id] = `${F.displayName} is required`);
9559
9559
  return N(z), Object.keys(z).length === 0;
9560
- }, [K, p]), G = () => {
9560
+ }, [K, m]), G = () => {
9561
9561
  Y() && (S((z) => z + 1), N({}));
9562
9562
  }, Q = () => {
9563
9563
  A > 0 ? (S((z) => z - 1), N({})) : a == null || a();
@@ -9567,7 +9567,7 @@ const Da = ({
9567
9567
  try {
9568
9568
  const z = await Promise.all(
9569
9569
  n.uploadDocumentFiles.map(async (X) => {
9570
- const te = p[X.id] || [], H = await Promise.all(
9570
+ const te = m[X.id] || [], H = await Promise.all(
9571
9571
  te.map(async (re) => ({
9572
9572
  fileName: re.name,
9573
9573
  fileData: await ra(re)
@@ -9592,7 +9592,7 @@ const Da = ({
9592
9592
  return o ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", padding: "48px 0", gap: "16px" }, children: [
9593
9593
  /* @__PURE__ */ i(Ke, { className: "my-8" }),
9594
9594
  /* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: r("uploadDocument.loading") })
9595
- ] }) }) }) : c ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { style: {
9595
+ ] }) }) }) : d ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { style: {
9596
9596
  display: "flex",
9597
9597
  flexDirection: "column",
9598
9598
  alignItems: "center",
@@ -9614,7 +9614,7 @@ const Da = ({
9614
9614
  /* @__PURE__ */ i("line", { x1: "9", y1: "9", x2: "15", y2: "15" })
9615
9615
  ] }) }),
9616
9616
  /* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-danger, #ef4444)", fontWeight: 500 }, children: r("uploadDocument.errorLoading") }),
9617
- /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: c.message })
9617
+ /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: d.message })
9618
9618
  ] }) }) }) : n ? /* @__PURE__ */ s(ne, { children: [
9619
9619
  /* @__PURE__ */ s(Le, { children: [
9620
9620
  /* @__PURE__ */ i("h2", { style: {
@@ -9696,12 +9696,12 @@ const Da = ({
9696
9696
  maxSize: z.maxEachFileSizeByte,
9697
9697
  required: z.isRequired,
9698
9698
  error: B[z.id],
9699
- value: p[z.id] || [],
9699
+ value: m[z.id] || [],
9700
9700
  onChange: (F) => {
9701
9701
  x(null), N((X) => {
9702
9702
  const te = { ...X };
9703
9703
  return delete te[z.id], te;
9704
- }), f((X) => ({ ...X, [z.id]: F }));
9704
+ }), g((X) => ({ ...X, [z.id]: F }));
9705
9705
  }
9706
9706
  },
9707
9707
  z.id
@@ -9757,25 +9757,25 @@ const Da = ({
9757
9757
  ] }) })
9758
9758
  ] }) : null;
9759
9759
  }, Pa = ({ applicantId: e, onComplete: t, onBack: a }) => {
9760
- const { t: r } = Ie(), { overview: n, isLoading: o, isSubmitting: l, error: c, passOverview: u } = ua(e), p = async () => {
9760
+ const { t: r } = Ie(), { overview: n, isLoading: o, isSubmitting: l, error: d, passOverview: u } = ua(e), m = async () => {
9761
9761
  await u(), t == null || t();
9762
9762
  };
9763
- return o ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ i(Ke, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
9763
+ return o ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ i(Ke, { className: "my-8" }) }) }) : d ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
9764
9764
  r("overview.errorLoading"),
9765
9765
  " ",
9766
- c.message
9766
+ d.message
9767
9767
  ] }) }) }) : n ? /* @__PURE__ */ s(ne, { children: [
9768
9768
  /* @__PURE__ */ s(Le, { children: [
9769
9769
  /* @__PURE__ */ i("h2", { className: "text-lg font-bold", children: n.title || r("overview.title") }),
9770
9770
  n.description && /* @__PURE__ */ i("p", { className: "mt-1", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n.description })
9771
9771
  ] }),
9772
- /* @__PURE__ */ i(oe, { className: "space-y-8", children: n.steps && n.steps.length > 0 ? n.steps.sort((f, y) => f.order - y.order).map((f) => /* @__PURE__ */ s("div", { className: "metakyc-overview-step-item flex items-center space-x-3", children: [
9772
+ /* @__PURE__ */ i(oe, { className: "space-y-8", children: n.steps && n.steps.length > 0 ? n.steps.sort((g, y) => g.order - y.order).map((g) => /* @__PURE__ */ s("div", { className: "metakyc-overview-step-item flex items-center space-x-3", children: [
9773
9773
  /* @__PURE__ */ i("div", { className: "metakyc-step-icon flex-shrink-0", children: /* @__PURE__ */ i(
9774
9774
  "div",
9775
9775
  {
9776
9776
  className: "w-8 h-8 rounded-full flex items-center justify-center font-medium text-sm",
9777
9777
  style: { backgroundColor: "var(--metakyc-primary, #2563eb)", color: "#ffffff" },
9778
- children: f.order + 1
9778
+ children: g.order + 1
9779
9779
  }
9780
9780
  ) }),
9781
9781
  /* @__PURE__ */ s(
@@ -9789,15 +9789,15 @@ const Da = ({
9789
9789
  background: "transparent"
9790
9790
  },
9791
9791
  children: [
9792
- /* @__PURE__ */ i("span", { className: "metakyc-step-title text-sm font-semibold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: f.title }),
9793
- f.description && /* @__PURE__ */ i("p", { className: "metakyc-step-description text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: f.description })
9792
+ /* @__PURE__ */ i("span", { className: "metakyc-step-title text-sm font-semibold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: g.title }),
9793
+ g.description && /* @__PURE__ */ i("p", { className: "metakyc-step-description text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: g.description })
9794
9794
  ]
9795
9795
  }
9796
9796
  )
9797
- ] }, f.order)) : /* @__PURE__ */ i("div", { className: "text-center py-8", children: /* @__PURE__ */ i("p", { style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r("overview.loadingOverview") }) }) }),
9797
+ ] }, g.order)) : /* @__PURE__ */ i("div", { className: "text-center py-8", children: /* @__PURE__ */ i("p", { style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r("overview.loadingOverview") }) }) }),
9798
9798
  /* @__PURE__ */ s(Ee, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
9799
9799
  a && /* @__PURE__ */ i(se, { type: "button", variant: "outline", onClick: a, children: r("common.back") }),
9800
- /* @__PURE__ */ i(se, { onClick: p, isLoading: l, children: r("common.continue") })
9800
+ /* @__PURE__ */ i(se, { onClick: m, isLoading: l, children: r("common.continue") })
9801
9801
  ] })
9802
9802
  ] }) : null;
9803
9803
  };
@@ -9867,17 +9867,17 @@ const qa = ({
9867
9867
  onComplete: t,
9868
9868
  onBack: a
9869
9869
  }) => {
9870
- const { t: r } = Ie(), { config: n } = Se(), o = n.locale ?? "en", { criteria: l, initialAnswers: c, isLoading: u, isSubmitting: p, error: f, submit: y } = pa(e), [x, A] = T({}), [S, B] = T({}), [N, U] = T(0), [K, O] = T(!1);
9870
+ const { t: r } = Ie(), { config: n } = Se(), o = n.locale ?? "en", { criteria: l, initialAnswers: d, isLoading: u, isSubmitting: m, error: g, submit: y } = pa(e), [x, A] = T({}), [S, B] = T({}), [N, U] = T(0), [K, O] = T(!1);
9871
9871
  ye.useEffect(() => {
9872
- c && Object.keys(c).length > 0 && Object.keys(x).length === 0 && A(c);
9873
- }, [c]);
9872
+ d && Object.keys(d).length > 0 && Object.keys(x).length === 0 && A(d);
9873
+ }, [d]);
9874
9874
  const M = Ue(
9875
9875
  () => l && l.length > 0 ? Va(l) : [],
9876
9876
  [l]
9877
9877
  ), Y = N === M.length - 1, G = M[N] ?? [];
9878
9878
  ye.useEffect(() => {
9879
- !u && l && l.length === 0 && !K && !p && (O(!0), y({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
9880
- }, [u, l, K, p, y, e, t]);
9879
+ !u && l && l.length === 0 && !K && !m && (O(!0), y({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
9880
+ }, [u, l, K, m, y, e, t]);
9881
9881
  const Q = ee((te, H) => {
9882
9882
  A((re) => ({ ...re, [te]: H })), B((re) => {
9883
9883
  const me = { ...re };
@@ -9912,10 +9912,10 @@ const qa = ({
9912
9912
  ] }) }) : !u && l && l.length === 0 ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
9913
9913
  /* @__PURE__ */ i(Ke, { className: "my-8" }),
9914
9914
  /* @__PURE__ */ i("p", { className: "text-center text-sm mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r("riskScoring.noCriteria") })
9915
- ] }) }) : f ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
9915
+ ] }) }) : g ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
9916
9916
  r("riskScoring.errorLoading"),
9917
9917
  " ",
9918
- f.message
9918
+ g.message
9919
9919
  ] }) }) }) : l ? /* @__PURE__ */ s(ne, { children: [
9920
9920
  /* @__PURE__ */ s(Le, { children: [
9921
9921
  /* @__PURE__ */ i("h2", { className: "text-lg font-bold", children: r("riskScoring.title") }),
@@ -9961,7 +9961,7 @@ const qa = ({
9961
9961
  ]
9962
9962
  }
9963
9963
  ),
9964
- Y ? /* @__PURE__ */ i(se, { type: "button", isLoading: p, onClick: X, children: r("common.continue") }) : /* @__PURE__ */ s(
9964
+ Y ? /* @__PURE__ */ i(se, { type: "button", isLoading: m, onClick: X, children: r("common.continue") }) : /* @__PURE__ */ s(
9965
9965
  se,
9966
9966
  {
9967
9967
  type: "button",
@@ -9974,50 +9974,50 @@ const qa = ({
9974
9974
  }
9975
9975
  )
9976
9976
  ] }),
9977
- f && /* @__PURE__ */ i("div", { className: "mx-6 mb-4 p-3 rounded", style: {
9977
+ g && /* @__PURE__ */ i("div", { className: "mx-6 mb-4 p-3 rounded", style: {
9978
9978
  backgroundColor: "var(--metakyc-danger-bg, color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent))",
9979
9979
  border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 30%, transparent)"
9980
- }, children: /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: f.message }) })
9980
+ }, children: /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: g.message }) })
9981
9981
  ] }) : null;
9982
9982
  }, Ua = ({ criterion: e, value: t, error: a, locale: r, onChange: n }) => {
9983
- const { t: o } = Ie(), l = Ba(e), c = e.valueDataType === at.Integer || e.valueDataType === at.Money || e.valueDataType === at.DigitOnly, u = ja(e), p = (f) => u ? Fa(f, r) : f;
9983
+ const { t: o } = Ie(), l = Ba(e), d = e.valueDataType === at.Integer || e.valueDataType === at.Money || e.valueDataType === at.DigitOnly, u = ja(e), m = (g) => u ? Fa(g, r) : g;
9984
9984
  return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
9985
9985
  /* @__PURE__ */ s("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
9986
9986
  e.displayName,
9987
9987
  e.isRequired && /* @__PURE__ */ i("span", { className: "text-danger-500 ml-1", children: "*" })
9988
9988
  ] }),
9989
9989
  e.description && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: e.description }),
9990
- c && (e.min !== void 0 || e.max !== void 0) && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: e.min !== void 0 && e.max !== void 0 ? o("riskScoring.range", { min: e.min, max: e.max }) : e.min !== void 0 ? o("riskScoring.minimum", { min: e.min }) : o("riskScoring.maximum", { max: e.max }) }),
9990
+ d && (e.min !== void 0 || e.max !== void 0) && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: e.min !== void 0 && e.max !== void 0 ? o("riskScoring.range", { min: e.min, max: e.max }) : e.min !== void 0 ? o("riskScoring.minimum", { min: e.min }) : o("riskScoring.maximum", { max: e.max }) }),
9991
9991
  l === "text" && /* @__PURE__ */ i(
9992
9992
  Te,
9993
9993
  {
9994
9994
  value: t[0] ?? "",
9995
- onChange: (f) => n([f.target.value]),
9996
- type: c ? "number" : "text",
9995
+ onChange: (g) => n([g.target.value]),
9996
+ type: d ? "number" : "text",
9997
9997
  placeholder: o("placeholders.enterAnswer"),
9998
9998
  error: a,
9999
9999
  required: e.isRequired,
10000
10000
  min: e.min,
10001
10001
  max: e.max,
10002
- onKeyDown: (f) => {
10003
- e.valueDataType === at.DigitOnly && ["e", "E", "+", "-", "."].includes(f.key) && f.preventDefault();
10002
+ onKeyDown: (g) => {
10003
+ e.valueDataType === at.DigitOnly && ["e", "E", "+", "-", "."].includes(g.key) && g.preventDefault();
10004
10004
  }
10005
10005
  }
10006
10006
  ),
10007
10007
  l === "radio" && /* @__PURE__ */ s("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
10008
- (e.defaultValues ?? []).map((f) => /* @__PURE__ */ s(
10008
+ (e.defaultValues ?? []).map((g) => /* @__PURE__ */ s(
10009
10009
  "div",
10010
10010
  {
10011
10011
  className: "metakyc-option-label",
10012
- onClick: () => n([f]),
10012
+ onClick: () => n([g]),
10013
10013
  style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
10014
10014
  children: [
10015
10015
  /* @__PURE__ */ i(
10016
10016
  "input",
10017
10017
  {
10018
10018
  type: "radio",
10019
- checked: t[0] === f,
10020
- onChange: () => n([f]),
10019
+ checked: t[0] === g,
10020
+ onChange: () => n([g]),
10021
10021
  onClick: (y) => y.stopPropagation(),
10022
10022
  className: "metakyc-option-input",
10023
10023
  style: {
@@ -10035,17 +10035,17 @@ const qa = ({
10035
10035
  }
10036
10036
  }
10037
10037
  ),
10038
- /* @__PURE__ */ i("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: p(f) })
10038
+ /* @__PURE__ */ i("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: m(g) })
10039
10039
  ]
10040
10040
  },
10041
- f
10041
+ g
10042
10042
  )),
10043
10043
  a && /* @__PURE__ */ i("p", { className: "text-sm text-danger-500", children: a })
10044
10044
  ] }),
10045
10045
  l === "checkbox" && /* @__PURE__ */ s("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
10046
- (e.defaultValues ?? []).map((f) => {
10047
- const y = t.includes(f), x = () => {
10048
- n(y ? t.filter((A) => A !== f) : [...t, f]);
10046
+ (e.defaultValues ?? []).map((g) => {
10047
+ const y = t.includes(g), x = () => {
10048
+ n(y ? t.filter((A) => A !== g) : [...t, g]);
10049
10049
  };
10050
10050
  return /* @__PURE__ */ s(
10051
10051
  "div",
@@ -10055,10 +10055,10 @@ const qa = ({
10055
10055
  style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
10056
10056
  children: [
10057
10057
  /* @__PURE__ */ i(Xe, { checked: y, onChange: () => x() }),
10058
- /* @__PURE__ */ i("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: p(f) })
10058
+ /* @__PURE__ */ i("span", { className: "metakyc-option-text", style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", marginLeft: 0 }, children: m(g) })
10059
10059
  ]
10060
10060
  },
10061
- f
10061
+ g
10062
10062
  );
10063
10063
  }),
10064
10064
  a && /* @__PURE__ */ i("p", { className: "text-sm text-danger-500", children: a })
@@ -10067,7 +10067,7 @@ const qa = ({
10067
10067
  Xt,
10068
10068
  {
10069
10069
  value: t[0] ?? "",
10070
- onChange: (f) => n([f.target.value]),
10070
+ onChange: (g) => n([g.target.value]),
10071
10071
  options: [
10072
10072
  { value: "US", label: "United States" },
10073
10073
  { value: "GB", label: "United Kingdom" },
@@ -10086,13 +10086,13 @@ const qa = ({
10086
10086
  onComplete: t,
10087
10087
  onBack: a
10088
10088
  }) => {
10089
- const { t: r } = Ie(), { investorCategorizationService: n } = Se(), [o, l] = T(null), [c, u] = T(!1), [p, f] = T(null);
10089
+ const { t: r } = Ie(), { investorCategorizationService: n } = Se(), [o, l] = T(null), [d, u] = T(!1), [m, g] = T(null);
10090
10090
  return /* @__PURE__ */ i("form", { onSubmit: async (x) => {
10091
10091
  if (x.preventDefault(), o === null) {
10092
- f(r("investorCategorization.pleaseSelect"));
10092
+ g(r("investorCategorization.pleaseSelect"));
10093
10093
  return;
10094
10094
  }
10095
- u(!0), f(null);
10095
+ u(!0), g(null);
10096
10096
  try {
10097
10097
  const A = {
10098
10098
  applicantId: e,
@@ -10102,7 +10102,7 @@ const qa = ({
10102
10102
  const S = await n.setInvestorCategorization(A);
10103
10103
  console.log("Investor categorization result:", S), t == null || t();
10104
10104
  } catch (A) {
10105
- console.error("Error submitting investor categorization:", A), f(A.message || r("investorCategorization.failedToSubmit"));
10105
+ console.error("Error submitting investor categorization:", A), g(A.message || r("investorCategorization.failedToSubmit"));
10106
10106
  } finally {
10107
10107
  u(!1);
10108
10108
  }
@@ -10194,10 +10194,10 @@ const qa = ({
10194
10194
  ] })
10195
10195
  }
10196
10196
  ),
10197
- p && /* @__PURE__ */ i("div", { className: "p-4 rounded-lg", style: { backgroundColor: "#fee2e2", border: "1px solid #fca5a5" }, children: /* @__PURE__ */ s("p", { className: "text-sm", style: { color: "#991b1b" }, children: [
10197
+ m && /* @__PURE__ */ i("div", { className: "p-4 rounded-lg", style: { backgroundColor: "#fee2e2", border: "1px solid #fca5a5" }, children: /* @__PURE__ */ s("p", { className: "text-sm", style: { color: "#991b1b" }, children: [
10198
10198
  /* @__PURE__ */ i("strong", { children: "Error:" }),
10199
10199
  " ",
10200
- p
10200
+ m
10201
10201
  ] }) })
10202
10202
  ] }),
10203
10203
  /* @__PURE__ */ s(Ee, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
@@ -10206,7 +10206,7 @@ const qa = ({
10206
10206
  se,
10207
10207
  {
10208
10208
  type: "submit",
10209
- isLoading: c,
10209
+ isLoading: d,
10210
10210
  disabled: o === null,
10211
10211
  children: r("common.submit")
10212
10212
  }
@@ -10227,7 +10227,7 @@ const Wa = ({
10227
10227
  onComplete: t,
10228
10228
  onBack: a
10229
10229
  }) => {
10230
- const { t: r } = Ie(), { appropriatenessTestService: n } = Se(), [o, l] = T(null), [c, u] = T(!0), [p, f] = T(!1), [y, x] = T(null), [A, S] = T({}), [B, N] = T(0), [U, K] = T(!1), [O, M] = T(!1), [Y, G] = T(0), [Q, v] = T(0), [z, F] = T(null);
10230
+ const { t: r } = Ie(), { appropriatenessTestService: n } = Se(), [o, l] = T(null), [d, u] = T(!0), [m, g] = T(!1), [y, x] = T(null), [A, S] = T({}), [B, N] = T(0), [U, K] = T(!1), [O, M] = T(!1), [Y, G] = T(0), [Q, v] = T(0), [z, F] = T(null);
10231
10231
  fe(() => {
10232
10232
  (async () => {
10233
10233
  try {
@@ -10256,7 +10256,7 @@ const Wa = ({
10256
10256
  }, 1e3);
10257
10257
  return () => clearInterval(P);
10258
10258
  }, [Y]), fe(() => {
10259
- O && !p && re();
10259
+ O && !m && re();
10260
10260
  }, [O]);
10261
10261
  const X = () => {
10262
10262
  o && (K(!0), N(o.testDurationSec), v(0), S({}), x(null));
@@ -10280,7 +10280,7 @@ const Wa = ({
10280
10280
  return;
10281
10281
  }
10282
10282
  }
10283
- f(!0), x(null);
10283
+ g(!0), x(null);
10284
10284
  try {
10285
10285
  const j = o.appropriatenessQuestions.map(
10286
10286
  (ge) => ({ appropriatenessQuestionId: ge.id, value: A[ge.id] || "" })
@@ -10301,13 +10301,13 @@ const Wa = ({
10301
10301
  } catch (j) {
10302
10302
  x(j.message || r("appropriatenessTest.failedToSubmit")), me();
10303
10303
  } finally {
10304
- f(!1);
10304
+ g(!1);
10305
10305
  }
10306
10306
  }
10307
10307
  }, me = () => {
10308
10308
  K(!1), M(!1), S({}), v(0);
10309
10309
  };
10310
- if (c)
10310
+ if (d)
10311
10311
  return /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", padding: "48px 0", gap: "16px" }, children: [
10312
10312
  /* @__PURE__ */ i(Ke, { className: "my-8" }),
10313
10313
  /* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: r("appropriatenessTest.loadingTest") })
@@ -10572,7 +10572,7 @@ const Wa = ({
10572
10572
  index: Q,
10573
10573
  selectedAnswer: A[ve.id],
10574
10574
  onSelect: (P) => te(ve.id, P),
10575
- disabled: p
10575
+ disabled: m
10576
10576
  }
10577
10577
  ),
10578
10578
  Ne > 1 && /* @__PURE__ */ i("div", { style: {
@@ -10639,7 +10639,7 @@ const Wa = ({
10639
10639
  onClick: () => {
10640
10640
  Q > 0 ? v((P) => P - 1) : a == null || a();
10641
10641
  },
10642
- disabled: p,
10642
+ disabled: m,
10643
10643
  children: Q > 0 ? r("common.previous") : r("common.cancel")
10644
10644
  }
10645
10645
  ),
@@ -10656,7 +10656,7 @@ const Wa = ({
10656
10656
  se,
10657
10657
  {
10658
10658
  type: "button",
10659
- isLoading: p,
10659
+ isLoading: m,
10660
10660
  onClick: () => re(),
10661
10661
  disabled: !$ && !O,
10662
10662
  style: { opacity: $ || O ? 1 : 0.5 },
@@ -10746,11 +10746,11 @@ const Wa = ({
10746
10746
  transition: "all 0.15s ease",
10747
10747
  opacity: r ? 0.6 : 1
10748
10748
  },
10749
- onMouseEnter: (c) => {
10750
- !r && !l && (c.currentTarget.style.borderColor = "color-mix(in srgb, var(--metakyc-primary, #2563eb) 50%, var(--metakyc-border, #e5e7eb))");
10749
+ onMouseEnter: (d) => {
10750
+ !r && !l && (d.currentTarget.style.borderColor = "color-mix(in srgb, var(--metakyc-primary, #2563eb) 50%, var(--metakyc-border, #e5e7eb))");
10751
10751
  },
10752
- onMouseLeave: (c) => {
10753
- l || (c.currentTarget.style.borderColor = "var(--metakyc-border, #e5e7eb)");
10752
+ onMouseLeave: (d) => {
10753
+ l || (d.currentTarget.style.borderColor = "var(--metakyc-border, #e5e7eb)");
10754
10754
  },
10755
10755
  children: [
10756
10756
  /* @__PURE__ */ i("div", { style: {
@@ -10798,7 +10798,7 @@ const Wa = ({
10798
10798
  onBack: a
10799
10799
  }) => {
10800
10800
  var gt, b, V, D;
10801
- const { t: r } = Ie(), { applicantService: n, baseInformationService: o, identityService: l, config: c, currentTheme: u } = Se(), { identityData: p, provider: f, token: y, isLoading: x, error: A, requestIdentity: S, restartIdentity: B } = ma(e), [N, U] = T(null), [K, O] = T(null), [M, Y] = T([]), [G, Q] = T([]), [v, z] = T(!0), [F, X] = T(!1), [te, H] = T(null), [re, me] = T(!1), de = ye.useRef(!1), [Ne, le] = T("idle"), ve = pe(!1), he = pe(null), [$, R] = T({}), [P, j] = T({}), Z = u != null && u.reviewPageFields && u.reviewPageFields.length > 0 ? u.reviewPageFields[0] : null, ge = !!(u != null && u.reviewPageDisabled), W = pe(!1);
10801
+ const { t: r } = Ie(), { applicantService: n, baseInformationService: o, identityService: l, config: d, currentTheme: u } = Se(), { identityData: m, provider: g, token: y, isLoading: x, error: A, requestIdentity: S, restartIdentity: B } = ma(e), [N, U] = T(null), [K, O] = T(null), [M, Y] = T([]), [G, Q] = T([]), [v, z] = T(!0), [F, X] = T(!1), [te, H] = T(null), [re, me] = T(!1), de = ye.useRef(!1), [Ne, le] = T("idle"), ve = pe(!1), he = pe(null), [$, R] = T({}), [P, j] = T({}), Z = u != null && u.reviewPageFields && u.reviewPageFields.length > 0 ? u.reviewPageFields[0] : null, ge = !!(u != null && u.reviewPageDisabled), W = pe(!1);
10802
10802
  W.current = ge;
10803
10803
  const J = qi({
10804
10804
  defaultValues: {
@@ -10825,41 +10825,41 @@ const Wa = ({
10825
10825
  // CountriesType.PhoneNumber
10826
10826
  ]);
10827
10827
  O(h);
10828
- const q = /* @__PURE__ */ new Set(), d = E.map((w) => ({ value: w.abbreviation3 || w.abbreviation, label: w.name })).filter((w) => !w.value || q.has(w.value) ? !1 : (q.add(w.value), !0));
10829
- Y(d);
10828
+ const q = /* @__PURE__ */ new Set(), c = E.map((w) => ({ value: w.abbreviation3 || w.abbreviation, label: w.name })).filter((w) => !w.value || q.has(w.value) ? !1 : (q.add(w.value), !0));
10829
+ Y(c);
10830
10830
  const L = /* @__PURE__ */ new Set(), C = I.filter((w) => w.countryCode).map((w) => ({ value: w.countryCode, label: `${w.countryCode} – ${w.name}` })).filter((w) => L.has(w.value) ? !1 : (L.add(w.value), !0));
10831
10831
  Q(C);
10832
- const m = h.applicantRequestData;
10832
+ const p = h.applicantRequestData;
10833
10833
  if (R({
10834
- firstName: (m == null ? void 0 : m.firstName) || "",
10835
- lastName: (m == null ? void 0 : m.lastName) || "",
10836
- email: (m == null ? void 0 : m.email) || "",
10837
- dateOfBirth: (m == null ? void 0 : m.dateOfBirth) || "",
10838
- title: (m == null ? void 0 : m.title) || "",
10839
- salutation: (m == null ? void 0 : m.salutation) || "",
10840
- phonenumber: (m == null ? void 0 : m.phonenumber) || "",
10841
- mobileCountryCode: (m == null ? void 0 : m.mobileCountryCode) || "",
10842
- street: (m == null ? void 0 : m.street) || "",
10843
- streetNumber: (m == null ? void 0 : m.streetNumber) || "",
10844
- city: (m == null ? void 0 : m.city) || "",
10845
- zip: (m == null ? void 0 : m.zip) || "",
10846
- country: (m == null ? void 0 : m.country) || "",
10847
- nationality: (m == null ? void 0 : m.nationality) || "",
10848
- taxCountry: (m == null ? void 0 : m.taxCountry) || "",
10849
- countryOfBirth: (m == null ? void 0 : m.countryOfBirth) || "",
10850
- placeOfBirth: (m == null ? void 0 : m.placeOfBirth) || "",
10851
- educationLevel: (m == null ? void 0 : m.educationLevel) || "",
10852
- occupation: (m == null ? void 0 : m.occupation) || "",
10853
- taxNumber: (m == null ? void 0 : m.taxNumber) || "",
10854
- defaultLanguage: (m == null ? void 0 : m.defaultLanguage) || ""
10834
+ firstName: (p == null ? void 0 : p.firstName) || "",
10835
+ lastName: (p == null ? void 0 : p.lastName) || "",
10836
+ email: (p == null ? void 0 : p.email) || "",
10837
+ dateOfBirth: (p == null ? void 0 : p.dateOfBirth) || "",
10838
+ title: (p == null ? void 0 : p.title) || "",
10839
+ salutation: (p == null ? void 0 : p.salutation) || "",
10840
+ phonenumber: (p == null ? void 0 : p.phonenumber) || "",
10841
+ mobileCountryCode: (p == null ? void 0 : p.mobileCountryCode) || "",
10842
+ street: (p == null ? void 0 : p.street) || "",
10843
+ streetNumber: (p == null ? void 0 : p.streetNumber) || "",
10844
+ city: (p == null ? void 0 : p.city) || "",
10845
+ zip: (p == null ? void 0 : p.zip) || "",
10846
+ country: (p == null ? void 0 : p.country) || "",
10847
+ nationality: (p == null ? void 0 : p.nationality) || "",
10848
+ taxCountry: (p == null ? void 0 : p.taxCountry) || "",
10849
+ countryOfBirth: (p == null ? void 0 : p.countryOfBirth) || "",
10850
+ placeOfBirth: (p == null ? void 0 : p.placeOfBirth) || "",
10851
+ educationLevel: (p == null ? void 0 : p.educationLevel) || "",
10852
+ occupation: (p == null ? void 0 : p.occupation) || "",
10853
+ taxNumber: (p == null ? void 0 : p.taxNumber) || "",
10854
+ defaultLanguage: (p == null ? void 0 : p.defaultLanguage) || ""
10855
10855
  }), J.reset({
10856
- street: (m == null ? void 0 : m.street) || "",
10857
- streetNumber: (m == null ? void 0 : m.streetNumber) || "",
10858
- city: (m == null ? void 0 : m.city) || "",
10859
- zip: (m == null ? void 0 : m.zip) || "",
10860
- country: (m == null ? void 0 : m.country) || "",
10861
- nationality: (m == null ? void 0 : m.nationality) || "",
10862
- phonenumber: (m == null ? void 0 : m.phonenumber) || ""
10856
+ street: (p == null ? void 0 : p.street) || "",
10857
+ streetNumber: (p == null ? void 0 : p.streetNumber) || "",
10858
+ city: (p == null ? void 0 : p.city) || "",
10859
+ zip: (p == null ? void 0 : p.zip) || "",
10860
+ country: (p == null ? void 0 : p.country) || "",
10861
+ nationality: (p == null ? void 0 : p.nationality) || "",
10862
+ phonenumber: (p == null ? void 0 : p.phonenumber) || ""
10863
10863
  }), h.kycRecords && h.kycRecords.length > 0 && h.kycRecords[0].providerTokenObject !== null && !de.current && W.current) {
10864
10864
  console.log("[Identity] Review page disabled + existing identity — auto-requesting..."), de.current = !0;
10865
10865
  try {
@@ -10875,12 +10875,12 @@ const Wa = ({
10875
10875
  }
10876
10876
  })();
10877
10877
  }, [e]), fe(() => {
10878
- p && !F && W.current && (console.log("[Identity] Review page disabled — showing cached provider"), X(!0));
10879
- }, [p, F]), fe(() => {
10878
+ m && !F && W.current && (console.log("[Identity] Review page disabled — showing cached provider"), X(!0));
10879
+ }, [m, F]), fe(() => {
10880
10880
  if (y) {
10881
10881
  if (y.expiresAt) {
10882
- const g = new Date(y.expiresAt).getTime();
10883
- if (Date.now() >= g) {
10882
+ const f = new Date(y.expiresAt).getTime();
10883
+ if (Date.now() >= f) {
10884
10884
  console.warn("[Identity] Token has expired (expiresAt)"), me(!0), H(r("identity.sessionExpired"));
10885
10885
  return;
10886
10886
  }
@@ -10906,28 +10906,28 @@ const Wa = ({
10906
10906
  }, [t]);
10907
10907
  fe(() => {
10908
10908
  if (!F || !e || ve.current) return;
10909
- const g = Date.now(), h = async () => {
10909
+ const f = Date.now(), h = async () => {
10910
10910
  var E;
10911
10911
  if (!ve.current)
10912
10912
  try {
10913
10913
  const I = await n.getProgress(e);
10914
10914
  if (ve.current) return;
10915
- const q = (E = I.currentStep) == null ? void 0 : E.action, d = I.status;
10915
+ const q = (E = I.currentStep) == null ? void 0 : E.action, c = I.status;
10916
10916
  if (q !== void 0 && q !== ae.IdentitySdk) {
10917
10917
  console.log("[Identity Polling] Step changed — advancing"), Ce();
10918
10918
  return;
10919
10919
  }
10920
- if (d === qe.Finished) {
10920
+ if (c === qe.Finished) {
10921
10921
  console.log("[Identity Polling] Status finished — advancing"), Ce();
10922
10922
  return;
10923
10923
  }
10924
- if (d === qe.IdentityPending)
10924
+ if (c === qe.IdentityPending)
10925
10925
  return;
10926
- if (d === qe.OnHold) {
10926
+ if (c === qe.OnHold) {
10927
10927
  console.log("[Identity Polling] On hold — keep polling");
10928
10928
  return;
10929
10929
  }
10930
- Date.now() - g > Re && (console.log("[Identity Polling] Max poll duration reached — stopping"), he.current && (clearInterval(he.current), he.current = null));
10930
+ Date.now() - f > Re && (console.log("[Identity Polling] Max poll duration reached — stopping"), he.current && (clearInterval(he.current), he.current = null));
10931
10931
  } catch (I) {
10932
10932
  console.warn("[Identity Polling] Error:", I);
10933
10933
  }
@@ -10936,16 +10936,16 @@ const Wa = ({
10936
10936
  he.current && (clearInterval(he.current), he.current = null);
10937
10937
  };
10938
10938
  }, [F, e, n, Ce]);
10939
- const _e = f !== null && f === Ge.Sumsub;
10939
+ const _e = g !== null && g === Ge.Sumsub;
10940
10940
  fe(() => {
10941
- if (f !== null && y && !N && F && !re) {
10942
- const g = f;
10941
+ if (g !== null && y && !N && F && !re) {
10942
+ const f = g;
10943
10943
  if (_e) {
10944
10944
  console.log("[Sumsub] Fetching access token for Web SDK…"), H(null), (async () => {
10945
10945
  try {
10946
- const h = await l.refreshSumsubToken(e), E = ct.parseProviderConfig(f, y, c);
10946
+ const h = await l.refreshSumsubToken(e), E = ct.parseProviderConfig(g, y, d);
10947
10947
  E.accessToken = h, E.onTokenRefresh = () => l.refreshSumsubToken(e);
10948
- const I = ct.createProvider(f, E);
10948
+ const I = ct.createProvider(g, E);
10949
10949
  I.onComplete((q) => {
10950
10950
  console.log("[Sumsub] Verification complete:", q), le("processing"), setTimeout(() => Ce(), 3e3);
10951
10951
  }), I.onError((q) => {
@@ -10960,11 +10960,11 @@ const Wa = ({
10960
10960
  if (y.url) {
10961
10961
  console.log("[Identity] Loading provider URL for user verification:", y.url), H(null);
10962
10962
  try {
10963
- if (new URL(y.url), g === Ge.SardinAI) {
10963
+ if (new URL(y.url), f === Ge.SardinAI) {
10964
10964
  console.log("[SardinAI] Initializing Risk SDK in background...");
10965
10965
  try {
10966
- const h = ct.parseProviderConfig(f, y, c);
10967
- ct.createProvider(f, h).initialize().then(() => console.log("[SardinAI] Risk SDK initialized in background")).catch((I) => console.warn("[SardinAI] Risk SDK init failed (non-blocking):", I));
10966
+ const h = ct.parseProviderConfig(g, y, d);
10967
+ ct.createProvider(g, h).initialize().then(() => console.log("[SardinAI] Risk SDK initialized in background")).catch((I) => console.warn("[SardinAI] Risk SDK init failed (non-blocking):", I));
10968
10968
  } catch (h) {
10969
10969
  console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", h);
10970
10970
  }
@@ -10975,16 +10975,16 @@ const Wa = ({
10975
10975
  }
10976
10976
  return;
10977
10977
  }
10978
- if (g === Ge.SardinAI) {
10978
+ if (f === Ge.SardinAI) {
10979
10979
  console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), H(null);
10980
10980
  try {
10981
- const h = ct.parseProviderConfig(f, y, c), E = ct.createProvider(f, h);
10981
+ const h = ct.parseProviderConfig(g, y, d), E = ct.createProvider(g, h);
10982
10982
  E.initialize().then(() => {
10983
10983
  console.log("[SardinAI] Risk SDK initialized successfully"), U(E), le("processing"), setTimeout(() => Ce(), 3e3);
10984
10984
  }).catch((I) => {
10985
- var d;
10985
+ var c;
10986
10986
  console.error("[SardinAI] Failed to initialize:", I);
10987
- const q = ((d = I.message) == null ? void 0 : d.toLowerCase()) || "";
10987
+ const q = ((c = I.message) == null ? void 0 : c.toLowerCase()) || "";
10988
10988
  q.includes("expired") || q.includes("invalid") || q.includes("401") || q.includes("400") ? (me(!0), H(r("identity.sessionExpiredOrInvalid"))) : H(r("identity.failedToInitialize", { message: I.message }));
10989
10989
  });
10990
10990
  } catch (h) {
@@ -10994,8 +10994,8 @@ const Wa = ({
10994
10994
  }
10995
10995
  try {
10996
10996
  H(null);
10997
- const h = ct.parseProviderConfig(f, y, c), E = ct.createProvider(f, h);
10998
- g === Ge.Onfido && E.initialize("identity-container").catch((I) => {
10997
+ const h = ct.parseProviderConfig(g, y, d), E = ct.createProvider(g, h);
10998
+ f === Ge.Onfido && E.initialize("identity-container").catch((I) => {
10999
10999
  console.error("[Onfido] Initialization error:", I), H(r("identity.failedToInitialize", { message: I.message }));
11000
11000
  }), U(E);
11001
11001
  } catch (h) {
@@ -11006,16 +11006,16 @@ const Wa = ({
11006
11006
  if (N && N.destroy)
11007
11007
  try {
11008
11008
  N.destroy();
11009
- } catch (g) {
11010
- console.error("[Identity] Error destroying provider:", g);
11009
+ } catch (f) {
11010
+ console.error("[Identity] Error destroying provider:", f);
11011
11011
  }
11012
11012
  };
11013
- }, [f, y, N, F, t, re, _e, e, c, l, Ce]);
11013
+ }, [g, y, N, F, t, re, _e, e, d, l, Ce]);
11014
11014
  const st = async () => {
11015
11015
  try {
11016
11016
  H(null), me(!1), await S(), X(!0);
11017
- } catch (g) {
11018
- console.error("Error starting identity verification:", g);
11017
+ } catch (f) {
11018
+ console.error("Error starting identity verification:", f);
11019
11019
  }
11020
11020
  }, [Ze, Ye] = T(!1), ze = async () => {
11021
11021
  try {
@@ -11025,16 +11025,16 @@ const Wa = ({
11025
11025
  } catch {
11026
11026
  }
11027
11027
  U(null);
11028
- } catch (g) {
11029
- console.error("[Sumsub] Reset error:", g), H(g.message || r("identity.failedToRestart"));
11028
+ } catch (f) {
11029
+ console.error("[Sumsub] Reset error:", f), H(f.message || r("identity.failedToRestart"));
11030
11030
  } finally {
11031
11031
  Ye(!1);
11032
11032
  }
11033
11033
  }, Qe = async () => {
11034
11034
  try {
11035
11035
  H(null), me(!1), U(null), console.log("[Identity] Restarting verification..."), await B(), X(!0);
11036
- } catch (g) {
11037
- console.error("Error restarting identity verification:", g), H(g.message || r("identity.failedToRestart"));
11036
+ } catch (f) {
11037
+ console.error("Error restarting identity verification:", f), H(f.message || r("identity.failedToRestart"));
11038
11038
  }
11039
11039
  };
11040
11040
  if (v || x)
@@ -11103,8 +11103,8 @@ const Wa = ({
11103
11103
  /* @__PURE__ */ i("h3", { className: "text-lg font-semibold mb-2", style: { color: "var(--metakyc-text-primary, #111827)" }, children: r("identity.verificationProcessing") }),
11104
11104
  /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r("identity.processingSubtitle") })
11105
11105
  ] }) }) });
11106
- if (F && p) {
11107
- const g = f;
11106
+ if (F && m) {
11107
+ const f = g;
11108
11108
  return _e ? /* @__PURE__ */ s("div", { style: {
11109
11109
  background: "var(--metakyc-background, #ffffff)",
11110
11110
  borderRadius: "12px",
@@ -11189,7 +11189,7 @@ const Wa = ({
11189
11189
  var E, I, q;
11190
11190
  console.log("[Identity] Iframe loaded");
11191
11191
  try {
11192
- const d = h.target, L = d.contentDocument || ((E = d.contentWindow) == null ? void 0 : E.document);
11192
+ const c = h.target, L = c.contentDocument || ((E = c.contentWindow) == null ? void 0 : E.document);
11193
11193
  if (L) {
11194
11194
  const C = ((q = (I = L.body) == null ? void 0 : I.textContent) == null ? void 0 : q.toLowerCase()) || "";
11195
11195
  (C.includes("expired") || C.includes("invalid") || C.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), me(!0), H(r("identity.linkExpired")));
@@ -11202,7 +11202,7 @@ const Wa = ({
11202
11202
  ) })
11203
11203
  ] }),
11204
11204
  He && /* @__PURE__ */ i(Ee, { children: /* @__PURE__ */ i(se, { variant: "outline", onClick: He, children: r("common.back") }) })
11205
- ] }) : g === Ge.SardinAI ? /* @__PURE__ */ s(ne, { children: [
11205
+ ] }) : f === Ge.SardinAI ? /* @__PURE__ */ s(ne, { children: [
11206
11206
  /* @__PURE__ */ s(Le, { children: [
11207
11207
  /* @__PURE__ */ i("h2", { className: "text-2xl font-bold", children: r("identity.deviceRiskAssessment") }),
11208
11208
  /* @__PURE__ */ i("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: r("identity.analyzingDevice") })
@@ -11221,17 +11221,17 @@ const Wa = ({
11221
11221
  He && /* @__PURE__ */ i(Ee, { children: /* @__PURE__ */ i(se, { variant: "outline", onClick: He, children: r("common.back") }) })
11222
11222
  ] });
11223
11223
  }
11224
- const et = /* @__PURE__ */ new Set(["country", "nationality", "taxCountry", "countryOfBirth", "mobileCountryCode", "otherNationality"]), De = (g = 4) => {
11225
- const h = Math.min(4, Math.max(1, Number(g) || 4));
11224
+ const et = /* @__PURE__ */ new Set(["country", "nationality", "taxCountry", "countryOfBirth", "mobileCountryCode", "otherNationality"]), De = (f = 4) => {
11225
+ const h = Math.min(4, Math.max(1, Number(f) || 4));
11226
11226
  return { gridColumn: `span ${h} / span ${h}` };
11227
- }, mt = (g, h) => {
11227
+ }, mt = (f, h) => {
11228
11228
  if (!h && h !== 0) return "—";
11229
- if (et.has(g) && g !== "mobileCountryCode") {
11229
+ if (et.has(f) && f !== "mobileCountryCode") {
11230
11230
  const E = M.find((I) => I.value === h);
11231
11231
  return E ? E.label : String(h);
11232
11232
  }
11233
11233
  return String(h);
11234
- }, wt = ({ helpText: g }) => {
11234
+ }, wt = ({ helpText: f }) => {
11235
11235
  const [h, E] = T(!1), I = pe(null), [, q] = T({ top: 0, left: 0 });
11236
11236
  return /* @__PURE__ */ s(bt, { children: [
11237
11237
  /* @__PURE__ */ i(
@@ -11298,7 +11298,7 @@ const Wa = ({
11298
11298
  boxShadow: "0 24px 64px rgba(0,0,0,0.4)"
11299
11299
  },
11300
11300
  children: [
11301
- /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: g }, style: { fontSize: 13, color: "var(--metakyc-text-primary, #111827)", lineHeight: 1.6 } }),
11301
+ /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: f }, style: { fontSize: 13, color: "var(--metakyc-text-primary, #111827)", lineHeight: 1.6 } }),
11302
11302
  /* @__PURE__ */ i(
11303
11303
  "button",
11304
11304
  {
@@ -11325,81 +11325,81 @@ const Wa = ({
11325
11325
  document.body
11326
11326
  )
11327
11327
  ] });
11328
- }, Pe = (g, h) => h ? /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "flex-start", gap: 5, flexWrap: "nowrap" }, children: [
11329
- /* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0 }, children: g }),
11328
+ }, Pe = (f, h) => h ? /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "flex-start", gap: 5, flexWrap: "nowrap" }, children: [
11329
+ /* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0 }, children: f }),
11330
11330
  /* @__PURE__ */ i("div", { style: { paddingTop: 24 }, children: /* @__PURE__ */ i(wt, { helpText: h }) })
11331
- ] }) : g, xt = (g, h) => {
11332
- const E = `cf-${h}`, I = g.paramName ?? "", q = P[I];
11333
- if (g.customType === "br")
11334
- return /* @__PURE__ */ i("div", { style: { ...De(g.colSpan), minHeight: "0.5rem" } }, E);
11335
- if (g.customType === "paragraph")
11336
- return /* @__PURE__ */ i("div", { style: De(g.colSpan), children: /* @__PURE__ */ i(
11331
+ ] }) : f, xt = (f, h) => {
11332
+ const E = `cf-${h}`, I = f.paramName ?? "", q = P[I];
11333
+ if (f.customType === "br")
11334
+ return /* @__PURE__ */ i("div", { style: { ...De(f.colSpan), minHeight: "0.5rem" } }, E);
11335
+ if (f.customType === "paragraph")
11336
+ return /* @__PURE__ */ i("div", { style: De(f.colSpan), children: /* @__PURE__ */ i(
11337
11337
  "div",
11338
11338
  {
11339
11339
  className: "text-sm",
11340
11340
  style: { color: "var(--metakyc-text-secondary, #6b7280)" },
11341
- dangerouslySetInnerHTML: { __html: g.label || "" }
11341
+ dangerouslySetInnerHTML: { __html: f.label || "" }
11342
11342
  }
11343
11343
  ) }, E);
11344
- if (g.customType === "html")
11344
+ if (f.customType === "html")
11345
11345
  return /* @__PURE__ */ i(
11346
11346
  "div",
11347
11347
  {
11348
- style: De(g.colSpan),
11349
- dangerouslySetInnerHTML: { __html: g.label || "" }
11348
+ style: De(f.colSpan),
11349
+ dangerouslySetInnerHTML: { __html: f.label || "" }
11350
11350
  },
11351
11351
  E
11352
11352
  );
11353
- if (g.customType === "link")
11354
- return /* @__PURE__ */ i("div", { style: De(g.colSpan), children: Pe(
11353
+ if (f.customType === "link")
11354
+ return /* @__PURE__ */ i("div", { style: De(f.colSpan), children: Pe(
11355
11355
  /* @__PURE__ */ i(
11356
11356
  "a",
11357
11357
  {
11358
- href: g.linkUrl ?? "#",
11358
+ href: f.linkUrl ?? "#",
11359
11359
  target: "_blank",
11360
11360
  rel: "noopener noreferrer",
11361
11361
  className: "text-sm underline",
11362
11362
  style: { color: "var(--metakyc-primary, #6366f1)" },
11363
- children: ie(g.displayText, r) || ie(g.label, r) || g.linkText || g.linkUrl
11363
+ children: ie(f.displayText, r) || ie(f.label, r) || f.linkText || f.linkUrl
11364
11364
  }
11365
11365
  ),
11366
- g.helpText
11366
+ f.helpText
11367
11367
  ) }, E);
11368
- if (g.customType === "checkbox" || g.customType === "link_checkbox") {
11369
- const d = q === "true" || q === !0;
11370
- return /* @__PURE__ */ i("div", { style: De(g.colSpan), children: Pe(
11368
+ if (f.customType === "checkbox" || f.customType === "link_checkbox") {
11369
+ const c = q === "true" || q === !0;
11370
+ return /* @__PURE__ */ i("div", { style: De(f.colSpan), children: Pe(
11371
11371
  /* @__PURE__ */ s("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
11372
11372
  /* @__PURE__ */ i(
11373
11373
  Xe,
11374
11374
  {
11375
- checked: !!d,
11375
+ checked: !!c,
11376
11376
  onChange: (L) => j((C) => ({ ...C, [I]: String(L) })),
11377
11377
  style: { marginTop: 2 }
11378
11378
  }
11379
11379
  ),
11380
- /* @__PURE__ */ i("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: g.customType === "link_checkbox" && g.linkUrl ? /* @__PURE__ */ s(bt, { children: [
11381
- /* @__PURE__ */ i("a", { href: g.linkUrl, target: "_blank", rel: "noopener noreferrer", style: { color: "var(--metakyc-primary, #6366f1)", textDecoration: "underline" }, children: g.linkText || ie(g.label, r) }),
11382
- g.label && g.linkText ? ` ${ie(g.label, r)}` : ""
11383
- ] }) : ie(g.displayText, r) || ie(g.label, r) })
11380
+ /* @__PURE__ */ i("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: f.customType === "link_checkbox" && f.linkUrl ? /* @__PURE__ */ s(bt, { children: [
11381
+ /* @__PURE__ */ i("a", { href: f.linkUrl, target: "_blank", rel: "noopener noreferrer", style: { color: "var(--metakyc-primary, #6366f1)", textDecoration: "underline" }, children: f.linkText || ie(f.label, r) }),
11382
+ f.label && f.linkText ? ` ${ie(f.label, r)}` : ""
11383
+ ] }) : ie(f.displayText, r) || ie(f.label, r) })
11384
11384
  ] }),
11385
- g.helpText
11385
+ f.helpText
11386
11386
  ) }, E);
11387
11387
  }
11388
- if (g.customType === "group_checkbox") {
11389
- const d = Array.isArray(q) ? q : q ? [q] : [], L = (C) => {
11390
- g.singleSelect ? j((m) => ({ ...m, [I]: d[0] === C ? [] : [C] })) : j((m) => ({
11391
- ...m,
11392
- [I]: d.includes(C) ? d.filter((k) => k !== C) : [...d, C]
11388
+ if (f.customType === "group_checkbox") {
11389
+ const c = Array.isArray(q) ? q : q ? [q] : [], L = (C) => {
11390
+ f.singleSelect ? j((p) => ({ ...p, [I]: c[0] === C ? [] : [C] })) : j((p) => ({
11391
+ ...p,
11392
+ [I]: c.includes(C) ? c.filter((k) => k !== C) : [...c, C]
11393
11393
  }));
11394
11394
  };
11395
- return /* @__PURE__ */ i("div", { style: De(g.colSpan), children: Pe(
11395
+ return /* @__PURE__ */ i("div", { style: De(f.colSpan), children: Pe(
11396
11396
  /* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
11397
- g.label && /* @__PURE__ */ i("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: ie(g.displayText, r) || ie(g.label, r) }),
11398
- (g.options || []).map((C) => /* @__PURE__ */ s("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
11397
+ f.label && /* @__PURE__ */ i("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: ie(f.displayText, r) || ie(f.label, r) }),
11398
+ (f.options || []).map((C) => /* @__PURE__ */ s("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
11399
11399
  /* @__PURE__ */ i(
11400
11400
  Xe,
11401
11401
  {
11402
- checked: d.includes(C.value),
11402
+ checked: c.includes(C.value),
11403
11403
  onChange: () => L(C.value),
11404
11404
  style: { marginTop: 2 }
11405
11405
  }
@@ -11407,90 +11407,90 @@ const Wa = ({
11407
11407
  /* @__PURE__ */ i("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: C.label })
11408
11408
  ] }, C.value))
11409
11409
  ] }),
11410
- g.helpText
11410
+ f.helpText
11411
11411
  ) }, E);
11412
11412
  }
11413
- return g.customType === "radio_group" ? /* @__PURE__ */ i("div", { style: De(g.colSpan), children: Pe(
11413
+ return f.customType === "radio_group" ? /* @__PURE__ */ i("div", { style: De(f.colSpan), children: Pe(
11414
11414
  /* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
11415
- g.label && /* @__PURE__ */ i("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: ie(g.displayText, r) || ie(g.label, r) }),
11416
- (g.options || []).map((d) => /* @__PURE__ */ s("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
11415
+ f.label && /* @__PURE__ */ i("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: ie(f.displayText, r) || ie(f.label, r) }),
11416
+ (f.options || []).map((c) => /* @__PURE__ */ s("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
11417
11417
  /* @__PURE__ */ i(
11418
11418
  "input",
11419
11419
  {
11420
11420
  type: "radio",
11421
11421
  name: `rg-${I}`,
11422
- value: d.value,
11423
- checked: q === d.value,
11424
- onChange: () => j((L) => ({ ...L, [I]: d.value })),
11422
+ value: c.value,
11423
+ checked: q === c.value,
11424
+ onChange: () => j((L) => ({ ...L, [I]: c.value })),
11425
11425
  style: { width: 16, height: 16, flexShrink: 0, marginTop: 2, accentColor: "var(--metakyc-primary, #6366f1)" }
11426
11426
  }
11427
11427
  ),
11428
- /* @__PURE__ */ i("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: d.label })
11429
- ] }, d.value))
11428
+ /* @__PURE__ */ i("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: c.label })
11429
+ ] }, c.value))
11430
11430
  ] }),
11431
- g.helpText
11432
- ) }, E) : /* @__PURE__ */ i("div", { style: De(g.colSpan), children: Pe(
11431
+ f.helpText
11432
+ ) }, E) : /* @__PURE__ */ i("div", { style: De(f.colSpan), children: Pe(
11433
11433
  /* @__PURE__ */ i(
11434
11434
  Te,
11435
11435
  {
11436
- label: ie(g.displayText, r) || ie(g.label, r) || I,
11436
+ label: ie(f.displayText, r) || ie(f.label, r) || I,
11437
11437
  value: String(q ?? ""),
11438
- onChange: (d) => j((L) => ({ ...L, [I]: d.target.value }))
11438
+ onChange: (c) => j((L) => ({ ...L, [I]: c.target.value }))
11439
11439
  }
11440
11440
  ),
11441
- g.helpText
11441
+ f.helpText
11442
11442
  ) }, E);
11443
- }, pt = (g, h) => {
11444
- if (g.isCustom) return xt(g, h);
11445
- const E = g.name ?? "", I = dt[E], q = ie(g.displayText, r) || (I != null && I.translationKey ? r(`fields.${I.translationKey}`) : void 0) || (I == null ? void 0 : I.label) || E, d = $[E] ?? "", L = E === "mobileCountryCode", C = !!(I != null && I.countriesType) && !L;
11446
- return g.editable ? L ? /* @__PURE__ */ i("div", { style: De(g.colSpan ?? 2), children: Pe(
11443
+ }, pt = (f, h) => {
11444
+ if (f.isCustom) return xt(f, h);
11445
+ const E = f.name ?? "", I = dt[E], q = ie(f.displayText, r) || (I != null && I.translationKey ? r(`fields.${I.translationKey}`) : void 0) || (I == null ? void 0 : I.label) || E, c = $[E] ?? "", L = E === "mobileCountryCode", C = !!(I != null && I.countriesType) && !L;
11446
+ return f.editable ? L ? /* @__PURE__ */ i("div", { style: De(f.colSpan ?? 2), children: Pe(
11447
11447
  /* @__PURE__ */ i(
11448
11448
  nt,
11449
11449
  {
11450
11450
  label: q,
11451
- value: String(d),
11452
- onChange: (m) => R((k) => ({ ...k, [E]: m })),
11451
+ value: String(c),
11452
+ onChange: (p) => R((k) => ({ ...k, [E]: p })),
11453
11453
  options: [{ value: "", label: r("placeholders.selectCountryCode") }, ...G]
11454
11454
  }
11455
11455
  ),
11456
- g.helpText
11457
- ) }, `epc-${h}`) : C ? /* @__PURE__ */ i("div", { style: De(g.colSpan ?? 2), children: Pe(
11456
+ f.helpText
11457
+ ) }, `epc-${h}`) : C ? /* @__PURE__ */ i("div", { style: De(f.colSpan ?? 2), children: Pe(
11458
11458
  /* @__PURE__ */ i(
11459
11459
  nt,
11460
11460
  {
11461
11461
  label: q,
11462
- value: String(d),
11463
- onChange: (m) => R((k) => ({ ...k, [E]: m })),
11462
+ value: String(c),
11463
+ onChange: (p) => R((k) => ({ ...k, [E]: p })),
11464
11464
  options: [{ value: "", label: r("common.select") }, ...M]
11465
11465
  }
11466
11466
  ),
11467
- g.helpText
11468
- ) }, `ec-${h}`) : /* @__PURE__ */ i("div", { style: De(g.colSpan ?? 2), children: Pe(
11467
+ f.helpText
11468
+ ) }, `ec-${h}`) : /* @__PURE__ */ i("div", { style: De(f.colSpan ?? 2), children: Pe(
11469
11469
  /* @__PURE__ */ i(
11470
11470
  Te,
11471
11471
  {
11472
11472
  label: q,
11473
11473
  type: (I == null ? void 0 : I.type) === "date" ? "date" : (I == null ? void 0 : I.type) === "email" ? "email" : "text",
11474
- value: String(d),
11475
- onChange: (m) => R((k) => ({ ...k, [E]: m.target.value }))
11474
+ value: String(c),
11475
+ onChange: (p) => R((k) => ({ ...k, [E]: p.target.value }))
11476
11476
  }
11477
11477
  ),
11478
- g.helpText
11479
- ) }, `ei-${h}`) : /* @__PURE__ */ i("div", { style: De(g.colSpan ?? 2), children: Pe(
11478
+ f.helpText
11479
+ ) }, `ei-${h}`) : /* @__PURE__ */ i("div", { style: De(f.colSpan ?? 2), children: Pe(
11480
11480
  /* @__PURE__ */ s(bt, { children: [
11481
11481
  /* @__PURE__ */ i("label", { className: "block text-sm font-medium mb-0.5", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: q }),
11482
- /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)", minHeight: "1.5rem" }, children: mt(E, d) })
11482
+ /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)", minHeight: "1.5rem" }, children: mt(E, c) })
11483
11483
  ] }),
11484
- g.helpText
11484
+ f.helpText
11485
11485
  ) }, `ro-${h}`);
11486
11486
  };
11487
11487
  if (Z) {
11488
- const g = ie(Z.title, r) || r("identity.reviewYourInformation"), h = ie(Z.subtitle, r) || r("identity.reviewSubtitle");
11488
+ const f = ie(Z.title, r) || r("identity.reviewYourInformation"), h = ie(Z.subtitle, r) || r("identity.reviewSubtitle");
11489
11489
  return /* @__PURE__ */ i("form", { onSubmit: (E) => {
11490
11490
  E.preventDefault(), st();
11491
11491
  }, children: /* @__PURE__ */ s(ne, { children: [
11492
11492
  /* @__PURE__ */ s(Le, { children: [
11493
- /* @__PURE__ */ i("h2", { className: "text-lg font-bold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: g }),
11493
+ /* @__PURE__ */ i("h2", { className: "text-lg font-bold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: f }),
11494
11494
  h && /* @__PURE__ */ i("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: h })
11495
11495
  ] }),
11496
11496
  /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: Z.fields.map((E, I) => pt(E, I)) }) }),
@@ -11510,10 +11510,10 @@ const Wa = ({
11510
11510
  { label: r("fields.name"), value: `${((gt = K == null ? void 0 : K.applicantRequestData) == null ? void 0 : gt.firstName) || ""} ${((b = K == null ? void 0 : K.applicantRequestData) == null ? void 0 : b.lastName) || ""}`.trim() },
11511
11511
  { label: r("fields.email"), value: (V = K == null ? void 0 : K.applicantRequestData) == null ? void 0 : V.email },
11512
11512
  { label: r("fields.dateOfBirth"), value: ((D = K == null ? void 0 : K.applicantRequestData) == null ? void 0 : D.dateOfBirth) || r("fields.notProvided") }
11513
- ].map(({ label: g, value: h }) => /* @__PURE__ */ s("div", { children: [
11514
- /* @__PURE__ */ i("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: g }),
11513
+ ].map(({ label: f, value: h }) => /* @__PURE__ */ s("div", { children: [
11514
+ /* @__PURE__ */ i("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: f }),
11515
11515
  /* @__PURE__ */ i("p", { className: "mt-1 text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children: h })
11516
- ] }, g)) }),
11516
+ ] }, f)) }),
11517
11517
  /* @__PURE__ */ s("div", { className: "space-y-4", children: [
11518
11518
  /* @__PURE__ */ i("h3", { className: "text-base font-semibold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: r("fields.addressInformation") }),
11519
11519
  /* @__PURE__ */ s("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
@@ -11522,12 +11522,12 @@ const Wa = ({
11522
11522
  {
11523
11523
  control: J.control,
11524
11524
  name: "country",
11525
- render: ({ field: g }) => /* @__PURE__ */ i(
11525
+ render: ({ field: f }) => /* @__PURE__ */ i(
11526
11526
  nt,
11527
11527
  {
11528
11528
  label: r("fields.country"),
11529
- value: g.value,
11530
- onChange: g.onChange,
11529
+ value: f.value,
11530
+ onChange: f.onChange,
11531
11531
  options: [{ value: "", label: r("placeholders.selectCountry") }, ...M]
11532
11532
  }
11533
11533
  )
@@ -11538,12 +11538,12 @@ const Wa = ({
11538
11538
  {
11539
11539
  control: J.control,
11540
11540
  name: "nationality",
11541
- render: ({ field: g }) => /* @__PURE__ */ i(
11541
+ render: ({ field: f }) => /* @__PURE__ */ i(
11542
11542
  nt,
11543
11543
  {
11544
11544
  label: r("fields.nationality"),
11545
- value: g.value,
11546
- onChange: g.onChange,
11545
+ value: f.value,
11546
+ onChange: f.onChange,
11547
11547
  options: [{ value: "", label: r("placeholders.selectNationality") }, ...M]
11548
11548
  }
11549
11549
  )
@@ -11551,14 +11551,14 @@ const Wa = ({
11551
11551
  )
11552
11552
  ] }),
11553
11553
  /* @__PURE__ */ s("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
11554
- /* @__PURE__ */ i(yt, { control: J.control, name: "street", render: ({ field: g }) => /* @__PURE__ */ i(Te, { ...g, label: r("fields.street") }) }),
11555
- /* @__PURE__ */ i(yt, { control: J.control, name: "streetNumber", render: ({ field: g }) => /* @__PURE__ */ i(Te, { ...g, label: r("fields.streetNumber") }) })
11554
+ /* @__PURE__ */ i(yt, { control: J.control, name: "street", render: ({ field: f }) => /* @__PURE__ */ i(Te, { ...f, label: r("fields.street") }) }),
11555
+ /* @__PURE__ */ i(yt, { control: J.control, name: "streetNumber", render: ({ field: f }) => /* @__PURE__ */ i(Te, { ...f, label: r("fields.streetNumber") }) })
11556
11556
  ] }),
11557
11557
  /* @__PURE__ */ s("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
11558
- /* @__PURE__ */ i(yt, { control: J.control, name: "city", render: ({ field: g }) => /* @__PURE__ */ i(Te, { ...g, label: r("fields.city") }) }),
11559
- /* @__PURE__ */ i(yt, { control: J.control, name: "zip", render: ({ field: g }) => /* @__PURE__ */ i(Te, { ...g, label: r("fields.zip") }) })
11558
+ /* @__PURE__ */ i(yt, { control: J.control, name: "city", render: ({ field: f }) => /* @__PURE__ */ i(Te, { ...f, label: r("fields.city") }) }),
11559
+ /* @__PURE__ */ i(yt, { control: J.control, name: "zip", render: ({ field: f }) => /* @__PURE__ */ i(Te, { ...f, label: r("fields.zip") }) })
11560
11560
  ] }),
11561
- /* @__PURE__ */ i(yt, { control: J.control, name: "phonenumber", render: ({ field: g }) => /* @__PURE__ */ i(Te, { ...g, label: r("fields.phoneNumber"), type: "tel" }) })
11561
+ /* @__PURE__ */ i(yt, { control: J.control, name: "phonenumber", render: ({ field: f }) => /* @__PURE__ */ i(Te, { ...f, label: r("fields.phoneNumber"), type: "tel" }) })
11562
11562
  ] })
11563
11563
  ] }),
11564
11564
  /* @__PURE__ */ s(Ee, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
@@ -11710,8 +11710,8 @@ const hi = ({
11710
11710
  subtitle: t,
11711
11711
  className: a = ""
11712
11712
  }) => {
11713
- const { currentTheme: r } = Se(), { t: n } = Ie(), o = e || (r == null ? void 0 : r.title) || "", l = ie(o, n), c = ie(t, n), u = !!(r != null && r.logo && r.logo.visible && r.logo.url), p = !!l;
11714
- return !u && !p ? null : /* @__PURE__ */ s("div", { className: `metakyc-header ${a}`, children: [
11713
+ const { currentTheme: r } = Se(), { t: n } = Ie(), o = e || (r == null ? void 0 : r.title) || "", l = ie(o, n), d = ie(t, n), u = !!(r != null && r.logo && r.logo.visible && r.logo.url), m = !!l;
11714
+ return !u && !m ? null : /* @__PURE__ */ s("div", { className: `metakyc-header ${a}`, children: [
11715
11715
  /* @__PURE__ */ s(
11716
11716
  "div",
11717
11717
  {
@@ -11719,18 +11719,18 @@ const hi = ({
11719
11719
  style: { color: "var(--metakyc-text-primary, #111827)" },
11720
11720
  children: [
11721
11721
  u && /* @__PURE__ */ i(Ga, { config: r.logo }),
11722
- u && p && /* @__PURE__ */ i(
11722
+ u && m && /* @__PURE__ */ i(
11723
11723
  "span",
11724
11724
  {
11725
11725
  style: { fontSize: "1.5rem", fontWeight: 300, color: "var(--metakyc-text-muted, #9ca3af)", margin: "0 12px" },
11726
11726
  children: "|"
11727
11727
  }
11728
11728
  ),
11729
- p && /* @__PURE__ */ i("span", { style: { color: "var(--metakyc-text-primary, #111827)" }, children: l })
11729
+ m && /* @__PURE__ */ i("span", { style: { color: "var(--metakyc-text-primary, #111827)" }, children: l })
11730
11730
  ]
11731
11731
  }
11732
11732
  ),
11733
- c && /* @__PURE__ */ i("p", { className: "text-sm mt-1", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: c })
11733
+ d && /* @__PURE__ */ i("p", { className: "text-sm mt-1", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: d })
11734
11734
  ] });
11735
11735
  }, Mi = Gt(null), ji = () => Qt(Mi);
11736
11736
  function It() {
@@ -11738,32 +11738,32 @@ function It() {
11738
11738
  return t.current = e, t;
11739
11739
  }
11740
11740
  const Qa = ({ children: e }) => {
11741
- const [t, a] = T([]), [r, n] = T({}), o = pe([]), l = ee((f) => {
11742
- o.current = [...o.current.filter((y) => y.id !== f.id), f], a([...o.current]);
11743
- }, []), c = ee((f) => {
11744
- o.current = o.current.filter((y) => y.id !== f), a([...o.current]);
11745
- }, []), u = ee((f) => {
11741
+ const [t, a] = T([]), [r, n] = T({}), o = pe([]), l = ee((g) => {
11742
+ o.current = [...o.current.filter((y) => y.id !== g.id), g], a([...o.current]);
11743
+ }, []), d = ee((g) => {
11744
+ o.current = o.current.filter((y) => y.id !== g), a([...o.current]);
11745
+ }, []), u = ee((g) => {
11746
11746
  n((y) => {
11747
- const x = { ...y, ...f };
11748
- return Object.keys(f).some((S) => y[S] !== f[S]) ? x : y;
11747
+ const x = { ...y, ...g };
11748
+ return Object.keys(g).some((S) => y[S] !== g[S]) ? x : y;
11749
11749
  });
11750
- }, []), p = Ue(
11751
- () => ({ actions: t, registerAction: l, unregisterAction: c, sdkState: r, updateSdkState: u }),
11752
- [t, l, c, r, u]
11750
+ }, []), m = Ue(
11751
+ () => ({ actions: t, registerAction: l, unregisterAction: d, sdkState: r, updateSdkState: u }),
11752
+ [t, l, d, r, u]
11753
11753
  );
11754
- return /* @__PURE__ */ i(Mi.Provider, { value: p, children: e });
11754
+ return /* @__PURE__ */ i(Mi.Provider, { value: m, children: e });
11755
11755
  }, ki = 2147483640, Xa = () => {
11756
- const e = ji(), [t, a] = T(!1), [r, n] = T("actions"), [o, l] = T(null), c = pe(null);
11756
+ const e = ji(), [t, a] = T(!1), [r, n] = T("actions"), [o, l] = T(null), d = pe(null);
11757
11757
  if (fe(() => {
11758
11758
  if (!t) return;
11759
11759
  const v = (F) => {
11760
- c.current && !c.current.contains(F.target) && a(!1);
11760
+ d.current && !d.current.contains(F.target) && a(!1);
11761
11761
  }, z = setTimeout(() => document.addEventListener("mousedown", v), 0);
11762
11762
  return () => {
11763
11763
  clearTimeout(z), document.removeEventListener("mousedown", v);
11764
11764
  };
11765
11765
  }, [t]), !e) return null;
11766
- const { actions: u, sdkState: p } = e, f = u.filter((v) => v.group === "form"), y = u.filter((v) => v.group === "workflow"), x = u.filter((v) => !v.group || v.group === "general"), A = async (v, z) => {
11766
+ const { actions: u, sdkState: m } = e, g = u.filter((v) => v.group === "form"), y = u.filter((v) => v.group === "workflow"), x = u.filter((v) => !v.group || v.group === "general"), A = async (v, z) => {
11767
11767
  l(v);
11768
11768
  try {
11769
11769
  await z();
@@ -11872,13 +11872,13 @@ const Qa = ({ children: e }) => {
11872
11872
  F.id
11873
11873
  ))
11874
11874
  ] }), G = () => {
11875
- const v = Object.entries(p);
11875
+ const v = Object.entries(m);
11876
11876
  return v.length === 0 ? /* @__PURE__ */ i("div", { style: { padding: "24px 14px", textAlign: "center", color: "#6c7086" }, children: "No state data available yet" }) : /* @__PURE__ */ i("div", { style: { padding: "8px 0" }, children: v.map(([z, F]) => /* @__PURE__ */ s("div", { style: { padding: "4px 14px", display: "flex", justifyContent: "space-between", gap: "8px" }, children: [
11877
11877
  /* @__PURE__ */ i("span", { style: { color: "#89b4fa", flexShrink: 0 }, children: z }),
11878
11878
  /* @__PURE__ */ i("span", { style: { color: "#a6adc8", textAlign: "right", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: F == null ? /* @__PURE__ */ i("span", { style: { color: "#6c7086", fontStyle: "italic" }, children: "null" }) : typeof F == "object" ? JSON.stringify(F) : String(F) })
11879
11879
  ] }, z)) });
11880
11880
  }, Q = /* @__PURE__ */ s(bt, { children: [
11881
- t && /* @__PURE__ */ s("div", { ref: c, style: B, children: [
11881
+ t && /* @__PURE__ */ s("div", { ref: d, style: B, children: [
11882
11882
  /* @__PURE__ */ s("div", { style: { padding: "12px 14px 8px", display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
11883
11883
  /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [
11884
11884
  /* @__PURE__ */ i("span", { style: { fontSize: "14px" }, children: "🔧" }),
@@ -11906,7 +11906,7 @@ const Qa = ({ children: e }) => {
11906
11906
  /* @__PURE__ */ i("button", { style: U(r === "state"), onClick: () => n("state"), children: "State" })
11907
11907
  ] }),
11908
11908
  /* @__PURE__ */ i("div", { style: { flex: 1, overflowY: "auto", overflowX: "hidden" }, children: r === "actions" ? /* @__PURE__ */ s("div", { style: { paddingBottom: "8px" }, children: [
11909
- Y("Form", f),
11909
+ Y("Form", g),
11910
11910
  Y("Workflow", y),
11911
11911
  Y("General", x),
11912
11912
  u.length === 0 && /* @__PURE__ */ s("div", { style: { padding: "24px 14px", textAlign: "center", color: "#6c7086" }, children: [
@@ -12147,36 +12147,36 @@ const nn = {
12147
12147
  onSuccess: r,
12148
12148
  onCancel: n
12149
12149
  }) => {
12150
- var V, D, g, h, E, I, q;
12151
- const { config: o, baseInformationService: l, currentTheme: c } = Se(), { createApplicant: u, getApplicantData: p, isLoading: f } = Ii(), { t: y } = Ie(), x = e || ((V = o.applicantForm) == null ? void 0 : V.workflowKey);
12150
+ var V, D, f, h, E, I, q;
12151
+ const { config: o, baseInformationService: l, currentTheme: d } = Se(), { createApplicant: u, getApplicantData: m, isLoading: g } = Ii(), { t: y } = Ie(), x = e || ((V = o.applicantForm) == null ? void 0 : V.workflowKey);
12152
12152
  if (!x)
12153
12153
  throw new Error(
12154
12154
  "workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
12155
12155
  );
12156
- const A = t || ((D = o.applicantForm) == null ? void 0 : D.externalRefId) || "", S = ((g = o.applicantForm) == null ? void 0 : g.email) || "", B = ((h = o.applicantForm) == null ? void 0 : h.hiddenValues) || {}, N = ((E = o.applicantForm) == null ? void 0 : E.initialValues) || {}, K = (((I = o.applicantForm) == null ? void 0 : I.fieldLabelMode) || (c == null ? void 0 : c.fieldLabelMode) || "label") !== "placeholder", O = Ue(
12157
- () => c != null && c.applicantFormPages && c.applicantFormPages.length > 0 ? c.applicantFormPages : null,
12158
- [c == null ? void 0 : c.applicantFormPages]
12156
+ const A = t || ((D = o.applicantForm) == null ? void 0 : D.externalRefId) || "", S = ((f = o.applicantForm) == null ? void 0 : f.email) || "", B = ((h = o.applicantForm) == null ? void 0 : h.hiddenValues) || {}, N = ((E = o.applicantForm) == null ? void 0 : E.initialValues) || {}, K = (((I = o.applicantForm) == null ? void 0 : I.fieldLabelMode) || (d == null ? void 0 : d.fieldLabelMode) || "label") !== "placeholder", O = Ue(
12157
+ () => d != null && d.applicantFormPages && d.applicantFormPages.length > 0 ? d.applicantFormPages : null,
12158
+ [d == null ? void 0 : d.applicantFormPages]
12159
12159
  ), M = Ue(() => {
12160
- const d = new Set(Lt), L = c == null ? void 0 : c.applicantFormRequiredFields;
12161
- if (L) for (const C of L) d.add(C);
12160
+ const c = new Set(Lt), L = d == null ? void 0 : d.applicantFormRequiredFields;
12161
+ if (L) for (const C of L) c.add(C);
12162
12162
  if (O)
12163
12163
  for (const C of O)
12164
- for (const m of C.fields)
12165
- !m.isCustom && m.name && m.required && d.add(m.name);
12166
- return Array.from(d);
12167
- }, [c == null ? void 0 : c.applicantFormRequiredFields, O]), Y = Ue(() => {
12164
+ for (const p of C.fields)
12165
+ !p.isCustom && p.name && p.required && c.add(p.name);
12166
+ return Array.from(c);
12167
+ }, [d == null ? void 0 : d.applicantFormRequiredFields, O]), Y = Ue(() => {
12168
12168
  var C;
12169
12169
  if (O) {
12170
- const m = O.flatMap((w) => w.fields).filter((w) => !w.isCustom && w.name).map((w) => w.name), k = new Set(m);
12170
+ const p = O.flatMap((w) => w.fields).filter((w) => !w.isCustom && w.name).map((w) => w.name), k = new Set(p);
12171
12171
  for (const w of Lt) k.add(w);
12172
12172
  return Array.from(k);
12173
12173
  }
12174
- let d;
12175
- (C = o.applicantForm) != null && C.visibleFields ? d = o.applicantForm.visibleFields : c != null && c.applicantFormVisibleFields && c.applicantFormVisibleFields.length > 0 ? d = c.applicantFormVisibleFields : d = er;
12176
- const L = new Set(d);
12177
- for (const m of Lt) L.add(m);
12174
+ let c;
12175
+ (C = o.applicantForm) != null && C.visibleFields ? c = o.applicantForm.visibleFields : d != null && d.applicantFormVisibleFields && d.applicantFormVisibleFields.length > 0 ? c = d.applicantFormVisibleFields : c = er;
12176
+ const L = new Set(c);
12177
+ for (const p of Lt) L.add(p);
12178
12178
  return Array.from(L);
12179
- }, [(q = o.applicantForm) == null ? void 0 : q.visibleFields, c == null ? void 0 : c.applicantFormVisibleFields, O]), G = /* @__PURE__ */ new Set([
12179
+ }, [(q = o.applicantForm) == null ? void 0 : q.visibleFields, d == null ? void 0 : d.applicantFormVisibleFields, O]), G = /* @__PURE__ */ new Set([
12180
12180
  "country",
12181
12181
  "nationality",
12182
12182
  "taxCountry",
@@ -12185,23 +12185,23 @@ const nn = {
12185
12185
  "otherNationality"
12186
12186
  ]), Q = Ue(() => {
12187
12187
  var L, C;
12188
- const d = /* @__PURE__ */ new Set();
12188
+ const c = /* @__PURE__ */ new Set();
12189
12189
  if (O)
12190
- for (const m of O)
12191
- for (const k of m.fields)
12192
- !k.isCustom && k.name && G.has(k.name) && d.add(k.countriesType ?? ((L = dt[k.name]) == null ? void 0 : L.countriesType));
12190
+ for (const p of O)
12191
+ for (const k of p.fields)
12192
+ !k.isCustom && k.name && G.has(k.name) && c.add(k.countriesType ?? ((L = dt[k.name]) == null ? void 0 : L.countriesType));
12193
12193
  else
12194
- for (const m of Y)
12195
- G.has(m) && d.add((C = dt[m]) == null ? void 0 : C.countriesType);
12196
- return d.size === 0 && d.add(void 0), Array.from(d);
12194
+ for (const p of Y)
12195
+ G.has(p) && c.add((C = dt[p]) == null ? void 0 : C.countriesType);
12196
+ return c.size === 0 && c.add(void 0), Array.from(c);
12197
12197
  }, [Y, O]), [v, z] = T({}), [F, X] = T(!0), te = pe(/* @__PURE__ */ new Set()), H = pe(/* @__PURE__ */ new Set());
12198
12198
  fe(() => {
12199
- if (!c) return;
12200
- const d = Q.filter((m) => {
12201
- const k = m != null ? String(m) : "all";
12199
+ if (!d) return;
12200
+ const c = Q.filter((p) => {
12201
+ const k = p != null ? String(p) : "all";
12202
12202
  return !H.current.has(k) && !te.current.has(k);
12203
12203
  });
12204
- if (d.length === 0) {
12204
+ if (c.length === 0) {
12205
12205
  Q.every((k) => {
12206
12206
  const w = k != null ? String(k) : "all";
12207
12207
  return H.current.has(w);
@@ -12209,11 +12209,11 @@ const nn = {
12209
12209
  return;
12210
12210
  }
12211
12211
  X(!0);
12212
- const L = d.map((m) => m != null ? String(m) : "all");
12213
- L.forEach((m) => te.current.add(m)), (async () => {
12212
+ const L = c.map((p) => p != null ? String(p) : "all");
12213
+ L.forEach((p) => te.current.add(p)), (async () => {
12214
12214
  try {
12215
- const m = await Promise.all(
12216
- d.map(async (k) => {
12215
+ const p = await Promise.all(
12216
+ c.map(async (k) => {
12217
12217
  const w = k != null ? String(k) : "all", ue = await l.getCountries("", o.locale || "en", k), ce = k === 40, Me = /* @__PURE__ */ new Set(), je = ue.map((we) => ce && we.countryCode ? {
12218
12218
  value: we.countryCode,
12219
12219
  label: `${we.countryCode} – ${we.name}`
@@ -12221,9 +12221,9 @@ const nn = {
12221
12221
  return H.current.add(w), te.current.delete(w), [w, je];
12222
12222
  })
12223
12223
  );
12224
- z((k) => ({ ...k, ...Object.fromEntries(m) }));
12225
- } catch (m) {
12226
- L.forEach((k) => te.current.delete(k)), console.error("Failed to load countries:", m);
12224
+ z((k) => ({ ...k, ...Object.fromEntries(p) }));
12225
+ } catch (p) {
12226
+ L.forEach((k) => te.current.delete(k)), console.error("Failed to load countries:", p);
12227
12227
  } finally {
12228
12228
  Q.every((k) => {
12229
12229
  const w = k != null ? String(k) : "all";
@@ -12231,11 +12231,11 @@ const nn = {
12231
12231
  }) && X(!1);
12232
12232
  }
12233
12233
  })();
12234
- }, [Q, c]);
12235
- const re = (d, L) => {
12234
+ }, [Q, d]);
12235
+ const re = (c, L) => {
12236
12236
  var k;
12237
- const C = L ?? ((k = dt[d]) == null ? void 0 : k.countriesType), m = C != null ? String(C) : "all";
12238
- return v[m] || [];
12237
+ const C = L ?? ((k = dt[c]) == null ? void 0 : k.countriesType), p = C != null ? String(C) : "all";
12238
+ return v[p] || [];
12239
12239
  }, me = {
12240
12240
  firstName: 1,
12241
12241
  lastName: 1,
@@ -12260,9 +12260,9 @@ const nn = {
12260
12260
  occupation: 1,
12261
12261
  taxNumber: 1
12262
12262
  }, de = Object.fromEntries(
12263
- Object.entries(B).filter(([d]) => d in me)
12263
+ Object.entries(B).filter(([c]) => c in me)
12264
12264
  ), Ne = Object.fromEntries(
12265
- Object.entries(N).filter(([d]) => d in me)
12265
+ Object.entries(N).filter(([c]) => c in me)
12266
12266
  ), [le, ve] = T({
12267
12267
  workflowKey: x,
12268
12268
  firstName: "",
@@ -12291,127 +12291,127 @@ const nn = {
12291
12291
  ...de,
12292
12292
  ...Ne
12293
12293
  }), he = Object.fromEntries(
12294
- Object.entries(B).filter(([d]) => !(d in de) && d !== "externalRefId" && d !== "workflowKey")
12294
+ Object.entries(B).filter(([c]) => !(c in de) && c !== "externalRefId" && c !== "workflowKey")
12295
12295
  ), [$, R] = T({ ...he }), [P, j] = T(!!a);
12296
12296
  fe(() => {
12297
12297
  if (!a) return;
12298
- let d = !1;
12298
+ let c = !1;
12299
12299
  return (async () => {
12300
12300
  try {
12301
- const C = await p(a);
12302
- if (d) return;
12303
- const m = C.applicantRequestData;
12304
- m && ve((k) => {
12301
+ const C = await m(a);
12302
+ if (c) return;
12303
+ const p = C.applicantRequestData;
12304
+ p && ve((k) => {
12305
12305
  var w;
12306
12306
  return {
12307
12307
  ...k,
12308
- firstName: m.firstName || k.firstName,
12309
- lastName: m.lastName || k.lastName,
12310
- email: m.email || k.email,
12311
- dateOfBirth: m.dateOfBirth || k.dateOfBirth,
12312
- phonenumber: m.phonenumber || k.phonenumber,
12313
- mobileCountryCode: m.mobileCountryCode || k.mobileCountryCode,
12314
- street: m.street || k.street,
12315
- streetNumber: m.streetNumber || k.streetNumber,
12316
- zip: m.zip || k.zip,
12317
- city: m.city || k.city,
12318
- country: m.country || k.country,
12319
- nationality: m.nationality || k.nationality,
12320
- taxCountry: m.taxCountry || k.taxCountry,
12321
- placeOfBirth: m.placeOfBirth || k.placeOfBirth,
12322
- countryOfBirth: m.countryOfBirth || k.countryOfBirth,
12323
- taxNumber: m.taxNumber || k.taxNumber,
12324
- defaultLanguage: m.defaultLanguage || k.defaultLanguage,
12325
- educationLevel: m.educationLevel || k.educationLevel,
12326
- occupation: m.occupation || k.occupation,
12327
- title: m.title || k.title,
12328
- salutation: m.salutation != null ? Number(m.salutation) : k.salutation,
12329
- otherNationality: (w = m.otherNationalities) != null && w.length ? m.otherNationalities : k.otherNationality
12308
+ firstName: p.firstName || k.firstName,
12309
+ lastName: p.lastName || k.lastName,
12310
+ email: p.email || k.email,
12311
+ dateOfBirth: p.dateOfBirth || k.dateOfBirth,
12312
+ phonenumber: p.phonenumber || k.phonenumber,
12313
+ mobileCountryCode: p.mobileCountryCode || k.mobileCountryCode,
12314
+ street: p.street || k.street,
12315
+ streetNumber: p.streetNumber || k.streetNumber,
12316
+ zip: p.zip || k.zip,
12317
+ city: p.city || k.city,
12318
+ country: p.country || k.country,
12319
+ nationality: p.nationality || k.nationality,
12320
+ taxCountry: p.taxCountry || k.taxCountry,
12321
+ placeOfBirth: p.placeOfBirth || k.placeOfBirth,
12322
+ countryOfBirth: p.countryOfBirth || k.countryOfBirth,
12323
+ taxNumber: p.taxNumber || k.taxNumber,
12324
+ defaultLanguage: p.defaultLanguage || k.defaultLanguage,
12325
+ educationLevel: p.educationLevel || k.educationLevel,
12326
+ occupation: p.occupation || k.occupation,
12327
+ title: p.title || k.title,
12328
+ salutation: p.salutation != null ? Number(p.salutation) : k.salutation,
12329
+ otherNationality: (w = p.otherNationalities) != null && w.length ? p.otherNationalities : k.otherNationality
12330
12330
  };
12331
12331
  }), C.externalRefId && ve((k) => ({ ...k, externalRefId: C.externalRefId }));
12332
12332
  } catch (C) {
12333
- d || console.error("Failed to load existing applicant data:", C);
12333
+ c || console.error("Failed to load existing applicant data:", C);
12334
12334
  } finally {
12335
- d || j(!1);
12335
+ c || j(!1);
12336
12336
  }
12337
12337
  })(), () => {
12338
- d = !0;
12338
+ c = !0;
12339
12339
  };
12340
12340
  }, [a]);
12341
12341
  const [Z, ge] = T(0), [W, J] = T({}), [ke, Re] = T(null), [Ce, _e] = T(!1), st = It(), Ze = ee(() => {
12342
- const d = rn(), L = (C) => {
12342
+ const c = rn(), L = (C) => {
12343
12343
  var ue;
12344
- const m = (ue = dt[C]) == null ? void 0 : ue.countriesType, k = m != null ? String(m) : "all", w = (v[k] || []).filter((ce) => ce.value);
12344
+ const p = (ue = dt[C]) == null ? void 0 : ue.countriesType, k = p != null ? String(p) : "all", w = (v[k] || []).filter((ce) => ce.value);
12345
12345
  if (w.length)
12346
12346
  return w[Math.floor(Math.random() * w.length)].value;
12347
12347
  };
12348
12348
  ve((C) => {
12349
- const m = { ...C };
12350
- for (const [k, w] of Object.entries(d))
12349
+ const p = { ...C };
12350
+ for (const [k, w] of Object.entries(c))
12351
12351
  if (k in C && (C[k] === "" || C[k] === null || C[k] === void 0))
12352
12352
  if (G.has(k)) {
12353
12353
  const ue = L(k);
12354
- ue && (m[k] = ue);
12354
+ ue && (p[k] = ue);
12355
12355
  } else
12356
- m[k] = w;
12357
- return m;
12356
+ p[k] = w;
12357
+ return p;
12358
12358
  }), O && R((C) => {
12359
12359
  var k, w;
12360
- const m = { ...C };
12360
+ const p = { ...C };
12361
12361
  for (const ue of O)
12362
12362
  for (const ce of ue.fields)
12363
- !ce.isCustom || !ce.paramName || m[ce.paramName] || (ce.customType === "checkbox" || ce.customType === "link_checkbox" ? m[ce.paramName] = "true" : ce.customType === "radio_group" && ((k = ce.options) != null && k.length) || ce.customType === "group_checkbox" && ((w = ce.options) != null && w.length) ? m[ce.paramName] = ce.options[0].value : ce.customType === "text" && (m[ce.paramName] = "Sample value"));
12364
- return m;
12363
+ !ce.isCustom || !ce.paramName || p[ce.paramName] || (ce.customType === "checkbox" || ce.customType === "link_checkbox" ? p[ce.paramName] = "true" : ce.customType === "radio_group" && ((k = ce.options) != null && k.length) || ce.customType === "group_checkbox" && ((w = ce.options) != null && w.length) ? p[ce.paramName] = ce.options[0].value : ce.customType === "text" && (p[ce.paramName] = "Sample value"));
12364
+ return p;
12365
12365
  }), J({}), Re(null);
12366
12366
  }, [O, v]);
12367
12367
  fe(() => {
12368
- const d = st.current;
12369
- if (d)
12370
- return d.registerAction({
12368
+ const c = st.current;
12369
+ if (c)
12370
+ return c.registerAction({
12371
12371
  id: "fill-individual-form",
12372
12372
  label: "Fill with Sample Data",
12373
12373
  icon: "📝",
12374
12374
  group: "form",
12375
12375
  handler: Ze
12376
- }), () => d.unregisterAction("fill-individual-form");
12376
+ }), () => c.unregisterAction("fill-individual-form");
12377
12377
  }, [st, Ze]);
12378
- const Ye = (d, L) => ve((C) => ({ ...C, [d]: L })), ze = (d, L) => R((C) => ({ ...C, [d]: L })), Qe = (d) => !d.conditionalOn || $[d.conditionalOn] === "true", He = (d) => {
12378
+ const Ye = (c, L) => ve((C) => ({ ...C, [c]: L })), ze = (c, L) => R((C) => ({ ...C, [c]: L })), Qe = (c) => !c.conditionalOn || $[c.conditionalOn] === "true", He = (c) => {
12379
12379
  var L;
12380
- for (const C of d.fields) {
12380
+ for (const C of c.fields) {
12381
12381
  if (!C.isCustom || !C.paramName || !((L = C.blockingValues) != null && L.length)) continue;
12382
- const m = $[C.paramName] ?? "";
12382
+ const p = $[C.paramName] ?? "";
12383
12383
  if (C.customType === "group_checkbox") {
12384
- if (m.split(",").filter(Boolean).some((w) => C.blockingValues.includes(w))) return !0;
12385
- } else if (C.customType === "radio_group" && C.blockingValues.includes(m))
12384
+ if (p.split(",").filter(Boolean).some((w) => C.blockingValues.includes(w))) return !0;
12385
+ } else if (C.customType === "radio_group" && C.blockingValues.includes(p))
12386
12386
  return !0;
12387
12387
  }
12388
12388
  return !1;
12389
- }, et = O && Z < O.length - 1 ? Z + 1 : -1, De = O && Z > 0 ? Z - 1 : -1, mt = (d) => {
12389
+ }, et = O && Z < O.length - 1 ? Z + 1 : -1, De = O && Z > 0 ? Z - 1 : -1, mt = (c) => {
12390
12390
  const L = {};
12391
- for (const C of d.fields)
12391
+ for (const C of c.fields)
12392
12392
  if (C.isCustom) {
12393
12393
  if (C.customType === "paragraph" || C.customType === "html" || C.customType === "br" || C.customType === "link") continue;
12394
12394
  if (C.required && C.paramName) {
12395
- const m = $[C.paramName], k = ie(C.displayText, y) || ie(C.label, y) || C.paramName;
12396
- C.customType === "checkbox" || C.customType === "link_checkbox" ? m !== "true" && (L[C.paramName] = y("validation.fieldRequired", { field: k })) : (!m || m.trim() === "") && (L[C.paramName] = y("validation.fieldRequired", { field: k }));
12395
+ const p = $[C.paramName], k = ie(C.displayText, y) || ie(C.label, y) || C.paramName;
12396
+ C.customType === "checkbox" || C.customType === "link_checkbox" ? p !== "true" && (L[C.paramName] = y("validation.fieldRequired", { field: k })) : (!p || p.trim() === "") && (L[C.paramName] = y("validation.fieldRequired", { field: k }));
12397
12397
  }
12398
12398
  } else if (C.name) {
12399
- const m = C.name;
12400
- if (M.includes(m) && St(le[m])) {
12401
- const k = dt[m], w = ie(C.displayText, y) || (k != null && k.translationKey ? y(`fields.${k.translationKey}`) : void 0) || (k == null ? void 0 : k.label) || m;
12402
- L[m] = y("validation.fieldRequired", { field: w });
12399
+ const p = C.name;
12400
+ if (M.includes(p) && St(le[p])) {
12401
+ const k = dt[p], w = ie(C.displayText, y) || (k != null && k.translationKey ? y(`fields.${k.translationKey}`) : void 0) || (k == null ? void 0 : k.label) || p;
12402
+ L[p] = y("validation.fieldRequired", { field: w });
12403
12403
  }
12404
12404
  }
12405
12405
  return L;
12406
12406
  }, wt = async () => {
12407
12407
  if (!O) return;
12408
- const d = O[Z];
12409
- if (He(d) || d.conditionalOn && d.conditionalMode === "block" && !Qe(d)) return;
12410
- if (d.conditionalOn && !Qe(d)) {
12408
+ const c = O[Z];
12409
+ if (He(c) || c.conditionalOn && c.conditionalMode === "block" && !Qe(c)) return;
12410
+ if (c.conditionalOn && !Qe(c)) {
12411
12411
  J({}), et >= 0 ? ge(et) : await Pe();
12412
12412
  return;
12413
12413
  }
12414
- const L = mt(d);
12414
+ const L = mt(c);
12415
12415
  if (Object.keys(L).length > 0) {
12416
12416
  J(L);
12417
12417
  return;
@@ -12419,11 +12419,11 @@ const nn = {
12419
12419
  J({}), et >= 0 ? ge(et) : await Pe();
12420
12420
  }, Pe = async () => {
12421
12421
  if (O) {
12422
- let d = {};
12422
+ let c = {};
12423
12423
  for (const L of O)
12424
- Qe(L) && (d = { ...d, ...mt(L) });
12425
- if (Object.keys(d).length > 0) {
12426
- J(d);
12424
+ Qe(L) && (c = { ...c, ...mt(L) });
12425
+ if (Object.keys(c).length > 0) {
12426
+ J(c);
12427
12427
  return;
12428
12428
  }
12429
12429
  }
@@ -12433,7 +12433,7 @@ const nn = {
12433
12433
  Re(y("createApplicant.externalRefIdRequired"));
12434
12434
  return;
12435
12435
  }
12436
- const d = {
12436
+ const c = {
12437
12437
  ...a ? { applicantId: a } : {},
12438
12438
  workflowKey: le.workflowKey,
12439
12439
  externalRefId: le.externalRefId.trim()
@@ -12444,19 +12444,19 @@ const nn = {
12444
12444
  for (const w of k.fields)
12445
12445
  if (!w.isCustom && w.name) {
12446
12446
  const ue = w.name, ce = le[ue];
12447
- St(ce) || (d[ue] = ce);
12447
+ St(ce) || (c[ue] = ce);
12448
12448
  }
12449
12449
  }
12450
12450
  for (const k of Lt)
12451
- if (d[k] === void 0) {
12451
+ if (c[k] === void 0) {
12452
12452
  const w = le[k];
12453
- St(w) || (d[k] = w);
12453
+ St(w) || (c[k] = w);
12454
12454
  }
12455
12455
  } else
12456
12456
  Y.forEach((k) => {
12457
12457
  if (k === "externalRefId") return;
12458
12458
  const w = le[k];
12459
- St(w) || (d[k] = w);
12459
+ St(w) || (c[k] = w);
12460
12460
  });
12461
12461
  const L = [];
12462
12462
  if (O) {
@@ -12473,43 +12473,43 @@ const nn = {
12473
12473
  }
12474
12474
  }
12475
12475
  for (const [k, w] of Object.entries(de))
12476
- d[k] === void 0 && !St(w) && (d[k] = w);
12476
+ c[k] === void 0 && !St(w) && (c[k] = w);
12477
12477
  const C = new Set(L.map((k) => k.paramName));
12478
12478
  for (const [k, w] of Object.entries(he))
12479
12479
  !C.has(k) && w && L.push({ paramName: k, value: w });
12480
- L.length > 0 && (d.applicantAdditionalDatas = L);
12481
- const m = await u(d);
12482
- r(m.applicantId);
12483
- } catch (d) {
12484
- console.error("Error creating applicant:", d), Re(d.message || y("createApplicant.failedToCreate"));
12480
+ L.length > 0 && (c.applicantAdditionalDatas = L);
12481
+ const p = await u(c);
12482
+ r(p.applicantId);
12483
+ } catch (c) {
12484
+ console.error("Error creating applicant:", c), Re(c.message || y("createApplicant.failedToCreate"));
12485
12485
  } finally {
12486
12486
  _e(!1);
12487
12487
  }
12488
- }, xt = async (d) => {
12489
- d.preventDefault();
12488
+ }, xt = async (c) => {
12489
+ c.preventDefault();
12490
12490
  for (const L of M)
12491
12491
  if (St(le[L])) {
12492
- const C = dt[L], m = (C != null && C.translationKey ? y(`fields.${C.translationKey}`) : void 0) || (C == null ? void 0 : C.label) || L;
12493
- Re(y("validation.fieldRequired", { field: m }));
12492
+ const C = dt[L], p = (C != null && C.translationKey ? y(`fields.${C.translationKey}`) : void 0) || (C == null ? void 0 : C.label) || L;
12493
+ Re(y("validation.fieldRequired", { field: p }));
12494
12494
  return;
12495
12495
  }
12496
12496
  await Pe();
12497
- }, pt = (d, L, C, m, k) => {
12497
+ }, pt = (c, L, C, p, k) => {
12498
12498
  var Jt;
12499
- const w = dt[d];
12499
+ const w = dt[c];
12500
12500
  if (!w) return null;
12501
- const ue = M.includes(d), ce = W[d], Me = ie(C, y) || (w.translationKey ? y(`fields.${w.translationKey}`) : void 0) || w.label, je = d in Ne, we = L ?? d, $e = { required: ue }, tt = k ? k !== "placeholder" : K, lt = tt ? Me : void 0;
12501
+ const ue = M.includes(c), ce = W[c], Me = ie(C, y) || (w.translationKey ? y(`fields.${w.translationKey}`) : void 0) || w.label, je = c in Ne, we = L ?? c, $e = { required: ue }, tt = k ? k !== "placeholder" : K, lt = tt ? Me : void 0;
12502
12502
  switch (w.type) {
12503
12503
  case "select":
12504
- if (d === "country" || d === "nationality" || d === "taxCountry" || d === "countryOfBirth" || d === "mobileCountryCode") {
12505
- const Fe = re(d, m);
12504
+ if (c === "country" || c === "nationality" || c === "taxCountry" || c === "countryOfBirth" || c === "mobileCountryCode") {
12505
+ const Fe = re(c, p);
12506
12506
  return /* @__PURE__ */ i(
12507
12507
  nt,
12508
12508
  {
12509
12509
  ...$e,
12510
12510
  label: lt,
12511
- value: le[d] || "",
12512
- onChange: (ft) => Ye(d, ft),
12511
+ value: le[c] || "",
12512
+ onChange: (ft) => Ye(c, ft),
12513
12513
  options: [{ value: "", label: tt ? y("placeholders.selectCountry") : Me }, ...Fe],
12514
12514
  disabled: F,
12515
12515
  readOnly: je,
@@ -12518,14 +12518,14 @@ const nn = {
12518
12518
  we
12519
12519
  );
12520
12520
  }
12521
- if (d === "salutation")
12521
+ if (c === "salutation")
12522
12522
  return /* @__PURE__ */ i(
12523
12523
  nt,
12524
12524
  {
12525
12525
  ...$e,
12526
12526
  label: lt,
12527
- value: ((Jt = le[d]) == null ? void 0 : Jt.toString()) || "",
12528
- onChange: (Fe) => Ye(d, Fe ? Number(Fe) : null),
12527
+ value: ((Jt = le[c]) == null ? void 0 : Jt.toString()) || "",
12528
+ onChange: (Fe) => Ye(c, Fe ? Number(Fe) : null),
12529
12529
  options: [
12530
12530
  { value: "", label: tt ? y("placeholders.selectSalutation") : Me },
12531
12531
  { value: Dt.Male.toString(), label: y("gender.male") },
@@ -12537,15 +12537,15 @@ const nn = {
12537
12537
  },
12538
12538
  we
12539
12539
  );
12540
- if (d === "defaultLanguage") {
12541
- const Fe = c != null && c.allowedLanguages && c.allowedLanguages.length > 0 ? ti.filter((ft) => c.allowedLanguages.includes(ft.value)) : ti;
12540
+ if (c === "defaultLanguage") {
12541
+ const Fe = d != null && d.allowedLanguages && d.allowedLanguages.length > 0 ? ti.filter((ft) => d.allowedLanguages.includes(ft.value)) : ti;
12542
12542
  return /* @__PURE__ */ i(
12543
12543
  nt,
12544
12544
  {
12545
12545
  ...$e,
12546
12546
  label: lt,
12547
- value: le[d] || "",
12548
- onChange: (ft) => Ye(d, ft),
12547
+ value: le[c] || "",
12548
+ onChange: (ft) => Ye(c, ft),
12549
12549
  options: [{ value: "", label: tt ? y("placeholders.selectLanguage") : Me }, ...Fe],
12550
12550
  readOnly: je,
12551
12551
  error: ce
@@ -12555,15 +12555,15 @@ const nn = {
12555
12555
  }
12556
12556
  return null;
12557
12557
  case "multiselect":
12558
- if (d === "otherNationality") {
12559
- const Fe = re(d, m);
12558
+ if (c === "otherNationality") {
12559
+ const Fe = re(c, p);
12560
12560
  return /* @__PURE__ */ i(
12561
12561
  ha,
12562
12562
  {
12563
12563
  ...$e,
12564
12564
  label: lt,
12565
- value: le[d] || [],
12566
- onChange: (ft) => Ye(d, ft),
12565
+ value: le[c] || [],
12566
+ onChange: (ft) => Ye(c, ft),
12567
12567
  options: Fe,
12568
12568
  placeholder: tt ? y("placeholders.selectOtherNationalities") : Me,
12569
12569
  disabled: F,
@@ -12581,8 +12581,8 @@ const nn = {
12581
12581
  type: "date",
12582
12582
  label: lt,
12583
12583
  placeholder: tt ? void 0 : Me,
12584
- value: le[d] || "",
12585
- onChange: (Fe) => Ye(d, Fe.target.value),
12584
+ value: le[c] || "",
12585
+ onChange: (Fe) => Ye(c, Fe.target.value),
12586
12586
  readOnly: je,
12587
12587
  error: ce
12588
12588
  },
@@ -12596,8 +12596,8 @@ const nn = {
12596
12596
  type: "email",
12597
12597
  label: lt,
12598
12598
  placeholder: tt ? void 0 : Me,
12599
- value: le[d] || "",
12600
- onChange: (Fe) => Ye(d, Fe.target.value),
12599
+ value: le[c] || "",
12600
+ onChange: (Fe) => Ye(c, Fe.target.value),
12601
12601
  readOnly: je,
12602
12602
  error: ce
12603
12603
  },
@@ -12611,8 +12611,8 @@ const nn = {
12611
12611
  type: "tel",
12612
12612
  label: lt,
12613
12613
  placeholder: tt ? void 0 : Me,
12614
- value: le[d] || "",
12615
- onChange: (Fe) => Ye(d, Fe.target.value),
12614
+ value: le[c] || "",
12615
+ onChange: (Fe) => Ye(c, Fe.target.value),
12616
12616
  readOnly: je,
12617
12617
  error: ce
12618
12618
  },
@@ -12626,18 +12626,18 @@ const nn = {
12626
12626
  type: "text",
12627
12627
  label: lt,
12628
12628
  placeholder: tt ? void 0 : Me,
12629
- value: le[d] || "",
12630
- onChange: (Fe) => Ye(d, Fe.target.value),
12629
+ value: le[c] || "",
12630
+ onChange: (Fe) => Ye(c, Fe.target.value),
12631
12631
  readOnly: je,
12632
12632
  error: ce
12633
12633
  },
12634
12634
  we
12635
12635
  );
12636
12636
  }
12637
- }, gt = (d, L) => {
12638
- const C = d.labelMode ? d.labelMode !== "placeholder" : K;
12639
- if (d.customType === "paragraph") {
12640
- const w = ie(d.displayText, y) || ie(d.label, y) || "";
12637
+ }, gt = (c, L) => {
12638
+ const C = c.labelMode ? c.labelMode !== "placeholder" : K;
12639
+ if (c.customType === "paragraph") {
12640
+ const w = ie(c.displayText, y) || ie(c.label, y) || "";
12641
12641
  return /* @__PURE__ */ i(
12642
12642
  "p",
12643
12643
  {
@@ -12653,22 +12653,22 @@ const nn = {
12653
12653
  `custom-${L}`
12654
12654
  );
12655
12655
  }
12656
- if (d.customType === "html")
12656
+ if (c.customType === "html")
12657
12657
  return /* @__PURE__ */ i(
12658
12658
  "div",
12659
12659
  {
12660
- dangerouslySetInnerHTML: { __html: ie(d.label, y) || "" }
12660
+ dangerouslySetInnerHTML: { __html: ie(c.label, y) || "" }
12661
12661
  },
12662
12662
  `custom-${L}`
12663
12663
  );
12664
- if (d.customType === "br")
12664
+ if (c.customType === "br")
12665
12665
  return /* @__PURE__ */ i("div", { style: { height: "12px" } }, `custom-${L}`);
12666
- if (d.customType === "link") {
12667
- const w = ie(d.displayText, y) || ie(d.label, y) || d.linkText || d.linkUrl || "";
12666
+ if (c.customType === "link") {
12667
+ const w = ie(c.displayText, y) || ie(c.label, y) || c.linkText || c.linkUrl || "";
12668
12668
  return /* @__PURE__ */ i("div", { className: "metakyc-link-field", children: /* @__PURE__ */ s(
12669
12669
  "a",
12670
12670
  {
12671
- href: d.linkUrl || "#",
12671
+ href: c.linkUrl || "#",
12672
12672
  target: "_blank",
12673
12673
  rel: "noopener noreferrer",
12674
12674
  style: {
@@ -12687,10 +12687,10 @@ const nn = {
12687
12687
  }
12688
12688
  ) }, `custom-${L}`);
12689
12689
  }
12690
- if (!d.paramName) return null;
12691
- const m = W[d.paramName], k = ie(d.displayText, y) || ie(d.label, y) || d.paramName;
12692
- if (d.customType === "checkbox") {
12693
- const w = $[d.paramName] === "true";
12690
+ if (!c.paramName) return null;
12691
+ const p = W[c.paramName], k = ie(c.displayText, y) || ie(c.label, y) || c.paramName;
12692
+ if (c.customType === "checkbox") {
12693
+ const w = $[c.paramName] === "true";
12694
12694
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
12695
12695
  /* @__PURE__ */ s(
12696
12696
  "div",
@@ -12698,14 +12698,14 @@ const nn = {
12698
12698
  className: "metakyc-option-label",
12699
12699
  role: "checkbox",
12700
12700
  "aria-checked": w,
12701
- onClick: () => ze(d.paramName, w ? "false" : "true"),
12701
+ onClick: () => ze(c.paramName, w ? "false" : "true"),
12702
12702
  style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
12703
12703
  children: [
12704
12704
  /* @__PURE__ */ i(
12705
12705
  Xe,
12706
12706
  {
12707
12707
  checked: w,
12708
- onChange: (ue) => ze(d.paramName, ue ? "true" : "false")
12708
+ onChange: (ue) => ze(c.paramName, ue ? "true" : "false")
12709
12709
  }
12710
12710
  ),
12711
12711
  /* @__PURE__ */ s(
@@ -12715,18 +12715,18 @@ const nn = {
12715
12715
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
12716
12716
  children: [
12717
12717
  k,
12718
- d.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
12718
+ c.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
12719
12719
  ]
12720
12720
  }
12721
12721
  )
12722
12722
  ]
12723
12723
  }
12724
12724
  ),
12725
- m && /* @__PURE__ */ i("p", { className: "text-xs mt-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: m })
12725
+ p && /* @__PURE__ */ i("p", { className: "text-xs mt-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: p })
12726
12726
  ] }, `custom-${L}`);
12727
12727
  }
12728
- if (d.customType === "link_checkbox") {
12729
- const w = $[d.paramName] === "true";
12728
+ if (c.customType === "link_checkbox") {
12729
+ const w = $[c.paramName] === "true";
12730
12730
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
12731
12731
  /* @__PURE__ */ s(
12732
12732
  "div",
@@ -12734,14 +12734,14 @@ const nn = {
12734
12734
  className: "metakyc-option-label",
12735
12735
  role: "checkbox",
12736
12736
  "aria-checked": w,
12737
- onClick: () => ze(d.paramName, w ? "false" : "true"),
12737
+ onClick: () => ze(c.paramName, w ? "false" : "true"),
12738
12738
  style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
12739
12739
  children: [
12740
12740
  /* @__PURE__ */ i(
12741
12741
  Xe,
12742
12742
  {
12743
12743
  checked: w,
12744
- onChange: (ue) => ze(d.paramName, ue ? "true" : "false")
12744
+ onChange: (ue) => ze(c.paramName, ue ? "true" : "false")
12745
12745
  }
12746
12746
  ),
12747
12747
  /* @__PURE__ */ s(
@@ -12752,30 +12752,30 @@ const nn = {
12752
12752
  children: [
12753
12753
  k,
12754
12754
  " ",
12755
- d.linkUrl && /* @__PURE__ */ i(
12755
+ c.linkUrl && /* @__PURE__ */ i(
12756
12756
  "a",
12757
12757
  {
12758
- href: d.linkUrl,
12758
+ href: c.linkUrl,
12759
12759
  target: "_blank",
12760
12760
  rel: "noopener noreferrer",
12761
12761
  className: "underline",
12762
12762
  style: { color: "var(--metakyc-primary, #2563eb)" },
12763
12763
  onClick: (ue) => ue.stopPropagation(),
12764
- children: d.linkText || d.linkUrl
12764
+ children: c.linkText || c.linkUrl
12765
12765
  }
12766
12766
  ),
12767
- d.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
12767
+ c.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
12768
12768
  ]
12769
12769
  }
12770
12770
  )
12771
12771
  ]
12772
12772
  }
12773
12773
  ),
12774
- m && /* @__PURE__ */ i("p", { className: "text-xs mt-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: m })
12774
+ p && /* @__PURE__ */ i("p", { className: "text-xs mt-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: p })
12775
12775
  ] }, `custom-${L}`);
12776
12776
  }
12777
- if (d.customType === "group_checkbox") {
12778
- const w = ($[d.paramName] || "").split(",").filter(Boolean);
12777
+ if (c.customType === "group_checkbox") {
12778
+ const w = ($[c.paramName] || "").split(",").filter(Boolean);
12779
12779
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
12780
12780
  C && /* @__PURE__ */ s(
12781
12781
  "div",
@@ -12784,17 +12784,17 @@ const nn = {
12784
12784
  style: { color: "var(--metakyc-text-primary, #111827)" },
12785
12785
  children: [
12786
12786
  k,
12787
- d.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
12787
+ c.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
12788
12788
  ]
12789
12789
  }
12790
12790
  ),
12791
- /* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (d.options || []).map((ue) => {
12792
- const ce = d.singleSelect ? $[d.paramName] === ue.value : w.includes(ue.value), Me = () => {
12793
- if (d.singleSelect)
12794
- ze(d.paramName, ce ? "" : ue.value);
12791
+ /* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((ue) => {
12792
+ const ce = c.singleSelect ? $[c.paramName] === ue.value : w.includes(ue.value), Me = () => {
12793
+ if (c.singleSelect)
12794
+ ze(c.paramName, ce ? "" : ue.value);
12795
12795
  else {
12796
12796
  const je = ce ? w.filter((we) => we !== ue.value) : [...w, ue.value];
12797
- ze(d.paramName, je.join(","));
12797
+ ze(c.paramName, je.join(","));
12798
12798
  }
12799
12799
  };
12800
12800
  return /* @__PURE__ */ s(
@@ -12818,10 +12818,10 @@ const nn = {
12818
12818
  ue.value
12819
12819
  );
12820
12820
  }) }),
12821
- m && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-danger, #ef4444)" }, children: m })
12821
+ p && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-danger, #ef4444)" }, children: p })
12822
12822
  ] }, `custom-${L}`);
12823
12823
  }
12824
- return d.customType === "radio_group" ? /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
12824
+ return c.customType === "radio_group" ? /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
12825
12825
  C && /* @__PURE__ */ s(
12826
12826
  "div",
12827
12827
  {
@@ -12829,24 +12829,24 @@ const nn = {
12829
12829
  style: { color: "var(--metakyc-text-primary, #111827)" },
12830
12830
  children: [
12831
12831
  k,
12832
- d.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
12832
+ c.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
12833
12833
  ]
12834
12834
  }
12835
12835
  ),
12836
- /* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (d.options || []).map((w) => /* @__PURE__ */ s(
12836
+ /* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((w) => /* @__PURE__ */ s(
12837
12837
  "div",
12838
12838
  {
12839
12839
  className: "metakyc-option-label",
12840
- onClick: () => ze(d.paramName, w.value),
12840
+ onClick: () => ze(c.paramName, w.value),
12841
12841
  style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
12842
12842
  children: [
12843
12843
  /* @__PURE__ */ i(
12844
12844
  "input",
12845
12845
  {
12846
12846
  type: "radio",
12847
- checked: $[d.paramName] === w.value,
12848
- onChange: () => ze(d.paramName, w.value),
12849
- name: `radio-group-${d.paramName}-${L}`,
12847
+ checked: $[c.paramName] === w.value,
12848
+ onChange: () => ze(c.paramName, w.value),
12849
+ name: `radio-group-${c.paramName}-${L}`,
12850
12850
  className: "metakyc-option-input",
12851
12851
  onClick: (ue) => ue.stopPropagation(),
12852
12852
  style: nn
@@ -12864,37 +12864,37 @@ const nn = {
12864
12864
  },
12865
12865
  w.value
12866
12866
  )) }),
12867
- m && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-danger, #ef4444)" }, children: m })
12867
+ p && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-danger, #ef4444)" }, children: p })
12868
12868
  ] }, `custom-${L}`) : /* @__PURE__ */ i(
12869
12869
  Te,
12870
12870
  {
12871
12871
  type: "text",
12872
- label: C ? `${k}${d.required ? " *" : ""}` : void 0,
12872
+ label: C ? `${k}${c.required ? " *" : ""}` : void 0,
12873
12873
  placeholder: C ? void 0 : k,
12874
- value: $[d.paramName] || "",
12875
- onChange: (w) => ze(d.paramName, w.target.value),
12876
- required: d.required,
12877
- error: m
12874
+ value: $[c.paramName] || "",
12875
+ onChange: (w) => ze(c.paramName, w.target.value),
12876
+ required: c.required,
12877
+ error: p
12878
12878
  },
12879
12879
  `custom-${L}`
12880
12880
  );
12881
- }, b = (d, L) => {
12882
- const C = Qe(d);
12881
+ }, b = (c, L) => {
12882
+ const C = Qe(c);
12883
12883
  return /* @__PURE__ */ s("div", { className: "space-y-4", children: [
12884
- d.conditionalOn && /* @__PURE__ */ i(vi, { helpText: d.conditionalHelpText, children: /* @__PURE__ */ s(
12884
+ c.conditionalOn && /* @__PURE__ */ i(vi, { helpText: c.conditionalHelpText, children: /* @__PURE__ */ s(
12885
12885
  "div",
12886
12886
  {
12887
12887
  className: "metakyc-option-label",
12888
12888
  role: "checkbox",
12889
12889
  "aria-checked": C,
12890
- onClick: () => ze(d.conditionalOn, C ? "false" : "true"),
12890
+ onClick: () => ze(c.conditionalOn, C ? "false" : "true"),
12891
12891
  style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0, userSelect: "none" },
12892
12892
  children: [
12893
12893
  /* @__PURE__ */ i(
12894
12894
  Xe,
12895
12895
  {
12896
12896
  checked: C,
12897
- onChange: (m) => ze(d.conditionalOn, m ? "true" : "false")
12897
+ onChange: (p) => ze(c.conditionalOn, p ? "true" : "false")
12898
12898
  }
12899
12899
  ),
12900
12900
  /* @__PURE__ */ i(
@@ -12902,56 +12902,56 @@ const nn = {
12902
12902
  {
12903
12903
  className: "metakyc-option-text",
12904
12904
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", fontWeight: 500 },
12905
- children: ie(d.conditionalLabel, y) || d.conditionalOn
12905
+ children: ie(c.conditionalLabel, y) || c.conditionalOn
12906
12906
  }
12907
12907
  )
12908
12908
  ]
12909
12909
  }
12910
12910
  ) }),
12911
- C && /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: d.fields.map((m, k) => {
12912
- const w = Math.min(4, Math.max(1, Number(m.colSpan) || 4)), ue = m.isCustom ? `custom-${k}-${m.paramName}` : `builtin-${m.name}-${k}`;
12913
- return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${w} / span ${w}` }, children: /* @__PURE__ */ i(vi, { helpText: m.helpText, children: m.isCustom ? gt(m, k) : pt(m.name, ue, m.displayText, m.countriesType, m.labelMode) }) }, ue);
12911
+ C && /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: c.fields.map((p, k) => {
12912
+ const w = Math.min(4, Math.max(1, Number(p.colSpan) || 4)), ue = p.isCustom ? `custom-${k}-${p.paramName}` : `builtin-${p.name}-${k}`;
12913
+ return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${w} / span ${w}` }, children: /* @__PURE__ */ i(vi, { helpText: p.helpText, children: p.isCustom ? gt(p, k) : pt(p.name, ue, p.displayText, p.countriesType, p.labelMode) }) }, ue);
12914
12914
  }) })
12915
12915
  ] });
12916
12916
  };
12917
- if (!c || F || P)
12917
+ if (!d || F || P)
12918
12918
  return /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
12919
12919
  /* @__PURE__ */ i(Ke, { className: "my-8" }),
12920
12920
  /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: y("common.loadingForm") })
12921
12921
  ] }) }) });
12922
12922
  if (O) {
12923
- const d = O[Z] ?? O[0], L = De === -1, C = et === -1, m = O.length, k = Qe(d), w = He(d), ue = Object.values(W), ce = !k && !!d.conditionalOn && d.conditionalMode === "block", Me = Ce || f || ce || w;
12923
+ const c = O[Z] ?? O[0], L = De === -1, C = et === -1, p = O.length, k = Qe(c), w = He(c), ue = Object.values(W), ce = !k && !!c.conditionalOn && c.conditionalMode === "block", Me = Ce || g || ce || w;
12924
12924
  let je;
12925
- return ce || w ? je = y("common.blocked") : C ? je = d.conditionalOn && !k ? y("common.skipAndSubmit") : y("common.submit") : je = d.conditionalOn && !k ? y("common.skip") : y("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(ne, { children: [
12926
- /* @__PURE__ */ i(Le, { children: /* @__PURE__ */ i(Rt, { title: (c == null ? void 0 : c.title) || y("createApplicant.title") }) }),
12925
+ return ce || w ? je = y("common.blocked") : C ? je = c.conditionalOn && !k ? y("common.skipAndSubmit") : y("common.submit") : je = c.conditionalOn && !k ? y("common.skip") : y("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(ne, { children: [
12926
+ /* @__PURE__ */ i(Le, { children: /* @__PURE__ */ i(Rt, { title: (d == null ? void 0 : d.title) || y("createApplicant.title") }) }),
12927
12927
  /* @__PURE__ */ s(oe, { children: [
12928
- (d.title || d.subtitle || d.description) && /* @__PURE__ */ s("div", { className: "mb-4", children: [
12929
- d.title && /* @__PURE__ */ i(
12928
+ (c.title || c.subtitle || c.description) && /* @__PURE__ */ s("div", { className: "mb-4", children: [
12929
+ c.title && /* @__PURE__ */ i(
12930
12930
  "h3",
12931
12931
  {
12932
12932
  className: "font-semibold text-base",
12933
12933
  style: { color: "var(--metakyc-text-primary, #111827)" },
12934
- children: ie(d.title, y)
12934
+ children: ie(c.title, y)
12935
12935
  }
12936
12936
  ),
12937
- d.subtitle && /* @__PURE__ */ i(
12937
+ c.subtitle && /* @__PURE__ */ i(
12938
12938
  "p",
12939
12939
  {
12940
12940
  className: "text-sm mt-0.5",
12941
12941
  style: { color: "var(--metakyc-text-secondary, #6b7280)" },
12942
- children: ie(d.subtitle, y)
12942
+ children: ie(c.subtitle, y)
12943
12943
  }
12944
12944
  ),
12945
- d.description && d.description !== d.subtitle && /* @__PURE__ */ i(
12945
+ c.description && c.description !== c.subtitle && /* @__PURE__ */ i(
12946
12946
  "p",
12947
12947
  {
12948
12948
  className: "text-xs mt-1",
12949
12949
  style: { color: "var(--metakyc-text-secondary, #6b7280)" },
12950
- children: ie(d.description, y)
12950
+ children: ie(c.description, y)
12951
12951
  }
12952
12952
  )
12953
12953
  ] }),
12954
- m > 1 && /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", marginBottom: "1rem" }, children: [
12954
+ p > 1 && /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", marginBottom: "1rem" }, children: [
12955
12955
  O.map((we, $e) => /* @__PURE__ */ i(
12956
12956
  "div",
12957
12957
  {
@@ -12967,7 +12967,7 @@ const nn = {
12967
12967
  /* @__PURE__ */ s("span", { style: { fontSize: "0.75rem", color: "var(--metakyc-text-muted, #9ca3af)", flexShrink: 0 }, children: [
12968
12968
  Z + 1,
12969
12969
  " / ",
12970
- m
12970
+ p
12971
12971
  ] })
12972
12972
  ] }),
12973
12973
  (ke || ue.length > 0) && /* @__PURE__ */ s("div", { className: "mb-4 p-3 rounded-lg", style: {
@@ -12981,7 +12981,7 @@ const nn = {
12981
12981
  ] }),
12982
12982
  ue.map((we, $e) => /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: we }, $e))
12983
12983
  ] }),
12984
- b(d)
12984
+ b(c)
12985
12985
  ] }),
12986
12986
  /* @__PURE__ */ s(Ee, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
12987
12987
  /* @__PURE__ */ s("div", { children: [
@@ -12993,17 +12993,17 @@ const nn = {
12993
12993
  onClick: () => {
12994
12994
  ge(De), J({});
12995
12995
  },
12996
- disabled: Ce || f,
12996
+ disabled: Ce || g,
12997
12997
  children: y("common.previous")
12998
12998
  }
12999
12999
  ),
13000
- L && n && /* @__PURE__ */ i(se, { type: "button", variant: "outline", onClick: n, disabled: Ce || f, children: "Cancel" })
13000
+ L && n && /* @__PURE__ */ i(se, { type: "button", variant: "outline", onClick: n, disabled: Ce || g, children: "Cancel" })
13001
13001
  ] }),
13002
13002
  /* @__PURE__ */ i(
13003
13003
  se,
13004
13004
  {
13005
13005
  type: "button",
13006
- isLoading: Ce || f,
13006
+ isLoading: Ce || g,
13007
13007
  disabled: Me,
13008
13008
  onClick: C ? Pe : wt,
13009
13009
  children: je
@@ -13013,7 +13013,7 @@ const nn = {
13013
13013
  ] }) });
13014
13014
  }
13015
13015
  return /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i("form", { onSubmit: xt, children: /* @__PURE__ */ s(ne, { children: [
13016
- /* @__PURE__ */ i(Le, { children: /* @__PURE__ */ i(Rt, { title: (c == null ? void 0 : c.title) || y("createApplicant.title") }) }),
13016
+ /* @__PURE__ */ i(Le, { children: /* @__PURE__ */ i(Rt, { title: (d == null ? void 0 : d.title) || y("createApplicant.title") }) }),
13017
13017
  /* @__PURE__ */ s(oe, { children: [
13018
13018
  ke && /* @__PURE__ */ i("div", { className: "mb-6 p-4 rounded-lg", style: {
13019
13019
  backgroundColor: "var(--metakyc-danger-bg, color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent))",
@@ -13023,11 +13023,11 @@ const nn = {
13023
13023
  " ",
13024
13024
  ke
13025
13025
  ] }) }),
13026
- /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: Y.map((d) => /* @__PURE__ */ i("div", { style: { gridColumn: "span 4 / span 4" }, children: pt(d) }, d)) })
13026
+ /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: Y.map((c) => /* @__PURE__ */ i("div", { style: { gridColumn: "span 4 / span 4" }, children: pt(c) }, c)) })
13027
13027
  ] }),
13028
13028
  /* @__PURE__ */ s(Ee, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
13029
- n && /* @__PURE__ */ i(se, { type: "button", variant: "outline", onClick: n, disabled: Ce || f, children: "Cancel" }),
13030
- /* @__PURE__ */ i(se, { type: "submit", isLoading: Ce || f, children: y("createApplicant.createApplicant") })
13029
+ n && /* @__PURE__ */ i(se, { type: "button", variant: "outline", onClick: n, disabled: Ce || g, children: "Cancel" }),
13030
+ /* @__PURE__ */ i(se, { type: "submit", isLoading: Ce || g, children: y("createApplicant.createApplicant") })
13031
13031
  ] })
13032
13032
  ] }) }) });
13033
13033
  }, bi = ["companyName", "email"];
@@ -13041,8 +13041,8 @@ const sn = ({
13041
13041
  onCancel: r
13042
13042
  }) => {
13043
13043
  var mt, wt, Pe, xt, pt, gt;
13044
- const { config: n, baseInformationService: o, currentTheme: l } = Se(), { createCompanyApplicant: c, isLoading: u } = Ii(), { t: p } = Ie(), f = e || ((mt = n.applicantForm) == null ? void 0 : mt.workflowKey);
13045
- if (!f)
13044
+ const { config: n, baseInformationService: o, currentTheme: l } = Se(), { createCompanyApplicant: d, isLoading: u } = Ii(), { t: m } = Ie(), g = e || ((mt = n.applicantForm) == null ? void 0 : mt.workflowKey);
13045
+ if (!g)
13046
13046
  throw new Error(
13047
13047
  "workflowKey is required. Provide it either as a prop to CreateCompanyApplicantForm or set it in config.applicantForm.workflowKey"
13048
13048
  );
@@ -13054,14 +13054,14 @@ const sn = ({
13054
13054
  if (V) for (const D of V) b.add(D);
13055
13055
  if (N)
13056
13056
  for (const D of N)
13057
- for (const g of D.fields)
13058
- !g.isCustom && g.name && g.required && b.add(g.name);
13057
+ for (const f of D.fields)
13058
+ !f.isCustom && f.name && f.required && b.add(f.name);
13059
13059
  return Array.from(b);
13060
13060
  }, [l == null ? void 0 : l.companyFormRequiredFields, N]), K = Ue(() => {
13061
13061
  var b;
13062
13062
  if (N) {
13063
- const V = N.flatMap((g) => g.fields).filter((g) => !g.isCustom && g.name).map((g) => g.name), D = new Set(V);
13064
- for (const g of bi) D.add(g);
13063
+ const V = N.flatMap((f) => f.fields).filter((f) => !f.isCustom && f.name).map((f) => f.name), D = new Set(V);
13064
+ for (const f of bi) D.add(f);
13065
13065
  return Array.from(D);
13066
13066
  }
13067
13067
  return (b = n.applicantForm) != null && b.visibleFields ? n.applicantForm.visibleFields : l != null && l.companyFormVisibleFields && l.companyFormVisibleFields.length > 0 ? l.companyFormVisibleFields : Ji;
@@ -13069,18 +13069,18 @@ const sn = ({
13069
13069
  var V, D;
13070
13070
  const b = /* @__PURE__ */ new Set();
13071
13071
  if (N)
13072
- for (const g of N)
13073
- for (const h of g.fields)
13072
+ for (const f of N)
13073
+ for (const h of f.fields)
13074
13074
  !h.isCustom && h.name && O.has(h.name) && b.add(h.countriesType ?? ((V = ht[h.name]) == null ? void 0 : V.countriesType));
13075
13075
  else
13076
- for (const g of K)
13077
- O.has(g) && b.add((D = ht[g]) == null ? void 0 : D.countriesType);
13076
+ for (const f of K)
13077
+ O.has(f) && b.add((D = ht[f]) == null ? void 0 : D.countriesType);
13078
13078
  return b.size === 0 && b.add(void 0), Array.from(b);
13079
13079
  }, [K, N]), [Y, G] = T({}), [Q, v] = T(!0), z = pe(/* @__PURE__ */ new Set()), F = pe(/* @__PURE__ */ new Set());
13080
13080
  fe(() => {
13081
13081
  if (!l) return;
13082
- const b = M.filter((g) => {
13083
- const h = g != null ? String(g) : "all";
13082
+ const b = M.filter((f) => {
13083
+ const h = f != null ? String(f) : "all";
13084
13084
  return !F.current.has(h) && !z.current.has(h);
13085
13085
  });
13086
13086
  if (b.length === 0) {
@@ -13088,18 +13088,18 @@ const sn = ({
13088
13088
  return;
13089
13089
  }
13090
13090
  v(!0);
13091
- const V = b.map((g) => g != null ? String(g) : "all");
13092
- V.forEach((g) => z.current.add(g)), (async () => {
13091
+ const V = b.map((f) => f != null ? String(f) : "all");
13092
+ V.forEach((f) => z.current.add(f)), (async () => {
13093
13093
  try {
13094
- const g = await Promise.all(
13094
+ const f = await Promise.all(
13095
13095
  b.map(async (h) => {
13096
- const E = h != null ? String(h) : "all", I = await o.getCountries("", n.locale || "en", h), q = /* @__PURE__ */ new Set(), d = I.map((L) => ({ value: L.abbreviation3 || L.abbreviation, label: L.name })).filter((L) => !L.value || q.has(L.value) ? !1 : (q.add(L.value), !0));
13097
- return F.current.add(E), z.current.delete(E), [E, d];
13096
+ const E = h != null ? String(h) : "all", I = await o.getCountries("", n.locale || "en", h), q = /* @__PURE__ */ new Set(), c = I.map((L) => ({ value: L.abbreviation3 || L.abbreviation, label: L.name })).filter((L) => !L.value || q.has(L.value) ? !1 : (q.add(L.value), !0));
13097
+ return F.current.add(E), z.current.delete(E), [E, c];
13098
13098
  })
13099
13099
  );
13100
- G((h) => ({ ...h, ...Object.fromEntries(g) }));
13101
- } catch (g) {
13102
- V.forEach((h) => z.current.delete(h)), console.error("Failed to load countries:", g);
13100
+ G((h) => ({ ...h, ...Object.fromEntries(f) }));
13101
+ } catch (f) {
13102
+ V.forEach((h) => z.current.delete(h)), console.error("Failed to load countries:", f);
13103
13103
  } finally {
13104
13104
  M.every((h) => F.current.has(h != null ? String(h) : "all")) && v(!1);
13105
13105
  }
@@ -13107,8 +13107,8 @@ const sn = ({
13107
13107
  }, [M, l]);
13108
13108
  const X = (b, V) => {
13109
13109
  var h;
13110
- const D = V ?? ((h = ht[b]) == null ? void 0 : h.countriesType), g = D != null ? String(D) : "all";
13111
- return Y[g] || [];
13110
+ const D = V ?? ((h = ht[b]) == null ? void 0 : h.countriesType), f = D != null ? String(D) : "all";
13111
+ return Y[f] || [];
13112
13112
  }, te = {
13113
13113
  companyName: 1,
13114
13114
  registrationNumber: 1,
@@ -13132,7 +13132,7 @@ const sn = ({
13132
13132
  }, H = Object.fromEntries(
13133
13133
  Object.entries(A).filter(([b]) => b in te)
13134
13134
  ), [re, me] = T({
13135
- workflowKey: f,
13135
+ workflowKey: g,
13136
13136
  companyName: "",
13137
13137
  email: x,
13138
13138
  phone: "",
@@ -13157,27 +13157,27 @@ const sn = ({
13157
13157
  }), [de, Ne] = T({}), [le, ve] = T(0), [he, $] = T({}), [R, P] = T(null), [j, Z] = T(!1), ge = It(), W = ee(() => {
13158
13158
  const b = an(), V = (D) => {
13159
13159
  var I;
13160
- const g = (I = ht[D]) == null ? void 0 : I.countriesType, h = g != null ? String(g) : "all", E = (Y[h] || []).filter((q) => q.value);
13160
+ const f = (I = ht[D]) == null ? void 0 : I.countriesType, h = f != null ? String(f) : "all", E = (Y[h] || []).filter((q) => q.value);
13161
13161
  if (E.length)
13162
13162
  return E[Math.floor(Math.random() * E.length)].value;
13163
13163
  };
13164
13164
  me((D) => {
13165
- const g = { ...D };
13165
+ const f = { ...D };
13166
13166
  for (const [h, E] of Object.entries(b))
13167
13167
  if (h in D && (D[h] === "" || D[h] === null || D[h] === void 0))
13168
13168
  if (O.has(h)) {
13169
13169
  const I = V(h);
13170
- I && (g[h] = I);
13170
+ I && (f[h] = I);
13171
13171
  } else
13172
- g[h] = E;
13173
- return g;
13172
+ f[h] = E;
13173
+ return f;
13174
13174
  }), N && Ne((D) => {
13175
13175
  var h, E;
13176
- const g = { ...D };
13176
+ const f = { ...D };
13177
13177
  for (const I of N)
13178
13178
  for (const q of I.fields)
13179
- !q.isCustom || !q.paramName || g[q.paramName] || (q.customType === "checkbox" || q.customType === "link_checkbox" ? g[q.paramName] = "true" : q.customType === "radio_group" && ((h = q.options) != null && h.length) || q.customType === "group_checkbox" && ((E = q.options) != null && E.length) ? g[q.paramName] = q.options[0].value : q.customType === "text" && (g[q.paramName] = "Sample value"));
13180
- return g;
13179
+ !q.isCustom || !q.paramName || f[q.paramName] || (q.customType === "checkbox" || q.customType === "link_checkbox" ? f[q.paramName] = "true" : q.customType === "radio_group" && ((h = q.options) != null && h.length) || q.customType === "group_checkbox" && ((E = q.options) != null && E.length) ? f[q.paramName] = q.options[0].value : q.customType === "text" && (f[q.paramName] = "Sample value"));
13180
+ return f;
13181
13181
  }), $({}), P(null);
13182
13182
  }, [N, Y]);
13183
13183
  fe(() => {
@@ -13195,10 +13195,10 @@ const sn = ({
13195
13195
  var V;
13196
13196
  for (const D of b.fields) {
13197
13197
  if (!D.isCustom || !D.paramName || !((V = D.blockingValues) != null && V.length)) continue;
13198
- const g = de[D.paramName] ?? "";
13198
+ const f = de[D.paramName] ?? "";
13199
13199
  if (D.customType === "group_checkbox") {
13200
- if (g.split(",").filter(Boolean).some((E) => D.blockingValues.includes(E))) return !0;
13201
- } else if (D.customType === "radio_group" && D.blockingValues.includes(g))
13200
+ if (f.split(",").filter(Boolean).some((E) => D.blockingValues.includes(E))) return !0;
13201
+ } else if (D.customType === "radio_group" && D.blockingValues.includes(f))
13202
13202
  return !0;
13203
13203
  }
13204
13204
  return !1;
@@ -13208,14 +13208,14 @@ const sn = ({
13208
13208
  if (D.isCustom) {
13209
13209
  if (D.customType === "paragraph" || D.customType === "html" || D.customType === "br" || D.customType === "link") continue;
13210
13210
  if (D.required && D.paramName) {
13211
- const g = de[D.paramName], h = ie(D.displayText, p) || ie(D.label, p) || D.paramName;
13212
- D.customType === "checkbox" || D.customType === "link_checkbox" ? g !== "true" && (V[D.paramName] = p("validation.fieldRequired", { field: h })) : (!g || g.trim() === "") && (V[D.paramName] = p("validation.fieldRequired", { field: h }));
13211
+ const f = de[D.paramName], h = ie(D.displayText, m) || ie(D.label, m) || D.paramName;
13212
+ D.customType === "checkbox" || D.customType === "link_checkbox" ? f !== "true" && (V[D.paramName] = m("validation.fieldRequired", { field: h })) : (!f || f.trim() === "") && (V[D.paramName] = m("validation.fieldRequired", { field: h }));
13213
13213
  }
13214
13214
  } else if (D.name) {
13215
- const g = D.name;
13216
- if (U.includes(g) && Kt(re[g])) {
13217
- const h = ht[g], E = ie(D.displayText, p) || (h != null && h.translationKey ? p(`fields.${h.translationKey}`) : void 0) || (h == null ? void 0 : h.label) || g;
13218
- V[g] = p("validation.fieldRequired", { field: E });
13215
+ const f = D.name;
13216
+ if (U.includes(f) && Kt(re[f])) {
13217
+ const h = ht[f], E = ie(D.displayText, m) || (h != null && h.translationKey ? m(`fields.${h.translationKey}`) : void 0) || (h == null ? void 0 : h.label) || f;
13218
+ V[f] = m("validation.fieldRequired", { field: E });
13219
13219
  }
13220
13220
  }
13221
13221
  return V;
@@ -13283,25 +13283,25 @@ const sn = ({
13283
13283
  break;
13284
13284
  }
13285
13285
  }
13286
- const g = [];
13286
+ const f = [];
13287
13287
  if (N) {
13288
13288
  for (const E of N)
13289
13289
  if (Re(E))
13290
13290
  for (const I of E.fields) {
13291
13291
  if (!I.isCustom || !I.paramName || I.customType === "paragraph" || I.customType === "html" || I.customType === "br" || I.customType === "link") continue;
13292
13292
  const q = de[I.paramName] ?? "";
13293
- let d;
13293
+ let c;
13294
13294
  if (I.customType === "checkbox" || I.customType === "link_checkbox")
13295
- d = q === "true" ? "yes" : "no";
13296
- else if (d = q, !d && !I.required) continue;
13297
- g.push({ paramName: I.paramName, value: d });
13295
+ c = q === "true" ? "yes" : "no";
13296
+ else if (c = q, !c && !I.required) continue;
13297
+ f.push({ paramName: I.paramName, value: c });
13298
13298
  }
13299
13299
  }
13300
- g.length > 0 && (V.applicantAdditionalDatas = g);
13301
- const h = await c(V);
13300
+ f.length > 0 && (V.applicantAdditionalDatas = f);
13301
+ const h = await d(V);
13302
13302
  a(h.applicantId);
13303
13303
  } catch (V) {
13304
- console.error("Error creating company applicant:", V), P(V.message || p("createCompany.failedToCreate"));
13304
+ console.error("Error creating company applicant:", V), P(V.message || m("createCompany.failedToCreate"));
13305
13305
  } finally {
13306
13306
  Z(!1);
13307
13307
  }
@@ -13309,19 +13309,19 @@ const sn = ({
13309
13309
  b.preventDefault();
13310
13310
  for (const V of U)
13311
13311
  if (Kt(re[V])) {
13312
- const D = ht[V], g = (D != null && D.translationKey ? p(`fields.${D.translationKey}`) : void 0) || (D == null ? void 0 : D.label) || V;
13313
- P(p("validation.fieldRequired", { field: g }));
13312
+ const D = ht[V], f = (D != null && D.translationKey ? m(`fields.${D.translationKey}`) : void 0) || (D == null ? void 0 : D.label) || V;
13313
+ P(m("validation.fieldRequired", { field: f }));
13314
13314
  return;
13315
13315
  }
13316
13316
  await ze();
13317
- }, He = (b, V, D, g, h) => {
13317
+ }, He = (b, V, D, f, h) => {
13318
13318
  const E = ht[b];
13319
13319
  if (!E) return null;
13320
- const I = U.includes(b), q = he[b], d = ie(D, p) || (E.translationKey ? p(`fields.${E.translationKey}`) : void 0) || E.label, L = b in H, C = V ?? b, m = h ? h !== "placeholder" : B, k = m ? d : void 0;
13320
+ const I = U.includes(b), q = he[b], c = ie(D, m) || (E.translationKey ? m(`fields.${E.translationKey}`) : void 0) || E.label, L = b in H, C = V ?? b, p = h ? h !== "placeholder" : B, k = p ? c : void 0;
13321
13321
  switch (E.type) {
13322
13322
  case "select":
13323
13323
  if (b === "countryResidence" || b === "addressCountry") {
13324
- const w = X(b, g);
13324
+ const w = X(b, f);
13325
13325
  return /* @__PURE__ */ i(
13326
13326
  nt,
13327
13327
  {
@@ -13329,7 +13329,7 @@ const sn = ({
13329
13329
  label: k,
13330
13330
  value: re[b] || "",
13331
13331
  onChange: (ue) => J(b, ue),
13332
- options: [{ value: "", label: m ? p("placeholders.selectCountry") : d }, ...w],
13332
+ options: [{ value: "", label: p ? m("placeholders.selectCountry") : c }, ...w],
13333
13333
  disabled: Q,
13334
13334
  readOnly: L,
13335
13335
  error: q
@@ -13345,7 +13345,7 @@ const sn = ({
13345
13345
  required: I,
13346
13346
  type: "date",
13347
13347
  label: k,
13348
- placeholder: m ? void 0 : d,
13348
+ placeholder: p ? void 0 : c,
13349
13349
  value: re[b] || "",
13350
13350
  onChange: (w) => J(b, w.target.value),
13351
13351
  readOnly: L,
@@ -13360,7 +13360,7 @@ const sn = ({
13360
13360
  required: I,
13361
13361
  type: "email",
13362
13362
  label: k,
13363
- placeholder: m ? void 0 : d,
13363
+ placeholder: p ? void 0 : c,
13364
13364
  value: re[b] || "",
13365
13365
  onChange: (w) => J(b, w.target.value),
13366
13366
  readOnly: L,
@@ -13375,7 +13375,7 @@ const sn = ({
13375
13375
  required: I,
13376
13376
  type: "tel",
13377
13377
  label: k,
13378
- placeholder: m ? void 0 : d,
13378
+ placeholder: p ? void 0 : c,
13379
13379
  value: re[b] || "",
13380
13380
  onChange: (w) => J(b, w.target.value),
13381
13381
  readOnly: L,
@@ -13390,7 +13390,7 @@ const sn = ({
13390
13390
  required: I,
13391
13391
  type: "text",
13392
13392
  label: k,
13393
- placeholder: m ? void 0 : d,
13393
+ placeholder: p ? void 0 : c,
13394
13394
  value: re[b] || "",
13395
13395
  onChange: (w) => J(b, w.target.value),
13396
13396
  readOnly: L,
@@ -13405,12 +13405,12 @@ const sn = ({
13405
13405
  "p",
13406
13406
  {
13407
13407
  style: { fontSize: "14px", lineHeight: "1.7", margin: 0, color: "var(--metakyc-text-secondary, #6b7280)" },
13408
- dangerouslySetInnerHTML: { __html: ie(b.displayText, p) || ie(b.label, p) || "" }
13408
+ dangerouslySetInnerHTML: { __html: ie(b.displayText, m) || ie(b.label, m) || "" }
13409
13409
  },
13410
13410
  `custom-${V}`
13411
13411
  );
13412
13412
  if (b.customType === "html")
13413
- return /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: ie(b.label, p) || "" } }, `custom-${V}`);
13413
+ return /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: ie(b.label, m) || "" } }, `custom-${V}`);
13414
13414
  if (b.customType === "br")
13415
13415
  return /* @__PURE__ */ i("div", { style: { height: "12px" } }, `custom-${V}`);
13416
13416
  if (b.customType === "link")
@@ -13421,11 +13421,11 @@ const sn = ({
13421
13421
  target: "_blank",
13422
13422
  rel: "noopener noreferrer",
13423
13423
  style: { color: "var(--metakyc-primary, #2563eb)", fontSize: "14px", textDecoration: "underline" },
13424
- children: ie(b.displayText, p) || ie(b.label, p) || b.linkText || b.linkUrl || ""
13424
+ children: ie(b.displayText, m) || ie(b.label, m) || b.linkText || b.linkUrl || ""
13425
13425
  }
13426
13426
  ) }, `custom-${V}`);
13427
13427
  if (!b.paramName) return null;
13428
- const D = he[b.paramName], g = ie(b.displayText, p) || ie(b.label, p) || b.paramName, h = b.labelMode ? b.labelMode !== "placeholder" : B;
13428
+ const D = he[b.paramName], f = ie(b.displayText, m) || ie(b.label, m) || b.paramName, h = b.labelMode ? b.labelMode !== "placeholder" : B;
13429
13429
  if (b.customType === "checkbox") {
13430
13430
  const E = de[b.paramName] === "true";
13431
13431
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
@@ -13445,7 +13445,7 @@ const sn = ({
13445
13445
  }
13446
13446
  ),
13447
13447
  /* @__PURE__ */ s("span", { style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)" }, children: [
13448
- g,
13448
+ f,
13449
13449
  b.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
13450
13450
  ] })
13451
13451
  ]
@@ -13458,8 +13458,8 @@ const sn = ({
13458
13458
  Te,
13459
13459
  {
13460
13460
  type: "text",
13461
- label: h ? `${g}${b.required ? " *" : ""}` : void 0,
13462
- placeholder: h ? void 0 : g,
13461
+ label: h ? `${f}${b.required ? " *" : ""}` : void 0,
13462
+ placeholder: h ? void 0 : f,
13463
13463
  value: de[b.paramName] || "",
13464
13464
  onChange: (E) => ke(b.paramName, E.target.value),
13465
13465
  required: b.required,
@@ -13485,59 +13485,59 @@ const sn = ({
13485
13485
  onChange: (D) => ke(b.conditionalOn, D ? "true" : "false")
13486
13486
  }
13487
13487
  ),
13488
- /* @__PURE__ */ i("span", { style: { fontSize: "14px", fontWeight: 500 }, children: ie(b.conditionalLabel, p) || b.conditionalOn })
13488
+ /* @__PURE__ */ i("span", { style: { fontSize: "14px", fontWeight: 500 }, children: ie(b.conditionalLabel, m) || b.conditionalOn })
13489
13489
  ]
13490
13490
  }
13491
13491
  ),
13492
- V && /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: b.fields.map((D, g) => {
13493
- const h = Math.min(4, Math.max(1, Number(D.colSpan) || 4)), E = D.isCustom ? `custom-${g}-${D.paramName}` : `builtin-${D.name}-${g}`;
13494
- return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${h} / span ${h}` }, children: D.isCustom ? et(D, g) : He(D.name, E, D.displayText, D.countriesType, D.labelMode) }, E);
13492
+ V && /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: b.fields.map((D, f) => {
13493
+ const h = Math.min(4, Math.max(1, Number(D.colSpan) || 4)), E = D.isCustom ? `custom-${f}-${D.paramName}` : `builtin-${D.name}-${f}`;
13494
+ return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${h} / span ${h}` }, children: D.isCustom ? et(D, f) : He(D.name, E, D.displayText, D.countriesType, D.labelMode) }, E);
13495
13495
  }) })
13496
13496
  ] });
13497
13497
  };
13498
13498
  if (!l || Q)
13499
13499
  return /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
13500
13500
  /* @__PURE__ */ i(Ke, { className: "my-8" }),
13501
- /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: p("common.loadingForm") })
13501
+ /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: m("common.loadingForm") })
13502
13502
  ] }) }) });
13503
13503
  if (N) {
13504
- const b = N[le] ?? N[0], V = st === -1, D = _e === -1, g = N.length, h = Re(b), E = Ce(b), I = Object.values(he), q = !h && !!b.conditionalOn && b.conditionalMode === "block", d = j || u || q || E;
13504
+ const b = N[le] ?? N[0], V = st === -1, D = _e === -1, f = N.length, h = Re(b), E = Ce(b), I = Object.values(he), q = !h && !!b.conditionalOn && b.conditionalMode === "block", c = j || u || q || E;
13505
13505
  let L;
13506
- return q || E ? L = p("common.blocked") : D ? L = b.conditionalOn && !h ? p("common.skipAndSubmit") : p("common.submit") : L = b.conditionalOn && !h ? p("common.skip") : p("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(ne, { children: [
13507
- /* @__PURE__ */ i(Le, { children: /* @__PURE__ */ i(Rt, { title: (l == null ? void 0 : l.title) || p("createCompany.title") }) }),
13506
+ return q || E ? L = m("common.blocked") : D ? L = b.conditionalOn && !h ? m("common.skipAndSubmit") : m("common.submit") : L = b.conditionalOn && !h ? m("common.skip") : m("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(ne, { children: [
13507
+ /* @__PURE__ */ i(Le, { children: /* @__PURE__ */ i(Rt, { title: (l == null ? void 0 : l.title) || m("createCompany.title") }) }),
13508
13508
  /* @__PURE__ */ s(oe, { children: [
13509
13509
  (b.title || b.subtitle) && /* @__PURE__ */ s("div", { className: "mb-4", children: [
13510
- b.title && /* @__PURE__ */ i("h3", { className: "font-semibold text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children: ie(b.title, p) }),
13511
- b.subtitle && /* @__PURE__ */ i("p", { className: "text-sm mt-0.5", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: ie(b.subtitle, p) })
13510
+ b.title && /* @__PURE__ */ i("h3", { className: "font-semibold text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children: ie(b.title, m) }),
13511
+ b.subtitle && /* @__PURE__ */ i("p", { className: "text-sm mt-0.5", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: ie(b.subtitle, m) })
13512
13512
  ] }),
13513
13513
  (R || I.length > 0) && /* @__PURE__ */ s("div", { className: "mb-4 p-3 rounded-lg", style: {
13514
13514
  backgroundColor: "var(--metakyc-danger-bg, color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent))",
13515
13515
  border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 30%, transparent)"
13516
13516
  }, children: [
13517
13517
  R && /* @__PURE__ */ s("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: [
13518
- /* @__PURE__ */ i("strong", { children: p("common.errorPrefix") }),
13518
+ /* @__PURE__ */ i("strong", { children: m("common.errorPrefix") }),
13519
13519
  " ",
13520
13520
  R
13521
13521
  ] }),
13522
- I.map((C, m) => /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: C }, m))
13522
+ I.map((C, p) => /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: C }, p))
13523
13523
  ] }),
13524
- g > 1 && /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", marginBottom: "1rem" }, children: [
13525
- N.map((C, m) => /* @__PURE__ */ i(
13524
+ f > 1 && /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", marginBottom: "1rem" }, children: [
13525
+ N.map((C, p) => /* @__PURE__ */ i(
13526
13526
  "div",
13527
13527
  {
13528
13528
  style: {
13529
13529
  height: "0.375rem",
13530
13530
  borderRadius: "9999px",
13531
13531
  transition: "all 150ms",
13532
- ...m === le ? { flex: "1 1 0%", backgroundColor: "var(--metakyc-primary, #2563eb)", opacity: 0.3 } : m < le ? { width: "2rem", backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { width: "2rem", backgroundColor: "#e5e7eb", opacity: 0.3 }
13532
+ ...p === le ? { flex: "1 1 0%", backgroundColor: "var(--metakyc-primary, #2563eb)", opacity: 0.3 } : p < le ? { width: "2rem", backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { width: "2rem", backgroundColor: "#e5e7eb", opacity: 0.3 }
13533
13533
  }
13534
13534
  },
13535
- m
13535
+ p
13536
13536
  )),
13537
13537
  /* @__PURE__ */ s("span", { style: { fontSize: "0.75rem", color: "var(--metakyc-text-muted, #9ca3af)", flexShrink: 0 }, children: [
13538
13538
  le + 1,
13539
13539
  " / ",
13540
- g
13540
+ f
13541
13541
  ] })
13542
13542
  ] }),
13543
13543
  De(b)
@@ -13553,23 +13553,23 @@ const sn = ({
13553
13553
  ve(st), $({});
13554
13554
  },
13555
13555
  disabled: j || u,
13556
- children: p("common.previous")
13556
+ children: m("common.previous")
13557
13557
  }
13558
13558
  ),
13559
13559
  V && r && /* @__PURE__ */ i(se, { type: "button", variant: "outline", onClick: r, disabled: j || u, children: "Cancel" })
13560
13560
  ] }),
13561
- /* @__PURE__ */ i(se, { type: "button", isLoading: j || u, disabled: d, onClick: D ? ze : Ye, children: L })
13561
+ /* @__PURE__ */ i(se, { type: "button", isLoading: j || u, disabled: c, onClick: D ? ze : Ye, children: L })
13562
13562
  ] })
13563
13563
  ] }) });
13564
13564
  }
13565
13565
  return /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i("form", { onSubmit: Qe, children: /* @__PURE__ */ s(ne, { children: [
13566
- /* @__PURE__ */ i(Le, { children: /* @__PURE__ */ i(Rt, { title: (l == null ? void 0 : l.title) || p("createCompany.title") }) }),
13566
+ /* @__PURE__ */ i(Le, { children: /* @__PURE__ */ i(Rt, { title: (l == null ? void 0 : l.title) || m("createCompany.title") }) }),
13567
13567
  /* @__PURE__ */ s(oe, { children: [
13568
13568
  R && /* @__PURE__ */ i("div", { className: "mb-6 p-4 rounded-lg", style: {
13569
13569
  backgroundColor: "var(--metakyc-danger-bg, color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent))",
13570
13570
  border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 30%, transparent)"
13571
13571
  }, children: /* @__PURE__ */ s("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: [
13572
- /* @__PURE__ */ i("strong", { children: p("common.errorPrefix") }),
13572
+ /* @__PURE__ */ i("strong", { children: m("common.errorPrefix") }),
13573
13573
  " ",
13574
13574
  R
13575
13575
  ] }) }),
@@ -13577,7 +13577,7 @@ const sn = ({
13577
13577
  ] }),
13578
13578
  /* @__PURE__ */ s(Ee, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
13579
13579
  r && /* @__PURE__ */ i(se, { type: "button", variant: "outline", onClick: r, disabled: j || u, children: "Cancel" }),
13580
- /* @__PURE__ */ i(se, { type: "submit", isLoading: j || u, children: p("createCompany.registerCompany") })
13580
+ /* @__PURE__ */ i(se, { type: "submit", isLoading: j || u, children: m("createCompany.registerCompany") })
13581
13581
  ] })
13582
13582
  ] }) }) });
13583
13583
  }, ln = ["ar"], cn = "JVBERi0xLjAKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXSA+PgplbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwNTggMDAwMDAgbiAKMDAwMDAwMDExNSAwMMDAwIG4gCnRyYWlsZXIKPDwgL1NpemUgNCAvUm9vdCAxIDAgUiA+PgpzdGFydHhyZWYKMjA2CiUlRU9G", dn = ({
@@ -13587,9 +13587,9 @@ const sn = ({
13587
13587
  onWorkflowChange: r,
13588
13588
  className: n
13589
13589
  }) => {
13590
- const { t: o } = Ie(), { applicantService: l, locale: c } = Se(), u = ln.includes(c), {
13591
- progress: p,
13592
- currentStep: f,
13590
+ const { t: o } = Ie(), { applicantService: l, locale: d } = Se(), u = ln.includes(d), {
13591
+ progress: m,
13592
+ currentStep: g,
13593
13593
  steps: y,
13594
13594
  nextWorkflowKey: x,
13595
13595
  hasWorkflowChanged: A,
@@ -13607,15 +13607,15 @@ const sn = ({
13607
13607
  ye.useEffect(() => {
13608
13608
  const $ = Q.current;
13609
13609
  if (!$) return;
13610
- const R = f ? f.title || f.name || ae[f.action] : null;
13610
+ const R = g ? g.title || g.name || ae[g.action] : null;
13611
13611
  $.updateSdkState({
13612
13612
  currentStep: R,
13613
- stepOrder: (f == null ? void 0 : f.order) ?? null,
13614
- stepAction: f ? ae[f.action] : null,
13615
- workflowStatus: (p == null ? void 0 : p.status) != null ? qe[p.status] : null,
13613
+ stepOrder: (g == null ? void 0 : g.order) ?? null,
13614
+ stepAction: g ? ae[g.action] : null,
13615
+ workflowStatus: (m == null ? void 0 : m.status) != null ? qe[m.status] : null,
13616
13616
  totalSteps: y.length
13617
13617
  });
13618
- }, [Q, f, p == null ? void 0 : p.status, y.length]), ye.useEffect(() => {
13618
+ }, [Q, g, m == null ? void 0 : m.status, y.length]), ye.useEffect(() => {
13619
13619
  const $ = Q.current;
13620
13620
  if ($)
13621
13621
  return $.registerAction({
@@ -13627,8 +13627,8 @@ const sn = ({
13627
13627
  }), () => $.unregisterAction("workflow-refresh");
13628
13628
  }, [Q, U]);
13629
13629
  const H = ye.useMemo(() => y.filter(($) => $.visibility !== !1), [y]), me = ye.useMemo(
13630
- () => H.findIndex(($) => $.order === (f == null ? void 0 : f.order)),
13631
- [H, f == null ? void 0 : f.order]
13630
+ () => H.findIndex(($) => $.order === (g == null ? void 0 : g.order)),
13631
+ [H, g == null ? void 0 : g.order]
13632
13632
  ) <= 0;
13633
13633
  ye.useEffect(() => {
13634
13634
  const $ = Q.current;
@@ -13647,8 +13647,8 @@ const sn = ({
13647
13647
  }
13648
13648
  }, [Q, N, me]);
13649
13649
  const de = ye.useCallback(async () => {
13650
- if (!f || !e) return;
13651
- const $ = f.action;
13650
+ if (!g || !e) return;
13651
+ const $ = g.action;
13652
13652
  try {
13653
13653
  switch ($) {
13654
13654
  case ae.Overview: {
@@ -13741,7 +13741,7 @@ const sn = ({
13741
13741
  _.warn(`[DevTools] Failed to skip step: ${R}`);
13742
13742
  }
13743
13743
  }, [
13744
- f,
13744
+ g,
13745
13745
  e,
13746
13746
  U,
13747
13747
  v,
@@ -13752,24 +13752,24 @@ const sn = ({
13752
13752
  ]);
13753
13753
  ye.useEffect(() => {
13754
13754
  const $ = Q.current;
13755
- if (!$ || !f) return;
13756
- const R = f.action;
13755
+ if (!$ || !g) return;
13756
+ const R = g.action;
13757
13757
  if (!(R !== ae.IdentitySdk && R !== ae.ManualReview)) {
13758
13758
  $.unregisterAction("workflow-skip");
13759
13759
  return;
13760
13760
  }
13761
13761
  return $.registerAction({
13762
13762
  id: "workflow-skip",
13763
- label: `Skip: ${f.title || f.name || ae[R]}`,
13763
+ label: `Skip: ${g.title || g.name || ae[R]}`,
13764
13764
  icon: "⏭️",
13765
13765
  group: "workflow",
13766
13766
  handler: de
13767
13767
  }), () => $.unregisterAction("workflow-skip");
13768
- }, [Q, f, de]), ye.useEffect(() => {
13768
+ }, [Q, g, de]), ye.useEffect(() => {
13769
13769
  B && a && a(B);
13770
13770
  }, [B, a]), ye.useEffect(() => {
13771
- p != null && p.workflowResult && t && t(p.workflowResult);
13772
- }, [p == null ? void 0 : p.workflowResult, t]);
13771
+ m != null && m.workflowResult && t && t(m.workflowResult);
13772
+ }, [m == null ? void 0 : m.workflowResult, t]);
13773
13773
  const Ne = ye.useRef(!1);
13774
13774
  if (ye.useEffect(() => {
13775
13775
  if (!A || !x || !e || Ne.current) return;
@@ -13794,7 +13794,7 @@ const sn = ({
13794
13794
  })(), () => {
13795
13795
  $ = !0;
13796
13796
  };
13797
- }, [A, x, e, l, r]), S || K || !p)
13797
+ }, [A, x, e, l, r]), S || K || !m)
13798
13798
  return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${n || ""}`, dir: u ? "rtl" : void 0, children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
13799
13799
  /* @__PURE__ */ i(Ke, { className: "my-8" }),
13800
13800
  /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: o("workflow.loadingWorkflow") })
@@ -13812,24 +13812,24 @@ const sn = ({
13812
13812
  /* @__PURE__ */ i(Ke, { className: "my-8" }),
13813
13813
  /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: o("workflow.loadingWorkflow") })
13814
13814
  ] }) }) });
13815
- if (p.status === qe.Finished || p.status === qe.OnHold)
13815
+ if (m.status === qe.Finished || m.status === qe.OnHold)
13816
13816
  return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${n || ""}`, dir: u ? "rtl" : void 0, children: /* @__PURE__ */ i(
13817
13817
  hi,
13818
13818
  {
13819
- kycStatus: p.kycStatus,
13820
- reviewStatus: p.reviewStatus,
13821
- workflowResult: p.workflowResult,
13822
- customMessage: p.customMessage,
13823
- onContinue: t && p.workflowResult ? () => t(p.workflowResult) : void 0,
13819
+ kycStatus: m.kycStatus,
13820
+ reviewStatus: m.reviewStatus,
13821
+ workflowResult: m.workflowResult,
13822
+ customMessage: m.customMessage,
13823
+ onContinue: t && m.workflowResult ? () => t(m.workflowResult) : void 0,
13824
13824
  onContactSupport: () => {
13825
13825
  typeof window < "u" && (window.location.href = "mailto:support@example.com");
13826
13826
  }
13827
13827
  }
13828
13828
  ) });
13829
- if (!f)
13829
+ if (!g)
13830
13830
  return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${n || ""}`, dir: u ? "rtl" : void 0, children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
13831
13831
  /* @__PURE__ */ i(Ke, { className: "my-8" }),
13832
- /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: p.status === qe.IdentityPending ? o("workflow.loadingIdentityVerification") : o("workflow.loadingCurrentStep") })
13832
+ /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: m.status === qe.IdentityPending ? o("workflow.loadingIdentityVerification") : o("workflow.loadingCurrentStep") })
13833
13833
  ] }) }) });
13834
13834
  const le = ($) => {
13835
13835
  switch ($) {
@@ -13855,7 +13855,7 @@ const sn = ({
13855
13855
  return "";
13856
13856
  }
13857
13857
  }, ve = () => {
13858
- const $ = y.filter((ge) => ge.visibility !== !1), R = $.findIndex((ge) => ge.order === f.order), P = R >= 0 ? R + 1 : 1, j = $.length, Z = j > 1 ? (R + 1) / j * 100 : 100;
13858
+ const $ = y.filter((ge) => ge.visibility !== !1), R = $.findIndex((ge) => ge.order === g.order), P = R >= 0 ? R + 1 : 1, j = $.length, Z = j > 1 ? (R + 1) / j * 100 : 100;
13859
13859
  return /* @__PURE__ */ s("div", { className: "metakyc-progress-wrapper", style: {
13860
13860
  marginBottom: "24px",
13861
13861
  backgroundColor: "var(--metakyc-surface, var(--metakyc-background, #ffffff))",
@@ -13866,7 +13866,7 @@ const sn = ({
13866
13866
  }, children: [
13867
13867
  /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", marginBottom: "16px", gap: "8px", flexWrap: "wrap" }, children: [
13868
13868
  /* @__PURE__ */ i(Rt, {}),
13869
- /* @__PURE__ */ i(zi, { variant: p.status === 1 ? "info" : "success", children: o("common.stepXofY", { current: P, total: j }) })
13869
+ /* @__PURE__ */ i(zi, { variant: m.status === 1 ? "info" : "success", children: o("common.stepXofY", { current: P, total: j }) })
13870
13870
  ] }),
13871
13871
  /* @__PURE__ */ s("div", { style: { position: "relative", height: "4px", borderRadius: "999px", overflow: "hidden", marginBottom: "16px" }, children: [
13872
13872
  /* @__PURE__ */ i("div", { style: { position: "absolute", inset: 0, backgroundColor: "var(--metakyc-border, #e5e7eb)", opacity: 0.3 } }),
@@ -13892,14 +13892,14 @@ const sn = ({
13892
13892
  )
13893
13893
  ] });
13894
13894
  }, he = () => {
13895
- const P = y.filter((Z) => Z.visibility !== !1).findIndex((Z) => Z.order === f.order) <= 0, j = {
13895
+ const P = y.filter((Z) => Z.visibility !== !1).findIndex((Z) => Z.order === g.order) <= 0, j = {
13896
13896
  applicantId: e,
13897
13897
  onComplete: async () => {
13898
13898
  await U();
13899
13899
  },
13900
13900
  onBack: P ? void 0 : N
13901
13901
  };
13902
- switch (f.action) {
13902
+ switch (g.action) {
13903
13903
  case ae.Questionaries:
13904
13904
  return /* @__PURE__ */ i(za, { ...j });
13905
13905
  case ae.UploadDocument:
@@ -13919,10 +13919,10 @@ const sn = ({
13919
13919
  return /* @__PURE__ */ i(
13920
13920
  hi,
13921
13921
  {
13922
- kycStatus: p.kycStatus,
13923
- reviewStatus: p.reviewStatus,
13924
- workflowResult: p.workflowResult,
13925
- customMessage: p.customMessage
13922
+ kycStatus: m.kycStatus,
13923
+ reviewStatus: m.reviewStatus,
13924
+ workflowResult: m.workflowResult,
13925
+ customMessage: m.customMessage
13926
13926
  }
13927
13927
  );
13928
13928
  default:
@@ -13931,12 +13931,12 @@ const sn = ({
13931
13931
  /* @__PURE__ */ s("p", { className: "text-gray-600 dark:text-gray-400 mb-2", children: [
13932
13932
  o("workflow.processingStep"),
13933
13933
  " ",
13934
- f.title || f.name
13934
+ g.title || g.name
13935
13935
  ] }),
13936
13936
  /* @__PURE__ */ s("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
13937
13937
  o("workflow.actionType"),
13938
13938
  " ",
13939
- ae[f.action]
13939
+ ae[g.action]
13940
13940
  ] })
13941
13941
  ] }) });
13942
13942
  }
@@ -13950,7 +13950,7 @@ const sn = ({
13950
13950
  const n = ye.useRef(null), o = ye.useRef(null);
13951
13951
  return ye.useImperativeHandle(r, () => n.current), ye.useEffect(() => {
13952
13952
  if (o.current && n.current) {
13953
- const l = n.current, c = o.current, u = c.offsetLeft - l.offsetWidth / 2 + c.offsetWidth / 2;
13953
+ const l = n.current, d = o.current, u = d.offsetLeft - l.offsetWidth / 2 + d.offsetWidth / 2;
13954
13954
  l.scrollTo({ left: Math.max(0, u), behavior: "smooth" });
13955
13955
  }
13956
13956
  }, [t]), /* @__PURE__ */ i(
@@ -13970,13 +13970,13 @@ const sn = ({
13970
13970
  padding: "4px 0",
13971
13971
  gap: "0"
13972
13972
  },
13973
- children: e.map((l, c) => {
13974
- const u = c < t, p = c === t, f = u || p, y = l.displayName || l.name || a(l.action) || `Step ${c + 1}`;
13973
+ children: e.map((l, d) => {
13974
+ const u = d < t, m = d === t, g = u || m, y = l.displayName || l.name || a(l.action) || `Step ${d + 1}`;
13975
13975
  return /* @__PURE__ */ s(ye.Fragment, { children: [
13976
13976
  /* @__PURE__ */ s(
13977
13977
  "div",
13978
13978
  {
13979
- ref: p ? o : void 0,
13979
+ ref: m ? o : void 0,
13980
13980
  style: {
13981
13981
  display: "flex",
13982
13982
  alignItems: "center",
@@ -13994,7 +13994,7 @@ const sn = ({
13994
13994
  fontWeight: 600,
13995
13995
  flexShrink: 0,
13996
13996
  transition: "all 0.2s ease",
13997
- ...f ? {
13997
+ ...g ? {
13998
13998
  backgroundColor: "var(--metakyc-primary, #2563eb)",
13999
13999
  color: "#ffffff",
14000
14000
  border: "none"
@@ -14003,19 +14003,19 @@ const sn = ({
14003
14003
  color: "var(--metakyc-text-muted, #9ca3af)",
14004
14004
  border: "2px solid var(--metakyc-border, #e5e7eb)"
14005
14005
  }
14006
- }, children: u ? /* @__PURE__ */ i("svg", { width: "14", height: "14", fill: "none", stroke: "currentColor", strokeWidth: 2.5, viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) }) : c + 1 }),
14006
+ }, children: u ? /* @__PURE__ */ i("svg", { width: "14", height: "14", fill: "none", stroke: "currentColor", strokeWidth: 2.5, viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) }) : d + 1 }),
14007
14007
  /* @__PURE__ */ i("span", { style: {
14008
14008
  marginLeft: "6px",
14009
14009
  fontSize: "13px",
14010
14010
  whiteSpace: "nowrap",
14011
- fontWeight: p ? 600 : 400,
14012
- color: p ? "var(--metakyc-text-primary, #111827)" : u ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-text-muted, #9ca3af)",
14011
+ fontWeight: m ? 600 : 400,
14012
+ color: m ? "var(--metakyc-text-primary, #111827)" : u ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-text-muted, #9ca3af)",
14013
14013
  transition: "color 0.2s ease"
14014
14014
  }, children: y })
14015
14015
  ]
14016
14016
  }
14017
14017
  ),
14018
- c < e.length - 1 && /* @__PURE__ */ i("div", { style: {
14018
+ d < e.length - 1 && /* @__PURE__ */ i("div", { style: {
14019
14019
  flex: "1 1 0%",
14020
14020
  minWidth: "16px",
14021
14021
  height: "2px",
@@ -14066,25 +14066,30 @@ const sn = ({
14066
14066
  ]
14067
14067
  }
14068
14068
  ), pn = () => {
14069
- const { locale: e, setLocale: t } = Se(), [a, r] = T(!1), n = pe(null), o = Object.keys(Pt);
14069
+ const { locale: e, setLocale: t, currentTheme: a } = Se(), [r, n] = T(!1), o = pe(null), l = Object.keys(Pt), d = a != null && a.allowedLanguages && a.allowedLanguages.length > 0 ? l.filter((m) => {
14070
+ const g = m.toUpperCase();
14071
+ return a.allowedLanguages.some(
14072
+ (y) => y.toUpperCase() === g
14073
+ );
14074
+ }) : l;
14070
14075
  fe(() => {
14071
- const c = (u) => {
14072
- n.current && !n.current.contains(u.target) && r(!1);
14076
+ const m = (g) => {
14077
+ o.current && !o.current.contains(g.target) && n(!1);
14073
14078
  };
14074
- return a && document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
14075
- }, [a]);
14076
- const l = e === "ar";
14079
+ return r && document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
14080
+ }, [r]);
14081
+ const u = e === "ar";
14077
14082
  return /* @__PURE__ */ s(
14078
14083
  "div",
14079
14084
  {
14080
- ref: n,
14085
+ ref: o,
14081
14086
  style: { position: "relative", display: "inline-flex", zIndex: 50 },
14082
14087
  children: [
14083
14088
  /* @__PURE__ */ s(
14084
14089
  "button",
14085
14090
  {
14086
14091
  type: "button",
14087
- onClick: () => r(!a),
14092
+ onClick: () => n(!r),
14088
14093
  "aria-label": "Select language",
14089
14094
  style: {
14090
14095
  display: "inline-flex",
@@ -14101,11 +14106,11 @@ const sn = ({
14101
14106
  transition: "border-color 0.15s, box-shadow 0.15s",
14102
14107
  lineHeight: 1
14103
14108
  },
14104
- onMouseEnter: (c) => {
14105
- c.currentTarget.style.borderColor = "var(--metakyc-primary, #2563eb)";
14109
+ onMouseEnter: (m) => {
14110
+ m.currentTarget.style.borderColor = "var(--metakyc-primary, #2563eb)";
14106
14111
  },
14107
- onMouseLeave: (c) => {
14108
- a || (c.currentTarget.style.borderColor = "var(--metakyc-border, #e5e7eb)");
14112
+ onMouseLeave: (m) => {
14113
+ r || (m.currentTarget.style.borderColor = "var(--metakyc-border, #e5e7eb)");
14109
14114
  },
14110
14115
  children: [
14111
14116
  /* @__PURE__ */ i(mn, { size: 16 }),
@@ -14121,7 +14126,7 @@ const sn = ({
14121
14126
  strokeWidth: 2.5,
14122
14127
  style: {
14123
14128
  transition: "transform 0.15s",
14124
- transform: a ? "rotate(180deg)" : "rotate(0deg)"
14129
+ transform: r ? "rotate(180deg)" : "rotate(0deg)"
14125
14130
  },
14126
14131
  children: /* @__PURE__ */ i("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 9l-7 7-7-7" })
14127
14132
  }
@@ -14129,13 +14134,13 @@ const sn = ({
14129
14134
  ]
14130
14135
  }
14131
14136
  ),
14132
- a && /* @__PURE__ */ i(
14137
+ r && /* @__PURE__ */ i(
14133
14138
  "div",
14134
14139
  {
14135
14140
  style: {
14136
14141
  position: "absolute",
14137
14142
  top: "100%",
14138
- ...l ? { left: 0 } : { right: 0 },
14143
+ ...u ? { left: 0 } : { right: 0 },
14139
14144
  marginTop: "4px",
14140
14145
  minWidth: "160px",
14141
14146
  maxHeight: "240px",
@@ -14147,14 +14152,14 @@ const sn = ({
14147
14152
  padding: "4px 0",
14148
14153
  zIndex: 51
14149
14154
  },
14150
- children: o.map((c) => {
14151
- const u = c === e;
14155
+ children: d.map((m) => {
14156
+ const g = m === e;
14152
14157
  return /* @__PURE__ */ i(
14153
14158
  "button",
14154
14159
  {
14155
14160
  type: "button",
14156
14161
  onClick: () => {
14157
- t(c), r(!1);
14162
+ t(m), n(!1);
14158
14163
  },
14159
14164
  style: {
14160
14165
  display: "flex",
@@ -14162,24 +14167,24 @@ const sn = ({
14162
14167
  width: "100%",
14163
14168
  padding: "8px 12px",
14164
14169
  border: "none",
14165
- backgroundColor: u ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 10%, transparent)" : "transparent",
14166
- color: u ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-text-primary, #111827)",
14170
+ backgroundColor: g ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 10%, transparent)" : "transparent",
14171
+ color: g ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-text-primary, #111827)",
14167
14172
  fontSize: "13px",
14168
- fontWeight: u ? 600 : 400,
14173
+ fontWeight: g ? 600 : 400,
14169
14174
  cursor: "pointer",
14170
- textAlign: l ? "right" : "left",
14171
- direction: c === "ar" ? "rtl" : "ltr",
14175
+ textAlign: u ? "right" : "left",
14176
+ direction: m === "ar" ? "rtl" : "ltr",
14172
14177
  transition: "background-color 0.1s"
14173
14178
  },
14174
- onMouseEnter: (p) => {
14175
- u || (p.currentTarget.style.backgroundColor = "var(--metakyc-surface, #f9fafb)");
14179
+ onMouseEnter: (y) => {
14180
+ g || (y.currentTarget.style.backgroundColor = "var(--metakyc-surface, #f9fafb)");
14176
14181
  },
14177
- onMouseLeave: (p) => {
14178
- u || (p.currentTarget.style.backgroundColor = "transparent");
14182
+ onMouseLeave: (y) => {
14183
+ g || (y.currentTarget.style.backgroundColor = "transparent");
14179
14184
  },
14180
- children: wi[c] || c.toUpperCase()
14185
+ children: wi[m] || m.toUpperCase()
14181
14186
  },
14182
- c
14187
+ m
14183
14188
  );
14184
14189
  })
14185
14190
  }
@@ -14221,17 +14226,17 @@ const xi = ({
14221
14226
  }) => {
14222
14227
  var K, O;
14223
14228
  const { t: o } = Ie(), { config: l } = Se(), {
14224
- phase: c,
14229
+ phase: d,
14225
14230
  applicantId: u,
14226
- isCompany: p,
14227
- workflowKey: f,
14231
+ isCompany: m,
14232
+ workflowKey: g,
14228
14233
  error: y,
14229
14234
  isLoading: x,
14230
14235
  transitionToWorkflow: A,
14231
14236
  switchApplicant: S,
14232
14237
  refresh: B
14233
14238
  } = la(e);
14234
- fn(c, u, p, f);
14239
+ fn(d, u, m, g);
14235
14240
  const N = It();
14236
14241
  ye.useEffect(() => {
14237
14242
  const M = N.current;
@@ -14249,19 +14254,19 @@ const xi = ({
14249
14254
  const U = ye.useCallback((M) => {
14250
14255
  r == null || r(M), A(M);
14251
14256
  }, [r, A]);
14252
- if (c === "loading" || x)
14257
+ if (d === "loading" || x)
14253
14258
  return /* @__PURE__ */ i(Ct, { className: n, children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
14254
14259
  /* @__PURE__ */ i(Ke, { className: "my-8" }),
14255
14260
  /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: o("workflow.loadingWorkflow") })
14256
14261
  ] }) }) });
14257
- if (c === "error")
14262
+ if (d === "error")
14258
14263
  return /* @__PURE__ */ i(Ct, { className: n, children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { className: "text-center py-8", children: [
14259
14264
  /* @__PURE__ */ i("p", { className: "text-lg mb-4", style: { color: "var(--metakyc-danger, #ef4444)" }, children: o("workflow.errorOccurred") }),
14260
14265
  /* @__PURE__ */ i("p", { style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: (y == null ? void 0 : y.message) || "An unexpected error occurred." })
14261
14266
  ] }) }) }) });
14262
- if (c === "create_applicant") {
14263
- const M = f || ((K = l.applicantForm) == null ? void 0 : K.workflowKey), Y = (O = l.applicantForm) == null ? void 0 : O.externalRefId;
14264
- return p ? /* @__PURE__ */ i(Ct, { className: n, children: /* @__PURE__ */ i(
14267
+ if (d === "create_applicant") {
14268
+ const M = g || ((K = l.applicantForm) == null ? void 0 : K.workflowKey), Y = (O = l.applicantForm) == null ? void 0 : O.externalRefId;
14269
+ return m ? /* @__PURE__ */ i(Ct, { className: n, children: /* @__PURE__ */ i(
14265
14270
  sn,
14266
14271
  {
14267
14272
  workflowKey: M,