@vpdev2/metakyc-sdk 1.0.44 → 1.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- var at = Object.defineProperty;
2
- var nt = (e, t, r) => t in e ? at(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var G = (e, t, r) => nt(e, typeof t != "symbol" ? t + "" : t, r);
4
- import st from "axios";
5
- import * as Ye from "react";
6
- import ye, { createContext as it, useState as x, useMemo as Se, useEffect as ee, useContext as lt, useRef as te, useCallback as Q, forwardRef as Te, createElement as je } from "react";
7
- import { jsx as a, jsxs as i, Fragment as ot } from "react/jsx-runtime";
8
- import { useForm as ct, Controller as Ie } from "react-hook-form";
9
- import { z as ke } from "zod";
10
- var U = /* @__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))(U || {}), $e = /* @__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))($e || {}), xe = /* @__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))(xe || {}), dt = /* @__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))(dt || {}), ut = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(ut || {}), Ee = /* @__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))(Ee || {}), Re = /* @__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))(Re || {}), mt = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(mt || {}), pt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(pt || {}), fe = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(fe || {}), ht = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(ht || {}), Be = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(Be || {}), gt = /* @__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))(gt || {}), yt = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(yt || {}), ft = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(ft || {}), Ce = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Decimal = 2] = "Decimal", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))(Ce || {}), xt = /* @__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))(xt || {}), bt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(bt || {}), pe = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(pe || {}), vt = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(vt || {});
11
- const _e = {
1
+ var lt = Object.defineProperty;
2
+ var ot = (e, t, r) => t in e ? lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var V = (e, t, r) => ot(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import ct from "axios";
5
+ import * as Ze from "react";
6
+ import ge, { createContext as dt, useState as x, useMemo as ke, useEffect as X, useContext as ut, useRef as J, useCallback as Y, forwardRef as $e, createElement as We } from "react";
7
+ import { jsx as a, jsxs as i, Fragment as mt } from "react/jsx-runtime";
8
+ import { useForm as pt, Controller as Ie } from "react-hook-form";
9
+ import { z as Ne } from "zod";
10
+ var _ = /* @__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))(_ || {}), _e = /* @__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))(_e || {}), fe = /* @__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))(fe || {}), ht = /* @__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))(ht || {}), gt = /* @__PURE__ */ ((e) => (e[e.LowRisk = 0] = "LowRisk", e[e.MediumRisk = 1] = "MediumRisk", e[e.HighRisk = 2] = "HighRisk", e[e.Alert = 3] = "Alert", e))(gt || {}), Ee = /* @__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))(Ee || {}), Re = /* @__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))(Re || {}), yt = /* @__PURE__ */ ((e) => (e[e.ProviderResultPending = 0] = "ProviderResultPending", e[e.ProviderResultReceived = 1] = "ProviderResultReceived", e[e.Canceled = 2] = "Canceled", e[e.ExtendedToNewApplicant = 3] = "ExtendedToNewApplicant", e))(yt || {}), ft = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.ProviderResultPending = 1] = "ProviderResultPending", e[e.ProviderResultReceived = 2] = "ProviderResultReceived", e[e.Canceled = 3] = "Canceled", e))(ft || {}), ye = /* @__PURE__ */ ((e) => (e[e.Onfido = 0] = "Onfido", e[e.Sumsub = 2] = "Sumsub", e[e.SardinAI = 3] = "SardinAI", e))(ye || {}), xt = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Company = 1] = "Company", e))(xt || {}), Ue = /* @__PURE__ */ ((e) => (e[e.Male = 0] = "Male", e[e.Female = 1] = "Female", e[e.Other = 2] = "Other", e))(Ue || {}), bt = /* @__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))(bt || {}), vt = /* @__PURE__ */ ((e) => (e[e.Pending = 0] = "Pending", e[e.Approved = 1] = "Approved", e[e.Rejected = 2] = "Rejected", e[e.RequiresRevision = 3] = "RequiresRevision", e))(vt || {}), wt = /* @__PURE__ */ ((e) => (e[e.SingleChoice = 0] = "SingleChoice", e[e.MultipleChoice = 1] = "MultipleChoice", e[e.Text = 2] = "Text", e))(wt || {}), Ce = /* @__PURE__ */ ((e) => (e[e.String = 0] = "String", e[e.Integer = 1] = "Integer", e[e.Decimal = 2] = "Decimal", e[e.Boolean = 3] = "Boolean", e[e.Date = 4] = "Date", e[e.Country = 5] = "Country", e[e.DigitOnly = 6] = "DigitOnly", e))(Ce || {}), kt = /* @__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))(kt || {}), Nt = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Country = 1] = "Country", e))(Nt || {}), pe = /* @__PURE__ */ ((e) => (e[e.Individual = 0] = "Individual", e[e.Sophisticated = 1] = "Sophisticated", e[e.HighNetWorth = 2] = "HighNetWorth", e[e.Business = 3] = "Business", e))(pe || {}), St = /* @__PURE__ */ ((e) => (e[e.Retail = 0] = "Retail", e[e.Professional = 1] = "Professional", e[e.EligibleCounterparty = 2] = "EligibleCounterparty", e))(St || {});
11
+ const Ke = {
12
12
  firstName: { label: "First Name", type: "text" },
13
13
  lastName: { label: "Last Name", type: "text" },
14
14
  email: { label: "Email", type: "email" },
@@ -31,13 +31,13 @@ const _e = {
31
31
  defaultLanguage: { label: "Default Language", type: "select" },
32
32
  educationLevel: { label: "Education Level", type: "text" },
33
33
  occupation: { label: "Occupation", type: "text" }
34
- }, wt = [
34
+ }, Ct = [
35
35
  "firstName",
36
36
  "lastName",
37
37
  "email",
38
38
  "phonenumber",
39
39
  "dateOfBirth"
40
- ], Qe = [
40
+ ], Je = [
41
41
  { value: "EN", label: "English" },
42
42
  { value: "DE", label: "German" },
43
43
  { value: "FR", label: "French" },
@@ -57,7 +57,7 @@ const _e = {
57
57
  { value: "NO", label: "Norwegian" }
58
58
  ];
59
59
  var se = /* @__PURE__ */ ((e) => (e.Default = "default", e.Corporate = "corporate", e.Fintech = "fintech", e.Healthcare = "healthcare", e.Modern = "modern", e.Minimal = "minimal", e))(se || {});
60
- const kt = {
60
+ const At = {
61
61
  timeout: 3e4,
62
62
  retries: 3,
63
63
  locale: "en",
@@ -65,7 +65,7 @@ const kt = {
65
65
  pattern: "host-controller"
66
66
  }
67
67
  };
68
- class Nt {
68
+ class It {
69
69
  constructor(t) {
70
70
  this.config = t;
71
71
  }
@@ -108,11 +108,11 @@ class Nt {
108
108
  class we extends Error {
109
109
  constructor(r, n, s, l, o) {
110
110
  super(r);
111
- G(this, "response");
111
+ V(this, "response");
112
112
  this.code = n, this.details = s, this.validationErrors = l, this.name = "MetaKYCError", this.response = o, Object.setPrototypeOf(this, we.prototype);
113
113
  }
114
114
  }
115
- class Le {
115
+ class Te {
116
116
  /**
117
117
  * Process an error from the API response
118
118
  */
@@ -162,12 +162,12 @@ class Le {
162
162
  return t instanceof we;
163
163
  }
164
164
  }
165
- class St {
165
+ class Et {
166
166
  constructor(t) {
167
- G(this, "axiosInstance");
168
- G(this, "endpointBuilder");
169
- G(this, "config");
170
- this.config = { ...kt, ...t }, this.endpointBuilder = new Nt(this.config.endpoints), this.axiosInstance = st.create({
167
+ V(this, "axiosInstance");
168
+ V(this, "endpointBuilder");
169
+ V(this, "config");
170
+ this.config = { ...At, ...t }, this.endpointBuilder = new It(this.config.endpoints), this.axiosInstance = ct.create({
171
171
  baseURL: this.config.baseUrl,
172
172
  timeout: this.config.timeout,
173
173
  headers: {
@@ -203,7 +203,7 @@ class St {
203
203
  });
204
204
  return this.handleResponse(l);
205
205
  } catch (s) {
206
- throw Le.handleAxiosError(s);
206
+ throw Te.handleAxiosError(s);
207
207
  }
208
208
  }
209
209
  /**
@@ -214,7 +214,7 @@ class St {
214
214
  const s = this.buildEndpoint(t, r), l = await this.axiosInstance.post(s, n);
215
215
  return this.handleResponse(l);
216
216
  } catch (s) {
217
- throw Le.handleAxiosError(s);
217
+ throw Te.handleAxiosError(s);
218
218
  }
219
219
  }
220
220
  /**
@@ -225,7 +225,7 @@ class St {
225
225
  const s = this.buildEndpoint(t, r), l = await this.axiosInstance.put(s, n);
226
226
  return this.handleResponse(l);
227
227
  } catch (s) {
228
- throw Le.handleAxiosError(s);
228
+ throw Te.handleAxiosError(s);
229
229
  }
230
230
  }
231
231
  /**
@@ -238,7 +238,7 @@ class St {
238
238
  });
239
239
  return this.handleResponse(l);
240
240
  } catch (s) {
241
- throw Le.handleAxiosError(s);
241
+ throw Te.handleAxiosError(s);
242
242
  }
243
243
  }
244
244
  /**
@@ -247,7 +247,7 @@ class St {
247
247
  handleResponse(t) {
248
248
  const r = t.data;
249
249
  if (!r.success && r.error)
250
- throw Le.handleApiError(r.error);
250
+ throw Te.handleApiError(r.error);
251
251
  return r;
252
252
  }
253
253
  /**
@@ -257,7 +257,7 @@ class St {
257
257
  return this.axiosInstance;
258
258
  }
259
259
  }
260
- class Ct {
260
+ class Rt {
261
261
  constructor(t) {
262
262
  this.httpClient = t;
263
263
  }
@@ -376,7 +376,7 @@ class Ct {
376
376
  )).result;
377
377
  }
378
378
  }
379
- class At {
379
+ class Ft {
380
380
  constructor(t) {
381
381
  this.httpClient = t;
382
382
  }
@@ -403,7 +403,7 @@ class At {
403
403
  )).result;
404
404
  }
405
405
  }
406
- class It {
406
+ class Dt {
407
407
  constructor(t) {
408
408
  this.httpClient = t;
409
409
  }
@@ -431,7 +431,7 @@ class It {
431
431
  await this.httpClient.post("UploadDocument", "ReviewUploadDocument", t);
432
432
  }
433
433
  }
434
- class Et {
434
+ class Pt {
435
435
  constructor(t) {
436
436
  this.httpClient = t;
437
437
  }
@@ -457,7 +457,7 @@ class Et {
457
457
  )).result;
458
458
  }
459
459
  }
460
- class Rt {
460
+ class Lt {
461
461
  constructor(t) {
462
462
  this.httpClient = t;
463
463
  }
@@ -479,7 +479,7 @@ class Rt {
479
479
  await this.httpClient.get("Applicant", "PassOverview", { applicantId: t });
480
480
  }
481
481
  }
482
- class Ft {
482
+ class Mt {
483
483
  constructor(t) {
484
484
  this.httpClient = t;
485
485
  }
@@ -514,7 +514,7 @@ class Ft {
514
514
  )).result;
515
515
  }
516
516
  }
517
- class Dt {
517
+ class Tt {
518
518
  constructor(t) {
519
519
  this.httpClient = t;
520
520
  }
@@ -569,7 +569,7 @@ class Dt {
569
569
  return this.identityCompanyRequest(r);
570
570
  }
571
571
  }
572
- class Pt {
572
+ class Ot {
573
573
  constructor(t) {
574
574
  this.httpClient = t;
575
575
  }
@@ -605,7 +605,7 @@ class Pt {
605
605
  )).result;
606
606
  }
607
607
  }
608
- class Lt {
608
+ class $t {
609
609
  constructor(t) {
610
610
  this.httpClient = t;
611
611
  }
@@ -690,7 +690,7 @@ const de = {
690
690
  textMuted: "#9ca3af"
691
691
  }
692
692
  }
693
- }, Mt = {
693
+ }, Bt = {
694
694
  name: "Corporate",
695
695
  logo: {
696
696
  url: "",
@@ -723,7 +723,7 @@ const de = {
723
723
  cardPadding: "1.5rem",
724
724
  inputHeight: "2.5rem"
725
725
  }
726
- }, Tt = {
726
+ }, zt = {
727
727
  name: "Fintech",
728
728
  logo: {
729
729
  url: "",
@@ -756,7 +756,7 @@ const de = {
756
756
  cardPadding: "2rem",
757
757
  inputHeight: "3rem"
758
758
  }
759
- }, Ot = {
759
+ }, _t = {
760
760
  name: "Healthcare",
761
761
  logo: {
762
762
  url: "",
@@ -798,7 +798,7 @@ const de = {
798
798
  textSecondary: "#CBD5E1"
799
799
  }
800
800
  }
801
- }, $t = {
801
+ }, Ut = {
802
802
  name: "Modern",
803
803
  logo: {
804
804
  url: "",
@@ -831,7 +831,7 @@ const de = {
831
831
  cardPadding: "2rem",
832
832
  inputHeight: "3rem"
833
833
  }
834
- }, Bt = {
834
+ }, qt = {
835
835
  name: "Minimal",
836
836
  logo: {
837
837
  url: "",
@@ -864,18 +864,18 @@ const de = {
864
864
  cardPadding: "1.25rem",
865
865
  inputHeight: "2.25rem"
866
866
  }
867
- }, zt = {
867
+ }, Kt = {
868
868
  [se.Default]: de,
869
- [se.Corporate]: Mt,
870
- [se.Fintech]: Tt,
871
- [se.Healthcare]: Ot,
872
- [se.Modern]: $t,
873
- [se.Minimal]: Bt
869
+ [se.Corporate]: Bt,
870
+ [se.Fintech]: zt,
871
+ [se.Healthcare]: _t,
872
+ [se.Modern]: Ut,
873
+ [se.Minimal]: qt
874
874
  };
875
- function Me(e) {
876
- return zt[e] || de;
875
+ function Oe(e) {
876
+ return Kt[e] || de;
877
877
  }
878
- class _t {
878
+ class jt {
879
879
  constructor(t) {
880
880
  this.httpClient = t;
881
881
  }
@@ -890,8 +890,8 @@ class _t {
890
890
  "GetThemeConfiguration"
891
891
  );
892
892
  if (!r.result.isEnabled)
893
- return Me(se.Default);
894
- let n = r.result.preset ? Me(r.result.preset) : Me(se.Default);
893
+ return Oe(se.Default);
894
+ let n = r.result.preset ? Oe(r.result.preset) : Oe(se.Default);
895
895
  if (r.result.title && (n.title = r.result.title), r.result.logo && (n.logo = { ...n.logo, ...r.result.logo }), r.result.colors && (n.colors = { ...n.colors, ...r.result.colors }), r.result.typography && (n.typography = { ...n.typography, ...r.result.typography }), r.result.spacing && (n.spacing = { ...n.spacing, ...r.result.spacing }), r.result.customCSS && (n.customCSS = r.result.customCSS), r.result.darkMode && (n.darkMode = {
896
896
  colors: {
897
897
  ...(t = n.darkMode) == null ? void 0 : t.colors,
@@ -905,7 +905,7 @@ class _t {
905
905
  }
906
906
  return n;
907
907
  } catch (r) {
908
- return console.warn("[ThemeService] Failed to fetch theme configuration:", r), Me(se.Default);
908
+ return console.warn("[ThemeService] Failed to fetch theme configuration:", r), Oe(se.Default);
909
909
  }
910
910
  }
911
911
  /**
@@ -931,7 +931,7 @@ class _t {
931
931
  * Preview theme (doesn't save)
932
932
  */
933
933
  getPreviewTheme(t, r) {
934
- const n = Me(t);
934
+ const n = Oe(t);
935
935
  return r ? {
936
936
  ...n,
937
937
  ...r,
@@ -942,9 +942,9 @@ class _t {
942
942
  } : n;
943
943
  }
944
944
  }
945
- class Ut {
945
+ class Ht {
946
946
  constructor() {
947
- G(this, "listeners", /* @__PURE__ */ new Map());
947
+ V(this, "listeners", /* @__PURE__ */ new Map());
948
948
  }
949
949
  /**
950
950
  * Subscribe to an event
@@ -987,12 +987,12 @@ class Ut {
987
987
  this.listeners.delete(t);
988
988
  }
989
989
  }
990
- class qt {
990
+ class Wt {
991
991
  constructor() {
992
- G(this, "events", new Ut());
993
- G(this, "_applicantId", null);
994
- G(this, "_progress", null);
995
- G(this, "_error", null);
992
+ V(this, "events", new Ht());
993
+ V(this, "_applicantId", null);
994
+ V(this, "_progress", null);
995
+ V(this, "_error", null);
996
996
  }
997
997
  /**
998
998
  * Get current applicant ID
@@ -1025,7 +1025,7 @@ class qt {
1025
1025
  */
1026
1026
  get status() {
1027
1027
  var t;
1028
- return ((t = this._progress) == null ? void 0 : t.status) || xe.None;
1028
+ return ((t = this._progress) == null ? void 0 : t.status) || fe.None;
1029
1029
  }
1030
1030
  /**
1031
1031
  * Get workflow result
@@ -1044,19 +1044,19 @@ class qt {
1044
1044
  * Check if workflow is complete
1045
1045
  */
1046
1046
  get isComplete() {
1047
- return this.status === xe.Finished;
1047
+ return this.status === fe.Finished;
1048
1048
  }
1049
1049
  /**
1050
1050
  * Check if workflow is on hold
1051
1051
  */
1052
1052
  get isOnHold() {
1053
- return this.status === xe.OnHold;
1053
+ return this.status === fe.OnHold;
1054
1054
  }
1055
1055
  /**
1056
1056
  * Check if workflow is in progress
1057
1057
  */
1058
1058
  get isInProgress() {
1059
- return this.status === xe.InProgress;
1059
+ return this.status === fe.InProgress;
1060
1060
  }
1061
1061
  /**
1062
1062
  * Set applicant ID
@@ -1070,7 +1070,7 @@ class qt {
1070
1070
  updateProgress(t) {
1071
1071
  var n, s;
1072
1072
  const r = (n = this._progress) == null ? void 0 : n.currentStep;
1073
- this._progress = t, this._applicantId = t.applicantId, this._error = null, this.events.emit("progressUpdated", t), (r == null ? void 0 : r.order) !== ((s = t.currentStep) == null ? void 0 : s.order) && this.events.emit("stepChanged", t.currentStep), this.events.emit("statusChanged", t.status), t.status === xe.Finished && t.workflowResult && this.events.emit("completed", t.workflowResult);
1073
+ this._progress = t, this._applicantId = t.applicantId, this._error = null, this.events.emit("progressUpdated", t), (r == null ? void 0 : r.order) !== ((s = t.currentStep) == null ? void 0 : s.order) && this.events.emit("stepChanged", t.currentStep), this.events.emit("statusChanged", t.status), t.status === fe.Finished && t.workflowResult && this.events.emit("completed", t.workflowResult);
1074
1074
  }
1075
1075
  /**
1076
1076
  * Set error
@@ -1127,9 +1127,9 @@ class qt {
1127
1127
  this.events.clear();
1128
1128
  }
1129
1129
  }
1130
- class Kt {
1130
+ class Yt {
1131
1131
  constructor() {
1132
- G(this, "handlers", /* @__PURE__ */ new Map());
1132
+ V(this, "handlers", /* @__PURE__ */ new Map());
1133
1133
  }
1134
1134
  /**
1135
1135
  * Register a step handler
@@ -1155,7 +1155,7 @@ class Kt {
1155
1155
  async loadStepData(t, r) {
1156
1156
  const n = this.getHandler(t);
1157
1157
  if (!n)
1158
- throw new Error(`No handler registered for step action: ${U[t]}`);
1158
+ throw new Error(`No handler registered for step action: ${_[t]}`);
1159
1159
  return n.loadData(r);
1160
1160
  }
1161
1161
  /**
@@ -1164,61 +1164,61 @@ class Kt {
1164
1164
  async submitStepData(t, r) {
1165
1165
  const n = this.getHandler(t);
1166
1166
  if (!n)
1167
- throw new Error(`No handler registered for step action: ${U[t]}`);
1167
+ throw new Error(`No handler registered for step action: ${_[t]}`);
1168
1168
  return n.submitData(r);
1169
1169
  }
1170
1170
  }
1171
- class jt {
1172
- constructor(t, r, n, s, l, o, c, d) {
1173
- G(this, "state");
1174
- G(this, "stepRouter");
1175
- this.applicantService = t, this.questionnaireService = r, this.uploadDocumentService = n, this.appropriatenessTestService = s, this.overviewService = l, this.riskScoringService = o, this.investorCategorizationService = d, this.state = new qt(), this.stepRouter = new Kt(), this.registerStepHandlers();
1171
+ class Qt {
1172
+ constructor(t, r, n, s, l, o, c, u) {
1173
+ V(this, "state");
1174
+ V(this, "stepRouter");
1175
+ this.applicantService = t, this.questionnaireService = r, this.uploadDocumentService = n, this.appropriatenessTestService = s, this.overviewService = l, this.riskScoringService = o, this.investorCategorizationService = u, this.state = new Wt(), this.stepRouter = new Yt(), this.registerStepHandlers();
1176
1176
  }
1177
1177
  /**
1178
1178
  * Register all step handlers
1179
1179
  */
1180
1180
  registerStepHandlers() {
1181
- this.stepRouter.registerHandler(U.Questionaries, {
1181
+ this.stepRouter.registerHandler(_.Questionaries, {
1182
1182
  loadData: (t) => this.questionnaireService.getQuestionnaire(t),
1183
1183
  submitData: async (t) => {
1184
1184
  await this.questionnaireService.fillQuestionnaire(t);
1185
1185
  }
1186
- }), this.stepRouter.registerHandler(U.UploadDocument, {
1186
+ }), this.stepRouter.registerHandler(_.UploadDocument, {
1187
1187
  loadData: (t) => this.uploadDocumentService.getUploadDocument(t),
1188
1188
  submitData: (t) => this.uploadDocumentService.fillUploadDocument(t)
1189
- }), this.stepRouter.registerHandler(U.AppropriatenessTest, {
1189
+ }), this.stepRouter.registerHandler(_.AppropriatenessTest, {
1190
1190
  loadData: (t) => this.appropriatenessTestService.getAppropriatenessTest(t),
1191
1191
  submitData: async (t) => {
1192
1192
  await this.appropriatenessTestService.fillAppropriatenessTest(t);
1193
1193
  }
1194
- }), this.stepRouter.registerHandler(U.Overview, {
1194
+ }), this.stepRouter.registerHandler(_.Overview, {
1195
1195
  loadData: (t) => this.overviewService.getOverviewData(t),
1196
1196
  submitData: (t) => this.overviewService.passOverview(t.applicantId)
1197
- }), this.stepRouter.registerHandler(U.RiskScoring, {
1197
+ }), this.stepRouter.registerHandler(_.RiskScoring, {
1198
1198
  loadData: (t) => this.riskScoringService.getRiskCriterias(t),
1199
1199
  submitData: async (t) => {
1200
1200
  await this.riskScoringService.submitRiskScoring(t);
1201
1201
  }
1202
- }), this.stepRouter.registerHandler(U.IdentitySdk, {
1202
+ }), this.stepRouter.registerHandler(_.IdentitySdk, {
1203
1203
  loadData: async (t) => ({
1204
1204
  applicantId: t,
1205
1205
  message: "Identity verification required"
1206
1206
  }),
1207
1207
  submitData: async () => {
1208
1208
  }
1209
- }), this.stepRouter.registerHandler(U.InvestorCategorization, {
1209
+ }), this.stepRouter.registerHandler(_.InvestorCategorization, {
1210
1210
  loadData: (t) => this.investorCategorizationService.getInvestorCategorization(t),
1211
1211
  submitData: async (t) => {
1212
1212
  await this.investorCategorizationService.setInvestorCategorization(t);
1213
1213
  }
1214
- }), this.stepRouter.registerHandler(U.ManualReview, {
1214
+ }), this.stepRouter.registerHandler(_.ManualReview, {
1215
1215
  loadData: async (t) => ({
1216
1216
  applicantId: t,
1217
1217
  message: "Your application is under manual review"
1218
1218
  }),
1219
1219
  submitData: async () => {
1220
1220
  }
1221
- }), this.stepRouter.registerHandler(U.AdditionalData, {
1221
+ }), this.stepRouter.registerHandler(_.AdditionalData, {
1222
1222
  loadData: async (t) => ({
1223
1223
  applicantId: t,
1224
1224
  message: "Additional data required"
@@ -1312,7 +1312,7 @@ class jt {
1312
1312
  return this.stepRouter;
1313
1313
  }
1314
1314
  }
1315
- function Ze(e, t) {
1315
+ function tt(e, t) {
1316
1316
  return new Promise((r, n) => {
1317
1317
  if (t && document.getElementById(t)) {
1318
1318
  r();
@@ -1322,24 +1322,24 @@ function Ze(e, t) {
1322
1322
  s.src = e, t && (s.id = t), s.async = !0, s.onload = () => r(), s.onerror = () => n(new Error(`Failed to load script: ${e}`)), document.head.appendChild(s);
1323
1323
  });
1324
1324
  }
1325
- function Ur(e) {
1325
+ function Hr(e) {
1326
1326
  return !!document.getElementById(e);
1327
1327
  }
1328
- function qr(e) {
1328
+ function Wr(e) {
1329
1329
  const t = document.getElementById(e);
1330
1330
  t && t.remove();
1331
1331
  }
1332
- class Ht {
1332
+ class Vt {
1333
1333
  constructor(t) {
1334
- G(this, "sdk", null);
1335
- G(this, "config");
1334
+ V(this, "sdk", null);
1335
+ V(this, "config");
1336
1336
  this.config = t;
1337
1337
  }
1338
1338
  /**
1339
1339
  * Load Sumsub SDK
1340
1340
  */
1341
1341
  async loadSDK() {
1342
- await Ze(
1342
+ await tt(
1343
1343
  "https://cdn.sumsub.com/websdk/v2/production/websdk.js",
1344
1344
  "sumsub-sdk"
1345
1345
  );
@@ -1384,17 +1384,17 @@ class Ht {
1384
1384
  this.sdk && this.sdk.on("idCheck.onError", t);
1385
1385
  }
1386
1386
  }
1387
- class Wt {
1387
+ class Gt {
1388
1388
  constructor(t) {
1389
- G(this, "sdk", null);
1390
- G(this, "config");
1389
+ V(this, "sdk", null);
1390
+ V(this, "config");
1391
1391
  this.config = t;
1392
1392
  }
1393
1393
  /**
1394
1394
  * Load Onfido SDK
1395
1395
  */
1396
1396
  async loadSDK() {
1397
- await Ze(
1397
+ await tt(
1398
1398
  "https://sdk.onfido.com/v12.0.0/onfido.min.js",
1399
1399
  "onfido-sdk"
1400
1400
  );
@@ -1450,11 +1450,11 @@ class Wt {
1450
1450
  this.sdk && (this.sdk.tearDown(), this.sdk = null);
1451
1451
  }
1452
1452
  }
1453
- class Yt {
1453
+ class Zt {
1454
1454
  constructor(t) {
1455
- G(this, "sardineContext", null);
1456
- G(this, "config");
1457
- G(this, "sessionKey");
1455
+ V(this, "sardineContext", null);
1456
+ V(this, "config");
1457
+ V(this, "sessionKey");
1458
1458
  this.config = t, this.sessionKey = t.sessionKey || this.generateSessionKey();
1459
1459
  }
1460
1460
  /**
@@ -1529,13 +1529,13 @@ class Yt {
1529
1529
  console.log(`[SardinAI] Device ID: ${c.deviceId}`);
1530
1530
  },
1531
1531
  // New callback for session updates
1532
- onConfigUpdate: (c, d, m) => {
1532
+ onConfigUpdate: (c, u, p) => {
1533
1533
  switch (c) {
1534
1534
  case "SESSION_UPDATE_FAILED":
1535
- console.error("[SardinAI] Session update failed:", m);
1535
+ console.error("[SardinAI] Session update failed:", p);
1536
1536
  break;
1537
1537
  case "SESSION_UPDATED":
1538
- console.log("[SardinAI] Session updated:", d);
1538
+ console.log("[SardinAI] Session updated:", u);
1539
1539
  break;
1540
1540
  case "SESSION_NO_UPDATE":
1541
1541
  console.log("[SardinAI] No session update");
@@ -1600,12 +1600,12 @@ class De {
1600
1600
  */
1601
1601
  static createProvider(t, r) {
1602
1602
  switch (t) {
1603
- case fe.Sumsub:
1604
- return new Ht(r);
1605
- case fe.Onfido:
1606
- return new Wt(r);
1607
- case fe.SardinAI:
1608
- return new Yt(r);
1603
+ case ye.Sumsub:
1604
+ return new Vt(r);
1605
+ case ye.Onfido:
1606
+ return new Gt(r);
1607
+ case ye.SardinAI:
1608
+ return new Zt(r);
1609
1609
  default:
1610
1610
  throw new Error(`Unsupported identity provider: ${t}`);
1611
1611
  }
@@ -1616,7 +1616,7 @@ class De {
1616
1616
  static parseProviderConfig(t, r, n) {
1617
1617
  var s;
1618
1618
  switch (t) {
1619
- case fe.Sumsub:
1619
+ case ye.Sumsub:
1620
1620
  return {
1621
1621
  accessToken: r.accessToken || r.token,
1622
1622
  applicantEmail: r.email,
@@ -1624,11 +1624,11 @@ class De {
1624
1624
  externalUserId: r.externalUserId,
1625
1625
  lang: r.lang || "en"
1626
1626
  };
1627
- case fe.Onfido:
1627
+ case ye.Onfido:
1628
1628
  return {
1629
1629
  token: r.token || r.sdkToken
1630
1630
  };
1631
- case fe.SardinAI:
1631
+ case ye.SardinAI:
1632
1632
  const l = ((s = n == null ? void 0 : n.identityProviders) == null ? void 0 : s.sardinai) || {};
1633
1633
  return {
1634
1634
  clientId: l.clientId || r.clientId,
@@ -1644,11 +1644,11 @@ class De {
1644
1644
  }
1645
1645
  }
1646
1646
  }
1647
- class Qt {
1647
+ class Jt {
1648
1648
  constructor(t) {
1649
- G(this, "currentTheme", de);
1650
- G(this, "customStyleElement", null);
1651
- G(this, "container");
1649
+ V(this, "currentTheme", de);
1650
+ V(this, "customStyleElement", null);
1651
+ V(this, "container");
1652
1652
  this.container = t || document.documentElement;
1653
1653
  }
1654
1654
  /**
@@ -1770,12 +1770,12 @@ class Qt {
1770
1770
  return t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1771
1771
  }
1772
1772
  }
1773
- const Je = it(null), Kr = ({ config: e, children: t }) => {
1774
- const [r, n] = x(null), s = ye.useRef(!1), l = ye.useRef(!1), o = Se(() => {
1775
- const d = new St(e), m = new Ct(d), w = new At(d), N = new It(d), y = new Et(d), h = new Rt(d), g = new Ft(d), k = new Dt(d), b = new Pt(d), p = new Lt(d), F = new _t(d), C = new Qt();
1773
+ const rt = dt(null), Yr = ({ config: e, children: t }) => {
1774
+ const [r, n] = x(null), s = ge.useRef(!1), l = ge.useRef(!1), o = ke(() => {
1775
+ const u = new Et(e), p = new Rt(u), w = new Ft(u), N = new Dt(u), y = new Pt(u), h = new Lt(u), g = new Mt(u), k = new Tt(u), b = new Ot(u), m = new $t(u), F = new jt(u), S = new Jt();
1776
1776
  return {
1777
- httpClient: d,
1778
- applicantService: m,
1777
+ httpClient: u,
1778
+ applicantService: p,
1779
1779
  questionnaireService: w,
1780
1780
  uploadDocumentService: N,
1781
1781
  appropriatenessTestService: y,
@@ -1783,15 +1783,15 @@ const Je = it(null), Kr = ({ config: e, children: t }) => {
1783
1783
  riskScoringService: g,
1784
1784
  identityService: k,
1785
1785
  baseInformationService: b,
1786
- investorCategorizationService: p,
1786
+ investorCategorizationService: m,
1787
1787
  themeService: F,
1788
- themeManager: C
1788
+ themeManager: S
1789
1789
  };
1790
- }, [e]), c = Se(() => ({
1790
+ }, [e]), c = ke(() => ({
1791
1791
  config: e,
1792
1792
  ...o,
1793
1793
  currentTheme: r,
1794
- createOrchestrator: () => new jt(
1794
+ createOrchestrator: () => new Qt(
1795
1795
  o.applicantService,
1796
1796
  o.questionnaireService,
1797
1797
  o.uploadDocumentService,
@@ -1802,7 +1802,7 @@ const Je = it(null), Kr = ({ config: e, children: t }) => {
1802
1802
  o.investorCategorizationService
1803
1803
  )
1804
1804
  }), [e, o, r]);
1805
- return ee(() => ((async () => {
1805
+ return X(() => ((async () => {
1806
1806
  if (s.current || l.current) {
1807
1807
  console.log("[MetaKYC] Theme already loading or loaded, skipping...");
1808
1808
  return;
@@ -1814,24 +1814,24 @@ const Je = it(null), Kr = ({ config: e, children: t }) => {
1814
1814
  return;
1815
1815
  }
1816
1816
  console.log("[MetaKYC] Fetching theme from backend...");
1817
- const m = await o.themeService.getThemeConfiguration();
1818
- o.themeManager.applyTheme(m), n(o.themeManager.getCurrentTheme()), l.current = !0, console.log("[MetaKYC] Theme loaded and applied", m);
1819
- } catch (m) {
1820
- console.warn("[MetaKYC] Failed to load theme, using default:", m), n(o.themeManager.getCurrentTheme()), l.current = !0;
1817
+ const p = await o.themeService.getThemeConfiguration();
1818
+ o.themeManager.applyTheme(p), n(o.themeManager.getCurrentTheme()), l.current = !0, console.log("[MetaKYC] Theme loaded and applied", p);
1819
+ } catch (p) {
1820
+ console.warn("[MetaKYC] Failed to load theme, using default:", p), n(o.themeManager.getCurrentTheme()), l.current = !0;
1821
1821
  } finally {
1822
1822
  s.current = !1;
1823
1823
  }
1824
1824
  })(), () => {
1825
1825
  o.themeManager.cleanup();
1826
- }), []), /* @__PURE__ */ a(Je.Provider, { value: c, children: t });
1826
+ }), []), /* @__PURE__ */ a(rt.Provider, { value: c, children: t });
1827
1827
  };
1828
1828
  function he() {
1829
- const e = lt(Je);
1829
+ const e = ut(rt);
1830
1830
  if (!e)
1831
1831
  throw new Error("useMetaKYC must be used within a MetaKYCProvider");
1832
1832
  return e;
1833
1833
  }
1834
- async function Vt(e) {
1834
+ async function Xt(e) {
1835
1835
  return new Promise((t, r) => {
1836
1836
  const n = new FileReader();
1837
1837
  n.readAsDataURL(e), n.onload = () => {
@@ -1840,10 +1840,10 @@ async function Vt(e) {
1840
1840
  }, n.onerror = (s) => r(s);
1841
1841
  });
1842
1842
  }
1843
- function jr(e, t) {
1843
+ function Qr(e, t) {
1844
1844
  return e.size <= t;
1845
1845
  }
1846
- function Hr(e, t) {
1846
+ function Vr(e, t) {
1847
1847
  return t.split(",").map((n) => n.trim()).some((n) => {
1848
1848
  if (n.endsWith("/*")) {
1849
1849
  const s = n.slice(0, -2);
@@ -1852,12 +1852,12 @@ function Hr(e, t) {
1852
1852
  return e.type === n;
1853
1853
  });
1854
1854
  }
1855
- function Ue(e) {
1855
+ function je(e) {
1856
1856
  if (e === 0) return "0 Bytes";
1857
1857
  const t = 1024, r = ["Bytes", "KB", "MB", "GB"], n = Math.floor(Math.log(e) / Math.log(t));
1858
1858
  return Math.round(e / Math.pow(t, n) * 100) / 100 + " " + r[n];
1859
1859
  }
1860
- function Wr(e) {
1860
+ function Gr(e) {
1861
1861
  return e;
1862
1862
  }
1863
1863
  function ie(...e) {
@@ -1867,14 +1867,14 @@ const Pe = {
1867
1867
  APPLICANT_ID: "metakyc_applicant_id",
1868
1868
  WORKFLOW_STATE: "metakyc_workflow_state"
1869
1869
  };
1870
- function Gt(e) {
1870
+ function er(e) {
1871
1871
  try {
1872
1872
  localStorage.setItem(Pe.APPLICANT_ID, e.toString());
1873
1873
  } catch (t) {
1874
1874
  console.warn("Failed to save applicant ID to storage:", t);
1875
1875
  }
1876
1876
  }
1877
- function Zt() {
1877
+ function tr() {
1878
1878
  try {
1879
1879
  const e = localStorage.getItem(Pe.APPLICANT_ID);
1880
1880
  return e ? parseInt(e, 10) : null;
@@ -1882,21 +1882,21 @@ function Zt() {
1882
1882
  return console.warn("Failed to retrieve applicant ID from storage:", e), null;
1883
1883
  }
1884
1884
  }
1885
- function Jt() {
1885
+ function rr() {
1886
1886
  try {
1887
1887
  localStorage.removeItem(Pe.APPLICANT_ID);
1888
1888
  } catch (e) {
1889
1889
  console.warn("Failed to clear applicant ID from storage:", e);
1890
1890
  }
1891
1891
  }
1892
- function Xt(e) {
1892
+ function ar(e) {
1893
1893
  try {
1894
1894
  localStorage.setItem(Pe.WORKFLOW_STATE, JSON.stringify(e));
1895
1895
  } catch (t) {
1896
1896
  console.warn("Failed to save workflow state to storage:", t);
1897
1897
  }
1898
1898
  }
1899
- function Yr() {
1899
+ function Zr() {
1900
1900
  try {
1901
1901
  const e = localStorage.getItem(Pe.WORKFLOW_STATE);
1902
1902
  return e ? JSON.parse(e) : null;
@@ -1904,97 +1904,97 @@ function Yr() {
1904
1904
  return console.warn("Failed to retrieve workflow state from storage:", e), null;
1905
1905
  }
1906
1906
  }
1907
- function er() {
1907
+ function nr() {
1908
1908
  try {
1909
1909
  localStorage.removeItem(Pe.WORKFLOW_STATE);
1910
1910
  } catch (e) {
1911
1911
  console.warn("Failed to clear workflow state from storage:", e);
1912
1912
  }
1913
1913
  }
1914
- function Qr() {
1915
- Jt(), er();
1914
+ function Jr() {
1915
+ rr(), nr();
1916
1916
  }
1917
- function tr(e) {
1918
- const { createOrchestrator: t } = he(), [r, n] = x(null), [s, l] = x(!1), [o, c] = x(null), d = te(null), m = e || Zt();
1919
- ee(() => {
1920
- d.current || (d.current = t());
1921
- }, [t]), ee(() => {
1922
- var C;
1923
- r && m && (Gt(m), Xt({
1924
- applicantId: m,
1925
- currentStepOrder: (C = r.currentStep) == null ? void 0 : C.order,
1917
+ function sr(e) {
1918
+ const { createOrchestrator: t } = he(), [r, n] = x(null), [s, l] = x(!1), [o, c] = x(null), u = J(null), p = e || tr();
1919
+ X(() => {
1920
+ u.current || (u.current = t());
1921
+ }, [t]), X(() => {
1922
+ var S;
1923
+ r && p && (er(p), ar({
1924
+ applicantId: p,
1925
+ currentStepOrder: (S = r.currentStep) == null ? void 0 : S.order,
1926
1926
  status: r.status,
1927
1927
  lastUpdated: (/* @__PURE__ */ new Date()).toISOString(),
1928
1928
  workflowKey: r.workFlowKey,
1929
1929
  nextWorkflowKey: r.nextWorkflowKey
1930
1930
  }));
1931
- }, [r, m]);
1932
- const w = te(!1), N = te(!1), y = Q(async () => {
1933
- if (!(!m || !d.current)) {
1931
+ }, [r, p]);
1932
+ const w = J(!1), N = J(!1), y = Y(async () => {
1933
+ if (!(!p || !u.current)) {
1934
1934
  if (w.current) {
1935
1935
  console.log("[Workflow] Load already in progress, skipping...");
1936
1936
  return;
1937
1937
  }
1938
1938
  w.current = !0, l(!0), c(null);
1939
1939
  try {
1940
- const C = await d.current.initialize(m);
1941
- n(C), N.current = !0;
1942
- } catch (C) {
1943
- c(C);
1940
+ const S = await u.current.initialize(p);
1941
+ n(S), N.current = !0;
1942
+ } catch (S) {
1943
+ c(S);
1944
1944
  } finally {
1945
1945
  l(!1), w.current = !1;
1946
1946
  }
1947
1947
  }
1948
- }, [m]);
1949
- ee(() => {
1950
- m && !N.current && y();
1951
- }, [m, y]);
1952
- const h = Q(async () => {
1953
- if (d.current) {
1948
+ }, [p]);
1949
+ X(() => {
1950
+ p && !N.current && y();
1951
+ }, [p, y]);
1952
+ const h = Y(async () => {
1953
+ if (u.current) {
1954
1954
  if (w.current) {
1955
1955
  console.log("[Workflow] Refresh already in progress, skipping...");
1956
1956
  return;
1957
1957
  }
1958
1958
  w.current = !0, l(!0), c(null);
1959
1959
  try {
1960
- const C = await d.current.refreshProgress();
1961
- n(C);
1962
- } catch (C) {
1963
- c(C);
1960
+ const S = await u.current.refreshProgress();
1961
+ n(S);
1962
+ } catch (S) {
1963
+ c(S);
1964
1964
  } finally {
1965
1965
  l(!1), w.current = !1;
1966
1966
  }
1967
1967
  }
1968
- }, []), g = Q(async () => {
1969
- if (d.current) {
1968
+ }, []), g = Y(async () => {
1969
+ if (u.current) {
1970
1970
  l(!0), c(null);
1971
1971
  try {
1972
- const C = await d.current.moveToNextStep();
1973
- n(C);
1974
- } catch (C) {
1975
- c(C);
1972
+ const S = await u.current.moveToNextStep();
1973
+ n(S);
1974
+ } catch (S) {
1975
+ c(S);
1976
1976
  } finally {
1977
1977
  l(!1);
1978
1978
  }
1979
1979
  }
1980
- }, []), k = Q(async () => {
1981
- if (d.current) {
1980
+ }, []), k = Y(async () => {
1981
+ if (u.current) {
1982
1982
  l(!0), c(null);
1983
1983
  try {
1984
- const C = await d.current.moveToPreviousStep();
1985
- n(C);
1986
- } catch (C) {
1987
- c(C);
1984
+ const S = await u.current.moveToPreviousStep();
1985
+ n(S);
1986
+ } catch (S) {
1987
+ c(S);
1988
1988
  } finally {
1989
1989
  l(!1);
1990
1990
  }
1991
1991
  }
1992
- }, []), b = Q(async (C) => {
1993
- if (d.current) {
1992
+ }, []), b = Y(async (S) => {
1993
+ if (u.current) {
1994
1994
  l(!0), c(null);
1995
1995
  try {
1996
- await d.current.submitCurrentStep(C);
1997
- const v = await d.current.refreshProgress();
1996
+ await u.current.submitCurrentStep(S);
1997
+ const v = await u.current.refreshProgress();
1998
1998
  n(v);
1999
1999
  } catch (v) {
2000
2000
  throw c(v), v;
@@ -2002,69 +2002,69 @@ function tr(e) {
2002
2002
  l(!1);
2003
2003
  }
2004
2004
  }
2005
- }, []), p = Ye.useMemo(() => r != null && r.stepInfoList ? [...r.stepInfoList].sort((C, v) => C.order - v.order) : [], [r == null ? void 0 : r.stepInfoList]), F = Ye.useMemo(() => r ? r.nextWorkflowKey && r.nextWorkflowKey !== r.workFlowKey : !1, [r]);
2005
+ }, []), m = Ze.useMemo(() => r != null && r.stepInfoList ? [...r.stepInfoList].sort((S, v) => S.order - v.order) : [], [r == null ? void 0 : r.stepInfoList]), F = Ze.useMemo(() => r ? r.nextWorkflowKey && r.nextWorkflowKey !== r.workFlowKey : !1, [r]);
2006
2006
  return {
2007
2007
  progress: r,
2008
- applicantId: m,
2008
+ applicantId: p,
2009
2009
  currentStep: (r == null ? void 0 : r.currentStep) || null,
2010
- steps: p,
2011
- status: (r == null ? void 0 : r.status) || xe.None,
2010
+ steps: m,
2011
+ status: (r == null ? void 0 : r.status) || fe.None,
2012
2012
  workflowResult: (r == null ? void 0 : r.workflowResult) || null,
2013
2013
  workflowKey: r == null ? void 0 : r.workFlowKey,
2014
2014
  nextWorkflowKey: r == null ? void 0 : r.nextWorkflowKey,
2015
2015
  hasWorkflowChanged: F,
2016
2016
  isLoading: s,
2017
2017
  error: o,
2018
- isComplete: (r == null ? void 0 : r.status) === xe.Finished,
2019
- isOnHold: (r == null ? void 0 : r.status) === xe.OnHold,
2018
+ isComplete: (r == null ? void 0 : r.status) === fe.Finished,
2019
+ isOnHold: (r == null ? void 0 : r.status) === fe.OnHold,
2020
2020
  refreshProgress: h,
2021
2021
  moveToNext: g,
2022
2022
  moveBack: k,
2023
2023
  submitCurrentStep: b,
2024
- orchestrator: d.current
2024
+ orchestrator: u.current
2025
2025
  };
2026
2026
  }
2027
- function rr(e) {
2028
- const { questionnaireService: t, applicantService: r } = he(), [n, s] = x(null), [l, o] = x({}), [c, d] = x(!1), [m, w] = x(!1), [N, y] = x(null), h = te(!1), g = te(null), k = Q(async () => {
2029
- var p, F;
2027
+ function ir(e) {
2028
+ const { questionnaireService: t, applicantService: r } = he(), [n, s] = x(null), [l, o] = x({}), [c, u] = x(!1), [p, w] = x(!1), [N, y] = x(null), h = J(!1), g = J(null), k = Y(async () => {
2029
+ var m, F;
2030
2030
  if (e) {
2031
2031
  if (h.current) {
2032
2032
  console.log("[Questionnaire] Load already in progress, skipping...");
2033
2033
  return;
2034
2034
  }
2035
- h.current = !0, d(!0), y(null);
2035
+ h.current = !0, u(!0), y(null);
2036
2036
  try {
2037
- const [C, v] = await Promise.all([
2037
+ const [S, v] = await Promise.all([
2038
2038
  t.getQuestionnaire(e),
2039
2039
  r.getApplicantData(e).catch(() => null)
2040
2040
  ]);
2041
- if (s(C), (p = v == null ? void 0 : v.questionnaireResults) != null && p.length && C) {
2042
- const K = /* @__PURE__ */ new Map();
2041
+ if (s(S), (m = v == null ? void 0 : v.questionnaireResults) != null && m.length && S) {
2042
+ const q = /* @__PURE__ */ new Map();
2043
2043
  for (const f of v.questionnaireResults)
2044
- f.question && ((F = f.answers) != null && F.length) && K.set(f.question.trim().toLowerCase(), f.answers);
2045
- const Y = {}, M = C.questionGroups.flatMap((f) => f.questions ?? []);
2046
- for (const f of M) {
2044
+ f.question && ((F = f.answers) != null && F.length) && q.set(f.question.trim().toLowerCase(), f.answers);
2045
+ const H = {}, T = S.questionGroups.flatMap((f) => f.questions ?? []);
2046
+ for (const f of T) {
2047
2047
  const A = f.text.trim().toLowerCase();
2048
- K.has(A) && (Y[f.id] = K.get(A));
2048
+ q.has(A) && (H[f.id] = q.get(A));
2049
2049
  }
2050
- o(Y);
2050
+ o(H);
2051
2051
  }
2052
2052
  g.current = e;
2053
- } catch (C) {
2054
- y(C);
2053
+ } catch (S) {
2054
+ y(S);
2055
2055
  } finally {
2056
- d(!1), h.current = !1;
2056
+ u(!1), h.current = !1;
2057
2057
  }
2058
2058
  }
2059
2059
  }, [e, t, r]);
2060
- ee(() => {
2060
+ X(() => {
2061
2061
  e && g.current !== e && k();
2062
2062
  }, [e]);
2063
- const b = Q(
2064
- async (p) => {
2063
+ const b = Y(
2064
+ async (m) => {
2065
2065
  w(!0), y(null);
2066
2066
  try {
2067
- return await t.fillQuestionnaire(p);
2067
+ return await t.fillQuestionnaire(m);
2068
2068
  } catch (F) {
2069
2069
  throw y(F), F;
2070
2070
  } finally {
@@ -2077,14 +2077,14 @@ function rr(e) {
2077
2077
  questionnaire: n,
2078
2078
  initialAnswers: l,
2079
2079
  isLoading: c,
2080
- isSubmitting: m,
2080
+ isSubmitting: p,
2081
2081
  error: N,
2082
2082
  load: k,
2083
2083
  submit: b
2084
2084
  };
2085
2085
  }
2086
- function ar(e) {
2087
- const { uploadDocumentService: t } = he(), [r, n] = x(null), [s, l] = x(!1), [o, c] = x(!1), [d, m] = x(0), [w, N] = x(null), y = te(!1), h = te(null), g = Q(async () => {
2086
+ function lr(e) {
2087
+ const { uploadDocumentService: t } = he(), [r, n] = x(null), [s, l] = x(!1), [o, c] = x(!1), [u, p] = x(0), [w, N] = x(null), y = J(!1), h = J(null), g = Y(async () => {
2088
2088
  if (e) {
2089
2089
  if (y.current) {
2090
2090
  console.log("[UploadDocument] Load already in progress, skipping...");
@@ -2101,16 +2101,16 @@ function ar(e) {
2101
2101
  }
2102
2102
  }
2103
2103
  }, [e, t]);
2104
- ee(() => {
2104
+ X(() => {
2105
2105
  e && h.current !== e && g();
2106
2106
  }, [e]);
2107
- const k = Q(
2107
+ const k = Y(
2108
2108
  async (b) => {
2109
- c(!0), m(0), N(null);
2109
+ c(!0), p(0), N(null);
2110
2110
  try {
2111
- await t.fillUploadDocument(b), m(100);
2112
- } catch (p) {
2113
- throw N(p), p;
2111
+ await t.fillUploadDocument(b), p(100);
2112
+ } catch (m) {
2113
+ throw N(m), m;
2114
2114
  } finally {
2115
2115
  c(!1);
2116
2116
  }
@@ -2121,41 +2121,41 @@ function ar(e) {
2121
2121
  uploadDocument: r,
2122
2122
  isLoading: s,
2123
2123
  isSubmitting: o,
2124
- uploadProgress: d,
2124
+ uploadProgress: u,
2125
2125
  error: w,
2126
2126
  load: g,
2127
2127
  submit: k
2128
2128
  };
2129
2129
  }
2130
- function Vr(e) {
2131
- const { appropriatenessTestService: t } = he(), [r, n] = x(null), [s, l] = x(!1), [o, c] = x(!1), [d, m] = x(null), [w, N] = x(null), y = te(!1), h = te(null), g = Q(async () => {
2130
+ function Xr(e) {
2131
+ const { appropriatenessTestService: t } = he(), [r, n] = x(null), [s, l] = x(!1), [o, c] = x(!1), [u, p] = x(null), [w, N] = x(null), y = J(!1), h = J(null), g = Y(async () => {
2132
2132
  if (e) {
2133
2133
  if (y.current) {
2134
2134
  console.log("[AppropriatenessTest] Load already in progress, skipping...");
2135
2135
  return;
2136
2136
  }
2137
- y.current = !0, l(!0), m(null);
2137
+ y.current = !0, l(!0), p(null);
2138
2138
  try {
2139
2139
  const b = await t.getAppropriatenessTest(e);
2140
2140
  n(b), h.current = e;
2141
2141
  } catch (b) {
2142
- m(b);
2142
+ p(b);
2143
2143
  } finally {
2144
2144
  l(!1), y.current = !1;
2145
2145
  }
2146
2146
  }
2147
2147
  }, [e, t]);
2148
- ee(() => {
2148
+ X(() => {
2149
2149
  e && h.current !== e && g();
2150
2150
  }, [e]);
2151
- const k = Q(
2151
+ const k = Y(
2152
2152
  async (b) => {
2153
- c(!0), m(null);
2153
+ c(!0), p(null);
2154
2154
  try {
2155
- const p = await t.fillAppropriatenessTest(b);
2156
- return N(p), p;
2157
- } catch (p) {
2158
- throw m(p), p;
2155
+ const m = await t.fillAppropriatenessTest(b);
2156
+ return N(m), m;
2157
+ } catch (m) {
2158
+ throw p(m), m;
2159
2159
  } finally {
2160
2160
  c(!1);
2161
2161
  }
@@ -2167,39 +2167,39 @@ function Vr(e) {
2167
2167
  result: w,
2168
2168
  isLoading: s,
2169
2169
  isSubmitting: o,
2170
- error: d,
2170
+ error: u,
2171
2171
  load: g,
2172
2172
  submit: k
2173
2173
  };
2174
2174
  }
2175
- function nr(e) {
2176
- const { overviewService: t } = he(), [r, n] = x(null), [s, l] = x(!1), [o, c] = x(!1), [d, m] = x(null), w = te(!1), N = te(null), y = Q(async () => {
2175
+ function or(e) {
2176
+ const { overviewService: t } = he(), [r, n] = x(null), [s, l] = x(!1), [o, c] = x(!1), [u, p] = x(null), w = J(!1), N = J(null), y = Y(async () => {
2177
2177
  if (e) {
2178
2178
  if (w.current) {
2179
2179
  console.log("[Overview] Load already in progress, skipping...");
2180
2180
  return;
2181
2181
  }
2182
- w.current = !0, l(!0), m(null);
2182
+ w.current = !0, l(!0), p(null);
2183
2183
  try {
2184
2184
  const g = await t.getOverviewData(e);
2185
2185
  n(g), N.current = e;
2186
2186
  } catch (g) {
2187
- m(g);
2187
+ p(g);
2188
2188
  } finally {
2189
2189
  l(!1), w.current = !1;
2190
2190
  }
2191
2191
  }
2192
2192
  }, [e, t]);
2193
- ee(() => {
2193
+ X(() => {
2194
2194
  e && N.current !== e && y();
2195
2195
  }, [e]);
2196
- const h = Q(async () => {
2196
+ const h = Y(async () => {
2197
2197
  if (e) {
2198
- c(!0), m(null);
2198
+ c(!0), p(null);
2199
2199
  try {
2200
2200
  await t.passOverview(e);
2201
2201
  } catch (g) {
2202
- throw m(g), g;
2202
+ throw p(g), g;
2203
2203
  } finally {
2204
2204
  c(!1);
2205
2205
  }
@@ -2209,22 +2209,22 @@ function nr(e) {
2209
2209
  overview: r,
2210
2210
  isLoading: s,
2211
2211
  isSubmitting: o,
2212
- error: d,
2212
+ error: u,
2213
2213
  load: y,
2214
2214
  passOverview: h
2215
2215
  };
2216
2216
  }
2217
- function sr(e) {
2217
+ function cr(e) {
2218
2218
  const { identityService: t } = he(), [r, n] = x(
2219
2219
  null
2220
- ), [s, l] = x(!1), [o, c] = x(null), d = te(!1), m = Q(
2220
+ ), [s, l] = x(!1), [o, c] = x(null), u = J(!1), p = Y(
2221
2221
  async (y, h) => {
2222
2222
  if (e) {
2223
- if (d.current) {
2223
+ if (u.current) {
2224
2224
  console.log("[Identity] Request already in progress, skipping...");
2225
2225
  return;
2226
2226
  }
2227
- d.current = !0, l(!0), c(null);
2227
+ u.current = !0, l(!0), c(null);
2228
2228
  try {
2229
2229
  const g = {
2230
2230
  applicantId: e,
@@ -2239,12 +2239,12 @@ function sr(e) {
2239
2239
  } catch (g) {
2240
2240
  throw c(g), g;
2241
2241
  } finally {
2242
- l(!1), d.current = !1;
2242
+ l(!1), u.current = !1;
2243
2243
  }
2244
2244
  }
2245
2245
  },
2246
2246
  [e, t]
2247
- ), w = Q(
2247
+ ), w = Y(
2248
2248
  async (y, h) => {
2249
2249
  if (e) {
2250
2250
  l(!0), c(null);
@@ -2264,13 +2264,13 @@ function sr(e) {
2264
2264
  }
2265
2265
  },
2266
2266
  [e, t]
2267
- ), N = Q(async () => {
2267
+ ), N = Y(async () => {
2268
2268
  if (e) {
2269
- if (d.current) {
2269
+ if (u.current) {
2270
2270
  console.log("[Identity] Restart already in progress, skipping...");
2271
2271
  return;
2272
2272
  }
2273
- d.current = !0, l(!0), c(null);
2273
+ u.current = !0, l(!0), c(null);
2274
2274
  try {
2275
2275
  const y = {
2276
2276
  applicantId: e,
@@ -2285,7 +2285,7 @@ function sr(e) {
2285
2285
  } catch (y) {
2286
2286
  throw c(y), y;
2287
2287
  } finally {
2288
- l(!1), d.current = !1;
2288
+ l(!1), u.current = !1;
2289
2289
  }
2290
2290
  }
2291
2291
  }, [e, t]);
@@ -2295,52 +2295,52 @@ function sr(e) {
2295
2295
  token: (r == null ? void 0 : r.publicProviderTokenObject) || null,
2296
2296
  isLoading: s,
2297
2297
  error: o,
2298
- requestIdentity: m,
2298
+ requestIdentity: p,
2299
2299
  requestCompanyIdentity: w,
2300
2300
  restartIdentity: N
2301
2301
  };
2302
2302
  }
2303
- function ir(e) {
2304
- const { riskScoringService: t, applicantService: r } = he(), [n, s] = x(null), [l, o] = x({}), [c, d] = x(!1), [m, w] = x(!1), [N, y] = x(null), [h, g] = x(null), k = te(!1), b = te(null), p = Q(async () => {
2305
- var C;
2303
+ function dr(e) {
2304
+ const { riskScoringService: t, applicantService: r } = he(), [n, s] = x(null), [l, o] = x({}), [c, u] = x(!1), [p, w] = x(!1), [N, y] = x(null), [h, g] = x(null), k = J(!1), b = J(null), m = Y(async () => {
2305
+ var S;
2306
2306
  if (e) {
2307
2307
  if (k.current) {
2308
2308
  console.log("[RiskScoring] Load already in progress, skipping...");
2309
2309
  return;
2310
2310
  }
2311
- k.current = !0, d(!0), y(null);
2311
+ k.current = !0, u(!0), y(null);
2312
2312
  try {
2313
- const [v, K] = await Promise.all([
2313
+ const [v, q] = await Promise.all([
2314
2314
  t.getRiskCriterias(e),
2315
2315
  r.getApplicantData(e).catch(() => null)
2316
2316
  ]);
2317
- if (s(v), (C = K == null ? void 0 : K.riskScoringResults) != null && C.length) {
2318
- const Y = K.riskScoringResults[0], M = {};
2319
- for (const f of Y.riskCriteriaResults ?? [])
2317
+ if (s(v), (S = q == null ? void 0 : q.riskScoringResults) != null && S.length) {
2318
+ const H = q.riskScoringResults[0], T = {};
2319
+ for (const f of H.riskCriteriaResults ?? [])
2320
2320
  if (f.riskCriteriaId != null && f.answer != null && f.answer !== "") {
2321
2321
  const A = [...new Set(
2322
2322
  f.answer.split(",").map((D) => D.trim()).filter((D) => D !== "")
2323
2323
  )];
2324
- A.length > 0 && (M[f.riskCriteriaId] = A);
2324
+ A.length > 0 && (T[f.riskCriteriaId] = A);
2325
2325
  }
2326
- o(M);
2326
+ o(T);
2327
2327
  }
2328
2328
  b.current = e;
2329
2329
  } catch (v) {
2330
2330
  y(v);
2331
2331
  } finally {
2332
- d(!1), k.current = !1;
2332
+ u(!1), k.current = !1;
2333
2333
  }
2334
2334
  }
2335
2335
  }, [e, t, r]);
2336
- ee(() => {
2337
- e && b.current !== e && p();
2336
+ X(() => {
2337
+ e && b.current !== e && m();
2338
2338
  }, [e]);
2339
- const F = Q(
2340
- async (C) => {
2339
+ const F = Y(
2340
+ async (S) => {
2341
2341
  w(!0), y(null);
2342
2342
  try {
2343
- const v = await t.submitRiskScoring(C);
2343
+ const v = await t.submitRiskScoring(S);
2344
2344
  return g(v), v;
2345
2345
  } catch (v) {
2346
2346
  throw y(v), v;
@@ -2355,17 +2355,17 @@ function ir(e) {
2355
2355
  initialAnswers: l,
2356
2356
  result: h,
2357
2357
  isLoading: c,
2358
- isSubmitting: m,
2358
+ isSubmitting: p,
2359
2359
  error: N,
2360
- load: p,
2360
+ load: m,
2361
2361
  submit: F
2362
2362
  };
2363
2363
  }
2364
- function lr() {
2365
- const { applicantService: e, config: t } = he(), [r, n] = x(!1), [s, l] = x(null), o = te(!1), c = te(!1), d = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(h) {
2364
+ function ur() {
2365
+ const { applicantService: e, config: t } = he(), [r, n] = x(!1), [s, l] = x(null), o = J(!1), c = J(!1), u = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(h) {
2366
2366
  const g = Math.random() * 16 | 0;
2367
2367
  return (h === "x" ? g : g & 3 | 8).toString(16);
2368
- }), m = Q(
2368
+ }), p = Y(
2369
2369
  async (h) => {
2370
2370
  var g;
2371
2371
  if (o.current)
@@ -2373,7 +2373,7 @@ function lr() {
2373
2373
  o.current = !0, n(!0), l(null);
2374
2374
  try {
2375
2375
  if (h.applicantAdditionalDatas || (h.applicantAdditionalDatas = []), (g = t.identityProviders) != null && g.sardinai) {
2376
- const b = d();
2376
+ const b = u();
2377
2377
  console.log("[SardinAI] Generated session key:", b), h.applicantAdditionalDatas.push({
2378
2378
  paramName: "sessionKey",
2379
2379
  value: b
@@ -2387,7 +2387,7 @@ function lr() {
2387
2387
  }
2388
2388
  },
2389
2389
  [e, t]
2390
- ), w = Q(
2390
+ ), w = Y(
2391
2391
  async (h) => {
2392
2392
  n(!0), l(null);
2393
2393
  try {
@@ -2399,7 +2399,7 @@ function lr() {
2399
2399
  }
2400
2400
  },
2401
2401
  [e]
2402
- ), N = Q(
2402
+ ), N = Y(
2403
2403
  async (h) => {
2404
2404
  if (c.current)
2405
2405
  throw console.log("[Applicant] Data load already in progress, skipping..."), new Error("Data load already in progress");
@@ -2413,7 +2413,7 @@ function lr() {
2413
2413
  }
2414
2414
  },
2415
2415
  [e]
2416
- ), y = Q(
2416
+ ), y = Y(
2417
2417
  async (h) => {
2418
2418
  n(!0), l(null);
2419
2419
  try {
@@ -2429,13 +2429,13 @@ function lr() {
2429
2429
  return {
2430
2430
  isLoading: r,
2431
2431
  error: s,
2432
- createApplicant: m,
2432
+ createApplicant: p,
2433
2433
  createCompanyApplicant: w,
2434
2434
  getApplicantData: N,
2435
2435
  stopProgress: y
2436
2436
  };
2437
2437
  }
2438
- const q = ({
2438
+ const U = ({
2439
2439
  children: e,
2440
2440
  variant: t = "primary",
2441
2441
  size: r = "md",
@@ -2444,13 +2444,13 @@ const q = ({
2444
2444
  className: l,
2445
2445
  ...o
2446
2446
  }) => {
2447
- const c = "inline-flex items-center justify-center rounded-lg font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed", d = {
2447
+ const c = "inline-flex items-center justify-center rounded-lg font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed", u = {
2448
2448
  primary: "bg-primary-500 text-white hover:bg-primary-600 focus:ring-primary-500",
2449
2449
  secondary: "bg-gray-200 text-gray-900 hover:bg-gray-300 focus:ring-gray-400",
2450
2450
  outline: "border-2 border-primary-500 text-primary-500 hover:bg-primary-50 focus:ring-primary-500",
2451
2451
  danger: "bg-danger-500 text-white hover:bg-danger-600 focus:ring-danger-500",
2452
2452
  ghost: "text-gray-700 hover:bg-gray-100 focus:ring-gray-400"
2453
- }, m = {
2453
+ }, p = {
2454
2454
  sm: "px-3 py-1.5 text-sm",
2455
2455
  md: "px-4 py-2 text-base",
2456
2456
  lg: "px-6 py-3 text-lg"
@@ -2458,7 +2458,7 @@ const q = ({
2458
2458
  return /* @__PURE__ */ i(
2459
2459
  "button",
2460
2460
  {
2461
- className: ie(c, d[t], m[r], l),
2461
+ className: ie(c, u[t], p[r], l),
2462
2462
  disabled: s || n,
2463
2463
  ...o,
2464
2464
  children: [
@@ -2496,7 +2496,7 @@ const q = ({
2496
2496
  ]
2497
2497
  }
2498
2498
  );
2499
- }, ue = Te(
2499
+ }, ue = $e(
2500
2500
  ({ label: e, error: t, helperText: r, leftIcon: n, rightIcon: s, className: l, ...o }, c) => /* @__PURE__ */ i("div", { className: "w-full", children: [
2501
2501
  e && /* @__PURE__ */ i("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
2502
2502
  e,
@@ -2562,7 +2562,7 @@ const $ = ({ children: e, className: t, ...r }) => /* @__PURE__ */ a(
2562
2562
  ...r,
2563
2563
  children: e
2564
2564
  }
2565
- ), Ne = ({ children: e, variant: t = "default", className: r, ...n }) => /* @__PURE__ */ a(
2565
+ ), Se = ({ children: e, variant: t = "default", className: r, ...n }) => /* @__PURE__ */ a(
2566
2566
  "span",
2567
2567
  {
2568
2568
  className: ie(
@@ -2579,7 +2579,7 @@ const $ = ({ children: e, className: t, ...r }) => /* @__PURE__ */ a(
2579
2579
  ...n,
2580
2580
  children: e
2581
2581
  }
2582
- ), be = ({ size: e = "md", className: t, ...r }) => {
2582
+ ), xe = ({ size: e = "md", className: t, ...r }) => {
2583
2583
  const n = {
2584
2584
  sm: "h-4 w-4",
2585
2585
  md: "h-8 w-8",
@@ -2615,8 +2615,8 @@ const $ = ({ children: e, className: t, ...r }) => /* @__PURE__ */ a(
2615
2615
  ]
2616
2616
  }
2617
2617
  ) });
2618
- }, Ae = Te(
2619
- ({ label: e, error: t, helperText: r, options: n, placeholder: s, className: l, style: o, ...c }, d) => /* @__PURE__ */ i("div", { className: "w-full", children: [
2618
+ }, Ae = $e(
2619
+ ({ label: e, error: t, helperText: r, options: n, placeholder: s, className: l, style: o, ...c }, u) => /* @__PURE__ */ i("div", { className: "w-full", children: [
2620
2620
  e && /* @__PURE__ */ i(
2621
2621
  "label",
2622
2622
  {
@@ -2631,7 +2631,7 @@ const $ = ({ children: e, className: t, ...r }) => /* @__PURE__ */ a(
2631
2631
  /* @__PURE__ */ i(
2632
2632
  "select",
2633
2633
  {
2634
- ref: d,
2634
+ ref: u,
2635
2635
  className: ie(
2636
2636
  "block w-full rounded-lg border px-3 py-2 text-sm transition-colors",
2637
2637
  "focus:outline-none focus:ring-2 focus:ring-offset-0",
@@ -2661,18 +2661,18 @@ const $ = ({ children: e, className: t, ...r }) => /* @__PURE__ */ a(
2661
2661
  },
2662
2662
  "__placeholder__"
2663
2663
  ),
2664
- n.map((m, w) => /* @__PURE__ */ a(
2664
+ n.map((p, w) => /* @__PURE__ */ a(
2665
2665
  "option",
2666
2666
  {
2667
- value: m.value,
2668
- disabled: m.disabled,
2667
+ value: p.value,
2668
+ disabled: p.disabled,
2669
2669
  style: {
2670
2670
  backgroundColor: "var(--metakyc-input-bg, #ffffff)",
2671
- color: m.disabled ? "var(--metakyc-text-secondary, #9ca3af)" : "var(--metakyc-text-primary, #111827)"
2671
+ color: p.disabled ? "var(--metakyc-text-secondary, #9ca3af)" : "var(--metakyc-text-primary, #111827)"
2672
2672
  },
2673
- children: m.label
2673
+ children: p.label
2674
2674
  },
2675
- m.value || `option-${w}`
2675
+ p.value || `option-${w}`
2676
2676
  ))
2677
2677
  ]
2678
2678
  }
@@ -2682,7 +2682,7 @@ const $ = ({ children: e, className: t, ...r }) => /* @__PURE__ */ a(
2682
2682
  ] })
2683
2683
  );
2684
2684
  Ae.displayName = "Select";
2685
- const or = ({
2685
+ const mr = ({
2686
2686
  label: e,
2687
2687
  value: t,
2688
2688
  onChange: r,
@@ -2691,22 +2691,22 @@ const or = ({
2691
2691
  disabled: l = !1,
2692
2692
  required: o = !1
2693
2693
  }) => {
2694
- const [c, d] = x(!1), [m, w] = x(""), N = te(null);
2695
- ee(() => {
2696
- const b = (p) => {
2697
- N.current && !N.current.contains(p.target) && (d(!1), w(""));
2694
+ const [c, u] = x(!1), [p, w] = x(""), N = J(null);
2695
+ X(() => {
2696
+ const b = (m) => {
2697
+ N.current && !N.current.contains(m.target) && (u(!1), w(""));
2698
2698
  };
2699
2699
  return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
2700
2700
  }, []);
2701
2701
  const y = n.filter(
2702
- (b) => b.label.toLowerCase().includes(m.toLowerCase())
2702
+ (b) => b.label.toLowerCase().includes(p.toLowerCase())
2703
2703
  ), h = (b) => {
2704
- l || (t.includes(b) ? r(t.filter((p) => p !== b)) : r([...t, b]));
2705
- }, g = (b, p) => {
2706
- p.stopPropagation(), l || r(t.filter((F) => F !== b));
2704
+ l || (t.includes(b) ? r(t.filter((m) => m !== b)) : r([...t, b]));
2705
+ }, g = (b, m) => {
2706
+ m.stopPropagation(), l || r(t.filter((F) => F !== b));
2707
2707
  }, k = (b) => {
2708
- var p;
2709
- return ((p = n.find((F) => F.value === b)) == null ? void 0 : p.label) || b;
2708
+ var m;
2709
+ return ((m = n.find((F) => F.value === b)) == null ? void 0 : m.label) || b;
2710
2710
  };
2711
2711
  return /* @__PURE__ */ i("div", { className: "w-full metakyc-multiselect", ref: N, children: [
2712
2712
  e && /* @__PURE__ */ i("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
@@ -2717,7 +2717,7 @@ const or = ({
2717
2717
  /* @__PURE__ */ i(
2718
2718
  "div",
2719
2719
  {
2720
- onClick: () => !l && d(!c),
2720
+ onClick: () => !l && u(!c),
2721
2721
  className: ie(
2722
2722
  "metakyc-multiselect-trigger",
2723
2723
  "min-h-[42px] w-full px-3 py-2 rounded-lg border text-sm transition-colors",
@@ -2737,7 +2737,7 @@ const or = ({
2737
2737
  "button",
2738
2738
  {
2739
2739
  type: "button",
2740
- onClick: (p) => g(b, p),
2740
+ onClick: (m) => g(b, m),
2741
2741
  className: "metakyc-multiselect-chip-remove",
2742
2742
  style: {
2743
2743
  background: "transparent",
@@ -2779,7 +2779,7 @@ const or = ({
2779
2779
  "input",
2780
2780
  {
2781
2781
  type: "text",
2782
- value: m,
2782
+ value: p,
2783
2783
  onChange: (b) => w(b.target.value),
2784
2784
  placeholder: "Search...",
2785
2785
  autoFocus: !0,
@@ -2833,7 +2833,7 @@ const or = ({
2833
2833
  )
2834
2834
  ] })
2835
2835
  ] });
2836
- }, cr = ({
2836
+ }, pr = ({
2837
2837
  label: e,
2838
2838
  error: t,
2839
2839
  accept: r,
@@ -2843,26 +2843,26 @@ const or = ({
2843
2843
  value: o = [],
2844
2844
  className: c
2845
2845
  }) => {
2846
- const [d, m] = x(!1), w = te(null), N = (p) => {
2847
- if (!p) return;
2848
- const F = Array.from(p);
2846
+ const [u, p] = x(!1), w = J(null), N = (m) => {
2847
+ if (!m) return;
2848
+ const F = Array.from(m);
2849
2849
  if (s && F.filter((v) => v.size > s).length > 0) {
2850
- const v = Ue(s);
2850
+ const v = je(s);
2851
2851
  alert(`Some files exceed the maximum size of ${v}`);
2852
2852
  return;
2853
2853
  }
2854
2854
  l == null || l(n ? [...o, ...F] : [F[0]]);
2855
- }, y = (p) => {
2856
- p.preventDefault(), m(!0);
2855
+ }, y = (m) => {
2856
+ m.preventDefault(), p(!0);
2857
2857
  }, h = () => {
2858
- m(!1);
2859
- }, g = (p) => {
2860
- p.preventDefault(), m(!1), N(p.dataTransfer.files);
2858
+ p(!1);
2859
+ }, g = (m) => {
2860
+ m.preventDefault(), p(!1), N(m.dataTransfer.files);
2861
2861
  }, k = () => {
2862
- var p;
2863
- (p = w.current) == null || p.click();
2864
- }, b = (p) => {
2865
- const F = o.filter((C, v) => v !== p);
2862
+ var m;
2863
+ (m = w.current) == null || m.click();
2864
+ }, b = (m) => {
2865
+ const F = o.filter((S, v) => v !== m);
2866
2866
  l == null || l(F);
2867
2867
  };
2868
2868
  return /* @__PURE__ */ i("div", { className: ie("w-full", c), children: [
@@ -2872,7 +2872,7 @@ const or = ({
2872
2872
  {
2873
2873
  className: ie(
2874
2874
  "border-2 border-dashed rounded-lg p-6 text-center cursor-pointer transition-colors",
2875
- d ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-300 dark:border-gray-600 hover:border-primary-500",
2875
+ u ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-300 dark:border-gray-600 hover:border-primary-500",
2876
2876
  t && "border-danger-500"
2877
2877
  ),
2878
2878
  onDragOver: y,
@@ -2888,7 +2888,7 @@ const or = ({
2888
2888
  className: "hidden",
2889
2889
  accept: r,
2890
2890
  multiple: n,
2891
- onChange: (p) => N(p.target.files)
2891
+ onChange: (m) => N(m.target.files)
2892
2892
  }
2893
2893
  ),
2894
2894
  /* @__PURE__ */ i("div", { className: "space-y-2", children: [
@@ -2916,13 +2916,13 @@ const or = ({
2916
2916
  ] }),
2917
2917
  s && /* @__PURE__ */ i("p", { className: "text-xs text-gray-500", children: [
2918
2918
  "Maximum file size: ",
2919
- Ue(s)
2919
+ je(s)
2920
2920
  ] })
2921
2921
  ] })
2922
2922
  ]
2923
2923
  }
2924
2924
  ),
2925
- o.length > 0 && /* @__PURE__ */ a("div", { className: "mt-3 space-y-2", children: o.map((p, F) => /* @__PURE__ */ i(
2925
+ o.length > 0 && /* @__PURE__ */ a("div", { className: "mt-3 space-y-2", children: o.map((m, F) => /* @__PURE__ */ i(
2926
2926
  "div",
2927
2927
  {
2928
2928
  className: "flex items-center justify-between px-3 py-2 bg-gray-50 dark:bg-gray-700 rounded-lg",
@@ -2944,10 +2944,10 @@ const or = ({
2944
2944
  )
2945
2945
  }
2946
2946
  ),
2947
- /* @__PURE__ */ a("span", { className: "text-sm text-gray-700 dark:text-gray-300 truncate", children: p.name }),
2947
+ /* @__PURE__ */ a("span", { className: "text-sm text-gray-700 dark:text-gray-300 truncate", children: m.name }),
2948
2948
  /* @__PURE__ */ i("span", { className: "text-xs text-gray-500", children: [
2949
2949
  "(",
2950
- Ue(p.size),
2950
+ je(m.size),
2951
2951
  ")"
2952
2952
  ] })
2953
2953
  ] }),
@@ -2955,8 +2955,8 @@ const or = ({
2955
2955
  "button",
2956
2956
  {
2957
2957
  type: "button",
2958
- onClick: (C) => {
2959
- C.stopPropagation(), b(F);
2958
+ onClick: (S) => {
2959
+ S.stopPropagation(), b(F);
2960
2960
  },
2961
2961
  className: "ml-2 text-danger-500 hover:text-danger-700 focus:outline-none",
2962
2962
  children: /* @__PURE__ */ a("svg", { className: "h-5 w-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ a(
@@ -2975,7 +2975,7 @@ const or = ({
2975
2975
  )) }),
2976
2976
  t && /* @__PURE__ */ a("p", { className: "mt-1 text-sm text-danger-500", children: t })
2977
2977
  ] });
2978
- }, dr = Te(
2978
+ }, hr = $e(
2979
2979
  ({ countryCode: e = "+1", onCountryCodeChange: t, className: r, ...n }, s) => /* @__PURE__ */ i("div", { className: "w-full", children: [
2980
2980
  n.label && /* @__PURE__ */ i("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
2981
2981
  n.label,
@@ -3010,28 +3010,28 @@ const or = ({
3010
3010
  n.error && /* @__PURE__ */ a("p", { className: "mt-1 text-sm text-danger-500", children: n.error })
3011
3011
  ] })
3012
3012
  );
3013
- dr.displayName = "PhoneInput";
3013
+ hr.displayName = "PhoneInput";
3014
3014
  /**
3015
3015
  * @license lucide-react v0.574.0 - ISC
3016
3016
  *
3017
3017
  * This source code is licensed under the ISC license.
3018
3018
  * See the LICENSE file in the root directory of this source tree.
3019
3019
  */
3020
- const Xe = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim();
3020
+ const at = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim();
3021
3021
  /**
3022
3022
  * @license lucide-react v0.574.0 - ISC
3023
3023
  *
3024
3024
  * This source code is licensed under the ISC license.
3025
3025
  * See the LICENSE file in the root directory of this source tree.
3026
3026
  */
3027
- const ur = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
3027
+ const gr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
3028
3028
  /**
3029
3029
  * @license lucide-react v0.574.0 - ISC
3030
3030
  *
3031
3031
  * This source code is licensed under the ISC license.
3032
3032
  * See the LICENSE file in the root directory of this source tree.
3033
3033
  */
3034
- const mr = (e) => e.replace(
3034
+ const yr = (e) => e.replace(
3035
3035
  /^([A-Z])|[\s-_]+(\w)/g,
3036
3036
  (t, r, n) => n ? n.toUpperCase() : r.toLowerCase()
3037
3037
  );
@@ -3041,8 +3041,8 @@ const mr = (e) => e.replace(
3041
3041
  * This source code is licensed under the ISC license.
3042
3042
  * See the LICENSE file in the root directory of this source tree.
3043
3043
  */
3044
- const Ve = (e) => {
3045
- const t = mr(e);
3044
+ const Xe = (e) => {
3045
+ const t = yr(e);
3046
3046
  return t.charAt(0).toUpperCase() + t.slice(1);
3047
3047
  };
3048
3048
  /**
@@ -3051,7 +3051,7 @@ const Ve = (e) => {
3051
3051
  * This source code is licensed under the ISC license.
3052
3052
  * See the LICENSE file in the root directory of this source tree.
3053
3053
  */
3054
- var pr = {
3054
+ var fr = {
3055
3055
  xmlns: "http://www.w3.org/2000/svg",
3056
3056
  width: 24,
3057
3057
  height: 24,
@@ -3068,7 +3068,7 @@ var pr = {
3068
3068
  * This source code is licensed under the ISC license.
3069
3069
  * See the LICENSE file in the root directory of this source tree.
3070
3070
  */
3071
- const hr = (e) => {
3071
+ const xr = (e) => {
3072
3072
  for (const t in e)
3073
3073
  if (t.startsWith("aria-") || t === "role" || t === "title")
3074
3074
  return !0;
@@ -3080,7 +3080,7 @@ const hr = (e) => {
3080
3080
  * This source code is licensed under the ISC license.
3081
3081
  * See the LICENSE file in the root directory of this source tree.
3082
3082
  */
3083
- const gr = Te(
3083
+ const br = $e(
3084
3084
  ({
3085
3085
  color: e = "currentColor",
3086
3086
  size: t = 24,
@@ -3090,21 +3090,21 @@ const gr = Te(
3090
3090
  children: l,
3091
3091
  iconNode: o,
3092
3092
  ...c
3093
- }, d) => je(
3093
+ }, u) => We(
3094
3094
  "svg",
3095
3095
  {
3096
- ref: d,
3097
- ...pr,
3096
+ ref: u,
3097
+ ...fr,
3098
3098
  width: t,
3099
3099
  height: t,
3100
3100
  stroke: e,
3101
3101
  strokeWidth: n ? Number(r) * 24 / Number(t) : r,
3102
- className: Xe("lucide", s),
3103
- ...!l && !hr(c) && { "aria-hidden": "true" },
3102
+ className: at("lucide", s),
3103
+ ...!l && !xr(c) && { "aria-hidden": "true" },
3104
3104
  ...c
3105
3105
  },
3106
3106
  [
3107
- ...o.map(([m, w]) => je(m, w)),
3107
+ ...o.map(([p, w]) => We(p, w)),
3108
3108
  ...Array.isArray(l) ? l : [l]
3109
3109
  ]
3110
3110
  )
@@ -3115,20 +3115,20 @@ const gr = Te(
3115
3115
  * This source code is licensed under the ISC license.
3116
3116
  * See the LICENSE file in the root directory of this source tree.
3117
3117
  */
3118
- const et = (e, t) => {
3119
- const r = Te(
3120
- ({ className: n, ...s }, l) => je(gr, {
3118
+ const nt = (e, t) => {
3119
+ const r = $e(
3120
+ ({ className: n, ...s }, l) => We(br, {
3121
3121
  ref: l,
3122
3122
  iconNode: t,
3123
- className: Xe(
3124
- `lucide-${ur(Ve(e))}`,
3123
+ className: at(
3124
+ `lucide-${gr(Xe(e))}`,
3125
3125
  `lucide-${e}`,
3126
3126
  n
3127
3127
  ),
3128
3128
  ...s
3129
3129
  })
3130
3130
  );
3131
- return r.displayName = Ve(e), r;
3131
+ return r.displayName = Xe(e), r;
3132
3132
  };
3133
3133
  /**
3134
3134
  * @license lucide-react v0.574.0 - ISC
@@ -3136,15 +3136,15 @@ const et = (e, t) => {
3136
3136
  * This source code is licensed under the ISC license.
3137
3137
  * See the LICENSE file in the root directory of this source tree.
3138
3138
  */
3139
- const yr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], tt = et("chevron-left", yr);
3139
+ const vr = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], st = nt("chevron-left", vr);
3140
3140
  /**
3141
3141
  * @license lucide-react v0.574.0 - ISC
3142
3142
  *
3143
3143
  * This source code is licensed under the ISC license.
3144
3144
  * See the LICENSE file in the root directory of this source tree.
3145
3145
  */
3146
- const fr = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], rt = et("chevron-right", fr);
3147
- function xr(e, t) {
3146
+ const wr = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], it = nt("chevron-right", wr);
3147
+ function kr(e, t) {
3148
3148
  const r = !t || t.length === 0 || t.every((n) => !n || !n.trim());
3149
3149
  if (e.isRequired && r)
3150
3150
  return e.errorMessage || "This field is required";
@@ -3173,7 +3173,7 @@ function xr(e, t) {
3173
3173
  }
3174
3174
  return null;
3175
3175
  }
3176
- function br(e) {
3176
+ function Nr(e) {
3177
3177
  const t = e.flatMap(
3178
3178
  (n, s) => (n.questions ?? []).map((l, o) => ({ question: l, groupIndex: s, qIdx: o }))
3179
3179
  ), r = /* @__PURE__ */ new Map();
@@ -3183,53 +3183,53 @@ function br(e) {
3183
3183
  }
3184
3184
  return Array.from(r.entries()).sort(([n], [s]) => n - s).map(([, n]) => n);
3185
3185
  }
3186
- const vr = ({
3186
+ const Sr = ({
3187
3187
  applicantId: e,
3188
3188
  onComplete: t,
3189
3189
  onBack: r
3190
3190
  }) => {
3191
- const { questionnaire: n, initialAnswers: s, isLoading: l, isSubmitting: o, error: c, submit: d } = rr(e), [m, w] = x({}), [N, y] = x({}), [h, g] = x(0);
3192
- ye.useEffect(() => {
3193
- s && Object.keys(s).length > 0 && Object.keys(m).length === 0 && w(s);
3191
+ const { questionnaire: n, initialAnswers: s, isLoading: l, isSubmitting: o, error: c, submit: u } = ir(e), [p, w] = x({}), [N, y] = x({}), [h, g] = x(0);
3192
+ ge.useEffect(() => {
3193
+ s && Object.keys(s).length > 0 && Object.keys(p).length === 0 && w(s);
3194
3194
  }, [s]);
3195
- const k = Se(
3196
- () => n ? br(n.questionGroups) : [],
3195
+ const k = ke(
3196
+ () => n ? Nr(n.questionGroups) : [],
3197
3197
  [n]
3198
- ), b = h === k.length - 1, p = k[h] ?? [], F = Q((M, f) => {
3199
- w((A) => ({ ...A, [M]: f })), y((A) => {
3198
+ ), b = h === k.length - 1, m = k[h] ?? [], F = Y((T, f) => {
3199
+ w((A) => ({ ...A, [T]: f })), y((A) => {
3200
3200
  const D = { ...A };
3201
- return delete D[M], D;
3201
+ return delete D[T], D;
3202
3202
  });
3203
- }, []), C = Q(() => {
3204
- const M = {};
3205
- for (const { question: f } of p) {
3206
- const A = xr(f, m[f.id] ?? []);
3207
- A && (M[f.id] = A);
3203
+ }, []), S = Y(() => {
3204
+ const T = {};
3205
+ for (const { question: f } of m) {
3206
+ const A = kr(f, p[f.id] ?? []);
3207
+ A && (T[f.id] = A);
3208
3208
  }
3209
- return y((f) => ({ ...f, ...M })), Object.keys(M).length === 0;
3210
- }, [p, m]), v = () => {
3211
- C() && g((M) => M + 1);
3212
- }, K = () => {
3213
- h > 0 ? g((M) => M - 1) : r == null || r();
3214
- }, Y = async () => {
3215
- if (!(!C() || !n))
3209
+ return y((f) => ({ ...f, ...T })), Object.keys(T).length === 0;
3210
+ }, [m, p]), v = () => {
3211
+ S() && g((T) => T + 1);
3212
+ }, q = () => {
3213
+ h > 0 ? g((T) => T - 1) : r == null || r();
3214
+ }, H = async () => {
3215
+ if (!(!S() || !n))
3216
3216
  try {
3217
- const M = n.questionGroups.flatMap(
3217
+ const T = n.questionGroups.flatMap(
3218
3218
  (A) => (A.questions ?? []).map((D) => ({
3219
3219
  questionId: D.id,
3220
- values: m[D.id] ?? []
3220
+ values: p[D.id] ?? []
3221
3221
  }))
3222
3222
  ), f = {
3223
3223
  applicantId: e,
3224
3224
  questionnarieId: n.id,
3225
- questionResults: M
3225
+ questionResults: T
3226
3226
  };
3227
- await d(f), t == null || t();
3228
- } catch (M) {
3229
- console.error("Questionnaire submit error:", M);
3227
+ await u(f), t == null || t();
3228
+ } catch (T) {
3229
+ console.error("Questionnaire submit error:", T);
3230
3230
  }
3231
3231
  };
3232
- return l ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ a(be, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3232
+ return l ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ a(xe, { className: "my-8" }) }) }) : c ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3233
3233
  "Error loading questionnaire: ",
3234
3234
  c.message
3235
3235
  ] }) }) }) : n ? /* @__PURE__ */ i($, { children: [
@@ -3243,7 +3243,7 @@ const vr = ({
3243
3243
  " of ",
3244
3244
  k.length
3245
3245
  ] }),
3246
- /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5", children: k.map((M, f) => /* @__PURE__ */ a(
3246
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5", children: k.map((T, f) => /* @__PURE__ */ a(
3247
3247
  "div",
3248
3248
  {
3249
3249
  className: "rounded-full transition-all duration-200",
@@ -3257,54 +3257,54 @@ const vr = ({
3257
3257
  )) })
3258
3258
  ] })
3259
3259
  ] }),
3260
- /* @__PURE__ */ a(B, { className: "space-y-6", children: p.map(({ question: M }) => /* @__PURE__ */ a(
3261
- wr,
3260
+ /* @__PURE__ */ a(B, { className: "space-y-6", children: m.map(({ question: T }) => /* @__PURE__ */ a(
3261
+ Cr,
3262
3262
  {
3263
- question: M,
3264
- value: m[M.id] ?? [],
3265
- error: N[M.id],
3266
- onChange: (f) => F(M.id, f)
3263
+ question: T,
3264
+ value: p[T.id] ?? [],
3265
+ error: N[T.id],
3266
+ onChange: (f) => F(T.id, f)
3267
3267
  },
3268
- M.id
3268
+ T.id
3269
3269
  )) }),
3270
3270
  /* @__PURE__ */ i(me, { className: "flex items-center justify-between", children: [
3271
3271
  /* @__PURE__ */ i(
3272
- q,
3272
+ U,
3273
3273
  {
3274
3274
  type: "button",
3275
3275
  variant: "outline",
3276
- onClick: K,
3276
+ onClick: q,
3277
3277
  style: { display: "flex", alignItems: "center", gap: "4px" },
3278
3278
  children: [
3279
- /* @__PURE__ */ a(tt, { size: 14 }),
3279
+ /* @__PURE__ */ a(st, { size: 14 }),
3280
3280
  h > 0 ? "Previous" : "Back"
3281
3281
  ]
3282
3282
  }
3283
3283
  ),
3284
3284
  b ? /* @__PURE__ */ a(
3285
- q,
3285
+ U,
3286
3286
  {
3287
3287
  type: "button",
3288
3288
  isLoading: o,
3289
- onClick: Y,
3289
+ onClick: H,
3290
3290
  children: "Continue"
3291
3291
  }
3292
3292
  ) : /* @__PURE__ */ i(
3293
- q,
3293
+ U,
3294
3294
  {
3295
3295
  type: "button",
3296
3296
  onClick: v,
3297
3297
  style: { display: "flex", alignItems: "center", gap: "4px" },
3298
3298
  children: [
3299
3299
  "Next",
3300
- /* @__PURE__ */ a(rt, { size: 14 })
3300
+ /* @__PURE__ */ a(it, { size: 14 })
3301
3301
  ]
3302
3302
  }
3303
3303
  )
3304
3304
  ] }),
3305
3305
  c && /* @__PURE__ */ a("div", { className: "mx-6 mb-4 p-3 bg-red-50 border border-red-200 rounded", children: /* @__PURE__ */ a("p", { className: "text-red-600 text-sm", children: c.message }) })
3306
3306
  ] }) : null;
3307
- }, wr = ({ question: e, value: t, error: r, onChange: n }) => {
3307
+ }, Cr = ({ question: e, value: t, error: r, onChange: n }) => {
3308
3308
  var o;
3309
3309
  const l = (((o = e.defaultAnswers) == null ? void 0 : o.length) ?? 0) > 0 ? e.showAsDropdown ? e.canMultipleAnswer ? "multi-select" : "single-select" : e.canMultipleAnswer ? "checkbox" : "radio" : "text";
3310
3310
  return /* @__PURE__ */ i("div", { className: "space-y-2", children: [
@@ -3383,8 +3383,8 @@ const vr = ({
3383
3383
  {
3384
3384
  type: "checkbox",
3385
3385
  checked: t.includes(c),
3386
- onChange: (d) => {
3387
- d.target.checked ? n([...t, c]) : n(t.filter((m) => m !== c));
3386
+ onChange: (u) => {
3387
+ u.target.checked ? n([...t, c]) : n(t.filter((p) => p !== c));
3388
3388
  },
3389
3389
  className: "metakyc-option-input",
3390
3390
  style: {
@@ -3411,19 +3411,19 @@ const vr = ({
3411
3411
  ] }),
3412
3412
  r && l === "text" && null
3413
3413
  ] });
3414
- }, kr = ({
3414
+ }, Ar = ({
3415
3415
  applicantId: e,
3416
3416
  onComplete: t,
3417
3417
  onBack: r
3418
3418
  }) => {
3419
- const { uploadDocument: n, isLoading: s, isSubmitting: l, error: o, submit: c } = ar(e), [d, m] = x({}), w = async (N) => {
3419
+ const { uploadDocument: n, isLoading: s, isSubmitting: l, error: o, submit: c } = lr(e), [u, p] = x({}), w = async (N) => {
3420
3420
  if (N.preventDefault(), !n) return;
3421
3421
  const y = await Promise.all(
3422
3422
  n.uploadDocumentFiles.map(async (g) => {
3423
- const k = d[g.id] || [], b = await Promise.all(
3424
- k.map(async (p) => ({
3425
- fileName: p.name,
3426
- fileData: await Vt(p)
3423
+ const k = u[g.id] || [], b = await Promise.all(
3424
+ k.map(async (m) => ({
3425
+ fileName: m.name,
3426
+ fileData: await Xt(m)
3427
3427
  }))
3428
3428
  );
3429
3429
  return {
@@ -3438,7 +3438,7 @@ const vr = ({
3438
3438
  };
3439
3439
  await c(h), t == null || t();
3440
3440
  };
3441
- return s ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ a(be, { className: "my-8" }) }) }) : o ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3441
+ return s ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ a(xe, { className: "my-8" }) }) }) : o ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3442
3442
  "Error loading document requirements: ",
3443
3443
  o.message
3444
3444
  ] }) }) }) : n ? /* @__PURE__ */ a("form", { onSubmit: w, children: /* @__PURE__ */ i($, { children: [
@@ -3447,29 +3447,29 @@ const vr = ({
3447
3447
  n.subtitle && /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: n.subtitle })
3448
3448
  ] }),
3449
3449
  /* @__PURE__ */ a(B, { className: "space-y-6", children: n.uploadDocumentFiles.map((N) => /* @__PURE__ */ a(
3450
- cr,
3450
+ pr,
3451
3451
  {
3452
3452
  label: N.displayName,
3453
3453
  accept: N.allowedTypes,
3454
3454
  multiple: N.multipleFile,
3455
3455
  maxSize: N.maxEachFileSizeByte,
3456
- value: d[N.id] || [],
3456
+ value: u[N.id] || [],
3457
3457
  onChange: (y) => {
3458
- m((h) => ({ ...h, [N.id]: y }));
3458
+ p((h) => ({ ...h, [N.id]: y }));
3459
3459
  }
3460
3460
  },
3461
3461
  N.id
3462
3462
  )) }),
3463
3463
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
3464
- r && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3465
- /* @__PURE__ */ a(q, { type: "submit", isLoading: l, children: "Continue" })
3464
+ r && /* @__PURE__ */ a(U, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3465
+ /* @__PURE__ */ a(U, { type: "submit", isLoading: l, children: "Continue" })
3466
3466
  ] })
3467
3467
  ] }) }) : null;
3468
- }, Nr = ({ applicantId: e, onComplete: t, onBack: r }) => {
3469
- const { overview: n, isLoading: s, isSubmitting: l, error: o, passOverview: c } = nr(e), d = async () => {
3468
+ }, Ir = ({ applicantId: e, onComplete: t, onBack: r }) => {
3469
+ const { overview: n, isLoading: s, isSubmitting: l, error: o, passOverview: c } = or(e), u = async () => {
3470
3470
  await c(), t == null || t();
3471
3471
  };
3472
- return s ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ a(be, { className: "my-8" }) }) }) : o ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3472
+ return s ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ a(xe, { className: "my-8" }) }) }) : o ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3473
3473
  "Error loading overview: ",
3474
3474
  o.message
3475
3475
  ] }) }) }) : n ? /* @__PURE__ */ i($, { children: [
@@ -3477,8 +3477,8 @@ const vr = ({
3477
3477
  /* @__PURE__ */ a("h2", { className: "text-lg font-bold", children: n.title || "Overview" }),
3478
3478
  n.description && /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: n.description })
3479
3479
  ] }),
3480
- /* @__PURE__ */ a(B, { className: "space-y-8", children: n.steps && n.steps.length > 0 ? n.steps.sort((m, w) => m.order - w.order).map((m) => /* @__PURE__ */ i("div", { className: "metakyc-overview-step-item flex items-center space-x-3", children: [
3481
- /* @__PURE__ */ a("div", { className: "metakyc-step-icon flex-shrink-0", children: /* @__PURE__ */ a("div", { className: "w-8 h-8 rounded-full bg-primary-500 text-white flex items-center justify-center font-medium text-sm", children: m.order + 1 }) }),
3480
+ /* @__PURE__ */ a(B, { className: "space-y-8", children: n.steps && n.steps.length > 0 ? n.steps.sort((p, w) => p.order - w.order).map((p) => /* @__PURE__ */ i("div", { className: "metakyc-overview-step-item flex items-center space-x-3", children: [
3481
+ /* @__PURE__ */ a("div", { className: "metakyc-step-icon flex-shrink-0", children: /* @__PURE__ */ a("div", { className: "w-8 h-8 rounded-full bg-primary-500 text-white flex items-center justify-center font-medium text-sm", children: p.order + 1 }) }),
3482
3482
  /* @__PURE__ */ i(
3483
3483
  "div",
3484
3484
  {
@@ -3490,19 +3490,19 @@ const vr = ({
3490
3490
  background: "transparent"
3491
3491
  },
3492
3492
  children: [
3493
- /* @__PURE__ */ a("span", { className: "metakyc-step-title text-sm font-semibold text-gray-900 dark:text-white", children: m.title }),
3494
- m.description && /* @__PURE__ */ a("p", { className: "metakyc-step-description text-sm text-gray-600 dark:text-gray-400", children: m.description })
3493
+ /* @__PURE__ */ a("span", { className: "metakyc-step-title text-sm font-semibold text-gray-900 dark:text-white", children: p.title }),
3494
+ p.description && /* @__PURE__ */ a("p", { className: "metakyc-step-description text-sm text-gray-600 dark:text-gray-400", children: p.description })
3495
3495
  ]
3496
3496
  }
3497
3497
  )
3498
- ] }, m.order)) : /* @__PURE__ */ a("div", { className: "text-center py-8", children: /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400", children: "Loading overview data..." }) }) }),
3498
+ ] }, p.order)) : /* @__PURE__ */ a("div", { className: "text-center py-8", children: /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400", children: "Loading overview data..." }) }) }),
3499
3499
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
3500
- r && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3501
- /* @__PURE__ */ a(q, { onClick: d, isLoading: l, children: "Continue" })
3500
+ r && /* @__PURE__ */ a(U, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3501
+ /* @__PURE__ */ a(U, { onClick: u, isLoading: l, children: "Continue" })
3502
3502
  ] })
3503
3503
  ] }) : null;
3504
3504
  };
3505
- function Sr(e, t) {
3505
+ function Er(e, t) {
3506
3506
  const r = !t || t.length === 0 || t.every((n) => !n || !n.trim());
3507
3507
  if (e.isRequired && r)
3508
3508
  return e.errorMessage || `${e.displayName} is required`;
@@ -3532,65 +3532,65 @@ function Sr(e, t) {
3532
3532
  }
3533
3533
  return null;
3534
3534
  }
3535
- function Cr(e) {
3535
+ function Rr(e) {
3536
3536
  const t = /* @__PURE__ */ new Map();
3537
3537
  return e.forEach((r, n) => {
3538
3538
  const s = r.pageNumber != null && r.pageNumber > 0 ? r.pageNumber : 1;
3539
3539
  t.has(s) || t.set(s, []), t.get(s).push({ criterion: r, idx: n });
3540
3540
  }), Array.from(t.entries()).sort(([r], [n]) => r - n).map(([, r]) => r);
3541
3541
  }
3542
- function Ar(e) {
3542
+ function Fr(e) {
3543
3543
  return e.builtInType === 1 ? "country" : !e.defaultValues || e.defaultValues.length === 0 ? "text" : e.multipleValue ? "checkbox" : "radio";
3544
3544
  }
3545
- const Ir = ({
3545
+ const Dr = ({
3546
3546
  applicantId: e,
3547
3547
  onComplete: t,
3548
3548
  onBack: r
3549
3549
  }) => {
3550
- const { criteria: n, initialAnswers: s, isLoading: l, isSubmitting: o, error: c, submit: d } = ir(e), [m, w] = x({}), [N, y] = x({}), [h, g] = x(0), [k, b] = x(!1);
3551
- ye.useEffect(() => {
3552
- s && Object.keys(s).length > 0 && Object.keys(m).length === 0 && w(s);
3550
+ const { criteria: n, initialAnswers: s, isLoading: l, isSubmitting: o, error: c, submit: u } = dr(e), [p, w] = x({}), [N, y] = x({}), [h, g] = x(0), [k, b] = x(!1);
3551
+ ge.useEffect(() => {
3552
+ s && Object.keys(s).length > 0 && Object.keys(p).length === 0 && w(s);
3553
3553
  }, [s]);
3554
- const p = Se(
3555
- () => n && n.length > 0 ? Cr(n) : [],
3554
+ const m = ke(
3555
+ () => n && n.length > 0 ? Rr(n) : [],
3556
3556
  [n]
3557
- ), F = h === p.length - 1, C = p[h] ?? [];
3558
- ye.useEffect(() => {
3559
- !l && n && n.length === 0 && !k && !o && (b(!0), d({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
3560
- }, [l, n, k, o, d, e, t]);
3561
- const v = Q((A, D) => {
3562
- w((V) => ({ ...V, [A]: D })), y((V) => {
3563
- const H = { ...V };
3564
- return delete H[A], H;
3557
+ ), F = h === m.length - 1, S = m[h] ?? [];
3558
+ ge.useEffect(() => {
3559
+ !l && n && n.length === 0 && !k && !o && (b(!0), u({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
3560
+ }, [l, n, k, o, u, e, t]);
3561
+ const v = Y((A, D) => {
3562
+ w((Q) => ({ ...Q, [A]: D })), y((Q) => {
3563
+ const W = { ...Q };
3564
+ return delete W[A], W;
3565
3565
  });
3566
- }, []), K = Q(() => {
3566
+ }, []), q = Y(() => {
3567
3567
  const A = {};
3568
- for (const { criterion: D } of C) {
3569
- const V = Sr(D, m[D.id] ?? []);
3570
- V && (A[D.id] = V);
3568
+ for (const { criterion: D } of S) {
3569
+ const Q = Er(D, p[D.id] ?? []);
3570
+ Q && (A[D.id] = Q);
3571
3571
  }
3572
3572
  return y((D) => ({ ...D, ...A })), Object.keys(A).length === 0;
3573
- }, [C, m]), Y = () => {
3574
- K() && g((A) => A + 1);
3575
- }, M = () => {
3573
+ }, [S, p]), H = () => {
3574
+ q() && g((A) => A + 1);
3575
+ }, T = () => {
3576
3576
  h > 0 ? g((A) => A - 1) : r == null || r();
3577
3577
  }, f = async () => {
3578
- if (!(!K() || !n))
3578
+ if (!(!q() || !n))
3579
3579
  try {
3580
- const A = n.map((V) => {
3581
- const H = (m[V.id] ?? []).filter((P) => P && P.trim());
3582
- return H.length > 0 ? { riskCriteriaId: V.id, values: H } : null;
3583
- }).filter((V) => V !== null);
3584
- await d({ applicantId: e, criteriaValueInputs: A }), t == null || t();
3580
+ const A = n.map((Q) => {
3581
+ const W = (p[Q.id] ?? []).filter((P) => P && P.trim());
3582
+ return W.length > 0 ? { riskCriteriaId: Q.id, values: W } : null;
3583
+ }).filter((Q) => Q !== null);
3584
+ await u({ applicantId: e, criteriaValueInputs: A }), t == null || t();
3585
3585
  } catch (A) {
3586
3586
  console.error("Risk scoring submit error:", A);
3587
3587
  }
3588
3588
  };
3589
3589
  return l ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
3590
- /* @__PURE__ */ a(be, { className: "my-8" }),
3590
+ /* @__PURE__ */ a(xe, { className: "my-8" }),
3591
3591
  /* @__PURE__ */ a("p", { className: "text-center text-sm mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Loading risk scoring criteria…" })
3592
3592
  ] }) }) : !l && n && n.length === 0 ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
3593
- /* @__PURE__ */ a(be, { className: "my-8" }),
3593
+ /* @__PURE__ */ a(xe, { className: "my-8" }),
3594
3594
  /* @__PURE__ */ a("p", { className: "text-center text-sm mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "No criteria required. Moving to next step…" })
3595
3595
  ] }) }) : c ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3596
3596
  "Error loading criteria: ",
@@ -3599,14 +3599,14 @@ const Ir = ({
3599
3599
  /* @__PURE__ */ i(oe, { children: [
3600
3600
  /* @__PURE__ */ a("h2", { className: "text-lg font-bold", children: "Risk Assessment" }),
3601
3601
  /* @__PURE__ */ a("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Please answer the following questions for risk evaluation" }),
3602
- p.length > 1 && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mt-3", children: [
3602
+ m.length > 1 && /* @__PURE__ */ i("div", { className: "flex items-center justify-between mt-3", children: [
3603
3603
  /* @__PURE__ */ i("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
3604
3604
  "Page ",
3605
3605
  h + 1,
3606
3606
  " of ",
3607
- p.length
3607
+ m.length
3608
3608
  ] }),
3609
- /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5", children: p.map((A, D) => /* @__PURE__ */ a(
3609
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5", children: m.map((A, D) => /* @__PURE__ */ a(
3610
3610
  "div",
3611
3611
  {
3612
3612
  className: "rounded-full transition-all duration-200",
@@ -3620,11 +3620,11 @@ const Ir = ({
3620
3620
  )) })
3621
3621
  ] })
3622
3622
  ] }),
3623
- /* @__PURE__ */ a(B, { className: "space-y-6", children: C.map(({ criterion: A }) => /* @__PURE__ */ a(
3624
- Er,
3623
+ /* @__PURE__ */ a(B, { className: "space-y-6", children: S.map(({ criterion: A }) => /* @__PURE__ */ a(
3624
+ Pr,
3625
3625
  {
3626
3626
  criterion: A,
3627
- value: m[A.id] ?? [],
3627
+ value: p[A.id] ?? [],
3628
3628
  error: N[A.id],
3629
3629
  onChange: (D) => v(A.id, D)
3630
3630
  },
@@ -3632,35 +3632,35 @@ const Ir = ({
3632
3632
  )) }),
3633
3633
  /* @__PURE__ */ i(me, { className: "flex items-center justify-between", children: [
3634
3634
  /* @__PURE__ */ i(
3635
- q,
3635
+ U,
3636
3636
  {
3637
3637
  type: "button",
3638
3638
  variant: "outline",
3639
- onClick: M,
3639
+ onClick: T,
3640
3640
  style: { display: "flex", alignItems: "center", gap: "4px" },
3641
3641
  children: [
3642
- /* @__PURE__ */ a(tt, { size: 14 }),
3642
+ /* @__PURE__ */ a(st, { size: 14 }),
3643
3643
  h > 0 ? "Previous" : "Back"
3644
3644
  ]
3645
3645
  }
3646
3646
  ),
3647
- F ? /* @__PURE__ */ a(q, { type: "button", isLoading: o, onClick: f, children: "Continue" }) : /* @__PURE__ */ i(
3648
- q,
3647
+ F ? /* @__PURE__ */ a(U, { type: "button", isLoading: o, onClick: f, children: "Continue" }) : /* @__PURE__ */ i(
3648
+ U,
3649
3649
  {
3650
3650
  type: "button",
3651
- onClick: Y,
3651
+ onClick: H,
3652
3652
  style: { display: "flex", alignItems: "center", gap: "4px" },
3653
3653
  children: [
3654
3654
  "Next",
3655
- /* @__PURE__ */ a(rt, { size: 14 })
3655
+ /* @__PURE__ */ a(it, { size: 14 })
3656
3656
  ]
3657
3657
  }
3658
3658
  )
3659
3659
  ] }),
3660
3660
  c && /* @__PURE__ */ a("div", { className: "mx-6 mb-4 p-3 bg-red-50 border border-red-200 rounded", children: /* @__PURE__ */ a("p", { className: "text-red-600 text-sm", children: c.message }) })
3661
3661
  ] }) : null;
3662
- }, Er = ({ criterion: e, value: t, error: r, onChange: n }) => {
3663
- const s = Ar(e), l = e.valueDataType === Ce.Integer || e.valueDataType === Ce.Decimal || e.valueDataType === Ce.DigitOnly;
3662
+ }, Pr = ({ criterion: e, value: t, error: r, onChange: n }) => {
3663
+ const s = Fr(e), l = e.valueDataType === Ce.Integer || e.valueDataType === Ce.Decimal || e.valueDataType === Ce.DigitOnly;
3664
3664
  return /* @__PURE__ */ i("div", { className: "space-y-2", children: [
3665
3665
  /* @__PURE__ */ i("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
3666
3666
  e.displayName,
@@ -3733,7 +3733,7 @@ const Ir = ({
3733
3733
  type: "checkbox",
3734
3734
  checked: t.includes(o),
3735
3735
  onChange: (c) => {
3736
- c.target.checked ? n([...t, o]) : n(t.filter((d) => d !== o));
3736
+ c.target.checked ? n([...t, o]) : n(t.filter((u) => u !== o));
3737
3737
  },
3738
3738
  className: "metakyc-option-input",
3739
3739
  style: {
@@ -3776,18 +3776,18 @@ const Ir = ({
3776
3776
  }
3777
3777
  )
3778
3778
  ] });
3779
- }, Rr = ({
3779
+ }, Lr = ({
3780
3780
  applicantId: e,
3781
3781
  onComplete: t,
3782
3782
  onBack: r
3783
3783
  }) => {
3784
- const { investorCategorizationService: n } = he(), [s, l] = x(null), [o, c] = x(!1), [d, m] = x(null);
3784
+ const { investorCategorizationService: n } = he(), [s, l] = x(null), [o, c] = x(!1), [u, p] = x(null);
3785
3785
  return /* @__PURE__ */ a("form", { onSubmit: async (N) => {
3786
3786
  if (N.preventDefault(), s === null) {
3787
- m("Please select an investor type");
3787
+ p("Please select an investor type");
3788
3788
  return;
3789
3789
  }
3790
- c(!0), m(null);
3790
+ c(!0), p(null);
3791
3791
  try {
3792
3792
  const y = {
3793
3793
  applicantId: e,
@@ -3797,7 +3797,7 @@ const Ir = ({
3797
3797
  const h = await n.setInvestorCategorization(y);
3798
3798
  console.log("Investor categorization result:", h), t == null || t();
3799
3799
  } catch (y) {
3800
- console.error("Error submitting investor categorization:", y), m(y.message || "Failed to submit investor categorization");
3800
+ console.error("Error submitting investor categorization:", y), p(y.message || "Failed to submit investor categorization");
3801
3801
  } finally {
3802
3802
  c(!1);
3803
3803
  }
@@ -3895,16 +3895,16 @@ const Ir = ({
3895
3895
  ] })
3896
3896
  }
3897
3897
  ),
3898
- d && /* @__PURE__ */ a("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-red-600 dark:text-red-400 text-sm", children: [
3898
+ u && /* @__PURE__ */ a("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-red-600 dark:text-red-400 text-sm", children: [
3899
3899
  /* @__PURE__ */ a("strong", { children: "Error:" }),
3900
3900
  " ",
3901
- d
3901
+ u
3902
3902
  ] }) })
3903
3903
  ] }),
3904
3904
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
3905
- r && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3905
+ r && /* @__PURE__ */ a(U, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3906
3906
  /* @__PURE__ */ a(
3907
- q,
3907
+ U,
3908
3908
  {
3909
3909
  type: "submit",
3910
3910
  isLoading: o,
@@ -3914,116 +3914,116 @@ const Ir = ({
3914
3914
  )
3915
3915
  ] })
3916
3916
  ] }) });
3917
- }, Fr = ({
3917
+ }, Mr = ({
3918
3918
  applicantId: e,
3919
3919
  onComplete: t,
3920
3920
  onBack: r
3921
3921
  }) => {
3922
- const { appropriatenessTestService: n } = he(), [s, l] = x(null), [o, c] = x(!0), [d, m] = x(!1), [w, N] = x(null), [y, h] = x({}), [g, k] = x(0), [b, p] = x(!1), [F, C] = x(!1), [v, K] = x(0);
3923
- ee(() => {
3922
+ const { appropriatenessTestService: n } = he(), [s, l] = x(null), [o, c] = x(!0), [u, p] = x(!1), [w, N] = x(null), [y, h] = x({}), [g, k] = x(0), [b, m] = x(!1), [F, S] = x(!1), [v, q] = x(0);
3923
+ X(() => {
3924
3924
  (async () => {
3925
3925
  try {
3926
3926
  c(!0), N(null), console.log("Loading appropriateness test for applicant:", e);
3927
- const E = await n.getAppropriatenessTest(e);
3928
- if (console.log("Appropriateness test data:", E), l(E), E.waitTimeSpanForNextTry && E.waitTimeSpanForNextTry !== "00:00:00") {
3929
- const Z = Y(E.waitTimeSpanForNextTry);
3930
- Z > 0 && K(Z);
3927
+ const R = await n.getAppropriatenessTest(e);
3928
+ if (console.log("Appropriateness test data:", R), l(R), R.waitTimeSpanForNextTry && R.waitTimeSpanForNextTry !== "00:00:00") {
3929
+ const G = H(R.waitTimeSpanForNextTry);
3930
+ G > 0 && q(G);
3931
3931
  }
3932
- } catch (E) {
3933
- console.error("Error loading appropriateness test:", E), N(E.message || "Failed to load appropriateness test");
3932
+ } catch (R) {
3933
+ console.error("Error loading appropriateness test:", R), N(R.message || "Failed to load appropriateness test");
3934
3934
  } finally {
3935
3935
  c(!1);
3936
3936
  }
3937
3937
  })();
3938
3938
  }, [e, n]);
3939
- const Y = (P) => {
3940
- const E = P.split(":").map(Number);
3941
- if (E.length === 3) {
3942
- const [Z, j, le] = E;
3943
- return Z * 3600 + j * 60 + le;
3939
+ const H = (P) => {
3940
+ const R = P.split(":").map(Number);
3941
+ if (R.length === 3) {
3942
+ const [G, K, le] = R;
3943
+ return G * 3600 + K * 60 + le;
3944
3944
  }
3945
3945
  return 0;
3946
- }, M = (P) => {
3947
- const E = Math.floor(P / 60), Z = P % 60;
3948
- return `${E.toString().padStart(2, "0")}:${Z.toString().padStart(2, "0")}`;
3946
+ }, T = (P) => {
3947
+ const R = Math.floor(P / 60), G = P % 60;
3948
+ return `${R.toString().padStart(2, "0")}:${G.toString().padStart(2, "0")}`;
3949
3949
  };
3950
- ee(() => {
3950
+ X(() => {
3951
3951
  if (!b || g <= 0) return;
3952
3952
  const P = setInterval(() => {
3953
- k((E) => E <= 1 ? (C(!0), 0) : E - 1);
3953
+ k((R) => R <= 1 ? (S(!0), 0) : R - 1);
3954
3954
  }, 1e3);
3955
3955
  return () => clearInterval(P);
3956
- }, [b, g]), ee(() => {
3956
+ }, [b, g]), X(() => {
3957
3957
  if (v <= 0) return;
3958
3958
  const P = setInterval(() => {
3959
- K((E) => E <= 1 ? 0 : E - 1);
3959
+ q((R) => R <= 1 ? 0 : R - 1);
3960
3960
  }, 1e3);
3961
3961
  return () => clearInterval(P);
3962
- }, [v]), ee(() => {
3963
- F && !d && D();
3962
+ }, [v]), X(() => {
3963
+ F && !u && D();
3964
3964
  }, [F]);
3965
3965
  const f = () => {
3966
- s && (p(!0), k(s.testDurationSec));
3967
- }, A = (P, E) => {
3968
- h((Z) => ({
3969
- ...Z,
3970
- [P]: E
3966
+ s && (m(!0), k(s.testDurationSec));
3967
+ }, A = (P, R) => {
3968
+ h((G) => ({
3969
+ ...G,
3970
+ [P]: R
3971
3971
  }));
3972
3972
  }, D = async (P) => {
3973
3973
  if (P && P.preventDefault(), !!s) {
3974
3974
  if (!F) {
3975
- const E = s.appropriatenessQuestions.length - Object.keys(y).length;
3976
- if (E > 0) {
3977
- N(`Please answer all questions. ${E} question(s) remaining.`);
3975
+ const R = s.appropriatenessQuestions.length - Object.keys(y).length;
3976
+ if (R > 0) {
3977
+ N(`Please answer all questions. ${R} question(s) remaining.`);
3978
3978
  return;
3979
3979
  }
3980
3980
  }
3981
- m(!0), N(null);
3981
+ p(!0), N(null);
3982
3982
  try {
3983
- const E = s.appropriatenessQuestions.map(
3984
- (j) => ({
3985
- appropriatenessQuestionId: j.id,
3986
- value: y[j.id] || ""
3983
+ const R = s.appropriatenessQuestions.map(
3984
+ (K) => ({
3985
+ appropriatenessQuestionId: K.id,
3986
+ value: y[K.id] || ""
3987
3987
  // Empty string if not answered
3988
3988
  })
3989
- ), Z = {
3989
+ ), G = {
3990
3990
  applicantId: e,
3991
3991
  appropriatenessTestId: s.id,
3992
- appropriatenessQuestionResults: E
3992
+ appropriatenessQuestionResults: R
3993
3993
  };
3994
- console.log("Submitting appropriateness test:", Z);
3994
+ console.log("Submitting appropriateness test:", G);
3995
3995
  try {
3996
- const j = await n.fillAppropriatenessTest(Z);
3997
- console.log("Appropriateness test result:", j), j.message && (j.message.toLowerCase().includes("pass") || j.message.toLowerCase().includes("success") || j.message.toLowerCase().includes("congratulations")) ? t == null || t() : (N(j.message || "Test completed. Please check the result."), p(!1), C(!1), h({}), setTimeout(() => V(), 1e3));
3998
- } catch (j) {
3999
- if (j.code === 400 && j.message) {
4000
- const le = j.message;
4001
- console.log("Test failed:", le), N(le), p(!1), C(!1), h({}), setTimeout(() => V(), 1500);
3996
+ const K = await n.fillAppropriatenessTest(G);
3997
+ console.log("Appropriateness test result:", K), K.message && (K.message.toLowerCase().includes("pass") || K.message.toLowerCase().includes("success") || K.message.toLowerCase().includes("congratulations")) ? t == null || t() : (N(K.message || "Test completed. Please check the result."), m(!1), S(!1), h({}), setTimeout(() => Q(), 1e3));
3998
+ } catch (K) {
3999
+ if (K.code === 400 && K.message) {
4000
+ const le = K.message;
4001
+ console.log("Test failed:", le), N(le), m(!1), S(!1), h({}), setTimeout(() => Q(), 1500);
4002
4002
  } else
4003
- throw j;
4003
+ throw K;
4004
4004
  }
4005
- } catch (E) {
4006
- console.error("Error submitting appropriateness test:", E), N(E.message || "Failed to submit test. Please try again."), p(!1), C(!1), h({});
4005
+ } catch (R) {
4006
+ console.error("Error submitting appropriateness test:", R), N(R.message || "Failed to submit test. Please try again."), m(!1), S(!1), h({});
4007
4007
  } finally {
4008
- m(!1);
4008
+ p(!1);
4009
4009
  }
4010
4010
  }
4011
- }, V = async () => {
4011
+ }, Q = async () => {
4012
4012
  try {
4013
4013
  const P = await n.getAppropriatenessTest(e);
4014
4014
  if (console.log("Reloaded test data:", P), l(P), P.waitTimeSpanForNextTry && P.waitTimeSpanForNextTry !== "00:00:00") {
4015
- const E = Y(P.waitTimeSpanForNextTry);
4016
- E > 0 && K(E);
4015
+ const R = H(P.waitTimeSpanForNextTry);
4016
+ R > 0 && q(R);
4017
4017
  }
4018
4018
  } catch (P) {
4019
- console.error("Error reloading test data:", P), N((E) => E + `
4019
+ console.error("Error reloading test data:", P), N((R) => R + `
4020
4020
 
4021
4021
  Failed to reload test data. Please refresh the page.`);
4022
4022
  }
4023
4023
  };
4024
4024
  if (o)
4025
4025
  return /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
4026
- /* @__PURE__ */ a(be, { className: "my-8" }),
4026
+ /* @__PURE__ */ a(xe, { className: "my-8" }),
4027
4027
  /* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading appropriateness test..." })
4028
4028
  ] }) });
4029
4029
  if (!s)
@@ -4039,13 +4039,13 @@ Failed to reload test data. Please refresh the page.`);
4039
4039
  ] }),
4040
4040
  /* @__PURE__ */ i(B, { className: "py-12 text-center", children: [
4041
4041
  /* @__PURE__ */ i("div", { className: "mb-6", children: [
4042
- /* @__PURE__ */ a("div", { className: "text-6xl font-bold text-primary-500 mb-2", children: M(v) }),
4042
+ /* @__PURE__ */ a("div", { className: "text-6xl font-bold text-primary-500 mb-2", children: T(v) }),
4043
4043
  /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait before attempting the test again" })
4044
4044
  ] }),
4045
4045
  w && /* @__PURE__ */ a("div", { className: "mt-4 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ a("p", { className: "text-red-600 dark:text-red-400 text-sm", children: w }) })
4046
4046
  ] })
4047
4047
  ] });
4048
- const H = s.testAllowedMaxTry - s.totalFailedTries;
4048
+ const W = s.testAllowedMaxTry - s.totalFailedTries;
4049
4049
  return b ? /* @__PURE__ */ a("form", { onSubmit: D, children: /* @__PURE__ */ i($, { children: [
4050
4050
  /* @__PURE__ */ a(oe, { children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
4051
4051
  /* @__PURE__ */ i("div", { children: [
@@ -4057,7 +4057,7 @@ Failed to reload test data. Please refresh the page.`);
4057
4057
  "div",
4058
4058
  {
4059
4059
  className: `text-3xl font-bold ${g <= 60 ? "text-danger-500" : "text-primary-500"}`,
4060
- children: M(g)
4060
+ children: T(g)
4061
4061
  }
4062
4062
  ),
4063
4063
  /* @__PURE__ */ a("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Time Remaining" })
@@ -4065,20 +4065,20 @@ Failed to reload test data. Please refresh the page.`);
4065
4065
  ] }) }),
4066
4066
  /* @__PURE__ */ i(B, { className: "space-y-6", children: [
4067
4067
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-4", children: [
4068
- /* @__PURE__ */ i(Ne, { variant: "info", children: [
4068
+ /* @__PURE__ */ i(Se, { variant: "info", children: [
4069
4069
  "Question ",
4070
4070
  Object.keys(y).length,
4071
4071
  " of ",
4072
4072
  s.totalQuestionCount
4073
4073
  ] }),
4074
- /* @__PURE__ */ i(Ne, { variant: H > 1 ? "success" : "warning", children: [
4075
- H,
4074
+ /* @__PURE__ */ i(Se, { variant: W > 1 ? "success" : "warning", children: [
4075
+ W,
4076
4076
  " attempt",
4077
- H !== 1 ? "s" : "",
4077
+ W !== 1 ? "s" : "",
4078
4078
  " remaining"
4079
4079
  ] })
4080
4080
  ] }),
4081
- s.appropriatenessQuestions.map((P, E) => /* @__PURE__ */ i(
4081
+ s.appropriatenessQuestions.map((P, R) => /* @__PURE__ */ i(
4082
4082
  "div",
4083
4083
  {
4084
4084
  className: "p-4 border border-gray-200 dark:border-gray-700 rounded-lg",
@@ -4086,17 +4086,17 @@ Failed to reload test data. Please refresh the page.`);
4086
4086
  /* @__PURE__ */ i("div", { className: "mb-4", children: [
4087
4087
  /* @__PURE__ */ i("span", { className: "inline-block px-2 py-1 text-xs font-semibold text-primary-700 bg-primary-100 dark:text-primary-300 dark:bg-primary-900/30 rounded mb-2", children: [
4088
4088
  "Question ",
4089
- E + 1
4089
+ R + 1
4090
4090
  ] }),
4091
4091
  P.groupName && /* @__PURE__ */ a("span", { className: "ml-2 text-xs text-gray-500 dark:text-gray-400", children: P.groupName }),
4092
4092
  /* @__PURE__ */ a("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mt-2", children: P.question })
4093
4093
  ] }),
4094
- /* @__PURE__ */ a("div", { className: "space-y-2", children: P.answers.map((Z, j) => /* @__PURE__ */ i(
4094
+ /* @__PURE__ */ a("div", { className: "space-y-2", children: P.answers.map((G, K) => /* @__PURE__ */ i(
4095
4095
  "label",
4096
4096
  {
4097
4097
  className: `
4098
4098
  flex items-center p-3 border-2 rounded-lg cursor-pointer transition-all
4099
- ${y[P.id] === Z ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"}
4099
+ ${y[P.id] === G ? "border-primary-500 bg-primary-50 dark:bg-primary-900/20" : "border-gray-200 dark:border-gray-700 hover:border-gray-300 dark:hover:border-gray-600"}
4100
4100
  `,
4101
4101
  children: [
4102
4102
  /* @__PURE__ */ a(
@@ -4104,17 +4104,17 @@ Failed to reload test data. Please refresh the page.`);
4104
4104
  {
4105
4105
  type: "radio",
4106
4106
  name: `question-${P.id}`,
4107
- value: Z,
4108
- checked: y[P.id] === Z,
4107
+ value: G,
4108
+ checked: y[P.id] === G,
4109
4109
  onChange: (le) => A(P.id, le.target.value),
4110
4110
  className: "h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500",
4111
- disabled: d
4111
+ disabled: u
4112
4112
  }
4113
4113
  ),
4114
- /* @__PURE__ */ a("span", { className: "ml-3 text-gray-700 dark:text-gray-300", children: Z })
4114
+ /* @__PURE__ */ a("span", { className: "ml-3 text-gray-700 dark:text-gray-300", children: G })
4115
4115
  ]
4116
4116
  },
4117
- j
4117
+ K
4118
4118
  )) })
4119
4119
  ]
4120
4120
  },
@@ -4132,20 +4132,20 @@ Failed to reload test data. Please refresh the page.`);
4132
4132
  ] }),
4133
4133
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
4134
4134
  /* @__PURE__ */ a(
4135
- q,
4135
+ U,
4136
4136
  {
4137
4137
  type: "button",
4138
4138
  variant: "outline",
4139
4139
  onClick: r,
4140
- disabled: d,
4140
+ disabled: u,
4141
4141
  children: "Cancel"
4142
4142
  }
4143
4143
  ),
4144
4144
  /* @__PURE__ */ a(
4145
- q,
4145
+ U,
4146
4146
  {
4147
4147
  type: "submit",
4148
- isLoading: d,
4148
+ isLoading: u,
4149
4149
  disabled: Object.keys(y).length < s.totalQuestionCount,
4150
4150
  children: F ? "Submitting..." : "Submit Test"
4151
4151
  }
@@ -4161,19 +4161,19 @@ Failed to reload test data. Please refresh the page.`);
4161
4161
  /* @__PURE__ */ i("div", { className: "space-y-4 mb-6", children: [
4162
4162
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
4163
4163
  /* @__PURE__ */ a("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Total Questions:" }),
4164
- /* @__PURE__ */ a(Ne, { variant: "info", children: s.totalQuestionCount })
4164
+ /* @__PURE__ */ a(Se, { variant: "info", children: s.totalQuestionCount })
4165
4165
  ] }),
4166
4166
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
4167
4167
  /* @__PURE__ */ a("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Time Limit:" }),
4168
- /* @__PURE__ */ a(Ne, { variant: "info", children: M(s.testDurationSec) })
4168
+ /* @__PURE__ */ a(Se, { variant: "info", children: T(s.testDurationSec) })
4169
4169
  ] }),
4170
4170
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
4171
4171
  /* @__PURE__ */ a("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Correct Answers Required:" }),
4172
- /* @__PURE__ */ a(Ne, { variant: "info", children: s.testCorrectAnswerPassLimit })
4172
+ /* @__PURE__ */ a(Se, { variant: "info", children: s.testCorrectAnswerPassLimit })
4173
4173
  ] }),
4174
4174
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
4175
4175
  /* @__PURE__ */ a("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Attempts Remaining:" }),
4176
- /* @__PURE__ */ a(Ne, { variant: H > 1 ? "success" : "warning", children: H })
4176
+ /* @__PURE__ */ a(Se, { variant: W > 1 ? "success" : "warning", children: W })
4177
4177
  ] })
4178
4178
  ] }),
4179
4179
  w && /* @__PURE__ */ a("div", { className: "mb-4 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-red-600 dark:text-red-400 text-sm", children: [
@@ -4181,28 +4181,28 @@ Failed to reload test data. Please refresh the page.`);
4181
4181
  " ",
4182
4182
  w
4183
4183
  ] }) }),
4184
- H <= 0 && /* @__PURE__ */ a("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ a("p", { className: "text-red-600 dark:text-red-400", children: "You have used all your attempts. Please contact support for assistance." }) })
4184
+ W <= 0 && /* @__PURE__ */ a("div", { className: "p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg", children: /* @__PURE__ */ a("p", { className: "text-red-600 dark:text-red-400", children: "You have used all your attempts. Please contact support for assistance." }) })
4185
4185
  ] }),
4186
4186
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
4187
- r && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: r, children: "Back" }),
4187
+ r && /* @__PURE__ */ a(U, { type: "button", variant: "outline", onClick: r, children: "Back" }),
4188
4188
  /* @__PURE__ */ a(
4189
- q,
4189
+ U,
4190
4190
  {
4191
4191
  type: "button",
4192
4192
  onClick: f,
4193
- disabled: H <= 0,
4193
+ disabled: W <= 0,
4194
4194
  children: "Start Test"
4195
4195
  }
4196
4196
  )
4197
4197
  ] })
4198
4198
  ] });
4199
- }, Dr = ({
4199
+ }, Tr = ({
4200
4200
  applicantId: e,
4201
4201
  onComplete: t,
4202
4202
  onBack: r
4203
4203
  }) => {
4204
- var Z, j, le, re;
4205
- const { applicantService: n, baseInformationService: s, config: l } = he(), { identityData: o, provider: c, token: d, isLoading: m, error: w, requestIdentity: N, restartIdentity: y } = sr(e), [h, g] = x(null), [k, b] = x(null), [p, F] = x([]), [C, v] = x(!0), [K, Y] = x(!1), [M, f] = x(null), [A, D] = x(!1), V = ye.useRef(!1), H = ct({
4204
+ var G, K, le, be;
4205
+ const { applicantService: n, baseInformationService: s, config: l } = he(), { identityData: o, provider: c, token: u, isLoading: p, error: w, requestIdentity: N, restartIdentity: y } = cr(e), [h, g] = x(null), [k, b] = x(null), [m, F] = x([]), [S, v] = x(!0), [q, H] = x(!1), [T, f] = x(null), [A, D] = x(!1), Q = ge.useRef(!1), W = pt({
4206
4206
  defaultValues: {
4207
4207
  street: "",
4208
4208
  streetNumber: "",
@@ -4213,32 +4213,32 @@ Failed to reload test data. Please refresh the page.`);
4213
4213
  phonenumber: ""
4214
4214
  }
4215
4215
  });
4216
- ee(() => {
4216
+ X(() => {
4217
4217
  (async () => {
4218
4218
  try {
4219
- const [L, ae] = await Promise.all([
4219
+ const [L, ee] = await Promise.all([
4220
4220
  n.getApplicantData(e),
4221
4221
  s.getCountries("", "en")
4222
4222
  ]);
4223
4223
  b(L);
4224
- const J = /* @__PURE__ */ new Set(), ce = ae.filter((ve) => {
4225
- const u = ve.abbreviation3 || ve.abbreviation;
4226
- return !u || J.has(u) ? !1 : (J.add(u), !0);
4224
+ const Z = /* @__PURE__ */ new Set(), ae = ee.filter((ve) => {
4225
+ const Le = ve.abbreviation3 || ve.abbreviation;
4226
+ return !Le || Z.has(Le) ? !1 : (Z.add(Le), !0);
4227
4227
  });
4228
- F(ce);
4229
- const z = L.applicantRequestData;
4230
- if (H.reset({
4231
- street: (z == null ? void 0 : z.street) || "",
4232
- streetNumber: (z == null ? void 0 : z.streetNumber) || "",
4233
- city: (z == null ? void 0 : z.city) || "",
4234
- zip: (z == null ? void 0 : z.zip) || "",
4235
- country: (z == null ? void 0 : z.country) || "",
4236
- nationality: (z == null ? void 0 : z.nationality) || "",
4237
- phonenumber: (z == null ? void 0 : z.phonenumber) || ""
4238
- }), L.kycRecords && L.kycRecords.length > 0 && L.kycRecords[0].providerTokenObject !== null && !V.current) {
4239
- console.log("[Identity] Found existing identity verification, auto-requesting..."), V.current = !0;
4228
+ F(ae);
4229
+ const j = L.applicantRequestData;
4230
+ if (W.reset({
4231
+ street: (j == null ? void 0 : j.street) || "",
4232
+ streetNumber: (j == null ? void 0 : j.streetNumber) || "",
4233
+ city: (j == null ? void 0 : j.city) || "",
4234
+ zip: (j == null ? void 0 : j.zip) || "",
4235
+ country: (j == null ? void 0 : j.country) || "",
4236
+ nationality: (j == null ? void 0 : j.nationality) || "",
4237
+ phonenumber: (j == null ? void 0 : j.phonenumber) || ""
4238
+ }), L.kycRecords && L.kycRecords.length > 0 && L.kycRecords[0].providerTokenObject !== null && !Q.current) {
4239
+ console.log("[Identity] Found existing identity verification, auto-requesting..."), Q.current = !0;
4240
4240
  try {
4241
- await N(), Y(!0);
4241
+ await N(), H(!0);
4242
4242
  } catch (ve) {
4243
4243
  console.error("[Identity] Auto-request failed:", ve);
4244
4244
  }
@@ -4249,20 +4249,20 @@ Failed to reload test data. Please refresh the page.`);
4249
4249
  v(!1);
4250
4250
  }
4251
4251
  })();
4252
- }, [e]), ee(() => {
4253
- o && !K && (console.log("[Identity] Identity data already loaded, showing provider"), Y(!0));
4254
- }, [o, K]), ee(() => {
4255
- if (d) {
4256
- if (d.expiresAt) {
4257
- const O = new Date(d.expiresAt).getTime();
4252
+ }, [e]), X(() => {
4253
+ o && !q && (console.log("[Identity] Identity data already loaded, showing provider"), H(!0));
4254
+ }, [o, q]), X(() => {
4255
+ if (u) {
4256
+ if (u.expiresAt) {
4257
+ const O = new Date(u.expiresAt).getTime();
4258
4258
  if (Date.now() >= O) {
4259
4259
  console.warn("[Identity] Token has expired (expiresAt)"), D(!0), f("Your verification session has expired. Please restart.");
4260
4260
  return;
4261
4261
  }
4262
4262
  }
4263
- if (d.url)
4263
+ if (u.url)
4264
4264
  try {
4265
- const L = new URL(d.url).toString().toLowerCase();
4265
+ const L = new URL(u.url).toString().toLowerCase();
4266
4266
  if (L.includes("expired") || L.includes("invalid") || L.includes("error")) {
4267
4267
  console.warn("[Identity] Token URL indicates expiration"), D(!0), f("Your verification link has expired. Please restart.");
4268
4268
  return;
@@ -4270,49 +4270,49 @@ Failed to reload test data. Please refresh the page.`);
4270
4270
  } catch {
4271
4271
  console.error("[Identity] Invalid token URL");
4272
4272
  }
4273
- if (d.status === "expired" || d.error === "expired" || d.expired === !0) {
4273
+ if (u.status === "expired" || u.error === "expired" || u.expired === !0) {
4274
4274
  console.warn("[Identity] Token object indicates expiration"), D(!0), f("Your verification session has expired. Please restart.");
4275
4275
  return;
4276
4276
  }
4277
4277
  }
4278
- }, [d]), ee(() => {
4279
- if (c !== null && d && !h && K && !A) {
4278
+ }, [u]), X(() => {
4279
+ if (c !== null && u && !h && q && !A) {
4280
4280
  const O = c;
4281
- if (d.url) {
4282
- console.log("[Identity] Loading provider URL for user verification:", d.url), f(null);
4281
+ if (u.url) {
4282
+ console.log("[Identity] Loading provider URL for user verification:", u.url), f(null);
4283
4283
  try {
4284
- if (new URL(d.url), O === fe.SardinAI) {
4284
+ if (new URL(u.url), O === ye.SardinAI) {
4285
4285
  console.log("[SardinAI] Initializing Risk SDK in background...");
4286
4286
  try {
4287
- const L = De.parseProviderConfig(c, d, l);
4287
+ const L = De.parseProviderConfig(c, u, l);
4288
4288
  De.createProvider(c, L).initialize().then(() => {
4289
4289
  console.log("[SardinAI] Risk SDK initialized successfully in background");
4290
- }).catch((J) => {
4291
- console.warn("[SardinAI] Risk SDK initialization failed (non-blocking):", J);
4290
+ }).catch((Z) => {
4291
+ console.warn("[SardinAI] Risk SDK initialization failed (non-blocking):", Z);
4292
4292
  });
4293
4293
  } catch (L) {
4294
4294
  console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", L);
4295
4295
  }
4296
4296
  }
4297
- g({ type: "url", url: d.url });
4297
+ g({ type: "url", url: u.url });
4298
4298
  } catch (L) {
4299
4299
  console.error("[Identity] Invalid URL:", L), f("Invalid verification URL. Please restart."), D(!0);
4300
4300
  }
4301
4301
  return;
4302
4302
  }
4303
- if (O === fe.SardinAI) {
4303
+ if (O === ye.SardinAI) {
4304
4304
  console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), f(null);
4305
4305
  try {
4306
- const L = De.parseProviderConfig(c, d, l), ae = De.createProvider(c, L);
4307
- ae.initialize().then(() => {
4308
- console.log("[SardinAI] Risk SDK initialized successfully"), g(ae), setTimeout(() => {
4306
+ const L = De.parseProviderConfig(c, u, l), ee = De.createProvider(c, L);
4307
+ ee.initialize().then(() => {
4308
+ console.log("[SardinAI] Risk SDK initialized successfully"), g(ee), setTimeout(() => {
4309
4309
  t == null || t();
4310
4310
  }, 2e3);
4311
- }).catch((J) => {
4312
- var z;
4313
- console.error("[SardinAI] Failed to initialize:", J);
4314
- const ce = ((z = J.message) == null ? void 0 : z.toLowerCase()) || "";
4315
- ce.includes("expired") || ce.includes("invalid") || ce.includes("401") || ce.includes("400") ? (D(!0), f("Session expired or invalid. Please restart verification.")) : f(`Failed to initialize: ${J.message}`);
4311
+ }).catch((Z) => {
4312
+ var j;
4313
+ console.error("[SardinAI] Failed to initialize:", Z);
4314
+ const ae = ((j = Z.message) == null ? void 0 : j.toLowerCase()) || "";
4315
+ ae.includes("expired") || ae.includes("invalid") || ae.includes("401") || ae.includes("400") ? (D(!0), f("Session expired or invalid. Please restart verification.")) : f(`Failed to initialize: ${Z.message}`);
4316
4316
  });
4317
4317
  } catch (L) {
4318
4318
  console.error("[SardinAI] Error creating provider:", L), f(`Configuration error: ${L.message}`);
@@ -4321,15 +4321,15 @@ Failed to reload test data. Please refresh the page.`);
4321
4321
  }
4322
4322
  try {
4323
4323
  f(null);
4324
- const L = De.parseProviderConfig(c, d, l), ae = De.createProvider(c, L);
4325
- O === fe.Sumsub ? (ae.initialize("identity-container").catch((J) => {
4326
- var ce;
4327
- console.error("[Sumsub] Initialization error:", J), f(`Failed to initialize: ${J.message}`), (ce = J.message) != null && ce.toLowerCase().includes("expired") && D(!0);
4328
- }), ae.onComplete && ae.onComplete(() => {
4324
+ const L = De.parseProviderConfig(c, u, l), ee = De.createProvider(c, L);
4325
+ O === ye.Sumsub ? (ee.initialize("identity-container").catch((Z) => {
4326
+ var ae;
4327
+ console.error("[Sumsub] Initialization error:", Z), f(`Failed to initialize: ${Z.message}`), (ae = Z.message) != null && ae.toLowerCase().includes("expired") && D(!0);
4328
+ }), ee.onComplete && ee.onComplete(() => {
4329
4329
  t == null || t();
4330
- })) : O === fe.Onfido && ae.initialize("identity-container").catch((J) => {
4331
- console.error("[Onfido] Initialization error:", J), f(`Failed to initialize: ${J.message}`);
4332
- }), g(ae);
4330
+ })) : O === ye.Onfido && ee.initialize("identity-container").catch((Z) => {
4331
+ console.error("[Onfido] Initialization error:", Z), f(`Failed to initialize: ${Z.message}`);
4332
+ }), g(ee);
4333
4333
  } catch (L) {
4334
4334
  console.error("[Identity] Provider setup error:", L), f(`Setup error: ${L.message}`);
4335
4335
  }
@@ -4342,23 +4342,23 @@ Failed to reload test data. Please refresh the page.`);
4342
4342
  console.error("[Identity] Error destroying provider:", O);
4343
4343
  }
4344
4344
  };
4345
- }, [c, d, h, K, t, A]);
4345
+ }, [c, u, h, q, t, A]);
4346
4346
  const P = async () => {
4347
4347
  try {
4348
- f(null), D(!1), await N(), Y(!0);
4348
+ f(null), D(!1), await N(), H(!0);
4349
4349
  } catch (O) {
4350
4350
  console.error("Error starting identity verification:", O);
4351
4351
  }
4352
- }, E = async () => {
4352
+ }, R = async () => {
4353
4353
  try {
4354
- f(null), D(!1), g(null), console.log("[Identity] Restarting verification..."), await y(), Y(!0);
4354
+ f(null), D(!1), g(null), console.log("[Identity] Restarting verification..."), await y(), H(!0);
4355
4355
  } catch (O) {
4356
4356
  console.error("Error restarting identity verification:", O), f(O.message || "Failed to restart verification");
4357
4357
  }
4358
4358
  };
4359
- if (C || m)
4359
+ if (S || p)
4360
4360
  return /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
4361
- /* @__PURE__ */ a(be, { className: "my-8" }),
4361
+ /* @__PURE__ */ a(xe, { className: "my-8" }),
4362
4362
  /* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading identity verification..." })
4363
4363
  ] }) });
4364
4364
  if (w)
@@ -4366,7 +4366,7 @@ Failed to reload test data. Please refresh the page.`);
4366
4366
  "Error: ",
4367
4367
  w.message
4368
4368
  ] }) }) });
4369
- if (K && (M || A))
4369
+ if (q && (T || A))
4370
4370
  return /* @__PURE__ */ i($, { children: [
4371
4371
  /* @__PURE__ */ a(oe, { children: /* @__PURE__ */ a("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: "Verification Session Issue" }) }),
4372
4372
  /* @__PURE__ */ i(B, { children: [
@@ -4391,7 +4391,7 @@ Failed to reload test data. Please refresh the page.`);
4391
4391
  ),
4392
4392
  /* @__PURE__ */ i("div", { children: [
4393
4393
  /* @__PURE__ */ a("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children: A ? "Session Expired" : "Verification Error" }),
4394
- /* @__PURE__ */ a("p", { className: "text-red-800 dark:text-red-200 text-sm", children: M || "Your verification session has expired and needs to be restarted." })
4394
+ /* @__PURE__ */ a("p", { className: "text-red-800 dark:text-red-200 text-sm", children: T || "Your verification session has expired and needs to be restarted." })
4395
4395
  ] })
4396
4396
  ] }) }),
4397
4397
  /* @__PURE__ */ i("div", { className: "bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4", children: [
@@ -4404,26 +4404,26 @@ Failed to reload test data. Please refresh the page.`);
4404
4404
  ] })
4405
4405
  ] }),
4406
4406
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
4407
- r && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: r, children: "Back" }),
4408
- /* @__PURE__ */ a(q, { type: "button", onClick: E, disabled: m, children: m ? "Restarting..." : "Restart Verification" })
4407
+ r && /* @__PURE__ */ a(U, { type: "button", variant: "outline", onClick: r, children: "Back" }),
4408
+ /* @__PURE__ */ a(U, { type: "button", onClick: R, disabled: p, children: p ? "Restarting..." : "Restart Verification" })
4409
4409
  ] })
4410
4410
  ] });
4411
- if (K && o) {
4411
+ if (q && o) {
4412
4412
  const O = c;
4413
- return d != null && d.url ? /* @__PURE__ */ i($, { children: [
4413
+ return u != null && u.url ? /* @__PURE__ */ i($, { children: [
4414
4414
  /* @__PURE__ */ a(oe, { children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
4415
4415
  /* @__PURE__ */ i("div", { children: [
4416
4416
  /* @__PURE__ */ a("h2", { className: "text-2xl font-bold", children: "Identity Verification" }),
4417
4417
  /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
4418
4418
  ] }),
4419
4419
  /* @__PURE__ */ a(
4420
- q,
4420
+ U,
4421
4421
  {
4422
4422
  type: "button",
4423
4423
  variant: "outline",
4424
4424
  size: "sm",
4425
- onClick: E,
4426
- disabled: m,
4425
+ onClick: R,
4426
+ disabled: p,
4427
4427
  children: "Restart"
4428
4428
  }
4429
4429
  )
@@ -4436,17 +4436,17 @@ Failed to reload test data. Please refresh the page.`);
4436
4436
  /* @__PURE__ */ a("div", { className: "w-full", style: { height: "600px" }, children: /* @__PURE__ */ a(
4437
4437
  "iframe",
4438
4438
  {
4439
- src: d.url,
4439
+ src: u.url,
4440
4440
  className: "w-full h-full border-0 rounded-lg",
4441
4441
  allow: "camera; microphone; geolocation",
4442
4442
  title: "Identity Verification",
4443
4443
  onLoad: (L) => {
4444
- var ae, J, ce;
4444
+ var ee, Z, ae;
4445
4445
  console.log("[Identity] Iframe loaded");
4446
4446
  try {
4447
- const z = L.target, Fe = z.contentDocument || ((ae = z.contentWindow) == null ? void 0 : ae.document);
4447
+ const j = L.target, Fe = j.contentDocument || ((ee = j.contentWindow) == null ? void 0 : ee.document);
4448
4448
  if (Fe) {
4449
- const ve = ((ce = (J = Fe.body) == null ? void 0 : J.textContent) == null ? void 0 : ce.toLowerCase()) || "";
4449
+ const ve = ((ae = (Z = Fe.body) == null ? void 0 : Z.textContent) == null ? void 0 : ae.toLowerCase()) || "";
4450
4450
  (ve.includes("expired") || ve.includes("invalid") || ve.includes("error")) && (console.warn("[Identity] Iframe shows expiration message"), D(!0), f("Your verification link has expired."));
4451
4451
  }
4452
4452
  } catch {
@@ -4456,14 +4456,14 @@ Failed to reload test data. Please refresh the page.`);
4456
4456
  }
4457
4457
  ) })
4458
4458
  ] }),
4459
- r && /* @__PURE__ */ a(me, { children: /* @__PURE__ */ a(q, { variant: "outline", onClick: r, children: "Back" }) })
4460
- ] }) : O === fe.SardinAI ? /* @__PURE__ */ i($, { children: [
4459
+ r && /* @__PURE__ */ a(me, { children: /* @__PURE__ */ a(U, { variant: "outline", onClick: r, children: "Back" }) })
4460
+ ] }) : O === ye.SardinAI ? /* @__PURE__ */ i($, { children: [
4461
4461
  /* @__PURE__ */ i(oe, { children: [
4462
4462
  /* @__PURE__ */ a("h2", { className: "text-2xl font-bold", children: "Device Risk Assessment" }),
4463
4463
  /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Analyzing device security and behavioral patterns..." })
4464
4464
  ] }),
4465
4465
  /* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("div", { className: "text-center py-12", children: [
4466
- /* @__PURE__ */ a(be, { className: "mb-4" }),
4466
+ /* @__PURE__ */ a(xe, { className: "mb-4" }),
4467
4467
  /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait while we verify your device security" }),
4468
4468
  /* @__PURE__ */ a("p", { className: "text-sm text-gray-500 dark:text-gray-500 mt-2", children: "This process is automatic and will complete in a few seconds" })
4469
4469
  ] }) })
@@ -4473,10 +4473,10 @@ Failed to reload test data. Please refresh the page.`);
4473
4473
  /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
4474
4474
  ] }),
4475
4475
  /* @__PURE__ */ a(B, { children: /* @__PURE__ */ a("div", { id: "identity-container", className: "min-h-[400px]" }) }),
4476
- r && /* @__PURE__ */ a(me, { children: /* @__PURE__ */ a(q, { variant: "outline", onClick: r, children: "Back" }) })
4476
+ r && /* @__PURE__ */ a(me, { children: /* @__PURE__ */ a(U, { variant: "outline", onClick: r, children: "Back" }) })
4477
4477
  ] });
4478
4478
  }
4479
- return /* @__PURE__ */ a("form", { onSubmit: H.handleSubmit(P), children: /* @__PURE__ */ i($, { children: [
4479
+ return /* @__PURE__ */ a("form", { onSubmit: W.handleSubmit(P), children: /* @__PURE__ */ i($, { children: [
4480
4480
  /* @__PURE__ */ i(oe, { children: [
4481
4481
  /* @__PURE__ */ a("h2", { className: "text-lg font-bold", children: "Review Your Information" }),
4482
4482
  /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please review and confirm your information before starting identity verification" })
@@ -4486,9 +4486,9 @@ Failed to reload test data. Please refresh the page.`);
4486
4486
  /* @__PURE__ */ i("div", { children: [
4487
4487
  /* @__PURE__ */ a("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Name" }),
4488
4488
  /* @__PURE__ */ i("p", { className: "mt-1 text-base", children: [
4489
- (Z = k == null ? void 0 : k.applicantRequestData) == null ? void 0 : Z.firstName,
4489
+ (G = k == null ? void 0 : k.applicantRequestData) == null ? void 0 : G.firstName,
4490
4490
  " ",
4491
- (j = k == null ? void 0 : k.applicantRequestData) == null ? void 0 : j.lastName
4491
+ (K = k == null ? void 0 : k.applicantRequestData) == null ? void 0 : K.lastName
4492
4492
  ] })
4493
4493
  ] }),
4494
4494
  /* @__PURE__ */ i("div", { children: [
@@ -4497,7 +4497,7 @@ Failed to reload test data. Please refresh the page.`);
4497
4497
  ] }),
4498
4498
  /* @__PURE__ */ i("div", { children: [
4499
4499
  /* @__PURE__ */ a("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Date of Birth" }),
4500
- /* @__PURE__ */ a("p", { className: "mt-1 text-base", children: ((re = k == null ? void 0 : k.applicantRequestData) == null ? void 0 : re.dateOfBirth) || "Not provided" })
4500
+ /* @__PURE__ */ a("p", { className: "mt-1 text-base", children: ((be = k == null ? void 0 : k.applicantRequestData) == null ? void 0 : be.dateOfBirth) || "Not provided" })
4501
4501
  ] })
4502
4502
  ] }),
4503
4503
  /* @__PURE__ */ i("div", { className: "space-y-4", children: [
@@ -4506,7 +4506,7 @@ Failed to reload test data. Please refresh the page.`);
4506
4506
  /* @__PURE__ */ a(
4507
4507
  Ie,
4508
4508
  {
4509
- control: H.control,
4509
+ control: W.control,
4510
4510
  name: "country",
4511
4511
  render: ({ field: O }) => /* @__PURE__ */ a(
4512
4512
  Ae,
@@ -4515,7 +4515,7 @@ Failed to reload test data. Please refresh the page.`);
4515
4515
  label: "Country",
4516
4516
  options: [
4517
4517
  { value: "", label: "Select country..." },
4518
- ...p.map((L) => ({
4518
+ ...m.map((L) => ({
4519
4519
  value: L.abbreviation3 || L.abbreviation,
4520
4520
  label: L.name
4521
4521
  }))
@@ -4527,7 +4527,7 @@ Failed to reload test data. Please refresh the page.`);
4527
4527
  /* @__PURE__ */ a(
4528
4528
  Ie,
4529
4529
  {
4530
- control: H.control,
4530
+ control: W.control,
4531
4531
  name: "nationality",
4532
4532
  render: ({ field: O }) => /* @__PURE__ */ a(
4533
4533
  Ae,
@@ -4536,7 +4536,7 @@ Failed to reload test data. Please refresh the page.`);
4536
4536
  label: "Nationality",
4537
4537
  options: [
4538
4538
  { value: "", label: "Select nationality..." },
4539
- ...p.map((L) => ({
4539
+ ...m.map((L) => ({
4540
4540
  value: L.abbreviation3 || L.abbreviation,
4541
4541
  label: L.name
4542
4542
  }))
@@ -4550,7 +4550,7 @@ Failed to reload test data. Please refresh the page.`);
4550
4550
  /* @__PURE__ */ a(
4551
4551
  Ie,
4552
4552
  {
4553
- control: H.control,
4553
+ control: W.control,
4554
4554
  name: "street",
4555
4555
  render: ({ field: O }) => /* @__PURE__ */ a(ue, { ...O, label: "Street" })
4556
4556
  }
@@ -4558,7 +4558,7 @@ Failed to reload test data. Please refresh the page.`);
4558
4558
  /* @__PURE__ */ a(
4559
4559
  Ie,
4560
4560
  {
4561
- control: H.control,
4561
+ control: W.control,
4562
4562
  name: "streetNumber",
4563
4563
  render: ({ field: O }) => /* @__PURE__ */ a(ue, { ...O, label: "Street Number" })
4564
4564
  }
@@ -4568,7 +4568,7 @@ Failed to reload test data. Please refresh the page.`);
4568
4568
  /* @__PURE__ */ a(
4569
4569
  Ie,
4570
4570
  {
4571
- control: H.control,
4571
+ control: W.control,
4572
4572
  name: "city",
4573
4573
  render: ({ field: O }) => /* @__PURE__ */ a(ue, { ...O, label: "City" })
4574
4574
  }
@@ -4576,7 +4576,7 @@ Failed to reload test data. Please refresh the page.`);
4576
4576
  /* @__PURE__ */ a(
4577
4577
  Ie,
4578
4578
  {
4579
- control: H.control,
4579
+ control: W.control,
4580
4580
  name: "zip",
4581
4581
  render: ({ field: O }) => /* @__PURE__ */ a(ue, { ...O, label: "ZIP/Postal Code" })
4582
4582
  }
@@ -4585,7 +4585,7 @@ Failed to reload test data. Please refresh the page.`);
4585
4585
  /* @__PURE__ */ a(
4586
4586
  Ie,
4587
4587
  {
4588
- control: H.control,
4588
+ control: W.control,
4589
4589
  name: "phonenumber",
4590
4590
  render: ({ field: O }) => /* @__PURE__ */ a(ue, { ...O, label: "Phone Number", type: "tel" })
4591
4591
  }
@@ -4593,11 +4593,11 @@ Failed to reload test data. Please refresh the page.`);
4593
4593
  ] })
4594
4594
  ] }),
4595
4595
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
4596
- r && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: r, children: "Back" }),
4597
- /* @__PURE__ */ a(q, { type: "submit", isLoading: m, children: "Confirm and Start Verification" })
4596
+ r && /* @__PURE__ */ a(U, { type: "button", variant: "outline", onClick: r, children: "Back" }),
4597
+ /* @__PURE__ */ a(U, { type: "submit", isLoading: p, children: "Confirm and Start Verification" })
4598
4598
  ] })
4599
4599
  ] }) });
4600
- }, Ge = ({
4600
+ }, et = ({
4601
4601
  kycStatus: e,
4602
4602
  reviewStatus: t,
4603
4603
  workflowResult: r,
@@ -4647,21 +4647,21 @@ Failed to reload test data. Please refresh the page.`);
4647
4647
  iconBg: "bg-yellow-100 dark:bg-yellow-900/30",
4648
4648
  iconColor: "text-yellow-700 dark:text-yellow-400",
4649
4649
  message: "Your application is currently under manual review."
4650
- } : r === $e.Success ? {
4650
+ } : r === _e.Success ? {
4651
4651
  type: "success",
4652
4652
  title: "Process Complete",
4653
4653
  icon: "✓",
4654
4654
  iconBg: "bg-green-100 dark:bg-green-900/30",
4655
4655
  iconColor: "text-green-600 dark:text-green-400",
4656
4656
  message: "Your verification process has been completed successfully."
4657
- } : r === $e.Failed ? {
4657
+ } : r === _e.Failed ? {
4658
4658
  type: "error",
4659
4659
  title: "Process Failed",
4660
4660
  icon: "✕",
4661
4661
  iconBg: "bg-red-100 dark:bg-red-900/30",
4662
4662
  iconColor: "text-red-600 dark:text-red-400",
4663
4663
  message: "The verification process could not be completed."
4664
- } : r === $e.AdminReview ? {
4664
+ } : r === _e.AdminReview ? {
4665
4665
  type: "pending",
4666
4666
  title: "Admin Review Required",
4667
4667
  icon: "📋",
@@ -4687,7 +4687,7 @@ Failed to reload test data. Please refresh the page.`);
4687
4687
  ) }),
4688
4688
  /* @__PURE__ */ a("h2", { className: "text-3xl font-bold text-center text-gray-900 dark:text-white mb-4", children: c.title }),
4689
4689
  /* @__PURE__ */ a("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ a(
4690
- Ne,
4690
+ Se,
4691
4691
  {
4692
4692
  variant: c.type === "success" ? "success" : c.type === "error" ? "danger" : c.type === "pending" ? "warning" : "info",
4693
4693
  children: e != null ? Ee[e] : Re[t]
@@ -4731,15 +4731,15 @@ Failed to reload test data. Please refresh the page.`);
4731
4731
  ] }) })
4732
4732
  ] }),
4733
4733
  /* @__PURE__ */ i(me, { className: "flex justify-center gap-4", children: [
4734
- c.type === "success" && s && /* @__PURE__ */ a(q, { onClick: s, size: "lg", children: "Continue" }),
4735
- c.type === "error" && /* @__PURE__ */ i(ot, { children: [
4736
- l && /* @__PURE__ */ a(q, { variant: "outline", onClick: l, children: "Contact Support" }),
4737
- s && /* @__PURE__ */ a(q, { onClick: s, children: "Try Again" })
4734
+ c.type === "success" && s && /* @__PURE__ */ a(U, { onClick: s, size: "lg", children: "Continue" }),
4735
+ c.type === "error" && /* @__PURE__ */ i(mt, { children: [
4736
+ l && /* @__PURE__ */ a(U, { variant: "outline", onClick: l, children: "Contact Support" }),
4737
+ s && /* @__PURE__ */ a(U, { onClick: s, children: "Try Again" })
4738
4738
  ] }),
4739
4739
  c.type === "pending" && /* @__PURE__ */ a("div", { className: "text-center", children: /* @__PURE__ */ a("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Please check back later or wait for our email notification" }) })
4740
4740
  ] })
4741
4741
  ] });
4742
- }, Pr = ({ config: e, className: t = "" }) => !(e != null && e.visible) || !(e != null && e.url) ? null : /* @__PURE__ */ a("div", { className: `metakyc-logo ${t}`, children: /* @__PURE__ */ a(
4742
+ }, Or = ({ config: e, className: t = "" }) => !(e != null && e.visible) || !(e != null && e.url) ? null : /* @__PURE__ */ a("div", { className: `metakyc-logo ${t}`, children: /* @__PURE__ */ a(
4743
4743
  "img",
4744
4744
  {
4745
4745
  src: e.url,
@@ -4754,7 +4754,7 @@ Failed to reload test data. Please refresh the page.`);
4754
4754
  console.warn("[Logo] Failed to load logo:", e.url), r.target.style.display = "none";
4755
4755
  }
4756
4756
  }
4757
- ) }), He = ({
4757
+ ) }), Ye = ({
4758
4758
  title: e,
4759
4759
  subtitle: t,
4760
4760
  className: r = ""
@@ -4762,7 +4762,7 @@ Failed to reload test data. Please refresh the page.`);
4762
4762
  const { currentTheme: n } = he(), s = e || (n == null ? void 0 : n.title) || "", l = !!(n != null && n.logo && n.logo.visible && n.logo.url), o = !!s;
4763
4763
  return !l && !o ? null : /* @__PURE__ */ i("div", { className: `metakyc-header ${r}`, children: [
4764
4764
  /* @__PURE__ */ i("div", { className: "metakyc-header-title flex items-center text-xl font-bold text-gray-900 dark:text-white", children: [
4765
- l && /* @__PURE__ */ a(Pr, { config: n.logo }),
4765
+ l && /* @__PURE__ */ a(Or, { config: n.logo }),
4766
4766
  l && o && /* @__PURE__ */ a(
4767
4767
  "span",
4768
4768
  {
@@ -4775,11 +4775,11 @@ Failed to reload test data. Please refresh the page.`);
4775
4775
  ] }),
4776
4776
  t && /* @__PURE__ */ a("p", { className: "text-sm text-gray-600 dark:text-gray-400 mt-1", children: t })
4777
4777
  ] });
4778
- }, qe = ["firstName", "lastName", "email", "phonenumber", "dateOfBirth"];
4779
- function Ke(e) {
4778
+ }, He = ["firstName", "lastName", "email", "phonenumber", "dateOfBirth"];
4779
+ function Be(e) {
4780
4780
  return e == null || e === "" || Array.isArray(e) && e.length === 0;
4781
4781
  }
4782
- const Oe = {
4782
+ const ze = {
4783
4783
  width: "16px",
4784
4784
  height: "16px",
4785
4785
  minWidth: "16px",
@@ -4791,27 +4791,27 @@ const Oe = {
4791
4791
  padding: 0,
4792
4792
  display: "inline-block",
4793
4793
  verticalAlign: "middle"
4794
- }, Gr = ({
4794
+ }, ea = ({
4795
4795
  workflowKey: e,
4796
4796
  externalRefId: t,
4797
4797
  onSuccess: r,
4798
4798
  onCancel: n
4799
4799
  }) => {
4800
- var z, Fe, ve;
4801
- const { config: s, baseInformationService: l, currentTheme: o } = he(), { createApplicant: c, isLoading: d } = lr(), m = e || ((z = s.applicantForm) == null ? void 0 : z.workflowKey);
4802
- if (!m)
4800
+ var Qe, Ve, Ge;
4801
+ const { config: s, baseInformationService: l, currentTheme: o } = he(), { createApplicant: c, isLoading: u } = ur(), p = e || ((Qe = s.applicantForm) == null ? void 0 : Qe.workflowKey);
4802
+ if (!p)
4803
4803
  throw new Error(
4804
4804
  "workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
4805
4805
  );
4806
- const w = t || ((Fe = s.applicantForm) == null ? void 0 : Fe.externalRefId) || "", [N, y] = x([]), [h, g] = x(!0), k = te(!1), b = te(!1);
4807
- ee(() => {
4806
+ const w = t || ((Ve = s.applicantForm) == null ? void 0 : Ve.externalRefId) || "", [N, y] = x([]), [h, g] = x(!0), k = J(!1), b = J(!1);
4807
+ X(() => {
4808
4808
  (async () => {
4809
4809
  if (!(k.current || b.current)) {
4810
4810
  k.current = !0, g(!0);
4811
4811
  try {
4812
- const I = await l.getCountries("", s.locale || "en"), T = /* @__PURE__ */ new Set();
4812
+ const I = await l.getCountries("", s.locale || "en"), M = /* @__PURE__ */ new Set();
4813
4813
  y(
4814
- I.map((S) => ({ value: S.abbreviation3 || S.abbreviation, label: S.name })).filter((S) => !S.value || T.has(S.value) ? !1 : (T.add(S.value), !0))
4814
+ I.map((C) => ({ value: C.abbreviation3 || C.abbreviation, label: C.name })).filter((C) => !C.value || M.has(C.value) ? !1 : (M.add(C.value), !0))
4815
4815
  ), b.current = !0;
4816
4816
  } catch (I) {
4817
4817
  console.error("Failed to load countries:", I);
@@ -4821,31 +4821,31 @@ const Oe = {
4821
4821
  }
4822
4822
  })();
4823
4823
  }, []);
4824
- const p = Se(
4824
+ const m = ke(
4825
4825
  () => o != null && o.applicantFormPages && o.applicantFormPages.length > 0 ? o.applicantFormPages : null,
4826
4826
  [o == null ? void 0 : o.applicantFormPages]
4827
- ), F = Se(() => {
4828
- const u = new Set(qe), I = o == null ? void 0 : o.applicantFormRequiredFields;
4829
- if (I) for (const T of I) u.add(T);
4830
- if (p)
4831
- for (const T of p)
4832
- for (const S of T.fields)
4833
- !S.isCustom && S.name && S.required && u.add(S.name);
4834
- return Array.from(u);
4835
- }, [o == null ? void 0 : o.applicantFormRequiredFields, p]), C = Se(() => {
4836
- var T;
4837
- if (p) {
4838
- const S = p.flatMap((_) => _.fields).filter((_) => !_.isCustom && _.name).map((_) => _.name), R = new Set(S);
4839
- for (const _ of qe) R.add(_);
4840
- return Array.from(R);
4827
+ ), F = ke(() => {
4828
+ const d = new Set(He), I = o == null ? void 0 : o.applicantFormRequiredFields;
4829
+ if (I) for (const M of I) d.add(M);
4830
+ if (m)
4831
+ for (const M of m)
4832
+ for (const C of M.fields)
4833
+ !C.isCustom && C.name && C.required && d.add(C.name);
4834
+ return Array.from(d);
4835
+ }, [o == null ? void 0 : o.applicantFormRequiredFields, m]), S = ke(() => {
4836
+ var M;
4837
+ if (m) {
4838
+ const C = m.flatMap((z) => z.fields).filter((z) => !z.isCustom && z.name).map((z) => z.name), E = new Set(C);
4839
+ for (const z of He) E.add(z);
4840
+ return Array.from(E);
4841
4841
  }
4842
- let u;
4843
- (T = s.applicantForm) != null && T.visibleFields ? u = s.applicantForm.visibleFields : o != null && o.applicantFormVisibleFields && o.applicantFormVisibleFields.length > 0 ? u = o.applicantFormVisibleFields : u = wt;
4844
- const I = new Set(u);
4845
- for (const S of qe) I.add(S);
4842
+ let d;
4843
+ (M = s.applicantForm) != null && M.visibleFields ? d = s.applicantForm.visibleFields : o != null && o.applicantFormVisibleFields && o.applicantFormVisibleFields.length > 0 ? d = o.applicantFormVisibleFields : d = Ct;
4844
+ const I = new Set(d);
4845
+ for (const C of He) I.add(C);
4846
4846
  return Array.from(I);
4847
- }, [(ve = s.applicantForm) == null ? void 0 : ve.visibleFields, o == null ? void 0 : o.applicantFormVisibleFields, p]), [v, K] = x({
4848
- workflowKey: m,
4847
+ }, [(Ge = s.applicantForm) == null ? void 0 : Ge.visibleFields, o == null ? void 0 : o.applicantFormVisibleFields, m]), [v, q] = x({
4848
+ workflowKey: p,
4849
4849
  firstName: "",
4850
4850
  lastName: "",
4851
4851
  title: "",
@@ -4869,211 +4869,228 @@ const Oe = {
4869
4869
  educationLevel: "",
4870
4870
  occupation: "",
4871
4871
  taxNumber: ""
4872
- }), [Y, M] = x({}), [f, A] = x(0), [D, V] = x({}), [H, P] = x(null), [E, Z] = x(!1), j = (u, I) => K((T) => ({ ...T, [u]: I })), le = (u, I) => M((T) => ({ ...T, [u]: I })), re = Se(() => p ? p.filter(
4873
- (u) => !u.conditionalOn || Y[u.conditionalOn] === "true"
4874
- ) : null, [p, Y]);
4875
- ee(() => {
4876
- re && f >= re.length && re.length > 0 && A(re.length - 1);
4877
- }, [re == null ? void 0 : re.length]);
4878
- const O = (u) => {
4879
- var T;
4872
+ }), [H, T] = x({}), [f, A] = x(0), [D, Q] = x({}), [W, P] = x(null), [R, G] = x(!1), K = (d, I) => q((M) => ({ ...M, [d]: I })), le = (d, I) => T((M) => ({ ...M, [d]: I })), be = (d) => !d.conditionalOn || H[d.conditionalOn] === "true", O = ke(() => {
4873
+ if (!m) return -1;
4874
+ for (let d = f + 1; d < m.length; d++)
4875
+ if (be(m[d])) return d;
4876
+ return -1;
4877
+ }, [m, f, H]), L = ke(() => {
4878
+ if (!m) return -1;
4879
+ for (let d = f - 1; d >= 0; d--)
4880
+ if (be(m[d])) return d;
4881
+ return -1;
4882
+ }, [m, f, H]), ee = (d) => {
4883
+ var M;
4880
4884
  const I = {};
4881
- for (const S of u.fields)
4882
- if (S.isCustom) {
4883
- if (S.required && S.paramName) {
4884
- const R = Y[S.paramName], _ = S.displayText || S.label || S.paramName;
4885
- S.customType === "checkbox" || S.customType === "link_checkbox" ? R !== "true" && (I[S.paramName] = `${_} is required.`) : (!R || R.trim() === "") && (I[S.paramName] = `${_} is required.`);
4885
+ for (const C of d.fields)
4886
+ if (C.isCustom) {
4887
+ if (C.required && C.paramName) {
4888
+ const E = H[C.paramName], z = C.displayText || C.label || C.paramName;
4889
+ C.customType === "checkbox" || C.customType === "link_checkbox" ? E !== "true" && (I[C.paramName] = `${z} is required.`) : (!E || E.trim() === "") && (I[C.paramName] = `${z} is required.`);
4886
4890
  }
4887
- } else if (S.name) {
4888
- const R = S.name;
4889
- if (F.includes(R) && Ke(v[R])) {
4890
- const _ = S.displayText || ((T = _e[R]) == null ? void 0 : T.label) || R;
4891
- I[R] = `${_} is required.`;
4891
+ } else if (C.name) {
4892
+ const E = C.name;
4893
+ if (F.includes(E) && Be(v[E])) {
4894
+ const z = C.displayText || ((M = Ke[E]) == null ? void 0 : M.label) || E;
4895
+ I[E] = `${z} is required.`;
4892
4896
  }
4893
4897
  }
4894
4898
  return I;
4895
- }, L = async (u) => {
4896
- var T;
4897
- const I = re;
4898
- if (I && !u) {
4899
- const S = O(I[f]);
4900
- if (Object.keys(S).length > 0) {
4901
- V(S);
4902
- return;
4903
- }
4904
- V({}), A((R) => R + 1);
4899
+ }, Z = async () => {
4900
+ if (!m) return;
4901
+ const d = ee(m[f]);
4902
+ if (Object.keys(d).length > 0) {
4903
+ Q(d);
4905
4904
  return;
4906
4905
  }
4907
- if (I) {
4908
- let S = {};
4909
- for (const R of I)
4910
- S = { ...S, ...O(R) };
4911
- if (Object.keys(S).length > 0) {
4912
- V(S);
4906
+ Q({}), O >= 0 ? A(O) : await ae();
4907
+ }, ae = async () => {
4908
+ if (m) {
4909
+ let d = {};
4910
+ for (const I of m)
4911
+ be(I) && (d = { ...d, ...ee(I) });
4912
+ if (Object.keys(d).length > 0) {
4913
+ Q(d);
4913
4914
  return;
4914
4915
  }
4915
4916
  }
4916
- Z(!0), P(null);
4917
+ G(!0), P(null);
4917
4918
  try {
4918
4919
  if (!v.externalRefId || v.externalRefId.trim() === "") {
4919
4920
  P("External Reference ID is required. Please pass it via config.applicantForm.externalRefId.");
4920
4921
  return;
4921
4922
  }
4922
- for (const W of F)
4923
- if (Ke(v[W])) {
4924
- const X = ((T = _e[W]) == null ? void 0 : T.label) || W;
4925
- P(`${X} is required.`);
4926
- return;
4927
- }
4928
- const S = {
4923
+ const d = {
4929
4924
  workflowKey: v.workflowKey,
4930
4925
  externalRefId: v.externalRefId.trim()
4931
4926
  };
4932
- C.forEach((W) => {
4933
- if (W === "externalRefId") return;
4934
- const X = v[W];
4935
- Ke(X) || (S[W] = X);
4936
- });
4937
- const R = [];
4938
- if (I) {
4939
- for (const W of I)
4940
- for (const X of W.fields)
4941
- if (X.isCustom && X.paramName) {
4942
- const ge = Y[X.paramName] ?? "";
4943
- R.push({ paramName: X.paramName, paramValue: ge });
4944
- }
4927
+ if (m) {
4928
+ for (const C of m)
4929
+ if (be(C)) {
4930
+ for (const E of C.fields)
4931
+ if (!E.isCustom && E.name) {
4932
+ const z = E.name, te = v[z];
4933
+ Be(te) || (d[z] = te);
4934
+ }
4935
+ }
4936
+ } else
4937
+ S.forEach((C) => {
4938
+ if (C === "externalRefId") return;
4939
+ const E = v[C];
4940
+ Be(E) || (d[C] = E);
4941
+ });
4942
+ const I = [];
4943
+ if (m) {
4944
+ for (const C of m)
4945
+ if (be(C)) {
4946
+ for (const E of C.fields)
4947
+ if (E.isCustom && E.paramName) {
4948
+ const z = H[E.paramName] ?? "";
4949
+ I.push({ paramName: E.paramName, paramValue: z });
4950
+ }
4951
+ }
4945
4952
  }
4946
- R.length > 0 && (S.applicantAdditionalDatas = R);
4947
- const _ = await c(S);
4948
- r(_.applicantId);
4949
- } catch (S) {
4950
- console.error("Error creating applicant:", S), P(S.message || "Failed to create applicant");
4953
+ I.length > 0 && (d.applicantAdditionalDatas = I);
4954
+ const M = await c(d);
4955
+ r(M.applicantId);
4956
+ } catch (d) {
4957
+ console.error("Error creating applicant:", d), P(d.message || "Failed to create applicant");
4951
4958
  } finally {
4952
- Z(!1);
4959
+ G(!1);
4953
4960
  }
4954
- }, ae = (u, I, T) => {
4955
- var We;
4956
- const S = _e[u];
4957
- if (!S) return null;
4958
- const R = F.includes(u), _ = D[u], W = T || S.label, X = I ?? u, ge = { required: R };
4959
- switch (S.type) {
4961
+ }, j = async (d) => {
4962
+ var I;
4963
+ d.preventDefault();
4964
+ for (const M of F)
4965
+ if (Be(v[M])) {
4966
+ const C = ((I = Ke[M]) == null ? void 0 : I.label) || M;
4967
+ P(`${C} is required.`);
4968
+ return;
4969
+ }
4970
+ await ae();
4971
+ }, Fe = (d, I, M) => {
4972
+ var Me;
4973
+ const C = Ke[d];
4974
+ if (!C) return null;
4975
+ const E = F.includes(d), z = D[d], te = M || C.label, ce = I ?? d, re = { required: E };
4976
+ switch (C.type) {
4960
4977
  case "select":
4961
- if (u === "country" || u === "nationality" || u === "taxCountry" || u === "countryOfBirth")
4978
+ if (d === "country" || d === "nationality" || d === "taxCountry" || d === "countryOfBirth")
4962
4979
  return /* @__PURE__ */ a(
4963
4980
  Ae,
4964
4981
  {
4965
- ...ge,
4966
- label: W,
4967
- value: v[u] || "",
4968
- onChange: (ne) => j(u, ne.target.value),
4969
- options: [{ value: "", label: `Select ${W.toLowerCase()}...` }, ...N],
4982
+ ...re,
4983
+ label: te,
4984
+ value: v[d] || "",
4985
+ onChange: (ne) => K(d, ne.target.value),
4986
+ options: [{ value: "", label: `Select ${te.toLowerCase()}...` }, ...N],
4970
4987
  disabled: h
4971
4988
  },
4972
- X
4989
+ ce
4973
4990
  );
4974
- if (u === "salutation")
4991
+ if (d === "salutation")
4975
4992
  return /* @__PURE__ */ a(
4976
4993
  Ae,
4977
4994
  {
4978
- ...ge,
4979
- label: W,
4980
- value: ((We = v[u]) == null ? void 0 : We.toString()) || "",
4981
- onChange: (ne) => j(u, ne.target.value ? Number(ne.target.value) : null),
4995
+ ...re,
4996
+ label: te,
4997
+ value: ((Me = v[d]) == null ? void 0 : Me.toString()) || "",
4998
+ onChange: (ne) => K(d, ne.target.value ? Number(ne.target.value) : null),
4982
4999
  options: [
4983
5000
  { value: "", label: "Select salutation..." },
4984
- { value: Be.Male.toString(), label: "Male" },
4985
- { value: Be.Female.toString(), label: "Female" },
4986
- { value: Be.Other.toString(), label: "Other" }
5001
+ { value: Ue.Male.toString(), label: "Male" },
5002
+ { value: Ue.Female.toString(), label: "Female" },
5003
+ { value: Ue.Other.toString(), label: "Other" }
4987
5004
  ]
4988
5005
  },
4989
- X
5006
+ ce
4990
5007
  );
4991
- if (u === "defaultLanguage") {
4992
- const ne = o != null && o.allowedLanguages && o.allowedLanguages.length > 0 ? Qe.filter((ze) => o.allowedLanguages.includes(ze.value)) : Qe;
5008
+ if (d === "defaultLanguage") {
5009
+ const ne = o != null && o.allowedLanguages && o.allowedLanguages.length > 0 ? Je.filter((qe) => o.allowedLanguages.includes(qe.value)) : Je;
4993
5010
  return /* @__PURE__ */ a(
4994
5011
  Ae,
4995
5012
  {
4996
- ...ge,
4997
- label: W,
4998
- value: v[u] || "",
4999
- onChange: (ze) => j(u, ze.target.value),
5013
+ ...re,
5014
+ label: te,
5015
+ value: v[d] || "",
5016
+ onChange: (qe) => K(d, qe.target.value),
5000
5017
  options: [{ value: "", label: "Select language..." }, ...ne]
5001
5018
  },
5002
- X
5019
+ ce
5003
5020
  );
5004
5021
  }
5005
5022
  return null;
5006
5023
  case "multiselect":
5007
- return u === "otherNationality" ? /* @__PURE__ */ a(
5008
- or,
5024
+ return d === "otherNationality" ? /* @__PURE__ */ a(
5025
+ mr,
5009
5026
  {
5010
- ...ge,
5011
- label: W,
5012
- value: v[u] || [],
5013
- onChange: (ne) => j(u, ne),
5027
+ ...re,
5028
+ label: te,
5029
+ value: v[d] || [],
5030
+ onChange: (ne) => K(d, ne),
5014
5031
  options: N,
5015
5032
  placeholder: "Select other nationalities...",
5016
5033
  disabled: h
5017
5034
  },
5018
- X
5035
+ ce
5019
5036
  ) : null;
5020
5037
  case "date":
5021
5038
  return /* @__PURE__ */ a(
5022
5039
  ue,
5023
5040
  {
5024
- ...ge,
5041
+ ...re,
5025
5042
  type: "date",
5026
- label: W,
5027
- value: v[u] || "",
5028
- onChange: (ne) => j(u, ne.target.value),
5029
- error: _
5043
+ label: te,
5044
+ value: v[d] || "",
5045
+ onChange: (ne) => K(d, ne.target.value),
5046
+ error: z
5030
5047
  },
5031
- X
5048
+ ce
5032
5049
  );
5033
5050
  case "email":
5034
5051
  return /* @__PURE__ */ a(
5035
5052
  ue,
5036
5053
  {
5037
- ...ge,
5054
+ ...re,
5038
5055
  type: "email",
5039
- label: W,
5040
- value: v[u] || "",
5041
- onChange: (ne) => j(u, ne.target.value),
5042
- error: _
5056
+ label: te,
5057
+ value: v[d] || "",
5058
+ onChange: (ne) => K(d, ne.target.value),
5059
+ error: z
5043
5060
  },
5044
- X
5061
+ ce
5045
5062
  );
5046
5063
  case "tel":
5047
5064
  return /* @__PURE__ */ a(
5048
5065
  ue,
5049
5066
  {
5050
- ...ge,
5067
+ ...re,
5051
5068
  type: "tel",
5052
- label: W,
5053
- value: v[u] || "",
5054
- onChange: (ne) => j(u, ne.target.value),
5055
- error: _
5069
+ label: te,
5070
+ value: v[d] || "",
5071
+ onChange: (ne) => K(d, ne.target.value),
5072
+ error: z
5056
5073
  },
5057
- X
5074
+ ce
5058
5075
  );
5059
5076
  default:
5060
5077
  return /* @__PURE__ */ a(
5061
5078
  ue,
5062
5079
  {
5063
- ...ge,
5080
+ ...re,
5064
5081
  type: "text",
5065
- label: W,
5066
- value: v[u] || "",
5067
- onChange: (ne) => j(u, ne.target.value),
5068
- error: _
5082
+ label: te,
5083
+ value: v[d] || "",
5084
+ onChange: (ne) => K(d, ne.target.value),
5085
+ error: z
5069
5086
  },
5070
- X
5087
+ ce
5071
5088
  );
5072
5089
  }
5073
- }, J = (u, I) => {
5074
- if (!u.paramName) return null;
5075
- const T = D[u.paramName], S = u.displayText || u.label || u.paramName;
5076
- if (u.customType === "checkbox")
5090
+ }, ve = (d, I) => {
5091
+ if (!d.paramName) return null;
5092
+ const M = D[d.paramName], C = d.displayText || d.label || d.paramName;
5093
+ if (d.customType === "checkbox")
5077
5094
  return /* @__PURE__ */ i("div", { className: "flex flex-col gap-1", children: [
5078
5095
  /* @__PURE__ */ i(
5079
5096
  "label",
@@ -5085,10 +5102,10 @@ const Oe = {
5085
5102
  "input",
5086
5103
  {
5087
5104
  type: "checkbox",
5088
- checked: Y[u.paramName] === "true",
5089
- onChange: (R) => le(u.paramName, R.target.checked ? "true" : "false"),
5105
+ checked: H[d.paramName] === "true",
5106
+ onChange: (E) => le(d.paramName, E.target.checked ? "true" : "false"),
5090
5107
  className: "metakyc-option-input",
5091
- style: Oe
5108
+ style: ze
5092
5109
  }
5093
5110
  ),
5094
5111
  /* @__PURE__ */ i(
@@ -5097,17 +5114,17 @@ const Oe = {
5097
5114
  className: "metakyc-option-text",
5098
5115
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5099
5116
  children: [
5100
- S,
5101
- u.required && /* @__PURE__ */ a("span", { className: "text-red-500 ml-0.5", children: "*" })
5117
+ C,
5118
+ d.required && /* @__PURE__ */ a("span", { className: "text-red-500 ml-0.5", children: "*" })
5102
5119
  ]
5103
5120
  }
5104
5121
  )
5105
5122
  ]
5106
5123
  }
5107
5124
  ),
5108
- T && /* @__PURE__ */ a("p", { className: "text-red-500 text-xs mt-0.5", children: T })
5125
+ M && /* @__PURE__ */ a("p", { className: "text-red-500 text-xs mt-0.5", children: M })
5109
5126
  ] }, `custom-${I}`);
5110
- if (u.customType === "link_checkbox")
5127
+ if (d.customType === "link_checkbox")
5111
5128
  return /* @__PURE__ */ i("div", { className: "flex flex-col gap-1", children: [
5112
5129
  /* @__PURE__ */ i(
5113
5130
  "label",
@@ -5119,10 +5136,10 @@ const Oe = {
5119
5136
  "input",
5120
5137
  {
5121
5138
  type: "checkbox",
5122
- checked: Y[u.paramName] === "true",
5123
- onChange: (R) => le(u.paramName, R.target.checked ? "true" : "false"),
5139
+ checked: H[d.paramName] === "true",
5140
+ onChange: (E) => le(d.paramName, E.target.checked ? "true" : "false"),
5124
5141
  className: "metakyc-option-input",
5125
- style: { ...Oe, alignSelf: "flex-start", marginTop: "2px" }
5142
+ style: { ...ze, alignSelf: "flex-start", marginTop: "2px" }
5126
5143
  }
5127
5144
  ),
5128
5145
  /* @__PURE__ */ i(
@@ -5131,31 +5148,31 @@ const Oe = {
5131
5148
  className: "metakyc-option-text",
5132
5149
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5133
5150
  children: [
5134
- S,
5151
+ C,
5135
5152
  " ",
5136
- u.linkUrl && /* @__PURE__ */ a(
5153
+ d.linkUrl && /* @__PURE__ */ a(
5137
5154
  "a",
5138
5155
  {
5139
- href: u.linkUrl,
5156
+ href: d.linkUrl,
5140
5157
  target: "_blank",
5141
5158
  rel: "noopener noreferrer",
5142
5159
  className: "underline",
5143
5160
  style: { color: "var(--metakyc-primary, #2563eb)" },
5144
- onClick: (R) => R.stopPropagation(),
5145
- children: u.linkText || u.linkUrl
5161
+ onClick: (E) => E.stopPropagation(),
5162
+ children: d.linkText || d.linkUrl
5146
5163
  }
5147
5164
  ),
5148
- u.required && /* @__PURE__ */ a("span", { className: "text-red-500 ml-0.5", children: "*" })
5165
+ d.required && /* @__PURE__ */ a("span", { className: "text-red-500 ml-0.5", children: "*" })
5149
5166
  ]
5150
5167
  }
5151
5168
  )
5152
5169
  ]
5153
5170
  }
5154
5171
  ),
5155
- T && /* @__PURE__ */ a("p", { className: "text-red-500 text-xs mt-0.5", children: T })
5172
+ M && /* @__PURE__ */ a("p", { className: "text-red-500 text-xs mt-0.5", children: M })
5156
5173
  ] }, `custom-${I}`);
5157
- if (u.customType === "group_checkbox") {
5158
- const R = (Y[u.paramName] || "").split(",").filter(Boolean);
5174
+ if (d.customType === "group_checkbox") {
5175
+ const E = (H[d.paramName] || "").split(",").filter(Boolean);
5159
5176
  return /* @__PURE__ */ i("div", { className: "flex flex-col gap-1.5", children: [
5160
5177
  /* @__PURE__ */ i(
5161
5178
  "div",
@@ -5163,12 +5180,12 @@ const Oe = {
5163
5180
  className: "text-sm font-medium",
5164
5181
  style: { color: "var(--metakyc-text-primary, #111827)" },
5165
5182
  children: [
5166
- S,
5167
- u.required && /* @__PURE__ */ a("span", { className: "text-red-500 ml-0.5", children: "*" })
5183
+ C,
5184
+ d.required && /* @__PURE__ */ a("span", { className: "text-red-500 ml-0.5", children: "*" })
5168
5185
  ]
5169
5186
  }
5170
5187
  ),
5171
- /* @__PURE__ */ a("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (u.options || []).map((_) => /* @__PURE__ */ i(
5188
+ /* @__PURE__ */ a("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (d.options || []).map((z) => /* @__PURE__ */ i(
5172
5189
  "label",
5173
5190
  {
5174
5191
  className: "metakyc-option-label",
@@ -5178,13 +5195,13 @@ const Oe = {
5178
5195
  "input",
5179
5196
  {
5180
5197
  type: "checkbox",
5181
- checked: R.includes(_.value),
5182
- onChange: (W) => {
5183
- const X = W.target.checked ? [...R, _.value] : R.filter((ge) => ge !== _.value);
5184
- le(u.paramName, X.join(","));
5198
+ checked: E.includes(z.value),
5199
+ onChange: (te) => {
5200
+ const ce = te.target.checked ? [...E, z.value] : E.filter((re) => re !== z.value);
5201
+ le(d.paramName, ce.join(","));
5185
5202
  },
5186
5203
  className: "metakyc-option-input",
5187
- style: Oe
5204
+ style: ze
5188
5205
  }
5189
5206
  ),
5190
5207
  /* @__PURE__ */ a(
@@ -5192,29 +5209,29 @@ const Oe = {
5192
5209
  {
5193
5210
  className: "metakyc-option-text",
5194
5211
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5195
- children: _.label
5212
+ children: z.label
5196
5213
  }
5197
5214
  )
5198
5215
  ]
5199
5216
  },
5200
- _.value
5217
+ z.value
5201
5218
  )) }),
5202
- T && /* @__PURE__ */ a("p", { className: "text-red-500 text-xs", children: T })
5219
+ M && /* @__PURE__ */ a("p", { className: "text-red-500 text-xs", children: M })
5203
5220
  ] }, `custom-${I}`);
5204
5221
  }
5205
- return u.customType === "radio_group" ? /* @__PURE__ */ i("div", { className: "flex flex-col gap-1.5", children: [
5222
+ return d.customType === "radio_group" ? /* @__PURE__ */ i("div", { className: "flex flex-col gap-1.5", children: [
5206
5223
  /* @__PURE__ */ i(
5207
5224
  "div",
5208
5225
  {
5209
5226
  className: "text-sm font-medium",
5210
5227
  style: { color: "var(--metakyc-text-primary, #111827)" },
5211
5228
  children: [
5212
- S,
5213
- u.required && /* @__PURE__ */ a("span", { className: "text-red-500 ml-0.5", children: "*" })
5229
+ C,
5230
+ d.required && /* @__PURE__ */ a("span", { className: "text-red-500 ml-0.5", children: "*" })
5214
5231
  ]
5215
5232
  }
5216
5233
  ),
5217
- /* @__PURE__ */ a("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (u.options || []).map((R) => /* @__PURE__ */ i(
5234
+ /* @__PURE__ */ a("div", { className: "metakyc-options-group", style: { display: "flex", flexDirection: "column", gap: "8px" }, children: (d.options || []).map((E) => /* @__PURE__ */ i(
5218
5235
  "label",
5219
5236
  {
5220
5237
  className: "metakyc-option-label",
@@ -5224,11 +5241,11 @@ const Oe = {
5224
5241
  "input",
5225
5242
  {
5226
5243
  type: "radio",
5227
- checked: Y[u.paramName] === R.value,
5228
- onChange: () => le(u.paramName, R.value),
5229
- name: `radio-group-${u.paramName}-${I}`,
5244
+ checked: H[d.paramName] === E.value,
5245
+ onChange: () => le(d.paramName, E.value),
5246
+ name: `radio-group-${d.paramName}-${I}`,
5230
5247
  className: "metakyc-option-input",
5231
- style: Oe
5248
+ style: ze
5232
5249
  }
5233
5250
  ),
5234
5251
  /* @__PURE__ */ a(
@@ -5236,137 +5253,138 @@ const Oe = {
5236
5253
  {
5237
5254
  className: "metakyc-option-text",
5238
5255
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5239
- children: R.label
5256
+ children: E.label
5240
5257
  }
5241
5258
  )
5242
5259
  ]
5243
5260
  },
5244
- R.value
5261
+ E.value
5245
5262
  )) }),
5246
- T && /* @__PURE__ */ a("p", { className: "text-red-500 text-xs", children: T })
5263
+ M && /* @__PURE__ */ a("p", { className: "text-red-500 text-xs", children: M })
5247
5264
  ] }, `custom-${I}`) : /* @__PURE__ */ a(
5248
5265
  ue,
5249
5266
  {
5250
5267
  type: "text",
5251
- label: `${S}${u.required ? " *" : ""}`,
5252
- value: Y[u.paramName] || "",
5253
- onChange: (R) => le(u.paramName, R.target.value),
5254
- required: u.required,
5255
- error: T
5268
+ label: `${C}${d.required ? " *" : ""}`,
5269
+ value: H[d.paramName] || "",
5270
+ onChange: (E) => le(d.paramName, E.target.value),
5271
+ required: d.required,
5272
+ error: M
5256
5273
  },
5257
5274
  `custom-${I}`
5258
5275
  );
5259
- }, ce = (u) => /* @__PURE__ */ a("div", { className: "grid grid-cols-2 gap-4", children: u.fields.map((I, T) => {
5260
- const S = I.colSpan === 1 ? "col-span-1" : "col-span-2", R = I.isCustom ? `custom-${T}-${I.paramName}` : `builtin-${I.name}-${T}`;
5261
- return /* @__PURE__ */ a("div", { className: S, children: I.isCustom ? J(I, T) : ae(I.name, R, I.displayText) }, R);
5276
+ }, Le = (d) => /* @__PURE__ */ a("div", { className: "grid grid-cols-2 gap-4", children: d.fields.map((I, M) => {
5277
+ const C = I.colSpan === 1 ? "col-span-1" : "col-span-2", E = I.isCustom ? `custom-${M}-${I.paramName}` : `builtin-${I.name}-${M}`;
5278
+ return /* @__PURE__ */ a("div", { className: C, children: I.isCustom ? ve(I, M) : Fe(I.name, E, I.displayText) }, E);
5262
5279
  }) });
5263
5280
  if (h)
5264
5281
  return /* @__PURE__ */ a("div", { className: "metakyc-sdk", children: /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
5265
- /* @__PURE__ */ a(be, { className: "my-8" }),
5282
+ /* @__PURE__ */ a(xe, { className: "my-8" }),
5266
5283
  /* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading form..." })
5267
5284
  ] }) }) });
5268
- if (re) {
5269
- const u = re[f] ?? re[0], I = f === 0, T = f === re.length - 1, S = re.length, R = Object.values(D);
5285
+ if (m) {
5286
+ const d = m[f] ?? m[0], I = L === -1, M = O === -1, C = m.length, E = m.filter(be).length, z = m.slice(0, f + 1).filter(be).length, te = Object.values(D);
5270
5287
  return /* @__PURE__ */ a("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i($, { children: [
5271
- /* @__PURE__ */ a(oe, { children: /* @__PURE__ */ a(He, { title: (o == null ? void 0 : o.title) || "Create Applicant" }) }),
5288
+ /* @__PURE__ */ a(oe, { children: /* @__PURE__ */ a(Ye, { title: (o == null ? void 0 : o.title) || "Create Applicant" }) }),
5272
5289
  /* @__PURE__ */ i(B, { children: [
5273
- (u.title || u.subtitle || u.description) && /* @__PURE__ */ i("div", { className: "mb-4", children: [
5274
- u.title && /* @__PURE__ */ a(
5290
+ (d.title || d.subtitle || d.description) && /* @__PURE__ */ i("div", { className: "mb-4", children: [
5291
+ d.title && /* @__PURE__ */ a(
5275
5292
  "h3",
5276
5293
  {
5277
5294
  className: "font-semibold text-base",
5278
5295
  style: { color: "var(--metakyc-text-primary, #111827)" },
5279
- children: u.title
5296
+ children: d.title
5280
5297
  }
5281
5298
  ),
5282
- u.subtitle && /* @__PURE__ */ a(
5299
+ d.subtitle && /* @__PURE__ */ a(
5283
5300
  "p",
5284
5301
  {
5285
5302
  className: "text-sm mt-0.5",
5286
5303
  style: { color: "var(--metakyc-text-secondary, #6b7280)" },
5287
- children: u.subtitle
5304
+ children: d.subtitle
5288
5305
  }
5289
5306
  ),
5290
- u.description && u.description !== u.subtitle && /* @__PURE__ */ a(
5307
+ d.description && d.description !== d.subtitle && /* @__PURE__ */ a(
5291
5308
  "p",
5292
5309
  {
5293
5310
  className: "text-xs mt-1",
5294
5311
  style: { color: "var(--metakyc-text-secondary, #6b7280)" },
5295
- children: u.description
5312
+ children: d.description
5296
5313
  }
5297
5314
  )
5298
5315
  ] }),
5299
- (H || R.length > 0) && /* @__PURE__ */ i("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
5300
- H && /* @__PURE__ */ i("p", { className: "text-red-600 text-sm", children: [
5316
+ (W || te.length > 0) && /* @__PURE__ */ i("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
5317
+ W && /* @__PURE__ */ i("p", { className: "text-red-600 text-sm", children: [
5301
5318
  /* @__PURE__ */ a("strong", { children: "Error:" }),
5302
5319
  " ",
5303
- H
5320
+ W
5304
5321
  ] }),
5305
- R.map((_, W) => /* @__PURE__ */ a("p", { className: "text-red-600 text-sm", children: _ }, W))
5322
+ te.map((ce, re) => /* @__PURE__ */ a("p", { className: "text-red-600 text-sm", children: ce }, re))
5306
5323
  ] }),
5307
- S > 1 && /* @__PURE__ */ i("div", { className: "flex items-center gap-2 mb-4", children: [
5308
- re.map((_, W) => /* @__PURE__ */ a(
5309
- "div",
5310
- {
5311
- className: `h-1.5 rounded-full transition-all ${W === f ? "bg-blue-600 flex-1" : W < f ? "bg-blue-300 w-8" : "bg-gray-200 w-8"}`,
5312
- style: W === f ? { backgroundColor: "var(--metakyc-primary, #2563eb)" } : W < f ? { backgroundColor: "var(--metakyc-primary-light, #dbeafe)", opacity: 0.7 } : void 0
5313
- },
5314
- W
5315
- )),
5324
+ C > 1 && /* @__PURE__ */ i("div", { className: "flex items-center gap-2 mb-4", children: [
5325
+ m.map((ce, re) => {
5326
+ const Me = be(ce);
5327
+ return /* @__PURE__ */ a(
5328
+ "div",
5329
+ {
5330
+ className: `h-1.5 rounded-full transition-all ${re === f ? "flex-1" : "w-8"} ${Me ? "" : "opacity-30"}`,
5331
+ style: re === f ? { backgroundColor: "var(--metakyc-primary, #2563eb)" } : re < f ? { backgroundColor: "var(--metakyc-primary-light, #93c5fd)", opacity: Me ? 0.7 : 0.2 } : { backgroundColor: "#e5e7eb" }
5332
+ },
5333
+ re
5334
+ );
5335
+ }),
5316
5336
  /* @__PURE__ */ i("span", { className: "text-xs text-gray-400 flex-shrink-0", children: [
5317
- f + 1,
5337
+ z,
5318
5338
  " / ",
5319
- S
5339
+ E
5320
5340
  ] })
5321
5341
  ] }),
5322
- ce(u)
5342
+ Le(d)
5323
5343
  ] }),
5324
5344
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
5325
5345
  /* @__PURE__ */ i("div", { children: [
5326
5346
  !I && /* @__PURE__ */ a(
5327
- q,
5347
+ U,
5328
5348
  {
5329
5349
  type: "button",
5330
5350
  variant: "outline",
5331
5351
  onClick: () => {
5332
- A((_) => _ - 1), V({});
5352
+ A(L), Q({});
5333
5353
  },
5334
- disabled: E || d,
5354
+ disabled: R || u,
5335
5355
  children: "Previous"
5336
5356
  }
5337
5357
  ),
5338
- I && n && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: n, disabled: E || d, children: "Cancel" })
5358
+ I && n && /* @__PURE__ */ a(U, { type: "button", variant: "outline", onClick: n, disabled: R || u, children: "Cancel" })
5339
5359
  ] }),
5340
5360
  /* @__PURE__ */ a(
5341
- q,
5361
+ U,
5342
5362
  {
5343
5363
  type: "button",
5344
- isLoading: E || d,
5345
- onClick: () => L(T),
5346
- children: T ? "Submit" : "Next"
5364
+ isLoading: R || u,
5365
+ onClick: M ? ae : Z,
5366
+ children: M ? "Submit" : "Next"
5347
5367
  }
5348
5368
  )
5349
5369
  ] })
5350
5370
  ] }) });
5351
5371
  }
5352
- return /* @__PURE__ */ a("div", { className: "metakyc-sdk", children: /* @__PURE__ */ a("form", { onSubmit: async (u) => {
5353
- u.preventDefault(), await L(!0);
5354
- }, children: /* @__PURE__ */ i($, { children: [
5355
- /* @__PURE__ */ a(oe, { children: /* @__PURE__ */ a(He, { title: (o == null ? void 0 : o.title) || "Create Applicant" }) }),
5372
+ return /* @__PURE__ */ a("div", { className: "metakyc-sdk", children: /* @__PURE__ */ a("form", { onSubmit: j, children: /* @__PURE__ */ i($, { children: [
5373
+ /* @__PURE__ */ a(oe, { children: /* @__PURE__ */ a(Ye, { title: (o == null ? void 0 : o.title) || "Create Applicant" }) }),
5356
5374
  /* @__PURE__ */ i(B, { children: [
5357
- H && /* @__PURE__ */ a("div", { className: "mb-6 p-4 bg-red-50 border border-red-200 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-red-600 text-sm", children: [
5375
+ W && /* @__PURE__ */ a("div", { className: "mb-6 p-4 bg-red-50 border border-red-200 rounded-lg", children: /* @__PURE__ */ i("p", { className: "text-red-600 text-sm", children: [
5358
5376
  /* @__PURE__ */ a("strong", { children: "Error:" }),
5359
5377
  " ",
5360
- H
5378
+ W
5361
5379
  ] }) }),
5362
- /* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: C.map((u) => ae(u)) })
5380
+ /* @__PURE__ */ a("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: S.map((d) => Fe(d)) })
5363
5381
  ] }),
5364
5382
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
5365
- n && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: n, disabled: E || d, children: "Cancel" }),
5366
- /* @__PURE__ */ a(q, { type: "submit", isLoading: E || d, children: "Create Applicant" })
5383
+ n && /* @__PURE__ */ a(U, { type: "button", variant: "outline", onClick: n, disabled: R || u, children: "Cancel" }),
5384
+ /* @__PURE__ */ a(U, { type: "submit", isLoading: R || u, children: "Create Applicant" })
5367
5385
  ] })
5368
5386
  ] }) }) });
5369
- }, Zr = ({
5387
+ }, ta = ({
5370
5388
  applicantId: e,
5371
5389
  onComplete: t,
5372
5390
  onError: r,
@@ -5377,25 +5395,25 @@ const Oe = {
5377
5395
  progress: l,
5378
5396
  currentStep: o,
5379
5397
  steps: c,
5380
- workflowKey: d,
5381
- nextWorkflowKey: m,
5398
+ workflowKey: u,
5399
+ nextWorkflowKey: p,
5382
5400
  hasWorkflowChanged: w,
5383
5401
  isLoading: N,
5384
5402
  error: y,
5385
5403
  moveBack: h,
5386
5404
  refreshProgress: g
5387
- } = tr(e), [k, b] = ye.useState(!1);
5388
- if (ye.useEffect(() => {
5405
+ } = sr(e), [k, b] = ge.useState(!1);
5406
+ if (ge.useEffect(() => {
5389
5407
  y && r && r(y);
5390
- }, [y, r]), ye.useEffect(() => {
5408
+ }, [y, r]), ge.useEffect(() => {
5391
5409
  l != null && l.workflowResult && t && t(l.workflowResult);
5392
- }, [l == null ? void 0 : l.workflowResult, t]), ye.useEffect(() => {
5410
+ }, [l == null ? void 0 : l.workflowResult, t]), ge.useEffect(() => {
5393
5411
  n === "dark" ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
5394
- }, [n]), ye.useEffect(() => {
5412
+ }, [n]), ge.useEffect(() => {
5395
5413
  w && b(!1);
5396
5414
  }, [w]), N || !l)
5397
5415
  return /* @__PURE__ */ a("div", { className: s, children: /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
5398
- /* @__PURE__ */ a(be, { className: "my-8" }),
5416
+ /* @__PURE__ */ a(xe, { className: "my-8" }),
5399
5417
  /* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading workflow..." })
5400
5418
  ] }) }) });
5401
5419
  if (y)
@@ -5412,12 +5430,12 @@ const Oe = {
5412
5430
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between text-sm", children: [
5413
5431
  /* @__PURE__ */ i("div", { className: "text-left", children: [
5414
5432
  /* @__PURE__ */ a("p", { className: "text-gray-500 dark:text-gray-400 mb-1", children: "Previous Workflow" }),
5415
- /* @__PURE__ */ a("p", { className: "font-medium text-gray-900 dark:text-white", children: d })
5433
+ /* @__PURE__ */ a("p", { className: "font-medium text-gray-900 dark:text-white", children: u })
5416
5434
  ] }),
5417
5435
  /* @__PURE__ */ a("svg", { className: "w-6 h-6 text-gray-400 mx-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ a("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 7l5 5m0 0l-5 5m5-5H6" }) }),
5418
5436
  /* @__PURE__ */ i("div", { className: "text-right", children: [
5419
5437
  /* @__PURE__ */ a("p", { className: "text-gray-500 dark:text-gray-400 mb-1", children: "New Workflow" }),
5420
- /* @__PURE__ */ a("p", { className: "font-medium text-blue-600 dark:text-blue-400", children: m })
5438
+ /* @__PURE__ */ a("p", { className: "font-medium text-blue-600 dark:text-blue-400", children: p })
5421
5439
  ] })
5422
5440
  ] }),
5423
5441
  l.nextWorkflowName && /* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-2 text-xs", children: l.nextWorkflowName })
@@ -5431,9 +5449,9 @@ const Oe = {
5431
5449
  }
5432
5450
  )
5433
5451
  ] }) }) }) });
5434
- if (l.status === xe.Finished || l.status === xe.OnHold)
5452
+ if (l.status === fe.Finished || l.status === fe.OnHold)
5435
5453
  return /* @__PURE__ */ a("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ a(
5436
- Ge,
5454
+ et,
5437
5455
  {
5438
5456
  kycStatus: l.kycStatus,
5439
5457
  reviewStatus: l.reviewStatus,
@@ -5447,54 +5465,54 @@ const Oe = {
5447
5465
  ) });
5448
5466
  if (!o)
5449
5467
  return /* @__PURE__ */ a("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
5450
- /* @__PURE__ */ a(be, { className: "my-8" }),
5451
- /* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: l.status === xe.IdentityPending ? "Loading identity verification..." : "Loading current step..." })
5468
+ /* @__PURE__ */ a(xe, { className: "my-8" }),
5469
+ /* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: l.status === fe.IdentityPending ? "Loading identity verification..." : "Loading current step..." })
5452
5470
  ] }) }) });
5453
- const p = (v) => {
5471
+ const m = (v) => {
5454
5472
  switch (v) {
5455
- case U.Overview:
5473
+ case _.Overview:
5456
5474
  return "Overview";
5457
- case U.Questionaries:
5475
+ case _.Questionaries:
5458
5476
  return "Questionnaire";
5459
- case U.UploadDocument:
5477
+ case _.UploadDocument:
5460
5478
  return "Documents";
5461
- case U.IdentitySdk:
5479
+ case _.IdentitySdk:
5462
5480
  return "Identity";
5463
- case U.RiskScoring:
5481
+ case _.RiskScoring:
5464
5482
  return "Risk Assessment";
5465
- case U.InvestorCategorization:
5483
+ case _.InvestorCategorization:
5466
5484
  return "Investor Categorization";
5467
- case U.AppropriatenessTest:
5485
+ case _.AppropriatenessTest:
5468
5486
  return "Appropriateness Test";
5469
- case U.AdditionalData:
5487
+ case _.AdditionalData:
5470
5488
  return "Additional Data";
5471
- case U.ManualReview:
5489
+ case _.ManualReview:
5472
5490
  return "Review";
5473
5491
  default:
5474
5492
  return "";
5475
5493
  }
5476
5494
  }, F = () => {
5477
- const v = c.filter((f) => f.visibility !== !1), K = v.findIndex((f) => f.order === o.order), Y = K >= 0 ? K + 1 : 1, M = v.length;
5495
+ const v = c.filter((f) => f.visibility !== !1), q = v.findIndex((f) => f.order === o.order), H = q >= 0 ? q + 1 : 1, T = v.length;
5478
5496
  return /* @__PURE__ */ i("div", { className: "mb-6", children: [
5479
5497
  /* @__PURE__ */ i("div", { className: "flex items-start justify-between mb-4", children: [
5480
- /* @__PURE__ */ a(He, {}),
5481
- /* @__PURE__ */ i(Ne, { variant: l.status === 1 ? "info" : "success", children: [
5498
+ /* @__PURE__ */ a(Ye, {}),
5499
+ /* @__PURE__ */ i(Se, { variant: l.status === 1 ? "info" : "success", children: [
5482
5500
  "Step ",
5483
- Y,
5501
+ H,
5484
5502
  " of ",
5485
- M
5503
+ T
5486
5504
  ] })
5487
5505
  ] }),
5488
5506
  /* @__PURE__ */ a("div", { className: "flex items-center", children: v.map((f, A) => {
5489
- const D = A < K, V = f.order === o.order;
5490
- return /* @__PURE__ */ i(ye.Fragment, { children: [
5507
+ const D = A < q, Q = f.order === o.order;
5508
+ return /* @__PURE__ */ i(ge.Fragment, { children: [
5491
5509
  /* @__PURE__ */ i("div", { className: "flex items-center", children: [
5492
5510
  /* @__PURE__ */ a(
5493
5511
  "div",
5494
5512
  {
5495
5513
  className: `
5496
5514
  w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium
5497
- ${D || V ? "bg-primary-500 text-white" : "bg-gray-200 text-gray-600 dark:bg-gray-700 dark:text-gray-400"}
5515
+ ${D || Q ? "bg-primary-500 text-white" : "bg-gray-200 text-gray-600 dark:bg-gray-700 dark:text-gray-400"}
5498
5516
  `,
5499
5517
  children: A + 1
5500
5518
  }
@@ -5502,8 +5520,8 @@ const Oe = {
5502
5520
  /* @__PURE__ */ a(
5503
5521
  "span",
5504
5522
  {
5505
- className: `ml-2 text-sm ${V ? "font-semibold text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`,
5506
- children: f.displayName || f.name || p(f.action) || `Step ${A + 1}`
5523
+ className: `ml-2 text-sm ${Q ? "font-semibold text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`,
5524
+ children: f.displayName || f.name || m(f.action) || `Step ${A + 1}`
5507
5525
  }
5508
5526
  )
5509
5527
  ] }),
@@ -5516,7 +5534,7 @@ const Oe = {
5516
5534
  ] }, f.order);
5517
5535
  }) })
5518
5536
  ] });
5519
- }, C = () => {
5537
+ }, S = () => {
5520
5538
  const v = {
5521
5539
  applicantId: e,
5522
5540
  onComplete: async () => {
@@ -5525,24 +5543,24 @@ const Oe = {
5525
5543
  onBack: o.order > 0 ? h : void 0
5526
5544
  };
5527
5545
  switch (o.action) {
5528
- case U.Questionaries:
5529
- return /* @__PURE__ */ a(vr, { ...v });
5530
- case U.UploadDocument:
5531
- return /* @__PURE__ */ a(kr, { ...v });
5532
- case U.Overview:
5533
- return /* @__PURE__ */ a(Nr, { ...v });
5534
- case U.IdentitySdk:
5535
- return /* @__PURE__ */ a(Dr, { ...v });
5536
- case U.RiskScoring:
5546
+ case _.Questionaries:
5547
+ return /* @__PURE__ */ a(Sr, { ...v });
5548
+ case _.UploadDocument:
5549
+ return /* @__PURE__ */ a(Ar, { ...v });
5550
+ case _.Overview:
5537
5551
  return /* @__PURE__ */ a(Ir, { ...v });
5538
- case U.AdditionalData:
5539
- case U.InvestorCategorization:
5540
- return /* @__PURE__ */ a(Rr, { ...v });
5541
- case U.AppropriatenessTest:
5542
- return /* @__PURE__ */ a(Fr, { ...v });
5543
- case U.ManualReview:
5552
+ case _.IdentitySdk:
5553
+ return /* @__PURE__ */ a(Tr, { ...v });
5554
+ case _.RiskScoring:
5555
+ return /* @__PURE__ */ a(Dr, { ...v });
5556
+ case _.AdditionalData:
5557
+ case _.InvestorCategorization:
5558
+ return /* @__PURE__ */ a(Lr, { ...v });
5559
+ case _.AppropriatenessTest:
5560
+ return /* @__PURE__ */ a(Mr, { ...v });
5561
+ case _.ManualReview:
5544
5562
  return /* @__PURE__ */ a(
5545
- Ge,
5563
+ et,
5546
5564
  {
5547
5565
  kycStatus: l.kycStatus,
5548
5566
  reviewStatus: l.reviewStatus,
@@ -5552,30 +5570,30 @@ const Oe = {
5552
5570
  );
5553
5571
  default:
5554
5572
  return /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { className: "py-12 text-center", children: [
5555
- /* @__PURE__ */ a("div", { className: "mb-4", children: /* @__PURE__ */ a(be, {}) }),
5573
+ /* @__PURE__ */ a("div", { className: "mb-4", children: /* @__PURE__ */ a(xe, {}) }),
5556
5574
  /* @__PURE__ */ i("p", { className: "text-gray-600 dark:text-gray-400 mb-2", children: [
5557
5575
  "Processing step: ",
5558
5576
  o.title || o.name
5559
5577
  ] }),
5560
5578
  /* @__PURE__ */ i("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
5561
5579
  "Action type: ",
5562
- U[o.action]
5580
+ _[o.action]
5563
5581
  ] })
5564
5582
  ] }) });
5565
5583
  }
5566
5584
  };
5567
5585
  return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${s || ""}`, children: [
5568
5586
  F(),
5569
- C()
5587
+ S()
5570
5588
  ] });
5571
5589
  };
5572
- function Jr(e) {
5573
- return ke.object({
5574
- questionResults: ke.any()
5590
+ function ra(e) {
5591
+ return Ne.object({
5592
+ questionResults: Ne.any()
5575
5593
  }).passthrough();
5576
5594
  }
5577
- function Lr(e) {
5578
- let t = ke.array(ke.instanceof(File));
5595
+ function $r(e) {
5596
+ let t = Ne.array(Ne.instanceof(File));
5579
5597
  if (e.isRequired ? t = t.min(
5580
5598
  1,
5581
5599
  `${e.displayName} is required`
@@ -5596,139 +5614,139 @@ function Lr(e) {
5596
5614
  }
5597
5615
  return t;
5598
5616
  }
5599
- function Xr(e) {
5617
+ function aa(e) {
5600
5618
  const t = {};
5601
5619
  return e.uploadDocumentFiles.forEach((r) => {
5602
5620
  const n = `file_${r.id}`;
5603
- t[n] = Lr(r);
5604
- }), ke.object(t);
5621
+ t[n] = $r(r);
5622
+ }), Ne.object(t);
5605
5623
  }
5606
- function ea(e) {
5607
- return ke.any();
5624
+ function na(e) {
5625
+ return Ne.any();
5608
5626
  }
5609
- function Mr(e) {
5610
- return ke.string().min(1, "This question is required");
5627
+ function Br(e) {
5628
+ return Ne.string().min(1, "This question is required");
5611
5629
  }
5612
- function ta(e) {
5630
+ function sa(e) {
5613
5631
  const t = {};
5614
5632
  return e.appropriatenessQuestions.forEach((r) => {
5615
5633
  const n = `question_${r.id}`;
5616
- t[n] = Mr();
5617
- }), ke.object(t);
5634
+ t[n] = Br();
5635
+ }), Ne.object(t);
5618
5636
  }
5619
- const ra = ke.any();
5637
+ const ia = Ne.any();
5620
5638
  export {
5621
- Qe as ALLOWED_LANGUAGES,
5622
- dt as ApplicantProgressOnHoldReason,
5623
- xe as ApplicantProgressStatus,
5624
- Ct as ApplicantService,
5625
- mt as ApplicantStatus,
5626
- ft as AppropriatenessQuestionType,
5627
- Et as AppropriatenessTestService,
5628
- Fr as AppropriatenessTestStep,
5629
- Ne as Badge,
5630
- Pt as BaseInformationService,
5631
- q as Button,
5639
+ Je as ALLOWED_LANGUAGES,
5640
+ ht as ApplicantProgressOnHoldReason,
5641
+ fe as ApplicantProgressStatus,
5642
+ Rt as ApplicantService,
5643
+ yt as ApplicantStatus,
5644
+ wt as AppropriatenessQuestionType,
5645
+ Pt as AppropriatenessTestService,
5646
+ Mr as AppropriatenessTestStep,
5647
+ Se as Badge,
5648
+ Ot as BaseInformationService,
5649
+ U as Button,
5632
5650
  $ as Card,
5633
5651
  B as CardContent,
5634
5652
  me as CardFooter,
5635
5653
  oe as CardHeader,
5636
- Gr as CreateApplicantForm,
5637
- bt as CriteriaBuiltInType,
5638
- wt as DEFAULT_VISIBLE_FIELDS,
5639
- yt as DocumentReviewStatus,
5640
- Nt as EndpointBuilder,
5641
- Le as ErrorHandler,
5642
- Ut as EventEmitter,
5643
- _e as FIELD_METADATA,
5644
- gt as FileType,
5645
- cr as FileUpload,
5646
- Be as GenderType,
5647
- He as Header,
5648
- St as HttpClient,
5654
+ ea as CreateApplicantForm,
5655
+ Nt as CriteriaBuiltInType,
5656
+ Ct as DEFAULT_VISIBLE_FIELDS,
5657
+ vt as DocumentReviewStatus,
5658
+ It as EndpointBuilder,
5659
+ Te as ErrorHandler,
5660
+ Ht as EventEmitter,
5661
+ Ke as FIELD_METADATA,
5662
+ bt as FileType,
5663
+ pr as FileUpload,
5664
+ Ue as GenderType,
5665
+ Ye as Header,
5666
+ Et as HttpClient,
5649
5667
  De as IdentityProviderManager,
5650
- Dt as IdentityService,
5651
- fe as IdentityVerificationProvider,
5652
- Dr as IdentityVerificationStep,
5668
+ Tt as IdentityService,
5669
+ ye as IdentityVerificationProvider,
5670
+ Tr as IdentityVerificationStep,
5653
5671
  ue as Input,
5654
- Lt as InvestorCategorizationService,
5655
- Rr as InvestorCategorizationStep,
5672
+ $t as InvestorCategorizationService,
5673
+ Lr as InvestorCategorizationStep,
5656
5674
  pe as InvestorCategorizationType,
5657
- vt as InvestorCategoryType,
5658
- pt as KycProcessStatus,
5675
+ St as InvestorCategoryType,
5676
+ ft as KycProcessStatus,
5659
5677
  Ee as KycStatus,
5660
- Ge as KycStatusDisplay,
5661
- Zr as KycWorkflow,
5662
- Pr as Logo,
5663
- Je as MetaKYCContext,
5678
+ et as KycStatusDisplay,
5679
+ ta as KycWorkflow,
5680
+ Or as Logo,
5681
+ rt as MetaKYCContext,
5664
5682
  we as MetaKYCError,
5665
- Kr as MetaKYCProvider,
5666
- or as MultiSelect,
5667
- Wt as OnfidoProvider,
5668
- Rt as OverviewService,
5669
- Nr as OverviewStep,
5670
- dr as PhoneInput,
5671
- At as QuestionnaireService,
5672
- vr as QuestionnaireStep,
5683
+ Yr as MetaKYCProvider,
5684
+ mr as MultiSelect,
5685
+ Gt as OnfidoProvider,
5686
+ Lt as OverviewService,
5687
+ Ir as OverviewStep,
5688
+ hr as PhoneInput,
5689
+ Ft as QuestionnaireService,
5690
+ Sr as QuestionnaireStep,
5673
5691
  Re as ReviewStatus,
5674
- xt as RiskCriteriaType,
5675
- ut as RiskLevel,
5676
- Ft as RiskScoringService,
5677
- Ir as RiskScoringStep,
5678
- Yt as SardinAIProvider,
5692
+ kt as RiskCriteriaType,
5693
+ gt as RiskLevel,
5694
+ Mt as RiskScoringService,
5695
+ Dr as RiskScoringStep,
5696
+ Zt as SardinAIProvider,
5679
5697
  Ae as Select,
5680
- be as Spinner,
5681
- Kt as StepRouter,
5682
- Ht as SumsubProvider,
5683
- Qt as ThemeManager,
5698
+ xe as Spinner,
5699
+ Yt as StepRouter,
5700
+ Vt as SumsubProvider,
5701
+ Jt as ThemeManager,
5684
5702
  se as ThemePreset,
5685
- _t as ThemeService,
5686
- It as UploadDocumentService,
5687
- kr as UploadDocumentStep,
5688
- ht as UserType,
5703
+ jt as ThemeService,
5704
+ Dt as UploadDocumentService,
5705
+ Ar as UploadDocumentStep,
5706
+ xt as UserType,
5689
5707
  Ce as ValueDataType,
5690
- jt as WorkflowOrchestrator,
5691
- $e as WorkflowResultType,
5692
- qt as WorkflowState,
5693
- U as WorkflowStepAction,
5694
- ra as appropriatenessTestSchema,
5695
- Qr as clearAllStorage,
5696
- Jt as clearApplicantId,
5697
- er as clearWorkflowState,
5708
+ Qt as WorkflowOrchestrator,
5709
+ _e as WorkflowResultType,
5710
+ Wt as WorkflowState,
5711
+ _ as WorkflowStepAction,
5712
+ ia as appropriatenessTestSchema,
5713
+ Jr as clearAllStorage,
5714
+ rr as clearApplicantId,
5715
+ nr as clearWorkflowState,
5698
5716
  ie as cn,
5699
- Mt as corporateTheme,
5700
- kt as defaultConfig,
5717
+ Bt as corporateTheme,
5718
+ At as defaultConfig,
5701
5719
  de as defaultTheme,
5702
- Vt as fileToBase64,
5703
- Tt as fintechTheme,
5704
- Ue as formatFileSize,
5705
- ta as generateAppropriatenessSchema,
5706
- Jr as generateQuestionnaireSchema,
5707
- ea as generateRiskScoringSchema,
5708
- Xr as generateUploadDocumentSchema,
5709
- Wr as getAcceptString,
5710
- Zt as getApplicantId,
5711
- Me as getThemePreset,
5712
- Yr as getWorkflowState,
5713
- Ot as healthcareTheme,
5714
- Ur as isScriptLoaded,
5715
- Ze as loadScript,
5716
- Bt as minimalTheme,
5717
- $t as modernTheme,
5718
- qr as removeScript,
5719
- Gt as saveApplicantId,
5720
- Xt as saveWorkflowState,
5721
- zt as themePresets,
5722
- lr as useApplicant,
5723
- Vr as useAppropriatenessTest,
5724
- sr as useIdentityVerification,
5725
- tr as useKycWorkflow,
5720
+ Xt as fileToBase64,
5721
+ zt as fintechTheme,
5722
+ je as formatFileSize,
5723
+ sa as generateAppropriatenessSchema,
5724
+ ra as generateQuestionnaireSchema,
5725
+ na as generateRiskScoringSchema,
5726
+ aa as generateUploadDocumentSchema,
5727
+ Gr as getAcceptString,
5728
+ tr as getApplicantId,
5729
+ Oe as getThemePreset,
5730
+ Zr as getWorkflowState,
5731
+ _t as healthcareTheme,
5732
+ Hr as isScriptLoaded,
5733
+ tt as loadScript,
5734
+ qt as minimalTheme,
5735
+ Ut as modernTheme,
5736
+ Wr as removeScript,
5737
+ er as saveApplicantId,
5738
+ ar as saveWorkflowState,
5739
+ Kt as themePresets,
5740
+ ur as useApplicant,
5741
+ Xr as useAppropriatenessTest,
5742
+ cr as useIdentityVerification,
5743
+ sr as useKycWorkflow,
5726
5744
  he as useMetaKYC,
5727
- nr as useOverview,
5728
- rr as useQuestionnaire,
5729
- ir as useRiskScoring,
5730
- ar as useUploadDocument,
5731
- jr as validateFileSize,
5732
- Hr as validateFileType
5745
+ or as useOverview,
5746
+ ir as useQuestionnaire,
5747
+ dr as useRiskScoring,
5748
+ lr as useUploadDocument,
5749
+ Qr as validateFileSize,
5750
+ Vr as validateFileType
5733
5751
  };
5734
5752
  //# sourceMappingURL=index.js.map