@vpdev2/metakyc 1.0.65 → 1.0.66

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
@@ -6909,7 +6909,7 @@ function xi(e) {
6909
6909
  };
6910
6910
  }
6911
6911
  const $r = /^t\(['"](.+?)['"]\)$/, ni = "$t:";
6912
- function ne(e, t) {
6912
+ function oe(e, t) {
6913
6913
  if (!e) return "";
6914
6914
  const a = e.trim();
6915
6915
  if (a.startsWith(ni))
@@ -6917,7 +6917,7 @@ function ne(e, t) {
6917
6917
  const r = $r.exec(a);
6918
6918
  return r ? t(r[1]) : e;
6919
6919
  }
6920
- const $t = "1.0.65", wi = Ht(null), oi = `metakyc-translations-${$t}-`, Yr = ({
6920
+ const $t = "1.0.66", wi = Ht(null), oi = `metakyc-translations-${$t}-`, Yr = ({
6921
6921
  locale: e,
6922
6922
  fetchTranslations: t,
6923
6923
  children: a
@@ -8179,12 +8179,12 @@ const ci = 280, ca = ({
8179
8179
  (z) => z.label.toLowerCase().includes(N.toLowerCase())
8180
8180
  ), Z = (z) => {
8181
8181
  f || a(t.includes(z) ? t.filter((R) => R !== z) : [...t, z]);
8182
- }, re = (z, R) => {
8182
+ }, ae = (z, R) => {
8183
8183
  R.stopPropagation(), f || a(t.filter((O) => O !== z));
8184
8184
  }, W = (z) => {
8185
8185
  var R;
8186
8186
  return ((R = r.find((O) => O.value === z)) == null ? void 0 : R.label) || z;
8187
- }, { bg: ie, borderColor: he, textPrimary: fe, textSecondary: De, primaryColor: oe, primaryLight: G, hoverBg: Q } = $, se = p && F && /* @__PURE__ */ s(
8187
+ }, { bg: re, borderColor: he, textPrimary: fe, textSecondary: De, primaryColor: se, primaryLight: G, hoverBg: Q } = $, te = p && F && /* @__PURE__ */ s(
8188
8188
  "div",
8189
8189
  {
8190
8190
  ref: B,
@@ -8199,7 +8199,7 @@ const ci = 280, ca = ({
8199
8199
  borderRadius: "8px",
8200
8200
  boxShadow: "0 4px 16px rgba(0,0,0,0.18)",
8201
8201
  border: `1px solid ${he}`,
8202
- backgroundColor: ie,
8202
+ backgroundColor: re,
8203
8203
  overflow: "hidden"
8204
8204
  },
8205
8205
  children: [
@@ -8220,17 +8220,17 @@ const ci = 280, ca = ({
8220
8220
  fontSize: "13px",
8221
8221
  borderRadius: "6px",
8222
8222
  border: `1px solid ${he}`,
8223
- backgroundColor: ie,
8223
+ backgroundColor: re,
8224
8224
  color: fe,
8225
8225
  outline: "none",
8226
8226
  boxSizing: "border-box"
8227
8227
  },
8228
8228
  onFocus: (z) => {
8229
8229
  const R = getComputedStyle(document.querySelector(".metakyc-sdk") || document.documentElement), O = R.getPropertyValue("--metakyc-input-border-focus").trim() || R.getPropertyValue("--metakyc-primary").trim() || "#2563eb";
8230
- z.currentTarget.style.backgroundColor = ie, z.currentTarget.style.color = fe, z.currentTarget.style.borderColor = O, z.currentTarget.style.outline = "none", z.currentTarget.style.boxShadow = `0 0 0 2px ${O}33`;
8230
+ z.currentTarget.style.backgroundColor = re, z.currentTarget.style.color = fe, z.currentTarget.style.borderColor = O, z.currentTarget.style.outline = "none", z.currentTarget.style.boxShadow = `0 0 0 2px ${O}33`;
8231
8231
  },
8232
8232
  onBlur: (z) => {
8233
- z.currentTarget.style.backgroundColor = ie, z.currentTarget.style.color = fe, z.currentTarget.style.borderColor = he, z.currentTarget.style.outline = "none", z.currentTarget.style.boxShadow = "none";
8233
+ z.currentTarget.style.backgroundColor = re, z.currentTarget.style.color = fe, z.currentTarget.style.borderColor = he, z.currentTarget.style.outline = "none", z.currentTarget.style.boxShadow = "none";
8234
8234
  }
8235
8235
  }
8236
8236
  ) }),
@@ -8249,7 +8249,7 @@ const ci = 280, ca = ({
8249
8249
  fontSize: "13px",
8250
8250
  cursor: "pointer",
8251
8251
  backgroundColor: R ? G : "transparent",
8252
- color: R ? oe : fe,
8252
+ color: R ? se : fe,
8253
8253
  userSelect: "none"
8254
8254
  },
8255
8255
  onMouseEnter: (O) => {
@@ -8343,7 +8343,7 @@ const ci = 280, ca = ({
8343
8343
  "button",
8344
8344
  {
8345
8345
  type: "button",
8346
- onClick: (R) => re(z, R),
8346
+ onClick: (R) => ae(z, R),
8347
8347
  className: "metakyc-multiselect-chip-remove",
8348
8348
  style: {
8349
8349
  background: "transparent",
@@ -8382,7 +8382,7 @@ const ci = 280, ca = ({
8382
8382
  ]
8383
8383
  }
8384
8384
  ),
8385
- typeof document < "u" && se ? Mt(se, document.body) : null
8385
+ typeof document < "u" && te ? Mt(te, document.body) : null
8386
8386
  ] });
8387
8387
  }, di = 260, ct = ({
8388
8388
  label: e,
@@ -8407,15 +8407,15 @@ const ci = 280, ca = ({
8407
8407
  primaryLight: "#eff6ff",
8408
8408
  hoverBg: "#f9fafb"
8409
8409
  }), _ = ee(() => {
8410
- const q = getComputedStyle(document.querySelector(".metakyc-sdk") || document.documentElement), te = (Ce, qe) => q.getPropertyValue(Ce).trim() || qe, Te = te("--metakyc-input-bg", te("--metakyc-background", "#ffffff"));
8410
+ const q = getComputedStyle(document.querySelector(".metakyc-sdk") || document.documentElement), ie = (Ce, qe) => q.getPropertyValue(Ce).trim() || qe, Te = ie("--metakyc-input-bg", ie("--metakyc-background", "#ffffff"));
8411
8411
  B({
8412
8412
  bg: Te,
8413
- border: te("--metakyc-input-border", te("--metakyc-border", "#d1d5db")),
8414
- text: te("--metakyc-input-text", te("--metakyc-text-primary", "#111827")),
8415
- textSecondary: te("--metakyc-text-secondary", "#6b7280"),
8416
- primary: te("--metakyc-primary", "#2563eb"),
8417
- primaryLight: te("--metakyc-primary-light", "#eff6ff"),
8418
- hoverBg: te("--metakyc-surface", Te)
8413
+ border: ie("--metakyc-input-border", ie("--metakyc-border", "#d1d5db")),
8414
+ text: ie("--metakyc-input-text", ie("--metakyc-text-primary", "#111827")),
8415
+ textSecondary: ie("--metakyc-text-secondary", "#6b7280"),
8416
+ primary: ie("--metakyc-primary", "#2563eb"),
8417
+ primaryLight: ie("--metakyc-primary-light", "#eff6ff"),
8418
+ hoverBg: ie("--metakyc-surface", Te)
8419
8419
  });
8420
8420
  }, []), ce = be(null), h = be(null), L = be(null), M = be(null), Z = ee(() => {
8421
8421
  if (!h.current) return null;
@@ -8426,27 +8426,27 @@ const ci = 280, ca = ({
8426
8426
  width: q.width,
8427
8427
  openUp: Te
8428
8428
  };
8429
- }, []), re = ee(() => {
8429
+ }, []), ae = ee(() => {
8430
8430
  if (N) return;
8431
8431
  _();
8432
8432
  const q = Z();
8433
8433
  q && P(q), F(!0);
8434
8434
  }, [N, Z, _]), W = ee(() => {
8435
8435
  F(!1), $("");
8436
- }, []), ie = () => x ? W() : re();
8436
+ }, []), re = () => x ? W() : ae();
8437
8437
  Ne(() => {
8438
8438
  if (!x) return;
8439
- const q = (te) => {
8439
+ const q = (ie) => {
8440
8440
  var Ce, qe;
8441
- const Te = te.target;
8441
+ const Te = ie.target;
8442
8442
  !((Ce = ce.current) != null && Ce.contains(Te)) && !((qe = L.current) != null && qe.contains(Te)) && W();
8443
8443
  };
8444
8444
  return document.addEventListener("mousedown", q), () => document.removeEventListener("mousedown", q);
8445
8445
  }, [x, W]), Ne(() => {
8446
8446
  if (!x) return;
8447
8447
  const q = () => {
8448
- const te = Z();
8449
- te && P(te);
8448
+ const ie = Z();
8449
+ ie && P(ie);
8450
8450
  };
8451
8451
  return window.addEventListener("scroll", q, !0), window.addEventListener("resize", q), () => {
8452
8452
  window.removeEventListener("scroll", q, !0), window.removeEventListener("resize", q);
@@ -8459,9 +8459,9 @@ const ci = 280, ca = ({
8459
8459
  }, [x]);
8460
8460
  const he = r.filter(
8461
8461
  (q) => q.label.toLowerCase().includes(T.toLowerCase()) || q.value.toLowerCase().includes(T.toLowerCase())
8462
- ), fe = (xe = r.find((q) => q.value === o)) == null ? void 0 : xe.label, De = (q, te) => {
8463
- N || te || (l(q), W());
8464
- }, { bg: oe, border: G, text: Q, textSecondary: se, primary: z, primaryLight: R, hoverBg: O } = D, Se = x && U && /* @__PURE__ */ s(
8462
+ ), fe = (xe = r.find((q) => q.value === o)) == null ? void 0 : xe.label, De = (q, ie) => {
8463
+ N || ie || (l(q), W());
8464
+ }, { bg: se, border: G, text: Q, textSecondary: te, primary: z, primaryLight: R, hoverBg: O } = D, Se = x && U && /* @__PURE__ */ s(
8465
8465
  "div",
8466
8466
  {
8467
8467
  ref: L,
@@ -8476,7 +8476,7 @@ const ci = 280, ca = ({
8476
8476
  borderRadius: "8px",
8477
8477
  boxShadow: "0 4px 16px rgba(0,0,0,0.18)",
8478
8478
  border: `1px solid ${G}`,
8479
- backgroundColor: oe,
8479
+ backgroundColor: se,
8480
8480
  overflow: "hidden"
8481
8481
  },
8482
8482
  children: [
@@ -8497,17 +8497,17 @@ const ci = 280, ca = ({
8497
8497
  fontSize: "13px",
8498
8498
  borderRadius: "6px",
8499
8499
  border: `1px solid ${G}`,
8500
- backgroundColor: oe,
8500
+ backgroundColor: se,
8501
8501
  color: Q,
8502
8502
  outline: "none",
8503
8503
  boxSizing: "border-box"
8504
8504
  },
8505
8505
  onFocus: (q) => {
8506
- const te = getComputedStyle(document.querySelector(".metakyc-sdk") || document.documentElement), Te = te.getPropertyValue("--metakyc-input-border-focus").trim() || te.getPropertyValue("--metakyc-primary").trim() || "#2563eb";
8507
- q.currentTarget.style.backgroundColor = oe, q.currentTarget.style.color = Q, q.currentTarget.style.borderColor = Te, q.currentTarget.style.outline = "none", q.currentTarget.style.boxShadow = `0 0 0 2px ${Te}33`;
8506
+ const ie = getComputedStyle(document.querySelector(".metakyc-sdk") || document.documentElement), Te = ie.getPropertyValue("--metakyc-input-border-focus").trim() || ie.getPropertyValue("--metakyc-primary").trim() || "#2563eb";
8507
+ q.currentTarget.style.backgroundColor = se, q.currentTarget.style.color = Q, q.currentTarget.style.borderColor = Te, q.currentTarget.style.outline = "none", q.currentTarget.style.boxShadow = `0 0 0 2px ${Te}33`;
8508
8508
  },
8509
8509
  onBlur: (q) => {
8510
- q.currentTarget.style.backgroundColor = oe, q.currentTarget.style.color = Q, q.currentTarget.style.borderColor = G, q.currentTarget.style.outline = "none", q.currentTarget.style.boxShadow = "none";
8510
+ q.currentTarget.style.backgroundColor = se, q.currentTarget.style.color = Q, q.currentTarget.style.borderColor = G, q.currentTarget.style.outline = "none", q.currentTarget.style.boxShadow = "none";
8511
8511
  }
8512
8512
  }
8513
8513
  ) }),
@@ -8521,8 +8521,8 @@ const ci = 280, ca = ({
8521
8521
  maxHeight: "208px",
8522
8522
  overflowY: "auto"
8523
8523
  },
8524
- children: he.length === 0 ? /* @__PURE__ */ i("li", { style: { padding: "8px 12px", fontSize: "13px", color: se }, children: p("common.noResults") }) : he.map((q) => {
8525
- const te = q.value === o;
8524
+ children: he.length === 0 ? /* @__PURE__ */ i("li", { style: { padding: "8px 12px", fontSize: "13px", color: te }, children: p("common.noResults") }) : he.map((q) => {
8525
+ const ie = q.value === o;
8526
8526
  return /* @__PURE__ */ i(
8527
8527
  "li",
8528
8528
  {
@@ -8533,15 +8533,15 @@ const ci = 280, ca = ({
8533
8533
  fontSize: "13px",
8534
8534
  cursor: q.disabled ? "not-allowed" : "pointer",
8535
8535
  opacity: q.disabled ? 0.4 : 1,
8536
- backgroundColor: te ? R : "transparent",
8537
- color: te ? z : Q,
8536
+ backgroundColor: ie ? R : "transparent",
8537
+ color: ie ? z : Q,
8538
8538
  userSelect: "none"
8539
8539
  },
8540
8540
  onMouseEnter: (Te) => {
8541
- !te && !q.disabled && (Te.currentTarget.style.backgroundColor = O);
8541
+ !ie && !q.disabled && (Te.currentTarget.style.backgroundColor = O);
8542
8542
  },
8543
8543
  onMouseLeave: (Te) => {
8544
- te || (Te.currentTarget.style.backgroundColor = "transparent");
8544
+ ie || (Te.currentTarget.style.backgroundColor = "transparent");
8545
8545
  },
8546
8546
  children: q.label
8547
8547
  },
@@ -8576,9 +8576,9 @@ const ci = 280, ca = ({
8576
8576
  ref: h,
8577
8577
  role: "button",
8578
8578
  tabIndex: N ? -1 : 0,
8579
- onClick: ie,
8579
+ onClick: re,
8580
8580
  onKeyDown: (q) => {
8581
- (q.key === "Enter" || q.key === " ") && (q.preventDefault(), ie()), q.key === "Escape" && W();
8581
+ (q.key === "Enter" || q.key === " ") && (q.preventDefault(), re()), q.key === "Escape" && W();
8582
8582
  },
8583
8583
  className: He(
8584
8584
  "metakyc-searchable-select-trigger",
@@ -8757,7 +8757,7 @@ const ma = ({
8757
8757
  }
8758
8758
  ),
8759
8759
  ce && /* @__PURE__ */ i("div", { style: { marginTop: "12px", display: "flex", flexDirection: "column", gap: "8px" }, children: d.map((h, L) => {
8760
- const M = da(h), Z = M === "image", re = Z ? URL.createObjectURL(h) : null;
8760
+ const M = da(h), Z = M === "image", ae = Z ? URL.createObjectURL(h) : null;
8761
8761
  return /* @__PURE__ */ s(
8762
8762
  "div",
8763
8763
  {
@@ -8787,10 +8787,10 @@ const ma = ({
8787
8787
  overflow: "hidden",
8788
8788
  backgroundColor: Z ? "transparent" : "color-mix(in srgb, var(--metakyc-primary, #2563eb) 10%, transparent)"
8789
8789
  },
8790
- children: Z && re ? /* @__PURE__ */ i(
8790
+ children: Z && ae ? /* @__PURE__ */ i(
8791
8791
  "img",
8792
8792
  {
8793
- src: re,
8793
+ src: ae,
8794
8794
  alt: h.name,
8795
8795
  style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "8px" }
8796
8796
  }
@@ -9323,10 +9323,10 @@ const Na = ({
9323
9323
  try {
9324
9324
  const L = await Promise.all(
9325
9325
  n.uploadDocumentFiles.map(async (Z) => {
9326
- const re = u[Z.id] || [], W = await Promise.all(
9327
- re.map(async (ie) => ({
9328
- fileName: ie.name,
9329
- fileData: await Gr(ie)
9326
+ const ae = u[Z.id] || [], W = await Promise.all(
9327
+ ae.map(async (re) => ({
9328
+ fileName: re.name,
9329
+ fileData: await Gr(re)
9330
9330
  }))
9331
9331
  );
9332
9332
  return {
@@ -9455,8 +9455,8 @@ const Na = ({
9455
9455
  value: u[L.id] || [],
9456
9456
  onChange: (M) => {
9457
9457
  C(null), T((Z) => {
9458
- const re = { ...Z };
9459
- return delete re[L.id], re;
9458
+ const ae = { ...Z };
9459
+ return delete ae[L.id], ae;
9460
9460
  }), f((Z) => ({ ...Z, [L.id]: M }));
9461
9461
  }
9462
9462
  },
@@ -9634,32 +9634,32 @@ const Da = ({
9634
9634
  we.useEffect(() => {
9635
9635
  !d && l && l.length === 0 && !U && !u && (P(!0), p({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
9636
9636
  }, [d, l, U, u, p, e, t]);
9637
- const ce = ee((re, W) => {
9638
- N((ie) => ({ ...ie, [re]: W })), F((ie) => {
9639
- const he = { ...ie };
9640
- return delete he[re], he;
9637
+ const ce = ee((ae, W) => {
9638
+ N((re) => ({ ...re, [ae]: W })), F((re) => {
9639
+ const he = { ...re };
9640
+ return delete he[ae], he;
9641
9641
  });
9642
9642
  }, []), h = ee(() => {
9643
- const re = {};
9643
+ const ae = {};
9644
9644
  for (const { criterion: W } of _) {
9645
- const ie = za(W, C[W.id] ?? []);
9646
- ie && (re[W.id] = ie);
9645
+ const re = za(W, C[W.id] ?? []);
9646
+ re && (ae[W.id] = re);
9647
9647
  }
9648
- return F((W) => ({ ...W, ...re })), Object.keys(re).length === 0;
9648
+ return F((W) => ({ ...W, ...ae })), Object.keys(ae).length === 0;
9649
9649
  }, [_, C]), L = () => {
9650
- h() && $((re) => re + 1);
9650
+ h() && $((ae) => ae + 1);
9651
9651
  }, M = () => {
9652
- T > 0 ? $((re) => re - 1) : a == null || a();
9652
+ T > 0 ? $((ae) => ae - 1) : a == null || a();
9653
9653
  }, Z = async () => {
9654
9654
  if (!(!h() || !l))
9655
9655
  try {
9656
- const re = l.map((ie) => {
9657
- const he = (C[ie.id] ?? []).filter((fe) => fe && fe.trim());
9658
- return he.length > 0 ? { riskCriteriaId: ie.id, values: he } : null;
9659
- }).filter((ie) => ie !== null);
9660
- await p({ applicantId: e, criteriaValueInputs: re }), t == null || t();
9661
- } catch (re) {
9662
- console.error("Risk scoring submit error:", re);
9656
+ const ae = l.map((re) => {
9657
+ const he = (C[re.id] ?? []).filter((fe) => fe && fe.trim());
9658
+ return he.length > 0 ? { riskCriteriaId: re.id, values: he } : null;
9659
+ }).filter((re) => re !== null);
9660
+ await p({ applicantId: e, criteriaValueInputs: ae }), t == null || t();
9661
+ } catch (ae) {
9662
+ console.error("Risk scoring submit error:", ae);
9663
9663
  }
9664
9664
  };
9665
9665
  return d ? /* @__PURE__ */ i(me, { children: /* @__PURE__ */ s(ue, { children: [
@@ -9678,7 +9678,7 @@ const Da = ({
9678
9678
  /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r("riskScoring.subtitle") }),
9679
9679
  D.length > 1 && /* @__PURE__ */ s("div", { className: "flex items-center justify-between mt-3", children: [
9680
9680
  /* @__PURE__ */ i("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: r("common.pageXofY", { current: T + 1, total: D.length }) }),
9681
- /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: D.map((re, W) => /* @__PURE__ */ i(
9681
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: D.map((ae, W) => /* @__PURE__ */ i(
9682
9682
  "div",
9683
9683
  {
9684
9684
  className: "rounded-full transition-all duration-200",
@@ -9692,16 +9692,16 @@ const Da = ({
9692
9692
  )) })
9693
9693
  ] })
9694
9694
  ] }),
9695
- /* @__PURE__ */ i(ue, { className: "space-y-6", children: _.map(({ criterion: re }) => /* @__PURE__ */ i(
9695
+ /* @__PURE__ */ i(ue, { className: "space-y-6", children: _.map(({ criterion: ae }) => /* @__PURE__ */ i(
9696
9696
  Pa,
9697
9697
  {
9698
- criterion: re,
9699
- value: C[re.id] ?? [],
9700
- error: x[re.id],
9698
+ criterion: ae,
9699
+ value: C[ae.id] ?? [],
9700
+ error: x[ae.id],
9701
9701
  locale: o,
9702
- onChange: (W) => ce(re.id, W)
9702
+ onChange: (W) => ce(ae.id, W)
9703
9703
  },
9704
- re.id
9704
+ ae.id
9705
9705
  )) }),
9706
9706
  /* @__PURE__ */ s(Oe, { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
9707
9707
  /* @__PURE__ */ s(
@@ -10012,11 +10012,11 @@ const ja = ({
10012
10012
  }, 1e3);
10013
10013
  return () => clearInterval(R);
10014
10014
  }, [B]), Ne(() => {
10015
- P && !u && ie();
10015
+ P && !u && re();
10016
10016
  }, [P]);
10017
10017
  const Z = () => {
10018
10018
  o && (U(!0), T(o.testDurationSec), h(0), x({}), C(null));
10019
- }, re = (R, O) => {
10019
+ }, ae = (R, O) => {
10020
10020
  x((Se) => ({ ...Se, [R]: O }));
10021
10021
  }, W = ee(async () => {
10022
10022
  try {
@@ -10027,7 +10027,7 @@ const ja = ({
10027
10027
  }
10028
10028
  } catch {
10029
10029
  }
10030
- }, [e, n]), ie = async (R) => {
10030
+ }, [e, n]), re = async (R) => {
10031
10031
  if (o) {
10032
10032
  if (!P) {
10033
10033
  const O = o.appropriatenessQuestions.length - Object.keys(N).length;
@@ -10073,7 +10073,7 @@ const ja = ({
10073
10073
  /* @__PURE__ */ i("p", { style: { fontSize: "16px", fontWeight: 600, color: "var(--metakyc-danger, #ef4444)" }, children: r("appropriatenessTest.noTestData") }),
10074
10074
  p && /* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "8px" }, children: p })
10075
10075
  ] }) }) });
10076
- const fe = o.testAllowedMaxTry - o.totalFailedTries, De = o.appropriatenessQuestions.length, oe = Object.keys(N).length;
10076
+ const fe = o.testAllowedMaxTry - o.totalFailedTries, De = o.appropriatenessQuestions.length, se = Object.keys(N).length;
10077
10077
  if (B > 0)
10078
10078
  return /* @__PURE__ */ s(me, { children: [
10079
10079
  /* @__PURE__ */ i(Fe, { children: /* @__PURE__ */ i("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: o.displayName }) }),
@@ -10246,7 +10246,7 @@ const ja = ({
10246
10246
  /* @__PURE__ */ i(le, { type: "button", onClick: Z, disabled: fe <= 0, children: r("appropriatenessTest.startTest") })
10247
10247
  ] }) })
10248
10248
  ] });
10249
- const G = o.appropriatenessQuestions[ce], Q = ce === De - 1, se = oe === De, z = F <= 60;
10249
+ const G = o.appropriatenessQuestions[ce], Q = ce === De - 1, te = se === De, z = F <= 60;
10250
10250
  return /* @__PURE__ */ s(me, { children: [
10251
10251
  /* @__PURE__ */ s(Fe, { children: [
10252
10252
  /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
@@ -10299,7 +10299,7 @@ const ja = ({
10299
10299
  height: "100%",
10300
10300
  borderRadius: "999px",
10301
10301
  backgroundColor: "var(--metakyc-primary, #2563eb)",
10302
- width: `${oe / De * 100}%`,
10302
+ width: `${se / De * 100}%`,
10303
10303
  transition: "width 0.3s ease"
10304
10304
  } }) }),
10305
10305
  /* @__PURE__ */ s("div", { style: {
@@ -10308,7 +10308,7 @@ const ja = ({
10308
10308
  marginTop: "4px"
10309
10309
  }, children: [
10310
10310
  /* @__PURE__ */ s("span", { style: { fontSize: "11px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
10311
- oe,
10311
+ se,
10312
10312
  " ",
10313
10313
  r("appropriatenessTest.answered")
10314
10314
  ] }),
@@ -10327,7 +10327,7 @@ const ja = ({
10327
10327
  question: G,
10328
10328
  index: ce,
10329
10329
  selectedAnswer: N[G.id],
10330
- onSelect: (R) => re(G.id, R),
10330
+ onSelect: (R) => ae(G.id, R),
10331
10331
  disabled: u
10332
10332
  }
10333
10333
  ),
@@ -10408,14 +10408,14 @@ const ja = ({
10408
10408
  children: r("common.next")
10409
10409
  }
10410
10410
  ),
10411
- (Q || se) && /* @__PURE__ */ i(
10411
+ (Q || te) && /* @__PURE__ */ i(
10412
10412
  le,
10413
10413
  {
10414
10414
  type: "button",
10415
10415
  isLoading: u,
10416
- onClick: () => ie(),
10417
- disabled: !se && !P,
10418
- style: { opacity: se || P ? 1 : 0.5 },
10416
+ onClick: () => re(),
10417
+ disabled: !te && !P,
10418
+ style: { opacity: te || P ? 1 : 0.5 },
10419
10419
  children: r(P ? "appropriatenessTest.submitting" : "appropriatenessTest.submitTest")
10420
10420
  }
10421
10421
  )
@@ -10554,7 +10554,7 @@ const ja = ({
10554
10554
  onBack: a
10555
10555
  }) => {
10556
10556
  var Pe, Je, mt, rt;
10557
- const { t: r } = je(), { applicantService: n, baseInformationService: o, identityService: l, config: c, currentTheme: d } = Ee(), { identityData: u, provider: f, token: p, isLoading: C, error: N, requestIdentity: x, restartIdentity: F } = aa(e), [T, $] = w(null), [U, P] = w(null), [D, B] = w([]), [_, ce] = w([]), [h, L] = w(!0), [M, Z] = w(!1), [re, W] = w(null), [ie, he] = w(!1), fe = we.useRef(!1), [De, oe] = w({}), [G, Q] = w({}), se = d != null && d.reviewPageFields && d.reviewPageFields.length > 0 ? d.reviewPageFields[0] : null, z = !!(d != null && d.reviewPageDisabled), R = be(!1);
10557
+ const { t: r } = je(), { applicantService: n, baseInformationService: o, identityService: l, config: c, currentTheme: d } = Ee(), { identityData: u, provider: f, token: p, isLoading: C, error: N, requestIdentity: x, restartIdentity: F } = aa(e), [T, $] = w(null), [U, P] = w(null), [D, B] = w([]), [_, ce] = w([]), [h, L] = w(!0), [M, Z] = w(!1), [ae, W] = w(null), [re, he] = w(!1), fe = we.useRef(!1), [De, se] = w({}), [G, Q] = w({}), te = d != null && d.reviewPageFields && d.reviewPageFields.length > 0 ? d.reviewPageFields[0] : null, z = !!(d != null && d.reviewPageDisabled), R = be(!1);
10558
10558
  R.current = z;
10559
10559
  const O = ji({
10560
10560
  defaultValues: {
@@ -10586,7 +10586,7 @@ const ja = ({
10586
10586
  const Ie = /* @__PURE__ */ new Set(), y = Y.filter((A) => A.countryCode).map((A) => ({ value: A.countryCode, label: `${A.countryCode} – ${A.name}` })).filter((A) => Ie.has(A.value) ? !1 : (Ie.add(A.value), !0));
10587
10587
  ce(y);
10588
10588
  const g = V.applicantRequestData;
10589
- if (oe({
10589
+ if (se({
10590
10590
  firstName: (g == null ? void 0 : g.firstName) || "",
10591
10591
  lastName: (g == null ? void 0 : g.lastName) || "",
10592
10592
  email: (g == null ? void 0 : g.email) || "",
@@ -10659,7 +10659,7 @@ const ja = ({
10659
10659
  }, [p]);
10660
10660
  const Se = f !== null && f === et.Sumsub;
10661
10661
  Ne(() => {
10662
- if (f !== null && p && !T && M && !ie) {
10662
+ if (f !== null && p && !T && M && !re) {
10663
10663
  const b = f;
10664
10664
  if (Se) {
10665
10665
  console.log("[Sumsub] Fetching access token for Web SDK…"), W(null), (async () => {
@@ -10731,7 +10731,7 @@ const ja = ({
10731
10731
  console.error("[Identity] Error destroying provider:", b);
10732
10732
  }
10733
10733
  };
10734
- }, [f, p, T, M, t, ie, Se, e, c, l]);
10734
+ }, [f, p, T, M, t, re, Se, e, c, l]);
10735
10735
  const xe = async () => {
10736
10736
  try {
10737
10737
  W(null), he(!1), await x(), Z(!0);
@@ -10755,8 +10755,8 @@ const ja = ({
10755
10755
  "Error: ",
10756
10756
  N.message
10757
10757
  ] }) }) });
10758
- const te = z ? a : () => Z(!1);
10759
- if (M && (re || ie))
10758
+ const ie = z ? a : () => Z(!1);
10759
+ if (M && (ae || re))
10760
10760
  return /* @__PURE__ */ s(me, { children: [
10761
10761
  /* @__PURE__ */ i(Fe, { children: /* @__PURE__ */ i("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: r("identity.sessionIssueTitle") }) }),
10762
10762
  /* @__PURE__ */ s(ue, { children: [
@@ -10784,8 +10784,8 @@ const ja = ({
10784
10784
  }
10785
10785
  ),
10786
10786
  /* @__PURE__ */ s("div", { children: [
10787
- /* @__PURE__ */ i("h3", { className: "font-semibold mb-1", style: { color: "var(--metakyc-danger, #ef4444)" }, children: r(ie ? "identity.sessionExpiredTitle" : "identity.verificationError") }),
10788
- /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: re || r("identity.sessionExpiredMessage") })
10787
+ /* @__PURE__ */ i("h3", { className: "font-semibold mb-1", style: { color: "var(--metakyc-danger, #ef4444)" }, children: r(re ? "identity.sessionExpiredTitle" : "identity.verificationError") }),
10788
+ /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: ae || r("identity.sessionExpiredMessage") })
10789
10789
  ] })
10790
10790
  ] }) }),
10791
10791
  /* @__PURE__ */ s("div", { className: "rounded-lg p-4", style: {
@@ -10801,7 +10801,7 @@ const ja = ({
10801
10801
  ] })
10802
10802
  ] }),
10803
10803
  /* @__PURE__ */ s(Oe, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
10804
- te && /* @__PURE__ */ i(le, { type: "button", variant: "outline", onClick: te, children: r("common.back") }),
10804
+ ie && /* @__PURE__ */ i(le, { type: "button", variant: "outline", onClick: ie, children: r("common.back") }),
10805
10805
  /* @__PURE__ */ i(le, { type: "button", onClick: q, disabled: C, children: r(C ? "identity.restarting" : "identity.restartVerification") })
10806
10806
  ] })
10807
10807
  ] });
@@ -10866,10 +10866,10 @@ const ja = ({
10866
10866
  }
10867
10867
  }
10868
10868
  ),
10869
- te && /* @__PURE__ */ i("div", { style: {
10869
+ ie && /* @__PURE__ */ i("div", { style: {
10870
10870
  padding: "16px 24px",
10871
10871
  borderTop: "1px solid var(--metakyc-border, #e5e7eb)"
10872
- }, children: /* @__PURE__ */ i(le, { variant: "outline", onClick: te, children: r("common.back") }) })
10872
+ }, children: /* @__PURE__ */ i(le, { variant: "outline", onClick: ie, children: r("common.back") }) })
10873
10873
  ] }) : p != null && p.url ? /* @__PURE__ */ s(me, { children: [
10874
10874
  /* @__PURE__ */ i(Fe, { children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
10875
10875
  /* @__PURE__ */ s("div", { children: [
@@ -10916,7 +10916,7 @@ const ja = ({
10916
10916
  }
10917
10917
  ) })
10918
10918
  ] }),
10919
- te && /* @__PURE__ */ i(Oe, { children: /* @__PURE__ */ i(le, { variant: "outline", onClick: te, children: r("common.back") }) })
10919
+ ie && /* @__PURE__ */ i(Oe, { children: /* @__PURE__ */ i(le, { variant: "outline", onClick: ie, children: r("common.back") }) })
10920
10920
  ] }) : b === et.SardinAI ? /* @__PURE__ */ s(me, { children: [
10921
10921
  /* @__PURE__ */ s(Fe, { children: [
10922
10922
  /* @__PURE__ */ i("h2", { className: "text-2xl font-bold", children: r("identity.deviceRiskAssessment") }),
@@ -10933,7 +10933,7 @@ const ja = ({
10933
10933
  /* @__PURE__ */ i("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: r("identity.subtitle") })
10934
10934
  ] }),
10935
10935
  /* @__PURE__ */ i(ue, { children: /* @__PURE__ */ i("div", { id: "identity-container", className: "min-h-[400px]" }) }),
10936
- te && /* @__PURE__ */ i(Oe, { children: /* @__PURE__ */ i(le, { variant: "outline", onClick: te, children: r("common.back") }) })
10936
+ ie && /* @__PURE__ */ i(Oe, { children: /* @__PURE__ */ i(le, { variant: "outline", onClick: ie, children: r("common.back") }) })
10937
10937
  ] });
10938
10938
  }
10939
10939
  const Te = /* @__PURE__ */ new Set(["country", "nationality", "taxCountry", "countryOfBirth", "mobileCountryCode", "otherNationality"]), Ce = (b = 4) => {
@@ -11075,7 +11075,7 @@ const ja = ({
11075
11075
  rel: "noopener noreferrer",
11076
11076
  className: "text-sm underline",
11077
11077
  style: { color: "var(--metakyc-primary, #6366f1)" },
11078
- children: ne(b.displayText, r) || ne(b.label, r) || b.linkText || b.linkUrl
11078
+ children: oe(b.displayText, r) || oe(b.label, r) || b.linkText || b.linkUrl
11079
11079
  }
11080
11080
  ),
11081
11081
  b.helpText
@@ -11093,9 +11093,9 @@ const ja = ({
11093
11093
  }
11094
11094
  ),
11095
11095
  /* @__PURE__ */ i("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: b.customType === "link_checkbox" && b.linkUrl ? /* @__PURE__ */ s(wt, { children: [
11096
- /* @__PURE__ */ i("a", { href: b.linkUrl, target: "_blank", rel: "noopener noreferrer", style: { color: "var(--metakyc-primary, #6366f1)", textDecoration: "underline" }, children: b.linkText || ne(b.label, r) }),
11097
- b.label && b.linkText ? ` ${ne(b.label, r)}` : ""
11098
- ] }) : ne(b.displayText, r) || ne(b.label, r) })
11096
+ /* @__PURE__ */ i("a", { href: b.linkUrl, target: "_blank", rel: "noopener noreferrer", style: { color: "var(--metakyc-primary, #6366f1)", textDecoration: "underline" }, children: b.linkText || oe(b.label, r) }),
11097
+ b.label && b.linkText ? ` ${oe(b.label, r)}` : ""
11098
+ ] }) : oe(b.displayText, r) || oe(b.label, r) })
11099
11099
  ] }),
11100
11100
  b.helpText
11101
11101
  ) }, J);
@@ -11109,7 +11109,7 @@ const ja = ({
11109
11109
  };
11110
11110
  return /* @__PURE__ */ i("div", { style: Ce(b.colSpan), children: _e(
11111
11111
  /* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
11112
- b.label && /* @__PURE__ */ i("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: ne(b.displayText, r) || ne(b.label, r) }),
11112
+ b.label && /* @__PURE__ */ i("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: oe(b.displayText, r) || oe(b.label, r) }),
11113
11113
  (b.options || []).map((y) => /* @__PURE__ */ s("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
11114
11114
  /* @__PURE__ */ i(
11115
11115
  tt,
@@ -11127,7 +11127,7 @@ const ja = ({
11127
11127
  }
11128
11128
  return b.customType === "radio_group" ? /* @__PURE__ */ i("div", { style: Ce(b.colSpan), children: _e(
11129
11129
  /* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
11130
- b.label && /* @__PURE__ */ i("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: ne(b.displayText, r) || ne(b.label, r) }),
11130
+ b.label && /* @__PURE__ */ i("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: oe(b.displayText, r) || oe(b.label, r) }),
11131
11131
  (b.options || []).map((ke) => /* @__PURE__ */ s("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
11132
11132
  /* @__PURE__ */ i(
11133
11133
  "input",
@@ -11148,7 +11148,7 @@ const ja = ({
11148
11148
  /* @__PURE__ */ i(
11149
11149
  Le,
11150
11150
  {
11151
- label: ne(b.displayText, r) || ne(b.label, r) || Y,
11151
+ label: oe(b.displayText, r) || oe(b.label, r) || Y,
11152
11152
  value: String(ye ?? ""),
11153
11153
  onChange: (ke) => Q((Ie) => ({ ...Ie, [Y]: ke.target.value }))
11154
11154
  }
@@ -11157,14 +11157,14 @@ const ja = ({
11157
11157
  ) }, J);
11158
11158
  }, Ze = (b, V) => {
11159
11159
  if (b.isCustom) return yt(b, V);
11160
- const J = b.name ?? "", Y = gt[J], ye = ne(b.displayText, r) || (Y != null && Y.translationKey ? r(`fields.${Y.translationKey}`) : void 0) || (Y == null ? void 0 : Y.label) || J, ke = De[J] ?? "", Ie = J === "mobileCountryCode", y = !!(Y != null && Y.countriesType) && !Ie;
11160
+ const J = b.name ?? "", Y = gt[J], ye = oe(b.displayText, r) || (Y != null && Y.translationKey ? r(`fields.${Y.translationKey}`) : void 0) || (Y == null ? void 0 : Y.label) || J, ke = De[J] ?? "", Ie = J === "mobileCountryCode", y = !!(Y != null && Y.countriesType) && !Ie;
11161
11161
  return b.editable ? Ie ? /* @__PURE__ */ i("div", { style: Ce(b.colSpan ?? 2), children: _e(
11162
11162
  /* @__PURE__ */ i(
11163
11163
  ct,
11164
11164
  {
11165
11165
  label: ye,
11166
11166
  value: String(ke),
11167
- onChange: (g) => oe((I) => ({ ...I, [J]: g })),
11167
+ onChange: (g) => se((I) => ({ ...I, [J]: g })),
11168
11168
  options: [{ value: "", label: r("placeholders.selectCountryCode") }, ..._]
11169
11169
  }
11170
11170
  ),
@@ -11175,7 +11175,7 @@ const ja = ({
11175
11175
  {
11176
11176
  label: ye,
11177
11177
  value: String(ke),
11178
- onChange: (g) => oe((I) => ({ ...I, [J]: g })),
11178
+ onChange: (g) => se((I) => ({ ...I, [J]: g })),
11179
11179
  options: [{ value: "", label: r("common.select") }, ...D]
11180
11180
  }
11181
11181
  ),
@@ -11187,7 +11187,7 @@ const ja = ({
11187
11187
  label: ye,
11188
11188
  type: (Y == null ? void 0 : Y.type) === "date" ? "date" : (Y == null ? void 0 : Y.type) === "email" ? "email" : "text",
11189
11189
  value: String(ke),
11190
- onChange: (g) => oe((I) => ({ ...I, [J]: g.target.value }))
11190
+ onChange: (g) => se((I) => ({ ...I, [J]: g.target.value }))
11191
11191
  }
11192
11192
  ),
11193
11193
  b.helpText
@@ -11199,8 +11199,8 @@ const ja = ({
11199
11199
  b.helpText
11200
11200
  ) }, `ro-${V}`);
11201
11201
  };
11202
- if (se) {
11203
- const b = ne(se.title, r) || r("identity.reviewYourInformation"), V = ne(se.subtitle, r) || r("identity.reviewSubtitle");
11202
+ if (te) {
11203
+ const b = oe(te.title, r) || r("identity.reviewYourInformation"), V = oe(te.subtitle, r) || r("identity.reviewSubtitle");
11204
11204
  return /* @__PURE__ */ i("form", { onSubmit: (J) => {
11205
11205
  J.preventDefault(), xe();
11206
11206
  }, children: /* @__PURE__ */ s(me, { children: [
@@ -11208,7 +11208,7 @@ const ja = ({
11208
11208
  /* @__PURE__ */ i("h2", { className: "text-lg font-bold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: b }),
11209
11209
  V && /* @__PURE__ */ i("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: V })
11210
11210
  ] }),
11211
- /* @__PURE__ */ i(ue, { children: /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: se.fields.map((J, Y) => Ze(J, Y)) }) }),
11211
+ /* @__PURE__ */ i(ue, { children: /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: te.fields.map((J, Y) => Ze(J, Y)) }) }),
11212
11212
  /* @__PURE__ */ s(Oe, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
11213
11213
  a && /* @__PURE__ */ i(le, { type: "button", variant: "outline", onClick: a, children: r("common.back") }),
11214
11214
  /* @__PURE__ */ i(le, { type: "submit", isLoading: C, children: r("identity.confirmAndStart") })
@@ -11425,7 +11425,7 @@ const pi = ({
11425
11425
  subtitle: t,
11426
11426
  className: a = ""
11427
11427
  }) => {
11428
- const { currentTheme: r } = Ee(), { t: n } = je(), o = e || (r == null ? void 0 : r.title) || "", l = ne(o, n), c = ne(t, n), d = !!(r != null && r.logo && r.logo.visible && r.logo.url), u = !!l;
11428
+ const { currentTheme: r } = Ee(), { t: n } = je(), o = e || (r == null ? void 0 : r.title) || "", l = oe(o, n), c = oe(t, n), d = !!(r != null && r.logo && r.logo.visible && r.logo.url), u = !!l;
11429
11429
  return !d && !u ? null : /* @__PURE__ */ s("div", { className: `metakyc-header ${a}`, children: [
11430
11430
  /* @__PURE__ */ s(
11431
11431
  "div",
@@ -11862,13 +11862,13 @@ const Qa = {
11862
11862
  onSuccess: r,
11863
11863
  onCancel: n
11864
11864
  }) => {
11865
- var g, I, A, K, X, ae, ve;
11865
+ var g, I, A, K, X, ne, ve;
11866
11866
  const { config: o, baseInformationService: l, currentTheme: c } = Ee(), { createApplicant: d, getApplicantData: u, isLoading: f } = Ci(), { t: p } = je(), C = e || ((g = o.applicantForm) == null ? void 0 : g.workflowKey);
11867
11867
  if (!C)
11868
11868
  throw new Error(
11869
11869
  "workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
11870
11870
  );
11871
- const N = t || ((I = o.applicantForm) == null ? void 0 : I.externalRefId) || "", x = ((A = o.applicantForm) == null ? void 0 : A.email) || "", F = ((K = o.applicantForm) == null ? void 0 : K.hiddenValues) || {}, T = ((X = o.applicantForm) == null ? void 0 : X.initialValues) || {}, U = (((ae = o.applicantForm) == null ? void 0 : ae.fieldLabelMode) || (c == null ? void 0 : c.fieldLabelMode) || "label") !== "placeholder", P = Ye(
11871
+ const N = t || ((I = o.applicantForm) == null ? void 0 : I.externalRefId) || "", x = ((A = o.applicantForm) == null ? void 0 : A.email) || "", F = ((K = o.applicantForm) == null ? void 0 : K.hiddenValues) || {}, T = ((X = o.applicantForm) == null ? void 0 : X.initialValues) || {}, U = (((ne = o.applicantForm) == null ? void 0 : ne.fieldLabelMode) || (c == null ? void 0 : c.fieldLabelMode) || "label") !== "placeholder", P = Ye(
11872
11872
  () => c != null && c.applicantFormPages && c.applicantFormPages.length > 0 ? c.applicantFormPages : null,
11873
11873
  [c == null ? void 0 : c.applicantFormPages]
11874
11874
  ), D = Ye(() => {
@@ -11909,12 +11909,12 @@ const Qa = {
11909
11909
  for (const k of B)
11910
11910
  _.has(k) && m.add((E = gt[k]) == null ? void 0 : E.countriesType);
11911
11911
  return m.size === 0 && m.add(void 0), Array.from(m);
11912
- }, [B, P]), [h, L] = w({}), [M, Z] = w(!0), re = be(/* @__PURE__ */ new Set()), W = be(/* @__PURE__ */ new Set());
11912
+ }, [B, P]), [h, L] = w({}), [M, Z] = w(!0), ae = be(/* @__PURE__ */ new Set()), W = be(/* @__PURE__ */ new Set());
11913
11913
  Ne(() => {
11914
11914
  if (!c) return;
11915
11915
  const m = ce.filter((k) => {
11916
11916
  const v = k != null ? String(k) : "all";
11917
- return !W.current.has(v) && !re.current.has(v);
11917
+ return !W.current.has(v) && !ae.current.has(v);
11918
11918
  });
11919
11919
  if (m.length === 0) {
11920
11920
  ce.every((v) => {
@@ -11925,7 +11925,7 @@ const Qa = {
11925
11925
  }
11926
11926
  Z(!0);
11927
11927
  const j = m.map((k) => k != null ? String(k) : "all");
11928
- j.forEach((k) => re.current.add(k)), (async () => {
11928
+ j.forEach((k) => ae.current.add(k)), (async () => {
11929
11929
  try {
11930
11930
  const k = await Promise.all(
11931
11931
  m.map(async (v) => {
@@ -11933,12 +11933,12 @@ const Qa = {
11933
11933
  value: Ae.countryCode,
11934
11934
  label: `${Ae.countryCode} – ${Ae.name}`
11935
11935
  } : { value: Ae.abbreviation3 || Ae.abbreviation, label: Ae.name }).filter((Ae) => !Ae.value || Ve.has(Ae.value) ? !1 : (Ve.add(Ae.value), !0));
11936
- return W.current.add(S), re.current.delete(S), [S, Be];
11936
+ return W.current.add(S), ae.current.delete(S), [S, Be];
11937
11937
  })
11938
11938
  );
11939
11939
  L((v) => ({ ...v, ...Object.fromEntries(k) }));
11940
11940
  } catch (k) {
11941
- j.forEach((v) => re.current.delete(v)), console.error("Failed to load countries:", k);
11941
+ j.forEach((v) => ae.current.delete(v)), console.error("Failed to load countries:", k);
11942
11942
  } finally {
11943
11943
  ce.every((v) => {
11944
11944
  const S = v != null ? String(v) : "all";
@@ -11947,7 +11947,7 @@ const Qa = {
11947
11947
  }
11948
11948
  })();
11949
11949
  }, [ce, c]);
11950
- const ie = (m, j) => {
11950
+ const re = (m, j) => {
11951
11951
  var v;
11952
11952
  const E = j ?? ((v = gt[m]) == null ? void 0 : v.countriesType), k = E != null ? String(E) : "all";
11953
11953
  return h[k] || [];
@@ -11978,7 +11978,7 @@ const Qa = {
11978
11978
  Object.entries(F).filter(([m]) => m in he)
11979
11979
  ), De = Object.fromEntries(
11980
11980
  Object.entries(T).filter(([m]) => m in he)
11981
- ), [oe, G] = w({
11981
+ ), [se, G] = w({
11982
11982
  workflowKey: C,
11983
11983
  firstName: "",
11984
11984
  lastName: "",
@@ -12007,7 +12007,7 @@ const Qa = {
12007
12007
  ...De
12008
12008
  }), Q = Object.fromEntries(
12009
12009
  Object.entries(F).filter(([m]) => !(m in fe) && m !== "externalRefId" && m !== "workflowKey")
12010
- ), [se, z] = w({ ...Q }), [R, O] = w(!!a);
12010
+ ), [te, z] = w({ ...Q }), [R, O] = w(!!a);
12011
12011
  Ne(() => {
12012
12012
  if (!a) return;
12013
12013
  let m = !1;
@@ -12053,7 +12053,7 @@ const Qa = {
12053
12053
  m = !0;
12054
12054
  };
12055
12055
  }, [a]);
12056
- const [Se, xe] = w(0), [q, te] = w({}), [Te, Ce] = w(null), [qe, it] = w(!1), _e = It(), yt = ee(() => {
12056
+ const [Se, xe] = w(0), [q, ie] = w({}), [Te, Ce] = w(null), [qe, it] = w(!1), _e = It(), yt = ee(() => {
12057
12057
  const m = _a(), j = (E) => {
12058
12058
  var ge;
12059
12059
  const k = (ge = gt[E]) == null ? void 0 : ge.countriesType, v = k != null ? String(k) : "all", S = (h[v] || []).filter((pe) => pe.value);
@@ -12077,7 +12077,7 @@ const Qa = {
12077
12077
  for (const pe of ge.fields)
12078
12078
  !pe.isCustom || !pe.paramName || k[pe.paramName] || (pe.customType === "checkbox" || pe.customType === "link_checkbox" ? k[pe.paramName] = "true" : pe.customType === "radio_group" && ((v = pe.options) != null && v.length) || pe.customType === "group_checkbox" && ((S = pe.options) != null && S.length) ? k[pe.paramName] = pe.options[0].value : pe.customType === "text" && (k[pe.paramName] = "Sample value"));
12079
12079
  return k;
12080
- }), te({}), Ce(null);
12080
+ }), ie({}), Ce(null);
12081
12081
  }, [P, h]);
12082
12082
  Ne(() => {
12083
12083
  const m = _e.current;
@@ -12090,11 +12090,11 @@ const Qa = {
12090
12090
  handler: yt
12091
12091
  }), () => m.unregisterAction("fill-individual-form");
12092
12092
  }, [_e, yt]);
12093
- const Ze = (m, j) => G((E) => ({ ...E, [m]: j })), Pe = (m, j) => z((E) => ({ ...E, [m]: j })), Je = (m) => !m.conditionalOn || se[m.conditionalOn] === "true", mt = (m) => {
12093
+ const Ze = (m, j) => G((E) => ({ ...E, [m]: j })), Pe = (m, j) => z((E) => ({ ...E, [m]: j })), Je = (m) => !m.conditionalOn || te[m.conditionalOn] === "true", mt = (m) => {
12094
12094
  var j;
12095
12095
  for (const E of m.fields) {
12096
12096
  if (!E.isCustom || !E.paramName || !((j = E.blockingValues) != null && j.length)) continue;
12097
- const k = se[E.paramName] ?? "";
12097
+ const k = te[E.paramName] ?? "";
12098
12098
  if (E.customType === "group_checkbox") {
12099
12099
  if (k.split(",").filter(Boolean).some((S) => E.blockingValues.includes(S))) return !0;
12100
12100
  } else if (E.customType === "radio_group" && E.blockingValues.includes(k))
@@ -12107,13 +12107,13 @@ const Qa = {
12107
12107
  if (E.isCustom) {
12108
12108
  if (E.customType === "paragraph" || E.customType === "html" || E.customType === "br" || E.customType === "link") continue;
12109
12109
  if (E.required && E.paramName) {
12110
- const k = se[E.paramName], v = ne(E.displayText, p) || ne(E.label, p) || E.paramName;
12110
+ const k = te[E.paramName], v = oe(E.displayText, p) || oe(E.label, p) || E.paramName;
12111
12111
  E.customType === "checkbox" || E.customType === "link_checkbox" ? k !== "true" && (j[E.paramName] = p("validation.fieldRequired", { field: v })) : (!k || k.trim() === "") && (j[E.paramName] = p("validation.fieldRequired", { field: v }));
12112
12112
  }
12113
12113
  } else if (E.name) {
12114
12114
  const k = E.name;
12115
- if (D.includes(k) && St(oe[k])) {
12116
- const v = gt[k], S = ne(E.displayText, p) || (v != null && v.translationKey ? p(`fields.${v.translationKey}`) : void 0) || (v == null ? void 0 : v.label) || k;
12115
+ if (D.includes(k) && St(se[k])) {
12116
+ const v = gt[k], S = oe(E.displayText, p) || (v != null && v.translationKey ? p(`fields.${v.translationKey}`) : void 0) || (v == null ? void 0 : v.label) || k;
12117
12117
  j[k] = p("validation.fieldRequired", { field: S });
12118
12118
  }
12119
12119
  }
@@ -12123,54 +12123,54 @@ const Qa = {
12123
12123
  const m = P[Se];
12124
12124
  if (mt(m) || m.conditionalOn && m.conditionalMode === "block" && !Je(m)) return;
12125
12125
  if (m.conditionalOn && !Je(m)) {
12126
- te({}), rt >= 0 ? xe(rt) : await Y();
12126
+ ie({}), rt >= 0 ? xe(rt) : await Y();
12127
12127
  return;
12128
12128
  }
12129
12129
  const j = V(m);
12130
12130
  if (Object.keys(j).length > 0) {
12131
- te(j);
12131
+ ie(j);
12132
12132
  return;
12133
12133
  }
12134
- te({}), rt >= 0 ? xe(rt) : await Y();
12134
+ ie({}), rt >= 0 ? xe(rt) : await Y();
12135
12135
  }, Y = async () => {
12136
12136
  if (P) {
12137
12137
  let m = {};
12138
12138
  for (const j of P)
12139
12139
  Je(j) && (m = { ...m, ...V(j) });
12140
12140
  if (Object.keys(m).length > 0) {
12141
- te(m);
12141
+ ie(m);
12142
12142
  return;
12143
12143
  }
12144
12144
  }
12145
12145
  it(!0), Ce(null);
12146
12146
  try {
12147
- if (!oe.externalRefId || oe.externalRefId.trim() === "") {
12147
+ if (!se.externalRefId || se.externalRefId.trim() === "") {
12148
12148
  Ce(p("createApplicant.externalRefIdRequired"));
12149
12149
  return;
12150
12150
  }
12151
12151
  const m = {
12152
12152
  ...a ? { applicantId: a } : {},
12153
- workflowKey: oe.workflowKey,
12154
- externalRefId: oe.externalRefId.trim()
12153
+ workflowKey: se.workflowKey,
12154
+ externalRefId: se.externalRefId.trim()
12155
12155
  };
12156
12156
  if (P) {
12157
12157
  for (const v of P)
12158
12158
  if (Je(v)) {
12159
12159
  for (const S of v.fields)
12160
12160
  if (!S.isCustom && S.name) {
12161
- const ge = S.name, pe = oe[ge];
12161
+ const ge = S.name, pe = se[ge];
12162
12162
  St(pe) || (m[ge] = pe);
12163
12163
  }
12164
12164
  }
12165
12165
  for (const v of zt)
12166
12166
  if (m[v] === void 0) {
12167
- const S = oe[v];
12167
+ const S = se[v];
12168
12168
  St(S) || (m[v] = S);
12169
12169
  }
12170
12170
  } else
12171
12171
  B.forEach((v) => {
12172
12172
  if (v === "externalRefId") return;
12173
- const S = oe[v];
12173
+ const S = se[v];
12174
12174
  St(S) || (m[v] = S);
12175
12175
  });
12176
12176
  const j = [];
@@ -12179,7 +12179,7 @@ const Qa = {
12179
12179
  if (Je(v))
12180
12180
  for (const S of v.fields) {
12181
12181
  if (!S.isCustom || !S.paramName || S.customType === "paragraph" || S.customType === "html" || S.customType === "br" || S.customType === "link") continue;
12182
- const ge = se[S.paramName] ?? "";
12182
+ const ge = te[S.paramName] ?? "";
12183
12183
  let pe;
12184
12184
  if (S.customType === "checkbox" || S.customType === "link_checkbox")
12185
12185
  pe = ge === "true" ? "yes" : "no";
@@ -12203,7 +12203,7 @@ const Qa = {
12203
12203
  }, ye = async (m) => {
12204
12204
  m.preventDefault();
12205
12205
  for (const j of D)
12206
- if (St(oe[j])) {
12206
+ if (St(se[j])) {
12207
12207
  const E = gt[j], k = (E != null && E.translationKey ? p(`fields.${E.translationKey}`) : void 0) || (E == null ? void 0 : E.label) || j;
12208
12208
  Ce(p("validation.fieldRequired", { field: k }));
12209
12209
  return;
@@ -12213,17 +12213,17 @@ const Qa = {
12213
12213
  var Xt;
12214
12214
  const S = gt[m];
12215
12215
  if (!S) return null;
12216
- const ge = D.includes(m), pe = q[m], Ve = ne(E, p) || (S.translationKey ? p(`fields.${S.translationKey}`) : void 0) || S.label, Be = m in De, Ae = j ?? m, Qe = { required: ge }, nt = v ? v !== "placeholder" : U, ut = nt ? Ve : void 0;
12216
+ const ge = D.includes(m), pe = q[m], Ve = oe(E, p) || (S.translationKey ? p(`fields.${S.translationKey}`) : void 0) || S.label, Be = m in De, Ae = j ?? m, Qe = { required: ge }, nt = v ? v !== "placeholder" : U, ut = nt ? Ve : void 0;
12217
12217
  switch (S.type) {
12218
12218
  case "select":
12219
12219
  if (m === "country" || m === "nationality" || m === "taxCountry" || m === "countryOfBirth" || m === "mobileCountryCode") {
12220
- const Ue = ie(m, k);
12220
+ const Ue = re(m, k);
12221
12221
  return /* @__PURE__ */ i(
12222
12222
  ct,
12223
12223
  {
12224
12224
  ...Qe,
12225
12225
  label: ut,
12226
- value: oe[m] || "",
12226
+ value: se[m] || "",
12227
12227
  onChange: (ht) => Ze(m, ht),
12228
12228
  options: [{ value: "", label: nt ? p("placeholders.selectCountry") : Ve }, ...Ue],
12229
12229
  disabled: M,
@@ -12239,7 +12239,7 @@ const Qa = {
12239
12239
  {
12240
12240
  ...Qe,
12241
12241
  label: ut,
12242
- value: ((Xt = oe[m]) == null ? void 0 : Xt.toString()) || "",
12242
+ value: ((Xt = se[m]) == null ? void 0 : Xt.toString()) || "",
12243
12243
  onChange: (Ue) => Ze(m, Ue ? Number(Ue) : null),
12244
12244
  options: [
12245
12245
  { value: "", label: nt ? p("placeholders.selectSalutation") : Ve },
@@ -12259,7 +12259,7 @@ const Qa = {
12259
12259
  {
12260
12260
  ...Qe,
12261
12261
  label: ut,
12262
- value: oe[m] || "",
12262
+ value: se[m] || "",
12263
12263
  onChange: (ht) => Ze(m, ht),
12264
12264
  options: [{ value: "", label: nt ? p("placeholders.selectLanguage") : Ve }, ...Ue],
12265
12265
  readOnly: Be,
@@ -12271,13 +12271,13 @@ const Qa = {
12271
12271
  return null;
12272
12272
  case "multiselect":
12273
12273
  if (m === "otherNationality") {
12274
- const Ue = ie(m, k);
12274
+ const Ue = re(m, k);
12275
12275
  return /* @__PURE__ */ i(
12276
12276
  ca,
12277
12277
  {
12278
12278
  ...Qe,
12279
12279
  label: ut,
12280
- value: oe[m] || [],
12280
+ value: se[m] || [],
12281
12281
  onChange: (ht) => Ze(m, ht),
12282
12282
  options: Ue,
12283
12283
  placeholder: nt ? p("placeholders.selectOtherNationalities") : Ve,
@@ -12296,7 +12296,7 @@ const Qa = {
12296
12296
  type: "date",
12297
12297
  label: ut,
12298
12298
  placeholder: nt ? void 0 : Ve,
12299
- value: oe[m] || "",
12299
+ value: se[m] || "",
12300
12300
  onChange: (Ue) => Ze(m, Ue.target.value),
12301
12301
  readOnly: Be,
12302
12302
  error: pe
@@ -12311,7 +12311,7 @@ const Qa = {
12311
12311
  type: "email",
12312
12312
  label: ut,
12313
12313
  placeholder: nt ? void 0 : Ve,
12314
- value: oe[m] || "",
12314
+ value: se[m] || "",
12315
12315
  onChange: (Ue) => Ze(m, Ue.target.value),
12316
12316
  readOnly: Be,
12317
12317
  error: pe
@@ -12326,7 +12326,7 @@ const Qa = {
12326
12326
  type: "tel",
12327
12327
  label: ut,
12328
12328
  placeholder: nt ? void 0 : Ve,
12329
- value: oe[m] || "",
12329
+ value: se[m] || "",
12330
12330
  onChange: (Ue) => Ze(m, Ue.target.value),
12331
12331
  readOnly: Be,
12332
12332
  error: pe
@@ -12341,7 +12341,7 @@ const Qa = {
12341
12341
  type: "text",
12342
12342
  label: ut,
12343
12343
  placeholder: nt ? void 0 : Ve,
12344
- value: oe[m] || "",
12344
+ value: se[m] || "",
12345
12345
  onChange: (Ue) => Ze(m, Ue.target.value),
12346
12346
  readOnly: Be,
12347
12347
  error: pe
@@ -12352,7 +12352,7 @@ const Qa = {
12352
12352
  }, Ie = (m, j) => {
12353
12353
  const E = m.labelMode ? m.labelMode !== "placeholder" : U;
12354
12354
  if (m.customType === "paragraph") {
12355
- const S = ne(m.displayText, p) || ne(m.label, p) || "";
12355
+ const S = oe(m.displayText, p) || oe(m.label, p) || "";
12356
12356
  return /* @__PURE__ */ i(
12357
12357
  "p",
12358
12358
  {
@@ -12372,14 +12372,14 @@ const Qa = {
12372
12372
  return /* @__PURE__ */ i(
12373
12373
  "div",
12374
12374
  {
12375
- dangerouslySetInnerHTML: { __html: ne(m.label, p) || "" }
12375
+ dangerouslySetInnerHTML: { __html: oe(m.label, p) || "" }
12376
12376
  },
12377
12377
  `custom-${j}`
12378
12378
  );
12379
12379
  if (m.customType === "br")
12380
12380
  return /* @__PURE__ */ i("div", { style: { height: "12px" } }, `custom-${j}`);
12381
12381
  if (m.customType === "link") {
12382
- const S = ne(m.displayText, p) || ne(m.label, p) || m.linkText || m.linkUrl || "";
12382
+ const S = oe(m.displayText, p) || oe(m.label, p) || m.linkText || m.linkUrl || "";
12383
12383
  return /* @__PURE__ */ i("div", { className: "metakyc-link-field", children: /* @__PURE__ */ s(
12384
12384
  "a",
12385
12385
  {
@@ -12403,9 +12403,9 @@ const Qa = {
12403
12403
  ) }, `custom-${j}`);
12404
12404
  }
12405
12405
  if (!m.paramName) return null;
12406
- const k = q[m.paramName], v = ne(m.displayText, p) || ne(m.label, p) || m.paramName;
12406
+ const k = q[m.paramName], v = oe(m.displayText, p) || oe(m.label, p) || m.paramName;
12407
12407
  if (m.customType === "checkbox") {
12408
- const S = se[m.paramName] === "true";
12408
+ const S = te[m.paramName] === "true";
12409
12409
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
12410
12410
  /* @__PURE__ */ s(
12411
12411
  "div",
@@ -12441,7 +12441,7 @@ const Qa = {
12441
12441
  ] }, `custom-${j}`);
12442
12442
  }
12443
12443
  if (m.customType === "link_checkbox") {
12444
- const S = se[m.paramName] === "true";
12444
+ const S = te[m.paramName] === "true";
12445
12445
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
12446
12446
  /* @__PURE__ */ s(
12447
12447
  "div",
@@ -12490,7 +12490,7 @@ const Qa = {
12490
12490
  ] }, `custom-${j}`);
12491
12491
  }
12492
12492
  if (m.customType === "group_checkbox") {
12493
- const S = (se[m.paramName] || "").split(",").filter(Boolean);
12493
+ const S = (te[m.paramName] || "").split(",").filter(Boolean);
12494
12494
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
12495
12495
  E && /* @__PURE__ */ s(
12496
12496
  "div",
@@ -12504,7 +12504,7 @@ const Qa = {
12504
12504
  }
12505
12505
  ),
12506
12506
  /* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (m.options || []).map((ge) => {
12507
- const pe = m.singleSelect ? se[m.paramName] === ge.value : S.includes(ge.value), Ve = () => {
12507
+ const pe = m.singleSelect ? te[m.paramName] === ge.value : S.includes(ge.value), Ve = () => {
12508
12508
  if (m.singleSelect)
12509
12509
  Pe(m.paramName, pe ? "" : ge.value);
12510
12510
  else {
@@ -12559,7 +12559,7 @@ const Qa = {
12559
12559
  "input",
12560
12560
  {
12561
12561
  type: "radio",
12562
- checked: se[m.paramName] === S.value,
12562
+ checked: te[m.paramName] === S.value,
12563
12563
  onChange: () => Pe(m.paramName, S.value),
12564
12564
  name: `radio-group-${m.paramName}-${j}`,
12565
12565
  className: "metakyc-option-input",
@@ -12586,7 +12586,7 @@ const Qa = {
12586
12586
  type: "text",
12587
12587
  label: E ? `${v}${m.required ? " *" : ""}` : void 0,
12588
12588
  placeholder: E ? void 0 : v,
12589
- value: se[m.paramName] || "",
12589
+ value: te[m.paramName] || "",
12590
12590
  onChange: (S) => Pe(m.paramName, S.target.value),
12591
12591
  required: m.required,
12592
12592
  error: k
@@ -12617,7 +12617,7 @@ const Qa = {
12617
12617
  {
12618
12618
  className: "metakyc-option-text",
12619
12619
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4", fontWeight: 500 },
12620
- children: ne(m.conditionalLabel, p) || m.conditionalOn
12620
+ children: oe(m.conditionalLabel, p) || m.conditionalOn
12621
12621
  }
12622
12622
  )
12623
12623
  ]
@@ -12646,7 +12646,7 @@ const Qa = {
12646
12646
  {
12647
12647
  className: "font-semibold text-base",
12648
12648
  style: { color: "var(--metakyc-text-primary, #111827)" },
12649
- children: ne(m.title, p)
12649
+ children: oe(m.title, p)
12650
12650
  }
12651
12651
  ),
12652
12652
  m.subtitle && /* @__PURE__ */ i(
@@ -12654,7 +12654,7 @@ const Qa = {
12654
12654
  {
12655
12655
  className: "text-sm mt-0.5",
12656
12656
  style: { color: "var(--metakyc-text-secondary, #6b7280)" },
12657
- children: ne(m.subtitle, p)
12657
+ children: oe(m.subtitle, p)
12658
12658
  }
12659
12659
  ),
12660
12660
  m.description && m.description !== m.subtitle && /* @__PURE__ */ i(
@@ -12662,7 +12662,7 @@ const Qa = {
12662
12662
  {
12663
12663
  className: "text-xs mt-1",
12664
12664
  style: { color: "var(--metakyc-text-secondary, #6b7280)" },
12665
- children: ne(m.description, p)
12665
+ children: oe(m.description, p)
12666
12666
  }
12667
12667
  )
12668
12668
  ] }),
@@ -12706,7 +12706,7 @@ const Qa = {
12706
12706
  type: "button",
12707
12707
  variant: "outline",
12708
12708
  onClick: () => {
12709
- xe(b), te({});
12709
+ xe(b), ie({});
12710
12710
  },
12711
12711
  disabled: qe || f,
12712
12712
  children: p("common.previous")
@@ -12808,7 +12808,7 @@ const Za = ({
12808
12808
  try {
12809
12809
  const A = await Promise.all(
12810
12810
  y.map(async (K) => {
12811
- const X = K != null ? String(K) : "all", ae = await o.getCountries("", n.locale || "en", K), ve = /* @__PURE__ */ new Set(), m = ae.map((j) => ({ value: j.abbreviation3 || j.abbreviation, label: j.name })).filter((j) => !j.value || ve.has(j.value) ? !1 : (ve.add(j.value), !0));
12811
+ const X = K != null ? String(K) : "all", ne = await o.getCountries("", n.locale || "en", K), ve = /* @__PURE__ */ new Set(), m = ne.map((j) => ({ value: j.abbreviation3 || j.abbreviation, label: j.name })).filter((j) => !j.value || ve.has(j.value) ? !1 : (ve.add(j.value), !0));
12812
12812
  return M.current.add(X), L.current.delete(X), [X, m];
12813
12813
  })
12814
12814
  );
@@ -12824,7 +12824,7 @@ const Za = ({
12824
12824
  var K;
12825
12825
  const I = g ?? ((K = vt[y]) == null ? void 0 : K.countriesType), A = I != null ? String(I) : "all";
12826
12826
  return B[A] || [];
12827
- }, re = {
12827
+ }, ae = {
12828
12828
  companyName: 1,
12829
12829
  registrationNumber: 1,
12830
12830
  email: 1,
@@ -12845,8 +12845,8 @@ const Za = ({
12845
12845
  addressCountry: 1,
12846
12846
  lei: 1
12847
12847
  }, W = Object.fromEntries(
12848
- Object.entries(N).filter(([y]) => y in re)
12849
- ), [ie, he] = w({
12848
+ Object.entries(N).filter(([y]) => y in ae)
12849
+ ), [re, he] = w({
12850
12850
  workflowKey: f,
12851
12851
  companyName: "",
12852
12852
  email: C,
@@ -12869,10 +12869,10 @@ const Za = ({
12869
12869
  lei: "",
12870
12870
  externalRefId: p,
12871
12871
  ...W
12872
- }), [fe, De] = w({}), [oe, G] = w(0), [Q, se] = w({}), [z, R] = w(null), [O, Se] = w(!1), xe = It(), q = ee(() => {
12872
+ }), [fe, De] = w({}), [se, G] = w(0), [Q, te] = w({}), [z, R] = w(null), [O, Se] = w(!1), xe = It(), q = ee(() => {
12873
12873
  const y = Ga(), g = (I) => {
12874
- var ae;
12875
- const A = (ae = vt[I]) == null ? void 0 : ae.countriesType, K = A != null ? String(A) : "all", X = (B[K] || []).filter((ve) => ve.value);
12874
+ var ne;
12875
+ const A = (ne = vt[I]) == null ? void 0 : ne.countriesType, K = A != null ? String(A) : "all", X = (B[K] || []).filter((ve) => ve.value);
12876
12876
  if (X.length)
12877
12877
  return X[Math.floor(Math.random() * X.length)].value;
12878
12878
  };
@@ -12881,19 +12881,19 @@ const Za = ({
12881
12881
  for (const [K, X] of Object.entries(y))
12882
12882
  if (K in I && (I[K] === "" || I[K] === null || I[K] === void 0))
12883
12883
  if (P.has(K)) {
12884
- const ae = g(K);
12885
- ae && (A[K] = ae);
12884
+ const ne = g(K);
12885
+ ne && (A[K] = ne);
12886
12886
  } else
12887
12887
  A[K] = X;
12888
12888
  return A;
12889
12889
  }), T && De((I) => {
12890
12890
  var K, X;
12891
12891
  const A = { ...I };
12892
- for (const ae of T)
12893
- for (const ve of ae.fields)
12892
+ for (const ne of T)
12893
+ for (const ve of ne.fields)
12894
12894
  !ve.isCustom || !ve.paramName || A[ve.paramName] || (ve.customType === "checkbox" || ve.customType === "link_checkbox" ? A[ve.paramName] = "true" : ve.customType === "radio_group" && ((K = ve.options) != null && K.length) || ve.customType === "group_checkbox" && ((X = ve.options) != null && X.length) ? A[ve.paramName] = ve.options[0].value : ve.customType === "text" && (A[ve.paramName] = "Sample value"));
12895
12895
  return A;
12896
- }), se({}), R(null);
12896
+ }), te({}), R(null);
12897
12897
  }, [T, B]);
12898
12898
  Ne(() => {
12899
12899
  const y = xe.current;
@@ -12906,7 +12906,7 @@ const Za = ({
12906
12906
  handler: q
12907
12907
  }), () => y.unregisterAction("fill-company-form");
12908
12908
  }, [xe, q]);
12909
- const te = (y, g) => he((I) => ({ ...I, [y]: g })), Te = (y, g) => De((I) => ({ ...I, [y]: g })), Ce = (y) => !y.conditionalOn || fe[y.conditionalOn] === "true", qe = (y) => {
12909
+ const ie = (y, g) => he((I) => ({ ...I, [y]: g })), Te = (y, g) => De((I) => ({ ...I, [y]: g })), Ce = (y) => !y.conditionalOn || fe[y.conditionalOn] === "true", qe = (y) => {
12910
12910
  var g;
12911
12911
  for (const I of y.fields) {
12912
12912
  if (!I.isCustom || !I.paramName || !((g = I.blockingValues) != null && g.length)) continue;
@@ -12917,37 +12917,37 @@ const Za = ({
12917
12917
  return !0;
12918
12918
  }
12919
12919
  return !1;
12920
- }, it = T && oe < T.length - 1 ? oe + 1 : -1, _e = T && oe > 0 ? oe - 1 : -1, yt = (y) => {
12920
+ }, it = T && se < T.length - 1 ? se + 1 : -1, _e = T && se > 0 ? se - 1 : -1, yt = (y) => {
12921
12921
  const g = {};
12922
12922
  for (const I of y.fields)
12923
12923
  if (I.isCustom) {
12924
12924
  if (I.customType === "paragraph" || I.customType === "html" || I.customType === "br" || I.customType === "link") continue;
12925
12925
  if (I.required && I.paramName) {
12926
- const A = fe[I.paramName], K = ne(I.displayText, u) || ne(I.label, u) || I.paramName;
12926
+ const A = fe[I.paramName], K = oe(I.displayText, u) || oe(I.label, u) || I.paramName;
12927
12927
  I.customType === "checkbox" || I.customType === "link_checkbox" ? A !== "true" && (g[I.paramName] = u("validation.fieldRequired", { field: K })) : (!A || A.trim() === "") && (g[I.paramName] = u("validation.fieldRequired", { field: K }));
12928
12928
  }
12929
12929
  } else if (I.name) {
12930
12930
  const A = I.name;
12931
- if ($.includes(A) && qt(ie[A])) {
12932
- const K = vt[A], X = ne(I.displayText, u) || (K != null && K.translationKey ? u(`fields.${K.translationKey}`) : void 0) || (K == null ? void 0 : K.label) || A;
12931
+ if ($.includes(A) && qt(re[A])) {
12932
+ const K = vt[A], X = oe(I.displayText, u) || (K != null && K.translationKey ? u(`fields.${K.translationKey}`) : void 0) || (K == null ? void 0 : K.label) || A;
12933
12933
  g[A] = u("validation.fieldRequired", { field: X });
12934
12934
  }
12935
12935
  }
12936
12936
  return g;
12937
12937
  }, Ze = async () => {
12938
12938
  if (!T) return;
12939
- const y = T[oe];
12939
+ const y = T[se];
12940
12940
  if (qe(y) || y.conditionalOn && y.conditionalMode === "block" && !Ce(y)) return;
12941
12941
  if (y.conditionalOn && !Ce(y)) {
12942
- se({}), it >= 0 ? G(it) : await Pe();
12942
+ te({}), it >= 0 ? G(it) : await Pe();
12943
12943
  return;
12944
12944
  }
12945
12945
  const g = yt(y);
12946
12946
  if (Object.keys(g).length > 0) {
12947
- se(g);
12947
+ te(g);
12948
12948
  return;
12949
12949
  }
12950
- se({}), it >= 0 ? G(it) : await Pe();
12950
+ te({}), it >= 0 ? G(it) : await Pe();
12951
12951
  }, Pe = async () => {
12952
12952
  var y;
12953
12953
  if (T) {
@@ -12955,46 +12955,46 @@ const Za = ({
12955
12955
  for (const I of T)
12956
12956
  Ce(I) && (g = { ...g, ...yt(I) });
12957
12957
  if (Object.keys(g).length > 0) {
12958
- se(g);
12958
+ te(g);
12959
12959
  return;
12960
12960
  }
12961
12961
  }
12962
12962
  Se(!0), R(null);
12963
12963
  try {
12964
12964
  const g = {
12965
- workflowKey: ie.workflowKey,
12966
- externalRefId: ((y = ie.externalRefId) == null ? void 0 : y.trim()) || void 0
12965
+ workflowKey: re.workflowKey,
12966
+ externalRefId: ((y = re.externalRefId) == null ? void 0 : y.trim()) || void 0
12967
12967
  }, I = T ? T.filter((X) => Ce(X)).flatMap((X) => X.fields).filter((X) => !X.isCustom && X.name).map((X) => X.name) : U;
12968
12968
  for (const X of I) {
12969
- const ae = ie[X];
12970
- if (!qt(ae))
12969
+ const ne = re[X];
12970
+ if (!qt(ne))
12971
12971
  switch (X) {
12972
12972
  case "companyName":
12973
- g.companyName = ae;
12973
+ g.companyName = ne;
12974
12974
  break;
12975
12975
  case "email":
12976
- g.companyEmail = ae;
12976
+ g.companyEmail = ne;
12977
12977
  break;
12978
12978
  case "phone":
12979
- g.companyPhone = ae;
12979
+ g.companyPhone = ne;
12980
12980
  break;
12981
12981
  case "registrationNumber":
12982
- g.companyRegistrationNumber = ae;
12982
+ g.companyRegistrationNumber = ne;
12983
12983
  break;
12984
12984
  case "countryResidence":
12985
- g.companyCountry = ae;
12985
+ g.companyCountry = ne;
12986
12986
  break;
12987
12987
  case "city":
12988
- g.companyCity = ae;
12988
+ g.companyCity = ne;
12989
12989
  break;
12990
12990
  case "street":
12991
- g.companyStreet = ae;
12991
+ g.companyStreet = ne;
12992
12992
  break;
12993
12993
  case "postalCode":
12994
- g.companyZip = ae;
12994
+ g.companyZip = ne;
12995
12995
  break;
12996
12996
  default:
12997
- g[X] = ae;
12997
+ g[X] = ne;
12998
12998
  break;
12999
12999
  }
13000
13000
  }
@@ -13002,14 +13002,14 @@ const Za = ({
13002
13002
  if (T) {
13003
13003
  for (const X of T)
13004
13004
  if (Ce(X))
13005
- for (const ae of X.fields) {
13006
- if (!ae.isCustom || !ae.paramName || ae.customType === "paragraph" || ae.customType === "html" || ae.customType === "br" || ae.customType === "link") continue;
13007
- const ve = fe[ae.paramName] ?? "";
13005
+ for (const ne of X.fields) {
13006
+ if (!ne.isCustom || !ne.paramName || ne.customType === "paragraph" || ne.customType === "html" || ne.customType === "br" || ne.customType === "link") continue;
13007
+ const ve = fe[ne.paramName] ?? "";
13008
13008
  let m;
13009
- if (ae.customType === "checkbox" || ae.customType === "link_checkbox")
13009
+ if (ne.customType === "checkbox" || ne.customType === "link_checkbox")
13010
13010
  m = ve === "true" ? "yes" : "no";
13011
- else if (m = ve, !m && !ae.required) continue;
13012
- A.push({ paramName: ae.paramName, value: m });
13011
+ else if (m = ve, !m && !ne.required) continue;
13012
+ A.push({ paramName: ne.paramName, value: m });
13013
13013
  }
13014
13014
  }
13015
13015
  A.length > 0 && (g.applicantAdditionalDatas = A);
@@ -13023,7 +13023,7 @@ const Za = ({
13023
13023
  }, Je = async (y) => {
13024
13024
  y.preventDefault();
13025
13025
  for (const g of $)
13026
- if (qt(ie[g])) {
13026
+ if (qt(re[g])) {
13027
13027
  const I = vt[g], A = (I != null && I.translationKey ? u(`fields.${I.translationKey}`) : void 0) || (I == null ? void 0 : I.label) || g;
13028
13028
  R(u("validation.fieldRequired", { field: A }));
13029
13029
  return;
@@ -13032,7 +13032,7 @@ const Za = ({
13032
13032
  }, mt = (y, g, I, A, K) => {
13033
13033
  const X = vt[y];
13034
13034
  if (!X) return null;
13035
- const ae = $.includes(y), ve = Q[y], m = ne(I, u) || (X.translationKey ? u(`fields.${X.translationKey}`) : void 0) || X.label, j = y in W, E = g ?? y, k = K ? K !== "placeholder" : F, v = k ? m : void 0;
13035
+ const ne = $.includes(y), ve = Q[y], m = oe(I, u) || (X.translationKey ? u(`fields.${X.translationKey}`) : void 0) || X.label, j = y in W, E = g ?? y, k = K ? K !== "placeholder" : F, v = k ? m : void 0;
13036
13036
  switch (X.type) {
13037
13037
  case "select":
13038
13038
  if (y === "countryResidence" || y === "addressCountry") {
@@ -13040,10 +13040,10 @@ const Za = ({
13040
13040
  return /* @__PURE__ */ i(
13041
13041
  ct,
13042
13042
  {
13043
- required: ae,
13043
+ required: ne,
13044
13044
  label: v,
13045
- value: ie[y] || "",
13046
- onChange: (ge) => te(y, ge),
13045
+ value: re[y] || "",
13046
+ onChange: (ge) => ie(y, ge),
13047
13047
  options: [{ value: "", label: k ? u("placeholders.selectCountry") : m }, ...S],
13048
13048
  disabled: ce,
13049
13049
  readOnly: j,
@@ -13057,12 +13057,12 @@ const Za = ({
13057
13057
  return /* @__PURE__ */ i(
13058
13058
  Le,
13059
13059
  {
13060
- required: ae,
13060
+ required: ne,
13061
13061
  type: "date",
13062
13062
  label: v,
13063
13063
  placeholder: k ? void 0 : m,
13064
- value: ie[y] || "",
13065
- onChange: (S) => te(y, S.target.value),
13064
+ value: re[y] || "",
13065
+ onChange: (S) => ie(y, S.target.value),
13066
13066
  readOnly: j,
13067
13067
  error: ve
13068
13068
  },
@@ -13072,12 +13072,12 @@ const Za = ({
13072
13072
  return /* @__PURE__ */ i(
13073
13073
  Le,
13074
13074
  {
13075
- required: ae,
13075
+ required: ne,
13076
13076
  type: "email",
13077
13077
  label: v,
13078
13078
  placeholder: k ? void 0 : m,
13079
- value: ie[y] || "",
13080
- onChange: (S) => te(y, S.target.value),
13079
+ value: re[y] || "",
13080
+ onChange: (S) => ie(y, S.target.value),
13081
13081
  readOnly: j,
13082
13082
  error: ve
13083
13083
  },
@@ -13087,12 +13087,12 @@ const Za = ({
13087
13087
  return /* @__PURE__ */ i(
13088
13088
  Le,
13089
13089
  {
13090
- required: ae,
13090
+ required: ne,
13091
13091
  type: "tel",
13092
13092
  label: v,
13093
13093
  placeholder: k ? void 0 : m,
13094
- value: ie[y] || "",
13095
- onChange: (S) => te(y, S.target.value),
13094
+ value: re[y] || "",
13095
+ onChange: (S) => ie(y, S.target.value),
13096
13096
  readOnly: j,
13097
13097
  error: ve
13098
13098
  },
@@ -13102,12 +13102,12 @@ const Za = ({
13102
13102
  return /* @__PURE__ */ i(
13103
13103
  Le,
13104
13104
  {
13105
- required: ae,
13105
+ required: ne,
13106
13106
  type: "text",
13107
13107
  label: v,
13108
13108
  placeholder: k ? void 0 : m,
13109
- value: ie[y] || "",
13110
- onChange: (S) => te(y, S.target.value),
13109
+ value: re[y] || "",
13110
+ onChange: (S) => ie(y, S.target.value),
13111
13111
  readOnly: j,
13112
13112
  error: ve
13113
13113
  },
@@ -13120,12 +13120,12 @@ const Za = ({
13120
13120
  "p",
13121
13121
  {
13122
13122
  style: { fontSize: "14px", lineHeight: "1.7", margin: 0, color: "var(--metakyc-text-secondary, #6b7280)" },
13123
- dangerouslySetInnerHTML: { __html: ne(y.displayText, u) || ne(y.label, u) || "" }
13123
+ dangerouslySetInnerHTML: { __html: oe(y.displayText, u) || oe(y.label, u) || "" }
13124
13124
  },
13125
13125
  `custom-${g}`
13126
13126
  );
13127
13127
  if (y.customType === "html")
13128
- return /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: ne(y.label, u) || "" } }, `custom-${g}`);
13128
+ return /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: oe(y.label, u) || "" } }, `custom-${g}`);
13129
13129
  if (y.customType === "br")
13130
13130
  return /* @__PURE__ */ i("div", { style: { height: "12px" } }, `custom-${g}`);
13131
13131
  if (y.customType === "link")
@@ -13136,11 +13136,11 @@ const Za = ({
13136
13136
  target: "_blank",
13137
13137
  rel: "noopener noreferrer",
13138
13138
  style: { color: "var(--metakyc-primary, #2563eb)", fontSize: "14px", textDecoration: "underline" },
13139
- children: ne(y.displayText, u) || ne(y.label, u) || y.linkText || y.linkUrl || ""
13139
+ children: oe(y.displayText, u) || oe(y.label, u) || y.linkText || y.linkUrl || ""
13140
13140
  }
13141
13141
  ) }, `custom-${g}`);
13142
13142
  if (!y.paramName) return null;
13143
- const I = Q[y.paramName], A = ne(y.displayText, u) || ne(y.label, u) || y.paramName, K = y.labelMode ? y.labelMode !== "placeholder" : F;
13143
+ const I = Q[y.paramName], A = oe(y.displayText, u) || oe(y.label, u) || y.paramName, K = y.labelMode ? y.labelMode !== "placeholder" : F;
13144
13144
  if (y.customType === "checkbox") {
13145
13145
  const X = fe[y.paramName] === "true";
13146
13146
  return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
@@ -13156,7 +13156,7 @@ const Za = ({
13156
13156
  tt,
13157
13157
  {
13158
13158
  checked: X,
13159
- onChange: (ae) => Te(y.paramName, ae ? "true" : "false")
13159
+ onChange: (ne) => Te(y.paramName, ne ? "true" : "false")
13160
13160
  }
13161
13161
  ),
13162
13162
  /* @__PURE__ */ s("span", { style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)" }, children: [
@@ -13200,7 +13200,7 @@ const Za = ({
13200
13200
  onChange: (I) => Te(y.conditionalOn, I ? "true" : "false")
13201
13201
  }
13202
13202
  ),
13203
- /* @__PURE__ */ i("span", { style: { fontSize: "14px", fontWeight: 500 }, children: ne(y.conditionalLabel, u) || y.conditionalOn })
13203
+ /* @__PURE__ */ i("span", { style: { fontSize: "14px", fontWeight: 500 }, children: oe(y.conditionalLabel, u) || y.conditionalOn })
13204
13204
  ]
13205
13205
  }
13206
13206
  ),
@@ -13216,16 +13216,16 @@ const Za = ({
13216
13216
  /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: u("common.loadingForm") })
13217
13217
  ] }) }) });
13218
13218
  if (T) {
13219
- const y = T[oe] ?? T[0], g = _e === -1, I = it === -1, A = T.length, K = Ce(y), X = qe(y), ae = Object.values(Q), ve = !K && !!y.conditionalOn && y.conditionalMode === "block", m = O || d || ve || X;
13219
+ const y = T[se] ?? T[0], g = _e === -1, I = it === -1, A = T.length, K = Ce(y), X = qe(y), ne = Object.values(Q), ve = !K && !!y.conditionalOn && y.conditionalMode === "block", m = O || d || ve || X;
13220
13220
  let j;
13221
13221
  return ve || X ? j = u("common.blocked") : I ? j = y.conditionalOn && !K ? u("common.skipAndSubmit") : u("common.submit") : j = y.conditionalOn && !K ? u("common.skip") : u("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(me, { children: [
13222
13222
  /* @__PURE__ */ i(Fe, { children: /* @__PURE__ */ i(Tt, { title: (l == null ? void 0 : l.title) || u("createCompany.title") }) }),
13223
13223
  /* @__PURE__ */ s(ue, { children: [
13224
13224
  (y.title || y.subtitle) && /* @__PURE__ */ s("div", { className: "mb-4", children: [
13225
- y.title && /* @__PURE__ */ i("h3", { className: "font-semibold text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children: ne(y.title, u) }),
13226
- y.subtitle && /* @__PURE__ */ i("p", { className: "text-sm mt-0.5", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: ne(y.subtitle, u) })
13225
+ y.title && /* @__PURE__ */ i("h3", { className: "font-semibold text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children: oe(y.title, u) }),
13226
+ y.subtitle && /* @__PURE__ */ i("p", { className: "text-sm mt-0.5", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: oe(y.subtitle, u) })
13227
13227
  ] }),
13228
- (z || ae.length > 0) && /* @__PURE__ */ s("div", { className: "mb-4 p-3 rounded-lg", style: {
13228
+ (z || ne.length > 0) && /* @__PURE__ */ s("div", { className: "mb-4 p-3 rounded-lg", style: {
13229
13229
  backgroundColor: "var(--metakyc-danger-bg, color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent))",
13230
13230
  border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 30%, transparent)"
13231
13231
  }, children: [
@@ -13234,7 +13234,7 @@ const Za = ({
13234
13234
  " ",
13235
13235
  z
13236
13236
  ] }),
13237
- ae.map((E, k) => /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: E }, k))
13237
+ ne.map((E, k) => /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: E }, k))
13238
13238
  ] }),
13239
13239
  A > 1 && /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", marginBottom: "1rem" }, children: [
13240
13240
  T.map((E, k) => /* @__PURE__ */ i(
@@ -13244,13 +13244,13 @@ const Za = ({
13244
13244
  height: "0.375rem",
13245
13245
  borderRadius: "9999px",
13246
13246
  transition: "all 150ms",
13247
- ...k === oe ? { flex: "1 1 0%", backgroundColor: "var(--metakyc-primary, #2563eb)", opacity: 0.3 } : k < oe ? { width: "2rem", backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { width: "2rem", backgroundColor: "#e5e7eb", opacity: 0.3 }
13247
+ ...k === se ? { flex: "1 1 0%", backgroundColor: "var(--metakyc-primary, #2563eb)", opacity: 0.3 } : k < se ? { width: "2rem", backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { width: "2rem", backgroundColor: "#e5e7eb", opacity: 0.3 }
13248
13248
  }
13249
13249
  },
13250
13250
  k
13251
13251
  )),
13252
13252
  /* @__PURE__ */ s("span", { style: { fontSize: "0.75rem", color: "var(--metakyc-text-muted, #9ca3af)", flexShrink: 0 }, children: [
13253
- oe + 1,
13253
+ se + 1,
13254
13254
  " / ",
13255
13255
  A
13256
13256
  ] })
@@ -13265,7 +13265,7 @@ const Za = ({
13265
13265
  type: "button",
13266
13266
  variant: "outline",
13267
13267
  onClick: () => {
13268
- G(_e), se({});
13268
+ G(_e), te({});
13269
13269
  },
13270
13270
  disabled: O || d,
13271
13271
  children: u("common.previous")
@@ -13361,7 +13361,7 @@ const Za = ({
13361
13361
  }), () => G.unregisterAction("workflow-back");
13362
13362
  }
13363
13363
  }, [B, x, W]);
13364
- const ie = we.useCallback(async () => {
13364
+ const re = we.useCallback(async () => {
13365
13365
  if (!d || !e) return;
13366
13366
  const G = d.action;
13367
13367
  try {
@@ -13386,7 +13386,7 @@ const Za = ({
13386
13386
  }
13387
13387
  case de.RiskScoring: {
13388
13388
  H.info("[DevTools] Skipping Risk Scoring step");
13389
- const se = (await h.getRiskCriterias(e)).map((z) => {
13389
+ const te = (await h.getRiskCriterias(e)).map((z) => {
13390
13390
  var R;
13391
13391
  return {
13392
13392
  riskCriteriaId: z.id,
@@ -13395,13 +13395,13 @@ const Za = ({
13395
13395
  });
13396
13396
  await h.submitRiskScoring({
13397
13397
  applicantId: e,
13398
- criteriaValueInputs: se
13398
+ criteriaValueInputs: te
13399
13399
  });
13400
13400
  break;
13401
13401
  }
13402
13402
  case de.AppropriatenessTest: {
13403
13403
  H.info("[DevTools] Skipping Appropriateness Test step");
13404
- const Q = await L.getAppropriatenessTest(e), se = Q.appropriatenessQuestions.map((z) => {
13404
+ const Q = await L.getAppropriatenessTest(e), te = Q.appropriatenessQuestions.map((z) => {
13405
13405
  var R;
13406
13406
  return {
13407
13407
  appropriatenessQuestionId: z.id,
@@ -13411,13 +13411,13 @@ const Za = ({
13411
13411
  await L.fillAppropriatenessTest({
13412
13412
  applicantId: e,
13413
13413
  appropriatenessTestId: Q.id,
13414
- appropriatenessQuestionResults: se
13414
+ appropriatenessQuestionResults: te
13415
13415
  });
13416
13416
  break;
13417
13417
  }
13418
13418
  case de.UploadDocument: {
13419
13419
  H.info("[DevTools] Skipping Upload Document step");
13420
- const Q = await M.getUploadDocument(e), se = Q.uploadDocumentFiles.map((z) => ({
13420
+ const Q = await M.getUploadDocument(e), te = Q.uploadDocumentFiles.map((z) => ({
13421
13421
  uploadDocumentFileId: z.id,
13422
13422
  valueList: [{
13423
13423
  fileName: "dev-placeholder.pdf",
@@ -13427,14 +13427,14 @@ const Za = ({
13427
13427
  await M.fillUploadDocument({
13428
13428
  applicantId: e,
13429
13429
  uploadDocumentId: Q.id,
13430
- uploadDocumentResults: se
13430
+ uploadDocumentResults: te
13431
13431
  });
13432
13432
  break;
13433
13433
  }
13434
13434
  case de.InvestorCategorization:
13435
13435
  case de.AdditionalData: {
13436
13436
  H.info("[DevTools] Skipping Investor Categorization step");
13437
- const se = (await h.getRiskCriterias(e)).map((z) => {
13437
+ const te = (await h.getRiskCriterias(e)).map((z) => {
13438
13438
  var R;
13439
13439
  return {
13440
13440
  riskCriteriaId: z.id,
@@ -13443,7 +13443,7 @@ const Za = ({
13443
13443
  });
13444
13444
  await h.submitRiskScoring({
13445
13445
  applicantId: e,
13446
- criteriaValueInputs: se
13446
+ criteriaValueInputs: te
13447
13447
  });
13448
13448
  break;
13449
13449
  }
@@ -13478,30 +13478,37 @@ const Za = ({
13478
13478
  label: `Skip: ${d.title || d.name || de[Q]}`,
13479
13479
  icon: "⏭️",
13480
13480
  group: "workflow",
13481
- handler: ie
13481
+ handler: re
13482
13482
  }), () => G.unregisterAction("workflow-skip");
13483
- }, [B, d, ie]), we.useEffect(() => {
13483
+ }, [B, d, re]), we.useEffect(() => {
13484
13484
  N && a && a(N);
13485
13485
  }, [N, a]), we.useEffect(() => {
13486
13486
  c != null && c.workflowResult && t && t(c.workflowResult);
13487
13487
  }, [c == null ? void 0 : c.workflowResult, t]);
13488
13488
  const he = we.useRef(!1);
13489
13489
  if (we.useEffect(() => {
13490
- !p || !f || !e || he.current || (he.current = !0, $(!0), P(null), (async () => {
13490
+ if (!p || !f || !e || he.current) return;
13491
+ he.current = !0;
13492
+ let G = !1;
13493
+ return $(!0), P(null), (async () => {
13491
13494
  try {
13492
13495
  H.info(`[SDK] Auto-duplicating applicant ${e} → workflow ${f}`);
13493
- const Q = (await l.duplicateApplicant({
13496
+ const Q = await l.duplicateApplicant({
13494
13497
  applicantId: e,
13495
13498
  workflowKey: f
13496
- })).applicantId;
13497
- H.info(`[SDK] Duplicated → new applicantId=${Q}`), r && r(Q);
13498
- } catch (G) {
13499
- const Q = (G == null ? void 0 : G.message) || "Failed to continue with new workflow";
13500
- H.warn(`[SDK] Duplicate applicant failed: ${Q}`), P(Q);
13499
+ });
13500
+ if (G) return;
13501
+ H.info(`[SDK] Duplicated → new applicantId=${Q.applicantId}`), r && r(Q.applicantId);
13502
+ } catch (Q) {
13503
+ if (G) return;
13504
+ const te = (Q == null ? void 0 : Q.message) || "Failed to continue with new workflow";
13505
+ H.warn(`[SDK] Duplicate applicant failed: ${te}`), P(te);
13501
13506
  } finally {
13502
- $(!1), he.current = !1;
13507
+ G || $(!1);
13503
13508
  }
13504
- })());
13509
+ })(), () => {
13510
+ G = !0;
13511
+ };
13505
13512
  }, [p, f, e, l, r]), C || T || !c)
13506
13513
  return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${n || ""}`, children: /* @__PURE__ */ i(me, { children: /* @__PURE__ */ s(ue, { children: [
13507
13514
  /* @__PURE__ */ i(Ge, { className: "my-8" }),
@@ -13563,7 +13570,7 @@ const Za = ({
13563
13570
  return "";
13564
13571
  }
13565
13572
  }, De = () => {
13566
- const G = u.filter((O) => O.visibility !== !1), Q = G.findIndex((O) => O.order === d.order), se = Q >= 0 ? Q + 1 : 1, z = G.length, R = z > 1 ? (Q + 1) / z * 100 : 100;
13573
+ const G = u.filter((O) => O.visibility !== !1), Q = G.findIndex((O) => O.order === d.order), te = Q >= 0 ? Q + 1 : 1, z = G.length, R = z > 1 ? (Q + 1) / z * 100 : 100;
13567
13574
  return /* @__PURE__ */ s("div", { className: "metakyc-progress-wrapper", style: {
13568
13575
  marginBottom: "24px",
13569
13576
  backgroundColor: "var(--metakyc-surface, var(--metakyc-background, #ffffff))",
@@ -13574,7 +13581,7 @@ const Za = ({
13574
13581
  }, children: [
13575
13582
  /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", marginBottom: "16px", gap: "8px", flexWrap: "wrap" }, children: [
13576
13583
  /* @__PURE__ */ i(Tt, {}),
13577
- /* @__PURE__ */ i(Ni, { variant: c.status === 1 ? "info" : "success", children: o("common.stepXofY", { current: se, total: z }) })
13584
+ /* @__PURE__ */ i(Ni, { variant: c.status === 1 ? "info" : "success", children: o("common.stepXofY", { current: te, total: z }) })
13578
13585
  ] }),
13579
13586
  /* @__PURE__ */ s("div", { style: { position: "relative", height: "4px", borderRadius: "999px", overflow: "hidden", marginBottom: "16px" }, children: [
13580
13587
  /* @__PURE__ */ i("div", { style: { position: "absolute", inset: 0, backgroundColor: "var(--metakyc-border, #e5e7eb)", opacity: 0.3 } }),
@@ -13599,13 +13606,13 @@ const Za = ({
13599
13606
  }
13600
13607
  )
13601
13608
  ] });
13602
- }, oe = () => {
13603
- const se = u.filter((R) => R.visibility !== !1).findIndex((R) => R.order === d.order) <= 0, z = {
13609
+ }, se = () => {
13610
+ const te = u.filter((R) => R.visibility !== !1).findIndex((R) => R.order === d.order) <= 0, z = {
13604
13611
  applicantId: e,
13605
13612
  onComplete: async () => {
13606
13613
  await F();
13607
13614
  },
13608
- onBack: se ? void 0 : x
13615
+ onBack: te ? void 0 : x
13609
13616
  };
13610
13617
  switch (d.action) {
13611
13618
  case de.Questionaries:
@@ -13651,7 +13658,7 @@ const Za = ({
13651
13658
  };
13652
13659
  return /* @__PURE__ */ s("div", { className: `metakyc-sdk ${n || ""}`, children: [
13653
13660
  De(),
13654
- oe()
13661
+ se()
13655
13662
  ] });
13656
13663
  }, tn = we.forwardRef(
13657
13664
  ({ visibleSteps: e, currentVisibleStepIndex: t, getStepFallbackName: a }, r) => {
@@ -13988,7 +13995,7 @@ export {
13988
13995
  pr as minimalTheme,
13989
13996
  ur as modernTheme,
13990
13997
  fn as removeScript,
13991
- ne as resolveDisplayText,
13998
+ oe as resolveDisplayText,
13992
13999
  bn as saveApplicantId,
13993
14000
  Xr as saveWorkflowState,
13994
14001
  gr as themePresets,