@vpdev2/metakyc 1.0.43 → 1.0.44
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/components/status/KycStatusDisplay.d.ts.map +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +729 -729
- package/dist/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,20 +2,20 @@ var mi = Object.defineProperty;
|
|
|
2
2
|
var ui = (e, t, a) => t in e ? mi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
|
|
3
3
|
var he = (e, t, a) => ui(e, typeof t != "symbol" ? t + "" : t, a);
|
|
4
4
|
import pi from "axios";
|
|
5
|
-
import { jsx as i, jsxs as
|
|
6
|
-
import * as
|
|
7
|
-
import Ne, { createContext as
|
|
8
|
-
import gi, { createPortal as
|
|
9
|
-
import { useForm as yi, Controller as
|
|
10
|
-
import { z as
|
|
11
|
-
var me = /* @__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))(me || {}),
|
|
12
|
-
const
|
|
5
|
+
import { jsx as i, jsxs as s, Fragment as pt } from "react/jsx-runtime";
|
|
6
|
+
import * as Mt from "react";
|
|
7
|
+
import Ne, { createContext as Xt, useMemo as Fe, useState as S, useEffect as be, useContext as Zt, useCallback as ie, useRef as ue, forwardRef as vt, createElement as It } from "react";
|
|
8
|
+
import gi, { createPortal as Lt } from "react-dom";
|
|
9
|
+
import { useForm as yi, Controller as ot } from "react-hook-form";
|
|
10
|
+
import { z as Ze } from "zod";
|
|
11
|
+
var me = /* @__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))(me || {}), xt = /* @__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))(xt || {}), Ue = /* @__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))(Ue || {}), fi = /* @__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))(fi || {}), ki = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(ki || {}), Jt = /* @__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))(Jt || {}), Ke = /* @__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))(Ke || {}), vi = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(vi || {}), hi = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(hi || {}), qe = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(qe || {}), bi = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(bi || {}), wt = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(wt || {}), xi = /* @__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))(xi || {}), wi = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(wi || {}), Si = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(Si || {}), 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 || {}), Ci = /* @__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))(Ci || {}), Ni = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(Ni || {}), 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 || {}), Ti = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(Ti || {});
|
|
12
|
+
const it = {
|
|
13
13
|
Nationality: 10,
|
|
14
14
|
Address: 20,
|
|
15
15
|
CountryOfBirth: 30,
|
|
16
16
|
PhoneNumber: 40,
|
|
17
17
|
UboAddress: 50
|
|
18
|
-
},
|
|
18
|
+
}, lt = {
|
|
19
19
|
firstName: { label: "First Name", translationKey: "firstName", type: "text" },
|
|
20
20
|
lastName: { label: "Last Name", translationKey: "lastName", type: "text" },
|
|
21
21
|
email: { label: "Email", translationKey: "email", type: "email" },
|
|
@@ -23,27 +23,27 @@ const tt = {
|
|
|
23
23
|
dateOfBirth: { label: "Date of Birth", translationKey: "dateOfBirth", type: "date" },
|
|
24
24
|
salutation: { label: "Salutation", translationKey: "salutation", type: "select" },
|
|
25
25
|
title: { label: "Title", translationKey: "title", type: "text" },
|
|
26
|
-
mobileCountryCode: { label: "Mobile Country Code", translationKey: "mobileCountryCode", type: "select", countriesType:
|
|
26
|
+
mobileCountryCode: { label: "Mobile Country Code", translationKey: "mobileCountryCode", type: "select", countriesType: it.PhoneNumber },
|
|
27
27
|
street: { label: "Street", translationKey: "street", type: "text" },
|
|
28
28
|
streetNumber: { label: "Street Number", translationKey: "streetNumber", type: "text" },
|
|
29
29
|
zip: { label: "ZIP / Postal Code", translationKey: "zip", type: "text" },
|
|
30
30
|
city: { label: "City", translationKey: "city", type: "text" },
|
|
31
|
-
country: { label: "Country", translationKey: "country", type: "select", countriesType:
|
|
32
|
-
nationality: { label: "Nationality", translationKey: "nationality", type: "select", countriesType:
|
|
33
|
-
otherNationality: { label: "Other Nationalities", translationKey: "otherNationalities", type: "multiselect", countriesType:
|
|
34
|
-
countryOfBirth: { label: "Country of Birth", translationKey: "countryOfBirth", type: "select", countriesType:
|
|
31
|
+
country: { label: "Country", translationKey: "country", type: "select", countriesType: it.Address },
|
|
32
|
+
nationality: { label: "Nationality", translationKey: "nationality", type: "select", countriesType: it.Nationality },
|
|
33
|
+
otherNationality: { label: "Other Nationalities", translationKey: "otherNationalities", type: "multiselect", countriesType: it.Nationality },
|
|
34
|
+
countryOfBirth: { label: "Country of Birth", translationKey: "countryOfBirth", type: "select", countriesType: it.CountryOfBirth },
|
|
35
35
|
placeOfBirth: { label: "Place of Birth", translationKey: "placeOfBirth", type: "text" },
|
|
36
|
-
taxCountry: { label: "Tax Country", translationKey: "taxCountry", type: "select", countriesType:
|
|
36
|
+
taxCountry: { label: "Tax Country", translationKey: "taxCountry", type: "select", countriesType: it.Address },
|
|
37
37
|
taxNumber: { label: "Tax Number", translationKey: "taxNumber", type: "text" },
|
|
38
38
|
defaultLanguage: { label: "Default Language", translationKey: "defaultLanguage", type: "select" },
|
|
39
39
|
educationLevel: { label: "Education Level", translationKey: "educationLevel", type: "text" },
|
|
40
40
|
occupation: { label: "Occupation", translationKey: "occupation", type: "text" }
|
|
41
|
-
},
|
|
41
|
+
}, mt = {
|
|
42
42
|
companyName: { label: "Company Name", translationKey: "companyName", type: "text" },
|
|
43
43
|
email: { label: "Email", translationKey: "companyEmail", type: "email" },
|
|
44
44
|
phone: { label: "Phone", translationKey: "companyPhone", type: "tel" },
|
|
45
45
|
registrationNumber: { label: "Registration Number", translationKey: "registrationNumber", type: "text" },
|
|
46
|
-
countryResidence: { label: "Country of Residence", translationKey: "countryOfResidence", type: "select", countriesType:
|
|
46
|
+
countryResidence: { label: "Country of Residence", translationKey: "countryOfResidence", type: "select", countriesType: it.Address },
|
|
47
47
|
legalAddress: { label: "Legal Address", translationKey: "legalAddress", type: "text" },
|
|
48
48
|
incorporatedOn: { label: "Incorporation Date", translationKey: "incorporationDate", type: "date" },
|
|
49
49
|
controlScheme: { label: "Control Scheme", translationKey: "controlScheme", type: "text" },
|
|
@@ -56,7 +56,7 @@ const tt = {
|
|
|
56
56
|
city: { label: "City", translationKey: "city", type: "text" },
|
|
57
57
|
state: { label: "State / Province", translationKey: "state", type: "text" },
|
|
58
58
|
postalCode: { label: "Postal Code", translationKey: "zip", type: "text" },
|
|
59
|
-
addressCountry: { label: "Address Country", translationKey: "country", type: "select", countriesType:
|
|
59
|
+
addressCountry: { label: "Address Country", translationKey: "country", type: "select", countriesType: it.Address },
|
|
60
60
|
lei: { label: "LEI", translationKey: "lei", type: "text" }
|
|
61
61
|
}, Ri = [
|
|
62
62
|
"companyName",
|
|
@@ -69,7 +69,7 @@ const tt = {
|
|
|
69
69
|
"email",
|
|
70
70
|
"phonenumber",
|
|
71
71
|
"dateOfBirth"
|
|
72
|
-
],
|
|
72
|
+
], jt = [
|
|
73
73
|
{ value: "EN", label: "English" },
|
|
74
74
|
{ value: "DE", label: "German" },
|
|
75
75
|
{ value: "FR", label: "French" },
|
|
@@ -137,19 +137,19 @@ class Ai {
|
|
|
137
137
|
}[t] || t;
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
class
|
|
141
|
-
constructor(a, r, n, l,
|
|
140
|
+
class Ge extends Error {
|
|
141
|
+
constructor(a, r, n, l, o) {
|
|
142
142
|
super(a);
|
|
143
143
|
he(this, "response");
|
|
144
|
-
this.code = r, this.details = n, this.validationErrors = l, this.name = "MetaKYCError", this.response =
|
|
144
|
+
this.code = r, this.details = n, this.validationErrors = l, this.name = "MetaKYCError", this.response = o, Object.setPrototypeOf(this, Ge.prototype);
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
class
|
|
147
|
+
class yt {
|
|
148
148
|
/**
|
|
149
149
|
* Process an error from the API response
|
|
150
150
|
*/
|
|
151
151
|
static handleApiError(t) {
|
|
152
|
-
return new
|
|
152
|
+
return new Ge(
|
|
153
153
|
t.message || "An unknown error occurred",
|
|
154
154
|
t.code,
|
|
155
155
|
t.details || void 0,
|
|
@@ -162,36 +162,36 @@ class ft {
|
|
|
162
162
|
static handleAxiosError(t) {
|
|
163
163
|
if (t.response) {
|
|
164
164
|
const a = t.response.data;
|
|
165
|
-
return a && a.error ? new
|
|
165
|
+
return a && a.error ? new Ge(
|
|
166
166
|
a.error.message || "An unknown error occurred",
|
|
167
167
|
a.error.code,
|
|
168
168
|
a.error.details || void 0,
|
|
169
169
|
a.error.validationErrors || void 0,
|
|
170
170
|
t.response
|
|
171
|
-
) : a && a.result && a.result.message ? new
|
|
171
|
+
) : a && a.result && a.result.message ? new Ge(
|
|
172
172
|
a.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 Ge(
|
|
178
178
|
(a == null ? void 0 : a.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 Ge(
|
|
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 Ge(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 Ge;
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
class Li {
|
|
@@ -241,7 +241,7 @@ class Li {
|
|
|
241
241
|
});
|
|
242
242
|
return this.handleResponse(l);
|
|
243
243
|
} catch (n) {
|
|
244
|
-
throw
|
|
244
|
+
throw yt.handleAxiosError(n);
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
/**
|
|
@@ -252,7 +252,7 @@ class Li {
|
|
|
252
252
|
const n = this.buildEndpoint(t, a), l = await this.axiosInstance.post(n, r);
|
|
253
253
|
return this.handleResponse(l);
|
|
254
254
|
} catch (n) {
|
|
255
|
-
throw
|
|
255
|
+
throw yt.handleAxiosError(n);
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
258
|
/**
|
|
@@ -263,7 +263,7 @@ class Li {
|
|
|
263
263
|
const n = this.buildEndpoint(t, a), l = await this.axiosInstance.put(n, r);
|
|
264
264
|
return this.handleResponse(l);
|
|
265
265
|
} catch (n) {
|
|
266
|
-
throw
|
|
266
|
+
throw yt.handleAxiosError(n);
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
/**
|
|
@@ -276,7 +276,7 @@ class Li {
|
|
|
276
276
|
});
|
|
277
277
|
return this.handleResponse(l);
|
|
278
278
|
} catch (n) {
|
|
279
|
-
throw
|
|
279
|
+
throw yt.handleAxiosError(n);
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
@@ -285,7 +285,7 @@ class Li {
|
|
|
285
285
|
handleResponse(t) {
|
|
286
286
|
const a = t.data;
|
|
287
287
|
if (!a.success && a.error)
|
|
288
|
-
throw
|
|
288
|
+
throw yt.handleApiError(a.error);
|
|
289
289
|
return a;
|
|
290
290
|
}
|
|
291
291
|
/**
|
|
@@ -923,7 +923,7 @@ const Pe = {
|
|
|
923
923
|
[De.Modern]: Ki,
|
|
924
924
|
[De.Minimal]: Yi
|
|
925
925
|
};
|
|
926
|
-
function
|
|
926
|
+
function ft(e) {
|
|
927
927
|
return Hi[e] || Pe;
|
|
928
928
|
}
|
|
929
929
|
class $i {
|
|
@@ -941,8 +941,8 @@ class $i {
|
|
|
941
941
|
"GetThemeConfiguration"
|
|
942
942
|
);
|
|
943
943
|
if (!a.result.isEnabled)
|
|
944
|
-
return
|
|
945
|
-
let r = a.result.preset ?
|
|
944
|
+
return ft(De.Default);
|
|
945
|
+
let r = a.result.preset ? ft(a.result.preset) : ft(De.Default);
|
|
946
946
|
if (a.result.title && (r.title = a.result.title), a.result.logo && (r.logo = { ...r.logo, ...a.result.logo }), a.result.colors && (r.colors = { ...r.colors, ...a.result.colors }), a.result.typography && (r.typography = { ...r.typography, ...a.result.typography }), a.result.spacing && (r.spacing = { ...r.spacing, ...a.result.spacing }), a.result.customCSS && (r.customCSS = a.result.customCSS), a.result.darkMode && (r.darkMode = {
|
|
947
947
|
colors: {
|
|
948
948
|
...(t = r.darkMode) == null ? void 0 : t.colors,
|
|
@@ -952,12 +952,12 @@ class $i {
|
|
|
952
952
|
try {
|
|
953
953
|
const n = typeof a.result.applicantFormPages == "string" ? JSON.parse(a.result.applicantFormPages) : a.result.applicantFormPages;
|
|
954
954
|
Array.isArray(n) && n.length > 0 && (r.applicantFormPages = n.map((l) => {
|
|
955
|
-
const
|
|
955
|
+
const o = !l._v || l._v < 4;
|
|
956
956
|
return {
|
|
957
957
|
...l,
|
|
958
958
|
fields: (l.fields || []).map((p) => ({
|
|
959
959
|
...p,
|
|
960
|
-
colSpan:
|
|
960
|
+
colSpan: o ? p.colSpan === 1 ? 2 : 4 : Math.min(4, Math.max(1, p.colSpan ?? 4))
|
|
961
961
|
}))
|
|
962
962
|
};
|
|
963
963
|
}));
|
|
@@ -973,12 +973,12 @@ class $i {
|
|
|
973
973
|
try {
|
|
974
974
|
const n = typeof a.result.companyFormPages == "string" ? JSON.parse(a.result.companyFormPages) : a.result.companyFormPages;
|
|
975
975
|
Array.isArray(n) && n.length > 0 && (r.companyFormPages = n.map((l) => {
|
|
976
|
-
const
|
|
976
|
+
const o = !l._v || l._v < 4;
|
|
977
977
|
return {
|
|
978
978
|
...l,
|
|
979
979
|
fields: (l.fields || []).map((p) => ({
|
|
980
980
|
...p,
|
|
981
|
-
colSpan:
|
|
981
|
+
colSpan: o ? p.colSpan === 1 ? 2 : 4 : Math.min(4, Math.max(1, p.colSpan ?? 4))
|
|
982
982
|
}))
|
|
983
983
|
};
|
|
984
984
|
}));
|
|
@@ -992,7 +992,7 @@ class $i {
|
|
|
992
992
|
}
|
|
993
993
|
return r;
|
|
994
994
|
} catch (a) {
|
|
995
|
-
return console.warn("[ThemeService] Failed to fetch theme configuration:", a),
|
|
995
|
+
return console.warn("[ThemeService] Failed to fetch theme configuration:", a), ft(De.Default);
|
|
996
996
|
}
|
|
997
997
|
}
|
|
998
998
|
/**
|
|
@@ -1018,7 +1018,7 @@ class $i {
|
|
|
1018
1018
|
* Preview theme (doesn't save)
|
|
1019
1019
|
*/
|
|
1020
1020
|
getPreviewTheme(t, a) {
|
|
1021
|
-
const r =
|
|
1021
|
+
const r = ft(t);
|
|
1022
1022
|
return a ? {
|
|
1023
1023
|
...r,
|
|
1024
1024
|
...a,
|
|
@@ -1273,10 +1273,10 @@ class Xi {
|
|
|
1273
1273
|
}
|
|
1274
1274
|
}
|
|
1275
1275
|
class Zi {
|
|
1276
|
-
constructor(t, a, r, n, l,
|
|
1276
|
+
constructor(t, a, r, n, l, o, p, m) {
|
|
1277
1277
|
he(this, "state");
|
|
1278
1278
|
he(this, "stepRouter");
|
|
1279
|
-
this.applicantService = t, this.questionnaireService = a, this.uploadDocumentService = r, this.appropriatenessTestService = n, this.overviewService = l, this.riskScoringService =
|
|
1279
|
+
this.applicantService = t, this.questionnaireService = a, this.uploadDocumentService = r, this.appropriatenessTestService = n, this.overviewService = l, this.riskScoringService = o, this.investorCategorizationService = m, this.state = new Qi(), this.stepRouter = new Xi(), this.registerStepHandlers();
|
|
1280
1280
|
}
|
|
1281
1281
|
/**
|
|
1282
1282
|
* Register all step handlers
|
|
@@ -1434,7 +1434,7 @@ function Pa(e) {
|
|
|
1434
1434
|
t && t.remove();
|
|
1435
1435
|
}
|
|
1436
1436
|
const Ji = "https://static.sumsub.com/idensic/static/sns-websdk-builder.js";
|
|
1437
|
-
function
|
|
1437
|
+
function _e(e, t) {
|
|
1438
1438
|
try {
|
|
1439
1439
|
const a = document.querySelector(".metakyc-sdk") || document.documentElement;
|
|
1440
1440
|
return getComputedStyle(a).getPropertyValue(e).trim() || t;
|
|
@@ -1443,9 +1443,9 @@ function $e(e, t) {
|
|
|
1443
1443
|
}
|
|
1444
1444
|
}
|
|
1445
1445
|
function er() {
|
|
1446
|
-
const e =
|
|
1446
|
+
const e = _e("--metakyc-primary", "#2563eb"), t = _e("--metakyc-primary-hover", "#1d4ed8"), a = _e("--metakyc-background", "#ffffff"), r = _e("--metakyc-surface", "#f9fafb"), n = _e("--metakyc-text-primary", "#111827"), l = _e("--metakyc-text-secondary", "#6b7280"), o = _e("--metakyc-text-muted", "#9ca3af"), p = _e("--metakyc-border", "#e5e7eb");
|
|
1447
1447
|
return `
|
|
1448
|
-
body, html { font-family: ${
|
|
1448
|
+
body, html { font-family: ${_e(
|
|
1449
1449
|
"--metakyc-font-family",
|
|
1450
1450
|
"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"
|
|
1451
1451
|
)} !important; background-color: ${a} !important; }
|
|
@@ -1464,7 +1464,7 @@ button.back:hover { background-color: ${r}; }
|
|
|
1464
1464
|
.upload-item, .document-status { border-color: ${p} !important; }
|
|
1465
1465
|
select { background-color: ${a}; color: ${n}; border: 1px solid ${p}; border-radius: 6px; }
|
|
1466
1466
|
.description { color: ${l}; }
|
|
1467
|
-
.subtitle { color: ${
|
|
1467
|
+
.subtitle { color: ${o}; }
|
|
1468
1468
|
a { color: ${e}; }
|
|
1469
1469
|
a:hover { color: ${t}; }
|
|
1470
1470
|
`.trim();
|
|
@@ -1499,14 +1499,14 @@ class tr {
|
|
|
1499
1499
|
}).on("idCheck.onStepCompleted", (n) => {
|
|
1500
1500
|
console.log("[Sumsub] Step completed:", n);
|
|
1501
1501
|
}).on("idCheck.applicantStatus", (n) => {
|
|
1502
|
-
var l,
|
|
1503
|
-
console.log("[Sumsub] Applicant status:", n), ((n == null ? void 0 : n.reviewStatus) === "completed" || ((l = n == null ? void 0 : n.reviewResult) == null ? void 0 : l.reviewAnswer) === "GREEN") && ((
|
|
1502
|
+
var l, o;
|
|
1503
|
+
console.log("[Sumsub] Applicant status:", n), ((n == null ? void 0 : n.reviewStatus) === "completed" || ((l = n == null ? void 0 : n.reviewResult) == null ? void 0 : l.reviewAnswer) === "GREEN") && ((o = this.completeCallback) == null || o.call(this, n));
|
|
1504
1504
|
}).on("idCheck.onError", (n) => {
|
|
1505
1505
|
var l;
|
|
1506
1506
|
console.error("[Sumsub] Error:", n), (l = this.errorCallback) == null || l.call(this, n);
|
|
1507
1507
|
}).onMessage((n, l) => {
|
|
1508
|
-
var
|
|
1509
|
-
console.log("[Sumsub] Message:", n, l), n === "idCheck.onApplicantSubmitted" && ((
|
|
1508
|
+
var o;
|
|
1509
|
+
console.log("[Sumsub] Message:", n, l), n === "idCheck.onApplicantSubmitted" && ((o = this.completeCallback) == null || o.call(this, l));
|
|
1510
1510
|
});
|
|
1511
1511
|
this.sdk = r.build(), this.sdk.launch(`#${t}`);
|
|
1512
1512
|
}
|
|
@@ -1652,7 +1652,7 @@ class rr {
|
|
|
1652
1652
|
try {
|
|
1653
1653
|
if (await this.loadSDK(), !window._Sardine)
|
|
1654
1654
|
throw new Error("SardinAI SDK not available after loading");
|
|
1655
|
-
const t = this.getSardineHost(), { clientId: a, environment: r, flow: n, enableBiometrics: l, enablePortScanning:
|
|
1655
|
+
const t = this.getSardineHost(), { clientId: a, environment: r, flow: n, enableBiometrics: l, enablePortScanning: o } = this.config;
|
|
1656
1656
|
this.sardineContext = window._Sardine.createContext({
|
|
1657
1657
|
clientId: a,
|
|
1658
1658
|
sessionKey: this.sessionKey,
|
|
@@ -1663,7 +1663,7 @@ class rr {
|
|
|
1663
1663
|
parentElement: document.body,
|
|
1664
1664
|
enableBiometrics: l !== !1,
|
|
1665
1665
|
// Default true
|
|
1666
|
-
enablePortScanning:
|
|
1666
|
+
enablePortScanning: o === !0,
|
|
1667
1667
|
// Default false
|
|
1668
1668
|
region: this.config.region,
|
|
1669
1669
|
// Callback for device response (deprecated but kept for compatibility)
|
|
@@ -1736,7 +1736,7 @@ class rr {
|
|
|
1736
1736
|
this.sardineContext && (this.sardineContext = null);
|
|
1737
1737
|
}
|
|
1738
1738
|
}
|
|
1739
|
-
class
|
|
1739
|
+
class tt {
|
|
1740
1740
|
/**
|
|
1741
1741
|
* Create a provider instance
|
|
1742
1742
|
*/
|
|
@@ -1759,17 +1759,17 @@ class et {
|
|
|
1759
1759
|
var n, l;
|
|
1760
1760
|
switch (t) {
|
|
1761
1761
|
case qe.Sumsub:
|
|
1762
|
-
const
|
|
1762
|
+
const o = ((n = r == null ? void 0 : r.identityProviders) == null ? void 0 : n.sumsub) || {};
|
|
1763
1763
|
return {
|
|
1764
1764
|
accessToken: a.accessToken || a.token,
|
|
1765
1765
|
applicantEmail: a.email,
|
|
1766
1766
|
applicantPhone: a.phone,
|
|
1767
1767
|
externalUserId: a.externalUserId,
|
|
1768
|
-
lang:
|
|
1769
|
-
theme:
|
|
1770
|
-
customizationName:
|
|
1771
|
-
customCss:
|
|
1772
|
-
adaptIframeHeight:
|
|
1768
|
+
lang: o.lang || a.lang || "en",
|
|
1769
|
+
theme: o.theme,
|
|
1770
|
+
customizationName: o.customizationName,
|
|
1771
|
+
customCss: o.customCss,
|
|
1772
|
+
adaptIframeHeight: o.adaptIframeHeight
|
|
1773
1773
|
};
|
|
1774
1774
|
case qe.Onfido:
|
|
1775
1775
|
return {
|
|
@@ -1846,7 +1846,7 @@ class ar {
|
|
|
1846
1846
|
}), r && Object.entries(r).forEach(([m, d]) => {
|
|
1847
1847
|
n[this.kebabCase(m)] = d;
|
|
1848
1848
|
});
|
|
1849
|
-
const
|
|
1849
|
+
const o = `
|
|
1850
1850
|
/* ── metakyc-theme-vars: scoped CSS variables ──────────────────────────────── */
|
|
1851
1851
|
.metakyc-sdk,
|
|
1852
1852
|
.metakyc-searchable-select-dropdown,
|
|
@@ -1900,7 +1900,7 @@ ${Object.entries(n).filter(([, m]) => !!m).map(([m, d]) => ` --metakyc-${m}: ${
|
|
|
1900
1900
|
border-color: var(--metakyc-input-border, var(--metakyc-border, #d1d5db)) !important;
|
|
1901
1901
|
}
|
|
1902
1902
|
`;
|
|
1903
|
-
this.themeStyleElement = document.createElement("style"), this.themeStyleElement.id = "metakyc-theme-vars", this.themeStyleElement.textContent =
|
|
1903
|
+
this.themeStyleElement = document.createElement("style"), this.themeStyleElement.id = "metakyc-theme-vars", this.themeStyleElement.textContent = o, (p = this.customStyleElement) != null && p.parentNode ? document.head.insertBefore(this.themeStyleElement, this.customStyleElement) : document.head.appendChild(this.themeStyleElement);
|
|
1904
1904
|
}
|
|
1905
1905
|
/**
|
|
1906
1906
|
* Inject custom CSS into document
|
|
@@ -6725,7 +6725,7 @@ const nr = {
|
|
|
6725
6725
|
logo: {
|
|
6726
6726
|
companyLogo: "Firmalogo"
|
|
6727
6727
|
}
|
|
6728
|
-
},
|
|
6728
|
+
}, zt = {
|
|
6729
6729
|
en: nr,
|
|
6730
6730
|
de: or,
|
|
6731
6731
|
fr: sr,
|
|
@@ -6744,7 +6744,7 @@ const nr = {
|
|
|
6744
6744
|
fi: br,
|
|
6745
6745
|
no: xr
|
|
6746
6746
|
};
|
|
6747
|
-
function
|
|
6747
|
+
function Ft(e, t) {
|
|
6748
6748
|
const a = t.split(".");
|
|
6749
6749
|
let r = e;
|
|
6750
6750
|
for (const n of a) {
|
|
@@ -6759,7 +6759,7 @@ function wr(e, t) {
|
|
|
6759
6759
|
return n != null ? String(n) : `{{${r}}}`;
|
|
6760
6760
|
}) : e;
|
|
6761
6761
|
}
|
|
6762
|
-
function
|
|
6762
|
+
function Ot(e, t) {
|
|
6763
6763
|
const a = { ...e };
|
|
6764
6764
|
for (const r of Object.keys(t)) {
|
|
6765
6765
|
const n = t[r];
|
|
@@ -6767,11 +6767,11 @@ function Vt(e, t) {
|
|
|
6767
6767
|
}
|
|
6768
6768
|
return a;
|
|
6769
6769
|
}
|
|
6770
|
-
function
|
|
6770
|
+
function At(e) {
|
|
6771
6771
|
const t = e.toLowerCase().split(/[-_]/)[0];
|
|
6772
|
-
return
|
|
6772
|
+
return zt[t] || zt.en;
|
|
6773
6773
|
}
|
|
6774
|
-
function
|
|
6774
|
+
function Vt(e, t) {
|
|
6775
6775
|
for (const a of Object.keys(e)) {
|
|
6776
6776
|
const r = e[a];
|
|
6777
6777
|
if (r && typeof r == "object" && typeof r[t] == "string")
|
|
@@ -6779,36 +6779,36 @@ function Bt(e, t) {
|
|
|
6779
6779
|
}
|
|
6780
6780
|
}
|
|
6781
6781
|
function ti(e) {
|
|
6782
|
-
const t =
|
|
6782
|
+
const t = zt.en;
|
|
6783
6783
|
return (a, r) => {
|
|
6784
|
-
const n = !a.includes("."), l =
|
|
6784
|
+
const n = !a.includes("."), l = Ft(e, a) ?? (n ? Vt(e, a) : void 0) ?? Ft(t, a) ?? (n ? Vt(t, a) : void 0) ?? a;
|
|
6785
6785
|
return wr(l, r);
|
|
6786
6786
|
};
|
|
6787
6787
|
}
|
|
6788
|
-
const Sr = /^t\(['"](.+?)['"]\)$/,
|
|
6788
|
+
const Sr = /^t\(['"](.+?)['"]\)$/, Bt = "$t:";
|
|
6789
6789
|
function G(e, t) {
|
|
6790
6790
|
if (!e) return "";
|
|
6791
6791
|
const a = e.trim();
|
|
6792
|
-
if (a.startsWith(
|
|
6793
|
-
return t(a.slice(
|
|
6792
|
+
if (a.startsWith(Bt))
|
|
6793
|
+
return t(a.slice(Bt.length));
|
|
6794
6794
|
const r = Sr.exec(a);
|
|
6795
6795
|
return r ? t(r[1]) : e;
|
|
6796
6796
|
}
|
|
6797
|
-
const ii = "1.0.
|
|
6797
|
+
const ii = "1.0.44", ri = Xt(null), qt = `metakyc-translations-${ii}-`, Cr = ({
|
|
6798
6798
|
locale: e,
|
|
6799
6799
|
fetchTranslations: t,
|
|
6800
6800
|
children: a
|
|
6801
6801
|
}) => {
|
|
6802
6802
|
const r = e.toLowerCase().split(/[-_]/)[0], n = Fe(() => {
|
|
6803
|
-
const m =
|
|
6803
|
+
const m = At(r);
|
|
6804
6804
|
if (typeof window > "u") return m;
|
|
6805
6805
|
try {
|
|
6806
|
-
const d = localStorage.getItem(
|
|
6807
|
-
if (d) return
|
|
6806
|
+
const d = localStorage.getItem(qt + r);
|
|
6807
|
+
if (d) return Ot(m, JSON.parse(d));
|
|
6808
6808
|
} catch {
|
|
6809
6809
|
}
|
|
6810
6810
|
return m;
|
|
6811
|
-
}, [r]), [l,
|
|
6811
|
+
}, [r]), [l, o] = S(n);
|
|
6812
6812
|
be(() => {
|
|
6813
6813
|
if (!t) return;
|
|
6814
6814
|
let m = !1;
|
|
@@ -6819,10 +6819,10 @@ const ii = "1.0.43", ri = Zt(null), Ut = `metakyc-translations-${ii}-`, Cr = ({
|
|
|
6819
6819
|
return;
|
|
6820
6820
|
}
|
|
6821
6821
|
console.debug("[MetaKYC i18n] Remote overrides loaded for locale:", r, d);
|
|
6822
|
-
const y =
|
|
6823
|
-
|
|
6822
|
+
const y = At(r), w = Ot(y, d);
|
|
6823
|
+
o(w);
|
|
6824
6824
|
try {
|
|
6825
|
-
localStorage.setItem(
|
|
6825
|
+
localStorage.setItem(qt + r, JSON.stringify(d));
|
|
6826
6826
|
} catch {
|
|
6827
6827
|
}
|
|
6828
6828
|
}).catch((d) => {
|
|
@@ -6839,34 +6839,34 @@ const ii = "1.0.43", ri = Zt(null), Ut = `metakyc-translations-${ii}-`, Cr = ({
|
|
|
6839
6839
|
return /* @__PURE__ */ i(ri.Provider, { value: p, children: a });
|
|
6840
6840
|
};
|
|
6841
6841
|
function Ie() {
|
|
6842
|
-
const e =
|
|
6842
|
+
const e = Zt(ri);
|
|
6843
6843
|
if (!e) {
|
|
6844
|
-
const t =
|
|
6844
|
+
const t = At("en");
|
|
6845
6845
|
return { t: ti(t), locale: "en", dictionary: t };
|
|
6846
6846
|
}
|
|
6847
6847
|
return e;
|
|
6848
6848
|
}
|
|
6849
|
-
const ai = Zt(null), Nr = '.metakyc-sdk .pointer-events-none{pointer-events:none}.metakyc-sdk .visible{visibility:visible}.metakyc-sdk .static{position:static}.metakyc-sdk .fixed{position:fixed}.metakyc-sdk .absolute{position:absolute}.metakyc-sdk .relative{position:relative}.metakyc-sdk .inset-y-0{top:0;bottom:0}.metakyc-sdk .left-0{left:0}.metakyc-sdk .right-0{right:0}.metakyc-sdk .right-3{right:.75rem}.metakyc-sdk .top-1\\/2{top:50%}.metakyc-sdk .mx-4{margin-left:1rem;margin-right:1rem}.metakyc-sdk .mx-6{margin-left:1.5rem;margin-right:1.5rem}.metakyc-sdk .mx-auto{margin-left:auto;margin-right:auto}.metakyc-sdk .my-8{margin-top:2rem;margin-bottom:2rem}.metakyc-sdk .-ml-1{margin-left:-.25rem}.metakyc-sdk .mb-0\\.5{margin-bottom:.125rem}.metakyc-sdk .mb-1{margin-bottom:.25rem}.metakyc-sdk .mb-2{margin-bottom:.5rem}.metakyc-sdk .mb-3{margin-bottom:.75rem}.metakyc-sdk .mb-4{margin-bottom:1rem}.metakyc-sdk .mb-6{margin-bottom:1.5rem}.metakyc-sdk .ml-0\\.5{margin-left:.125rem}.metakyc-sdk .ml-1{margin-left:.25rem}.metakyc-sdk .ml-3{margin-left:.75rem}.metakyc-sdk .mr-2{margin-right:.5rem}.metakyc-sdk .mr-3{margin-right:.75rem}.metakyc-sdk .mt-0\\.5{margin-top:.125rem}.metakyc-sdk .mt-1{margin-top:.25rem}.metakyc-sdk .mt-2{margin-top:.5rem}.metakyc-sdk .mt-3{margin-top:.75rem}.metakyc-sdk .mt-4{margin-top:1rem}.metakyc-sdk .mt-6{margin-top:1.5rem}.metakyc-sdk .block{display:block}.metakyc-sdk .inline-block{display:inline-block}.metakyc-sdk .inline{display:inline}.metakyc-sdk .flex{display:flex}.metakyc-sdk .inline-flex{display:inline-flex}.metakyc-sdk .grid{display:grid}.metakyc-sdk .hidden{display:none}.metakyc-sdk .h-12{height:3rem}.metakyc-sdk .h-16{height:4rem}.metakyc-sdk .h-24{height:6rem}.metakyc-sdk .h-4{height:1rem}.metakyc-sdk .h-6{height:1.5rem}.metakyc-sdk .h-8{height:2rem}.metakyc-sdk .h-full{height:100%}.metakyc-sdk .max-h-52{max-height:13rem}.metakyc-sdk .min-h-\\[400px\\]{min-height:400px}.metakyc-sdk .w-12{width:3rem}.metakyc-sdk .w-16{width:4rem}.metakyc-sdk .w-20{width:5rem}.metakyc-sdk .w-24{width:6rem}.metakyc-sdk .w-4{width:1rem}.metakyc-sdk .w-6{width:1.5rem}.metakyc-sdk .w-8{width:2rem}.metakyc-sdk .w-full{width:100%}.metakyc-sdk .max-w-md{max-width:28rem}.metakyc-sdk .flex-1{flex:1 1 0%}.metakyc-sdk .flex-shrink-0{flex-shrink:0}.metakyc-sdk .-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.metakyc-sdk .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.metakyc-sdk .animate-spin{animation:spin 1s linear infinite}.metakyc-sdk .cursor-not-allowed{cursor:not-allowed}.metakyc-sdk .cursor-pointer{cursor:pointer}.metakyc-sdk .resize{resize:both}.metakyc-sdk .list-inside{list-style-position:inside}.metakyc-sdk .list-disc{list-style-type:disc}.metakyc-sdk .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.metakyc-sdk .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.metakyc-sdk .flex-col{flex-direction:column}.metakyc-sdk .flex-wrap{flex-wrap:wrap}.metakyc-sdk .items-start{align-items:flex-start}.metakyc-sdk .items-center{align-items:center}.metakyc-sdk .justify-center{justify-content:center}.metakyc-sdk .justify-between{justify-content:space-between}.metakyc-sdk .gap-1{gap:.25rem}.metakyc-sdk .gap-1\\.5{gap:.375rem}.metakyc-sdk .gap-2{gap:.5rem}.metakyc-sdk .gap-4{gap:1rem}.metakyc-sdk :is(.space-x-3>:not([hidden])~:not([hidden])){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.metakyc-sdk :is(.space-y-1>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-1\\.5>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-2>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-4>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-6>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-8>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.metakyc-sdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.metakyc-sdk .rounded{border-radius:.25rem}.metakyc-sdk .rounded-full{border-radius:9999px}.metakyc-sdk .rounded-lg{border-radius:.5rem}.metakyc-sdk .rounded-xl{border-radius:.75rem}.metakyc-sdk .border{border-width:1px}.metakyc-sdk .border-0{border-width:0px}.metakyc-sdk .border-2{border-width:2px}.metakyc-sdk .border-b{border-bottom-width:1px}.metakyc-sdk .border-t{border-top-width:1px}.metakyc-sdk .border-danger-500{border-color:var(--metakyc-danger, #EF4444)}.metakyc-sdk .p-3{padding:.75rem}.metakyc-sdk .p-4{padding:1rem}.metakyc-sdk .px-2{padding-left:.5rem;padding-right:.5rem}.metakyc-sdk .px-2\\.5{padding-left:.625rem;padding-right:.625rem}.metakyc-sdk .px-3{padding-left:.75rem;padding-right:.75rem}.metakyc-sdk .px-4{padding-left:1rem;padding-right:1rem}.metakyc-sdk .px-6{padding-left:1.5rem;padding-right:1.5rem}.metakyc-sdk .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.metakyc-sdk .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.metakyc-sdk .py-12{padding-top:3rem;padding-bottom:3rem}.metakyc-sdk .py-2{padding-top:.5rem;padding-bottom:.5rem}.metakyc-sdk .py-3{padding-top:.75rem;padding-bottom:.75rem}.metakyc-sdk .py-4{padding-top:1rem;padding-bottom:1rem}.metakyc-sdk .py-8{padding-top:2rem;padding-bottom:2rem}.metakyc-sdk .pb-4{padding-bottom:1rem}.metakyc-sdk .pl-10{padding-left:2.5rem}.metakyc-sdk .pl-3{padding-left:.75rem}.metakyc-sdk .pr-10{padding-right:2.5rem}.metakyc-sdk .pr-3{padding-right:.75rem}.metakyc-sdk .pr-6{padding-right:1.5rem}.metakyc-sdk .pt-6{padding-top:1.5rem}.metakyc-sdk .text-left{text-align:left}.metakyc-sdk .text-center{text-align:center}.metakyc-sdk .text-right{text-align:right}.metakyc-sdk .text-2xl{font-size:1.5rem;line-height:2rem}.metakyc-sdk .text-3xl{font-size:1.875rem;line-height:2.25rem}.metakyc-sdk .text-5xl{font-size:3rem;line-height:1}.metakyc-sdk .text-base{font-size:1rem;line-height:1.5rem}.metakyc-sdk .text-lg{font-size:1.125rem;line-height:1.75rem}.metakyc-sdk .text-sm{font-size:.875rem;line-height:1.25rem}.metakyc-sdk .text-xl{font-size:1.25rem;line-height:1.75rem}.metakyc-sdk .text-xs{font-size:.75rem;line-height:1rem}.metakyc-sdk .font-bold{font-weight:700}.metakyc-sdk .font-medium{font-weight:500}.metakyc-sdk .font-semibold{font-weight:600}.metakyc-sdk .uppercase{text-transform:uppercase}.metakyc-sdk .lowercase{text-transform:lowercase}.metakyc-sdk .tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.metakyc-sdk .leading-6{line-height:1.5rem}.metakyc-sdk .text-danger-500{color:var(--metakyc-danger, #EF4444)}.metakyc-sdk .text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-primary,.metakyc-sdk .text-primary-500{color:var(--metakyc-primary, #3B82F6)}.metakyc-sdk .text-secondary{color:var(--metakyc-secondary, #64748b)}.metakyc-sdk .underline{text-decoration-line:underline}.metakyc-sdk .opacity-25{opacity:.25}.metakyc-sdk .opacity-50{opacity:.5}.metakyc-sdk .opacity-60{opacity:.6}.metakyc-sdk .opacity-75{opacity:.75}.metakyc-sdk .shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.metakyc-sdk .outline{outline-style:solid}.metakyc-sdk .ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.metakyc-sdk .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.metakyc-sdk .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.metakyc-sdk .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .duration-200{transition-duration:.2s}.metakyc-sdk .grid{display:grid!important}.metakyc-sdk .flex{display:flex!important}.metakyc-sdk .inline-flex{display:inline-flex!important}.metakyc-sdk .hidden{display:none!important}.metakyc-sdk .block{display:block!important}.metakyc-sdk .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.metakyc-sdk .col-span-1{grid-column:span 1 / span 1!important}.metakyc-sdk .col-span-2{grid-column:span 2 / span 2!important}.metakyc-sdk .col-span-3{grid-column:span 3 / span 3!important}.metakyc-sdk .col-span-4{grid-column:span 4 / span 4!important}.metakyc-sdk .gap-1{gap:.25rem!important}.metakyc-sdk .gap-2{gap:.5rem!important}.metakyc-sdk .gap-3{gap:.75rem!important}.metakyc-sdk .gap-4{gap:1rem!important}.metakyc-sdk .gap-6{gap:1.5rem!important}.metakyc-sdk .gap-8{gap:2rem!important}.metakyc-sdk .flex-col{flex-direction:column!important}.metakyc-sdk .flex-row{flex-direction:row!important}.metakyc-sdk .flex-wrap{flex-wrap:wrap!important}.metakyc-sdk .flex-1{flex:1 1 0%!important}.metakyc-sdk .flex-shrink-0{flex-shrink:0!important}.metakyc-sdk .items-center{align-items:center!important}.metakyc-sdk .items-start{align-items:flex-start!important}.metakyc-sdk .items-end{align-items:flex-end!important}.metakyc-sdk .justify-between{justify-content:space-between!important}.metakyc-sdk .justify-center{justify-content:center!important}.metakyc-sdk .justify-end{justify-content:flex-end!important}.metakyc-sdk .justify-start{justify-content:flex-start!important}.metakyc-sdk .space-y-1>*+*{margin-top:.25rem!important}.metakyc-sdk .space-y-1\\.5>*+*{margin-top:.375rem!important}.metakyc-sdk .space-y-2>*+*{margin-top:.5rem!important}.metakyc-sdk .space-y-3>*+*{margin-top:.75rem!important}.metakyc-sdk .space-y-4>*+*{margin-top:1rem!important}.metakyc-sdk .space-y-6>*+*{margin-top:1.5rem!important}.metakyc-sdk .w-full{width:100%!important}.metakyc-sdk .relative{position:relative!important}.metakyc-sdk .absolute{position:absolute!important}.metakyc-sdk .overflow-hidden{overflow:hidden!important}.metakyc-sdk .overflow-auto{overflow:auto!important}.metakyc-sdk .overflow-x-auto{overflow-x:auto!important}@media (min-width: 768px){.metakyc-sdk .md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.metakyc-sdk .md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}}.metakyc-sdk .metakyc-form-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:1rem!important}@media (max-width: 767px){.metakyc-sdk .metakyc-form-grid{grid-template-columns:1fr!important}.metakyc-sdk .metakyc-form-grid>*{grid-column:span 1 / span 1!important}.metakyc-sdk .metakyc-grid-2{grid-template-columns:1fr!important}}@media (max-width: 767px){.metakyc-sdk .metakyc-card-content,.metakyc-sdk .metakyc-card-header,.metakyc-sdk .metakyc-card-footer,.metakyc-sdk .metakyc-progress-wrapper{padding-left:12px!important;padding-right:12px!important}.metakyc-sdk .metakyc-form-grid{gap:.75rem!important}}.metakyc-sdk *,.metakyc-sdk *:before,.metakyc-sdk *:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--metakyc-border, #e5e7eb)}.metakyc-sdk{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4}.metakyc-sdk img,.metakyc-sdk video{max-width:100%;height:auto}.metakyc-sdk h1,.metakyc-sdk h2,.metakyc-sdk h3,.metakyc-sdk h4,.metakyc-sdk h5,.metakyc-sdk h6,.metakyc-sdk p{margin:0}.metakyc-sdk ol,.metakyc-sdk ul{list-style:none;margin:0;padding:0}.metakyc-sdk button,.metakyc-sdk input,.metakyc-sdk optgroup,.metakyc-sdk select,.metakyc-sdk textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}.metakyc-sdk button,.metakyc-sdk [role=button]{cursor:pointer}.metakyc-sdk a{color:inherit;text-decoration:inherit}.metakyc-sdk input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),.metakyc-sdk select,.metakyc-sdk textarea,.metakyc-sdk .metakyc-searchable-select-trigger,.metakyc-sdk .metakyc-multiselect-trigger{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important}.metakyc-sdk input::-moz-placeholder,.metakyc-sdk textarea::-moz-placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-sdk input::placeholder,.metakyc-sdk textarea::placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-sdk input:not([type=checkbox]):not([type=radio]):focus,.metakyc-sdk select:focus,.metakyc-sdk textarea:focus{outline:none!important;border-color:var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb)) 20%,transparent)!important}.metakyc-sdk input[type=checkbox],.metakyc-sdk input[type=radio]{appearance:none!important;-webkit-appearance:none!important;-moz-appearance:none!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;max-width:16px!important;max-height:16px!important;flex-shrink:0!important;cursor:pointer!important;background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;border:1.5px solid var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important;position:relative!important;transition:background-color .15s,border-color .15s!important;vertical-align:middle!important;display:inline-block!important;padding:0!important;margin:0!important;color-scheme:light!important}.metakyc-sdk input[type=checkbox]{border-radius:4px!important}.metakyc-sdk input[type=radio]{border-radius:50%!important}.metakyc-sdk input[type=checkbox]:checked,.metakyc-sdk input[type=radio]:checked{background-color:var(--metakyc-primary, #2563eb)!important;border-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk input[type=checkbox]:checked:after{content:""!important;display:block!important;position:absolute!important;left:4px!important;top:1px!important;width:5px!important;height:9px!important;border:2px solid #ffffff!important;border-top:none!important;border-left:none!important;transform:rotate(45deg)!important}.metakyc-sdk input[type=radio]:checked:after{content:""!important;display:block!important;position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:6px!important;height:6px!important;border-radius:50%!important;background:#fff!important}.metakyc-sdk input[type=checkbox]:focus,.metakyc-sdk input[type=radio]:focus{outline:none!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-primary, #2563eb) 30%,transparent)!important}.metakyc-searchable-select-dropdown,.metakyc-multiselect-dropdown{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important}.metakyc-searchable-select-dropdown input,.metakyc-multiselect-dropdown input{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important}.metakyc-searchable-select-dropdown input::-moz-placeholder,.metakyc-multiselect-dropdown input::-moz-placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-searchable-select-dropdown input::placeholder,.metakyc-multiselect-dropdown input::placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-searchable-select-dropdown input:focus,.metakyc-multiselect-dropdown input:focus{outline:none!important;background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb)) 20%,transparent)!important}.metakyc-searchable-select-dropdown li:hover,.metakyc-multiselect-dropdown li:hover{background-color:var(--metakyc-surface, var(--metakyc-background, #f9fafb))!important}.metakyc-sdk .metakyc-help-btn{color:var(--metakyc-primary, #2563eb)!important;border-color:var(--metakyc-primary, #2563eb)!important;background:transparent!important;position:relative!important;z-index:2!important}.metakyc-sdk .metakyc-overview-step-item,.metakyc-sdk .metakyc-overview-step-item *,.metakyc-sdk .metakyc-step-content,.metakyc-sdk .metakyc-step-content *,.metakyc-sdk .metakyc-step-title,.metakyc-sdk .metakyc-step-title *,.metakyc-sdk .metakyc-step-icon,.metakyc-sdk .metakyc-step-icon *,.metakyc-sdk .metakyc-step-description,.metakyc-sdk .metakyc-step-description *{border-top-width:0!important;border-bottom-width:0!important;border-left-width:0!important;border-right-width:0!important;border-top-style:none!important;border-bottom-style:none!important;border-left-style:none!important;border-right-style:none!important;border-top-color:transparent!important;border-bottom-color:transparent!important;border-left-color:transparent!important;border-right-color:transparent!important;border:0!important;box-shadow:none!important;outline:none!important;outline-width:0!important;outline-style:none!important;text-decoration:none!important;text-decoration-line:none!important}.metakyc-sdk .metakyc-overview-step-item:before,.metakyc-sdk .metakyc-overview-step-item:after,.metakyc-sdk .metakyc-overview-step-item *:before,.metakyc-sdk .metakyc-overview-step-item *:after,.metakyc-sdk .metakyc-step-content:before,.metakyc-sdk .metakyc-step-content:after,.metakyc-sdk .metakyc-step-content *:before,.metakyc-sdk .metakyc-step-content *:after,.metakyc-sdk .metakyc-step-title:before,.metakyc-sdk .metakyc-step-title:after,.metakyc-sdk .metakyc-step-description:before,.metakyc-sdk .metakyc-step-description:after{content:none!important;display:none!important;visibility:hidden!important;border:none!important;box-shadow:none!important;outline:none!important;background:none!important;height:0!important;width:0!important}.metakyc-sdk .metakyc-overview-step-item{border-width:0!important;border-style:none!important;border:0!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-step-content{border-width:0!important;border-style:none!important;border:0!important;padding-top:0!important;margin-top:0!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-step-title{border-width:0!important;border-style:none!important;border:0!important;padding-top:0!important;margin-top:0!important;box-shadow:none!important;outline:none!important;text-decoration:none!important}.metakyc-sdk hr,.metakyc-sdk .metakyc-overview-step-item hr,.metakyc-sdk .metakyc-overview-step-item * hr,.metakyc-sdk .metakyc-step-content hr,.metakyc-sdk .metakyc-step-content * hr{display:block!important;height:0!important;border:0!important;border-top:1px solid var(--metakyc-primary, #2563eb)!important;opacity:.25!important;margin:1rem 0!important;overflow:visible!important}.metakyc-sdk{background-color:var(--metakyc-background, #ffffff)!important;color:var(--metakyc-text-primary, #111827)!important;font-family:var(--metakyc-font-family, inherit)!important;padding:1.5rem!important;border-radius:.75rem!important}.metakyc-sdk h1,.metakyc-sdk h2,.metakyc-sdk h3,.metakyc-sdk h4,.metakyc-sdk h5,.metakyc-sdk h6{color:var(--metakyc-text-primary, #111827);letter-spacing:normal}.metakyc-sdk .text-gray-900{color:var(--metakyc-text-primary, #111827)!important}.metakyc-sdk .text-gray-800{color:var(--metakyc-text-primary, #1f2937)!important}.metakyc-sdk .text-gray-700{color:var(--metakyc-text-secondary, #374151)!important}.metakyc-sdk .text-gray-600{color:var(--metakyc-text-secondary, #6b7280)!important}.metakyc-sdk .text-gray-500{color:var(--metakyc-text-muted, #6b7280)!important}.metakyc-sdk .text-gray-400{color:var(--metakyc-text-muted, #9ca3af)!important}.metakyc-sdk .text-gray-300{color:var(--metakyc-text-muted, #d1d5db)!important}.metakyc-sdk .text-white{color:#fff!important}.metakyc-sdk .bg-white{background-color:var(--metakyc-background, #ffffff)!important}.metakyc-sdk .bg-gray-50{background-color:var(--metakyc-surface, #f9fafb)!important}.metakyc-sdk .bg-gray-100{background-color:var(--metakyc-surface, #f3f4f6)!important}.metakyc-sdk .bg-gray-200{background-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .bg-gray-800{background-color:var(--metakyc-surface, #1f2937)!important}.metakyc-sdk .border-gray-100,.metakyc-sdk .border-gray-200,.metakyc-sdk .border-gray-300{border-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .border-t{border-top-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .border-b{border-bottom-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .divide-gray-200>*{border-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .bg-primary-500,.metakyc-sdk .bg-primary-600{background-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .bg-primary-50,.metakyc-sdk .bg-primary-100{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .text-primary-500,.metakyc-sdk .text-primary-600,.metakyc-sdk .text-primary-800{color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .text-primary-900{color:var(--metakyc-primary-dark, #1e40af)!important}.metakyc-sdk .border-primary-500,.metakyc-sdk .border-primary-600{border-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .hover\\:bg-primary-50:hover{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .hover\\:bg-primary-600:hover{background-color:var(--metakyc-primary-hover, #1d4ed8)!important}.metakyc-sdk .bg-blue-600{background-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .bg-blue-100{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .text-blue-600,.metakyc-sdk .text-blue-400{color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .hover\\:bg-blue-700:hover{background-color:var(--metakyc-primary-hover, #1d4ed8)!important}.metakyc-sdk .metakyc-overview-steps h3:before,.metakyc-sdk .metakyc-overview-steps h3:after{content:none!important;display:none!important}.metakyc-sdk .metakyc-overview-steps *:before,.metakyc-sdk .metakyc-overview-steps *:after{content:none!important;display:none!important}.metakyc-sdk .metakyc-stepper-scroll::-webkit-scrollbar{display:none!important;height:0!important;width:0!important}.metakyc-sdk .metakyc-file-dropzone:hover{border-color:var(--metakyc-primary, #2563eb)!important;background-color:color-mix(in srgb,var(--metakyc-primary, #2563eb) 3%,var(--metakyc-background, #ffffff))!important}.metakyc-sdk .metakyc-file-item:hover{background-color:color-mix(in srgb,var(--metakyc-surface, #f9fafb) 80%,var(--metakyc-border, #e5e7eb))!important}.metakyc-sdk .metakyc-file-upload label{color:var(--metakyc-text-primary, #111827)!important}.metakyc-sdk .metakyc-file-upload p{margin:0!important;line-height:1.4!important}.metakyc-sdk .metakyc-file-item button{background:transparent!important;border:none!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-file-dropzone{box-shadow:none!important;outline:none!important}.metakyc-sdk .hover\\:opacity-90:hover{opacity:.9}.metakyc-sdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.metakyc-sdk .focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.metakyc-sdk .focus\\:ring-offset-0:focus{--tw-ring-offset-width: 0px}.metakyc-sdk .focus\\:ring-offset-1:focus{--tw-ring-offset-width: 1px}.metakyc-sdk .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.metakyc-sdk .disabled\\:opacity-50:disabled{opacity:.5}.metakyc-sdk .disabled\\:opacity-60:disabled{opacity:.6}.metakyc-sdk .dark\\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.metakyc-sdk .md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}', Wt = "metakyc-sdk-styles";
|
|
6850
|
-
let
|
|
6849
|
+
const ai = Xt(null), Nr = '.metakyc-sdk .pointer-events-none{pointer-events:none}.metakyc-sdk .visible{visibility:visible}.metakyc-sdk .static{position:static}.metakyc-sdk .fixed{position:fixed}.metakyc-sdk .absolute{position:absolute}.metakyc-sdk .relative{position:relative}.metakyc-sdk .inset-y-0{top:0;bottom:0}.metakyc-sdk .left-0{left:0}.metakyc-sdk .right-0{right:0}.metakyc-sdk .right-3{right:.75rem}.metakyc-sdk .top-1\\/2{top:50%}.metakyc-sdk .mx-4{margin-left:1rem;margin-right:1rem}.metakyc-sdk .mx-6{margin-left:1.5rem;margin-right:1.5rem}.metakyc-sdk .mx-auto{margin-left:auto;margin-right:auto}.metakyc-sdk .my-8{margin-top:2rem;margin-bottom:2rem}.metakyc-sdk .-ml-1{margin-left:-.25rem}.metakyc-sdk .mb-0\\.5{margin-bottom:.125rem}.metakyc-sdk .mb-1{margin-bottom:.25rem}.metakyc-sdk .mb-2{margin-bottom:.5rem}.metakyc-sdk .mb-3{margin-bottom:.75rem}.metakyc-sdk .mb-4{margin-bottom:1rem}.metakyc-sdk .mb-6{margin-bottom:1.5rem}.metakyc-sdk .ml-0\\.5{margin-left:.125rem}.metakyc-sdk .ml-1{margin-left:.25rem}.metakyc-sdk .ml-3{margin-left:.75rem}.metakyc-sdk .mr-2{margin-right:.5rem}.metakyc-sdk .mr-3{margin-right:.75rem}.metakyc-sdk .mt-0\\.5{margin-top:.125rem}.metakyc-sdk .mt-1{margin-top:.25rem}.metakyc-sdk .mt-2{margin-top:.5rem}.metakyc-sdk .mt-3{margin-top:.75rem}.metakyc-sdk .mt-4{margin-top:1rem}.metakyc-sdk .mt-6{margin-top:1.5rem}.metakyc-sdk .block{display:block}.metakyc-sdk .inline-block{display:inline-block}.metakyc-sdk .inline{display:inline}.metakyc-sdk .flex{display:flex}.metakyc-sdk .inline-flex{display:inline-flex}.metakyc-sdk .grid{display:grid}.metakyc-sdk .hidden{display:none}.metakyc-sdk .h-12{height:3rem}.metakyc-sdk .h-16{height:4rem}.metakyc-sdk .h-24{height:6rem}.metakyc-sdk .h-4{height:1rem}.metakyc-sdk .h-6{height:1.5rem}.metakyc-sdk .h-8{height:2rem}.metakyc-sdk .h-full{height:100%}.metakyc-sdk .max-h-52{max-height:13rem}.metakyc-sdk .min-h-\\[400px\\]{min-height:400px}.metakyc-sdk .w-12{width:3rem}.metakyc-sdk .w-16{width:4rem}.metakyc-sdk .w-20{width:5rem}.metakyc-sdk .w-24{width:6rem}.metakyc-sdk .w-4{width:1rem}.metakyc-sdk .w-6{width:1.5rem}.metakyc-sdk .w-8{width:2rem}.metakyc-sdk .w-full{width:100%}.metakyc-sdk .max-w-md{max-width:28rem}.metakyc-sdk .flex-1{flex:1 1 0%}.metakyc-sdk .flex-shrink-0{flex-shrink:0}.metakyc-sdk .-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.metakyc-sdk .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.metakyc-sdk .animate-spin{animation:spin 1s linear infinite}.metakyc-sdk .cursor-not-allowed{cursor:not-allowed}.metakyc-sdk .cursor-pointer{cursor:pointer}.metakyc-sdk .resize{resize:both}.metakyc-sdk .list-inside{list-style-position:inside}.metakyc-sdk .list-disc{list-style-type:disc}.metakyc-sdk .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.metakyc-sdk .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.metakyc-sdk .flex-col{flex-direction:column}.metakyc-sdk .flex-wrap{flex-wrap:wrap}.metakyc-sdk .items-start{align-items:flex-start}.metakyc-sdk .items-center{align-items:center}.metakyc-sdk .justify-center{justify-content:center}.metakyc-sdk .justify-between{justify-content:space-between}.metakyc-sdk .gap-1{gap:.25rem}.metakyc-sdk .gap-1\\.5{gap:.375rem}.metakyc-sdk .gap-2{gap:.5rem}.metakyc-sdk .gap-4{gap:1rem}.metakyc-sdk :is(.space-x-3>:not([hidden])~:not([hidden])){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.metakyc-sdk :is(.space-y-1>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-1\\.5>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-2>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-4>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-6>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.metakyc-sdk :is(.space-y-8>:not([hidden])~:not([hidden])){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.metakyc-sdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.metakyc-sdk .rounded{border-radius:.25rem}.metakyc-sdk .rounded-full{border-radius:9999px}.metakyc-sdk .rounded-lg{border-radius:.5rem}.metakyc-sdk .rounded-xl{border-radius:.75rem}.metakyc-sdk .border{border-width:1px}.metakyc-sdk .border-0{border-width:0px}.metakyc-sdk .border-2{border-width:2px}.metakyc-sdk .border-b{border-bottom-width:1px}.metakyc-sdk .border-t{border-top-width:1px}.metakyc-sdk .border-danger-500{border-color:var(--metakyc-danger, #EF4444)}.metakyc-sdk .p-3{padding:.75rem}.metakyc-sdk .p-4{padding:1rem}.metakyc-sdk .px-2{padding-left:.5rem;padding-right:.5rem}.metakyc-sdk .px-2\\.5{padding-left:.625rem;padding-right:.625rem}.metakyc-sdk .px-3{padding-left:.75rem;padding-right:.75rem}.metakyc-sdk .px-4{padding-left:1rem;padding-right:1rem}.metakyc-sdk .px-6{padding-left:1.5rem;padding-right:1.5rem}.metakyc-sdk .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.metakyc-sdk .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.metakyc-sdk .py-12{padding-top:3rem;padding-bottom:3rem}.metakyc-sdk .py-2{padding-top:.5rem;padding-bottom:.5rem}.metakyc-sdk .py-3{padding-top:.75rem;padding-bottom:.75rem}.metakyc-sdk .py-4{padding-top:1rem;padding-bottom:1rem}.metakyc-sdk .py-8{padding-top:2rem;padding-bottom:2rem}.metakyc-sdk .pb-4{padding-bottom:1rem}.metakyc-sdk .pl-10{padding-left:2.5rem}.metakyc-sdk .pl-3{padding-left:.75rem}.metakyc-sdk .pr-10{padding-right:2.5rem}.metakyc-sdk .pr-3{padding-right:.75rem}.metakyc-sdk .pr-6{padding-right:1.5rem}.metakyc-sdk .pt-6{padding-top:1.5rem}.metakyc-sdk .text-left{text-align:left}.metakyc-sdk .text-center{text-align:center}.metakyc-sdk .text-right{text-align:right}.metakyc-sdk .text-2xl{font-size:1.5rem;line-height:2rem}.metakyc-sdk .text-3xl{font-size:1.875rem;line-height:2.25rem}.metakyc-sdk .text-5xl{font-size:3rem;line-height:1}.metakyc-sdk .text-base{font-size:1rem;line-height:1.5rem}.metakyc-sdk .text-lg{font-size:1.125rem;line-height:1.75rem}.metakyc-sdk .text-sm{font-size:.875rem;line-height:1.25rem}.metakyc-sdk .text-xl{font-size:1.25rem;line-height:1.75rem}.metakyc-sdk .text-xs{font-size:.75rem;line-height:1rem}.metakyc-sdk .font-bold{font-weight:700}.metakyc-sdk .font-medium{font-weight:500}.metakyc-sdk .font-semibold{font-weight:600}.metakyc-sdk .uppercase{text-transform:uppercase}.metakyc-sdk .lowercase{text-transform:lowercase}.metakyc-sdk .tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.metakyc-sdk .leading-6{line-height:1.5rem}.metakyc-sdk .text-danger-500{color:var(--metakyc-danger, #EF4444)}.metakyc-sdk .text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.metakyc-sdk .text-primary,.metakyc-sdk .text-primary-500{color:var(--metakyc-primary, #3B82F6)}.metakyc-sdk .text-secondary{color:var(--metakyc-secondary, #64748b)}.metakyc-sdk .underline{text-decoration-line:underline}.metakyc-sdk .opacity-25{opacity:.25}.metakyc-sdk .opacity-50{opacity:.5}.metakyc-sdk .opacity-60{opacity:.6}.metakyc-sdk .opacity-75{opacity:.75}.metakyc-sdk .shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.metakyc-sdk .outline{outline-style:solid}.metakyc-sdk .ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.metakyc-sdk .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.metakyc-sdk .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.metakyc-sdk .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.metakyc-sdk .duration-200{transition-duration:.2s}.metakyc-sdk .grid{display:grid!important}.metakyc-sdk .flex{display:flex!important}.metakyc-sdk .inline-flex{display:inline-flex!important}.metakyc-sdk .hidden{display:none!important}.metakyc-sdk .block{display:block!important}.metakyc-sdk .grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}.metakyc-sdk .grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important}.metakyc-sdk .col-span-1{grid-column:span 1 / span 1!important}.metakyc-sdk .col-span-2{grid-column:span 2 / span 2!important}.metakyc-sdk .col-span-3{grid-column:span 3 / span 3!important}.metakyc-sdk .col-span-4{grid-column:span 4 / span 4!important}.metakyc-sdk .gap-1{gap:.25rem!important}.metakyc-sdk .gap-2{gap:.5rem!important}.metakyc-sdk .gap-3{gap:.75rem!important}.metakyc-sdk .gap-4{gap:1rem!important}.metakyc-sdk .gap-6{gap:1.5rem!important}.metakyc-sdk .gap-8{gap:2rem!important}.metakyc-sdk .flex-col{flex-direction:column!important}.metakyc-sdk .flex-row{flex-direction:row!important}.metakyc-sdk .flex-wrap{flex-wrap:wrap!important}.metakyc-sdk .flex-1{flex:1 1 0%!important}.metakyc-sdk .flex-shrink-0{flex-shrink:0!important}.metakyc-sdk .items-center{align-items:center!important}.metakyc-sdk .items-start{align-items:flex-start!important}.metakyc-sdk .items-end{align-items:flex-end!important}.metakyc-sdk .justify-between{justify-content:space-between!important}.metakyc-sdk .justify-center{justify-content:center!important}.metakyc-sdk .justify-end{justify-content:flex-end!important}.metakyc-sdk .justify-start{justify-content:flex-start!important}.metakyc-sdk .space-y-1>*+*{margin-top:.25rem!important}.metakyc-sdk .space-y-1\\.5>*+*{margin-top:.375rem!important}.metakyc-sdk .space-y-2>*+*{margin-top:.5rem!important}.metakyc-sdk .space-y-3>*+*{margin-top:.75rem!important}.metakyc-sdk .space-y-4>*+*{margin-top:1rem!important}.metakyc-sdk .space-y-6>*+*{margin-top:1.5rem!important}.metakyc-sdk .w-full{width:100%!important}.metakyc-sdk .relative{position:relative!important}.metakyc-sdk .absolute{position:absolute!important}.metakyc-sdk .overflow-hidden{overflow:hidden!important}.metakyc-sdk .overflow-auto{overflow:auto!important}.metakyc-sdk .overflow-x-auto{overflow-x:auto!important}@media (min-width: 768px){.metakyc-sdk .md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))!important}.metakyc-sdk .md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))!important}}.metakyc-sdk .metakyc-form-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:1rem!important}@media (max-width: 767px){.metakyc-sdk .metakyc-form-grid{grid-template-columns:1fr!important}.metakyc-sdk .metakyc-form-grid>*{grid-column:span 1 / span 1!important}.metakyc-sdk .metakyc-grid-2{grid-template-columns:1fr!important}}@media (max-width: 767px){.metakyc-sdk .metakyc-card-content,.metakyc-sdk .metakyc-card-header,.metakyc-sdk .metakyc-card-footer,.metakyc-sdk .metakyc-progress-wrapper{padding-left:12px!important;padding-right:12px!important}.metakyc-sdk .metakyc-form-grid{gap:.75rem!important}}.metakyc-sdk *,.metakyc-sdk *:before,.metakyc-sdk *:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--metakyc-border, #e5e7eb)}.metakyc-sdk{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4}.metakyc-sdk img,.metakyc-sdk video{max-width:100%;height:auto}.metakyc-sdk h1,.metakyc-sdk h2,.metakyc-sdk h3,.metakyc-sdk h4,.metakyc-sdk h5,.metakyc-sdk h6,.metakyc-sdk p{margin:0}.metakyc-sdk ol,.metakyc-sdk ul{list-style:none;margin:0;padding:0}.metakyc-sdk button,.metakyc-sdk input,.metakyc-sdk optgroup,.metakyc-sdk select,.metakyc-sdk textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}.metakyc-sdk button,.metakyc-sdk [role=button]{cursor:pointer}.metakyc-sdk a{color:inherit;text-decoration:inherit}.metakyc-sdk input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]),.metakyc-sdk select,.metakyc-sdk textarea,.metakyc-sdk .metakyc-searchable-select-trigger,.metakyc-sdk .metakyc-multiselect-trigger{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important}.metakyc-sdk input::-moz-placeholder,.metakyc-sdk textarea::-moz-placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-sdk input::placeholder,.metakyc-sdk textarea::placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-sdk input:not([type=checkbox]):not([type=radio]):focus,.metakyc-sdk select:focus,.metakyc-sdk textarea:focus{outline:none!important;border-color:var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb)) 20%,transparent)!important}.metakyc-sdk input[type=checkbox],.metakyc-sdk input[type=radio]{appearance:none!important;-webkit-appearance:none!important;-moz-appearance:none!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;max-width:16px!important;max-height:16px!important;flex-shrink:0!important;cursor:pointer!important;background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;border:1.5px solid var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important;position:relative!important;transition:background-color .15s,border-color .15s!important;vertical-align:middle!important;display:inline-block!important;padding:0!important;margin:0!important;color-scheme:light!important}.metakyc-sdk input[type=checkbox]{border-radius:4px!important}.metakyc-sdk input[type=radio]{border-radius:50%!important}.metakyc-sdk input[type=checkbox]:checked,.metakyc-sdk input[type=radio]:checked{background-color:var(--metakyc-primary, #2563eb)!important;border-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk input[type=checkbox]:checked:after{content:""!important;display:block!important;position:absolute!important;left:4px!important;top:1px!important;width:5px!important;height:9px!important;border:2px solid #ffffff!important;border-top:none!important;border-left:none!important;transform:rotate(45deg)!important}.metakyc-sdk input[type=radio]:checked:after{content:""!important;display:block!important;position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:6px!important;height:6px!important;border-radius:50%!important;background:#fff!important}.metakyc-sdk input[type=checkbox]:focus,.metakyc-sdk input[type=radio]:focus{outline:none!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-primary, #2563eb) 30%,transparent)!important}.metakyc-searchable-select-dropdown,.metakyc-multiselect-dropdown{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important}.metakyc-searchable-select-dropdown input,.metakyc-multiselect-dropdown input{background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border, var(--metakyc-border, #d1d5db))!important}.metakyc-searchable-select-dropdown input::-moz-placeholder,.metakyc-multiselect-dropdown input::-moz-placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-searchable-select-dropdown input::placeholder,.metakyc-multiselect-dropdown input::placeholder{color:var(--metakyc-input-placeholder, var(--metakyc-text-muted, #9ca3af))!important;opacity:1!important}.metakyc-searchable-select-dropdown input:focus,.metakyc-multiselect-dropdown input:focus{outline:none!important;background-color:var(--metakyc-input-bg, var(--metakyc-background, #ffffff))!important;color:var(--metakyc-input-text, var(--metakyc-text-primary, #111827))!important;border-color:var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb))!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--metakyc-input-border-focus, var(--metakyc-primary, #2563eb)) 20%,transparent)!important}.metakyc-searchable-select-dropdown li:hover,.metakyc-multiselect-dropdown li:hover{background-color:var(--metakyc-surface, var(--metakyc-background, #f9fafb))!important}.metakyc-sdk .metakyc-help-btn{color:var(--metakyc-primary, #2563eb)!important;border-color:var(--metakyc-primary, #2563eb)!important;background:transparent!important;position:relative!important;z-index:2!important}.metakyc-sdk .metakyc-overview-step-item,.metakyc-sdk .metakyc-overview-step-item *,.metakyc-sdk .metakyc-step-content,.metakyc-sdk .metakyc-step-content *,.metakyc-sdk .metakyc-step-title,.metakyc-sdk .metakyc-step-title *,.metakyc-sdk .metakyc-step-icon,.metakyc-sdk .metakyc-step-icon *,.metakyc-sdk .metakyc-step-description,.metakyc-sdk .metakyc-step-description *{border-top-width:0!important;border-bottom-width:0!important;border-left-width:0!important;border-right-width:0!important;border-top-style:none!important;border-bottom-style:none!important;border-left-style:none!important;border-right-style:none!important;border-top-color:transparent!important;border-bottom-color:transparent!important;border-left-color:transparent!important;border-right-color:transparent!important;border:0!important;box-shadow:none!important;outline:none!important;outline-width:0!important;outline-style:none!important;text-decoration:none!important;text-decoration-line:none!important}.metakyc-sdk .metakyc-overview-step-item:before,.metakyc-sdk .metakyc-overview-step-item:after,.metakyc-sdk .metakyc-overview-step-item *:before,.metakyc-sdk .metakyc-overview-step-item *:after,.metakyc-sdk .metakyc-step-content:before,.metakyc-sdk .metakyc-step-content:after,.metakyc-sdk .metakyc-step-content *:before,.metakyc-sdk .metakyc-step-content *:after,.metakyc-sdk .metakyc-step-title:before,.metakyc-sdk .metakyc-step-title:after,.metakyc-sdk .metakyc-step-description:before,.metakyc-sdk .metakyc-step-description:after{content:none!important;display:none!important;visibility:hidden!important;border:none!important;box-shadow:none!important;outline:none!important;background:none!important;height:0!important;width:0!important}.metakyc-sdk .metakyc-overview-step-item{border-width:0!important;border-style:none!important;border:0!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-step-content{border-width:0!important;border-style:none!important;border:0!important;padding-top:0!important;margin-top:0!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-step-title{border-width:0!important;border-style:none!important;border:0!important;padding-top:0!important;margin-top:0!important;box-shadow:none!important;outline:none!important;text-decoration:none!important}.metakyc-sdk hr,.metakyc-sdk .metakyc-overview-step-item hr,.metakyc-sdk .metakyc-overview-step-item * hr,.metakyc-sdk .metakyc-step-content hr,.metakyc-sdk .metakyc-step-content * hr{display:block!important;height:0!important;border:0!important;border-top:1px solid var(--metakyc-primary, #2563eb)!important;opacity:.25!important;margin:1rem 0!important;overflow:visible!important}.metakyc-sdk{background-color:var(--metakyc-background, #ffffff)!important;color:var(--metakyc-text-primary, #111827)!important;font-family:var(--metakyc-font-family, inherit)!important;padding:1.5rem!important;border-radius:.75rem!important}.metakyc-sdk h1,.metakyc-sdk h2,.metakyc-sdk h3,.metakyc-sdk h4,.metakyc-sdk h5,.metakyc-sdk h6{color:var(--metakyc-text-primary, #111827);letter-spacing:normal}.metakyc-sdk .text-gray-900{color:var(--metakyc-text-primary, #111827)!important}.metakyc-sdk .text-gray-800{color:var(--metakyc-text-primary, #1f2937)!important}.metakyc-sdk .text-gray-700{color:var(--metakyc-text-secondary, #374151)!important}.metakyc-sdk .text-gray-600{color:var(--metakyc-text-secondary, #6b7280)!important}.metakyc-sdk .text-gray-500{color:var(--metakyc-text-muted, #6b7280)!important}.metakyc-sdk .text-gray-400{color:var(--metakyc-text-muted, #9ca3af)!important}.metakyc-sdk .text-gray-300{color:var(--metakyc-text-muted, #d1d5db)!important}.metakyc-sdk .text-white{color:#fff!important}.metakyc-sdk .bg-white{background-color:var(--metakyc-background, #ffffff)!important}.metakyc-sdk .bg-gray-50{background-color:var(--metakyc-surface, #f9fafb)!important}.metakyc-sdk .bg-gray-100{background-color:var(--metakyc-surface, #f3f4f6)!important}.metakyc-sdk .bg-gray-200{background-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .bg-gray-800{background-color:var(--metakyc-surface, #1f2937)!important}.metakyc-sdk .border-gray-100,.metakyc-sdk .border-gray-200,.metakyc-sdk .border-gray-300{border-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .border-t{border-top-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .border-b{border-bottom-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .divide-gray-200>*{border-color:var(--metakyc-border, #e5e7eb)!important}.metakyc-sdk .bg-primary-500,.metakyc-sdk .bg-primary-600{background-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .bg-primary-50,.metakyc-sdk .bg-primary-100{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .text-primary-500,.metakyc-sdk .text-primary-600,.metakyc-sdk .text-primary-800{color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .text-primary-900{color:var(--metakyc-primary-dark, #1e40af)!important}.metakyc-sdk .border-primary-500,.metakyc-sdk .border-primary-600{border-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .hover\\:bg-primary-50:hover{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .hover\\:bg-primary-600:hover{background-color:var(--metakyc-primary-hover, #1d4ed8)!important}.metakyc-sdk .bg-blue-600{background-color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .bg-blue-100{background-color:var(--metakyc-primary-light, #dbeafe)!important}.metakyc-sdk .text-blue-600,.metakyc-sdk .text-blue-400{color:var(--metakyc-primary, #2563eb)!important}.metakyc-sdk .hover\\:bg-blue-700:hover{background-color:var(--metakyc-primary-hover, #1d4ed8)!important}.metakyc-sdk .metakyc-overview-steps h3:before,.metakyc-sdk .metakyc-overview-steps h3:after{content:none!important;display:none!important}.metakyc-sdk .metakyc-overview-steps *:before,.metakyc-sdk .metakyc-overview-steps *:after{content:none!important;display:none!important}.metakyc-sdk .metakyc-stepper-scroll::-webkit-scrollbar{display:none!important;height:0!important;width:0!important}.metakyc-sdk .metakyc-file-dropzone:hover{border-color:var(--metakyc-primary, #2563eb)!important;background-color:color-mix(in srgb,var(--metakyc-primary, #2563eb) 3%,var(--metakyc-background, #ffffff))!important}.metakyc-sdk .metakyc-file-item:hover{background-color:color-mix(in srgb,var(--metakyc-surface, #f9fafb) 80%,var(--metakyc-border, #e5e7eb))!important}.metakyc-sdk .metakyc-file-upload label{color:var(--metakyc-text-primary, #111827)!important}.metakyc-sdk .metakyc-file-upload p{margin:0!important;line-height:1.4!important}.metakyc-sdk .metakyc-file-item button{background:transparent!important;border:none!important;box-shadow:none!important;outline:none!important}.metakyc-sdk .metakyc-file-dropzone{box-shadow:none!important;outline:none!important}.metakyc-sdk .hover\\:opacity-90:hover{opacity:.9}.metakyc-sdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.metakyc-sdk .focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.metakyc-sdk .focus\\:ring-offset-0:focus{--tw-ring-offset-width: 0px}.metakyc-sdk .focus\\:ring-offset-1:focus{--tw-ring-offset-width: 1px}.metakyc-sdk .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.metakyc-sdk .disabled\\:opacity-50:disabled{opacity:.5}.metakyc-sdk .disabled\\:opacity-60:disabled{opacity:.6}.metakyc-sdk .dark\\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.metakyc-sdk .dark\\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.metakyc-sdk .md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}', Ut = "metakyc-sdk-styles";
|
|
6850
|
+
let St = !1;
|
|
6851
6851
|
function Tr() {
|
|
6852
|
-
if (
|
|
6853
|
-
if (document.getElementById(
|
|
6854
|
-
|
|
6852
|
+
if (St || typeof document > "u") return;
|
|
6853
|
+
if (document.getElementById(Ut)) {
|
|
6854
|
+
St = !0;
|
|
6855
6855
|
return;
|
|
6856
6856
|
}
|
|
6857
6857
|
const e = document.createElement("style");
|
|
6858
|
-
e.id =
|
|
6858
|
+
e.id = Ut, e.textContent = Nr, document.head.appendChild(e), St = !0;
|
|
6859
6859
|
}
|
|
6860
|
-
const
|
|
6860
|
+
const Wt = "metakyc-theme-cache", Da = ({ config: e, children: t }) => {
|
|
6861
6861
|
Tr();
|
|
6862
|
-
const [a, r] = S(null), n = Ne.useRef(!1), l = Ne.useRef(!1),
|
|
6862
|
+
const [a, r] = S(null), n = Ne.useRef(!1), l = Ne.useRef(!1), o = Fe(() => {
|
|
6863
6863
|
const d = new Li(e), y = new Ei(d), w = new Pi(d), z = new Di(d), L = new Mi(d), C = new ji(d), q = new Fi(d), T = new Oi(d), P = new Vi(d), B = new Bi(d), O = new $i(d), U = new _i(d), H = new ar();
|
|
6864
6864
|
if (typeof document < "u")
|
|
6865
6865
|
if (e.theme)
|
|
6866
6866
|
H.applyTheme(e.theme);
|
|
6867
6867
|
else
|
|
6868
6868
|
try {
|
|
6869
|
-
const J = localStorage.getItem(
|
|
6869
|
+
const J = localStorage.getItem(Wt);
|
|
6870
6870
|
H.applyTheme(J ? JSON.parse(J) : Pe);
|
|
6871
6871
|
} catch {
|
|
6872
6872
|
H.applyTheme(Pe);
|
|
@@ -6888,19 +6888,19 @@ const Kt = "metakyc-theme-cache", Da = ({ config: e, children: t }) => {
|
|
|
6888
6888
|
};
|
|
6889
6889
|
}, [e]), p = Fe(() => ({
|
|
6890
6890
|
config: e,
|
|
6891
|
-
...
|
|
6891
|
+
...o,
|
|
6892
6892
|
currentTheme: a,
|
|
6893
6893
|
createOrchestrator: () => new Zi(
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
|
|
6900
|
-
|
|
6901
|
-
|
|
6894
|
+
o.applicantService,
|
|
6895
|
+
o.questionnaireService,
|
|
6896
|
+
o.uploadDocumentService,
|
|
6897
|
+
o.appropriatenessTestService,
|
|
6898
|
+
o.overviewService,
|
|
6899
|
+
o.riskScoringService,
|
|
6900
|
+
o.identityService,
|
|
6901
|
+
o.investorCategorizationService
|
|
6902
6902
|
)
|
|
6903
|
-
}), [e,
|
|
6903
|
+
}), [e, o, a]);
|
|
6904
6904
|
be(() => ((async () => {
|
|
6905
6905
|
if (n.current || l.current) {
|
|
6906
6906
|
console.log("[MetaKYC] Theme already loading or loaded, skipping...");
|
|
@@ -6909,36 +6909,36 @@ const Kt = "metakyc-theme-cache", Da = ({ config: e, children: t }) => {
|
|
|
6909
6909
|
n.current = !0;
|
|
6910
6910
|
try {
|
|
6911
6911
|
if (e.theme) {
|
|
6912
|
-
console.log("[MetaKYC] Applying static theme from config"),
|
|
6912
|
+
console.log("[MetaKYC] Applying static theme from config"), o.themeManager.applyTheme(e.theme), r(o.themeManager.getCurrentTheme()), l.current = !0;
|
|
6913
6913
|
return;
|
|
6914
6914
|
}
|
|
6915
6915
|
console.log("[MetaKYC] Fetching theme from backend...");
|
|
6916
|
-
const y = await
|
|
6917
|
-
|
|
6916
|
+
const y = await o.themeService.getThemeConfiguration();
|
|
6917
|
+
o.themeManager.applyTheme(y), r(o.themeManager.getCurrentTheme()), l.current = !0;
|
|
6918
6918
|
try {
|
|
6919
|
-
localStorage.setItem(
|
|
6919
|
+
localStorage.setItem(Wt, JSON.stringify(y));
|
|
6920
6920
|
} catch {
|
|
6921
6921
|
}
|
|
6922
6922
|
console.log("[MetaKYC] Theme loaded and applied", y);
|
|
6923
6923
|
} catch (y) {
|
|
6924
|
-
console.warn("[MetaKYC] Failed to load theme, using default:", y), r(
|
|
6924
|
+
console.warn("[MetaKYC] Failed to load theme, using default:", y), r(o.themeManager.getCurrentTheme()), l.current = !0;
|
|
6925
6925
|
} finally {
|
|
6926
6926
|
n.current = !1;
|
|
6927
6927
|
}
|
|
6928
6928
|
})(), () => {
|
|
6929
|
-
|
|
6929
|
+
o.themeManager.cleanup();
|
|
6930
6930
|
}), []);
|
|
6931
6931
|
const m = ie(
|
|
6932
|
-
(d) =>
|
|
6933
|
-
[
|
|
6932
|
+
(d) => o.translationService.getTranslations(d),
|
|
6933
|
+
[o.translationService]
|
|
6934
6934
|
);
|
|
6935
|
-
return /* @__PURE__ */ i(ai.Provider, { value: p, children: /* @__PURE__ */
|
|
6935
|
+
return /* @__PURE__ */ i(ai.Provider, { value: p, children: /* @__PURE__ */ s(
|
|
6936
6936
|
Cr,
|
|
6937
6937
|
{
|
|
6938
6938
|
locale: e.locale || "en",
|
|
6939
6939
|
fetchTranslations: m,
|
|
6940
6940
|
children: [
|
|
6941
|
-
e.showVersion && /* @__PURE__ */
|
|
6941
|
+
e.showVersion && /* @__PURE__ */ s(
|
|
6942
6942
|
"div",
|
|
6943
6943
|
{
|
|
6944
6944
|
style: {
|
|
@@ -6964,7 +6964,7 @@ const Kt = "metakyc-theme-cache", Da = ({ config: e, children: t }) => {
|
|
|
6964
6964
|
) });
|
|
6965
6965
|
};
|
|
6966
6966
|
function Oe() {
|
|
6967
|
-
const e =
|
|
6967
|
+
const e = Zt(ai);
|
|
6968
6968
|
if (!e)
|
|
6969
6969
|
throw new Error("useMetaKYC must be used within a MetaKYCProvider");
|
|
6970
6970
|
return e;
|
|
@@ -6990,7 +6990,7 @@ function ja(e, t) {
|
|
|
6990
6990
|
return e.type === r;
|
|
6991
6991
|
});
|
|
6992
6992
|
}
|
|
6993
|
-
function
|
|
6993
|
+
function Ct(e) {
|
|
6994
6994
|
if (e === 0) return "0 Bytes";
|
|
6995
6995
|
const t = 1024, a = ["Bytes", "KB", "MB", "GB"], r = Math.floor(Math.log(e) / Math.log(t));
|
|
6996
6996
|
return Math.round(e / Math.pow(t, r) * 100) / 100 + " " + a[r];
|
|
@@ -7001,20 +7001,20 @@ function Fa(e) {
|
|
|
7001
7001
|
function Me(...e) {
|
|
7002
7002
|
return e.filter(Boolean).join(" ");
|
|
7003
7003
|
}
|
|
7004
|
-
const
|
|
7004
|
+
const gt = {
|
|
7005
7005
|
APPLICANT_ID: "metakyc_applicant_id",
|
|
7006
7006
|
WORKFLOW_STATE: "metakyc_workflow_state"
|
|
7007
7007
|
};
|
|
7008
7008
|
function Ir(e) {
|
|
7009
7009
|
try {
|
|
7010
|
-
localStorage.setItem(
|
|
7010
|
+
localStorage.setItem(gt.APPLICANT_ID, e.toString());
|
|
7011
7011
|
} catch (t) {
|
|
7012
7012
|
console.warn("Failed to save applicant ID to storage:", t);
|
|
7013
7013
|
}
|
|
7014
7014
|
}
|
|
7015
7015
|
function zr() {
|
|
7016
7016
|
try {
|
|
7017
|
-
const e = localStorage.getItem(
|
|
7017
|
+
const e = localStorage.getItem(gt.APPLICANT_ID);
|
|
7018
7018
|
return e ? parseInt(e, 10) : null;
|
|
7019
7019
|
} catch (e) {
|
|
7020
7020
|
return console.warn("Failed to retrieve applicant ID from storage:", e), null;
|
|
@@ -7022,21 +7022,21 @@ function zr() {
|
|
|
7022
7022
|
}
|
|
7023
7023
|
function Ar() {
|
|
7024
7024
|
try {
|
|
7025
|
-
localStorage.removeItem(
|
|
7025
|
+
localStorage.removeItem(gt.APPLICANT_ID);
|
|
7026
7026
|
} catch (e) {
|
|
7027
7027
|
console.warn("Failed to clear applicant ID from storage:", e);
|
|
7028
7028
|
}
|
|
7029
7029
|
}
|
|
7030
7030
|
function Lr(e) {
|
|
7031
7031
|
try {
|
|
7032
|
-
localStorage.setItem(
|
|
7032
|
+
localStorage.setItem(gt.WORKFLOW_STATE, JSON.stringify(e));
|
|
7033
7033
|
} catch (t) {
|
|
7034
7034
|
console.warn("Failed to save workflow state to storage:", t);
|
|
7035
7035
|
}
|
|
7036
7036
|
}
|
|
7037
7037
|
function Oa() {
|
|
7038
7038
|
try {
|
|
7039
|
-
const e = localStorage.getItem(
|
|
7039
|
+
const e = localStorage.getItem(gt.WORKFLOW_STATE);
|
|
7040
7040
|
return e ? JSON.parse(e) : null;
|
|
7041
7041
|
} catch (e) {
|
|
7042
7042
|
return console.warn("Failed to retrieve workflow state from storage:", e), null;
|
|
@@ -7044,7 +7044,7 @@ function Oa() {
|
|
|
7044
7044
|
}
|
|
7045
7045
|
function Er() {
|
|
7046
7046
|
try {
|
|
7047
|
-
localStorage.removeItem(
|
|
7047
|
+
localStorage.removeItem(gt.WORKFLOW_STATE);
|
|
7048
7048
|
} catch (e) {
|
|
7049
7049
|
console.warn("Failed to clear workflow state from storage:", e);
|
|
7050
7050
|
}
|
|
@@ -7053,7 +7053,7 @@ function Va() {
|
|
|
7053
7053
|
Ar(), Er();
|
|
7054
7054
|
}
|
|
7055
7055
|
function Pr(e) {
|
|
7056
|
-
const { createOrchestrator: t } = Oe(), [a, r] = S(null), [n, l] = S(!1), [
|
|
7056
|
+
const { createOrchestrator: t } = Oe(), [a, r] = S(null), [n, l] = S(!1), [o, p] = S(null), m = ue(null), d = e || zr();
|
|
7057
7057
|
be(() => {
|
|
7058
7058
|
m.current || (m.current = t());
|
|
7059
7059
|
}, [t]), be(() => {
|
|
@@ -7140,7 +7140,7 @@ function Pr(e) {
|
|
|
7140
7140
|
l(!1);
|
|
7141
7141
|
}
|
|
7142
7142
|
}
|
|
7143
|
-
}, []), P =
|
|
7143
|
+
}, []), P = Mt.useMemo(() => a != null && a.stepInfoList ? [...a.stepInfoList].sort((O, U) => O.order - U.order) : [], [a == null ? void 0 : a.stepInfoList]), B = Mt.useMemo(() => a ? a.nextWorkflowKey && a.nextWorkflowKey !== a.workFlowKey : !1, [a]);
|
|
7144
7144
|
return {
|
|
7145
7145
|
progress: a,
|
|
7146
7146
|
applicantId: d,
|
|
@@ -7152,7 +7152,7 @@ function Pr(e) {
|
|
|
7152
7152
|
nextWorkflowKey: a == null ? void 0 : a.nextWorkflowKey,
|
|
7153
7153
|
hasWorkflowChanged: B,
|
|
7154
7154
|
isLoading: n,
|
|
7155
|
-
error:
|
|
7155
|
+
error: o,
|
|
7156
7156
|
isComplete: (a == null ? void 0 : a.status) === Ue.Finished,
|
|
7157
7157
|
isOnHold: (a == null ? void 0 : a.status) === Ue.OnHold,
|
|
7158
7158
|
refreshProgress: L,
|
|
@@ -7163,7 +7163,7 @@ function Pr(e) {
|
|
|
7163
7163
|
};
|
|
7164
7164
|
}
|
|
7165
7165
|
function Dr(e) {
|
|
7166
|
-
const { questionnaireService: t, applicantService: a } = Oe(), [r, n] = S(null), [l,
|
|
7166
|
+
const { questionnaireService: t, applicantService: a } = Oe(), [r, n] = S(null), [l, o] = S({}), [p, m] = S(!1), [d, y] = S(!1), [w, z] = S(null), L = ue(!1), C = ue(null), q = ie(async () => {
|
|
7167
7167
|
var P, B;
|
|
7168
7168
|
if (e) {
|
|
7169
7169
|
if (L.current) {
|
|
@@ -7185,7 +7185,7 @@ function Dr(e) {
|
|
|
7185
7185
|
const R = h.text.trim().toLowerCase();
|
|
7186
7186
|
H.has(R) && (J[h.id] = H.get(R));
|
|
7187
7187
|
}
|
|
7188
|
-
|
|
7188
|
+
o(J);
|
|
7189
7189
|
}
|
|
7190
7190
|
C.current = e;
|
|
7191
7191
|
} catch (O) {
|
|
@@ -7222,7 +7222,7 @@ function Dr(e) {
|
|
|
7222
7222
|
};
|
|
7223
7223
|
}
|
|
7224
7224
|
function Mr(e) {
|
|
7225
|
-
const { uploadDocumentService: t } = Oe(), [a, r] = S(null), [n, l] = S(!1), [
|
|
7225
|
+
const { uploadDocumentService: t } = Oe(), [a, r] = S(null), [n, l] = S(!1), [o, p] = S(!1), [m, d] = S(0), [y, w] = S(null), z = ue(!1), L = ue(null), C = ie(async () => {
|
|
7226
7226
|
if (e) {
|
|
7227
7227
|
if (z.current) {
|
|
7228
7228
|
console.log("[UploadDocument] Load already in progress, skipping...");
|
|
@@ -7258,7 +7258,7 @@ function Mr(e) {
|
|
|
7258
7258
|
return {
|
|
7259
7259
|
uploadDocument: a,
|
|
7260
7260
|
isLoading: n,
|
|
7261
|
-
isSubmitting:
|
|
7261
|
+
isSubmitting: o,
|
|
7262
7262
|
uploadProgress: m,
|
|
7263
7263
|
error: y,
|
|
7264
7264
|
load: C,
|
|
@@ -7266,7 +7266,7 @@ function Mr(e) {
|
|
|
7266
7266
|
};
|
|
7267
7267
|
}
|
|
7268
7268
|
function Ba(e) {
|
|
7269
|
-
const { appropriatenessTestService: t } = Oe(), [a, r] = S(null), [n, l] = S(!1), [
|
|
7269
|
+
const { appropriatenessTestService: t } = Oe(), [a, r] = S(null), [n, l] = S(!1), [o, p] = S(!1), [m, d] = S(null), [y, w] = S(null), z = ue(!1), L = ue(null), C = ie(async () => {
|
|
7270
7270
|
if (e) {
|
|
7271
7271
|
if (z.current) {
|
|
7272
7272
|
console.log("[AppropriatenessTest] Load already in progress, skipping...");
|
|
@@ -7304,14 +7304,14 @@ function Ba(e) {
|
|
|
7304
7304
|
test: a,
|
|
7305
7305
|
result: y,
|
|
7306
7306
|
isLoading: n,
|
|
7307
|
-
isSubmitting:
|
|
7307
|
+
isSubmitting: o,
|
|
7308
7308
|
error: m,
|
|
7309
7309
|
load: C,
|
|
7310
7310
|
submit: q
|
|
7311
7311
|
};
|
|
7312
7312
|
}
|
|
7313
7313
|
function jr(e) {
|
|
7314
|
-
const { overviewService: t } = Oe(), [a, r] = S(null), [n, l] = S(!1), [
|
|
7314
|
+
const { overviewService: t } = Oe(), [a, r] = S(null), [n, l] = S(!1), [o, p] = S(!1), [m, d] = S(null), y = ue(!1), w = ue(null), z = ie(async () => {
|
|
7315
7315
|
if (e) {
|
|
7316
7316
|
if (y.current) {
|
|
7317
7317
|
console.log("[Overview] Load already in progress, skipping...");
|
|
@@ -7346,7 +7346,7 @@ function jr(e) {
|
|
|
7346
7346
|
return {
|
|
7347
7347
|
overview: a,
|
|
7348
7348
|
isLoading: n,
|
|
7349
|
-
isSubmitting:
|
|
7349
|
+
isSubmitting: o,
|
|
7350
7350
|
error: m,
|
|
7351
7351
|
load: z,
|
|
7352
7352
|
passOverview: L
|
|
@@ -7355,7 +7355,7 @@ function jr(e) {
|
|
|
7355
7355
|
function Fr(e) {
|
|
7356
7356
|
const { identityService: t } = Oe(), [a, r] = S(
|
|
7357
7357
|
null
|
|
7358
|
-
), [n, l] = S(!1), [
|
|
7358
|
+
), [n, l] = S(!1), [o, p] = S(null), m = ue(!1), d = ie(
|
|
7359
7359
|
async (z, L) => {
|
|
7360
7360
|
if (e) {
|
|
7361
7361
|
if (m.current) {
|
|
@@ -7432,14 +7432,14 @@ function Fr(e) {
|
|
|
7432
7432
|
provider: (a == null ? void 0 : a.provider) || null,
|
|
7433
7433
|
token: (a == null ? void 0 : a.publicProviderTokenObject) || null,
|
|
7434
7434
|
isLoading: n,
|
|
7435
|
-
error:
|
|
7435
|
+
error: o,
|
|
7436
7436
|
requestIdentity: d,
|
|
7437
7437
|
requestCompanyIdentity: y,
|
|
7438
7438
|
restartIdentity: w
|
|
7439
7439
|
};
|
|
7440
7440
|
}
|
|
7441
7441
|
function Or(e) {
|
|
7442
|
-
const { riskScoringService: t, applicantService: a } = Oe(), [r, n] = S(null), [l,
|
|
7442
|
+
const { riskScoringService: t, applicantService: a } = Oe(), [r, n] = S(null), [l, o] = S({}), [p, m] = S(!1), [d, y] = S(!1), [w, z] = S(null), [L, C] = S(null), q = ue(!1), T = ue(null), P = ie(async () => {
|
|
7443
7443
|
var O;
|
|
7444
7444
|
if (e) {
|
|
7445
7445
|
if (q.current) {
|
|
@@ -7461,7 +7461,7 @@ function Or(e) {
|
|
|
7461
7461
|
)];
|
|
7462
7462
|
R.length > 0 && (re[h.riskCriteriaId] = R);
|
|
7463
7463
|
}
|
|
7464
|
-
|
|
7464
|
+
o(re);
|
|
7465
7465
|
}
|
|
7466
7466
|
T.current = e;
|
|
7467
7467
|
} catch (U) {
|
|
@@ -7500,15 +7500,15 @@ function Or(e) {
|
|
|
7500
7500
|
};
|
|
7501
7501
|
}
|
|
7502
7502
|
function ni() {
|
|
7503
|
-
const { applicantService: e, config: t } = Oe(), [a, r] = S(!1), [n, l] = S(null),
|
|
7503
|
+
const { applicantService: e, config: t } = Oe(), [a, r] = S(!1), [n, l] = S(null), o = ue(!1), p = ue(!1), m = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(L) {
|
|
7504
7504
|
const C = Math.random() * 16 | 0;
|
|
7505
7505
|
return (L === "x" ? C : C & 3 | 8).toString(16);
|
|
7506
7506
|
}), d = ie(
|
|
7507
7507
|
async (L) => {
|
|
7508
7508
|
var C;
|
|
7509
|
-
if (
|
|
7509
|
+
if (o.current)
|
|
7510
7510
|
throw console.log("[Applicant] Create already in progress, skipping..."), new Error("Creation already in progress");
|
|
7511
|
-
|
|
7511
|
+
o.current = !0, r(!0), l(null);
|
|
7512
7512
|
try {
|
|
7513
7513
|
if (L.applicantAdditionalDatas || (L.applicantAdditionalDatas = []), (C = t.identityProviders) != null && C.sardinai) {
|
|
7514
7514
|
const T = m();
|
|
@@ -7521,7 +7521,7 @@ function ni() {
|
|
|
7521
7521
|
} catch (q) {
|
|
7522
7522
|
throw l(q), q;
|
|
7523
7523
|
} finally {
|
|
7524
|
-
r(!1),
|
|
7524
|
+
r(!1), o.current = !1;
|
|
7525
7525
|
}
|
|
7526
7526
|
},
|
|
7527
7527
|
[e, t]
|
|
@@ -7606,7 +7606,7 @@ const Vr = {
|
|
|
7606
7606
|
isLoading: r = !1,
|
|
7607
7607
|
disabled: n,
|
|
7608
7608
|
className: l,
|
|
7609
|
-
style:
|
|
7609
|
+
style: o,
|
|
7610
7610
|
...p
|
|
7611
7611
|
}) => {
|
|
7612
7612
|
const m = "inline-flex items-center justify-center rounded-lg font-medium transition-opacity border focus:outline-none focus:ring-2 focus:ring-offset-1 disabled:opacity-50 disabled:cursor-not-allowed", d = {
|
|
@@ -7618,7 +7618,7 @@ const Vr = {
|
|
|
7618
7618
|
md: { padding: "0.5rem 1rem", fontSize: "0.875rem" },
|
|
7619
7619
|
lg: { padding: "0.75rem 1.5rem", fontSize: "1rem" }
|
|
7620
7620
|
};
|
|
7621
|
-
return /* @__PURE__ */
|
|
7621
|
+
return /* @__PURE__ */ s(
|
|
7622
7622
|
"button",
|
|
7623
7623
|
{
|
|
7624
7624
|
className: Me(m, d[a], l),
|
|
@@ -7635,12 +7635,12 @@ const Vr = {
|
|
|
7635
7635
|
lineHeight: "1.25rem",
|
|
7636
7636
|
...y[a],
|
|
7637
7637
|
...Vr[t],
|
|
7638
|
-
...
|
|
7638
|
+
...o
|
|
7639
7639
|
},
|
|
7640
7640
|
disabled: n || r,
|
|
7641
7641
|
...p,
|
|
7642
7642
|
children: [
|
|
7643
|
-
r && /* @__PURE__ */
|
|
7643
|
+
r && /* @__PURE__ */ s(
|
|
7644
7644
|
"svg",
|
|
7645
7645
|
{
|
|
7646
7646
|
className: "animate-spin -ml-1 mr-2 h-4 w-4",
|
|
@@ -7674,9 +7674,9 @@ const Vr = {
|
|
|
7674
7674
|
]
|
|
7675
7675
|
}
|
|
7676
7676
|
);
|
|
7677
|
-
}, Ce =
|
|
7678
|
-
({ label: e, error: t, helperText: a, leftIcon: r, rightIcon: n, className: l, style:
|
|
7679
|
-
e && /* @__PURE__ */
|
|
7677
|
+
}, Ce = vt(
|
|
7678
|
+
({ label: e, error: t, helperText: a, leftIcon: r, rightIcon: n, className: l, style: o, ...p }, m) => /* @__PURE__ */ s("div", { className: "w-full", children: [
|
|
7679
|
+
e && /* @__PURE__ */ s(
|
|
7680
7680
|
"label",
|
|
7681
7681
|
{
|
|
7682
7682
|
className: "block text-sm font-medium mb-1",
|
|
@@ -7687,7 +7687,7 @@ const Vr = {
|
|
|
7687
7687
|
]
|
|
7688
7688
|
}
|
|
7689
7689
|
),
|
|
7690
|
-
/* @__PURE__ */
|
|
7690
|
+
/* @__PURE__ */ s("div", { className: "relative", children: [
|
|
7691
7691
|
r && /* @__PURE__ */ i("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: r }),
|
|
7692
7692
|
/* @__PURE__ */ i(
|
|
7693
7693
|
"input",
|
|
@@ -7707,7 +7707,7 @@ const Vr = {
|
|
|
7707
7707
|
color: "var(--metakyc-input-text, var(--metakyc-text-primary, #111827))",
|
|
7708
7708
|
borderColor: t ? "var(--metakyc-danger, #ef4444)" : "var(--metakyc-input-border, var(--metakyc-border, #d1d5db))",
|
|
7709
7709
|
cursor: p.readOnly ? "default" : void 0,
|
|
7710
|
-
...
|
|
7710
|
+
...o
|
|
7711
7711
|
},
|
|
7712
7712
|
...p
|
|
7713
7713
|
}
|
|
@@ -7793,7 +7793,7 @@ const ne = ({ children: e, className: t, style: a, ...r }) => /* @__PURE__ */ i(
|
|
|
7793
7793
|
margin: 0,
|
|
7794
7794
|
verticalAlign: "middle"
|
|
7795
7795
|
}, We = ({ checked: e, onChange: t, disabled: a, style: r }) => {
|
|
7796
|
-
const n = "var(--metakyc-input-border, var(--metakyc-border, #d1d5db))", l = "var(--metakyc-input-bg, var(--metakyc-background, #ffffff))",
|
|
7796
|
+
const n = "var(--metakyc-input-border, var(--metakyc-border, #d1d5db))", l = "var(--metakyc-input-bg, var(--metakyc-background, #ffffff))", o = "var(--metakyc-primary, #2563eb)";
|
|
7797
7797
|
return /* @__PURE__ */ i(
|
|
7798
7798
|
"span",
|
|
7799
7799
|
{
|
|
@@ -7808,8 +7808,8 @@ const ne = ({ children: e, className: t, style: a, ...r }) => /* @__PURE__ */ i(
|
|
|
7808
7808
|
},
|
|
7809
7809
|
style: {
|
|
7810
7810
|
...Br,
|
|
7811
|
-
backgroundColor: e ?
|
|
7812
|
-
borderColor: e ?
|
|
7811
|
+
backgroundColor: e ? o : l,
|
|
7812
|
+
borderColor: e ? o : n,
|
|
7813
7813
|
opacity: a ? 0.5 : 1,
|
|
7814
7814
|
cursor: a ? "not-allowed" : "pointer",
|
|
7815
7815
|
...r
|
|
@@ -7877,7 +7877,7 @@ const ne = ({ children: e, className: t, style: a, ...r }) => /* @__PURE__ */ i(
|
|
|
7877
7877
|
md: "h-8 w-8",
|
|
7878
7878
|
lg: "h-12 w-12"
|
|
7879
7879
|
};
|
|
7880
|
-
return /* @__PURE__ */ i("div", { className: Me("flex items-center justify-center", t), ...a, children: /* @__PURE__ */
|
|
7880
|
+
return /* @__PURE__ */ i("div", { className: Me("flex items-center justify-center", t), ...a, children: /* @__PURE__ */ s(
|
|
7881
7881
|
"svg",
|
|
7882
7882
|
{
|
|
7883
7883
|
className: Me("animate-spin text-primary-500", r[e]),
|
|
@@ -7907,9 +7907,9 @@ const ne = ({ children: e, className: t, style: a, ...r }) => /* @__PURE__ */ i(
|
|
|
7907
7907
|
]
|
|
7908
7908
|
}
|
|
7909
7909
|
) });
|
|
7910
|
-
},
|
|
7911
|
-
({ label: e, error: t, helperText: a, options: r, placeholder: n, className: l, style:
|
|
7912
|
-
e && /* @__PURE__ */
|
|
7910
|
+
}, Et = vt(
|
|
7911
|
+
({ label: e, error: t, helperText: a, options: r, placeholder: n, className: l, style: o, ...p }, m) => /* @__PURE__ */ s("div", { className: "w-full", children: [
|
|
7912
|
+
e && /* @__PURE__ */ s(
|
|
7913
7913
|
"label",
|
|
7914
7914
|
{
|
|
7915
7915
|
className: "block text-sm font-medium mb-1",
|
|
@@ -7920,7 +7920,7 @@ const ne = ({ children: e, className: t, style: a, ...r }) => /* @__PURE__ */ i(
|
|
|
7920
7920
|
]
|
|
7921
7921
|
}
|
|
7922
7922
|
),
|
|
7923
|
-
/* @__PURE__ */
|
|
7923
|
+
/* @__PURE__ */ s(
|
|
7924
7924
|
"select",
|
|
7925
7925
|
{
|
|
7926
7926
|
ref: m,
|
|
@@ -7936,7 +7936,7 @@ const ne = ({ children: e, className: t, style: a, ...r }) => /* @__PURE__ */ i(
|
|
|
7936
7936
|
backgroundColor: "var(--metakyc-input-bg, #ffffff)",
|
|
7937
7937
|
color: "var(--metakyc-input-text, var(--metakyc-text-primary, #111827))",
|
|
7938
7938
|
borderColor: t ? "var(--metakyc-danger, #ef4444)" : "var(--metakyc-input-border, var(--metakyc-border, #d1d5db))",
|
|
7939
|
-
...
|
|
7939
|
+
...o
|
|
7940
7940
|
},
|
|
7941
7941
|
...p,
|
|
7942
7942
|
children: [
|
|
@@ -7973,18 +7973,18 @@ const ne = ({ children: e, className: t, style: a, ...r }) => /* @__PURE__ */ i(
|
|
|
7973
7973
|
!t && a && /* @__PURE__ */ i("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: a })
|
|
7974
7974
|
] })
|
|
7975
7975
|
);
|
|
7976
|
-
|
|
7977
|
-
const
|
|
7976
|
+
Et.displayName = "Select";
|
|
7977
|
+
const Kt = 280, Ur = ({
|
|
7978
7978
|
label: e,
|
|
7979
7979
|
value: t,
|
|
7980
7980
|
onChange: a,
|
|
7981
7981
|
options: r,
|
|
7982
7982
|
placeholder: n,
|
|
7983
7983
|
disabled: l = !1,
|
|
7984
|
-
readOnly:
|
|
7984
|
+
readOnly: o = !1,
|
|
7985
7985
|
required: p = !1
|
|
7986
7986
|
}) => {
|
|
7987
|
-
const { t: m } = Ie(), d = n ?? m("common.select"), y = l ||
|
|
7987
|
+
const { t: m } = Ie(), d = n ?? m("common.select"), y = l || o, [w, z] = S(!1), [L, C] = S(""), [q, T] = S(null), [P, B] = S({
|
|
7988
7988
|
bg: "#ffffff",
|
|
7989
7989
|
borderColor: "#d1d5db",
|
|
7990
7990
|
textPrimary: "#111827",
|
|
@@ -7994,7 +7994,7 @@ const Yt = 280, Ur = ({
|
|
|
7994
7994
|
hoverBg: "#f9fafb"
|
|
7995
7995
|
}), O = ue(null), U = ue(null), H = ue(null), J = ie(() => {
|
|
7996
7996
|
if (!U.current) return null;
|
|
7997
|
-
const M = U.current.getBoundingClientRect(), F = window.innerHeight - M.bottom <
|
|
7997
|
+
const M = U.current.getBoundingClientRect(), F = window.innerHeight - M.bottom < Kt && M.top > Kt;
|
|
7998
7998
|
return { top: F ? M.top : M.bottom + 4, left: M.left, width: M.width, openUp: F };
|
|
7999
7999
|
}, []), re = ie(() => {
|
|
8000
8000
|
const M = getComputedStyle(document.querySelector(".metakyc-sdk") || document.documentElement), E = (xe, de) => M.getPropertyValue(xe).trim() || de, F = E("--metakyc-input-bg", E("--metakyc-background", "#ffffff"));
|
|
@@ -8042,7 +8042,7 @@ const Yt = 280, Ur = ({
|
|
|
8042
8042
|
}, W = (M) => {
|
|
8043
8043
|
var E;
|
|
8044
8044
|
return ((E = r.find((F) => F.value === M)) == null ? void 0 : E.label) || M;
|
|
8045
|
-
}, { bg: X, borderColor: ce, textPrimary: Y, textSecondary: je, primaryColor: ye, primaryLight: fe, hoverBg: Se } = P, pe = w && q && /* @__PURE__ */
|
|
8045
|
+
}, { bg: X, borderColor: ce, textPrimary: Y, textSecondary: je, primaryColor: ye, primaryLight: fe, hoverBg: Se } = P, pe = w && q && /* @__PURE__ */ s(
|
|
8046
8046
|
"div",
|
|
8047
8047
|
{
|
|
8048
8048
|
ref: H,
|
|
@@ -8094,7 +8094,7 @@ const Yt = 280, Ur = ({
|
|
|
8094
8094
|
) }),
|
|
8095
8095
|
/* @__PURE__ */ i("ul", { style: { listStyle: "none", margin: 0, padding: "4px 0", maxHeight: "192px", overflowY: "auto" }, children: V.length === 0 ? /* @__PURE__ */ i("li", { style: { padding: "8px 12px", fontSize: "13px", color: je }, children: m("common.noResults") }) : V.map((M) => {
|
|
8096
8096
|
const E = t.includes(M.value);
|
|
8097
|
-
return /* @__PURE__ */
|
|
8097
|
+
return /* @__PURE__ */ s(
|
|
8098
8098
|
"li",
|
|
8099
8099
|
{
|
|
8100
8100
|
onClick: () => Q(M.value),
|
|
@@ -8131,7 +8131,7 @@ const Yt = 280, Ur = ({
|
|
|
8131
8131
|
M.value
|
|
8132
8132
|
);
|
|
8133
8133
|
}) }),
|
|
8134
|
-
t.length > 0 && /* @__PURE__ */ i("div", { style: { padding: "6px 12px", borderTop: `1px solid ${ce}` }, children: /* @__PURE__ */
|
|
8134
|
+
t.length > 0 && /* @__PURE__ */ i("div", { style: { padding: "6px 12px", borderTop: `1px solid ${ce}` }, children: /* @__PURE__ */ s(
|
|
8135
8135
|
"button",
|
|
8136
8136
|
{
|
|
8137
8137
|
type: "button",
|
|
@@ -8150,8 +8150,8 @@ const Yt = 280, Ur = ({
|
|
|
8150
8150
|
]
|
|
8151
8151
|
}
|
|
8152
8152
|
);
|
|
8153
|
-
return /* @__PURE__ */
|
|
8154
|
-
e && /* @__PURE__ */
|
|
8153
|
+
return /* @__PURE__ */ s("div", { className: "w-full metakyc-multiselect", ref: O, children: [
|
|
8154
|
+
e && /* @__PURE__ */ s(
|
|
8155
8155
|
"label",
|
|
8156
8156
|
{
|
|
8157
8157
|
className: "block text-sm font-medium mb-1",
|
|
@@ -8162,7 +8162,7 @@ const Yt = 280, Ur = ({
|
|
|
8162
8162
|
]
|
|
8163
8163
|
}
|
|
8164
8164
|
),
|
|
8165
|
-
/* @__PURE__ */
|
|
8165
|
+
/* @__PURE__ */ s(
|
|
8166
8166
|
"div",
|
|
8167
8167
|
{
|
|
8168
8168
|
ref: U,
|
|
@@ -8187,7 +8187,7 @@ const Yt = 280, Ur = ({
|
|
|
8187
8187
|
style: { color: "var(--metakyc-text-secondary, #9ca3af)" },
|
|
8188
8188
|
children: d
|
|
8189
8189
|
}
|
|
8190
|
-
) : /* @__PURE__ */ i("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((M) => /* @__PURE__ */
|
|
8190
|
+
) : /* @__PURE__ */ i("div", { className: "flex flex-wrap gap-1 pr-6", children: t.map((M) => /* @__PURE__ */ s(
|
|
8191
8191
|
"span",
|
|
8192
8192
|
{
|
|
8193
8193
|
className: "metakyc-multiselect-chip inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium",
|
|
@@ -8240,16 +8240,16 @@ const Yt = 280, Ur = ({
|
|
|
8240
8240
|
]
|
|
8241
8241
|
}
|
|
8242
8242
|
),
|
|
8243
|
-
typeof document < "u" && pe ?
|
|
8243
|
+
typeof document < "u" && pe ? Lt(pe, document.body) : null
|
|
8244
8244
|
] });
|
|
8245
|
-
},
|
|
8245
|
+
}, Yt = 260, Xe = ({
|
|
8246
8246
|
label: e,
|
|
8247
8247
|
error: t,
|
|
8248
8248
|
helperText: a,
|
|
8249
8249
|
options: r,
|
|
8250
8250
|
placeholder: n,
|
|
8251
8251
|
value: l,
|
|
8252
|
-
onChange:
|
|
8252
|
+
onChange: o,
|
|
8253
8253
|
disabled: p = !1,
|
|
8254
8254
|
readOnly: m = !1,
|
|
8255
8255
|
required: d = !1,
|
|
@@ -8277,7 +8277,7 @@ const Yt = 280, Ur = ({
|
|
|
8277
8277
|
});
|
|
8278
8278
|
}, []), re = ue(null), h = ue(null), R = ue(null), V = ue(null), Q = ie(() => {
|
|
8279
8279
|
if (!h.current) return null;
|
|
8280
|
-
const D = h.current.getBoundingClientRect(), ge = window.innerHeight - D.bottom <
|
|
8280
|
+
const D = h.current.getBoundingClientRect(), ge = window.innerHeight - D.bottom < Yt && D.top > Yt;
|
|
8281
8281
|
return {
|
|
8282
8282
|
top: ge ? D.top : D.bottom + 4,
|
|
8283
8283
|
left: D.left,
|
|
@@ -8318,8 +8318,8 @@ const Yt = 280, Ur = ({
|
|
|
8318
8318
|
const ce = r.filter(
|
|
8319
8319
|
(D) => D.label.toLowerCase().includes(T.toLowerCase()) || D.value.toLowerCase().includes(T.toLowerCase())
|
|
8320
8320
|
), Y = (de = r.find((D) => D.value === l)) == null ? void 0 : de.label, je = (D, _) => {
|
|
8321
|
-
L || _ || (
|
|
8322
|
-
}, { bg: ye, border: fe, text: Se, textSecondary: pe, primary: M, primaryLight: E, hoverBg: F } = U, xe = C && B && /* @__PURE__ */
|
|
8321
|
+
L || _ || (o(D), W());
|
|
8322
|
+
}, { bg: ye, border: fe, text: Se, textSecondary: pe, primary: M, primaryLight: E, hoverBg: F } = U, xe = C && B && /* @__PURE__ */ s(
|
|
8323
8323
|
"div",
|
|
8324
8324
|
{
|
|
8325
8325
|
ref: R,
|
|
@@ -8411,13 +8411,13 @@ const Yt = 280, Ur = ({
|
|
|
8411
8411
|
]
|
|
8412
8412
|
}
|
|
8413
8413
|
);
|
|
8414
|
-
return /* @__PURE__ */
|
|
8414
|
+
return /* @__PURE__ */ s(
|
|
8415
8415
|
"div",
|
|
8416
8416
|
{
|
|
8417
8417
|
className: Me("w-full metakyc-searchable-select", y),
|
|
8418
8418
|
ref: re,
|
|
8419
8419
|
children: [
|
|
8420
|
-
e && /* @__PURE__ */
|
|
8420
|
+
e && /* @__PURE__ */ s(
|
|
8421
8421
|
"label",
|
|
8422
8422
|
{
|
|
8423
8423
|
className: "block text-sm font-medium mb-1",
|
|
@@ -8428,7 +8428,7 @@ const Yt = 280, Ur = ({
|
|
|
8428
8428
|
]
|
|
8429
8429
|
}
|
|
8430
8430
|
),
|
|
8431
|
-
/* @__PURE__ */
|
|
8431
|
+
/* @__PURE__ */ s(
|
|
8432
8432
|
"div",
|
|
8433
8433
|
{
|
|
8434
8434
|
ref: h,
|
|
@@ -8466,14 +8466,14 @@ const Yt = 280, Ur = ({
|
|
|
8466
8466
|
]
|
|
8467
8467
|
}
|
|
8468
8468
|
),
|
|
8469
|
-
typeof document < "u" && xe ?
|
|
8469
|
+
typeof document < "u" && xe ? Lt(xe, document.body) : null,
|
|
8470
8470
|
t && /* @__PURE__ */ i("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-error, #ef4444)" }, children: t }),
|
|
8471
8471
|
!t && a && /* @__PURE__ */ i("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: a })
|
|
8472
8472
|
]
|
|
8473
8473
|
}
|
|
8474
8474
|
);
|
|
8475
8475
|
};
|
|
8476
|
-
|
|
8476
|
+
Xe.displayName = "SearchableSelect";
|
|
8477
8477
|
function Wr(e) {
|
|
8478
8478
|
const t = e.type;
|
|
8479
8479
|
return t.startsWith("image/") ? "image" : t === "application/pdf" ? "pdf" : "file";
|
|
@@ -8485,7 +8485,7 @@ const Kr = ({
|
|
|
8485
8485
|
accept: r,
|
|
8486
8486
|
multiple: n = !1,
|
|
8487
8487
|
maxSize: l,
|
|
8488
|
-
required:
|
|
8488
|
+
required: o,
|
|
8489
8489
|
onChange: p,
|
|
8490
8490
|
value: m = [],
|
|
8491
8491
|
className: d
|
|
@@ -8495,7 +8495,7 @@ const Kr = ({
|
|
|
8495
8495
|
C(null);
|
|
8496
8496
|
const R = Array.from(h);
|
|
8497
8497
|
if (l && R.filter((Q) => Q.size > l).length > 0) {
|
|
8498
|
-
C(`File exceeds the maximum size of ${
|
|
8498
|
+
C(`File exceeds the maximum size of ${Ct(l)}`);
|
|
8499
8499
|
return;
|
|
8500
8500
|
}
|
|
8501
8501
|
p == null || p(n ? [...m, ...R] : [R[0]]);
|
|
@@ -8513,9 +8513,9 @@ const Kr = ({
|
|
|
8513
8513
|
const R = m.filter((V, Q) => Q !== h);
|
|
8514
8514
|
p == null || p(R);
|
|
8515
8515
|
}, J = a || L, re = m.length > 0;
|
|
8516
|
-
return /* @__PURE__ */
|
|
8517
|
-
e && /* @__PURE__ */
|
|
8518
|
-
/* @__PURE__ */
|
|
8516
|
+
return /* @__PURE__ */ s("div", { className: Me("metakyc-file-upload", d), style: { width: "100%" }, children: [
|
|
8517
|
+
e && /* @__PURE__ */ s("div", { style: { marginBottom: "8px" }, children: [
|
|
8518
|
+
/* @__PURE__ */ s(
|
|
8519
8519
|
"label",
|
|
8520
8520
|
{
|
|
8521
8521
|
style: {
|
|
@@ -8526,13 +8526,13 @@ const Kr = ({
|
|
|
8526
8526
|
},
|
|
8527
8527
|
children: [
|
|
8528
8528
|
e,
|
|
8529
|
-
|
|
8529
|
+
o && /* @__PURE__ */ i("span", { style: { color: "var(--metakyc-danger, #ef4444)", marginLeft: "2px" }, children: "*" })
|
|
8530
8530
|
]
|
|
8531
8531
|
}
|
|
8532
8532
|
),
|
|
8533
8533
|
t && /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "2px" }, children: t })
|
|
8534
8534
|
] }),
|
|
8535
|
-
/* @__PURE__ */
|
|
8535
|
+
/* @__PURE__ */ s(
|
|
8536
8536
|
"div",
|
|
8537
8537
|
{
|
|
8538
8538
|
className: "metakyc-file-dropzone",
|
|
@@ -8563,7 +8563,7 @@ const Kr = ({
|
|
|
8563
8563
|
}
|
|
8564
8564
|
}
|
|
8565
8565
|
),
|
|
8566
|
-
/* @__PURE__ */
|
|
8566
|
+
/* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "12px" }, children: [
|
|
8567
8567
|
/* @__PURE__ */ i(
|
|
8568
8568
|
"div",
|
|
8569
8569
|
{
|
|
@@ -8577,7 +8577,7 @@ const Kr = ({
|
|
|
8577
8577
|
backgroundColor: w ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 15%, transparent)" : "var(--metakyc-surface, #f9fafb)",
|
|
8578
8578
|
transition: "background-color 0.2s ease"
|
|
8579
8579
|
},
|
|
8580
|
-
children: /* @__PURE__ */
|
|
8580
|
+
children: /* @__PURE__ */ s(
|
|
8581
8581
|
"svg",
|
|
8582
8582
|
{
|
|
8583
8583
|
width: "24",
|
|
@@ -8598,16 +8598,16 @@ const Kr = ({
|
|
|
8598
8598
|
)
|
|
8599
8599
|
}
|
|
8600
8600
|
),
|
|
8601
|
-
/* @__PURE__ */
|
|
8602
|
-
/* @__PURE__ */
|
|
8601
|
+
/* @__PURE__ */ s("div", { children: [
|
|
8602
|
+
/* @__PURE__ */ s("p", { style: { fontSize: "14px", color: "var(--metakyc-text-secondary, #6b7280)", margin: 0 }, children: [
|
|
8603
8603
|
/* @__PURE__ */ i("span", { style: { fontWeight: 600, color: "var(--metakyc-primary, #2563eb)" }, children: y("uploadDocument.clickToUpload") }),
|
|
8604
8604
|
" ",
|
|
8605
8605
|
y("uploadDocument.orDragDrop")
|
|
8606
8606
|
] }),
|
|
8607
|
-
(r || l) && /* @__PURE__ */
|
|
8607
|
+
(r || l) && /* @__PURE__ */ s("p", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "4px" }, children: [
|
|
8608
8608
|
r && /* @__PURE__ */ i("span", { children: r }),
|
|
8609
8609
|
r && l && /* @__PURE__ */ i("span", { children: " · " }),
|
|
8610
|
-
l && /* @__PURE__ */ i("span", { children: y("uploadDocument.maxSize", { size:
|
|
8610
|
+
l && /* @__PURE__ */ i("span", { children: y("uploadDocument.maxSize", { size: Ct(l) }) })
|
|
8611
8611
|
] })
|
|
8612
8612
|
] })
|
|
8613
8613
|
] })
|
|
@@ -8616,7 +8616,7 @@ const Kr = ({
|
|
|
8616
8616
|
),
|
|
8617
8617
|
re && /* @__PURE__ */ i("div", { style: { marginTop: "12px", display: "flex", flexDirection: "column", gap: "8px" }, children: m.map((h, R) => {
|
|
8618
8618
|
const V = Wr(h), Q = V === "image", ee = Q ? URL.createObjectURL(h) : null;
|
|
8619
|
-
return /* @__PURE__ */
|
|
8619
|
+
return /* @__PURE__ */ s(
|
|
8620
8620
|
"div",
|
|
8621
8621
|
{
|
|
8622
8622
|
className: "metakyc-file-item",
|
|
@@ -8652,19 +8652,19 @@ const Kr = ({
|
|
|
8652
8652
|
alt: h.name,
|
|
8653
8653
|
style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "8px" }
|
|
8654
8654
|
}
|
|
8655
|
-
) : V === "pdf" ? /* @__PURE__ */
|
|
8655
|
+
) : V === "pdf" ? /* @__PURE__ */ s("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-danger, #ef4444)", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
8656
8656
|
/* @__PURE__ */ i("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
8657
8657
|
/* @__PURE__ */ i("polyline", { points: "14 2 14 8 20 8" }),
|
|
8658
8658
|
/* @__PURE__ */ i("line", { x1: "16", y1: "13", x2: "8", y2: "13" }),
|
|
8659
8659
|
/* @__PURE__ */ i("line", { x1: "16", y1: "17", x2: "8", y2: "17" }),
|
|
8660
8660
|
/* @__PURE__ */ i("polyline", { points: "10 9 9 9 8 9" })
|
|
8661
|
-
] }) : /* @__PURE__ */
|
|
8661
|
+
] }) : /* @__PURE__ */ s("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-primary, #2563eb)", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
8662
8662
|
/* @__PURE__ */ i("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }),
|
|
8663
8663
|
/* @__PURE__ */ i("polyline", { points: "14 2 14 8 20 8" })
|
|
8664
8664
|
] })
|
|
8665
8665
|
}
|
|
8666
8666
|
),
|
|
8667
|
-
/* @__PURE__ */
|
|
8667
|
+
/* @__PURE__ */ s("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
8668
8668
|
/* @__PURE__ */ i("p", { style: {
|
|
8669
8669
|
fontSize: "13px",
|
|
8670
8670
|
fontWeight: 500,
|
|
@@ -8674,7 +8674,7 @@ const Kr = ({
|
|
|
8674
8674
|
textOverflow: "ellipsis",
|
|
8675
8675
|
whiteSpace: "nowrap"
|
|
8676
8676
|
}, children: h.name }),
|
|
8677
|
-
/* @__PURE__ */ i("p", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)", margin: 0, marginTop: "2px" }, children:
|
|
8677
|
+
/* @__PURE__ */ i("p", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)", margin: 0, marginTop: "2px" }, children: Ct(h.size) })
|
|
8678
8678
|
] }),
|
|
8679
8679
|
/* @__PURE__ */ i(
|
|
8680
8680
|
"button",
|
|
@@ -8704,7 +8704,7 @@ const Kr = ({
|
|
|
8704
8704
|
onMouseLeave: (W) => {
|
|
8705
8705
|
W.currentTarget.style.backgroundColor = "transparent", W.currentTarget.style.color = "var(--metakyc-text-muted, #9ca3af)";
|
|
8706
8706
|
},
|
|
8707
|
-
children: /* @__PURE__ */
|
|
8707
|
+
children: /* @__PURE__ */ s("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
8708
8708
|
/* @__PURE__ */ i("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
8709
8709
|
/* @__PURE__ */ i("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
8710
8710
|
] })
|
|
@@ -8717,9 +8717,9 @@ const Kr = ({
|
|
|
8717
8717
|
}) }),
|
|
8718
8718
|
J && /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", marginTop: "6px" }, children: J })
|
|
8719
8719
|
] });
|
|
8720
|
-
}, Yr =
|
|
8721
|
-
({ countryCode: e = "+1", onCountryCodeChange: t, className: a, ...r }, n) => /* @__PURE__ */
|
|
8722
|
-
r.label && /* @__PURE__ */
|
|
8720
|
+
}, Yr = vt(
|
|
8721
|
+
({ countryCode: e = "+1", onCountryCodeChange: t, className: a, ...r }, n) => /* @__PURE__ */ s("div", { className: "w-full", children: [
|
|
8722
|
+
r.label && /* @__PURE__ */ s(
|
|
8723
8723
|
"label",
|
|
8724
8724
|
{
|
|
8725
8725
|
className: "block text-sm font-medium mb-1",
|
|
@@ -8730,7 +8730,7 @@ const Kr = ({
|
|
|
8730
8730
|
]
|
|
8731
8731
|
}
|
|
8732
8732
|
),
|
|
8733
|
-
/* @__PURE__ */
|
|
8733
|
+
/* @__PURE__ */ s("div", { className: "flex gap-2", children: [
|
|
8734
8734
|
/* @__PURE__ */ i(
|
|
8735
8735
|
"input",
|
|
8736
8736
|
{
|
|
@@ -8795,7 +8795,7 @@ const $r = (e) => e.replace(
|
|
|
8795
8795
|
* This source code is licensed under the ISC license.
|
|
8796
8796
|
* See the LICENSE file in the root directory of this source tree.
|
|
8797
8797
|
*/
|
|
8798
|
-
const
|
|
8798
|
+
const Ht = (e) => {
|
|
8799
8799
|
const t = $r(e);
|
|
8800
8800
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
8801
8801
|
};
|
|
@@ -8834,7 +8834,7 @@ const Gr = (e) => {
|
|
|
8834
8834
|
* This source code is licensed under the ISC license.
|
|
8835
8835
|
* See the LICENSE file in the root directory of this source tree.
|
|
8836
8836
|
*/
|
|
8837
|
-
const Qr =
|
|
8837
|
+
const Qr = vt(
|
|
8838
8838
|
({
|
|
8839
8839
|
color: e = "currentColor",
|
|
8840
8840
|
size: t = 24,
|
|
@@ -8842,9 +8842,9 @@ const Qr = ht(
|
|
|
8842
8842
|
absoluteStrokeWidth: r,
|
|
8843
8843
|
className: n = "",
|
|
8844
8844
|
children: l,
|
|
8845
|
-
iconNode:
|
|
8845
|
+
iconNode: o,
|
|
8846
8846
|
...p
|
|
8847
|
-
}, m) =>
|
|
8847
|
+
}, m) => It(
|
|
8848
8848
|
"svg",
|
|
8849
8849
|
{
|
|
8850
8850
|
ref: m,
|
|
@@ -8858,7 +8858,7 @@ const Qr = ht(
|
|
|
8858
8858
|
...p
|
|
8859
8859
|
},
|
|
8860
8860
|
[
|
|
8861
|
-
...
|
|
8861
|
+
...o.map(([d, y]) => It(d, y)),
|
|
8862
8862
|
...Array.isArray(l) ? l : [l]
|
|
8863
8863
|
]
|
|
8864
8864
|
)
|
|
@@ -8870,19 +8870,19 @@ const Qr = ht(
|
|
|
8870
8870
|
* See the LICENSE file in the root directory of this source tree.
|
|
8871
8871
|
*/
|
|
8872
8872
|
const li = (e, t) => {
|
|
8873
|
-
const a =
|
|
8874
|
-
({ className: r, ...n }, l) =>
|
|
8873
|
+
const a = vt(
|
|
8874
|
+
({ className: r, ...n }, l) => It(Qr, {
|
|
8875
8875
|
ref: l,
|
|
8876
8876
|
iconNode: t,
|
|
8877
8877
|
className: si(
|
|
8878
|
-
`lucide-${Hr(
|
|
8878
|
+
`lucide-${Hr(Ht(e))}`,
|
|
8879
8879
|
`lucide-${e}`,
|
|
8880
8880
|
r
|
|
8881
8881
|
),
|
|
8882
8882
|
...n
|
|
8883
8883
|
})
|
|
8884
8884
|
);
|
|
8885
|
-
return a.displayName =
|
|
8885
|
+
return a.displayName = Ht(e), a;
|
|
8886
8886
|
};
|
|
8887
8887
|
/**
|
|
8888
8888
|
* @license lucide-react v0.574.0 - ISC
|
|
@@ -8929,7 +8929,7 @@ function Jr(e, t) {
|
|
|
8929
8929
|
}
|
|
8930
8930
|
function ea(e) {
|
|
8931
8931
|
const t = e.flatMap(
|
|
8932
|
-
(r, n) => (r.questions ?? []).map((l,
|
|
8932
|
+
(r, n) => (r.questions ?? []).map((l, o) => ({ question: l, groupIndex: n, qIdx: o }))
|
|
8933
8933
|
), a = /* @__PURE__ */ new Map();
|
|
8934
8934
|
for (const r of t) {
|
|
8935
8935
|
const n = r.question.pageNumber != null && r.question.pageNumber > 0 ? r.question.pageNumber : 1;
|
|
@@ -8942,7 +8942,7 @@ const ta = ({
|
|
|
8942
8942
|
onComplete: t,
|
|
8943
8943
|
onBack: a
|
|
8944
8944
|
}) => {
|
|
8945
|
-
const { t: r } = Ie(), { questionnaire: n, initialAnswers: l, isLoading:
|
|
8945
|
+
const { t: r } = Ie(), { questionnaire: n, initialAnswers: l, isLoading: o, isSubmitting: p, error: m, submit: d } = Dr(e), [y, w] = S({}), [z, L] = S({}), [C, q] = S(0);
|
|
8946
8946
|
Ne.useEffect(() => {
|
|
8947
8947
|
l && Object.keys(l).length > 0 && Object.keys(y).length === 0 && w(l);
|
|
8948
8948
|
}, [l]);
|
|
@@ -8983,15 +8983,15 @@ const ta = ({
|
|
|
8983
8983
|
console.error("Questionnaire submit error:", h);
|
|
8984
8984
|
}
|
|
8985
8985
|
};
|
|
8986
|
-
return
|
|
8986
|
+
return o ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ i(Be, { className: "my-8" }) }) }) : m ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
|
|
8987
8987
|
r("questionnaire.errorLoading"),
|
|
8988
8988
|
" ",
|
|
8989
8989
|
m.message
|
|
8990
|
-
] }) }) }) : n ? /* @__PURE__ */
|
|
8991
|
-
/* @__PURE__ */
|
|
8990
|
+
] }) }) }) : n ? /* @__PURE__ */ s(ne, { children: [
|
|
8991
|
+
/* @__PURE__ */ s(Te, { children: [
|
|
8992
8992
|
/* @__PURE__ */ i("h2", { className: "text-lg font-bold", children: n.displayName }),
|
|
8993
8993
|
n.subtitle && /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n.subtitle }),
|
|
8994
|
-
T.length > 1 && /* @__PURE__ */
|
|
8994
|
+
T.length > 1 && /* @__PURE__ */ s("div", { className: "flex items-center justify-between mt-3", children: [
|
|
8995
8995
|
/* @__PURE__ */ i("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: r("common.pageXofY", { current: C + 1, total: T.length }) }),
|
|
8996
8996
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: T.map((h, R) => /* @__PURE__ */ i(
|
|
8997
8997
|
"div",
|
|
@@ -9017,8 +9017,8 @@ const ta = ({
|
|
|
9017
9017
|
},
|
|
9018
9018
|
h.id
|
|
9019
9019
|
)) }),
|
|
9020
|
-
/* @__PURE__ */
|
|
9021
|
-
/* @__PURE__ */
|
|
9020
|
+
/* @__PURE__ */ s(Re, { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
9021
|
+
/* @__PURE__ */ s(
|
|
9022
9022
|
Z,
|
|
9023
9023
|
{
|
|
9024
9024
|
type: "button",
|
|
@@ -9039,7 +9039,7 @@ const ta = ({
|
|
|
9039
9039
|
onClick: re,
|
|
9040
9040
|
children: r("common.continue")
|
|
9041
9041
|
}
|
|
9042
|
-
) : /* @__PURE__ */
|
|
9042
|
+
) : /* @__PURE__ */ s(
|
|
9043
9043
|
Z,
|
|
9044
9044
|
{
|
|
9045
9045
|
type: "button",
|
|
@@ -9059,15 +9059,15 @@ const ta = ({
|
|
|
9059
9059
|
] }) : null;
|
|
9060
9060
|
}, ia = ({ question: e, value: t, error: a, onChange: r }) => {
|
|
9061
9061
|
var p;
|
|
9062
|
-
const { t: n } = Ie(),
|
|
9063
|
-
return /* @__PURE__ */
|
|
9064
|
-
/* @__PURE__ */
|
|
9062
|
+
const { t: n } = Ie(), o = (((p = e.defaultAnswers) == null ? void 0 : p.length) ?? 0) > 0 ? e.showAsDropdown ? e.canMultipleAnswer ? "multi-select" : "single-select" : e.canMultipleAnswer ? "checkbox" : "radio" : "text";
|
|
9063
|
+
return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
9064
|
+
/* @__PURE__ */ s("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
|
|
9065
9065
|
e.text,
|
|
9066
9066
|
e.isRequired && /* @__PURE__ */ i("span", { className: "text-danger-500 ml-1", children: "*" })
|
|
9067
9067
|
] }),
|
|
9068
9068
|
e.subtitle && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: e.subtitle }),
|
|
9069
9069
|
e.description && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: e.description }),
|
|
9070
|
-
|
|
9070
|
+
o === "text" && /* @__PURE__ */ i(
|
|
9071
9071
|
Ce,
|
|
9072
9072
|
{
|
|
9073
9073
|
value: t[0] ?? "",
|
|
@@ -9077,8 +9077,8 @@ const ta = ({
|
|
|
9077
9077
|
required: e.isRequired
|
|
9078
9078
|
}
|
|
9079
9079
|
),
|
|
9080
|
-
|
|
9081
|
-
|
|
9080
|
+
o === "single-select" && /* @__PURE__ */ i(
|
|
9081
|
+
Et,
|
|
9082
9082
|
{
|
|
9083
9083
|
value: t[0] ?? "",
|
|
9084
9084
|
onChange: (m) => r([m.target.value]),
|
|
@@ -9088,8 +9088,8 @@ const ta = ({
|
|
|
9088
9088
|
required: e.isRequired
|
|
9089
9089
|
}
|
|
9090
9090
|
),
|
|
9091
|
-
|
|
9092
|
-
(e.defaultAnswers ?? []).map((m) => /* @__PURE__ */
|
|
9091
|
+
o === "radio" && /* @__PURE__ */ s("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
9092
|
+
(e.defaultAnswers ?? []).map((m) => /* @__PURE__ */ s(
|
|
9093
9093
|
"label",
|
|
9094
9094
|
{
|
|
9095
9095
|
className: "metakyc-option-label",
|
|
@@ -9124,8 +9124,8 @@ const ta = ({
|
|
|
9124
9124
|
)),
|
|
9125
9125
|
a && /* @__PURE__ */ i("p", { className: "text-sm text-danger-500", children: a })
|
|
9126
9126
|
] }),
|
|
9127
|
-
(
|
|
9128
|
-
(e.defaultAnswers ?? []).map((m) => /* @__PURE__ */
|
|
9127
|
+
(o === "checkbox" || o === "multi-select") && /* @__PURE__ */ s("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
9128
|
+
(e.defaultAnswers ?? []).map((m) => /* @__PURE__ */ s(
|
|
9129
9129
|
"label",
|
|
9130
9130
|
{
|
|
9131
9131
|
className: "metakyc-option-label",
|
|
@@ -9147,7 +9147,7 @@ const ta = ({
|
|
|
9147
9147
|
)),
|
|
9148
9148
|
a && /* @__PURE__ */ i("p", { className: "text-sm text-danger-500", children: a })
|
|
9149
9149
|
] }),
|
|
9150
|
-
a &&
|
|
9150
|
+
a && o === "text" && null
|
|
9151
9151
|
] });
|
|
9152
9152
|
};
|
|
9153
9153
|
function ra(e) {
|
|
@@ -9163,7 +9163,7 @@ const aa = ({
|
|
|
9163
9163
|
onComplete: t,
|
|
9164
9164
|
onBack: a
|
|
9165
9165
|
}) => {
|
|
9166
|
-
const { t: r } = Ie(), { uploadDocument: n, isLoading: l, isSubmitting:
|
|
9166
|
+
const { t: r } = Ie(), { uploadDocument: n, isLoading: l, isSubmitting: o, error: p, submit: m } = Mr(e), [d, y] = S({}), [w, z] = S(null), [L, C] = S(0), [q, T] = S({}), P = Fe(
|
|
9167
9167
|
() => n ? ra(n.uploadDocumentFiles) : [],
|
|
9168
9168
|
[n]
|
|
9169
9169
|
), B = P[L] ?? [], O = L === P.length - 1, U = P.length, H = ie(() => {
|
|
@@ -9203,10 +9203,10 @@ const aa = ({
|
|
|
9203
9203
|
}
|
|
9204
9204
|
}
|
|
9205
9205
|
};
|
|
9206
|
-
return l ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */
|
|
9206
|
+
return l ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", padding: "48px 0", gap: "16px" }, children: [
|
|
9207
9207
|
/* @__PURE__ */ i(Be, { className: "my-8" }),
|
|
9208
9208
|
/* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: r("uploadDocument.loading") })
|
|
9209
|
-
] }) }) }) : p ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */
|
|
9209
|
+
] }) }) }) : p ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { style: {
|
|
9210
9210
|
display: "flex",
|
|
9211
9211
|
flexDirection: "column",
|
|
9212
9212
|
alignItems: "center",
|
|
@@ -9222,15 +9222,15 @@ const aa = ({
|
|
|
9222
9222
|
display: "flex",
|
|
9223
9223
|
alignItems: "center",
|
|
9224
9224
|
justifyContent: "center"
|
|
9225
|
-
}, children: /* @__PURE__ */
|
|
9225
|
+
}, children: /* @__PURE__ */ s("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-danger, #ef4444)", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
9226
9226
|
/* @__PURE__ */ i("circle", { cx: "12", cy: "12", r: "10" }),
|
|
9227
9227
|
/* @__PURE__ */ i("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
|
|
9228
9228
|
/* @__PURE__ */ i("line", { x1: "9", y1: "9", x2: "15", y2: "15" })
|
|
9229
9229
|
] }) }),
|
|
9230
9230
|
/* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-danger, #ef4444)", fontWeight: 500 }, children: r("uploadDocument.errorLoading") }),
|
|
9231
9231
|
/* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: p.message })
|
|
9232
|
-
] }) }) }) : n ? /* @__PURE__ */
|
|
9233
|
-
/* @__PURE__ */
|
|
9232
|
+
] }) }) }) : n ? /* @__PURE__ */ s(ne, { children: [
|
|
9233
|
+
/* @__PURE__ */ s(Te, { children: [
|
|
9234
9234
|
/* @__PURE__ */ i("h2", { style: {
|
|
9235
9235
|
fontSize: "18px",
|
|
9236
9236
|
fontWeight: 700,
|
|
@@ -9242,7 +9242,7 @@ const aa = ({
|
|
|
9242
9242
|
color: "var(--metakyc-text-secondary, #6b7280)",
|
|
9243
9243
|
marginTop: "4px"
|
|
9244
9244
|
}, children: n.subtitle }),
|
|
9245
|
-
U > 1 && /* @__PURE__ */
|
|
9245
|
+
U > 1 && /* @__PURE__ */ s("div", { style: {
|
|
9246
9246
|
display: "flex",
|
|
9247
9247
|
alignItems: "center",
|
|
9248
9248
|
justifyContent: "space-between",
|
|
@@ -9264,7 +9264,7 @@ const aa = ({
|
|
|
9264
9264
|
)) })
|
|
9265
9265
|
] })
|
|
9266
9266
|
] }),
|
|
9267
|
-
n.description && L === 0 && /* @__PURE__ */
|
|
9267
|
+
n.description && L === 0 && /* @__PURE__ */ s("div", { style: {
|
|
9268
9268
|
margin: "0 24px",
|
|
9269
9269
|
marginTop: "4px",
|
|
9270
9270
|
display: "flex",
|
|
@@ -9274,7 +9274,7 @@ const aa = ({
|
|
|
9274
9274
|
backgroundColor: "color-mix(in srgb, var(--metakyc-primary, #2563eb) 5%, var(--metakyc-background, #ffffff))",
|
|
9275
9275
|
border: "1px solid color-mix(in srgb, var(--metakyc-primary, #2563eb) 15%, transparent)"
|
|
9276
9276
|
}, children: [
|
|
9277
|
-
/* @__PURE__ */
|
|
9277
|
+
/* @__PURE__ */ s(
|
|
9278
9278
|
"svg",
|
|
9279
9279
|
{
|
|
9280
9280
|
width: "18",
|
|
@@ -9320,7 +9320,7 @@ const aa = ({
|
|
|
9320
9320
|
},
|
|
9321
9321
|
R.id
|
|
9322
9322
|
)) }) }),
|
|
9323
|
-
w && /* @__PURE__ */
|
|
9323
|
+
w && /* @__PURE__ */ s("div", { style: {
|
|
9324
9324
|
margin: "0 24px",
|
|
9325
9325
|
padding: "10px 14px",
|
|
9326
9326
|
borderRadius: "8px",
|
|
@@ -9330,14 +9330,14 @@ const aa = ({
|
|
|
9330
9330
|
alignItems: "center",
|
|
9331
9331
|
gap: "8px"
|
|
9332
9332
|
}, children: [
|
|
9333
|
-
/* @__PURE__ */
|
|
9333
|
+
/* @__PURE__ */ s("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-danger, #ef4444)", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", style: { flexShrink: 0 }, children: [
|
|
9334
9334
|
/* @__PURE__ */ i("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }),
|
|
9335
9335
|
/* @__PURE__ */ i("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
|
|
9336
9336
|
/* @__PURE__ */ i("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
9337
9337
|
] }),
|
|
9338
9338
|
/* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: w })
|
|
9339
9339
|
] }),
|
|
9340
|
-
/* @__PURE__ */ i(Re, { children: /* @__PURE__ */
|
|
9340
|
+
/* @__PURE__ */ i(Re, { children: /* @__PURE__ */ s("div", { style: {
|
|
9341
9341
|
display: "flex",
|
|
9342
9342
|
alignItems: "center",
|
|
9343
9343
|
justifyContent: "space-between",
|
|
@@ -9356,9 +9356,9 @@ const aa = ({
|
|
|
9356
9356
|
Z,
|
|
9357
9357
|
{
|
|
9358
9358
|
type: "button",
|
|
9359
|
-
isLoading:
|
|
9359
|
+
isLoading: o,
|
|
9360
9360
|
onClick: h,
|
|
9361
|
-
children: r(
|
|
9361
|
+
children: r(o ? "uploadDocument.uploading" : "common.continue")
|
|
9362
9362
|
}
|
|
9363
9363
|
) : /* @__PURE__ */ i(
|
|
9364
9364
|
Z,
|
|
@@ -9371,19 +9371,19 @@ const aa = ({
|
|
|
9371
9371
|
] }) })
|
|
9372
9372
|
] }) : null;
|
|
9373
9373
|
}, na = ({ applicantId: e, onComplete: t, onBack: a }) => {
|
|
9374
|
-
const { t: r } = Ie(), { overview: n, isLoading: l, isSubmitting:
|
|
9374
|
+
const { t: r } = Ie(), { overview: n, isLoading: l, isSubmitting: o, error: p, passOverview: m } = jr(e), d = async () => {
|
|
9375
9375
|
await m(), t == null || t();
|
|
9376
9376
|
};
|
|
9377
|
-
return l ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ i(Be, { className: "my-8" }) }) }) : p ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */
|
|
9377
|
+
return l ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ i(Be, { className: "my-8" }) }) }) : p ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
|
|
9378
9378
|
r("overview.errorLoading"),
|
|
9379
9379
|
" ",
|
|
9380
9380
|
p.message
|
|
9381
|
-
] }) }) }) : n ? /* @__PURE__ */
|
|
9382
|
-
/* @__PURE__ */
|
|
9381
|
+
] }) }) }) : n ? /* @__PURE__ */ s(ne, { children: [
|
|
9382
|
+
/* @__PURE__ */ s(Te, { children: [
|
|
9383
9383
|
/* @__PURE__ */ i("h2", { className: "text-lg font-bold", children: n.title || r("overview.title") }),
|
|
9384
9384
|
n.description && /* @__PURE__ */ i("p", { className: "mt-1", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n.description })
|
|
9385
9385
|
] }),
|
|
9386
|
-
/* @__PURE__ */ i(oe, { className: "space-y-8", children: n.steps && n.steps.length > 0 ? n.steps.sort((y, w) => y.order - w.order).map((y) => /* @__PURE__ */
|
|
9386
|
+
/* @__PURE__ */ i(oe, { className: "space-y-8", children: n.steps && n.steps.length > 0 ? n.steps.sort((y, w) => y.order - w.order).map((y) => /* @__PURE__ */ s("div", { className: "metakyc-overview-step-item flex items-center space-x-3", children: [
|
|
9387
9387
|
/* @__PURE__ */ i("div", { className: "metakyc-step-icon flex-shrink-0", children: /* @__PURE__ */ i(
|
|
9388
9388
|
"div",
|
|
9389
9389
|
{
|
|
@@ -9392,7 +9392,7 @@ const aa = ({
|
|
|
9392
9392
|
children: y.order + 1
|
|
9393
9393
|
}
|
|
9394
9394
|
) }),
|
|
9395
|
-
/* @__PURE__ */
|
|
9395
|
+
/* @__PURE__ */ s(
|
|
9396
9396
|
"div",
|
|
9397
9397
|
{
|
|
9398
9398
|
className: "metakyc-step-content",
|
|
@@ -9409,9 +9409,9 @@ const aa = ({
|
|
|
9409
9409
|
}
|
|
9410
9410
|
)
|
|
9411
9411
|
] }, y.order)) : /* @__PURE__ */ i("div", { className: "text-center py-8", children: /* @__PURE__ */ i("p", { style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r("overview.loadingOverview") }) }) }),
|
|
9412
|
-
/* @__PURE__ */
|
|
9412
|
+
/* @__PURE__ */ s(Re, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
9413
9413
|
a && /* @__PURE__ */ i(Z, { type: "button", variant: "outline", onClick: a, children: r("common.back") }),
|
|
9414
|
-
/* @__PURE__ */ i(Z, { onClick: d, isLoading:
|
|
9414
|
+
/* @__PURE__ */ i(Z, { onClick: d, isLoading: o, children: r("common.continue") })
|
|
9415
9415
|
] })
|
|
9416
9416
|
] }) : null;
|
|
9417
9417
|
};
|
|
@@ -9424,7 +9424,7 @@ function oa(e) {
|
|
|
9424
9424
|
}
|
|
9425
9425
|
}
|
|
9426
9426
|
function sa(e) {
|
|
9427
|
-
return e.valueDataType ===
|
|
9427
|
+
return e.valueDataType === Qe.Money && Array.isArray(e.defaultValues) && e.defaultValues.length > 0;
|
|
9428
9428
|
}
|
|
9429
9429
|
function la(e, t) {
|
|
9430
9430
|
const a = new Intl.NumberFormat(oa(t), {
|
|
@@ -9448,7 +9448,7 @@ function ca(e, t) {
|
|
|
9448
9448
|
return e.errorMessage || "Invalid format";
|
|
9449
9449
|
} catch {
|
|
9450
9450
|
}
|
|
9451
|
-
const n = e.valueDataType ===
|
|
9451
|
+
const n = e.valueDataType === Qe.Integer || e.valueDataType === Qe.Money || e.valueDataType === Qe.DigitOnly;
|
|
9452
9452
|
if (n && r.trim() !== "") {
|
|
9453
9453
|
const l = Number(r);
|
|
9454
9454
|
if (!isNaN(l)) {
|
|
@@ -9481,17 +9481,17 @@ const ua = ({
|
|
|
9481
9481
|
onComplete: t,
|
|
9482
9482
|
onBack: a
|
|
9483
9483
|
}) => {
|
|
9484
|
-
const { t: r } = Ie(), { config: n } = Oe(), l = n.locale ?? "en", { criteria:
|
|
9484
|
+
const { t: r } = Ie(), { config: n } = Oe(), l = n.locale ?? "en", { criteria: o, initialAnswers: p, isLoading: m, isSubmitting: d, error: y, submit: w } = Or(e), [z, L] = S({}), [C, q] = S({}), [T, P] = S(0), [B, O] = S(!1);
|
|
9485
9485
|
Ne.useEffect(() => {
|
|
9486
9486
|
p && Object.keys(p).length > 0 && Object.keys(z).length === 0 && L(p);
|
|
9487
9487
|
}, [p]);
|
|
9488
9488
|
const U = Fe(
|
|
9489
|
-
() =>
|
|
9490
|
-
[
|
|
9489
|
+
() => o && o.length > 0 ? da(o) : [],
|
|
9490
|
+
[o]
|
|
9491
9491
|
), H = T === U.length - 1, J = U[T] ?? [];
|
|
9492
9492
|
Ne.useEffect(() => {
|
|
9493
|
-
!m &&
|
|
9494
|
-
}, [m,
|
|
9493
|
+
!m && o && o.length === 0 && !B && !d && (O(!0), w({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
|
|
9494
|
+
}, [m, o, B, d, w, e, t]);
|
|
9495
9495
|
const re = ie((ee, W) => {
|
|
9496
9496
|
L((X) => ({ ...X, [ee]: W })), q((X) => {
|
|
9497
9497
|
const ce = { ...X };
|
|
@@ -9509,9 +9509,9 @@ const ua = ({
|
|
|
9509
9509
|
}, V = () => {
|
|
9510
9510
|
T > 0 ? P((ee) => ee - 1) : a == null || a();
|
|
9511
9511
|
}, Q = async () => {
|
|
9512
|
-
if (!(!h() || !
|
|
9512
|
+
if (!(!h() || !o))
|
|
9513
9513
|
try {
|
|
9514
|
-
const ee =
|
|
9514
|
+
const ee = o.map((X) => {
|
|
9515
9515
|
const ce = (z[X.id] ?? []).filter((Y) => Y && Y.trim());
|
|
9516
9516
|
return ce.length > 0 ? { riskCriteriaId: X.id, values: ce } : null;
|
|
9517
9517
|
}).filter((X) => X !== null);
|
|
@@ -9520,21 +9520,21 @@ const ua = ({
|
|
|
9520
9520
|
console.error("Risk scoring submit error:", ee);
|
|
9521
9521
|
}
|
|
9522
9522
|
};
|
|
9523
|
-
return m ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */
|
|
9523
|
+
return m ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
|
|
9524
9524
|
/* @__PURE__ */ i(Be, { className: "my-8" }),
|
|
9525
9525
|
/* @__PURE__ */ i("p", { className: "text-center text-sm mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r("riskScoring.loadingCriteria") })
|
|
9526
|
-
] }) }) : !m &&
|
|
9526
|
+
] }) }) : !m && o && o.length === 0 ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
|
|
9527
9527
|
/* @__PURE__ */ i(Be, { className: "my-8" }),
|
|
9528
9528
|
/* @__PURE__ */ i("p", { className: "text-center text-sm mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r("riskScoring.noCriteria") })
|
|
9529
|
-
] }) }) : y ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */
|
|
9529
|
+
] }) }) : y ? /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
|
|
9530
9530
|
r("riskScoring.errorLoading"),
|
|
9531
9531
|
" ",
|
|
9532
9532
|
y.message
|
|
9533
|
-
] }) }) }) :
|
|
9534
|
-
/* @__PURE__ */
|
|
9533
|
+
] }) }) }) : o ? /* @__PURE__ */ s(ne, { children: [
|
|
9534
|
+
/* @__PURE__ */ s(Te, { children: [
|
|
9535
9535
|
/* @__PURE__ */ i("h2", { className: "text-lg font-bold", children: r("riskScoring.title") }),
|
|
9536
9536
|
/* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r("riskScoring.subtitle") }),
|
|
9537
|
-
U.length > 1 && /* @__PURE__ */
|
|
9537
|
+
U.length > 1 && /* @__PURE__ */ s("div", { className: "flex items-center justify-between mt-3", children: [
|
|
9538
9538
|
/* @__PURE__ */ i("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: r("common.pageXofY", { current: T + 1, total: U.length }) }),
|
|
9539
9539
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: U.map((ee, W) => /* @__PURE__ */ i(
|
|
9540
9540
|
"div",
|
|
@@ -9561,8 +9561,8 @@ const ua = ({
|
|
|
9561
9561
|
},
|
|
9562
9562
|
ee.id
|
|
9563
9563
|
)) }),
|
|
9564
|
-
/* @__PURE__ */
|
|
9565
|
-
/* @__PURE__ */
|
|
9564
|
+
/* @__PURE__ */ s(Re, { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
9565
|
+
/* @__PURE__ */ s(
|
|
9566
9566
|
Z,
|
|
9567
9567
|
{
|
|
9568
9568
|
type: "button",
|
|
@@ -9575,7 +9575,7 @@ const ua = ({
|
|
|
9575
9575
|
]
|
|
9576
9576
|
}
|
|
9577
9577
|
),
|
|
9578
|
-
H ? /* @__PURE__ */ i(Z, { type: "button", isLoading: d, onClick: Q, children: r("common.continue") }) : /* @__PURE__ */
|
|
9578
|
+
H ? /* @__PURE__ */ i(Z, { type: "button", isLoading: d, onClick: Q, children: r("common.continue") }) : /* @__PURE__ */ s(
|
|
9579
9579
|
Z,
|
|
9580
9580
|
{
|
|
9581
9581
|
type: "button",
|
|
@@ -9594,15 +9594,15 @@ const ua = ({
|
|
|
9594
9594
|
}, children: /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: y.message }) })
|
|
9595
9595
|
] }) : null;
|
|
9596
9596
|
}, pa = ({ criterion: e, value: t, error: a, locale: r, onChange: n }) => {
|
|
9597
|
-
const { t: l } = Ie(),
|
|
9598
|
-
return /* @__PURE__ */
|
|
9599
|
-
/* @__PURE__ */
|
|
9597
|
+
const { t: l } = Ie(), o = ma(e), p = e.valueDataType === Qe.Integer || e.valueDataType === Qe.Money || e.valueDataType === Qe.DigitOnly, m = sa(e), d = (y) => m ? la(y, r) : y;
|
|
9598
|
+
return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
9599
|
+
/* @__PURE__ */ s("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
|
|
9600
9600
|
e.displayName,
|
|
9601
9601
|
e.isRequired && /* @__PURE__ */ i("span", { className: "text-danger-500 ml-1", children: "*" })
|
|
9602
9602
|
] }),
|
|
9603
9603
|
e.description && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: e.description }),
|
|
9604
9604
|
p && (e.min !== void 0 || e.max !== void 0) && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: e.min !== void 0 && e.max !== void 0 ? l("riskScoring.range", { min: e.min, max: e.max }) : e.min !== void 0 ? l("riskScoring.minimum", { min: e.min }) : l("riskScoring.maximum", { max: e.max }) }),
|
|
9605
|
-
|
|
9605
|
+
o === "text" && /* @__PURE__ */ i(
|
|
9606
9606
|
Ce,
|
|
9607
9607
|
{
|
|
9608
9608
|
value: t[0] ?? "",
|
|
@@ -9614,12 +9614,12 @@ const ua = ({
|
|
|
9614
9614
|
min: e.min,
|
|
9615
9615
|
max: e.max,
|
|
9616
9616
|
onKeyDown: (y) => {
|
|
9617
|
-
e.valueDataType ===
|
|
9617
|
+
e.valueDataType === Qe.DigitOnly && ["e", "E", "+", "-", "."].includes(y.key) && y.preventDefault();
|
|
9618
9618
|
}
|
|
9619
9619
|
}
|
|
9620
9620
|
),
|
|
9621
|
-
|
|
9622
|
-
(e.defaultValues ?? []).map((y) => /* @__PURE__ */
|
|
9621
|
+
o === "radio" && /* @__PURE__ */ s("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
9622
|
+
(e.defaultValues ?? []).map((y) => /* @__PURE__ */ s(
|
|
9623
9623
|
"label",
|
|
9624
9624
|
{
|
|
9625
9625
|
className: "metakyc-option-label",
|
|
@@ -9654,8 +9654,8 @@ const ua = ({
|
|
|
9654
9654
|
)),
|
|
9655
9655
|
a && /* @__PURE__ */ i("p", { className: "text-sm text-danger-500", children: a })
|
|
9656
9656
|
] }),
|
|
9657
|
-
|
|
9658
|
-
(e.defaultValues ?? []).map((y) => /* @__PURE__ */
|
|
9657
|
+
o === "checkbox" && /* @__PURE__ */ s("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [
|
|
9658
|
+
(e.defaultValues ?? []).map((y) => /* @__PURE__ */ s(
|
|
9659
9659
|
"label",
|
|
9660
9660
|
{
|
|
9661
9661
|
className: "metakyc-option-label",
|
|
@@ -9677,8 +9677,8 @@ const ua = ({
|
|
|
9677
9677
|
)),
|
|
9678
9678
|
a && /* @__PURE__ */ i("p", { className: "text-sm text-danger-500", children: a })
|
|
9679
9679
|
] }),
|
|
9680
|
-
|
|
9681
|
-
|
|
9680
|
+
o === "country" && /* @__PURE__ */ i(
|
|
9681
|
+
Et,
|
|
9682
9682
|
{
|
|
9683
9683
|
value: t[0] ?? "",
|
|
9684
9684
|
onChange: (y) => n([y.target.value]),
|
|
@@ -9700,7 +9700,7 @@ const ua = ({
|
|
|
9700
9700
|
onComplete: t,
|
|
9701
9701
|
onBack: a
|
|
9702
9702
|
}) => {
|
|
9703
|
-
const { t: r } = Ie(), { investorCategorizationService: n } = Oe(), [l,
|
|
9703
|
+
const { t: r } = Ie(), { investorCategorizationService: n } = Oe(), [l, o] = S(null), [p, m] = S(!1), [d, y] = S(null);
|
|
9704
9704
|
return /* @__PURE__ */ i("form", { onSubmit: async (z) => {
|
|
9705
9705
|
if (z.preventDefault(), l === null) {
|
|
9706
9706
|
y(r("investorCategorization.pleaseSelect"));
|
|
@@ -9720,12 +9720,12 @@ const ua = ({
|
|
|
9720
9720
|
} finally {
|
|
9721
9721
|
m(!1);
|
|
9722
9722
|
}
|
|
9723
|
-
}, children: /* @__PURE__ */
|
|
9724
|
-
/* @__PURE__ */
|
|
9723
|
+
}, children: /* @__PURE__ */ s(ne, { children: [
|
|
9724
|
+
/* @__PURE__ */ s(Te, { children: [
|
|
9725
9725
|
/* @__PURE__ */ i("h2", { className: "text-lg font-bold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: r("investorCategorization.whichStatement") }),
|
|
9726
9726
|
/* @__PURE__ */ i("p", { className: "mt-2", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r("investorCategorization.retailInvestorInfo") })
|
|
9727
9727
|
] }),
|
|
9728
|
-
/* @__PURE__ */
|
|
9728
|
+
/* @__PURE__ */ s(oe, { className: "space-y-4", children: [
|
|
9729
9729
|
/* @__PURE__ */ i("p", { className: "text-sm font-medium mb-3", style: { color: "var(--metakyc-text-secondary, #374151)" }, children: r("investorCategorization.chooseOne") }),
|
|
9730
9730
|
/* @__PURE__ */ i(
|
|
9731
9731
|
"label",
|
|
@@ -9735,7 +9735,7 @@ const ua = ({
|
|
|
9735
9735
|
borderColor: l === Ee.Individual ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)",
|
|
9736
9736
|
backgroundColor: l === Ee.Individual ? "var(--metakyc-primary-light, #dbeafe)" : "transparent"
|
|
9737
9737
|
},
|
|
9738
|
-
children: /* @__PURE__ */
|
|
9738
|
+
children: /* @__PURE__ */ s("div", { className: "flex items-start", children: [
|
|
9739
9739
|
/* @__PURE__ */ i(
|
|
9740
9740
|
"input",
|
|
9741
9741
|
{
|
|
@@ -9743,11 +9743,11 @@ const ua = ({
|
|
|
9743
9743
|
name: "investorType",
|
|
9744
9744
|
value: Ee.Individual,
|
|
9745
9745
|
checked: l === Ee.Individual,
|
|
9746
|
-
onChange: () =>
|
|
9746
|
+
onChange: () => o(Ee.Individual),
|
|
9747
9747
|
className: "mt-1"
|
|
9748
9748
|
}
|
|
9749
9749
|
),
|
|
9750
|
-
/* @__PURE__ */
|
|
9750
|
+
/* @__PURE__ */ s("div", { className: "ml-3", children: [
|
|
9751
9751
|
/* @__PURE__ */ i("div", { className: "text-base font-semibold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: r("investorCategorization.individualInvestor") }),
|
|
9752
9752
|
/* @__PURE__ */ i("div", { className: "text-sm mt-1", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r("investorCategorization.individualInvestorDesc") })
|
|
9753
9753
|
] })
|
|
@@ -9762,7 +9762,7 @@ const ua = ({
|
|
|
9762
9762
|
borderColor: l === Ee.Sophisticated ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)",
|
|
9763
9763
|
backgroundColor: l === Ee.Sophisticated ? "var(--metakyc-primary-light, #dbeafe)" : "transparent"
|
|
9764
9764
|
},
|
|
9765
|
-
children: /* @__PURE__ */
|
|
9765
|
+
children: /* @__PURE__ */ s("div", { className: "flex items-start", children: [
|
|
9766
9766
|
/* @__PURE__ */ i(
|
|
9767
9767
|
"input",
|
|
9768
9768
|
{
|
|
@@ -9770,11 +9770,11 @@ const ua = ({
|
|
|
9770
9770
|
name: "investorType",
|
|
9771
9771
|
value: Ee.Sophisticated,
|
|
9772
9772
|
checked: l === Ee.Sophisticated,
|
|
9773
|
-
onChange: () =>
|
|
9773
|
+
onChange: () => o(Ee.Sophisticated),
|
|
9774
9774
|
className: "mt-1"
|
|
9775
9775
|
}
|
|
9776
9776
|
),
|
|
9777
|
-
/* @__PURE__ */
|
|
9777
|
+
/* @__PURE__ */ s("div", { className: "ml-3", children: [
|
|
9778
9778
|
/* @__PURE__ */ i("div", { className: "text-base font-semibold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: r("investorCategorization.sophisticatedInvestor") }),
|
|
9779
9779
|
/* @__PURE__ */ i("div", { className: "text-sm mt-1", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r("investorCategorization.sophisticatedInvestorDesc") })
|
|
9780
9780
|
] })
|
|
@@ -9789,7 +9789,7 @@ const ua = ({
|
|
|
9789
9789
|
borderColor: l === Ee.HighNetWorth ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)",
|
|
9790
9790
|
backgroundColor: l === Ee.HighNetWorth ? "var(--metakyc-primary-light, #dbeafe)" : "transparent"
|
|
9791
9791
|
},
|
|
9792
|
-
children: /* @__PURE__ */
|
|
9792
|
+
children: /* @__PURE__ */ s("div", { className: "flex items-start", children: [
|
|
9793
9793
|
/* @__PURE__ */ i(
|
|
9794
9794
|
"input",
|
|
9795
9795
|
{
|
|
@@ -9797,24 +9797,24 @@ const ua = ({
|
|
|
9797
9797
|
name: "investorType",
|
|
9798
9798
|
value: Ee.HighNetWorth,
|
|
9799
9799
|
checked: l === Ee.HighNetWorth,
|
|
9800
|
-
onChange: () =>
|
|
9800
|
+
onChange: () => o(Ee.HighNetWorth),
|
|
9801
9801
|
className: "mt-1"
|
|
9802
9802
|
}
|
|
9803
9803
|
),
|
|
9804
|
-
/* @__PURE__ */
|
|
9804
|
+
/* @__PURE__ */ s("div", { className: "ml-3", children: [
|
|
9805
9805
|
/* @__PURE__ */ i("div", { className: "text-base font-semibold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: r("investorCategorization.highNetworthInvestor") }),
|
|
9806
9806
|
/* @__PURE__ */ i("div", { className: "text-sm mt-1", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r("investorCategorization.highNetworthInvestorDesc") })
|
|
9807
9807
|
] })
|
|
9808
9808
|
] })
|
|
9809
9809
|
}
|
|
9810
9810
|
),
|
|
9811
|
-
d && /* @__PURE__ */ i("div", { className: "p-4 rounded-lg", style: { backgroundColor: "#fee2e2", border: "1px solid #fca5a5" }, children: /* @__PURE__ */
|
|
9811
|
+
d && /* @__PURE__ */ i("div", { className: "p-4 rounded-lg", style: { backgroundColor: "#fee2e2", border: "1px solid #fca5a5" }, children: /* @__PURE__ */ s("p", { className: "text-sm", style: { color: "#991b1b" }, children: [
|
|
9812
9812
|
/* @__PURE__ */ i("strong", { children: "Error:" }),
|
|
9813
9813
|
" ",
|
|
9814
9814
|
d
|
|
9815
9815
|
] }) })
|
|
9816
9816
|
] }),
|
|
9817
|
-
/* @__PURE__ */
|
|
9817
|
+
/* @__PURE__ */ s(Re, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
9818
9818
|
a && /* @__PURE__ */ i(Z, { type: "button", variant: "outline", onClick: a, children: r("common.back") }),
|
|
9819
9819
|
/* @__PURE__ */ i(
|
|
9820
9820
|
Z,
|
|
@@ -9828,11 +9828,11 @@ const ua = ({
|
|
|
9828
9828
|
] })
|
|
9829
9829
|
] }) });
|
|
9830
9830
|
};
|
|
9831
|
-
function
|
|
9831
|
+
function $t(e) {
|
|
9832
9832
|
const t = e.split(":").map(Number);
|
|
9833
9833
|
return t.length === 3 ? t[0] * 3600 + t[1] * 60 + t[2] : 0;
|
|
9834
9834
|
}
|
|
9835
|
-
function
|
|
9835
|
+
function Nt(e) {
|
|
9836
9836
|
const t = Math.floor(e / 60), a = e % 60;
|
|
9837
9837
|
return `${t.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}`;
|
|
9838
9838
|
}
|
|
@@ -9841,14 +9841,14 @@ const ya = ({
|
|
|
9841
9841
|
onComplete: t,
|
|
9842
9842
|
onBack: a
|
|
9843
9843
|
}) => {
|
|
9844
|
-
const { t: r } = Ie(), { appropriatenessTestService: n } = Oe(), [l,
|
|
9844
|
+
const { t: r } = Ie(), { appropriatenessTestService: n } = Oe(), [l, o] = S(null), [p, m] = S(!0), [d, y] = S(!1), [w, z] = S(null), [L, C] = S({}), [q, T] = S(0), [P, B] = S(!1), [O, U] = S(!1), [H, J] = S(0), [re, h] = S(0), [R, V] = S(null);
|
|
9845
9845
|
be(() => {
|
|
9846
9846
|
(async () => {
|
|
9847
9847
|
try {
|
|
9848
9848
|
m(!0), z(null);
|
|
9849
9849
|
const E = await n.getAppropriatenessTest(e);
|
|
9850
|
-
if (
|
|
9851
|
-
const F =
|
|
9850
|
+
if (o(E), E.waitTimeSpanForNextTry && E.waitTimeSpanForNextTry !== "00:00:00") {
|
|
9851
|
+
const F = $t(E.waitTimeSpanForNextTry);
|
|
9852
9852
|
F > 0 && J(F);
|
|
9853
9853
|
}
|
|
9854
9854
|
} catch (E) {
|
|
@@ -9879,8 +9879,8 @@ const ya = ({
|
|
|
9879
9879
|
}, W = ie(async () => {
|
|
9880
9880
|
try {
|
|
9881
9881
|
const E = await n.getAppropriatenessTest(e);
|
|
9882
|
-
if (
|
|
9883
|
-
const F =
|
|
9882
|
+
if (o(E), E.waitTimeSpanForNextTry && E.waitTimeSpanForNextTry !== "00:00:00") {
|
|
9883
|
+
const F = $t(E.waitTimeSpanForNextTry);
|
|
9884
9884
|
F > 0 && J(F);
|
|
9885
9885
|
}
|
|
9886
9886
|
} catch {
|
|
@@ -9922,20 +9922,20 @@ const ya = ({
|
|
|
9922
9922
|
B(!1), U(!1), C({}), h(0);
|
|
9923
9923
|
};
|
|
9924
9924
|
if (p)
|
|
9925
|
-
return /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */
|
|
9925
|
+
return /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", padding: "48px 0", gap: "16px" }, children: [
|
|
9926
9926
|
/* @__PURE__ */ i(Be, { className: "my-8" }),
|
|
9927
9927
|
/* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: r("appropriatenessTest.loadingTest") })
|
|
9928
9928
|
] }) }) });
|
|
9929
9929
|
if (!l)
|
|
9930
|
-
return /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */
|
|
9930
|
+
return /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { style: { textAlign: "center", padding: "48px 0" }, children: [
|
|
9931
9931
|
/* @__PURE__ */ i("p", { style: { fontSize: "16px", fontWeight: 600, color: "var(--metakyc-danger, #ef4444)" }, children: r("appropriatenessTest.noTestData") }),
|
|
9932
9932
|
w && /* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "8px" }, children: w })
|
|
9933
9933
|
] }) }) });
|
|
9934
9934
|
const Y = l.testAllowedMaxTry - l.totalFailedTries, je = l.appropriatenessQuestions.length, ye = Object.keys(L).length;
|
|
9935
9935
|
if (H > 0)
|
|
9936
|
-
return /* @__PURE__ */
|
|
9936
|
+
return /* @__PURE__ */ s(ne, { children: [
|
|
9937
9937
|
/* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: l.displayName }) }),
|
|
9938
|
-
/* @__PURE__ */ i(oe, { children: /* @__PURE__ */
|
|
9938
|
+
/* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { style: { textAlign: "center", padding: "32px 0" }, children: [
|
|
9939
9939
|
/* @__PURE__ */ i("div", { style: {
|
|
9940
9940
|
width: "100px",
|
|
9941
9941
|
height: "100px",
|
|
@@ -9950,7 +9950,7 @@ const ya = ({
|
|
|
9950
9950
|
fontWeight: 700,
|
|
9951
9951
|
color: "var(--metakyc-primary, #2563eb)",
|
|
9952
9952
|
fontVariantNumeric: "tabular-nums"
|
|
9953
|
-
}, children:
|
|
9953
|
+
}, children: Nt(H) }) }),
|
|
9954
9954
|
/* @__PURE__ */ i("p", { style: { fontSize: "15px", fontWeight: 500, color: "var(--metakyc-text-primary, #111827)" }, children: r("appropriatenessTest.waitBeforeRetrying") }),
|
|
9955
9955
|
/* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "4px" }, children: r("appropriatenessTest.waitTimerMessage") }),
|
|
9956
9956
|
w && /* @__PURE__ */ i("div", { style: {
|
|
@@ -9966,8 +9966,8 @@ const ya = ({
|
|
|
9966
9966
|
const E = () => {
|
|
9967
9967
|
V(null), ce(), z(null);
|
|
9968
9968
|
};
|
|
9969
|
-
return /* @__PURE__ */
|
|
9970
|
-
/* @__PURE__ */ i(oe, { children: /* @__PURE__ */
|
|
9969
|
+
return /* @__PURE__ */ s(ne, { children: [
|
|
9970
|
+
/* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { style: {
|
|
9971
9971
|
display: "flex",
|
|
9972
9972
|
flexDirection: "column",
|
|
9973
9973
|
alignItems: "center",
|
|
@@ -9983,10 +9983,10 @@ const ya = ({
|
|
|
9983
9983
|
alignItems: "center",
|
|
9984
9984
|
justifyContent: "center",
|
|
9985
9985
|
backgroundColor: R.success ? "color-mix(in srgb, var(--metakyc-success, #10b981) 12%, transparent)" : "color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent)"
|
|
9986
|
-
}, children: R.success ? /* @__PURE__ */
|
|
9986
|
+
}, children: R.success ? /* @__PURE__ */ s("svg", { width: "36", height: "36", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-success, #10b981)", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
9987
9987
|
/* @__PURE__ */ i("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
|
|
9988
9988
|
/* @__PURE__ */ i("polyline", { points: "22 4 12 14.01 9 11.01" })
|
|
9989
|
-
] }) : /* @__PURE__ */
|
|
9989
|
+
] }) : /* @__PURE__ */ s("svg", { width: "36", height: "36", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-danger, #ef4444)", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
9990
9990
|
/* @__PURE__ */ i("circle", { cx: "12", cy: "12", r: "10" }),
|
|
9991
9991
|
/* @__PURE__ */ i("line", { x1: "15", y1: "9", x2: "9", y2: "15" }),
|
|
9992
9992
|
/* @__PURE__ */ i("line", { x1: "9", y1: "9", x2: "15", y2: "15" })
|
|
@@ -10028,7 +10028,7 @@ const ya = ({
|
|
|
10028
10028
|
margin: 0
|
|
10029
10029
|
}, children: r("appropriatenessTest.noAttemptsRemaining") }) })
|
|
10030
10030
|
] }) }),
|
|
10031
|
-
/* @__PURE__ */ i(Re, { children: /* @__PURE__ */ i("div", { style: { display: "flex", justifyContent: "center", width: "100%", gap: "12px" }, children: R.success ? /* @__PURE__ */ i(Z, { type: "button", onClick: () => t == null ? void 0 : t(), children: r("common.continue") }) : /* @__PURE__ */
|
|
10031
|
+
/* @__PURE__ */ i(Re, { children: /* @__PURE__ */ i("div", { style: { display: "flex", justifyContent: "center", width: "100%", gap: "12px" }, children: R.success ? /* @__PURE__ */ i(Z, { type: "button", onClick: () => t == null ? void 0 : t(), children: r("common.continue") }) : /* @__PURE__ */ s(pt, { children: [
|
|
10032
10032
|
Y > 0 && H <= 0 && /* @__PURE__ */ i(Z, { type: "button", onClick: E, children: r("appropriatenessTest.retakeTest") }),
|
|
10033
10033
|
Y > 0 && H > 0 && /* @__PURE__ */ i(Z, { type: "button", onClick: E, children: r("appropriatenessTest.ok") }),
|
|
10034
10034
|
Y <= 0 && a && /* @__PURE__ */ i(Z, { type: "button", variant: "outline", onClick: a, children: r("common.back") })
|
|
@@ -10036,13 +10036,13 @@ const ya = ({
|
|
|
10036
10036
|
] });
|
|
10037
10037
|
}
|
|
10038
10038
|
if (!P)
|
|
10039
|
-
return /* @__PURE__ */
|
|
10040
|
-
/* @__PURE__ */
|
|
10039
|
+
return /* @__PURE__ */ s(ne, { children: [
|
|
10040
|
+
/* @__PURE__ */ s(Te, { children: [
|
|
10041
10041
|
/* @__PURE__ */ i("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: l.displayName }),
|
|
10042
10042
|
l.subtitle && /* @__PURE__ */ i("p", { style: { fontSize: "14px", color: "var(--metakyc-text-secondary, #6b7280)", marginTop: "4px" }, children: l.subtitle })
|
|
10043
10043
|
] }),
|
|
10044
|
-
/* @__PURE__ */
|
|
10045
|
-
l.description && /* @__PURE__ */
|
|
10044
|
+
/* @__PURE__ */ s(oe, { children: [
|
|
10045
|
+
l.description && /* @__PURE__ */ s("div", { style: {
|
|
10046
10046
|
marginBottom: "20px",
|
|
10047
10047
|
padding: "12px 14px",
|
|
10048
10048
|
borderRadius: "10px",
|
|
@@ -10051,19 +10051,19 @@ const ya = ({
|
|
|
10051
10051
|
display: "flex",
|
|
10052
10052
|
gap: "10px"
|
|
10053
10053
|
}, children: [
|
|
10054
|
-
/* @__PURE__ */
|
|
10054
|
+
/* @__PURE__ */ s("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-primary, #2563eb)", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", style: { flexShrink: 0, marginTop: "1px" }, children: [
|
|
10055
10055
|
/* @__PURE__ */ i("circle", { cx: "12", cy: "12", r: "10" }),
|
|
10056
10056
|
/* @__PURE__ */ i("line", { x1: "12", y1: "16", x2: "12", y2: "12" }),
|
|
10057
10057
|
/* @__PURE__ */ i("line", { x1: "12", y1: "8", x2: "12.01", y2: "8" })
|
|
10058
10058
|
] }),
|
|
10059
10059
|
/* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-text-secondary, #374151)", margin: 0, lineHeight: 1.5 }, children: l.description })
|
|
10060
10060
|
] }),
|
|
10061
|
-
/* @__PURE__ */
|
|
10062
|
-
/* @__PURE__ */ i(
|
|
10063
|
-
/* @__PURE__ */ i(
|
|
10064
|
-
/* @__PURE__ */ i(
|
|
10061
|
+
/* @__PURE__ */ s("div", { className: "metakyc-grid-2", style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: "12px", marginBottom: "20px" }, children: [
|
|
10062
|
+
/* @__PURE__ */ i(ht, { icon: "questions", label: r("appropriatenessTest.questions"), value: String(l.totalQuestionCount) }),
|
|
10063
|
+
/* @__PURE__ */ i(ht, { icon: "time", label: r("appropriatenessTest.timeLimit"), value: Nt(l.testDurationSec) }),
|
|
10064
|
+
/* @__PURE__ */ i(ht, { icon: "target", label: r("appropriatenessTest.passRequirement"), value: r("appropriatenessTest.correct", { count: l.testCorrectAnswerPassLimit }) }),
|
|
10065
10065
|
/* @__PURE__ */ i(
|
|
10066
|
-
|
|
10066
|
+
ht,
|
|
10067
10067
|
{
|
|
10068
10068
|
icon: "retry",
|
|
10069
10069
|
label: r("appropriatenessTest.attemptsLeftLabel"),
|
|
@@ -10072,7 +10072,7 @@ const ya = ({
|
|
|
10072
10072
|
}
|
|
10073
10073
|
)
|
|
10074
10074
|
] }),
|
|
10075
|
-
w && /* @__PURE__ */
|
|
10075
|
+
w && /* @__PURE__ */ s("div", { style: {
|
|
10076
10076
|
marginBottom: "16px",
|
|
10077
10077
|
padding: "12px 14px",
|
|
10078
10078
|
borderRadius: "10px",
|
|
@@ -10081,12 +10081,12 @@ const ya = ({
|
|
|
10081
10081
|
display: "flex",
|
|
10082
10082
|
gap: "10px"
|
|
10083
10083
|
}, children: [
|
|
10084
|
-
/* @__PURE__ */
|
|
10084
|
+
/* @__PURE__ */ s("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "var(--metakyc-danger, #ef4444)", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", style: { flexShrink: 0, marginTop: "1px" }, children: [
|
|
10085
10085
|
/* @__PURE__ */ i("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }),
|
|
10086
10086
|
/* @__PURE__ */ i("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
|
|
10087
10087
|
/* @__PURE__ */ i("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
10088
10088
|
] }),
|
|
10089
|
-
/* @__PURE__ */
|
|
10089
|
+
/* @__PURE__ */ s("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0, lineHeight: 1.5 }, children: [
|
|
10090
10090
|
/* @__PURE__ */ i("strong", { children: r("appropriatenessTest.previousAttempt") }),
|
|
10091
10091
|
" ",
|
|
10092
10092
|
w
|
|
@@ -10099,20 +10099,20 @@ const ya = ({
|
|
|
10099
10099
|
border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 20%, transparent)"
|
|
10100
10100
|
}, children: /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: r("appropriatenessTest.allAttemptsUsed") }) })
|
|
10101
10101
|
] }),
|
|
10102
|
-
/* @__PURE__ */ i(Re, { children: /* @__PURE__ */
|
|
10102
|
+
/* @__PURE__ */ i(Re, { children: /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: a ? "space-between" : "flex-end", width: "100%" }, children: [
|
|
10103
10103
|
a && /* @__PURE__ */ i(Z, { type: "button", variant: "outline", onClick: a, children: r("common.back") }),
|
|
10104
10104
|
/* @__PURE__ */ i(Z, { type: "button", onClick: Q, disabled: Y <= 0, children: r("appropriatenessTest.startTest") })
|
|
10105
10105
|
] }) })
|
|
10106
10106
|
] });
|
|
10107
10107
|
const fe = l.appropriatenessQuestions[re], Se = re === je - 1, pe = ye === je, M = q <= 60;
|
|
10108
|
-
return /* @__PURE__ */
|
|
10109
|
-
/* @__PURE__ */
|
|
10110
|
-
/* @__PURE__ */
|
|
10111
|
-
/* @__PURE__ */
|
|
10108
|
+
return /* @__PURE__ */ s(ne, { children: [
|
|
10109
|
+
/* @__PURE__ */ s(Te, { children: [
|
|
10110
|
+
/* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
10111
|
+
/* @__PURE__ */ s("div", { children: [
|
|
10112
10112
|
/* @__PURE__ */ i("h2", { style: { fontSize: "18px", fontWeight: 700, color: "var(--metakyc-text-primary, #111827)", margin: 0 }, children: l.displayName }),
|
|
10113
10113
|
/* @__PURE__ */ i("p", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)", marginTop: "2px" }, children: r("appropriatenessTest.questionXofY", { current: re + 1, total: je }) })
|
|
10114
10114
|
] }),
|
|
10115
|
-
/* @__PURE__ */
|
|
10115
|
+
/* @__PURE__ */ s("div", { style: {
|
|
10116
10116
|
display: "flex",
|
|
10117
10117
|
alignItems: "center",
|
|
10118
10118
|
gap: "8px",
|
|
@@ -10121,7 +10121,7 @@ const ya = ({
|
|
|
10121
10121
|
backgroundColor: M ? "color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent)" : "var(--metakyc-surface, #f3f4f6)",
|
|
10122
10122
|
transition: "all 0.3s ease"
|
|
10123
10123
|
}, children: [
|
|
10124
|
-
/* @__PURE__ */
|
|
10124
|
+
/* @__PURE__ */ s(
|
|
10125
10125
|
"svg",
|
|
10126
10126
|
{
|
|
10127
10127
|
width: "16",
|
|
@@ -10144,10 +10144,10 @@ const ya = ({
|
|
|
10144
10144
|
fontVariantNumeric: "tabular-nums",
|
|
10145
10145
|
color: M ? "var(--metakyc-danger, #ef4444)" : "var(--metakyc-text-primary, #111827)",
|
|
10146
10146
|
transition: "color 0.3s ease"
|
|
10147
|
-
}, children:
|
|
10147
|
+
}, children: Nt(q) })
|
|
10148
10148
|
] })
|
|
10149
10149
|
] }),
|
|
10150
|
-
/* @__PURE__ */
|
|
10150
|
+
/* @__PURE__ */ s("div", { style: { marginTop: "12px" }, children: [
|
|
10151
10151
|
/* @__PURE__ */ i("div", { style: {
|
|
10152
10152
|
height: "4px",
|
|
10153
10153
|
borderRadius: "999px",
|
|
@@ -10160,17 +10160,17 @@ const ya = ({
|
|
|
10160
10160
|
width: `${ye / je * 100}%`,
|
|
10161
10161
|
transition: "width 0.3s ease"
|
|
10162
10162
|
} }) }),
|
|
10163
|
-
/* @__PURE__ */
|
|
10163
|
+
/* @__PURE__ */ s("div", { style: {
|
|
10164
10164
|
display: "flex",
|
|
10165
10165
|
justifyContent: "space-between",
|
|
10166
10166
|
marginTop: "4px"
|
|
10167
10167
|
}, children: [
|
|
10168
|
-
/* @__PURE__ */
|
|
10168
|
+
/* @__PURE__ */ s("span", { style: { fontSize: "11px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
|
|
10169
10169
|
ye,
|
|
10170
10170
|
" ",
|
|
10171
10171
|
r("appropriatenessTest.answered")
|
|
10172
10172
|
] }),
|
|
10173
|
-
/* @__PURE__ */
|
|
10173
|
+
/* @__PURE__ */ s("span", { style: { fontSize: "11px", color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
|
|
10174
10174
|
Y,
|
|
10175
10175
|
" ",
|
|
10176
10176
|
r("appropriatenessTest.attemptsLeft")
|
|
@@ -10178,7 +10178,7 @@ const ya = ({
|
|
|
10178
10178
|
] })
|
|
10179
10179
|
] })
|
|
10180
10180
|
] }),
|
|
10181
|
-
/* @__PURE__ */
|
|
10181
|
+
/* @__PURE__ */ s(oe, { children: [
|
|
10182
10182
|
fe && /* @__PURE__ */ i(
|
|
10183
10183
|
ka,
|
|
10184
10184
|
{
|
|
@@ -10220,7 +10220,7 @@ const ya = ({
|
|
|
10220
10220
|
},
|
|
10221
10221
|
E.id
|
|
10222
10222
|
)) }),
|
|
10223
|
-
O && /* @__PURE__ */
|
|
10223
|
+
O && /* @__PURE__ */ s("div", { style: {
|
|
10224
10224
|
marginTop: "16px",
|
|
10225
10225
|
padding: "12px 14px",
|
|
10226
10226
|
borderRadius: "10px",
|
|
@@ -10230,7 +10230,7 @@ const ya = ({
|
|
|
10230
10230
|
alignItems: "center",
|
|
10231
10231
|
gap: "10px"
|
|
10232
10232
|
}, children: [
|
|
10233
|
-
/* @__PURE__ */
|
|
10233
|
+
/* @__PURE__ */ s("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "#f59e0b", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", style: { flexShrink: 0 }, children: [
|
|
10234
10234
|
/* @__PURE__ */ i("circle", { cx: "12", cy: "12", r: "10" }),
|
|
10235
10235
|
/* @__PURE__ */ i("polyline", { points: "12 6 12 12 16 14" })
|
|
10236
10236
|
] }),
|
|
@@ -10244,7 +10244,7 @@ const ya = ({
|
|
|
10244
10244
|
border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 20%, transparent)"
|
|
10245
10245
|
}, children: /* @__PURE__ */ i("p", { style: { fontSize: "13px", color: "var(--metakyc-danger, #ef4444)", margin: 0 }, children: w }) })
|
|
10246
10246
|
] }),
|
|
10247
|
-
/* @__PURE__ */ i(Re, { children: /* @__PURE__ */
|
|
10247
|
+
/* @__PURE__ */ i(Re, { children: /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", width: "100%" }, children: [
|
|
10248
10248
|
/* @__PURE__ */ i(
|
|
10249
10249
|
Z,
|
|
10250
10250
|
{
|
|
@@ -10257,7 +10257,7 @@ const ya = ({
|
|
|
10257
10257
|
children: re > 0 ? r("common.previous") : r("common.cancel")
|
|
10258
10258
|
}
|
|
10259
10259
|
),
|
|
10260
|
-
/* @__PURE__ */
|
|
10260
|
+
/* @__PURE__ */ s("div", { style: { display: "flex", gap: "8px" }, children: [
|
|
10261
10261
|
!Se && /* @__PURE__ */ i(
|
|
10262
10262
|
Z,
|
|
10263
10263
|
{
|
|
@@ -10281,26 +10281,26 @@ const ya = ({
|
|
|
10281
10281
|
] }) })
|
|
10282
10282
|
] });
|
|
10283
10283
|
}, fa = {
|
|
10284
|
-
questions: /* @__PURE__ */
|
|
10284
|
+
questions: /* @__PURE__ */ s("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
10285
10285
|
/* @__PURE__ */ i("path", { d: "M9 11l3 3L22 4" }),
|
|
10286
10286
|
/* @__PURE__ */ i("path", { d: "M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11" })
|
|
10287
10287
|
] }),
|
|
10288
|
-
time: /* @__PURE__ */
|
|
10288
|
+
time: /* @__PURE__ */ s("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
10289
10289
|
/* @__PURE__ */ i("circle", { cx: "12", cy: "12", r: "10" }),
|
|
10290
10290
|
/* @__PURE__ */ i("polyline", { points: "12 6 12 12 16 14" })
|
|
10291
10291
|
] }),
|
|
10292
|
-
target: /* @__PURE__ */
|
|
10292
|
+
target: /* @__PURE__ */ s("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
10293
10293
|
/* @__PURE__ */ i("circle", { cx: "12", cy: "12", r: "10" }),
|
|
10294
10294
|
/* @__PURE__ */ i("circle", { cx: "12", cy: "12", r: "6" }),
|
|
10295
10295
|
/* @__PURE__ */ i("circle", { cx: "12", cy: "12", r: "2" })
|
|
10296
10296
|
] }),
|
|
10297
|
-
retry: /* @__PURE__ */
|
|
10297
|
+
retry: /* @__PURE__ */ s("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
10298
10298
|
/* @__PURE__ */ i("polyline", { points: "23 4 23 10 17 10" }),
|
|
10299
10299
|
/* @__PURE__ */ i("path", { d: "M20.49 15a9 9 0 1 1-2.12-9.36L23 10" })
|
|
10300
10300
|
] })
|
|
10301
|
-
},
|
|
10301
|
+
}, ht = ({ icon: e, label: t, value: a, variant: r = "default" }) => {
|
|
10302
10302
|
const n = r === "warning";
|
|
10303
|
-
return /* @__PURE__ */
|
|
10303
|
+
return /* @__PURE__ */ s("div", { style: {
|
|
10304
10304
|
display: "flex",
|
|
10305
10305
|
alignItems: "center",
|
|
10306
10306
|
gap: "12px",
|
|
@@ -10313,7 +10313,7 @@ const ya = ({
|
|
|
10313
10313
|
color: n ? "#f59e0b" : "var(--metakyc-primary, #2563eb)",
|
|
10314
10314
|
flexShrink: 0
|
|
10315
10315
|
}, children: fa[e] }),
|
|
10316
|
-
/* @__PURE__ */
|
|
10316
|
+
/* @__PURE__ */ s("div", { children: [
|
|
10317
10317
|
/* @__PURE__ */ i("p", { style: { fontSize: "12px", color: "var(--metakyc-text-muted, #9ca3af)", margin: 0 }, children: t }),
|
|
10318
10318
|
/* @__PURE__ */ i("p", { style: {
|
|
10319
10319
|
fontSize: "15px",
|
|
@@ -10324,8 +10324,8 @@ const ya = ({
|
|
|
10324
10324
|
}, children: a })
|
|
10325
10325
|
] })
|
|
10326
10326
|
] });
|
|
10327
|
-
}, ka = ({ question: e, selectedAnswer: t, onSelect: a, disabled: r }) => /* @__PURE__ */
|
|
10328
|
-
/* @__PURE__ */
|
|
10327
|
+
}, ka = ({ question: e, selectedAnswer: t, onSelect: a, disabled: r }) => /* @__PURE__ */ s("div", { children: [
|
|
10328
|
+
/* @__PURE__ */ s("div", { style: { marginBottom: "16px" }, children: [
|
|
10329
10329
|
e.groupName && /* @__PURE__ */ i("span", { style: {
|
|
10330
10330
|
display: "inline-block",
|
|
10331
10331
|
fontSize: "11px",
|
|
@@ -10344,8 +10344,8 @@ const ya = ({
|
|
|
10344
10344
|
}, children: e.question })
|
|
10345
10345
|
] }),
|
|
10346
10346
|
/* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: e.answers.map((n, l) => {
|
|
10347
|
-
const
|
|
10348
|
-
return /* @__PURE__ */
|
|
10347
|
+
const o = t === n;
|
|
10348
|
+
return /* @__PURE__ */ s(
|
|
10349
10349
|
"label",
|
|
10350
10350
|
{
|
|
10351
10351
|
style: {
|
|
@@ -10354,30 +10354,30 @@ const ya = ({
|
|
|
10354
10354
|
gap: "12px",
|
|
10355
10355
|
padding: "14px 16px",
|
|
10356
10356
|
borderRadius: "10px",
|
|
10357
|
-
border: `2px solid ${
|
|
10358
|
-
backgroundColor:
|
|
10357
|
+
border: `2px solid ${o ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #e5e7eb)"}`,
|
|
10358
|
+
backgroundColor: o ? "color-mix(in srgb, var(--metakyc-primary, #2563eb) 5%, var(--metakyc-background, #ffffff))" : "var(--metakyc-background, #ffffff)",
|
|
10359
10359
|
cursor: r ? "default" : "pointer",
|
|
10360
10360
|
transition: "all 0.15s ease",
|
|
10361
10361
|
opacity: r ? 0.6 : 1
|
|
10362
10362
|
},
|
|
10363
10363
|
onMouseEnter: (p) => {
|
|
10364
|
-
!r && !
|
|
10364
|
+
!r && !o && (p.currentTarget.style.borderColor = "color-mix(in srgb, var(--metakyc-primary, #2563eb) 50%, var(--metakyc-border, #e5e7eb))");
|
|
10365
10365
|
},
|
|
10366
10366
|
onMouseLeave: (p) => {
|
|
10367
|
-
|
|
10367
|
+
o || (p.currentTarget.style.borderColor = "var(--metakyc-border, #e5e7eb)");
|
|
10368
10368
|
},
|
|
10369
10369
|
children: [
|
|
10370
10370
|
/* @__PURE__ */ i("div", { style: {
|
|
10371
10371
|
width: "20px",
|
|
10372
10372
|
height: "20px",
|
|
10373
10373
|
borderRadius: "50%",
|
|
10374
|
-
border: `2px solid ${
|
|
10374
|
+
border: `2px solid ${o ? "var(--metakyc-primary, #2563eb)" : "var(--metakyc-border, #d1d5db)"}`,
|
|
10375
10375
|
display: "flex",
|
|
10376
10376
|
alignItems: "center",
|
|
10377
10377
|
justifyContent: "center",
|
|
10378
10378
|
flexShrink: 0,
|
|
10379
10379
|
transition: "border-color 0.15s ease"
|
|
10380
|
-
}, children:
|
|
10380
|
+
}, children: o && /* @__PURE__ */ i("div", { style: {
|
|
10381
10381
|
width: "10px",
|
|
10382
10382
|
height: "10px",
|
|
10383
10383
|
borderRadius: "50%",
|
|
@@ -10389,7 +10389,7 @@ const ya = ({
|
|
|
10389
10389
|
type: "radio",
|
|
10390
10390
|
name: `q-${e.id}`,
|
|
10391
10391
|
value: n,
|
|
10392
|
-
checked:
|
|
10392
|
+
checked: o,
|
|
10393
10393
|
onChange: () => a(n),
|
|
10394
10394
|
disabled: r,
|
|
10395
10395
|
style: { position: "absolute", opacity: 0, width: 0, height: 0 }
|
|
@@ -10397,8 +10397,8 @@ const ya = ({
|
|
|
10397
10397
|
),
|
|
10398
10398
|
/* @__PURE__ */ i("span", { style: {
|
|
10399
10399
|
fontSize: "14px",
|
|
10400
|
-
color:
|
|
10401
|
-
fontWeight:
|
|
10400
|
+
color: o ? "var(--metakyc-text-primary, #111827)" : "var(--metakyc-text-secondary, #6b7280)",
|
|
10401
|
+
fontWeight: o ? 500 : 400,
|
|
10402
10402
|
transition: "color 0.15s ease"
|
|
10403
10403
|
}, children: n })
|
|
10404
10404
|
]
|
|
@@ -10411,8 +10411,8 @@ const ya = ({
|
|
|
10411
10411
|
onComplete: t,
|
|
10412
10412
|
onBack: a
|
|
10413
10413
|
}) => {
|
|
10414
|
-
var
|
|
10415
|
-
const { t: r } = Ie(), { applicantService: n, baseInformationService: l, identityService:
|
|
10414
|
+
var at, He, dt, Je;
|
|
10415
|
+
const { t: r } = Ie(), { applicantService: n, baseInformationService: l, identityService: o, config: p, currentTheme: m } = Oe(), { identityData: d, provider: y, token: w, isLoading: z, error: L, requestIdentity: C, restartIdentity: q } = Fr(e), [T, P] = S(null), [B, O] = S(null), [U, H] = S([]), [J, re] = S([]), [h, R] = S(!0), [V, Q] = S(!1), [ee, W] = S(null), [X, ce] = S(!1), Y = Ne.useRef(!1), [je, ye] = S({}), [fe, Se] = S({}), pe = m != null && m.reviewPageFields && m.reviewPageFields.length > 0 ? m.reviewPageFields[0] : null, M = !!(m != null && m.reviewPageDisabled), E = ue(!1);
|
|
10416
10416
|
E.current = M;
|
|
10417
10417
|
const F = yi({
|
|
10418
10418
|
defaultValues: {
|
|
@@ -10522,9 +10522,9 @@ const ya = ({
|
|
|
10522
10522
|
if (xe) {
|
|
10523
10523
|
console.log("[Sumsub] Fetching access token for Web SDK…"), W(null), (async () => {
|
|
10524
10524
|
try {
|
|
10525
|
-
const j = await
|
|
10526
|
-
$.accessToken = j, $.onTokenRefresh = () =>
|
|
10527
|
-
const K =
|
|
10525
|
+
const j = await o.refreshSumsubToken(e), $ = tt.parseProviderConfig(y, w, p);
|
|
10526
|
+
$.accessToken = j, $.onTokenRefresh = () => o.refreshSumsubToken(e);
|
|
10527
|
+
const K = tt.createProvider(y, $);
|
|
10528
10528
|
K.onComplete((te) => {
|
|
10529
10529
|
console.log("[Sumsub] Verification complete:", te), t == null || t();
|
|
10530
10530
|
}), K.onError((te) => {
|
|
@@ -10542,8 +10542,8 @@ const ya = ({
|
|
|
10542
10542
|
if (new URL(w.url), k === qe.SardinAI) {
|
|
10543
10543
|
console.log("[SardinAI] Initializing Risk SDK in background...");
|
|
10544
10544
|
try {
|
|
10545
|
-
const j =
|
|
10546
|
-
|
|
10545
|
+
const j = tt.parseProviderConfig(y, w, p);
|
|
10546
|
+
tt.createProvider(y, j).initialize().then(() => console.log("[SardinAI] Risk SDK initialized in background")).catch((K) => console.warn("[SardinAI] Risk SDK init failed (non-blocking):", K));
|
|
10547
10547
|
} catch (j) {
|
|
10548
10548
|
console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", j);
|
|
10549
10549
|
}
|
|
@@ -10557,7 +10557,7 @@ const ya = ({
|
|
|
10557
10557
|
if (k === qe.SardinAI) {
|
|
10558
10558
|
console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), W(null);
|
|
10559
10559
|
try {
|
|
10560
|
-
const j =
|
|
10560
|
+
const j = tt.parseProviderConfig(y, w, p), $ = tt.createProvider(y, j);
|
|
10561
10561
|
$.initialize().then(() => {
|
|
10562
10562
|
console.log("[SardinAI] Risk SDK initialized successfully"), P($), setTimeout(() => t == null ? void 0 : t(), 2e3);
|
|
10563
10563
|
}).catch((K) => {
|
|
@@ -10573,7 +10573,7 @@ const ya = ({
|
|
|
10573
10573
|
}
|
|
10574
10574
|
try {
|
|
10575
10575
|
W(null);
|
|
10576
|
-
const j =
|
|
10576
|
+
const j = tt.parseProviderConfig(y, w, p), $ = tt.createProvider(y, j);
|
|
10577
10577
|
k === qe.Onfido && $.initialize("identity-container").catch((K) => {
|
|
10578
10578
|
console.error("[Onfido] Initialization error:", K), W(r("identity.failedToInitialize", { message: K.message }));
|
|
10579
10579
|
}), P($);
|
|
@@ -10589,7 +10589,7 @@ const ya = ({
|
|
|
10589
10589
|
console.error("[Identity] Error destroying provider:", k);
|
|
10590
10590
|
}
|
|
10591
10591
|
};
|
|
10592
|
-
}, [y, w, T, V, t, X, xe, e, p,
|
|
10592
|
+
}, [y, w, T, V, t, X, xe, e, p, o]);
|
|
10593
10593
|
const de = async () => {
|
|
10594
10594
|
try {
|
|
10595
10595
|
W(null), ce(!1), await C(), Q(!0);
|
|
@@ -10604,24 +10604,24 @@ const ya = ({
|
|
|
10604
10604
|
}
|
|
10605
10605
|
};
|
|
10606
10606
|
if (h || z)
|
|
10607
|
-
return /* @__PURE__ */ i(ne, { children: /* @__PURE__ */
|
|
10607
|
+
return /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
|
|
10608
10608
|
/* @__PURE__ */ i(Be, { className: "my-8" }),
|
|
10609
10609
|
/* @__PURE__ */ i("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: r("identity.loadingIdentity") })
|
|
10610
10610
|
] }) });
|
|
10611
10611
|
if (L)
|
|
10612
|
-
return /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */
|
|
10612
|
+
return /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("p", { className: "text-danger-500", children: [
|
|
10613
10613
|
"Error: ",
|
|
10614
10614
|
L.message
|
|
10615
10615
|
] }) }) });
|
|
10616
10616
|
const _ = M ? a : () => Q(!1);
|
|
10617
10617
|
if (V && (ee || X))
|
|
10618
|
-
return /* @__PURE__ */
|
|
10618
|
+
return /* @__PURE__ */ s(ne, { children: [
|
|
10619
10619
|
/* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: r("identity.sessionIssueTitle") }) }),
|
|
10620
|
-
/* @__PURE__ */
|
|
10620
|
+
/* @__PURE__ */ s(oe, { children: [
|
|
10621
10621
|
/* @__PURE__ */ i("div", { className: "p-4 rounded-lg mb-6", style: {
|
|
10622
10622
|
backgroundColor: "var(--metakyc-danger-bg, color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent))",
|
|
10623
10623
|
border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 30%, transparent)"
|
|
10624
|
-
}, children: /* @__PURE__ */
|
|
10624
|
+
}, children: /* @__PURE__ */ s("div", { className: "flex items-start", children: [
|
|
10625
10625
|
/* @__PURE__ */ i(
|
|
10626
10626
|
"svg",
|
|
10627
10627
|
{
|
|
@@ -10641,44 +10641,44 @@ const ya = ({
|
|
|
10641
10641
|
)
|
|
10642
10642
|
}
|
|
10643
10643
|
),
|
|
10644
|
-
/* @__PURE__ */
|
|
10644
|
+
/* @__PURE__ */ s("div", { children: [
|
|
10645
10645
|
/* @__PURE__ */ i("h3", { className: "font-semibold mb-1", style: { color: "var(--metakyc-danger, #ef4444)" }, children: r(X ? "identity.sessionExpiredTitle" : "identity.verificationError") }),
|
|
10646
10646
|
/* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: ee || r("identity.sessionExpiredMessage") })
|
|
10647
10647
|
] })
|
|
10648
10648
|
] }) }),
|
|
10649
|
-
/* @__PURE__ */
|
|
10649
|
+
/* @__PURE__ */ s("div", { className: "rounded-lg p-4", style: {
|
|
10650
10650
|
backgroundColor: "var(--metakyc-info-bg, color-mix(in srgb, var(--metakyc-primary, #2563eb) 10%, transparent))",
|
|
10651
10651
|
border: "1px solid color-mix(in srgb, var(--metakyc-primary, #2563eb) 30%, transparent)"
|
|
10652
10652
|
}, children: [
|
|
10653
10653
|
/* @__PURE__ */ i("h3", { className: "font-semibold mb-2", style: { color: "var(--metakyc-primary, #2563eb)" }, children: r("identity.whatToDoNext") }),
|
|
10654
|
-
/* @__PURE__ */
|
|
10654
|
+
/* @__PURE__ */ s("ul", { className: "text-sm space-y-1 list-disc list-inside", style: { color: "var(--metakyc-primary, #2563eb)" }, children: [
|
|
10655
10655
|
/* @__PURE__ */ i("li", { children: r("identity.clickRestart") }),
|
|
10656
10656
|
/* @__PURE__ */ i("li", { children: r("identity.completeWithoutDelays") }),
|
|
10657
10657
|
/* @__PURE__ */ i("li", { children: r("identity.ifIssuesPersist") })
|
|
10658
10658
|
] })
|
|
10659
10659
|
] })
|
|
10660
10660
|
] }),
|
|
10661
|
-
/* @__PURE__ */
|
|
10661
|
+
/* @__PURE__ */ s(Re, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
10662
10662
|
_ && /* @__PURE__ */ i(Z, { type: "button", variant: "outline", onClick: _, children: r("common.back") }),
|
|
10663
10663
|
/* @__PURE__ */ i(Z, { type: "button", onClick: D, disabled: z, children: r(z ? "identity.restarting" : "identity.restartVerification") })
|
|
10664
10664
|
] })
|
|
10665
10665
|
] });
|
|
10666
10666
|
if (V && d) {
|
|
10667
10667
|
const k = y;
|
|
10668
|
-
return xe ? /* @__PURE__ */
|
|
10668
|
+
return xe ? /* @__PURE__ */ s("div", { style: {
|
|
10669
10669
|
background: "var(--metakyc-background, #ffffff)",
|
|
10670
10670
|
borderRadius: "12px",
|
|
10671
10671
|
border: "1px solid var(--metakyc-border, #e5e7eb)",
|
|
10672
10672
|
overflow: "hidden"
|
|
10673
10673
|
}, children: [
|
|
10674
|
-
/* @__PURE__ */
|
|
10674
|
+
/* @__PURE__ */ s("div", { style: {
|
|
10675
10675
|
display: "flex",
|
|
10676
10676
|
alignItems: "center",
|
|
10677
10677
|
justifyContent: "space-between",
|
|
10678
10678
|
padding: "20px 24px",
|
|
10679
10679
|
borderBottom: "1px solid var(--metakyc-border, #e5e7eb)"
|
|
10680
10680
|
}, children: [
|
|
10681
|
-
/* @__PURE__ */
|
|
10681
|
+
/* @__PURE__ */ s("div", { children: [
|
|
10682
10682
|
/* @__PURE__ */ i("h2", { style: {
|
|
10683
10683
|
margin: 0,
|
|
10684
10684
|
fontSize: "20px",
|
|
@@ -10728,9 +10728,9 @@ const ya = ({
|
|
|
10728
10728
|
padding: "16px 24px",
|
|
10729
10729
|
borderTop: "1px solid var(--metakyc-border, #e5e7eb)"
|
|
10730
10730
|
}, children: /* @__PURE__ */ i(Z, { variant: "outline", onClick: _, children: r("common.back") }) })
|
|
10731
|
-
] }) : w != null && w.url ? /* @__PURE__ */
|
|
10732
|
-
/* @__PURE__ */ i(Te, { children: /* @__PURE__ */
|
|
10733
|
-
/* @__PURE__ */
|
|
10731
|
+
] }) : w != null && w.url ? /* @__PURE__ */ s(ne, { children: [
|
|
10732
|
+
/* @__PURE__ */ i(Te, { children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
10733
|
+
/* @__PURE__ */ s("div", { children: [
|
|
10734
10734
|
/* @__PURE__ */ i("h2", { className: "text-2xl font-bold", children: r("identity.title") }),
|
|
10735
10735
|
/* @__PURE__ */ i("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: r("identity.subtitle") })
|
|
10736
10736
|
] }),
|
|
@@ -10746,7 +10746,7 @@ const ya = ({
|
|
|
10746
10746
|
}
|
|
10747
10747
|
)
|
|
10748
10748
|
] }) }),
|
|
10749
|
-
/* @__PURE__ */
|
|
10749
|
+
/* @__PURE__ */ s(oe, { children: [
|
|
10750
10750
|
/* @__PURE__ */ i("div", { className: "mb-4 p-3 rounded-lg", style: {
|
|
10751
10751
|
backgroundColor: "var(--metakyc-warning-bg, color-mix(in srgb, var(--metakyc-warning, #f59e0b) 10%, transparent))",
|
|
10752
10752
|
border: "1px solid color-mix(in srgb, var(--metakyc-warning, #f59e0b) 30%, transparent)"
|
|
@@ -10775,18 +10775,18 @@ const ya = ({
|
|
|
10775
10775
|
) })
|
|
10776
10776
|
] }),
|
|
10777
10777
|
_ && /* @__PURE__ */ i(Re, { children: /* @__PURE__ */ i(Z, { variant: "outline", onClick: _, children: r("common.back") }) })
|
|
10778
|
-
] }) : k === qe.SardinAI ? /* @__PURE__ */
|
|
10779
|
-
/* @__PURE__ */
|
|
10778
|
+
] }) : k === qe.SardinAI ? /* @__PURE__ */ s(ne, { children: [
|
|
10779
|
+
/* @__PURE__ */ s(Te, { children: [
|
|
10780
10780
|
/* @__PURE__ */ i("h2", { className: "text-2xl font-bold", children: r("identity.deviceRiskAssessment") }),
|
|
10781
10781
|
/* @__PURE__ */ i("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: r("identity.analyzingDevice") })
|
|
10782
10782
|
] }),
|
|
10783
|
-
/* @__PURE__ */ i(oe, { children: /* @__PURE__ */
|
|
10783
|
+
/* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { className: "text-center py-12", children: [
|
|
10784
10784
|
/* @__PURE__ */ i(Be, { className: "mb-4" }),
|
|
10785
10785
|
/* @__PURE__ */ i("p", { className: "text-gray-600 dark:text-gray-400", children: r("identity.pleaseWaitDevice") }),
|
|
10786
10786
|
/* @__PURE__ */ i("p", { className: "text-sm text-gray-500 dark:text-gray-500 mt-2", children: r("identity.automaticProcess") })
|
|
10787
10787
|
] }) })
|
|
10788
|
-
] }) : /* @__PURE__ */
|
|
10789
|
-
/* @__PURE__ */
|
|
10788
|
+
] }) : /* @__PURE__ */ s(ne, { children: [
|
|
10789
|
+
/* @__PURE__ */ s(Te, { children: [
|
|
10790
10790
|
/* @__PURE__ */ i("h2", { className: "text-2xl font-bold", children: r("identity.title") }),
|
|
10791
10791
|
/* @__PURE__ */ i("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: r("identity.subtitle") })
|
|
10792
10792
|
] }),
|
|
@@ -10804,9 +10804,9 @@ const ya = ({
|
|
|
10804
10804
|
return $ ? $.label : String(j);
|
|
10805
10805
|
}
|
|
10806
10806
|
return String(j);
|
|
10807
|
-
},
|
|
10807
|
+
}, rt = ({ helpText: k }) => {
|
|
10808
10808
|
const [j, $] = S(!1), K = ue(null), [, te] = S({ top: 0, left: 0 });
|
|
10809
|
-
return /* @__PURE__ */
|
|
10809
|
+
return /* @__PURE__ */ s(pt, { children: [
|
|
10810
10810
|
/* @__PURE__ */ i(
|
|
10811
10811
|
"button",
|
|
10812
10812
|
{
|
|
@@ -10857,7 +10857,7 @@ const ya = ({
|
|
|
10857
10857
|
justifyContent: "center"
|
|
10858
10858
|
},
|
|
10859
10859
|
onClick: () => $(!1),
|
|
10860
|
-
children: /* @__PURE__ */
|
|
10860
|
+
children: /* @__PURE__ */ s(
|
|
10861
10861
|
"div",
|
|
10862
10862
|
{
|
|
10863
10863
|
onClick: (I) => I.stopPropagation(),
|
|
@@ -10898,10 +10898,10 @@ const ya = ({
|
|
|
10898
10898
|
document.body
|
|
10899
10899
|
)
|
|
10900
10900
|
] });
|
|
10901
|
-
}, Ae = (k, j) => j ? /* @__PURE__ */
|
|
10901
|
+
}, Ae = (k, j) => j ? /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "flex-start", gap: 5, flexWrap: "nowrap" }, children: [
|
|
10902
10902
|
/* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0 }, children: k }),
|
|
10903
|
-
/* @__PURE__ */ i("div", { style: { paddingTop: 24 }, children: /* @__PURE__ */ i(
|
|
10904
|
-
] }) : k,
|
|
10903
|
+
/* @__PURE__ */ i("div", { style: { paddingTop: 24 }, children: /* @__PURE__ */ i(rt, { helpText: j }) })
|
|
10904
|
+
] }) : k, Ye = (k, j) => {
|
|
10905
10905
|
const $ = `cf-${j}`, K = k.paramName ?? "", te = fe[K];
|
|
10906
10906
|
if (k.customType === "br")
|
|
10907
10907
|
return /* @__PURE__ */ i("div", { style: { ...le(k.colSpan), minHeight: "0.5rem" } }, $);
|
|
@@ -10941,7 +10941,7 @@ const ya = ({
|
|
|
10941
10941
|
if (k.customType === "checkbox" || k.customType === "link_checkbox") {
|
|
10942
10942
|
const g = te === "true" || te === !0;
|
|
10943
10943
|
return /* @__PURE__ */ i("div", { style: le(k.colSpan), children: Ae(
|
|
10944
|
-
/* @__PURE__ */
|
|
10944
|
+
/* @__PURE__ */ s("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
|
|
10945
10945
|
/* @__PURE__ */ i(
|
|
10946
10946
|
We,
|
|
10947
10947
|
{
|
|
@@ -10950,7 +10950,7 @@ const ya = ({
|
|
|
10950
10950
|
style: { marginTop: 2 }
|
|
10951
10951
|
}
|
|
10952
10952
|
),
|
|
10953
|
-
/* @__PURE__ */ i("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: k.customType === "link_checkbox" && k.linkUrl ? /* @__PURE__ */
|
|
10953
|
+
/* @__PURE__ */ i("span", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)" }, children: k.customType === "link_checkbox" && k.linkUrl ? /* @__PURE__ */ s(pt, { children: [
|
|
10954
10954
|
/* @__PURE__ */ i("a", { href: k.linkUrl, target: "_blank", rel: "noopener noreferrer", style: { color: "var(--metakyc-primary, #6366f1)", textDecoration: "underline" }, children: k.linkText || G(k.label, r) }),
|
|
10955
10955
|
k.label && k.linkText ? ` ${G(k.label, r)}` : ""
|
|
10956
10956
|
] }) : G(k.displayText, r) || G(k.label, r) })
|
|
@@ -10966,9 +10966,9 @@ const ya = ({
|
|
|
10966
10966
|
}));
|
|
10967
10967
|
};
|
|
10968
10968
|
return /* @__PURE__ */ i("div", { style: le(k.colSpan), children: Ae(
|
|
10969
|
-
/* @__PURE__ */
|
|
10969
|
+
/* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
|
|
10970
10970
|
k.label && /* @__PURE__ */ i("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: G(k.displayText, r) || G(k.label, r) }),
|
|
10971
|
-
(k.options || []).map((b) => /* @__PURE__ */
|
|
10971
|
+
(k.options || []).map((b) => /* @__PURE__ */ s("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
|
|
10972
10972
|
/* @__PURE__ */ i(
|
|
10973
10973
|
We,
|
|
10974
10974
|
{
|
|
@@ -10984,9 +10984,9 @@ const ya = ({
|
|
|
10984
10984
|
) }, $);
|
|
10985
10985
|
}
|
|
10986
10986
|
return k.customType === "radio_group" ? /* @__PURE__ */ i("div", { style: le(k.colSpan), children: Ae(
|
|
10987
|
-
/* @__PURE__ */
|
|
10987
|
+
/* @__PURE__ */ s("div", { className: "space-y-1.5", children: [
|
|
10988
10988
|
k.label && /* @__PURE__ */ i("p", { className: "text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: G(k.displayText, r) || G(k.label, r) }),
|
|
10989
|
-
(k.options || []).map((g) => /* @__PURE__ */
|
|
10989
|
+
(k.options || []).map((g) => /* @__PURE__ */ s("label", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer" }, children: [
|
|
10990
10990
|
/* @__PURE__ */ i(
|
|
10991
10991
|
"input",
|
|
10992
10992
|
{
|
|
@@ -11013,12 +11013,12 @@ const ya = ({
|
|
|
11013
11013
|
),
|
|
11014
11014
|
k.helpText
|
|
11015
11015
|
) }, $);
|
|
11016
|
-
},
|
|
11017
|
-
if (k.isCustom) return
|
|
11018
|
-
const $ = k.name ?? "", K =
|
|
11016
|
+
}, ct = (k, j) => {
|
|
11017
|
+
if (k.isCustom) return Ye(k, j);
|
|
11018
|
+
const $ = k.name ?? "", K = lt[$], te = G(k.displayText, r) || (K != null && K.translationKey ? r(`fields.${K.translationKey}`) : void 0) || (K == null ? void 0 : K.label) || $, g = je[$] ?? "", I = $ === "mobileCountryCode", b = !!(K != null && K.countriesType) && !I;
|
|
11019
11019
|
return k.editable ? I ? /* @__PURE__ */ i("div", { style: le(k.colSpan ?? 2), children: Ae(
|
|
11020
11020
|
/* @__PURE__ */ i(
|
|
11021
|
-
|
|
11021
|
+
Xe,
|
|
11022
11022
|
{
|
|
11023
11023
|
label: te,
|
|
11024
11024
|
value: String(g),
|
|
@@ -11029,7 +11029,7 @@ const ya = ({
|
|
|
11029
11029
|
k.helpText
|
|
11030
11030
|
) }, `epc-${j}`) : b ? /* @__PURE__ */ i("div", { style: le(k.colSpan ?? 2), children: Ae(
|
|
11031
11031
|
/* @__PURE__ */ i(
|
|
11032
|
-
|
|
11032
|
+
Xe,
|
|
11033
11033
|
{
|
|
11034
11034
|
label: te,
|
|
11035
11035
|
value: String(g),
|
|
@@ -11050,7 +11050,7 @@ const ya = ({
|
|
|
11050
11050
|
),
|
|
11051
11051
|
k.helpText
|
|
11052
11052
|
) }, `ei-${j}`) : /* @__PURE__ */ i("div", { style: le(k.colSpan ?? 2), children: Ae(
|
|
11053
|
-
/* @__PURE__ */
|
|
11053
|
+
/* @__PURE__ */ s(pt, { children: [
|
|
11054
11054
|
/* @__PURE__ */ i("label", { className: "block text-sm font-medium mb-0.5", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: te }),
|
|
11055
11055
|
/* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-text-primary, #111827)", minHeight: "1.5rem" }, children: ze($, g) })
|
|
11056
11056
|
] }),
|
|
@@ -11061,42 +11061,42 @@ const ya = ({
|
|
|
11061
11061
|
const k = G(pe.title, r) || r("identity.reviewYourInformation"), j = G(pe.subtitle, r) || r("identity.reviewSubtitle");
|
|
11062
11062
|
return /* @__PURE__ */ i("form", { onSubmit: ($) => {
|
|
11063
11063
|
$.preventDefault(), de();
|
|
11064
|
-
}, children: /* @__PURE__ */
|
|
11065
|
-
/* @__PURE__ */
|
|
11064
|
+
}, children: /* @__PURE__ */ s(ne, { children: [
|
|
11065
|
+
/* @__PURE__ */ s(Te, { children: [
|
|
11066
11066
|
/* @__PURE__ */ i("h2", { className: "text-lg font-bold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: k }),
|
|
11067
11067
|
j && /* @__PURE__ */ i("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: j })
|
|
11068
11068
|
] }),
|
|
11069
|
-
/* @__PURE__ */ i(oe, { children: /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: pe.fields.map(($, K) =>
|
|
11070
|
-
/* @__PURE__ */
|
|
11069
|
+
/* @__PURE__ */ i(oe, { children: /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: pe.fields.map(($, K) => ct($, K)) }) }),
|
|
11070
|
+
/* @__PURE__ */ s(Re, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
11071
11071
|
a && /* @__PURE__ */ i(Z, { type: "button", variant: "outline", onClick: a, children: r("common.back") }),
|
|
11072
11072
|
/* @__PURE__ */ i(Z, { type: "submit", isLoading: z, children: r("identity.confirmAndStart") })
|
|
11073
11073
|
] })
|
|
11074
11074
|
] }) });
|
|
11075
11075
|
}
|
|
11076
|
-
return /* @__PURE__ */ i("form", { onSubmit: F.handleSubmit(de), children: /* @__PURE__ */
|
|
11077
|
-
/* @__PURE__ */
|
|
11076
|
+
return /* @__PURE__ */ i("form", { onSubmit: F.handleSubmit(de), children: /* @__PURE__ */ s(ne, { children: [
|
|
11077
|
+
/* @__PURE__ */ s(Te, { children: [
|
|
11078
11078
|
/* @__PURE__ */ i("h2", { className: "text-lg font-bold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: r("identity.reviewYourInformation") }),
|
|
11079
11079
|
/* @__PURE__ */ i("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r("identity.reviewSubtitle") })
|
|
11080
11080
|
] }),
|
|
11081
|
-
/* @__PURE__ */
|
|
11081
|
+
/* @__PURE__ */ s(oe, { className: "space-y-6", children: [
|
|
11082
11082
|
/* @__PURE__ */ i("div", { className: "space-y-4 pb-4", style: { borderBottom: "1px solid var(--metakyc-border, #e5e7eb)" }, children: [
|
|
11083
|
-
{ label: r("fields.name"), value: `${((
|
|
11084
|
-
{ label: r("fields.email"), value: (
|
|
11085
|
-
{ label: r("fields.dateOfBirth"), value: ((
|
|
11086
|
-
].map(({ label: k, value: j }) => /* @__PURE__ */
|
|
11083
|
+
{ label: r("fields.name"), value: `${((at = B == null ? void 0 : B.applicantRequestData) == null ? void 0 : at.firstName) || ""} ${((He = B == null ? void 0 : B.applicantRequestData) == null ? void 0 : He.lastName) || ""}`.trim() },
|
|
11084
|
+
{ label: r("fields.email"), value: (dt = B == null ? void 0 : B.applicantRequestData) == null ? void 0 : dt.email },
|
|
11085
|
+
{ label: r("fields.dateOfBirth"), value: ((Je = B == null ? void 0 : B.applicantRequestData) == null ? void 0 : Je.dateOfBirth) || r("fields.notProvided") }
|
|
11086
|
+
].map(({ label: k, value: j }) => /* @__PURE__ */ s("div", { children: [
|
|
11087
11087
|
/* @__PURE__ */ i("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: k }),
|
|
11088
11088
|
/* @__PURE__ */ i("p", { className: "mt-1 text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children: j })
|
|
11089
11089
|
] }, k)) }),
|
|
11090
|
-
/* @__PURE__ */
|
|
11090
|
+
/* @__PURE__ */ s("div", { className: "space-y-4", children: [
|
|
11091
11091
|
/* @__PURE__ */ i("h3", { className: "text-base font-semibold", style: { color: "var(--metakyc-text-primary, #111827)" }, children: r("fields.addressInformation") }),
|
|
11092
|
-
/* @__PURE__ */
|
|
11092
|
+
/* @__PURE__ */ s("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
11093
11093
|
/* @__PURE__ */ i(
|
|
11094
|
-
|
|
11094
|
+
ot,
|
|
11095
11095
|
{
|
|
11096
11096
|
control: F.control,
|
|
11097
11097
|
name: "country",
|
|
11098
11098
|
render: ({ field: k }) => /* @__PURE__ */ i(
|
|
11099
|
-
|
|
11099
|
+
Xe,
|
|
11100
11100
|
{
|
|
11101
11101
|
label: r("fields.country"),
|
|
11102
11102
|
value: k.value,
|
|
@@ -11107,12 +11107,12 @@ const ya = ({
|
|
|
11107
11107
|
}
|
|
11108
11108
|
),
|
|
11109
11109
|
/* @__PURE__ */ i(
|
|
11110
|
-
|
|
11110
|
+
ot,
|
|
11111
11111
|
{
|
|
11112
11112
|
control: F.control,
|
|
11113
11113
|
name: "nationality",
|
|
11114
11114
|
render: ({ field: k }) => /* @__PURE__ */ i(
|
|
11115
|
-
|
|
11115
|
+
Xe,
|
|
11116
11116
|
{
|
|
11117
11117
|
label: r("fields.nationality"),
|
|
11118
11118
|
value: k.value,
|
|
@@ -11123,45 +11123,45 @@ const ya = ({
|
|
|
11123
11123
|
}
|
|
11124
11124
|
)
|
|
11125
11125
|
] }),
|
|
11126
|
-
/* @__PURE__ */
|
|
11127
|
-
/* @__PURE__ */ i(
|
|
11128
|
-
/* @__PURE__ */ i(
|
|
11126
|
+
/* @__PURE__ */ s("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
11127
|
+
/* @__PURE__ */ i(ot, { control: F.control, name: "street", render: ({ field: k }) => /* @__PURE__ */ i(Ce, { ...k, label: r("fields.street") }) }),
|
|
11128
|
+
/* @__PURE__ */ i(ot, { control: F.control, name: "streetNumber", render: ({ field: k }) => /* @__PURE__ */ i(Ce, { ...k, label: r("fields.streetNumber") }) })
|
|
11129
11129
|
] }),
|
|
11130
|
-
/* @__PURE__ */
|
|
11131
|
-
/* @__PURE__ */ i(
|
|
11132
|
-
/* @__PURE__ */ i(
|
|
11130
|
+
/* @__PURE__ */ s("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
11131
|
+
/* @__PURE__ */ i(ot, { control: F.control, name: "city", render: ({ field: k }) => /* @__PURE__ */ i(Ce, { ...k, label: r("fields.city") }) }),
|
|
11132
|
+
/* @__PURE__ */ i(ot, { control: F.control, name: "zip", render: ({ field: k }) => /* @__PURE__ */ i(Ce, { ...k, label: r("fields.zip") }) })
|
|
11133
11133
|
] }),
|
|
11134
|
-
/* @__PURE__ */ i(
|
|
11134
|
+
/* @__PURE__ */ i(ot, { control: F.control, name: "phonenumber", render: ({ field: k }) => /* @__PURE__ */ i(Ce, { ...k, label: r("fields.phoneNumber"), type: "tel" }) })
|
|
11135
11135
|
] })
|
|
11136
11136
|
] }),
|
|
11137
|
-
/* @__PURE__ */
|
|
11137
|
+
/* @__PURE__ */ s(Re, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
11138
11138
|
a && /* @__PURE__ */ i(Z, { type: "button", variant: "outline", onClick: a, children: r("common.back") }),
|
|
11139
11139
|
/* @__PURE__ */ i(Z, { type: "submit", isLoading: z, children: r("identity.confirmAndStart") })
|
|
11140
11140
|
] })
|
|
11141
11141
|
] }) });
|
|
11142
|
-
},
|
|
11142
|
+
}, Pt = {
|
|
11143
11143
|
success: { color: "--metakyc-success", fallback: "#22c55e", bgVar: "--metakyc-success-bg" },
|
|
11144
11144
|
error: { color: "--metakyc-danger", fallback: "#ef4444", bgVar: "--metakyc-danger-bg" },
|
|
11145
11145
|
pending: { color: "--metakyc-warning", fallback: "#f59e0b", bgVar: "--metakyc-warning-bg" }
|
|
11146
11146
|
};
|
|
11147
|
-
function
|
|
11148
|
-
const { color: t, fallback: a, bgVar: r } =
|
|
11147
|
+
function Tt(e) {
|
|
11148
|
+
const { color: t, fallback: a, bgVar: r } = Pt[e];
|
|
11149
11149
|
return {
|
|
11150
11150
|
backgroundColor: `var(${r}, color-mix(in srgb, var(${t}, ${a}) 10%, transparent))`,
|
|
11151
11151
|
border: `1px solid color-mix(in srgb, var(${t}, ${a}) 30%, transparent)`
|
|
11152
11152
|
};
|
|
11153
11153
|
}
|
|
11154
|
-
function
|
|
11155
|
-
const { color: t, fallback: a } =
|
|
11154
|
+
function st(e) {
|
|
11155
|
+
const { color: t, fallback: a } = Pt[e];
|
|
11156
11156
|
return { color: `var(${t}, ${a})` };
|
|
11157
11157
|
}
|
|
11158
11158
|
function ha(e) {
|
|
11159
|
-
const { color: t, fallback: a } =
|
|
11159
|
+
const { color: t, fallback: a } = Pt[e];
|
|
11160
11160
|
return {
|
|
11161
11161
|
backgroundColor: `color-mix(in srgb, var(${t}, ${a}) 15%, transparent)`
|
|
11162
11162
|
};
|
|
11163
11163
|
}
|
|
11164
|
-
const
|
|
11164
|
+
const _t = ({
|
|
11165
11165
|
kycStatus: e,
|
|
11166
11166
|
reviewStatus: t,
|
|
11167
11167
|
workflowResult: a,
|
|
@@ -11169,15 +11169,15 @@ const Gt = ({
|
|
|
11169
11169
|
onContinue: n,
|
|
11170
11170
|
onContactSupport: l
|
|
11171
11171
|
}) => {
|
|
11172
|
-
const { t:
|
|
11173
|
-
return /* @__PURE__ */
|
|
11174
|
-
/* @__PURE__ */
|
|
11172
|
+
const { t: o } = Ie(), m = t === Ke.Approved ? { type: "success", title: o("status.applicationApproved"), icon: "✓", message: o("status.applicationApprovedMsg") } : t === Ke.Reject ? { type: "error", title: o("status.applicationRejected"), icon: "✕", message: o("status.applicationRejectedMsg") } : t === Ke.UnderReview ? { type: "pending", title: o("status.underReview"), icon: "📋", message: o("status.underReviewMsg") } : t === Ke.AdminReview ? { type: "pending", title: o("status.adminReviewRequired"), icon: "📋", message: o("status.adminReviewRequiredMsg") } : t === Ke.Closed ? { type: "error", title: o("status.applicationRejected"), icon: "✕", message: o("status.applicationRejectedMsg") } : t === Ke.InProgress ? { type: "pending", title: o("status.verificationPending"), icon: "⏱", message: o("status.verificationPendingMsg") } : t === Ke.New ? { type: "pending", title: o("status.processing"), icon: "⏱", message: o("status.processingMsg") } : a === xt.Success ? { type: "success", title: o("status.processComplete"), icon: "✓", message: o("status.processCompleteMsg") } : a === xt.Failed ? { type: "error", title: o("status.processFailed"), icon: "✕", message: o("status.processFailedMsg") } : a === xt.AdminReview ? { type: "pending", title: o("status.adminReviewRequired"), icon: "📋", message: o("status.adminReviewRequiredMsg") } : { type: "pending", title: o("status.processing"), icon: "⏱", message: o("status.processingMsg") };
|
|
11173
|
+
return /* @__PURE__ */ s(ne, { children: [
|
|
11174
|
+
/* @__PURE__ */ s(oe, { className: "py-12", children: [
|
|
11175
11175
|
/* @__PURE__ */ i("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ i(
|
|
11176
11176
|
"div",
|
|
11177
11177
|
{
|
|
11178
11178
|
className: "w-24 h-24 rounded-full flex items-center justify-center",
|
|
11179
11179
|
style: ha(m.type),
|
|
11180
|
-
children: /* @__PURE__ */ i("span", { className: "text-5xl", style:
|
|
11180
|
+
children: /* @__PURE__ */ i("span", { className: "text-5xl", style: st(m.type), children: m.icon })
|
|
11181
11181
|
}
|
|
11182
11182
|
) }),
|
|
11183
11183
|
/* @__PURE__ */ i("h2", { className: "text-3xl font-bold text-center mb-4", style: { color: "var(--metakyc-text-primary, #111827)" }, children: m.title }),
|
|
@@ -11185,79 +11185,79 @@ const Gt = ({
|
|
|
11185
11185
|
oi,
|
|
11186
11186
|
{
|
|
11187
11187
|
variant: m.type === "success" ? "success" : m.type === "error" ? "danger" : "warning",
|
|
11188
|
-
children:
|
|
11188
|
+
children: Ke[t]
|
|
11189
11189
|
}
|
|
11190
11190
|
) }),
|
|
11191
11191
|
/* @__PURE__ */ i("p", { className: "text-center mb-6 max-w-md mx-auto", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r || m.message }),
|
|
11192
|
-
m.type === "success" && /* @__PURE__ */
|
|
11193
|
-
/* @__PURE__ */ i("h3", { className: "font-semibold mb-2", style:
|
|
11194
|
-
/* @__PURE__ */
|
|
11195
|
-
/* @__PURE__ */
|
|
11192
|
+
m.type === "success" && /* @__PURE__ */ s("div", { className: "rounded-lg p-4 mb-6", style: Tt("success"), children: [
|
|
11193
|
+
/* @__PURE__ */ i("h3", { className: "font-semibold mb-2", style: st("success"), children: o("status.whatsNext") }),
|
|
11194
|
+
/* @__PURE__ */ s("ul", { className: "text-sm space-y-1", style: st("success"), children: [
|
|
11195
|
+
/* @__PURE__ */ s("li", { children: [
|
|
11196
11196
|
"✓ ",
|
|
11197
|
-
|
|
11197
|
+
o("status.identityVerified")
|
|
11198
11198
|
] }),
|
|
11199
|
-
/* @__PURE__ */
|
|
11199
|
+
/* @__PURE__ */ s("li", { children: [
|
|
11200
11200
|
"✓ ",
|
|
11201
|
-
|
|
11201
|
+
o("status.canProceed")
|
|
11202
11202
|
] }),
|
|
11203
|
-
/* @__PURE__ */
|
|
11203
|
+
/* @__PURE__ */ s("li", { children: [
|
|
11204
11204
|
"✓ ",
|
|
11205
|
-
|
|
11205
|
+
o("status.allFeaturesAccessible")
|
|
11206
11206
|
] })
|
|
11207
11207
|
] })
|
|
11208
11208
|
] }),
|
|
11209
|
-
m.type === "error" && /* @__PURE__ */
|
|
11210
|
-
/* @__PURE__ */ i("h3", { className: "font-semibold mb-2", style:
|
|
11211
|
-
/* @__PURE__ */
|
|
11212
|
-
/* @__PURE__ */
|
|
11209
|
+
m.type === "error" && /* @__PURE__ */ s("div", { className: "rounded-lg p-4 mb-6", style: Tt("error"), children: [
|
|
11210
|
+
/* @__PURE__ */ i("h3", { className: "font-semibold mb-2", style: st("error"), children: o("status.whatCanYouDo") }),
|
|
11211
|
+
/* @__PURE__ */ s("ul", { className: "text-sm space-y-2", style: st("error"), children: [
|
|
11212
|
+
/* @__PURE__ */ s("li", { children: [
|
|
11213
11213
|
"• ",
|
|
11214
|
-
|
|
11214
|
+
o("status.reviewSubmittedInfo")
|
|
11215
11215
|
] }),
|
|
11216
|
-
/* @__PURE__ */
|
|
11216
|
+
/* @__PURE__ */ s("li", { children: [
|
|
11217
11217
|
"• ",
|
|
11218
|
-
|
|
11218
|
+
o("status.contactSupportTeam")
|
|
11219
11219
|
] }),
|
|
11220
|
-
/* @__PURE__ */
|
|
11220
|
+
/* @__PURE__ */ s("li", { children: [
|
|
11221
11221
|
"• ",
|
|
11222
|
-
|
|
11222
|
+
o("status.resubmitIfNeeded")
|
|
11223
11223
|
] })
|
|
11224
11224
|
] })
|
|
11225
11225
|
] }),
|
|
11226
|
-
m.type === "pending" && /* @__PURE__ */
|
|
11227
|
-
/* @__PURE__ */ i("h3", { className: "font-semibold mb-2", style:
|
|
11228
|
-
/* @__PURE__ */
|
|
11229
|
-
/* @__PURE__ */
|
|
11226
|
+
m.type === "pending" && /* @__PURE__ */ s("div", { className: "rounded-lg p-4 mb-6", style: Tt("pending"), children: [
|
|
11227
|
+
/* @__PURE__ */ i("h3", { className: "font-semibold mb-2", style: st("pending"), children: o("status.whatHappensNext") }),
|
|
11228
|
+
/* @__PURE__ */ s("ul", { className: "text-sm space-y-2", style: st("pending"), children: [
|
|
11229
|
+
/* @__PURE__ */ s("li", { children: [
|
|
11230
11230
|
"• ",
|
|
11231
|
-
|
|
11231
|
+
o("status.teamReviewing")
|
|
11232
11232
|
] }),
|
|
11233
|
-
/* @__PURE__ */
|
|
11233
|
+
/* @__PURE__ */ s("li", { children: [
|
|
11234
11234
|
"• ",
|
|
11235
|
-
|
|
11235
|
+
o("status.notifiedByEmail")
|
|
11236
11236
|
] }),
|
|
11237
|
-
/* @__PURE__ */
|
|
11237
|
+
/* @__PURE__ */ s("li", { children: [
|
|
11238
11238
|
"• ",
|
|
11239
|
-
|
|
11239
|
+
o("status.noActionRequired")
|
|
11240
11240
|
] })
|
|
11241
11241
|
] })
|
|
11242
11242
|
] }),
|
|
11243
|
-
/* @__PURE__ */ i("div", { className: "mt-6 pt-6", style: { borderTop: "1px solid var(--metakyc-border, #e5e7eb)" }, children: /* @__PURE__ */
|
|
11244
|
-
/* @__PURE__ */
|
|
11245
|
-
/* @__PURE__ */ i("span", { style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children:
|
|
11246
|
-
/* @__PURE__ */ i("div", { className: "font-medium mt-1", style: { color: "var(--metakyc-text-primary, #111827)" }, children: e != null ?
|
|
11243
|
+
/* @__PURE__ */ i("div", { className: "mt-6 pt-6", style: { borderTop: "1px solid var(--metakyc-border, #e5e7eb)" }, children: /* @__PURE__ */ s("div", { className: "grid grid-cols-2 metakyc-grid-2 gap-4 text-sm", children: [
|
|
11244
|
+
/* @__PURE__ */ s("div", { children: [
|
|
11245
|
+
/* @__PURE__ */ i("span", { style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: o("status.kycStatus") }),
|
|
11246
|
+
/* @__PURE__ */ i("div", { className: "font-medium mt-1", style: { color: "var(--metakyc-text-primary, #111827)" }, children: e != null ? Jt[e] : o("status.notAvailable") })
|
|
11247
11247
|
] }),
|
|
11248
|
-
/* @__PURE__ */
|
|
11249
|
-
/* @__PURE__ */ i("span", { style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children:
|
|
11250
|
-
/* @__PURE__ */ i("div", { className: "font-medium mt-1", style: { color: "var(--metakyc-text-primary, #111827)" }, children:
|
|
11248
|
+
/* @__PURE__ */ s("div", { children: [
|
|
11249
|
+
/* @__PURE__ */ i("span", { style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: o("status.reviewStatus") }),
|
|
11250
|
+
/* @__PURE__ */ i("div", { className: "font-medium mt-1", style: { color: "var(--metakyc-text-primary, #111827)" }, children: Ke[t] })
|
|
11251
11251
|
] })
|
|
11252
11252
|
] }) })
|
|
11253
11253
|
] }),
|
|
11254
|
-
/* @__PURE__ */
|
|
11255
|
-
m.type === "success" && n && /* @__PURE__ */ i(Z, { onClick: n, size: "lg", children:
|
|
11256
|
-
m.type === "error" && /* @__PURE__ */
|
|
11257
|
-
l && /* @__PURE__ */ i(Z, { variant: "outline", onClick: l, children:
|
|
11258
|
-
n && /* @__PURE__ */ i(Z, { onClick: n, children:
|
|
11254
|
+
/* @__PURE__ */ s(Re, { style: { display: "flex", justifyContent: "center", gap: "1rem" }, children: [
|
|
11255
|
+
m.type === "success" && n && /* @__PURE__ */ i(Z, { onClick: n, size: "lg", children: o("common.continue") }),
|
|
11256
|
+
m.type === "error" && /* @__PURE__ */ s(pt, { children: [
|
|
11257
|
+
l && /* @__PURE__ */ i(Z, { variant: "outline", onClick: l, children: o("status.contactSupport") }),
|
|
11258
|
+
n && /* @__PURE__ */ i(Z, { onClick: n, children: o("status.tryAgain") })
|
|
11259
11259
|
] }),
|
|
11260
|
-
m.type === "pending" && /* @__PURE__ */ i("div", { className: "text-center", children: /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children:
|
|
11260
|
+
m.type === "pending" && /* @__PURE__ */ i("div", { className: "text-center", children: /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: o("status.checkBackLater") }) })
|
|
11261
11261
|
] })
|
|
11262
11262
|
] });
|
|
11263
11263
|
}, ba = ({ config: e, className: t = "" }) => {
|
|
@@ -11278,14 +11278,14 @@ const Gt = ({
|
|
|
11278
11278
|
}
|
|
11279
11279
|
}
|
|
11280
11280
|
) });
|
|
11281
|
-
},
|
|
11281
|
+
}, kt = ({
|
|
11282
11282
|
title: e,
|
|
11283
11283
|
subtitle: t,
|
|
11284
11284
|
className: a = ""
|
|
11285
11285
|
}) => {
|
|
11286
|
-
const { currentTheme: r } = Oe(), { t: n } = Ie(), l = e || (r == null ? void 0 : r.title) || "",
|
|
11287
|
-
return !m && !d ? null : /* @__PURE__ */
|
|
11288
|
-
/* @__PURE__ */
|
|
11286
|
+
const { currentTheme: r } = Oe(), { t: n } = Ie(), l = e || (r == null ? void 0 : r.title) || "", o = G(l, n), p = G(t, n), m = !!(r != null && r.logo && r.logo.visible && r.logo.url), d = !!o;
|
|
11287
|
+
return !m && !d ? null : /* @__PURE__ */ s("div", { className: `metakyc-header ${a}`, children: [
|
|
11288
|
+
/* @__PURE__ */ s(
|
|
11289
11289
|
"div",
|
|
11290
11290
|
{
|
|
11291
11291
|
className: "metakyc-header-title flex items-center text-xl font-bold",
|
|
@@ -11299,14 +11299,14 @@ const Gt = ({
|
|
|
11299
11299
|
children: "|"
|
|
11300
11300
|
}
|
|
11301
11301
|
),
|
|
11302
|
-
d && /* @__PURE__ */ i("span", { style: { color: "var(--metakyc-text-primary, #111827)" }, children:
|
|
11302
|
+
d && /* @__PURE__ */ i("span", { style: { color: "var(--metakyc-text-primary, #111827)" }, children: o })
|
|
11303
11303
|
]
|
|
11304
11304
|
}
|
|
11305
11305
|
),
|
|
11306
11306
|
p && /* @__PURE__ */ i("p", { className: "text-sm mt-1", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: p })
|
|
11307
11307
|
] });
|
|
11308
|
-
},
|
|
11309
|
-
function
|
|
11308
|
+
}, bt = ["firstName", "lastName", "email", "phonenumber", "dateOfBirth"];
|
|
11309
|
+
function ut(e) {
|
|
11310
11310
|
return e == null || e === "" || Array.isArray(e) && e.length === 0;
|
|
11311
11311
|
}
|
|
11312
11312
|
const xa = {
|
|
@@ -11321,9 +11321,9 @@ const xa = {
|
|
|
11321
11321
|
padding: 0,
|
|
11322
11322
|
display: "inline-block",
|
|
11323
11323
|
verticalAlign: "middle"
|
|
11324
|
-
},
|
|
11324
|
+
}, Gt = ({ helpText: e, children: t }) => {
|
|
11325
11325
|
const [a, r] = Ne.useState(!1);
|
|
11326
|
-
if (!e) return /* @__PURE__ */ i(
|
|
11326
|
+
if (!e) return /* @__PURE__ */ i(pt, { children: t });
|
|
11327
11327
|
const n = a ? /* @__PURE__ */ i(
|
|
11328
11328
|
"div",
|
|
11329
11329
|
{
|
|
@@ -11342,7 +11342,7 @@ const xa = {
|
|
|
11342
11342
|
justifyContent: "center",
|
|
11343
11343
|
padding: "16px"
|
|
11344
11344
|
},
|
|
11345
|
-
children: /* @__PURE__ */
|
|
11345
|
+
children: /* @__PURE__ */ s(
|
|
11346
11346
|
"div",
|
|
11347
11347
|
{
|
|
11348
11348
|
onClick: (l) => l.stopPropagation(),
|
|
@@ -11401,7 +11401,7 @@ const xa = {
|
|
|
11401
11401
|
)
|
|
11402
11402
|
}
|
|
11403
11403
|
) : null;
|
|
11404
|
-
return /* @__PURE__ */
|
|
11404
|
+
return /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "flex-start", gap: "5px", flexWrap: "nowrap" }, children: [
|
|
11405
11405
|
t,
|
|
11406
11406
|
/* @__PURE__ */ i(
|
|
11407
11407
|
"button",
|
|
@@ -11440,7 +11440,7 @@ const xa = {
|
|
|
11440
11440
|
children: "?"
|
|
11441
11441
|
}
|
|
11442
11442
|
),
|
|
11443
|
-
typeof document < "u" && n ?
|
|
11443
|
+
typeof document < "u" && n ? Lt(n, document.body) : null
|
|
11444
11444
|
] });
|
|
11445
11445
|
}, qa = ({
|
|
11446
11446
|
workflowKey: e,
|
|
@@ -11449,35 +11449,35 @@ const xa = {
|
|
|
11449
11449
|
onCancel: r
|
|
11450
11450
|
}) => {
|
|
11451
11451
|
var $, K, te, g, I, b, u;
|
|
11452
|
-
const { config: n, baseInformationService: l, currentTheme:
|
|
11452
|
+
const { config: n, baseInformationService: l, currentTheme: o } = Oe(), { createApplicant: p, isLoading: m } = ni(), { t: d } = Ie(), y = e || (($ = n.applicantForm) == null ? void 0 : $.workflowKey);
|
|
11453
11453
|
if (!y)
|
|
11454
11454
|
throw new Error(
|
|
11455
11455
|
"workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
|
|
11456
11456
|
);
|
|
11457
|
-
const w = t || ((K = n.applicantForm) == null ? void 0 : K.externalRefId) || "", z = ((te = n.applicantForm) == null ? void 0 : te.email) || "", L = ((g = n.applicantForm) == null ? void 0 : g.hiddenValues) || {}, C = ((I = n.applicantForm) == null ? void 0 : I.initialValues) || {}, T = (((b = n.applicantForm) == null ? void 0 : b.fieldLabelMode) || (
|
|
11458
|
-
() =>
|
|
11459
|
-
[
|
|
11457
|
+
const w = t || ((K = n.applicantForm) == null ? void 0 : K.externalRefId) || "", z = ((te = n.applicantForm) == null ? void 0 : te.email) || "", L = ((g = n.applicantForm) == null ? void 0 : g.hiddenValues) || {}, C = ((I = n.applicantForm) == null ? void 0 : I.initialValues) || {}, T = (((b = n.applicantForm) == null ? void 0 : b.fieldLabelMode) || (o == null ? void 0 : o.fieldLabelMode) || "label") !== "placeholder", P = Fe(
|
|
11458
|
+
() => o != null && o.applicantFormPages && o.applicantFormPages.length > 0 ? o.applicantFormPages : null,
|
|
11459
|
+
[o == null ? void 0 : o.applicantFormPages]
|
|
11460
11460
|
), B = Fe(() => {
|
|
11461
|
-
const c = new Set(
|
|
11461
|
+
const c = new Set(bt), f = o == null ? void 0 : o.applicantFormRequiredFields;
|
|
11462
11462
|
if (f) for (const v of f) c.add(v);
|
|
11463
11463
|
if (P)
|
|
11464
11464
|
for (const v of P)
|
|
11465
11465
|
for (const A of v.fields)
|
|
11466
11466
|
!A.isCustom && A.name && A.required && c.add(A.name);
|
|
11467
11467
|
return Array.from(c);
|
|
11468
|
-
}, [
|
|
11468
|
+
}, [o == null ? void 0 : o.applicantFormRequiredFields, P]), O = Fe(() => {
|
|
11469
11469
|
var v;
|
|
11470
11470
|
if (P) {
|
|
11471
11471
|
const A = P.flatMap((x) => x.fields).filter((x) => !x.isCustom && x.name).map((x) => x.name), N = new Set(A);
|
|
11472
|
-
for (const x of
|
|
11472
|
+
for (const x of bt) N.add(x);
|
|
11473
11473
|
return Array.from(N);
|
|
11474
11474
|
}
|
|
11475
11475
|
let c;
|
|
11476
|
-
(v = n.applicantForm) != null && v.visibleFields ? c = n.applicantForm.visibleFields :
|
|
11476
|
+
(v = n.applicantForm) != null && v.visibleFields ? c = n.applicantForm.visibleFields : o != null && o.applicantFormVisibleFields && o.applicantFormVisibleFields.length > 0 ? c = o.applicantFormVisibleFields : c = Ii;
|
|
11477
11477
|
const f = new Set(c);
|
|
11478
|
-
for (const A of
|
|
11478
|
+
for (const A of bt) f.add(A);
|
|
11479
11479
|
return Array.from(f);
|
|
11480
|
-
}, [(u = n.applicantForm) == null ? void 0 : u.visibleFields,
|
|
11480
|
+
}, [(u = n.applicantForm) == null ? void 0 : u.visibleFields, o == null ? void 0 : o.applicantFormVisibleFields, P]), U = /* @__PURE__ */ new Set([
|
|
11481
11481
|
"country",
|
|
11482
11482
|
"nationality",
|
|
11483
11483
|
"taxCountry",
|
|
@@ -11490,14 +11490,14 @@ const xa = {
|
|
|
11490
11490
|
if (P)
|
|
11491
11491
|
for (const A of P)
|
|
11492
11492
|
for (const N of A.fields)
|
|
11493
|
-
!N.isCustom && N.name && U.has(N.name) && c.add(N.countriesType ?? ((f =
|
|
11493
|
+
!N.isCustom && N.name && U.has(N.name) && c.add(N.countriesType ?? ((f = lt[N.name]) == null ? void 0 : f.countriesType));
|
|
11494
11494
|
else
|
|
11495
11495
|
for (const A of O)
|
|
11496
|
-
U.has(A) && c.add((v =
|
|
11496
|
+
U.has(A) && c.add((v = lt[A]) == null ? void 0 : v.countriesType);
|
|
11497
11497
|
return c.size === 0 && c.add(void 0), Array.from(c);
|
|
11498
11498
|
}, [O, P]), [J, re] = S({}), [h, R] = S(!0), V = ue(/* @__PURE__ */ new Set()), Q = ue(/* @__PURE__ */ new Set());
|
|
11499
11499
|
be(() => {
|
|
11500
|
-
if (!
|
|
11500
|
+
if (!o) return;
|
|
11501
11501
|
const c = H.filter((A) => {
|
|
11502
11502
|
const N = A != null ? String(A) : "all";
|
|
11503
11503
|
return !Q.current.has(N) && !V.current.has(N);
|
|
@@ -11532,10 +11532,10 @@ const xa = {
|
|
|
11532
11532
|
}) && R(!1);
|
|
11533
11533
|
}
|
|
11534
11534
|
})();
|
|
11535
|
-
}, [H,
|
|
11535
|
+
}, [H, o]);
|
|
11536
11536
|
const ee = (c, f) => {
|
|
11537
11537
|
var N;
|
|
11538
|
-
const v = f ?? ((N =
|
|
11538
|
+
const v = f ?? ((N = lt[c]) == null ? void 0 : N.countriesType), A = v != null ? String(v) : "all";
|
|
11539
11539
|
return J[A] || [];
|
|
11540
11540
|
}, W = {
|
|
11541
11541
|
firstName: 1,
|
|
@@ -11593,7 +11593,7 @@ const xa = {
|
|
|
11593
11593
|
...ce
|
|
11594
11594
|
}), ye = Object.fromEntries(
|
|
11595
11595
|
Object.entries(L).filter(([c]) => !(c in X) && c !== "externalRefId" && c !== "workflowKey")
|
|
11596
|
-
), [fe, Se] = S({ ...ye }), [pe, M] = S(0), [E, F] = S({}), [xe, de] = S(null), [D, _] = S(!1), ge = (c, f) => je((v) => ({ ...v, [c]: f })), le = (c, f) => Se((v) => ({ ...v, [c]: f })), ze = (c) => !c.conditionalOn || fe[c.conditionalOn] === "true",
|
|
11596
|
+
), [fe, Se] = S({ ...ye }), [pe, M] = S(0), [E, F] = S({}), [xe, de] = S(null), [D, _] = S(!1), ge = (c, f) => je((v) => ({ ...v, [c]: f })), le = (c, f) => Se((v) => ({ ...v, [c]: f })), ze = (c) => !c.conditionalOn || fe[c.conditionalOn] === "true", rt = (c) => {
|
|
11597
11597
|
var f;
|
|
11598
11598
|
for (const v of c.fields) {
|
|
11599
11599
|
if (!v.isCustom || !v.paramName || !((f = v.blockingValues) != null && f.length)) continue;
|
|
@@ -11604,7 +11604,7 @@ const xa = {
|
|
|
11604
11604
|
return !0;
|
|
11605
11605
|
}
|
|
11606
11606
|
return !1;
|
|
11607
|
-
}, Ae = P && pe < P.length - 1 ? pe + 1 : -1,
|
|
11607
|
+
}, Ae = P && pe < P.length - 1 ? pe + 1 : -1, Ye = P && pe > 0 ? pe - 1 : -1, ct = (c) => {
|
|
11608
11608
|
const f = {};
|
|
11609
11609
|
for (const v of c.fields)
|
|
11610
11610
|
if (v.isCustom) {
|
|
@@ -11615,31 +11615,31 @@ const xa = {
|
|
|
11615
11615
|
}
|
|
11616
11616
|
} else if (v.name) {
|
|
11617
11617
|
const A = v.name;
|
|
11618
|
-
if (B.includes(A) &&
|
|
11619
|
-
const N =
|
|
11618
|
+
if (B.includes(A) && ut(Y[A])) {
|
|
11619
|
+
const N = lt[A], x = G(v.displayText, d) || (N != null && N.translationKey ? d(`fields.${N.translationKey}`) : void 0) || (N == null ? void 0 : N.label) || A;
|
|
11620
11620
|
f[A] = d("validation.fieldRequired", { field: x });
|
|
11621
11621
|
}
|
|
11622
11622
|
}
|
|
11623
11623
|
return f;
|
|
11624
|
-
},
|
|
11624
|
+
}, at = async () => {
|
|
11625
11625
|
if (!P) return;
|
|
11626
11626
|
const c = P[pe];
|
|
11627
|
-
if (
|
|
11627
|
+
if (rt(c) || c.conditionalOn && c.conditionalMode === "block" && !ze(c)) return;
|
|
11628
11628
|
if (c.conditionalOn && !ze(c)) {
|
|
11629
|
-
F({}), Ae >= 0 ? M(Ae) : await
|
|
11629
|
+
F({}), Ae >= 0 ? M(Ae) : await He();
|
|
11630
11630
|
return;
|
|
11631
11631
|
}
|
|
11632
|
-
const f =
|
|
11632
|
+
const f = ct(c);
|
|
11633
11633
|
if (Object.keys(f).length > 0) {
|
|
11634
11634
|
F(f);
|
|
11635
11635
|
return;
|
|
11636
11636
|
}
|
|
11637
|
-
F({}), Ae >= 0 ? M(Ae) : await
|
|
11638
|
-
},
|
|
11637
|
+
F({}), Ae >= 0 ? M(Ae) : await He();
|
|
11638
|
+
}, He = async () => {
|
|
11639
11639
|
if (P) {
|
|
11640
11640
|
let c = {};
|
|
11641
11641
|
for (const f of P)
|
|
11642
|
-
ze(f) && (c = { ...c, ...
|
|
11642
|
+
ze(f) && (c = { ...c, ...ct(f) });
|
|
11643
11643
|
if (Object.keys(c).length > 0) {
|
|
11644
11644
|
F(c);
|
|
11645
11645
|
return;
|
|
@@ -11661,19 +11661,19 @@ const xa = {
|
|
|
11661
11661
|
for (const x of N.fields)
|
|
11662
11662
|
if (!x.isCustom && x.name) {
|
|
11663
11663
|
const ae = x.name, se = Y[ae];
|
|
11664
|
-
|
|
11664
|
+
ut(se) || (c[ae] = se);
|
|
11665
11665
|
}
|
|
11666
11666
|
}
|
|
11667
|
-
for (const N of
|
|
11667
|
+
for (const N of bt)
|
|
11668
11668
|
if (c[N] === void 0) {
|
|
11669
11669
|
const x = Y[N];
|
|
11670
|
-
|
|
11670
|
+
ut(x) || (c[N] = x);
|
|
11671
11671
|
}
|
|
11672
11672
|
} else
|
|
11673
11673
|
O.forEach((N) => {
|
|
11674
11674
|
if (N === "externalRefId") return;
|
|
11675
11675
|
const x = Y[N];
|
|
11676
|
-
|
|
11676
|
+
ut(x) || (c[N] = x);
|
|
11677
11677
|
});
|
|
11678
11678
|
const f = [];
|
|
11679
11679
|
if (P) {
|
|
@@ -11690,7 +11690,7 @@ const xa = {
|
|
|
11690
11690
|
}
|
|
11691
11691
|
}
|
|
11692
11692
|
for (const [N, x] of Object.entries(X))
|
|
11693
|
-
c[N] === void 0 && !
|
|
11693
|
+
c[N] === void 0 && !ut(x) && (c[N] = x);
|
|
11694
11694
|
const v = new Set(f.map((N) => N.paramName));
|
|
11695
11695
|
for (const [N, x] of Object.entries(ye))
|
|
11696
11696
|
!v.has(N) && x && f.push({ paramName: N, value: x });
|
|
@@ -11702,32 +11702,32 @@ const xa = {
|
|
|
11702
11702
|
} finally {
|
|
11703
11703
|
_(!1);
|
|
11704
11704
|
}
|
|
11705
|
-
},
|
|
11705
|
+
}, dt = async (c) => {
|
|
11706
11706
|
c.preventDefault();
|
|
11707
11707
|
for (const f of B)
|
|
11708
|
-
if (
|
|
11709
|
-
const v =
|
|
11708
|
+
if (ut(Y[f])) {
|
|
11709
|
+
const v = lt[f], A = (v != null && v.translationKey ? d(`fields.${v.translationKey}`) : void 0) || (v == null ? void 0 : v.label) || f;
|
|
11710
11710
|
de(d("validation.fieldRequired", { field: A }));
|
|
11711
11711
|
return;
|
|
11712
11712
|
}
|
|
11713
|
-
await
|
|
11714
|
-
},
|
|
11715
|
-
var
|
|
11716
|
-
const x =
|
|
11713
|
+
await He();
|
|
11714
|
+
}, Je = (c, f, v, A, N) => {
|
|
11715
|
+
var Dt;
|
|
11716
|
+
const x = lt[c];
|
|
11717
11717
|
if (!x) return null;
|
|
11718
|
-
const ae = B.includes(c), se = E[c], we = G(v, d) || (x.translationKey ? d(`fields.${x.translationKey}`) : void 0) || x.label, ke = c in ce, ve = f ?? c, Ve = { required: ae },
|
|
11718
|
+
const ae = B.includes(c), se = E[c], we = G(v, d) || (x.translationKey ? d(`fields.${x.translationKey}`) : void 0) || x.label, ke = c in ce, ve = f ?? c, Ve = { required: ae }, $e = N ? N !== "placeholder" : T, et = $e ? we : void 0;
|
|
11719
11719
|
switch (x.type) {
|
|
11720
11720
|
case "select":
|
|
11721
11721
|
if (c === "country" || c === "nationality" || c === "taxCountry" || c === "countryOfBirth" || c === "mobileCountryCode") {
|
|
11722
11722
|
const Le = ee(c, A);
|
|
11723
11723
|
return /* @__PURE__ */ i(
|
|
11724
|
-
|
|
11724
|
+
Xe,
|
|
11725
11725
|
{
|
|
11726
11726
|
...Ve,
|
|
11727
|
-
label:
|
|
11727
|
+
label: et,
|
|
11728
11728
|
value: Y[c] || "",
|
|
11729
|
-
onChange: (
|
|
11730
|
-
options: [{ value: "", label:
|
|
11729
|
+
onChange: (nt) => ge(c, nt),
|
|
11730
|
+
options: [{ value: "", label: $e ? d("placeholders.selectCountry") : we }, ...Le],
|
|
11731
11731
|
disabled: h,
|
|
11732
11732
|
readOnly: ke,
|
|
11733
11733
|
error: se
|
|
@@ -11737,17 +11737,17 @@ const xa = {
|
|
|
11737
11737
|
}
|
|
11738
11738
|
if (c === "salutation")
|
|
11739
11739
|
return /* @__PURE__ */ i(
|
|
11740
|
-
|
|
11740
|
+
Xe,
|
|
11741
11741
|
{
|
|
11742
11742
|
...Ve,
|
|
11743
|
-
label:
|
|
11744
|
-
value: ((
|
|
11743
|
+
label: et,
|
|
11744
|
+
value: ((Dt = Y[c]) == null ? void 0 : Dt.toString()) || "",
|
|
11745
11745
|
onChange: (Le) => ge(c, Le ? Number(Le) : null),
|
|
11746
11746
|
options: [
|
|
11747
|
-
{ value: "", label:
|
|
11748
|
-
{ value:
|
|
11749
|
-
{ value:
|
|
11750
|
-
{ value:
|
|
11747
|
+
{ value: "", label: $e ? d("placeholders.selectSalutation") : we },
|
|
11748
|
+
{ value: wt.Male.toString(), label: d("gender.male") },
|
|
11749
|
+
{ value: wt.Female.toString(), label: d("gender.female") },
|
|
11750
|
+
{ value: wt.Other.toString(), label: d("gender.other") }
|
|
11751
11751
|
],
|
|
11752
11752
|
readOnly: ke,
|
|
11753
11753
|
error: se
|
|
@@ -11755,15 +11755,15 @@ const xa = {
|
|
|
11755
11755
|
ve
|
|
11756
11756
|
);
|
|
11757
11757
|
if (c === "defaultLanguage") {
|
|
11758
|
-
const Le =
|
|
11758
|
+
const Le = o != null && o.allowedLanguages && o.allowedLanguages.length > 0 ? jt.filter((nt) => o.allowedLanguages.includes(nt.value)) : jt;
|
|
11759
11759
|
return /* @__PURE__ */ i(
|
|
11760
|
-
|
|
11760
|
+
Xe,
|
|
11761
11761
|
{
|
|
11762
11762
|
...Ve,
|
|
11763
|
-
label:
|
|
11763
|
+
label: et,
|
|
11764
11764
|
value: Y[c] || "",
|
|
11765
|
-
onChange: (
|
|
11766
|
-
options: [{ value: "", label:
|
|
11765
|
+
onChange: (nt) => ge(c, nt),
|
|
11766
|
+
options: [{ value: "", label: $e ? d("placeholders.selectLanguage") : we }, ...Le],
|
|
11767
11767
|
readOnly: ke,
|
|
11768
11768
|
error: se
|
|
11769
11769
|
},
|
|
@@ -11778,11 +11778,11 @@ const xa = {
|
|
|
11778
11778
|
Ur,
|
|
11779
11779
|
{
|
|
11780
11780
|
...Ve,
|
|
11781
|
-
label:
|
|
11781
|
+
label: et,
|
|
11782
11782
|
value: Y[c] || [],
|
|
11783
|
-
onChange: (
|
|
11783
|
+
onChange: (nt) => ge(c, nt),
|
|
11784
11784
|
options: Le,
|
|
11785
|
-
placeholder:
|
|
11785
|
+
placeholder: $e ? d("placeholders.selectOtherNationalities") : we,
|
|
11786
11786
|
disabled: h,
|
|
11787
11787
|
readOnly: ke
|
|
11788
11788
|
},
|
|
@@ -11796,8 +11796,8 @@ const xa = {
|
|
|
11796
11796
|
{
|
|
11797
11797
|
...Ve,
|
|
11798
11798
|
type: "date",
|
|
11799
|
-
label:
|
|
11800
|
-
placeholder:
|
|
11799
|
+
label: et,
|
|
11800
|
+
placeholder: $e ? void 0 : we,
|
|
11801
11801
|
value: Y[c] || "",
|
|
11802
11802
|
onChange: (Le) => ge(c, Le.target.value),
|
|
11803
11803
|
readOnly: ke,
|
|
@@ -11811,8 +11811,8 @@ const xa = {
|
|
|
11811
11811
|
{
|
|
11812
11812
|
...Ve,
|
|
11813
11813
|
type: "email",
|
|
11814
|
-
label:
|
|
11815
|
-
placeholder:
|
|
11814
|
+
label: et,
|
|
11815
|
+
placeholder: $e ? void 0 : we,
|
|
11816
11816
|
value: Y[c] || "",
|
|
11817
11817
|
onChange: (Le) => ge(c, Le.target.value),
|
|
11818
11818
|
readOnly: ke,
|
|
@@ -11826,8 +11826,8 @@ const xa = {
|
|
|
11826
11826
|
{
|
|
11827
11827
|
...Ve,
|
|
11828
11828
|
type: "tel",
|
|
11829
|
-
label:
|
|
11830
|
-
placeholder:
|
|
11829
|
+
label: et,
|
|
11830
|
+
placeholder: $e ? void 0 : we,
|
|
11831
11831
|
value: Y[c] || "",
|
|
11832
11832
|
onChange: (Le) => ge(c, Le.target.value),
|
|
11833
11833
|
readOnly: ke,
|
|
@@ -11841,8 +11841,8 @@ const xa = {
|
|
|
11841
11841
|
{
|
|
11842
11842
|
...Ve,
|
|
11843
11843
|
type: "text",
|
|
11844
|
-
label:
|
|
11845
|
-
placeholder:
|
|
11844
|
+
label: et,
|
|
11845
|
+
placeholder: $e ? void 0 : we,
|
|
11846
11846
|
value: Y[c] || "",
|
|
11847
11847
|
onChange: (Le) => ge(c, Le.target.value),
|
|
11848
11848
|
readOnly: ke,
|
|
@@ -11882,7 +11882,7 @@ const xa = {
|
|
|
11882
11882
|
return /* @__PURE__ */ i("div", { style: { height: "12px" } }, `custom-${f}`);
|
|
11883
11883
|
if (c.customType === "link") {
|
|
11884
11884
|
const x = G(c.displayText, d) || G(c.label, d) || c.linkText || c.linkUrl || "";
|
|
11885
|
-
return /* @__PURE__ */ i("div", { className: "metakyc-link-field", children: /* @__PURE__ */
|
|
11885
|
+
return /* @__PURE__ */ i("div", { className: "metakyc-link-field", children: /* @__PURE__ */ s(
|
|
11886
11886
|
"a",
|
|
11887
11887
|
{
|
|
11888
11888
|
href: c.linkUrl || "#",
|
|
@@ -11908,8 +11908,8 @@ const xa = {
|
|
|
11908
11908
|
const A = E[c.paramName], N = G(c.displayText, d) || G(c.label, d) || c.paramName;
|
|
11909
11909
|
if (c.customType === "checkbox") {
|
|
11910
11910
|
const x = fe[c.paramName] === "true";
|
|
11911
|
-
return /* @__PURE__ */
|
|
11912
|
-
/* @__PURE__ */
|
|
11911
|
+
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
|
|
11912
|
+
/* @__PURE__ */ s(
|
|
11913
11913
|
"div",
|
|
11914
11914
|
{
|
|
11915
11915
|
className: "metakyc-option-label",
|
|
@@ -11925,7 +11925,7 @@ const xa = {
|
|
|
11925
11925
|
onChange: (ae) => le(c.paramName, ae ? "true" : "false")
|
|
11926
11926
|
}
|
|
11927
11927
|
),
|
|
11928
|
-
/* @__PURE__ */
|
|
11928
|
+
/* @__PURE__ */ s(
|
|
11929
11929
|
"span",
|
|
11930
11930
|
{
|
|
11931
11931
|
className: "metakyc-option-text",
|
|
@@ -11944,8 +11944,8 @@ const xa = {
|
|
|
11944
11944
|
}
|
|
11945
11945
|
if (c.customType === "link_checkbox") {
|
|
11946
11946
|
const x = fe[c.paramName] === "true";
|
|
11947
|
-
return /* @__PURE__ */
|
|
11948
|
-
/* @__PURE__ */
|
|
11947
|
+
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
|
|
11948
|
+
/* @__PURE__ */ s(
|
|
11949
11949
|
"div",
|
|
11950
11950
|
{
|
|
11951
11951
|
className: "metakyc-option-label",
|
|
@@ -11961,7 +11961,7 @@ const xa = {
|
|
|
11961
11961
|
onChange: (ae) => le(c.paramName, ae ? "true" : "false")
|
|
11962
11962
|
}
|
|
11963
11963
|
),
|
|
11964
|
-
/* @__PURE__ */
|
|
11964
|
+
/* @__PURE__ */ s(
|
|
11965
11965
|
"span",
|
|
11966
11966
|
{
|
|
11967
11967
|
className: "metakyc-option-text",
|
|
@@ -11993,8 +11993,8 @@ const xa = {
|
|
|
11993
11993
|
}
|
|
11994
11994
|
if (c.customType === "group_checkbox") {
|
|
11995
11995
|
const x = (fe[c.paramName] || "").split(",").filter(Boolean);
|
|
11996
|
-
return /* @__PURE__ */
|
|
11997
|
-
v && /* @__PURE__ */
|
|
11996
|
+
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
|
|
11997
|
+
v && /* @__PURE__ */ s(
|
|
11998
11998
|
"div",
|
|
11999
11999
|
{
|
|
12000
12000
|
className: "text-sm font-medium",
|
|
@@ -12014,7 +12014,7 @@ const xa = {
|
|
|
12014
12014
|
le(c.paramName, ke.join(","));
|
|
12015
12015
|
}
|
|
12016
12016
|
};
|
|
12017
|
-
return /* @__PURE__ */
|
|
12017
|
+
return /* @__PURE__ */ s(
|
|
12018
12018
|
"div",
|
|
12019
12019
|
{
|
|
12020
12020
|
className: "metakyc-option-label",
|
|
@@ -12038,8 +12038,8 @@ const xa = {
|
|
|
12038
12038
|
A && /* @__PURE__ */ i("p", { className: "text-xs", style: { color: "var(--metakyc-danger, #ef4444)" }, children: A })
|
|
12039
12039
|
] }, `custom-${f}`);
|
|
12040
12040
|
}
|
|
12041
|
-
return c.customType === "radio_group" ? /* @__PURE__ */
|
|
12042
|
-
v && /* @__PURE__ */
|
|
12041
|
+
return c.customType === "radio_group" ? /* @__PURE__ */ s("div", { className: "flex flex-col gap-1.5", children: [
|
|
12042
|
+
v && /* @__PURE__ */ s(
|
|
12043
12043
|
"div",
|
|
12044
12044
|
{
|
|
12045
12045
|
className: "text-sm font-medium",
|
|
@@ -12050,7 +12050,7 @@ const xa = {
|
|
|
12050
12050
|
]
|
|
12051
12051
|
}
|
|
12052
12052
|
),
|
|
12053
|
-
/* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((x) => /* @__PURE__ */
|
|
12053
|
+
/* @__PURE__ */ i("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (c.options || []).map((x) => /* @__PURE__ */ s(
|
|
12054
12054
|
"div",
|
|
12055
12055
|
{
|
|
12056
12056
|
className: "metakyc-option-label",
|
|
@@ -12097,8 +12097,8 @@ const xa = {
|
|
|
12097
12097
|
);
|
|
12098
12098
|
}, j = (c, f) => {
|
|
12099
12099
|
const v = ze(c);
|
|
12100
|
-
return /* @__PURE__ */
|
|
12101
|
-
c.conditionalOn && /* @__PURE__ */ i(
|
|
12100
|
+
return /* @__PURE__ */ s("div", { className: "space-y-4", children: [
|
|
12101
|
+
c.conditionalOn && /* @__PURE__ */ i(Gt, { helpText: c.conditionalHelpText, children: /* @__PURE__ */ s(
|
|
12102
12102
|
"div",
|
|
12103
12103
|
{
|
|
12104
12104
|
className: "metakyc-option-label",
|
|
@@ -12127,22 +12127,22 @@ const xa = {
|
|
|
12127
12127
|
) }),
|
|
12128
12128
|
v && /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: c.fields.map((A, N) => {
|
|
12129
12129
|
const x = Math.min(4, Math.max(1, Number(A.colSpan) || 4)), ae = A.isCustom ? `custom-${N}-${A.paramName}` : `builtin-${A.name}-${N}`;
|
|
12130
|
-
return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${x} / span ${x}` }, children: /* @__PURE__ */ i(
|
|
12130
|
+
return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${x} / span ${x}` }, children: /* @__PURE__ */ i(Gt, { helpText: A.helpText, children: A.isCustom ? k(A, N) : Je(A.name, ae, A.displayText, A.countriesType, A.labelMode) }) }, ae);
|
|
12131
12131
|
}) })
|
|
12132
12132
|
] });
|
|
12133
12133
|
};
|
|
12134
|
-
if (!
|
|
12135
|
-
return /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */
|
|
12134
|
+
if (!o || h)
|
|
12135
|
+
return /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
|
|
12136
12136
|
/* @__PURE__ */ i(Be, { className: "my-8" }),
|
|
12137
12137
|
/* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: d("common.loadingForm") })
|
|
12138
12138
|
] }) }) });
|
|
12139
12139
|
if (P) {
|
|
12140
|
-
const c = P[pe] ?? P[0], f =
|
|
12140
|
+
const c = P[pe] ?? P[0], f = Ye === -1, v = Ae === -1, A = P.length, N = ze(c), x = rt(c), ae = Object.values(E), se = !N && !!c.conditionalOn && c.conditionalMode === "block", we = D || m || se || x;
|
|
12141
12141
|
let ke;
|
|
12142
|
-
return se || x ? ke = d("common.blocked") : v ? ke = c.conditionalOn && !N ? d("common.skipAndSubmit") : d("common.submit") : ke = c.conditionalOn && !N ? d("common.skip") : d("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */
|
|
12143
|
-
/* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i(
|
|
12144
|
-
/* @__PURE__ */
|
|
12145
|
-
(c.title || c.subtitle || c.description) && /* @__PURE__ */
|
|
12142
|
+
return se || x ? ke = d("common.blocked") : v ? ke = c.conditionalOn && !N ? d("common.skipAndSubmit") : d("common.submit") : ke = c.conditionalOn && !N ? d("common.skip") : d("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(ne, { children: [
|
|
12143
|
+
/* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i(kt, { title: (o == null ? void 0 : o.title) || d("createApplicant.title") }) }),
|
|
12144
|
+
/* @__PURE__ */ s(oe, { children: [
|
|
12145
|
+
(c.title || c.subtitle || c.description) && /* @__PURE__ */ s("div", { className: "mb-4", children: [
|
|
12146
12146
|
c.title && /* @__PURE__ */ i(
|
|
12147
12147
|
"h3",
|
|
12148
12148
|
{
|
|
@@ -12168,7 +12168,7 @@ const xa = {
|
|
|
12168
12168
|
}
|
|
12169
12169
|
)
|
|
12170
12170
|
] }),
|
|
12171
|
-
A > 1 && /* @__PURE__ */
|
|
12171
|
+
A > 1 && /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", marginBottom: "1rem" }, children: [
|
|
12172
12172
|
P.map((ve, Ve) => /* @__PURE__ */ i(
|
|
12173
12173
|
"div",
|
|
12174
12174
|
{
|
|
@@ -12181,17 +12181,17 @@ const xa = {
|
|
|
12181
12181
|
},
|
|
12182
12182
|
Ve
|
|
12183
12183
|
)),
|
|
12184
|
-
/* @__PURE__ */
|
|
12184
|
+
/* @__PURE__ */ s("span", { style: { fontSize: "0.75rem", color: "var(--metakyc-text-muted, #9ca3af)", flexShrink: 0 }, children: [
|
|
12185
12185
|
pe + 1,
|
|
12186
12186
|
" / ",
|
|
12187
12187
|
A
|
|
12188
12188
|
] })
|
|
12189
12189
|
] }),
|
|
12190
|
-
(xe || ae.length > 0) && /* @__PURE__ */
|
|
12190
|
+
(xe || ae.length > 0) && /* @__PURE__ */ s("div", { className: "mb-4 p-3 rounded-lg", style: {
|
|
12191
12191
|
backgroundColor: "var(--metakyc-danger-bg, color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent))",
|
|
12192
12192
|
border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 30%, transparent)"
|
|
12193
12193
|
}, children: [
|
|
12194
|
-
xe && /* @__PURE__ */
|
|
12194
|
+
xe && /* @__PURE__ */ s("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: [
|
|
12195
12195
|
/* @__PURE__ */ i("strong", { children: d("common.errorPrefix") }),
|
|
12196
12196
|
" ",
|
|
12197
12197
|
xe
|
|
@@ -12200,15 +12200,15 @@ const xa = {
|
|
|
12200
12200
|
] }),
|
|
12201
12201
|
j(c)
|
|
12202
12202
|
] }),
|
|
12203
|
-
/* @__PURE__ */
|
|
12204
|
-
/* @__PURE__ */
|
|
12203
|
+
/* @__PURE__ */ s(Re, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
12204
|
+
/* @__PURE__ */ s("div", { children: [
|
|
12205
12205
|
!f && /* @__PURE__ */ i(
|
|
12206
12206
|
Z,
|
|
12207
12207
|
{
|
|
12208
12208
|
type: "button",
|
|
12209
12209
|
variant: "outline",
|
|
12210
12210
|
onClick: () => {
|
|
12211
|
-
M(
|
|
12211
|
+
M(Ye), F({});
|
|
12212
12212
|
},
|
|
12213
12213
|
disabled: D || m,
|
|
12214
12214
|
children: d("common.previous")
|
|
@@ -12222,33 +12222,33 @@ const xa = {
|
|
|
12222
12222
|
type: "button",
|
|
12223
12223
|
isLoading: D || m,
|
|
12224
12224
|
disabled: we,
|
|
12225
|
-
onClick: v ?
|
|
12225
|
+
onClick: v ? He : at,
|
|
12226
12226
|
children: ke
|
|
12227
12227
|
}
|
|
12228
12228
|
)
|
|
12229
12229
|
] })
|
|
12230
12230
|
] }) });
|
|
12231
12231
|
}
|
|
12232
|
-
return /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i("form", { onSubmit:
|
|
12233
|
-
/* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i(
|
|
12234
|
-
/* @__PURE__ */
|
|
12232
|
+
return /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i("form", { onSubmit: dt, children: /* @__PURE__ */ s(ne, { children: [
|
|
12233
|
+
/* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i(kt, { title: (o == null ? void 0 : o.title) || d("createApplicant.title") }) }),
|
|
12234
|
+
/* @__PURE__ */ s(oe, { children: [
|
|
12235
12235
|
xe && /* @__PURE__ */ i("div", { className: "mb-6 p-4 rounded-lg", style: {
|
|
12236
12236
|
backgroundColor: "var(--metakyc-danger-bg, color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent))",
|
|
12237
12237
|
border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 30%, transparent)"
|
|
12238
|
-
}, children: /* @__PURE__ */
|
|
12238
|
+
}, children: /* @__PURE__ */ s("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: [
|
|
12239
12239
|
/* @__PURE__ */ i("strong", { children: d("common.errorPrefix") }),
|
|
12240
12240
|
" ",
|
|
12241
12241
|
xe
|
|
12242
12242
|
] }) }),
|
|
12243
|
-
/* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: O.map((c) => /* @__PURE__ */ i("div", { style: { gridColumn: "span 4 / span 4" }, children:
|
|
12243
|
+
/* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: O.map((c) => /* @__PURE__ */ i("div", { style: { gridColumn: "span 4 / span 4" }, children: Je(c) }, c)) })
|
|
12244
12244
|
] }),
|
|
12245
|
-
/* @__PURE__ */
|
|
12245
|
+
/* @__PURE__ */ s(Re, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
12246
12246
|
r && /* @__PURE__ */ i(Z, { type: "button", variant: "outline", onClick: r, disabled: D || m, children: "Cancel" }),
|
|
12247
12247
|
/* @__PURE__ */ i(Z, { type: "submit", isLoading: D || m, children: d("createApplicant.createApplicant") })
|
|
12248
12248
|
] })
|
|
12249
12249
|
] }) }) });
|
|
12250
|
-
},
|
|
12251
|
-
function
|
|
12250
|
+
}, Qt = ["companyName", "email"];
|
|
12251
|
+
function Rt(e) {
|
|
12252
12252
|
return e == null || e === "" || Array.isArray(e) && e.length === 0;
|
|
12253
12253
|
}
|
|
12254
12254
|
const Ua = ({
|
|
@@ -12257,45 +12257,45 @@ const Ua = ({
|
|
|
12257
12257
|
onSuccess: a,
|
|
12258
12258
|
onCancel: r
|
|
12259
12259
|
}) => {
|
|
12260
|
-
var
|
|
12261
|
-
const { config: n, baseInformationService: l, currentTheme:
|
|
12260
|
+
var Je, k, j, $, K, te;
|
|
12261
|
+
const { config: n, baseInformationService: l, currentTheme: o } = Oe(), { createCompanyApplicant: p, isLoading: m } = ni(), { t: d } = Ie(), y = e || ((Je = n.applicantForm) == null ? void 0 : Je.workflowKey);
|
|
12262
12262
|
if (!y)
|
|
12263
12263
|
throw new Error(
|
|
12264
12264
|
"workflowKey is required. Provide it either as a prop to CreateCompanyApplicantForm or set it in config.applicantForm.workflowKey"
|
|
12265
12265
|
);
|
|
12266
|
-
const w = t || ((k = n.applicantForm) == null ? void 0 : k.externalRefId) || "", z = ((j = n.applicantForm) == null ? void 0 : j.email) || "", L = (($ = n.applicantForm) == null ? void 0 : $.initialValues) || {}, q = (((K = n.applicantForm) == null ? void 0 : K.fieldLabelMode) || (
|
|
12267
|
-
() =>
|
|
12268
|
-
[
|
|
12266
|
+
const w = t || ((k = n.applicantForm) == null ? void 0 : k.externalRefId) || "", z = ((j = n.applicantForm) == null ? void 0 : j.email) || "", L = (($ = n.applicantForm) == null ? void 0 : $.initialValues) || {}, q = (((K = n.applicantForm) == null ? void 0 : K.fieldLabelMode) || (o == null ? void 0 : o.fieldLabelMode) || "label") !== "placeholder", T = Fe(
|
|
12267
|
+
() => o != null && o.companyFormPages && o.companyFormPages.length > 0 ? o.companyFormPages : null,
|
|
12268
|
+
[o == null ? void 0 : o.companyFormPages]
|
|
12269
12269
|
), P = Fe(() => {
|
|
12270
|
-
const g = new Set(
|
|
12270
|
+
const g = new Set(Qt), I = o == null ? void 0 : o.companyFormRequiredFields;
|
|
12271
12271
|
if (I) for (const b of I) g.add(b);
|
|
12272
12272
|
if (T)
|
|
12273
12273
|
for (const b of T)
|
|
12274
12274
|
for (const u of b.fields)
|
|
12275
12275
|
!u.isCustom && u.name && u.required && g.add(u.name);
|
|
12276
12276
|
return Array.from(g);
|
|
12277
|
-
}, [
|
|
12277
|
+
}, [o == null ? void 0 : o.companyFormRequiredFields, T]), B = Fe(() => {
|
|
12278
12278
|
var g;
|
|
12279
12279
|
if (T) {
|
|
12280
12280
|
const I = T.flatMap((u) => u.fields).filter((u) => !u.isCustom && u.name).map((u) => u.name), b = new Set(I);
|
|
12281
|
-
for (const u of
|
|
12281
|
+
for (const u of Qt) b.add(u);
|
|
12282
12282
|
return Array.from(b);
|
|
12283
12283
|
}
|
|
12284
|
-
return (g = n.applicantForm) != null && g.visibleFields ? n.applicantForm.visibleFields :
|
|
12285
|
-
}, [(te = n.applicantForm) == null ? void 0 : te.visibleFields,
|
|
12284
|
+
return (g = n.applicantForm) != null && g.visibleFields ? n.applicantForm.visibleFields : o != null && o.companyFormVisibleFields && o.companyFormVisibleFields.length > 0 ? o.companyFormVisibleFields : Ri;
|
|
12285
|
+
}, [(te = n.applicantForm) == null ? void 0 : te.visibleFields, o == null ? void 0 : o.companyFormVisibleFields, T]), O = /* @__PURE__ */ new Set(["countryResidence", "addressCountry"]), U = Fe(() => {
|
|
12286
12286
|
var I, b;
|
|
12287
12287
|
const g = /* @__PURE__ */ new Set();
|
|
12288
12288
|
if (T)
|
|
12289
12289
|
for (const u of T)
|
|
12290
12290
|
for (const c of u.fields)
|
|
12291
|
-
!c.isCustom && c.name && O.has(c.name) && g.add(c.countriesType ?? ((I =
|
|
12291
|
+
!c.isCustom && c.name && O.has(c.name) && g.add(c.countriesType ?? ((I = mt[c.name]) == null ? void 0 : I.countriesType));
|
|
12292
12292
|
else
|
|
12293
12293
|
for (const u of B)
|
|
12294
|
-
O.has(u) && g.add((b =
|
|
12294
|
+
O.has(u) && g.add((b = mt[u]) == null ? void 0 : b.countriesType);
|
|
12295
12295
|
return g.size === 0 && g.add(void 0), Array.from(g);
|
|
12296
12296
|
}, [B, T]), [H, J] = S({}), [re, h] = S(!0), R = ue(/* @__PURE__ */ new Set()), V = ue(/* @__PURE__ */ new Set());
|
|
12297
12297
|
be(() => {
|
|
12298
|
-
if (!
|
|
12298
|
+
if (!o) return;
|
|
12299
12299
|
const g = U.filter((u) => {
|
|
12300
12300
|
const c = u != null ? String(u) : "all";
|
|
12301
12301
|
return !V.current.has(c) && !R.current.has(c);
|
|
@@ -12321,10 +12321,10 @@ const Ua = ({
|
|
|
12321
12321
|
U.every((c) => V.current.has(c != null ? String(c) : "all")) && h(!1);
|
|
12322
12322
|
}
|
|
12323
12323
|
})();
|
|
12324
|
-
}, [U,
|
|
12324
|
+
}, [U, o]);
|
|
12325
12325
|
const Q = (g, I) => {
|
|
12326
12326
|
var c;
|
|
12327
|
-
const b = I ?? ((c =
|
|
12327
|
+
const b = I ?? ((c = mt[g]) == null ? void 0 : c.countriesType), u = b != null ? String(b) : "all";
|
|
12328
12328
|
return H[u] || [];
|
|
12329
12329
|
}, ee = {
|
|
12330
12330
|
companyName: 1,
|
|
@@ -12382,7 +12382,7 @@ const Ua = ({
|
|
|
12382
12382
|
return !0;
|
|
12383
12383
|
}
|
|
12384
12384
|
return !1;
|
|
12385
|
-
}, le = T && ye < T.length - 1 ? ye + 1 : -1, ze = T && ye > 0 ? ye - 1 : -1,
|
|
12385
|
+
}, le = T && ye < T.length - 1 ? ye + 1 : -1, ze = T && ye > 0 ? ye - 1 : -1, rt = (g) => {
|
|
12386
12386
|
const I = {};
|
|
12387
12387
|
for (const b of g.fields)
|
|
12388
12388
|
if (b.isCustom) {
|
|
@@ -12393,8 +12393,8 @@ const Ua = ({
|
|
|
12393
12393
|
}
|
|
12394
12394
|
} else if (b.name) {
|
|
12395
12395
|
const u = b.name;
|
|
12396
|
-
if (P.includes(u) &&
|
|
12397
|
-
const c =
|
|
12396
|
+
if (P.includes(u) && Rt(X[u])) {
|
|
12397
|
+
const c = mt[u], f = G(b.displayText, d) || (c != null && c.translationKey ? d(`fields.${c.translationKey}`) : void 0) || (c == null ? void 0 : c.label) || u;
|
|
12398
12398
|
I[u] = d("validation.fieldRequired", { field: f });
|
|
12399
12399
|
}
|
|
12400
12400
|
}
|
|
@@ -12404,21 +12404,21 @@ const Ua = ({
|
|
|
12404
12404
|
const g = T[ye];
|
|
12405
12405
|
if (ge(g) || g.conditionalOn && g.conditionalMode === "block" && !_(g)) return;
|
|
12406
12406
|
if (g.conditionalOn && !_(g)) {
|
|
12407
|
-
pe({}), le >= 0 ? fe(le) : await
|
|
12407
|
+
pe({}), le >= 0 ? fe(le) : await Ye();
|
|
12408
12408
|
return;
|
|
12409
12409
|
}
|
|
12410
|
-
const I =
|
|
12410
|
+
const I = rt(g);
|
|
12411
12411
|
if (Object.keys(I).length > 0) {
|
|
12412
12412
|
pe(I);
|
|
12413
12413
|
return;
|
|
12414
12414
|
}
|
|
12415
|
-
pe({}), le >= 0 ? fe(le) : await
|
|
12416
|
-
},
|
|
12415
|
+
pe({}), le >= 0 ? fe(le) : await Ye();
|
|
12416
|
+
}, Ye = async () => {
|
|
12417
12417
|
var g;
|
|
12418
12418
|
if (T) {
|
|
12419
12419
|
let I = {};
|
|
12420
12420
|
for (const b of T)
|
|
12421
|
-
_(b) && (I = { ...I, ...
|
|
12421
|
+
_(b) && (I = { ...I, ...rt(b) });
|
|
12422
12422
|
if (Object.keys(I).length > 0) {
|
|
12423
12423
|
pe(I);
|
|
12424
12424
|
return;
|
|
@@ -12432,7 +12432,7 @@ const Ua = ({
|
|
|
12432
12432
|
}, b = T ? T.filter((f) => _(f)).flatMap((f) => f.fields).filter((f) => !f.isCustom && f.name).map((f) => f.name) : B;
|
|
12433
12433
|
for (const f of b) {
|
|
12434
12434
|
const v = X[f];
|
|
12435
|
-
if (!
|
|
12435
|
+
if (!Rt(v))
|
|
12436
12436
|
switch (f) {
|
|
12437
12437
|
case "companyName":
|
|
12438
12438
|
I.companyName = v;
|
|
@@ -12485,17 +12485,17 @@ const Ua = ({
|
|
|
12485
12485
|
} finally {
|
|
12486
12486
|
xe(!1);
|
|
12487
12487
|
}
|
|
12488
|
-
},
|
|
12488
|
+
}, ct = async (g) => {
|
|
12489
12489
|
g.preventDefault();
|
|
12490
12490
|
for (const I of P)
|
|
12491
|
-
if (
|
|
12492
|
-
const b =
|
|
12491
|
+
if (Rt(X[I])) {
|
|
12492
|
+
const b = mt[I], u = (b != null && b.translationKey ? d(`fields.${b.translationKey}`) : void 0) || (b == null ? void 0 : b.label) || I;
|
|
12493
12493
|
E(d("validation.fieldRequired", { field: u }));
|
|
12494
12494
|
return;
|
|
12495
12495
|
}
|
|
12496
|
-
await
|
|
12497
|
-
},
|
|
12498
|
-
const f =
|
|
12496
|
+
await Ye();
|
|
12497
|
+
}, at = (g, I, b, u, c) => {
|
|
12498
|
+
const f = mt[g];
|
|
12499
12499
|
if (!f) return null;
|
|
12500
12500
|
const v = P.includes(g), A = Se[g], N = G(b, d) || (f.translationKey ? d(`fields.${f.translationKey}`) : void 0) || f.label, x = g in W, ae = I ?? g, se = c ? c !== "placeholder" : q, we = se ? N : void 0;
|
|
12501
12501
|
switch (f.type) {
|
|
@@ -12503,7 +12503,7 @@ const Ua = ({
|
|
|
12503
12503
|
if (g === "countryResidence" || g === "addressCountry") {
|
|
12504
12504
|
const ke = Q(g, u);
|
|
12505
12505
|
return /* @__PURE__ */ i(
|
|
12506
|
-
|
|
12506
|
+
Xe,
|
|
12507
12507
|
{
|
|
12508
12508
|
required: v,
|
|
12509
12509
|
label: we,
|
|
@@ -12579,7 +12579,7 @@ const Ua = ({
|
|
|
12579
12579
|
ae
|
|
12580
12580
|
);
|
|
12581
12581
|
}
|
|
12582
|
-
},
|
|
12582
|
+
}, He = (g, I) => {
|
|
12583
12583
|
if (g.customType === "paragraph")
|
|
12584
12584
|
return /* @__PURE__ */ i(
|
|
12585
12585
|
"p",
|
|
@@ -12608,8 +12608,8 @@ const Ua = ({
|
|
|
12608
12608
|
const b = Se[g.paramName], u = G(g.displayText, d) || G(g.label, d) || g.paramName, c = g.labelMode ? g.labelMode !== "placeholder" : q;
|
|
12609
12609
|
if (g.customType === "checkbox") {
|
|
12610
12610
|
const f = Y[g.paramName] === "true";
|
|
12611
|
-
return /* @__PURE__ */
|
|
12612
|
-
/* @__PURE__ */
|
|
12611
|
+
return /* @__PURE__ */ s("div", { className: "flex flex-col gap-1", children: [
|
|
12612
|
+
/* @__PURE__ */ s(
|
|
12613
12613
|
"div",
|
|
12614
12614
|
{
|
|
12615
12615
|
role: "checkbox",
|
|
@@ -12624,7 +12624,7 @@ const Ua = ({
|
|
|
12624
12624
|
onChange: (v) => D(g.paramName, v ? "true" : "false")
|
|
12625
12625
|
}
|
|
12626
12626
|
),
|
|
12627
|
-
/* @__PURE__ */
|
|
12627
|
+
/* @__PURE__ */ s("span", { style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)" }, children: [
|
|
12628
12628
|
u,
|
|
12629
12629
|
g.required && /* @__PURE__ */ i("span", { className: "ml-0.5", style: { color: "var(--metakyc-danger, #ef4444)" }, children: "*" })
|
|
12630
12630
|
] })
|
|
@@ -12647,10 +12647,10 @@ const Ua = ({
|
|
|
12647
12647
|
},
|
|
12648
12648
|
`custom-${I}`
|
|
12649
12649
|
);
|
|
12650
|
-
},
|
|
12650
|
+
}, dt = (g) => {
|
|
12651
12651
|
const I = _(g);
|
|
12652
|
-
return /* @__PURE__ */
|
|
12653
|
-
g.conditionalOn && /* @__PURE__ */
|
|
12652
|
+
return /* @__PURE__ */ s("div", { className: "space-y-4", children: [
|
|
12653
|
+
g.conditionalOn && /* @__PURE__ */ s(
|
|
12654
12654
|
"div",
|
|
12655
12655
|
{
|
|
12656
12656
|
role: "checkbox",
|
|
@@ -12671,37 +12671,37 @@ const Ua = ({
|
|
|
12671
12671
|
),
|
|
12672
12672
|
I && /* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: g.fields.map((b, u) => {
|
|
12673
12673
|
const c = Math.min(4, Math.max(1, Number(b.colSpan) || 4)), f = b.isCustom ? `custom-${u}-${b.paramName}` : `builtin-${b.name}-${u}`;
|
|
12674
|
-
return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${c} / span ${c}` }, children: b.isCustom ?
|
|
12674
|
+
return /* @__PURE__ */ i("div", { style: { gridColumn: `span ${c} / span ${c}` }, children: b.isCustom ? He(b, u) : at(b.name, f, b.displayText, b.countriesType, b.labelMode) }, f);
|
|
12675
12675
|
}) })
|
|
12676
12676
|
] });
|
|
12677
12677
|
};
|
|
12678
|
-
if (!
|
|
12679
|
-
return /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */
|
|
12678
|
+
if (!o || re)
|
|
12679
|
+
return /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
|
|
12680
12680
|
/* @__PURE__ */ i(Be, { className: "my-8" }),
|
|
12681
12681
|
/* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)", fontSize: "0.875rem" }, children: d("common.loadingForm") })
|
|
12682
12682
|
] }) }) });
|
|
12683
12683
|
if (T) {
|
|
12684
12684
|
const g = T[ye] ?? T[0], I = ze === -1, b = le === -1, u = T.length, c = _(g), f = ge(g), v = Object.values(Se), A = !c && !!g.conditionalOn && g.conditionalMode === "block", N = F || m || A || f;
|
|
12685
12685
|
let x;
|
|
12686
|
-
return A || f ? x = d("common.blocked") : b ? x = g.conditionalOn && !c ? d("common.skipAndSubmit") : d("common.submit") : x = g.conditionalOn && !c ? d("common.skip") : d("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */
|
|
12687
|
-
/* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i(
|
|
12688
|
-
/* @__PURE__ */
|
|
12689
|
-
(g.title || g.subtitle) && /* @__PURE__ */
|
|
12686
|
+
return A || f ? x = d("common.blocked") : b ? x = g.conditionalOn && !c ? d("common.skipAndSubmit") : d("common.submit") : x = g.conditionalOn && !c ? d("common.skip") : d("common.next"), /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ s(ne, { children: [
|
|
12687
|
+
/* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i(kt, { title: (o == null ? void 0 : o.title) || d("createCompany.title") }) }),
|
|
12688
|
+
/* @__PURE__ */ s(oe, { children: [
|
|
12689
|
+
(g.title || g.subtitle) && /* @__PURE__ */ s("div", { className: "mb-4", children: [
|
|
12690
12690
|
g.title && /* @__PURE__ */ i("h3", { className: "font-semibold text-base", style: { color: "var(--metakyc-text-primary, #111827)" }, children: G(g.title, d) }),
|
|
12691
12691
|
g.subtitle && /* @__PURE__ */ i("p", { className: "text-sm mt-0.5", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: G(g.subtitle, d) })
|
|
12692
12692
|
] }),
|
|
12693
|
-
(M || v.length > 0) && /* @__PURE__ */
|
|
12693
|
+
(M || v.length > 0) && /* @__PURE__ */ s("div", { className: "mb-4 p-3 rounded-lg", style: {
|
|
12694
12694
|
backgroundColor: "var(--metakyc-danger-bg, color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent))",
|
|
12695
12695
|
border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 30%, transparent)"
|
|
12696
12696
|
}, children: [
|
|
12697
|
-
M && /* @__PURE__ */
|
|
12697
|
+
M && /* @__PURE__ */ s("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: [
|
|
12698
12698
|
/* @__PURE__ */ i("strong", { children: d("common.errorPrefix") }),
|
|
12699
12699
|
" ",
|
|
12700
12700
|
M
|
|
12701
12701
|
] }),
|
|
12702
12702
|
v.map((ae, se) => /* @__PURE__ */ i("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: ae }, se))
|
|
12703
12703
|
] }),
|
|
12704
|
-
u > 1 && /* @__PURE__ */
|
|
12704
|
+
u > 1 && /* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem", marginBottom: "1rem" }, children: [
|
|
12705
12705
|
T.map((ae, se) => /* @__PURE__ */ i(
|
|
12706
12706
|
"div",
|
|
12707
12707
|
{
|
|
@@ -12714,16 +12714,16 @@ const Ua = ({
|
|
|
12714
12714
|
},
|
|
12715
12715
|
se
|
|
12716
12716
|
)),
|
|
12717
|
-
/* @__PURE__ */
|
|
12717
|
+
/* @__PURE__ */ s("span", { style: { fontSize: "0.75rem", color: "var(--metakyc-text-muted, #9ca3af)", flexShrink: 0 }, children: [
|
|
12718
12718
|
ye + 1,
|
|
12719
12719
|
" / ",
|
|
12720
12720
|
u
|
|
12721
12721
|
] })
|
|
12722
12722
|
] }),
|
|
12723
|
-
|
|
12723
|
+
dt(g)
|
|
12724
12724
|
] }),
|
|
12725
|
-
/* @__PURE__ */
|
|
12726
|
-
/* @__PURE__ */
|
|
12725
|
+
/* @__PURE__ */ s(Re, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
12726
|
+
/* @__PURE__ */ s("div", { children: [
|
|
12727
12727
|
!I && /* @__PURE__ */ i(
|
|
12728
12728
|
Z,
|
|
12729
12729
|
{
|
|
@@ -12738,24 +12738,24 @@ const Ua = ({
|
|
|
12738
12738
|
),
|
|
12739
12739
|
I && r && /* @__PURE__ */ i(Z, { type: "button", variant: "outline", onClick: r, disabled: F || m, children: "Cancel" })
|
|
12740
12740
|
] }),
|
|
12741
|
-
/* @__PURE__ */ i(Z, { type: "button", isLoading: F || m, disabled: N, onClick: b ?
|
|
12741
|
+
/* @__PURE__ */ i(Z, { type: "button", isLoading: F || m, disabled: N, onClick: b ? Ye : Ae, children: x })
|
|
12742
12742
|
] })
|
|
12743
12743
|
] }) });
|
|
12744
12744
|
}
|
|
12745
|
-
return /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i("form", { onSubmit:
|
|
12746
|
-
/* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i(
|
|
12747
|
-
/* @__PURE__ */
|
|
12745
|
+
return /* @__PURE__ */ i("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i("form", { onSubmit: ct, children: /* @__PURE__ */ s(ne, { children: [
|
|
12746
|
+
/* @__PURE__ */ i(Te, { children: /* @__PURE__ */ i(kt, { title: (o == null ? void 0 : o.title) || d("createCompany.title") }) }),
|
|
12747
|
+
/* @__PURE__ */ s(oe, { children: [
|
|
12748
12748
|
M && /* @__PURE__ */ i("div", { className: "mb-6 p-4 rounded-lg", style: {
|
|
12749
12749
|
backgroundColor: "var(--metakyc-danger-bg, color-mix(in srgb, var(--metakyc-danger, #ef4444) 10%, transparent))",
|
|
12750
12750
|
border: "1px solid color-mix(in srgb, var(--metakyc-danger, #ef4444) 30%, transparent)"
|
|
12751
|
-
}, children: /* @__PURE__ */
|
|
12751
|
+
}, children: /* @__PURE__ */ s("p", { className: "text-sm", style: { color: "var(--metakyc-danger, #ef4444)" }, children: [
|
|
12752
12752
|
/* @__PURE__ */ i("strong", { children: d("common.errorPrefix") }),
|
|
12753
12753
|
" ",
|
|
12754
12754
|
M
|
|
12755
12755
|
] }) }),
|
|
12756
|
-
/* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: B.map((g) => /* @__PURE__ */ i("div", { style: { gridColumn: "span 4 / span 4" }, children:
|
|
12756
|
+
/* @__PURE__ */ i("div", { className: "metakyc-form-grid", children: B.map((g) => /* @__PURE__ */ i("div", { style: { gridColumn: "span 4 / span 4" }, children: at(g) }, g)) })
|
|
12757
12757
|
] }),
|
|
12758
|
-
/* @__PURE__ */
|
|
12758
|
+
/* @__PURE__ */ s(Re, { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
12759
12759
|
r && /* @__PURE__ */ i(Z, { type: "button", variant: "outline", onClick: r, disabled: F || m, children: "Cancel" }),
|
|
12760
12760
|
/* @__PURE__ */ i(Z, { type: "submit", isLoading: F || m, children: d("createCompany.registerCompany") })
|
|
12761
12761
|
] })
|
|
@@ -12768,7 +12768,7 @@ const Ua = ({
|
|
|
12768
12768
|
}) => {
|
|
12769
12769
|
const { t: n } = Ie(), {
|
|
12770
12770
|
progress: l,
|
|
12771
|
-
currentStep:
|
|
12771
|
+
currentStep: o,
|
|
12772
12772
|
steps: p,
|
|
12773
12773
|
workflowKey: m,
|
|
12774
12774
|
nextWorkflowKey: d,
|
|
@@ -12785,28 +12785,28 @@ const Ua = ({
|
|
|
12785
12785
|
}, [l == null ? void 0 : l.workflowResult, t]), Ne.useEffect(() => {
|
|
12786
12786
|
y && T(!1);
|
|
12787
12787
|
}, [y]), w || !l)
|
|
12788
|
-
return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${r || ""}`, children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */
|
|
12788
|
+
return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${r || ""}`, children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
|
|
12789
12789
|
/* @__PURE__ */ i(Be, { className: "my-8" }),
|
|
12790
12790
|
/* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n("workflow.loadingWorkflow") })
|
|
12791
12791
|
] }) }) });
|
|
12792
12792
|
if (z)
|
|
12793
|
-
return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${r || ""}`, children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */
|
|
12793
|
+
return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${r || ""}`, children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { className: "text-center py-8", children: [
|
|
12794
12794
|
/* @__PURE__ */ i("p", { className: "text-lg mb-4", style: { color: "var(--metakyc-danger, #ef4444)" }, children: n("workflow.errorOccurred") }),
|
|
12795
12795
|
/* @__PURE__ */ i("p", { style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: z.message })
|
|
12796
12796
|
] }) }) }) });
|
|
12797
12797
|
if (y && !q)
|
|
12798
|
-
return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${r || ""}`, children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */
|
|
12798
|
+
return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${r || ""}`, children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ s("div", { className: "text-center py-8", children: [
|
|
12799
12799
|
/* @__PURE__ */ i("div", { className: "mb-6", children: /* @__PURE__ */ i("div", { className: "inline-flex items-center justify-center w-16 h-16 rounded-full mb-4", style: { backgroundColor: "var(--metakyc-primary-light, #dbeafe)" }, children: /* @__PURE__ */ i("svg", { className: "w-8 h-8", style: { color: "var(--metakyc-primary, #2563eb)" }, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }) }) }),
|
|
12800
12800
|
/* @__PURE__ */ i("h3", { className: "text-xl font-semibold mb-2", style: { color: "var(--metakyc-text-primary, #111827)" }, children: n("workflow.workflowTransition") }),
|
|
12801
12801
|
/* @__PURE__ */ i("p", { className: "mb-6", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: n("workflow.workflowUpdatedMessage") }),
|
|
12802
|
-
/* @__PURE__ */
|
|
12803
|
-
/* @__PURE__ */
|
|
12804
|
-
/* @__PURE__ */
|
|
12802
|
+
/* @__PURE__ */ s("div", { className: "rounded-lg p-4 mb-6 max-w-md mx-auto", style: { backgroundColor: "var(--metakyc-surface, #f9fafb)" }, children: [
|
|
12803
|
+
/* @__PURE__ */ s("div", { className: "flex items-center justify-between text-sm", children: [
|
|
12804
|
+
/* @__PURE__ */ s("div", { className: "text-left", children: [
|
|
12805
12805
|
/* @__PURE__ */ i("p", { className: "mb-1", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: n("workflow.previousWorkflow") }),
|
|
12806
12806
|
/* @__PURE__ */ i("p", { className: "font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: m })
|
|
12807
12807
|
] }),
|
|
12808
12808
|
/* @__PURE__ */ i("svg", { className: "w-6 h-6 mx-4", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ i("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 7l5 5m0 0l-5 5m5-5H6" }) }),
|
|
12809
|
-
/* @__PURE__ */
|
|
12809
|
+
/* @__PURE__ */ s("div", { className: "text-right", children: [
|
|
12810
12810
|
/* @__PURE__ */ i("p", { className: "mb-1", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: n("workflow.newWorkflow") }),
|
|
12811
12811
|
/* @__PURE__ */ i("p", { className: "font-medium", style: { color: "var(--metakyc-primary, #2563eb)" }, children: d })
|
|
12812
12812
|
] })
|
|
@@ -12825,7 +12825,7 @@ const Ua = ({
|
|
|
12825
12825
|
] }) }) }) });
|
|
12826
12826
|
if (l.status === Ue.Finished || l.status === Ue.OnHold)
|
|
12827
12827
|
return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${r || ""}`, children: /* @__PURE__ */ i(
|
|
12828
|
-
|
|
12828
|
+
_t,
|
|
12829
12829
|
{
|
|
12830
12830
|
kycStatus: l.kycStatus,
|
|
12831
12831
|
reviewStatus: l.reviewStatus,
|
|
@@ -12837,8 +12837,8 @@ const Ua = ({
|
|
|
12837
12837
|
}
|
|
12838
12838
|
}
|
|
12839
12839
|
) });
|
|
12840
|
-
if (!
|
|
12841
|
-
return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${r || ""}`, children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */
|
|
12840
|
+
if (!o)
|
|
12841
|
+
return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${r || ""}`, children: /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { children: [
|
|
12842
12842
|
/* @__PURE__ */ i(Be, { className: "my-8" }),
|
|
12843
12843
|
/* @__PURE__ */ i("p", { className: "text-center mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: l.status === Ue.IdentityPending ? n("workflow.loadingIdentityVerification") : n("workflow.loadingCurrentStep") })
|
|
12844
12844
|
] }) }) });
|
|
@@ -12866,8 +12866,8 @@ const Ua = ({
|
|
|
12866
12866
|
return "";
|
|
12867
12867
|
}
|
|
12868
12868
|
}, O = () => {
|
|
12869
|
-
const H = p.filter((V) => V.visibility !== !1), J = H.findIndex((V) => V.order ===
|
|
12870
|
-
return /* @__PURE__ */
|
|
12869
|
+
const H = p.filter((V) => V.visibility !== !1), J = H.findIndex((V) => V.order === o.order), re = J >= 0 ? J + 1 : 1, h = H.length, R = h > 1 ? (J + 1) / h * 100 : 100;
|
|
12870
|
+
return /* @__PURE__ */ s("div", { className: "metakyc-progress-wrapper", style: {
|
|
12871
12871
|
marginBottom: "24px",
|
|
12872
12872
|
backgroundColor: "var(--metakyc-surface, var(--metakyc-background, #ffffff))",
|
|
12873
12873
|
borderRadius: "0.75rem",
|
|
@@ -12875,11 +12875,11 @@ const Ua = ({
|
|
|
12875
12875
|
padding: "1rem 1.5rem",
|
|
12876
12876
|
overflow: "hidden"
|
|
12877
12877
|
}, children: [
|
|
12878
|
-
/* @__PURE__ */
|
|
12879
|
-
/* @__PURE__ */ i(
|
|
12878
|
+
/* @__PURE__ */ s("div", { style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between", marginBottom: "16px", gap: "8px", flexWrap: "wrap" }, children: [
|
|
12879
|
+
/* @__PURE__ */ i(kt, {}),
|
|
12880
12880
|
/* @__PURE__ */ i(oi, { variant: l.status === 1 ? "info" : "success", children: n("common.stepXofY", { current: re, total: h }) })
|
|
12881
12881
|
] }),
|
|
12882
|
-
/* @__PURE__ */
|
|
12882
|
+
/* @__PURE__ */ s("div", { style: { position: "relative", height: "4px", borderRadius: "999px", overflow: "hidden", marginBottom: "16px" }, children: [
|
|
12883
12883
|
/* @__PURE__ */ i("div", { style: { position: "absolute", inset: 0, backgroundColor: "var(--metakyc-border, #e5e7eb)", opacity: 0.3 } }),
|
|
12884
12884
|
/* @__PURE__ */ i("div", { style: {
|
|
12885
12885
|
position: "absolute",
|
|
@@ -12903,14 +12903,14 @@ const Ua = ({
|
|
|
12903
12903
|
)
|
|
12904
12904
|
] });
|
|
12905
12905
|
}, U = () => {
|
|
12906
|
-
const re = p.filter((R) => R.visibility !== !1).findIndex((R) => R.order ===
|
|
12906
|
+
const re = p.filter((R) => R.visibility !== !1).findIndex((R) => R.order === o.order) <= 0, h = {
|
|
12907
12907
|
applicantId: e,
|
|
12908
12908
|
onComplete: async () => {
|
|
12909
12909
|
await C();
|
|
12910
12910
|
},
|
|
12911
12911
|
onBack: re ? void 0 : L
|
|
12912
12912
|
};
|
|
12913
|
-
switch (
|
|
12913
|
+
switch (o.action) {
|
|
12914
12914
|
case me.Questionaries:
|
|
12915
12915
|
return /* @__PURE__ */ i(ta, { ...h });
|
|
12916
12916
|
case me.UploadDocument:
|
|
@@ -12928,7 +12928,7 @@ const Ua = ({
|
|
|
12928
12928
|
return /* @__PURE__ */ i(ya, { ...h });
|
|
12929
12929
|
case me.ManualReview:
|
|
12930
12930
|
return /* @__PURE__ */ i(
|
|
12931
|
-
|
|
12931
|
+
_t,
|
|
12932
12932
|
{
|
|
12933
12933
|
kycStatus: l.kycStatus,
|
|
12934
12934
|
reviewStatus: l.reviewStatus,
|
|
@@ -12937,22 +12937,22 @@ const Ua = ({
|
|
|
12937
12937
|
}
|
|
12938
12938
|
);
|
|
12939
12939
|
default:
|
|
12940
|
-
return /* @__PURE__ */ i(ne, { children: /* @__PURE__ */
|
|
12940
|
+
return /* @__PURE__ */ i(ne, { children: /* @__PURE__ */ s(oe, { className: "py-12 text-center", children: [
|
|
12941
12941
|
/* @__PURE__ */ i("div", { className: "mb-4", children: /* @__PURE__ */ i(Be, {}) }),
|
|
12942
|
-
/* @__PURE__ */
|
|
12942
|
+
/* @__PURE__ */ s("p", { className: "text-gray-600 dark:text-gray-400 mb-2", children: [
|
|
12943
12943
|
n("workflow.processingStep"),
|
|
12944
12944
|
" ",
|
|
12945
|
-
|
|
12945
|
+
o.title || o.name
|
|
12946
12946
|
] }),
|
|
12947
|
-
/* @__PURE__ */
|
|
12947
|
+
/* @__PURE__ */ s("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
|
|
12948
12948
|
n("workflow.actionType"),
|
|
12949
12949
|
" ",
|
|
12950
|
-
me[
|
|
12950
|
+
me[o.action]
|
|
12951
12951
|
] })
|
|
12952
12952
|
] }) });
|
|
12953
12953
|
}
|
|
12954
12954
|
};
|
|
12955
|
-
return /* @__PURE__ */
|
|
12955
|
+
return /* @__PURE__ */ s("div", { className: `metakyc-sdk ${r || ""}`, children: [
|
|
12956
12956
|
O(),
|
|
12957
12957
|
U()
|
|
12958
12958
|
] });
|
|
@@ -12961,8 +12961,8 @@ const Ua = ({
|
|
|
12961
12961
|
const n = Ne.useRef(null), l = Ne.useRef(null);
|
|
12962
12962
|
return Ne.useImperativeHandle(r, () => n.current), Ne.useEffect(() => {
|
|
12963
12963
|
if (l.current && n.current) {
|
|
12964
|
-
const
|
|
12965
|
-
|
|
12964
|
+
const o = n.current, p = l.current, m = p.offsetLeft - o.offsetWidth / 2 + p.offsetWidth / 2;
|
|
12965
|
+
o.scrollTo({ left: Math.max(0, m), behavior: "smooth" });
|
|
12966
12966
|
}
|
|
12967
12967
|
}, [t]), /* @__PURE__ */ i(
|
|
12968
12968
|
"div",
|
|
@@ -12981,10 +12981,10 @@ const Ua = ({
|
|
|
12981
12981
|
padding: "4px 0",
|
|
12982
12982
|
gap: "0"
|
|
12983
12983
|
},
|
|
12984
|
-
children: e.map((
|
|
12985
|
-
const m = p < t, d = p === t, y = m || d, w =
|
|
12986
|
-
return /* @__PURE__ */
|
|
12987
|
-
/* @__PURE__ */
|
|
12984
|
+
children: e.map((o, p) => {
|
|
12985
|
+
const m = p < t, d = p === t, y = m || d, w = o.displayName || o.name || a(o.action) || `Step ${p + 1}`;
|
|
12986
|
+
return /* @__PURE__ */ s(Ne.Fragment, { children: [
|
|
12987
|
+
/* @__PURE__ */ s(
|
|
12988
12988
|
"div",
|
|
12989
12989
|
{
|
|
12990
12990
|
ref: d ? l : void 0,
|
|
@@ -13036,19 +13036,19 @@ const Ua = ({
|
|
|
13036
13036
|
opacity: m ? 1 : 0.25,
|
|
13037
13037
|
transition: "opacity 0.2s ease"
|
|
13038
13038
|
} })
|
|
13039
|
-
] },
|
|
13039
|
+
] }, o.order);
|
|
13040
13040
|
})
|
|
13041
13041
|
}
|
|
13042
13042
|
);
|
|
13043
13043
|
}
|
|
13044
13044
|
);
|
|
13045
13045
|
function Ka(e) {
|
|
13046
|
-
return
|
|
13047
|
-
questionResults:
|
|
13046
|
+
return Ze.object({
|
|
13047
|
+
questionResults: Ze.any()
|
|
13048
13048
|
}).passthrough();
|
|
13049
13049
|
}
|
|
13050
13050
|
function Sa(e) {
|
|
13051
|
-
let t =
|
|
13051
|
+
let t = Ze.array(Ze.instanceof(File));
|
|
13052
13052
|
if (e.isRequired ? t = t.min(
|
|
13053
13053
|
1,
|
|
13054
13054
|
`${e.displayName} is required`
|
|
@@ -13074,24 +13074,24 @@ function Ya(e) {
|
|
|
13074
13074
|
return e.uploadDocumentFiles.forEach((a) => {
|
|
13075
13075
|
const r = `file_${a.id}`;
|
|
13076
13076
|
t[r] = Sa(a);
|
|
13077
|
-
}),
|
|
13077
|
+
}), Ze.object(t);
|
|
13078
13078
|
}
|
|
13079
13079
|
function Ha(e) {
|
|
13080
|
-
return
|
|
13080
|
+
return Ze.any();
|
|
13081
13081
|
}
|
|
13082
13082
|
function Ca(e) {
|
|
13083
|
-
return
|
|
13083
|
+
return Ze.string().min(1, "This question is required");
|
|
13084
13084
|
}
|
|
13085
13085
|
function $a(e) {
|
|
13086
13086
|
const t = {};
|
|
13087
13087
|
return e.appropriatenessQuestions.forEach((a) => {
|
|
13088
13088
|
const r = `question_${a.id}`;
|
|
13089
13089
|
t[r] = Ca();
|
|
13090
|
-
}),
|
|
13090
|
+
}), Ze.object(t);
|
|
13091
13091
|
}
|
|
13092
|
-
const _a =
|
|
13092
|
+
const _a = Ze.any();
|
|
13093
13093
|
export {
|
|
13094
|
-
|
|
13094
|
+
jt as ALLOWED_LANGUAGES,
|
|
13095
13095
|
fi as ApplicantProgressOnHoldReason,
|
|
13096
13096
|
Ue as ApplicantProgressStatus,
|
|
13097
13097
|
Ei as ApplicantService,
|
|
@@ -13102,13 +13102,13 @@ export {
|
|
|
13102
13102
|
oi as Badge,
|
|
13103
13103
|
Vi as BaseInformationService,
|
|
13104
13104
|
Z as Button,
|
|
13105
|
-
|
|
13105
|
+
mt as COMPANY_FIELD_METADATA,
|
|
13106
13106
|
ne as Card,
|
|
13107
13107
|
oe as CardContent,
|
|
13108
13108
|
Re as CardFooter,
|
|
13109
13109
|
Te as CardHeader,
|
|
13110
13110
|
We as Checkbox,
|
|
13111
|
-
|
|
13111
|
+
it as CountriesType,
|
|
13112
13112
|
qa as CreateApplicantForm,
|
|
13113
13113
|
Ua as CreateCompanyApplicantForm,
|
|
13114
13114
|
Ni as CriteriaBuiltInType,
|
|
@@ -13116,15 +13116,15 @@ export {
|
|
|
13116
13116
|
Ii as DEFAULT_VISIBLE_FIELDS,
|
|
13117
13117
|
wi as DocumentReviewStatus,
|
|
13118
13118
|
Ai as EndpointBuilder,
|
|
13119
|
-
|
|
13119
|
+
yt as ErrorHandler,
|
|
13120
13120
|
Gi as EventEmitter,
|
|
13121
|
-
|
|
13121
|
+
lt as FIELD_METADATA,
|
|
13122
13122
|
xi as FileType,
|
|
13123
13123
|
Kr as FileUpload,
|
|
13124
|
-
|
|
13125
|
-
|
|
13124
|
+
wt as GenderType,
|
|
13125
|
+
kt as Header,
|
|
13126
13126
|
Li as HttpClient,
|
|
13127
|
-
|
|
13127
|
+
tt as IdentityProviderManager,
|
|
13128
13128
|
Oi as IdentityService,
|
|
13129
13129
|
qe as IdentityVerificationProvider,
|
|
13130
13130
|
va as IdentityVerificationStep,
|
|
@@ -13134,12 +13134,12 @@ export {
|
|
|
13134
13134
|
Ee as InvestorCategorizationType,
|
|
13135
13135
|
Ti as InvestorCategoryType,
|
|
13136
13136
|
hi as KycProcessStatus,
|
|
13137
|
-
|
|
13138
|
-
|
|
13137
|
+
Jt as KycStatus,
|
|
13138
|
+
_t as KycStatusDisplay,
|
|
13139
13139
|
Wa as KycWorkflow,
|
|
13140
13140
|
ba as Logo,
|
|
13141
13141
|
ai as MetaKYCContext,
|
|
13142
|
-
|
|
13142
|
+
Ge as MetaKYCError,
|
|
13143
13143
|
Da as MetaKYCProvider,
|
|
13144
13144
|
Ur as MultiSelect,
|
|
13145
13145
|
ir as OnfidoProvider,
|
|
@@ -13148,15 +13148,15 @@ export {
|
|
|
13148
13148
|
Yr as PhoneInput,
|
|
13149
13149
|
Pi as QuestionnaireService,
|
|
13150
13150
|
ta as QuestionnaireStep,
|
|
13151
|
-
|
|
13151
|
+
Ke as ReviewStatus,
|
|
13152
13152
|
Ci as RiskCriteriaType,
|
|
13153
13153
|
ki as RiskLevel,
|
|
13154
13154
|
Fi as RiskScoringService,
|
|
13155
13155
|
ua as RiskScoringStep,
|
|
13156
13156
|
ii as SDK_VERSION,
|
|
13157
13157
|
rr as SardinAIProvider,
|
|
13158
|
-
|
|
13159
|
-
|
|
13158
|
+
Xe as SearchableSelect,
|
|
13159
|
+
Et as Select,
|
|
13160
13160
|
Be as Spinner,
|
|
13161
13161
|
Xi as StepRouter,
|
|
13162
13162
|
tr as SumsubProvider,
|
|
@@ -13168,9 +13168,9 @@ export {
|
|
|
13168
13168
|
Di as UploadDocumentService,
|
|
13169
13169
|
aa as UploadDocumentStep,
|
|
13170
13170
|
bi as UserType,
|
|
13171
|
-
|
|
13171
|
+
Qe as ValueDataType,
|
|
13172
13172
|
Zi as WorkflowOrchestrator,
|
|
13173
|
-
|
|
13173
|
+
xt as WorkflowResultType,
|
|
13174
13174
|
Qi as WorkflowState,
|
|
13175
13175
|
me as WorkflowStepAction,
|
|
13176
13176
|
_a as appropriatenessTestSchema,
|
|
@@ -13183,14 +13183,14 @@ export {
|
|
|
13183
13183
|
Pe as defaultTheme,
|
|
13184
13184
|
Rr as fileToBase64,
|
|
13185
13185
|
Ui as fintechTheme,
|
|
13186
|
-
|
|
13186
|
+
Ct as formatFileSize,
|
|
13187
13187
|
$a as generateAppropriatenessSchema,
|
|
13188
13188
|
Ka as generateQuestionnaireSchema,
|
|
13189
13189
|
Ha as generateRiskScoringSchema,
|
|
13190
13190
|
Ya as generateUploadDocumentSchema,
|
|
13191
13191
|
Fa as getAcceptString,
|
|
13192
13192
|
zr as getApplicantId,
|
|
13193
|
-
|
|
13193
|
+
ft as getThemePreset,
|
|
13194
13194
|
Oa as getWorkflowState,
|
|
13195
13195
|
Wi as healthcareTheme,
|
|
13196
13196
|
Ea as isScriptLoaded,
|