@vpdev2/metakyc 1.0.34 → 1.0.35

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
@@ -1,10 +1,10 @@
1
1
  var di = Object.defineProperty;
2
2
  var mi = (e, t, r) => t in e ? di(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var ye = (e, t, r) => mi(e, typeof t != "symbol" ? t + "" : t, r);
3
+ var fe = (e, t, r) => mi(e, typeof t != "symbol" ? t + "" : t, r);
4
4
  import ui from "axios";
5
5
  import { jsx as i, jsxs as o, Fragment as pt } from "react/jsx-runtime";
6
6
  import * as jt from "react";
7
- import Ce, { createContext as Xt, useMemo as Fe, useState as k, useEffect as fe, useContext as Zt, useCallback as te, useRef as de, forwardRef as ht, createElement as It } from "react";
7
+ import Ce, { createContext as Xt, useMemo as Fe, useState as k, useEffect as ve, useContext as Zt, useCallback as te, useRef as de, forwardRef as ht, createElement as It } from "react";
8
8
  import pi, { createPortal as Lt } from "react-dom";
9
9
  import { useForm as gi, Controller as at } from "react-hook-form";
10
10
  import { z as Qe } from "zod";
@@ -140,7 +140,7 @@ class Ai {
140
140
  class $e extends Error {
141
141
  constructor(r, a, n, l, s) {
142
142
  super(r);
143
- ye(this, "response");
143
+ fe(this, "response");
144
144
  this.code = a, this.details = n, this.validationErrors = l, this.name = "MetaKYCError", this.response = s, Object.setPrototypeOf(this, $e.prototype);
145
145
  }
146
146
  }
@@ -196,9 +196,9 @@ class yt {
196
196
  }
197
197
  class zi {
198
198
  constructor(t) {
199
- ye(this, "axiosInstance");
200
- ye(this, "endpointBuilder");
201
- ye(this, "config");
199
+ fe(this, "axiosInstance");
200
+ fe(this, "endpointBuilder");
201
+ fe(this, "config");
202
202
  this.config = { ...Ii, ...t }, this.endpointBuilder = new Ai(this.config.endpoints), this.axiosInstance = ui.create({
203
203
  baseURL: this.config.baseUrl,
204
204
  timeout: this.config.timeout,
@@ -1048,7 +1048,7 @@ class $i {
1048
1048
  }
1049
1049
  class _i {
1050
1050
  constructor() {
1051
- ye(this, "listeners", /* @__PURE__ */ new Map());
1051
+ fe(this, "listeners", /* @__PURE__ */ new Map());
1052
1052
  }
1053
1053
  /**
1054
1054
  * Subscribe to an event
@@ -1093,10 +1093,10 @@ class _i {
1093
1093
  }
1094
1094
  class Gi {
1095
1095
  constructor() {
1096
- ye(this, "events", new _i());
1097
- ye(this, "_applicantId", null);
1098
- ye(this, "_progress", null);
1099
- ye(this, "_error", null);
1096
+ fe(this, "events", new _i());
1097
+ fe(this, "_applicantId", null);
1098
+ fe(this, "_progress", null);
1099
+ fe(this, "_error", null);
1100
1100
  }
1101
1101
  /**
1102
1102
  * Get current applicant ID
@@ -1233,7 +1233,7 @@ class Gi {
1233
1233
  }
1234
1234
  class Qi {
1235
1235
  constructor() {
1236
- ye(this, "handlers", /* @__PURE__ */ new Map());
1236
+ fe(this, "handlers", /* @__PURE__ */ new Map());
1237
1237
  }
1238
1238
  /**
1239
1239
  * Register a step handler
@@ -1274,8 +1274,8 @@ class Qi {
1274
1274
  }
1275
1275
  class Xi {
1276
1276
  constructor(t, r, a, n, l, s, p, m) {
1277
- ye(this, "state");
1278
- ye(this, "stepRouter");
1277
+ fe(this, "state");
1278
+ fe(this, "stepRouter");
1279
1279
  this.applicantService = t, this.questionnaireService = r, this.uploadDocumentService = a, this.appropriatenessTestService = n, this.overviewService = l, this.riskScoringService = s, this.investorCategorizationService = m, this.state = new Gi(), this.stepRouter = new Qi(), this.registerStepHandlers();
1280
1280
  }
1281
1281
  /**
@@ -1471,10 +1471,10 @@ a:hover { color: ${t}; }
1471
1471
  }
1472
1472
  class er {
1473
1473
  constructor(t) {
1474
- ye(this, "sdk", null);
1475
- ye(this, "config");
1476
- ye(this, "completeCallback", null);
1477
- ye(this, "errorCallback", null);
1474
+ fe(this, "sdk", null);
1475
+ fe(this, "config");
1476
+ fe(this, "completeCallback", null);
1477
+ fe(this, "errorCallback", null);
1478
1478
  this.config = t;
1479
1479
  }
1480
1480
  async loadSDK() {
@@ -1528,8 +1528,8 @@ class er {
1528
1528
  }
1529
1529
  class tr {
1530
1530
  constructor(t) {
1531
- ye(this, "sdk", null);
1532
- ye(this, "config");
1531
+ fe(this, "sdk", null);
1532
+ fe(this, "config");
1533
1533
  this.config = t;
1534
1534
  }
1535
1535
  /**
@@ -1594,9 +1594,9 @@ class tr {
1594
1594
  }
1595
1595
  class ir {
1596
1596
  constructor(t) {
1597
- ye(this, "sardineContext", null);
1598
- ye(this, "config");
1599
- ye(this, "sessionKey");
1597
+ fe(this, "sardineContext", null);
1598
+ fe(this, "config");
1599
+ fe(this, "sessionKey");
1600
1600
  this.config = t, this.sessionKey = t.sessionKey || this.generateSessionKey();
1601
1601
  }
1602
1602
  /**
@@ -1793,9 +1793,9 @@ class et {
1793
1793
  }
1794
1794
  class rr {
1795
1795
  constructor() {
1796
- ye(this, "currentTheme", Pe);
1797
- ye(this, "customStyleElement", null);
1798
- ye(this, "themeStyleElement", null);
1796
+ fe(this, "currentTheme", Pe);
1797
+ fe(this, "customStyleElement", null);
1798
+ fe(this, "themeStyleElement", null);
1799
1799
  }
1800
1800
  /**
1801
1801
  * Apply theme configuration
@@ -6735,7 +6735,7 @@ function ei(e) {
6735
6735
  };
6736
6736
  }
6737
6737
  const wr = /^t\(['"](.+?)['"]\)$/, Bt = "$t:";
6738
- function ke(e, t) {
6738
+ function pe(e, t) {
6739
6739
  if (!e) return "";
6740
6740
  const r = e.trim();
6741
6741
  if (r.startsWith(Bt))
@@ -6743,7 +6743,7 @@ function ke(e, t) {
6743
6743
  const a = wr.exec(r);
6744
6744
  return a ? t(a[1]) : e;
6745
6745
  }
6746
- const ti = "1.0.34", ii = Xt(null), qt = `metakyc-translations-${ti}-`, Sr = ({
6746
+ const ti = "1.0.35", ii = Xt(null), qt = `metakyc-translations-${ti}-`, Sr = ({
6747
6747
  locale: e,
6748
6748
  fetchTranslations: t,
6749
6749
  children: r
@@ -6758,7 +6758,7 @@ const ti = "1.0.34", ii = Xt(null), qt = `metakyc-translations-${ti}-`, Sr = ({
6758
6758
  }
6759
6759
  return m;
6760
6760
  }, [a]), [l, s] = k(n);
6761
- fe(() => {
6761
+ ve(() => {
6762
6762
  if (!t) return;
6763
6763
  let m = !1;
6764
6764
  return t(a).then((d) => {
@@ -6850,7 +6850,7 @@ const Wt = "metakyc-theme-cache", Pa = ({ config: e, children: t }) => {
6850
6850
  s.investorCategorizationService
6851
6851
  )
6852
6852
  }), [e, s, r]);
6853
- fe(() => ((async () => {
6853
+ ve(() => ((async () => {
6854
6854
  if (n.current || l.current) {
6855
6855
  console.log("[MetaKYC] Theme already loading or loaded, skipping...");
6856
6856
  return;
@@ -7003,9 +7003,9 @@ function Oa() {
7003
7003
  }
7004
7004
  function Er(e) {
7005
7005
  const { createOrchestrator: t } = Oe(), [r, a] = k(null), [n, l] = k(!1), [s, p] = k(null), m = de(null), d = e || Ir();
7006
- fe(() => {
7006
+ ve(() => {
7007
7007
  m.current || (m.current = t());
7008
- }, [t]), fe(() => {
7008
+ }, [t]), ve(() => {
7009
7009
  var F;
7010
7010
  r && d && (Rr(d), zr({
7011
7011
  applicantId: d,
@@ -7033,7 +7033,7 @@ function Er(e) {
7033
7033
  }
7034
7034
  }
7035
7035
  }, [d]);
7036
- fe(() => {
7036
+ ve(() => {
7037
7037
  d && !h.current && R();
7038
7038
  }, [d, R]);
7039
7039
  const L = te(async () => {
@@ -7144,7 +7144,7 @@ function Pr(e) {
7144
7144
  }
7145
7145
  }
7146
7146
  }, [e, t, r]);
7147
- fe(() => {
7147
+ ve(() => {
7148
7148
  e && b.current !== e && q();
7149
7149
  }, [e]);
7150
7150
  const S = te(
@@ -7188,7 +7188,7 @@ function Dr(e) {
7188
7188
  }
7189
7189
  }
7190
7190
  }, [e, t]);
7191
- fe(() => {
7191
+ ve(() => {
7192
7192
  e && L.current !== e && b();
7193
7193
  }, [e]);
7194
7194
  const q = te(
@@ -7232,7 +7232,7 @@ function Va(e) {
7232
7232
  }
7233
7233
  }
7234
7234
  }, [e, t]);
7235
- fe(() => {
7235
+ ve(() => {
7236
7236
  e && L.current !== e && b();
7237
7237
  }, [e]);
7238
7238
  const q = te(
@@ -7277,7 +7277,7 @@ function jr(e) {
7277
7277
  }
7278
7278
  }
7279
7279
  }, [e, t]);
7280
- fe(() => {
7280
+ ve(() => {
7281
7281
  e && h.current !== e && R();
7282
7282
  }, [e]);
7283
7283
  const L = te(async () => {
@@ -7420,7 +7420,7 @@ function Fr(e) {
7420
7420
  }
7421
7421
  }
7422
7422
  }, [e, t, r]);
7423
- fe(() => {
7423
+ ve(() => {
7424
7424
  e && S.current !== e && P();
7425
7425
  }, [e]);
7426
7426
  const B = te(
@@ -7944,7 +7944,7 @@ const Kt = 280, qr = ({
7944
7944
  const D = U.current.getBoundingClientRect(), O = window.innerHeight - D.bottom < Kt && D.top > Kt;
7945
7945
  return { top: O ? D.top : D.bottom + 4, left: D.left, width: D.width, openUp: O };
7946
7946
  }, []), ae = te(() => {
7947
- const D = getComputedStyle(document.querySelector(".metakyc-sdk") || document.documentElement), E = (ve, se) => D.getPropertyValue(ve).trim() || se, O = E("--metakyc-input-bg", E("--metakyc-background", "#ffffff"));
7947
+ const D = getComputedStyle(document.querySelector(".metakyc-sdk") || document.documentElement), E = (he, se) => D.getPropertyValue(he).trim() || se, O = E("--metakyc-input-bg", E("--metakyc-background", "#ffffff"));
7948
7948
  B({
7949
7949
  bg: O,
7950
7950
  borderColor: E("--metakyc-input-border", E("--metakyc-border", "#d1d5db")),
@@ -7962,15 +7962,15 @@ const Kt = 280, qr = ({
7962
7962
  }, [y, J, ae]), A = te(() => {
7963
7963
  R(!1), b("");
7964
7964
  }, []);
7965
- fe(() => {
7965
+ ve(() => {
7966
7966
  if (!h) return;
7967
7967
  const D = (E) => {
7968
- var ve, se;
7968
+ var he, se;
7969
7969
  const O = E.target;
7970
- !((ve = F.current) != null && ve.contains(O)) && !((se = K.current) != null && se.contains(O)) && A();
7970
+ !((he = F.current) != null && he.contains(O)) && !((se = K.current) != null && se.contains(O)) && A();
7971
7971
  };
7972
7972
  return document.addEventListener("mousedown", D), () => document.removeEventListener("mousedown", D);
7973
- }, [h, A]), fe(() => {
7973
+ }, [h, A]), ve(() => {
7974
7974
  if (!h) return;
7975
7975
  const D = () => {
7976
7976
  const E = J();
@@ -7989,7 +7989,7 @@ const Kt = 280, qr = ({
7989
7989
  }, W = (D) => {
7990
7990
  var E;
7991
7991
  return ((E = a.find((O) => O.value === D)) == null ? void 0 : E.label) || D;
7992
- }, { bg: _, borderColor: oe, textPrimary: H, textSecondary: Me, primaryColor: pe, primaryLight: ge, hoverBg: xe } = P, me = h && q && /* @__PURE__ */ o(
7992
+ }, { bg: _, borderColor: oe, textPrimary: H, textSecondary: Me, primaryColor: ge, primaryLight: ye, hoverBg: xe } = P, me = h && q && /* @__PURE__ */ o(
7993
7993
  "div",
7994
7994
  {
7995
7995
  ref: K,
@@ -8053,8 +8053,8 @@ const Kt = 280, qr = ({
8053
8053
  padding: "8px 12px",
8054
8054
  fontSize: "13px",
8055
8055
  cursor: "pointer",
8056
- backgroundColor: E ? ge : "transparent",
8057
- color: E ? pe : H,
8056
+ backgroundColor: E ? ye : "transparent",
8057
+ color: E ? ge : H,
8058
8058
  userSelect: "none"
8059
8059
  },
8060
8060
  onMouseEnter: (O) => {
@@ -8239,7 +8239,7 @@ const Kt = 280, qr = ({
8239
8239
  }, [L, Q, J]), W = te(() => {
8240
8240
  q(!1), P("");
8241
8241
  }, []), _ = () => b ? W() : X();
8242
- fe(() => {
8242
+ ve(() => {
8243
8243
  if (!b) return;
8244
8244
  const j = (ne) => {
8245
8245
  var Ie, ze;
@@ -8247,7 +8247,7 @@ const Kt = 280, qr = ({
8247
8247
  !((Ie = ae.current) != null && Ie.contains(Z)) && !((ze = A.current) != null && ze.contains(Z)) && W();
8248
8248
  };
8249
8249
  return document.addEventListener("mousedown", j), () => document.removeEventListener("mousedown", j);
8250
- }, [b, W]), fe(() => {
8250
+ }, [b, W]), ve(() => {
8251
8251
  if (!b) return;
8252
8252
  const j = () => {
8253
8253
  const ne = Q();
@@ -8256,7 +8256,7 @@ const Kt = 280, qr = ({
8256
8256
  return window.addEventListener("scroll", j, !0), window.addEventListener("resize", j), () => {
8257
8257
  window.removeEventListener("scroll", j, !0), window.removeEventListener("resize", j);
8258
8258
  };
8259
- }, [b, Q]), fe(() => {
8259
+ }, [b, Q]), ve(() => {
8260
8260
  b && V.current && setTimeout(() => {
8261
8261
  var j;
8262
8262
  return (j = V.current) == null ? void 0 : j.focus();
@@ -8266,7 +8266,7 @@ const Kt = 280, qr = ({
8266
8266
  (j) => j.label.toLowerCase().includes(S.toLowerCase()) || j.value.toLowerCase().includes(S.toLowerCase())
8267
8267
  ), H = (se = a.find((j) => j.value === l)) == null ? void 0 : se.label, Me = (j, ne) => {
8268
8268
  L || ne || (s(j), W());
8269
- }, { bg: pe, border: ge, text: xe, textSecondary: me, primary: D, primaryLight: E, hoverBg: O } = U, ve = b && B && /* @__PURE__ */ o(
8269
+ }, { bg: ge, border: ye, text: xe, textSecondary: me, primary: D, primaryLight: E, hoverBg: O } = U, he = b && B && /* @__PURE__ */ o(
8270
8270
  "div",
8271
8271
  {
8272
8272
  ref: A,
@@ -8280,12 +8280,12 @@ const Kt = 280, qr = ({
8280
8280
  zIndex: 99999,
8281
8281
  borderRadius: "8px",
8282
8282
  boxShadow: "0 4px 16px rgba(0,0,0,0.18)",
8283
- border: `1px solid ${ge}`,
8284
- backgroundColor: pe,
8283
+ border: `1px solid ${ye}`,
8284
+ backgroundColor: ge,
8285
8285
  overflow: "hidden"
8286
8286
  },
8287
8287
  children: [
8288
- /* @__PURE__ */ i("div", { style: { padding: "8px", borderBottom: `1px solid ${ge}` }, children: /* @__PURE__ */ i(
8288
+ /* @__PURE__ */ i("div", { style: { padding: "8px", borderBottom: `1px solid ${ye}` }, children: /* @__PURE__ */ i(
8289
8289
  "input",
8290
8290
  {
8291
8291
  ref: V,
@@ -8301,18 +8301,18 @@ const Kt = 280, qr = ({
8301
8301
  padding: "6px 8px",
8302
8302
  fontSize: "13px",
8303
8303
  borderRadius: "6px",
8304
- border: `1px solid ${ge}`,
8305
- backgroundColor: pe,
8304
+ border: `1px solid ${ye}`,
8305
+ backgroundColor: ge,
8306
8306
  color: xe,
8307
8307
  outline: "none",
8308
8308
  boxSizing: "border-box"
8309
8309
  },
8310
8310
  onFocus: (j) => {
8311
8311
  const ne = getComputedStyle(document.querySelector(".metakyc-sdk") || document.documentElement), Z = ne.getPropertyValue("--metakyc-input-border-focus").trim() || ne.getPropertyValue("--metakyc-primary").trim() || "#2563eb";
8312
- j.currentTarget.style.backgroundColor = pe, j.currentTarget.style.color = xe, j.currentTarget.style.borderColor = Z, j.currentTarget.style.outline = "none", j.currentTarget.style.boxShadow = `0 0 0 2px ${Z}33`;
8312
+ j.currentTarget.style.backgroundColor = ge, j.currentTarget.style.color = xe, j.currentTarget.style.borderColor = Z, j.currentTarget.style.outline = "none", j.currentTarget.style.boxShadow = `0 0 0 2px ${Z}33`;
8313
8313
  },
8314
8314
  onBlur: (j) => {
8315
- j.currentTarget.style.backgroundColor = pe, j.currentTarget.style.color = xe, j.currentTarget.style.borderColor = ge, j.currentTarget.style.outline = "none", j.currentTarget.style.boxShadow = "none";
8315
+ j.currentTarget.style.backgroundColor = ge, j.currentTarget.style.color = xe, j.currentTarget.style.borderColor = ye, j.currentTarget.style.outline = "none", j.currentTarget.style.boxShadow = "none";
8316
8316
  }
8317
8317
  }
8318
8318
  ) }),
@@ -8413,7 +8413,7 @@ const Kt = 280, qr = ({
8413
8413
  ]
8414
8414
  }
8415
8415
  ),
8416
- typeof document < "u" && ve ? Lt(ve, document.body) : null,
8416
+ typeof document < "u" && he ? Lt(he, document.body) : null,
8417
8417
  t && /* @__PURE__ */ i("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-error, #ef4444)" }, children: t }),
8418
8418
  !t && r && /* @__PURE__ */ i("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r })
8419
8419
  ]
@@ -9789,7 +9789,7 @@ const ga = ({
9789
9789
  onBack: r
9790
9790
  }) => {
9791
9791
  const { t: a } = Re(), { appropriatenessTestService: n } = Oe(), [l, s] = k(null), [p, m] = k(!0), [d, y] = k(!1), [h, R] = k(null), [L, b] = k({}), [q, S] = k(0), [P, B] = k(!1), [F, U] = k(!1), [K, J] = k(0), [ae, x] = k(0), [A, V] = k(null);
9792
- fe(() => {
9792
+ ve(() => {
9793
9793
  (async () => {
9794
9794
  try {
9795
9795
  m(!0), R(null);
@@ -9804,25 +9804,25 @@ const ga = ({
9804
9804
  m(!1);
9805
9805
  }
9806
9806
  })();
9807
- }, [e, n]), fe(() => {
9807
+ }, [e, n]), ve(() => {
9808
9808
  if (!P || q <= 0) return;
9809
9809
  const E = setInterval(() => {
9810
9810
  S((O) => O <= 1 ? (U(!0), 0) : O - 1);
9811
9811
  }, 1e3);
9812
9812
  return () => clearInterval(E);
9813
- }, [P, q]), fe(() => {
9813
+ }, [P, q]), ve(() => {
9814
9814
  if (K <= 0) return;
9815
9815
  const E = setInterval(() => {
9816
9816
  J((O) => O <= 1 ? 0 : O - 1);
9817
9817
  }, 1e3);
9818
9818
  return () => clearInterval(E);
9819
- }, [K]), fe(() => {
9819
+ }, [K]), ve(() => {
9820
9820
  F && !d && _();
9821
9821
  }, [F]);
9822
9822
  const Q = () => {
9823
9823
  l && (B(!0), S(l.testDurationSec), x(0), b({}), R(null));
9824
9824
  }, X = (E, O) => {
9825
- b((ve) => ({ ...ve, [E]: O }));
9825
+ b((he) => ({ ...he, [E]: O }));
9826
9826
  }, W = te(async () => {
9827
9827
  try {
9828
9828
  const E = await n.getAppropriatenessTest(e);
@@ -9845,13 +9845,13 @@ const ga = ({
9845
9845
  try {
9846
9846
  const O = l.appropriatenessQuestions.map(
9847
9847
  (se) => ({ appropriatenessQuestionId: se.id, value: L[se.id] || "" })
9848
- ), ve = {
9848
+ ), he = {
9849
9849
  applicantId: e,
9850
9850
  appropriatenessTestId: l.id,
9851
9851
  appropriatenessQuestionResults: O
9852
9852
  };
9853
9853
  try {
9854
- const se = await n.fillAppropriatenessTest(ve);
9854
+ const se = await n.fillAppropriatenessTest(he);
9855
9855
  se.isSuccess ? V({ success: !0, message: se.message || a("appropriatenessTest.passedMessage") }) : (V({ success: !1, message: se.message || a("appropriatenessTest.failedMessage") }), setTimeout(() => W(), 1e3));
9856
9856
  } catch (se) {
9857
9857
  if (se.code === 400 && se.message)
@@ -9878,7 +9878,7 @@ const ga = ({
9878
9878
  /* @__PURE__ */ i("p", { style: { fontSize: "16px", fontWeight: 600, color: "var(--metakyc-danger, #ef4444)" }, children: a("appropriatenessTest.noTestData") }),
9879
9879
  h && /* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "8px" }, children: h })
9880
9880
  ] }) }) });
9881
- const H = l.testAllowedMaxTry - l.totalFailedTries, Me = l.appropriatenessQuestions.length, pe = Object.keys(L).length;
9881
+ const H = l.testAllowedMaxTry - l.totalFailedTries, Me = l.appropriatenessQuestions.length, ge = Object.keys(L).length;
9882
9882
  if (K > 0)
9883
9883
  return /* @__PURE__ */ o(ie, { children: [
9884
9884
  /* @__PURE__ */ i(Ne, { children: /* @__PURE__ */ i("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: l.displayName }) }),
@@ -10051,7 +10051,7 @@ const ga = ({
10051
10051
  /* @__PURE__ */ i(G, { type: "button", onClick: Q, disabled: H <= 0, children: a("appropriatenessTest.startTest") })
10052
10052
  ] }) })
10053
10053
  ] });
10054
- const ge = l.appropriatenessQuestions[ae], xe = ae === Me - 1, me = pe === Me, D = q <= 60;
10054
+ const ye = l.appropriatenessQuestions[ae], xe = ae === Me - 1, me = ge === Me, D = q <= 60;
10055
10055
  return /* @__PURE__ */ o(ie, { children: [
10056
10056
  /* @__PURE__ */ o(Ne, { children: [
10057
10057
  /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
@@ -10104,7 +10104,7 @@ const ga = ({
10104
10104
  height: "100%",
10105
10105
  borderRadius: "999px",
10106
10106
  backgroundColor: "var(--metakyc-primary, #2563eb)",
10107
- width: `${pe / Me * 100}%`,
10107
+ width: `${ge / Me * 100}%`,
10108
10108
  transition: "width 0.3s ease"
10109
10109
  } }) }),
10110
10110
  /* @__PURE__ */ o("div", { style: {
@@ -10113,7 +10113,7 @@ const ga = ({
10113
10113
  marginTop: "4px"
10114
10114
  }, children: [
10115
10115
  /* @__PURE__ */ o("span", { style: { fontSize: "11px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
10116
- pe,
10116
+ ge,
10117
10117
  " ",
10118
10118
  a("appropriatenessTest.answered")
10119
10119
  ] }),
@@ -10126,13 +10126,13 @@ const ga = ({
10126
10126
  ] })
10127
10127
  ] }),
10128
10128
  /* @__PURE__ */ o(re, { children: [
10129
- ge && /* @__PURE__ */ i(
10129
+ ye && /* @__PURE__ */ i(
10130
10130
  fa,
10131
10131
  {
10132
- question: ge,
10132
+ question: ye,
10133
10133
  index: ae,
10134
- selectedAnswer: L[ge.id],
10135
- onSelect: (E) => X(ge.id, E),
10134
+ selectedAnswer: L[ye.id],
10135
+ onSelect: (E) => X(ye.id, E),
10136
10136
  disabled: d
10137
10137
  }
10138
10138
  ),
@@ -10359,7 +10359,7 @@ const ga = ({
10359
10359
  onBack: r
10360
10360
  }) => {
10361
10361
  var it, Ke, dt, Xe;
10362
- const { t: a } = Re(), { applicantService: n, baseInformationService: l, identityService: s, config: p, currentTheme: m } = Oe(), { identityData: d, provider: y, token: h, isLoading: R, error: L, requestIdentity: b, restartIdentity: q } = Mr(e), [S, P] = k(null), [B, F] = k(null), [U, K] = k([]), [J, ae] = k([]), [x, A] = k(!0), [V, Q] = k(!1), [X, W] = k(null), [_, oe] = k(!1), H = Ce.useRef(!1), [Me, pe] = k({}), [ge, xe] = k({}), me = m != null && m.reviewPageFields && m.reviewPageFields.length > 0 ? m.reviewPageFields[0] : null, D = !!(m != null && m.reviewPageDisabled), E = de(!1);
10362
+ const { t: a } = Re(), { applicantService: n, baseInformationService: l, identityService: s, config: p, currentTheme: m } = Oe(), { identityData: d, provider: y, token: h, isLoading: R, error: L, requestIdentity: b, restartIdentity: q } = Mr(e), [S, P] = k(null), [B, F] = k(null), [U, K] = k([]), [J, ae] = k([]), [x, A] = k(!0), [V, Q] = k(!1), [X, W] = k(null), [_, oe] = k(!1), H = Ce.useRef(!1), [Me, ge] = k({}), [ye, xe] = k({}), me = m != null && m.reviewPageFields && m.reviewPageFields.length > 0 ? m.reviewPageFields[0] : null, D = !!(m != null && m.reviewPageDisabled), E = de(!1);
10363
10363
  E.current = D;
10364
10364
  const O = gi({
10365
10365
  defaultValues: {
@@ -10372,7 +10372,7 @@ const ga = ({
10372
10372
  phonenumber: ""
10373
10373
  }
10374
10374
  });
10375
- fe(() => {
10375
+ ve(() => {
10376
10376
  if (D) {
10377
10377
  H.current || (H.current = !0, b().then(() => Q(!0)).catch((M) => console.error("[Identity] Auto-request failed:", M)).finally(() => A(!1)));
10378
10378
  return;
@@ -10391,7 +10391,7 @@ const ga = ({
10391
10391
  const z = /* @__PURE__ */ new Set(), w = Y.filter((v) => v.countryCode).map((v) => ({ value: v.countryCode, label: `${v.countryCode} – ${v.name}` })).filter((v) => z.has(v.value) ? !1 : (z.add(v.value), !0));
10392
10392
  ae(w);
10393
10393
  const u = M.applicantRequestData;
10394
- if (pe({
10394
+ if (ge({
10395
10395
  firstName: (u == null ? void 0 : u.firstName) || "",
10396
10396
  lastName: (u == null ? void 0 : u.lastName) || "",
10397
10397
  email: (u == null ? void 0 : u.email) || "",
@@ -10435,9 +10435,9 @@ const ga = ({
10435
10435
  A(!1);
10436
10436
  }
10437
10437
  })();
10438
- }, [e]), fe(() => {
10438
+ }, [e]), ve(() => {
10439
10439
  d && !V && E.current && (console.log("[Identity] Review page disabled — showing cached provider"), Q(!0));
10440
- }, [d, V]), fe(() => {
10440
+ }, [d, V]), ve(() => {
10441
10441
  if (h) {
10442
10442
  if (h.expiresAt) {
10443
10443
  const f = new Date(h.expiresAt).getTime();
@@ -10462,11 +10462,11 @@ const ga = ({
10462
10462
  }
10463
10463
  }
10464
10464
  }, [h]);
10465
- const ve = y !== null && y === Be.Sumsub;
10466
- fe(() => {
10465
+ const he = y !== null && y === Be.Sumsub;
10466
+ ve(() => {
10467
10467
  if (y !== null && h && !S && V && !_) {
10468
10468
  const f = y;
10469
- if (ve) {
10469
+ if (he) {
10470
10470
  console.log("[Sumsub] Fetching access token for Web SDK…"), W(null), (async () => {
10471
10471
  try {
10472
10472
  const M = await s.refreshSumsubToken(e), $ = et.parseProviderConfig(y, h, p);
@@ -10536,7 +10536,7 @@ const ga = ({
10536
10536
  console.error("[Identity] Error destroying provider:", f);
10537
10537
  }
10538
10538
  };
10539
- }, [y, h, S, V, t, _, ve, e, p, s]);
10539
+ }, [y, h, S, V, t, _, he, e, p, s]);
10540
10540
  const se = async () => {
10541
10541
  try {
10542
10542
  W(null), oe(!1), await b(), Q(!0);
@@ -10611,7 +10611,7 @@ const ga = ({
10611
10611
  ] });
10612
10612
  if (V && d) {
10613
10613
  const f = y;
10614
- return ve ? /* @__PURE__ */ o("div", { style: {
10614
+ return he ? /* @__PURE__ */ o("div", { style: {
10615
10615
  background: "var(--metakyc-background, #ffffff)",
10616
10616
  borderRadius: "12px",
10617
10617
  border: "1px solid var(--metakyc-border, #e5e7eb)",
@@ -10848,7 +10848,7 @@ const ga = ({
10848
10848
  /* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0 }, children: f }),
10849
10849
  /* @__PURE__ */ i("div", { style: { paddingTop: 24 }, children: /* @__PURE__ */ i(ze, { helpText: M }) })
10850
10850
  ] }) : f, We = (f, M) => {
10851
- const $ = `cf-${M}`, Y = f.paramName ?? "", ee = ge[Y];
10851
+ const $ = `cf-${M}`, Y = f.paramName ?? "", ee = ye[Y];
10852
10852
  if (f.customType === "br")
10853
10853
  return /* @__PURE__ */ i("div", { style: { ...Z(f.colSpan), minHeight: "0.5rem" } }, $);
10854
10854
  if (f.customType === "paragraph")
@@ -10968,7 +10968,7 @@ const ga = ({
10968
10968
  {
10969
10969
  label: ee,
10970
10970
  value: String(g),
10971
- onChange: (u) => pe((c) => ({ ...c, [$]: u })),
10971
+ onChange: (u) => ge((c) => ({ ...c, [$]: u })),
10972
10972
  options: [{ value: "", label: a("placeholders.selectCountryCode") }, ...J]
10973
10973
  }
10974
10974
  ),
@@ -10979,7 +10979,7 @@ const ga = ({
10979
10979
  {
10980
10980
  label: ee,
10981
10981
  value: String(g),
10982
- onChange: (u) => pe((c) => ({ ...c, [$]: u })),
10982
+ onChange: (u) => ge((c) => ({ ...c, [$]: u })),
10983
10983
  options: [{ value: "", label: a("common.select") }, ...U]
10984
10984
  }
10985
10985
  ),
@@ -10991,7 +10991,7 @@ const ga = ({
10991
10991
  label: ee,
10992
10992
  type: (Y == null ? void 0 : Y.type) === "date" ? "date" : (Y == null ? void 0 : Y.type) === "email" ? "email" : "text",
10993
10993
  value: String(g),
10994
- onChange: (u) => pe((c) => ({ ...c, [$]: u.target.value }))
10994
+ onChange: (u) => ge((c) => ({ ...c, [$]: u.target.value }))
10995
10995
  }
10996
10996
  ),
10997
10997
  f.helpText
@@ -11229,7 +11229,7 @@ const _t = ({
11229
11229
  subtitle: t,
11230
11230
  className: r = ""
11231
11231
  }) => {
11232
- const { currentTheme: a } = Oe(), { t: n } = Re(), l = e || (a == null ? void 0 : a.title) || "", s = ke(l, n), p = ke(t, n), m = !!(a != null && a.logo && a.logo.visible && a.logo.url), d = !!s;
11232
+ const { currentTheme: a } = Oe(), { t: n } = Re(), l = e || (a == null ? void 0 : a.title) || "", s = pe(l, n), p = pe(t, n), m = !!(a != null && a.logo && a.logo.visible && a.logo.url), d = !!s;
11233
11233
  return !m && !d ? null : /* @__PURE__ */ o("div", { className: `metakyc-header ${r}`, children: [
11234
11234
  /* @__PURE__ */ o(
11235
11235
  "div",
@@ -11442,7 +11442,7 @@ const ba = {
11442
11442
  U.has(I) && c.add((C = lt[I]) == null ? void 0 : C.countriesType);
11443
11443
  return c.size === 0 && c.add(void 0), Array.from(c);
11444
11444
  }, [F, P]), [J, ae] = k({}), [x, A] = k(!0), V = de(/* @__PURE__ */ new Set()), Q = de(/* @__PURE__ */ new Set());
11445
- fe(() => {
11445
+ ve(() => {
11446
11446
  if (!s) return;
11447
11447
  const c = K.filter((I) => {
11448
11448
  const N = I != null ? String(I) : "all";
@@ -11461,10 +11461,10 @@ const ba = {
11461
11461
  try {
11462
11462
  const I = await Promise.all(
11463
11463
  c.map(async (N) => {
11464
- const T = N != null ? String(N) : "all", ue = await l.getCountries("", n.locale || "en", N), le = N === 40, we = /* @__PURE__ */ new Set(), be = ue.map((he) => le && he.countryCode ? {
11465
- value: he.countryCode,
11466
- label: `${he.countryCode} – ${he.name}`
11467
- } : { value: he.abbreviation3 || he.abbreviation, label: he.name }).filter((he) => !he.value || we.has(he.value) ? !1 : (we.add(he.value), !0));
11464
+ const T = N != null ? String(N) : "all", ue = await l.getCountries("", n.locale || "en", N), le = N === 40, we = /* @__PURE__ */ new Set(), be = ue.map((ke) => le && ke.countryCode ? {
11465
+ value: ke.countryCode,
11466
+ label: `${ke.countryCode} – ${ke.name}`
11467
+ } : { value: ke.abbreviation3 || ke.abbreviation, label: ke.name }).filter((ke) => !ke.value || we.has(ke.value) ? !1 : (we.add(ke.value), !0));
11468
11468
  return Q.current.add(T), V.current.delete(T), [T, be];
11469
11469
  })
11470
11470
  );
@@ -11537,21 +11537,21 @@ const ba = {
11537
11537
  taxNumber: "",
11538
11538
  ..._,
11539
11539
  ...oe
11540
- }), pe = Object.fromEntries(
11540
+ }), ge = Object.fromEntries(
11541
11541
  Object.entries(L).filter(([c]) => !(c in _) && c !== "externalRefId" && c !== "workflowKey")
11542
- ), [ge, xe] = k({ ...pe }), [me, D] = k(0), [E, O] = k({}), [ve, se] = k(null), [j, ne] = k(!1), Z = (c, v) => Me((C) => ({ ...C, [c]: v })), Ie = (c, v) => xe((C) => ({ ...C, [c]: v })), ze = (c) => !c.conditionalOn || ge[c.conditionalOn] === "true", Ae = P && me < P.length - 1 ? me + 1 : -1, We = P && me > 0 ? me - 1 : -1, ct = (c) => {
11542
+ ), [ye, xe] = k({ ...ge }), [me, D] = k(0), [E, O] = k({}), [he, se] = k(null), [j, ne] = k(!1), Z = (c, v) => Me((C) => ({ ...C, [c]: v })), Ie = (c, v) => xe((C) => ({ ...C, [c]: v })), ze = (c) => !c.conditionalOn || ye[c.conditionalOn] === "true", Ae = P && me < P.length - 1 ? me + 1 : -1, We = P && me > 0 ? me - 1 : -1, ct = (c) => {
11543
11543
  const v = {};
11544
11544
  for (const C of c.fields)
11545
11545
  if (C.isCustom) {
11546
11546
  if (C.customType === "paragraph" || C.customType === "html" || C.customType === "br" || C.customType === "link") continue;
11547
11547
  if (C.required && C.paramName) {
11548
- const I = ge[C.paramName], N = ke(C.displayText, d) || ke(C.label, d) || C.paramName;
11548
+ const I = ye[C.paramName], N = pe(C.displayText, d) || pe(C.label, d) || C.paramName;
11549
11549
  C.customType === "checkbox" || C.customType === "link_checkbox" ? I !== "true" && (v[C.paramName] = d("validation.fieldRequired", { field: N })) : (!I || I.trim() === "") && (v[C.paramName] = d("validation.fieldRequired", { field: N }));
11550
11550
  }
11551
11551
  } else if (C.name) {
11552
11552
  const I = C.name;
11553
11553
  if (B.includes(I) && ut(H[I])) {
11554
- const N = lt[I], T = ke(C.displayText, d) || (N != null && N.translationKey ? d(`fields.${N.translationKey}`) : void 0) || (N == null ? void 0 : N.label) || I;
11554
+ const N = lt[I], T = pe(C.displayText, d) || (N != null && N.translationKey ? d(`fields.${N.translationKey}`) : void 0) || (N == null ? void 0 : N.label) || I;
11555
11555
  v[I] = d("validation.fieldRequired", { field: T });
11556
11556
  }
11557
11557
  }
@@ -11615,7 +11615,7 @@ const ba = {
11615
11615
  if (ze(N))
11616
11616
  for (const T of N.fields) {
11617
11617
  if (!T.isCustom || !T.paramName || T.customType === "paragraph" || T.customType === "html" || T.customType === "br" || T.customType === "link") continue;
11618
- const ue = ge[T.paramName] ?? "";
11618
+ const ue = ye[T.paramName] ?? "";
11619
11619
  let le;
11620
11620
  if (T.customType === "checkbox" || T.customType === "link_checkbox")
11621
11621
  le = ue === "true" ? "yes" : "no";
@@ -11626,7 +11626,7 @@ const ba = {
11626
11626
  for (const [N, T] of Object.entries(_))
11627
11627
  c[N] === void 0 && !ut(T) && (c[N] = T);
11628
11628
  const C = new Set(v.map((N) => N.paramName));
11629
- for (const [N, T] of Object.entries(pe))
11629
+ for (const [N, T] of Object.entries(ge))
11630
11630
  !C.has(N) && T && v.push({ paramName: N, value: T });
11631
11631
  v.length > 0 && (c.applicantAdditionalDatas = v);
11632
11632
  const I = await p(c);
@@ -11649,7 +11649,7 @@ const ba = {
11649
11649
  var Dt;
11650
11650
  const T = lt[c];
11651
11651
  if (!T) return null;
11652
- const ue = B.includes(c), le = E[c], we = ke(C, d) || (T.translationKey ? d(`fields.${T.translationKey}`) : void 0) || T.label, be = c in oe, he = v ?? c, Ze = { required: ue }, Ye = N ? N !== "placeholder" : S, Je = Ye ? we : void 0;
11652
+ const ue = B.includes(c), le = E[c], we = pe(C, d) || (T.translationKey ? d(`fields.${T.translationKey}`) : void 0) || T.label, be = c in oe, ke = v ?? c, Ze = { required: ue }, Ye = N ? N !== "placeholder" : S, Je = Ye ? we : void 0;
11653
11653
  switch (T.type) {
11654
11654
  case "select":
11655
11655
  if (c === "country" || c === "nationality" || c === "taxCountry" || c === "countryOfBirth" || c === "mobileCountryCode") {
@@ -11666,7 +11666,7 @@ const ba = {
11666
11666
  readOnly: be,
11667
11667
  error: le
11668
11668
  },
11669
- he
11669
+ ke
11670
11670
  );
11671
11671
  }
11672
11672
  if (c === "salutation")
@@ -11686,7 +11686,7 @@ const ba = {
11686
11686
  readOnly: be,
11687
11687
  error: le
11688
11688
  },
11689
- he
11689
+ ke
11690
11690
  );
11691
11691
  if (c === "defaultLanguage") {
11692
11692
  const Le = s != null && s.allowedLanguages && s.allowedLanguages.length > 0 ? Mt.filter((rt) => s.allowedLanguages.includes(rt.value)) : Mt;
@@ -11701,7 +11701,7 @@ const ba = {
11701
11701
  readOnly: be,
11702
11702
  error: le
11703
11703
  },
11704
- he
11704
+ ke
11705
11705
  );
11706
11706
  }
11707
11707
  return null;
@@ -11720,7 +11720,7 @@ const ba = {
11720
11720
  disabled: x,
11721
11721
  readOnly: be
11722
11722
  },
11723
- he
11723
+ ke
11724
11724
  );
11725
11725
  }
11726
11726
  return null;
@@ -11737,7 +11737,7 @@ const ba = {
11737
11737
  readOnly: be,
11738
11738
  error: le
11739
11739
  },
11740
- he
11740
+ ke
11741
11741
  );
11742
11742
  case "email":
11743
11743
  return /* @__PURE__ */ i(
@@ -11752,7 +11752,7 @@ const ba = {
11752
11752
  readOnly: be,
11753
11753
  error: le
11754
11754
  },
11755
- he
11755
+ ke
11756
11756
  );
11757
11757
  case "tel":
11758
11758
  return /* @__PURE__ */ i(
@@ -11767,7 +11767,7 @@ const ba = {
11767
11767
  readOnly: be,
11768
11768
  error: le
11769
11769
  },
11770
- he
11770
+ ke
11771
11771
  );
11772
11772
  default:
11773
11773
  return /* @__PURE__ */ i(
@@ -11782,13 +11782,13 @@ const ba = {
11782
11782
  readOnly: be,
11783
11783
  error: le
11784
11784
  },
11785
- he
11785
+ ke
11786
11786
  );
11787
11787
  }
11788
11788
  }, f = (c, v) => {
11789
11789
  const C = c.labelMode ? c.labelMode !== "placeholder" : S;
11790
11790
  if (c.customType === "paragraph") {
11791
- const T = ke(c.displayText, d) || ke(c.label, d) || "";
11791
+ const T = pe(c.displayText, d) || pe(c.label, d) || "";
11792
11792
  return /* @__PURE__ */ i(
11793
11793
  "p",
11794
11794
  {
@@ -11808,14 +11808,14 @@ const ba = {
11808
11808
  return /* @__PURE__ */ i(
11809
11809
  "div",
11810
11810
  {
11811
- dangerouslySetInnerHTML: { __html: ke(c.label, d) || "" }
11811
+ dangerouslySetInnerHTML: { __html: pe(c.label, d) || "" }
11812
11812
  },
11813
11813
  `custom-${v}`
11814
11814
  );
11815
11815
  if (c.customType === "br")
11816
11816
  return /* @__PURE__ */ i("div", { style: { height: "12px" } }, `custom-${v}`);
11817
11817
  if (c.customType === "link") {
11818
- const T = ke(c.displayText, d) || ke(c.label, d) || c.linkText || c.linkUrl || "";
11818
+ const T = pe(c.displayText, d) || pe(c.label, d) || c.linkText || c.linkUrl || "";
11819
11819
  return /* @__PURE__ */ i("div", { className: "metakyc-link-field", children: /* @__PURE__ */ o(
11820
11820
  "a",
11821
11821
  {
@@ -11839,7 +11839,7 @@ const ba = {
11839
11839
  ) }, `custom-${v}`);
11840
11840
  }
11841
11841
  if (!c.paramName) return null;
11842
- const I = E[c.paramName], N = ke(c.displayText, d) || ke(c.label, d) || c.paramName;
11842
+ const I = E[c.paramName], N = pe(c.displayText, d) || pe(c.label, d) || c.paramName;
11843
11843
  if (c.customType === "checkbox")
11844
11844
  return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: [
11845
11845
  /* @__PURE__ */ o(
@@ -11851,7 +11851,7 @@ const ba = {
11851
11851
  /* @__PURE__ */ i(
11852
11852
  Ue,
11853
11853
  {
11854
- checked: ge[c.paramName] === "true",
11854
+ checked: ye[c.paramName] === "true",
11855
11855
  onChange: (T) => Ie(c.paramName, T ? "true" : "false")
11856
11856
  }
11857
11857
  ),
@@ -11882,7 +11882,7 @@ const ba = {
11882
11882
  /* @__PURE__ */ i(
11883
11883
  Ue,
11884
11884
  {
11885
- checked: ge[c.paramName] === "true",
11885
+ checked: ye[c.paramName] === "true",
11886
11886
  onChange: (T) => Ie(c.paramName, T ? "true" : "false")
11887
11887
  }
11888
11888
  ),
@@ -11916,7 +11916,7 @@ const ba = {
11916
11916
  I && /* @__PURE__ */ i("p", { className: "text-xs mt-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: I })
11917
11917
  ] }, `custom-${v}`);
11918
11918
  if (c.customType === "group_checkbox") {
11919
- const T = (ge[c.paramName] || "").split(",").filter(Boolean);
11919
+ const T = (ye[c.paramName] || "").split(",").filter(Boolean);
11920
11920
  return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
11921
11921
  C && /* @__PURE__ */ o(
11922
11922
  "div",
@@ -11930,7 +11930,7 @@ const ba = {
11930
11930
  }
11931
11931
  ),
11932
11932
  /* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((ue) => {
11933
- const le = c.singleSelect ? ge[c.paramName] === ue.value : T.includes(ue.value);
11933
+ const le = c.singleSelect ? ye[c.paramName] === ue.value : T.includes(ue.value);
11934
11934
  return /* @__PURE__ */ o(
11935
11935
  "label",
11936
11936
  {
@@ -11945,7 +11945,7 @@ const ba = {
11945
11945
  if (c.singleSelect)
11946
11946
  Ie(c.paramName, we ? ue.value : "");
11947
11947
  else {
11948
- const be = we ? [...T, ue.value] : T.filter((he) => he !== ue.value);
11948
+ const be = we ? [...T, ue.value] : T.filter((ke) => ke !== ue.value);
11949
11949
  Ie(c.paramName, be.join(","));
11950
11950
  }
11951
11951
  }
@@ -11989,7 +11989,7 @@ const ba = {
11989
11989
  "input",
11990
11990
  {
11991
11991
  type: "radio",
11992
- checked: ge[c.paramName] === T.value,
11992
+ checked: ye[c.paramName] === T.value,
11993
11993
  onChange: () => Ie(c.paramName, T.value),
11994
11994
  name: `radio-group-${c.paramName}-${v}`,
11995
11995
  className: "metakyc-option-input",
@@ -12015,7 +12015,7 @@ const ba = {
12015
12015
  type: "text",
12016
12016
  label: C ? `${N}${c.required ? " *" : ""}` : void 0,
12017
12017
  placeholder: C ? void 0 : N,
12018
- value: ge[c.paramName] || "",
12018
+ value: ye[c.paramName] || "",
12019
12019
  onChange: (T) => Ie(c.paramName, T.target.value),
12020
12020
  required: c.required,
12021
12021
  error: I
@@ -12071,7 +12071,7 @@ const ba = {
12071
12071
  {
12072
12072
  className: "font-semibold text-base",
12073
12073
  style: { color: "var(--metakyc-text-primary, #111827)" },
12074
- children: c.title
12074
+ children: pe(c.title, d)
12075
12075
  }
12076
12076
  ),
12077
12077
  c.subtitle && /* @__PURE__ */ i(
@@ -12079,7 +12079,7 @@ const ba = {
12079
12079
  {
12080
12080
  className: "text-sm mt-0.5",
12081
12081
  style: { color: "var(--metakyc-text-secondary, #6b7280)" },
12082
- children: c.subtitle
12082
+ children: pe(c.subtitle, d)
12083
12083
  }
12084
12084
  ),
12085
12085
  c.description && c.description !== c.subtitle && /* @__PURE__ */ i(
@@ -12087,7 +12087,7 @@ const ba = {
12087
12087
  {
12088
12088
  className: "text-xs mt-1",
12089
12089
  style: { color: "var(--metakyc-text-secondary, #6b7280)" },
12090
- children: c.description
12090
+ children: pe(c.description, d)
12091
12091
  }
12092
12092
  )
12093
12093
  ] }),
@@ -12110,14 +12110,14 @@ const ba = {
12110
12110
  I
12111
12111
  ] })
12112
12112
  ] }),
12113
- (ve || T.length > 0) && /* @__PURE__ */ o("div", { className: "mb-4 p-3 rounded-lg", style: {
12113
+ (he || T.length > 0) && /* @__PURE__ */ o("div", { className: "mb-4 p-3 rounded-lg", style: {
12114
12114
  backgroundColor: "var(--metakyc-danger-bg, color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent))",
12115
12115
  border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 30%, transparent)"
12116
12116
  }, children: [
12117
- ve && /* @__PURE__ */ o("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: [
12117
+ he && /* @__PURE__ */ o("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: [
12118
12118
  /* @__PURE__ */ i("strong", { children: d("common.errorPrefix") }),
12119
12119
  " ",
12120
- ve
12120
+ he
12121
12121
  ] }),
12122
12122
  T.map((ue, le) => /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: ue }, le))
12123
12123
  ] }),
@@ -12154,13 +12154,13 @@ const ba = {
12154
12154
  return /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i("form", { onSubmit: dt, children: /* @__PURE__ */ o(ie, { children: [
12155
12155
  /* @__PURE__ */ i(Ne, { children: /* @__PURE__ */ i(vt, { title: (s == null ? void 0 : s.title) || d("createApplicant.title") }) }),
12156
12156
  /* @__PURE__ */ o(re, { children: [
12157
- ve && /* @__PURE__ */ i("div", { className: "mb-6 p-4 rounded-lg", style: {
12157
+ he && /* @__PURE__ */ i("div", { className: "mb-6 p-4 rounded-lg", style: {
12158
12158
  backgroundColor: "var(--metakyc-danger-bg, color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent))",
12159
12159
  border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 30%, transparent)"
12160
12160
  }, children: /* @__PURE__ */ o("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: [
12161
12161
  /* @__PURE__ */ i("strong", { children: d("common.errorPrefix") }),
12162
12162
  " ",
12163
- ve
12163
+ he
12164
12164
  ] }) }),
12165
12165
  /* @__PURE__ */ i("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children: F.map((c) => /* @__PURE__ */ i("div", { style: { gridColumn: "span 4 / span 4" }, children: Xe(c) }, c)) })
12166
12166
  ] }),
@@ -12216,7 +12216,7 @@ const qa = ({
12216
12216
  F.has(u) && g.add((w = mt[u]) == null ? void 0 : w.countriesType);
12217
12217
  return g.size === 0 && g.add(void 0), Array.from(g);
12218
12218
  }, [B, S]), [K, J] = k({}), [ae, x] = k(!0), A = de(/* @__PURE__ */ new Set()), V = de(/* @__PURE__ */ new Set());
12219
- fe(() => {
12219
+ ve(() => {
12220
12220
  if (!s) return;
12221
12221
  const g = U.filter((u) => {
12222
12222
  const c = u != null ? String(u) : "all";
@@ -12293,28 +12293,28 @@ const qa = ({
12293
12293
  lei: "",
12294
12294
  externalRefId: h,
12295
12295
  ...W
12296
- }), [H, Me] = k({}), [pe, ge] = k(0), [xe, me] = k({}), [D, E] = k(null), [O, ve] = k(!1), se = (g, z) => oe((w) => ({ ...w, [g]: z })), j = (g, z) => Me((w) => ({ ...w, [g]: z })), ne = (g) => !g.conditionalOn || H[g.conditionalOn] === "true", Z = S && pe < S.length - 1 ? pe + 1 : -1, Ie = S && pe > 0 ? pe - 1 : -1, ze = (g) => {
12296
+ }), [H, Me] = k({}), [ge, ye] = k(0), [xe, me] = k({}), [D, E] = k(null), [O, he] = k(!1), se = (g, z) => oe((w) => ({ ...w, [g]: z })), j = (g, z) => Me((w) => ({ ...w, [g]: z })), ne = (g) => !g.conditionalOn || H[g.conditionalOn] === "true", Z = S && ge < S.length - 1 ? ge + 1 : -1, Ie = S && ge > 0 ? ge - 1 : -1, ze = (g) => {
12297
12297
  const z = {};
12298
12298
  for (const w of g.fields)
12299
12299
  if (w.isCustom) {
12300
12300
  if (w.customType === "paragraph" || w.customType === "html" || w.customType === "br" || w.customType === "link") continue;
12301
12301
  if (w.required && w.paramName) {
12302
- const u = H[w.paramName], c = ke(w.displayText, d) || ke(w.label, d) || w.paramName;
12302
+ const u = H[w.paramName], c = pe(w.displayText, d) || pe(w.label, d) || w.paramName;
12303
12303
  w.customType === "checkbox" || w.customType === "link_checkbox" ? u !== "true" && (z[w.paramName] = d("validation.fieldRequired", { field: c })) : (!u || u.trim() === "") && (z[w.paramName] = d("validation.fieldRequired", { field: c }));
12304
12304
  }
12305
12305
  } else if (w.name) {
12306
12306
  const u = w.name;
12307
12307
  if (P.includes(u) && Rt(_[u])) {
12308
- const c = mt[u], v = ke(w.displayText, d) || (c != null && c.translationKey ? d(`fields.${c.translationKey}`) : void 0) || (c == null ? void 0 : c.label) || u;
12308
+ const c = mt[u], v = pe(w.displayText, d) || (c != null && c.translationKey ? d(`fields.${c.translationKey}`) : void 0) || (c == null ? void 0 : c.label) || u;
12309
12309
  z[u] = d("validation.fieldRequired", { field: v });
12310
12310
  }
12311
12311
  }
12312
12312
  return z;
12313
12313
  }, Ae = async () => {
12314
12314
  if (!S) return;
12315
- const g = S[pe];
12315
+ const g = S[ge];
12316
12316
  if (g.conditionalOn && !ne(g)) {
12317
- me({}), Z >= 0 ? ge(Z) : await We();
12317
+ me({}), Z >= 0 ? ye(Z) : await We();
12318
12318
  return;
12319
12319
  }
12320
12320
  const z = ze(g);
@@ -12322,7 +12322,7 @@ const qa = ({
12322
12322
  me(z);
12323
12323
  return;
12324
12324
  }
12325
- me({}), Z >= 0 ? ge(Z) : await We();
12325
+ me({}), Z >= 0 ? ye(Z) : await We();
12326
12326
  }, We = async () => {
12327
12327
  var g;
12328
12328
  if (S) {
@@ -12334,7 +12334,7 @@ const qa = ({
12334
12334
  return;
12335
12335
  }
12336
12336
  }
12337
- ve(!0), E(null);
12337
+ he(!0), E(null);
12338
12338
  try {
12339
12339
  const z = {
12340
12340
  workflowKey: _.workflowKey,
@@ -12393,7 +12393,7 @@ const qa = ({
12393
12393
  } catch (z) {
12394
12394
  console.error("Error creating company applicant:", z), E(z.message || d("createCompany.failedToCreate"));
12395
12395
  } finally {
12396
- ve(!1);
12396
+ he(!1);
12397
12397
  }
12398
12398
  }, ct = async (g) => {
12399
12399
  g.preventDefault();
@@ -12407,7 +12407,7 @@ const qa = ({
12407
12407
  }, it = (g, z, w, u, c) => {
12408
12408
  const v = mt[g];
12409
12409
  if (!v) return null;
12410
- const C = P.includes(g), I = xe[g], N = ke(w, d) || (v.translationKey ? d(`fields.${v.translationKey}`) : void 0) || v.label, T = g in W, ue = z ?? g, le = c ? c !== "placeholder" : q, we = le ? N : void 0;
12410
+ const C = P.includes(g), I = xe[g], N = pe(w, d) || (v.translationKey ? d(`fields.${v.translationKey}`) : void 0) || v.label, T = g in W, ue = z ?? g, le = c ? c !== "placeholder" : q, we = le ? N : void 0;
12411
12411
  switch (v.type) {
12412
12412
  case "select":
12413
12413
  if (g === "countryResidence" || g === "addressCountry") {
@@ -12418,7 +12418,7 @@ const qa = ({
12418
12418
  required: C,
12419
12419
  label: we,
12420
12420
  value: _[g] || "",
12421
- onChange: (he) => se(g, he),
12421
+ onChange: (ke) => se(g, ke),
12422
12422
  options: [{ value: "", label: le ? d("placeholders.selectCountry") : N }, ...be],
12423
12423
  disabled: ae,
12424
12424
  readOnly: T,
@@ -12495,12 +12495,12 @@ const qa = ({
12495
12495
  "p",
12496
12496
  {
12497
12497
  style: { fontSize: "14px", lineHeight: "1.7", margin: 0, color: "var(--metakyc-text-secondary, #6b7280)" },
12498
- dangerouslySetInnerHTML: { __html: ke(g.displayText, d) || ke(g.label, d) || "" }
12498
+ dangerouslySetInnerHTML: { __html: pe(g.displayText, d) || pe(g.label, d) || "" }
12499
12499
  },
12500
12500
  `custom-${z}`
12501
12501
  );
12502
12502
  if (g.customType === "html")
12503
- return /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: ke(g.label, d) || "" } }, `custom-${z}`);
12503
+ return /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: pe(g.label, d) || "" } }, `custom-${z}`);
12504
12504
  if (g.customType === "br")
12505
12505
  return /* @__PURE__ */ i("div", { style: { height: "12px" } }, `custom-${z}`);
12506
12506
  if (g.customType === "link")
@@ -12511,11 +12511,11 @@ const qa = ({
12511
12511
  target: "_blank",
12512
12512
  rel: "noopener noreferrer",
12513
12513
  style: { color: "var(--metakyc-primary, #2563eb)", fontSize: "14px", textDecoration: "underline" },
12514
- children: ke(g.displayText, d) || ke(g.label, d) || g.linkText || g.linkUrl || ""
12514
+ children: pe(g.displayText, d) || pe(g.label, d) || g.linkText || g.linkUrl || ""
12515
12515
  }
12516
12516
  ) }, `custom-${z}`);
12517
12517
  if (!g.paramName) return null;
12518
- const w = xe[g.paramName], u = ke(g.displayText, d) || ke(g.label, d) || g.paramName, c = g.labelMode ? g.labelMode !== "placeholder" : q;
12518
+ const w = xe[g.paramName], u = pe(g.displayText, d) || pe(g.label, d) || g.paramName, c = g.labelMode ? g.labelMode !== "placeholder" : q;
12519
12519
  return g.customType === "checkbox" ? /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: [
12520
12520
  /* @__PURE__ */ o("label", { style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer" }, children: [
12521
12521
  /* @__PURE__ */ i(
@@ -12569,13 +12569,13 @@ const qa = ({
12569
12569
  /* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: d("common.loadingForm") })
12570
12570
  ] }) }) });
12571
12571
  if (S) {
12572
- const g = S[pe] ?? S[0], z = Ie === -1, w = Z === -1, u = S.length, c = ne(g), v = Object.values(xe);
12572
+ const g = S[ge] ?? S[0], z = Ie === -1, w = Z === -1, u = S.length, c = ne(g), v = Object.values(xe);
12573
12573
  return /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ o(ie, { children: [
12574
12574
  /* @__PURE__ */ i(Ne, { children: /* @__PURE__ */ i(vt, { title: (s == null ? void 0 : s.title) || d("createCompany.title") }) }),
12575
12575
  /* @__PURE__ */ o(re, { children: [
12576
12576
  (g.title || g.subtitle) && /* @__PURE__ */ o("div", { className: "mb-4", children: [
12577
- g.title && /* @__PURE__ */ i("h3", { className: "font-semibold text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children: g.title }),
12578
- g.subtitle && /* @__PURE__ */ i("p", { className: "text-sm mt-0.5", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: g.subtitle })
12577
+ g.title && /* @__PURE__ */ i("h3", { className: "font-semibold text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children: pe(g.title, d) }),
12578
+ g.subtitle && /* @__PURE__ */ i("p", { className: "text-sm mt-0.5", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: pe(g.subtitle, d) })
12579
12579
  ] }),
12580
12580
  (D || v.length > 0) && /* @__PURE__ */ o("div", { className: "mb-4 p-3 rounded-lg", style: {
12581
12581
  backgroundColor: "var(--metakyc-danger-bg, color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent))",
@@ -12596,13 +12596,13 @@ const qa = ({
12596
12596
  height: "0.375rem",
12597
12597
  borderRadius: "9999px",
12598
12598
  transition: "all 150ms",
12599
- ...I === pe ? { flex: "1 1 0%", backgroundColor: "var(--metakyc-primary, #2563eb)", opacity: 0.3 } : I < pe ? { width: "2rem", backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { width: "2rem", backgroundColor: "#e5e7eb", opacity: 0.3 }
12599
+ ...I === ge ? { flex: "1 1 0%", backgroundColor: "var(--metakyc-primary, #2563eb)", opacity: 0.3 } : I < ge ? { width: "2rem", backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { width: "2rem", backgroundColor: "#e5e7eb", opacity: 0.3 }
12600
12600
  }
12601
12601
  },
12602
12602
  I
12603
12603
  )),
12604
12604
  /* @__PURE__ */ o("span", { style: { fontSize: "0.75rem", color: "var(--metakyc-text-muted, #9ca3af)", flexShrink: 0 }, children: [
12605
- pe + 1,
12605
+ ge + 1,
12606
12606
  " / ",
12607
12607
  u
12608
12608
  ] })
@@ -12617,7 +12617,7 @@ const qa = ({
12617
12617
  type: "button",
12618
12618
  variant: "outline",
12619
12619
  onClick: () => {
12620
- ge(Ie), me({});
12620
+ ye(Ie), me({});
12621
12621
  },
12622
12622
  disabled: O || m,
12623
12623
  children: d("common.previous")
@@ -13085,7 +13085,7 @@ export {
13085
13085
  Ki as minimalTheme,
13086
13086
  Wi as modernTheme,
13087
13087
  Ea as removeScript,
13088
- ke as resolveDisplayText,
13088
+ pe as resolveDisplayText,
13089
13089
  Rr as saveApplicantId,
13090
13090
  zr as saveWorkflowState,
13091
13091
  Yi as themePresets,