@vpdev2/metakyc-sdk 1.0.76 → 1.0.78
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.cjs +64 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +571 -509
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme/theme-manager.d.ts +6 -0
- package/dist/theme/theme-manager.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,12 +3,12 @@ var kt = (e, t, n) => t in e ? vt(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var re = (e, t, n) => kt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import wt from "axios";
|
|
5
5
|
import * as ot from "react";
|
|
6
|
-
import be, { createContext as Nt, useState as k, useMemo as
|
|
6
|
+
import be, { createContext as Nt, useState as k, useMemo as Ie, useEffect as ne, useContext as St, useRef as ee, useCallback as V, forwardRef as Ge, createElement as nt } from "react";
|
|
7
7
|
import { jsx as r, jsxs as o, Fragment as Qe } from "react/jsx-runtime";
|
|
8
8
|
import Ct, { createPortal as it } from "react-dom";
|
|
9
|
-
import { useForm as
|
|
9
|
+
import { useForm as Et, Controller as Te } from "react-hook-form";
|
|
10
10
|
import { z as Ce } from "zod";
|
|
11
|
-
var J = /* @__PURE__ */ ((e) => (e[e.IdentitySdk = 0] = "IdentitySdk", e[e.RiskScoring = 1] = "RiskScoring", e[e.Questionaries = 2] = "Questionaries", e[e.AdditionalData = 3] = "AdditionalData", e[e.AppropriatenessTest = 4] = "AppropriatenessTest", e[e.UploadDocument = 5] = "UploadDocument", e[e.ManualReview = 6] = "ManualReview", e[e.Overview = 7] = "Overview", e[e.InvestorCategorization = 8] = "InvestorCategorization", e))(J || {}), Je = /* @__PURE__ */ ((e) => (e[e.NotStarted = 0] = "NotStarted", e[e.InProgress = 1] = "InProgress", e[e.Success = 2] = "Success", e[e.PartialSuccess = 3] = "PartialSuccess", e[e.Failed = 4] = "Failed", e[e.Skipped = 5] = "Skipped", e[e.AdminReview = 6] = "AdminReview", e[e.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", e))(Je || {}), ke = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(ke || {}),
|
|
11
|
+
var J = /* @__PURE__ */ ((e) => (e[e.IdentitySdk = 0] = "IdentitySdk", e[e.RiskScoring = 1] = "RiskScoring", e[e.Questionaries = 2] = "Questionaries", e[e.AdditionalData = 3] = "AdditionalData", e[e.AppropriatenessTest = 4] = "AppropriatenessTest", e[e.UploadDocument = 5] = "UploadDocument", e[e.ManualReview = 6] = "ManualReview", e[e.Overview = 7] = "Overview", e[e.InvestorCategorization = 8] = "InvestorCategorization", e))(J || {}), Je = /* @__PURE__ */ ((e) => (e[e.NotStarted = 0] = "NotStarted", e[e.InProgress = 1] = "InProgress", e[e.Success = 2] = "Success", e[e.PartialSuccess = 3] = "PartialSuccess", e[e.Failed = 4] = "Failed", e[e.Skipped = 5] = "Skipped", e[e.AdminReview = 6] = "AdminReview", e[e.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", e))(Je || {}), ke = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(ke || {}), At = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.RepresentativeKYC = 1] = "RepresentativeKYC", e[e.ManualRiskCriteria = 2] = "ManualRiskCriteria", e[e.UploadDocumentReview = 3] = "UploadDocumentReview", e[e.AdminReview = 4] = "AdminReview", e))(At || {}), It = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(It || {}), Le = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Pending = 1] = "Pending", e[e.Approved = 2] = "Approved", e[e.Rejected = 3] = "Rejected", e[e.ResendRequested = 4] = "ResendRequested", e[e.Unknown = 5] = "Unknown", e[e.InProgress = 6] = "InProgress", e))(Le || {}), De = /* @__PURE__ */ ((e) => (e[e.Approved = 0] = "Approved", e[e.Reject = 1] = "Reject", e[e.UnderReview = 2] = "UnderReview", e[e.Closed = 3] = "Closed", e[e.AdminReview = 4] = "AdminReview", e[e.New = 5] = "New", e[e.InProgress = 6] = "InProgress", e))(De || {}), Rt = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(Rt || {}), Pt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(Pt || {}), ve = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(ve || {}), Ft = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(Ft || {}), Ze = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(Ze || {}), Tt = /* @__PURE__ */ ((e) => (e[e.Image = 0] = "Image", e[e.Video = 1] = "Video", e[e.PDF = 2] = "PDF", e[e.OfficePDF = 3] = "OfficePDF", e[e.Custom = 4] = "Custom", e))(Tt || {}), Lt = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(Lt || {}), Dt = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(Dt || {}), Se = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Money = 2] = "Money", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))(Se || {}), Mt = /* @__PURE__ */ ((e) => (e[e.Text = 0] = "Text", e[e.Radio = 1] = "Radio", e[e.Checkbox = 2] = "Checkbox", e[e.Dropdown = 3] = "Dropdown", e[e.Country = 4] = "Country", e))(Mt || {}), Ot = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(Ot || {}), fe = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(fe || {}), $t = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))($t || {});
|
|
12
12
|
const $e = {
|
|
13
13
|
Nationality: 10,
|
|
14
14
|
Address: 20,
|
|
@@ -38,7 +38,7 @@ const $e = {
|
|
|
38
38
|
defaultLanguage: { label: "Default Language", type: "select" },
|
|
39
39
|
educationLevel: { label: "Education Level", type: "text" },
|
|
40
40
|
occupation: { label: "Occupation", type: "text" }
|
|
41
|
-
},
|
|
41
|
+
}, Bt = [
|
|
42
42
|
"firstName",
|
|
43
43
|
"lastName",
|
|
44
44
|
"email",
|
|
@@ -64,7 +64,7 @@ const $e = {
|
|
|
64
64
|
{ value: "NO", label: "Norwegian" }
|
|
65
65
|
];
|
|
66
66
|
var ce = /* @__PURE__ */ ((e) => (e.Default = "default", e.Corporate = "corporate", e.Fintech = "fintech", e.Healthcare = "healthcare", e.Modern = "modern", e.Minimal = "minimal", e))(ce || {});
|
|
67
|
-
const
|
|
67
|
+
const zt = {
|
|
68
68
|
timeout: 3e4,
|
|
69
69
|
retries: 3,
|
|
70
70
|
locale: "en",
|
|
@@ -174,7 +174,7 @@ class Ht {
|
|
|
174
174
|
re(this, "axiosInstance");
|
|
175
175
|
re(this, "endpointBuilder");
|
|
176
176
|
re(this, "config");
|
|
177
|
-
this.config = { ...
|
|
177
|
+
this.config = { ...zt, ...t }, this.endpointBuilder = new _t(this.config.endpoints), this.axiosInstance = wt.create({
|
|
178
178
|
baseURL: this.config.baseUrl,
|
|
179
179
|
timeout: this.config.timeout,
|
|
180
180
|
headers: {
|
|
@@ -1344,10 +1344,10 @@ function ht(e, t) {
|
|
|
1344
1344
|
s.src = e, t && (s.id = t), s.async = !0, s.onload = () => n(), s.onerror = () => a(new Error(`Failed to load script: ${e}`)), document.head.appendChild(s);
|
|
1345
1345
|
});
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function dn(e) {
|
|
1348
1348
|
return !!document.getElementById(e);
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1350
|
+
function un(e) {
|
|
1351
1351
|
const t = document.getElementById(e);
|
|
1352
1352
|
t && t.remove();
|
|
1353
1353
|
}
|
|
@@ -1616,7 +1616,7 @@ class dr {
|
|
|
1616
1616
|
this.sardineContext && (this.sardineContext = null);
|
|
1617
1617
|
}
|
|
1618
1618
|
}
|
|
1619
|
-
class
|
|
1619
|
+
class Be {
|
|
1620
1620
|
/**
|
|
1621
1621
|
* Create a provider instance
|
|
1622
1622
|
*/
|
|
@@ -1666,10 +1666,65 @@ class ze {
|
|
|
1666
1666
|
}
|
|
1667
1667
|
}
|
|
1668
1668
|
}
|
|
1669
|
-
|
|
1669
|
+
function ur(e) {
|
|
1670
|
+
const t = e.inputBg || e.background, n = e.inputText || e.textPrimary, a = e.inputBorder || e.border, s = e.inputBorderFocus || e.primary, l = e.inputPlaceholder || e.textMuted, c = e.surface || e.background;
|
|
1671
|
+
return `
|
|
1672
|
+
/* ── metakyc input overrides (generated by ThemeManager) ── */
|
|
1673
|
+
.metakyc-sdk input:not([type="color"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
|
|
1674
|
+
.metakyc-sdk select,
|
|
1675
|
+
.metakyc-sdk textarea,
|
|
1676
|
+
.metakyc-sdk .metakyc-input,
|
|
1677
|
+
.metakyc-sdk .metakyc-searchable-select-trigger,
|
|
1678
|
+
.metakyc-sdk .metakyc-multiselect-trigger {
|
|
1679
|
+
background-color: ${t} !important;
|
|
1680
|
+
color: ${n} !important;
|
|
1681
|
+
border-color: ${a} !important;
|
|
1682
|
+
}
|
|
1683
|
+
/* Portal dropdown panels (rendered at document.body, outside .metakyc-sdk) */
|
|
1684
|
+
.metakyc-searchable-select-dropdown,
|
|
1685
|
+
.metakyc-multiselect-dropdown {
|
|
1686
|
+
background-color: ${t} !important;
|
|
1687
|
+
border-color: ${a} !important;
|
|
1688
|
+
color: ${n} !important;
|
|
1689
|
+
}
|
|
1690
|
+
/* Search input inside portal */
|
|
1691
|
+
.metakyc-searchable-select-dropdown input,
|
|
1692
|
+
.metakyc-multiselect-dropdown input {
|
|
1693
|
+
background-color: ${t} !important;
|
|
1694
|
+
color: ${n} !important;
|
|
1695
|
+
border-color: ${a} !important;
|
|
1696
|
+
}
|
|
1697
|
+
/* Option hover rows inside portal */
|
|
1698
|
+
.metakyc-searchable-select-dropdown li:hover,
|
|
1699
|
+
.metakyc-multiselect-dropdown li:hover {
|
|
1700
|
+
background-color: ${c} !important;
|
|
1701
|
+
}
|
|
1702
|
+
/* Placeholder text */
|
|
1703
|
+
.metakyc-sdk input::placeholder,
|
|
1704
|
+
.metakyc-sdk textarea::placeholder,
|
|
1705
|
+
.metakyc-searchable-select-dropdown input::placeholder,
|
|
1706
|
+
.metakyc-multiselect-dropdown input::placeholder {
|
|
1707
|
+
color: ${l} !important;
|
|
1708
|
+
opacity: 1 !important;
|
|
1709
|
+
}
|
|
1710
|
+
/* Focus ring */
|
|
1711
|
+
.metakyc-sdk input:not([type="color"]):not([type="checkbox"]):not([type="radio"]):focus,
|
|
1712
|
+
.metakyc-sdk select:focus,
|
|
1713
|
+
.metakyc-sdk textarea:focus,
|
|
1714
|
+
.metakyc-sdk .metakyc-searchable-select-trigger:focus,
|
|
1715
|
+
.metakyc-searchable-select-dropdown input:focus,
|
|
1716
|
+
.metakyc-multiselect-dropdown input:focus {
|
|
1717
|
+
border-color: ${s} !important;
|
|
1718
|
+
outline-color: ${s} !important;
|
|
1719
|
+
box-shadow: 0 0 0 2px ${s}33 !important;
|
|
1720
|
+
}
|
|
1721
|
+
`;
|
|
1722
|
+
}
|
|
1723
|
+
class mr {
|
|
1670
1724
|
constructor(t) {
|
|
1671
1725
|
re(this, "currentTheme", he);
|
|
1672
1726
|
re(this, "customStyleElement", null);
|
|
1727
|
+
re(this, "inputStyleElement", null);
|
|
1673
1728
|
re(this, "container");
|
|
1674
1729
|
this.container = t || document.documentElement;
|
|
1675
1730
|
}
|
|
@@ -1710,8 +1765,8 @@ class ur {
|
|
|
1710
1765
|
"input-placeholder": t.inputPlaceholder || t.textMuted
|
|
1711
1766
|
};
|
|
1712
1767
|
Object.entries(n).forEach(([s, l]) => {
|
|
1713
|
-
this.container.style.setProperty(`--metakyc-${s}`, l);
|
|
1714
|
-
}), (a = this.currentTheme.darkMode) != null && a.colors && this.applyDarkModeColors(this.currentTheme.darkMode.colors);
|
|
1768
|
+
l && this.container.style.setProperty(`--metakyc-${s}`, l);
|
|
1769
|
+
}), this.injectInputColors(t), (a = this.currentTheme.darkMode) != null && a.colors && this.applyDarkModeColors(this.currentTheme.darkMode.colors);
|
|
1715
1770
|
}
|
|
1716
1771
|
/**
|
|
1717
1772
|
* Apply dark mode color overrides
|
|
@@ -1743,6 +1798,13 @@ class ur {
|
|
|
1743
1798
|
this.container.style.setProperty(s, a);
|
|
1744
1799
|
});
|
|
1745
1800
|
}
|
|
1801
|
+
/**
|
|
1802
|
+
* Inject hard-coded CSS rules for inputs so the host/panel CSS cannot override them.
|
|
1803
|
+
* These rules are placed BEFORE any custom CSS so that custom CSS can still override them.
|
|
1804
|
+
*/
|
|
1805
|
+
injectInputColors(t) {
|
|
1806
|
+
this.inputStyleElement && this.inputStyleElement.remove(), this.inputStyleElement = document.createElement("style"), this.inputStyleElement.id = "metakyc-input-colors", this.inputStyleElement.textContent = ur(t), this.customStyleElement && this.customStyleElement.parentNode ? document.head.insertBefore(this.inputStyleElement, this.customStyleElement) : document.head.appendChild(this.inputStyleElement);
|
|
1807
|
+
}
|
|
1746
1808
|
/**
|
|
1747
1809
|
* Inject custom CSS into document
|
|
1748
1810
|
*/
|
|
@@ -1792,7 +1854,7 @@ class ur {
|
|
|
1792
1854
|
* Remove all custom styles
|
|
1793
1855
|
*/
|
|
1794
1856
|
cleanup() {
|
|
1795
|
-
this.customStyleElement && (this.customStyleElement.remove(), this.customStyleElement = null);
|
|
1857
|
+
this.inputStyleElement && (this.inputStyleElement.remove(), this.inputStyleElement = null), this.customStyleElement && (this.customStyleElement.remove(), this.customStyleElement = null);
|
|
1796
1858
|
}
|
|
1797
1859
|
/**
|
|
1798
1860
|
* Convert camelCase to kebab-case
|
|
@@ -1801,9 +1863,9 @@ class ur {
|
|
|
1801
1863
|
return t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1802
1864
|
}
|
|
1803
1865
|
}
|
|
1804
|
-
const
|
|
1805
|
-
const [n, a] = k(null), s = be.useRef(!1), l = be.useRef(!1), c =
|
|
1806
|
-
const h = new Ht(e), m = new Ut(h), v = new jt(h), C = new Kt(h), f = new Wt(h), S = new Yt(h), b = new qt(h), D = new Qt(h), F = new Gt(h), P = new Vt(h), $ = new nr(h), R = new
|
|
1866
|
+
const yt = Nt(null), mn = ({ config: e, children: t }) => {
|
|
1867
|
+
const [n, a] = k(null), s = be.useRef(!1), l = be.useRef(!1), c = Ie(() => {
|
|
1868
|
+
const h = new Ht(e), m = new Ut(h), v = new jt(h), C = new Kt(h), f = new Wt(h), S = new Yt(h), b = new qt(h), D = new Qt(h), F = new Gt(h), P = new Vt(h), $ = new nr(h), R = new mr();
|
|
1807
1869
|
return {
|
|
1808
1870
|
httpClient: h,
|
|
1809
1871
|
applicantService: m,
|
|
@@ -1818,7 +1880,7 @@ const gt = Nt(null), un = ({ config: e, children: t }) => {
|
|
|
1818
1880
|
themeService: $,
|
|
1819
1881
|
themeManager: R
|
|
1820
1882
|
};
|
|
1821
|
-
}, [e]), u =
|
|
1883
|
+
}, [e]), u = Ie(() => ({
|
|
1822
1884
|
config: e,
|
|
1823
1885
|
...c,
|
|
1824
1886
|
currentTheme: n,
|
|
@@ -1854,15 +1916,15 @@ const gt = Nt(null), un = ({ config: e, children: t }) => {
|
|
|
1854
1916
|
}
|
|
1855
1917
|
})(), () => {
|
|
1856
1918
|
c.themeManager.cleanup();
|
|
1857
|
-
}), []), /* @__PURE__ */ r(
|
|
1919
|
+
}), []), /* @__PURE__ */ r(yt.Provider, { value: u, children: t });
|
|
1858
1920
|
};
|
|
1859
|
-
function
|
|
1860
|
-
const e = St(
|
|
1921
|
+
function ye() {
|
|
1922
|
+
const e = St(yt);
|
|
1861
1923
|
if (!e)
|
|
1862
1924
|
throw new Error("useMetaKYC must be used within a MetaKYCProvider");
|
|
1863
1925
|
return e;
|
|
1864
1926
|
}
|
|
1865
|
-
async function
|
|
1927
|
+
async function pr(e) {
|
|
1866
1928
|
return new Promise((t, n) => {
|
|
1867
1929
|
const a = new FileReader();
|
|
1868
1930
|
a.readAsDataURL(e), a.onload = () => {
|
|
@@ -1871,10 +1933,10 @@ async function mr(e) {
|
|
|
1871
1933
|
}, a.onerror = (s) => n(s);
|
|
1872
1934
|
});
|
|
1873
1935
|
}
|
|
1874
|
-
function
|
|
1936
|
+
function pn(e, t) {
|
|
1875
1937
|
return e.size <= t;
|
|
1876
1938
|
}
|
|
1877
|
-
function
|
|
1939
|
+
function hn(e, t) {
|
|
1878
1940
|
return t.split(",").map((a) => a.trim()).some((a) => {
|
|
1879
1941
|
if (a.endsWith("/*")) {
|
|
1880
1942
|
const s = a.slice(0, -2);
|
|
@@ -1888,26 +1950,26 @@ function rt(e) {
|
|
|
1888
1950
|
const t = 1024, n = ["Bytes", "KB", "MB", "GB"], a = Math.floor(Math.log(e) / Math.log(t));
|
|
1889
1951
|
return Math.round(e / Math.pow(t, a) * 100) / 100 + " " + n[a];
|
|
1890
1952
|
}
|
|
1891
|
-
function
|
|
1953
|
+
function yn(e) {
|
|
1892
1954
|
return e;
|
|
1893
1955
|
}
|
|
1894
1956
|
function oe(...e) {
|
|
1895
1957
|
return e.filter(Boolean).join(" ");
|
|
1896
1958
|
}
|
|
1897
|
-
const
|
|
1959
|
+
const ze = {
|
|
1898
1960
|
APPLICANT_ID: "metakyc_applicant_id",
|
|
1899
1961
|
WORKFLOW_STATE: "metakyc_workflow_state"
|
|
1900
1962
|
};
|
|
1901
|
-
function
|
|
1963
|
+
function hr(e) {
|
|
1902
1964
|
try {
|
|
1903
|
-
localStorage.setItem(
|
|
1965
|
+
localStorage.setItem(ze.APPLICANT_ID, e.toString());
|
|
1904
1966
|
} catch (t) {
|
|
1905
1967
|
console.warn("Failed to save applicant ID to storage:", t);
|
|
1906
1968
|
}
|
|
1907
1969
|
}
|
|
1908
|
-
function
|
|
1970
|
+
function yr() {
|
|
1909
1971
|
try {
|
|
1910
|
-
const e = localStorage.getItem(
|
|
1972
|
+
const e = localStorage.getItem(ze.APPLICANT_ID);
|
|
1911
1973
|
return e ? parseInt(e, 10) : null;
|
|
1912
1974
|
} catch (e) {
|
|
1913
1975
|
return console.warn("Failed to retrieve applicant ID from storage:", e), null;
|
|
@@ -1915,43 +1977,43 @@ function hr() {
|
|
|
1915
1977
|
}
|
|
1916
1978
|
function gr() {
|
|
1917
1979
|
try {
|
|
1918
|
-
localStorage.removeItem(
|
|
1980
|
+
localStorage.removeItem(ze.APPLICANT_ID);
|
|
1919
1981
|
} catch (e) {
|
|
1920
1982
|
console.warn("Failed to clear applicant ID from storage:", e);
|
|
1921
1983
|
}
|
|
1922
1984
|
}
|
|
1923
|
-
function
|
|
1985
|
+
function fr(e) {
|
|
1924
1986
|
try {
|
|
1925
|
-
localStorage.setItem(
|
|
1987
|
+
localStorage.setItem(ze.WORKFLOW_STATE, JSON.stringify(e));
|
|
1926
1988
|
} catch (t) {
|
|
1927
1989
|
console.warn("Failed to save workflow state to storage:", t);
|
|
1928
1990
|
}
|
|
1929
1991
|
}
|
|
1930
1992
|
function gn() {
|
|
1931
1993
|
try {
|
|
1932
|
-
const e = localStorage.getItem(
|
|
1994
|
+
const e = localStorage.getItem(ze.WORKFLOW_STATE);
|
|
1933
1995
|
return e ? JSON.parse(e) : null;
|
|
1934
1996
|
} catch (e) {
|
|
1935
1997
|
return console.warn("Failed to retrieve workflow state from storage:", e), null;
|
|
1936
1998
|
}
|
|
1937
1999
|
}
|
|
1938
|
-
function
|
|
2000
|
+
function br() {
|
|
1939
2001
|
try {
|
|
1940
|
-
localStorage.removeItem(
|
|
2002
|
+
localStorage.removeItem(ze.WORKFLOW_STATE);
|
|
1941
2003
|
} catch (e) {
|
|
1942
2004
|
console.warn("Failed to clear workflow state from storage:", e);
|
|
1943
2005
|
}
|
|
1944
2006
|
}
|
|
1945
|
-
function
|
|
1946
|
-
gr(),
|
|
2007
|
+
function fn() {
|
|
2008
|
+
gr(), br();
|
|
1947
2009
|
}
|
|
1948
|
-
function
|
|
1949
|
-
const { createOrchestrator: t } =
|
|
2010
|
+
function xr(e) {
|
|
2011
|
+
const { createOrchestrator: t } = ye(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(null), h = ee(null), m = e || yr();
|
|
1950
2012
|
ne(() => {
|
|
1951
2013
|
h.current || (h.current = t());
|
|
1952
2014
|
}, [t]), ne(() => {
|
|
1953
2015
|
var R;
|
|
1954
|
-
n && m && (
|
|
2016
|
+
n && m && (hr(m), fr({
|
|
1955
2017
|
applicantId: m,
|
|
1956
2018
|
currentStepOrder: (R = n.currentStep) == null ? void 0 : R.order,
|
|
1957
2019
|
status: n.status,
|
|
@@ -2055,8 +2117,8 @@ function br(e) {
|
|
|
2055
2117
|
orchestrator: h.current
|
|
2056
2118
|
};
|
|
2057
2119
|
}
|
|
2058
|
-
function
|
|
2059
|
-
const { questionnaireService: t, applicantService: n } =
|
|
2120
|
+
function vr(e) {
|
|
2121
|
+
const { questionnaireService: t, applicantService: n } = ye(), [a, s] = k(null), [l, c] = k({}), [u, h] = k(!1), [m, v] = k(!1), [C, f] = k(null), S = ee(!1), b = ee(null), D = V(async () => {
|
|
2060
2122
|
var P, $;
|
|
2061
2123
|
if (e) {
|
|
2062
2124
|
if (S.current) {
|
|
@@ -2073,8 +2135,8 @@ function xr(e) {
|
|
|
2073
2135
|
const Y = /* @__PURE__ */ new Map();
|
|
2074
2136
|
for (const N of T.questionnaireResults)
|
|
2075
2137
|
N.question && (($ = N.answers) != null && $.length) && Y.set(N.question.trim().toLowerCase(), N.answers);
|
|
2076
|
-
const X = {},
|
|
2077
|
-
for (const N of
|
|
2138
|
+
const X = {}, I = R.questionGroups.flatMap((N) => N.questions ?? []);
|
|
2139
|
+
for (const N of I) {
|
|
2078
2140
|
const H = N.text.trim().toLowerCase();
|
|
2079
2141
|
Y.has(H) && (X[N.id] = Y.get(H));
|
|
2080
2142
|
}
|
|
@@ -2114,8 +2176,8 @@ function xr(e) {
|
|
|
2114
2176
|
submit: F
|
|
2115
2177
|
};
|
|
2116
2178
|
}
|
|
2117
|
-
function
|
|
2118
|
-
const { uploadDocumentService: t } =
|
|
2179
|
+
function kr(e) {
|
|
2180
|
+
const { uploadDocumentService: t } = ye(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(!1), [h, m] = k(0), [v, C] = k(null), f = ee(!1), S = ee(null), b = V(async () => {
|
|
2119
2181
|
if (e) {
|
|
2120
2182
|
if (f.current) {
|
|
2121
2183
|
console.log("[UploadDocument] Load already in progress, skipping...");
|
|
@@ -2158,8 +2220,8 @@ function vr(e) {
|
|
|
2158
2220
|
submit: D
|
|
2159
2221
|
};
|
|
2160
2222
|
}
|
|
2161
|
-
function
|
|
2162
|
-
const { appropriatenessTestService: t } =
|
|
2223
|
+
function bn(e) {
|
|
2224
|
+
const { appropriatenessTestService: t } = ye(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(!1), [h, m] = k(null), [v, C] = k(null), f = ee(!1), S = ee(null), b = V(async () => {
|
|
2163
2225
|
if (e) {
|
|
2164
2226
|
if (f.current) {
|
|
2165
2227
|
console.log("[AppropriatenessTest] Load already in progress, skipping...");
|
|
@@ -2203,8 +2265,8 @@ function fn(e) {
|
|
|
2203
2265
|
submit: D
|
|
2204
2266
|
};
|
|
2205
2267
|
}
|
|
2206
|
-
function
|
|
2207
|
-
const { overviewService: t } =
|
|
2268
|
+
function wr(e) {
|
|
2269
|
+
const { overviewService: t } = ye(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(!1), [h, m] = k(null), v = ee(!1), C = ee(null), f = V(async () => {
|
|
2208
2270
|
if (e) {
|
|
2209
2271
|
if (v.current) {
|
|
2210
2272
|
console.log("[Overview] Load already in progress, skipping...");
|
|
@@ -2245,8 +2307,8 @@ function kr(e) {
|
|
|
2245
2307
|
passOverview: S
|
|
2246
2308
|
};
|
|
2247
2309
|
}
|
|
2248
|
-
function
|
|
2249
|
-
const { identityService: t } =
|
|
2310
|
+
function Nr(e) {
|
|
2311
|
+
const { identityService: t } = ye(), [n, a] = k(
|
|
2250
2312
|
null
|
|
2251
2313
|
), [s, l] = k(!1), [c, u] = k(null), h = ee(!1), m = V(
|
|
2252
2314
|
async (f, S) => {
|
|
@@ -2331,8 +2393,8 @@ function wr(e) {
|
|
|
2331
2393
|
restartIdentity: C
|
|
2332
2394
|
};
|
|
2333
2395
|
}
|
|
2334
|
-
function
|
|
2335
|
-
const { riskScoringService: t, applicantService: n } =
|
|
2396
|
+
function Sr(e) {
|
|
2397
|
+
const { riskScoringService: t, applicantService: n } = ye(), [a, s] = k(null), [l, c] = k({}), [u, h] = k(!1), [m, v] = k(!1), [C, f] = k(null), [S, b] = k(null), D = ee(!1), F = ee(null), P = V(async () => {
|
|
2336
2398
|
var R;
|
|
2337
2399
|
if (e) {
|
|
2338
2400
|
if (D.current) {
|
|
@@ -2346,15 +2408,15 @@ function Nr(e) {
|
|
|
2346
2408
|
n.getApplicantData(e).catch(() => null)
|
|
2347
2409
|
]);
|
|
2348
2410
|
if (s(T), (R = Y == null ? void 0 : Y.riskScoringResults) != null && R.length) {
|
|
2349
|
-
const X = Y.riskScoringResults[0],
|
|
2411
|
+
const X = Y.riskScoringResults[0], I = {};
|
|
2350
2412
|
for (const N of X.riskCriteriaResults ?? [])
|
|
2351
2413
|
if (N.riskCriteriaId != null && N.answer != null && N.answer !== "") {
|
|
2352
2414
|
const H = [...new Set(
|
|
2353
2415
|
N.answer.split(",").map((W) => W.trim()).filter((W) => W !== "")
|
|
2354
2416
|
)];
|
|
2355
|
-
H.length > 0 && (
|
|
2417
|
+
H.length > 0 && (I[N.riskCriteriaId] = H);
|
|
2356
2418
|
}
|
|
2357
|
-
c(
|
|
2419
|
+
c(I);
|
|
2358
2420
|
}
|
|
2359
2421
|
F.current = e;
|
|
2360
2422
|
} catch (T) {
|
|
@@ -2392,8 +2454,8 @@ function Nr(e) {
|
|
|
2392
2454
|
submit: $
|
|
2393
2455
|
};
|
|
2394
2456
|
}
|
|
2395
|
-
function
|
|
2396
|
-
const { applicantService: e, config: t } =
|
|
2457
|
+
function Cr() {
|
|
2458
|
+
const { applicantService: e, config: t } = ye(), [n, a] = k(!1), [s, l] = k(null), c = ee(!1), u = ee(!1), h = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(S) {
|
|
2397
2459
|
const b = Math.random() * 16 | 0;
|
|
2398
2460
|
return (S === "x" ? b : b & 3 | 8).toString(16);
|
|
2399
2461
|
}), m = V(
|
|
@@ -2605,7 +2667,7 @@ const j = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
|
|
|
2605
2667
|
...n,
|
|
2606
2668
|
children: e
|
|
2607
2669
|
}
|
|
2608
|
-
),
|
|
2670
|
+
), Ae = ({ children: e, variant: t = "default", className: n, ...a }) => /* @__PURE__ */ r(
|
|
2609
2671
|
"span",
|
|
2610
2672
|
{
|
|
2611
2673
|
className: oe(
|
|
@@ -2724,7 +2786,7 @@ const j = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
|
|
|
2724
2786
|
] })
|
|
2725
2787
|
);
|
|
2726
2788
|
st.displayName = "Select";
|
|
2727
|
-
const ct = 280,
|
|
2789
|
+
const ct = 280, Er = ({
|
|
2728
2790
|
label: e,
|
|
2729
2791
|
value: t,
|
|
2730
2792
|
onChange: n,
|
|
@@ -2735,43 +2797,43 @@ const ct = 280, Cr = ({
|
|
|
2735
2797
|
}) => {
|
|
2736
2798
|
const [u, h] = k(!1), [m, v] = k(""), [C, f] = k(null), S = ee(null), b = ee(null), D = ee(null), F = V(() => {
|
|
2737
2799
|
if (!b.current) return null;
|
|
2738
|
-
const
|
|
2739
|
-
return { top: te ?
|
|
2800
|
+
const E = b.current.getBoundingClientRect(), te = window.innerHeight - E.bottom < ct && E.top > ct;
|
|
2801
|
+
return { top: te ? E.top : E.bottom + 4, left: E.left, width: E.width, openUp: te };
|
|
2740
2802
|
}, []), P = V(() => {
|
|
2741
2803
|
if (l) return;
|
|
2742
|
-
const
|
|
2743
|
-
|
|
2804
|
+
const E = F();
|
|
2805
|
+
E && f(E), h(!0);
|
|
2744
2806
|
}, [l, F]), $ = V(() => {
|
|
2745
2807
|
h(!1), v("");
|
|
2746
2808
|
}, []);
|
|
2747
2809
|
ne(() => {
|
|
2748
2810
|
if (!u) return;
|
|
2749
|
-
const
|
|
2750
|
-
var
|
|
2811
|
+
const E = (U) => {
|
|
2812
|
+
var ge, se;
|
|
2751
2813
|
const te = U.target;
|
|
2752
|
-
!((
|
|
2814
|
+
!((ge = S.current) != null && ge.contains(te)) && !((se = D.current) != null && se.contains(te)) && $();
|
|
2753
2815
|
};
|
|
2754
|
-
return document.addEventListener("mousedown",
|
|
2816
|
+
return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
|
|
2755
2817
|
}, [u, $]), ne(() => {
|
|
2756
2818
|
if (!u) return;
|
|
2757
|
-
const
|
|
2819
|
+
const E = () => {
|
|
2758
2820
|
const U = F();
|
|
2759
2821
|
U && f(U);
|
|
2760
2822
|
};
|
|
2761
|
-
return window.addEventListener("scroll",
|
|
2762
|
-
window.removeEventListener("scroll",
|
|
2823
|
+
return window.addEventListener("scroll", E, !0), window.addEventListener("resize", E), () => {
|
|
2824
|
+
window.removeEventListener("scroll", E, !0), window.removeEventListener("resize", E);
|
|
2763
2825
|
};
|
|
2764
2826
|
}, [u, F]);
|
|
2765
2827
|
const R = a.filter(
|
|
2766
|
-
(
|
|
2767
|
-
), T = (
|
|
2768
|
-
l || n(t.includes(
|
|
2769
|
-
}, Y = (
|
|
2770
|
-
U.stopPropagation(), l || n(t.filter((te) => te !==
|
|
2771
|
-
}, X = (
|
|
2828
|
+
(E) => E.label.toLowerCase().includes(m.toLowerCase())
|
|
2829
|
+
), T = (E) => {
|
|
2830
|
+
l || n(t.includes(E) ? t.filter((U) => U !== E) : [...t, E]);
|
|
2831
|
+
}, Y = (E, U) => {
|
|
2832
|
+
U.stopPropagation(), l || n(t.filter((te) => te !== E));
|
|
2833
|
+
}, X = (E) => {
|
|
2772
2834
|
var U;
|
|
2773
|
-
return ((U = a.find((te) => te.value ===
|
|
2774
|
-
},
|
|
2835
|
+
return ((U = a.find((te) => te.value === E)) == null ? void 0 : U.label) || E;
|
|
2836
|
+
}, I = b.current ? getComputedStyle(b.current) : null, N = (I == null ? void 0 : I.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", H = (I == null ? void 0 : I.getPropertyValue("--metakyc-input-border").trim()) || (I == null ? void 0 : I.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", W = (I == null ? void 0 : I.getPropertyValue("--metakyc-input-text").trim()) || (I == null ? void 0 : I.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", w = (I == null ? void 0 : I.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", z = (I == null ? void 0 : I.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", L = (I == null ? void 0 : I.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", O = (I == null ? void 0 : I.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", G = u && C && /* @__PURE__ */ o(
|
|
2775
2837
|
"div",
|
|
2776
2838
|
{
|
|
2777
2839
|
ref: D,
|
|
@@ -2795,10 +2857,10 @@ const ct = 280, Cr = ({
|
|
|
2795
2857
|
{
|
|
2796
2858
|
type: "text",
|
|
2797
2859
|
value: m,
|
|
2798
|
-
onChange: (
|
|
2860
|
+
onChange: (E) => v(E.target.value),
|
|
2799
2861
|
placeholder: "Search...",
|
|
2800
2862
|
autoFocus: !0,
|
|
2801
|
-
onClick: (
|
|
2863
|
+
onClick: (E) => E.stopPropagation(),
|
|
2802
2864
|
className: "metakyc-multiselect-search w-full",
|
|
2803
2865
|
style: {
|
|
2804
2866
|
display: "block",
|
|
@@ -2814,12 +2876,12 @@ const ct = 280, Cr = ({
|
|
|
2814
2876
|
}
|
|
2815
2877
|
}
|
|
2816
2878
|
) }),
|
|
2817
|
-
/* @__PURE__ */ r("ul", { style: { listStyle: "none", margin: 0, padding: "4px 0", maxHeight: "192px", overflowY: "auto" }, children: R.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color: w }, children: "No results" }) : R.map((
|
|
2818
|
-
const U = t.includes(
|
|
2879
|
+
/* @__PURE__ */ r("ul", { style: { listStyle: "none", margin: 0, padding: "4px 0", maxHeight: "192px", overflowY: "auto" }, children: R.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color: w }, children: "No results" }) : R.map((E) => {
|
|
2880
|
+
const U = t.includes(E.value);
|
|
2819
2881
|
return /* @__PURE__ */ o(
|
|
2820
2882
|
"li",
|
|
2821
2883
|
{
|
|
2822
|
-
onClick: () => T(
|
|
2884
|
+
onClick: () => T(E.value),
|
|
2823
2885
|
className: "metakyc-multiselect-option",
|
|
2824
2886
|
style: {
|
|
2825
2887
|
display: "flex",
|
|
@@ -2829,7 +2891,7 @@ const ct = 280, Cr = ({
|
|
|
2829
2891
|
fontSize: "13px",
|
|
2830
2892
|
cursor: "pointer",
|
|
2831
2893
|
backgroundColor: U ? L : "transparent",
|
|
2832
|
-
color: U ?
|
|
2894
|
+
color: U ? z : W,
|
|
2833
2895
|
userSelect: "none"
|
|
2834
2896
|
},
|
|
2835
2897
|
onMouseEnter: (te) => {
|
|
@@ -2845,13 +2907,13 @@ const ct = 280, Cr = ({
|
|
|
2845
2907
|
type: "checkbox",
|
|
2846
2908
|
checked: U,
|
|
2847
2909
|
readOnly: !0,
|
|
2848
|
-
style: { accentColor:
|
|
2910
|
+
style: { accentColor: z, pointerEvents: "none", flexShrink: 0 }
|
|
2849
2911
|
}
|
|
2850
2912
|
),
|
|
2851
|
-
/* @__PURE__ */ r("span", { children:
|
|
2913
|
+
/* @__PURE__ */ r("span", { children: E.label })
|
|
2852
2914
|
]
|
|
2853
2915
|
},
|
|
2854
|
-
|
|
2916
|
+
E.value
|
|
2855
2917
|
);
|
|
2856
2918
|
}) }),
|
|
2857
2919
|
t.length > 0 && /* @__PURE__ */ r("div", { style: { padding: "6px 12px", borderTop: `1px solid ${H}` }, children: /* @__PURE__ */ o(
|
|
@@ -2908,7 +2970,7 @@ const ct = 280, Cr = ({
|
|
|
2908
2970
|
style: { color: "var(--metakyc-text-secondary, #9ca3af)" },
|
|
2909
2971
|
children: s
|
|
2910
2972
|
}
|
|
2911
|
-
) : /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((
|
|
2973
|
+
) : /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((E) => /* @__PURE__ */ o(
|
|
2912
2974
|
"span",
|
|
2913
2975
|
{
|
|
2914
2976
|
className: "metakyc-multiselect-chip inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium",
|
|
@@ -2917,12 +2979,12 @@ const ct = 280, Cr = ({
|
|
|
2917
2979
|
color: "var(--metakyc-primary, #2563eb)"
|
|
2918
2980
|
},
|
|
2919
2981
|
children: [
|
|
2920
|
-
X(
|
|
2982
|
+
X(E),
|
|
2921
2983
|
!l && /* @__PURE__ */ r(
|
|
2922
2984
|
"button",
|
|
2923
2985
|
{
|
|
2924
2986
|
type: "button",
|
|
2925
|
-
onClick: (U) => Y(
|
|
2987
|
+
onClick: (U) => Y(E, U),
|
|
2926
2988
|
className: "metakyc-multiselect-chip-remove",
|
|
2927
2989
|
style: {
|
|
2928
2990
|
background: "transparent",
|
|
@@ -2948,7 +3010,7 @@ const ct = 280, Cr = ({
|
|
|
2948
3010
|
)
|
|
2949
3011
|
]
|
|
2950
3012
|
},
|
|
2951
|
-
|
|
3013
|
+
E
|
|
2952
3014
|
)) }),
|
|
2953
3015
|
/* @__PURE__ */ r(
|
|
2954
3016
|
"span",
|
|
@@ -2991,13 +3053,13 @@ const ct = 280, Cr = ({
|
|
|
2991
3053
|
M && D(M), C(!0);
|
|
2992
3054
|
}, [u, T]), X = V(() => {
|
|
2993
3055
|
C(!1), S("");
|
|
2994
|
-
}, []),
|
|
3056
|
+
}, []), I = () => v ? X() : Y();
|
|
2995
3057
|
ne(() => {
|
|
2996
3058
|
if (!v) return;
|
|
2997
3059
|
const M = (Z) => {
|
|
2998
|
-
var
|
|
3060
|
+
var Ee, Pe;
|
|
2999
3061
|
const ie = Z.target;
|
|
3000
|
-
!((
|
|
3062
|
+
!((Ee = F.current) != null && Ee.contains(ie)) && !((Pe = $.current) != null && Pe.contains(ie)) && X();
|
|
3001
3063
|
};
|
|
3002
3064
|
return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
|
|
3003
3065
|
}, [v, X]), ne(() => {
|
|
@@ -3019,7 +3081,7 @@ const ct = 280, Cr = ({
|
|
|
3019
3081
|
(M) => M.label.toLowerCase().includes(f.toLowerCase()) || M.value.toLowerCase().includes(f.toLowerCase())
|
|
3020
3082
|
), H = (se = a.find((M) => M.value === l)) == null ? void 0 : se.label, W = (M, Z) => {
|
|
3021
3083
|
u || Z || (c(M), X());
|
|
3022
|
-
}, w = P.current ? getComputedStyle(P.current) : null,
|
|
3084
|
+
}, w = P.current ? getComputedStyle(P.current) : null, z = (w == null ? void 0 : w.getPropertyValue("--metakyc-input-bg").trim()) || "#ffffff", L = (w == null ? void 0 : w.getPropertyValue("--metakyc-input-border").trim()) || (w == null ? void 0 : w.getPropertyValue("--metakyc-border").trim()) || "#d1d5db", O = (w == null ? void 0 : w.getPropertyValue("--metakyc-input-text").trim()) || (w == null ? void 0 : w.getPropertyValue("--metakyc-text-primary").trim()) || "#111827", G = (w == null ? void 0 : w.getPropertyValue("--metakyc-text-secondary").trim()) || "#6b7280", E = (w == null ? void 0 : w.getPropertyValue("--metakyc-primary").trim()) || "#2563eb", U = (w == null ? void 0 : w.getPropertyValue("--metakyc-primary-light").trim()) || "#eff6ff", te = (w == null ? void 0 : w.getPropertyValue("--metakyc-hover-bg").trim()) || "#f9fafb", ge = v && b && /* @__PURE__ */ o(
|
|
3023
3085
|
"div",
|
|
3024
3086
|
{
|
|
3025
3087
|
ref: $,
|
|
@@ -3034,7 +3096,7 @@ const ct = 280, Cr = ({
|
|
|
3034
3096
|
borderRadius: "8px",
|
|
3035
3097
|
boxShadow: "0 4px 16px rgba(0,0,0,0.18)",
|
|
3036
3098
|
border: `1px solid ${L}`,
|
|
3037
|
-
backgroundColor:
|
|
3099
|
+
backgroundColor: z,
|
|
3038
3100
|
overflow: "hidden"
|
|
3039
3101
|
},
|
|
3040
3102
|
children: [
|
|
@@ -3055,7 +3117,7 @@ const ct = 280, Cr = ({
|
|
|
3055
3117
|
fontSize: "13px",
|
|
3056
3118
|
borderRadius: "6px",
|
|
3057
3119
|
border: `1px solid ${L}`,
|
|
3058
|
-
backgroundColor:
|
|
3120
|
+
backgroundColor: z,
|
|
3059
3121
|
color: O,
|
|
3060
3122
|
outline: "none",
|
|
3061
3123
|
boxSizing: "border-box"
|
|
@@ -3085,7 +3147,7 @@ const ct = 280, Cr = ({
|
|
|
3085
3147
|
cursor: M.disabled ? "not-allowed" : "pointer",
|
|
3086
3148
|
opacity: M.disabled ? 0.4 : 1,
|
|
3087
3149
|
backgroundColor: Z ? U : "transparent",
|
|
3088
|
-
color: Z ?
|
|
3150
|
+
color: Z ? E : O,
|
|
3089
3151
|
userSelect: "none"
|
|
3090
3152
|
},
|
|
3091
3153
|
onMouseEnter: (ie) => {
|
|
@@ -3127,9 +3189,9 @@ const ct = 280, Cr = ({
|
|
|
3127
3189
|
ref: P,
|
|
3128
3190
|
role: "button",
|
|
3129
3191
|
tabIndex: u ? -1 : 0,
|
|
3130
|
-
onClick:
|
|
3192
|
+
onClick: I,
|
|
3131
3193
|
onKeyDown: (M) => {
|
|
3132
|
-
(M.key === "Enter" || M.key === " ") && (M.preventDefault(),
|
|
3194
|
+
(M.key === "Enter" || M.key === " ") && (M.preventDefault(), I()), M.key === "Escape" && X();
|
|
3133
3195
|
},
|
|
3134
3196
|
className: oe(
|
|
3135
3197
|
"metakyc-searchable-select-trigger",
|
|
@@ -3159,7 +3221,7 @@ const ct = 280, Cr = ({
|
|
|
3159
3221
|
]
|
|
3160
3222
|
}
|
|
3161
3223
|
),
|
|
3162
|
-
typeof document < "u" &&
|
|
3224
|
+
typeof document < "u" && ge ? it(ge, document.body) : null,
|
|
3163
3225
|
t && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-error, #ef4444)" }, children: t }),
|
|
3164
3226
|
!t && n && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n })
|
|
3165
3227
|
]
|
|
@@ -3362,21 +3424,21 @@ Ir.displayName = "PhoneInput";
|
|
|
3362
3424
|
* This source code is licensed under the ISC license.
|
|
3363
3425
|
* See the LICENSE file in the root directory of this source tree.
|
|
3364
3426
|
*/
|
|
3365
|
-
const
|
|
3427
|
+
const gt = (...e) => e.filter((t, n, a) => !!t && t.trim() !== "" && a.indexOf(t) === n).join(" ").trim();
|
|
3366
3428
|
/**
|
|
3367
3429
|
* @license lucide-react v0.574.0 - ISC
|
|
3368
3430
|
*
|
|
3369
3431
|
* This source code is licensed under the ISC license.
|
|
3370
3432
|
* See the LICENSE file in the root directory of this source tree.
|
|
3371
3433
|
*/
|
|
3372
|
-
const
|
|
3434
|
+
const Rr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
3373
3435
|
/**
|
|
3374
3436
|
* @license lucide-react v0.574.0 - ISC
|
|
3375
3437
|
*
|
|
3376
3438
|
* This source code is licensed under the ISC license.
|
|
3377
3439
|
* See the LICENSE file in the root directory of this source tree.
|
|
3378
3440
|
*/
|
|
3379
|
-
const
|
|
3441
|
+
const Pr = (e) => e.replace(
|
|
3380
3442
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
3381
3443
|
(t, n, a) => a ? a.toUpperCase() : n.toLowerCase()
|
|
3382
3444
|
);
|
|
@@ -3387,7 +3449,7 @@ const Rr = (e) => e.replace(
|
|
|
3387
3449
|
* See the LICENSE file in the root directory of this source tree.
|
|
3388
3450
|
*/
|
|
3389
3451
|
const ut = (e) => {
|
|
3390
|
-
const t =
|
|
3452
|
+
const t = Pr(e);
|
|
3391
3453
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
3392
3454
|
};
|
|
3393
3455
|
/**
|
|
@@ -3396,7 +3458,7 @@ const ut = (e) => {
|
|
|
3396
3458
|
* This source code is licensed under the ISC license.
|
|
3397
3459
|
* See the LICENSE file in the root directory of this source tree.
|
|
3398
3460
|
*/
|
|
3399
|
-
var
|
|
3461
|
+
var Fr = {
|
|
3400
3462
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3401
3463
|
width: 24,
|
|
3402
3464
|
height: 24,
|
|
@@ -3413,7 +3475,7 @@ var Pr = {
|
|
|
3413
3475
|
* This source code is licensed under the ISC license.
|
|
3414
3476
|
* See the LICENSE file in the root directory of this source tree.
|
|
3415
3477
|
*/
|
|
3416
|
-
const
|
|
3478
|
+
const Tr = (e) => {
|
|
3417
3479
|
for (const t in e)
|
|
3418
3480
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
3419
3481
|
return !0;
|
|
@@ -3425,7 +3487,7 @@ const Fr = (e) => {
|
|
|
3425
3487
|
* This source code is licensed under the ISC license.
|
|
3426
3488
|
* See the LICENSE file in the root directory of this source tree.
|
|
3427
3489
|
*/
|
|
3428
|
-
const
|
|
3490
|
+
const Lr = Ge(
|
|
3429
3491
|
({
|
|
3430
3492
|
color: e = "currentColor",
|
|
3431
3493
|
size: t = 24,
|
|
@@ -3439,13 +3501,13 @@ const Tr = Ge(
|
|
|
3439
3501
|
"svg",
|
|
3440
3502
|
{
|
|
3441
3503
|
ref: h,
|
|
3442
|
-
...
|
|
3504
|
+
...Fr,
|
|
3443
3505
|
width: t,
|
|
3444
3506
|
height: t,
|
|
3445
3507
|
stroke: e,
|
|
3446
3508
|
strokeWidth: a ? Number(n) * 24 / Number(t) : n,
|
|
3447
|
-
className:
|
|
3448
|
-
...!l && !
|
|
3509
|
+
className: gt("lucide", s),
|
|
3510
|
+
...!l && !Tr(u) && { "aria-hidden": "true" },
|
|
3449
3511
|
...u
|
|
3450
3512
|
},
|
|
3451
3513
|
[
|
|
@@ -3462,11 +3524,11 @@ const Tr = Ge(
|
|
|
3462
3524
|
*/
|
|
3463
3525
|
const ft = (e, t) => {
|
|
3464
3526
|
const n = Ge(
|
|
3465
|
-
({ className: a, ...s }, l) => nt(
|
|
3527
|
+
({ className: a, ...s }, l) => nt(Lr, {
|
|
3466
3528
|
ref: l,
|
|
3467
3529
|
iconNode: t,
|
|
3468
|
-
className:
|
|
3469
|
-
`lucide-${
|
|
3530
|
+
className: gt(
|
|
3531
|
+
`lucide-${Rr(ut(e))}`,
|
|
3470
3532
|
`lucide-${e}`,
|
|
3471
3533
|
a
|
|
3472
3534
|
),
|
|
@@ -3481,15 +3543,15 @@ const ft = (e, t) => {
|
|
|
3481
3543
|
* This source code is licensed under the ISC license.
|
|
3482
3544
|
* See the LICENSE file in the root directory of this source tree.
|
|
3483
3545
|
*/
|
|
3484
|
-
const
|
|
3546
|
+
const Dr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], bt = ft("chevron-left", Dr);
|
|
3485
3547
|
/**
|
|
3486
3548
|
* @license lucide-react v0.574.0 - ISC
|
|
3487
3549
|
*
|
|
3488
3550
|
* This source code is licensed under the ISC license.
|
|
3489
3551
|
* See the LICENSE file in the root directory of this source tree.
|
|
3490
3552
|
*/
|
|
3491
|
-
const
|
|
3492
|
-
function
|
|
3553
|
+
const Mr = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], xt = ft("chevron-right", Mr);
|
|
3554
|
+
function Or(e, t) {
|
|
3493
3555
|
const n = !t || t.length === 0 || t.every((a) => !a || !a.trim());
|
|
3494
3556
|
if (e.isRequired && n)
|
|
3495
3557
|
return e.errorMessage || "This field is required";
|
|
@@ -3518,7 +3580,7 @@ function Mr(e, t) {
|
|
|
3518
3580
|
}
|
|
3519
3581
|
return null;
|
|
3520
3582
|
}
|
|
3521
|
-
function
|
|
3583
|
+
function $r(e) {
|
|
3522
3584
|
const t = e.flatMap(
|
|
3523
3585
|
(a, s) => (a.questions ?? []).map((l, c) => ({ question: l, groupIndex: s, qIdx: c }))
|
|
3524
3586
|
), n = /* @__PURE__ */ new Map();
|
|
@@ -3528,38 +3590,38 @@ function Or(e) {
|
|
|
3528
3590
|
}
|
|
3529
3591
|
return Array.from(n.entries()).sort(([a], [s]) => a - s).map(([, a]) => a);
|
|
3530
3592
|
}
|
|
3531
|
-
const
|
|
3593
|
+
const Br = ({
|
|
3532
3594
|
applicantId: e,
|
|
3533
3595
|
onComplete: t,
|
|
3534
3596
|
onBack: n
|
|
3535
3597
|
}) => {
|
|
3536
|
-
const { questionnaire: a, initialAnswers: s, isLoading: l, isSubmitting: c, error: u, submit: h } =
|
|
3598
|
+
const { questionnaire: a, initialAnswers: s, isLoading: l, isSubmitting: c, error: u, submit: h } = vr(e), [m, v] = k({}), [C, f] = k({}), [S, b] = k(0);
|
|
3537
3599
|
be.useEffect(() => {
|
|
3538
3600
|
s && Object.keys(s).length > 0 && Object.keys(m).length === 0 && v(s);
|
|
3539
3601
|
}, [s]);
|
|
3540
|
-
const D =
|
|
3541
|
-
() => a ?
|
|
3602
|
+
const D = Ie(
|
|
3603
|
+
() => a ? $r(a.questionGroups) : [],
|
|
3542
3604
|
[a]
|
|
3543
|
-
), F = S === D.length - 1, P = D[S] ?? [], $ = V((
|
|
3544
|
-
v((H) => ({ ...H, [
|
|
3605
|
+
), F = S === D.length - 1, P = D[S] ?? [], $ = V((I, N) => {
|
|
3606
|
+
v((H) => ({ ...H, [I]: N })), f((H) => {
|
|
3545
3607
|
const W = { ...H };
|
|
3546
|
-
return delete W[
|
|
3608
|
+
return delete W[I], W;
|
|
3547
3609
|
});
|
|
3548
3610
|
}, []), R = V(() => {
|
|
3549
|
-
const
|
|
3611
|
+
const I = {};
|
|
3550
3612
|
for (const { question: N } of P) {
|
|
3551
|
-
const H =
|
|
3552
|
-
H && (
|
|
3613
|
+
const H = Or(N, m[N.id] ?? []);
|
|
3614
|
+
H && (I[N.id] = H);
|
|
3553
3615
|
}
|
|
3554
|
-
return f((N) => ({ ...N, ...
|
|
3616
|
+
return f((N) => ({ ...N, ...I })), Object.keys(I).length === 0;
|
|
3555
3617
|
}, [P, m]), T = () => {
|
|
3556
|
-
R() && b((
|
|
3618
|
+
R() && b((I) => I + 1);
|
|
3557
3619
|
}, Y = () => {
|
|
3558
|
-
S > 0 ? b((
|
|
3620
|
+
S > 0 ? b((I) => I - 1) : n == null || n();
|
|
3559
3621
|
}, X = async () => {
|
|
3560
3622
|
if (!(!R() || !a))
|
|
3561
3623
|
try {
|
|
3562
|
-
const
|
|
3624
|
+
const I = a.questionGroups.flatMap(
|
|
3563
3625
|
(H) => (H.questions ?? []).map((W) => ({
|
|
3564
3626
|
questionId: W.id,
|
|
3565
3627
|
values: m[W.id] ?? []
|
|
@@ -3567,11 +3629,11 @@ const $r = ({
|
|
|
3567
3629
|
), N = {
|
|
3568
3630
|
applicantId: e,
|
|
3569
3631
|
questionnarieId: a.id,
|
|
3570
|
-
questionResults:
|
|
3632
|
+
questionResults: I
|
|
3571
3633
|
};
|
|
3572
3634
|
await h(N), t == null || t();
|
|
3573
|
-
} catch (
|
|
3574
|
-
console.error("Questionnaire submit error:",
|
|
3635
|
+
} catch (I) {
|
|
3636
|
+
console.error("Questionnaire submit error:", I);
|
|
3575
3637
|
}
|
|
3576
3638
|
};
|
|
3577
3639
|
return l ? /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(we, { className: "my-8" }) }) }) : u ? /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
@@ -3588,7 +3650,7 @@ const $r = ({
|
|
|
3588
3650
|
" of ",
|
|
3589
3651
|
D.length
|
|
3590
3652
|
] }),
|
|
3591
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: D.map((
|
|
3653
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: D.map((I, N) => /* @__PURE__ */ r(
|
|
3592
3654
|
"div",
|
|
3593
3655
|
{
|
|
3594
3656
|
className: "rounded-full transition-all duration-200",
|
|
@@ -3602,15 +3664,15 @@ const $r = ({
|
|
|
3602
3664
|
)) })
|
|
3603
3665
|
] })
|
|
3604
3666
|
] }),
|
|
3605
|
-
/* @__PURE__ */ r(K, { className: "space-y-6", children: P.map(({ question:
|
|
3667
|
+
/* @__PURE__ */ r(K, { className: "space-y-6", children: P.map(({ question: I }) => /* @__PURE__ */ r(
|
|
3606
3668
|
zr,
|
|
3607
3669
|
{
|
|
3608
|
-
question:
|
|
3609
|
-
value: m[
|
|
3610
|
-
error: C[
|
|
3611
|
-
onChange: (N) => $(
|
|
3670
|
+
question: I,
|
|
3671
|
+
value: m[I.id] ?? [],
|
|
3672
|
+
error: C[I.id],
|
|
3673
|
+
onChange: (N) => $(I.id, N)
|
|
3612
3674
|
},
|
|
3613
|
-
|
|
3675
|
+
I.id
|
|
3614
3676
|
)) }),
|
|
3615
3677
|
/* @__PURE__ */ o(me, { className: "flex items-center justify-between", children: [
|
|
3616
3678
|
/* @__PURE__ */ o(
|
|
@@ -3756,19 +3818,19 @@ const $r = ({
|
|
|
3756
3818
|
] }),
|
|
3757
3819
|
n && l === "text" && null
|
|
3758
3820
|
] });
|
|
3759
|
-
},
|
|
3821
|
+
}, _r = ({
|
|
3760
3822
|
applicantId: e,
|
|
3761
3823
|
onComplete: t,
|
|
3762
3824
|
onBack: n
|
|
3763
3825
|
}) => {
|
|
3764
|
-
const { uploadDocument: a, isLoading: s, isSubmitting: l, error: c, submit: u } =
|
|
3826
|
+
const { uploadDocument: a, isLoading: s, isSubmitting: l, error: c, submit: u } = kr(e), [h, m] = k({}), v = async (C) => {
|
|
3765
3827
|
if (C.preventDefault(), !a) return;
|
|
3766
3828
|
const f = await Promise.all(
|
|
3767
3829
|
a.uploadDocumentFiles.map(async (b) => {
|
|
3768
3830
|
const D = h[b.id] || [], F = await Promise.all(
|
|
3769
3831
|
D.map(async (P) => ({
|
|
3770
3832
|
fileName: P.name,
|
|
3771
|
-
fileData: await
|
|
3833
|
+
fileData: await pr(P)
|
|
3772
3834
|
}))
|
|
3773
3835
|
);
|
|
3774
3836
|
return {
|
|
@@ -3810,8 +3872,8 @@ const $r = ({
|
|
|
3810
3872
|
/* @__PURE__ */ r(Q, { type: "submit", isLoading: l, children: "Continue" })
|
|
3811
3873
|
] })
|
|
3812
3874
|
] }) }) : null;
|
|
3813
|
-
},
|
|
3814
|
-
const { overview: a, isLoading: s, isSubmitting: l, error: c, passOverview: u } =
|
|
3875
|
+
}, Hr = ({ applicantId: e, onComplete: t, onBack: n }) => {
|
|
3876
|
+
const { overview: a, isLoading: s, isSubmitting: l, error: c, passOverview: u } = wr(e), h = async () => {
|
|
3815
3877
|
await u(), t == null || t();
|
|
3816
3878
|
};
|
|
3817
3879
|
return s ? /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(we, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
@@ -3847,7 +3909,7 @@ const $r = ({
|
|
|
3847
3909
|
] })
|
|
3848
3910
|
] }) : null;
|
|
3849
3911
|
};
|
|
3850
|
-
function
|
|
3912
|
+
function Ur(e) {
|
|
3851
3913
|
const t = (e ?? "en").toLowerCase().replace("_", "-");
|
|
3852
3914
|
try {
|
|
3853
3915
|
return Intl.NumberFormat.supportedLocalesOf([t]), t;
|
|
@@ -3855,11 +3917,11 @@ function Hr(e) {
|
|
|
3855
3917
|
return "en";
|
|
3856
3918
|
}
|
|
3857
3919
|
}
|
|
3858
|
-
function
|
|
3920
|
+
function jr(e) {
|
|
3859
3921
|
return e.valueDataType === Se.Money && Array.isArray(e.defaultValues) && e.defaultValues.length > 0;
|
|
3860
3922
|
}
|
|
3861
|
-
function
|
|
3862
|
-
const n = new Intl.NumberFormat(
|
|
3923
|
+
function Kr(e, t) {
|
|
3924
|
+
const n = new Intl.NumberFormat(Ur(t), {
|
|
3863
3925
|
minimumFractionDigits: 0,
|
|
3864
3926
|
maximumFractionDigits: 2
|
|
3865
3927
|
});
|
|
@@ -3868,7 +3930,7 @@ function jr(e, t) {
|
|
|
3868
3930
|
return isNaN(s) ? a : n.format(s);
|
|
3869
3931
|
});
|
|
3870
3932
|
}
|
|
3871
|
-
function
|
|
3933
|
+
function Wr(e, t) {
|
|
3872
3934
|
const n = !t || t.length === 0 || t.every((a) => !a || !a.trim());
|
|
3873
3935
|
if (e.isRequired && n)
|
|
3874
3936
|
return e.errorMessage || `${e.displayName} is required`;
|
|
@@ -3898,50 +3960,50 @@ function Kr(e, t) {
|
|
|
3898
3960
|
}
|
|
3899
3961
|
return null;
|
|
3900
3962
|
}
|
|
3901
|
-
function
|
|
3963
|
+
function Yr(e) {
|
|
3902
3964
|
const t = /* @__PURE__ */ new Map();
|
|
3903
3965
|
return e.forEach((n, a) => {
|
|
3904
3966
|
const s = n.pageNumber != null && n.pageNumber > 0 ? n.pageNumber : 1;
|
|
3905
3967
|
t.has(s) || t.set(s, []), t.get(s).push({ criterion: n, idx: a });
|
|
3906
3968
|
}), Array.from(t.entries()).sort(([n], [a]) => n - a).map(([, n]) => n);
|
|
3907
3969
|
}
|
|
3908
|
-
function
|
|
3970
|
+
function qr(e) {
|
|
3909
3971
|
return e.builtInType === 1 ? "country" : !e.defaultValues || e.defaultValues.length === 0 ? "text" : e.multipleValue ? "checkbox" : "radio";
|
|
3910
3972
|
}
|
|
3911
|
-
const
|
|
3973
|
+
const Qr = ({
|
|
3912
3974
|
applicantId: e,
|
|
3913
3975
|
onComplete: t,
|
|
3914
3976
|
onBack: n
|
|
3915
3977
|
}) => {
|
|
3916
|
-
const { config: a } =
|
|
3978
|
+
const { config: a } = ye(), s = a.locale ?? "en", { criteria: l, initialAnswers: c, isLoading: u, isSubmitting: h, error: m, submit: v } = Sr(e), [C, f] = k({}), [S, b] = k({}), [D, F] = k(0), [P, $] = k(!1);
|
|
3917
3979
|
be.useEffect(() => {
|
|
3918
3980
|
c && Object.keys(c).length > 0 && Object.keys(C).length === 0 && f(c);
|
|
3919
3981
|
}, [c]);
|
|
3920
|
-
const R =
|
|
3921
|
-
() => l && l.length > 0 ?
|
|
3982
|
+
const R = Ie(
|
|
3983
|
+
() => l && l.length > 0 ? Yr(l) : [],
|
|
3922
3984
|
[l]
|
|
3923
3985
|
), T = D === R.length - 1, Y = R[D] ?? [];
|
|
3924
3986
|
be.useEffect(() => {
|
|
3925
3987
|
!u && l && l.length === 0 && !P && !h && ($(!0), v({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
|
|
3926
3988
|
}, [u, l, P, h, v, e, t]);
|
|
3927
|
-
const X = V((w,
|
|
3928
|
-
f((L) => ({ ...L, [w]:
|
|
3989
|
+
const X = V((w, z) => {
|
|
3990
|
+
f((L) => ({ ...L, [w]: z })), b((L) => {
|
|
3929
3991
|
const O = { ...L };
|
|
3930
3992
|
return delete O[w], O;
|
|
3931
3993
|
});
|
|
3932
|
-
}, []),
|
|
3994
|
+
}, []), I = V(() => {
|
|
3933
3995
|
const w = {};
|
|
3934
|
-
for (const { criterion:
|
|
3935
|
-
const L =
|
|
3936
|
-
L && (w[
|
|
3996
|
+
for (const { criterion: z } of Y) {
|
|
3997
|
+
const L = Wr(z, C[z.id] ?? []);
|
|
3998
|
+
L && (w[z.id] = L);
|
|
3937
3999
|
}
|
|
3938
|
-
return b((
|
|
4000
|
+
return b((z) => ({ ...z, ...w })), Object.keys(w).length === 0;
|
|
3939
4001
|
}, [Y, C]), N = () => {
|
|
3940
|
-
|
|
4002
|
+
I() && F((w) => w + 1);
|
|
3941
4003
|
}, H = () => {
|
|
3942
4004
|
D > 0 ? F((w) => w - 1) : n == null || n();
|
|
3943
4005
|
}, W = async () => {
|
|
3944
|
-
if (!(!
|
|
4006
|
+
if (!(!I() || !l))
|
|
3945
4007
|
try {
|
|
3946
4008
|
const w = l.map((L) => {
|
|
3947
4009
|
const O = (C[L.id] ?? []).filter((G) => G && G.trim());
|
|
@@ -3972,28 +4034,28 @@ const qr = ({
|
|
|
3972
4034
|
" of ",
|
|
3973
4035
|
R.length
|
|
3974
4036
|
] }),
|
|
3975
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: R.map((w,
|
|
4037
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: R.map((w, z) => /* @__PURE__ */ r(
|
|
3976
4038
|
"div",
|
|
3977
4039
|
{
|
|
3978
4040
|
className: "rounded-full transition-all duration-200",
|
|
3979
4041
|
style: {
|
|
3980
4042
|
height: "6px",
|
|
3981
|
-
width:
|
|
3982
|
-
backgroundColor:
|
|
4043
|
+
width: z === D ? "20px" : "6px",
|
|
4044
|
+
backgroundColor: z <= D ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
|
|
3983
4045
|
}
|
|
3984
4046
|
},
|
|
3985
|
-
|
|
4047
|
+
z
|
|
3986
4048
|
)) })
|
|
3987
4049
|
] })
|
|
3988
4050
|
] }),
|
|
3989
4051
|
/* @__PURE__ */ r(K, { className: "space-y-6", children: Y.map(({ criterion: w }) => /* @__PURE__ */ r(
|
|
3990
|
-
|
|
4052
|
+
Gr,
|
|
3991
4053
|
{
|
|
3992
4054
|
criterion: w,
|
|
3993
4055
|
value: C[w.id] ?? [],
|
|
3994
4056
|
error: S[w.id],
|
|
3995
4057
|
locale: s,
|
|
3996
|
-
onChange: (
|
|
4058
|
+
onChange: (z) => X(w.id, z)
|
|
3997
4059
|
},
|
|
3998
4060
|
w.id
|
|
3999
4061
|
)) }),
|
|
@@ -4026,8 +4088,8 @@ const qr = ({
|
|
|
4026
4088
|
] }),
|
|
4027
4089
|
m && /* @__PURE__ */ r("div", { className: "mx-6 mb-4 p-3 bg-red-50 border border-red-200 rounded", children: /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: m.message }) })
|
|
4028
4090
|
] }) : null;
|
|
4029
|
-
},
|
|
4030
|
-
const l =
|
|
4091
|
+
}, Gr = ({ criterion: e, value: t, error: n, locale: a, onChange: s }) => {
|
|
4092
|
+
const l = qr(e), c = e.valueDataType === Se.Integer || e.valueDataType === Se.Money || e.valueDataType === Se.DigitOnly, u = jr(e), h = (m) => u ? Kr(m, a) : m;
|
|
4031
4093
|
return /* @__PURE__ */ o("div", { className: "space-y-2", children: [
|
|
4032
4094
|
/* @__PURE__ */ o("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
|
|
4033
4095
|
e.displayName,
|
|
@@ -4143,12 +4205,12 @@ const qr = ({
|
|
|
4143
4205
|
}
|
|
4144
4206
|
)
|
|
4145
4207
|
] });
|
|
4146
|
-
},
|
|
4208
|
+
}, Vr = ({
|
|
4147
4209
|
applicantId: e,
|
|
4148
4210
|
onComplete: t,
|
|
4149
4211
|
onBack: n
|
|
4150
4212
|
}) => {
|
|
4151
|
-
const { investorCategorizationService: a } =
|
|
4213
|
+
const { investorCategorizationService: a } = ye(), [s, l] = k(null), [c, u] = k(!1), [h, m] = k(null);
|
|
4152
4214
|
return /* @__PURE__ */ r("form", { onSubmit: async (C) => {
|
|
4153
4215
|
if (C.preventDefault(), s === null) {
|
|
4154
4216
|
m("Please select an investor type");
|
|
@@ -4281,12 +4343,12 @@ const qr = ({
|
|
|
4281
4343
|
)
|
|
4282
4344
|
] })
|
|
4283
4345
|
] }) });
|
|
4284
|
-
},
|
|
4346
|
+
}, Jr = ({
|
|
4285
4347
|
applicantId: e,
|
|
4286
4348
|
onComplete: t,
|
|
4287
4349
|
onBack: n
|
|
4288
4350
|
}) => {
|
|
4289
|
-
const { appropriatenessTestService: a } =
|
|
4351
|
+
const { appropriatenessTestService: a } = ye(), [s, l] = k(null), [c, u] = k(!0), [h, m] = k(!1), [v, C] = k(null), [f, S] = k({}), [b, D] = k(0), [F, P] = k(!1), [$, R] = k(!1), [T, Y] = k(0);
|
|
4290
4352
|
ne(() => {
|
|
4291
4353
|
(async () => {
|
|
4292
4354
|
try {
|
|
@@ -4306,11 +4368,11 @@ const qr = ({
|
|
|
4306
4368
|
const X = (L) => {
|
|
4307
4369
|
const O = L.split(":").map(Number);
|
|
4308
4370
|
if (O.length === 3) {
|
|
4309
|
-
const [G,
|
|
4310
|
-
return G * 3600 +
|
|
4371
|
+
const [G, E, U] = O;
|
|
4372
|
+
return G * 3600 + E * 60 + U;
|
|
4311
4373
|
}
|
|
4312
4374
|
return 0;
|
|
4313
|
-
},
|
|
4375
|
+
}, I = (L) => {
|
|
4314
4376
|
const O = Math.floor(L / 60), G = L % 60;
|
|
4315
4377
|
return `${O.toString().padStart(2, "0")}:${G.toString().padStart(2, "0")}`;
|
|
4316
4378
|
};
|
|
@@ -4348,9 +4410,9 @@ const qr = ({
|
|
|
4348
4410
|
m(!0), C(null);
|
|
4349
4411
|
try {
|
|
4350
4412
|
const O = s.appropriatenessQuestions.map(
|
|
4351
|
-
(
|
|
4352
|
-
appropriatenessQuestionId:
|
|
4353
|
-
value: f[
|
|
4413
|
+
(E) => ({
|
|
4414
|
+
appropriatenessQuestionId: E.id,
|
|
4415
|
+
value: f[E.id] || ""
|
|
4354
4416
|
// Empty string if not answered
|
|
4355
4417
|
})
|
|
4356
4418
|
), G = {
|
|
@@ -4360,14 +4422,14 @@ const qr = ({
|
|
|
4360
4422
|
};
|
|
4361
4423
|
console.log("Submitting appropriateness test:", G);
|
|
4362
4424
|
try {
|
|
4363
|
-
const
|
|
4364
|
-
console.log("Appropriateness test result:",
|
|
4365
|
-
} catch (
|
|
4366
|
-
if (
|
|
4367
|
-
const U =
|
|
4425
|
+
const E = await a.fillAppropriatenessTest(G);
|
|
4426
|
+
console.log("Appropriateness test result:", E), E.message && (E.message.toLowerCase().includes("pass") || E.message.toLowerCase().includes("success") || E.message.toLowerCase().includes("congratulations")) ? t == null || t() : (C(E.message || "Test completed. Please check the result."), P(!1), R(!1), S({}), setTimeout(() => w(), 1e3));
|
|
4427
|
+
} catch (E) {
|
|
4428
|
+
if (E.code === 400 && E.message) {
|
|
4429
|
+
const U = E.message;
|
|
4368
4430
|
console.log("Test failed:", U), C(U), P(!1), R(!1), S({}), setTimeout(() => w(), 1500);
|
|
4369
4431
|
} else
|
|
4370
|
-
throw
|
|
4432
|
+
throw E;
|
|
4371
4433
|
}
|
|
4372
4434
|
} catch (O) {
|
|
4373
4435
|
console.error("Error submitting appropriateness test:", O), C(O.message || "Failed to submit test. Please try again."), P(!1), R(!1), S({});
|
|
@@ -4406,13 +4468,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4406
4468
|
] }),
|
|
4407
4469
|
/* @__PURE__ */ o(K, { className: "py-12 text-center", children: [
|
|
4408
4470
|
/* @__PURE__ */ o("div", { className: "mb-6", children: [
|
|
4409
|
-
/* @__PURE__ */ r("div", { className: "text-6xl font-bold text-primary-500 mb-2", children:
|
|
4471
|
+
/* @__PURE__ */ r("div", { className: "text-6xl font-bold text-primary-500 mb-2", children: I(T) }),
|
|
4410
4472
|
/* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait before attempting the test again" })
|
|
4411
4473
|
] }),
|
|
4412
4474
|
v && /* @__PURE__ */ r("div", { className: "mt-4 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ r("p", { className: "text-red-600 dark:text-red-400 text-sm", children: v }) })
|
|
4413
4475
|
] })
|
|
4414
4476
|
] });
|
|
4415
|
-
const
|
|
4477
|
+
const z = s.testAllowedMaxTry - s.totalFailedTries;
|
|
4416
4478
|
return F ? /* @__PURE__ */ r("form", { onSubmit: W, children: /* @__PURE__ */ o(j, { children: [
|
|
4417
4479
|
/* @__PURE__ */ r(ue, { children: /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
|
|
4418
4480
|
/* @__PURE__ */ o("div", { children: [
|
|
@@ -4424,7 +4486,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4424
4486
|
"div",
|
|
4425
4487
|
{
|
|
4426
4488
|
className: `text-3xl font-bold ${b <= 60 ? "text-danger-500" : "text-primary-500"}`,
|
|
4427
|
-
children:
|
|
4489
|
+
children: I(b)
|
|
4428
4490
|
}
|
|
4429
4491
|
),
|
|
4430
4492
|
/* @__PURE__ */ r("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Time Remaining" })
|
|
@@ -4432,16 +4494,16 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4432
4494
|
] }) }),
|
|
4433
4495
|
/* @__PURE__ */ o(K, { className: "space-y-6", children: [
|
|
4434
4496
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between mb-4", children: [
|
|
4435
|
-
/* @__PURE__ */ o(
|
|
4497
|
+
/* @__PURE__ */ o(Ae, { variant: "info", children: [
|
|
4436
4498
|
"Question ",
|
|
4437
4499
|
Object.keys(f).length,
|
|
4438
4500
|
" of ",
|
|
4439
4501
|
s.totalQuestionCount
|
|
4440
4502
|
] }),
|
|
4441
|
-
/* @__PURE__ */ o(
|
|
4442
|
-
|
|
4503
|
+
/* @__PURE__ */ o(Ae, { variant: z > 1 ? "success" : "warning", children: [
|
|
4504
|
+
z,
|
|
4443
4505
|
" attempt",
|
|
4444
|
-
|
|
4506
|
+
z !== 1 ? "s" : "",
|
|
4445
4507
|
" remaining"
|
|
4446
4508
|
] })
|
|
4447
4509
|
] }),
|
|
@@ -4458,7 +4520,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4458
4520
|
L.groupName && /* @__PURE__ */ r("span", { className: "ml-2 text-xs text-gray-500 dark:text-gray-400", children: L.groupName }),
|
|
4459
4521
|
/* @__PURE__ */ r("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mt-2", children: L.question })
|
|
4460
4522
|
] }),
|
|
4461
|
-
/* @__PURE__ */ r("div", { className: "space-y-2", children: L.answers.map((G,
|
|
4523
|
+
/* @__PURE__ */ r("div", { className: "space-y-2", children: L.answers.map((G, E) => /* @__PURE__ */ o(
|
|
4462
4524
|
"label",
|
|
4463
4525
|
{
|
|
4464
4526
|
className: `
|
|
@@ -4481,7 +4543,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4481
4543
|
/* @__PURE__ */ r("span", { className: "ml-3 text-gray-700 dark:text-gray-300", children: G })
|
|
4482
4544
|
]
|
|
4483
4545
|
},
|
|
4484
|
-
|
|
4546
|
+
E
|
|
4485
4547
|
)) })
|
|
4486
4548
|
]
|
|
4487
4549
|
},
|
|
@@ -4528,19 +4590,19 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4528
4590
|
/* @__PURE__ */ o("div", { className: "space-y-4 mb-6", children: [
|
|
4529
4591
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4530
4592
|
/* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Total Questions:" }),
|
|
4531
|
-
/* @__PURE__ */ r(
|
|
4593
|
+
/* @__PURE__ */ r(Ae, { variant: "info", children: s.totalQuestionCount })
|
|
4532
4594
|
] }),
|
|
4533
4595
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4534
4596
|
/* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Time Limit:" }),
|
|
4535
|
-
/* @__PURE__ */ r(
|
|
4597
|
+
/* @__PURE__ */ r(Ae, { variant: "info", children: I(s.testDurationSec) })
|
|
4536
4598
|
] }),
|
|
4537
4599
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4538
4600
|
/* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Correct Answers Required:" }),
|
|
4539
|
-
/* @__PURE__ */ r(
|
|
4601
|
+
/* @__PURE__ */ r(Ae, { variant: "info", children: s.testCorrectAnswerPassLimit })
|
|
4540
4602
|
] }),
|
|
4541
4603
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4542
4604
|
/* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Attempts Remaining:" }),
|
|
4543
|
-
/* @__PURE__ */ r(
|
|
4605
|
+
/* @__PURE__ */ r(Ae, { variant: z > 1 ? "success" : "warning", children: z })
|
|
4544
4606
|
] })
|
|
4545
4607
|
] }),
|
|
4546
4608
|
v && /* @__PURE__ */ r("div", { className: "mb-4 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ o("p", { className: "text-red-600 dark:text-red-400 text-sm", children: [
|
|
@@ -4548,7 +4610,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4548
4610
|
" ",
|
|
4549
4611
|
v
|
|
4550
4612
|
] }) }),
|
|
4551
|
-
|
|
4613
|
+
z <= 0 && /* @__PURE__ */ r("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ r("p", { className: "text-red-600 dark:text-red-400", children: "You have used all your attempts. Please contact support for assistance." }) })
|
|
4552
4614
|
] }),
|
|
4553
4615
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
4554
4616
|
n && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: n, children: "Back" }),
|
|
@@ -4557,21 +4619,21 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4557
4619
|
{
|
|
4558
4620
|
type: "button",
|
|
4559
4621
|
onClick: N,
|
|
4560
|
-
disabled:
|
|
4622
|
+
disabled: z <= 0,
|
|
4561
4623
|
children: "Start Test"
|
|
4562
4624
|
}
|
|
4563
4625
|
)
|
|
4564
4626
|
] })
|
|
4565
4627
|
] });
|
|
4566
|
-
},
|
|
4628
|
+
}, Zr = ({
|
|
4567
4629
|
applicantId: e,
|
|
4568
4630
|
onComplete: t,
|
|
4569
4631
|
onBack: n
|
|
4570
4632
|
}) => {
|
|
4571
4633
|
var _e, He, Ue, je;
|
|
4572
|
-
const { applicantService: a, baseInformationService: s, config: l, currentTheme: c } =
|
|
4634
|
+
const { applicantService: a, baseInformationService: s, config: l, currentTheme: c } = ye(), { identityData: u, provider: h, token: m, isLoading: v, error: C, requestIdentity: f, restartIdentity: S } = Nr(e), [b, D] = k(null), [F, P] = k(null), [$, R] = k([]), [T, Y] = k([]), [X, I] = k(!0), [N, H] = k(!1), [W, w] = k(null), [z, L] = k(!1), O = be.useRef(!1), [G, E] = k({}), [U, te] = k({}), ge = c != null && c.reviewPageFields && c.reviewPageFields.length > 0 ? c.reviewPageFields[0] : null, se = !!(c != null && c.reviewPageDisabled), M = ee(!1);
|
|
4573
4635
|
M.current = se;
|
|
4574
|
-
const Z =
|
|
4636
|
+
const Z = Et({
|
|
4575
4637
|
defaultValues: {
|
|
4576
4638
|
street: "",
|
|
4577
4639
|
streetNumber: "",
|
|
@@ -4584,54 +4646,54 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4584
4646
|
});
|
|
4585
4647
|
ne(() => {
|
|
4586
4648
|
if (se) {
|
|
4587
|
-
O.current || (O.current = !0, f().then(() => H(!0)).catch((
|
|
4649
|
+
O.current || (O.current = !0, f().then(() => H(!0)).catch((y) => console.error("[Identity] Auto-request failed:", y)).finally(() => I(!1)));
|
|
4588
4650
|
return;
|
|
4589
4651
|
}
|
|
4590
4652
|
(async () => {
|
|
4591
4653
|
try {
|
|
4592
|
-
const [
|
|
4654
|
+
const [y, x, d] = await Promise.all([
|
|
4593
4655
|
a.getApplicantData(e),
|
|
4594
4656
|
s.getCountries("", "en"),
|
|
4595
4657
|
s.getCountries("", "en", 40)
|
|
4596
4658
|
// CountriesType.PhoneNumber
|
|
4597
4659
|
]);
|
|
4598
|
-
P(
|
|
4599
|
-
const p = /* @__PURE__ */ new Set(),
|
|
4600
|
-
R(
|
|
4601
|
-
const
|
|
4660
|
+
P(y);
|
|
4661
|
+
const p = /* @__PURE__ */ new Set(), A = x.map((q) => ({ value: q.abbreviation3 || q.abbreviation, label: q.name })).filter((q) => !q.value || p.has(q.value) ? !1 : (p.add(q.value), !0));
|
|
4662
|
+
R(A);
|
|
4663
|
+
const B = /* @__PURE__ */ new Set(), _ = d.filter((q) => q.countryCode).map((q) => ({ value: q.countryCode, label: `${q.countryCode} – ${q.name}` })).filter((q) => B.has(q.value) ? !1 : (B.add(q.value), !0));
|
|
4602
4664
|
Y(_);
|
|
4603
|
-
const
|
|
4604
|
-
if (
|
|
4605
|
-
firstName: (
|
|
4606
|
-
lastName: (
|
|
4607
|
-
email: (
|
|
4608
|
-
dateOfBirth: (
|
|
4609
|
-
title: (
|
|
4610
|
-
salutation: (
|
|
4611
|
-
phonenumber: (
|
|
4612
|
-
mobileCountryCode: (
|
|
4613
|
-
street: (
|
|
4614
|
-
streetNumber: (
|
|
4615
|
-
city: (
|
|
4616
|
-
zip: (
|
|
4617
|
-
country: (
|
|
4618
|
-
nationality: (
|
|
4619
|
-
taxCountry: (
|
|
4620
|
-
countryOfBirth: (
|
|
4621
|
-
placeOfBirth: (
|
|
4622
|
-
educationLevel: (
|
|
4623
|
-
occupation: (
|
|
4624
|
-
taxNumber: (
|
|
4625
|
-
defaultLanguage: (
|
|
4665
|
+
const g = y.applicantRequestData;
|
|
4666
|
+
if (E({
|
|
4667
|
+
firstName: (g == null ? void 0 : g.firstName) || "",
|
|
4668
|
+
lastName: (g == null ? void 0 : g.lastName) || "",
|
|
4669
|
+
email: (g == null ? void 0 : g.email) || "",
|
|
4670
|
+
dateOfBirth: (g == null ? void 0 : g.dateOfBirth) || "",
|
|
4671
|
+
title: (g == null ? void 0 : g.title) || "",
|
|
4672
|
+
salutation: (g == null ? void 0 : g.salutation) || "",
|
|
4673
|
+
phonenumber: (g == null ? void 0 : g.phonenumber) || "",
|
|
4674
|
+
mobileCountryCode: (g == null ? void 0 : g.mobileCountryCode) || "",
|
|
4675
|
+
street: (g == null ? void 0 : g.street) || "",
|
|
4676
|
+
streetNumber: (g == null ? void 0 : g.streetNumber) || "",
|
|
4677
|
+
city: (g == null ? void 0 : g.city) || "",
|
|
4678
|
+
zip: (g == null ? void 0 : g.zip) || "",
|
|
4679
|
+
country: (g == null ? void 0 : g.country) || "",
|
|
4680
|
+
nationality: (g == null ? void 0 : g.nationality) || "",
|
|
4681
|
+
taxCountry: (g == null ? void 0 : g.taxCountry) || "",
|
|
4682
|
+
countryOfBirth: (g == null ? void 0 : g.countryOfBirth) || "",
|
|
4683
|
+
placeOfBirth: (g == null ? void 0 : g.placeOfBirth) || "",
|
|
4684
|
+
educationLevel: (g == null ? void 0 : g.educationLevel) || "",
|
|
4685
|
+
occupation: (g == null ? void 0 : g.occupation) || "",
|
|
4686
|
+
taxNumber: (g == null ? void 0 : g.taxNumber) || "",
|
|
4687
|
+
defaultLanguage: (g == null ? void 0 : g.defaultLanguage) || ""
|
|
4626
4688
|
}), Z.reset({
|
|
4627
|
-
street: (
|
|
4628
|
-
streetNumber: (
|
|
4629
|
-
city: (
|
|
4630
|
-
zip: (
|
|
4631
|
-
country: (
|
|
4632
|
-
nationality: (
|
|
4633
|
-
phonenumber: (
|
|
4634
|
-
}),
|
|
4689
|
+
street: (g == null ? void 0 : g.street) || "",
|
|
4690
|
+
streetNumber: (g == null ? void 0 : g.streetNumber) || "",
|
|
4691
|
+
city: (g == null ? void 0 : g.city) || "",
|
|
4692
|
+
zip: (g == null ? void 0 : g.zip) || "",
|
|
4693
|
+
country: (g == null ? void 0 : g.country) || "",
|
|
4694
|
+
nationality: (g == null ? void 0 : g.nationality) || "",
|
|
4695
|
+
phonenumber: (g == null ? void 0 : g.phonenumber) || ""
|
|
4696
|
+
}), y.kycRecords && y.kycRecords.length > 0 && y.kycRecords[0].providerTokenObject !== null && !O.current && M.current) {
|
|
4635
4697
|
console.log("[Identity] Review page disabled + existing identity — auto-requesting..."), O.current = !0;
|
|
4636
4698
|
try {
|
|
4637
4699
|
await f(), H(!0);
|
|
@@ -4639,10 +4701,10 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4639
4701
|
console.error("[Identity] Auto-request failed:", q);
|
|
4640
4702
|
}
|
|
4641
4703
|
}
|
|
4642
|
-
} catch (
|
|
4643
|
-
console.error("Error loading applicant data:",
|
|
4704
|
+
} catch (y) {
|
|
4705
|
+
console.error("Error loading applicant data:", y);
|
|
4644
4706
|
} finally {
|
|
4645
|
-
|
|
4707
|
+
I(!1);
|
|
4646
4708
|
}
|
|
4647
4709
|
})();
|
|
4648
4710
|
}, [e]), ne(() => {
|
|
@@ -4658,8 +4720,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4658
4720
|
}
|
|
4659
4721
|
if (m.url)
|
|
4660
4722
|
try {
|
|
4661
|
-
const
|
|
4662
|
-
if (
|
|
4723
|
+
const y = new URL(m.url).toString().toLowerCase();
|
|
4724
|
+
if (y.includes("expired") || y.includes("invalid") || y.includes("error")) {
|
|
4663
4725
|
console.warn("[Identity] Token URL indicates expiration"), L(!0), w("Your verification link has expired. Please restart.");
|
|
4664
4726
|
return;
|
|
4665
4727
|
}
|
|
@@ -4672,7 +4734,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4672
4734
|
}
|
|
4673
4735
|
}
|
|
4674
4736
|
}, [m]), ne(() => {
|
|
4675
|
-
if (h !== null && m && !b && N && !
|
|
4737
|
+
if (h !== null && m && !b && N && !z) {
|
|
4676
4738
|
const i = h;
|
|
4677
4739
|
if (m.url) {
|
|
4678
4740
|
console.log("[Identity] Loading provider URL for user verification:", m.url), w(null);
|
|
@@ -4680,44 +4742,44 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4680
4742
|
if (new URL(m.url), i === ve.SardinAI) {
|
|
4681
4743
|
console.log("[SardinAI] Initializing Risk SDK in background...");
|
|
4682
4744
|
try {
|
|
4683
|
-
const
|
|
4684
|
-
|
|
4745
|
+
const y = Be.parseProviderConfig(h, m, l);
|
|
4746
|
+
Be.createProvider(h, y).initialize().then(() => {
|
|
4685
4747
|
console.log("[SardinAI] Risk SDK initialized successfully in background");
|
|
4686
4748
|
}).catch((d) => {
|
|
4687
4749
|
console.warn("[SardinAI] Risk SDK initialization failed (non-blocking):", d);
|
|
4688
4750
|
});
|
|
4689
|
-
} catch (
|
|
4690
|
-
console.warn("[SardinAI] Risk SDK setup failed (non-blocking):",
|
|
4751
|
+
} catch (y) {
|
|
4752
|
+
console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", y);
|
|
4691
4753
|
}
|
|
4692
4754
|
}
|
|
4693
4755
|
D({ type: "url", url: m.url });
|
|
4694
|
-
} catch (
|
|
4695
|
-
console.error("[Identity] Invalid URL:",
|
|
4756
|
+
} catch (y) {
|
|
4757
|
+
console.error("[Identity] Invalid URL:", y), w("Invalid verification URL. Please restart."), L(!0);
|
|
4696
4758
|
}
|
|
4697
4759
|
return;
|
|
4698
4760
|
}
|
|
4699
4761
|
if (i === ve.SardinAI) {
|
|
4700
4762
|
console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), w(null);
|
|
4701
4763
|
try {
|
|
4702
|
-
const
|
|
4764
|
+
const y = Be.parseProviderConfig(h, m, l), x = Be.createProvider(h, y);
|
|
4703
4765
|
x.initialize().then(() => {
|
|
4704
4766
|
console.log("[SardinAI] Risk SDK initialized successfully"), D(x), setTimeout(() => {
|
|
4705
4767
|
t == null || t();
|
|
4706
4768
|
}, 2e3);
|
|
4707
4769
|
}).catch((d) => {
|
|
4708
|
-
var
|
|
4770
|
+
var A;
|
|
4709
4771
|
console.error("[SardinAI] Failed to initialize:", d);
|
|
4710
|
-
const p = ((
|
|
4772
|
+
const p = ((A = d.message) == null ? void 0 : A.toLowerCase()) || "";
|
|
4711
4773
|
p.includes("expired") || p.includes("invalid") || p.includes("401") || p.includes("400") ? (L(!0), w("Session expired or invalid. Please restart verification.")) : w(`Failed to initialize: ${d.message}`);
|
|
4712
4774
|
});
|
|
4713
|
-
} catch (
|
|
4714
|
-
console.error("[SardinAI] Error creating provider:",
|
|
4775
|
+
} catch (y) {
|
|
4776
|
+
console.error("[SardinAI] Error creating provider:", y), w(`Configuration error: ${y.message}`);
|
|
4715
4777
|
}
|
|
4716
4778
|
return;
|
|
4717
4779
|
}
|
|
4718
4780
|
try {
|
|
4719
4781
|
w(null);
|
|
4720
|
-
const
|
|
4782
|
+
const y = Be.parseProviderConfig(h, m, l), x = Be.createProvider(h, y);
|
|
4721
4783
|
i === ve.Sumsub ? (x.initialize("identity-container").catch((d) => {
|
|
4722
4784
|
var p;
|
|
4723
4785
|
console.error("[Sumsub] Initialization error:", d), w(`Failed to initialize: ${d.message}`), (p = d.message) != null && p.toLowerCase().includes("expired") && L(!0);
|
|
@@ -4726,8 +4788,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4726
4788
|
})) : i === ve.Onfido && x.initialize("identity-container").catch((d) => {
|
|
4727
4789
|
console.error("[Onfido] Initialization error:", d), w(`Failed to initialize: ${d.message}`);
|
|
4728
4790
|
}), D(x);
|
|
4729
|
-
} catch (
|
|
4730
|
-
console.error("[Identity] Provider setup error:",
|
|
4791
|
+
} catch (y) {
|
|
4792
|
+
console.error("[Identity] Provider setup error:", y), w(`Setup error: ${y.message}`);
|
|
4731
4793
|
}
|
|
4732
4794
|
}
|
|
4733
4795
|
return () => {
|
|
@@ -4738,14 +4800,14 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4738
4800
|
console.error("[Identity] Error destroying provider:", i);
|
|
4739
4801
|
}
|
|
4740
4802
|
};
|
|
4741
|
-
}, [h, m, b, N, t,
|
|
4803
|
+
}, [h, m, b, N, t, z]);
|
|
4742
4804
|
const ie = async () => {
|
|
4743
4805
|
try {
|
|
4744
4806
|
w(null), L(!1), await f(), H(!0);
|
|
4745
4807
|
} catch (i) {
|
|
4746
4808
|
console.error("Error starting identity verification:", i);
|
|
4747
4809
|
}
|
|
4748
|
-
},
|
|
4810
|
+
}, Ee = async () => {
|
|
4749
4811
|
try {
|
|
4750
4812
|
w(null), L(!1), D(null), console.log("[Identity] Restarting verification..."), await S(), H(!0);
|
|
4751
4813
|
} catch (i) {
|
|
@@ -4762,7 +4824,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4762
4824
|
"Error: ",
|
|
4763
4825
|
C.message
|
|
4764
4826
|
] }) }) });
|
|
4765
|
-
if (N && (W ||
|
|
4827
|
+
if (N && (W || z))
|
|
4766
4828
|
return /* @__PURE__ */ o(j, { children: [
|
|
4767
4829
|
/* @__PURE__ */ r(ue, { children: /* @__PURE__ */ r("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: "Verification Session Issue" }) }),
|
|
4768
4830
|
/* @__PURE__ */ o(K, { children: [
|
|
@@ -4786,7 +4848,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4786
4848
|
}
|
|
4787
4849
|
),
|
|
4788
4850
|
/* @__PURE__ */ o("div", { children: [
|
|
4789
|
-
/* @__PURE__ */ r("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children:
|
|
4851
|
+
/* @__PURE__ */ r("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children: z ? "Session Expired" : "Verification Error" }),
|
|
4790
4852
|
/* @__PURE__ */ r("p", { className: "text-red-800 dark:text-red-200 text-sm", children: W || "Your verification session has expired and needs to be restarted." })
|
|
4791
4853
|
] })
|
|
4792
4854
|
] }) }),
|
|
@@ -4801,7 +4863,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4801
4863
|
] }),
|
|
4802
4864
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
4803
4865
|
n && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: n, children: "Back" }),
|
|
4804
|
-
/* @__PURE__ */ r(Q, { type: "button", onClick:
|
|
4866
|
+
/* @__PURE__ */ r(Q, { type: "button", onClick: Ee, disabled: v, children: v ? "Restarting..." : "Restart Verification" })
|
|
4805
4867
|
] })
|
|
4806
4868
|
] });
|
|
4807
4869
|
if (N && u) {
|
|
@@ -4818,7 +4880,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4818
4880
|
type: "button",
|
|
4819
4881
|
variant: "outline",
|
|
4820
4882
|
size: "sm",
|
|
4821
|
-
onClick:
|
|
4883
|
+
onClick: Ee,
|
|
4822
4884
|
disabled: v,
|
|
4823
4885
|
children: "Restart"
|
|
4824
4886
|
}
|
|
@@ -4836,13 +4898,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4836
4898
|
className: "w-full h-full border-0 rounded-lg",
|
|
4837
4899
|
allow: "camera; microphone; geolocation",
|
|
4838
4900
|
title: "Identity Verification",
|
|
4839
|
-
onLoad: (
|
|
4901
|
+
onLoad: (y) => {
|
|
4840
4902
|
var x, d, p;
|
|
4841
4903
|
console.log("[Identity] Iframe loaded");
|
|
4842
4904
|
try {
|
|
4843
|
-
const
|
|
4844
|
-
if (
|
|
4845
|
-
const _ = ((p = (d =
|
|
4905
|
+
const A = y.target, B = A.contentDocument || ((x = A.contentWindow) == null ? void 0 : x.document);
|
|
4906
|
+
if (B) {
|
|
4907
|
+
const _ = ((p = (d = B.body) == null ? void 0 : d.textContent) == null ? void 0 : p.toLowerCase()) || "";
|
|
4846
4908
|
(_.includes("expired") || _.includes("invalid") || _.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), L(!0), w("Your verification link has expired."));
|
|
4847
4909
|
}
|
|
4848
4910
|
} catch {
|
|
@@ -4872,15 +4934,15 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4872
4934
|
n && /* @__PURE__ */ r(me, { children: /* @__PURE__ */ r(Q, { variant: "outline", onClick: n, children: "Back" }) })
|
|
4873
4935
|
] });
|
|
4874
4936
|
}
|
|
4875
|
-
const Pe = /* @__PURE__ */ new Set(["country", "nationality", "taxCountry", "countryOfBirth", "mobileCountryCode", "otherNationality"]), pe = (i = 4) => ({ 1: "col-span-1", 2: "col-span-2", 3: "col-span-3", 4: "col-span-4" })[i] || "col-span-4", Oe = (i,
|
|
4876
|
-
if (!
|
|
4937
|
+
const Pe = /* @__PURE__ */ new Set(["country", "nationality", "taxCountry", "countryOfBirth", "mobileCountryCode", "otherNationality"]), pe = (i = 4) => ({ 1: "col-span-1", 2: "col-span-2", 3: "col-span-3", 4: "col-span-4" })[i] || "col-span-4", Oe = (i, y) => {
|
|
4938
|
+
if (!y && y !== 0) return "—";
|
|
4877
4939
|
if (Pe.has(i) && i !== "mobileCountryCode") {
|
|
4878
|
-
const x = $.find((d) => d.value ===
|
|
4879
|
-
return x ? x.label : String(
|
|
4940
|
+
const x = $.find((d) => d.value === y);
|
|
4941
|
+
return x ? x.label : String(y);
|
|
4880
4942
|
}
|
|
4881
|
-
return String(
|
|
4943
|
+
return String(y);
|
|
4882
4944
|
}, Xe = ({ helpText: i }) => {
|
|
4883
|
-
const [
|
|
4945
|
+
const [y, x] = k(!1), d = ee(null), [, p] = k({ top: 0, left: 0 });
|
|
4884
4946
|
return /* @__PURE__ */ o(Qe, { children: [
|
|
4885
4947
|
/* @__PURE__ */ r(
|
|
4886
4948
|
"button",
|
|
@@ -4889,8 +4951,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4889
4951
|
ref: d,
|
|
4890
4952
|
onClick: () => {
|
|
4891
4953
|
if (d.current) {
|
|
4892
|
-
const
|
|
4893
|
-
p({ top:
|
|
4954
|
+
const B = d.current.getBoundingClientRect();
|
|
4955
|
+
p({ top: B.bottom + window.scrollY + 6, left: B.left + window.scrollX });
|
|
4894
4956
|
}
|
|
4895
4957
|
x(!0);
|
|
4896
4958
|
},
|
|
@@ -4913,7 +4975,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4913
4975
|
children: "?"
|
|
4914
4976
|
}
|
|
4915
4977
|
),
|
|
4916
|
-
|
|
4978
|
+
y && Ct.createPortal(
|
|
4917
4979
|
/* @__PURE__ */ r(
|
|
4918
4980
|
"div",
|
|
4919
4981
|
{
|
|
@@ -4930,7 +4992,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4930
4992
|
children: /* @__PURE__ */ o(
|
|
4931
4993
|
"div",
|
|
4932
4994
|
{
|
|
4933
|
-
onClick: (
|
|
4995
|
+
onClick: (B) => B.stopPropagation(),
|
|
4934
4996
|
style: {
|
|
4935
4997
|
background: "var(--metakyc-surface, #fff)",
|
|
4936
4998
|
border: "1px solid var(--metakyc-border, #e5e7eb)",
|
|
@@ -4968,11 +5030,11 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4968
5030
|
document.body
|
|
4969
5031
|
)
|
|
4970
5032
|
] });
|
|
4971
|
-
}, xe = (i,
|
|
5033
|
+
}, xe = (i, y) => y ? /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "flex-start", gap: 5, flexWrap: "nowrap" }, children: [
|
|
4972
5034
|
/* @__PURE__ */ r("div", { style: { flex: 1, minWidth: 0 }, children: i }),
|
|
4973
|
-
/* @__PURE__ */ r("div", { style: { paddingTop: 24 }, children: /* @__PURE__ */ r(Xe, { helpText:
|
|
4974
|
-
] }) : i, et = (i,
|
|
4975
|
-
const x = `cf-${
|
|
5035
|
+
/* @__PURE__ */ r("div", { style: { paddingTop: 24 }, children: /* @__PURE__ */ r(Xe, { helpText: y }) })
|
|
5036
|
+
] }) : i, et = (i, y) => {
|
|
5037
|
+
const x = `cf-${y}`, d = i.paramName ?? "", p = U[d];
|
|
4976
5038
|
if (i.customType === "br")
|
|
4977
5039
|
return /* @__PURE__ */ r("div", { className: pe(i.colSpan), style: { minHeight: "0.5rem" } }, x);
|
|
4978
5040
|
if (i.customType === "paragraph")
|
|
@@ -5009,15 +5071,15 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5009
5071
|
i.helpText
|
|
5010
5072
|
) }, x);
|
|
5011
5073
|
if (i.customType === "checkbox" || i.customType === "link_checkbox") {
|
|
5012
|
-
const
|
|
5074
|
+
const A = p === "true" || p === !0;
|
|
5013
5075
|
return /* @__PURE__ */ r("div", { className: pe(i.colSpan), children: xe(
|
|
5014
5076
|
/* @__PURE__ */ o("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
|
|
5015
5077
|
/* @__PURE__ */ r(
|
|
5016
5078
|
"input",
|
|
5017
5079
|
{
|
|
5018
5080
|
type: "checkbox",
|
|
5019
|
-
checked: !!
|
|
5020
|
-
onChange: (
|
|
5081
|
+
checked: !!A,
|
|
5082
|
+
onChange: (B) => te((_) => ({ ..._, [d]: String(B.target.checked) })),
|
|
5021
5083
|
style: {
|
|
5022
5084
|
width: 16,
|
|
5023
5085
|
height: 16,
|
|
@@ -5036,10 +5098,10 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5036
5098
|
) }, x);
|
|
5037
5099
|
}
|
|
5038
5100
|
if (i.customType === "group_checkbox") {
|
|
5039
|
-
const
|
|
5040
|
-
i.singleSelect ? te((
|
|
5041
|
-
...
|
|
5042
|
-
[d]:
|
|
5101
|
+
const A = Array.isArray(p) ? p : p ? [p] : [], B = (_) => {
|
|
5102
|
+
i.singleSelect ? te((g) => ({ ...g, [d]: A[0] === _ ? [] : [_] })) : te((g) => ({
|
|
5103
|
+
...g,
|
|
5104
|
+
[d]: A.includes(_) ? A.filter((ae) => ae !== _) : [...A, _]
|
|
5043
5105
|
}));
|
|
5044
5106
|
};
|
|
5045
5107
|
return /* @__PURE__ */ r("div", { className: pe(i.colSpan), children: xe(
|
|
@@ -5050,8 +5112,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5050
5112
|
"input",
|
|
5051
5113
|
{
|
|
5052
5114
|
type: "checkbox",
|
|
5053
|
-
checked:
|
|
5054
|
-
onChange: () =>
|
|
5115
|
+
checked: A.includes(_.value),
|
|
5116
|
+
onChange: () => B(_.value),
|
|
5055
5117
|
style: { width: 16, height: 16, flexShrink: 0, marginTop: 2, accentColor: "var(--metakyc-primary, #6366f1)" }
|
|
5056
5118
|
}
|
|
5057
5119
|
),
|
|
@@ -5064,20 +5126,20 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5064
5126
|
return i.customType === "radio_group" ? /* @__PURE__ */ r("div", { className: pe(i.colSpan), children: xe(
|
|
5065
5127
|
/* @__PURE__ */ o("div", { className: "space-y-1.5", children: [
|
|
5066
5128
|
i.label && /* @__PURE__ */ r("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: i.displayText || i.label }),
|
|
5067
|
-
(i.options || []).map((
|
|
5129
|
+
(i.options || []).map((A) => /* @__PURE__ */ o("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
|
|
5068
5130
|
/* @__PURE__ */ r(
|
|
5069
5131
|
"input",
|
|
5070
5132
|
{
|
|
5071
5133
|
type: "radio",
|
|
5072
5134
|
name: `rg-${d}`,
|
|
5073
|
-
value:
|
|
5074
|
-
checked: p ===
|
|
5075
|
-
onChange: () => te((
|
|
5135
|
+
value: A.value,
|
|
5136
|
+
checked: p === A.value,
|
|
5137
|
+
onChange: () => te((B) => ({ ...B, [d]: A.value })),
|
|
5076
5138
|
style: { width: 16, height: 16, flexShrink: 0, marginTop: 2, accentColor: "var(--metakyc-primary, #6366f1)" }
|
|
5077
5139
|
}
|
|
5078
5140
|
),
|
|
5079
|
-
/* @__PURE__ */ r("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children:
|
|
5080
|
-
] },
|
|
5141
|
+
/* @__PURE__ */ r("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: A.label })
|
|
5142
|
+
] }, A.value))
|
|
5081
5143
|
] }),
|
|
5082
5144
|
i.helpText
|
|
5083
5145
|
) }, x) : /* @__PURE__ */ r("div", { className: pe(i.colSpan), children: xe(
|
|
@@ -5086,65 +5148,65 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5086
5148
|
{
|
|
5087
5149
|
label: i.displayText || i.label || d,
|
|
5088
5150
|
value: String(p ?? ""),
|
|
5089
|
-
onChange: (
|
|
5151
|
+
onChange: (A) => te((B) => ({ ...B, [d]: A.target.value }))
|
|
5090
5152
|
}
|
|
5091
5153
|
),
|
|
5092
5154
|
i.helpText
|
|
5093
5155
|
) }, x);
|
|
5094
|
-
}, tt = (i,
|
|
5095
|
-
if (i.isCustom) return et(i,
|
|
5096
|
-
const x = i.name ?? "", d = Me[x], p = i.displayText || (d == null ? void 0 : d.label) || x,
|
|
5097
|
-
return i.editable ?
|
|
5156
|
+
}, tt = (i, y) => {
|
|
5157
|
+
if (i.isCustom) return et(i, y);
|
|
5158
|
+
const x = i.name ?? "", d = Me[x], p = i.displayText || (d == null ? void 0 : d.label) || x, A = G[x] ?? "", B = x === "mobileCountryCode", _ = !!(d != null && d.countriesType) && !B;
|
|
5159
|
+
return i.editable ? B ? /* @__PURE__ */ r("div", { className: pe(i.colSpan ?? 2), children: xe(
|
|
5098
5160
|
/* @__PURE__ */ r(
|
|
5099
5161
|
Re,
|
|
5100
5162
|
{
|
|
5101
5163
|
label: p,
|
|
5102
|
-
value: String(
|
|
5103
|
-
onChange: (
|
|
5164
|
+
value: String(A),
|
|
5165
|
+
onChange: (g) => E((ae) => ({ ...ae, [x]: g })),
|
|
5104
5166
|
options: [{ value: "", label: "Select country code…" }, ...T]
|
|
5105
5167
|
}
|
|
5106
5168
|
),
|
|
5107
5169
|
i.helpText
|
|
5108
|
-
) }, `epc-${
|
|
5170
|
+
) }, `epc-${y}`) : _ ? /* @__PURE__ */ r("div", { className: pe(i.colSpan ?? 2), children: xe(
|
|
5109
5171
|
/* @__PURE__ */ r(
|
|
5110
5172
|
Re,
|
|
5111
5173
|
{
|
|
5112
5174
|
label: p,
|
|
5113
|
-
value: String(
|
|
5114
|
-
onChange: (
|
|
5175
|
+
value: String(A),
|
|
5176
|
+
onChange: (g) => E((ae) => ({ ...ae, [x]: g })),
|
|
5115
5177
|
options: [{ value: "", label: `Select ${p.toLowerCase()}…` }, ...$]
|
|
5116
5178
|
}
|
|
5117
5179
|
),
|
|
5118
5180
|
i.helpText
|
|
5119
|
-
) }, `ec-${
|
|
5181
|
+
) }, `ec-${y}`) : /* @__PURE__ */ r("div", { className: pe(i.colSpan ?? 2), children: xe(
|
|
5120
5182
|
/* @__PURE__ */ r(
|
|
5121
5183
|
de,
|
|
5122
5184
|
{
|
|
5123
5185
|
label: p,
|
|
5124
5186
|
type: (d == null ? void 0 : d.type) === "date" ? "date" : (d == null ? void 0 : d.type) === "email" ? "email" : "text",
|
|
5125
|
-
value: String(
|
|
5126
|
-
onChange: (
|
|
5187
|
+
value: String(A),
|
|
5188
|
+
onChange: (g) => E((ae) => ({ ...ae, [x]: g.target.value }))
|
|
5127
5189
|
}
|
|
5128
5190
|
),
|
|
5129
5191
|
i.helpText
|
|
5130
|
-
) }, `ei-${
|
|
5192
|
+
) }, `ei-${y}`) : /* @__PURE__ */ r("div", { className: pe(i.colSpan ?? 2), children: xe(
|
|
5131
5193
|
/* @__PURE__ */ o(Qe, { children: [
|
|
5132
5194
|
/* @__PURE__ */ r("label", { className: "block text-sm font-medium mb-0.5", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: p }),
|
|
5133
|
-
/* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)", minHeight: "1.5rem" }, children: Oe(x,
|
|
5195
|
+
/* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)", minHeight: "1.5rem" }, children: Oe(x, A) })
|
|
5134
5196
|
] }),
|
|
5135
5197
|
i.helpText
|
|
5136
|
-
) }, `ro-${
|
|
5198
|
+
) }, `ro-${y}`);
|
|
5137
5199
|
};
|
|
5138
|
-
if (
|
|
5139
|
-
const i =
|
|
5200
|
+
if (ge) {
|
|
5201
|
+
const i = ge.title || "Review Your Information", y = ge.subtitle || "Please review and confirm your information before starting identity verification";
|
|
5140
5202
|
return /* @__PURE__ */ r("form", { onSubmit: (x) => {
|
|
5141
5203
|
x.preventDefault(), ie();
|
|
5142
5204
|
}, children: /* @__PURE__ */ o(j, { children: [
|
|
5143
5205
|
/* @__PURE__ */ o(ue, { children: [
|
|
5144
5206
|
/* @__PURE__ */ r("h2", { className: "text-lg font-bold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: i }),
|
|
5145
|
-
/* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children:
|
|
5207
|
+
/* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: y })
|
|
5146
5208
|
] }),
|
|
5147
|
-
/* @__PURE__ */ r(K, { children: /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children:
|
|
5209
|
+
/* @__PURE__ */ r(K, { children: /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: ge.fields.map((x, d) => tt(x, d)) }) }),
|
|
5148
5210
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
5149
5211
|
n && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: n, children: "Back" }),
|
|
5150
5212
|
/* @__PURE__ */ r(Q, { type: "submit", isLoading: v, children: "Confirm and Start Verification" })
|
|
@@ -5161,9 +5223,9 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5161
5223
|
{ label: "Name", value: `${((_e = F == null ? void 0 : F.applicantRequestData) == null ? void 0 : _e.firstName) || ""} ${((He = F == null ? void 0 : F.applicantRequestData) == null ? void 0 : He.lastName) || ""}`.trim() },
|
|
5162
5224
|
{ label: "Email", value: (Ue = F == null ? void 0 : F.applicantRequestData) == null ? void 0 : Ue.email },
|
|
5163
5225
|
{ label: "Date of Birth", value: ((je = F == null ? void 0 : F.applicantRequestData) == null ? void 0 : je.dateOfBirth) || "Not provided" }
|
|
5164
|
-
].map(({ label: i, value:
|
|
5226
|
+
].map(({ label: i, value: y }) => /* @__PURE__ */ o("div", { children: [
|
|
5165
5227
|
/* @__PURE__ */ r("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: i }),
|
|
5166
|
-
/* @__PURE__ */ r("p", { className: "mt-1 text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children:
|
|
5228
|
+
/* @__PURE__ */ r("p", { className: "mt-1 text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children: y })
|
|
5167
5229
|
] }, i)) }),
|
|
5168
5230
|
/* @__PURE__ */ o("div", { className: "space-y-4", children: [
|
|
5169
5231
|
/* @__PURE__ */ r("h3", { className: "text-base font-semibold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: "Address Information" }),
|
|
@@ -5307,7 +5369,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5307
5369
|
) }),
|
|
5308
5370
|
/* @__PURE__ */ r("h2", { className: "text-3xl font-bold text-center text-gray-900 dark:text-white mb-4", children: u.title }),
|
|
5309
5371
|
/* @__PURE__ */ r("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ r(
|
|
5310
|
-
|
|
5372
|
+
Ae,
|
|
5311
5373
|
{
|
|
5312
5374
|
variant: u.type === "success" ? "success" : u.type === "error" ? "danger" : u.type === "pending" ? "warning" : "info",
|
|
5313
5375
|
children: e != null ? Le[e] : De[t]
|
|
@@ -5359,7 +5421,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5359
5421
|
u.type === "pending" && /* @__PURE__ */ r("div", { className: "text-center", children: /* @__PURE__ */ r("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Please check back later or wait for our email notification" }) })
|
|
5360
5422
|
] })
|
|
5361
5423
|
] });
|
|
5362
|
-
},
|
|
5424
|
+
}, Xr = ({ config: e, className: t = "" }) => !(e != null && e.visible) || !(e != null && e.url) ? null : /* @__PURE__ */ r("div", { className: `metakyc-logo ${t}`, children: /* @__PURE__ */ r(
|
|
5363
5425
|
"img",
|
|
5364
5426
|
{
|
|
5365
5427
|
src: e.url,
|
|
@@ -5379,10 +5441,10 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5379
5441
|
subtitle: t,
|
|
5380
5442
|
className: n = ""
|
|
5381
5443
|
}) => {
|
|
5382
|
-
const { currentTheme: a } =
|
|
5444
|
+
const { currentTheme: a } = ye(), s = e || (a == null ? void 0 : a.title) || "", l = !!(a != null && a.logo && a.logo.visible && a.logo.url), c = !!s;
|
|
5383
5445
|
return !l && !c ? null : /* @__PURE__ */ o("div", { className: `metakyc-header ${n}`, children: [
|
|
5384
5446
|
/* @__PURE__ */ o("div", { className: "metakyc-header-title flex items-center text-xl font-bold text-gray-900 dark:text-white", children: [
|
|
5385
|
-
l && /* @__PURE__ */ r(
|
|
5447
|
+
l && /* @__PURE__ */ r(Xr, { config: a.logo }),
|
|
5386
5448
|
l && c && /* @__PURE__ */ r(
|
|
5387
5449
|
"span",
|
|
5388
5450
|
{
|
|
@@ -5526,41 +5588,41 @@ const qe = {
|
|
|
5526
5588
|
),
|
|
5527
5589
|
typeof document < "u" && s ? it(s, document.body) : null
|
|
5528
5590
|
] });
|
|
5529
|
-
},
|
|
5591
|
+
}, xn = ({
|
|
5530
5592
|
workflowKey: e,
|
|
5531
5593
|
externalRefId: t,
|
|
5532
5594
|
onSuccess: n,
|
|
5533
5595
|
onCancel: a
|
|
5534
5596
|
}) => {
|
|
5535
5597
|
var _e, He, Ue, je;
|
|
5536
|
-
const { config: s, baseInformationService: l, currentTheme: c } =
|
|
5598
|
+
const { config: s, baseInformationService: l, currentTheme: c } = ye(), { createApplicant: u, isLoading: h } = Cr(), m = e || ((_e = s.applicantForm) == null ? void 0 : _e.workflowKey);
|
|
5537
5599
|
if (!m)
|
|
5538
5600
|
throw new Error(
|
|
5539
5601
|
"workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
|
|
5540
5602
|
);
|
|
5541
|
-
const v = t || ((He = s.applicantForm) == null ? void 0 : He.externalRefId) || "", C = ((Ue = s.applicantForm) == null ? void 0 : Ue.email) || "", f =
|
|
5603
|
+
const v = t || ((He = s.applicantForm) == null ? void 0 : He.externalRefId) || "", C = ((Ue = s.applicantForm) == null ? void 0 : Ue.email) || "", f = Ie(
|
|
5542
5604
|
() => c != null && c.applicantFormPages && c.applicantFormPages.length > 0 ? c.applicantFormPages : null,
|
|
5543
5605
|
[c == null ? void 0 : c.applicantFormPages]
|
|
5544
|
-
), S =
|
|
5545
|
-
const i = new Set(Ve),
|
|
5546
|
-
if (
|
|
5606
|
+
), S = Ie(() => {
|
|
5607
|
+
const i = new Set(Ve), y = c == null ? void 0 : c.applicantFormRequiredFields;
|
|
5608
|
+
if (y) for (const x of y) i.add(x);
|
|
5547
5609
|
if (f)
|
|
5548
5610
|
for (const x of f)
|
|
5549
5611
|
for (const d of x.fields)
|
|
5550
5612
|
!d.isCustom && d.name && d.required && i.add(d.name);
|
|
5551
5613
|
return Array.from(i);
|
|
5552
|
-
}, [c == null ? void 0 : c.applicantFormRequiredFields, f]), b =
|
|
5614
|
+
}, [c == null ? void 0 : c.applicantFormRequiredFields, f]), b = Ie(() => {
|
|
5553
5615
|
var x;
|
|
5554
5616
|
if (f) {
|
|
5555
|
-
const d = f.flatMap((
|
|
5556
|
-
for (const
|
|
5617
|
+
const d = f.flatMap((A) => A.fields).filter((A) => !A.isCustom && A.name).map((A) => A.name), p = new Set(d);
|
|
5618
|
+
for (const A of Ve) p.add(A);
|
|
5557
5619
|
return Array.from(p);
|
|
5558
5620
|
}
|
|
5559
5621
|
let i;
|
|
5560
|
-
(x = s.applicantForm) != null && x.visibleFields ? i = s.applicantForm.visibleFields : c != null && c.applicantFormVisibleFields && c.applicantFormVisibleFields.length > 0 ? i = c.applicantFormVisibleFields : i =
|
|
5561
|
-
const
|
|
5562
|
-
for (const d of Ve)
|
|
5563
|
-
return Array.from(
|
|
5622
|
+
(x = s.applicantForm) != null && x.visibleFields ? i = s.applicantForm.visibleFields : c != null && c.applicantFormVisibleFields && c.applicantFormVisibleFields.length > 0 ? i = c.applicantFormVisibleFields : i = Bt;
|
|
5623
|
+
const y = new Set(i);
|
|
5624
|
+
for (const d of Ve) y.add(d);
|
|
5625
|
+
return Array.from(y);
|
|
5564
5626
|
}, [(je = s.applicantForm) == null ? void 0 : je.visibleFields, c == null ? void 0 : c.applicantFormVisibleFields, f]), D = /* @__PURE__ */ new Set([
|
|
5565
5627
|
"country",
|
|
5566
5628
|
"nationality",
|
|
@@ -5568,13 +5630,13 @@ const qe = {
|
|
|
5568
5630
|
"countryOfBirth",
|
|
5569
5631
|
"mobileCountryCode",
|
|
5570
5632
|
"otherNationality"
|
|
5571
|
-
]), F =
|
|
5572
|
-
var
|
|
5633
|
+
]), F = Ie(() => {
|
|
5634
|
+
var y, x;
|
|
5573
5635
|
const i = /* @__PURE__ */ new Set();
|
|
5574
5636
|
if (f)
|
|
5575
5637
|
for (const d of f)
|
|
5576
5638
|
for (const p of d.fields)
|
|
5577
|
-
!p.isCustom && p.name && D.has(p.name) && i.add(p.countriesType ?? ((
|
|
5639
|
+
!p.isCustom && p.name && D.has(p.name) && i.add(p.countriesType ?? ((y = Me[p.name]) == null ? void 0 : y.countriesType));
|
|
5578
5640
|
else
|
|
5579
5641
|
for (const d of b)
|
|
5580
5642
|
D.has(d) && i.add((x = Me[d]) == null ? void 0 : x.countriesType);
|
|
@@ -5588,38 +5650,38 @@ const qe = {
|
|
|
5588
5650
|
});
|
|
5589
5651
|
if (i.length === 0) {
|
|
5590
5652
|
F.every((p) => {
|
|
5591
|
-
const
|
|
5592
|
-
return X.current.has(
|
|
5653
|
+
const A = p != null ? String(p) : "all";
|
|
5654
|
+
return X.current.has(A);
|
|
5593
5655
|
}) && T(!1);
|
|
5594
5656
|
return;
|
|
5595
5657
|
}
|
|
5596
5658
|
T(!0);
|
|
5597
|
-
const
|
|
5598
|
-
|
|
5659
|
+
const y = i.map((d) => d != null ? String(d) : "all");
|
|
5660
|
+
y.forEach((d) => Y.current.add(d)), (async () => {
|
|
5599
5661
|
try {
|
|
5600
5662
|
const d = await Promise.all(
|
|
5601
5663
|
i.map(async (p) => {
|
|
5602
|
-
const
|
|
5664
|
+
const A = p != null ? String(p) : "all", B = await l.getCountries("", s.locale || "en", p), _ = p === 40, g = /* @__PURE__ */ new Set(), ae = B.map((q) => _ && q.countryCode ? {
|
|
5603
5665
|
value: q.countryCode,
|
|
5604
5666
|
label: `${q.countryCode} – ${q.name}`
|
|
5605
|
-
} : { value: q.abbreviation3 || q.abbreviation, label: q.name }).filter((q) => !q.value ||
|
|
5606
|
-
return X.current.add(
|
|
5667
|
+
} : { value: q.abbreviation3 || q.abbreviation, label: q.name }).filter((q) => !q.value || g.has(q.value) ? !1 : (g.add(q.value), !0));
|
|
5668
|
+
return X.current.add(A), Y.current.delete(A), [A, ae];
|
|
5607
5669
|
})
|
|
5608
5670
|
);
|
|
5609
5671
|
$((p) => ({ ...p, ...Object.fromEntries(d) }));
|
|
5610
5672
|
} catch (d) {
|
|
5611
|
-
|
|
5673
|
+
y.forEach((p) => Y.current.delete(p)), console.error("Failed to load countries:", d);
|
|
5612
5674
|
} finally {
|
|
5613
5675
|
F.every((p) => {
|
|
5614
|
-
const
|
|
5615
|
-
return X.current.has(
|
|
5676
|
+
const A = p != null ? String(p) : "all";
|
|
5677
|
+
return X.current.has(A);
|
|
5616
5678
|
}) && T(!1);
|
|
5617
5679
|
}
|
|
5618
5680
|
})();
|
|
5619
5681
|
}, [F, c]);
|
|
5620
|
-
const
|
|
5682
|
+
const I = (i, y) => {
|
|
5621
5683
|
var p;
|
|
5622
|
-
const x =
|
|
5684
|
+
const x = y ?? ((p = Me[i]) == null ? void 0 : p.countriesType), d = x != null ? String(x) : "all";
|
|
5623
5685
|
return P[d] || [];
|
|
5624
5686
|
}, [N, H] = k({
|
|
5625
5687
|
workflowKey: m,
|
|
@@ -5646,48 +5708,48 @@ const qe = {
|
|
|
5646
5708
|
educationLevel: "",
|
|
5647
5709
|
occupation: "",
|
|
5648
5710
|
taxNumber: ""
|
|
5649
|
-
}), [W, w] = k({}), [
|
|
5711
|
+
}), [W, w] = k({}), [z, L] = k(0), [O, G] = k({}), [E, U] = k(null), [te, ge] = k(!1), se = (i, y) => H((x) => ({ ...x, [i]: y })), M = (i, y) => w((x) => ({ ...x, [i]: y })), Z = (i) => !i.conditionalOn || W[i.conditionalOn] === "true", ie = f && z < f.length - 1 ? z + 1 : -1, Ee = f && z > 0 ? z - 1 : -1, Pe = (i) => {
|
|
5650
5712
|
var x;
|
|
5651
|
-
const
|
|
5713
|
+
const y = {};
|
|
5652
5714
|
for (const d of i.fields)
|
|
5653
5715
|
if (d.isCustom) {
|
|
5654
5716
|
if (d.customType === "paragraph" || d.customType === "html" || d.customType === "br" || d.customType === "link") continue;
|
|
5655
5717
|
if (d.required && d.paramName) {
|
|
5656
|
-
const p = W[d.paramName],
|
|
5657
|
-
d.customType === "checkbox" || d.customType === "link_checkbox" ? p !== "true" && (
|
|
5718
|
+
const p = W[d.paramName], A = d.displayText || d.label || d.paramName;
|
|
5719
|
+
d.customType === "checkbox" || d.customType === "link_checkbox" ? p !== "true" && (y[d.paramName] = `${A} is required.`) : (!p || p.trim() === "") && (y[d.paramName] = `${A} is required.`);
|
|
5658
5720
|
}
|
|
5659
5721
|
} else if (d.name) {
|
|
5660
5722
|
const p = d.name;
|
|
5661
5723
|
if (S.includes(p) && Ye(N[p])) {
|
|
5662
|
-
const
|
|
5663
|
-
|
|
5724
|
+
const A = d.displayText || ((x = Me[p]) == null ? void 0 : x.label) || p;
|
|
5725
|
+
y[p] = `${A} is required.`;
|
|
5664
5726
|
}
|
|
5665
5727
|
}
|
|
5666
|
-
return
|
|
5728
|
+
return y;
|
|
5667
5729
|
}, pe = async () => {
|
|
5668
5730
|
if (!f) return;
|
|
5669
|
-
const i = f[
|
|
5731
|
+
const i = f[z];
|
|
5670
5732
|
if (i.conditionalOn && !Z(i)) {
|
|
5671
5733
|
G({}), ie >= 0 ? L(ie) : await Oe();
|
|
5672
5734
|
return;
|
|
5673
5735
|
}
|
|
5674
|
-
const
|
|
5675
|
-
if (Object.keys(
|
|
5676
|
-
G(
|
|
5736
|
+
const y = Pe(i);
|
|
5737
|
+
if (Object.keys(y).length > 0) {
|
|
5738
|
+
G(y);
|
|
5677
5739
|
return;
|
|
5678
5740
|
}
|
|
5679
5741
|
G({}), ie >= 0 ? L(ie) : await Oe();
|
|
5680
5742
|
}, Oe = async () => {
|
|
5681
5743
|
if (f) {
|
|
5682
5744
|
let i = {};
|
|
5683
|
-
for (const
|
|
5684
|
-
Z(
|
|
5745
|
+
for (const y of f)
|
|
5746
|
+
Z(y) && (i = { ...i, ...Pe(y) });
|
|
5685
5747
|
if (Object.keys(i).length > 0) {
|
|
5686
5748
|
G(i);
|
|
5687
5749
|
return;
|
|
5688
5750
|
}
|
|
5689
5751
|
}
|
|
5690
|
-
|
|
5752
|
+
ge(!0), U(null);
|
|
5691
5753
|
try {
|
|
5692
5754
|
if (!N.externalRefId || N.externalRefId.trim() === "") {
|
|
5693
5755
|
U("External Reference ID is required. Please pass it via config.applicantForm.externalRefId.");
|
|
@@ -5702,8 +5764,8 @@ const qe = {
|
|
|
5702
5764
|
if (Z(d)) {
|
|
5703
5765
|
for (const p of d.fields)
|
|
5704
5766
|
if (!p.isCustom && p.name) {
|
|
5705
|
-
const
|
|
5706
|
-
Ye(
|
|
5767
|
+
const A = p.name, B = N[A];
|
|
5768
|
+
Ye(B) || (i[A] = B);
|
|
5707
5769
|
}
|
|
5708
5770
|
}
|
|
5709
5771
|
for (const d of Ve)
|
|
@@ -5717,47 +5779,47 @@ const qe = {
|
|
|
5717
5779
|
const p = N[d];
|
|
5718
5780
|
Ye(p) || (i[d] = p);
|
|
5719
5781
|
});
|
|
5720
|
-
const
|
|
5782
|
+
const y = [];
|
|
5721
5783
|
if (f) {
|
|
5722
5784
|
for (const d of f)
|
|
5723
5785
|
if (Z(d))
|
|
5724
5786
|
for (const p of d.fields) {
|
|
5725
5787
|
if (!p.isCustom || !p.paramName || p.customType === "paragraph" || p.customType === "html" || p.customType === "br" || p.customType === "link") continue;
|
|
5726
|
-
const
|
|
5727
|
-
let
|
|
5788
|
+
const A = W[p.paramName] ?? "";
|
|
5789
|
+
let B;
|
|
5728
5790
|
if (p.customType === "checkbox" || p.customType === "link_checkbox")
|
|
5729
|
-
|
|
5730
|
-
else if (
|
|
5731
|
-
|
|
5791
|
+
B = A === "true" ? "yes" : "no";
|
|
5792
|
+
else if (B = A, !B && !p.required) continue;
|
|
5793
|
+
y.push({ paramName: p.paramName, value: B });
|
|
5732
5794
|
}
|
|
5733
5795
|
}
|
|
5734
|
-
|
|
5796
|
+
y.length > 0 && (i.applicantAdditionalDatas = y);
|
|
5735
5797
|
const x = await u(i);
|
|
5736
5798
|
n(x.applicantId);
|
|
5737
5799
|
} catch (i) {
|
|
5738
5800
|
console.error("Error creating applicant:", i), U(i.message || "Failed to create applicant");
|
|
5739
5801
|
} finally {
|
|
5740
|
-
|
|
5802
|
+
ge(!1);
|
|
5741
5803
|
}
|
|
5742
5804
|
}, Xe = async (i) => {
|
|
5743
|
-
var
|
|
5805
|
+
var y;
|
|
5744
5806
|
i.preventDefault();
|
|
5745
5807
|
for (const x of S)
|
|
5746
5808
|
if (Ye(N[x])) {
|
|
5747
|
-
const d = ((
|
|
5809
|
+
const d = ((y = Me[x]) == null ? void 0 : y.label) || x;
|
|
5748
5810
|
U(`${d} is required.`);
|
|
5749
5811
|
return;
|
|
5750
5812
|
}
|
|
5751
5813
|
await Oe();
|
|
5752
|
-
}, xe = (i,
|
|
5814
|
+
}, xe = (i, y, x, d) => {
|
|
5753
5815
|
var q;
|
|
5754
5816
|
const p = Me[i];
|
|
5755
5817
|
if (!p) return null;
|
|
5756
|
-
const
|
|
5818
|
+
const A = S.includes(i), B = O[i], _ = x || p.label, g = y ?? i, ae = { required: A };
|
|
5757
5819
|
switch (p.type) {
|
|
5758
5820
|
case "select":
|
|
5759
5821
|
if (i === "country" || i === "nationality" || i === "taxCountry" || i === "countryOfBirth" || i === "mobileCountryCode") {
|
|
5760
|
-
const le =
|
|
5822
|
+
const le = I(i, d);
|
|
5761
5823
|
return /* @__PURE__ */ r(
|
|
5762
5824
|
Re,
|
|
5763
5825
|
{
|
|
@@ -5767,9 +5829,9 @@ const qe = {
|
|
|
5767
5829
|
onChange: (Fe) => se(i, Fe),
|
|
5768
5830
|
options: [{ value: "", label: `Select ${_.toLowerCase()}...` }, ...le],
|
|
5769
5831
|
disabled: R,
|
|
5770
|
-
error:
|
|
5832
|
+
error: B
|
|
5771
5833
|
},
|
|
5772
|
-
|
|
5834
|
+
g
|
|
5773
5835
|
);
|
|
5774
5836
|
}
|
|
5775
5837
|
if (i === "salutation")
|
|
@@ -5786,9 +5848,9 @@ const qe = {
|
|
|
5786
5848
|
{ value: Ze.Female.toString(), label: "Female" },
|
|
5787
5849
|
{ value: Ze.Other.toString(), label: "Other" }
|
|
5788
5850
|
],
|
|
5789
|
-
error:
|
|
5851
|
+
error: B
|
|
5790
5852
|
},
|
|
5791
|
-
|
|
5853
|
+
g
|
|
5792
5854
|
);
|
|
5793
5855
|
if (i === "defaultLanguage") {
|
|
5794
5856
|
const le = c != null && c.allowedLanguages && c.allowedLanguages.length > 0 ? lt.filter((Fe) => c.allowedLanguages.includes(Fe.value)) : lt;
|
|
@@ -5800,17 +5862,17 @@ const qe = {
|
|
|
5800
5862
|
value: N[i] || "",
|
|
5801
5863
|
onChange: (Fe) => se(i, Fe),
|
|
5802
5864
|
options: [{ value: "", label: "Select language..." }, ...le],
|
|
5803
|
-
error:
|
|
5865
|
+
error: B
|
|
5804
5866
|
},
|
|
5805
|
-
|
|
5867
|
+
g
|
|
5806
5868
|
);
|
|
5807
5869
|
}
|
|
5808
5870
|
return null;
|
|
5809
5871
|
case "multiselect":
|
|
5810
5872
|
if (i === "otherNationality") {
|
|
5811
|
-
const le =
|
|
5873
|
+
const le = I(i, d);
|
|
5812
5874
|
return /* @__PURE__ */ r(
|
|
5813
|
-
|
|
5875
|
+
Er,
|
|
5814
5876
|
{
|
|
5815
5877
|
...ae,
|
|
5816
5878
|
label: _,
|
|
@@ -5820,7 +5882,7 @@ const qe = {
|
|
|
5820
5882
|
placeholder: "Select other nationalities...",
|
|
5821
5883
|
disabled: R
|
|
5822
5884
|
},
|
|
5823
|
-
|
|
5885
|
+
g
|
|
5824
5886
|
);
|
|
5825
5887
|
}
|
|
5826
5888
|
return null;
|
|
@@ -5833,9 +5895,9 @@ const qe = {
|
|
|
5833
5895
|
label: _,
|
|
5834
5896
|
value: N[i] || "",
|
|
5835
5897
|
onChange: (le) => se(i, le.target.value),
|
|
5836
|
-
error:
|
|
5898
|
+
error: B
|
|
5837
5899
|
},
|
|
5838
|
-
|
|
5900
|
+
g
|
|
5839
5901
|
);
|
|
5840
5902
|
case "email":
|
|
5841
5903
|
return /* @__PURE__ */ r(
|
|
@@ -5846,9 +5908,9 @@ const qe = {
|
|
|
5846
5908
|
label: _,
|
|
5847
5909
|
value: N[i] || "",
|
|
5848
5910
|
onChange: (le) => se(i, le.target.value),
|
|
5849
|
-
error:
|
|
5911
|
+
error: B
|
|
5850
5912
|
},
|
|
5851
|
-
|
|
5913
|
+
g
|
|
5852
5914
|
);
|
|
5853
5915
|
case "tel":
|
|
5854
5916
|
return /* @__PURE__ */ r(
|
|
@@ -5859,9 +5921,9 @@ const qe = {
|
|
|
5859
5921
|
label: _,
|
|
5860
5922
|
value: N[i] || "",
|
|
5861
5923
|
onChange: (le) => se(i, le.target.value),
|
|
5862
|
-
error:
|
|
5924
|
+
error: B
|
|
5863
5925
|
},
|
|
5864
|
-
|
|
5926
|
+
g
|
|
5865
5927
|
);
|
|
5866
5928
|
default:
|
|
5867
5929
|
return /* @__PURE__ */ r(
|
|
@@ -5872,12 +5934,12 @@ const qe = {
|
|
|
5872
5934
|
label: _,
|
|
5873
5935
|
value: N[i] || "",
|
|
5874
5936
|
onChange: (le) => se(i, le.target.value),
|
|
5875
|
-
error:
|
|
5937
|
+
error: B
|
|
5876
5938
|
},
|
|
5877
|
-
|
|
5939
|
+
g
|
|
5878
5940
|
);
|
|
5879
5941
|
}
|
|
5880
|
-
}, et = (i,
|
|
5942
|
+
}, et = (i, y) => {
|
|
5881
5943
|
if (i.customType === "paragraph") {
|
|
5882
5944
|
const p = i.displayText || i.label || "";
|
|
5883
5945
|
return /* @__PURE__ */ r(
|
|
@@ -5892,7 +5954,7 @@ const qe = {
|
|
|
5892
5954
|
},
|
|
5893
5955
|
dangerouslySetInnerHTML: { __html: p }
|
|
5894
5956
|
},
|
|
5895
|
-
`custom-${
|
|
5957
|
+
`custom-${y}`
|
|
5896
5958
|
);
|
|
5897
5959
|
}
|
|
5898
5960
|
if (i.customType === "html")
|
|
@@ -5901,10 +5963,10 @@ const qe = {
|
|
|
5901
5963
|
{
|
|
5902
5964
|
dangerouslySetInnerHTML: { __html: i.label || "" }
|
|
5903
5965
|
},
|
|
5904
|
-
`custom-${
|
|
5966
|
+
`custom-${y}`
|
|
5905
5967
|
);
|
|
5906
5968
|
if (i.customType === "br")
|
|
5907
|
-
return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${
|
|
5969
|
+
return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${y}`);
|
|
5908
5970
|
if (i.customType === "link") {
|
|
5909
5971
|
const p = i.displayText || i.label || i.linkText || i.linkUrl || "";
|
|
5910
5972
|
return /* @__PURE__ */ r("div", { className: "metakyc-link-field", children: /* @__PURE__ */ o(
|
|
@@ -5927,7 +5989,7 @@ const qe = {
|
|
|
5927
5989
|
/* @__PURE__ */ r("span", { style: { fontSize: "10px", opacity: 0.7 }, children: "↗" })
|
|
5928
5990
|
]
|
|
5929
5991
|
}
|
|
5930
|
-
) }, `custom-${
|
|
5992
|
+
) }, `custom-${y}`);
|
|
5931
5993
|
}
|
|
5932
5994
|
if (!i.paramName) return null;
|
|
5933
5995
|
const x = O[i.paramName], d = i.displayText || i.label || i.paramName;
|
|
@@ -5964,7 +6026,7 @@ const qe = {
|
|
|
5964
6026
|
}
|
|
5965
6027
|
),
|
|
5966
6028
|
x && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: x })
|
|
5967
|
-
] }, `custom-${
|
|
6029
|
+
] }, `custom-${y}`);
|
|
5968
6030
|
if (i.customType === "link_checkbox")
|
|
5969
6031
|
return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: [
|
|
5970
6032
|
/* @__PURE__ */ o(
|
|
@@ -6011,7 +6073,7 @@ const qe = {
|
|
|
6011
6073
|
}
|
|
6012
6074
|
),
|
|
6013
6075
|
x && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: x })
|
|
6014
|
-
] }, `custom-${
|
|
6076
|
+
] }, `custom-${y}`);
|
|
6015
6077
|
if (i.customType === "group_checkbox") {
|
|
6016
6078
|
const p = (W[i.paramName] || "").split(",").filter(Boolean);
|
|
6017
6079
|
return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
|
|
@@ -6026,8 +6088,8 @@ const qe = {
|
|
|
6026
6088
|
]
|
|
6027
6089
|
}
|
|
6028
6090
|
),
|
|
6029
|
-
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (i.options || []).map((
|
|
6030
|
-
const
|
|
6091
|
+
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (i.options || []).map((A) => {
|
|
6092
|
+
const B = i.singleSelect ? W[i.paramName] === A.value : p.includes(A.value);
|
|
6031
6093
|
return /* @__PURE__ */ o(
|
|
6032
6094
|
"label",
|
|
6033
6095
|
{
|
|
@@ -6038,13 +6100,13 @@ const qe = {
|
|
|
6038
6100
|
"input",
|
|
6039
6101
|
{
|
|
6040
6102
|
type: "checkbox",
|
|
6041
|
-
checked:
|
|
6103
|
+
checked: B,
|
|
6042
6104
|
onChange: (_) => {
|
|
6043
6105
|
if (i.singleSelect)
|
|
6044
|
-
M(i.paramName, _.target.checked ?
|
|
6106
|
+
M(i.paramName, _.target.checked ? A.value : "");
|
|
6045
6107
|
else {
|
|
6046
|
-
const
|
|
6047
|
-
M(i.paramName,
|
|
6108
|
+
const g = _.target.checked ? [...p, A.value] : p.filter((ae) => ae !== A.value);
|
|
6109
|
+
M(i.paramName, g.join(","));
|
|
6048
6110
|
}
|
|
6049
6111
|
},
|
|
6050
6112
|
className: "metakyc-option-input",
|
|
@@ -6056,16 +6118,16 @@ const qe = {
|
|
|
6056
6118
|
{
|
|
6057
6119
|
className: "metakyc-option-text",
|
|
6058
6120
|
style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
|
|
6059
|
-
children:
|
|
6121
|
+
children: A.label
|
|
6060
6122
|
}
|
|
6061
6123
|
)
|
|
6062
6124
|
]
|
|
6063
6125
|
},
|
|
6064
|
-
|
|
6126
|
+
A.value
|
|
6065
6127
|
);
|
|
6066
6128
|
}) }),
|
|
6067
6129
|
x && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: x })
|
|
6068
|
-
] }, `custom-${
|
|
6130
|
+
] }, `custom-${y}`);
|
|
6069
6131
|
}
|
|
6070
6132
|
return i.customType === "radio_group" ? /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
|
|
6071
6133
|
/* @__PURE__ */ o(
|
|
@@ -6091,7 +6153,7 @@ const qe = {
|
|
|
6091
6153
|
type: "radio",
|
|
6092
6154
|
checked: W[i.paramName] === p.value,
|
|
6093
6155
|
onChange: () => M(i.paramName, p.value),
|
|
6094
|
-
name: `radio-group-${i.paramName}-${
|
|
6156
|
+
name: `radio-group-${i.paramName}-${y}`,
|
|
6095
6157
|
className: "metakyc-option-input",
|
|
6096
6158
|
style: qe
|
|
6097
6159
|
}
|
|
@@ -6109,7 +6171,7 @@ const qe = {
|
|
|
6109
6171
|
p.value
|
|
6110
6172
|
)) }),
|
|
6111
6173
|
x && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: x })
|
|
6112
|
-
] }, `custom-${
|
|
6174
|
+
] }, `custom-${y}`) : /* @__PURE__ */ r(
|
|
6113
6175
|
de,
|
|
6114
6176
|
{
|
|
6115
6177
|
type: "text",
|
|
@@ -6119,9 +6181,9 @@ const qe = {
|
|
|
6119
6181
|
required: i.required,
|
|
6120
6182
|
error: x
|
|
6121
6183
|
},
|
|
6122
|
-
`custom-${
|
|
6184
|
+
`custom-${y}`
|
|
6123
6185
|
);
|
|
6124
|
-
}, tt = (i,
|
|
6186
|
+
}, tt = (i, y) => {
|
|
6125
6187
|
const x = Z(i);
|
|
6126
6188
|
return /* @__PURE__ */ o("div", { className: "space-y-4", children: [
|
|
6127
6189
|
i.conditionalOn && /* @__PURE__ */ r(pt, { helpText: i.conditionalHelpText, children: /* @__PURE__ */ o(
|
|
@@ -6152,8 +6214,8 @@ const qe = {
|
|
|
6152
6214
|
}
|
|
6153
6215
|
) }),
|
|
6154
6216
|
x && /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: i.fields.map((d, p) => {
|
|
6155
|
-
const
|
|
6156
|
-
return /* @__PURE__ */ r("div", { className:
|
|
6217
|
+
const A = d.colSpan === 1 ? "col-span-1" : d.colSpan === 2 ? "col-span-2" : d.colSpan === 3 ? "col-span-3" : "col-span-4", B = d.isCustom ? `custom-${p}-${d.paramName}` : `builtin-${d.name}-${p}`;
|
|
6218
|
+
return /* @__PURE__ */ r("div", { className: A, children: /* @__PURE__ */ r(pt, { helpText: d.helpText, children: d.isCustom ? et(d, p) : xe(d.name, B, d.displayText, d.countriesType) }) }, B);
|
|
6157
6219
|
}) })
|
|
6158
6220
|
] });
|
|
6159
6221
|
};
|
|
@@ -6163,7 +6225,7 @@ const qe = {
|
|
|
6163
6225
|
/* @__PURE__ */ r("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: "Loading form…" })
|
|
6164
6226
|
] }) }) });
|
|
6165
6227
|
if (f) {
|
|
6166
|
-
const i = f[
|
|
6228
|
+
const i = f[z] ?? f[0], y = Ee === -1, x = ie === -1, d = f.length, p = Z(i), A = Object.values(O);
|
|
6167
6229
|
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ o(j, { children: [
|
|
6168
6230
|
/* @__PURE__ */ r(ue, { children: /* @__PURE__ */ r(at, { title: (c == null ? void 0 : c.title) || "Create Applicant" }) }),
|
|
6169
6231
|
/* @__PURE__ */ o(K, { children: [
|
|
@@ -6193,25 +6255,25 @@ const qe = {
|
|
|
6193
6255
|
}
|
|
6194
6256
|
)
|
|
6195
6257
|
] }),
|
|
6196
|
-
(
|
|
6197
|
-
|
|
6258
|
+
(E || A.length > 0) && /* @__PURE__ */ o("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
|
|
6259
|
+
E && /* @__PURE__ */ o("p", { className: "text-red-600 text-sm", children: [
|
|
6198
6260
|
/* @__PURE__ */ r("strong", { children: "Error:" }),
|
|
6199
6261
|
" ",
|
|
6200
|
-
|
|
6262
|
+
E
|
|
6201
6263
|
] }),
|
|
6202
|
-
|
|
6264
|
+
A.map((B, _) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: B }, _))
|
|
6203
6265
|
] }),
|
|
6204
6266
|
d > 1 && /* @__PURE__ */ o("div", { className: "flex items-center gap-2 mb-4", children: [
|
|
6205
|
-
f.map((
|
|
6267
|
+
f.map((B, _) => /* @__PURE__ */ r(
|
|
6206
6268
|
"div",
|
|
6207
6269
|
{
|
|
6208
|
-
className: `h-1.5 rounded-full transition-all ${_ ===
|
|
6209
|
-
style: _ ===
|
|
6270
|
+
className: `h-1.5 rounded-full transition-all ${_ === z ? "flex-1" : "w-8"}`,
|
|
6271
|
+
style: _ === z ? { backgroundColor: "var(--metakyc-primary, #2563eb)" } : _ < z ? { backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { backgroundColor: "#e5e7eb" }
|
|
6210
6272
|
},
|
|
6211
6273
|
_
|
|
6212
6274
|
)),
|
|
6213
6275
|
/* @__PURE__ */ o("span", { className: "text-xs text-gray-400 flex-shrink-0", children: [
|
|
6214
|
-
|
|
6276
|
+
z + 1,
|
|
6215
6277
|
" / ",
|
|
6216
6278
|
d
|
|
6217
6279
|
] })
|
|
@@ -6220,19 +6282,19 @@ const qe = {
|
|
|
6220
6282
|
] }),
|
|
6221
6283
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
6222
6284
|
/* @__PURE__ */ o("div", { children: [
|
|
6223
|
-
!
|
|
6285
|
+
!y && /* @__PURE__ */ r(
|
|
6224
6286
|
Q,
|
|
6225
6287
|
{
|
|
6226
6288
|
type: "button",
|
|
6227
6289
|
variant: "outline",
|
|
6228
6290
|
onClick: () => {
|
|
6229
|
-
L(
|
|
6291
|
+
L(Ee), G({});
|
|
6230
6292
|
},
|
|
6231
6293
|
disabled: te || h,
|
|
6232
6294
|
children: "Previous"
|
|
6233
6295
|
}
|
|
6234
6296
|
),
|
|
6235
|
-
|
|
6297
|
+
y && a && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: a, disabled: te || h, children: "Cancel" })
|
|
6236
6298
|
] }),
|
|
6237
6299
|
/* @__PURE__ */ r(
|
|
6238
6300
|
Q,
|
|
@@ -6249,10 +6311,10 @@ const qe = {
|
|
|
6249
6311
|
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit: Xe, children: /* @__PURE__ */ o(j, { children: [
|
|
6250
6312
|
/* @__PURE__ */ r(ue, { children: /* @__PURE__ */ r(at, { title: (c == null ? void 0 : c.title) || "Create Applicant" }) }),
|
|
6251
6313
|
/* @__PURE__ */ o(K, { children: [
|
|
6252
|
-
|
|
6314
|
+
E && /* @__PURE__ */ r("div", { className: "mb-6 p-4 bg-red-50 border border-red-200 rounded-lg", children: /* @__PURE__ */ o("p", { className: "text-red-600 text-sm", children: [
|
|
6253
6315
|
/* @__PURE__ */ r("strong", { children: "Error:" }),
|
|
6254
6316
|
" ",
|
|
6255
|
-
|
|
6317
|
+
E
|
|
6256
6318
|
] }) }),
|
|
6257
6319
|
/* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: b.map((i) => /* @__PURE__ */ r("div", { className: "col-span-4", children: xe(i) }, i)) })
|
|
6258
6320
|
] }),
|
|
@@ -6261,7 +6323,7 @@ const qe = {
|
|
|
6261
6323
|
/* @__PURE__ */ r(Q, { type: "submit", isLoading: te || h, children: "Create Applicant" })
|
|
6262
6324
|
] })
|
|
6263
6325
|
] }) }) });
|
|
6264
|
-
},
|
|
6326
|
+
}, vn = ({
|
|
6265
6327
|
applicantId: e,
|
|
6266
6328
|
onComplete: t,
|
|
6267
6329
|
onError: n,
|
|
@@ -6279,7 +6341,7 @@ const qe = {
|
|
|
6279
6341
|
error: f,
|
|
6280
6342
|
moveBack: S,
|
|
6281
6343
|
refreshProgress: b
|
|
6282
|
-
} =
|
|
6344
|
+
} = xr(e), [D, F] = be.useState(!1);
|
|
6283
6345
|
if (be.useEffect(() => {
|
|
6284
6346
|
f && n && n(f);
|
|
6285
6347
|
}, [f, n]), be.useEffect(() => {
|
|
@@ -6369,15 +6431,15 @@ const qe = {
|
|
|
6369
6431
|
return "";
|
|
6370
6432
|
}
|
|
6371
6433
|
}, $ = () => {
|
|
6372
|
-
const T = u.filter((N) => N.visibility !== !1), Y = T.findIndex((N) => N.order === c.order), X = Y >= 0 ? Y + 1 : 1,
|
|
6434
|
+
const T = u.filter((N) => N.visibility !== !1), Y = T.findIndex((N) => N.order === c.order), X = Y >= 0 ? Y + 1 : 1, I = T.length;
|
|
6373
6435
|
return /* @__PURE__ */ o("div", { className: "mb-6", children: [
|
|
6374
6436
|
/* @__PURE__ */ o("div", { className: "flex items-start justify-between mb-4", children: [
|
|
6375
6437
|
/* @__PURE__ */ r(at, {}),
|
|
6376
|
-
/* @__PURE__ */ o(
|
|
6438
|
+
/* @__PURE__ */ o(Ae, { variant: l.status === 1 ? "info" : "success", children: [
|
|
6377
6439
|
"Step ",
|
|
6378
6440
|
X,
|
|
6379
6441
|
" of ",
|
|
6380
|
-
|
|
6442
|
+
I
|
|
6381
6443
|
] })
|
|
6382
6444
|
] }),
|
|
6383
6445
|
/* @__PURE__ */ r("div", { className: "flex items-center", children: T.map((N, H) => {
|
|
@@ -6421,20 +6483,20 @@ const qe = {
|
|
|
6421
6483
|
};
|
|
6422
6484
|
switch (c.action) {
|
|
6423
6485
|
case J.Questionaries:
|
|
6424
|
-
return /* @__PURE__ */ r($r, { ...T });
|
|
6425
|
-
case J.UploadDocument:
|
|
6426
6486
|
return /* @__PURE__ */ r(Br, { ...T });
|
|
6427
|
-
case J.
|
|
6487
|
+
case J.UploadDocument:
|
|
6428
6488
|
return /* @__PURE__ */ r(_r, { ...T });
|
|
6489
|
+
case J.Overview:
|
|
6490
|
+
return /* @__PURE__ */ r(Hr, { ...T });
|
|
6429
6491
|
case J.IdentitySdk:
|
|
6430
|
-
return /* @__PURE__ */ r(
|
|
6492
|
+
return /* @__PURE__ */ r(Zr, { ...T });
|
|
6431
6493
|
case J.RiskScoring:
|
|
6432
|
-
return /* @__PURE__ */ r(
|
|
6494
|
+
return /* @__PURE__ */ r(Qr, { ...T });
|
|
6433
6495
|
case J.AdditionalData:
|
|
6434
6496
|
case J.InvestorCategorization:
|
|
6435
|
-
return /* @__PURE__ */ r(Gr, { ...T });
|
|
6436
|
-
case J.AppropriatenessTest:
|
|
6437
6497
|
return /* @__PURE__ */ r(Vr, { ...T });
|
|
6498
|
+
case J.AppropriatenessTest:
|
|
6499
|
+
return /* @__PURE__ */ r(Jr, { ...T });
|
|
6438
6500
|
case J.ManualReview:
|
|
6439
6501
|
return /* @__PURE__ */ r(
|
|
6440
6502
|
mt,
|
|
@@ -6464,12 +6526,12 @@ const qe = {
|
|
|
6464
6526
|
R()
|
|
6465
6527
|
] });
|
|
6466
6528
|
};
|
|
6467
|
-
function
|
|
6529
|
+
function kn(e) {
|
|
6468
6530
|
return Ce.object({
|
|
6469
6531
|
questionResults: Ce.any()
|
|
6470
6532
|
}).passthrough();
|
|
6471
6533
|
}
|
|
6472
|
-
function
|
|
6534
|
+
function en(e) {
|
|
6473
6535
|
let t = Ce.array(Ce.instanceof(File));
|
|
6474
6536
|
if (e.isRequired ? t = t.min(
|
|
6475
6537
|
1,
|
|
@@ -6491,37 +6553,37 @@ function Xr(e) {
|
|
|
6491
6553
|
}
|
|
6492
6554
|
return t;
|
|
6493
6555
|
}
|
|
6494
|
-
function
|
|
6556
|
+
function wn(e) {
|
|
6495
6557
|
const t = {};
|
|
6496
6558
|
return e.uploadDocumentFiles.forEach((n) => {
|
|
6497
6559
|
const a = `file_${n.id}`;
|
|
6498
|
-
t[a] =
|
|
6560
|
+
t[a] = en(n);
|
|
6499
6561
|
}), Ce.object(t);
|
|
6500
6562
|
}
|
|
6501
|
-
function
|
|
6563
|
+
function Nn(e) {
|
|
6502
6564
|
return Ce.any();
|
|
6503
6565
|
}
|
|
6504
|
-
function
|
|
6566
|
+
function tn(e) {
|
|
6505
6567
|
return Ce.string().min(1, "This question is required");
|
|
6506
6568
|
}
|
|
6507
|
-
function
|
|
6569
|
+
function Sn(e) {
|
|
6508
6570
|
const t = {};
|
|
6509
6571
|
return e.appropriatenessQuestions.forEach((n) => {
|
|
6510
6572
|
const a = `question_${n.id}`;
|
|
6511
|
-
t[a] =
|
|
6573
|
+
t[a] = tn();
|
|
6512
6574
|
}), Ce.object(t);
|
|
6513
6575
|
}
|
|
6514
|
-
const
|
|
6576
|
+
const Cn = Ce.any();
|
|
6515
6577
|
export {
|
|
6516
6578
|
lt as ALLOWED_LANGUAGES,
|
|
6517
|
-
|
|
6579
|
+
At as ApplicantProgressOnHoldReason,
|
|
6518
6580
|
ke as ApplicantProgressStatus,
|
|
6519
6581
|
Ut as ApplicantService,
|
|
6520
6582
|
Rt as ApplicantStatus,
|
|
6521
6583
|
Dt as AppropriatenessQuestionType,
|
|
6522
6584
|
Wt as AppropriatenessTestService,
|
|
6523
|
-
|
|
6524
|
-
|
|
6585
|
+
Jr as AppropriatenessTestStep,
|
|
6586
|
+
Ae as Badge,
|
|
6525
6587
|
Gt as BaseInformationService,
|
|
6526
6588
|
Q as Button,
|
|
6527
6589
|
j as Card,
|
|
@@ -6529,9 +6591,9 @@ export {
|
|
|
6529
6591
|
me as CardFooter,
|
|
6530
6592
|
ue as CardHeader,
|
|
6531
6593
|
$e as CountriesType,
|
|
6532
|
-
|
|
6594
|
+
xn as CreateApplicantForm,
|
|
6533
6595
|
Ot as CriteriaBuiltInType,
|
|
6534
|
-
|
|
6596
|
+
Bt as DEFAULT_VISIBLE_FIELDS,
|
|
6535
6597
|
Lt as DocumentReviewStatus,
|
|
6536
6598
|
_t as EndpointBuilder,
|
|
6537
6599
|
Ke as ErrorHandler,
|
|
@@ -6542,90 +6604,90 @@ export {
|
|
|
6542
6604
|
Ze as GenderType,
|
|
6543
6605
|
at as Header,
|
|
6544
6606
|
Ht as HttpClient,
|
|
6545
|
-
|
|
6607
|
+
Be as IdentityProviderManager,
|
|
6546
6608
|
Qt as IdentityService,
|
|
6547
6609
|
ve as IdentityVerificationProvider,
|
|
6548
|
-
|
|
6610
|
+
Zr as IdentityVerificationStep,
|
|
6549
6611
|
de as Input,
|
|
6550
6612
|
Vt as InvestorCategorizationService,
|
|
6551
|
-
|
|
6613
|
+
Vr as InvestorCategorizationStep,
|
|
6552
6614
|
fe as InvestorCategorizationType,
|
|
6553
6615
|
$t as InvestorCategoryType,
|
|
6554
6616
|
Pt as KycProcessStatus,
|
|
6555
6617
|
Le as KycStatus,
|
|
6556
6618
|
mt as KycStatusDisplay,
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6619
|
+
vn as KycWorkflow,
|
|
6620
|
+
Xr as Logo,
|
|
6621
|
+
yt as MetaKYCContext,
|
|
6560
6622
|
Ne as MetaKYCError,
|
|
6561
|
-
|
|
6562
|
-
|
|
6623
|
+
mn as MetaKYCProvider,
|
|
6624
|
+
Er as MultiSelect,
|
|
6563
6625
|
cr as OnfidoProvider,
|
|
6564
6626
|
Yt as OverviewService,
|
|
6565
|
-
|
|
6627
|
+
Hr as OverviewStep,
|
|
6566
6628
|
Ir as PhoneInput,
|
|
6567
6629
|
jt as QuestionnaireService,
|
|
6568
|
-
|
|
6630
|
+
Br as QuestionnaireStep,
|
|
6569
6631
|
De as ReviewStatus,
|
|
6570
6632
|
Mt as RiskCriteriaType,
|
|
6571
|
-
|
|
6633
|
+
It as RiskLevel,
|
|
6572
6634
|
qt as RiskScoringService,
|
|
6573
|
-
|
|
6635
|
+
Qr as RiskScoringStep,
|
|
6574
6636
|
dr as SardinAIProvider,
|
|
6575
6637
|
Re as SearchableSelect,
|
|
6576
6638
|
st as Select,
|
|
6577
6639
|
we as Spinner,
|
|
6578
6640
|
sr as StepRouter,
|
|
6579
6641
|
lr as SumsubProvider,
|
|
6580
|
-
|
|
6642
|
+
mr as ThemeManager,
|
|
6581
6643
|
ce as ThemePreset,
|
|
6582
6644
|
nr as ThemeService,
|
|
6583
6645
|
Kt as UploadDocumentService,
|
|
6584
|
-
|
|
6646
|
+
_r as UploadDocumentStep,
|
|
6585
6647
|
Ft as UserType,
|
|
6586
6648
|
Se as ValueDataType,
|
|
6587
6649
|
or as WorkflowOrchestrator,
|
|
6588
6650
|
Je as WorkflowResultType,
|
|
6589
6651
|
ir as WorkflowState,
|
|
6590
6652
|
J as WorkflowStepAction,
|
|
6591
|
-
|
|
6592
|
-
|
|
6653
|
+
Cn as appropriatenessTestSchema,
|
|
6654
|
+
fn as clearAllStorage,
|
|
6593
6655
|
gr as clearApplicantId,
|
|
6594
|
-
|
|
6656
|
+
br as clearWorkflowState,
|
|
6595
6657
|
oe as cn,
|
|
6596
6658
|
Jt as corporateTheme,
|
|
6597
|
-
|
|
6659
|
+
zt as defaultConfig,
|
|
6598
6660
|
he as defaultTheme,
|
|
6599
|
-
|
|
6661
|
+
pr as fileToBase64,
|
|
6600
6662
|
Zt as fintechTheme,
|
|
6601
6663
|
rt as formatFileSize,
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6664
|
+
Sn as generateAppropriatenessSchema,
|
|
6665
|
+
kn as generateQuestionnaireSchema,
|
|
6666
|
+
Nn as generateRiskScoringSchema,
|
|
6667
|
+
wn as generateUploadDocumentSchema,
|
|
6668
|
+
yn as getAcceptString,
|
|
6669
|
+
yr as getApplicantId,
|
|
6608
6670
|
We as getThemePreset,
|
|
6609
6671
|
gn as getWorkflowState,
|
|
6610
6672
|
Xt as healthcareTheme,
|
|
6611
|
-
|
|
6673
|
+
dn as isScriptLoaded,
|
|
6612
6674
|
ht as loadScript,
|
|
6613
6675
|
tr as minimalTheme,
|
|
6614
6676
|
er as modernTheme,
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6677
|
+
un as removeScript,
|
|
6678
|
+
hr as saveApplicantId,
|
|
6679
|
+
fr as saveWorkflowState,
|
|
6618
6680
|
rr as themePresets,
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6681
|
+
Cr as useApplicant,
|
|
6682
|
+
bn as useAppropriatenessTest,
|
|
6683
|
+
Nr as useIdentityVerification,
|
|
6684
|
+
xr as useKycWorkflow,
|
|
6685
|
+
ye as useMetaKYC,
|
|
6686
|
+
wr as useOverview,
|
|
6687
|
+
vr as useQuestionnaire,
|
|
6688
|
+
Sr as useRiskScoring,
|
|
6689
|
+
kr as useUploadDocument,
|
|
6690
|
+
pn as validateFileSize,
|
|
6691
|
+
hn as validateFileType
|
|
6630
6692
|
};
|
|
6631
6693
|
//# sourceMappingURL=index.js.map
|