@vpdev2/metakyc-sdk 1.0.76 → 1.0.77
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 +39 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +546 -509
- package/dist/index.js.map +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,40 @@ 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;
|
|
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
|
+
.metakyc-sdk input::placeholder,
|
|
1684
|
+
.metakyc-sdk textarea::placeholder {
|
|
1685
|
+
color: ${l} !important;
|
|
1686
|
+
opacity: 1 !important;
|
|
1687
|
+
}
|
|
1688
|
+
.metakyc-sdk input:not([type="color"]):not([type="checkbox"]):not([type="radio"]):focus,
|
|
1689
|
+
.metakyc-sdk select:focus,
|
|
1690
|
+
.metakyc-sdk textarea:focus,
|
|
1691
|
+
.metakyc-sdk .metakyc-searchable-select-trigger:focus {
|
|
1692
|
+
border-color: ${s} !important;
|
|
1693
|
+
outline-color: ${s} !important;
|
|
1694
|
+
box-shadow: 0 0 0 2px ${s}33 !important;
|
|
1695
|
+
}
|
|
1696
|
+
`;
|
|
1697
|
+
}
|
|
1698
|
+
class mr {
|
|
1670
1699
|
constructor(t) {
|
|
1671
1700
|
re(this, "currentTheme", he);
|
|
1672
1701
|
re(this, "customStyleElement", null);
|
|
1702
|
+
re(this, "inputStyleElement", null);
|
|
1673
1703
|
re(this, "container");
|
|
1674
1704
|
this.container = t || document.documentElement;
|
|
1675
1705
|
}
|
|
@@ -1710,8 +1740,8 @@ class ur {
|
|
|
1710
1740
|
"input-placeholder": t.inputPlaceholder || t.textMuted
|
|
1711
1741
|
};
|
|
1712
1742
|
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);
|
|
1743
|
+
l && this.container.style.setProperty(`--metakyc-${s}`, l);
|
|
1744
|
+
}), this.injectInputColors(t), (a = this.currentTheme.darkMode) != null && a.colors && this.applyDarkModeColors(this.currentTheme.darkMode.colors);
|
|
1715
1745
|
}
|
|
1716
1746
|
/**
|
|
1717
1747
|
* Apply dark mode color overrides
|
|
@@ -1743,6 +1773,13 @@ class ur {
|
|
|
1743
1773
|
this.container.style.setProperty(s, a);
|
|
1744
1774
|
});
|
|
1745
1775
|
}
|
|
1776
|
+
/**
|
|
1777
|
+
* Inject hard-coded CSS rules for inputs so the host/panel CSS cannot override them.
|
|
1778
|
+
* These rules are placed BEFORE any custom CSS so that custom CSS can still override them.
|
|
1779
|
+
*/
|
|
1780
|
+
injectInputColors(t) {
|
|
1781
|
+
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);
|
|
1782
|
+
}
|
|
1746
1783
|
/**
|
|
1747
1784
|
* Inject custom CSS into document
|
|
1748
1785
|
*/
|
|
@@ -1792,7 +1829,7 @@ class ur {
|
|
|
1792
1829
|
* Remove all custom styles
|
|
1793
1830
|
*/
|
|
1794
1831
|
cleanup() {
|
|
1795
|
-
this.customStyleElement && (this.customStyleElement.remove(), this.customStyleElement = null);
|
|
1832
|
+
this.inputStyleElement && (this.inputStyleElement.remove(), this.inputStyleElement = null), this.customStyleElement && (this.customStyleElement.remove(), this.customStyleElement = null);
|
|
1796
1833
|
}
|
|
1797
1834
|
/**
|
|
1798
1835
|
* Convert camelCase to kebab-case
|
|
@@ -1801,9 +1838,9 @@ class ur {
|
|
|
1801
1838
|
return t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1802
1839
|
}
|
|
1803
1840
|
}
|
|
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
|
|
1841
|
+
const yt = Nt(null), mn = ({ config: e, children: t }) => {
|
|
1842
|
+
const [n, a] = k(null), s = be.useRef(!1), l = be.useRef(!1), c = Ie(() => {
|
|
1843
|
+
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
1844
|
return {
|
|
1808
1845
|
httpClient: h,
|
|
1809
1846
|
applicantService: m,
|
|
@@ -1818,7 +1855,7 @@ const gt = Nt(null), un = ({ config: e, children: t }) => {
|
|
|
1818
1855
|
themeService: $,
|
|
1819
1856
|
themeManager: R
|
|
1820
1857
|
};
|
|
1821
|
-
}, [e]), u =
|
|
1858
|
+
}, [e]), u = Ie(() => ({
|
|
1822
1859
|
config: e,
|
|
1823
1860
|
...c,
|
|
1824
1861
|
currentTheme: n,
|
|
@@ -1854,15 +1891,15 @@ const gt = Nt(null), un = ({ config: e, children: t }) => {
|
|
|
1854
1891
|
}
|
|
1855
1892
|
})(), () => {
|
|
1856
1893
|
c.themeManager.cleanup();
|
|
1857
|
-
}), []), /* @__PURE__ */ r(
|
|
1894
|
+
}), []), /* @__PURE__ */ r(yt.Provider, { value: u, children: t });
|
|
1858
1895
|
};
|
|
1859
|
-
function
|
|
1860
|
-
const e = St(
|
|
1896
|
+
function ye() {
|
|
1897
|
+
const e = St(yt);
|
|
1861
1898
|
if (!e)
|
|
1862
1899
|
throw new Error("useMetaKYC must be used within a MetaKYCProvider");
|
|
1863
1900
|
return e;
|
|
1864
1901
|
}
|
|
1865
|
-
async function
|
|
1902
|
+
async function pr(e) {
|
|
1866
1903
|
return new Promise((t, n) => {
|
|
1867
1904
|
const a = new FileReader();
|
|
1868
1905
|
a.readAsDataURL(e), a.onload = () => {
|
|
@@ -1871,10 +1908,10 @@ async function mr(e) {
|
|
|
1871
1908
|
}, a.onerror = (s) => n(s);
|
|
1872
1909
|
});
|
|
1873
1910
|
}
|
|
1874
|
-
function
|
|
1911
|
+
function pn(e, t) {
|
|
1875
1912
|
return e.size <= t;
|
|
1876
1913
|
}
|
|
1877
|
-
function
|
|
1914
|
+
function hn(e, t) {
|
|
1878
1915
|
return t.split(",").map((a) => a.trim()).some((a) => {
|
|
1879
1916
|
if (a.endsWith("/*")) {
|
|
1880
1917
|
const s = a.slice(0, -2);
|
|
@@ -1888,26 +1925,26 @@ function rt(e) {
|
|
|
1888
1925
|
const t = 1024, n = ["Bytes", "KB", "MB", "GB"], a = Math.floor(Math.log(e) / Math.log(t));
|
|
1889
1926
|
return Math.round(e / Math.pow(t, a) * 100) / 100 + " " + n[a];
|
|
1890
1927
|
}
|
|
1891
|
-
function
|
|
1928
|
+
function yn(e) {
|
|
1892
1929
|
return e;
|
|
1893
1930
|
}
|
|
1894
1931
|
function oe(...e) {
|
|
1895
1932
|
return e.filter(Boolean).join(" ");
|
|
1896
1933
|
}
|
|
1897
|
-
const
|
|
1934
|
+
const ze = {
|
|
1898
1935
|
APPLICANT_ID: "metakyc_applicant_id",
|
|
1899
1936
|
WORKFLOW_STATE: "metakyc_workflow_state"
|
|
1900
1937
|
};
|
|
1901
|
-
function
|
|
1938
|
+
function hr(e) {
|
|
1902
1939
|
try {
|
|
1903
|
-
localStorage.setItem(
|
|
1940
|
+
localStorage.setItem(ze.APPLICANT_ID, e.toString());
|
|
1904
1941
|
} catch (t) {
|
|
1905
1942
|
console.warn("Failed to save applicant ID to storage:", t);
|
|
1906
1943
|
}
|
|
1907
1944
|
}
|
|
1908
|
-
function
|
|
1945
|
+
function yr() {
|
|
1909
1946
|
try {
|
|
1910
|
-
const e = localStorage.getItem(
|
|
1947
|
+
const e = localStorage.getItem(ze.APPLICANT_ID);
|
|
1911
1948
|
return e ? parseInt(e, 10) : null;
|
|
1912
1949
|
} catch (e) {
|
|
1913
1950
|
return console.warn("Failed to retrieve applicant ID from storage:", e), null;
|
|
@@ -1915,43 +1952,43 @@ function hr() {
|
|
|
1915
1952
|
}
|
|
1916
1953
|
function gr() {
|
|
1917
1954
|
try {
|
|
1918
|
-
localStorage.removeItem(
|
|
1955
|
+
localStorage.removeItem(ze.APPLICANT_ID);
|
|
1919
1956
|
} catch (e) {
|
|
1920
1957
|
console.warn("Failed to clear applicant ID from storage:", e);
|
|
1921
1958
|
}
|
|
1922
1959
|
}
|
|
1923
|
-
function
|
|
1960
|
+
function fr(e) {
|
|
1924
1961
|
try {
|
|
1925
|
-
localStorage.setItem(
|
|
1962
|
+
localStorage.setItem(ze.WORKFLOW_STATE, JSON.stringify(e));
|
|
1926
1963
|
} catch (t) {
|
|
1927
1964
|
console.warn("Failed to save workflow state to storage:", t);
|
|
1928
1965
|
}
|
|
1929
1966
|
}
|
|
1930
1967
|
function gn() {
|
|
1931
1968
|
try {
|
|
1932
|
-
const e = localStorage.getItem(
|
|
1969
|
+
const e = localStorage.getItem(ze.WORKFLOW_STATE);
|
|
1933
1970
|
return e ? JSON.parse(e) : null;
|
|
1934
1971
|
} catch (e) {
|
|
1935
1972
|
return console.warn("Failed to retrieve workflow state from storage:", e), null;
|
|
1936
1973
|
}
|
|
1937
1974
|
}
|
|
1938
|
-
function
|
|
1975
|
+
function br() {
|
|
1939
1976
|
try {
|
|
1940
|
-
localStorage.removeItem(
|
|
1977
|
+
localStorage.removeItem(ze.WORKFLOW_STATE);
|
|
1941
1978
|
} catch (e) {
|
|
1942
1979
|
console.warn("Failed to clear workflow state from storage:", e);
|
|
1943
1980
|
}
|
|
1944
1981
|
}
|
|
1945
|
-
function
|
|
1946
|
-
gr(),
|
|
1982
|
+
function fn() {
|
|
1983
|
+
gr(), br();
|
|
1947
1984
|
}
|
|
1948
|
-
function
|
|
1949
|
-
const { createOrchestrator: t } =
|
|
1985
|
+
function xr(e) {
|
|
1986
|
+
const { createOrchestrator: t } = ye(), [n, a] = k(null), [s, l] = k(!1), [c, u] = k(null), h = ee(null), m = e || yr();
|
|
1950
1987
|
ne(() => {
|
|
1951
1988
|
h.current || (h.current = t());
|
|
1952
1989
|
}, [t]), ne(() => {
|
|
1953
1990
|
var R;
|
|
1954
|
-
n && m && (
|
|
1991
|
+
n && m && (hr(m), fr({
|
|
1955
1992
|
applicantId: m,
|
|
1956
1993
|
currentStepOrder: (R = n.currentStep) == null ? void 0 : R.order,
|
|
1957
1994
|
status: n.status,
|
|
@@ -2055,8 +2092,8 @@ function br(e) {
|
|
|
2055
2092
|
orchestrator: h.current
|
|
2056
2093
|
};
|
|
2057
2094
|
}
|
|
2058
|
-
function
|
|
2059
|
-
const { questionnaireService: t, applicantService: n } =
|
|
2095
|
+
function vr(e) {
|
|
2096
|
+
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
2097
|
var P, $;
|
|
2061
2098
|
if (e) {
|
|
2062
2099
|
if (S.current) {
|
|
@@ -2073,8 +2110,8 @@ function xr(e) {
|
|
|
2073
2110
|
const Y = /* @__PURE__ */ new Map();
|
|
2074
2111
|
for (const N of T.questionnaireResults)
|
|
2075
2112
|
N.question && (($ = N.answers) != null && $.length) && Y.set(N.question.trim().toLowerCase(), N.answers);
|
|
2076
|
-
const X = {},
|
|
2077
|
-
for (const N of
|
|
2113
|
+
const X = {}, I = R.questionGroups.flatMap((N) => N.questions ?? []);
|
|
2114
|
+
for (const N of I) {
|
|
2078
2115
|
const H = N.text.trim().toLowerCase();
|
|
2079
2116
|
Y.has(H) && (X[N.id] = Y.get(H));
|
|
2080
2117
|
}
|
|
@@ -2114,8 +2151,8 @@ function xr(e) {
|
|
|
2114
2151
|
submit: F
|
|
2115
2152
|
};
|
|
2116
2153
|
}
|
|
2117
|
-
function
|
|
2118
|
-
const { uploadDocumentService: t } =
|
|
2154
|
+
function kr(e) {
|
|
2155
|
+
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
2156
|
if (e) {
|
|
2120
2157
|
if (f.current) {
|
|
2121
2158
|
console.log("[UploadDocument] Load already in progress, skipping...");
|
|
@@ -2158,8 +2195,8 @@ function vr(e) {
|
|
|
2158
2195
|
submit: D
|
|
2159
2196
|
};
|
|
2160
2197
|
}
|
|
2161
|
-
function
|
|
2162
|
-
const { appropriatenessTestService: t } =
|
|
2198
|
+
function bn(e) {
|
|
2199
|
+
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
2200
|
if (e) {
|
|
2164
2201
|
if (f.current) {
|
|
2165
2202
|
console.log("[AppropriatenessTest] Load already in progress, skipping...");
|
|
@@ -2203,8 +2240,8 @@ function fn(e) {
|
|
|
2203
2240
|
submit: D
|
|
2204
2241
|
};
|
|
2205
2242
|
}
|
|
2206
|
-
function
|
|
2207
|
-
const { overviewService: t } =
|
|
2243
|
+
function wr(e) {
|
|
2244
|
+
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
2245
|
if (e) {
|
|
2209
2246
|
if (v.current) {
|
|
2210
2247
|
console.log("[Overview] Load already in progress, skipping...");
|
|
@@ -2245,8 +2282,8 @@ function kr(e) {
|
|
|
2245
2282
|
passOverview: S
|
|
2246
2283
|
};
|
|
2247
2284
|
}
|
|
2248
|
-
function
|
|
2249
|
-
const { identityService: t } =
|
|
2285
|
+
function Nr(e) {
|
|
2286
|
+
const { identityService: t } = ye(), [n, a] = k(
|
|
2250
2287
|
null
|
|
2251
2288
|
), [s, l] = k(!1), [c, u] = k(null), h = ee(!1), m = V(
|
|
2252
2289
|
async (f, S) => {
|
|
@@ -2331,8 +2368,8 @@ function wr(e) {
|
|
|
2331
2368
|
restartIdentity: C
|
|
2332
2369
|
};
|
|
2333
2370
|
}
|
|
2334
|
-
function
|
|
2335
|
-
const { riskScoringService: t, applicantService: n } =
|
|
2371
|
+
function Sr(e) {
|
|
2372
|
+
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
2373
|
var R;
|
|
2337
2374
|
if (e) {
|
|
2338
2375
|
if (D.current) {
|
|
@@ -2346,15 +2383,15 @@ function Nr(e) {
|
|
|
2346
2383
|
n.getApplicantData(e).catch(() => null)
|
|
2347
2384
|
]);
|
|
2348
2385
|
if (s(T), (R = Y == null ? void 0 : Y.riskScoringResults) != null && R.length) {
|
|
2349
|
-
const X = Y.riskScoringResults[0],
|
|
2386
|
+
const X = Y.riskScoringResults[0], I = {};
|
|
2350
2387
|
for (const N of X.riskCriteriaResults ?? [])
|
|
2351
2388
|
if (N.riskCriteriaId != null && N.answer != null && N.answer !== "") {
|
|
2352
2389
|
const H = [...new Set(
|
|
2353
2390
|
N.answer.split(",").map((W) => W.trim()).filter((W) => W !== "")
|
|
2354
2391
|
)];
|
|
2355
|
-
H.length > 0 && (
|
|
2392
|
+
H.length > 0 && (I[N.riskCriteriaId] = H);
|
|
2356
2393
|
}
|
|
2357
|
-
c(
|
|
2394
|
+
c(I);
|
|
2358
2395
|
}
|
|
2359
2396
|
F.current = e;
|
|
2360
2397
|
} catch (T) {
|
|
@@ -2392,8 +2429,8 @@ function Nr(e) {
|
|
|
2392
2429
|
submit: $
|
|
2393
2430
|
};
|
|
2394
2431
|
}
|
|
2395
|
-
function
|
|
2396
|
-
const { applicantService: e, config: t } =
|
|
2432
|
+
function Cr() {
|
|
2433
|
+
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
2434
|
const b = Math.random() * 16 | 0;
|
|
2398
2435
|
return (S === "x" ? b : b & 3 | 8).toString(16);
|
|
2399
2436
|
}), m = V(
|
|
@@ -2605,7 +2642,7 @@ const j = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
|
|
|
2605
2642
|
...n,
|
|
2606
2643
|
children: e
|
|
2607
2644
|
}
|
|
2608
|
-
),
|
|
2645
|
+
), Ae = ({ children: e, variant: t = "default", className: n, ...a }) => /* @__PURE__ */ r(
|
|
2609
2646
|
"span",
|
|
2610
2647
|
{
|
|
2611
2648
|
className: oe(
|
|
@@ -2724,7 +2761,7 @@ const j = ({ children: e, className: t, ...n }) => /* @__PURE__ */ r(
|
|
|
2724
2761
|
] })
|
|
2725
2762
|
);
|
|
2726
2763
|
st.displayName = "Select";
|
|
2727
|
-
const ct = 280,
|
|
2764
|
+
const ct = 280, Er = ({
|
|
2728
2765
|
label: e,
|
|
2729
2766
|
value: t,
|
|
2730
2767
|
onChange: n,
|
|
@@ -2735,43 +2772,43 @@ const ct = 280, Cr = ({
|
|
|
2735
2772
|
}) => {
|
|
2736
2773
|
const [u, h] = k(!1), [m, v] = k(""), [C, f] = k(null), S = ee(null), b = ee(null), D = ee(null), F = V(() => {
|
|
2737
2774
|
if (!b.current) return null;
|
|
2738
|
-
const
|
|
2739
|
-
return { top: te ?
|
|
2775
|
+
const E = b.current.getBoundingClientRect(), te = window.innerHeight - E.bottom < ct && E.top > ct;
|
|
2776
|
+
return { top: te ? E.top : E.bottom + 4, left: E.left, width: E.width, openUp: te };
|
|
2740
2777
|
}, []), P = V(() => {
|
|
2741
2778
|
if (l) return;
|
|
2742
|
-
const
|
|
2743
|
-
|
|
2779
|
+
const E = F();
|
|
2780
|
+
E && f(E), h(!0);
|
|
2744
2781
|
}, [l, F]), $ = V(() => {
|
|
2745
2782
|
h(!1), v("");
|
|
2746
2783
|
}, []);
|
|
2747
2784
|
ne(() => {
|
|
2748
2785
|
if (!u) return;
|
|
2749
|
-
const
|
|
2750
|
-
var
|
|
2786
|
+
const E = (U) => {
|
|
2787
|
+
var ge, se;
|
|
2751
2788
|
const te = U.target;
|
|
2752
|
-
!((
|
|
2789
|
+
!((ge = S.current) != null && ge.contains(te)) && !((se = D.current) != null && se.contains(te)) && $();
|
|
2753
2790
|
};
|
|
2754
|
-
return document.addEventListener("mousedown",
|
|
2791
|
+
return document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E);
|
|
2755
2792
|
}, [u, $]), ne(() => {
|
|
2756
2793
|
if (!u) return;
|
|
2757
|
-
const
|
|
2794
|
+
const E = () => {
|
|
2758
2795
|
const U = F();
|
|
2759
2796
|
U && f(U);
|
|
2760
2797
|
};
|
|
2761
|
-
return window.addEventListener("scroll",
|
|
2762
|
-
window.removeEventListener("scroll",
|
|
2798
|
+
return window.addEventListener("scroll", E, !0), window.addEventListener("resize", E), () => {
|
|
2799
|
+
window.removeEventListener("scroll", E, !0), window.removeEventListener("resize", E);
|
|
2763
2800
|
};
|
|
2764
2801
|
}, [u, F]);
|
|
2765
2802
|
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 = (
|
|
2803
|
+
(E) => E.label.toLowerCase().includes(m.toLowerCase())
|
|
2804
|
+
), T = (E) => {
|
|
2805
|
+
l || n(t.includes(E) ? t.filter((U) => U !== E) : [...t, E]);
|
|
2806
|
+
}, Y = (E, U) => {
|
|
2807
|
+
U.stopPropagation(), l || n(t.filter((te) => te !== E));
|
|
2808
|
+
}, X = (E) => {
|
|
2772
2809
|
var U;
|
|
2773
|
-
return ((U = a.find((te) => te.value ===
|
|
2774
|
-
},
|
|
2810
|
+
return ((U = a.find((te) => te.value === E)) == null ? void 0 : U.label) || E;
|
|
2811
|
+
}, 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
2812
|
"div",
|
|
2776
2813
|
{
|
|
2777
2814
|
ref: D,
|
|
@@ -2795,10 +2832,10 @@ const ct = 280, Cr = ({
|
|
|
2795
2832
|
{
|
|
2796
2833
|
type: "text",
|
|
2797
2834
|
value: m,
|
|
2798
|
-
onChange: (
|
|
2835
|
+
onChange: (E) => v(E.target.value),
|
|
2799
2836
|
placeholder: "Search...",
|
|
2800
2837
|
autoFocus: !0,
|
|
2801
|
-
onClick: (
|
|
2838
|
+
onClick: (E) => E.stopPropagation(),
|
|
2802
2839
|
className: "metakyc-multiselect-search w-full",
|
|
2803
2840
|
style: {
|
|
2804
2841
|
display: "block",
|
|
@@ -2814,12 +2851,12 @@ const ct = 280, Cr = ({
|
|
|
2814
2851
|
}
|
|
2815
2852
|
}
|
|
2816
2853
|
) }),
|
|
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(
|
|
2854
|
+
/* @__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) => {
|
|
2855
|
+
const U = t.includes(E.value);
|
|
2819
2856
|
return /* @__PURE__ */ o(
|
|
2820
2857
|
"li",
|
|
2821
2858
|
{
|
|
2822
|
-
onClick: () => T(
|
|
2859
|
+
onClick: () => T(E.value),
|
|
2823
2860
|
className: "metakyc-multiselect-option",
|
|
2824
2861
|
style: {
|
|
2825
2862
|
display: "flex",
|
|
@@ -2829,7 +2866,7 @@ const ct = 280, Cr = ({
|
|
|
2829
2866
|
fontSize: "13px",
|
|
2830
2867
|
cursor: "pointer",
|
|
2831
2868
|
backgroundColor: U ? L : "transparent",
|
|
2832
|
-
color: U ?
|
|
2869
|
+
color: U ? z : W,
|
|
2833
2870
|
userSelect: "none"
|
|
2834
2871
|
},
|
|
2835
2872
|
onMouseEnter: (te) => {
|
|
@@ -2845,13 +2882,13 @@ const ct = 280, Cr = ({
|
|
|
2845
2882
|
type: "checkbox",
|
|
2846
2883
|
checked: U,
|
|
2847
2884
|
readOnly: !0,
|
|
2848
|
-
style: { accentColor:
|
|
2885
|
+
style: { accentColor: z, pointerEvents: "none", flexShrink: 0 }
|
|
2849
2886
|
}
|
|
2850
2887
|
),
|
|
2851
|
-
/* @__PURE__ */ r("span", { children:
|
|
2888
|
+
/* @__PURE__ */ r("span", { children: E.label })
|
|
2852
2889
|
]
|
|
2853
2890
|
},
|
|
2854
|
-
|
|
2891
|
+
E.value
|
|
2855
2892
|
);
|
|
2856
2893
|
}) }),
|
|
2857
2894
|
t.length > 0 && /* @__PURE__ */ r("div", { style: { padding: "6px 12px", borderTop: `1px solid ${H}` }, children: /* @__PURE__ */ o(
|
|
@@ -2908,7 +2945,7 @@ const ct = 280, Cr = ({
|
|
|
2908
2945
|
style: { color: "var(--metakyc-text-secondary, #9ca3af)" },
|
|
2909
2946
|
children: s
|
|
2910
2947
|
}
|
|
2911
|
-
) : /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((
|
|
2948
|
+
) : /* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((E) => /* @__PURE__ */ o(
|
|
2912
2949
|
"span",
|
|
2913
2950
|
{
|
|
2914
2951
|
className: "metakyc-multiselect-chip inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium",
|
|
@@ -2917,12 +2954,12 @@ const ct = 280, Cr = ({
|
|
|
2917
2954
|
color: "var(--metakyc-primary, #2563eb)"
|
|
2918
2955
|
},
|
|
2919
2956
|
children: [
|
|
2920
|
-
X(
|
|
2957
|
+
X(E),
|
|
2921
2958
|
!l && /* @__PURE__ */ r(
|
|
2922
2959
|
"button",
|
|
2923
2960
|
{
|
|
2924
2961
|
type: "button",
|
|
2925
|
-
onClick: (U) => Y(
|
|
2962
|
+
onClick: (U) => Y(E, U),
|
|
2926
2963
|
className: "metakyc-multiselect-chip-remove",
|
|
2927
2964
|
style: {
|
|
2928
2965
|
background: "transparent",
|
|
@@ -2948,7 +2985,7 @@ const ct = 280, Cr = ({
|
|
|
2948
2985
|
)
|
|
2949
2986
|
]
|
|
2950
2987
|
},
|
|
2951
|
-
|
|
2988
|
+
E
|
|
2952
2989
|
)) }),
|
|
2953
2990
|
/* @__PURE__ */ r(
|
|
2954
2991
|
"span",
|
|
@@ -2991,13 +3028,13 @@ const ct = 280, Cr = ({
|
|
|
2991
3028
|
M && D(M), C(!0);
|
|
2992
3029
|
}, [u, T]), X = V(() => {
|
|
2993
3030
|
C(!1), S("");
|
|
2994
|
-
}, []),
|
|
3031
|
+
}, []), I = () => v ? X() : Y();
|
|
2995
3032
|
ne(() => {
|
|
2996
3033
|
if (!v) return;
|
|
2997
3034
|
const M = (Z) => {
|
|
2998
|
-
var
|
|
3035
|
+
var Ee, Pe;
|
|
2999
3036
|
const ie = Z.target;
|
|
3000
|
-
!((
|
|
3037
|
+
!((Ee = F.current) != null && Ee.contains(ie)) && !((Pe = $.current) != null && Pe.contains(ie)) && X();
|
|
3001
3038
|
};
|
|
3002
3039
|
return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
|
|
3003
3040
|
}, [v, X]), ne(() => {
|
|
@@ -3019,7 +3056,7 @@ const ct = 280, Cr = ({
|
|
|
3019
3056
|
(M) => M.label.toLowerCase().includes(f.toLowerCase()) || M.value.toLowerCase().includes(f.toLowerCase())
|
|
3020
3057
|
), H = (se = a.find((M) => M.value === l)) == null ? void 0 : se.label, W = (M, Z) => {
|
|
3021
3058
|
u || Z || (c(M), X());
|
|
3022
|
-
}, w = P.current ? getComputedStyle(P.current) : null,
|
|
3059
|
+
}, 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
3060
|
"div",
|
|
3024
3061
|
{
|
|
3025
3062
|
ref: $,
|
|
@@ -3034,7 +3071,7 @@ const ct = 280, Cr = ({
|
|
|
3034
3071
|
borderRadius: "8px",
|
|
3035
3072
|
boxShadow: "0 4px 16px rgba(0,0,0,0.18)",
|
|
3036
3073
|
border: `1px solid ${L}`,
|
|
3037
|
-
backgroundColor:
|
|
3074
|
+
backgroundColor: z,
|
|
3038
3075
|
overflow: "hidden"
|
|
3039
3076
|
},
|
|
3040
3077
|
children: [
|
|
@@ -3055,7 +3092,7 @@ const ct = 280, Cr = ({
|
|
|
3055
3092
|
fontSize: "13px",
|
|
3056
3093
|
borderRadius: "6px",
|
|
3057
3094
|
border: `1px solid ${L}`,
|
|
3058
|
-
backgroundColor:
|
|
3095
|
+
backgroundColor: z,
|
|
3059
3096
|
color: O,
|
|
3060
3097
|
outline: "none",
|
|
3061
3098
|
boxSizing: "border-box"
|
|
@@ -3085,7 +3122,7 @@ const ct = 280, Cr = ({
|
|
|
3085
3122
|
cursor: M.disabled ? "not-allowed" : "pointer",
|
|
3086
3123
|
opacity: M.disabled ? 0.4 : 1,
|
|
3087
3124
|
backgroundColor: Z ? U : "transparent",
|
|
3088
|
-
color: Z ?
|
|
3125
|
+
color: Z ? E : O,
|
|
3089
3126
|
userSelect: "none"
|
|
3090
3127
|
},
|
|
3091
3128
|
onMouseEnter: (ie) => {
|
|
@@ -3127,9 +3164,9 @@ const ct = 280, Cr = ({
|
|
|
3127
3164
|
ref: P,
|
|
3128
3165
|
role: "button",
|
|
3129
3166
|
tabIndex: u ? -1 : 0,
|
|
3130
|
-
onClick:
|
|
3167
|
+
onClick: I,
|
|
3131
3168
|
onKeyDown: (M) => {
|
|
3132
|
-
(M.key === "Enter" || M.key === " ") && (M.preventDefault(),
|
|
3169
|
+
(M.key === "Enter" || M.key === " ") && (M.preventDefault(), I()), M.key === "Escape" && X();
|
|
3133
3170
|
},
|
|
3134
3171
|
className: oe(
|
|
3135
3172
|
"metakyc-searchable-select-trigger",
|
|
@@ -3159,7 +3196,7 @@ const ct = 280, Cr = ({
|
|
|
3159
3196
|
]
|
|
3160
3197
|
}
|
|
3161
3198
|
),
|
|
3162
|
-
typeof document < "u" &&
|
|
3199
|
+
typeof document < "u" && ge ? it(ge, document.body) : null,
|
|
3163
3200
|
t && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-error, #ef4444)" }, children: t }),
|
|
3164
3201
|
!t && n && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n })
|
|
3165
3202
|
]
|
|
@@ -3362,21 +3399,21 @@ Ir.displayName = "PhoneInput";
|
|
|
3362
3399
|
* This source code is licensed under the ISC license.
|
|
3363
3400
|
* See the LICENSE file in the root directory of this source tree.
|
|
3364
3401
|
*/
|
|
3365
|
-
const
|
|
3402
|
+
const gt = (...e) => e.filter((t, n, a) => !!t && t.trim() !== "" && a.indexOf(t) === n).join(" ").trim();
|
|
3366
3403
|
/**
|
|
3367
3404
|
* @license lucide-react v0.574.0 - ISC
|
|
3368
3405
|
*
|
|
3369
3406
|
* This source code is licensed under the ISC license.
|
|
3370
3407
|
* See the LICENSE file in the root directory of this source tree.
|
|
3371
3408
|
*/
|
|
3372
|
-
const
|
|
3409
|
+
const Rr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
3373
3410
|
/**
|
|
3374
3411
|
* @license lucide-react v0.574.0 - ISC
|
|
3375
3412
|
*
|
|
3376
3413
|
* This source code is licensed under the ISC license.
|
|
3377
3414
|
* See the LICENSE file in the root directory of this source tree.
|
|
3378
3415
|
*/
|
|
3379
|
-
const
|
|
3416
|
+
const Pr = (e) => e.replace(
|
|
3380
3417
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
3381
3418
|
(t, n, a) => a ? a.toUpperCase() : n.toLowerCase()
|
|
3382
3419
|
);
|
|
@@ -3387,7 +3424,7 @@ const Rr = (e) => e.replace(
|
|
|
3387
3424
|
* See the LICENSE file in the root directory of this source tree.
|
|
3388
3425
|
*/
|
|
3389
3426
|
const ut = (e) => {
|
|
3390
|
-
const t =
|
|
3427
|
+
const t = Pr(e);
|
|
3391
3428
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
3392
3429
|
};
|
|
3393
3430
|
/**
|
|
@@ -3396,7 +3433,7 @@ const ut = (e) => {
|
|
|
3396
3433
|
* This source code is licensed under the ISC license.
|
|
3397
3434
|
* See the LICENSE file in the root directory of this source tree.
|
|
3398
3435
|
*/
|
|
3399
|
-
var
|
|
3436
|
+
var Fr = {
|
|
3400
3437
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3401
3438
|
width: 24,
|
|
3402
3439
|
height: 24,
|
|
@@ -3413,7 +3450,7 @@ var Pr = {
|
|
|
3413
3450
|
* This source code is licensed under the ISC license.
|
|
3414
3451
|
* See the LICENSE file in the root directory of this source tree.
|
|
3415
3452
|
*/
|
|
3416
|
-
const
|
|
3453
|
+
const Tr = (e) => {
|
|
3417
3454
|
for (const t in e)
|
|
3418
3455
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
3419
3456
|
return !0;
|
|
@@ -3425,7 +3462,7 @@ const Fr = (e) => {
|
|
|
3425
3462
|
* This source code is licensed under the ISC license.
|
|
3426
3463
|
* See the LICENSE file in the root directory of this source tree.
|
|
3427
3464
|
*/
|
|
3428
|
-
const
|
|
3465
|
+
const Lr = Ge(
|
|
3429
3466
|
({
|
|
3430
3467
|
color: e = "currentColor",
|
|
3431
3468
|
size: t = 24,
|
|
@@ -3439,13 +3476,13 @@ const Tr = Ge(
|
|
|
3439
3476
|
"svg",
|
|
3440
3477
|
{
|
|
3441
3478
|
ref: h,
|
|
3442
|
-
...
|
|
3479
|
+
...Fr,
|
|
3443
3480
|
width: t,
|
|
3444
3481
|
height: t,
|
|
3445
3482
|
stroke: e,
|
|
3446
3483
|
strokeWidth: a ? Number(n) * 24 / Number(t) : n,
|
|
3447
|
-
className:
|
|
3448
|
-
...!l && !
|
|
3484
|
+
className: gt("lucide", s),
|
|
3485
|
+
...!l && !Tr(u) && { "aria-hidden": "true" },
|
|
3449
3486
|
...u
|
|
3450
3487
|
},
|
|
3451
3488
|
[
|
|
@@ -3462,11 +3499,11 @@ const Tr = Ge(
|
|
|
3462
3499
|
*/
|
|
3463
3500
|
const ft = (e, t) => {
|
|
3464
3501
|
const n = Ge(
|
|
3465
|
-
({ className: a, ...s }, l) => nt(
|
|
3502
|
+
({ className: a, ...s }, l) => nt(Lr, {
|
|
3466
3503
|
ref: l,
|
|
3467
3504
|
iconNode: t,
|
|
3468
|
-
className:
|
|
3469
|
-
`lucide-${
|
|
3505
|
+
className: gt(
|
|
3506
|
+
`lucide-${Rr(ut(e))}`,
|
|
3470
3507
|
`lucide-${e}`,
|
|
3471
3508
|
a
|
|
3472
3509
|
),
|
|
@@ -3481,15 +3518,15 @@ const ft = (e, t) => {
|
|
|
3481
3518
|
* This source code is licensed under the ISC license.
|
|
3482
3519
|
* See the LICENSE file in the root directory of this source tree.
|
|
3483
3520
|
*/
|
|
3484
|
-
const
|
|
3521
|
+
const Dr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], bt = ft("chevron-left", Dr);
|
|
3485
3522
|
/**
|
|
3486
3523
|
* @license lucide-react v0.574.0 - ISC
|
|
3487
3524
|
*
|
|
3488
3525
|
* This source code is licensed under the ISC license.
|
|
3489
3526
|
* See the LICENSE file in the root directory of this source tree.
|
|
3490
3527
|
*/
|
|
3491
|
-
const
|
|
3492
|
-
function
|
|
3528
|
+
const Mr = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], xt = ft("chevron-right", Mr);
|
|
3529
|
+
function Or(e, t) {
|
|
3493
3530
|
const n = !t || t.length === 0 || t.every((a) => !a || !a.trim());
|
|
3494
3531
|
if (e.isRequired && n)
|
|
3495
3532
|
return e.errorMessage || "This field is required";
|
|
@@ -3518,7 +3555,7 @@ function Mr(e, t) {
|
|
|
3518
3555
|
}
|
|
3519
3556
|
return null;
|
|
3520
3557
|
}
|
|
3521
|
-
function
|
|
3558
|
+
function $r(e) {
|
|
3522
3559
|
const t = e.flatMap(
|
|
3523
3560
|
(a, s) => (a.questions ?? []).map((l, c) => ({ question: l, groupIndex: s, qIdx: c }))
|
|
3524
3561
|
), n = /* @__PURE__ */ new Map();
|
|
@@ -3528,38 +3565,38 @@ function Or(e) {
|
|
|
3528
3565
|
}
|
|
3529
3566
|
return Array.from(n.entries()).sort(([a], [s]) => a - s).map(([, a]) => a);
|
|
3530
3567
|
}
|
|
3531
|
-
const
|
|
3568
|
+
const Br = ({
|
|
3532
3569
|
applicantId: e,
|
|
3533
3570
|
onComplete: t,
|
|
3534
3571
|
onBack: n
|
|
3535
3572
|
}) => {
|
|
3536
|
-
const { questionnaire: a, initialAnswers: s, isLoading: l, isSubmitting: c, error: u, submit: h } =
|
|
3573
|
+
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
3574
|
be.useEffect(() => {
|
|
3538
3575
|
s && Object.keys(s).length > 0 && Object.keys(m).length === 0 && v(s);
|
|
3539
3576
|
}, [s]);
|
|
3540
|
-
const D =
|
|
3541
|
-
() => a ?
|
|
3577
|
+
const D = Ie(
|
|
3578
|
+
() => a ? $r(a.questionGroups) : [],
|
|
3542
3579
|
[a]
|
|
3543
|
-
), F = S === D.length - 1, P = D[S] ?? [], $ = V((
|
|
3544
|
-
v((H) => ({ ...H, [
|
|
3580
|
+
), F = S === D.length - 1, P = D[S] ?? [], $ = V((I, N) => {
|
|
3581
|
+
v((H) => ({ ...H, [I]: N })), f((H) => {
|
|
3545
3582
|
const W = { ...H };
|
|
3546
|
-
return delete W[
|
|
3583
|
+
return delete W[I], W;
|
|
3547
3584
|
});
|
|
3548
3585
|
}, []), R = V(() => {
|
|
3549
|
-
const
|
|
3586
|
+
const I = {};
|
|
3550
3587
|
for (const { question: N } of P) {
|
|
3551
|
-
const H =
|
|
3552
|
-
H && (
|
|
3588
|
+
const H = Or(N, m[N.id] ?? []);
|
|
3589
|
+
H && (I[N.id] = H);
|
|
3553
3590
|
}
|
|
3554
|
-
return f((N) => ({ ...N, ...
|
|
3591
|
+
return f((N) => ({ ...N, ...I })), Object.keys(I).length === 0;
|
|
3555
3592
|
}, [P, m]), T = () => {
|
|
3556
|
-
R() && b((
|
|
3593
|
+
R() && b((I) => I + 1);
|
|
3557
3594
|
}, Y = () => {
|
|
3558
|
-
S > 0 ? b((
|
|
3595
|
+
S > 0 ? b((I) => I - 1) : n == null || n();
|
|
3559
3596
|
}, X = async () => {
|
|
3560
3597
|
if (!(!R() || !a))
|
|
3561
3598
|
try {
|
|
3562
|
-
const
|
|
3599
|
+
const I = a.questionGroups.flatMap(
|
|
3563
3600
|
(H) => (H.questions ?? []).map((W) => ({
|
|
3564
3601
|
questionId: W.id,
|
|
3565
3602
|
values: m[W.id] ?? []
|
|
@@ -3567,11 +3604,11 @@ const $r = ({
|
|
|
3567
3604
|
), N = {
|
|
3568
3605
|
applicantId: e,
|
|
3569
3606
|
questionnarieId: a.id,
|
|
3570
|
-
questionResults:
|
|
3607
|
+
questionResults: I
|
|
3571
3608
|
};
|
|
3572
3609
|
await h(N), t == null || t();
|
|
3573
|
-
} catch (
|
|
3574
|
-
console.error("Questionnaire submit error:",
|
|
3610
|
+
} catch (I) {
|
|
3611
|
+
console.error("Questionnaire submit error:", I);
|
|
3575
3612
|
}
|
|
3576
3613
|
};
|
|
3577
3614
|
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 +3625,7 @@ const $r = ({
|
|
|
3588
3625
|
" of ",
|
|
3589
3626
|
D.length
|
|
3590
3627
|
] }),
|
|
3591
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: D.map((
|
|
3628
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: D.map((I, N) => /* @__PURE__ */ r(
|
|
3592
3629
|
"div",
|
|
3593
3630
|
{
|
|
3594
3631
|
className: "rounded-full transition-all duration-200",
|
|
@@ -3602,15 +3639,15 @@ const $r = ({
|
|
|
3602
3639
|
)) })
|
|
3603
3640
|
] })
|
|
3604
3641
|
] }),
|
|
3605
|
-
/* @__PURE__ */ r(K, { className: "space-y-6", children: P.map(({ question:
|
|
3642
|
+
/* @__PURE__ */ r(K, { className: "space-y-6", children: P.map(({ question: I }) => /* @__PURE__ */ r(
|
|
3606
3643
|
zr,
|
|
3607
3644
|
{
|
|
3608
|
-
question:
|
|
3609
|
-
value: m[
|
|
3610
|
-
error: C[
|
|
3611
|
-
onChange: (N) => $(
|
|
3645
|
+
question: I,
|
|
3646
|
+
value: m[I.id] ?? [],
|
|
3647
|
+
error: C[I.id],
|
|
3648
|
+
onChange: (N) => $(I.id, N)
|
|
3612
3649
|
},
|
|
3613
|
-
|
|
3650
|
+
I.id
|
|
3614
3651
|
)) }),
|
|
3615
3652
|
/* @__PURE__ */ o(me, { className: "flex items-center justify-between", children: [
|
|
3616
3653
|
/* @__PURE__ */ o(
|
|
@@ -3756,19 +3793,19 @@ const $r = ({
|
|
|
3756
3793
|
] }),
|
|
3757
3794
|
n && l === "text" && null
|
|
3758
3795
|
] });
|
|
3759
|
-
},
|
|
3796
|
+
}, _r = ({
|
|
3760
3797
|
applicantId: e,
|
|
3761
3798
|
onComplete: t,
|
|
3762
3799
|
onBack: n
|
|
3763
3800
|
}) => {
|
|
3764
|
-
const { uploadDocument: a, isLoading: s, isSubmitting: l, error: c, submit: u } =
|
|
3801
|
+
const { uploadDocument: a, isLoading: s, isSubmitting: l, error: c, submit: u } = kr(e), [h, m] = k({}), v = async (C) => {
|
|
3765
3802
|
if (C.preventDefault(), !a) return;
|
|
3766
3803
|
const f = await Promise.all(
|
|
3767
3804
|
a.uploadDocumentFiles.map(async (b) => {
|
|
3768
3805
|
const D = h[b.id] || [], F = await Promise.all(
|
|
3769
3806
|
D.map(async (P) => ({
|
|
3770
3807
|
fileName: P.name,
|
|
3771
|
-
fileData: await
|
|
3808
|
+
fileData: await pr(P)
|
|
3772
3809
|
}))
|
|
3773
3810
|
);
|
|
3774
3811
|
return {
|
|
@@ -3810,8 +3847,8 @@ const $r = ({
|
|
|
3810
3847
|
/* @__PURE__ */ r(Q, { type: "submit", isLoading: l, children: "Continue" })
|
|
3811
3848
|
] })
|
|
3812
3849
|
] }) }) : null;
|
|
3813
|
-
},
|
|
3814
|
-
const { overview: a, isLoading: s, isSubmitting: l, error: c, passOverview: u } =
|
|
3850
|
+
}, Hr = ({ applicantId: e, onComplete: t, onBack: n }) => {
|
|
3851
|
+
const { overview: a, isLoading: s, isSubmitting: l, error: c, passOverview: u } = wr(e), h = async () => {
|
|
3815
3852
|
await u(), t == null || t();
|
|
3816
3853
|
};
|
|
3817
3854
|
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 +3884,7 @@ const $r = ({
|
|
|
3847
3884
|
] })
|
|
3848
3885
|
] }) : null;
|
|
3849
3886
|
};
|
|
3850
|
-
function
|
|
3887
|
+
function Ur(e) {
|
|
3851
3888
|
const t = (e ?? "en").toLowerCase().replace("_", "-");
|
|
3852
3889
|
try {
|
|
3853
3890
|
return Intl.NumberFormat.supportedLocalesOf([t]), t;
|
|
@@ -3855,11 +3892,11 @@ function Hr(e) {
|
|
|
3855
3892
|
return "en";
|
|
3856
3893
|
}
|
|
3857
3894
|
}
|
|
3858
|
-
function
|
|
3895
|
+
function jr(e) {
|
|
3859
3896
|
return e.valueDataType === Se.Money && Array.isArray(e.defaultValues) && e.defaultValues.length > 0;
|
|
3860
3897
|
}
|
|
3861
|
-
function
|
|
3862
|
-
const n = new Intl.NumberFormat(
|
|
3898
|
+
function Kr(e, t) {
|
|
3899
|
+
const n = new Intl.NumberFormat(Ur(t), {
|
|
3863
3900
|
minimumFractionDigits: 0,
|
|
3864
3901
|
maximumFractionDigits: 2
|
|
3865
3902
|
});
|
|
@@ -3868,7 +3905,7 @@ function jr(e, t) {
|
|
|
3868
3905
|
return isNaN(s) ? a : n.format(s);
|
|
3869
3906
|
});
|
|
3870
3907
|
}
|
|
3871
|
-
function
|
|
3908
|
+
function Wr(e, t) {
|
|
3872
3909
|
const n = !t || t.length === 0 || t.every((a) => !a || !a.trim());
|
|
3873
3910
|
if (e.isRequired && n)
|
|
3874
3911
|
return e.errorMessage || `${e.displayName} is required`;
|
|
@@ -3898,50 +3935,50 @@ function Kr(e, t) {
|
|
|
3898
3935
|
}
|
|
3899
3936
|
return null;
|
|
3900
3937
|
}
|
|
3901
|
-
function
|
|
3938
|
+
function Yr(e) {
|
|
3902
3939
|
const t = /* @__PURE__ */ new Map();
|
|
3903
3940
|
return e.forEach((n, a) => {
|
|
3904
3941
|
const s = n.pageNumber != null && n.pageNumber > 0 ? n.pageNumber : 1;
|
|
3905
3942
|
t.has(s) || t.set(s, []), t.get(s).push({ criterion: n, idx: a });
|
|
3906
3943
|
}), Array.from(t.entries()).sort(([n], [a]) => n - a).map(([, n]) => n);
|
|
3907
3944
|
}
|
|
3908
|
-
function
|
|
3945
|
+
function qr(e) {
|
|
3909
3946
|
return e.builtInType === 1 ? "country" : !e.defaultValues || e.defaultValues.length === 0 ? "text" : e.multipleValue ? "checkbox" : "radio";
|
|
3910
3947
|
}
|
|
3911
|
-
const
|
|
3948
|
+
const Qr = ({
|
|
3912
3949
|
applicantId: e,
|
|
3913
3950
|
onComplete: t,
|
|
3914
3951
|
onBack: n
|
|
3915
3952
|
}) => {
|
|
3916
|
-
const { config: a } =
|
|
3953
|
+
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
3954
|
be.useEffect(() => {
|
|
3918
3955
|
c && Object.keys(c).length > 0 && Object.keys(C).length === 0 && f(c);
|
|
3919
3956
|
}, [c]);
|
|
3920
|
-
const R =
|
|
3921
|
-
() => l && l.length > 0 ?
|
|
3957
|
+
const R = Ie(
|
|
3958
|
+
() => l && l.length > 0 ? Yr(l) : [],
|
|
3922
3959
|
[l]
|
|
3923
3960
|
), T = D === R.length - 1, Y = R[D] ?? [];
|
|
3924
3961
|
be.useEffect(() => {
|
|
3925
3962
|
!u && l && l.length === 0 && !P && !h && ($(!0), v({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
|
|
3926
3963
|
}, [u, l, P, h, v, e, t]);
|
|
3927
|
-
const X = V((w,
|
|
3928
|
-
f((L) => ({ ...L, [w]:
|
|
3964
|
+
const X = V((w, z) => {
|
|
3965
|
+
f((L) => ({ ...L, [w]: z })), b((L) => {
|
|
3929
3966
|
const O = { ...L };
|
|
3930
3967
|
return delete O[w], O;
|
|
3931
3968
|
});
|
|
3932
|
-
}, []),
|
|
3969
|
+
}, []), I = V(() => {
|
|
3933
3970
|
const w = {};
|
|
3934
|
-
for (const { criterion:
|
|
3935
|
-
const L =
|
|
3936
|
-
L && (w[
|
|
3971
|
+
for (const { criterion: z } of Y) {
|
|
3972
|
+
const L = Wr(z, C[z.id] ?? []);
|
|
3973
|
+
L && (w[z.id] = L);
|
|
3937
3974
|
}
|
|
3938
|
-
return b((
|
|
3975
|
+
return b((z) => ({ ...z, ...w })), Object.keys(w).length === 0;
|
|
3939
3976
|
}, [Y, C]), N = () => {
|
|
3940
|
-
|
|
3977
|
+
I() && F((w) => w + 1);
|
|
3941
3978
|
}, H = () => {
|
|
3942
3979
|
D > 0 ? F((w) => w - 1) : n == null || n();
|
|
3943
3980
|
}, W = async () => {
|
|
3944
|
-
if (!(!
|
|
3981
|
+
if (!(!I() || !l))
|
|
3945
3982
|
try {
|
|
3946
3983
|
const w = l.map((L) => {
|
|
3947
3984
|
const O = (C[L.id] ?? []).filter((G) => G && G.trim());
|
|
@@ -3972,28 +4009,28 @@ const qr = ({
|
|
|
3972
4009
|
" of ",
|
|
3973
4010
|
R.length
|
|
3974
4011
|
] }),
|
|
3975
|
-
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: R.map((w,
|
|
4012
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5", children: R.map((w, z) => /* @__PURE__ */ r(
|
|
3976
4013
|
"div",
|
|
3977
4014
|
{
|
|
3978
4015
|
className: "rounded-full transition-all duration-200",
|
|
3979
4016
|
style: {
|
|
3980
4017
|
height: "6px",
|
|
3981
|
-
width:
|
|
3982
|
-
backgroundColor:
|
|
4018
|
+
width: z === D ? "20px" : "6px",
|
|
4019
|
+
backgroundColor: z <= D ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"
|
|
3983
4020
|
}
|
|
3984
4021
|
},
|
|
3985
|
-
|
|
4022
|
+
z
|
|
3986
4023
|
)) })
|
|
3987
4024
|
] })
|
|
3988
4025
|
] }),
|
|
3989
4026
|
/* @__PURE__ */ r(K, { className: "space-y-6", children: Y.map(({ criterion: w }) => /* @__PURE__ */ r(
|
|
3990
|
-
|
|
4027
|
+
Gr,
|
|
3991
4028
|
{
|
|
3992
4029
|
criterion: w,
|
|
3993
4030
|
value: C[w.id] ?? [],
|
|
3994
4031
|
error: S[w.id],
|
|
3995
4032
|
locale: s,
|
|
3996
|
-
onChange: (
|
|
4033
|
+
onChange: (z) => X(w.id, z)
|
|
3997
4034
|
},
|
|
3998
4035
|
w.id
|
|
3999
4036
|
)) }),
|
|
@@ -4026,8 +4063,8 @@ const qr = ({
|
|
|
4026
4063
|
] }),
|
|
4027
4064
|
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
4065
|
] }) : null;
|
|
4029
|
-
},
|
|
4030
|
-
const l =
|
|
4066
|
+
}, Gr = ({ criterion: e, value: t, error: n, locale: a, onChange: s }) => {
|
|
4067
|
+
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
4068
|
return /* @__PURE__ */ o("div", { className: "space-y-2", children: [
|
|
4032
4069
|
/* @__PURE__ */ o("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
|
|
4033
4070
|
e.displayName,
|
|
@@ -4143,12 +4180,12 @@ const qr = ({
|
|
|
4143
4180
|
}
|
|
4144
4181
|
)
|
|
4145
4182
|
] });
|
|
4146
|
-
},
|
|
4183
|
+
}, Vr = ({
|
|
4147
4184
|
applicantId: e,
|
|
4148
4185
|
onComplete: t,
|
|
4149
4186
|
onBack: n
|
|
4150
4187
|
}) => {
|
|
4151
|
-
const { investorCategorizationService: a } =
|
|
4188
|
+
const { investorCategorizationService: a } = ye(), [s, l] = k(null), [c, u] = k(!1), [h, m] = k(null);
|
|
4152
4189
|
return /* @__PURE__ */ r("form", { onSubmit: async (C) => {
|
|
4153
4190
|
if (C.preventDefault(), s === null) {
|
|
4154
4191
|
m("Please select an investor type");
|
|
@@ -4281,12 +4318,12 @@ const qr = ({
|
|
|
4281
4318
|
)
|
|
4282
4319
|
] })
|
|
4283
4320
|
] }) });
|
|
4284
|
-
},
|
|
4321
|
+
}, Jr = ({
|
|
4285
4322
|
applicantId: e,
|
|
4286
4323
|
onComplete: t,
|
|
4287
4324
|
onBack: n
|
|
4288
4325
|
}) => {
|
|
4289
|
-
const { appropriatenessTestService: a } =
|
|
4326
|
+
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
4327
|
ne(() => {
|
|
4291
4328
|
(async () => {
|
|
4292
4329
|
try {
|
|
@@ -4306,11 +4343,11 @@ const qr = ({
|
|
|
4306
4343
|
const X = (L) => {
|
|
4307
4344
|
const O = L.split(":").map(Number);
|
|
4308
4345
|
if (O.length === 3) {
|
|
4309
|
-
const [G,
|
|
4310
|
-
return G * 3600 +
|
|
4346
|
+
const [G, E, U] = O;
|
|
4347
|
+
return G * 3600 + E * 60 + U;
|
|
4311
4348
|
}
|
|
4312
4349
|
return 0;
|
|
4313
|
-
},
|
|
4350
|
+
}, I = (L) => {
|
|
4314
4351
|
const O = Math.floor(L / 60), G = L % 60;
|
|
4315
4352
|
return `${O.toString().padStart(2, "0")}:${G.toString().padStart(2, "0")}`;
|
|
4316
4353
|
};
|
|
@@ -4348,9 +4385,9 @@ const qr = ({
|
|
|
4348
4385
|
m(!0), C(null);
|
|
4349
4386
|
try {
|
|
4350
4387
|
const O = s.appropriatenessQuestions.map(
|
|
4351
|
-
(
|
|
4352
|
-
appropriatenessQuestionId:
|
|
4353
|
-
value: f[
|
|
4388
|
+
(E) => ({
|
|
4389
|
+
appropriatenessQuestionId: E.id,
|
|
4390
|
+
value: f[E.id] || ""
|
|
4354
4391
|
// Empty string if not answered
|
|
4355
4392
|
})
|
|
4356
4393
|
), G = {
|
|
@@ -4360,14 +4397,14 @@ const qr = ({
|
|
|
4360
4397
|
};
|
|
4361
4398
|
console.log("Submitting appropriateness test:", G);
|
|
4362
4399
|
try {
|
|
4363
|
-
const
|
|
4364
|
-
console.log("Appropriateness test result:",
|
|
4365
|
-
} catch (
|
|
4366
|
-
if (
|
|
4367
|
-
const U =
|
|
4400
|
+
const E = await a.fillAppropriatenessTest(G);
|
|
4401
|
+
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));
|
|
4402
|
+
} catch (E) {
|
|
4403
|
+
if (E.code === 400 && E.message) {
|
|
4404
|
+
const U = E.message;
|
|
4368
4405
|
console.log("Test failed:", U), C(U), P(!1), R(!1), S({}), setTimeout(() => w(), 1500);
|
|
4369
4406
|
} else
|
|
4370
|
-
throw
|
|
4407
|
+
throw E;
|
|
4371
4408
|
}
|
|
4372
4409
|
} catch (O) {
|
|
4373
4410
|
console.error("Error submitting appropriateness test:", O), C(O.message || "Failed to submit test. Please try again."), P(!1), R(!1), S({});
|
|
@@ -4406,13 +4443,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4406
4443
|
] }),
|
|
4407
4444
|
/* @__PURE__ */ o(K, { className: "py-12 text-center", children: [
|
|
4408
4445
|
/* @__PURE__ */ o("div", { className: "mb-6", children: [
|
|
4409
|
-
/* @__PURE__ */ r("div", { className: "text-6xl font-bold text-primary-500 mb-2", children:
|
|
4446
|
+
/* @__PURE__ */ r("div", { className: "text-6xl font-bold text-primary-500 mb-2", children: I(T) }),
|
|
4410
4447
|
/* @__PURE__ */ r("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait before attempting the test again" })
|
|
4411
4448
|
] }),
|
|
4412
4449
|
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
4450
|
] })
|
|
4414
4451
|
] });
|
|
4415
|
-
const
|
|
4452
|
+
const z = s.testAllowedMaxTry - s.totalFailedTries;
|
|
4416
4453
|
return F ? /* @__PURE__ */ r("form", { onSubmit: W, children: /* @__PURE__ */ o(j, { children: [
|
|
4417
4454
|
/* @__PURE__ */ r(ue, { children: /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
|
|
4418
4455
|
/* @__PURE__ */ o("div", { children: [
|
|
@@ -4424,7 +4461,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4424
4461
|
"div",
|
|
4425
4462
|
{
|
|
4426
4463
|
className: `text-3xl font-bold ${b <= 60 ? "text-danger-500" : "text-primary-500"}`,
|
|
4427
|
-
children:
|
|
4464
|
+
children: I(b)
|
|
4428
4465
|
}
|
|
4429
4466
|
),
|
|
4430
4467
|
/* @__PURE__ */ r("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Time Remaining" })
|
|
@@ -4432,16 +4469,16 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4432
4469
|
] }) }),
|
|
4433
4470
|
/* @__PURE__ */ o(K, { className: "space-y-6", children: [
|
|
4434
4471
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between mb-4", children: [
|
|
4435
|
-
/* @__PURE__ */ o(
|
|
4472
|
+
/* @__PURE__ */ o(Ae, { variant: "info", children: [
|
|
4436
4473
|
"Question ",
|
|
4437
4474
|
Object.keys(f).length,
|
|
4438
4475
|
" of ",
|
|
4439
4476
|
s.totalQuestionCount
|
|
4440
4477
|
] }),
|
|
4441
|
-
/* @__PURE__ */ o(
|
|
4442
|
-
|
|
4478
|
+
/* @__PURE__ */ o(Ae, { variant: z > 1 ? "success" : "warning", children: [
|
|
4479
|
+
z,
|
|
4443
4480
|
" attempt",
|
|
4444
|
-
|
|
4481
|
+
z !== 1 ? "s" : "",
|
|
4445
4482
|
" remaining"
|
|
4446
4483
|
] })
|
|
4447
4484
|
] }),
|
|
@@ -4458,7 +4495,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4458
4495
|
L.groupName && /* @__PURE__ */ r("span", { className: "ml-2 text-xs text-gray-500 dark:text-gray-400", children: L.groupName }),
|
|
4459
4496
|
/* @__PURE__ */ r("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mt-2", children: L.question })
|
|
4460
4497
|
] }),
|
|
4461
|
-
/* @__PURE__ */ r("div", { className: "space-y-2", children: L.answers.map((G,
|
|
4498
|
+
/* @__PURE__ */ r("div", { className: "space-y-2", children: L.answers.map((G, E) => /* @__PURE__ */ o(
|
|
4462
4499
|
"label",
|
|
4463
4500
|
{
|
|
4464
4501
|
className: `
|
|
@@ -4481,7 +4518,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4481
4518
|
/* @__PURE__ */ r("span", { className: "ml-3 text-gray-700 dark:text-gray-300", children: G })
|
|
4482
4519
|
]
|
|
4483
4520
|
},
|
|
4484
|
-
|
|
4521
|
+
E
|
|
4485
4522
|
)) })
|
|
4486
4523
|
]
|
|
4487
4524
|
},
|
|
@@ -4528,19 +4565,19 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4528
4565
|
/* @__PURE__ */ o("div", { className: "space-y-4 mb-6", children: [
|
|
4529
4566
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4530
4567
|
/* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Total Questions:" }),
|
|
4531
|
-
/* @__PURE__ */ r(
|
|
4568
|
+
/* @__PURE__ */ r(Ae, { variant: "info", children: s.totalQuestionCount })
|
|
4532
4569
|
] }),
|
|
4533
4570
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4534
4571
|
/* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Time Limit:" }),
|
|
4535
|
-
/* @__PURE__ */ r(
|
|
4572
|
+
/* @__PURE__ */ r(Ae, { variant: "info", children: I(s.testDurationSec) })
|
|
4536
4573
|
] }),
|
|
4537
4574
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4538
4575
|
/* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Correct Answers Required:" }),
|
|
4539
|
-
/* @__PURE__ */ r(
|
|
4576
|
+
/* @__PURE__ */ r(Ae, { variant: "info", children: s.testCorrectAnswerPassLimit })
|
|
4540
4577
|
] }),
|
|
4541
4578
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
|
|
4542
4579
|
/* @__PURE__ */ r("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Attempts Remaining:" }),
|
|
4543
|
-
/* @__PURE__ */ r(
|
|
4580
|
+
/* @__PURE__ */ r(Ae, { variant: z > 1 ? "success" : "warning", children: z })
|
|
4544
4581
|
] })
|
|
4545
4582
|
] }),
|
|
4546
4583
|
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 +4585,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4548
4585
|
" ",
|
|
4549
4586
|
v
|
|
4550
4587
|
] }) }),
|
|
4551
|
-
|
|
4588
|
+
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
4589
|
] }),
|
|
4553
4590
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
4554
4591
|
n && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: n, children: "Back" }),
|
|
@@ -4557,21 +4594,21 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4557
4594
|
{
|
|
4558
4595
|
type: "button",
|
|
4559
4596
|
onClick: N,
|
|
4560
|
-
disabled:
|
|
4597
|
+
disabled: z <= 0,
|
|
4561
4598
|
children: "Start Test"
|
|
4562
4599
|
}
|
|
4563
4600
|
)
|
|
4564
4601
|
] })
|
|
4565
4602
|
] });
|
|
4566
|
-
},
|
|
4603
|
+
}, Zr = ({
|
|
4567
4604
|
applicantId: e,
|
|
4568
4605
|
onComplete: t,
|
|
4569
4606
|
onBack: n
|
|
4570
4607
|
}) => {
|
|
4571
4608
|
var _e, He, Ue, je;
|
|
4572
|
-
const { applicantService: a, baseInformationService: s, config: l, currentTheme: c } =
|
|
4609
|
+
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
4610
|
M.current = se;
|
|
4574
|
-
const Z =
|
|
4611
|
+
const Z = Et({
|
|
4575
4612
|
defaultValues: {
|
|
4576
4613
|
street: "",
|
|
4577
4614
|
streetNumber: "",
|
|
@@ -4584,54 +4621,54 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4584
4621
|
});
|
|
4585
4622
|
ne(() => {
|
|
4586
4623
|
if (se) {
|
|
4587
|
-
O.current || (O.current = !0, f().then(() => H(!0)).catch((
|
|
4624
|
+
O.current || (O.current = !0, f().then(() => H(!0)).catch((y) => console.error("[Identity] Auto-request failed:", y)).finally(() => I(!1)));
|
|
4588
4625
|
return;
|
|
4589
4626
|
}
|
|
4590
4627
|
(async () => {
|
|
4591
4628
|
try {
|
|
4592
|
-
const [
|
|
4629
|
+
const [y, x, d] = await Promise.all([
|
|
4593
4630
|
a.getApplicantData(e),
|
|
4594
4631
|
s.getCountries("", "en"),
|
|
4595
4632
|
s.getCountries("", "en", 40)
|
|
4596
4633
|
// CountriesType.PhoneNumber
|
|
4597
4634
|
]);
|
|
4598
|
-
P(
|
|
4599
|
-
const p = /* @__PURE__ */ new Set(),
|
|
4600
|
-
R(
|
|
4601
|
-
const
|
|
4635
|
+
P(y);
|
|
4636
|
+
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));
|
|
4637
|
+
R(A);
|
|
4638
|
+
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
4639
|
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: (
|
|
4640
|
+
const g = y.applicantRequestData;
|
|
4641
|
+
if (E({
|
|
4642
|
+
firstName: (g == null ? void 0 : g.firstName) || "",
|
|
4643
|
+
lastName: (g == null ? void 0 : g.lastName) || "",
|
|
4644
|
+
email: (g == null ? void 0 : g.email) || "",
|
|
4645
|
+
dateOfBirth: (g == null ? void 0 : g.dateOfBirth) || "",
|
|
4646
|
+
title: (g == null ? void 0 : g.title) || "",
|
|
4647
|
+
salutation: (g == null ? void 0 : g.salutation) || "",
|
|
4648
|
+
phonenumber: (g == null ? void 0 : g.phonenumber) || "",
|
|
4649
|
+
mobileCountryCode: (g == null ? void 0 : g.mobileCountryCode) || "",
|
|
4650
|
+
street: (g == null ? void 0 : g.street) || "",
|
|
4651
|
+
streetNumber: (g == null ? void 0 : g.streetNumber) || "",
|
|
4652
|
+
city: (g == null ? void 0 : g.city) || "",
|
|
4653
|
+
zip: (g == null ? void 0 : g.zip) || "",
|
|
4654
|
+
country: (g == null ? void 0 : g.country) || "",
|
|
4655
|
+
nationality: (g == null ? void 0 : g.nationality) || "",
|
|
4656
|
+
taxCountry: (g == null ? void 0 : g.taxCountry) || "",
|
|
4657
|
+
countryOfBirth: (g == null ? void 0 : g.countryOfBirth) || "",
|
|
4658
|
+
placeOfBirth: (g == null ? void 0 : g.placeOfBirth) || "",
|
|
4659
|
+
educationLevel: (g == null ? void 0 : g.educationLevel) || "",
|
|
4660
|
+
occupation: (g == null ? void 0 : g.occupation) || "",
|
|
4661
|
+
taxNumber: (g == null ? void 0 : g.taxNumber) || "",
|
|
4662
|
+
defaultLanguage: (g == null ? void 0 : g.defaultLanguage) || ""
|
|
4626
4663
|
}), Z.reset({
|
|
4627
|
-
street: (
|
|
4628
|
-
streetNumber: (
|
|
4629
|
-
city: (
|
|
4630
|
-
zip: (
|
|
4631
|
-
country: (
|
|
4632
|
-
nationality: (
|
|
4633
|
-
phonenumber: (
|
|
4634
|
-
}),
|
|
4664
|
+
street: (g == null ? void 0 : g.street) || "",
|
|
4665
|
+
streetNumber: (g == null ? void 0 : g.streetNumber) || "",
|
|
4666
|
+
city: (g == null ? void 0 : g.city) || "",
|
|
4667
|
+
zip: (g == null ? void 0 : g.zip) || "",
|
|
4668
|
+
country: (g == null ? void 0 : g.country) || "",
|
|
4669
|
+
nationality: (g == null ? void 0 : g.nationality) || "",
|
|
4670
|
+
phonenumber: (g == null ? void 0 : g.phonenumber) || ""
|
|
4671
|
+
}), y.kycRecords && y.kycRecords.length > 0 && y.kycRecords[0].providerTokenObject !== null && !O.current && M.current) {
|
|
4635
4672
|
console.log("[Identity] Review page disabled + existing identity — auto-requesting..."), O.current = !0;
|
|
4636
4673
|
try {
|
|
4637
4674
|
await f(), H(!0);
|
|
@@ -4639,10 +4676,10 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4639
4676
|
console.error("[Identity] Auto-request failed:", q);
|
|
4640
4677
|
}
|
|
4641
4678
|
}
|
|
4642
|
-
} catch (
|
|
4643
|
-
console.error("Error loading applicant data:",
|
|
4679
|
+
} catch (y) {
|
|
4680
|
+
console.error("Error loading applicant data:", y);
|
|
4644
4681
|
} finally {
|
|
4645
|
-
|
|
4682
|
+
I(!1);
|
|
4646
4683
|
}
|
|
4647
4684
|
})();
|
|
4648
4685
|
}, [e]), ne(() => {
|
|
@@ -4658,8 +4695,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4658
4695
|
}
|
|
4659
4696
|
if (m.url)
|
|
4660
4697
|
try {
|
|
4661
|
-
const
|
|
4662
|
-
if (
|
|
4698
|
+
const y = new URL(m.url).toString().toLowerCase();
|
|
4699
|
+
if (y.includes("expired") || y.includes("invalid") || y.includes("error")) {
|
|
4663
4700
|
console.warn("[Identity] Token URL indicates expiration"), L(!0), w("Your verification link has expired. Please restart.");
|
|
4664
4701
|
return;
|
|
4665
4702
|
}
|
|
@@ -4672,7 +4709,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4672
4709
|
}
|
|
4673
4710
|
}
|
|
4674
4711
|
}, [m]), ne(() => {
|
|
4675
|
-
if (h !== null && m && !b && N && !
|
|
4712
|
+
if (h !== null && m && !b && N && !z) {
|
|
4676
4713
|
const i = h;
|
|
4677
4714
|
if (m.url) {
|
|
4678
4715
|
console.log("[Identity] Loading provider URL for user verification:", m.url), w(null);
|
|
@@ -4680,44 +4717,44 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4680
4717
|
if (new URL(m.url), i === ve.SardinAI) {
|
|
4681
4718
|
console.log("[SardinAI] Initializing Risk SDK in background...");
|
|
4682
4719
|
try {
|
|
4683
|
-
const
|
|
4684
|
-
|
|
4720
|
+
const y = Be.parseProviderConfig(h, m, l);
|
|
4721
|
+
Be.createProvider(h, y).initialize().then(() => {
|
|
4685
4722
|
console.log("[SardinAI] Risk SDK initialized successfully in background");
|
|
4686
4723
|
}).catch((d) => {
|
|
4687
4724
|
console.warn("[SardinAI] Risk SDK initialization failed (non-blocking):", d);
|
|
4688
4725
|
});
|
|
4689
|
-
} catch (
|
|
4690
|
-
console.warn("[SardinAI] Risk SDK setup failed (non-blocking):",
|
|
4726
|
+
} catch (y) {
|
|
4727
|
+
console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", y);
|
|
4691
4728
|
}
|
|
4692
4729
|
}
|
|
4693
4730
|
D({ type: "url", url: m.url });
|
|
4694
|
-
} catch (
|
|
4695
|
-
console.error("[Identity] Invalid URL:",
|
|
4731
|
+
} catch (y) {
|
|
4732
|
+
console.error("[Identity] Invalid URL:", y), w("Invalid verification URL. Please restart."), L(!0);
|
|
4696
4733
|
}
|
|
4697
4734
|
return;
|
|
4698
4735
|
}
|
|
4699
4736
|
if (i === ve.SardinAI) {
|
|
4700
4737
|
console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), w(null);
|
|
4701
4738
|
try {
|
|
4702
|
-
const
|
|
4739
|
+
const y = Be.parseProviderConfig(h, m, l), x = Be.createProvider(h, y);
|
|
4703
4740
|
x.initialize().then(() => {
|
|
4704
4741
|
console.log("[SardinAI] Risk SDK initialized successfully"), D(x), setTimeout(() => {
|
|
4705
4742
|
t == null || t();
|
|
4706
4743
|
}, 2e3);
|
|
4707
4744
|
}).catch((d) => {
|
|
4708
|
-
var
|
|
4745
|
+
var A;
|
|
4709
4746
|
console.error("[SardinAI] Failed to initialize:", d);
|
|
4710
|
-
const p = ((
|
|
4747
|
+
const p = ((A = d.message) == null ? void 0 : A.toLowerCase()) || "";
|
|
4711
4748
|
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
4749
|
});
|
|
4713
|
-
} catch (
|
|
4714
|
-
console.error("[SardinAI] Error creating provider:",
|
|
4750
|
+
} catch (y) {
|
|
4751
|
+
console.error("[SardinAI] Error creating provider:", y), w(`Configuration error: ${y.message}`);
|
|
4715
4752
|
}
|
|
4716
4753
|
return;
|
|
4717
4754
|
}
|
|
4718
4755
|
try {
|
|
4719
4756
|
w(null);
|
|
4720
|
-
const
|
|
4757
|
+
const y = Be.parseProviderConfig(h, m, l), x = Be.createProvider(h, y);
|
|
4721
4758
|
i === ve.Sumsub ? (x.initialize("identity-container").catch((d) => {
|
|
4722
4759
|
var p;
|
|
4723
4760
|
console.error("[Sumsub] Initialization error:", d), w(`Failed to initialize: ${d.message}`), (p = d.message) != null && p.toLowerCase().includes("expired") && L(!0);
|
|
@@ -4726,8 +4763,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4726
4763
|
})) : i === ve.Onfido && x.initialize("identity-container").catch((d) => {
|
|
4727
4764
|
console.error("[Onfido] Initialization error:", d), w(`Failed to initialize: ${d.message}`);
|
|
4728
4765
|
}), D(x);
|
|
4729
|
-
} catch (
|
|
4730
|
-
console.error("[Identity] Provider setup error:",
|
|
4766
|
+
} catch (y) {
|
|
4767
|
+
console.error("[Identity] Provider setup error:", y), w(`Setup error: ${y.message}`);
|
|
4731
4768
|
}
|
|
4732
4769
|
}
|
|
4733
4770
|
return () => {
|
|
@@ -4738,14 +4775,14 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4738
4775
|
console.error("[Identity] Error destroying provider:", i);
|
|
4739
4776
|
}
|
|
4740
4777
|
};
|
|
4741
|
-
}, [h, m, b, N, t,
|
|
4778
|
+
}, [h, m, b, N, t, z]);
|
|
4742
4779
|
const ie = async () => {
|
|
4743
4780
|
try {
|
|
4744
4781
|
w(null), L(!1), await f(), H(!0);
|
|
4745
4782
|
} catch (i) {
|
|
4746
4783
|
console.error("Error starting identity verification:", i);
|
|
4747
4784
|
}
|
|
4748
|
-
},
|
|
4785
|
+
}, Ee = async () => {
|
|
4749
4786
|
try {
|
|
4750
4787
|
w(null), L(!1), D(null), console.log("[Identity] Restarting verification..."), await S(), H(!0);
|
|
4751
4788
|
} catch (i) {
|
|
@@ -4762,7 +4799,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4762
4799
|
"Error: ",
|
|
4763
4800
|
C.message
|
|
4764
4801
|
] }) }) });
|
|
4765
|
-
if (N && (W ||
|
|
4802
|
+
if (N && (W || z))
|
|
4766
4803
|
return /* @__PURE__ */ o(j, { children: [
|
|
4767
4804
|
/* @__PURE__ */ r(ue, { children: /* @__PURE__ */ r("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: "Verification Session Issue" }) }),
|
|
4768
4805
|
/* @__PURE__ */ o(K, { children: [
|
|
@@ -4786,7 +4823,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4786
4823
|
}
|
|
4787
4824
|
),
|
|
4788
4825
|
/* @__PURE__ */ o("div", { children: [
|
|
4789
|
-
/* @__PURE__ */ r("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children:
|
|
4826
|
+
/* @__PURE__ */ r("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children: z ? "Session Expired" : "Verification Error" }),
|
|
4790
4827
|
/* @__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
4828
|
] })
|
|
4792
4829
|
] }) }),
|
|
@@ -4801,7 +4838,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4801
4838
|
] }),
|
|
4802
4839
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
4803
4840
|
n && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: n, children: "Back" }),
|
|
4804
|
-
/* @__PURE__ */ r(Q, { type: "button", onClick:
|
|
4841
|
+
/* @__PURE__ */ r(Q, { type: "button", onClick: Ee, disabled: v, children: v ? "Restarting..." : "Restart Verification" })
|
|
4805
4842
|
] })
|
|
4806
4843
|
] });
|
|
4807
4844
|
if (N && u) {
|
|
@@ -4818,7 +4855,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4818
4855
|
type: "button",
|
|
4819
4856
|
variant: "outline",
|
|
4820
4857
|
size: "sm",
|
|
4821
|
-
onClick:
|
|
4858
|
+
onClick: Ee,
|
|
4822
4859
|
disabled: v,
|
|
4823
4860
|
children: "Restart"
|
|
4824
4861
|
}
|
|
@@ -4836,13 +4873,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4836
4873
|
className: "w-full h-full border-0 rounded-lg",
|
|
4837
4874
|
allow: "camera; microphone; geolocation",
|
|
4838
4875
|
title: "Identity Verification",
|
|
4839
|
-
onLoad: (
|
|
4876
|
+
onLoad: (y) => {
|
|
4840
4877
|
var x, d, p;
|
|
4841
4878
|
console.log("[Identity] Iframe loaded");
|
|
4842
4879
|
try {
|
|
4843
|
-
const
|
|
4844
|
-
if (
|
|
4845
|
-
const _ = ((p = (d =
|
|
4880
|
+
const A = y.target, B = A.contentDocument || ((x = A.contentWindow) == null ? void 0 : x.document);
|
|
4881
|
+
if (B) {
|
|
4882
|
+
const _ = ((p = (d = B.body) == null ? void 0 : d.textContent) == null ? void 0 : p.toLowerCase()) || "";
|
|
4846
4883
|
(_.includes("expired") || _.includes("invalid") || _.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), L(!0), w("Your verification link has expired."));
|
|
4847
4884
|
}
|
|
4848
4885
|
} catch {
|
|
@@ -4872,15 +4909,15 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4872
4909
|
n && /* @__PURE__ */ r(me, { children: /* @__PURE__ */ r(Q, { variant: "outline", onClick: n, children: "Back" }) })
|
|
4873
4910
|
] });
|
|
4874
4911
|
}
|
|
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 (!
|
|
4912
|
+
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) => {
|
|
4913
|
+
if (!y && y !== 0) return "—";
|
|
4877
4914
|
if (Pe.has(i) && i !== "mobileCountryCode") {
|
|
4878
|
-
const x = $.find((d) => d.value ===
|
|
4879
|
-
return x ? x.label : String(
|
|
4915
|
+
const x = $.find((d) => d.value === y);
|
|
4916
|
+
return x ? x.label : String(y);
|
|
4880
4917
|
}
|
|
4881
|
-
return String(
|
|
4918
|
+
return String(y);
|
|
4882
4919
|
}, Xe = ({ helpText: i }) => {
|
|
4883
|
-
const [
|
|
4920
|
+
const [y, x] = k(!1), d = ee(null), [, p] = k({ top: 0, left: 0 });
|
|
4884
4921
|
return /* @__PURE__ */ o(Qe, { children: [
|
|
4885
4922
|
/* @__PURE__ */ r(
|
|
4886
4923
|
"button",
|
|
@@ -4889,8 +4926,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4889
4926
|
ref: d,
|
|
4890
4927
|
onClick: () => {
|
|
4891
4928
|
if (d.current) {
|
|
4892
|
-
const
|
|
4893
|
-
p({ top:
|
|
4929
|
+
const B = d.current.getBoundingClientRect();
|
|
4930
|
+
p({ top: B.bottom + window.scrollY + 6, left: B.left + window.scrollX });
|
|
4894
4931
|
}
|
|
4895
4932
|
x(!0);
|
|
4896
4933
|
},
|
|
@@ -4913,7 +4950,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4913
4950
|
children: "?"
|
|
4914
4951
|
}
|
|
4915
4952
|
),
|
|
4916
|
-
|
|
4953
|
+
y && Ct.createPortal(
|
|
4917
4954
|
/* @__PURE__ */ r(
|
|
4918
4955
|
"div",
|
|
4919
4956
|
{
|
|
@@ -4930,7 +4967,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4930
4967
|
children: /* @__PURE__ */ o(
|
|
4931
4968
|
"div",
|
|
4932
4969
|
{
|
|
4933
|
-
onClick: (
|
|
4970
|
+
onClick: (B) => B.stopPropagation(),
|
|
4934
4971
|
style: {
|
|
4935
4972
|
background: "var(--metakyc-surface, #fff)",
|
|
4936
4973
|
border: "1px solid var(--metakyc-border, #e5e7eb)",
|
|
@@ -4968,11 +5005,11 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4968
5005
|
document.body
|
|
4969
5006
|
)
|
|
4970
5007
|
] });
|
|
4971
|
-
}, xe = (i,
|
|
5008
|
+
}, xe = (i, y) => y ? /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "flex-start", gap: 5, flexWrap: "nowrap" }, children: [
|
|
4972
5009
|
/* @__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-${
|
|
5010
|
+
/* @__PURE__ */ r("div", { style: { paddingTop: 24 }, children: /* @__PURE__ */ r(Xe, { helpText: y }) })
|
|
5011
|
+
] }) : i, et = (i, y) => {
|
|
5012
|
+
const x = `cf-${y}`, d = i.paramName ?? "", p = U[d];
|
|
4976
5013
|
if (i.customType === "br")
|
|
4977
5014
|
return /* @__PURE__ */ r("div", { className: pe(i.colSpan), style: { minHeight: "0.5rem" } }, x);
|
|
4978
5015
|
if (i.customType === "paragraph")
|
|
@@ -5009,15 +5046,15 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5009
5046
|
i.helpText
|
|
5010
5047
|
) }, x);
|
|
5011
5048
|
if (i.customType === "checkbox" || i.customType === "link_checkbox") {
|
|
5012
|
-
const
|
|
5049
|
+
const A = p === "true" || p === !0;
|
|
5013
5050
|
return /* @__PURE__ */ r("div", { className: pe(i.colSpan), children: xe(
|
|
5014
5051
|
/* @__PURE__ */ o("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
|
|
5015
5052
|
/* @__PURE__ */ r(
|
|
5016
5053
|
"input",
|
|
5017
5054
|
{
|
|
5018
5055
|
type: "checkbox",
|
|
5019
|
-
checked: !!
|
|
5020
|
-
onChange: (
|
|
5056
|
+
checked: !!A,
|
|
5057
|
+
onChange: (B) => te((_) => ({ ..._, [d]: String(B.target.checked) })),
|
|
5021
5058
|
style: {
|
|
5022
5059
|
width: 16,
|
|
5023
5060
|
height: 16,
|
|
@@ -5036,10 +5073,10 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5036
5073
|
) }, x);
|
|
5037
5074
|
}
|
|
5038
5075
|
if (i.customType === "group_checkbox") {
|
|
5039
|
-
const
|
|
5040
|
-
i.singleSelect ? te((
|
|
5041
|
-
...
|
|
5042
|
-
[d]:
|
|
5076
|
+
const A = Array.isArray(p) ? p : p ? [p] : [], B = (_) => {
|
|
5077
|
+
i.singleSelect ? te((g) => ({ ...g, [d]: A[0] === _ ? [] : [_] })) : te((g) => ({
|
|
5078
|
+
...g,
|
|
5079
|
+
[d]: A.includes(_) ? A.filter((ae) => ae !== _) : [...A, _]
|
|
5043
5080
|
}));
|
|
5044
5081
|
};
|
|
5045
5082
|
return /* @__PURE__ */ r("div", { className: pe(i.colSpan), children: xe(
|
|
@@ -5050,8 +5087,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5050
5087
|
"input",
|
|
5051
5088
|
{
|
|
5052
5089
|
type: "checkbox",
|
|
5053
|
-
checked:
|
|
5054
|
-
onChange: () =>
|
|
5090
|
+
checked: A.includes(_.value),
|
|
5091
|
+
onChange: () => B(_.value),
|
|
5055
5092
|
style: { width: 16, height: 16, flexShrink: 0, marginTop: 2, accentColor: "var(--metakyc-primary, #6366f1)" }
|
|
5056
5093
|
}
|
|
5057
5094
|
),
|
|
@@ -5064,20 +5101,20 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5064
5101
|
return i.customType === "radio_group" ? /* @__PURE__ */ r("div", { className: pe(i.colSpan), children: xe(
|
|
5065
5102
|
/* @__PURE__ */ o("div", { className: "space-y-1.5", children: [
|
|
5066
5103
|
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((
|
|
5104
|
+
(i.options || []).map((A) => /* @__PURE__ */ o("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
|
|
5068
5105
|
/* @__PURE__ */ r(
|
|
5069
5106
|
"input",
|
|
5070
5107
|
{
|
|
5071
5108
|
type: "radio",
|
|
5072
5109
|
name: `rg-${d}`,
|
|
5073
|
-
value:
|
|
5074
|
-
checked: p ===
|
|
5075
|
-
onChange: () => te((
|
|
5110
|
+
value: A.value,
|
|
5111
|
+
checked: p === A.value,
|
|
5112
|
+
onChange: () => te((B) => ({ ...B, [d]: A.value })),
|
|
5076
5113
|
style: { width: 16, height: 16, flexShrink: 0, marginTop: 2, accentColor: "var(--metakyc-primary, #6366f1)" }
|
|
5077
5114
|
}
|
|
5078
5115
|
),
|
|
5079
|
-
/* @__PURE__ */ r("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children:
|
|
5080
|
-
] },
|
|
5116
|
+
/* @__PURE__ */ r("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: A.label })
|
|
5117
|
+
] }, A.value))
|
|
5081
5118
|
] }),
|
|
5082
5119
|
i.helpText
|
|
5083
5120
|
) }, x) : /* @__PURE__ */ r("div", { className: pe(i.colSpan), children: xe(
|
|
@@ -5086,65 +5123,65 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5086
5123
|
{
|
|
5087
5124
|
label: i.displayText || i.label || d,
|
|
5088
5125
|
value: String(p ?? ""),
|
|
5089
|
-
onChange: (
|
|
5126
|
+
onChange: (A) => te((B) => ({ ...B, [d]: A.target.value }))
|
|
5090
5127
|
}
|
|
5091
5128
|
),
|
|
5092
5129
|
i.helpText
|
|
5093
5130
|
) }, 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 ?
|
|
5131
|
+
}, tt = (i, y) => {
|
|
5132
|
+
if (i.isCustom) return et(i, y);
|
|
5133
|
+
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;
|
|
5134
|
+
return i.editable ? B ? /* @__PURE__ */ r("div", { className: pe(i.colSpan ?? 2), children: xe(
|
|
5098
5135
|
/* @__PURE__ */ r(
|
|
5099
5136
|
Re,
|
|
5100
5137
|
{
|
|
5101
5138
|
label: p,
|
|
5102
|
-
value: String(
|
|
5103
|
-
onChange: (
|
|
5139
|
+
value: String(A),
|
|
5140
|
+
onChange: (g) => E((ae) => ({ ...ae, [x]: g })),
|
|
5104
5141
|
options: [{ value: "", label: "Select country code…" }, ...T]
|
|
5105
5142
|
}
|
|
5106
5143
|
),
|
|
5107
5144
|
i.helpText
|
|
5108
|
-
) }, `epc-${
|
|
5145
|
+
) }, `epc-${y}`) : _ ? /* @__PURE__ */ r("div", { className: pe(i.colSpan ?? 2), children: xe(
|
|
5109
5146
|
/* @__PURE__ */ r(
|
|
5110
5147
|
Re,
|
|
5111
5148
|
{
|
|
5112
5149
|
label: p,
|
|
5113
|
-
value: String(
|
|
5114
|
-
onChange: (
|
|
5150
|
+
value: String(A),
|
|
5151
|
+
onChange: (g) => E((ae) => ({ ...ae, [x]: g })),
|
|
5115
5152
|
options: [{ value: "", label: `Select ${p.toLowerCase()}…` }, ...$]
|
|
5116
5153
|
}
|
|
5117
5154
|
),
|
|
5118
5155
|
i.helpText
|
|
5119
|
-
) }, `ec-${
|
|
5156
|
+
) }, `ec-${y}`) : /* @__PURE__ */ r("div", { className: pe(i.colSpan ?? 2), children: xe(
|
|
5120
5157
|
/* @__PURE__ */ r(
|
|
5121
5158
|
de,
|
|
5122
5159
|
{
|
|
5123
5160
|
label: p,
|
|
5124
5161
|
type: (d == null ? void 0 : d.type) === "date" ? "date" : (d == null ? void 0 : d.type) === "email" ? "email" : "text",
|
|
5125
|
-
value: String(
|
|
5126
|
-
onChange: (
|
|
5162
|
+
value: String(A),
|
|
5163
|
+
onChange: (g) => E((ae) => ({ ...ae, [x]: g.target.value }))
|
|
5127
5164
|
}
|
|
5128
5165
|
),
|
|
5129
5166
|
i.helpText
|
|
5130
|
-
) }, `ei-${
|
|
5167
|
+
) }, `ei-${y}`) : /* @__PURE__ */ r("div", { className: pe(i.colSpan ?? 2), children: xe(
|
|
5131
5168
|
/* @__PURE__ */ o(Qe, { children: [
|
|
5132
5169
|
/* @__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,
|
|
5170
|
+
/* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)", minHeight: "1.5rem" }, children: Oe(x, A) })
|
|
5134
5171
|
] }),
|
|
5135
5172
|
i.helpText
|
|
5136
|
-
) }, `ro-${
|
|
5173
|
+
) }, `ro-${y}`);
|
|
5137
5174
|
};
|
|
5138
|
-
if (
|
|
5139
|
-
const i =
|
|
5175
|
+
if (ge) {
|
|
5176
|
+
const i = ge.title || "Review Your Information", y = ge.subtitle || "Please review and confirm your information before starting identity verification";
|
|
5140
5177
|
return /* @__PURE__ */ r("form", { onSubmit: (x) => {
|
|
5141
5178
|
x.preventDefault(), ie();
|
|
5142
5179
|
}, children: /* @__PURE__ */ o(j, { children: [
|
|
5143
5180
|
/* @__PURE__ */ o(ue, { children: [
|
|
5144
5181
|
/* @__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:
|
|
5182
|
+
/* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: y })
|
|
5146
5183
|
] }),
|
|
5147
|
-
/* @__PURE__ */ r(K, { children: /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children:
|
|
5184
|
+
/* @__PURE__ */ r(K, { children: /* @__PURE__ */ r("div", { className: "grid grid-cols-4 gap-4", children: ge.fields.map((x, d) => tt(x, d)) }) }),
|
|
5148
5185
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
5149
5186
|
n && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: n, children: "Back" }),
|
|
5150
5187
|
/* @__PURE__ */ r(Q, { type: "submit", isLoading: v, children: "Confirm and Start Verification" })
|
|
@@ -5161,9 +5198,9 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5161
5198
|
{ 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
5199
|
{ label: "Email", value: (Ue = F == null ? void 0 : F.applicantRequestData) == null ? void 0 : Ue.email },
|
|
5163
5200
|
{ label: "Date of Birth", value: ((je = F == null ? void 0 : F.applicantRequestData) == null ? void 0 : je.dateOfBirth) || "Not provided" }
|
|
5164
|
-
].map(({ label: i, value:
|
|
5201
|
+
].map(({ label: i, value: y }) => /* @__PURE__ */ o("div", { children: [
|
|
5165
5202
|
/* @__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:
|
|
5203
|
+
/* @__PURE__ */ r("p", { className: "mt-1 text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children: y })
|
|
5167
5204
|
] }, i)) }),
|
|
5168
5205
|
/* @__PURE__ */ o("div", { className: "space-y-4", children: [
|
|
5169
5206
|
/* @__PURE__ */ r("h3", { className: "text-base font-semibold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: "Address Information" }),
|
|
@@ -5307,7 +5344,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5307
5344
|
) }),
|
|
5308
5345
|
/* @__PURE__ */ r("h2", { className: "text-3xl font-bold text-center text-gray-900 dark:text-white mb-4", children: u.title }),
|
|
5309
5346
|
/* @__PURE__ */ r("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ r(
|
|
5310
|
-
|
|
5347
|
+
Ae,
|
|
5311
5348
|
{
|
|
5312
5349
|
variant: u.type === "success" ? "success" : u.type === "error" ? "danger" : u.type === "pending" ? "warning" : "info",
|
|
5313
5350
|
children: e != null ? Le[e] : De[t]
|
|
@@ -5359,7 +5396,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5359
5396
|
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
5397
|
] })
|
|
5361
5398
|
] });
|
|
5362
|
-
},
|
|
5399
|
+
}, 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
5400
|
"img",
|
|
5364
5401
|
{
|
|
5365
5402
|
src: e.url,
|
|
@@ -5379,10 +5416,10 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
5379
5416
|
subtitle: t,
|
|
5380
5417
|
className: n = ""
|
|
5381
5418
|
}) => {
|
|
5382
|
-
const { currentTheme: a } =
|
|
5419
|
+
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
5420
|
return !l && !c ? null : /* @__PURE__ */ o("div", { className: `metakyc-header ${n}`, children: [
|
|
5384
5421
|
/* @__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(
|
|
5422
|
+
l && /* @__PURE__ */ r(Xr, { config: a.logo }),
|
|
5386
5423
|
l && c && /* @__PURE__ */ r(
|
|
5387
5424
|
"span",
|
|
5388
5425
|
{
|
|
@@ -5526,41 +5563,41 @@ const qe = {
|
|
|
5526
5563
|
),
|
|
5527
5564
|
typeof document < "u" && s ? it(s, document.body) : null
|
|
5528
5565
|
] });
|
|
5529
|
-
},
|
|
5566
|
+
}, xn = ({
|
|
5530
5567
|
workflowKey: e,
|
|
5531
5568
|
externalRefId: t,
|
|
5532
5569
|
onSuccess: n,
|
|
5533
5570
|
onCancel: a
|
|
5534
5571
|
}) => {
|
|
5535
5572
|
var _e, He, Ue, je;
|
|
5536
|
-
const { config: s, baseInformationService: l, currentTheme: c } =
|
|
5573
|
+
const { config: s, baseInformationService: l, currentTheme: c } = ye(), { createApplicant: u, isLoading: h } = Cr(), m = e || ((_e = s.applicantForm) == null ? void 0 : _e.workflowKey);
|
|
5537
5574
|
if (!m)
|
|
5538
5575
|
throw new Error(
|
|
5539
5576
|
"workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
|
|
5540
5577
|
);
|
|
5541
|
-
const v = t || ((He = s.applicantForm) == null ? void 0 : He.externalRefId) || "", C = ((Ue = s.applicantForm) == null ? void 0 : Ue.email) || "", f =
|
|
5578
|
+
const v = t || ((He = s.applicantForm) == null ? void 0 : He.externalRefId) || "", C = ((Ue = s.applicantForm) == null ? void 0 : Ue.email) || "", f = Ie(
|
|
5542
5579
|
() => c != null && c.applicantFormPages && c.applicantFormPages.length > 0 ? c.applicantFormPages : null,
|
|
5543
5580
|
[c == null ? void 0 : c.applicantFormPages]
|
|
5544
|
-
), S =
|
|
5545
|
-
const i = new Set(Ve),
|
|
5546
|
-
if (
|
|
5581
|
+
), S = Ie(() => {
|
|
5582
|
+
const i = new Set(Ve), y = c == null ? void 0 : c.applicantFormRequiredFields;
|
|
5583
|
+
if (y) for (const x of y) i.add(x);
|
|
5547
5584
|
if (f)
|
|
5548
5585
|
for (const x of f)
|
|
5549
5586
|
for (const d of x.fields)
|
|
5550
5587
|
!d.isCustom && d.name && d.required && i.add(d.name);
|
|
5551
5588
|
return Array.from(i);
|
|
5552
|
-
}, [c == null ? void 0 : c.applicantFormRequiredFields, f]), b =
|
|
5589
|
+
}, [c == null ? void 0 : c.applicantFormRequiredFields, f]), b = Ie(() => {
|
|
5553
5590
|
var x;
|
|
5554
5591
|
if (f) {
|
|
5555
|
-
const d = f.flatMap((
|
|
5556
|
-
for (const
|
|
5592
|
+
const d = f.flatMap((A) => A.fields).filter((A) => !A.isCustom && A.name).map((A) => A.name), p = new Set(d);
|
|
5593
|
+
for (const A of Ve) p.add(A);
|
|
5557
5594
|
return Array.from(p);
|
|
5558
5595
|
}
|
|
5559
5596
|
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(
|
|
5597
|
+
(x = s.applicantForm) != null && x.visibleFields ? i = s.applicantForm.visibleFields : c != null && c.applicantFormVisibleFields && c.applicantFormVisibleFields.length > 0 ? i = c.applicantFormVisibleFields : i = Bt;
|
|
5598
|
+
const y = new Set(i);
|
|
5599
|
+
for (const d of Ve) y.add(d);
|
|
5600
|
+
return Array.from(y);
|
|
5564
5601
|
}, [(je = s.applicantForm) == null ? void 0 : je.visibleFields, c == null ? void 0 : c.applicantFormVisibleFields, f]), D = /* @__PURE__ */ new Set([
|
|
5565
5602
|
"country",
|
|
5566
5603
|
"nationality",
|
|
@@ -5568,13 +5605,13 @@ const qe = {
|
|
|
5568
5605
|
"countryOfBirth",
|
|
5569
5606
|
"mobileCountryCode",
|
|
5570
5607
|
"otherNationality"
|
|
5571
|
-
]), F =
|
|
5572
|
-
var
|
|
5608
|
+
]), F = Ie(() => {
|
|
5609
|
+
var y, x;
|
|
5573
5610
|
const i = /* @__PURE__ */ new Set();
|
|
5574
5611
|
if (f)
|
|
5575
5612
|
for (const d of f)
|
|
5576
5613
|
for (const p of d.fields)
|
|
5577
|
-
!p.isCustom && p.name && D.has(p.name) && i.add(p.countriesType ?? ((
|
|
5614
|
+
!p.isCustom && p.name && D.has(p.name) && i.add(p.countriesType ?? ((y = Me[p.name]) == null ? void 0 : y.countriesType));
|
|
5578
5615
|
else
|
|
5579
5616
|
for (const d of b)
|
|
5580
5617
|
D.has(d) && i.add((x = Me[d]) == null ? void 0 : x.countriesType);
|
|
@@ -5588,38 +5625,38 @@ const qe = {
|
|
|
5588
5625
|
});
|
|
5589
5626
|
if (i.length === 0) {
|
|
5590
5627
|
F.every((p) => {
|
|
5591
|
-
const
|
|
5592
|
-
return X.current.has(
|
|
5628
|
+
const A = p != null ? String(p) : "all";
|
|
5629
|
+
return X.current.has(A);
|
|
5593
5630
|
}) && T(!1);
|
|
5594
5631
|
return;
|
|
5595
5632
|
}
|
|
5596
5633
|
T(!0);
|
|
5597
|
-
const
|
|
5598
|
-
|
|
5634
|
+
const y = i.map((d) => d != null ? String(d) : "all");
|
|
5635
|
+
y.forEach((d) => Y.current.add(d)), (async () => {
|
|
5599
5636
|
try {
|
|
5600
5637
|
const d = await Promise.all(
|
|
5601
5638
|
i.map(async (p) => {
|
|
5602
|
-
const
|
|
5639
|
+
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
5640
|
value: q.countryCode,
|
|
5604
5641
|
label: `${q.countryCode} – ${q.name}`
|
|
5605
|
-
} : { value: q.abbreviation3 || q.abbreviation, label: q.name }).filter((q) => !q.value ||
|
|
5606
|
-
return X.current.add(
|
|
5642
|
+
} : { value: q.abbreviation3 || q.abbreviation, label: q.name }).filter((q) => !q.value || g.has(q.value) ? !1 : (g.add(q.value), !0));
|
|
5643
|
+
return X.current.add(A), Y.current.delete(A), [A, ae];
|
|
5607
5644
|
})
|
|
5608
5645
|
);
|
|
5609
5646
|
$((p) => ({ ...p, ...Object.fromEntries(d) }));
|
|
5610
5647
|
} catch (d) {
|
|
5611
|
-
|
|
5648
|
+
y.forEach((p) => Y.current.delete(p)), console.error("Failed to load countries:", d);
|
|
5612
5649
|
} finally {
|
|
5613
5650
|
F.every((p) => {
|
|
5614
|
-
const
|
|
5615
|
-
return X.current.has(
|
|
5651
|
+
const A = p != null ? String(p) : "all";
|
|
5652
|
+
return X.current.has(A);
|
|
5616
5653
|
}) && T(!1);
|
|
5617
5654
|
}
|
|
5618
5655
|
})();
|
|
5619
5656
|
}, [F, c]);
|
|
5620
|
-
const
|
|
5657
|
+
const I = (i, y) => {
|
|
5621
5658
|
var p;
|
|
5622
|
-
const x =
|
|
5659
|
+
const x = y ?? ((p = Me[i]) == null ? void 0 : p.countriesType), d = x != null ? String(x) : "all";
|
|
5623
5660
|
return P[d] || [];
|
|
5624
5661
|
}, [N, H] = k({
|
|
5625
5662
|
workflowKey: m,
|
|
@@ -5646,48 +5683,48 @@ const qe = {
|
|
|
5646
5683
|
educationLevel: "",
|
|
5647
5684
|
occupation: "",
|
|
5648
5685
|
taxNumber: ""
|
|
5649
|
-
}), [W, w] = k({}), [
|
|
5686
|
+
}), [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
5687
|
var x;
|
|
5651
|
-
const
|
|
5688
|
+
const y = {};
|
|
5652
5689
|
for (const d of i.fields)
|
|
5653
5690
|
if (d.isCustom) {
|
|
5654
5691
|
if (d.customType === "paragraph" || d.customType === "html" || d.customType === "br" || d.customType === "link") continue;
|
|
5655
5692
|
if (d.required && d.paramName) {
|
|
5656
|
-
const p = W[d.paramName],
|
|
5657
|
-
d.customType === "checkbox" || d.customType === "link_checkbox" ? p !== "true" && (
|
|
5693
|
+
const p = W[d.paramName], A = d.displayText || d.label || d.paramName;
|
|
5694
|
+
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
5695
|
}
|
|
5659
5696
|
} else if (d.name) {
|
|
5660
5697
|
const p = d.name;
|
|
5661
5698
|
if (S.includes(p) && Ye(N[p])) {
|
|
5662
|
-
const
|
|
5663
|
-
|
|
5699
|
+
const A = d.displayText || ((x = Me[p]) == null ? void 0 : x.label) || p;
|
|
5700
|
+
y[p] = `${A} is required.`;
|
|
5664
5701
|
}
|
|
5665
5702
|
}
|
|
5666
|
-
return
|
|
5703
|
+
return y;
|
|
5667
5704
|
}, pe = async () => {
|
|
5668
5705
|
if (!f) return;
|
|
5669
|
-
const i = f[
|
|
5706
|
+
const i = f[z];
|
|
5670
5707
|
if (i.conditionalOn && !Z(i)) {
|
|
5671
5708
|
G({}), ie >= 0 ? L(ie) : await Oe();
|
|
5672
5709
|
return;
|
|
5673
5710
|
}
|
|
5674
|
-
const
|
|
5675
|
-
if (Object.keys(
|
|
5676
|
-
G(
|
|
5711
|
+
const y = Pe(i);
|
|
5712
|
+
if (Object.keys(y).length > 0) {
|
|
5713
|
+
G(y);
|
|
5677
5714
|
return;
|
|
5678
5715
|
}
|
|
5679
5716
|
G({}), ie >= 0 ? L(ie) : await Oe();
|
|
5680
5717
|
}, Oe = async () => {
|
|
5681
5718
|
if (f) {
|
|
5682
5719
|
let i = {};
|
|
5683
|
-
for (const
|
|
5684
|
-
Z(
|
|
5720
|
+
for (const y of f)
|
|
5721
|
+
Z(y) && (i = { ...i, ...Pe(y) });
|
|
5685
5722
|
if (Object.keys(i).length > 0) {
|
|
5686
5723
|
G(i);
|
|
5687
5724
|
return;
|
|
5688
5725
|
}
|
|
5689
5726
|
}
|
|
5690
|
-
|
|
5727
|
+
ge(!0), U(null);
|
|
5691
5728
|
try {
|
|
5692
5729
|
if (!N.externalRefId || N.externalRefId.trim() === "") {
|
|
5693
5730
|
U("External Reference ID is required. Please pass it via config.applicantForm.externalRefId.");
|
|
@@ -5702,8 +5739,8 @@ const qe = {
|
|
|
5702
5739
|
if (Z(d)) {
|
|
5703
5740
|
for (const p of d.fields)
|
|
5704
5741
|
if (!p.isCustom && p.name) {
|
|
5705
|
-
const
|
|
5706
|
-
Ye(
|
|
5742
|
+
const A = p.name, B = N[A];
|
|
5743
|
+
Ye(B) || (i[A] = B);
|
|
5707
5744
|
}
|
|
5708
5745
|
}
|
|
5709
5746
|
for (const d of Ve)
|
|
@@ -5717,47 +5754,47 @@ const qe = {
|
|
|
5717
5754
|
const p = N[d];
|
|
5718
5755
|
Ye(p) || (i[d] = p);
|
|
5719
5756
|
});
|
|
5720
|
-
const
|
|
5757
|
+
const y = [];
|
|
5721
5758
|
if (f) {
|
|
5722
5759
|
for (const d of f)
|
|
5723
5760
|
if (Z(d))
|
|
5724
5761
|
for (const p of d.fields) {
|
|
5725
5762
|
if (!p.isCustom || !p.paramName || p.customType === "paragraph" || p.customType === "html" || p.customType === "br" || p.customType === "link") continue;
|
|
5726
|
-
const
|
|
5727
|
-
let
|
|
5763
|
+
const A = W[p.paramName] ?? "";
|
|
5764
|
+
let B;
|
|
5728
5765
|
if (p.customType === "checkbox" || p.customType === "link_checkbox")
|
|
5729
|
-
|
|
5730
|
-
else if (
|
|
5731
|
-
|
|
5766
|
+
B = A === "true" ? "yes" : "no";
|
|
5767
|
+
else if (B = A, !B && !p.required) continue;
|
|
5768
|
+
y.push({ paramName: p.paramName, value: B });
|
|
5732
5769
|
}
|
|
5733
5770
|
}
|
|
5734
|
-
|
|
5771
|
+
y.length > 0 && (i.applicantAdditionalDatas = y);
|
|
5735
5772
|
const x = await u(i);
|
|
5736
5773
|
n(x.applicantId);
|
|
5737
5774
|
} catch (i) {
|
|
5738
5775
|
console.error("Error creating applicant:", i), U(i.message || "Failed to create applicant");
|
|
5739
5776
|
} finally {
|
|
5740
|
-
|
|
5777
|
+
ge(!1);
|
|
5741
5778
|
}
|
|
5742
5779
|
}, Xe = async (i) => {
|
|
5743
|
-
var
|
|
5780
|
+
var y;
|
|
5744
5781
|
i.preventDefault();
|
|
5745
5782
|
for (const x of S)
|
|
5746
5783
|
if (Ye(N[x])) {
|
|
5747
|
-
const d = ((
|
|
5784
|
+
const d = ((y = Me[x]) == null ? void 0 : y.label) || x;
|
|
5748
5785
|
U(`${d} is required.`);
|
|
5749
5786
|
return;
|
|
5750
5787
|
}
|
|
5751
5788
|
await Oe();
|
|
5752
|
-
}, xe = (i,
|
|
5789
|
+
}, xe = (i, y, x, d) => {
|
|
5753
5790
|
var q;
|
|
5754
5791
|
const p = Me[i];
|
|
5755
5792
|
if (!p) return null;
|
|
5756
|
-
const
|
|
5793
|
+
const A = S.includes(i), B = O[i], _ = x || p.label, g = y ?? i, ae = { required: A };
|
|
5757
5794
|
switch (p.type) {
|
|
5758
5795
|
case "select":
|
|
5759
5796
|
if (i === "country" || i === "nationality" || i === "taxCountry" || i === "countryOfBirth" || i === "mobileCountryCode") {
|
|
5760
|
-
const le =
|
|
5797
|
+
const le = I(i, d);
|
|
5761
5798
|
return /* @__PURE__ */ r(
|
|
5762
5799
|
Re,
|
|
5763
5800
|
{
|
|
@@ -5767,9 +5804,9 @@ const qe = {
|
|
|
5767
5804
|
onChange: (Fe) => se(i, Fe),
|
|
5768
5805
|
options: [{ value: "", label: `Select ${_.toLowerCase()}...` }, ...le],
|
|
5769
5806
|
disabled: R,
|
|
5770
|
-
error:
|
|
5807
|
+
error: B
|
|
5771
5808
|
},
|
|
5772
|
-
|
|
5809
|
+
g
|
|
5773
5810
|
);
|
|
5774
5811
|
}
|
|
5775
5812
|
if (i === "salutation")
|
|
@@ -5786,9 +5823,9 @@ const qe = {
|
|
|
5786
5823
|
{ value: Ze.Female.toString(), label: "Female" },
|
|
5787
5824
|
{ value: Ze.Other.toString(), label: "Other" }
|
|
5788
5825
|
],
|
|
5789
|
-
error:
|
|
5826
|
+
error: B
|
|
5790
5827
|
},
|
|
5791
|
-
|
|
5828
|
+
g
|
|
5792
5829
|
);
|
|
5793
5830
|
if (i === "defaultLanguage") {
|
|
5794
5831
|
const le = c != null && c.allowedLanguages && c.allowedLanguages.length > 0 ? lt.filter((Fe) => c.allowedLanguages.includes(Fe.value)) : lt;
|
|
@@ -5800,17 +5837,17 @@ const qe = {
|
|
|
5800
5837
|
value: N[i] || "",
|
|
5801
5838
|
onChange: (Fe) => se(i, Fe),
|
|
5802
5839
|
options: [{ value: "", label: "Select language..." }, ...le],
|
|
5803
|
-
error:
|
|
5840
|
+
error: B
|
|
5804
5841
|
},
|
|
5805
|
-
|
|
5842
|
+
g
|
|
5806
5843
|
);
|
|
5807
5844
|
}
|
|
5808
5845
|
return null;
|
|
5809
5846
|
case "multiselect":
|
|
5810
5847
|
if (i === "otherNationality") {
|
|
5811
|
-
const le =
|
|
5848
|
+
const le = I(i, d);
|
|
5812
5849
|
return /* @__PURE__ */ r(
|
|
5813
|
-
|
|
5850
|
+
Er,
|
|
5814
5851
|
{
|
|
5815
5852
|
...ae,
|
|
5816
5853
|
label: _,
|
|
@@ -5820,7 +5857,7 @@ const qe = {
|
|
|
5820
5857
|
placeholder: "Select other nationalities...",
|
|
5821
5858
|
disabled: R
|
|
5822
5859
|
},
|
|
5823
|
-
|
|
5860
|
+
g
|
|
5824
5861
|
);
|
|
5825
5862
|
}
|
|
5826
5863
|
return null;
|
|
@@ -5833,9 +5870,9 @@ const qe = {
|
|
|
5833
5870
|
label: _,
|
|
5834
5871
|
value: N[i] || "",
|
|
5835
5872
|
onChange: (le) => se(i, le.target.value),
|
|
5836
|
-
error:
|
|
5873
|
+
error: B
|
|
5837
5874
|
},
|
|
5838
|
-
|
|
5875
|
+
g
|
|
5839
5876
|
);
|
|
5840
5877
|
case "email":
|
|
5841
5878
|
return /* @__PURE__ */ r(
|
|
@@ -5846,9 +5883,9 @@ const qe = {
|
|
|
5846
5883
|
label: _,
|
|
5847
5884
|
value: N[i] || "",
|
|
5848
5885
|
onChange: (le) => se(i, le.target.value),
|
|
5849
|
-
error:
|
|
5886
|
+
error: B
|
|
5850
5887
|
},
|
|
5851
|
-
|
|
5888
|
+
g
|
|
5852
5889
|
);
|
|
5853
5890
|
case "tel":
|
|
5854
5891
|
return /* @__PURE__ */ r(
|
|
@@ -5859,9 +5896,9 @@ const qe = {
|
|
|
5859
5896
|
label: _,
|
|
5860
5897
|
value: N[i] || "",
|
|
5861
5898
|
onChange: (le) => se(i, le.target.value),
|
|
5862
|
-
error:
|
|
5899
|
+
error: B
|
|
5863
5900
|
},
|
|
5864
|
-
|
|
5901
|
+
g
|
|
5865
5902
|
);
|
|
5866
5903
|
default:
|
|
5867
5904
|
return /* @__PURE__ */ r(
|
|
@@ -5872,12 +5909,12 @@ const qe = {
|
|
|
5872
5909
|
label: _,
|
|
5873
5910
|
value: N[i] || "",
|
|
5874
5911
|
onChange: (le) => se(i, le.target.value),
|
|
5875
|
-
error:
|
|
5912
|
+
error: B
|
|
5876
5913
|
},
|
|
5877
|
-
|
|
5914
|
+
g
|
|
5878
5915
|
);
|
|
5879
5916
|
}
|
|
5880
|
-
}, et = (i,
|
|
5917
|
+
}, et = (i, y) => {
|
|
5881
5918
|
if (i.customType === "paragraph") {
|
|
5882
5919
|
const p = i.displayText || i.label || "";
|
|
5883
5920
|
return /* @__PURE__ */ r(
|
|
@@ -5892,7 +5929,7 @@ const qe = {
|
|
|
5892
5929
|
},
|
|
5893
5930
|
dangerouslySetInnerHTML: { __html: p }
|
|
5894
5931
|
},
|
|
5895
|
-
`custom-${
|
|
5932
|
+
`custom-${y}`
|
|
5896
5933
|
);
|
|
5897
5934
|
}
|
|
5898
5935
|
if (i.customType === "html")
|
|
@@ -5901,10 +5938,10 @@ const qe = {
|
|
|
5901
5938
|
{
|
|
5902
5939
|
dangerouslySetInnerHTML: { __html: i.label || "" }
|
|
5903
5940
|
},
|
|
5904
|
-
`custom-${
|
|
5941
|
+
`custom-${y}`
|
|
5905
5942
|
);
|
|
5906
5943
|
if (i.customType === "br")
|
|
5907
|
-
return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${
|
|
5944
|
+
return /* @__PURE__ */ r("div", { style: { height: "12px" } }, `custom-${y}`);
|
|
5908
5945
|
if (i.customType === "link") {
|
|
5909
5946
|
const p = i.displayText || i.label || i.linkText || i.linkUrl || "";
|
|
5910
5947
|
return /* @__PURE__ */ r("div", { className: "metakyc-link-field", children: /* @__PURE__ */ o(
|
|
@@ -5927,7 +5964,7 @@ const qe = {
|
|
|
5927
5964
|
/* @__PURE__ */ r("span", { style: { fontSize: "10px", opacity: 0.7 }, children: "↗" })
|
|
5928
5965
|
]
|
|
5929
5966
|
}
|
|
5930
|
-
) }, `custom-${
|
|
5967
|
+
) }, `custom-${y}`);
|
|
5931
5968
|
}
|
|
5932
5969
|
if (!i.paramName) return null;
|
|
5933
5970
|
const x = O[i.paramName], d = i.displayText || i.label || i.paramName;
|
|
@@ -5964,7 +6001,7 @@ const qe = {
|
|
|
5964
6001
|
}
|
|
5965
6002
|
),
|
|
5966
6003
|
x && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: x })
|
|
5967
|
-
] }, `custom-${
|
|
6004
|
+
] }, `custom-${y}`);
|
|
5968
6005
|
if (i.customType === "link_checkbox")
|
|
5969
6006
|
return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: [
|
|
5970
6007
|
/* @__PURE__ */ o(
|
|
@@ -6011,7 +6048,7 @@ const qe = {
|
|
|
6011
6048
|
}
|
|
6012
6049
|
),
|
|
6013
6050
|
x && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs mt-0.5", children: x })
|
|
6014
|
-
] }, `custom-${
|
|
6051
|
+
] }, `custom-${y}`);
|
|
6015
6052
|
if (i.customType === "group_checkbox") {
|
|
6016
6053
|
const p = (W[i.paramName] || "").split(",").filter(Boolean);
|
|
6017
6054
|
return /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
|
|
@@ -6026,8 +6063,8 @@ const qe = {
|
|
|
6026
6063
|
]
|
|
6027
6064
|
}
|
|
6028
6065
|
),
|
|
6029
|
-
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (i.options || []).map((
|
|
6030
|
-
const
|
|
6066
|
+
/* @__PURE__ */ r("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (i.options || []).map((A) => {
|
|
6067
|
+
const B = i.singleSelect ? W[i.paramName] === A.value : p.includes(A.value);
|
|
6031
6068
|
return /* @__PURE__ */ o(
|
|
6032
6069
|
"label",
|
|
6033
6070
|
{
|
|
@@ -6038,13 +6075,13 @@ const qe = {
|
|
|
6038
6075
|
"input",
|
|
6039
6076
|
{
|
|
6040
6077
|
type: "checkbox",
|
|
6041
|
-
checked:
|
|
6078
|
+
checked: B,
|
|
6042
6079
|
onChange: (_) => {
|
|
6043
6080
|
if (i.singleSelect)
|
|
6044
|
-
M(i.paramName, _.target.checked ?
|
|
6081
|
+
M(i.paramName, _.target.checked ? A.value : "");
|
|
6045
6082
|
else {
|
|
6046
|
-
const
|
|
6047
|
-
M(i.paramName,
|
|
6083
|
+
const g = _.target.checked ? [...p, A.value] : p.filter((ae) => ae !== A.value);
|
|
6084
|
+
M(i.paramName, g.join(","));
|
|
6048
6085
|
}
|
|
6049
6086
|
},
|
|
6050
6087
|
className: "metakyc-option-input",
|
|
@@ -6056,16 +6093,16 @@ const qe = {
|
|
|
6056
6093
|
{
|
|
6057
6094
|
className: "metakyc-option-text",
|
|
6058
6095
|
style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
|
|
6059
|
-
children:
|
|
6096
|
+
children: A.label
|
|
6060
6097
|
}
|
|
6061
6098
|
)
|
|
6062
6099
|
]
|
|
6063
6100
|
},
|
|
6064
|
-
|
|
6101
|
+
A.value
|
|
6065
6102
|
);
|
|
6066
6103
|
}) }),
|
|
6067
6104
|
x && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: x })
|
|
6068
|
-
] }, `custom-${
|
|
6105
|
+
] }, `custom-${y}`);
|
|
6069
6106
|
}
|
|
6070
6107
|
return i.customType === "radio_group" ? /* @__PURE__ */ o("div", { className: "flex flex-col gap-1.5", children: [
|
|
6071
6108
|
/* @__PURE__ */ o(
|
|
@@ -6091,7 +6128,7 @@ const qe = {
|
|
|
6091
6128
|
type: "radio",
|
|
6092
6129
|
checked: W[i.paramName] === p.value,
|
|
6093
6130
|
onChange: () => M(i.paramName, p.value),
|
|
6094
|
-
name: `radio-group-${i.paramName}-${
|
|
6131
|
+
name: `radio-group-${i.paramName}-${y}`,
|
|
6095
6132
|
className: "metakyc-option-input",
|
|
6096
6133
|
style: qe
|
|
6097
6134
|
}
|
|
@@ -6109,7 +6146,7 @@ const qe = {
|
|
|
6109
6146
|
p.value
|
|
6110
6147
|
)) }),
|
|
6111
6148
|
x && /* @__PURE__ */ r("p", { className: "text-red-500 text-xs", children: x })
|
|
6112
|
-
] }, `custom-${
|
|
6149
|
+
] }, `custom-${y}`) : /* @__PURE__ */ r(
|
|
6113
6150
|
de,
|
|
6114
6151
|
{
|
|
6115
6152
|
type: "text",
|
|
@@ -6119,9 +6156,9 @@ const qe = {
|
|
|
6119
6156
|
required: i.required,
|
|
6120
6157
|
error: x
|
|
6121
6158
|
},
|
|
6122
|
-
`custom-${
|
|
6159
|
+
`custom-${y}`
|
|
6123
6160
|
);
|
|
6124
|
-
}, tt = (i,
|
|
6161
|
+
}, tt = (i, y) => {
|
|
6125
6162
|
const x = Z(i);
|
|
6126
6163
|
return /* @__PURE__ */ o("div", { className: "space-y-4", children: [
|
|
6127
6164
|
i.conditionalOn && /* @__PURE__ */ r(pt, { helpText: i.conditionalHelpText, children: /* @__PURE__ */ o(
|
|
@@ -6152,8 +6189,8 @@ const qe = {
|
|
|
6152
6189
|
}
|
|
6153
6190
|
) }),
|
|
6154
6191
|
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:
|
|
6192
|
+
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}`;
|
|
6193
|
+
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
6194
|
}) })
|
|
6158
6195
|
] });
|
|
6159
6196
|
};
|
|
@@ -6163,7 +6200,7 @@ const qe = {
|
|
|
6163
6200
|
/* @__PURE__ */ r("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: "Loading form…" })
|
|
6164
6201
|
] }) }) });
|
|
6165
6202
|
if (f) {
|
|
6166
|
-
const i = f[
|
|
6203
|
+
const i = f[z] ?? f[0], y = Ee === -1, x = ie === -1, d = f.length, p = Z(i), A = Object.values(O);
|
|
6167
6204
|
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ o(j, { children: [
|
|
6168
6205
|
/* @__PURE__ */ r(ue, { children: /* @__PURE__ */ r(at, { title: (c == null ? void 0 : c.title) || "Create Applicant" }) }),
|
|
6169
6206
|
/* @__PURE__ */ o(K, { children: [
|
|
@@ -6193,25 +6230,25 @@ const qe = {
|
|
|
6193
6230
|
}
|
|
6194
6231
|
)
|
|
6195
6232
|
] }),
|
|
6196
|
-
(
|
|
6197
|
-
|
|
6233
|
+
(E || A.length > 0) && /* @__PURE__ */ o("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
|
|
6234
|
+
E && /* @__PURE__ */ o("p", { className: "text-red-600 text-sm", children: [
|
|
6198
6235
|
/* @__PURE__ */ r("strong", { children: "Error:" }),
|
|
6199
6236
|
" ",
|
|
6200
|
-
|
|
6237
|
+
E
|
|
6201
6238
|
] }),
|
|
6202
|
-
|
|
6239
|
+
A.map((B, _) => /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: B }, _))
|
|
6203
6240
|
] }),
|
|
6204
6241
|
d > 1 && /* @__PURE__ */ o("div", { className: "flex items-center gap-2 mb-4", children: [
|
|
6205
|
-
f.map((
|
|
6242
|
+
f.map((B, _) => /* @__PURE__ */ r(
|
|
6206
6243
|
"div",
|
|
6207
6244
|
{
|
|
6208
|
-
className: `h-1.5 rounded-full transition-all ${_ ===
|
|
6209
|
-
style: _ ===
|
|
6245
|
+
className: `h-1.5 rounded-full transition-all ${_ === z ? "flex-1" : "w-8"}`,
|
|
6246
|
+
style: _ === z ? { backgroundColor: "var(--metakyc-primary, #2563eb)" } : _ < z ? { backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: 0.7 } : { backgroundColor: "#e5e7eb" }
|
|
6210
6247
|
},
|
|
6211
6248
|
_
|
|
6212
6249
|
)),
|
|
6213
6250
|
/* @__PURE__ */ o("span", { className: "text-xs text-gray-400 flex-shrink-0", children: [
|
|
6214
|
-
|
|
6251
|
+
z + 1,
|
|
6215
6252
|
" / ",
|
|
6216
6253
|
d
|
|
6217
6254
|
] })
|
|
@@ -6220,19 +6257,19 @@ const qe = {
|
|
|
6220
6257
|
] }),
|
|
6221
6258
|
/* @__PURE__ */ o(me, { className: "flex justify-between", children: [
|
|
6222
6259
|
/* @__PURE__ */ o("div", { children: [
|
|
6223
|
-
!
|
|
6260
|
+
!y && /* @__PURE__ */ r(
|
|
6224
6261
|
Q,
|
|
6225
6262
|
{
|
|
6226
6263
|
type: "button",
|
|
6227
6264
|
variant: "outline",
|
|
6228
6265
|
onClick: () => {
|
|
6229
|
-
L(
|
|
6266
|
+
L(Ee), G({});
|
|
6230
6267
|
},
|
|
6231
6268
|
disabled: te || h,
|
|
6232
6269
|
children: "Previous"
|
|
6233
6270
|
}
|
|
6234
6271
|
),
|
|
6235
|
-
|
|
6272
|
+
y && a && /* @__PURE__ */ r(Q, { type: "button", variant: "outline", onClick: a, disabled: te || h, children: "Cancel" })
|
|
6236
6273
|
] }),
|
|
6237
6274
|
/* @__PURE__ */ r(
|
|
6238
6275
|
Q,
|
|
@@ -6249,10 +6286,10 @@ const qe = {
|
|
|
6249
6286
|
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit: Xe, children: /* @__PURE__ */ o(j, { children: [
|
|
6250
6287
|
/* @__PURE__ */ r(ue, { children: /* @__PURE__ */ r(at, { title: (c == null ? void 0 : c.title) || "Create Applicant" }) }),
|
|
6251
6288
|
/* @__PURE__ */ o(K, { children: [
|
|
6252
|
-
|
|
6289
|
+
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
6290
|
/* @__PURE__ */ r("strong", { children: "Error:" }),
|
|
6254
6291
|
" ",
|
|
6255
|
-
|
|
6292
|
+
E
|
|
6256
6293
|
] }) }),
|
|
6257
6294
|
/* @__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
6295
|
] }),
|
|
@@ -6261,7 +6298,7 @@ const qe = {
|
|
|
6261
6298
|
/* @__PURE__ */ r(Q, { type: "submit", isLoading: te || h, children: "Create Applicant" })
|
|
6262
6299
|
] })
|
|
6263
6300
|
] }) }) });
|
|
6264
|
-
},
|
|
6301
|
+
}, vn = ({
|
|
6265
6302
|
applicantId: e,
|
|
6266
6303
|
onComplete: t,
|
|
6267
6304
|
onError: n,
|
|
@@ -6279,7 +6316,7 @@ const qe = {
|
|
|
6279
6316
|
error: f,
|
|
6280
6317
|
moveBack: S,
|
|
6281
6318
|
refreshProgress: b
|
|
6282
|
-
} =
|
|
6319
|
+
} = xr(e), [D, F] = be.useState(!1);
|
|
6283
6320
|
if (be.useEffect(() => {
|
|
6284
6321
|
f && n && n(f);
|
|
6285
6322
|
}, [f, n]), be.useEffect(() => {
|
|
@@ -6369,15 +6406,15 @@ const qe = {
|
|
|
6369
6406
|
return "";
|
|
6370
6407
|
}
|
|
6371
6408
|
}, $ = () => {
|
|
6372
|
-
const T = u.filter((N) => N.visibility !== !1), Y = T.findIndex((N) => N.order === c.order), X = Y >= 0 ? Y + 1 : 1,
|
|
6409
|
+
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
6410
|
return /* @__PURE__ */ o("div", { className: "mb-6", children: [
|
|
6374
6411
|
/* @__PURE__ */ o("div", { className: "flex items-start justify-between mb-4", children: [
|
|
6375
6412
|
/* @__PURE__ */ r(at, {}),
|
|
6376
|
-
/* @__PURE__ */ o(
|
|
6413
|
+
/* @__PURE__ */ o(Ae, { variant: l.status === 1 ? "info" : "success", children: [
|
|
6377
6414
|
"Step ",
|
|
6378
6415
|
X,
|
|
6379
6416
|
" of ",
|
|
6380
|
-
|
|
6417
|
+
I
|
|
6381
6418
|
] })
|
|
6382
6419
|
] }),
|
|
6383
6420
|
/* @__PURE__ */ r("div", { className: "flex items-center", children: T.map((N, H) => {
|
|
@@ -6421,20 +6458,20 @@ const qe = {
|
|
|
6421
6458
|
};
|
|
6422
6459
|
switch (c.action) {
|
|
6423
6460
|
case J.Questionaries:
|
|
6424
|
-
return /* @__PURE__ */ r($r, { ...T });
|
|
6425
|
-
case J.UploadDocument:
|
|
6426
6461
|
return /* @__PURE__ */ r(Br, { ...T });
|
|
6427
|
-
case J.
|
|
6462
|
+
case J.UploadDocument:
|
|
6428
6463
|
return /* @__PURE__ */ r(_r, { ...T });
|
|
6464
|
+
case J.Overview:
|
|
6465
|
+
return /* @__PURE__ */ r(Hr, { ...T });
|
|
6429
6466
|
case J.IdentitySdk:
|
|
6430
|
-
return /* @__PURE__ */ r(
|
|
6467
|
+
return /* @__PURE__ */ r(Zr, { ...T });
|
|
6431
6468
|
case J.RiskScoring:
|
|
6432
|
-
return /* @__PURE__ */ r(
|
|
6469
|
+
return /* @__PURE__ */ r(Qr, { ...T });
|
|
6433
6470
|
case J.AdditionalData:
|
|
6434
6471
|
case J.InvestorCategorization:
|
|
6435
|
-
return /* @__PURE__ */ r(Gr, { ...T });
|
|
6436
|
-
case J.AppropriatenessTest:
|
|
6437
6472
|
return /* @__PURE__ */ r(Vr, { ...T });
|
|
6473
|
+
case J.AppropriatenessTest:
|
|
6474
|
+
return /* @__PURE__ */ r(Jr, { ...T });
|
|
6438
6475
|
case J.ManualReview:
|
|
6439
6476
|
return /* @__PURE__ */ r(
|
|
6440
6477
|
mt,
|
|
@@ -6464,12 +6501,12 @@ const qe = {
|
|
|
6464
6501
|
R()
|
|
6465
6502
|
] });
|
|
6466
6503
|
};
|
|
6467
|
-
function
|
|
6504
|
+
function kn(e) {
|
|
6468
6505
|
return Ce.object({
|
|
6469
6506
|
questionResults: Ce.any()
|
|
6470
6507
|
}).passthrough();
|
|
6471
6508
|
}
|
|
6472
|
-
function
|
|
6509
|
+
function en(e) {
|
|
6473
6510
|
let t = Ce.array(Ce.instanceof(File));
|
|
6474
6511
|
if (e.isRequired ? t = t.min(
|
|
6475
6512
|
1,
|
|
@@ -6491,37 +6528,37 @@ function Xr(e) {
|
|
|
6491
6528
|
}
|
|
6492
6529
|
return t;
|
|
6493
6530
|
}
|
|
6494
|
-
function
|
|
6531
|
+
function wn(e) {
|
|
6495
6532
|
const t = {};
|
|
6496
6533
|
return e.uploadDocumentFiles.forEach((n) => {
|
|
6497
6534
|
const a = `file_${n.id}`;
|
|
6498
|
-
t[a] =
|
|
6535
|
+
t[a] = en(n);
|
|
6499
6536
|
}), Ce.object(t);
|
|
6500
6537
|
}
|
|
6501
|
-
function
|
|
6538
|
+
function Nn(e) {
|
|
6502
6539
|
return Ce.any();
|
|
6503
6540
|
}
|
|
6504
|
-
function
|
|
6541
|
+
function tn(e) {
|
|
6505
6542
|
return Ce.string().min(1, "This question is required");
|
|
6506
6543
|
}
|
|
6507
|
-
function
|
|
6544
|
+
function Sn(e) {
|
|
6508
6545
|
const t = {};
|
|
6509
6546
|
return e.appropriatenessQuestions.forEach((n) => {
|
|
6510
6547
|
const a = `question_${n.id}`;
|
|
6511
|
-
t[a] =
|
|
6548
|
+
t[a] = tn();
|
|
6512
6549
|
}), Ce.object(t);
|
|
6513
6550
|
}
|
|
6514
|
-
const
|
|
6551
|
+
const Cn = Ce.any();
|
|
6515
6552
|
export {
|
|
6516
6553
|
lt as ALLOWED_LANGUAGES,
|
|
6517
|
-
|
|
6554
|
+
At as ApplicantProgressOnHoldReason,
|
|
6518
6555
|
ke as ApplicantProgressStatus,
|
|
6519
6556
|
Ut as ApplicantService,
|
|
6520
6557
|
Rt as ApplicantStatus,
|
|
6521
6558
|
Dt as AppropriatenessQuestionType,
|
|
6522
6559
|
Wt as AppropriatenessTestService,
|
|
6523
|
-
|
|
6524
|
-
|
|
6560
|
+
Jr as AppropriatenessTestStep,
|
|
6561
|
+
Ae as Badge,
|
|
6525
6562
|
Gt as BaseInformationService,
|
|
6526
6563
|
Q as Button,
|
|
6527
6564
|
j as Card,
|
|
@@ -6529,9 +6566,9 @@ export {
|
|
|
6529
6566
|
me as CardFooter,
|
|
6530
6567
|
ue as CardHeader,
|
|
6531
6568
|
$e as CountriesType,
|
|
6532
|
-
|
|
6569
|
+
xn as CreateApplicantForm,
|
|
6533
6570
|
Ot as CriteriaBuiltInType,
|
|
6534
|
-
|
|
6571
|
+
Bt as DEFAULT_VISIBLE_FIELDS,
|
|
6535
6572
|
Lt as DocumentReviewStatus,
|
|
6536
6573
|
_t as EndpointBuilder,
|
|
6537
6574
|
Ke as ErrorHandler,
|
|
@@ -6542,90 +6579,90 @@ export {
|
|
|
6542
6579
|
Ze as GenderType,
|
|
6543
6580
|
at as Header,
|
|
6544
6581
|
Ht as HttpClient,
|
|
6545
|
-
|
|
6582
|
+
Be as IdentityProviderManager,
|
|
6546
6583
|
Qt as IdentityService,
|
|
6547
6584
|
ve as IdentityVerificationProvider,
|
|
6548
|
-
|
|
6585
|
+
Zr as IdentityVerificationStep,
|
|
6549
6586
|
de as Input,
|
|
6550
6587
|
Vt as InvestorCategorizationService,
|
|
6551
|
-
|
|
6588
|
+
Vr as InvestorCategorizationStep,
|
|
6552
6589
|
fe as InvestorCategorizationType,
|
|
6553
6590
|
$t as InvestorCategoryType,
|
|
6554
6591
|
Pt as KycProcessStatus,
|
|
6555
6592
|
Le as KycStatus,
|
|
6556
6593
|
mt as KycStatusDisplay,
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6594
|
+
vn as KycWorkflow,
|
|
6595
|
+
Xr as Logo,
|
|
6596
|
+
yt as MetaKYCContext,
|
|
6560
6597
|
Ne as MetaKYCError,
|
|
6561
|
-
|
|
6562
|
-
|
|
6598
|
+
mn as MetaKYCProvider,
|
|
6599
|
+
Er as MultiSelect,
|
|
6563
6600
|
cr as OnfidoProvider,
|
|
6564
6601
|
Yt as OverviewService,
|
|
6565
|
-
|
|
6602
|
+
Hr as OverviewStep,
|
|
6566
6603
|
Ir as PhoneInput,
|
|
6567
6604
|
jt as QuestionnaireService,
|
|
6568
|
-
|
|
6605
|
+
Br as QuestionnaireStep,
|
|
6569
6606
|
De as ReviewStatus,
|
|
6570
6607
|
Mt as RiskCriteriaType,
|
|
6571
|
-
|
|
6608
|
+
It as RiskLevel,
|
|
6572
6609
|
qt as RiskScoringService,
|
|
6573
|
-
|
|
6610
|
+
Qr as RiskScoringStep,
|
|
6574
6611
|
dr as SardinAIProvider,
|
|
6575
6612
|
Re as SearchableSelect,
|
|
6576
6613
|
st as Select,
|
|
6577
6614
|
we as Spinner,
|
|
6578
6615
|
sr as StepRouter,
|
|
6579
6616
|
lr as SumsubProvider,
|
|
6580
|
-
|
|
6617
|
+
mr as ThemeManager,
|
|
6581
6618
|
ce as ThemePreset,
|
|
6582
6619
|
nr as ThemeService,
|
|
6583
6620
|
Kt as UploadDocumentService,
|
|
6584
|
-
|
|
6621
|
+
_r as UploadDocumentStep,
|
|
6585
6622
|
Ft as UserType,
|
|
6586
6623
|
Se as ValueDataType,
|
|
6587
6624
|
or as WorkflowOrchestrator,
|
|
6588
6625
|
Je as WorkflowResultType,
|
|
6589
6626
|
ir as WorkflowState,
|
|
6590
6627
|
J as WorkflowStepAction,
|
|
6591
|
-
|
|
6592
|
-
|
|
6628
|
+
Cn as appropriatenessTestSchema,
|
|
6629
|
+
fn as clearAllStorage,
|
|
6593
6630
|
gr as clearApplicantId,
|
|
6594
|
-
|
|
6631
|
+
br as clearWorkflowState,
|
|
6595
6632
|
oe as cn,
|
|
6596
6633
|
Jt as corporateTheme,
|
|
6597
|
-
|
|
6634
|
+
zt as defaultConfig,
|
|
6598
6635
|
he as defaultTheme,
|
|
6599
|
-
|
|
6636
|
+
pr as fileToBase64,
|
|
6600
6637
|
Zt as fintechTheme,
|
|
6601
6638
|
rt as formatFileSize,
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6639
|
+
Sn as generateAppropriatenessSchema,
|
|
6640
|
+
kn as generateQuestionnaireSchema,
|
|
6641
|
+
Nn as generateRiskScoringSchema,
|
|
6642
|
+
wn as generateUploadDocumentSchema,
|
|
6643
|
+
yn as getAcceptString,
|
|
6644
|
+
yr as getApplicantId,
|
|
6608
6645
|
We as getThemePreset,
|
|
6609
6646
|
gn as getWorkflowState,
|
|
6610
6647
|
Xt as healthcareTheme,
|
|
6611
|
-
|
|
6648
|
+
dn as isScriptLoaded,
|
|
6612
6649
|
ht as loadScript,
|
|
6613
6650
|
tr as minimalTheme,
|
|
6614
6651
|
er as modernTheme,
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6652
|
+
un as removeScript,
|
|
6653
|
+
hr as saveApplicantId,
|
|
6654
|
+
fr as saveWorkflowState,
|
|
6618
6655
|
rr as themePresets,
|
|
6619
|
-
|
|
6620
|
-
|
|
6621
|
-
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6629
|
-
|
|
6656
|
+
Cr as useApplicant,
|
|
6657
|
+
bn as useAppropriatenessTest,
|
|
6658
|
+
Nr as useIdentityVerification,
|
|
6659
|
+
xr as useKycWorkflow,
|
|
6660
|
+
ye as useMetaKYC,
|
|
6661
|
+
wr as useOverview,
|
|
6662
|
+
vr as useQuestionnaire,
|
|
6663
|
+
Sr as useRiskScoring,
|
|
6664
|
+
kr as useUploadDocument,
|
|
6665
|
+
pn as validateFileSize,
|
|
6666
|
+
hn as validateFileType
|
|
6630
6667
|
};
|
|
6631
6668
|
//# sourceMappingURL=index.js.map
|