@vpdev2/metakyc-sdk 1.0.8 → 1.0.9
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/context/MetaKYCProvider.d.ts.map +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +404 -402
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,12 +2,12 @@ var Je = Object.defineProperty;
|
|
|
2
2
|
var Xe = (t, e, r) => e in t ? Je(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
3
|
var K = (t, e, r) => Xe(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
4
|
import et from "axios";
|
|
5
|
-
import * as
|
|
6
|
-
import
|
|
5
|
+
import * as Me from "react";
|
|
6
|
+
import ie, { createContext as tt, useState as N, useMemo as Re, useEffect as Y, useContext as rt, useRef as H, useCallback as q, forwardRef as Le } from "react";
|
|
7
7
|
import { jsx as n, jsxs as o, Fragment as nt } from "react/jsx-runtime";
|
|
8
|
-
import { get as
|
|
8
|
+
import { get as De, set as Ee, appendErrors as _e, useForm as Te, Controller as J } from "react-hook-form";
|
|
9
9
|
import { z as ue } from "zod";
|
|
10
|
-
var U = /* @__PURE__ */ ((t) => (t[t.IdentitySdk = 0] = "IdentitySdk", t[t.RiskScoring = 1] = "RiskScoring", t[t.Questionaries = 2] = "Questionaries", t[t.AdditionalData = 3] = "AdditionalData", t[t.AppropriatenessTest = 4] = "AppropriatenessTest", t[t.UploadDocument = 5] = "UploadDocument", t[t.ManualReview = 6] = "ManualReview", t[t.Overview = 7] = "Overview", t[t.InvestorCategorization = 8] = "InvestorCategorization", t))(U || {}), Ne = /* @__PURE__ */ ((t) => (t[t.NotStarted = 0] = "NotStarted", t[t.InProgress = 1] = "InProgress", t[t.Success = 2] = "Success", t[t.PartialSuccess = 3] = "PartialSuccess", t[t.Failed = 4] = "Failed", t[t.Skipped = 5] = "Skipped", t[t.AdminReview = 6] = "AdminReview", t[t.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", t))(Ne || {}),
|
|
10
|
+
var U = /* @__PURE__ */ ((t) => (t[t.IdentitySdk = 0] = "IdentitySdk", t[t.RiskScoring = 1] = "RiskScoring", t[t.Questionaries = 2] = "Questionaries", t[t.AdditionalData = 3] = "AdditionalData", t[t.AppropriatenessTest = 4] = "AppropriatenessTest", t[t.UploadDocument = 5] = "UploadDocument", t[t.ManualReview = 6] = "ManualReview", t[t.Overview = 7] = "Overview", t[t.InvestorCategorization = 8] = "InvestorCategorization", t))(U || {}), Ne = /* @__PURE__ */ ((t) => (t[t.NotStarted = 0] = "NotStarted", t[t.InProgress = 1] = "InProgress", t[t.Success = 2] = "Success", t[t.PartialSuccess = 3] = "PartialSuccess", t[t.Failed = 4] = "Failed", t[t.Skipped = 5] = "Skipped", t[t.AdminReview = 6] = "AdminReview", t[t.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", t))(Ne || {}), le = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.InProgress = 1] = "InProgress", t[t.Finished = 2] = "Finished", t[t.OnHold = 3] = "OnHold", t[t.IdentityPending = 4] = "IdentityPending", t))(le || {}), st = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.RepresentativeKYC = 1] = "RepresentativeKYC", t[t.ManualRiskCriteria = 2] = "ManualRiskCriteria", t[t.UploadDocumentReview = 3] = "UploadDocumentReview", t[t.AdminReview = 4] = "AdminReview", t))(st || {}), at = /* @__PURE__ */ ((t) => (t[t.LowRisk = 0] = "LowRisk", t[t.MediumRisk = 1] = "MediumRisk", t[t.HighRisk = 2] = "HighRisk", t[t.Alert = 3] = "Alert", t))(at || {}), pe = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.Pending = 1] = "Pending", t[t.Approved = 2] = "Approved", t[t.Rejected = 3] = "Rejected", t[t.ResendRequested = 4] = "ResendRequested", t[t.Unknown = 5] = "Unknown", t[t.InProgress = 6] = "InProgress", t))(pe || {}), ge = /* @__PURE__ */ ((t) => (t[t.Approved = 0] = "Approved", t[t.Reject = 1] = "Reject", t[t.UnderReview = 2] = "UnderReview", t[t.Closed = 3] = "Closed", t[t.AdminReview = 4] = "AdminReview", t[t.New = 5] = "New", t[t.InProgress = 6] = "InProgress", t))(ge || {}), it = /* @__PURE__ */ ((t) => (t[t.ProviderResultPending = 0] = "ProviderResultPending", t[t.ProviderResultReceived = 1] = "ProviderResultReceived", t[t.Canceled = 2] = "Canceled", t[t.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", t))(it || {}), ot = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.ProviderResultPending = 1] = "ProviderResultPending", t[t.ProviderResultReceived = 2] = "ProviderResultReceived", t[t.Canceled = 3] = "Canceled", t))(ot || {}), oe = /* @__PURE__ */ ((t) => (t[t.Onfido = 0] = "Onfido", t[t.Sumsub = 2] = "Sumsub", t[t.SardinAI = 3] = "SardinAI", t))(oe || {}), lt = /* @__PURE__ */ ((t) => (t[t.Individual = 0] = "Individual", t[t.Company = 1] = "Company", t))(lt || {}), Se = /* @__PURE__ */ ((t) => (t[t.Male = 0] = "Male", t[t.Female = 1] = "Female", t[t.Other = 2] = "Other", t))(Se || {}), ct = /* @__PURE__ */ ((t) => (t[t.Image = 0] = "Image", t[t.Video = 1] = "Video", t[t.PDF = 2] = "PDF", t[t.OfficePDF = 3] = "OfficePDF", t[t.Custom = 4] = "Custom", t))(ct || {}), dt = /* @__PURE__ */ ((t) => (t[t.Pending = 0] = "Pending", t[t.Approved = 1] = "Approved", t[t.Rejected = 2] = "Rejected", t[t.RequiresRevision = 3] = "RequiresRevision", t))(dt || {}), ut = /* @__PURE__ */ ((t) => (t[t.SingleChoice = 0] = "SingleChoice", t[t.MultipleChoice = 1] = "MultipleChoice", t[t.Text = 2] = "Text", t))(ut || {}), Pe = /* @__PURE__ */ ((t) => (t[t.String = 0] = "String", t[t.Integer = 1] = "Integer", t[t.Decimal = 2] = "Decimal", t[t.Boolean = 3] = "Boolean", t[t.Date = 4] = "Date", t[t.Country = 5] = "Country", t[t.DigitOnly = 6] = "DigitOnly", t))(Pe || {}), mt = /* @__PURE__ */ ((t) => (t[t.Text = 0] = "Text", t[t.Radio = 1] = "Radio", t[t.Checkbox = 2] = "Checkbox", t[t.Dropdown = 3] = "Dropdown", t[t.Country = 4] = "Country", t))(mt || {}), ht = /* @__PURE__ */ ((t) => (t[t.None = 0] = "None", t[t.Country = 1] = "Country", t))(ht || {}), re = /* @__PURE__ */ ((t) => (t[t.Individual = 0] = "Individual", t[t.Sophisticated = 1] = "Sophisticated", t[t.HighNetWorth = 2] = "HighNetWorth", t[t.Business = 3] = "Business", t))(re || {}), pt = /* @__PURE__ */ ((t) => (t[t.Retail = 0] = "Retail", t[t.Professional = 1] = "Professional", t[t.EligibleCounterparty = 2] = "EligibleCounterparty", t))(pt || {});
|
|
11
11
|
const gt = [
|
|
12
12
|
"firstName",
|
|
13
13
|
"lastName",
|
|
@@ -121,13 +121,13 @@ class bt {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
class de extends Error {
|
|
124
|
-
constructor(r, s, a, i,
|
|
124
|
+
constructor(r, s, a, i, l) {
|
|
125
125
|
super(r);
|
|
126
126
|
K(this, "response");
|
|
127
|
-
this.code = s, this.details = a, this.validationErrors = i, this.name = "MetaKYCError", this.response =
|
|
127
|
+
this.code = s, this.details = a, this.validationErrors = i, this.name = "MetaKYCError", this.response = l, Object.setPrototypeOf(this, de.prototype);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
class
|
|
130
|
+
class ve {
|
|
131
131
|
/**
|
|
132
132
|
* Process an error from the API response
|
|
133
133
|
*/
|
|
@@ -177,7 +177,7 @@ class xe {
|
|
|
177
177
|
return e instanceof de;
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
class
|
|
180
|
+
class vt {
|
|
181
181
|
constructor(e) {
|
|
182
182
|
K(this, "axiosInstance");
|
|
183
183
|
K(this, "endpointBuilder");
|
|
@@ -218,7 +218,7 @@ class xt {
|
|
|
218
218
|
});
|
|
219
219
|
return this.handleResponse(i);
|
|
220
220
|
} catch (a) {
|
|
221
|
-
throw
|
|
221
|
+
throw ve.handleAxiosError(a);
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
224
|
/**
|
|
@@ -229,7 +229,7 @@ class xt {
|
|
|
229
229
|
const a = this.buildEndpoint(e, r), i = await this.axiosInstance.post(a, s);
|
|
230
230
|
return this.handleResponse(i);
|
|
231
231
|
} catch (a) {
|
|
232
|
-
throw
|
|
232
|
+
throw ve.handleAxiosError(a);
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
235
|
/**
|
|
@@ -240,7 +240,7 @@ class xt {
|
|
|
240
240
|
const a = this.buildEndpoint(e, r), i = await this.axiosInstance.put(a, s);
|
|
241
241
|
return this.handleResponse(i);
|
|
242
242
|
} catch (a) {
|
|
243
|
-
throw
|
|
243
|
+
throw ve.handleAxiosError(a);
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
/**
|
|
@@ -253,7 +253,7 @@ class xt {
|
|
|
253
253
|
});
|
|
254
254
|
return this.handleResponse(i);
|
|
255
255
|
} catch (a) {
|
|
256
|
-
throw
|
|
256
|
+
throw ve.handleAxiosError(a);
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
/**
|
|
@@ -262,7 +262,7 @@ class xt {
|
|
|
262
262
|
handleResponse(e) {
|
|
263
263
|
const r = e.data;
|
|
264
264
|
if (!r.success && r.error)
|
|
265
|
-
throw
|
|
265
|
+
throw ve.handleApiError(r.error);
|
|
266
266
|
return r;
|
|
267
267
|
}
|
|
268
268
|
/**
|
|
@@ -272,7 +272,7 @@ class xt {
|
|
|
272
272
|
return this.axiosInstance;
|
|
273
273
|
}
|
|
274
274
|
}
|
|
275
|
-
class
|
|
275
|
+
class xt {
|
|
276
276
|
constructor(e) {
|
|
277
277
|
this.httpClient = e;
|
|
278
278
|
}
|
|
@@ -887,7 +887,7 @@ const Z = {
|
|
|
887
887
|
[W.Modern]: Ft,
|
|
888
888
|
[W.Minimal]: Lt
|
|
889
889
|
};
|
|
890
|
-
function
|
|
890
|
+
function xe(t) {
|
|
891
891
|
return Tt[t] || Z;
|
|
892
892
|
}
|
|
893
893
|
class Mt {
|
|
@@ -905,8 +905,8 @@ class Mt {
|
|
|
905
905
|
"GetThemeConfiguration"
|
|
906
906
|
);
|
|
907
907
|
if (!r.result.isEnabled)
|
|
908
|
-
return
|
|
909
|
-
let s = r.result.preset ?
|
|
908
|
+
return xe(W.Default);
|
|
909
|
+
let s = r.result.preset ? xe(r.result.preset) : xe(W.Default);
|
|
910
910
|
return r.result.title && (s.title = r.result.title), r.result.logo && (s.logo = { ...s.logo, ...r.result.logo }), r.result.colors && (s.colors = { ...s.colors, ...r.result.colors }), r.result.typography && (s.typography = { ...s.typography, ...r.result.typography }), r.result.spacing && (s.spacing = { ...s.spacing, ...r.result.spacing }), r.result.customCSS && (s.customCSS = r.result.customCSS), r.result.darkMode && (s.darkMode = {
|
|
911
911
|
colors: {
|
|
912
912
|
...(e = s.darkMode) == null ? void 0 : e.colors,
|
|
@@ -914,7 +914,7 @@ class Mt {
|
|
|
914
914
|
}
|
|
915
915
|
}), s;
|
|
916
916
|
} catch (r) {
|
|
917
|
-
return console.warn("[ThemeService] Failed to fetch theme configuration:", r),
|
|
917
|
+
return console.warn("[ThemeService] Failed to fetch theme configuration:", r), xe(W.Default);
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
920
|
/**
|
|
@@ -940,7 +940,7 @@ class Mt {
|
|
|
940
940
|
* Preview theme (doesn't save)
|
|
941
941
|
*/
|
|
942
942
|
getPreviewTheme(e, r) {
|
|
943
|
-
const s =
|
|
943
|
+
const s = xe(e);
|
|
944
944
|
return r ? {
|
|
945
945
|
...s,
|
|
946
946
|
...r,
|
|
@@ -1034,7 +1034,7 @@ class Ot {
|
|
|
1034
1034
|
*/
|
|
1035
1035
|
get status() {
|
|
1036
1036
|
var e;
|
|
1037
|
-
return ((e = this._progress) == null ? void 0 : e.status) ||
|
|
1037
|
+
return ((e = this._progress) == null ? void 0 : e.status) || le.None;
|
|
1038
1038
|
}
|
|
1039
1039
|
/**
|
|
1040
1040
|
* Get workflow result
|
|
@@ -1053,19 +1053,19 @@ class Ot {
|
|
|
1053
1053
|
* Check if workflow is complete
|
|
1054
1054
|
*/
|
|
1055
1055
|
get isComplete() {
|
|
1056
|
-
return this.status ===
|
|
1056
|
+
return this.status === le.Finished;
|
|
1057
1057
|
}
|
|
1058
1058
|
/**
|
|
1059
1059
|
* Check if workflow is on hold
|
|
1060
1060
|
*/
|
|
1061
1061
|
get isOnHold() {
|
|
1062
|
-
return this.status ===
|
|
1062
|
+
return this.status === le.OnHold;
|
|
1063
1063
|
}
|
|
1064
1064
|
/**
|
|
1065
1065
|
* Check if workflow is in progress
|
|
1066
1066
|
*/
|
|
1067
1067
|
get isInProgress() {
|
|
1068
|
-
return this.status ===
|
|
1068
|
+
return this.status === le.InProgress;
|
|
1069
1069
|
}
|
|
1070
1070
|
/**
|
|
1071
1071
|
* Set applicant ID
|
|
@@ -1079,7 +1079,7 @@ class Ot {
|
|
|
1079
1079
|
updateProgress(e) {
|
|
1080
1080
|
var s, a;
|
|
1081
1081
|
const r = (s = this._progress) == null ? void 0 : s.currentStep;
|
|
1082
|
-
this._progress = e, this._applicantId = e.applicantId, this._error = null, this.events.emit("progressUpdated", e), (r == null ? void 0 : r.order) !== ((a = e.currentStep) == null ? void 0 : a.order) && this.events.emit("stepChanged", e.currentStep), this.events.emit("statusChanged", e.status), e.status ===
|
|
1082
|
+
this._progress = e, this._applicantId = e.applicantId, this._error = null, this.events.emit("progressUpdated", e), (r == null ? void 0 : r.order) !== ((a = e.currentStep) == null ? void 0 : a.order) && this.events.emit("stepChanged", e.currentStep), this.events.emit("statusChanged", e.status), e.status === le.Finished && e.workflowResult && this.events.emit("completed", e.workflowResult);
|
|
1083
1083
|
}
|
|
1084
1084
|
/**
|
|
1085
1085
|
* Set error
|
|
@@ -1178,10 +1178,10 @@ class zt {
|
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
|
1180
1180
|
class $t {
|
|
1181
|
-
constructor(e, r, s, a, i,
|
|
1181
|
+
constructor(e, r, s, a, i, l, c, d) {
|
|
1182
1182
|
K(this, "state");
|
|
1183
1183
|
K(this, "stepRouter");
|
|
1184
|
-
this.applicantService = e, this.questionnaireService = r, this.uploadDocumentService = s, this.appropriatenessTestService = a, this.overviewService = i, this.riskScoringService =
|
|
1184
|
+
this.applicantService = e, this.questionnaireService = r, this.uploadDocumentService = s, this.appropriatenessTestService = a, this.overviewService = i, this.riskScoringService = l, this.investorCategorizationService = d, this.state = new Ot(), this.stepRouter = new zt(), this.registerStepHandlers();
|
|
1185
1185
|
}
|
|
1186
1186
|
/**
|
|
1187
1187
|
* Register all step handlers
|
|
@@ -1519,7 +1519,7 @@ class Kt {
|
|
|
1519
1519
|
try {
|
|
1520
1520
|
if (await this.loadSDK(), !window._Sardine)
|
|
1521
1521
|
throw new Error("SardinAI SDK not available after loading");
|
|
1522
|
-
const e = this.getSardineHost(), { clientId: r, environment: s, flow: a, enableBiometrics: i, enablePortScanning:
|
|
1522
|
+
const e = this.getSardineHost(), { clientId: r, environment: s, flow: a, enableBiometrics: i, enablePortScanning: l } = this.config;
|
|
1523
1523
|
this.sardineContext = window._Sardine.createContext({
|
|
1524
1524
|
clientId: r,
|
|
1525
1525
|
sessionKey: this.sessionKey,
|
|
@@ -1530,16 +1530,16 @@ class Kt {
|
|
|
1530
1530
|
parentElement: document.body,
|
|
1531
1531
|
enableBiometrics: i !== !1,
|
|
1532
1532
|
// Default true
|
|
1533
|
-
enablePortScanning:
|
|
1533
|
+
enablePortScanning: l === !0,
|
|
1534
1534
|
// Default false
|
|
1535
1535
|
region: this.config.region,
|
|
1536
1536
|
// Callback for device response (deprecated but kept for compatibility)
|
|
1537
|
-
onDeviceResponse: (
|
|
1538
|
-
console.log(`[SardinAI] Device ID: ${
|
|
1537
|
+
onDeviceResponse: (c) => {
|
|
1538
|
+
console.log(`[SardinAI] Device ID: ${c.deviceId}`);
|
|
1539
1539
|
},
|
|
1540
1540
|
// New callback for session updates
|
|
1541
|
-
onConfigUpdate: (
|
|
1542
|
-
switch (
|
|
1541
|
+
onConfigUpdate: (c, d, u) => {
|
|
1542
|
+
switch (c) {
|
|
1543
1543
|
case "SESSION_UPDATE_FAILED":
|
|
1544
1544
|
console.error("[SardinAI] Session update failed:", u);
|
|
1545
1545
|
break;
|
|
@@ -1550,7 +1550,7 @@ class Kt {
|
|
|
1550
1550
|
console.log("[SardinAI] No session update");
|
|
1551
1551
|
break;
|
|
1552
1552
|
default:
|
|
1553
|
-
console.warn("[SardinAI] Unknown event:",
|
|
1553
|
+
console.warn("[SardinAI] Unknown event:", c);
|
|
1554
1554
|
}
|
|
1555
1555
|
}
|
|
1556
1556
|
}), this.addNoScriptFallback(e), console.log("[SardinAI] SDK initialized with sessionKey:", this.sessionKey);
|
|
@@ -1609,11 +1609,11 @@ class fe {
|
|
|
1609
1609
|
*/
|
|
1610
1610
|
static createProvider(e, r) {
|
|
1611
1611
|
switch (e) {
|
|
1612
|
-
case
|
|
1612
|
+
case oe.Sumsub:
|
|
1613
1613
|
return new jt(r);
|
|
1614
|
-
case
|
|
1614
|
+
case oe.Onfido:
|
|
1615
1615
|
return new _t(r);
|
|
1616
|
-
case
|
|
1616
|
+
case oe.SardinAI:
|
|
1617
1617
|
return new Kt(r);
|
|
1618
1618
|
default:
|
|
1619
1619
|
throw new Error(`Unsupported identity provider: ${e}`);
|
|
@@ -1625,7 +1625,7 @@ class fe {
|
|
|
1625
1625
|
static parseProviderConfig(e, r, s) {
|
|
1626
1626
|
var a;
|
|
1627
1627
|
switch (e) {
|
|
1628
|
-
case
|
|
1628
|
+
case oe.Sumsub:
|
|
1629
1629
|
return {
|
|
1630
1630
|
accessToken: r.accessToken || r.token,
|
|
1631
1631
|
applicantEmail: r.email,
|
|
@@ -1633,11 +1633,11 @@ class fe {
|
|
|
1633
1633
|
externalUserId: r.externalUserId,
|
|
1634
1634
|
lang: r.lang || "en"
|
|
1635
1635
|
};
|
|
1636
|
-
case
|
|
1636
|
+
case oe.Onfido:
|
|
1637
1637
|
return {
|
|
1638
1638
|
token: r.token || r.sdkToken
|
|
1639
1639
|
};
|
|
1640
|
-
case
|
|
1640
|
+
case oe.SardinAI:
|
|
1641
1641
|
const i = ((a = s == null ? void 0 : s.identityProviders) == null ? void 0 : a.sardinai) || {};
|
|
1642
1642
|
return {
|
|
1643
1643
|
clientId: i.clientId || r.clientId,
|
|
@@ -1776,57 +1776,59 @@ class Ut {
|
|
|
1776
1776
|
}
|
|
1777
1777
|
}
|
|
1778
1778
|
const Ue = tt(null), Or = ({ config: t, children: e }) => {
|
|
1779
|
-
const [r, s] = N(null), a =
|
|
1780
|
-
const
|
|
1779
|
+
const [r, s] = N(null), a = ie.useRef(!1), i = ie.useRef(!1), l = Re(() => {
|
|
1780
|
+
const d = new vt(t), u = new xt(d), y = new wt(d), x = new kt(d), g = new Nt(d), b = new St(d), m = new Ct(d), f = new At(d), k = new Et(d), h = new It(d), A = new Mt(d), v = new Ut();
|
|
1781
1781
|
return {
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
themeManager: h,
|
|
1795
|
-
currentTheme: r,
|
|
1796
|
-
createOrchestrator: () => new $t(
|
|
1797
|
-
l,
|
|
1798
|
-
d,
|
|
1799
|
-
u,
|
|
1800
|
-
y,
|
|
1801
|
-
x,
|
|
1802
|
-
g,
|
|
1803
|
-
b,
|
|
1804
|
-
f
|
|
1805
|
-
)
|
|
1782
|
+
httpClient: d,
|
|
1783
|
+
applicantService: u,
|
|
1784
|
+
questionnaireService: y,
|
|
1785
|
+
uploadDocumentService: x,
|
|
1786
|
+
appropriatenessTestService: g,
|
|
1787
|
+
overviewService: b,
|
|
1788
|
+
riskScoringService: m,
|
|
1789
|
+
identityService: f,
|
|
1790
|
+
baseInformationService: k,
|
|
1791
|
+
investorCategorizationService: h,
|
|
1792
|
+
themeService: A,
|
|
1793
|
+
themeManager: v
|
|
1806
1794
|
};
|
|
1807
|
-
}, [t,
|
|
1795
|
+
}, [t]), c = Re(() => ({
|
|
1796
|
+
config: t,
|
|
1797
|
+
...l,
|
|
1798
|
+
currentTheme: r,
|
|
1799
|
+
createOrchestrator: () => new $t(
|
|
1800
|
+
l.applicantService,
|
|
1801
|
+
l.questionnaireService,
|
|
1802
|
+
l.uploadDocumentService,
|
|
1803
|
+
l.appropriatenessTestService,
|
|
1804
|
+
l.overviewService,
|
|
1805
|
+
l.riskScoringService,
|
|
1806
|
+
l.identityService,
|
|
1807
|
+
l.investorCategorizationService
|
|
1808
|
+
)
|
|
1809
|
+
}), [t, l, r]);
|
|
1808
1810
|
return Y(() => ((async () => {
|
|
1809
|
-
if (a.current) {
|
|
1810
|
-
console.log("[MetaKYC] Theme
|
|
1811
|
+
if (a.current || i.current) {
|
|
1812
|
+
console.log("[MetaKYC] Theme already loading or loaded, skipping...");
|
|
1811
1813
|
return;
|
|
1812
1814
|
}
|
|
1813
1815
|
a.current = !0;
|
|
1814
1816
|
try {
|
|
1815
1817
|
if (t.theme) {
|
|
1816
|
-
console.log("[MetaKYC] Applying static theme from config"),
|
|
1818
|
+
console.log("[MetaKYC] Applying static theme from config"), l.themeManager.applyTheme(t.theme), s(l.themeManager.getCurrentTheme()), i.current = !0;
|
|
1817
1819
|
return;
|
|
1818
1820
|
}
|
|
1819
1821
|
console.log("[MetaKYC] Fetching theme from backend...");
|
|
1820
|
-
const
|
|
1821
|
-
|
|
1822
|
-
} catch (
|
|
1823
|
-
console.warn("[MetaKYC] Failed to load theme, using default:",
|
|
1822
|
+
const u = await l.themeService.getThemeConfiguration();
|
|
1823
|
+
l.themeManager.applyTheme(u), s(l.themeManager.getCurrentTheme()), i.current = !0, console.log("[MetaKYC] Theme loaded and applied", u);
|
|
1824
|
+
} catch (u) {
|
|
1825
|
+
console.warn("[MetaKYC] Failed to load theme, using default:", u), s(l.themeManager.getCurrentTheme()), i.current = !0;
|
|
1824
1826
|
} finally {
|
|
1825
1827
|
a.current = !1;
|
|
1826
1828
|
}
|
|
1827
1829
|
})(), () => {
|
|
1828
|
-
|
|
1829
|
-
}), [
|
|
1830
|
+
l.themeManager.cleanup();
|
|
1831
|
+
}), []), /* @__PURE__ */ n(Ue.Provider, { value: c, children: e });
|
|
1830
1832
|
};
|
|
1831
1833
|
function se() {
|
|
1832
1834
|
const t = rt(Ue);
|
|
@@ -1918,7 +1920,7 @@ function Kr() {
|
|
|
1918
1920
|
Yt(), Qt();
|
|
1919
1921
|
}
|
|
1920
1922
|
function Gt(t) {
|
|
1921
|
-
const { createOrchestrator: e } = se(), [r, s] = N(null), [a, i] = N(!1), [
|
|
1923
|
+
const { createOrchestrator: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(null), d = H(null), u = t || Vt();
|
|
1922
1924
|
Y(() => {
|
|
1923
1925
|
d.current || (d.current = e());
|
|
1924
1926
|
}, [e]), Y(() => {
|
|
@@ -1938,12 +1940,12 @@ function Gt(t) {
|
|
|
1938
1940
|
console.log("[Workflow] Load already in progress, skipping...");
|
|
1939
1941
|
return;
|
|
1940
1942
|
}
|
|
1941
|
-
y.current = !0, i(!0),
|
|
1943
|
+
y.current = !0, i(!0), c(null);
|
|
1942
1944
|
try {
|
|
1943
1945
|
const v = await d.current.initialize(u);
|
|
1944
1946
|
s(v), x.current = !0;
|
|
1945
1947
|
} catch (v) {
|
|
1946
|
-
|
|
1948
|
+
c(v);
|
|
1947
1949
|
} finally {
|
|
1948
1950
|
i(!1), y.current = !1;
|
|
1949
1951
|
}
|
|
@@ -1958,68 +1960,68 @@ function Gt(t) {
|
|
|
1958
1960
|
console.log("[Workflow] Refresh already in progress, skipping...");
|
|
1959
1961
|
return;
|
|
1960
1962
|
}
|
|
1961
|
-
y.current = !0, i(!0),
|
|
1963
|
+
y.current = !0, i(!0), c(null);
|
|
1962
1964
|
try {
|
|
1963
1965
|
const v = await d.current.refreshProgress();
|
|
1964
1966
|
s(v);
|
|
1965
1967
|
} catch (v) {
|
|
1966
|
-
|
|
1968
|
+
c(v);
|
|
1967
1969
|
} finally {
|
|
1968
1970
|
i(!1), y.current = !1;
|
|
1969
1971
|
}
|
|
1970
1972
|
}
|
|
1971
1973
|
}, []), m = q(async () => {
|
|
1972
1974
|
if (d.current) {
|
|
1973
|
-
i(!0),
|
|
1975
|
+
i(!0), c(null);
|
|
1974
1976
|
try {
|
|
1975
1977
|
const v = await d.current.moveToNextStep();
|
|
1976
1978
|
s(v);
|
|
1977
1979
|
} catch (v) {
|
|
1978
|
-
|
|
1980
|
+
c(v);
|
|
1979
1981
|
} finally {
|
|
1980
1982
|
i(!1);
|
|
1981
1983
|
}
|
|
1982
1984
|
}
|
|
1983
1985
|
}, []), f = q(async () => {
|
|
1984
1986
|
if (d.current) {
|
|
1985
|
-
i(!0),
|
|
1987
|
+
i(!0), c(null);
|
|
1986
1988
|
try {
|
|
1987
1989
|
const v = await d.current.moveToPreviousStep();
|
|
1988
1990
|
s(v);
|
|
1989
1991
|
} catch (v) {
|
|
1990
|
-
|
|
1992
|
+
c(v);
|
|
1991
1993
|
} finally {
|
|
1992
1994
|
i(!1);
|
|
1993
1995
|
}
|
|
1994
1996
|
}
|
|
1995
1997
|
}, []), k = q(async (v) => {
|
|
1996
1998
|
if (d.current) {
|
|
1997
|
-
i(!0),
|
|
1999
|
+
i(!0), c(null);
|
|
1998
2000
|
try {
|
|
1999
2001
|
await d.current.submitCurrentStep(v);
|
|
2000
2002
|
const S = await d.current.refreshProgress();
|
|
2001
2003
|
s(S);
|
|
2002
2004
|
} catch (S) {
|
|
2003
|
-
throw
|
|
2005
|
+
throw c(S), S;
|
|
2004
2006
|
} finally {
|
|
2005
2007
|
i(!1);
|
|
2006
2008
|
}
|
|
2007
2009
|
}
|
|
2008
|
-
}, []), h =
|
|
2010
|
+
}, []), h = Me.useMemo(() => r != null && r.stepInfoList ? [...r.stepInfoList].sort((v, S) => v.order - S.order) : [], [r == null ? void 0 : r.stepInfoList]), A = Me.useMemo(() => r ? r.nextWorkflowKey && r.nextWorkflowKey !== r.workFlowKey : !1, [r]);
|
|
2009
2011
|
return {
|
|
2010
2012
|
progress: r,
|
|
2011
2013
|
applicantId: u,
|
|
2012
2014
|
currentStep: (r == null ? void 0 : r.currentStep) || null,
|
|
2013
2015
|
steps: h,
|
|
2014
|
-
status: (r == null ? void 0 : r.status) ||
|
|
2016
|
+
status: (r == null ? void 0 : r.status) || le.None,
|
|
2015
2017
|
workflowResult: (r == null ? void 0 : r.workflowResult) || null,
|
|
2016
2018
|
workflowKey: r == null ? void 0 : r.workFlowKey,
|
|
2017
2019
|
nextWorkflowKey: r == null ? void 0 : r.nextWorkflowKey,
|
|
2018
|
-
hasWorkflowChanged:
|
|
2020
|
+
hasWorkflowChanged: A,
|
|
2019
2021
|
isLoading: a,
|
|
2020
|
-
error:
|
|
2021
|
-
isComplete: (r == null ? void 0 : r.status) ===
|
|
2022
|
-
isOnHold: (r == null ? void 0 : r.status) ===
|
|
2022
|
+
error: l,
|
|
2023
|
+
isComplete: (r == null ? void 0 : r.status) === le.Finished,
|
|
2024
|
+
isOnHold: (r == null ? void 0 : r.status) === le.OnHold,
|
|
2023
2025
|
refreshProgress: b,
|
|
2024
2026
|
moveToNext: m,
|
|
2025
2027
|
moveBack: f,
|
|
@@ -2028,7 +2030,7 @@ function Gt(t) {
|
|
|
2028
2030
|
};
|
|
2029
2031
|
}
|
|
2030
2032
|
function Zt(t) {
|
|
2031
|
-
const { questionnaireService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [
|
|
2033
|
+
const { questionnaireService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(null), y = H(!1), x = H(null), g = q(async () => {
|
|
2032
2034
|
if (t) {
|
|
2033
2035
|
if (y.current) {
|
|
2034
2036
|
console.log("[Questionnaire] Load already in progress, skipping...");
|
|
@@ -2050,13 +2052,13 @@ function Zt(t) {
|
|
|
2050
2052
|
}, [t]);
|
|
2051
2053
|
const b = q(
|
|
2052
2054
|
async (m) => {
|
|
2053
|
-
|
|
2055
|
+
c(!0), u(null);
|
|
2054
2056
|
try {
|
|
2055
2057
|
return await e.fillQuestionnaire(m);
|
|
2056
2058
|
} catch (f) {
|
|
2057
2059
|
throw u(f), f;
|
|
2058
2060
|
} finally {
|
|
2059
|
-
|
|
2061
|
+
c(!1);
|
|
2060
2062
|
}
|
|
2061
2063
|
},
|
|
2062
2064
|
[e]
|
|
@@ -2064,14 +2066,14 @@ function Zt(t) {
|
|
|
2064
2066
|
return {
|
|
2065
2067
|
questionnaire: r,
|
|
2066
2068
|
isLoading: a,
|
|
2067
|
-
isSubmitting:
|
|
2069
|
+
isSubmitting: l,
|
|
2068
2070
|
error: d,
|
|
2069
2071
|
load: g,
|
|
2070
2072
|
submit: b
|
|
2071
2073
|
};
|
|
2072
2074
|
}
|
|
2073
2075
|
function Jt(t) {
|
|
2074
|
-
const { uploadDocumentService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [
|
|
2076
|
+
const { uploadDocumentService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(0), [y, x] = N(null), g = H(!1), b = H(null), m = q(async () => {
|
|
2075
2077
|
if (t) {
|
|
2076
2078
|
if (g.current) {
|
|
2077
2079
|
console.log("[UploadDocument] Load already in progress, skipping...");
|
|
@@ -2093,13 +2095,13 @@ function Jt(t) {
|
|
|
2093
2095
|
}, [t]);
|
|
2094
2096
|
const f = q(
|
|
2095
2097
|
async (k) => {
|
|
2096
|
-
|
|
2098
|
+
c(!0), u(0), x(null);
|
|
2097
2099
|
try {
|
|
2098
2100
|
await e.fillUploadDocument(k), u(100);
|
|
2099
2101
|
} catch (h) {
|
|
2100
2102
|
throw x(h), h;
|
|
2101
2103
|
} finally {
|
|
2102
|
-
|
|
2104
|
+
c(!1);
|
|
2103
2105
|
}
|
|
2104
2106
|
},
|
|
2105
2107
|
[e]
|
|
@@ -2107,7 +2109,7 @@ function Jt(t) {
|
|
|
2107
2109
|
return {
|
|
2108
2110
|
uploadDocument: r,
|
|
2109
2111
|
isLoading: a,
|
|
2110
|
-
isSubmitting:
|
|
2112
|
+
isSubmitting: l,
|
|
2111
2113
|
uploadProgress: d,
|
|
2112
2114
|
error: y,
|
|
2113
2115
|
load: m,
|
|
@@ -2115,7 +2117,7 @@ function Jt(t) {
|
|
|
2115
2117
|
};
|
|
2116
2118
|
}
|
|
2117
2119
|
function Ur(t) {
|
|
2118
|
-
const { appropriatenessTestService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [
|
|
2120
|
+
const { appropriatenessTestService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(null), [y, x] = N(null), g = H(!1), b = H(null), m = q(async () => {
|
|
2119
2121
|
if (t) {
|
|
2120
2122
|
if (g.current) {
|
|
2121
2123
|
console.log("[AppropriatenessTest] Load already in progress, skipping...");
|
|
@@ -2137,14 +2139,14 @@ function Ur(t) {
|
|
|
2137
2139
|
}, [t]);
|
|
2138
2140
|
const f = q(
|
|
2139
2141
|
async (k) => {
|
|
2140
|
-
|
|
2142
|
+
c(!0), u(null);
|
|
2141
2143
|
try {
|
|
2142
2144
|
const h = await e.fillAppropriatenessTest(k);
|
|
2143
2145
|
return x(h), h;
|
|
2144
2146
|
} catch (h) {
|
|
2145
2147
|
throw u(h), h;
|
|
2146
2148
|
} finally {
|
|
2147
|
-
|
|
2149
|
+
c(!1);
|
|
2148
2150
|
}
|
|
2149
2151
|
},
|
|
2150
2152
|
[e]
|
|
@@ -2153,14 +2155,14 @@ function Ur(t) {
|
|
|
2153
2155
|
test: r,
|
|
2154
2156
|
result: y,
|
|
2155
2157
|
isLoading: a,
|
|
2156
|
-
isSubmitting:
|
|
2158
|
+
isSubmitting: l,
|
|
2157
2159
|
error: d,
|
|
2158
2160
|
load: m,
|
|
2159
2161
|
submit: f
|
|
2160
2162
|
};
|
|
2161
2163
|
}
|
|
2162
2164
|
function Xt(t) {
|
|
2163
|
-
const { overviewService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [
|
|
2165
|
+
const { overviewService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(null), y = H(!1), x = H(null), g = q(async () => {
|
|
2164
2166
|
if (t) {
|
|
2165
2167
|
if (y.current) {
|
|
2166
2168
|
console.log("[Overview] Load already in progress, skipping...");
|
|
@@ -2182,20 +2184,20 @@ function Xt(t) {
|
|
|
2182
2184
|
}, [t]);
|
|
2183
2185
|
const b = q(async () => {
|
|
2184
2186
|
if (t) {
|
|
2185
|
-
|
|
2187
|
+
c(!0), u(null);
|
|
2186
2188
|
try {
|
|
2187
2189
|
await e.passOverview(t);
|
|
2188
2190
|
} catch (m) {
|
|
2189
2191
|
throw u(m), m;
|
|
2190
2192
|
} finally {
|
|
2191
|
-
|
|
2193
|
+
c(!1);
|
|
2192
2194
|
}
|
|
2193
2195
|
}
|
|
2194
2196
|
}, [t, e]);
|
|
2195
2197
|
return {
|
|
2196
2198
|
overview: r,
|
|
2197
2199
|
isLoading: a,
|
|
2198
|
-
isSubmitting:
|
|
2200
|
+
isSubmitting: l,
|
|
2199
2201
|
error: d,
|
|
2200
2202
|
load: g,
|
|
2201
2203
|
passOverview: b
|
|
@@ -2204,14 +2206,14 @@ function Xt(t) {
|
|
|
2204
2206
|
function er(t) {
|
|
2205
2207
|
const { identityService: e } = se(), [r, s] = N(
|
|
2206
2208
|
null
|
|
2207
|
-
), [a, i] = N(!1), [
|
|
2209
|
+
), [a, i] = N(!1), [l, c] = N(null), d = H(!1), u = q(
|
|
2208
2210
|
async (g, b) => {
|
|
2209
2211
|
if (t) {
|
|
2210
2212
|
if (d.current) {
|
|
2211
2213
|
console.log("[Identity] Request already in progress, skipping...");
|
|
2212
2214
|
return;
|
|
2213
2215
|
}
|
|
2214
|
-
d.current = !0, i(!0),
|
|
2216
|
+
d.current = !0, i(!0), c(null);
|
|
2215
2217
|
try {
|
|
2216
2218
|
const m = {
|
|
2217
2219
|
applicantId: t,
|
|
@@ -2224,7 +2226,7 @@ function er(t) {
|
|
|
2224
2226
|
const f = await e.identityRequest(m);
|
|
2225
2227
|
return console.log("Identity request result:", f), s(f), f;
|
|
2226
2228
|
} catch (m) {
|
|
2227
|
-
throw
|
|
2229
|
+
throw c(m), m;
|
|
2228
2230
|
} finally {
|
|
2229
2231
|
i(!1), d.current = !1;
|
|
2230
2232
|
}
|
|
@@ -2234,7 +2236,7 @@ function er(t) {
|
|
|
2234
2236
|
), y = q(
|
|
2235
2237
|
async (g, b) => {
|
|
2236
2238
|
if (t) {
|
|
2237
|
-
i(!0),
|
|
2239
|
+
i(!0), c(null);
|
|
2238
2240
|
try {
|
|
2239
2241
|
const m = {
|
|
2240
2242
|
applicantId: t,
|
|
@@ -2244,7 +2246,7 @@ function er(t) {
|
|
|
2244
2246
|
}, f = await e.identityCompanyRequest(m);
|
|
2245
2247
|
return s(f), f;
|
|
2246
2248
|
} catch (m) {
|
|
2247
|
-
throw
|
|
2249
|
+
throw c(m), m;
|
|
2248
2250
|
} finally {
|
|
2249
2251
|
i(!1);
|
|
2250
2252
|
}
|
|
@@ -2257,7 +2259,7 @@ function er(t) {
|
|
|
2257
2259
|
console.log("[Identity] Restart already in progress, skipping...");
|
|
2258
2260
|
return;
|
|
2259
2261
|
}
|
|
2260
|
-
d.current = !0, i(!0),
|
|
2262
|
+
d.current = !0, i(!0), c(null);
|
|
2261
2263
|
try {
|
|
2262
2264
|
const g = {
|
|
2263
2265
|
applicantId: t,
|
|
@@ -2270,7 +2272,7 @@ function er(t) {
|
|
|
2270
2272
|
const b = await e.identityRequest(g);
|
|
2271
2273
|
return console.log("Restart identity result:", b), s(b), b;
|
|
2272
2274
|
} catch (g) {
|
|
2273
|
-
throw
|
|
2275
|
+
throw c(g), g;
|
|
2274
2276
|
} finally {
|
|
2275
2277
|
i(!1), d.current = !1;
|
|
2276
2278
|
}
|
|
@@ -2281,14 +2283,14 @@ function er(t) {
|
|
|
2281
2283
|
provider: (r == null ? void 0 : r.provider) || null,
|
|
2282
2284
|
token: (r == null ? void 0 : r.publicProviderTokenObject) || null,
|
|
2283
2285
|
isLoading: a,
|
|
2284
|
-
error:
|
|
2286
|
+
error: l,
|
|
2285
2287
|
requestIdentity: u,
|
|
2286
2288
|
requestCompanyIdentity: y,
|
|
2287
2289
|
restartIdentity: x
|
|
2288
2290
|
};
|
|
2289
2291
|
}
|
|
2290
2292
|
function tr(t) {
|
|
2291
|
-
const { riskScoringService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [
|
|
2293
|
+
const { riskScoringService: e } = se(), [r, s] = N(null), [a, i] = N(!1), [l, c] = N(!1), [d, u] = N(null), [y, x] = N(null), g = H(!1), b = H(null), m = q(async () => {
|
|
2292
2294
|
if (t) {
|
|
2293
2295
|
if (g.current) {
|
|
2294
2296
|
console.log("[RiskScoring] Load already in progress, skipping...");
|
|
@@ -2310,14 +2312,14 @@ function tr(t) {
|
|
|
2310
2312
|
}, [t]);
|
|
2311
2313
|
const f = q(
|
|
2312
2314
|
async (k) => {
|
|
2313
|
-
|
|
2315
|
+
c(!0), u(null);
|
|
2314
2316
|
try {
|
|
2315
2317
|
const h = await e.submitRiskScoring(k);
|
|
2316
2318
|
return x(h), h;
|
|
2317
2319
|
} catch (h) {
|
|
2318
2320
|
throw u(h), h;
|
|
2319
2321
|
} finally {
|
|
2320
|
-
|
|
2322
|
+
c(!1);
|
|
2321
2323
|
}
|
|
2322
2324
|
},
|
|
2323
2325
|
[e]
|
|
@@ -2326,22 +2328,22 @@ function tr(t) {
|
|
|
2326
2328
|
criteria: r,
|
|
2327
2329
|
result: y,
|
|
2328
2330
|
isLoading: a,
|
|
2329
|
-
isSubmitting:
|
|
2331
|
+
isSubmitting: l,
|
|
2330
2332
|
error: d,
|
|
2331
2333
|
load: m,
|
|
2332
2334
|
submit: f
|
|
2333
2335
|
};
|
|
2334
2336
|
}
|
|
2335
2337
|
function rr() {
|
|
2336
|
-
const { applicantService: t, config: e } = se(), [r, s] = N(!1), [a, i] = N(null),
|
|
2338
|
+
const { applicantService: t, config: e } = se(), [r, s] = N(!1), [a, i] = N(null), l = H(!1), c = H(!1), d = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(b) {
|
|
2337
2339
|
const m = Math.random() * 16 | 0;
|
|
2338
2340
|
return (b === "x" ? m : m & 3 | 8).toString(16);
|
|
2339
2341
|
}), u = q(
|
|
2340
2342
|
async (b) => {
|
|
2341
2343
|
var m;
|
|
2342
|
-
if (
|
|
2344
|
+
if (l.current)
|
|
2343
2345
|
throw console.log("[Applicant] Create already in progress, skipping..."), new Error("Creation already in progress");
|
|
2344
|
-
|
|
2346
|
+
l.current = !0, s(!0), i(null);
|
|
2345
2347
|
try {
|
|
2346
2348
|
if (b.applicantAdditionalDatas || (b.applicantAdditionalDatas = []), (m = e.identityProviders) != null && m.sardinai) {
|
|
2347
2349
|
const k = d();
|
|
@@ -2354,7 +2356,7 @@ function rr() {
|
|
|
2354
2356
|
} catch (f) {
|
|
2355
2357
|
throw i(f), f;
|
|
2356
2358
|
} finally {
|
|
2357
|
-
s(!1),
|
|
2359
|
+
s(!1), l.current = !1;
|
|
2358
2360
|
}
|
|
2359
2361
|
},
|
|
2360
2362
|
[t, e]
|
|
@@ -2372,15 +2374,15 @@ function rr() {
|
|
|
2372
2374
|
[t]
|
|
2373
2375
|
), x = q(
|
|
2374
2376
|
async (b) => {
|
|
2375
|
-
if (
|
|
2377
|
+
if (c.current)
|
|
2376
2378
|
throw console.log("[Applicant] Data load already in progress, skipping..."), new Error("Data load already in progress");
|
|
2377
|
-
|
|
2379
|
+
c.current = !0, s(!0), i(null);
|
|
2378
2380
|
try {
|
|
2379
2381
|
return await t.getApplicantData(b);
|
|
2380
2382
|
} catch (m) {
|
|
2381
2383
|
throw i(m), m;
|
|
2382
2384
|
} finally {
|
|
2383
|
-
s(!1),
|
|
2385
|
+
s(!1), c.current = !1;
|
|
2384
2386
|
}
|
|
2385
2387
|
},
|
|
2386
2388
|
[t]
|
|
@@ -2413,9 +2415,9 @@ const j = ({
|
|
|
2413
2415
|
isLoading: s = !1,
|
|
2414
2416
|
disabled: a,
|
|
2415
2417
|
className: i,
|
|
2416
|
-
...
|
|
2418
|
+
...l
|
|
2417
2419
|
}) => {
|
|
2418
|
-
const
|
|
2420
|
+
const c = "inline-flex items-center justify-center rounded-lg font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed", d = {
|
|
2419
2421
|
primary: "bg-primary-500 text-white hover:bg-primary-600 focus:ring-primary-500",
|
|
2420
2422
|
secondary: "bg-gray-200 text-gray-900 hover:bg-gray-300 focus:ring-gray-400",
|
|
2421
2423
|
outline: "border-2 border-primary-500 text-primary-500 hover:bg-primary-50 focus:ring-primary-500",
|
|
@@ -2429,9 +2431,9 @@ const j = ({
|
|
|
2429
2431
|
return /* @__PURE__ */ o(
|
|
2430
2432
|
"button",
|
|
2431
2433
|
{
|
|
2432
|
-
className: te(
|
|
2434
|
+
className: te(c, d[e], u[r], i),
|
|
2433
2435
|
disabled: a || s,
|
|
2434
|
-
...
|
|
2436
|
+
...l,
|
|
2435
2437
|
children: [
|
|
2436
2438
|
s && /* @__PURE__ */ o(
|
|
2437
2439
|
"svg",
|
|
@@ -2467,18 +2469,18 @@ const j = ({
|
|
|
2467
2469
|
]
|
|
2468
2470
|
}
|
|
2469
2471
|
);
|
|
2470
|
-
}, X =
|
|
2471
|
-
({ label: t, error: e, helperText: r, leftIcon: s, rightIcon: a, className: i, ...
|
|
2472
|
+
}, X = Le(
|
|
2473
|
+
({ label: t, error: e, helperText: r, leftIcon: s, rightIcon: a, className: i, ...l }, c) => /* @__PURE__ */ o("div", { className: "w-full", children: [
|
|
2472
2474
|
t && /* @__PURE__ */ o("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
|
|
2473
2475
|
t,
|
|
2474
|
-
|
|
2476
|
+
l.required && /* @__PURE__ */ n("span", { className: "text-danger-500 ml-1", children: "*" })
|
|
2475
2477
|
] }),
|
|
2476
2478
|
/* @__PURE__ */ o("div", { className: "relative", children: [
|
|
2477
2479
|
s && /* @__PURE__ */ n("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: s }),
|
|
2478
2480
|
/* @__PURE__ */ n(
|
|
2479
2481
|
"input",
|
|
2480
2482
|
{
|
|
2481
|
-
ref:
|
|
2483
|
+
ref: c,
|
|
2482
2484
|
className: te(
|
|
2483
2485
|
"block w-full rounded-lg border px-3 py-2 text-sm transition-colors",
|
|
2484
2486
|
"focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",
|
|
@@ -2489,7 +2491,7 @@ const j = ({
|
|
|
2489
2491
|
a ? "pr-10" : "",
|
|
2490
2492
|
i
|
|
2491
2493
|
),
|
|
2492
|
-
...
|
|
2494
|
+
...l
|
|
2493
2495
|
}
|
|
2494
2496
|
),
|
|
2495
2497
|
a && /* @__PURE__ */ n("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none", children: a })
|
|
@@ -2550,7 +2552,7 @@ const L = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n(
|
|
|
2550
2552
|
...s,
|
|
2551
2553
|
children: t
|
|
2552
2554
|
}
|
|
2553
|
-
),
|
|
2555
|
+
), ce = ({ size: t = "md", className: e, ...r }) => {
|
|
2554
2556
|
const s = {
|
|
2555
2557
|
sm: "h-4 w-4",
|
|
2556
2558
|
md: "h-8 w-8",
|
|
@@ -2586,16 +2588,16 @@ const L = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n(
|
|
|
2586
2588
|
]
|
|
2587
2589
|
}
|
|
2588
2590
|
) });
|
|
2589
|
-
}, ye =
|
|
2590
|
-
({ label: t, error: e, helperText: r, options: s, placeholder: a, className: i, ...
|
|
2591
|
+
}, ye = Le(
|
|
2592
|
+
({ label: t, error: e, helperText: r, options: s, placeholder: a, className: i, ...l }, c) => /* @__PURE__ */ o("div", { className: "w-full", children: [
|
|
2591
2593
|
t && /* @__PURE__ */ o("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
|
|
2592
2594
|
t,
|
|
2593
|
-
|
|
2595
|
+
l.required && /* @__PURE__ */ n("span", { className: "text-danger-500 ml-1", children: "*" })
|
|
2594
2596
|
] }),
|
|
2595
2597
|
/* @__PURE__ */ o(
|
|
2596
2598
|
"select",
|
|
2597
2599
|
{
|
|
2598
|
-
ref:
|
|
2600
|
+
ref: c,
|
|
2599
2601
|
className: te(
|
|
2600
2602
|
"block w-full rounded-lg border px-3 py-2 text-sm transition-colors",
|
|
2601
2603
|
"focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",
|
|
@@ -2604,7 +2606,7 @@ const L = ({ children: t, className: e, ...r }) => /* @__PURE__ */ n(
|
|
|
2604
2606
|
"dark:bg-gray-800 dark:text-white",
|
|
2605
2607
|
i
|
|
2606
2608
|
),
|
|
2607
|
-
...
|
|
2609
|
+
...l,
|
|
2608
2610
|
children: [
|
|
2609
2611
|
a && /* @__PURE__ */ n("option", { value: "", disabled: !0, children: a }, "__placeholder__"),
|
|
2610
2612
|
s.map((d, u) => /* @__PURE__ */ n(
|
|
@@ -2631,18 +2633,18 @@ const nr = ({
|
|
|
2631
2633
|
multiple: s = !1,
|
|
2632
2634
|
maxSize: a,
|
|
2633
2635
|
onChange: i,
|
|
2634
|
-
value:
|
|
2635
|
-
className:
|
|
2636
|
+
value: l = [],
|
|
2637
|
+
className: c
|
|
2636
2638
|
}) => {
|
|
2637
2639
|
const [d, u] = N(!1), y = H(null), x = (h) => {
|
|
2638
2640
|
if (!h) return;
|
|
2639
|
-
const
|
|
2640
|
-
if (a &&
|
|
2641
|
+
const A = Array.from(h);
|
|
2642
|
+
if (a && A.filter((S) => S.size > a).length > 0) {
|
|
2641
2643
|
const S = Ie(a);
|
|
2642
2644
|
alert(`Some files exceed the maximum size of ${S}`);
|
|
2643
2645
|
return;
|
|
2644
2646
|
}
|
|
2645
|
-
i == null || i(s ? [...
|
|
2647
|
+
i == null || i(s ? [...l, ...A] : [A[0]]);
|
|
2646
2648
|
}, g = (h) => {
|
|
2647
2649
|
h.preventDefault(), u(!0);
|
|
2648
2650
|
}, b = () => {
|
|
@@ -2653,10 +2655,10 @@ const nr = ({
|
|
|
2653
2655
|
var h;
|
|
2654
2656
|
(h = y.current) == null || h.click();
|
|
2655
2657
|
}, k = (h) => {
|
|
2656
|
-
const
|
|
2657
|
-
i == null || i(
|
|
2658
|
+
const A = l.filter((v, S) => S !== h);
|
|
2659
|
+
i == null || i(A);
|
|
2658
2660
|
};
|
|
2659
|
-
return /* @__PURE__ */ o("div", { className: te("w-full",
|
|
2661
|
+
return /* @__PURE__ */ o("div", { className: te("w-full", c), children: [
|
|
2660
2662
|
t && /* @__PURE__ */ n("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: t }),
|
|
2661
2663
|
/* @__PURE__ */ o(
|
|
2662
2664
|
"div",
|
|
@@ -2713,7 +2715,7 @@ const nr = ({
|
|
|
2713
2715
|
]
|
|
2714
2716
|
}
|
|
2715
2717
|
),
|
|
2716
|
-
|
|
2718
|
+
l.length > 0 && /* @__PURE__ */ n("div", { className: "mt-3 space-y-2", children: l.map((h, A) => /* @__PURE__ */ o(
|
|
2717
2719
|
"div",
|
|
2718
2720
|
{
|
|
2719
2721
|
className: "flex items-center justify-between px-3 py-2 bg-gray-50 dark:bg-gray-700 rounded-lg",
|
|
@@ -2747,7 +2749,7 @@ const nr = ({
|
|
|
2747
2749
|
{
|
|
2748
2750
|
type: "button",
|
|
2749
2751
|
onClick: (v) => {
|
|
2750
|
-
v.stopPropagation(), k(
|
|
2752
|
+
v.stopPropagation(), k(A);
|
|
2751
2753
|
},
|
|
2752
2754
|
className: "ml-2 text-danger-500 hover:text-danger-700 focus:outline-none",
|
|
2753
2755
|
children: /* @__PURE__ */ n("svg", { className: "h-5 w-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ n(
|
|
@@ -2762,11 +2764,11 @@ const nr = ({
|
|
|
2762
2764
|
)
|
|
2763
2765
|
]
|
|
2764
2766
|
},
|
|
2765
|
-
|
|
2767
|
+
A
|
|
2766
2768
|
)) }),
|
|
2767
2769
|
e && /* @__PURE__ */ n("p", { className: "mt-1 text-sm text-danger-500", children: e })
|
|
2768
2770
|
] });
|
|
2769
|
-
}, sr =
|
|
2771
|
+
}, sr = Le(
|
|
2770
2772
|
({ countryCode: t = "+1", onCountryCodeChange: e, className: r, ...s }, a) => /* @__PURE__ */ o("div", { className: "w-full", children: [
|
|
2771
2773
|
s.label && /* @__PURE__ */ o("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
|
|
2772
2774
|
s.label,
|
|
@@ -2802,63 +2804,63 @@ const nr = ({
|
|
|
2802
2804
|
] })
|
|
2803
2805
|
);
|
|
2804
2806
|
sr.displayName = "PhoneInput";
|
|
2805
|
-
const
|
|
2807
|
+
const Be = (t, e, r) => {
|
|
2806
2808
|
if (t && "reportValidity" in t) {
|
|
2807
|
-
const s =
|
|
2809
|
+
const s = De(r, e);
|
|
2808
2810
|
t.setCustomValidity(s && s.message || ""), t.reportValidity();
|
|
2809
2811
|
}
|
|
2810
|
-
},
|
|
2812
|
+
}, Fe = (t, e) => {
|
|
2811
2813
|
for (const r in e.fields) {
|
|
2812
2814
|
const s = e.fields[r];
|
|
2813
|
-
s && s.ref && "reportValidity" in s.ref ?
|
|
2815
|
+
s && s.ref && "reportValidity" in s.ref ? Be(s.ref, r, t) : s && s.refs && s.refs.forEach((a) => Be(a, r, t));
|
|
2814
2816
|
}
|
|
2815
|
-
},
|
|
2816
|
-
e.shouldUseNativeValidation &&
|
|
2817
|
+
}, Oe = (t, e) => {
|
|
2818
|
+
e.shouldUseNativeValidation && Fe(t, e);
|
|
2817
2819
|
const r = {};
|
|
2818
2820
|
for (const s in t) {
|
|
2819
|
-
const a =
|
|
2821
|
+
const a = De(e.fields, s), i = Object.assign(t[s] || {}, { ref: a && a.ref });
|
|
2820
2822
|
if (ar(e.names || Object.keys(t), s)) {
|
|
2821
|
-
const
|
|
2822
|
-
Ee(
|
|
2823
|
+
const l = Object.assign({}, De(r, s));
|
|
2824
|
+
Ee(l, "root", i), Ee(r, s, l);
|
|
2823
2825
|
} else Ee(r, s, i);
|
|
2824
2826
|
}
|
|
2825
2827
|
return r;
|
|
2826
2828
|
}, ar = (t, e) => {
|
|
2827
|
-
const r =
|
|
2828
|
-
return t.some((s) =>
|
|
2829
|
+
const r = ze(e);
|
|
2830
|
+
return t.some((s) => ze(s).match(`^${r}\\.\\d+`));
|
|
2829
2831
|
};
|
|
2830
|
-
function
|
|
2832
|
+
function ze(t) {
|
|
2831
2833
|
return t.replace(/\]|\[/g, "");
|
|
2832
2834
|
}
|
|
2833
2835
|
function qe(t, e, r) {
|
|
2834
|
-
function s(
|
|
2836
|
+
function s(c, d) {
|
|
2835
2837
|
var u;
|
|
2836
|
-
Object.defineProperty(
|
|
2837
|
-
value:
|
|
2838
|
+
Object.defineProperty(c, "_zod", {
|
|
2839
|
+
value: c._zod ?? {},
|
|
2838
2840
|
enumerable: !1
|
|
2839
|
-
}), (u =
|
|
2840
|
-
for (const y in
|
|
2841
|
-
y in
|
|
2842
|
-
|
|
2841
|
+
}), (u = c._zod).traits ?? (u.traits = /* @__PURE__ */ new Set()), c._zod.traits.add(t), e(c, d);
|
|
2842
|
+
for (const y in l.prototype)
|
|
2843
|
+
y in c || Object.defineProperty(c, y, { value: l.prototype[y].bind(c) });
|
|
2844
|
+
c._zod.constr = l, c._zod.def = d;
|
|
2843
2845
|
}
|
|
2844
2846
|
const a = (r == null ? void 0 : r.Parent) ?? Object;
|
|
2845
2847
|
class i extends a {
|
|
2846
2848
|
}
|
|
2847
2849
|
Object.defineProperty(i, "name", { value: t });
|
|
2848
|
-
function c
|
|
2850
|
+
function l(c) {
|
|
2849
2851
|
var d;
|
|
2850
2852
|
const u = r != null && r.Parent ? new i() : this;
|
|
2851
|
-
s(u,
|
|
2853
|
+
s(u, c), (d = u._zod).deferred ?? (d.deferred = []);
|
|
2852
2854
|
for (const y of u._zod.deferred)
|
|
2853
2855
|
y();
|
|
2854
2856
|
return u;
|
|
2855
2857
|
}
|
|
2856
|
-
return Object.defineProperty(
|
|
2857
|
-
value: (
|
|
2858
|
+
return Object.defineProperty(l, "init", { value: s }), Object.defineProperty(l, Symbol.hasInstance, {
|
|
2859
|
+
value: (c) => {
|
|
2858
2860
|
var d, u;
|
|
2859
|
-
return r != null && r.Parent &&
|
|
2861
|
+
return r != null && r.Parent && c instanceof r.Parent ? !0 : (u = (d = c == null ? void 0 : c._zod) == null ? void 0 : d.traits) == null ? void 0 : u.has(t);
|
|
2860
2862
|
}
|
|
2861
|
-
}), Object.defineProperty(
|
|
2863
|
+
}), Object.defineProperty(l, "name", { value: t }), l;
|
|
2862
2864
|
}
|
|
2863
2865
|
class ir extends Error {
|
|
2864
2866
|
constructor() {
|
|
@@ -2878,10 +2880,10 @@ function ke(t) {
|
|
|
2878
2880
|
return typeof t == "string" ? t : t == null ? void 0 : t.message;
|
|
2879
2881
|
}
|
|
2880
2882
|
function Ye(t, e, r) {
|
|
2881
|
-
var a, i,
|
|
2883
|
+
var a, i, l, c, d, u;
|
|
2882
2884
|
const s = { ...t, path: t.path ?? [] };
|
|
2883
2885
|
if (!t.message) {
|
|
2884
|
-
const y = ke((
|
|
2886
|
+
const y = ke((l = (i = (a = t.inst) == null ? void 0 : a._zod.def) == null ? void 0 : i.error) == null ? void 0 : l.call(i, t)) ?? ke((c = e == null ? void 0 : e.error) == null ? void 0 : c.call(e, t)) ?? ke((d = r.customError) == null ? void 0 : d.call(r, t)) ?? ke((u = r.localeError) == null ? void 0 : u.call(r, t)) ?? "Invalid input";
|
|
2885
2887
|
s.message = y;
|
|
2886
2888
|
}
|
|
2887
2889
|
return delete s.inst, delete s.continue, e != null && e.reportInput || delete s.input, s;
|
|
@@ -2904,24 +2906,24 @@ const We = (t, e) => {
|
|
|
2904
2906
|
enumerable: !1
|
|
2905
2907
|
});
|
|
2906
2908
|
}, cr = qe("$ZodError", We), Qe = qe("$ZodError", We, { Parent: Error }), dr = (t) => (e, r, s, a) => {
|
|
2907
|
-
const i = s ? Object.assign(s, { async: !1 }) : { async: !1 },
|
|
2908
|
-
if (
|
|
2909
|
+
const i = s ? Object.assign(s, { async: !1 }) : { async: !1 }, l = e._zod.run({ value: r, issues: [] }, i);
|
|
2910
|
+
if (l instanceof Promise)
|
|
2909
2911
|
throw new ir();
|
|
2910
|
-
if (
|
|
2911
|
-
const
|
|
2912
|
-
throw Ve(
|
|
2912
|
+
if (l.issues.length) {
|
|
2913
|
+
const c = new ((a == null ? void 0 : a.Err) ?? t)(l.issues.map((d) => Ye(d, i, He())));
|
|
2914
|
+
throw Ve(c, a == null ? void 0 : a.callee), c;
|
|
2913
2915
|
}
|
|
2914
|
-
return
|
|
2916
|
+
return l.value;
|
|
2915
2917
|
}, ur = /* @__PURE__ */ dr(Qe), mr = (t) => async (e, r, s, a) => {
|
|
2916
2918
|
const i = s ? Object.assign(s, { async: !0 }) : { async: !0 };
|
|
2917
|
-
let
|
|
2918
|
-
if (
|
|
2919
|
-
const
|
|
2920
|
-
throw Ve(
|
|
2919
|
+
let l = e._zod.run({ value: r, issues: [] }, i);
|
|
2920
|
+
if (l instanceof Promise && (l = await l), l.issues.length) {
|
|
2921
|
+
const c = new ((a == null ? void 0 : a.Err) ?? t)(l.issues.map((d) => Ye(d, i, He())));
|
|
2922
|
+
throw Ve(c, a == null ? void 0 : a.callee), c;
|
|
2921
2923
|
}
|
|
2922
|
-
return
|
|
2924
|
+
return l.value;
|
|
2923
2925
|
}, hr = /* @__PURE__ */ mr(Qe);
|
|
2924
|
-
function
|
|
2926
|
+
function $e(t, e) {
|
|
2925
2927
|
try {
|
|
2926
2928
|
var r = t();
|
|
2927
2929
|
} catch (s) {
|
|
@@ -2931,18 +2933,18 @@ function ze(t, e) {
|
|
|
2931
2933
|
}
|
|
2932
2934
|
function pr(t, e) {
|
|
2933
2935
|
for (var r = {}; t.length; ) {
|
|
2934
|
-
var s = t[0], a = s.code, i = s.message,
|
|
2935
|
-
if (!r[
|
|
2936
|
-
var
|
|
2937
|
-
r[
|
|
2938
|
-
} else r[
|
|
2936
|
+
var s = t[0], a = s.code, i = s.message, l = s.path.join(".");
|
|
2937
|
+
if (!r[l]) if ("unionErrors" in s) {
|
|
2938
|
+
var c = s.unionErrors[0].errors[0];
|
|
2939
|
+
r[l] = { message: c.message, type: c.code };
|
|
2940
|
+
} else r[l] = { message: i, type: a };
|
|
2939
2941
|
if ("unionErrors" in s && s.unionErrors.forEach(function(y) {
|
|
2940
2942
|
return y.errors.forEach(function(x) {
|
|
2941
2943
|
return t.push(x);
|
|
2942
2944
|
});
|
|
2943
2945
|
}), e) {
|
|
2944
|
-
var d = r[
|
|
2945
|
-
r[
|
|
2946
|
+
var d = r[l].types, u = d && d[s.code];
|
|
2947
|
+
r[l] = _e(l, e, r, a, u ? [].concat(u, s.message) : s.message);
|
|
2946
2948
|
}
|
|
2947
2949
|
t.shift();
|
|
2948
2950
|
}
|
|
@@ -2950,18 +2952,18 @@ function pr(t, e) {
|
|
|
2950
2952
|
}
|
|
2951
2953
|
function gr(t, e) {
|
|
2952
2954
|
for (var r = {}; t.length; ) {
|
|
2953
|
-
var s = t[0], a = s.code, i = s.message,
|
|
2954
|
-
if (!r[
|
|
2955
|
-
var
|
|
2956
|
-
r[
|
|
2957
|
-
} else r[
|
|
2955
|
+
var s = t[0], a = s.code, i = s.message, l = s.path.join(".");
|
|
2956
|
+
if (!r[l]) if (s.code === "invalid_union" && s.errors.length > 0) {
|
|
2957
|
+
var c = s.errors[0][0];
|
|
2958
|
+
r[l] = { message: c.message, type: c.code };
|
|
2959
|
+
} else r[l] = { message: i, type: a };
|
|
2958
2960
|
if (s.code === "invalid_union" && s.errors.forEach(function(y) {
|
|
2959
2961
|
return y.forEach(function(x) {
|
|
2960
2962
|
return t.push(x);
|
|
2961
2963
|
});
|
|
2962
2964
|
}), e) {
|
|
2963
|
-
var d = r[
|
|
2964
|
-
r[
|
|
2965
|
+
var d = r[l].types, u = d && d[s.code];
|
|
2966
|
+
r[l] = _e(l, e, r, a, u ? [].concat(u, s.message) : s.message);
|
|
2965
2967
|
}
|
|
2966
2968
|
t.shift();
|
|
2967
2969
|
}
|
|
@@ -2972,36 +2974,36 @@ function Ge(t, e, r) {
|
|
|
2972
2974
|
return "_def" in s && typeof s._def == "object" && "typeName" in s._def;
|
|
2973
2975
|
}(t)) return function(s, a, i) {
|
|
2974
2976
|
try {
|
|
2975
|
-
return Promise.resolve(
|
|
2976
|
-
return Promise.resolve(t[r.mode === "sync" ? "parse" : "parseAsync"](s, e)).then(function(
|
|
2977
|
-
return i.shouldUseNativeValidation &&
|
|
2977
|
+
return Promise.resolve($e(function() {
|
|
2978
|
+
return Promise.resolve(t[r.mode === "sync" ? "parse" : "parseAsync"](s, e)).then(function(l) {
|
|
2979
|
+
return i.shouldUseNativeValidation && Fe({}, i), { errors: {}, values: r.raw ? Object.assign({}, s) : l };
|
|
2978
2980
|
});
|
|
2979
|
-
}, function(
|
|
2980
|
-
if (function(
|
|
2981
|
-
return Array.isArray(
|
|
2982
|
-
}(
|
|
2983
|
-
throw
|
|
2981
|
+
}, function(l) {
|
|
2982
|
+
if (function(c) {
|
|
2983
|
+
return Array.isArray(c == null ? void 0 : c.issues);
|
|
2984
|
+
}(l)) return { values: {}, errors: Oe(pr(l.errors, !i.shouldUseNativeValidation && i.criteriaMode === "all"), i) };
|
|
2985
|
+
throw l;
|
|
2984
2986
|
}));
|
|
2985
|
-
} catch (
|
|
2986
|
-
return Promise.reject(
|
|
2987
|
+
} catch (l) {
|
|
2988
|
+
return Promise.reject(l);
|
|
2987
2989
|
}
|
|
2988
2990
|
};
|
|
2989
2991
|
if (function(s) {
|
|
2990
2992
|
return "_zod" in s && typeof s._zod == "object";
|
|
2991
2993
|
}(t)) return function(s, a, i) {
|
|
2992
2994
|
try {
|
|
2993
|
-
return Promise.resolve(
|
|
2994
|
-
return Promise.resolve((r.mode === "sync" ? ur : hr)(t, s, e)).then(function(
|
|
2995
|
-
return i.shouldUseNativeValidation &&
|
|
2995
|
+
return Promise.resolve($e(function() {
|
|
2996
|
+
return Promise.resolve((r.mode === "sync" ? ur : hr)(t, s, e)).then(function(l) {
|
|
2997
|
+
return i.shouldUseNativeValidation && Fe({}, i), { errors: {}, values: r.raw ? Object.assign({}, s) : l };
|
|
2996
2998
|
});
|
|
2997
|
-
}, function(
|
|
2998
|
-
if (function(
|
|
2999
|
-
return
|
|
3000
|
-
}(
|
|
3001
|
-
throw
|
|
2999
|
+
}, function(l) {
|
|
3000
|
+
if (function(c) {
|
|
3001
|
+
return c instanceof cr;
|
|
3002
|
+
}(l)) return { values: {}, errors: Oe(gr(l.issues, !i.shouldUseNativeValidation && i.criteriaMode === "all"), i) };
|
|
3003
|
+
throw l;
|
|
3002
3004
|
}));
|
|
3003
|
-
} catch (
|
|
3004
|
-
return Promise.reject(
|
|
3005
|
+
} catch (l) {
|
|
3006
|
+
return Promise.reject(l);
|
|
3005
3007
|
}
|
|
3006
3008
|
};
|
|
3007
3009
|
throw new Error("Invalid input: not a Zod schema");
|
|
@@ -3043,22 +3045,22 @@ function qr(t) {
|
|
|
3043
3045
|
function br(t) {
|
|
3044
3046
|
return ue.any();
|
|
3045
3047
|
}
|
|
3046
|
-
function
|
|
3048
|
+
function vr(t) {
|
|
3047
3049
|
return ue.string().min(1, "This question is required");
|
|
3048
3050
|
}
|
|
3049
3051
|
function Hr(t) {
|
|
3050
3052
|
const e = {};
|
|
3051
3053
|
return t.appropriatenessQuestions.forEach((r) => {
|
|
3052
3054
|
const s = `question_${r.id}`;
|
|
3053
|
-
e[s] =
|
|
3055
|
+
e[s] = vr();
|
|
3054
3056
|
}), ue.object(e);
|
|
3055
3057
|
}
|
|
3056
|
-
const Vr = ue.any(),
|
|
3058
|
+
const Vr = ue.any(), xr = ({
|
|
3057
3059
|
applicantId: t,
|
|
3058
3060
|
onComplete: e,
|
|
3059
3061
|
onBack: r
|
|
3060
3062
|
}) => {
|
|
3061
|
-
const { questionnaire: s, isLoading: a, isSubmitting: i, error:
|
|
3063
|
+
const { questionnaire: s, isLoading: a, isSubmitting: i, error: l, submit: c } = Zt(t), d = Re(() => s ? { questionResults: s.questionGroups.map(
|
|
3062
3064
|
(f) => f.questions.map((k) => ({
|
|
3063
3065
|
questionId: k.id,
|
|
3064
3066
|
values: []
|
|
@@ -3067,7 +3069,7 @@ const Vr = ue.any(), vr = ({
|
|
|
3067
3069
|
control: y,
|
|
3068
3070
|
handleSubmit: x,
|
|
3069
3071
|
formState: { errors: g }
|
|
3070
|
-
} =
|
|
3072
|
+
} = Te({
|
|
3071
3073
|
resolver: u ? Ge(u) : void 0,
|
|
3072
3074
|
defaultValues: d
|
|
3073
3075
|
}), b = async (m) => {
|
|
@@ -3075,11 +3077,11 @@ const Vr = ue.any(), vr = ({
|
|
|
3075
3077
|
try {
|
|
3076
3078
|
console.log("Form submitted with data:", m);
|
|
3077
3079
|
const f = s.questionGroups.flatMap(
|
|
3078
|
-
(h,
|
|
3080
|
+
(h, A) => h.questions.map((v, S) => {
|
|
3079
3081
|
var I, P, C;
|
|
3080
3082
|
return {
|
|
3081
3083
|
questionId: v.id,
|
|
3082
|
-
values: ((C = (P = (I = m.questionResults) == null ? void 0 : I[
|
|
3084
|
+
values: ((C = (P = (I = m.questionResults) == null ? void 0 : I[A]) == null ? void 0 : P[S]) == null ? void 0 : C.values) || []
|
|
3083
3085
|
};
|
|
3084
3086
|
})
|
|
3085
3087
|
);
|
|
@@ -3089,14 +3091,14 @@ const Vr = ue.any(), vr = ({
|
|
|
3089
3091
|
questionnarieId: s.id,
|
|
3090
3092
|
questionResults: f
|
|
3091
3093
|
};
|
|
3092
|
-
console.log("Final input:", k), await
|
|
3094
|
+
console.log("Final input:", k), await c(k), e == null || e();
|
|
3093
3095
|
} catch (f) {
|
|
3094
3096
|
console.error("Error submitting questionnaire:", f);
|
|
3095
3097
|
}
|
|
3096
3098
|
};
|
|
3097
|
-
return a ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(
|
|
3099
|
+
return a ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(ce, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
3098
3100
|
"Error loading questionnaire: ",
|
|
3099
|
-
|
|
3101
|
+
l.message
|
|
3100
3102
|
] }) }) }) : s ? /* @__PURE__ */ n("form", { onSubmit: x(b), children: /* @__PURE__ */ o(L, { children: [
|
|
3101
3103
|
/* @__PURE__ */ o(ee, { children: [
|
|
3102
3104
|
/* @__PURE__ */ n("h2", { className: "text-2xl font-bold", children: s.displayName }),
|
|
@@ -3116,7 +3118,7 @@ const Vr = ue.any(), vr = ({
|
|
|
3116
3118
|
control: y,
|
|
3117
3119
|
name: `questionResults.${f}.${h}.values.0`,
|
|
3118
3120
|
render: ({ field: S }) => {
|
|
3119
|
-
var I, P, C,
|
|
3121
|
+
var I, P, C, E;
|
|
3120
3122
|
return /* @__PURE__ */ n(
|
|
3121
3123
|
X,
|
|
3122
3124
|
{
|
|
@@ -3125,7 +3127,7 @@ const Vr = ue.any(), vr = ({
|
|
|
3125
3127
|
onBlur: S.onBlur,
|
|
3126
3128
|
name: S.name,
|
|
3127
3129
|
placeholder: "Enter your answer...",
|
|
3128
|
-
error: (
|
|
3130
|
+
error: (E = (C = (P = (I = g.questionResults) == null ? void 0 : I[f]) == null ? void 0 : P[h]) == null ? void 0 : C.values) == null ? void 0 : E.message
|
|
3129
3131
|
}
|
|
3130
3132
|
);
|
|
3131
3133
|
}
|
|
@@ -3137,7 +3139,7 @@ const Vr = ue.any(), vr = ({
|
|
|
3137
3139
|
control: y,
|
|
3138
3140
|
name: `questionResults.${f}.${h}.values.0`,
|
|
3139
3141
|
render: ({ field: S }) => {
|
|
3140
|
-
var I, P, C,
|
|
3142
|
+
var I, P, C, E;
|
|
3141
3143
|
return /* @__PURE__ */ n(
|
|
3142
3144
|
ye,
|
|
3143
3145
|
{
|
|
@@ -3150,7 +3152,7 @@ const Vr = ue.any(), vr = ({
|
|
|
3150
3152
|
label: M
|
|
3151
3153
|
})),
|
|
3152
3154
|
placeholder: "Select an option...",
|
|
3153
|
-
error: (
|
|
3155
|
+
error: (E = (C = (P = (I = g.questionResults) == null ? void 0 : I[f]) == null ? void 0 : P[h]) == null ? void 0 : C.values) == null ? void 0 : E.message
|
|
3154
3156
|
}
|
|
3155
3157
|
);
|
|
3156
3158
|
}
|
|
@@ -3173,8 +3175,8 @@ const Vr = ue.any(), vr = ({
|
|
|
3173
3175
|
{
|
|
3174
3176
|
type: "checkbox",
|
|
3175
3177
|
checked: Array.isArray(S) && S.includes(P),
|
|
3176
|
-
onChange: (
|
|
3177
|
-
const M = Array.isArray(S) ? S : [], B =
|
|
3178
|
+
onChange: (E) => {
|
|
3179
|
+
const M = Array.isArray(S) ? S : [], B = E.target.checked ? [...M, P] : M.filter((Q) => Q !== P);
|
|
3178
3180
|
I(B);
|
|
3179
3181
|
},
|
|
3180
3182
|
className: "h-4 w-4 text-primary-500 rounded border-gray-300 focus:ring-primary-500"
|
|
@@ -3205,9 +3207,9 @@ const Vr = ue.any(), vr = ({
|
|
|
3205
3207
|
}
|
|
3206
3208
|
)
|
|
3207
3209
|
] }),
|
|
3208
|
-
|
|
3210
|
+
l && /* @__PURE__ */ n("div", { className: "mt-4 p-4 bg-red-50 border border-red-200 rounded", children: /* @__PURE__ */ o("p", { className: "text-red-600 text-sm", children: [
|
|
3209
3211
|
"Error: ",
|
|
3210
|
-
|
|
3212
|
+
l.message
|
|
3211
3213
|
] }) })
|
|
3212
3214
|
] }) }) : null;
|
|
3213
3215
|
}, wr = ({
|
|
@@ -3215,7 +3217,7 @@ const Vr = ue.any(), vr = ({
|
|
|
3215
3217
|
onComplete: e,
|
|
3216
3218
|
onBack: r
|
|
3217
3219
|
}) => {
|
|
3218
|
-
const { uploadDocument: s, isLoading: a, isSubmitting: i, error:
|
|
3220
|
+
const { uploadDocument: s, isLoading: a, isSubmitting: i, error: l, submit: c } = Jt(t), [d, u] = N({}), y = async (x) => {
|
|
3219
3221
|
if (x.preventDefault(), !s) return;
|
|
3220
3222
|
const g = await Promise.all(
|
|
3221
3223
|
s.uploadDocumentFiles.map(async (m) => {
|
|
@@ -3235,11 +3237,11 @@ const Vr = ue.any(), vr = ({
|
|
|
3235
3237
|
uploadDocumentId: s.id,
|
|
3236
3238
|
uploadDocumentResults: g
|
|
3237
3239
|
};
|
|
3238
|
-
await
|
|
3240
|
+
await c(b), e == null || e();
|
|
3239
3241
|
};
|
|
3240
|
-
return a ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(
|
|
3242
|
+
return a ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(ce, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
3241
3243
|
"Error loading document requirements: ",
|
|
3242
|
-
|
|
3244
|
+
l.message
|
|
3243
3245
|
] }) }) }) : s ? /* @__PURE__ */ n("form", { onSubmit: y, children: /* @__PURE__ */ o(L, { children: [
|
|
3244
3246
|
/* @__PURE__ */ o(ee, { children: [
|
|
3245
3247
|
/* @__PURE__ */ n("h2", { className: "text-2xl font-bold", children: s.displayName }),
|
|
@@ -3265,12 +3267,12 @@ const Vr = ue.any(), vr = ({
|
|
|
3265
3267
|
] })
|
|
3266
3268
|
] }) }) : null;
|
|
3267
3269
|
}, kr = ({ applicantId: t, onComplete: e, onBack: r }) => {
|
|
3268
|
-
const { overview: s, isLoading: a, isSubmitting: i, error:
|
|
3269
|
-
await
|
|
3270
|
+
const { overview: s, isLoading: a, isSubmitting: i, error: l, passOverview: c } = Xt(t), d = async () => {
|
|
3271
|
+
await c(), e == null || e();
|
|
3270
3272
|
};
|
|
3271
|
-
return a ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(
|
|
3273
|
+
return a ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ n(ce, { className: "my-8" }) }) }) : l ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
3272
3274
|
"Error loading overview: ",
|
|
3273
|
-
|
|
3275
|
+
l.message
|
|
3274
3276
|
] }) }) }) : s ? /* @__PURE__ */ o(L, { children: [
|
|
3275
3277
|
/* @__PURE__ */ o(ee, { children: [
|
|
3276
3278
|
/* @__PURE__ */ n("h2", { className: "text-2xl font-bold", children: s.title || "Overview" }),
|
|
@@ -3306,7 +3308,7 @@ const Vr = ue.any(), vr = ({
|
|
|
3306
3308
|
onComplete: e,
|
|
3307
3309
|
onBack: r
|
|
3308
3310
|
}) => {
|
|
3309
|
-
const { criteria: s, isLoading: a, isSubmitting: i, error:
|
|
3311
|
+
const { criteria: s, isLoading: a, isSubmitting: i, error: l, submit: c } = tr(t), [d, u] = ie.useState(!1), y = ie.useMemo(() => !s || s.length === 0 ? { criteriaValueInputs: [] } : {
|
|
3310
3312
|
criteriaValueInputs: s.map((h) => ({
|
|
3311
3313
|
riskCriteriaId: h.id,
|
|
3312
3314
|
values: [""]
|
|
@@ -3316,49 +3318,49 @@ const Vr = ue.any(), vr = ({
|
|
|
3316
3318
|
control: g,
|
|
3317
3319
|
handleSubmit: b,
|
|
3318
3320
|
formState: { errors: m }
|
|
3319
|
-
} =
|
|
3321
|
+
} = Te({
|
|
3320
3322
|
resolver: x ? Ge(x) : void 0,
|
|
3321
3323
|
defaultValues: y
|
|
3322
3324
|
});
|
|
3323
|
-
|
|
3324
|
-
!a && s && s.length === 0 && !d && !i && (u(!0),
|
|
3325
|
-
}, [a, s, d, i,
|
|
3325
|
+
ie.useEffect(() => {
|
|
3326
|
+
!a && s && s.length === 0 && !d && !i && (u(!0), c({ applicantId: t, criteriaValueInputs: [] }).then(() => e == null ? void 0 : e()).catch(console.error));
|
|
3327
|
+
}, [a, s, d, i, c, t, e]);
|
|
3326
3328
|
const f = async (h) => {
|
|
3327
3329
|
if (s)
|
|
3328
3330
|
try {
|
|
3329
3331
|
console.log("Risk scoring form submitted:", h), console.log("Criteria metadata:", s);
|
|
3330
|
-
const
|
|
3331
|
-
const P = S.values || [], C = Array.isArray(P) ? P.filter((
|
|
3332
|
+
const A = h.criteriaValueInputs.map((S, I) => {
|
|
3333
|
+
const P = S.values || [], C = Array.isArray(P) ? P.filter((E) => E && E.trim()) : P && P.toString().trim() ? [P.toString()] : [];
|
|
3332
3334
|
return C.length === 0 ? null : {
|
|
3333
3335
|
riskCriteriaId: s[I].id,
|
|
3334
3336
|
values: C
|
|
3335
3337
|
};
|
|
3336
3338
|
}).filter((S) => S !== null);
|
|
3337
|
-
console.log("Risk scoring criteriaValueInputs to submit:",
|
|
3339
|
+
console.log("Risk scoring criteriaValueInputs to submit:", A);
|
|
3338
3340
|
const v = {
|
|
3339
3341
|
applicantId: t,
|
|
3340
|
-
criteriaValueInputs:
|
|
3342
|
+
criteriaValueInputs: A
|
|
3341
3343
|
};
|
|
3342
|
-
console.log("Final risk scoring input:", v), await
|
|
3343
|
-
} catch (
|
|
3344
|
-
throw console.error("Error submitting risk scoring:",
|
|
3344
|
+
console.log("Final risk scoring input:", v), await c(v), console.log("Risk scoring submitted successfully!"), e == null || e();
|
|
3345
|
+
} catch (A) {
|
|
3346
|
+
throw console.error("Error submitting risk scoring:", A), A;
|
|
3345
3347
|
}
|
|
3346
3348
|
}, k = (h) => h.builtInType === 1 ? "country" : !h.defaultValues || h.defaultValues.length === 0 ? "text" : h.multipleValue ? "checkbox" : "radio";
|
|
3347
3349
|
return a ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { children: [
|
|
3348
|
-
/* @__PURE__ */ n(
|
|
3350
|
+
/* @__PURE__ */ n(ce, { className: "my-8" }),
|
|
3349
3351
|
/* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading risk scoring criteria..." })
|
|
3350
|
-
] }) }) :
|
|
3352
|
+
] }) }) : l ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ n(T, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
3351
3353
|
"Error loading criteria: ",
|
|
3352
|
-
|
|
3354
|
+
l.message
|
|
3353
3355
|
] }) }) }) : !a && s && s.length === 0 ? /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { children: [
|
|
3354
|
-
/* @__PURE__ */ n(
|
|
3356
|
+
/* @__PURE__ */ n(ce, { className: "my-8" }),
|
|
3355
3357
|
/* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400", children: "No risk scoring criteria required. Moving to next step..." })
|
|
3356
3358
|
] }) }) : s ? /* @__PURE__ */ n("form", { onSubmit: b(f), children: /* @__PURE__ */ o(L, { children: [
|
|
3357
3359
|
/* @__PURE__ */ o(ee, { children: [
|
|
3358
3360
|
/* @__PURE__ */ n("h2", { className: "text-2xl font-bold", children: "Risk Assessment" }),
|
|
3359
3361
|
/* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please answer the following questions for risk evaluation" })
|
|
3360
3362
|
] }),
|
|
3361
|
-
/* @__PURE__ */ n(T, { className: "space-y-8", children: s.map((h,
|
|
3363
|
+
/* @__PURE__ */ n(T, { className: "space-y-8", children: s.map((h, A) => {
|
|
3362
3364
|
var S, I, P;
|
|
3363
3365
|
const v = k(h);
|
|
3364
3366
|
return /* @__PURE__ */ o("div", { className: "space-y-2", children: [
|
|
@@ -3371,19 +3373,19 @@ const Vr = ue.any(), vr = ({
|
|
|
3371
3373
|
J,
|
|
3372
3374
|
{
|
|
3373
3375
|
control: g,
|
|
3374
|
-
name: `criteriaValueInputs.${
|
|
3376
|
+
name: `criteriaValueInputs.${A}.values.0`,
|
|
3375
3377
|
render: ({ field: C }) => {
|
|
3376
|
-
var
|
|
3378
|
+
var E, M, B;
|
|
3377
3379
|
return /* @__PURE__ */ n(
|
|
3378
3380
|
X,
|
|
3379
3381
|
{
|
|
3380
3382
|
...C,
|
|
3381
3383
|
value: C.value || "",
|
|
3382
|
-
type: h.valueDataType ===
|
|
3384
|
+
type: h.valueDataType === Pe.DigitOnly ? "number" : "text",
|
|
3383
3385
|
placeholder: "Enter your answer...",
|
|
3384
|
-
error: (B = (M = (
|
|
3386
|
+
error: (B = (M = (E = m.criteriaValueInputs) == null ? void 0 : E[A]) == null ? void 0 : M.values) == null ? void 0 : B.message,
|
|
3385
3387
|
onKeyDown: (Q) => {
|
|
3386
|
-
h.valueDataType ===
|
|
3388
|
+
h.valueDataType === Pe.DigitOnly && ["e", "E", "+", "-", "."].includes(Q.key) && Q.preventDefault();
|
|
3387
3389
|
}
|
|
3388
3390
|
}
|
|
3389
3391
|
);
|
|
@@ -3396,19 +3398,19 @@ const Vr = ue.any(), vr = ({
|
|
|
3396
3398
|
J,
|
|
3397
3399
|
{
|
|
3398
3400
|
control: g,
|
|
3399
|
-
name: `criteriaValueInputs.${
|
|
3400
|
-
render: ({ field: { value: C, onChange:
|
|
3401
|
+
name: `criteriaValueInputs.${A}.values.0`,
|
|
3402
|
+
render: ({ field: { value: C, onChange: E } }) => /* @__PURE__ */ n("div", { className: "space-y-2", children: h.defaultValues.map((M, B) => /* @__PURE__ */ o("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
|
|
3401
3403
|
/* @__PURE__ */ n(
|
|
3402
3404
|
"input",
|
|
3403
3405
|
{
|
|
3404
3406
|
type: "radio",
|
|
3405
3407
|
checked: C === M,
|
|
3406
|
-
onChange: () =>
|
|
3408
|
+
onChange: () => E(M),
|
|
3407
3409
|
className: "h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500"
|
|
3408
3410
|
}
|
|
3409
3411
|
),
|
|
3410
3412
|
/* @__PURE__ */ n("span", { className: "text-sm", children: M })
|
|
3411
|
-
] }, `${
|
|
3413
|
+
] }, `${A}-${B}`)) })
|
|
3412
3414
|
}
|
|
3413
3415
|
)
|
|
3414
3416
|
] }),
|
|
@@ -3418,8 +3420,8 @@ const Vr = ue.any(), vr = ({
|
|
|
3418
3420
|
J,
|
|
3419
3421
|
{
|
|
3420
3422
|
control: g,
|
|
3421
|
-
name: `criteriaValueInputs.${
|
|
3422
|
-
render: ({ field: { value: C = [], onChange:
|
|
3423
|
+
name: `criteriaValueInputs.${A}.values`,
|
|
3424
|
+
render: ({ field: { value: C = [], onChange: E } }) => /* @__PURE__ */ n("div", { className: "space-y-2", children: h.defaultValues.map((M, B) => /* @__PURE__ */ o("label", { className: "flex items-center space-x-2 cursor-pointer", children: [
|
|
3423
3425
|
/* @__PURE__ */ n(
|
|
3424
3426
|
"input",
|
|
3425
3427
|
{
|
|
@@ -3427,13 +3429,13 @@ const Vr = ue.any(), vr = ({
|
|
|
3427
3429
|
checked: Array.isArray(C) && C.includes(M),
|
|
3428
3430
|
onChange: (Q) => {
|
|
3429
3431
|
const _ = Array.isArray(C) ? C : [], p = Q.target.checked ? [..._, M] : _.filter((w) => w !== M);
|
|
3430
|
-
|
|
3432
|
+
E(p);
|
|
3431
3433
|
},
|
|
3432
3434
|
className: "h-4 w-4 text-primary-500 rounded border-gray-300 focus:ring-primary-500"
|
|
3433
3435
|
}
|
|
3434
3436
|
),
|
|
3435
3437
|
/* @__PURE__ */ n("span", { className: "text-sm", children: M })
|
|
3436
|
-
] }, `${
|
|
3438
|
+
] }, `${A}-${B}`)) })
|
|
3437
3439
|
}
|
|
3438
3440
|
)
|
|
3439
3441
|
] }),
|
|
@@ -3441,9 +3443,9 @@ const Vr = ue.any(), vr = ({
|
|
|
3441
3443
|
J,
|
|
3442
3444
|
{
|
|
3443
3445
|
control: g,
|
|
3444
|
-
name: `criteriaValueInputs.${
|
|
3446
|
+
name: `criteriaValueInputs.${A}.values.0`,
|
|
3445
3447
|
render: ({ field: C }) => {
|
|
3446
|
-
var
|
|
3448
|
+
var E, M, B;
|
|
3447
3449
|
return /* @__PURE__ */ n(
|
|
3448
3450
|
ye,
|
|
3449
3451
|
{
|
|
@@ -3455,13 +3457,13 @@ const Vr = ue.any(), vr = ({
|
|
|
3455
3457
|
// TODO: Load from base information service
|
|
3456
3458
|
],
|
|
3457
3459
|
placeholder: "Select a country...",
|
|
3458
|
-
error: (B = (M = (
|
|
3460
|
+
error: (B = (M = (E = m.criteriaValueInputs) == null ? void 0 : E[A]) == null ? void 0 : M.values) == null ? void 0 : B.message
|
|
3459
3461
|
}
|
|
3460
3462
|
);
|
|
3461
3463
|
}
|
|
3462
3464
|
}
|
|
3463
3465
|
),
|
|
3464
|
-
((P = (I = (S = m.criteriaValueInputs) == null ? void 0 : S[
|
|
3466
|
+
((P = (I = (S = m.criteriaValueInputs) == null ? void 0 : S[A]) == null ? void 0 : I.values) == null ? void 0 : P.message) && /* @__PURE__ */ n("p", { className: "text-sm text-danger-500 mt-1", children: m.criteriaValueInputs[A].values.message })
|
|
3465
3467
|
] }, h.id);
|
|
3466
3468
|
}) }),
|
|
3467
3469
|
/* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
|
|
@@ -3478,9 +3480,9 @@ const Vr = ue.any(), vr = ({
|
|
|
3478
3480
|
}
|
|
3479
3481
|
)
|
|
3480
3482
|
] }),
|
|
3481
|
-
|
|
3483
|
+
l && /* @__PURE__ */ n("div", { className: "mt-4 p-4 bg-red-50 border border-red-200 rounded", children: /* @__PURE__ */ o("p", { className: "text-red-600 text-sm", children: [
|
|
3482
3484
|
"Error: ",
|
|
3483
|
-
|
|
3485
|
+
l.message
|
|
3484
3486
|
] }) })
|
|
3485
3487
|
] }) }) : null;
|
|
3486
3488
|
}, Sr = ({
|
|
@@ -3488,13 +3490,13 @@ const Vr = ue.any(), vr = ({
|
|
|
3488
3490
|
onComplete: e,
|
|
3489
3491
|
onBack: r
|
|
3490
3492
|
}) => {
|
|
3491
|
-
const { investorCategorizationService: s } = se(), [a, i] = N(null), [
|
|
3493
|
+
const { investorCategorizationService: s } = se(), [a, i] = N(null), [l, c] = N(!1), [d, u] = N(null);
|
|
3492
3494
|
return /* @__PURE__ */ n("form", { onSubmit: async (x) => {
|
|
3493
3495
|
if (x.preventDefault(), a === null) {
|
|
3494
3496
|
u("Please select an investor type");
|
|
3495
3497
|
return;
|
|
3496
3498
|
}
|
|
3497
|
-
|
|
3499
|
+
c(!0), u(null);
|
|
3498
3500
|
try {
|
|
3499
3501
|
const g = {
|
|
3500
3502
|
applicantId: t,
|
|
@@ -3506,7 +3508,7 @@ const Vr = ue.any(), vr = ({
|
|
|
3506
3508
|
} catch (g) {
|
|
3507
3509
|
console.error("Error submitting investor categorization:", g), u(g.message || "Failed to submit investor categorization");
|
|
3508
3510
|
} finally {
|
|
3509
|
-
|
|
3511
|
+
c(!1);
|
|
3510
3512
|
}
|
|
3511
3513
|
}, children: /* @__PURE__ */ o(L, { children: [
|
|
3512
3514
|
/* @__PURE__ */ o(ee, { children: [
|
|
@@ -3614,7 +3616,7 @@ const Vr = ue.any(), vr = ({
|
|
|
3614
3616
|
j,
|
|
3615
3617
|
{
|
|
3616
3618
|
type: "submit",
|
|
3617
|
-
isLoading:
|
|
3619
|
+
isLoading: l,
|
|
3618
3620
|
disabled: a === null,
|
|
3619
3621
|
children: "Submit"
|
|
3620
3622
|
}
|
|
@@ -3626,11 +3628,11 @@ const Vr = ue.any(), vr = ({
|
|
|
3626
3628
|
onComplete: e,
|
|
3627
3629
|
onBack: r
|
|
3628
3630
|
}) => {
|
|
3629
|
-
const { appropriatenessTestService: s } = se(), [a, i] = N(null), [
|
|
3631
|
+
const { appropriatenessTestService: s } = se(), [a, i] = N(null), [l, c] = N(!0), [d, u] = N(!1), [y, x] = N(null), [g, b] = N({}), [m, f] = N(0), [k, h] = N(!1), [A, v] = N(!1), [S, I] = N(0);
|
|
3630
3632
|
Y(() => {
|
|
3631
3633
|
(async () => {
|
|
3632
3634
|
try {
|
|
3633
|
-
|
|
3635
|
+
c(!0), x(null), console.log("Loading appropriateness test for applicant:", t);
|
|
3634
3636
|
const w = await s.getAppropriatenessTest(t);
|
|
3635
3637
|
if (console.log("Appropriateness test data:", w), i(w), w.waitTimeSpanForNextTry && w.waitTimeSpanForNextTry !== "00:00:00") {
|
|
3636
3638
|
const O = P(w.waitTimeSpanForNextTry);
|
|
@@ -3639,7 +3641,7 @@ const Vr = ue.any(), vr = ({
|
|
|
3639
3641
|
} catch (w) {
|
|
3640
3642
|
console.error("Error loading appropriateness test:", w), x(w.message || "Failed to load appropriateness test");
|
|
3641
3643
|
} finally {
|
|
3642
|
-
|
|
3644
|
+
c(!1);
|
|
3643
3645
|
}
|
|
3644
3646
|
})();
|
|
3645
3647
|
}, [t, s]);
|
|
@@ -3667,9 +3669,9 @@ const Vr = ue.any(), vr = ({
|
|
|
3667
3669
|
}, 1e3);
|
|
3668
3670
|
return () => clearInterval(p);
|
|
3669
3671
|
}, [S]), Y(() => {
|
|
3670
|
-
|
|
3671
|
-
}, [
|
|
3672
|
-
const
|
|
3672
|
+
A && !d && B();
|
|
3673
|
+
}, [A]);
|
|
3674
|
+
const E = () => {
|
|
3673
3675
|
a && (h(!0), f(a.testDurationSec));
|
|
3674
3676
|
}, M = (p, w) => {
|
|
3675
3677
|
b((O) => ({
|
|
@@ -3678,7 +3680,7 @@ const Vr = ue.any(), vr = ({
|
|
|
3678
3680
|
}));
|
|
3679
3681
|
}, B = async (p) => {
|
|
3680
3682
|
if (p && p.preventDefault(), !!a) {
|
|
3681
|
-
if (!
|
|
3683
|
+
if (!A) {
|
|
3682
3684
|
const w = a.appropriatenessQuestions.length - Object.keys(g).length;
|
|
3683
3685
|
if (w > 0) {
|
|
3684
3686
|
x(`Please answer all questions. ${w} question(s) remaining.`);
|
|
@@ -3728,9 +3730,9 @@ const Vr = ue.any(), vr = ({
|
|
|
3728
3730
|
Failed to reload test data. Please refresh the page.`);
|
|
3729
3731
|
}
|
|
3730
3732
|
};
|
|
3731
|
-
if (
|
|
3733
|
+
if (l)
|
|
3732
3734
|
return /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { children: [
|
|
3733
|
-
/* @__PURE__ */ n(
|
|
3735
|
+
/* @__PURE__ */ n(ce, { className: "my-8" }),
|
|
3734
3736
|
/* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading appropriateness test..." })
|
|
3735
3737
|
] }) });
|
|
3736
3738
|
if (!a)
|
|
@@ -3827,12 +3829,12 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3827
3829
|
},
|
|
3828
3830
|
p.id
|
|
3829
3831
|
)),
|
|
3830
|
-
y && !
|
|
3832
|
+
y && !A && /* @__PURE__ */ n("div", { className: "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: [
|
|
3831
3833
|
/* @__PURE__ */ n("strong", { children: "Error:" }),
|
|
3832
3834
|
" ",
|
|
3833
3835
|
y
|
|
3834
3836
|
] }) }),
|
|
3835
|
-
|
|
3837
|
+
A && /* @__PURE__ */ n("div", { className: "p-4 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg", children: /* @__PURE__ */ o("p", { className: "text-yellow-700 dark:text-yellow-400 text-sm", children: [
|
|
3836
3838
|
/* @__PURE__ */ n("strong", { children: "Time's up!" }),
|
|
3837
3839
|
" Your answers are being submitted automatically."
|
|
3838
3840
|
] }) })
|
|
@@ -3854,7 +3856,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3854
3856
|
type: "submit",
|
|
3855
3857
|
isLoading: d,
|
|
3856
3858
|
disabled: Object.keys(g).length < a.totalQuestionCount,
|
|
3857
|
-
children:
|
|
3859
|
+
children: A ? "Submitting..." : "Submit Test"
|
|
3858
3860
|
}
|
|
3859
3861
|
)
|
|
3860
3862
|
] })
|
|
@@ -3896,7 +3898,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3896
3898
|
j,
|
|
3897
3899
|
{
|
|
3898
3900
|
type: "button",
|
|
3899
|
-
onClick:
|
|
3901
|
+
onClick: E,
|
|
3900
3902
|
disabled: _ <= 0,
|
|
3901
3903
|
children: "Start Test"
|
|
3902
3904
|
}
|
|
@@ -3909,7 +3911,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3909
3911
|
onBack: r
|
|
3910
3912
|
}) => {
|
|
3911
3913
|
var O, z, R, we;
|
|
3912
|
-
const { applicantService: s, baseInformationService: a, config: i } = se(), { identityData:
|
|
3914
|
+
const { applicantService: s, baseInformationService: a, config: i } = se(), { identityData: l, provider: c, token: d, isLoading: u, error: y, requestIdentity: x, restartIdentity: g } = er(t), [b, m] = N(null), [f, k] = N(null), [h, A] = N([]), [v, S] = N(!0), [I, P] = N(!1), [C, E] = N(null), [M, B] = N(!1), Q = ie.useRef(!1), _ = Te({
|
|
3913
3915
|
defaultValues: {
|
|
3914
3916
|
street: "",
|
|
3915
3917
|
streetNumber: "",
|
|
@@ -3932,7 +3934,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3932
3934
|
const Ae = me.abbreviation3 || me.abbreviation;
|
|
3933
3935
|
return !Ae || V.has(Ae) ? !1 : (V.add(Ae), !0);
|
|
3934
3936
|
});
|
|
3935
|
-
|
|
3937
|
+
A(ae);
|
|
3936
3938
|
const $ = D.applicantRequestData;
|
|
3937
3939
|
if (_.reset({
|
|
3938
3940
|
street: ($ == null ? void 0 : $.street) || "",
|
|
@@ -3957,13 +3959,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3957
3959
|
}
|
|
3958
3960
|
})();
|
|
3959
3961
|
}, [t]), Y(() => {
|
|
3960
|
-
|
|
3961
|
-
}, [
|
|
3962
|
+
l && !I && (console.log("[Identity] Identity data already loaded, showing provider"), P(!0));
|
|
3963
|
+
}, [l, I]), Y(() => {
|
|
3962
3964
|
if (d) {
|
|
3963
3965
|
if (d.expiresAt) {
|
|
3964
3966
|
const F = new Date(d.expiresAt).getTime();
|
|
3965
3967
|
if (Date.now() >= F) {
|
|
3966
|
-
console.warn("[Identity] Token has expired (expiresAt)"), B(!0),
|
|
3968
|
+
console.warn("[Identity] Token has expired (expiresAt)"), B(!0), E("Your verification session has expired. Please restart.");
|
|
3967
3969
|
return;
|
|
3968
3970
|
}
|
|
3969
3971
|
}
|
|
@@ -3971,28 +3973,28 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
3971
3973
|
try {
|
|
3972
3974
|
const D = new URL(d.url).toString().toLowerCase();
|
|
3973
3975
|
if (D.includes("expired") || D.includes("invalid") || D.includes("error")) {
|
|
3974
|
-
console.warn("[Identity] Token URL indicates expiration"), B(!0),
|
|
3976
|
+
console.warn("[Identity] Token URL indicates expiration"), B(!0), E("Your verification link has expired. Please restart.");
|
|
3975
3977
|
return;
|
|
3976
3978
|
}
|
|
3977
3979
|
} catch {
|
|
3978
3980
|
console.error("[Identity] Invalid token URL");
|
|
3979
3981
|
}
|
|
3980
3982
|
if (d.status === "expired" || d.error === "expired" || d.expired === !0) {
|
|
3981
|
-
console.warn("[Identity] Token object indicates expiration"), B(!0),
|
|
3983
|
+
console.warn("[Identity] Token object indicates expiration"), B(!0), E("Your verification session has expired. Please restart.");
|
|
3982
3984
|
return;
|
|
3983
3985
|
}
|
|
3984
3986
|
}
|
|
3985
3987
|
}, [d]), Y(() => {
|
|
3986
|
-
if (
|
|
3987
|
-
const F =
|
|
3988
|
+
if (c !== null && d && !b && I && !M) {
|
|
3989
|
+
const F = c;
|
|
3988
3990
|
if (d.url) {
|
|
3989
|
-
console.log("[Identity] Loading provider URL for user verification:", d.url),
|
|
3991
|
+
console.log("[Identity] Loading provider URL for user verification:", d.url), E(null);
|
|
3990
3992
|
try {
|
|
3991
|
-
if (new URL(d.url), F ===
|
|
3993
|
+
if (new URL(d.url), F === oe.SardinAI) {
|
|
3992
3994
|
console.log("[SardinAI] Initializing Risk SDK in background...");
|
|
3993
3995
|
try {
|
|
3994
|
-
const D = fe.parseProviderConfig(
|
|
3995
|
-
fe.createProvider(
|
|
3996
|
+
const D = fe.parseProviderConfig(c, d, i);
|
|
3997
|
+
fe.createProvider(c, D).initialize().then(() => {
|
|
3996
3998
|
console.log("[SardinAI] Risk SDK initialized successfully in background");
|
|
3997
3999
|
}).catch((V) => {
|
|
3998
4000
|
console.warn("[SardinAI] Risk SDK initialization failed (non-blocking):", V);
|
|
@@ -4003,14 +4005,14 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4003
4005
|
}
|
|
4004
4006
|
m({ type: "url", url: d.url });
|
|
4005
4007
|
} catch (D) {
|
|
4006
|
-
console.error("[Identity] Invalid URL:", D),
|
|
4008
|
+
console.error("[Identity] Invalid URL:", D), E("Invalid verification URL. Please restart."), B(!0);
|
|
4007
4009
|
}
|
|
4008
4010
|
return;
|
|
4009
4011
|
}
|
|
4010
|
-
if (F ===
|
|
4011
|
-
console.log("[SardinAI] No URL provided - initializing Risk SDK only..."),
|
|
4012
|
+
if (F === oe.SardinAI) {
|
|
4013
|
+
console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), E(null);
|
|
4012
4014
|
try {
|
|
4013
|
-
const D = fe.parseProviderConfig(
|
|
4015
|
+
const D = fe.parseProviderConfig(c, d, i), G = fe.createProvider(c, D);
|
|
4014
4016
|
G.initialize().then(() => {
|
|
4015
4017
|
console.log("[SardinAI] Risk SDK initialized successfully"), m(G), setTimeout(() => {
|
|
4016
4018
|
e == null || e();
|
|
@@ -4019,26 +4021,26 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4019
4021
|
var $;
|
|
4020
4022
|
console.error("[SardinAI] Failed to initialize:", V);
|
|
4021
4023
|
const ae = (($ = V.message) == null ? void 0 : $.toLowerCase()) || "";
|
|
4022
|
-
ae.includes("expired") || ae.includes("invalid") || ae.includes("401") || ae.includes("400") ? (B(!0),
|
|
4024
|
+
ae.includes("expired") || ae.includes("invalid") || ae.includes("401") || ae.includes("400") ? (B(!0), E("Session expired or invalid. Please restart verification.")) : E(`Failed to initialize: ${V.message}`);
|
|
4023
4025
|
});
|
|
4024
4026
|
} catch (D) {
|
|
4025
|
-
console.error("[SardinAI] Error creating provider:", D),
|
|
4027
|
+
console.error("[SardinAI] Error creating provider:", D), E(`Configuration error: ${D.message}`);
|
|
4026
4028
|
}
|
|
4027
4029
|
return;
|
|
4028
4030
|
}
|
|
4029
4031
|
try {
|
|
4030
|
-
|
|
4031
|
-
const D = fe.parseProviderConfig(
|
|
4032
|
-
F ===
|
|
4032
|
+
E(null);
|
|
4033
|
+
const D = fe.parseProviderConfig(c, d, i), G = fe.createProvider(c, D);
|
|
4034
|
+
F === oe.Sumsub ? (G.initialize("identity-container").catch((V) => {
|
|
4033
4035
|
var ae;
|
|
4034
|
-
console.error("[Sumsub] Initialization error:", V),
|
|
4036
|
+
console.error("[Sumsub] Initialization error:", V), E(`Failed to initialize: ${V.message}`), (ae = V.message) != null && ae.toLowerCase().includes("expired") && B(!0);
|
|
4035
4037
|
}), G.onComplete && G.onComplete(() => {
|
|
4036
4038
|
e == null || e();
|
|
4037
|
-
})) : F ===
|
|
4038
|
-
console.error("[Onfido] Initialization error:", V),
|
|
4039
|
+
})) : F === oe.Onfido && G.initialize("identity-container").catch((V) => {
|
|
4040
|
+
console.error("[Onfido] Initialization error:", V), E(`Failed to initialize: ${V.message}`);
|
|
4039
4041
|
}), m(G);
|
|
4040
4042
|
} catch (D) {
|
|
4041
|
-
console.error("[Identity] Provider setup error:", D),
|
|
4043
|
+
console.error("[Identity] Provider setup error:", D), E(`Setup error: ${D.message}`);
|
|
4042
4044
|
}
|
|
4043
4045
|
}
|
|
4044
4046
|
return () => {
|
|
@@ -4049,23 +4051,23 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4049
4051
|
console.error("[Identity] Error destroying provider:", F);
|
|
4050
4052
|
}
|
|
4051
4053
|
};
|
|
4052
|
-
}, [
|
|
4054
|
+
}, [c, d, b, I, e, M]);
|
|
4053
4055
|
const p = async () => {
|
|
4054
4056
|
try {
|
|
4055
|
-
|
|
4057
|
+
E(null), B(!1), await x(), P(!0);
|
|
4056
4058
|
} catch (F) {
|
|
4057
4059
|
console.error("Error starting identity verification:", F);
|
|
4058
4060
|
}
|
|
4059
4061
|
}, w = async () => {
|
|
4060
4062
|
try {
|
|
4061
|
-
|
|
4063
|
+
E(null), B(!1), m(null), console.log("[Identity] Restarting verification..."), await g(), P(!0);
|
|
4062
4064
|
} catch (F) {
|
|
4063
|
-
console.error("Error restarting identity verification:", F),
|
|
4065
|
+
console.error("Error restarting identity verification:", F), E(F.message || "Failed to restart verification");
|
|
4064
4066
|
}
|
|
4065
4067
|
};
|
|
4066
4068
|
if (v || u)
|
|
4067
4069
|
return /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { children: [
|
|
4068
|
-
/* @__PURE__ */ n(
|
|
4070
|
+
/* @__PURE__ */ n(ce, { className: "my-8" }),
|
|
4069
4071
|
/* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading identity verification..." })
|
|
4070
4072
|
] }) });
|
|
4071
4073
|
if (y)
|
|
@@ -4115,8 +4117,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4115
4117
|
/* @__PURE__ */ n(j, { type: "button", onClick: w, disabled: u, children: u ? "Restarting..." : "Restart Verification" })
|
|
4116
4118
|
] })
|
|
4117
4119
|
] });
|
|
4118
|
-
if (I &&
|
|
4119
|
-
const F =
|
|
4120
|
+
if (I && l) {
|
|
4121
|
+
const F = c;
|
|
4120
4122
|
return d != null && d.url ? /* @__PURE__ */ o(L, { children: [
|
|
4121
4123
|
/* @__PURE__ */ n(ee, { children: /* @__PURE__ */ o("div", { className: "flex items-center justify-between", children: [
|
|
4122
4124
|
/* @__PURE__ */ o("div", { children: [
|
|
@@ -4154,7 +4156,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4154
4156
|
const $ = D.target, Ce = $.contentDocument || ((G = $.contentWindow) == null ? void 0 : G.document);
|
|
4155
4157
|
if (Ce) {
|
|
4156
4158
|
const me = ((ae = (V = Ce.body) == null ? void 0 : V.textContent) == null ? void 0 : ae.toLowerCase()) || "";
|
|
4157
|
-
(me.includes("expired") || me.includes("invalid") || me.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), B(!0),
|
|
4159
|
+
(me.includes("expired") || me.includes("invalid") || me.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), B(!0), E("Your verification link has expired."));
|
|
4158
4160
|
}
|
|
4159
4161
|
} catch {
|
|
4160
4162
|
console.log("[Identity] Cannot check iframe content (CORS)");
|
|
@@ -4164,13 +4166,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4164
4166
|
) })
|
|
4165
4167
|
] }),
|
|
4166
4168
|
r && /* @__PURE__ */ n(ne, { children: /* @__PURE__ */ n(j, { variant: "outline", onClick: r, children: "Back" }) })
|
|
4167
|
-
] }) : F ===
|
|
4169
|
+
] }) : F === oe.SardinAI ? /* @__PURE__ */ o(L, { children: [
|
|
4168
4170
|
/* @__PURE__ */ o(ee, { children: [
|
|
4169
4171
|
/* @__PURE__ */ n("h2", { className: "text-2xl font-bold", children: "Device Risk Assessment" }),
|
|
4170
4172
|
/* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Analyzing device security and behavioral patterns..." })
|
|
4171
4173
|
] }),
|
|
4172
4174
|
/* @__PURE__ */ n(T, { children: /* @__PURE__ */ o("div", { className: "text-center py-12", children: [
|
|
4173
|
-
/* @__PURE__ */ n(
|
|
4175
|
+
/* @__PURE__ */ n(ce, { className: "mb-4" }),
|
|
4174
4176
|
/* @__PURE__ */ n("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait while we verify your device security" }),
|
|
4175
4177
|
/* @__PURE__ */ n("p", { className: "text-sm text-gray-500 dark:text-gray-500 mt-2", children: "This process is automatic and will complete in a few seconds" })
|
|
4176
4178
|
] }) })
|
|
@@ -4304,7 +4306,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4304
4306
|
/* @__PURE__ */ n(j, { type: "submit", isLoading: u, children: "Confirm and Start Verification" })
|
|
4305
4307
|
] })
|
|
4306
4308
|
] }) });
|
|
4307
|
-
},
|
|
4309
|
+
}, je = ({
|
|
4308
4310
|
kycStatus: t,
|
|
4309
4311
|
reviewStatus: e,
|
|
4310
4312
|
workflowResult: r,
|
|
@@ -4312,7 +4314,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4312
4314
|
onContinue: a,
|
|
4313
4315
|
onContactSupport: i
|
|
4314
4316
|
}) => {
|
|
4315
|
-
const
|
|
4317
|
+
const c = t === pe.Approved ? {
|
|
4316
4318
|
type: "success",
|
|
4317
4319
|
title: "Verification Approved",
|
|
4318
4320
|
icon: "✓",
|
|
@@ -4388,20 +4390,20 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4388
4390
|
/* @__PURE__ */ n("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ n(
|
|
4389
4391
|
"div",
|
|
4390
4392
|
{
|
|
4391
|
-
className: `w-24 h-24 rounded-full flex items-center justify-center ${
|
|
4392
|
-
children: /* @__PURE__ */ n("span", { className: `text-5xl ${
|
|
4393
|
+
className: `w-24 h-24 rounded-full flex items-center justify-center ${c.iconBg}`,
|
|
4394
|
+
children: /* @__PURE__ */ n("span", { className: `text-5xl ${c.iconColor}`, children: c.icon })
|
|
4393
4395
|
}
|
|
4394
4396
|
) }),
|
|
4395
|
-
/* @__PURE__ */ n("h2", { className: "text-3xl font-bold text-center text-gray-900 dark:text-white mb-4", children:
|
|
4397
|
+
/* @__PURE__ */ n("h2", { className: "text-3xl font-bold text-center text-gray-900 dark:text-white mb-4", children: c.title }),
|
|
4396
4398
|
/* @__PURE__ */ n("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ n(
|
|
4397
4399
|
he,
|
|
4398
4400
|
{
|
|
4399
|
-
variant:
|
|
4401
|
+
variant: c.type === "success" ? "success" : c.type === "error" ? "danger" : c.type === "pending" ? "warning" : "info",
|
|
4400
4402
|
children: t != null ? pe[t] : ge[e]
|
|
4401
4403
|
}
|
|
4402
4404
|
) }),
|
|
4403
|
-
/* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-6 max-w-md mx-auto", children: s ||
|
|
4404
|
-
|
|
4405
|
+
/* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-6 max-w-md mx-auto", children: s || c.message }),
|
|
4406
|
+
c.type === "success" && /* @__PURE__ */ o("div", { className: "bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg p-4 mb-6", children: [
|
|
4405
4407
|
/* @__PURE__ */ n("h3", { className: "font-semibold text-green-900 dark:text-green-100 mb-2", children: "What's Next?" }),
|
|
4406
4408
|
/* @__PURE__ */ o("ul", { className: "text-sm text-green-800 dark:text-green-200 space-y-1", children: [
|
|
4407
4409
|
/* @__PURE__ */ n("li", { children: "✓ Your identity has been verified" }),
|
|
@@ -4409,7 +4411,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4409
4411
|
/* @__PURE__ */ n("li", { children: "✓ All features are now accessible" })
|
|
4410
4412
|
] })
|
|
4411
4413
|
] }),
|
|
4412
|
-
|
|
4414
|
+
c.type === "error" && /* @__PURE__ */ o("div", { className: "bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4 mb-6", children: [
|
|
4413
4415
|
/* @__PURE__ */ n("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-2", children: "What Can You Do?" }),
|
|
4414
4416
|
/* @__PURE__ */ o("ul", { className: "text-sm text-red-800 dark:text-red-200 space-y-2", children: [
|
|
4415
4417
|
/* @__PURE__ */ n("li", { children: "• Review the requirements and ensure all information is correct" }),
|
|
@@ -4417,7 +4419,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4417
4419
|
/* @__PURE__ */ n("li", { children: "• You may be able to resubmit your application" })
|
|
4418
4420
|
] })
|
|
4419
4421
|
] }),
|
|
4420
|
-
|
|
4422
|
+
c.type === "pending" && /* @__PURE__ */ o("div", { className: "bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-6", children: [
|
|
4421
4423
|
/* @__PURE__ */ n("h3", { className: "font-semibold text-blue-900 dark:text-blue-100 mb-2", children: "What Happens Next?" }),
|
|
4422
4424
|
/* @__PURE__ */ o("ul", { className: "text-sm text-blue-800 dark:text-blue-200 space-y-2", children: [
|
|
4423
4425
|
/* @__PURE__ */ n("li", { children: "• Our team is reviewing your information" }),
|
|
@@ -4438,12 +4440,12 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4438
4440
|
] }) })
|
|
4439
4441
|
] }),
|
|
4440
4442
|
/* @__PURE__ */ o(ne, { className: "flex justify-center gap-4", children: [
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
+
c.type === "success" && a && /* @__PURE__ */ n(j, { onClick: a, size: "lg", children: "Continue" }),
|
|
4444
|
+
c.type === "error" && /* @__PURE__ */ o(nt, { children: [
|
|
4443
4445
|
i && /* @__PURE__ */ n(j, { variant: "outline", onClick: i, children: "Contact Support" }),
|
|
4444
4446
|
a && /* @__PURE__ */ n(j, { onClick: a, children: "Try Again" })
|
|
4445
4447
|
] }),
|
|
4446
|
-
|
|
4448
|
+
c.type === "pending" && /* @__PURE__ */ n("div", { className: "text-center", children: /* @__PURE__ */ n("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Please check back later or wait for our email notification" }) })
|
|
4447
4449
|
] })
|
|
4448
4450
|
] });
|
|
4449
4451
|
}, Er = ({ config: t, className: e = "" }) => !(t != null && t.visible) || !(t != null && t.url) ? null : /* @__PURE__ */ n("div", { className: `metakyc-logo ${e}`, children: /* @__PURE__ */ n(
|
|
@@ -4481,13 +4483,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4481
4483
|
onCancel: s
|
|
4482
4484
|
}) => {
|
|
4483
4485
|
var B, Q, _;
|
|
4484
|
-
const { config: a, baseInformationService: i } = se(), { createApplicant:
|
|
4485
|
-
if (!
|
|
4486
|
+
const { config: a, baseInformationService: i } = se(), { createApplicant: l, isLoading: c } = rr(), [d, u] = N([]), [y, x] = N(!0), [g, b] = N(!1), [m, f] = N(null), k = H(!1), h = H(!1), A = t || ((B = a.applicantForm) == null ? void 0 : B.workflowKey);
|
|
4487
|
+
if (!A)
|
|
4486
4488
|
throw new Error(
|
|
4487
4489
|
"workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
|
|
4488
4490
|
);
|
|
4489
4491
|
const v = e || ((Q = a.applicantForm) == null ? void 0 : Q.externalRefId) || "", S = ((_ = a.applicantForm) == null ? void 0 : _.visibleFields) || gt, [I, P] = N({
|
|
4490
|
-
workflowKey:
|
|
4492
|
+
workflowKey: A,
|
|
4491
4493
|
firstName: "",
|
|
4492
4494
|
lastName: "",
|
|
4493
4495
|
title: "",
|
|
@@ -4535,7 +4537,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4535
4537
|
}, []);
|
|
4536
4538
|
const C = (p, w) => {
|
|
4537
4539
|
P((O) => ({ ...O, [p]: w }));
|
|
4538
|
-
},
|
|
4540
|
+
}, E = async (p) => {
|
|
4539
4541
|
p.preventDefault(), b(!0), f(null);
|
|
4540
4542
|
try {
|
|
4541
4543
|
if (!I.externalRefId || I.externalRefId.trim() === "") {
|
|
@@ -4552,7 +4554,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4552
4554
|
const R = I[z];
|
|
4553
4555
|
R != null && R !== "" && !(Array.isArray(R) && R.length === 0) && (w[z] = R);
|
|
4554
4556
|
}), console.log("Creating applicant with data:", w);
|
|
4555
|
-
const O = await
|
|
4557
|
+
const O = await l(
|
|
4556
4558
|
w
|
|
4557
4559
|
);
|
|
4558
4560
|
console.log("Applicant created:", O), r(O.applicantId);
|
|
@@ -4660,9 +4662,9 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4660
4662
|
}
|
|
4661
4663
|
};
|
|
4662
4664
|
return y ? /* @__PURE__ */ n("div", { className: "metakyc-sdk", children: /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { children: [
|
|
4663
|
-
/* @__PURE__ */ n(
|
|
4665
|
+
/* @__PURE__ */ n(ce, { className: "my-8" }),
|
|
4664
4666
|
/* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading form..." })
|
|
4665
|
-
] }) }) }) : /* @__PURE__ */ n("div", { className: "metakyc-sdk", children: /* @__PURE__ */ n("form", { onSubmit:
|
|
4667
|
+
] }) }) }) : /* @__PURE__ */ n("div", { className: "metakyc-sdk", children: /* @__PURE__ */ n("form", { onSubmit: E, children: /* @__PURE__ */ o(L, { children: [
|
|
4666
4668
|
/* @__PURE__ */ n(ee, { children: /* @__PURE__ */ n(
|
|
4667
4669
|
Ze,
|
|
4668
4670
|
{
|
|
@@ -4679,8 +4681,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4679
4681
|
/* @__PURE__ */ n("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: S.map((p) => M(p)) })
|
|
4680
4682
|
] }),
|
|
4681
4683
|
/* @__PURE__ */ o(ne, { className: "flex justify-between", children: [
|
|
4682
|
-
s && /* @__PURE__ */ n(j, { type: "button", variant: "outline", onClick: s, disabled: g ||
|
|
4683
|
-
/* @__PURE__ */ n(j, { type: "submit", isLoading: g ||
|
|
4684
|
+
s && /* @__PURE__ */ n(j, { type: "button", variant: "outline", onClick: s, disabled: g || c, children: "Cancel" }),
|
|
4685
|
+
/* @__PURE__ */ n(j, { type: "submit", isLoading: g || c, children: "Create Applicant" })
|
|
4684
4686
|
] })
|
|
4685
4687
|
] }) }) });
|
|
4686
4688
|
}, Wr = ({
|
|
@@ -4692,8 +4694,8 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4692
4694
|
}) => {
|
|
4693
4695
|
const {
|
|
4694
4696
|
progress: i,
|
|
4695
|
-
currentStep:
|
|
4696
|
-
steps:
|
|
4697
|
+
currentStep: l,
|
|
4698
|
+
steps: c,
|
|
4697
4699
|
workflowKey: d,
|
|
4698
4700
|
nextWorkflowKey: u,
|
|
4699
4701
|
hasWorkflowChanged: y,
|
|
@@ -4701,18 +4703,18 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4701
4703
|
error: g,
|
|
4702
4704
|
moveBack: b,
|
|
4703
4705
|
refreshProgress: m
|
|
4704
|
-
} = Gt(t), [f, k] =
|
|
4705
|
-
if (
|
|
4706
|
+
} = Gt(t), [f, k] = ie.useState(!1);
|
|
4707
|
+
if (ie.useEffect(() => {
|
|
4706
4708
|
g && r && r(g);
|
|
4707
|
-
}, [g, r]),
|
|
4709
|
+
}, [g, r]), ie.useEffect(() => {
|
|
4708
4710
|
i != null && i.workflowResult && e && e(i.workflowResult);
|
|
4709
|
-
}, [i == null ? void 0 : i.workflowResult, e]),
|
|
4711
|
+
}, [i == null ? void 0 : i.workflowResult, e]), ie.useEffect(() => {
|
|
4710
4712
|
s === "dark" ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
|
|
4711
|
-
}, [s]),
|
|
4713
|
+
}, [s]), ie.useEffect(() => {
|
|
4712
4714
|
y && k(!1);
|
|
4713
4715
|
}, [y]), x || !i)
|
|
4714
4716
|
return /* @__PURE__ */ n("div", { className: a, children: /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { children: [
|
|
4715
|
-
/* @__PURE__ */ n(
|
|
4717
|
+
/* @__PURE__ */ n(ce, { className: "my-8" }),
|
|
4716
4718
|
/* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading workflow..." })
|
|
4717
4719
|
] }) }) });
|
|
4718
4720
|
if (g)
|
|
@@ -4748,9 +4750,9 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4748
4750
|
}
|
|
4749
4751
|
)
|
|
4750
4752
|
] }) }) }) });
|
|
4751
|
-
if (i.status ===
|
|
4753
|
+
if (i.status === le.Finished || i.status === le.OnHold)
|
|
4752
4754
|
return /* @__PURE__ */ n("div", { className: `metakyc-sdk ${a || ""}`, children: /* @__PURE__ */ n(
|
|
4753
|
-
|
|
4755
|
+
je,
|
|
4754
4756
|
{
|
|
4755
4757
|
kycStatus: i.kycStatus,
|
|
4756
4758
|
reviewStatus: i.reviewStatus,
|
|
@@ -4762,13 +4764,13 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4762
4764
|
}
|
|
4763
4765
|
}
|
|
4764
4766
|
) });
|
|
4765
|
-
if (!
|
|
4767
|
+
if (!l)
|
|
4766
4768
|
return /* @__PURE__ */ n("div", { className: `metakyc-sdk ${a || ""}`, children: /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { children: [
|
|
4767
|
-
/* @__PURE__ */ n(
|
|
4768
|
-
/* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: i.status ===
|
|
4769
|
+
/* @__PURE__ */ n(ce, { className: "my-8" }),
|
|
4770
|
+
/* @__PURE__ */ n("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: i.status === le.IdentityPending ? "Loading identity verification..." : "Loading current step..." })
|
|
4769
4771
|
] }) }) });
|
|
4770
4772
|
const h = () => {
|
|
4771
|
-
const v =
|
|
4773
|
+
const v = c.filter((C) => C.visibility !== !1), S = v.findIndex((C) => C.order === l.order), I = S >= 0 ? S + 1 : 1, P = v.length;
|
|
4772
4774
|
return /* @__PURE__ */ o("div", { className: "mb-6", children: [
|
|
4773
4775
|
/* @__PURE__ */ o("div", { className: "flex items-start justify-between mb-4", children: [
|
|
4774
4776
|
/* @__PURE__ */ n(Ze, {}),
|
|
@@ -4779,9 +4781,9 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4779
4781
|
P
|
|
4780
4782
|
] })
|
|
4781
4783
|
] }),
|
|
4782
|
-
/* @__PURE__ */ n("div", { className: "flex items-center", children: v.map((C,
|
|
4783
|
-
const M =
|
|
4784
|
-
return /* @__PURE__ */ o(
|
|
4784
|
+
/* @__PURE__ */ n("div", { className: "flex items-center", children: v.map((C, E) => {
|
|
4785
|
+
const M = E < S, B = C.order === l.order;
|
|
4786
|
+
return /* @__PURE__ */ o(ie.Fragment, { children: [
|
|
4785
4787
|
/* @__PURE__ */ o("div", { className: "flex items-center", children: [
|
|
4786
4788
|
/* @__PURE__ */ n(
|
|
4787
4789
|
"div",
|
|
@@ -4790,7 +4792,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4790
4792
|
w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium
|
|
4791
4793
|
${M || B ? "bg-primary-500 text-white" : "bg-gray-200 text-gray-600 dark:bg-gray-700 dark:text-gray-400"}
|
|
4792
4794
|
`,
|
|
4793
|
-
children:
|
|
4795
|
+
children: E + 1
|
|
4794
4796
|
}
|
|
4795
4797
|
),
|
|
4796
4798
|
/* @__PURE__ */ n(
|
|
@@ -4801,7 +4803,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4801
4803
|
}
|
|
4802
4804
|
)
|
|
4803
4805
|
] }),
|
|
4804
|
-
|
|
4806
|
+
E < v.length - 1 && /* @__PURE__ */ n(
|
|
4805
4807
|
"div",
|
|
4806
4808
|
{
|
|
4807
4809
|
className: `flex-1 h-0.5 mx-4 ${M ? "bg-primary-500" : "bg-gray-200 dark:bg-gray-700"}`
|
|
@@ -4810,17 +4812,17 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4810
4812
|
] }, C.order);
|
|
4811
4813
|
}) })
|
|
4812
4814
|
] });
|
|
4813
|
-
},
|
|
4815
|
+
}, A = () => {
|
|
4814
4816
|
const v = {
|
|
4815
4817
|
applicantId: t,
|
|
4816
4818
|
onComplete: async () => {
|
|
4817
4819
|
await m();
|
|
4818
4820
|
},
|
|
4819
|
-
onBack:
|
|
4821
|
+
onBack: l.order > 0 ? b : void 0
|
|
4820
4822
|
};
|
|
4821
|
-
switch (
|
|
4823
|
+
switch (l.action) {
|
|
4822
4824
|
case U.Questionaries:
|
|
4823
|
-
return /* @__PURE__ */ n(
|
|
4825
|
+
return /* @__PURE__ */ n(xr, { ...v });
|
|
4824
4826
|
case U.UploadDocument:
|
|
4825
4827
|
return /* @__PURE__ */ n(wr, { ...v });
|
|
4826
4828
|
case U.Overview:
|
|
@@ -4836,7 +4838,7 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4836
4838
|
return /* @__PURE__ */ n(Cr, { ...v });
|
|
4837
4839
|
case U.ManualReview:
|
|
4838
4840
|
return /* @__PURE__ */ n(
|
|
4839
|
-
|
|
4841
|
+
je,
|
|
4840
4842
|
{
|
|
4841
4843
|
kycStatus: i.kycStatus,
|
|
4842
4844
|
reviewStatus: i.reviewStatus,
|
|
@@ -4846,28 +4848,28 @@ Failed to reload test data. Please refresh the page.`);
|
|
|
4846
4848
|
);
|
|
4847
4849
|
default:
|
|
4848
4850
|
return /* @__PURE__ */ n(L, { children: /* @__PURE__ */ o(T, { className: "py-12 text-center", children: [
|
|
4849
|
-
/* @__PURE__ */ n("div", { className: "mb-4", children: /* @__PURE__ */ n(
|
|
4851
|
+
/* @__PURE__ */ n("div", { className: "mb-4", children: /* @__PURE__ */ n(ce, {}) }),
|
|
4850
4852
|
/* @__PURE__ */ o("p", { className: "text-gray-600 dark:text-gray-400 mb-2", children: [
|
|
4851
4853
|
"Processing step: ",
|
|
4852
|
-
|
|
4854
|
+
l.title || l.name
|
|
4853
4855
|
] }),
|
|
4854
4856
|
/* @__PURE__ */ o("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
|
|
4855
4857
|
"Action type: ",
|
|
4856
|
-
U[
|
|
4858
|
+
U[l.action]
|
|
4857
4859
|
] })
|
|
4858
4860
|
] }) });
|
|
4859
4861
|
}
|
|
4860
4862
|
};
|
|
4861
4863
|
return /* @__PURE__ */ o("div", { className: `metakyc-sdk ${a || ""}`, children: [
|
|
4862
4864
|
h(),
|
|
4863
|
-
|
|
4865
|
+
A()
|
|
4864
4866
|
] });
|
|
4865
4867
|
};
|
|
4866
4868
|
export {
|
|
4867
4869
|
Tr as ALL_APPLICANT_FIELDS,
|
|
4868
4870
|
st as ApplicantProgressOnHoldReason,
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
+
le as ApplicantProgressStatus,
|
|
4872
|
+
xt as ApplicantService,
|
|
4871
4873
|
it as ApplicantStatus,
|
|
4872
4874
|
ut as AppropriatenessQuestionType,
|
|
4873
4875
|
Nt as AppropriatenessTestService,
|
|
@@ -4884,17 +4886,17 @@ export {
|
|
|
4884
4886
|
gt as DEFAULT_VISIBLE_FIELDS,
|
|
4885
4887
|
dt as DocumentReviewStatus,
|
|
4886
4888
|
bt as EndpointBuilder,
|
|
4887
|
-
|
|
4889
|
+
ve as ErrorHandler,
|
|
4888
4890
|
Bt as EventEmitter,
|
|
4889
4891
|
yt as FIELD_METADATA,
|
|
4890
4892
|
ct as FileType,
|
|
4891
4893
|
nr as FileUpload,
|
|
4892
4894
|
Se as GenderType,
|
|
4893
4895
|
Ze as Header,
|
|
4894
|
-
|
|
4896
|
+
vt as HttpClient,
|
|
4895
4897
|
fe as IdentityProviderManager,
|
|
4896
4898
|
At as IdentityService,
|
|
4897
|
-
|
|
4899
|
+
oe as IdentityVerificationProvider,
|
|
4898
4900
|
Ar as IdentityVerificationStep,
|
|
4899
4901
|
X as Input,
|
|
4900
4902
|
It as InvestorCategorizationService,
|
|
@@ -4903,7 +4905,7 @@ export {
|
|
|
4903
4905
|
pt as InvestorCategoryType,
|
|
4904
4906
|
ot as KycProcessStatus,
|
|
4905
4907
|
pe as KycStatus,
|
|
4906
|
-
|
|
4908
|
+
je as KycStatusDisplay,
|
|
4907
4909
|
Wr as KycWorkflow,
|
|
4908
4910
|
Er as Logo,
|
|
4909
4911
|
Ue as MetaKYCContext,
|
|
@@ -4914,7 +4916,7 @@ export {
|
|
|
4914
4916
|
kr as OverviewStep,
|
|
4915
4917
|
sr as PhoneInput,
|
|
4916
4918
|
wt as QuestionnaireService,
|
|
4917
|
-
|
|
4919
|
+
xr as QuestionnaireStep,
|
|
4918
4920
|
ge as ReviewStatus,
|
|
4919
4921
|
mt as RiskCriteriaType,
|
|
4920
4922
|
at as RiskLevel,
|
|
@@ -4922,7 +4924,7 @@ export {
|
|
|
4922
4924
|
Nr as RiskScoringStep,
|
|
4923
4925
|
Kt as SardinAIProvider,
|
|
4924
4926
|
ye as Select,
|
|
4925
|
-
|
|
4927
|
+
ce as Spinner,
|
|
4926
4928
|
zt as StepRouter,
|
|
4927
4929
|
jt as SumsubProvider,
|
|
4928
4930
|
Ut as ThemeManager,
|
|
@@ -4931,7 +4933,7 @@ export {
|
|
|
4931
4933
|
kt as UploadDocumentService,
|
|
4932
4934
|
wr as UploadDocumentStep,
|
|
4933
4935
|
lt as UserType,
|
|
4934
|
-
|
|
4936
|
+
Pe as ValueDataType,
|
|
4935
4937
|
$t as WorkflowOrchestrator,
|
|
4936
4938
|
Ne as WorkflowResultType,
|
|
4937
4939
|
Ot as WorkflowState,
|
|
@@ -4953,7 +4955,7 @@ export {
|
|
|
4953
4955
|
qr as generateUploadDocumentSchema,
|
|
4954
4956
|
jr as getAcceptString,
|
|
4955
4957
|
Vt as getApplicantId,
|
|
4956
|
-
|
|
4958
|
+
xe as getThemePreset,
|
|
4957
4959
|
_r as getWorkflowState,
|
|
4958
4960
|
Pt as healthcareTheme,
|
|
4959
4961
|
Mr as isScriptLoaded,
|