@vpdev2/metakyc 1.0.3 → 1.0.5
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/client/config.d.ts +2 -0
- package/dist/client/config.d.ts.map +1 -1
- package/dist/components/CreateApplicantForm.d.ts.map +1 -1
- package/dist/components/CreateCompanyApplicantForm.d.ts.map +1 -1
- package/dist/components/core/Checkbox.d.ts +15 -0
- package/dist/components/core/Checkbox.d.ts.map +1 -0
- package/dist/components/core/MultiSelect.d.ts.map +1 -1
- package/dist/components/core/index.d.ts +1 -0
- package/dist/components/core/index.d.ts.map +1 -1
- package/dist/components/identity/IdentityVerificationStep.d.ts.map +1 -1
- package/dist/components/steps/QuestionnaireStep.d.ts.map +1 -1
- package/dist/components/steps/RiskScoringStep.d.ts.map +1 -1
- package/dist/context/MetaKYCProvider.d.ts.map +1 -1
- package/dist/index.cjs +14 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +579 -547
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,19 +3,19 @@ var Kt = (e, t, n) => t in e ? Ut(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var he = (e, t, n) => Kt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import qt from "axios";
|
|
5
5
|
import * as It from "react";
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
6
|
+
import ke, { createContext as Vt, useState as k, useMemo as De, useEffect as ge, useContext as Yt, useRef as de, useCallback as ae, forwardRef as yt, createElement as wt } from "react";
|
|
7
|
+
import { jsxs as o, jsx as r, Fragment as ct } from "react/jsx-runtime";
|
|
8
8
|
import Qt, { createPortal as St } from "react-dom";
|
|
9
|
-
import { useForm as Gt, Controller as
|
|
10
|
-
import { z as
|
|
11
|
-
var ce = /* @__PURE__ */ ((e) => (e[e.IdentitySdk = 0] = "IdentitySdk", e[e.RiskScoring = 1] = "RiskScoring", e[e.Questionaries = 2] = "Questionaries", e[e.AdditionalData = 3] = "AdditionalData", e[e.AppropriatenessTest = 4] = "AppropriatenessTest", e[e.UploadDocument = 5] = "UploadDocument", e[e.ManualReview = 6] = "ManualReview", e[e.Overview = 7] = "Overview", e[e.InvestorCategorization = 8] = "InvestorCategorization", e))(ce || {}), gt = /* @__PURE__ */ ((e) => (e[e.NotStarted = 0] = "NotStarted", e[e.InProgress = 1] = "InProgress", e[e.Success = 2] = "Success", e[e.PartialSuccess = 3] = "PartialSuccess", e[e.Failed = 4] = "Failed", e[e.Skipped = 5] = "Skipped", e[e.AdminReview = 6] = "AdminReview", e[e.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", e))(gt || {}), ze = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(ze || {}), Jt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.RepresentativeKYC = 1] = "RepresentativeKYC", e[e.ManualRiskCriteria = 2] = "ManualRiskCriteria", e[e.UploadDocumentReview = 3] = "UploadDocumentReview", e[e.AdminReview = 4] = "AdminReview", e))(Jt || {}), Zt = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(Zt || {}),
|
|
12
|
-
const
|
|
9
|
+
import { useForm as Gt, Controller as tt } from "react-hook-form";
|
|
10
|
+
import { z as Ye } from "zod";
|
|
11
|
+
var ce = /* @__PURE__ */ ((e) => (e[e.IdentitySdk = 0] = "IdentitySdk", e[e.RiskScoring = 1] = "RiskScoring", e[e.Questionaries = 2] = "Questionaries", e[e.AdditionalData = 3] = "AdditionalData", e[e.AppropriatenessTest = 4] = "AppropriatenessTest", e[e.UploadDocument = 5] = "UploadDocument", e[e.ManualReview = 6] = "ManualReview", e[e.Overview = 7] = "Overview", e[e.InvestorCategorization = 8] = "InvestorCategorization", e))(ce || {}), gt = /* @__PURE__ */ ((e) => (e[e.NotStarted = 0] = "NotStarted", e[e.InProgress = 1] = "InProgress", e[e.Success = 2] = "Success", e[e.PartialSuccess = 3] = "PartialSuccess", e[e.Failed = 4] = "Failed", e[e.Skipped = 5] = "Skipped", e[e.AdminReview = 6] = "AdminReview", e[e.SkippedAndAdminReview = 7] = "SkippedAndAdminReview", e))(gt || {}), ze = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.InProgress = 1] = "InProgress", e[e.Finished = 2] = "Finished", e[e.OnHold = 3] = "OnHold", e[e.IdentityPending = 4] = "IdentityPending", e))(ze || {}), Jt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.RepresentativeKYC = 1] = "RepresentativeKYC", e[e.ManualRiskCriteria = 2] = "ManualRiskCriteria", e[e.UploadDocumentReview = 3] = "UploadDocumentReview", e[e.AdminReview = 4] = "AdminReview", e))(Jt || {}), Zt = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(Zt || {}), rt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Pending = 1] = "Pending", e[e.Approved = 2] = "Approved", e[e.Rejected = 3] = "Rejected", e[e.ResendRequested = 4] = "ResendRequested", e[e.Unknown = 5] = "Unknown", e[e.InProgress = 6] = "InProgress", e))(rt || {}), nt = /* @__PURE__ */ ((e) => (e[e.Approved = 0] = "Approved", e[e.Reject = 1] = "Reject", e[e.UnderReview = 2] = "UnderReview", e[e.Closed = 3] = "Closed", e[e.AdminReview = 4] = "AdminReview", e[e.New = 5] = "New", e[e.InProgress = 6] = "InProgress", e))(nt || {}), Xt = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(Xt || {}), er = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(er || {}), Oe = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(Oe || {}), tr = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(tr || {}), bt = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(bt || {}), rr = /* @__PURE__ */ ((e) => (e[e.Image = 0] = "Image", e[e.Video = 1] = "Video", e[e.PDF = 2] = "PDF", e[e.OfficePDF = 3] = "OfficePDF", e[e.Custom = 4] = "Custom", e))(rr || {}), nr = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(nr || {}), ar = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(ar || {}), qe = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Money = 2] = "Money", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))(qe || {}), ir = /* @__PURE__ */ ((e) => (e[e.Text = 0] = "Text", e[e.Radio = 1] = "Radio", e[e.Checkbox = 2] = "Checkbox", e[e.Dropdown = 3] = "Dropdown", e[e.Country = 4] = "Country", e))(ir || {}), or = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(or || {}), Ee = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(Ee || {}), sr = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(sr || {});
|
|
12
|
+
const Ze = {
|
|
13
13
|
Nationality: 10,
|
|
14
14
|
Address: 20,
|
|
15
15
|
CountryOfBirth: 30,
|
|
16
16
|
PhoneNumber: 40,
|
|
17
17
|
UboAddress: 50
|
|
18
|
-
},
|
|
18
|
+
}, at = {
|
|
19
19
|
firstName: { label: "First Name", type: "text" },
|
|
20
20
|
lastName: { label: "Last Name", type: "text" },
|
|
21
21
|
email: { label: "Email", type: "email" },
|
|
@@ -23,27 +23,27 @@ const Je = {
|
|
|
23
23
|
dateOfBirth: { label: "Date of Birth", type: "date" },
|
|
24
24
|
salutation: { label: "Salutation", type: "select" },
|
|
25
25
|
title: { label: "Title", type: "text" },
|
|
26
|
-
mobileCountryCode: { label: "Mobile Country Code", type: "select", countriesType:
|
|
26
|
+
mobileCountryCode: { label: "Mobile Country Code", type: "select", countriesType: Ze.PhoneNumber },
|
|
27
27
|
street: { label: "Street", type: "text" },
|
|
28
28
|
streetNumber: { label: "Street Number", type: "text" },
|
|
29
29
|
zip: { label: "ZIP / Postal Code", type: "text" },
|
|
30
30
|
city: { label: "City", type: "text" },
|
|
31
|
-
country: { label: "Country", type: "select", countriesType:
|
|
32
|
-
nationality: { label: "Nationality", type: "select", countriesType:
|
|
33
|
-
otherNationality: { label: "Other Nationalities", type: "multiselect", countriesType:
|
|
34
|
-
countryOfBirth: { label: "Country of Birth", type: "select", countriesType:
|
|
31
|
+
country: { label: "Country", type: "select", countriesType: Ze.Address },
|
|
32
|
+
nationality: { label: "Nationality", type: "select", countriesType: Ze.Nationality },
|
|
33
|
+
otherNationality: { label: "Other Nationalities", type: "multiselect", countriesType: Ze.Nationality },
|
|
34
|
+
countryOfBirth: { label: "Country of Birth", type: "select", countriesType: Ze.CountryOfBirth },
|
|
35
35
|
placeOfBirth: { label: "Place of Birth", type: "text" },
|
|
36
|
-
taxCountry: { label: "Tax Country", type: "select", countriesType:
|
|
36
|
+
taxCountry: { label: "Tax Country", type: "select", countriesType: Ze.Address },
|
|
37
37
|
taxNumber: { label: "Tax Number", type: "text" },
|
|
38
38
|
defaultLanguage: { label: "Default Language", type: "select" },
|
|
39
39
|
educationLevel: { label: "Education Level", type: "text" },
|
|
40
40
|
occupation: { label: "Occupation", type: "text" }
|
|
41
|
-
},
|
|
41
|
+
}, st = {
|
|
42
42
|
companyName: { label: "Company Name", type: "text" },
|
|
43
43
|
email: { label: "Email", type: "email" },
|
|
44
44
|
phone: { label: "Phone", type: "tel" },
|
|
45
45
|
registrationNumber: { label: "Registration Number", type: "text" },
|
|
46
|
-
countryResidence: { label: "Country of Residence", type: "select", countriesType:
|
|
46
|
+
countryResidence: { label: "Country of Residence", type: "select", countriesType: Ze.Address },
|
|
47
47
|
legalAddress: { label: "Legal Address", type: "text" },
|
|
48
48
|
incorporatedOn: { label: "Incorporation Date", type: "date" },
|
|
49
49
|
controlScheme: { label: "Control Scheme", type: "text" },
|
|
@@ -56,7 +56,7 @@ const Je = {
|
|
|
56
56
|
city: { label: "City", type: "text" },
|
|
57
57
|
state: { label: "State / Province", type: "text" },
|
|
58
58
|
postalCode: { label: "Postal Code", type: "text" },
|
|
59
|
-
addressCountry: { label: "Address Country", type: "select", countriesType:
|
|
59
|
+
addressCountry: { label: "Address Country", type: "select", countriesType: Ze.Address },
|
|
60
60
|
lei: { label: "LEI", type: "text" }
|
|
61
61
|
}, lr = [
|
|
62
62
|
"companyName",
|
|
@@ -137,19 +137,19 @@ class ur {
|
|
|
137
137
|
}[t] || t;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
class
|
|
140
|
+
class Ke extends Error {
|
|
141
141
|
constructor(n, a, i, s, c) {
|
|
142
142
|
super(n);
|
|
143
143
|
he(this, "response");
|
|
144
|
-
this.code = a, this.details = i, this.validationErrors = s, this.name = "MetaKYCError", this.response = c, Object.setPrototypeOf(this,
|
|
144
|
+
this.code = a, this.details = i, this.validationErrors = s, this.name = "MetaKYCError", this.response = c, Object.setPrototypeOf(this, Ke.prototype);
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
class
|
|
147
|
+
class ut {
|
|
148
148
|
/**
|
|
149
149
|
* Process an error from the API response
|
|
150
150
|
*/
|
|
151
151
|
static handleApiError(t) {
|
|
152
|
-
return new
|
|
152
|
+
return new Ke(
|
|
153
153
|
t.message || "An unknown error occurred",
|
|
154
154
|
t.code,
|
|
155
155
|
t.details || void 0,
|
|
@@ -162,36 +162,36 @@ class dt {
|
|
|
162
162
|
static handleAxiosError(t) {
|
|
163
163
|
if (t.response) {
|
|
164
164
|
const n = t.response.data;
|
|
165
|
-
return n && n.error ? new
|
|
165
|
+
return n && n.error ? new Ke(
|
|
166
166
|
n.error.message || "An unknown error occurred",
|
|
167
167
|
n.error.code,
|
|
168
168
|
n.error.details || void 0,
|
|
169
169
|
n.error.validationErrors || void 0,
|
|
170
170
|
t.response
|
|
171
|
-
) : n && n.result && n.result.message ? new
|
|
171
|
+
) : n && n.result && n.result.message ? new Ke(
|
|
172
172
|
n.result.message,
|
|
173
173
|
t.response.status,
|
|
174
174
|
`HTTP ${t.response.status}: ${t.response.statusText}`,
|
|
175
175
|
void 0,
|
|
176
176
|
t.response
|
|
177
|
-
) : new
|
|
177
|
+
) : new Ke(
|
|
178
178
|
(n == null ? void 0 : n.message) || t.message || "Request failed",
|
|
179
179
|
t.response.status,
|
|
180
180
|
`HTTP ${t.response.status}: ${t.response.statusText}`,
|
|
181
181
|
void 0,
|
|
182
182
|
t.response
|
|
183
183
|
);
|
|
184
|
-
} else return t.request ? new
|
|
184
|
+
} else return t.request ? new Ke(
|
|
185
185
|
"No response from server",
|
|
186
186
|
0,
|
|
187
187
|
"The request was made but no response was received. Please check your network connection."
|
|
188
|
-
) : new
|
|
188
|
+
) : new Ke(t.message || "An unexpected error occurred", 0, t.toString());
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
191
191
|
* Check if an error is a MetaKYCError
|
|
192
192
|
*/
|
|
193
193
|
static isMetaKYCError(t) {
|
|
194
|
-
return t instanceof
|
|
194
|
+
return t instanceof Ke;
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
class pr {
|
|
@@ -241,7 +241,7 @@ class pr {
|
|
|
241
241
|
});
|
|
242
242
|
return this.handleResponse(s);
|
|
243
243
|
} catch (i) {
|
|
244
|
-
throw
|
|
244
|
+
throw ut.handleAxiosError(i);
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
/**
|
|
@@ -252,7 +252,7 @@ class pr {
|
|
|
252
252
|
const i = this.buildEndpoint(t, n), s = await this.axiosInstance.post(i, a);
|
|
253
253
|
return this.handleResponse(s);
|
|
254
254
|
} catch (i) {
|
|
255
|
-
throw
|
|
255
|
+
throw ut.handleAxiosError(i);
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
/**
|
|
@@ -263,7 +263,7 @@ class pr {
|
|
|
263
263
|
const i = this.buildEndpoint(t, n), s = await this.axiosInstance.put(i, a);
|
|
264
264
|
return this.handleResponse(s);
|
|
265
265
|
} catch (i) {
|
|
266
|
-
throw
|
|
266
|
+
throw ut.handleAxiosError(i);
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
/**
|
|
@@ -276,7 +276,7 @@ class pr {
|
|
|
276
276
|
});
|
|
277
277
|
return this.handleResponse(s);
|
|
278
278
|
} catch (i) {
|
|
279
|
-
throw
|
|
279
|
+
throw ut.handleAxiosError(i);
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
@@ -285,7 +285,7 @@ class pr {
|
|
|
285
285
|
handleResponse(t) {
|
|
286
286
|
const n = t.data;
|
|
287
287
|
if (!n.success && n.error)
|
|
288
|
-
throw
|
|
288
|
+
throw ut.handleApiError(n.error);
|
|
289
289
|
return n;
|
|
290
290
|
}
|
|
291
291
|
/**
|
|
@@ -923,7 +923,7 @@ const Le = {
|
|
|
923
923
|
[Fe.Modern]: Nr,
|
|
924
924
|
[Fe.Minimal]: Ir
|
|
925
925
|
};
|
|
926
|
-
function
|
|
926
|
+
function pt(e) {
|
|
927
927
|
return Rr[e] || Le;
|
|
928
928
|
}
|
|
929
929
|
class Er {
|
|
@@ -941,8 +941,8 @@ class Er {
|
|
|
941
941
|
"GetThemeConfiguration"
|
|
942
942
|
);
|
|
943
943
|
if (!n.result.isEnabled)
|
|
944
|
-
return
|
|
945
|
-
let a = n.result.preset ?
|
|
944
|
+
return pt(Fe.Default);
|
|
945
|
+
let a = n.result.preset ? pt(n.result.preset) : pt(Fe.Default);
|
|
946
946
|
if (n.result.title && (a.title = n.result.title), n.result.logo && (a.logo = { ...a.logo, ...n.result.logo }), n.result.colors && (a.colors = { ...a.colors, ...n.result.colors }), n.result.typography && (a.typography = { ...a.typography, ...n.result.typography }), n.result.spacing && (a.spacing = { ...a.spacing, ...n.result.spacing }), n.result.customCSS && (a.customCSS = n.result.customCSS), n.result.darkMode && (a.darkMode = {
|
|
947
947
|
colors: {
|
|
948
948
|
...(t = a.darkMode) == null ? void 0 : t.colors,
|
|
@@ -992,7 +992,7 @@ class Er {
|
|
|
992
992
|
}
|
|
993
993
|
return a;
|
|
994
994
|
} catch (n) {
|
|
995
|
-
return console.warn("[ThemeService] Failed to fetch theme configuration:", n),
|
|
995
|
+
return console.warn("[ThemeService] Failed to fetch theme configuration:", n), pt(Fe.Default);
|
|
996
996
|
}
|
|
997
997
|
}
|
|
998
998
|
/**
|
|
@@ -1018,7 +1018,7 @@ class Er {
|
|
|
1018
1018
|
* Preview theme (doesn't save)
|
|
1019
1019
|
*/
|
|
1020
1020
|
getPreviewTheme(t, n) {
|
|
1021
|
-
const a =
|
|
1021
|
+
const a = pt(t);
|
|
1022
1022
|
return n ? {
|
|
1023
1023
|
...a,
|
|
1024
1024
|
...n,
|
|
@@ -1409,15 +1409,15 @@ function Mt(e, t) {
|
|
|
1409
1409
|
i.src = e, t && (i.id = t), i.async = !0, i.onload = () => n(), i.onerror = () => a(new Error(`Failed to load script: ${e}`)), document.head.appendChild(i);
|
|
1410
1410
|
});
|
|
1411
1411
|
}
|
|
1412
|
-
function
|
|
1412
|
+
function qn(e) {
|
|
1413
1413
|
return !!document.getElementById(e);
|
|
1414
1414
|
}
|
|
1415
|
-
function
|
|
1415
|
+
function Vn(e) {
|
|
1416
1416
|
const t = document.getElementById(e);
|
|
1417
1417
|
t && t.remove();
|
|
1418
1418
|
}
|
|
1419
1419
|
const Lr = "https://static.sumsub.com/idensic/static/sns-websdk-builder.js";
|
|
1420
|
-
function
|
|
1420
|
+
function Ue(e, t) {
|
|
1421
1421
|
try {
|
|
1422
1422
|
return getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
|
|
1423
1423
|
} catch {
|
|
@@ -1425,9 +1425,9 @@ function We(e, t) {
|
|
|
1425
1425
|
}
|
|
1426
1426
|
}
|
|
1427
1427
|
function Dr() {
|
|
1428
|
-
const e =
|
|
1428
|
+
const e = Ue("--metakyc-primary", "#2563eb"), t = Ue("--metakyc-primary-hover", "#1d4ed8"), n = Ue("--metakyc-background", "#ffffff"), a = Ue("--metakyc-surface", "#f9fafb"), i = Ue("--metakyc-text-primary", "#111827"), s = Ue("--metakyc-text-secondary", "#6b7280"), c = Ue("--metakyc-text-muted", "#9ca3af"), d = Ue("--metakyc-border", "#e5e7eb");
|
|
1429
1429
|
return `
|
|
1430
|
-
body, html { font-family: ${
|
|
1430
|
+
body, html { font-family: ${Ue(
|
|
1431
1431
|
"--metakyc-font-family",
|
|
1432
1432
|
"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"
|
|
1433
1433
|
)} !important; background-color: ${n} !important; }
|
|
@@ -1718,7 +1718,7 @@ class zr {
|
|
|
1718
1718
|
this.sardineContext && (this.sardineContext = null);
|
|
1719
1719
|
}
|
|
1720
1720
|
}
|
|
1721
|
-
class
|
|
1721
|
+
class Je {
|
|
1722
1722
|
/**
|
|
1723
1723
|
* Create a provider instance
|
|
1724
1724
|
*/
|
|
@@ -1955,8 +1955,8 @@ class Br {
|
|
|
1955
1955
|
return t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1956
1956
|
}
|
|
1957
1957
|
}
|
|
1958
|
-
const Ot = Vt(null),
|
|
1959
|
-
const [n, a] = k(null), i =
|
|
1958
|
+
const Ot = Vt(null), _r = "1.0.5", Yn = ({ config: e, children: t }) => {
|
|
1959
|
+
const [n, a] = k(null), i = ke.useRef(!1), s = ke.useRef(!1), c = De(() => {
|
|
1960
1960
|
const y = new pr(e), p = new mr(y), b = new yr(y), P = new hr(y), v = new fr(y), A = new gr(y), T = new br(y), w = new xr(y), N = new vr(y), z = new kr(y), Q = new Er(y), M = new Br();
|
|
1961
1961
|
return {
|
|
1962
1962
|
httpClient: y,
|
|
@@ -2008,7 +2008,29 @@ const Ot = Vt(null), Kn = ({ config: e, children: t }) => {
|
|
|
2008
2008
|
}
|
|
2009
2009
|
})(), () => {
|
|
2010
2010
|
c.themeManager.cleanup();
|
|
2011
|
-
}), []), /* @__PURE__ */
|
|
2011
|
+
}), []), /* @__PURE__ */ o(Ot.Provider, { value: d, children: [
|
|
2012
|
+
e.showVersion && /* @__PURE__ */ o(
|
|
2013
|
+
"div",
|
|
2014
|
+
{
|
|
2015
|
+
style: {
|
|
2016
|
+
fontSize: "0.625rem",
|
|
2017
|
+
color: "var(--metakyc-text-muted, #9ca3af)",
|
|
2018
|
+
opacity: 0.5,
|
|
2019
|
+
textAlign: "right",
|
|
2020
|
+
padding: "2px 8px",
|
|
2021
|
+
userSelect: "none",
|
|
2022
|
+
pointerEvents: "none",
|
|
2023
|
+
letterSpacing: "0.02em",
|
|
2024
|
+
lineHeight: 1
|
|
2025
|
+
},
|
|
2026
|
+
children: [
|
|
2027
|
+
"SDK v",
|
|
2028
|
+
_r
|
|
2029
|
+
]
|
|
2030
|
+
}
|
|
2031
|
+
),
|
|
2032
|
+
t
|
|
2033
|
+
] });
|
|
2012
2034
|
};
|
|
2013
2035
|
function Te() {
|
|
2014
2036
|
const e = Yt(Ot);
|
|
@@ -2016,7 +2038,7 @@ function Te() {
|
|
|
2016
2038
|
throw new Error("useMetaKYC must be used within a MetaKYCProvider");
|
|
2017
2039
|
return e;
|
|
2018
2040
|
}
|
|
2019
|
-
async function
|
|
2041
|
+
async function Hr(e) {
|
|
2020
2042
|
return new Promise((t, n) => {
|
|
2021
2043
|
const a = new FileReader();
|
|
2022
2044
|
a.readAsDataURL(e), a.onload = () => {
|
|
@@ -2025,10 +2047,10 @@ async function _r(e) {
|
|
|
2025
2047
|
}, a.onerror = (i) => n(i);
|
|
2026
2048
|
});
|
|
2027
2049
|
}
|
|
2028
|
-
function
|
|
2050
|
+
function Qn(e, t) {
|
|
2029
2051
|
return e.size <= t;
|
|
2030
2052
|
}
|
|
2031
|
-
function
|
|
2053
|
+
function Gn(e, t) {
|
|
2032
2054
|
return t.split(",").map((a) => a.trim()).some((a) => {
|
|
2033
2055
|
if (a.endsWith("/*")) {
|
|
2034
2056
|
const i = a.slice(0, -2);
|
|
@@ -2042,70 +2064,70 @@ function xt(e) {
|
|
|
2042
2064
|
const t = 1024, n = ["Bytes", "KB", "MB", "GB"], a = Math.floor(Math.log(e) / Math.log(t));
|
|
2043
2065
|
return Math.round(e / Math.pow(t, a) * 100) / 100 + " " + n[a];
|
|
2044
2066
|
}
|
|
2045
|
-
function
|
|
2067
|
+
function Jn(e) {
|
|
2046
2068
|
return e;
|
|
2047
2069
|
}
|
|
2048
2070
|
function Ae(...e) {
|
|
2049
2071
|
return e.filter(Boolean).join(" ");
|
|
2050
2072
|
}
|
|
2051
|
-
const
|
|
2073
|
+
const dt = {
|
|
2052
2074
|
APPLICANT_ID: "metakyc_applicant_id",
|
|
2053
2075
|
WORKFLOW_STATE: "metakyc_workflow_state"
|
|
2054
2076
|
};
|
|
2055
2077
|
function jr(e) {
|
|
2056
2078
|
try {
|
|
2057
|
-
localStorage.setItem(
|
|
2079
|
+
localStorage.setItem(dt.APPLICANT_ID, e.toString());
|
|
2058
2080
|
} catch (t) {
|
|
2059
2081
|
console.warn("Failed to save applicant ID to storage:", t);
|
|
2060
2082
|
}
|
|
2061
2083
|
}
|
|
2062
|
-
function
|
|
2084
|
+
function Wr() {
|
|
2063
2085
|
try {
|
|
2064
|
-
const e = localStorage.getItem(
|
|
2086
|
+
const e = localStorage.getItem(dt.APPLICANT_ID);
|
|
2065
2087
|
return e ? parseInt(e, 10) : null;
|
|
2066
2088
|
} catch (e) {
|
|
2067
2089
|
return console.warn("Failed to retrieve applicant ID from storage:", e), null;
|
|
2068
2090
|
}
|
|
2069
2091
|
}
|
|
2070
|
-
function
|
|
2092
|
+
function Ur() {
|
|
2071
2093
|
try {
|
|
2072
|
-
localStorage.removeItem(
|
|
2094
|
+
localStorage.removeItem(dt.APPLICANT_ID);
|
|
2073
2095
|
} catch (e) {
|
|
2074
2096
|
console.warn("Failed to clear applicant ID from storage:", e);
|
|
2075
2097
|
}
|
|
2076
2098
|
}
|
|
2077
|
-
function
|
|
2099
|
+
function Kr(e) {
|
|
2078
2100
|
try {
|
|
2079
|
-
localStorage.setItem(
|
|
2101
|
+
localStorage.setItem(dt.WORKFLOW_STATE, JSON.stringify(e));
|
|
2080
2102
|
} catch (t) {
|
|
2081
2103
|
console.warn("Failed to save workflow state to storage:", t);
|
|
2082
2104
|
}
|
|
2083
2105
|
}
|
|
2084
|
-
function
|
|
2106
|
+
function Zn() {
|
|
2085
2107
|
try {
|
|
2086
|
-
const e = localStorage.getItem(
|
|
2108
|
+
const e = localStorage.getItem(dt.WORKFLOW_STATE);
|
|
2087
2109
|
return e ? JSON.parse(e) : null;
|
|
2088
2110
|
} catch (e) {
|
|
2089
2111
|
return console.warn("Failed to retrieve workflow state from storage:", e), null;
|
|
2090
2112
|
}
|
|
2091
2113
|
}
|
|
2092
|
-
function
|
|
2114
|
+
function qr() {
|
|
2093
2115
|
try {
|
|
2094
|
-
localStorage.removeItem(
|
|
2116
|
+
localStorage.removeItem(dt.WORKFLOW_STATE);
|
|
2095
2117
|
} catch (e) {
|
|
2096
2118
|
console.warn("Failed to clear workflow state from storage:", e);
|
|
2097
2119
|
}
|
|
2098
2120
|
}
|
|
2099
|
-
function
|
|
2100
|
-
|
|
2121
|
+
function Xn() {
|
|
2122
|
+
Ur(), qr();
|
|
2101
2123
|
}
|
|
2102
|
-
function
|
|
2103
|
-
const { createOrchestrator: t } = Te(), [n, a] = k(null), [i, s] = k(!1), [c, d] = k(null), y = de(null), p = e ||
|
|
2124
|
+
function Vr(e) {
|
|
2125
|
+
const { createOrchestrator: t } = Te(), [n, a] = k(null), [i, s] = k(!1), [c, d] = k(null), y = de(null), p = e || Wr();
|
|
2104
2126
|
ge(() => {
|
|
2105
2127
|
y.current || (y.current = t());
|
|
2106
2128
|
}, [t]), ge(() => {
|
|
2107
2129
|
var M;
|
|
2108
|
-
n && p && (jr(p),
|
|
2130
|
+
n && p && (jr(p), Kr({
|
|
2109
2131
|
applicantId: p,
|
|
2110
2132
|
currentStepOrder: (M = n.currentStep) == null ? void 0 : M.order,
|
|
2111
2133
|
status: n.status,
|
|
@@ -2179,15 +2201,15 @@ function qr(e) {
|
|
|
2179
2201
|
s(!0), d(null);
|
|
2180
2202
|
try {
|
|
2181
2203
|
await y.current.submitCurrentStep(M);
|
|
2182
|
-
const
|
|
2183
|
-
a(
|
|
2184
|
-
} catch (
|
|
2185
|
-
throw d(
|
|
2204
|
+
const H = await y.current.refreshProgress();
|
|
2205
|
+
a(H);
|
|
2206
|
+
} catch (H) {
|
|
2207
|
+
throw d(H), H;
|
|
2186
2208
|
} finally {
|
|
2187
2209
|
s(!1);
|
|
2188
2210
|
}
|
|
2189
2211
|
}
|
|
2190
|
-
}, []), z = It.useMemo(() => n != null && n.stepInfoList ? [...n.stepInfoList].sort((M,
|
|
2212
|
+
}, []), z = It.useMemo(() => n != null && n.stepInfoList ? [...n.stepInfoList].sort((M, H) => M.order - H.order) : [], [n == null ? void 0 : n.stepInfoList]), Q = It.useMemo(() => n ? n.nextWorkflowKey && n.nextWorkflowKey !== n.workFlowKey : !1, [n]);
|
|
2191
2213
|
return {
|
|
2192
2214
|
progress: n,
|
|
2193
2215
|
applicantId: p,
|
|
@@ -2209,7 +2231,7 @@ function qr(e) {
|
|
|
2209
2231
|
orchestrator: y.current
|
|
2210
2232
|
};
|
|
2211
2233
|
}
|
|
2212
|
-
function
|
|
2234
|
+
function Yr(e) {
|
|
2213
2235
|
const { questionnaireService: t, applicantService: n } = Te(), [a, i] = k(null), [s, c] = k({}), [d, y] = k(!1), [p, b] = k(!1), [P, v] = k(null), A = de(!1), T = de(null), w = ae(async () => {
|
|
2214
2236
|
var z, Q;
|
|
2215
2237
|
if (e) {
|
|
@@ -2219,13 +2241,13 @@ function Vr(e) {
|
|
|
2219
2241
|
}
|
|
2220
2242
|
A.current = !0, y(!0), v(null);
|
|
2221
2243
|
try {
|
|
2222
|
-
const [M,
|
|
2244
|
+
const [M, H] = await Promise.all([
|
|
2223
2245
|
t.getQuestionnaire(e),
|
|
2224
2246
|
n.getApplicantData(e).catch(() => null)
|
|
2225
2247
|
]);
|
|
2226
|
-
if (i(M), (z =
|
|
2248
|
+
if (i(M), (z = H == null ? void 0 : H.questionnaireResults) != null && z.length && M) {
|
|
2227
2249
|
const K = /* @__PURE__ */ new Map();
|
|
2228
|
-
for (const g of
|
|
2250
|
+
for (const g of H.questionnaireResults)
|
|
2229
2251
|
g.question && ((Q = g.answers) != null && Q.length) && K.set(g.question.trim().toLowerCase(), g.answers);
|
|
2230
2252
|
const ee = {}, E = M.questionGroups.flatMap((g) => g.questions ?? []);
|
|
2231
2253
|
for (const g of E) {
|
|
@@ -2268,7 +2290,7 @@ function Vr(e) {
|
|
|
2268
2290
|
submit: N
|
|
2269
2291
|
};
|
|
2270
2292
|
}
|
|
2271
|
-
function
|
|
2293
|
+
function Qr(e) {
|
|
2272
2294
|
const { uploadDocumentService: t } = Te(), [n, a] = k(null), [i, s] = k(!1), [c, d] = k(!1), [y, p] = k(0), [b, P] = k(null), v = de(!1), A = de(null), T = ae(async () => {
|
|
2273
2295
|
if (e) {
|
|
2274
2296
|
if (v.current) {
|
|
@@ -2312,7 +2334,7 @@ function Yr(e) {
|
|
|
2312
2334
|
submit: w
|
|
2313
2335
|
};
|
|
2314
2336
|
}
|
|
2315
|
-
function
|
|
2337
|
+
function ea(e) {
|
|
2316
2338
|
const { appropriatenessTestService: t } = Te(), [n, a] = k(null), [i, s] = k(!1), [c, d] = k(!1), [y, p] = k(null), [b, P] = k(null), v = de(!1), A = de(null), T = ae(async () => {
|
|
2317
2339
|
if (e) {
|
|
2318
2340
|
if (v.current) {
|
|
@@ -2357,7 +2379,7 @@ function Jn(e) {
|
|
|
2357
2379
|
submit: w
|
|
2358
2380
|
};
|
|
2359
2381
|
}
|
|
2360
|
-
function
|
|
2382
|
+
function Gr(e) {
|
|
2361
2383
|
const { overviewService: t } = Te(), [n, a] = k(null), [i, s] = k(!1), [c, d] = k(!1), [y, p] = k(null), b = de(!1), P = de(null), v = ae(async () => {
|
|
2362
2384
|
if (e) {
|
|
2363
2385
|
if (b.current) {
|
|
@@ -2399,7 +2421,7 @@ function Qr(e) {
|
|
|
2399
2421
|
passOverview: A
|
|
2400
2422
|
};
|
|
2401
2423
|
}
|
|
2402
|
-
function
|
|
2424
|
+
function Jr(e) {
|
|
2403
2425
|
const { identityService: t } = Te(), [n, a] = k(
|
|
2404
2426
|
null
|
|
2405
2427
|
), [i, s] = k(!1), [c, d] = k(null), y = de(!1), p = ae(
|
|
@@ -2485,7 +2507,7 @@ function Gr(e) {
|
|
|
2485
2507
|
restartIdentity: P
|
|
2486
2508
|
};
|
|
2487
2509
|
}
|
|
2488
|
-
function
|
|
2510
|
+
function Zr(e) {
|
|
2489
2511
|
const { riskScoringService: t, applicantService: n } = Te(), [a, i] = k(null), [s, c] = k({}), [d, y] = k(!1), [p, b] = k(!1), [P, v] = k(null), [A, T] = k(null), w = de(!1), N = de(null), z = ae(async () => {
|
|
2490
2512
|
var M;
|
|
2491
2513
|
if (e) {
|
|
@@ -2495,11 +2517,11 @@ function Jr(e) {
|
|
|
2495
2517
|
}
|
|
2496
2518
|
w.current = !0, y(!0), v(null);
|
|
2497
2519
|
try {
|
|
2498
|
-
const [
|
|
2520
|
+
const [H, K] = await Promise.all([
|
|
2499
2521
|
t.getRiskCriterias(e),
|
|
2500
2522
|
n.getApplicantData(e).catch(() => null)
|
|
2501
2523
|
]);
|
|
2502
|
-
if (i(
|
|
2524
|
+
if (i(H), (M = K == null ? void 0 : K.riskScoringResults) != null && M.length) {
|
|
2503
2525
|
const ee = K.riskScoringResults[0], E = {};
|
|
2504
2526
|
for (const g of ee.riskCriteriaResults ?? [])
|
|
2505
2527
|
if (g.riskCriteriaId != null && g.answer != null && g.answer !== "") {
|
|
@@ -2511,8 +2533,8 @@ function Jr(e) {
|
|
|
2511
2533
|
c(E);
|
|
2512
2534
|
}
|
|
2513
2535
|
N.current = e;
|
|
2514
|
-
} catch (
|
|
2515
|
-
v(
|
|
2536
|
+
} catch (H) {
|
|
2537
|
+
v(H);
|
|
2516
2538
|
} finally {
|
|
2517
2539
|
y(!1), w.current = !1;
|
|
2518
2540
|
}
|
|
@@ -2525,10 +2547,10 @@ function Jr(e) {
|
|
|
2525
2547
|
async (M) => {
|
|
2526
2548
|
b(!0), v(null);
|
|
2527
2549
|
try {
|
|
2528
|
-
const
|
|
2529
|
-
return T(
|
|
2530
|
-
} catch (
|
|
2531
|
-
throw v(
|
|
2550
|
+
const H = await t.submitRiskScoring(M);
|
|
2551
|
+
return T(H), H;
|
|
2552
|
+
} catch (H) {
|
|
2553
|
+
throw v(H), H;
|
|
2532
2554
|
} finally {
|
|
2533
2555
|
b(!1);
|
|
2534
2556
|
}
|
|
@@ -2620,7 +2642,7 @@ function zt() {
|
|
|
2620
2642
|
stopProgress: v
|
|
2621
2643
|
};
|
|
2622
2644
|
}
|
|
2623
|
-
const
|
|
2645
|
+
const Xr = {
|
|
2624
2646
|
primary: {
|
|
2625
2647
|
backgroundColor: "var(--metakyc-primary, #2563eb)",
|
|
2626
2648
|
color: "#ffffff",
|
|
@@ -2681,7 +2703,7 @@ const Zr = {
|
|
|
2681
2703
|
opacity: i || a ? 0.5 : 1,
|
|
2682
2704
|
lineHeight: "1.25rem",
|
|
2683
2705
|
...b[n],
|
|
2684
|
-
...
|
|
2706
|
+
...Xr[t],
|
|
2685
2707
|
...c
|
|
2686
2708
|
},
|
|
2687
2709
|
disabled: i || a,
|
|
@@ -2818,7 +2840,70 @@ const re = ({ children: e, className: t, style: n, ...a }) => /* @__PURE__ */ r(
|
|
|
2818
2840
|
...a,
|
|
2819
2841
|
children: e
|
|
2820
2842
|
}
|
|
2821
|
-
),
|
|
2843
|
+
), en = {
|
|
2844
|
+
display: "inline-flex",
|
|
2845
|
+
alignItems: "center",
|
|
2846
|
+
justifyContent: "center",
|
|
2847
|
+
width: 16,
|
|
2848
|
+
height: 16,
|
|
2849
|
+
minWidth: 16,
|
|
2850
|
+
minHeight: 16,
|
|
2851
|
+
maxWidth: 16,
|
|
2852
|
+
maxHeight: 16,
|
|
2853
|
+
borderRadius: 4,
|
|
2854
|
+
borderWidth: "1.5px",
|
|
2855
|
+
borderStyle: "solid",
|
|
2856
|
+
cursor: "pointer",
|
|
2857
|
+
flexShrink: 0,
|
|
2858
|
+
position: "relative",
|
|
2859
|
+
transition: "background-color 0.15s, border-color 0.15s",
|
|
2860
|
+
boxSizing: "border-box",
|
|
2861
|
+
padding: 0,
|
|
2862
|
+
margin: 0,
|
|
2863
|
+
verticalAlign: "middle"
|
|
2864
|
+
}, Be = ({ checked: e, onChange: t, disabled: n, style: a }) => {
|
|
2865
|
+
const i = "var(--metakyc-input-border, var(--metakyc-border, #d1d5db))", s = "var(--metakyc-input-bg, var(--metakyc-background, #ffffff))", c = "var(--metakyc-primary, #2563eb)";
|
|
2866
|
+
return /* @__PURE__ */ r(
|
|
2867
|
+
"span",
|
|
2868
|
+
{
|
|
2869
|
+
role: "checkbox",
|
|
2870
|
+
"aria-checked": e,
|
|
2871
|
+
tabIndex: 0,
|
|
2872
|
+
onClick: () => !n && t(!e),
|
|
2873
|
+
onKeyDown: (d) => {
|
|
2874
|
+
(d.key === " " || d.key === "Enter") && (d.preventDefault(), n || t(!e));
|
|
2875
|
+
},
|
|
2876
|
+
style: {
|
|
2877
|
+
...en,
|
|
2878
|
+
backgroundColor: e ? c : s,
|
|
2879
|
+
borderColor: e ? c : i,
|
|
2880
|
+
opacity: n ? 0.5 : 1,
|
|
2881
|
+
cursor: n ? "not-allowed" : "pointer",
|
|
2882
|
+
...a
|
|
2883
|
+
},
|
|
2884
|
+
children: e && /* @__PURE__ */ r(
|
|
2885
|
+
"svg",
|
|
2886
|
+
{
|
|
2887
|
+
width: "10",
|
|
2888
|
+
height: "8",
|
|
2889
|
+
viewBox: "0 0 10 8",
|
|
2890
|
+
fill: "none",
|
|
2891
|
+
style: { display: "block", flexShrink: 0 },
|
|
2892
|
+
children: /* @__PURE__ */ r(
|
|
2893
|
+
"path",
|
|
2894
|
+
{
|
|
2895
|
+
d: "M1 4L3.5 6.5L9 1",
|
|
2896
|
+
stroke: "#ffffff",
|
|
2897
|
+
strokeWidth: "2",
|
|
2898
|
+
strokeLinecap: "round",
|
|
2899
|
+
strokeLinejoin: "round"
|
|
2900
|
+
}
|
|
2901
|
+
)
|
|
2902
|
+
}
|
|
2903
|
+
)
|
|
2904
|
+
}
|
|
2905
|
+
);
|
|
2906
|
+
}, tn = {
|
|
2822
2907
|
// Theme-aware variants
|
|
2823
2908
|
default: {
|
|
2824
2909
|
backgroundColor: "var(--metakyc-surface, #f3f4f6)",
|
|
@@ -2848,7 +2933,7 @@ const re = ({ children: e, className: t, style: n, ...a }) => /* @__PURE__ */ r(
|
|
|
2848
2933
|
"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",
|
|
2849
2934
|
n
|
|
2850
2935
|
),
|
|
2851
|
-
style: { ...
|
|
2936
|
+
style: { ...tn[t], ...a },
|
|
2852
2937
|
...i,
|
|
2853
2938
|
children: e
|
|
2854
2939
|
}
|
|
@@ -2955,7 +3040,7 @@ const re = ({ children: e, className: t, style: n, ...a }) => /* @__PURE__ */ r(
|
|
|
2955
3040
|
] })
|
|
2956
3041
|
);
|
|
2957
3042
|
Ct.displayName = "Select";
|
|
2958
|
-
const Et = 280,
|
|
3043
|
+
const Et = 280, rn = ({
|
|
2959
3044
|
label: e,
|
|
2960
3045
|
value: t,
|
|
2961
3046
|
onChange: n,
|
|
@@ -2973,12 +3058,12 @@ const Et = 280, en = ({
|
|
|
2973
3058
|
primaryColor: "#2563eb",
|
|
2974
3059
|
primaryLight: "#eff6ff",
|
|
2975
3060
|
hoverBg: "#f9fafb"
|
|
2976
|
-
}), z = de(null), Q = de(null), M = de(null),
|
|
3061
|
+
}), z = de(null), Q = de(null), M = de(null), H = ae(() => {
|
|
2977
3062
|
if (!Q.current) return null;
|
|
2978
3063
|
const F = Q.current.getBoundingClientRect(), B = window.innerHeight - F.bottom < Et && F.top > Et;
|
|
2979
3064
|
return { top: B ? F.top : F.bottom + 4, left: F.left, width: F.width, openUp: B };
|
|
2980
3065
|
}, []), K = ae(() => {
|
|
2981
|
-
const F = getComputedStyle(document.documentElement), U = (
|
|
3066
|
+
const F = getComputedStyle(document.documentElement), U = (j, fe) => F.getPropertyValue(j).trim() || fe, B = U("--metakyc-input-bg", U("--metakyc-background", "#ffffff"));
|
|
2982
3067
|
N({
|
|
2983
3068
|
bg: B,
|
|
2984
3069
|
borderColor: U("--metakyc-input-border", U("--metakyc-border", "#d1d5db")),
|
|
@@ -2991,29 +3076,29 @@ const Et = 280, en = ({
|
|
|
2991
3076
|
}, []), ee = ae(() => {
|
|
2992
3077
|
if (y) return;
|
|
2993
3078
|
K();
|
|
2994
|
-
const F =
|
|
3079
|
+
const F = H();
|
|
2995
3080
|
F && T(F), b(!0);
|
|
2996
|
-
}, [y,
|
|
3081
|
+
}, [y, H, K]), E = ae(() => {
|
|
2997
3082
|
b(!1), v("");
|
|
2998
3083
|
}, []);
|
|
2999
3084
|
ge(() => {
|
|
3000
3085
|
if (!p) return;
|
|
3001
3086
|
const F = (U) => {
|
|
3002
|
-
var
|
|
3087
|
+
var j, fe;
|
|
3003
3088
|
const B = U.target;
|
|
3004
|
-
!((
|
|
3089
|
+
!((j = z.current) != null && j.contains(B)) && !((fe = M.current) != null && fe.contains(B)) && E();
|
|
3005
3090
|
};
|
|
3006
3091
|
return document.addEventListener("mousedown", F), () => document.removeEventListener("mousedown", F);
|
|
3007
3092
|
}, [p, E]), ge(() => {
|
|
3008
3093
|
if (!p) return;
|
|
3009
3094
|
const F = () => {
|
|
3010
|
-
const U =
|
|
3095
|
+
const U = H();
|
|
3011
3096
|
U && T(U);
|
|
3012
3097
|
};
|
|
3013
3098
|
return window.addEventListener("scroll", F, !0), window.addEventListener("resize", F), () => {
|
|
3014
3099
|
window.removeEventListener("scroll", F, !0), window.removeEventListener("resize", F);
|
|
3015
3100
|
};
|
|
3016
|
-
}, [p,
|
|
3101
|
+
}, [p, H]);
|
|
3017
3102
|
const g = a.filter(
|
|
3018
3103
|
(F) => F.label.toLowerCase().includes(P.toLowerCase())
|
|
3019
3104
|
), $ = (F) => {
|
|
@@ -3023,7 +3108,7 @@ const Et = 280, en = ({
|
|
|
3023
3108
|
}, G = (F) => {
|
|
3024
3109
|
var U;
|
|
3025
3110
|
return ((U = a.find((B) => B.value === F)) == null ? void 0 : U.label) || F;
|
|
3026
|
-
}, { bg: _, borderColor: J, textPrimary: ie, textSecondary: Y, primaryColor:
|
|
3111
|
+
}, { bg: _, borderColor: J, textPrimary: ie, textSecondary: Y, primaryColor: we, primaryLight: pe, hoverBg: me } = w, ve = p && A && /* @__PURE__ */ o(
|
|
3027
3112
|
"div",
|
|
3028
3113
|
{
|
|
3029
3114
|
ref: M,
|
|
@@ -3088,7 +3173,7 @@ const Et = 280, en = ({
|
|
|
3088
3173
|
fontSize: "13px",
|
|
3089
3174
|
cursor: "pointer",
|
|
3090
3175
|
backgroundColor: U ? pe : "transparent",
|
|
3091
|
-
color: U ?
|
|
3176
|
+
color: U ? we : ie,
|
|
3092
3177
|
userSelect: "none"
|
|
3093
3178
|
},
|
|
3094
3179
|
onMouseEnter: (B) => {
|
|
@@ -3099,12 +3184,11 @@ const Et = 280, en = ({
|
|
|
3099
3184
|
},
|
|
3100
3185
|
children: [
|
|
3101
3186
|
/* @__PURE__ */ r(
|
|
3102
|
-
|
|
3187
|
+
Be,
|
|
3103
3188
|
{
|
|
3104
|
-
type: "checkbox",
|
|
3105
3189
|
checked: U,
|
|
3106
|
-
|
|
3107
|
-
|
|
3190
|
+
onChange: () => {
|
|
3191
|
+
}
|
|
3108
3192
|
}
|
|
3109
3193
|
),
|
|
3110
3194
|
/* @__PURE__ */ r("span", { children: F.label })
|
|
@@ -3221,9 +3305,9 @@ const Et = 280, en = ({
|
|
|
3221
3305
|
]
|
|
3222
3306
|
}
|
|
3223
3307
|
),
|
|
3224
|
-
typeof document < "u" &&
|
|
3308
|
+
typeof document < "u" && ve ? St(ve, document.body) : null
|
|
3225
3309
|
] });
|
|
3226
|
-
}, Ft = 260,
|
|
3310
|
+
}, Ft = 260, Ve = ({
|
|
3227
3311
|
label: e,
|
|
3228
3312
|
error: t,
|
|
3229
3313
|
helperText: n,
|
|
@@ -3245,7 +3329,7 @@ const Et = 280, en = ({
|
|
|
3245
3329
|
primary: "#2563eb",
|
|
3246
3330
|
primaryLight: "#eff6ff",
|
|
3247
3331
|
hoverBg: "#f9fafb"
|
|
3248
|
-
}),
|
|
3332
|
+
}), H = ae(() => {
|
|
3249
3333
|
const R = getComputedStyle(document.documentElement), te = (oe, Ne) => R.getPropertyValue(oe).trim() || Ne, ye = te("--metakyc-input-bg", te("--metakyc-background", "#ffffff"));
|
|
3250
3334
|
M({
|
|
3251
3335
|
bg: ye,
|
|
@@ -3267,10 +3351,10 @@ const Et = 280, en = ({
|
|
|
3267
3351
|
};
|
|
3268
3352
|
}, []), V = ae(() => {
|
|
3269
3353
|
if (P) return;
|
|
3270
|
-
|
|
3354
|
+
H();
|
|
3271
3355
|
const R = $();
|
|
3272
3356
|
R && z(R), A(!0);
|
|
3273
|
-
}, [P, $,
|
|
3357
|
+
}, [P, $, H]), G = ae(() => {
|
|
3274
3358
|
A(!1), w("");
|
|
3275
3359
|
}, []), _ = () => v ? G() : V();
|
|
3276
3360
|
ge(() => {
|
|
@@ -3300,7 +3384,7 @@ const Et = 280, en = ({
|
|
|
3300
3384
|
(R) => R.label.toLowerCase().includes(T.toLowerCase()) || R.value.toLowerCase().includes(T.toLowerCase())
|
|
3301
3385
|
), ie = (fe = a.find((R) => R.value === s)) == null ? void 0 : fe.label, Y = (R, te) => {
|
|
3302
3386
|
P || te || (c(R), G());
|
|
3303
|
-
}, { bg:
|
|
3387
|
+
}, { bg: we, border: pe, text: me, textSecondary: ve, primary: F, primaryLight: U, hoverBg: B } = Q, j = v && N && /* @__PURE__ */ o(
|
|
3304
3388
|
"div",
|
|
3305
3389
|
{
|
|
3306
3390
|
ref: E,
|
|
@@ -3315,7 +3399,7 @@ const Et = 280, en = ({
|
|
|
3315
3399
|
borderRadius: "8px",
|
|
3316
3400
|
boxShadow: "0 4px 16px rgba(0,0,0,0.18)",
|
|
3317
3401
|
border: `1px solid ${pe}`,
|
|
3318
|
-
backgroundColor:
|
|
3402
|
+
backgroundColor: we,
|
|
3319
3403
|
overflow: "hidden"
|
|
3320
3404
|
},
|
|
3321
3405
|
children: [
|
|
@@ -3336,17 +3420,17 @@ const Et = 280, en = ({
|
|
|
3336
3420
|
fontSize: "13px",
|
|
3337
3421
|
borderRadius: "6px",
|
|
3338
3422
|
border: `1px solid ${pe}`,
|
|
3339
|
-
backgroundColor:
|
|
3423
|
+
backgroundColor: we,
|
|
3340
3424
|
color: me,
|
|
3341
3425
|
outline: "none",
|
|
3342
3426
|
boxSizing: "border-box"
|
|
3343
3427
|
},
|
|
3344
3428
|
onFocus: (R) => {
|
|
3345
3429
|
const te = getComputedStyle(document.documentElement), ye = te.getPropertyValue("--metakyc-input-border-focus").trim() || te.getPropertyValue("--metakyc-primary").trim() || "#2563eb";
|
|
3346
|
-
R.currentTarget.style.backgroundColor =
|
|
3430
|
+
R.currentTarget.style.backgroundColor = we, R.currentTarget.style.color = me, R.currentTarget.style.borderColor = ye, R.currentTarget.style.outline = "none", R.currentTarget.style.boxShadow = `0 0 0 2px ${ye}33`;
|
|
3347
3431
|
},
|
|
3348
3432
|
onBlur: (R) => {
|
|
3349
|
-
R.currentTarget.style.backgroundColor =
|
|
3433
|
+
R.currentTarget.style.backgroundColor = we, R.currentTarget.style.color = me, R.currentTarget.style.borderColor = pe, R.currentTarget.style.outline = "none", R.currentTarget.style.boxShadow = "none";
|
|
3350
3434
|
}
|
|
3351
3435
|
}
|
|
3352
3436
|
) }),
|
|
@@ -3360,7 +3444,7 @@ const Et = 280, en = ({
|
|
|
3360
3444
|
maxHeight: "208px",
|
|
3361
3445
|
overflowY: "auto"
|
|
3362
3446
|
},
|
|
3363
|
-
children: J.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color:
|
|
3447
|
+
children: J.length === 0 ? /* @__PURE__ */ r("li", { style: { padding: "8px 12px", fontSize: "13px", color: ve }, children: "No results" }) : J.map((R) => {
|
|
3364
3448
|
const te = R.value === s;
|
|
3365
3449
|
return /* @__PURE__ */ r(
|
|
3366
3450
|
"li",
|
|
@@ -3447,19 +3531,19 @@ const Et = 280, en = ({
|
|
|
3447
3531
|
]
|
|
3448
3532
|
}
|
|
3449
3533
|
),
|
|
3450
|
-
typeof document < "u" &&
|
|
3534
|
+
typeof document < "u" && j ? St(j, document.body) : null,
|
|
3451
3535
|
t && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-error, #ef4444)" }, children: t }),
|
|
3452
3536
|
!t && n && /* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n })
|
|
3453
3537
|
]
|
|
3454
3538
|
}
|
|
3455
3539
|
);
|
|
3456
3540
|
};
|
|
3457
|
-
|
|
3458
|
-
function
|
|
3541
|
+
Ve.displayName = "SearchableSelect";
|
|
3542
|
+
function nn(e) {
|
|
3459
3543
|
const t = e.type;
|
|
3460
3544
|
return t.startsWith("image/") ? "image" : t === "application/pdf" ? "pdf" : "file";
|
|
3461
3545
|
}
|
|
3462
|
-
const
|
|
3546
|
+
const an = ({
|
|
3463
3547
|
label: e,
|
|
3464
3548
|
subtitle: t,
|
|
3465
3549
|
error: n,
|
|
@@ -3489,7 +3573,7 @@ const rn = ({
|
|
|
3489
3573
|
}, [w]), M = () => {
|
|
3490
3574
|
var E;
|
|
3491
3575
|
(E = T.current) == null || E.click();
|
|
3492
|
-
},
|
|
3576
|
+
}, H = (E) => {
|
|
3493
3577
|
A(null);
|
|
3494
3578
|
const g = y.filter(($, V) => V !== E);
|
|
3495
3579
|
d == null || d(g);
|
|
@@ -3599,7 +3683,7 @@ const rn = ({
|
|
|
3599
3683
|
}
|
|
3600
3684
|
),
|
|
3601
3685
|
ee && /* @__PURE__ */ r("div", { style: { marginTop: "12px", display: "flex", flexDirection: "column", gap: "8px" }, children: y.map((E, g) => {
|
|
3602
|
-
const $ =
|
|
3686
|
+
const $ = nn(E), V = $ === "image", G = V ? URL.createObjectURL(E) : null;
|
|
3603
3687
|
return /* @__PURE__ */ o(
|
|
3604
3688
|
"div",
|
|
3605
3689
|
{
|
|
@@ -3665,7 +3749,7 @@ const rn = ({
|
|
|
3665
3749
|
{
|
|
3666
3750
|
type: "button",
|
|
3667
3751
|
onClick: (_) => {
|
|
3668
|
-
_.stopPropagation(),
|
|
3752
|
+
_.stopPropagation(), H(g);
|
|
3669
3753
|
},
|
|
3670
3754
|
style: {
|
|
3671
3755
|
display: "flex",
|
|
@@ -3701,7 +3785,7 @@ const rn = ({
|
|
|
3701
3785
|
}) }),
|
|
3702
3786
|
K && /* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", marginTop: "6px" }, children: K })
|
|
3703
3787
|
] });
|
|
3704
|
-
},
|
|
3788
|
+
}, on = yt(
|
|
3705
3789
|
({ countryCode: e = "+1", onCountryCodeChange: t, className: n, ...a }, i) => /* @__PURE__ */ o("div", { className: "w-full", children: [
|
|
3706
3790
|
a.label && /* @__PURE__ */ o(
|
|
3707
3791
|
"label",
|
|
@@ -3748,7 +3832,7 @@ const rn = ({
|
|
|
3748
3832
|
a.error && /* @__PURE__ */ r("p", { className: "mt-1 text-sm text-danger-500", children: a.error })
|
|
3749
3833
|
] })
|
|
3750
3834
|
);
|
|
3751
|
-
|
|
3835
|
+
on.displayName = "PhoneInput";
|
|
3752
3836
|
/**
|
|
3753
3837
|
* @license lucide-react v0.574.0 - ISC
|
|
3754
3838
|
*
|
|
@@ -3762,14 +3846,14 @@ const Bt = (...e) => e.filter((t, n, a) => !!t && t.trim() !== "" && a.indexOf(t
|
|
|
3762
3846
|
* This source code is licensed under the ISC license.
|
|
3763
3847
|
* See the LICENSE file in the root directory of this source tree.
|
|
3764
3848
|
*/
|
|
3765
|
-
const
|
|
3849
|
+
const sn = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
3766
3850
|
/**
|
|
3767
3851
|
* @license lucide-react v0.574.0 - ISC
|
|
3768
3852
|
*
|
|
3769
3853
|
* This source code is licensed under the ISC license.
|
|
3770
3854
|
* See the LICENSE file in the root directory of this source tree.
|
|
3771
3855
|
*/
|
|
3772
|
-
const
|
|
3856
|
+
const ln = (e) => e.replace(
|
|
3773
3857
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
3774
3858
|
(t, n, a) => a ? a.toUpperCase() : n.toLowerCase()
|
|
3775
3859
|
);
|
|
@@ -3780,7 +3864,7 @@ const on = (e) => e.replace(
|
|
|
3780
3864
|
* See the LICENSE file in the root directory of this source tree.
|
|
3781
3865
|
*/
|
|
3782
3866
|
const At = (e) => {
|
|
3783
|
-
const t =
|
|
3867
|
+
const t = ln(e);
|
|
3784
3868
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
3785
3869
|
};
|
|
3786
3870
|
/**
|
|
@@ -3789,7 +3873,7 @@ const At = (e) => {
|
|
|
3789
3873
|
* This source code is licensed under the ISC license.
|
|
3790
3874
|
* See the LICENSE file in the root directory of this source tree.
|
|
3791
3875
|
*/
|
|
3792
|
-
var
|
|
3876
|
+
var cn = {
|
|
3793
3877
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3794
3878
|
width: 24,
|
|
3795
3879
|
height: 24,
|
|
@@ -3806,7 +3890,7 @@ var sn = {
|
|
|
3806
3890
|
* This source code is licensed under the ISC license.
|
|
3807
3891
|
* See the LICENSE file in the root directory of this source tree.
|
|
3808
3892
|
*/
|
|
3809
|
-
const
|
|
3893
|
+
const dn = (e) => {
|
|
3810
3894
|
for (const t in e)
|
|
3811
3895
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
3812
3896
|
return !0;
|
|
@@ -3818,7 +3902,7 @@ const ln = (e) => {
|
|
|
3818
3902
|
* This source code is licensed under the ISC license.
|
|
3819
3903
|
* See the LICENSE file in the root directory of this source tree.
|
|
3820
3904
|
*/
|
|
3821
|
-
const
|
|
3905
|
+
const un = yt(
|
|
3822
3906
|
({
|
|
3823
3907
|
color: e = "currentColor",
|
|
3824
3908
|
size: t = 24,
|
|
@@ -3832,13 +3916,13 @@ const cn = yt(
|
|
|
3832
3916
|
"svg",
|
|
3833
3917
|
{
|
|
3834
3918
|
ref: y,
|
|
3835
|
-
...
|
|
3919
|
+
...cn,
|
|
3836
3920
|
width: t,
|
|
3837
3921
|
height: t,
|
|
3838
3922
|
stroke: e,
|
|
3839
3923
|
strokeWidth: a ? Number(n) * 24 / Number(t) : n,
|
|
3840
3924
|
className: Bt("lucide", i),
|
|
3841
|
-
...!s && !
|
|
3925
|
+
...!s && !dn(d) && { "aria-hidden": "true" },
|
|
3842
3926
|
...d
|
|
3843
3927
|
},
|
|
3844
3928
|
[
|
|
@@ -3855,11 +3939,11 @@ const cn = yt(
|
|
|
3855
3939
|
*/
|
|
3856
3940
|
const _t = (e, t) => {
|
|
3857
3941
|
const n = yt(
|
|
3858
|
-
({ className: a, ...i }, s) => wt(
|
|
3942
|
+
({ className: a, ...i }, s) => wt(un, {
|
|
3859
3943
|
ref: s,
|
|
3860
3944
|
iconNode: t,
|
|
3861
3945
|
className: Bt(
|
|
3862
|
-
`lucide-${
|
|
3946
|
+
`lucide-${sn(At(e))}`,
|
|
3863
3947
|
`lucide-${e}`,
|
|
3864
3948
|
a
|
|
3865
3949
|
),
|
|
@@ -3874,15 +3958,15 @@ const _t = (e, t) => {
|
|
|
3874
3958
|
* This source code is licensed under the ISC license.
|
|
3875
3959
|
* See the LICENSE file in the root directory of this source tree.
|
|
3876
3960
|
*/
|
|
3877
|
-
const
|
|
3961
|
+
const pn = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Ht = _t("chevron-left", pn);
|
|
3878
3962
|
/**
|
|
3879
3963
|
* @license lucide-react v0.574.0 - ISC
|
|
3880
3964
|
*
|
|
3881
3965
|
* This source code is licensed under the ISC license.
|
|
3882
3966
|
* See the LICENSE file in the root directory of this source tree.
|
|
3883
3967
|
*/
|
|
3884
|
-
const
|
|
3885
|
-
function
|
|
3968
|
+
const mn = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], jt = _t("chevron-right", mn);
|
|
3969
|
+
function yn(e, t) {
|
|
3886
3970
|
const n = !t || t.length === 0 || t.every((a) => !a || !a.trim());
|
|
3887
3971
|
if (e.isRequired && n)
|
|
3888
3972
|
return e.errorMessage || "This field is required";
|
|
@@ -3911,7 +3995,7 @@ function pn(e, t) {
|
|
|
3911
3995
|
}
|
|
3912
3996
|
return null;
|
|
3913
3997
|
}
|
|
3914
|
-
function
|
|
3998
|
+
function hn(e) {
|
|
3915
3999
|
const t = e.flatMap(
|
|
3916
4000
|
(a, i) => (a.questions ?? []).map((s, c) => ({ question: s, groupIndex: i, qIdx: c }))
|
|
3917
4001
|
), n = /* @__PURE__ */ new Map();
|
|
@@ -3921,17 +4005,17 @@ function mn(e) {
|
|
|
3921
4005
|
}
|
|
3922
4006
|
return Array.from(n.entries()).sort(([a], [i]) => a - i).map(([, a]) => a);
|
|
3923
4007
|
}
|
|
3924
|
-
const
|
|
4008
|
+
const fn = ({
|
|
3925
4009
|
applicantId: e,
|
|
3926
4010
|
onComplete: t,
|
|
3927
4011
|
onBack: n
|
|
3928
4012
|
}) => {
|
|
3929
|
-
const { questionnaire: a, initialAnswers: i, isLoading: s, isSubmitting: c, error: d, submit: y } =
|
|
3930
|
-
|
|
4013
|
+
const { questionnaire: a, initialAnswers: i, isLoading: s, isSubmitting: c, error: d, submit: y } = Yr(e), [p, b] = k({}), [P, v] = k({}), [A, T] = k(0);
|
|
4014
|
+
ke.useEffect(() => {
|
|
3931
4015
|
i && Object.keys(i).length > 0 && Object.keys(p).length === 0 && b(i);
|
|
3932
4016
|
}, [i]);
|
|
3933
4017
|
const w = De(
|
|
3934
|
-
() => a ?
|
|
4018
|
+
() => a ? hn(a.questionGroups) : [],
|
|
3935
4019
|
[a]
|
|
3936
4020
|
), N = A === w.length - 1, z = w[A] ?? [], Q = ae((E, g) => {
|
|
3937
4021
|
b(($) => ({ ...$, [E]: g })), v(($) => {
|
|
@@ -3941,11 +4025,11 @@ const yn = ({
|
|
|
3941
4025
|
}, []), M = ae(() => {
|
|
3942
4026
|
const E = {};
|
|
3943
4027
|
for (const { question: g } of z) {
|
|
3944
|
-
const $ =
|
|
4028
|
+
const $ = yn(g, p[g.id] ?? []);
|
|
3945
4029
|
$ && (E[g.id] = $);
|
|
3946
4030
|
}
|
|
3947
4031
|
return v((g) => ({ ...g, ...E })), Object.keys(E).length === 0;
|
|
3948
|
-
}, [z, p]),
|
|
4032
|
+
}, [z, p]), H = () => {
|
|
3949
4033
|
M() && T((E) => E + 1);
|
|
3950
4034
|
}, K = () => {
|
|
3951
4035
|
A > 0 ? T((E) => E - 1) : n == null || n();
|
|
@@ -3996,7 +4080,7 @@ const yn = ({
|
|
|
3996
4080
|
] })
|
|
3997
4081
|
] }),
|
|
3998
4082
|
/* @__PURE__ */ r(ne, { className: "space-y-6", children: z.map(({ question: E }) => /* @__PURE__ */ r(
|
|
3999
|
-
|
|
4083
|
+
gn,
|
|
4000
4084
|
{
|
|
4001
4085
|
question: E,
|
|
4002
4086
|
value: p[E.id] ?? [],
|
|
@@ -4014,7 +4098,7 @@ const yn = ({
|
|
|
4014
4098
|
onClick: K,
|
|
4015
4099
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
4016
4100
|
children: [
|
|
4017
|
-
/* @__PURE__ */ r(
|
|
4101
|
+
/* @__PURE__ */ r(Ht, { size: 14 }),
|
|
4018
4102
|
A > 0 ? "Previous" : "Back"
|
|
4019
4103
|
]
|
|
4020
4104
|
}
|
|
@@ -4031,18 +4115,18 @@ const yn = ({
|
|
|
4031
4115
|
Z,
|
|
4032
4116
|
{
|
|
4033
4117
|
type: "button",
|
|
4034
|
-
onClick:
|
|
4118
|
+
onClick: H,
|
|
4035
4119
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
4036
4120
|
children: [
|
|
4037
4121
|
"Next",
|
|
4038
|
-
/* @__PURE__ */ r(
|
|
4122
|
+
/* @__PURE__ */ r(jt, { size: 14 })
|
|
4039
4123
|
]
|
|
4040
4124
|
}
|
|
4041
4125
|
)
|
|
4042
4126
|
] }),
|
|
4043
4127
|
d && /* @__PURE__ */ r("div", { className: "mx-6 mb-4 p-3 bg-red-50 border border-red-200 rounded", children: /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: d.message }) })
|
|
4044
4128
|
] }) : null;
|
|
4045
|
-
},
|
|
4129
|
+
}, gn = ({ question: e, value: t, error: n, onChange: a }) => {
|
|
4046
4130
|
var c;
|
|
4047
4131
|
const s = (((c = e.defaultAnswers) == null ? void 0 : c.length) ?? 0) > 0 ? e.showAsDropdown ? e.canMultipleAnswer ? "multi-select" : "single-select" : e.canMultipleAnswer ? "checkbox" : "radio" : "text";
|
|
4048
4132
|
return /* @__PURE__ */ o("div", { className: "space-y-2", children: [
|
|
@@ -4117,26 +4201,11 @@ const yn = ({
|
|
|
4117
4201
|
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
|
|
4118
4202
|
children: [
|
|
4119
4203
|
/* @__PURE__ */ r(
|
|
4120
|
-
|
|
4204
|
+
Be,
|
|
4121
4205
|
{
|
|
4122
|
-
type: "checkbox",
|
|
4123
4206
|
checked: t.includes(d),
|
|
4124
4207
|
onChange: (y) => {
|
|
4125
|
-
y
|
|
4126
|
-
},
|
|
4127
|
-
className: "metakyc-option-input",
|
|
4128
|
-
style: {
|
|
4129
|
-
width: "16px",
|
|
4130
|
-
height: "16px",
|
|
4131
|
-
minWidth: "16px",
|
|
4132
|
-
flexShrink: 0,
|
|
4133
|
-
flexGrow: 0,
|
|
4134
|
-
accentColor: "var(--metakyc-primary, #2563eb)",
|
|
4135
|
-
cursor: "pointer",
|
|
4136
|
-
margin: 0,
|
|
4137
|
-
padding: 0,
|
|
4138
|
-
display: "inline-block",
|
|
4139
|
-
verticalAlign: "middle"
|
|
4208
|
+
a(y ? [...t, d] : t.filter((p) => p !== d));
|
|
4140
4209
|
}
|
|
4141
4210
|
}
|
|
4142
4211
|
),
|
|
@@ -4150,7 +4219,7 @@ const yn = ({
|
|
|
4150
4219
|
n && s === "text" && null
|
|
4151
4220
|
] });
|
|
4152
4221
|
};
|
|
4153
|
-
function
|
|
4222
|
+
function bn(e) {
|
|
4154
4223
|
const t = /* @__PURE__ */ new Map();
|
|
4155
4224
|
for (const n of e) {
|
|
4156
4225
|
const a = n.pageNumber != null && n.pageNumber > 0 ? n.pageNumber : 1;
|
|
@@ -4158,25 +4227,25 @@ function fn(e) {
|
|
|
4158
4227
|
}
|
|
4159
4228
|
return Array.from(t.entries()).sort(([n], [a]) => n - a).map(([, n]) => n);
|
|
4160
4229
|
}
|
|
4161
|
-
const
|
|
4230
|
+
const xn = ({
|
|
4162
4231
|
applicantId: e,
|
|
4163
4232
|
onComplete: t,
|
|
4164
4233
|
onBack: n
|
|
4165
4234
|
}) => {
|
|
4166
|
-
const { uploadDocument: a, isLoading: i, isSubmitting: s, error: c, submit: d } =
|
|
4167
|
-
() => a ?
|
|
4235
|
+
const { uploadDocument: a, isLoading: i, isSubmitting: s, error: c, submit: d } = Qr(e), [y, p] = k({}), [b, P] = k(null), [v, A] = k(0), [T, w] = k({}), N = De(
|
|
4236
|
+
() => a ? bn(a.uploadDocumentFiles) : [],
|
|
4168
4237
|
[a]
|
|
4169
|
-
), z = N[v] ?? [], Q = v === N.length - 1, M = N.length,
|
|
4238
|
+
), z = N[v] ?? [], Q = v === N.length - 1, M = N.length, H = ae(() => {
|
|
4170
4239
|
const g = {};
|
|
4171
4240
|
for (const $ of z)
|
|
4172
4241
|
$.isRequired && (y[$.id] || []).length === 0 && (g[$.id] = `${$.displayName} is required`);
|
|
4173
4242
|
return w(g), Object.keys(g).length === 0;
|
|
4174
4243
|
}, [z, y]), K = () => {
|
|
4175
|
-
|
|
4244
|
+
H() && (A((g) => g + 1), w({}));
|
|
4176
4245
|
}, ee = () => {
|
|
4177
4246
|
v > 0 ? (A((g) => g - 1), w({})) : n == null || n();
|
|
4178
4247
|
}, E = async () => {
|
|
4179
|
-
if (!(!
|
|
4248
|
+
if (!(!H() || !a)) {
|
|
4180
4249
|
P(null);
|
|
4181
4250
|
try {
|
|
4182
4251
|
const g = await Promise.all(
|
|
@@ -4184,7 +4253,7 @@ const gn = ({
|
|
|
4184
4253
|
const G = y[V.id] || [], _ = await Promise.all(
|
|
4185
4254
|
G.map(async (J) => ({
|
|
4186
4255
|
fileName: J.name,
|
|
4187
|
-
fileData: await
|
|
4256
|
+
fileData: await Hr(J)
|
|
4188
4257
|
}))
|
|
4189
4258
|
);
|
|
4190
4259
|
return {
|
|
@@ -4306,7 +4375,7 @@ const gn = ({
|
|
|
4306
4375
|
}, children: a.description })
|
|
4307
4376
|
] }),
|
|
4308
4377
|
/* @__PURE__ */ r(ne, { children: /* @__PURE__ */ r("div", { style: { display: "flex", flexDirection: "column", gap: "24px" }, children: z.map((g) => /* @__PURE__ */ r(
|
|
4309
|
-
|
|
4378
|
+
an,
|
|
4310
4379
|
{
|
|
4311
4380
|
label: g.displayName,
|
|
4312
4381
|
subtitle: g.subtitle,
|
|
@@ -4375,8 +4444,8 @@ const gn = ({
|
|
|
4375
4444
|
)
|
|
4376
4445
|
] }) })
|
|
4377
4446
|
] }) : null;
|
|
4378
|
-
},
|
|
4379
|
-
const { overview: a, isLoading: i, isSubmitting: s, error: c, passOverview: d } =
|
|
4447
|
+
}, vn = ({ applicantId: e, onComplete: t, onBack: n }) => {
|
|
4448
|
+
const { overview: a, isLoading: i, isSubmitting: s, error: c, passOverview: d } = Gr(e), y = async () => {
|
|
4380
4449
|
await d(), t == null || t();
|
|
4381
4450
|
};
|
|
4382
4451
|
return i ? /* @__PURE__ */ r(re, { children: /* @__PURE__ */ r(ne, { children: /* @__PURE__ */ r(Me, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ r(re, { children: /* @__PURE__ */ r(ne, { children: /* @__PURE__ */ o("p", { className: "text-danger-500", children: [
|
|
@@ -4419,7 +4488,7 @@ const gn = ({
|
|
|
4419
4488
|
] })
|
|
4420
4489
|
] }) : null;
|
|
4421
4490
|
};
|
|
4422
|
-
function
|
|
4491
|
+
function kn(e) {
|
|
4423
4492
|
const t = (e ?? "en").toLowerCase().replace("_", "-");
|
|
4424
4493
|
try {
|
|
4425
4494
|
return Intl.NumberFormat.supportedLocalesOf([t]), t;
|
|
@@ -4427,11 +4496,11 @@ function xn(e) {
|
|
|
4427
4496
|
return "en";
|
|
4428
4497
|
}
|
|
4429
4498
|
}
|
|
4430
|
-
function
|
|
4431
|
-
return e.valueDataType ===
|
|
4499
|
+
function wn(e) {
|
|
4500
|
+
return e.valueDataType === qe.Money && Array.isArray(e.defaultValues) && e.defaultValues.length > 0;
|
|
4432
4501
|
}
|
|
4433
|
-
function
|
|
4434
|
-
const n = new Intl.NumberFormat(
|
|
4502
|
+
function Sn(e, t) {
|
|
4503
|
+
const n = new Intl.NumberFormat(kn(t), {
|
|
4435
4504
|
minimumFractionDigits: 0,
|
|
4436
4505
|
maximumFractionDigits: 2
|
|
4437
4506
|
});
|
|
@@ -4440,7 +4509,7 @@ function kn(e, t) {
|
|
|
4440
4509
|
return isNaN(i) ? a : n.format(i);
|
|
4441
4510
|
});
|
|
4442
4511
|
}
|
|
4443
|
-
function
|
|
4512
|
+
function Cn(e, t) {
|
|
4444
4513
|
const n = !t || t.length === 0 || t.every((a) => !a || !a.trim());
|
|
4445
4514
|
if (e.isRequired && n)
|
|
4446
4515
|
return e.errorMessage || `${e.displayName} is required`;
|
|
@@ -4452,7 +4521,7 @@ function wn(e, t) {
|
|
|
4452
4521
|
return e.errorMessage || "Invalid format";
|
|
4453
4522
|
} catch {
|
|
4454
4523
|
}
|
|
4455
|
-
const i = e.valueDataType ===
|
|
4524
|
+
const i = e.valueDataType === qe.Integer || e.valueDataType === qe.Money || e.valueDataType === qe.DigitOnly;
|
|
4456
4525
|
if (i && a.trim() !== "") {
|
|
4457
4526
|
const s = Number(a);
|
|
4458
4527
|
if (!isNaN(s)) {
|
|
@@ -4470,30 +4539,30 @@ function wn(e, t) {
|
|
|
4470
4539
|
}
|
|
4471
4540
|
return null;
|
|
4472
4541
|
}
|
|
4473
|
-
function
|
|
4542
|
+
function Nn(e) {
|
|
4474
4543
|
const t = /* @__PURE__ */ new Map();
|
|
4475
4544
|
return e.forEach((n, a) => {
|
|
4476
4545
|
const i = n.pageNumber != null && n.pageNumber > 0 ? n.pageNumber : 1;
|
|
4477
4546
|
t.has(i) || t.set(i, []), t.get(i).push({ criterion: n, idx: a });
|
|
4478
4547
|
}), Array.from(t.entries()).sort(([n], [a]) => n - a).map(([, n]) => n);
|
|
4479
4548
|
}
|
|
4480
|
-
function
|
|
4549
|
+
function In(e) {
|
|
4481
4550
|
return e.builtInType === 1 ? "country" : !e.defaultValues || e.defaultValues.length === 0 ? "text" : e.multipleValue ? "checkbox" : "radio";
|
|
4482
4551
|
}
|
|
4483
|
-
const
|
|
4552
|
+
const Rn = ({
|
|
4484
4553
|
applicantId: e,
|
|
4485
4554
|
onComplete: t,
|
|
4486
4555
|
onBack: n
|
|
4487
4556
|
}) => {
|
|
4488
|
-
const { config: a } = Te(), i = a.locale ?? "en", { criteria: s, initialAnswers: c, isLoading: d, isSubmitting: y, error: p, submit: b } =
|
|
4489
|
-
|
|
4557
|
+
const { config: a } = Te(), i = a.locale ?? "en", { criteria: s, initialAnswers: c, isLoading: d, isSubmitting: y, error: p, submit: b } = Zr(e), [P, v] = k({}), [A, T] = k({}), [w, N] = k(0), [z, Q] = k(!1);
|
|
4558
|
+
ke.useEffect(() => {
|
|
4490
4559
|
c && Object.keys(c).length > 0 && Object.keys(P).length === 0 && v(c);
|
|
4491
4560
|
}, [c]);
|
|
4492
4561
|
const M = De(
|
|
4493
|
-
() => s && s.length > 0 ?
|
|
4562
|
+
() => s && s.length > 0 ? Nn(s) : [],
|
|
4494
4563
|
[s]
|
|
4495
|
-
),
|
|
4496
|
-
|
|
4564
|
+
), H = w === M.length - 1, K = M[w] ?? [];
|
|
4565
|
+
ke.useEffect(() => {
|
|
4497
4566
|
!d && s && s.length === 0 && !z && !y && (Q(!0), b({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
|
|
4498
4567
|
}, [d, s, z, y, b, e, t]);
|
|
4499
4568
|
const ee = ae((G, _) => {
|
|
@@ -4504,7 +4573,7 @@ const Nn = ({
|
|
|
4504
4573
|
}, []), E = ae(() => {
|
|
4505
4574
|
const G = {};
|
|
4506
4575
|
for (const { criterion: _ } of K) {
|
|
4507
|
-
const J =
|
|
4576
|
+
const J = Cn(_, P[_.id] ?? []);
|
|
4508
4577
|
J && (G[_.id] = J);
|
|
4509
4578
|
}
|
|
4510
4579
|
return T((_) => ({ ..._, ...G })), Object.keys(G).length === 0;
|
|
@@ -4559,7 +4628,7 @@ const Nn = ({
|
|
|
4559
4628
|
] })
|
|
4560
4629
|
] }),
|
|
4561
4630
|
/* @__PURE__ */ r(ne, { className: "space-y-6", children: K.map(({ criterion: G }) => /* @__PURE__ */ r(
|
|
4562
|
-
|
|
4631
|
+
En,
|
|
4563
4632
|
{
|
|
4564
4633
|
criterion: G,
|
|
4565
4634
|
value: P[G.id] ?? [],
|
|
@@ -4578,12 +4647,12 @@ const Nn = ({
|
|
|
4578
4647
|
onClick: $,
|
|
4579
4648
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
4580
4649
|
children: [
|
|
4581
|
-
/* @__PURE__ */ r(
|
|
4650
|
+
/* @__PURE__ */ r(Ht, { size: 14 }),
|
|
4582
4651
|
w > 0 ? "Previous" : "Back"
|
|
4583
4652
|
]
|
|
4584
4653
|
}
|
|
4585
4654
|
),
|
|
4586
|
-
|
|
4655
|
+
H ? /* @__PURE__ */ r(Z, { type: "button", isLoading: y, onClick: V, children: "Continue" }) : /* @__PURE__ */ o(
|
|
4587
4656
|
Z,
|
|
4588
4657
|
{
|
|
4589
4658
|
type: "button",
|
|
@@ -4591,15 +4660,15 @@ const Nn = ({
|
|
|
4591
4660
|
style: { display: "flex", alignItems: "center", gap: "4px" },
|
|
4592
4661
|
children: [
|
|
4593
4662
|
"Next",
|
|
4594
|
-
/* @__PURE__ */ r(
|
|
4663
|
+
/* @__PURE__ */ r(jt, { size: 14 })
|
|
4595
4664
|
]
|
|
4596
4665
|
}
|
|
4597
4666
|
)
|
|
4598
4667
|
] }),
|
|
4599
4668
|
p && /* @__PURE__ */ r("div", { className: "mx-6 mb-4 p-3 bg-red-50 border border-red-200 rounded", children: /* @__PURE__ */ r("p", { className: "text-red-600 text-sm", children: p.message }) })
|
|
4600
4669
|
] }) : null;
|
|
4601
|
-
},
|
|
4602
|
-
const s =
|
|
4670
|
+
}, En = ({ criterion: e, value: t, error: n, locale: a, onChange: i }) => {
|
|
4671
|
+
const s = In(e), c = e.valueDataType === qe.Integer || e.valueDataType === qe.Money || e.valueDataType === qe.DigitOnly, d = wn(e), y = (p) => d ? Sn(p, a) : p;
|
|
4603
4672
|
return /* @__PURE__ */ o("div", { className: "space-y-2", children: [
|
|
4604
4673
|
/* @__PURE__ */ o("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
|
|
4605
4674
|
e.displayName,
|
|
@@ -4619,7 +4688,7 @@ const Nn = ({
|
|
|
4619
4688
|
min: e.min,
|
|
4620
4689
|
max: e.max,
|
|
4621
4690
|
onKeyDown: (p) => {
|
|
4622
|
-
e.valueDataType ===
|
|
4691
|
+
e.valueDataType === qe.DigitOnly && ["e", "E", "+", "-", "."].includes(p.key) && p.preventDefault();
|
|
4623
4692
|
}
|
|
4624
4693
|
}
|
|
4625
4694
|
),
|
|
@@ -4667,26 +4736,11 @@ const Nn = ({
|
|
|
4667
4736
|
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
|
|
4668
4737
|
children: [
|
|
4669
4738
|
/* @__PURE__ */ r(
|
|
4670
|
-
|
|
4739
|
+
Be,
|
|
4671
4740
|
{
|
|
4672
|
-
type: "checkbox",
|
|
4673
4741
|
checked: t.includes(p),
|
|
4674
4742
|
onChange: (b) => {
|
|
4675
|
-
b
|
|
4676
|
-
},
|
|
4677
|
-
className: "metakyc-option-input",
|
|
4678
|
-
style: {
|
|
4679
|
-
width: "16px",
|
|
4680
|
-
height: "16px",
|
|
4681
|
-
minWidth: "16px",
|
|
4682
|
-
flexShrink: 0,
|
|
4683
|
-
flexGrow: 0,
|
|
4684
|
-
accentColor: "var(--metakyc-primary, #2563eb)",
|
|
4685
|
-
cursor: "pointer",
|
|
4686
|
-
margin: 0,
|
|
4687
|
-
padding: 0,
|
|
4688
|
-
display: "inline-block",
|
|
4689
|
-
verticalAlign: "middle"
|
|
4743
|
+
i(b ? [...t, p] : t.filter((P) => P !== p));
|
|
4690
4744
|
}
|
|
4691
4745
|
}
|
|
4692
4746
|
),
|
|
@@ -4715,7 +4769,7 @@ const Nn = ({
|
|
|
4715
4769
|
}
|
|
4716
4770
|
)
|
|
4717
4771
|
] });
|
|
4718
|
-
},
|
|
4772
|
+
}, Fn = ({
|
|
4719
4773
|
applicantId: e,
|
|
4720
4774
|
onComplete: t,
|
|
4721
4775
|
onBack: n
|
|
@@ -4865,20 +4919,20 @@ function vt(e) {
|
|
|
4865
4919
|
const t = Math.floor(e / 60), n = e % 60;
|
|
4866
4920
|
return `${t.toString().padStart(2, "0")}:${n.toString().padStart(2, "0")}`;
|
|
4867
4921
|
}
|
|
4868
|
-
const
|
|
4922
|
+
const An = ({
|
|
4869
4923
|
applicantId: e,
|
|
4870
4924
|
onComplete: t,
|
|
4871
4925
|
onBack: n
|
|
4872
4926
|
}) => {
|
|
4873
|
-
const { appropriatenessTestService: a } = Te(), [i, s] = k(null), [c, d] = k(!0), [y, p] = k(!1), [b, P] = k(null), [v, A] = k({}), [T, w] = k(0), [N, z] = k(!1), [Q, M] = k(!1), [
|
|
4927
|
+
const { appropriatenessTestService: a } = Te(), [i, s] = k(null), [c, d] = k(!0), [y, p] = k(!1), [b, P] = k(null), [v, A] = k({}), [T, w] = k(0), [N, z] = k(!1), [Q, M] = k(!1), [H, K] = k(0), [ee, E] = k(0), [g, $] = k(null);
|
|
4874
4928
|
ge(() => {
|
|
4875
4929
|
(async () => {
|
|
4876
4930
|
try {
|
|
4877
4931
|
d(!0), P(null);
|
|
4878
4932
|
const B = await a.getAppropriatenessTest(e);
|
|
4879
4933
|
if (s(B), B.waitTimeSpanForNextTry && B.waitTimeSpanForNextTry !== "00:00:00") {
|
|
4880
|
-
const
|
|
4881
|
-
|
|
4934
|
+
const j = Tt(B.waitTimeSpanForNextTry);
|
|
4935
|
+
j > 0 && K(j);
|
|
4882
4936
|
}
|
|
4883
4937
|
} catch (B) {
|
|
4884
4938
|
P(B.message || "Failed to load appropriateness test");
|
|
@@ -4889,48 +4943,48 @@ const En = ({
|
|
|
4889
4943
|
}, [e, a]), ge(() => {
|
|
4890
4944
|
if (!N || T <= 0) return;
|
|
4891
4945
|
const B = setInterval(() => {
|
|
4892
|
-
w((
|
|
4946
|
+
w((j) => j <= 1 ? (M(!0), 0) : j - 1);
|
|
4893
4947
|
}, 1e3);
|
|
4894
4948
|
return () => clearInterval(B);
|
|
4895
4949
|
}, [N, T]), ge(() => {
|
|
4896
|
-
if (
|
|
4950
|
+
if (H <= 0) return;
|
|
4897
4951
|
const B = setInterval(() => {
|
|
4898
|
-
K((
|
|
4952
|
+
K((j) => j <= 1 ? 0 : j - 1);
|
|
4899
4953
|
}, 1e3);
|
|
4900
4954
|
return () => clearInterval(B);
|
|
4901
|
-
}, [
|
|
4955
|
+
}, [H]), ge(() => {
|
|
4902
4956
|
Q && !y && J();
|
|
4903
4957
|
}, [Q]);
|
|
4904
4958
|
const V = () => {
|
|
4905
4959
|
i && (z(!0), w(i.testDurationSec), E(0), A({}), P(null));
|
|
4906
|
-
}, G = (B,
|
|
4907
|
-
A((fe) => ({ ...fe, [B]:
|
|
4960
|
+
}, G = (B, j) => {
|
|
4961
|
+
A((fe) => ({ ...fe, [B]: j }));
|
|
4908
4962
|
}, _ = ae(async () => {
|
|
4909
4963
|
try {
|
|
4910
4964
|
const B = await a.getAppropriatenessTest(e);
|
|
4911
4965
|
if (s(B), B.waitTimeSpanForNextTry && B.waitTimeSpanForNextTry !== "00:00:00") {
|
|
4912
|
-
const
|
|
4913
|
-
|
|
4966
|
+
const j = Tt(B.waitTimeSpanForNextTry);
|
|
4967
|
+
j > 0 && K(j);
|
|
4914
4968
|
}
|
|
4915
4969
|
} catch {
|
|
4916
4970
|
}
|
|
4917
4971
|
}, [e, a]), J = async (B) => {
|
|
4918
4972
|
if (i) {
|
|
4919
4973
|
if (!Q) {
|
|
4920
|
-
const
|
|
4921
|
-
if (
|
|
4922
|
-
P(`Please answer all questions. ${
|
|
4974
|
+
const j = i.appropriatenessQuestions.length - Object.keys(v).length;
|
|
4975
|
+
if (j > 0) {
|
|
4976
|
+
P(`Please answer all questions. ${j} remaining.`);
|
|
4923
4977
|
return;
|
|
4924
4978
|
}
|
|
4925
4979
|
}
|
|
4926
4980
|
p(!0), P(null);
|
|
4927
4981
|
try {
|
|
4928
|
-
const
|
|
4982
|
+
const j = i.appropriatenessQuestions.map(
|
|
4929
4983
|
(R) => ({ appropriatenessQuestionId: R.id, value: v[R.id] || "" })
|
|
4930
4984
|
), fe = {
|
|
4931
4985
|
applicantId: e,
|
|
4932
4986
|
appropriatenessTestId: i.id,
|
|
4933
|
-
appropriatenessQuestionResults:
|
|
4987
|
+
appropriatenessQuestionResults: j
|
|
4934
4988
|
};
|
|
4935
4989
|
try {
|
|
4936
4990
|
const R = await a.fillAppropriatenessTest(fe);
|
|
@@ -4941,8 +4995,8 @@ const En = ({
|
|
|
4941
4995
|
else
|
|
4942
4996
|
throw R;
|
|
4943
4997
|
}
|
|
4944
|
-
} catch (
|
|
4945
|
-
P(
|
|
4998
|
+
} catch (j) {
|
|
4999
|
+
P(j.message || "Failed to submit test. Please try again."), ie();
|
|
4946
5000
|
} finally {
|
|
4947
5001
|
p(!1);
|
|
4948
5002
|
}
|
|
@@ -4960,8 +5014,8 @@ const En = ({
|
|
|
4960
5014
|
/* @__PURE__ */ r("p", { style: { fontSize: "16px", fontWeight: 600, color: "var(--metakyc-danger, #ef4444)" }, children: "No test data available" }),
|
|
4961
5015
|
b && /* @__PURE__ */ r("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "8px" }, children: b })
|
|
4962
5016
|
] }) }) });
|
|
4963
|
-
const Y = i.testAllowedMaxTry - i.totalFailedTries,
|
|
4964
|
-
if (
|
|
5017
|
+
const Y = i.testAllowedMaxTry - i.totalFailedTries, we = i.appropriatenessQuestions.length, pe = Object.keys(v).length;
|
|
5018
|
+
if (H > 0)
|
|
4965
5019
|
return /* @__PURE__ */ o(re, { children: [
|
|
4966
5020
|
/* @__PURE__ */ r(Se, { children: /* @__PURE__ */ r("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: i.displayName }) }),
|
|
4967
5021
|
/* @__PURE__ */ r(ne, { children: /* @__PURE__ */ o("div", { style: { textAlign: "center", padding: "32px 0" }, children: [
|
|
@@ -4979,7 +5033,7 @@ const En = ({
|
|
|
4979
5033
|
fontWeight: 700,
|
|
4980
5034
|
color: "var(--metakyc-primary, #2563eb)",
|
|
4981
5035
|
fontVariantNumeric: "tabular-nums"
|
|
4982
|
-
}, children: vt(
|
|
5036
|
+
}, children: vt(H) }) }),
|
|
4983
5037
|
/* @__PURE__ */ r("p", { style: { fontSize: "15px", fontWeight: 500, color: "var(--metakyc-text-primary, #111827)" }, children: "Please wait before retrying" }),
|
|
4984
5038
|
/* @__PURE__ */ r("p", { style: { fontSize: "13px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "4px" }, children: "You can attempt the test again once the timer expires" }),
|
|
4985
5039
|
b && /* @__PURE__ */ r("div", { style: {
|
|
@@ -5063,9 +5117,9 @@ const En = ({
|
|
|
5063
5117
|
margin: 0
|
|
5064
5118
|
}, children: "No attempts remaining. Please contact support for assistance." }) })
|
|
5065
5119
|
] }) }),
|
|
5066
|
-
/* @__PURE__ */ r(Ce, { children: /* @__PURE__ */ r("div", { style: { display: "flex", justifyContent: "center", width: "100%", gap: "12px" }, children: g.success ? /* @__PURE__ */ r(Z, { type: "button", onClick: () => t == null ? void 0 : t(), children: "Continue" }) : /* @__PURE__ */ o(
|
|
5067
|
-
Y > 0 &&
|
|
5068
|
-
Y > 0 &&
|
|
5120
|
+
/* @__PURE__ */ r(Ce, { children: /* @__PURE__ */ r("div", { style: { display: "flex", justifyContent: "center", width: "100%", gap: "12px" }, children: g.success ? /* @__PURE__ */ r(Z, { type: "button", onClick: () => t == null ? void 0 : t(), children: "Continue" }) : /* @__PURE__ */ o(ct, { children: [
|
|
5121
|
+
Y > 0 && H <= 0 && /* @__PURE__ */ r(Z, { type: "button", onClick: B, children: "Retake Test" }),
|
|
5122
|
+
Y > 0 && H > 0 && /* @__PURE__ */ r(Z, { type: "button", onClick: B, children: "OK" }),
|
|
5069
5123
|
Y <= 0 && n && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: n, children: "Back" })
|
|
5070
5124
|
] }) }) })
|
|
5071
5125
|
] });
|
|
@@ -5139,7 +5193,7 @@ const En = ({
|
|
|
5139
5193
|
/* @__PURE__ */ r(Z, { type: "button", onClick: V, disabled: Y <= 0, children: "Start Test" })
|
|
5140
5194
|
] }) })
|
|
5141
5195
|
] });
|
|
5142
|
-
const me = i.appropriatenessQuestions[ee],
|
|
5196
|
+
const me = i.appropriatenessQuestions[ee], ve = ee === we - 1, F = pe === we, U = T <= 60;
|
|
5143
5197
|
return /* @__PURE__ */ o(re, { children: [
|
|
5144
5198
|
/* @__PURE__ */ o(Se, { children: [
|
|
5145
5199
|
/* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
@@ -5149,7 +5203,7 @@ const En = ({
|
|
|
5149
5203
|
"Question ",
|
|
5150
5204
|
ee + 1,
|
|
5151
5205
|
" of ",
|
|
5152
|
-
|
|
5206
|
+
we
|
|
5153
5207
|
] })
|
|
5154
5208
|
] }),
|
|
5155
5209
|
/* @__PURE__ */ o("div", { style: {
|
|
@@ -5197,7 +5251,7 @@ const En = ({
|
|
|
5197
5251
|
height: "100%",
|
|
5198
5252
|
borderRadius: "999px",
|
|
5199
5253
|
backgroundColor: "var(--metakyc-primary, #2563eb)",
|
|
5200
|
-
width: `${pe /
|
|
5254
|
+
width: `${pe / we * 100}%`,
|
|
5201
5255
|
transition: "width 0.3s ease"
|
|
5202
5256
|
} }) }),
|
|
5203
5257
|
/* @__PURE__ */ o("div", { style: {
|
|
@@ -5220,7 +5274,7 @@ const En = ({
|
|
|
5220
5274
|
] }),
|
|
5221
5275
|
/* @__PURE__ */ o(ne, { children: [
|
|
5222
5276
|
me && /* @__PURE__ */ r(
|
|
5223
|
-
|
|
5277
|
+
Pn,
|
|
5224
5278
|
{
|
|
5225
5279
|
question: me,
|
|
5226
5280
|
index: ee,
|
|
@@ -5229,23 +5283,23 @@ const En = ({
|
|
|
5229
5283
|
disabled: y
|
|
5230
5284
|
}
|
|
5231
5285
|
),
|
|
5232
|
-
|
|
5286
|
+
we > 1 && /* @__PURE__ */ r("div", { style: {
|
|
5233
5287
|
display: "flex",
|
|
5234
5288
|
justifyContent: "center",
|
|
5235
5289
|
gap: "6px",
|
|
5236
5290
|
marginTop: "20px",
|
|
5237
5291
|
flexWrap: "wrap"
|
|
5238
|
-
}, children: i.appropriatenessQuestions.map((B,
|
|
5292
|
+
}, children: i.appropriatenessQuestions.map((B, j) => /* @__PURE__ */ r(
|
|
5239
5293
|
"button",
|
|
5240
5294
|
{
|
|
5241
5295
|
type: "button",
|
|
5242
|
-
onClick: () => E(
|
|
5296
|
+
onClick: () => E(j),
|
|
5243
5297
|
style: {
|
|
5244
5298
|
width: "28px",
|
|
5245
5299
|
height: "28px",
|
|
5246
5300
|
borderRadius: "8px",
|
|
5247
|
-
border:
|
|
5248
|
-
backgroundColor: v[B.id] ?
|
|
5301
|
+
border: j === ee ? "2px solid var(--metakyc-primary, #2563eb)" : "1px solid var(--metakyc-border, #e5e7eb)",
|
|
5302
|
+
backgroundColor: v[B.id] ? j === ee ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 15%, transparent)" : "color-mix(in srgb, var(--metakyc-primary, #2563eb) 8%, transparent)" : j === ee ? "var(--metakyc-surface, #f9fafb)" : "var(--metakyc-background, #ffffff)",
|
|
5249
5303
|
color: v[B.id] ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-text-muted, #9ca3af)",
|
|
5250
5304
|
fontSize: "12px",
|
|
5251
5305
|
fontWeight: 600,
|
|
@@ -5256,7 +5310,7 @@ const En = ({
|
|
|
5256
5310
|
alignItems: "center",
|
|
5257
5311
|
justifyContent: "center"
|
|
5258
5312
|
},
|
|
5259
|
-
children:
|
|
5313
|
+
children: j + 1
|
|
5260
5314
|
},
|
|
5261
5315
|
B.id
|
|
5262
5316
|
)) }),
|
|
@@ -5298,7 +5352,7 @@ const En = ({
|
|
|
5298
5352
|
}
|
|
5299
5353
|
),
|
|
5300
5354
|
/* @__PURE__ */ o("div", { style: { display: "flex", gap: "8px" }, children: [
|
|
5301
|
-
!
|
|
5355
|
+
!ve && /* @__PURE__ */ r(
|
|
5302
5356
|
Z,
|
|
5303
5357
|
{
|
|
5304
5358
|
type: "button",
|
|
@@ -5306,7 +5360,7 @@ const En = ({
|
|
|
5306
5360
|
children: "Next"
|
|
5307
5361
|
}
|
|
5308
5362
|
),
|
|
5309
|
-
(
|
|
5363
|
+
(ve || F) && /* @__PURE__ */ r(
|
|
5310
5364
|
Z,
|
|
5311
5365
|
{
|
|
5312
5366
|
type: "button",
|
|
@@ -5320,7 +5374,7 @@ const En = ({
|
|
|
5320
5374
|
] })
|
|
5321
5375
|
] }) })
|
|
5322
5376
|
] });
|
|
5323
|
-
},
|
|
5377
|
+
}, Tn = {
|
|
5324
5378
|
questions: /* @__PURE__ */ o("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
5325
5379
|
/* @__PURE__ */ r("path", { d: "M9 11l3 3L22 4" }),
|
|
5326
5380
|
/* @__PURE__ */ r("path", { d: "M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11" })
|
|
@@ -5352,7 +5406,7 @@ const En = ({
|
|
|
5352
5406
|
/* @__PURE__ */ r("div", { style: {
|
|
5353
5407
|
color: i ? "#f59e0b" : "var(--metakyc-primary, #2563eb)",
|
|
5354
5408
|
flexShrink: 0
|
|
5355
|
-
}, children:
|
|
5409
|
+
}, children: Tn[e] }),
|
|
5356
5410
|
/* @__PURE__ */ o("div", { children: [
|
|
5357
5411
|
/* @__PURE__ */ r("p", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)", margin: 0 }, children: t }),
|
|
5358
5412
|
/* @__PURE__ */ r("p", { style: {
|
|
@@ -5364,7 +5418,7 @@ const En = ({
|
|
|
5364
5418
|
}, children: n })
|
|
5365
5419
|
] })
|
|
5366
5420
|
] });
|
|
5367
|
-
},
|
|
5421
|
+
}, Pn = ({ question: e, selectedAnswer: t, onSelect: n, disabled: a }) => /* @__PURE__ */ o("div", { children: [
|
|
5368
5422
|
/* @__PURE__ */ o("div", { style: { marginBottom: "16px" }, children: [
|
|
5369
5423
|
e.groupName && /* @__PURE__ */ r("span", { style: {
|
|
5370
5424
|
display: "inline-block",
|
|
@@ -5446,15 +5500,15 @@ const En = ({
|
|
|
5446
5500
|
s
|
|
5447
5501
|
);
|
|
5448
5502
|
}) })
|
|
5449
|
-
] }),
|
|
5503
|
+
] }), Ln = ({
|
|
5450
5504
|
applicantId: e,
|
|
5451
5505
|
onComplete: t,
|
|
5452
5506
|
onBack: n
|
|
5453
5507
|
}) => {
|
|
5454
|
-
var
|
|
5455
|
-
const { applicantService: a, baseInformationService: i, identityService: s, config: c, currentTheme: d } = Te(), { identityData: y, provider: p, token: b, isLoading: P, error: v, requestIdentity: A, restartIdentity: T } =
|
|
5508
|
+
var Xe, je, ot, Qe;
|
|
5509
|
+
const { applicantService: a, baseInformationService: i, identityService: s, config: c, currentTheme: d } = Te(), { identityData: y, provider: p, token: b, isLoading: P, error: v, requestIdentity: A, restartIdentity: T } = Jr(e), [w, N] = k(null), [z, Q] = k(null), [M, H] = k([]), [K, ee] = k([]), [E, g] = k(!0), [$, V] = k(!1), [G, _] = k(null), [J, ie] = k(!1), Y = ke.useRef(!1), [we, pe] = k({}), [me, ve] = k({}), F = d != null && d.reviewPageFields && d.reviewPageFields.length > 0 ? d.reviewPageFields[0] : null, U = !!(d != null && d.reviewPageDisabled), B = de(!1);
|
|
5456
5510
|
B.current = U;
|
|
5457
|
-
const
|
|
5511
|
+
const j = Gt({
|
|
5458
5512
|
defaultValues: {
|
|
5459
5513
|
street: "",
|
|
5460
5514
|
streetNumber: "",
|
|
@@ -5480,7 +5534,7 @@ const En = ({
|
|
|
5480
5534
|
]);
|
|
5481
5535
|
Q(O);
|
|
5482
5536
|
const X = /* @__PURE__ */ new Set(), m = q.map((f) => ({ value: f.abbreviation3 || f.abbreviation, label: f.name })).filter((f) => !f.value || X.has(f.value) ? !1 : (X.add(f.value), !0));
|
|
5483
|
-
|
|
5537
|
+
H(m);
|
|
5484
5538
|
const I = /* @__PURE__ */ new Set(), L = W.filter((f) => f.countryCode).map((f) => ({ value: f.countryCode, label: `${f.countryCode} – ${f.name}` })).filter((f) => I.has(f.value) ? !1 : (I.add(f.value), !0));
|
|
5485
5539
|
ee(L);
|
|
5486
5540
|
const u = O.applicantRequestData;
|
|
@@ -5506,7 +5560,7 @@ const En = ({
|
|
|
5506
5560
|
occupation: (u == null ? void 0 : u.occupation) || "",
|
|
5507
5561
|
taxNumber: (u == null ? void 0 : u.taxNumber) || "",
|
|
5508
5562
|
defaultLanguage: (u == null ? void 0 : u.defaultLanguage) || ""
|
|
5509
|
-
}),
|
|
5563
|
+
}), j.reset({
|
|
5510
5564
|
street: (u == null ? void 0 : u.street) || "",
|
|
5511
5565
|
streetNumber: (u == null ? void 0 : u.streetNumber) || "",
|
|
5512
5566
|
city: (u == null ? void 0 : u.city) || "",
|
|
@@ -5562,9 +5616,9 @@ const En = ({
|
|
|
5562
5616
|
if (fe) {
|
|
5563
5617
|
console.log("[Sumsub] Fetching access token for Web SDK…"), _(null), (async () => {
|
|
5564
5618
|
try {
|
|
5565
|
-
const O = await s.refreshSumsubToken(e), q =
|
|
5619
|
+
const O = await s.refreshSumsubToken(e), q = Je.parseProviderConfig(p, b, c);
|
|
5566
5620
|
q.accessToken = O, q.onTokenRefresh = () => s.refreshSumsubToken(e);
|
|
5567
|
-
const W =
|
|
5621
|
+
const W = Je.createProvider(p, q);
|
|
5568
5622
|
W.onComplete((X) => {
|
|
5569
5623
|
console.log("[Sumsub] Verification complete:", X), t == null || t();
|
|
5570
5624
|
}), W.onError((X) => {
|
|
@@ -5582,8 +5636,8 @@ const En = ({
|
|
|
5582
5636
|
if (new URL(b.url), h === Oe.SardinAI) {
|
|
5583
5637
|
console.log("[SardinAI] Initializing Risk SDK in background...");
|
|
5584
5638
|
try {
|
|
5585
|
-
const O =
|
|
5586
|
-
|
|
5639
|
+
const O = Je.parseProviderConfig(p, b, c);
|
|
5640
|
+
Je.createProvider(p, O).initialize().then(() => console.log("[SardinAI] Risk SDK initialized in background")).catch((W) => console.warn("[SardinAI] Risk SDK init failed (non-blocking):", W));
|
|
5587
5641
|
} catch (O) {
|
|
5588
5642
|
console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", O);
|
|
5589
5643
|
}
|
|
@@ -5597,7 +5651,7 @@ const En = ({
|
|
|
5597
5651
|
if (h === Oe.SardinAI) {
|
|
5598
5652
|
console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), _(null);
|
|
5599
5653
|
try {
|
|
5600
|
-
const O =
|
|
5654
|
+
const O = Je.parseProviderConfig(p, b, c), q = Je.createProvider(p, O);
|
|
5601
5655
|
q.initialize().then(() => {
|
|
5602
5656
|
console.log("[SardinAI] Risk SDK initialized successfully"), N(q), setTimeout(() => t == null ? void 0 : t(), 2e3);
|
|
5603
5657
|
}).catch((W) => {
|
|
@@ -5613,7 +5667,7 @@ const En = ({
|
|
|
5613
5667
|
}
|
|
5614
5668
|
try {
|
|
5615
5669
|
_(null);
|
|
5616
|
-
const O =
|
|
5670
|
+
const O = Je.parseProviderConfig(p, b, c), q = Je.createProvider(p, O);
|
|
5617
5671
|
h === Oe.Onfido && q.initialize("identity-container").catch((W) => {
|
|
5618
5672
|
console.error("[Onfido] Initialization error:", W), _(`Failed to initialize: ${W.message}`);
|
|
5619
5673
|
}), N(q);
|
|
@@ -5838,7 +5892,7 @@ const En = ({
|
|
|
5838
5892
|
return String(O);
|
|
5839
5893
|
}, $e = ({ helpText: h }) => {
|
|
5840
5894
|
const [O, q] = k(!1), W = de(null), [, X] = k({ top: 0, left: 0 });
|
|
5841
|
-
return /* @__PURE__ */ o(
|
|
5895
|
+
return /* @__PURE__ */ o(ct, { children: [
|
|
5842
5896
|
/* @__PURE__ */ r(
|
|
5843
5897
|
"button",
|
|
5844
5898
|
{
|
|
@@ -5933,7 +5987,7 @@ const En = ({
|
|
|
5933
5987
|
}, Ie = (h, O) => O ? /* @__PURE__ */ o("div", { style: { display: "flex", alignItems: "flex-start", gap: 5, flexWrap: "nowrap" }, children: [
|
|
5934
5988
|
/* @__PURE__ */ r("div", { style: { flex: 1, minWidth: 0 }, children: h }),
|
|
5935
5989
|
/* @__PURE__ */ r("div", { style: { paddingTop: 24 }, children: /* @__PURE__ */ r($e, { helpText: O }) })
|
|
5936
|
-
] }) : h,
|
|
5990
|
+
] }) : h, He = (h, O) => {
|
|
5937
5991
|
const q = `cf-${O}`, W = h.paramName ?? "", X = me[W];
|
|
5938
5992
|
if (h.customType === "br")
|
|
5939
5993
|
return /* @__PURE__ */ r("div", { style: { ...oe(h.colSpan), minHeight: "0.5rem" } }, q);
|
|
@@ -5975,21 +6029,14 @@ const En = ({
|
|
|
5975
6029
|
return /* @__PURE__ */ r("div", { style: oe(h.colSpan), children: Ie(
|
|
5976
6030
|
/* @__PURE__ */ o("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
|
|
5977
6031
|
/* @__PURE__ */ r(
|
|
5978
|
-
|
|
6032
|
+
Be,
|
|
5979
6033
|
{
|
|
5980
|
-
type: "checkbox",
|
|
5981
6034
|
checked: !!m,
|
|
5982
|
-
onChange: (I) =>
|
|
5983
|
-
style: {
|
|
5984
|
-
width: 16,
|
|
5985
|
-
height: 16,
|
|
5986
|
-
flexShrink: 0,
|
|
5987
|
-
marginTop: 2,
|
|
5988
|
-
accentColor: "var(--metakyc-primary, #6366f1)"
|
|
5989
|
-
}
|
|
6035
|
+
onChange: (I) => ve((L) => ({ ...L, [W]: String(I) })),
|
|
6036
|
+
style: { marginTop: 2 }
|
|
5990
6037
|
}
|
|
5991
6038
|
),
|
|
5992
|
-
/* @__PURE__ */ r("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: h.customType === "link_checkbox" && h.linkUrl ? /* @__PURE__ */ o(
|
|
6039
|
+
/* @__PURE__ */ r("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: h.customType === "link_checkbox" && h.linkUrl ? /* @__PURE__ */ o(ct, { children: [
|
|
5993
6040
|
/* @__PURE__ */ r("a", { href: h.linkUrl, target: "_blank", rel: "noopener noreferrer", style: { color: "var(--metakyc-primary, #6366f1)", textDecoration: "underline" }, children: h.linkText || h.label }),
|
|
5994
6041
|
h.label && h.linkText ? ` ${h.label}` : ""
|
|
5995
6042
|
] }) : h.displayText || h.label })
|
|
@@ -5999,7 +6046,7 @@ const En = ({
|
|
|
5999
6046
|
}
|
|
6000
6047
|
if (h.customType === "group_checkbox") {
|
|
6001
6048
|
const m = Array.isArray(X) ? X : X ? [X] : [], I = (L) => {
|
|
6002
|
-
h.singleSelect ?
|
|
6049
|
+
h.singleSelect ? ve((u) => ({ ...u, [W]: m[0] === L ? [] : [L] })) : ve((u) => ({
|
|
6003
6050
|
...u,
|
|
6004
6051
|
[W]: m.includes(L) ? m.filter((l) => l !== L) : [...m, L]
|
|
6005
6052
|
}));
|
|
@@ -6009,12 +6056,11 @@ const En = ({
|
|
|
6009
6056
|
h.label && /* @__PURE__ */ r("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: h.displayText || h.label }),
|
|
6010
6057
|
(h.options || []).map((L) => /* @__PURE__ */ o("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
|
|
6011
6058
|
/* @__PURE__ */ r(
|
|
6012
|
-
|
|
6059
|
+
Be,
|
|
6013
6060
|
{
|
|
6014
|
-
type: "checkbox",
|
|
6015
6061
|
checked: m.includes(L.value),
|
|
6016
6062
|
onChange: () => I(L.value),
|
|
6017
|
-
style: {
|
|
6063
|
+
style: { marginTop: 2 }
|
|
6018
6064
|
}
|
|
6019
6065
|
),
|
|
6020
6066
|
/* @__PURE__ */ r("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: L.label })
|
|
@@ -6034,7 +6080,7 @@ const En = ({
|
|
|
6034
6080
|
name: `rg-${W}`,
|
|
6035
6081
|
value: m.value,
|
|
6036
6082
|
checked: X === m.value,
|
|
6037
|
-
onChange: () =>
|
|
6083
|
+
onChange: () => ve((I) => ({ ...I, [W]: m.value })),
|
|
6038
6084
|
style: { width: 16, height: 16, flexShrink: 0, marginTop: 2, accentColor: "var(--metakyc-primary, #6366f1)" }
|
|
6039
6085
|
}
|
|
6040
6086
|
),
|
|
@@ -6048,17 +6094,17 @@ const En = ({
|
|
|
6048
6094
|
{
|
|
6049
6095
|
label: h.displayText || h.label || W,
|
|
6050
6096
|
value: String(X ?? ""),
|
|
6051
|
-
onChange: (m) =>
|
|
6097
|
+
onChange: (m) => ve((I) => ({ ...I, [W]: m.target.value }))
|
|
6052
6098
|
}
|
|
6053
6099
|
),
|
|
6054
6100
|
h.helpText
|
|
6055
6101
|
) }, q);
|
|
6056
|
-
},
|
|
6057
|
-
if (h.isCustom) return
|
|
6058
|
-
const q = h.name ?? "", W =
|
|
6102
|
+
}, it = (h, O) => {
|
|
6103
|
+
if (h.isCustom) return He(h, O);
|
|
6104
|
+
const q = h.name ?? "", W = at[q], X = h.displayText || (W == null ? void 0 : W.label) || q, m = we[q] ?? "", I = q === "mobileCountryCode", L = !!(W != null && W.countriesType) && !I;
|
|
6059
6105
|
return h.editable ? I ? /* @__PURE__ */ r("div", { style: oe(h.colSpan ?? 2), children: Ie(
|
|
6060
6106
|
/* @__PURE__ */ r(
|
|
6061
|
-
|
|
6107
|
+
Ve,
|
|
6062
6108
|
{
|
|
6063
6109
|
label: X,
|
|
6064
6110
|
value: String(m),
|
|
@@ -6069,7 +6115,7 @@ const En = ({
|
|
|
6069
6115
|
h.helpText
|
|
6070
6116
|
) }, `epc-${O}`) : L ? /* @__PURE__ */ r("div", { style: oe(h.colSpan ?? 2), children: Ie(
|
|
6071
6117
|
/* @__PURE__ */ r(
|
|
6072
|
-
|
|
6118
|
+
Ve,
|
|
6073
6119
|
{
|
|
6074
6120
|
label: X,
|
|
6075
6121
|
value: String(m),
|
|
@@ -6090,7 +6136,7 @@ const En = ({
|
|
|
6090
6136
|
),
|
|
6091
6137
|
h.helpText
|
|
6092
6138
|
) }, `ei-${O}`) : /* @__PURE__ */ r("div", { style: oe(h.colSpan ?? 2), children: Ie(
|
|
6093
|
-
/* @__PURE__ */ o(
|
|
6139
|
+
/* @__PURE__ */ o(ct, { children: [
|
|
6094
6140
|
/* @__PURE__ */ r("label", { className: "block text-sm font-medium mb-0.5", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: X }),
|
|
6095
6141
|
/* @__PURE__ */ r("p", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)", minHeight: "1.5rem" }, children: Ne(q, m) })
|
|
6096
6142
|
] }),
|
|
@@ -6106,23 +6152,23 @@ const En = ({
|
|
|
6106
6152
|
/* @__PURE__ */ r("h2", { className: "text-lg font-bold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: h }),
|
|
6107
6153
|
/* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: O })
|
|
6108
6154
|
] }),
|
|
6109
|
-
/* @__PURE__ */ r(ne, { children: /* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children: F.fields.map((q, W) =>
|
|
6155
|
+
/* @__PURE__ */ r(ne, { children: /* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children: F.fields.map((q, W) => it(q, W)) }) }),
|
|
6110
6156
|
/* @__PURE__ */ o(Ce, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
6111
6157
|
n && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: n, children: "Back" }),
|
|
6112
6158
|
/* @__PURE__ */ r(Z, { type: "submit", isLoading: P, children: "Confirm and Start Verification" })
|
|
6113
6159
|
] })
|
|
6114
6160
|
] }) });
|
|
6115
6161
|
}
|
|
6116
|
-
return /* @__PURE__ */ r("form", { onSubmit:
|
|
6162
|
+
return /* @__PURE__ */ r("form", { onSubmit: j.handleSubmit(R), children: /* @__PURE__ */ o(re, { children: [
|
|
6117
6163
|
/* @__PURE__ */ o(Se, { children: [
|
|
6118
6164
|
/* @__PURE__ */ r("h2", { className: "text-lg font-bold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: "Review Your Information" }),
|
|
6119
6165
|
/* @__PURE__ */ r("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Please review and confirm your information before starting identity verification" })
|
|
6120
6166
|
] }),
|
|
6121
6167
|
/* @__PURE__ */ o(ne, { className: "space-y-6", children: [
|
|
6122
6168
|
/* @__PURE__ */ r("div", { className: "space-y-4 pb-4", style: { borderBottom: "1px solid var(--metakyc-border, #e5e7eb)" }, children: [
|
|
6123
|
-
{ label: "Name", value: `${((
|
|
6124
|
-
{ label: "Email", value: (
|
|
6125
|
-
{ label: "Date of Birth", value: ((
|
|
6169
|
+
{ label: "Name", value: `${((Xe = z == null ? void 0 : z.applicantRequestData) == null ? void 0 : Xe.firstName) || ""} ${((je = z == null ? void 0 : z.applicantRequestData) == null ? void 0 : je.lastName) || ""}`.trim() },
|
|
6170
|
+
{ label: "Email", value: (ot = z == null ? void 0 : z.applicantRequestData) == null ? void 0 : ot.email },
|
|
6171
|
+
{ label: "Date of Birth", value: ((Qe = z == null ? void 0 : z.applicantRequestData) == null ? void 0 : Qe.dateOfBirth) || "Not provided" }
|
|
6126
6172
|
].map(({ label: h, value: O }) => /* @__PURE__ */ o("div", { children: [
|
|
6127
6173
|
/* @__PURE__ */ r("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: h }),
|
|
6128
6174
|
/* @__PURE__ */ r("p", { className: "mt-1 text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children: O })
|
|
@@ -6131,12 +6177,12 @@ const En = ({
|
|
|
6131
6177
|
/* @__PURE__ */ r("h3", { className: "text-base font-semibold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: "Address Information" }),
|
|
6132
6178
|
/* @__PURE__ */ o("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
6133
6179
|
/* @__PURE__ */ r(
|
|
6134
|
-
|
|
6180
|
+
tt,
|
|
6135
6181
|
{
|
|
6136
|
-
control:
|
|
6182
|
+
control: j.control,
|
|
6137
6183
|
name: "country",
|
|
6138
6184
|
render: ({ field: h }) => /* @__PURE__ */ r(
|
|
6139
|
-
|
|
6185
|
+
Ve,
|
|
6140
6186
|
{
|
|
6141
6187
|
label: "Country",
|
|
6142
6188
|
value: h.value,
|
|
@@ -6147,12 +6193,12 @@ const En = ({
|
|
|
6147
6193
|
}
|
|
6148
6194
|
),
|
|
6149
6195
|
/* @__PURE__ */ r(
|
|
6150
|
-
|
|
6196
|
+
tt,
|
|
6151
6197
|
{
|
|
6152
|
-
control:
|
|
6198
|
+
control: j.control,
|
|
6153
6199
|
name: "nationality",
|
|
6154
6200
|
render: ({ field: h }) => /* @__PURE__ */ r(
|
|
6155
|
-
|
|
6201
|
+
Ve,
|
|
6156
6202
|
{
|
|
6157
6203
|
label: "Nationality",
|
|
6158
6204
|
value: h.value,
|
|
@@ -6164,14 +6210,14 @@ const En = ({
|
|
|
6164
6210
|
)
|
|
6165
6211
|
] }),
|
|
6166
6212
|
/* @__PURE__ */ o("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
6167
|
-
/* @__PURE__ */ r(
|
|
6168
|
-
/* @__PURE__ */ r(
|
|
6213
|
+
/* @__PURE__ */ r(tt, { control: j.control, name: "street", render: ({ field: h }) => /* @__PURE__ */ r(xe, { ...h, label: "Street" }) }),
|
|
6214
|
+
/* @__PURE__ */ r(tt, { control: j.control, name: "streetNumber", render: ({ field: h }) => /* @__PURE__ */ r(xe, { ...h, label: "Street Number" }) })
|
|
6169
6215
|
] }),
|
|
6170
6216
|
/* @__PURE__ */ o("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
6171
|
-
/* @__PURE__ */ r(
|
|
6172
|
-
/* @__PURE__ */ r(
|
|
6217
|
+
/* @__PURE__ */ r(tt, { control: j.control, name: "city", render: ({ field: h }) => /* @__PURE__ */ r(xe, { ...h, label: "City" }) }),
|
|
6218
|
+
/* @__PURE__ */ r(tt, { control: j.control, name: "zip", render: ({ field: h }) => /* @__PURE__ */ r(xe, { ...h, label: "ZIP / Postal Code" }) })
|
|
6173
6219
|
] }),
|
|
6174
|
-
/* @__PURE__ */ r(
|
|
6220
|
+
/* @__PURE__ */ r(tt, { control: j.control, name: "phonenumber", render: ({ field: h }) => /* @__PURE__ */ r(xe, { ...h, label: "Phone Number", type: "tel" }) })
|
|
6175
6221
|
] })
|
|
6176
6222
|
] }),
|
|
6177
6223
|
/* @__PURE__ */ o(Ce, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
@@ -6187,42 +6233,42 @@ const En = ({
|
|
|
6187
6233
|
onContinue: i,
|
|
6188
6234
|
onContactSupport: s
|
|
6189
6235
|
}) => {
|
|
6190
|
-
const d = e ===
|
|
6236
|
+
const d = e === rt.Approved ? {
|
|
6191
6237
|
type: "success",
|
|
6192
6238
|
title: "Verification Approved",
|
|
6193
6239
|
icon: "✓",
|
|
6194
6240
|
iconBg: "bg-green-100 dark:bg-green-900/30",
|
|
6195
6241
|
iconColor: "text-green-600 dark:text-green-400",
|
|
6196
6242
|
message: "Your identity verification has been successfully approved."
|
|
6197
|
-
} : e ===
|
|
6243
|
+
} : e === rt.Rejected ? {
|
|
6198
6244
|
type: "error",
|
|
6199
6245
|
title: "Verification Rejected",
|
|
6200
6246
|
icon: "✕",
|
|
6201
6247
|
iconBg: "bg-red-100 dark:bg-red-900/30",
|
|
6202
6248
|
iconColor: "text-red-600 dark:text-red-400",
|
|
6203
6249
|
message: "Unfortunately, your identity verification was not approved."
|
|
6204
|
-
} : e ===
|
|
6250
|
+
} : e === rt.Pending || e === rt.InProgress ? {
|
|
6205
6251
|
type: "pending",
|
|
6206
6252
|
title: "Verification Pending",
|
|
6207
6253
|
icon: "⏱",
|
|
6208
6254
|
iconBg: "bg-blue-100 dark:bg-blue-900/30",
|
|
6209
6255
|
iconColor: "text-blue-600 dark:text-blue-400",
|
|
6210
6256
|
message: "Your identity verification is currently being processed."
|
|
6211
|
-
} : t ===
|
|
6257
|
+
} : t === nt.Approved ? {
|
|
6212
6258
|
type: "success",
|
|
6213
6259
|
title: "Application Approved",
|
|
6214
6260
|
icon: "✓",
|
|
6215
6261
|
iconBg: "bg-green-100 dark:bg-green-900/30",
|
|
6216
6262
|
iconColor: "text-green-600 dark:text-green-400",
|
|
6217
6263
|
message: "Your application has been approved."
|
|
6218
|
-
} : t ===
|
|
6264
|
+
} : t === nt.Reject ? {
|
|
6219
6265
|
type: "error",
|
|
6220
6266
|
title: "Application Rejected",
|
|
6221
6267
|
icon: "✕",
|
|
6222
6268
|
iconBg: "bg-red-100 dark:bg-red-900/30",
|
|
6223
6269
|
iconColor: "text-red-600 dark:text-red-400",
|
|
6224
6270
|
message: "Your application has been rejected."
|
|
6225
|
-
} : t ===
|
|
6271
|
+
} : t === nt.UnderReview || t === nt.AdminReview ? {
|
|
6226
6272
|
type: "pending",
|
|
6227
6273
|
title: "Under Review",
|
|
6228
6274
|
icon: "📋",
|
|
@@ -6272,7 +6318,7 @@ const En = ({
|
|
|
6272
6318
|
$t,
|
|
6273
6319
|
{
|
|
6274
6320
|
variant: d.type === "success" ? "success" : d.type === "error" ? "danger" : d.type === "pending" ? "warning" : "info",
|
|
6275
|
-
children: e != null ?
|
|
6321
|
+
children: e != null ? rt[e] : nt[t]
|
|
6276
6322
|
}
|
|
6277
6323
|
) }),
|
|
6278
6324
|
/* @__PURE__ */ r("p", { className: "text-center mb-6 max-w-md mx-auto", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: a || d.message }),
|
|
@@ -6304,24 +6350,24 @@ const En = ({
|
|
|
6304
6350
|
/* @__PURE__ */ r("div", { className: "mt-6 pt-6", style: { borderTop: "1px solid var(--metakyc-border, #e5e7eb)" }, children: /* @__PURE__ */ o("div", { className: "grid grid-cols-2 gap-4 text-sm", children: [
|
|
6305
6351
|
/* @__PURE__ */ o("div", { children: [
|
|
6306
6352
|
/* @__PURE__ */ r("span", { style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: "KYC Status:" }),
|
|
6307
|
-
/* @__PURE__ */ r("div", { className: "font-medium mt-1", style: { color: "var(--metakyc-text-primary, #111827)" }, children: e != null ?
|
|
6353
|
+
/* @__PURE__ */ r("div", { className: "font-medium mt-1", style: { color: "var(--metakyc-text-primary, #111827)" }, children: e != null ? rt[e] : "Not Available" })
|
|
6308
6354
|
] }),
|
|
6309
6355
|
/* @__PURE__ */ o("div", { children: [
|
|
6310
6356
|
/* @__PURE__ */ r("span", { style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: "Review Status:" }),
|
|
6311
|
-
/* @__PURE__ */ r("div", { className: "font-medium mt-1", style: { color: "var(--metakyc-text-primary, #111827)" }, children:
|
|
6357
|
+
/* @__PURE__ */ r("div", { className: "font-medium mt-1", style: { color: "var(--metakyc-text-primary, #111827)" }, children: nt[t] })
|
|
6312
6358
|
] })
|
|
6313
6359
|
] }) })
|
|
6314
6360
|
] }),
|
|
6315
6361
|
/* @__PURE__ */ o(Ce, { style: { display: "flex", justifyContent: "center", gap: "1rem" }, children: [
|
|
6316
6362
|
d.type === "success" && i && /* @__PURE__ */ r(Z, { onClick: i, size: "lg", children: "Continue" }),
|
|
6317
|
-
d.type === "error" && /* @__PURE__ */ o(
|
|
6363
|
+
d.type === "error" && /* @__PURE__ */ o(ct, { children: [
|
|
6318
6364
|
s && /* @__PURE__ */ r(Z, { variant: "outline", onClick: s, children: "Contact Support" }),
|
|
6319
6365
|
i && /* @__PURE__ */ r(Z, { onClick: i, children: "Try Again" })
|
|
6320
6366
|
] }),
|
|
6321
6367
|
d.type === "pending" && /* @__PURE__ */ r("div", { className: "text-center", children: /* @__PURE__ */ r("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Please check back later or wait for our email notification" }) })
|
|
6322
6368
|
] })
|
|
6323
6369
|
] });
|
|
6324
|
-
},
|
|
6370
|
+
}, Dn = ({ config: e, className: t = "" }) => !(e != null && e.visible) || !(e != null && e.url) ? null : /* @__PURE__ */ r("div", { className: `metakyc-logo ${t}`, children: /* @__PURE__ */ r(
|
|
6325
6371
|
"img",
|
|
6326
6372
|
{
|
|
6327
6373
|
src: e.url,
|
|
@@ -6349,7 +6395,7 @@ const En = ({
|
|
|
6349
6395
|
className: "metakyc-header-title flex items-center text-xl font-bold",
|
|
6350
6396
|
style: { color: "var(--metakyc-text-primary, #111827)" },
|
|
6351
6397
|
children: [
|
|
6352
|
-
s && /* @__PURE__ */ r(
|
|
6398
|
+
s && /* @__PURE__ */ r(Dn, { config: a.logo }),
|
|
6353
6399
|
s && c && /* @__PURE__ */ r(
|
|
6354
6400
|
"span",
|
|
6355
6401
|
{
|
|
@@ -6364,10 +6410,10 @@ const En = ({
|
|
|
6364
6410
|
t && /* @__PURE__ */ r("p", { className: "text-sm mt-1", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: t })
|
|
6365
6411
|
] });
|
|
6366
6412
|
}, ft = ["firstName", "lastName", "email", "phonenumber", "dateOfBirth"];
|
|
6367
|
-
function
|
|
6413
|
+
function lt(e) {
|
|
6368
6414
|
return e == null || e === "" || Array.isArray(e) && e.length === 0;
|
|
6369
6415
|
}
|
|
6370
|
-
const
|
|
6416
|
+
const Mn = {
|
|
6371
6417
|
width: "16px",
|
|
6372
6418
|
height: "16px",
|
|
6373
6419
|
minWidth: "16px",
|
|
@@ -6380,8 +6426,8 @@ const pt = {
|
|
|
6380
6426
|
display: "inline-block",
|
|
6381
6427
|
verticalAlign: "middle"
|
|
6382
6428
|
}, Lt = ({ helpText: e, children: t }) => {
|
|
6383
|
-
const [n, a] =
|
|
6384
|
-
if (!e) return /* @__PURE__ */ r(
|
|
6429
|
+
const [n, a] = ke.useState(!1);
|
|
6430
|
+
if (!e) return /* @__PURE__ */ r(ct, { children: t });
|
|
6385
6431
|
const i = n ? /* @__PURE__ */ r(
|
|
6386
6432
|
"div",
|
|
6387
6433
|
{
|
|
@@ -6500,7 +6546,7 @@ const pt = {
|
|
|
6500
6546
|
),
|
|
6501
6547
|
typeof document < "u" && i ? St(i, document.body) : null
|
|
6502
6548
|
] });
|
|
6503
|
-
},
|
|
6549
|
+
}, ta = ({
|
|
6504
6550
|
workflowKey: e,
|
|
6505
6551
|
externalRefId: t,
|
|
6506
6552
|
onSuccess: n,
|
|
@@ -6542,26 +6588,26 @@ const pt = {
|
|
|
6542
6588
|
"countryOfBirth",
|
|
6543
6589
|
"mobileCountryCode",
|
|
6544
6590
|
"otherNationality"
|
|
6545
|
-
]),
|
|
6591
|
+
]), H = De(() => {
|
|
6546
6592
|
var f, D;
|
|
6547
6593
|
const l = /* @__PURE__ */ new Set();
|
|
6548
6594
|
if (N)
|
|
6549
6595
|
for (const x of N)
|
|
6550
6596
|
for (const C of x.fields)
|
|
6551
|
-
!C.isCustom && C.name && M.has(C.name) && l.add(C.countriesType ?? ((f =
|
|
6597
|
+
!C.isCustom && C.name && M.has(C.name) && l.add(C.countriesType ?? ((f = at[C.name]) == null ? void 0 : f.countriesType));
|
|
6552
6598
|
else
|
|
6553
6599
|
for (const x of Q)
|
|
6554
|
-
M.has(x) && l.add((D =
|
|
6600
|
+
M.has(x) && l.add((D = at[x]) == null ? void 0 : D.countriesType);
|
|
6555
6601
|
return l.size === 0 && l.add(void 0), Array.from(l);
|
|
6556
6602
|
}, [Q, N]), [K, ee] = k({}), [E, g] = k(!0), $ = de(/* @__PURE__ */ new Set()), V = de(/* @__PURE__ */ new Set());
|
|
6557
6603
|
ge(() => {
|
|
6558
6604
|
if (!c) return;
|
|
6559
|
-
const l =
|
|
6605
|
+
const l = H.filter((x) => {
|
|
6560
6606
|
const C = x != null ? String(x) : "all";
|
|
6561
6607
|
return !V.current.has(C) && !$.current.has(C);
|
|
6562
6608
|
});
|
|
6563
6609
|
if (l.length === 0) {
|
|
6564
|
-
|
|
6610
|
+
H.every((C) => {
|
|
6565
6611
|
const S = C != null ? String(C) : "all";
|
|
6566
6612
|
return V.current.has(S);
|
|
6567
6613
|
}) && g(!1);
|
|
@@ -6584,16 +6630,16 @@ const pt = {
|
|
|
6584
6630
|
} catch (x) {
|
|
6585
6631
|
f.forEach((C) => $.current.delete(C)), console.error("Failed to load countries:", x);
|
|
6586
6632
|
} finally {
|
|
6587
|
-
|
|
6633
|
+
H.every((C) => {
|
|
6588
6634
|
const S = C != null ? String(C) : "all";
|
|
6589
6635
|
return V.current.has(S);
|
|
6590
6636
|
}) && g(!1);
|
|
6591
6637
|
}
|
|
6592
6638
|
})();
|
|
6593
|
-
}, [
|
|
6639
|
+
}, [H, c]);
|
|
6594
6640
|
const G = (l, f) => {
|
|
6595
6641
|
var C;
|
|
6596
|
-
const D = f ?? ((C =
|
|
6642
|
+
const D = f ?? ((C = at[l]) == null ? void 0 : C.countriesType), x = D != null ? String(D) : "all";
|
|
6597
6643
|
return K[x] || [];
|
|
6598
6644
|
}, _ = {
|
|
6599
6645
|
firstName: 1,
|
|
@@ -6622,7 +6668,7 @@ const pt = {
|
|
|
6622
6668
|
Object.entries(v).filter(([l]) => l in _)
|
|
6623
6669
|
), ie = Object.fromEntries(
|
|
6624
6670
|
Object.entries(A).filter(([l]) => l in _)
|
|
6625
|
-
), [Y,
|
|
6671
|
+
), [Y, we] = k({
|
|
6626
6672
|
workflowKey: p,
|
|
6627
6673
|
firstName: "",
|
|
6628
6674
|
lastName: "",
|
|
@@ -6651,7 +6697,7 @@ const pt = {
|
|
|
6651
6697
|
...ie
|
|
6652
6698
|
}), pe = Object.fromEntries(
|
|
6653
6699
|
Object.entries(v).filter(([l]) => !(l in J) && l !== "externalRefId" && l !== "workflowKey")
|
|
6654
|
-
), [me,
|
|
6700
|
+
), [me, ve] = k({ ...pe }), [F, U] = k(0), [B, j] = k({}), [fe, R] = k(null), [te, ye] = k(!1), oe = (l, f) => we((D) => ({ ...D, [l]: f })), Ne = (l, f) => ve((D) => ({ ...D, [l]: f })), $e = (l) => !l.conditionalOn || me[l.conditionalOn] === "true", Ie = N && F < N.length - 1 ? F + 1 : -1, He = N && F > 0 ? F - 1 : -1, it = (l) => {
|
|
6655
6701
|
var D;
|
|
6656
6702
|
const f = {};
|
|
6657
6703
|
for (const x of l.fields)
|
|
@@ -6663,32 +6709,32 @@ const pt = {
|
|
|
6663
6709
|
}
|
|
6664
6710
|
} else if (x.name) {
|
|
6665
6711
|
const C = x.name;
|
|
6666
|
-
if (z.includes(C) &&
|
|
6667
|
-
const S = x.displayText || ((D =
|
|
6712
|
+
if (z.includes(C) && lt(Y[C])) {
|
|
6713
|
+
const S = x.displayText || ((D = at[C]) == null ? void 0 : D.label) || C;
|
|
6668
6714
|
f[C] = `${S} is required.`;
|
|
6669
6715
|
}
|
|
6670
6716
|
}
|
|
6671
6717
|
return f;
|
|
6672
|
-
},
|
|
6718
|
+
}, Xe = async () => {
|
|
6673
6719
|
if (!N) return;
|
|
6674
6720
|
const l = N[F];
|
|
6675
6721
|
if (l.conditionalOn && !$e(l)) {
|
|
6676
|
-
|
|
6722
|
+
j({}), Ie >= 0 ? U(Ie) : await je();
|
|
6677
6723
|
return;
|
|
6678
6724
|
}
|
|
6679
|
-
const f =
|
|
6725
|
+
const f = it(l);
|
|
6680
6726
|
if (Object.keys(f).length > 0) {
|
|
6681
|
-
|
|
6727
|
+
j(f);
|
|
6682
6728
|
return;
|
|
6683
6729
|
}
|
|
6684
|
-
|
|
6730
|
+
j({}), Ie >= 0 ? U(Ie) : await je();
|
|
6685
6731
|
}, je = async () => {
|
|
6686
6732
|
if (N) {
|
|
6687
6733
|
let l = {};
|
|
6688
6734
|
for (const f of N)
|
|
6689
|
-
$e(f) && (l = { ...l, ...
|
|
6735
|
+
$e(f) && (l = { ...l, ...it(f) });
|
|
6690
6736
|
if (Object.keys(l).length > 0) {
|
|
6691
|
-
|
|
6737
|
+
j(l);
|
|
6692
6738
|
return;
|
|
6693
6739
|
}
|
|
6694
6740
|
}
|
|
@@ -6708,19 +6754,19 @@ const pt = {
|
|
|
6708
6754
|
for (const S of C.fields)
|
|
6709
6755
|
if (!S.isCustom && S.name) {
|
|
6710
6756
|
const ue = S.name, se = Y[ue];
|
|
6711
|
-
|
|
6757
|
+
lt(se) || (l[ue] = se);
|
|
6712
6758
|
}
|
|
6713
6759
|
}
|
|
6714
6760
|
for (const C of ft)
|
|
6715
6761
|
if (l[C] === void 0) {
|
|
6716
6762
|
const S = Y[C];
|
|
6717
|
-
|
|
6763
|
+
lt(S) || (l[C] = S);
|
|
6718
6764
|
}
|
|
6719
6765
|
} else
|
|
6720
6766
|
Q.forEach((C) => {
|
|
6721
6767
|
if (C === "externalRefId") return;
|
|
6722
6768
|
const S = Y[C];
|
|
6723
|
-
|
|
6769
|
+
lt(S) || (l[C] = S);
|
|
6724
6770
|
});
|
|
6725
6771
|
const f = [];
|
|
6726
6772
|
if (N) {
|
|
@@ -6737,7 +6783,7 @@ const pt = {
|
|
|
6737
6783
|
}
|
|
6738
6784
|
}
|
|
6739
6785
|
for (const [C, S] of Object.entries(J))
|
|
6740
|
-
l[C] === void 0 && !
|
|
6786
|
+
l[C] === void 0 && !lt(S) && (l[C] = S);
|
|
6741
6787
|
const D = new Set(f.map((C) => C.paramName));
|
|
6742
6788
|
for (const [C, S] of Object.entries(pe))
|
|
6743
6789
|
!D.has(C) && S && f.push({ paramName: C, value: S });
|
|
@@ -6749,32 +6795,32 @@ const pt = {
|
|
|
6749
6795
|
} finally {
|
|
6750
6796
|
ye(!1);
|
|
6751
6797
|
}
|
|
6752
|
-
},
|
|
6798
|
+
}, ot = async (l) => {
|
|
6753
6799
|
var f;
|
|
6754
6800
|
l.preventDefault();
|
|
6755
6801
|
for (const D of z)
|
|
6756
|
-
if (
|
|
6757
|
-
const x = ((f =
|
|
6802
|
+
if (lt(Y[D])) {
|
|
6803
|
+
const x = ((f = at[D]) == null ? void 0 : f.label) || D;
|
|
6758
6804
|
R(`${x} is required.`);
|
|
6759
6805
|
return;
|
|
6760
6806
|
}
|
|
6761
6807
|
await je();
|
|
6762
|
-
},
|
|
6808
|
+
}, Qe = (l, f, D, x, C) => {
|
|
6763
6809
|
var Nt;
|
|
6764
|
-
const S =
|
|
6810
|
+
const S = at[l];
|
|
6765
6811
|
if (!S) return null;
|
|
6766
|
-
const ue = z.includes(l), se = B[l], be = D || S.label, Pe = l in ie, le = f ?? l,
|
|
6812
|
+
const ue = z.includes(l), se = B[l], be = D || S.label, Pe = l in ie, le = f ?? l, _e = { required: ue }, We = C ? C !== "placeholder" : w, Ge = We ? be : void 0, Wt = We ? "..." : be;
|
|
6767
6813
|
switch (S.type) {
|
|
6768
6814
|
case "select":
|
|
6769
6815
|
if (l === "country" || l === "nationality" || l === "taxCountry" || l === "countryOfBirth" || l === "mobileCountryCode") {
|
|
6770
6816
|
const Re = G(l, x);
|
|
6771
6817
|
return /* @__PURE__ */ r(
|
|
6772
|
-
|
|
6818
|
+
Ve,
|
|
6773
6819
|
{
|
|
6774
|
-
...
|
|
6775
|
-
label:
|
|
6820
|
+
..._e,
|
|
6821
|
+
label: Ge,
|
|
6776
6822
|
value: Y[l] || "",
|
|
6777
|
-
onChange: (
|
|
6823
|
+
onChange: (et) => oe(l, et),
|
|
6778
6824
|
options: [{ value: "", label: `Select ${Wt.toLowerCase()}` }, ...Re],
|
|
6779
6825
|
disabled: E,
|
|
6780
6826
|
readOnly: Pe,
|
|
@@ -6785,14 +6831,14 @@ const pt = {
|
|
|
6785
6831
|
}
|
|
6786
6832
|
if (l === "salutation")
|
|
6787
6833
|
return /* @__PURE__ */ r(
|
|
6788
|
-
|
|
6834
|
+
Ve,
|
|
6789
6835
|
{
|
|
6790
|
-
...
|
|
6791
|
-
label:
|
|
6836
|
+
..._e,
|
|
6837
|
+
label: Ge,
|
|
6792
6838
|
value: ((Nt = Y[l]) == null ? void 0 : Nt.toString()) || "",
|
|
6793
6839
|
onChange: (Re) => oe(l, Re ? Number(Re) : null),
|
|
6794
6840
|
options: [
|
|
6795
|
-
{ value: "", label:
|
|
6841
|
+
{ value: "", label: We ? "Select salutation..." : be },
|
|
6796
6842
|
{ value: bt.Male.toString(), label: "Male" },
|
|
6797
6843
|
{ value: bt.Female.toString(), label: "Female" },
|
|
6798
6844
|
{ value: bt.Other.toString(), label: "Other" }
|
|
@@ -6803,15 +6849,15 @@ const pt = {
|
|
|
6803
6849
|
le
|
|
6804
6850
|
);
|
|
6805
6851
|
if (l === "defaultLanguage") {
|
|
6806
|
-
const Re = c != null && c.allowedLanguages && c.allowedLanguages.length > 0 ? Rt.filter((
|
|
6852
|
+
const Re = c != null && c.allowedLanguages && c.allowedLanguages.length > 0 ? Rt.filter((et) => c.allowedLanguages.includes(et.value)) : Rt;
|
|
6807
6853
|
return /* @__PURE__ */ r(
|
|
6808
|
-
|
|
6854
|
+
Ve,
|
|
6809
6855
|
{
|
|
6810
|
-
...
|
|
6811
|
-
label:
|
|
6856
|
+
..._e,
|
|
6857
|
+
label: Ge,
|
|
6812
6858
|
value: Y[l] || "",
|
|
6813
|
-
onChange: (
|
|
6814
|
-
options: [{ value: "", label:
|
|
6859
|
+
onChange: (et) => oe(l, et),
|
|
6860
|
+
options: [{ value: "", label: We ? "Select language..." : be }, ...Re],
|
|
6815
6861
|
readOnly: Pe,
|
|
6816
6862
|
error: se
|
|
6817
6863
|
},
|
|
@@ -6823,14 +6869,14 @@ const pt = {
|
|
|
6823
6869
|
if (l === "otherNationality") {
|
|
6824
6870
|
const Re = G(l, x);
|
|
6825
6871
|
return /* @__PURE__ */ r(
|
|
6826
|
-
|
|
6872
|
+
rn,
|
|
6827
6873
|
{
|
|
6828
|
-
...
|
|
6829
|
-
label:
|
|
6874
|
+
..._e,
|
|
6875
|
+
label: Ge,
|
|
6830
6876
|
value: Y[l] || [],
|
|
6831
|
-
onChange: (
|
|
6877
|
+
onChange: (et) => oe(l, et),
|
|
6832
6878
|
options: Re,
|
|
6833
|
-
placeholder:
|
|
6879
|
+
placeholder: We ? "Select other nationalities..." : be,
|
|
6834
6880
|
disabled: E,
|
|
6835
6881
|
readOnly: Pe
|
|
6836
6882
|
},
|
|
@@ -6842,10 +6888,10 @@ const pt = {
|
|
|
6842
6888
|
return /* @__PURE__ */ r(
|
|
6843
6889
|
xe,
|
|
6844
6890
|
{
|
|
6845
|
-
...
|
|
6891
|
+
..._e,
|
|
6846
6892
|
type: "date",
|
|
6847
|
-
label:
|
|
6848
|
-
placeholder:
|
|
6893
|
+
label: Ge,
|
|
6894
|
+
placeholder: We ? void 0 : be,
|
|
6849
6895
|
value: Y[l] || "",
|
|
6850
6896
|
onChange: (Re) => oe(l, Re.target.value),
|
|
6851
6897
|
readOnly: Pe,
|
|
@@ -6857,10 +6903,10 @@ const pt = {
|
|
|
6857
6903
|
return /* @__PURE__ */ r(
|
|
6858
6904
|
xe,
|
|
6859
6905
|
{
|
|
6860
|
-
...
|
|
6906
|
+
..._e,
|
|
6861
6907
|
type: "email",
|
|
6862
|
-
label:
|
|
6863
|
-
placeholder:
|
|
6908
|
+
label: Ge,
|
|
6909
|
+
placeholder: We ? void 0 : be,
|
|
6864
6910
|
value: Y[l] || "",
|
|
6865
6911
|
onChange: (Re) => oe(l, Re.target.value),
|
|
6866
6912
|
readOnly: Pe,
|
|
@@ -6872,10 +6918,10 @@ const pt = {
|
|
|
6872
6918
|
return /* @__PURE__ */ r(
|
|
6873
6919
|
xe,
|
|
6874
6920
|
{
|
|
6875
|
-
...
|
|
6921
|
+
..._e,
|
|
6876
6922
|
type: "tel",
|
|
6877
|
-
label:
|
|
6878
|
-
placeholder:
|
|
6923
|
+
label: Ge,
|
|
6924
|
+
placeholder: We ? void 0 : be,
|
|
6879
6925
|
value: Y[l] || "",
|
|
6880
6926
|
onChange: (Re) => oe(l, Re.target.value),
|
|
6881
6927
|
readOnly: Pe,
|
|
@@ -6887,10 +6933,10 @@ const pt = {
|
|
|
6887
6933
|
return /* @__PURE__ */ r(
|
|
6888
6934
|
xe,
|
|
6889
6935
|
{
|
|
6890
|
-
...
|
|
6936
|
+
..._e,
|
|
6891
6937
|
type: "text",
|
|
6892
|
-
label:
|
|
6893
|
-
placeholder:
|
|
6938
|
+
label: Ge,
|
|
6939
|
+
placeholder: We ? void 0 : be,
|
|
6894
6940
|
value: Y[l] || "",
|
|
6895
6941
|
onChange: (Re) => oe(l, Re.target.value),
|
|
6896
6942
|
readOnly: Pe,
|
|
@@ -6963,13 +7009,10 @@ const pt = {
|
|
|
6963
7009
|
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
|
|
6964
7010
|
children: [
|
|
6965
7011
|
/* @__PURE__ */ r(
|
|
6966
|
-
|
|
7012
|
+
Be,
|
|
6967
7013
|
{
|
|
6968
|
-
type: "checkbox",
|
|
6969
7014
|
checked: me[l.paramName] === "true",
|
|
6970
|
-
onChange: (S) => Ne(l.paramName, S
|
|
6971
|
-
className: "metakyc-option-input",
|
|
6972
|
-
style: pt
|
|
7015
|
+
onChange: (S) => Ne(l.paramName, S ? "true" : "false")
|
|
6973
7016
|
}
|
|
6974
7017
|
),
|
|
6975
7018
|
/* @__PURE__ */ o(
|
|
@@ -6997,13 +7040,10 @@ const pt = {
|
|
|
6997
7040
|
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
|
|
6998
7041
|
children: [
|
|
6999
7042
|
/* @__PURE__ */ r(
|
|
7000
|
-
|
|
7043
|
+
Be,
|
|
7001
7044
|
{
|
|
7002
|
-
type: "checkbox",
|
|
7003
7045
|
checked: me[l.paramName] === "true",
|
|
7004
|
-
onChange: (S) => Ne(l.paramName, S
|
|
7005
|
-
className: "metakyc-option-input",
|
|
7006
|
-
style: { ...pt, alignSelf: "flex-start", marginTop: "2px" }
|
|
7046
|
+
onChange: (S) => Ne(l.paramName, S ? "true" : "false")
|
|
7007
7047
|
}
|
|
7008
7048
|
),
|
|
7009
7049
|
/* @__PURE__ */ o(
|
|
@@ -7058,20 +7098,17 @@ const pt = {
|
|
|
7058
7098
|
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
|
|
7059
7099
|
children: [
|
|
7060
7100
|
/* @__PURE__ */ r(
|
|
7061
|
-
|
|
7101
|
+
Be,
|
|
7062
7102
|
{
|
|
7063
|
-
type: "checkbox",
|
|
7064
7103
|
checked: se,
|
|
7065
7104
|
onChange: (be) => {
|
|
7066
7105
|
if (l.singleSelect)
|
|
7067
|
-
Ne(l.paramName, be
|
|
7106
|
+
Ne(l.paramName, be ? ue.value : "");
|
|
7068
7107
|
else {
|
|
7069
|
-
const Pe = be
|
|
7108
|
+
const Pe = be ? [...S, ue.value] : S.filter((le) => le !== ue.value);
|
|
7070
7109
|
Ne(l.paramName, Pe.join(","));
|
|
7071
7110
|
}
|
|
7072
|
-
}
|
|
7073
|
-
className: "metakyc-option-input",
|
|
7074
|
-
style: pt
|
|
7111
|
+
}
|
|
7075
7112
|
}
|
|
7076
7113
|
),
|
|
7077
7114
|
/* @__PURE__ */ r(
|
|
@@ -7116,7 +7153,7 @@ const pt = {
|
|
|
7116
7153
|
onChange: () => Ne(l.paramName, S.value),
|
|
7117
7154
|
name: `radio-group-${l.paramName}-${f}`,
|
|
7118
7155
|
className: "metakyc-option-input",
|
|
7119
|
-
style:
|
|
7156
|
+
style: Mn
|
|
7120
7157
|
}
|
|
7121
7158
|
),
|
|
7122
7159
|
/* @__PURE__ */ r(
|
|
@@ -7155,13 +7192,10 @@ const pt = {
|
|
|
7155
7192
|
style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer", margin: 0, padding: 0 },
|
|
7156
7193
|
children: [
|
|
7157
7194
|
/* @__PURE__ */ r(
|
|
7158
|
-
|
|
7195
|
+
Be,
|
|
7159
7196
|
{
|
|
7160
|
-
type: "checkbox",
|
|
7161
7197
|
checked: D,
|
|
7162
|
-
onChange: (x) => Ne(l.conditionalOn, x
|
|
7163
|
-
className: "metakyc-option-input",
|
|
7164
|
-
style: pt
|
|
7198
|
+
onChange: (x) => Ne(l.conditionalOn, x ? "true" : "false")
|
|
7165
7199
|
}
|
|
7166
7200
|
),
|
|
7167
7201
|
/* @__PURE__ */ r(
|
|
@@ -7177,7 +7211,7 @@ const pt = {
|
|
|
7177
7211
|
) }),
|
|
7178
7212
|
D && /* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children: l.fields.map((x, C) => {
|
|
7179
7213
|
const S = Math.min(4, Math.max(1, Number(x.colSpan) || 4)), ue = x.isCustom ? `custom-${C}-${x.paramName}` : `builtin-${x.name}-${C}`;
|
|
7180
|
-
return /* @__PURE__ */ r("div", { style: { gridColumn: `span ${S} / span ${S}` }, children: /* @__PURE__ */ r(Lt, { helpText: x.helpText, children: x.isCustom ? h(x, C) :
|
|
7214
|
+
return /* @__PURE__ */ r("div", { style: { gridColumn: `span ${S} / span ${S}` }, children: /* @__PURE__ */ r(Lt, { helpText: x.helpText, children: x.isCustom ? h(x, C) : Qe(x.name, ue, x.displayText, x.countriesType, x.labelMode) }) }, ue);
|
|
7181
7215
|
}) })
|
|
7182
7216
|
] });
|
|
7183
7217
|
};
|
|
@@ -7187,7 +7221,7 @@ const pt = {
|
|
|
7187
7221
|
/* @__PURE__ */ r("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: "Loading form…" })
|
|
7188
7222
|
] }) }) });
|
|
7189
7223
|
if (N) {
|
|
7190
|
-
const l = N[F] ?? N[0], f =
|
|
7224
|
+
const l = N[F] ?? N[0], f = He === -1, D = Ie === -1, x = N.length, C = $e(l), S = Object.values(B);
|
|
7191
7225
|
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ o(re, { children: [
|
|
7192
7226
|
/* @__PURE__ */ r(Se, { children: /* @__PURE__ */ r(mt, { title: (c == null ? void 0 : c.title) || "Create Applicant" }) }),
|
|
7193
7227
|
/* @__PURE__ */ o(ne, { children: [
|
|
@@ -7254,7 +7288,7 @@ const pt = {
|
|
|
7254
7288
|
type: "button",
|
|
7255
7289
|
variant: "outline",
|
|
7256
7290
|
onClick: () => {
|
|
7257
|
-
U(
|
|
7291
|
+
U(He), j({});
|
|
7258
7292
|
},
|
|
7259
7293
|
disabled: te || y,
|
|
7260
7294
|
children: "Previous"
|
|
@@ -7267,14 +7301,14 @@ const pt = {
|
|
|
7267
7301
|
{
|
|
7268
7302
|
type: "button",
|
|
7269
7303
|
isLoading: te || y,
|
|
7270
|
-
onClick: D ? je :
|
|
7304
|
+
onClick: D ? je : Xe,
|
|
7271
7305
|
children: D ? l.conditionalOn && !C ? "Skip & Submit" : "Submit" : l.conditionalOn && !C ? "Skip" : "Next"
|
|
7272
7306
|
}
|
|
7273
7307
|
)
|
|
7274
7308
|
] })
|
|
7275
7309
|
] }) });
|
|
7276
7310
|
}
|
|
7277
|
-
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit:
|
|
7311
|
+
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit: ot, children: /* @__PURE__ */ o(re, { children: [
|
|
7278
7312
|
/* @__PURE__ */ r(Se, { children: /* @__PURE__ */ r(mt, { title: (c == null ? void 0 : c.title) || "Create Applicant" }) }),
|
|
7279
7313
|
/* @__PURE__ */ o(ne, { children: [
|
|
7280
7314
|
fe && /* @__PURE__ */ r("div", { className: "mb-6 p-4 bg-red-50 border border-red-200 rounded-lg", children: /* @__PURE__ */ o("p", { className: "text-red-600 text-sm", children: [
|
|
@@ -7282,7 +7316,7 @@ const pt = {
|
|
|
7282
7316
|
" ",
|
|
7283
7317
|
fe
|
|
7284
7318
|
] }) }),
|
|
7285
|
-
/* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children: Q.map((l) => /* @__PURE__ */ r("div", { style: { gridColumn: "span 4 / span 4" }, children:
|
|
7319
|
+
/* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children: Q.map((l) => /* @__PURE__ */ r("div", { style: { gridColumn: "span 4 / span 4" }, children: Qe(l) }, l)) })
|
|
7286
7320
|
] }),
|
|
7287
7321
|
/* @__PURE__ */ o(Ce, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
7288
7322
|
a && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: a, disabled: te || y, children: "Cancel" }),
|
|
@@ -7293,14 +7327,14 @@ const pt = {
|
|
|
7293
7327
|
function kt(e) {
|
|
7294
7328
|
return e == null || e === "" || Array.isArray(e) && e.length === 0;
|
|
7295
7329
|
}
|
|
7296
|
-
const
|
|
7330
|
+
const ra = ({
|
|
7297
7331
|
workflowKey: e,
|
|
7298
7332
|
externalRefId: t,
|
|
7299
7333
|
onSuccess: n,
|
|
7300
7334
|
onCancel: a
|
|
7301
7335
|
}) => {
|
|
7302
|
-
var
|
|
7303
|
-
const { config: i, baseInformationService: s, currentTheme: c } = Te(), { createCompanyApplicant: d, isLoading: y } = zt(), p = e || ((
|
|
7336
|
+
var Qe, h, O, q, W, X;
|
|
7337
|
+
const { config: i, baseInformationService: s, currentTheme: c } = Te(), { createCompanyApplicant: d, isLoading: y } = zt(), p = e || ((Qe = i.applicantForm) == null ? void 0 : Qe.workflowKey);
|
|
7304
7338
|
if (!p)
|
|
7305
7339
|
throw new Error(
|
|
7306
7340
|
"workflowKey is required. Provide it either as a prop to CreateCompanyApplicantForm or set it in config.applicantForm.workflowKey"
|
|
@@ -7330,12 +7364,12 @@ const Xn = ({
|
|
|
7330
7364
|
if (w)
|
|
7331
7365
|
for (const u of w)
|
|
7332
7366
|
for (const l of u.fields)
|
|
7333
|
-
!l.isCustom && l.name && Q.has(l.name) && m.add(l.countriesType ?? ((I =
|
|
7367
|
+
!l.isCustom && l.name && Q.has(l.name) && m.add(l.countriesType ?? ((I = st[l.name]) == null ? void 0 : I.countriesType));
|
|
7334
7368
|
else
|
|
7335
7369
|
for (const u of z)
|
|
7336
|
-
Q.has(u) && m.add((L =
|
|
7370
|
+
Q.has(u) && m.add((L = st[u]) == null ? void 0 : L.countriesType);
|
|
7337
7371
|
return m.size === 0 && m.add(void 0), Array.from(m);
|
|
7338
|
-
}, [z, w]), [
|
|
7372
|
+
}, [z, w]), [H, K] = k({}), [ee, E] = k(!0), g = de(/* @__PURE__ */ new Set()), $ = de(/* @__PURE__ */ new Set());
|
|
7339
7373
|
ge(() => {
|
|
7340
7374
|
if (!c) return;
|
|
7341
7375
|
const m = M.filter((u) => {
|
|
@@ -7366,8 +7400,8 @@ const Xn = ({
|
|
|
7366
7400
|
}, [M, c]);
|
|
7367
7401
|
const V = (m, I) => {
|
|
7368
7402
|
var l;
|
|
7369
|
-
const L = I ?? ((l =
|
|
7370
|
-
return
|
|
7403
|
+
const L = I ?? ((l = st[m]) == null ? void 0 : l.countriesType), u = L != null ? String(L) : "all";
|
|
7404
|
+
return H[u] || [];
|
|
7371
7405
|
}, G = {
|
|
7372
7406
|
companyName: 1,
|
|
7373
7407
|
registrationNumber: 1,
|
|
@@ -7413,7 +7447,7 @@ const Xn = ({
|
|
|
7413
7447
|
lei: "",
|
|
7414
7448
|
externalRefId: b,
|
|
7415
7449
|
..._
|
|
7416
|
-
}), [Y,
|
|
7450
|
+
}), [Y, we] = k({}), [pe, me] = k(0), [ve, F] = k({}), [U, B] = k(null), [j, fe] = k(!1), R = (m, I) => ie((L) => ({ ...L, [m]: I })), te = (m, I) => we((L) => ({ ...L, [m]: I })), ye = (m) => !m.conditionalOn || Y[m.conditionalOn] === "true", oe = w && pe < w.length - 1 ? pe + 1 : -1, Ne = w && pe > 0 ? pe - 1 : -1, $e = (m) => {
|
|
7417
7451
|
var L;
|
|
7418
7452
|
const I = {};
|
|
7419
7453
|
for (const u of m.fields)
|
|
@@ -7426,7 +7460,7 @@ const Xn = ({
|
|
|
7426
7460
|
} else if (u.name) {
|
|
7427
7461
|
const l = u.name;
|
|
7428
7462
|
if (N.includes(l) && kt(J[l])) {
|
|
7429
|
-
const f = u.displayText || ((L =
|
|
7463
|
+
const f = u.displayText || ((L = st[l]) == null ? void 0 : L.label) || l;
|
|
7430
7464
|
I[l] = `${f} is required.`;
|
|
7431
7465
|
}
|
|
7432
7466
|
}
|
|
@@ -7435,7 +7469,7 @@ const Xn = ({
|
|
|
7435
7469
|
if (!w) return;
|
|
7436
7470
|
const m = w[pe];
|
|
7437
7471
|
if (m.conditionalOn && !ye(m)) {
|
|
7438
|
-
F({}), oe >= 0 ? me(oe) : await
|
|
7472
|
+
F({}), oe >= 0 ? me(oe) : await He();
|
|
7439
7473
|
return;
|
|
7440
7474
|
}
|
|
7441
7475
|
const I = $e(m);
|
|
@@ -7443,8 +7477,8 @@ const Xn = ({
|
|
|
7443
7477
|
F(I);
|
|
7444
7478
|
return;
|
|
7445
7479
|
}
|
|
7446
|
-
F({}), oe >= 0 ? me(oe) : await
|
|
7447
|
-
},
|
|
7480
|
+
F({}), oe >= 0 ? me(oe) : await He();
|
|
7481
|
+
}, He = async () => {
|
|
7448
7482
|
var m;
|
|
7449
7483
|
if (w) {
|
|
7450
7484
|
let I = {};
|
|
@@ -7516,31 +7550,31 @@ const Xn = ({
|
|
|
7516
7550
|
} finally {
|
|
7517
7551
|
fe(!1);
|
|
7518
7552
|
}
|
|
7519
|
-
},
|
|
7553
|
+
}, it = async (m) => {
|
|
7520
7554
|
var I;
|
|
7521
7555
|
m.preventDefault();
|
|
7522
7556
|
for (const L of N)
|
|
7523
7557
|
if (kt(J[L])) {
|
|
7524
|
-
const u = ((I =
|
|
7558
|
+
const u = ((I = st[L]) == null ? void 0 : I.label) || L;
|
|
7525
7559
|
B(`${u} is required.`);
|
|
7526
7560
|
return;
|
|
7527
7561
|
}
|
|
7528
|
-
await
|
|
7529
|
-
},
|
|
7530
|
-
const f =
|
|
7562
|
+
await He();
|
|
7563
|
+
}, Xe = (m, I, L, u, l) => {
|
|
7564
|
+
const f = st[m];
|
|
7531
7565
|
if (!f) return null;
|
|
7532
|
-
const D = N.includes(m), x =
|
|
7566
|
+
const D = N.includes(m), x = ve[m], C = L || f.label, S = m in _, ue = I ?? m, se = l ? l !== "placeholder" : T, be = se ? C : void 0, Pe = se ? "..." : C;
|
|
7533
7567
|
switch (f.type) {
|
|
7534
7568
|
case "select":
|
|
7535
7569
|
if (m === "countryResidence" || m === "addressCountry") {
|
|
7536
7570
|
const le = V(m, u);
|
|
7537
7571
|
return /* @__PURE__ */ r(
|
|
7538
|
-
|
|
7572
|
+
Ve,
|
|
7539
7573
|
{
|
|
7540
7574
|
required: D,
|
|
7541
7575
|
label: be,
|
|
7542
7576
|
value: J[m] || "",
|
|
7543
|
-
onChange: (
|
|
7577
|
+
onChange: (_e) => R(m, _e),
|
|
7544
7578
|
options: [{ value: "", label: `Select ${Pe.toLowerCase()}` }, ...le],
|
|
7545
7579
|
disabled: ee,
|
|
7546
7580
|
readOnly: S,
|
|
@@ -7637,16 +7671,14 @@ const Xn = ({
|
|
|
7637
7671
|
}
|
|
7638
7672
|
) }, `custom-${I}`);
|
|
7639
7673
|
if (!m.paramName) return null;
|
|
7640
|
-
const L =
|
|
7674
|
+
const L = ve[m.paramName], u = m.displayText || m.label || m.paramName, l = m.labelMode ? m.labelMode !== "placeholder" : T;
|
|
7641
7675
|
return m.customType === "checkbox" ? /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: [
|
|
7642
7676
|
/* @__PURE__ */ o("label", { style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer" }, children: [
|
|
7643
7677
|
/* @__PURE__ */ r(
|
|
7644
|
-
|
|
7678
|
+
Be,
|
|
7645
7679
|
{
|
|
7646
|
-
type: "checkbox",
|
|
7647
7680
|
checked: Y[m.paramName] === "true",
|
|
7648
|
-
onChange: (f) => te(m.paramName, f
|
|
7649
|
-
style: { width: "16px", height: "16px", accentColor: "var(--metakyc-primary, #2563eb)" }
|
|
7681
|
+
onChange: (f) => te(m.paramName, f ? "true" : "false")
|
|
7650
7682
|
}
|
|
7651
7683
|
),
|
|
7652
7684
|
/* @__PURE__ */ o("span", { style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)" }, children: [
|
|
@@ -7668,24 +7700,22 @@ const Xn = ({
|
|
|
7668
7700
|
},
|
|
7669
7701
|
`custom-${I}`
|
|
7670
7702
|
);
|
|
7671
|
-
},
|
|
7703
|
+
}, ot = (m) => {
|
|
7672
7704
|
const I = ye(m);
|
|
7673
7705
|
return /* @__PURE__ */ o("div", { className: "space-y-4", children: [
|
|
7674
7706
|
m.conditionalOn && /* @__PURE__ */ o("label", { style: { display: "flex", alignItems: "center", gap: "10px", cursor: "pointer" }, children: [
|
|
7675
7707
|
/* @__PURE__ */ r(
|
|
7676
|
-
|
|
7708
|
+
Be,
|
|
7677
7709
|
{
|
|
7678
|
-
type: "checkbox",
|
|
7679
7710
|
checked: I,
|
|
7680
|
-
onChange: (L) => te(m.conditionalOn, L
|
|
7681
|
-
style: { width: "16px", height: "16px", accentColor: "var(--metakyc-primary, #2563eb)" }
|
|
7711
|
+
onChange: (L) => te(m.conditionalOn, L ? "true" : "false")
|
|
7682
7712
|
}
|
|
7683
7713
|
),
|
|
7684
7714
|
/* @__PURE__ */ r("span", { style: { fontSize: "14px", fontWeight: 500 }, children: m.conditionalOn })
|
|
7685
7715
|
] }),
|
|
7686
7716
|
I && /* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children: m.fields.map((L, u) => {
|
|
7687
7717
|
const l = Math.min(4, Math.max(1, Number(L.colSpan) || 4)), f = L.isCustom ? `custom-${u}-${L.paramName}` : `builtin-${L.name}-${u}`;
|
|
7688
|
-
return /* @__PURE__ */ r("div", { style: { gridColumn: `span ${l} / span ${l}` }, children: L.isCustom ? je(L, u) :
|
|
7718
|
+
return /* @__PURE__ */ r("div", { style: { gridColumn: `span ${l} / span ${l}` }, children: L.isCustom ? je(L, u) : Xe(L.name, f, L.displayText, L.countriesType, L.labelMode) }, f);
|
|
7689
7719
|
}) })
|
|
7690
7720
|
] });
|
|
7691
7721
|
};
|
|
@@ -7695,7 +7725,7 @@ const Xn = ({
|
|
|
7695
7725
|
/* @__PURE__ */ r("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: "Loading form…" })
|
|
7696
7726
|
] }) }) });
|
|
7697
7727
|
if (w) {
|
|
7698
|
-
const m = w[pe] ?? w[0], I = Ne === -1, L = oe === -1, u = w.length, l = ye(m), f = Object.values(
|
|
7728
|
+
const m = w[pe] ?? w[0], I = Ne === -1, L = oe === -1, u = w.length, l = ye(m), f = Object.values(ve);
|
|
7699
7729
|
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ o(re, { children: [
|
|
7700
7730
|
/* @__PURE__ */ r(Se, { children: /* @__PURE__ */ r(mt, { title: (c == null ? void 0 : c.title) || "Company Registration" }) }),
|
|
7701
7731
|
/* @__PURE__ */ o(ne, { children: [
|
|
@@ -7730,7 +7760,7 @@ const Xn = ({
|
|
|
7730
7760
|
u
|
|
7731
7761
|
] })
|
|
7732
7762
|
] }),
|
|
7733
|
-
|
|
7763
|
+
ot(m)
|
|
7734
7764
|
] }),
|
|
7735
7765
|
/* @__PURE__ */ o(Ce, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
7736
7766
|
/* @__PURE__ */ o("div", { children: [
|
|
@@ -7742,17 +7772,17 @@ const Xn = ({
|
|
|
7742
7772
|
onClick: () => {
|
|
7743
7773
|
me(Ne), F({});
|
|
7744
7774
|
},
|
|
7745
|
-
disabled:
|
|
7775
|
+
disabled: j || y,
|
|
7746
7776
|
children: "Previous"
|
|
7747
7777
|
}
|
|
7748
7778
|
),
|
|
7749
|
-
I && a && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: a, disabled:
|
|
7779
|
+
I && a && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: a, disabled: j || y, children: "Cancel" })
|
|
7750
7780
|
] }),
|
|
7751
|
-
/* @__PURE__ */ r(Z, { type: "button", isLoading:
|
|
7781
|
+
/* @__PURE__ */ r(Z, { type: "button", isLoading: j || y, onClick: L ? He : Ie, children: L ? m.conditionalOn && !l ? "Skip & Submit" : "Submit" : m.conditionalOn && !l ? "Skip" : "Next" })
|
|
7752
7782
|
] })
|
|
7753
7783
|
] }) });
|
|
7754
7784
|
}
|
|
7755
|
-
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit:
|
|
7785
|
+
return /* @__PURE__ */ r("div", { className: "metakyc-sdk", children: /* @__PURE__ */ r("form", { onSubmit: it, children: /* @__PURE__ */ o(re, { children: [
|
|
7756
7786
|
/* @__PURE__ */ r(Se, { children: /* @__PURE__ */ r(mt, { title: (c == null ? void 0 : c.title) || "Company Registration" }) }),
|
|
7757
7787
|
/* @__PURE__ */ o(ne, { children: [
|
|
7758
7788
|
U && /* @__PURE__ */ r("div", { className: "mb-6 p-4 bg-red-50 border border-red-200 rounded-lg", children: /* @__PURE__ */ o("p", { className: "text-red-600 text-sm", children: [
|
|
@@ -7760,14 +7790,14 @@ const Xn = ({
|
|
|
7760
7790
|
" ",
|
|
7761
7791
|
U
|
|
7762
7792
|
] }) }),
|
|
7763
|
-
/* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children: z.map((m) => /* @__PURE__ */ r("div", { style: { gridColumn: "span 4 / span 4" }, children:
|
|
7793
|
+
/* @__PURE__ */ r("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, minmax(0, 1fr))", gap: "1rem" }, children: z.map((m) => /* @__PURE__ */ r("div", { style: { gridColumn: "span 4 / span 4" }, children: Xe(m) }, m)) })
|
|
7764
7794
|
] }),
|
|
7765
7795
|
/* @__PURE__ */ o(Ce, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
7766
|
-
a && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: a, disabled:
|
|
7767
|
-
/* @__PURE__ */ r(Z, { type: "submit", isLoading:
|
|
7796
|
+
a && /* @__PURE__ */ r(Z, { type: "button", variant: "outline", onClick: a, disabled: j || y, children: "Cancel" }),
|
|
7797
|
+
/* @__PURE__ */ r(Z, { type: "submit", isLoading: j || y, children: "Register Company" })
|
|
7768
7798
|
] })
|
|
7769
7799
|
] }) }) });
|
|
7770
|
-
},
|
|
7800
|
+
}, na = ({
|
|
7771
7801
|
applicantId: e,
|
|
7772
7802
|
onComplete: t,
|
|
7773
7803
|
onError: n,
|
|
@@ -7785,14 +7815,14 @@ const Xn = ({
|
|
|
7785
7815
|
error: v,
|
|
7786
7816
|
moveBack: A,
|
|
7787
7817
|
refreshProgress: T
|
|
7788
|
-
} =
|
|
7789
|
-
if (
|
|
7818
|
+
} = Vr(e), [w, N] = ke.useState(!1), z = ke.useRef(null);
|
|
7819
|
+
if (ke.useEffect(() => {
|
|
7790
7820
|
v && n && n(v);
|
|
7791
|
-
}, [v, n]),
|
|
7821
|
+
}, [v, n]), ke.useEffect(() => {
|
|
7792
7822
|
s != null && s.workflowResult && t && t(s.workflowResult);
|
|
7793
|
-
}, [s == null ? void 0 : s.workflowResult, t]),
|
|
7823
|
+
}, [s == null ? void 0 : s.workflowResult, t]), ke.useEffect(() => {
|
|
7794
7824
|
a === "dark" ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
|
|
7795
|
-
}, [a]),
|
|
7825
|
+
}, [a]), ke.useEffect(() => {
|
|
7796
7826
|
b && N(!1);
|
|
7797
7827
|
}, [b]), P || !s)
|
|
7798
7828
|
return /* @__PURE__ */ r("div", { className: `metakyc-sdk ${i || ""}`, children: /* @__PURE__ */ r(re, { children: /* @__PURE__ */ o(ne, { children: [
|
|
@@ -7900,7 +7930,7 @@ const Xn = ({
|
|
|
7900
7930
|
transition: "width 0.4s ease"
|
|
7901
7931
|
} }) }) }),
|
|
7902
7932
|
/* @__PURE__ */ r(
|
|
7903
|
-
|
|
7933
|
+
On,
|
|
7904
7934
|
{
|
|
7905
7935
|
ref: z,
|
|
7906
7936
|
visibleSteps: K,
|
|
@@ -7909,7 +7939,7 @@ const Xn = ({
|
|
|
7909
7939
|
}
|
|
7910
7940
|
)
|
|
7911
7941
|
] });
|
|
7912
|
-
},
|
|
7942
|
+
}, H = () => {
|
|
7913
7943
|
const K = {
|
|
7914
7944
|
applicantId: e,
|
|
7915
7945
|
onComplete: async () => {
|
|
@@ -7919,20 +7949,20 @@ const Xn = ({
|
|
|
7919
7949
|
};
|
|
7920
7950
|
switch (c.action) {
|
|
7921
7951
|
case ce.Questionaries:
|
|
7922
|
-
return /* @__PURE__ */ r(
|
|
7952
|
+
return /* @__PURE__ */ r(fn, { ...K });
|
|
7923
7953
|
case ce.UploadDocument:
|
|
7924
|
-
return /* @__PURE__ */ r(
|
|
7954
|
+
return /* @__PURE__ */ r(xn, { ...K });
|
|
7925
7955
|
case ce.Overview:
|
|
7926
|
-
return /* @__PURE__ */ r(
|
|
7956
|
+
return /* @__PURE__ */ r(vn, { ...K });
|
|
7927
7957
|
case ce.IdentitySdk:
|
|
7928
|
-
return /* @__PURE__ */ r(
|
|
7958
|
+
return /* @__PURE__ */ r(Ln, { ...K });
|
|
7929
7959
|
case ce.RiskScoring:
|
|
7930
|
-
return /* @__PURE__ */ r(
|
|
7960
|
+
return /* @__PURE__ */ r(Rn, { ...K });
|
|
7931
7961
|
case ce.AdditionalData:
|
|
7932
7962
|
case ce.InvestorCategorization:
|
|
7933
|
-
return /* @__PURE__ */ r(
|
|
7963
|
+
return /* @__PURE__ */ r(Fn, { ...K });
|
|
7934
7964
|
case ce.AppropriatenessTest:
|
|
7935
|
-
return /* @__PURE__ */ r(
|
|
7965
|
+
return /* @__PURE__ */ r(An, { ...K });
|
|
7936
7966
|
case ce.ManualReview:
|
|
7937
7967
|
return /* @__PURE__ */ r(
|
|
7938
7968
|
Pt,
|
|
@@ -7959,12 +7989,12 @@ const Xn = ({
|
|
|
7959
7989
|
};
|
|
7960
7990
|
return /* @__PURE__ */ o("div", { className: `metakyc-sdk ${i || ""}`, children: [
|
|
7961
7991
|
M(),
|
|
7962
|
-
|
|
7992
|
+
H()
|
|
7963
7993
|
] });
|
|
7964
|
-
},
|
|
7994
|
+
}, On = ke.forwardRef(
|
|
7965
7995
|
({ visibleSteps: e, currentVisibleStepIndex: t, getStepFallbackName: n }, a) => {
|
|
7966
|
-
const i =
|
|
7967
|
-
return
|
|
7996
|
+
const i = ke.useRef(null), s = ke.useRef(null);
|
|
7997
|
+
return ke.useImperativeHandle(a, () => i.current), ke.useEffect(() => {
|
|
7968
7998
|
if (s.current && i.current) {
|
|
7969
7999
|
const c = i.current, d = s.current, y = d.offsetLeft - c.offsetWidth / 2 + d.offsetWidth / 2;
|
|
7970
8000
|
c.scrollTo({ left: Math.max(0, y), behavior: "smooth" });
|
|
@@ -7987,7 +8017,7 @@ const Xn = ({
|
|
|
7987
8017
|
},
|
|
7988
8018
|
children: e.map((c, d) => {
|
|
7989
8019
|
const y = d < t, p = d === t, b = y || p, P = c.displayName || c.name || n(c.action) || `Step ${d + 1}`;
|
|
7990
|
-
return /* @__PURE__ */ o(
|
|
8020
|
+
return /* @__PURE__ */ o(ke.Fragment, { children: [
|
|
7991
8021
|
/* @__PURE__ */ o(
|
|
7992
8022
|
"div",
|
|
7993
8023
|
{
|
|
@@ -8046,13 +8076,13 @@ const Xn = ({
|
|
|
8046
8076
|
);
|
|
8047
8077
|
}
|
|
8048
8078
|
);
|
|
8049
|
-
function
|
|
8050
|
-
return
|
|
8051
|
-
questionResults:
|
|
8079
|
+
function aa(e) {
|
|
8080
|
+
return Ye.object({
|
|
8081
|
+
questionResults: Ye.any()
|
|
8052
8082
|
}).passthrough();
|
|
8053
8083
|
}
|
|
8054
|
-
function
|
|
8055
|
-
let t =
|
|
8084
|
+
function zn(e) {
|
|
8085
|
+
let t = Ye.array(Ye.instanceof(File));
|
|
8056
8086
|
if (e.isRequired ? t = t.min(
|
|
8057
8087
|
1,
|
|
8058
8088
|
`${e.displayName} is required`
|
|
@@ -8073,27 +8103,27 @@ function Dn(e) {
|
|
|
8073
8103
|
}
|
|
8074
8104
|
return t;
|
|
8075
8105
|
}
|
|
8076
|
-
function
|
|
8106
|
+
function ia(e) {
|
|
8077
8107
|
const t = {};
|
|
8078
8108
|
return e.uploadDocumentFiles.forEach((n) => {
|
|
8079
8109
|
const a = `file_${n.id}`;
|
|
8080
|
-
t[a] =
|
|
8081
|
-
}),
|
|
8110
|
+
t[a] = zn(n);
|
|
8111
|
+
}), Ye.object(t);
|
|
8082
8112
|
}
|
|
8083
|
-
function
|
|
8084
|
-
return
|
|
8113
|
+
function oa(e) {
|
|
8114
|
+
return Ye.any();
|
|
8085
8115
|
}
|
|
8086
|
-
function
|
|
8087
|
-
return
|
|
8116
|
+
function $n(e) {
|
|
8117
|
+
return Ye.string().min(1, "This question is required");
|
|
8088
8118
|
}
|
|
8089
|
-
function
|
|
8119
|
+
function sa(e) {
|
|
8090
8120
|
const t = {};
|
|
8091
8121
|
return e.appropriatenessQuestions.forEach((n) => {
|
|
8092
8122
|
const a = `question_${n.id}`;
|
|
8093
|
-
t[a] =
|
|
8094
|
-
}),
|
|
8123
|
+
t[a] = $n();
|
|
8124
|
+
}), Ye.object(t);
|
|
8095
8125
|
}
|
|
8096
|
-
const
|
|
8126
|
+
const la = Ye.any();
|
|
8097
8127
|
export {
|
|
8098
8128
|
Rt as ALLOWED_LANGUAGES,
|
|
8099
8129
|
Jt as ApplicantProgressOnHoldReason,
|
|
@@ -8102,62 +8132,64 @@ export {
|
|
|
8102
8132
|
Xt as ApplicantStatus,
|
|
8103
8133
|
ar as AppropriatenessQuestionType,
|
|
8104
8134
|
fr as AppropriatenessTestService,
|
|
8105
|
-
|
|
8135
|
+
An as AppropriatenessTestStep,
|
|
8106
8136
|
$t as Badge,
|
|
8107
8137
|
vr as BaseInformationService,
|
|
8108
8138
|
Z as Button,
|
|
8109
|
-
|
|
8139
|
+
st as COMPANY_FIELD_METADATA,
|
|
8110
8140
|
re as Card,
|
|
8111
8141
|
ne as CardContent,
|
|
8112
8142
|
Ce as CardFooter,
|
|
8113
8143
|
Se as CardHeader,
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8144
|
+
Be as Checkbox,
|
|
8145
|
+
Ze as CountriesType,
|
|
8146
|
+
ta as CreateApplicantForm,
|
|
8147
|
+
ra as CreateCompanyApplicantForm,
|
|
8117
8148
|
or as CriteriaBuiltInType,
|
|
8118
8149
|
lr as DEFAULT_COMPANY_VISIBLE_FIELDS,
|
|
8119
8150
|
cr as DEFAULT_VISIBLE_FIELDS,
|
|
8120
8151
|
nr as DocumentReviewStatus,
|
|
8121
8152
|
ur as EndpointBuilder,
|
|
8122
|
-
|
|
8153
|
+
ut as ErrorHandler,
|
|
8123
8154
|
Fr as EventEmitter,
|
|
8124
|
-
|
|
8155
|
+
at as FIELD_METADATA,
|
|
8125
8156
|
rr as FileType,
|
|
8126
|
-
|
|
8157
|
+
an as FileUpload,
|
|
8127
8158
|
bt as GenderType,
|
|
8128
8159
|
mt as Header,
|
|
8129
8160
|
pr as HttpClient,
|
|
8130
|
-
|
|
8161
|
+
Je as IdentityProviderManager,
|
|
8131
8162
|
xr as IdentityService,
|
|
8132
8163
|
Oe as IdentityVerificationProvider,
|
|
8133
|
-
|
|
8164
|
+
Ln as IdentityVerificationStep,
|
|
8134
8165
|
xe as Input,
|
|
8135
8166
|
kr as InvestorCategorizationService,
|
|
8136
|
-
|
|
8167
|
+
Fn as InvestorCategorizationStep,
|
|
8137
8168
|
Ee as InvestorCategorizationType,
|
|
8138
8169
|
sr as InvestorCategoryType,
|
|
8139
8170
|
er as KycProcessStatus,
|
|
8140
|
-
|
|
8171
|
+
rt as KycStatus,
|
|
8141
8172
|
Pt as KycStatusDisplay,
|
|
8142
|
-
|
|
8143
|
-
|
|
8173
|
+
na as KycWorkflow,
|
|
8174
|
+
Dn as Logo,
|
|
8144
8175
|
Ot as MetaKYCContext,
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
|
|
8176
|
+
Ke as MetaKYCError,
|
|
8177
|
+
Yn as MetaKYCProvider,
|
|
8178
|
+
rn as MultiSelect,
|
|
8148
8179
|
Or as OnfidoProvider,
|
|
8149
8180
|
gr as OverviewService,
|
|
8150
|
-
|
|
8151
|
-
|
|
8181
|
+
vn as OverviewStep,
|
|
8182
|
+
on as PhoneInput,
|
|
8152
8183
|
yr as QuestionnaireService,
|
|
8153
|
-
|
|
8154
|
-
|
|
8184
|
+
fn as QuestionnaireStep,
|
|
8185
|
+
nt as ReviewStatus,
|
|
8155
8186
|
ir as RiskCriteriaType,
|
|
8156
8187
|
Zt as RiskLevel,
|
|
8157
8188
|
br as RiskScoringService,
|
|
8158
|
-
|
|
8189
|
+
Rn as RiskScoringStep,
|
|
8190
|
+
_r as SDK_VERSION,
|
|
8159
8191
|
zr as SardinAIProvider,
|
|
8160
|
-
|
|
8192
|
+
Ve as SearchableSelect,
|
|
8161
8193
|
Ct as Select,
|
|
8162
8194
|
Me as Spinner,
|
|
8163
8195
|
Tr as StepRouter,
|
|
@@ -8166,51 +8198,51 @@ export {
|
|
|
8166
8198
|
Fe as ThemePreset,
|
|
8167
8199
|
Er as ThemeService,
|
|
8168
8200
|
hr as UploadDocumentService,
|
|
8169
|
-
|
|
8201
|
+
xn as UploadDocumentStep,
|
|
8170
8202
|
tr as UserType,
|
|
8171
|
-
|
|
8203
|
+
qe as ValueDataType,
|
|
8172
8204
|
Pr as WorkflowOrchestrator,
|
|
8173
8205
|
gt as WorkflowResultType,
|
|
8174
8206
|
Ar as WorkflowState,
|
|
8175
8207
|
ce as WorkflowStepAction,
|
|
8176
|
-
|
|
8177
|
-
|
|
8178
|
-
|
|
8179
|
-
|
|
8208
|
+
la as appropriatenessTestSchema,
|
|
8209
|
+
Xn as clearAllStorage,
|
|
8210
|
+
Ur as clearApplicantId,
|
|
8211
|
+
qr as clearWorkflowState,
|
|
8180
8212
|
Ae as cn,
|
|
8181
8213
|
wr as corporateTheme,
|
|
8182
8214
|
dr as defaultConfig,
|
|
8183
8215
|
Le as defaultTheme,
|
|
8184
|
-
|
|
8216
|
+
Hr as fileToBase64,
|
|
8185
8217
|
Sr as fintechTheme,
|
|
8186
8218
|
xt as formatFileSize,
|
|
8187
|
-
|
|
8188
|
-
|
|
8189
|
-
|
|
8190
|
-
|
|
8191
|
-
|
|
8192
|
-
|
|
8193
|
-
|
|
8194
|
-
|
|
8219
|
+
sa as generateAppropriatenessSchema,
|
|
8220
|
+
aa as generateQuestionnaireSchema,
|
|
8221
|
+
oa as generateRiskScoringSchema,
|
|
8222
|
+
ia as generateUploadDocumentSchema,
|
|
8223
|
+
Jn as getAcceptString,
|
|
8224
|
+
Wr as getApplicantId,
|
|
8225
|
+
pt as getThemePreset,
|
|
8226
|
+
Zn as getWorkflowState,
|
|
8195
8227
|
Cr as healthcareTheme,
|
|
8196
|
-
|
|
8228
|
+
qn as isScriptLoaded,
|
|
8197
8229
|
Mt as loadScript,
|
|
8198
8230
|
Ir as minimalTheme,
|
|
8199
8231
|
Nr as modernTheme,
|
|
8200
|
-
|
|
8232
|
+
Vn as removeScript,
|
|
8201
8233
|
jr as saveApplicantId,
|
|
8202
|
-
|
|
8234
|
+
Kr as saveWorkflowState,
|
|
8203
8235
|
Rr as themePresets,
|
|
8204
8236
|
zt as useApplicant,
|
|
8205
|
-
|
|
8206
|
-
|
|
8207
|
-
|
|
8237
|
+
ea as useAppropriatenessTest,
|
|
8238
|
+
Jr as useIdentityVerification,
|
|
8239
|
+
Vr as useKycWorkflow,
|
|
8208
8240
|
Te as useMetaKYC,
|
|
8209
|
-
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8241
|
+
Gr as useOverview,
|
|
8242
|
+
Yr as useQuestionnaire,
|
|
8243
|
+
Zr as useRiskScoring,
|
|
8244
|
+
Qr as useUploadDocument,
|
|
8245
|
+
Qn as validateFileSize,
|
|
8246
|
+
Gn as validateFileType
|
|
8215
8247
|
};
|
|
8216
8248
|
//# sourceMappingURL=index.js.map
|