@vpdev2/metakyc-sdk 1.0.43 → 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,45 +2615,74 @@ 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, ...o }, c) => /* @__PURE__ */ i("div", { className: "w-full", children: [
2620
- e && /* @__PURE__ */ i("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
2621
- e,
2622
- o.required && /* @__PURE__ */ a("span", { className: "text-danger-500 ml-1", children: "*" })
2623
- ] }),
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
+ e && /* @__PURE__ */ i(
2621
+ "label",
2622
+ {
2623
+ className: "block text-sm font-medium mb-1",
2624
+ style: { color: "var(--metakyc-text-primary, #374151)" },
2625
+ children: [
2626
+ e,
2627
+ c.required && /* @__PURE__ */ a("span", { className: "text-danger-500 ml-1", children: "*" })
2628
+ ]
2629
+ }
2630
+ ),
2624
2631
  /* @__PURE__ */ i(
2625
2632
  "select",
2626
2633
  {
2627
- ref: c,
2634
+ ref: u,
2628
2635
  className: ie(
2629
2636
  "block w-full rounded-lg border px-3 py-2 text-sm transition-colors",
2630
- "focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent",
2631
- "disabled:bg-gray-100 disabled:cursor-not-allowed",
2632
- t ? "border-danger-500 focus:ring-danger-500" : "border-gray-300 dark:border-gray-600",
2633
- "dark:bg-gray-800 dark:text-white",
2637
+ "focus:outline-none focus:ring-2 focus:ring-offset-0",
2638
+ "disabled:opacity-60 disabled:cursor-not-allowed",
2639
+ t ? "border-danger-500" : "",
2634
2640
  l
2635
2641
  ),
2636
- ...o,
2642
+ style: {
2643
+ backgroundColor: "var(--metakyc-input-bg, #ffffff)",
2644
+ color: "var(--metakyc-text-primary, #111827)",
2645
+ borderColor: t ? "var(--metakyc-error, #ef4444)" : "var(--metakyc-border, #d1d5db)",
2646
+ // ring color via outline on focus
2647
+ ...o
2648
+ },
2649
+ ...c,
2637
2650
  children: [
2638
- s && /* @__PURE__ */ a("option", { value: "", disabled: !0, children: s }, "__placeholder__"),
2639
- n.map((d, m) => /* @__PURE__ */ a(
2651
+ s && /* @__PURE__ */ a(
2640
2652
  "option",
2641
2653
  {
2642
- value: d.value,
2643
- disabled: d.disabled,
2644
- children: d.label
2654
+ value: "",
2655
+ disabled: !0,
2656
+ style: {
2657
+ backgroundColor: "var(--metakyc-input-bg, #ffffff)",
2658
+ color: "var(--metakyc-text-secondary, #6b7280)"
2659
+ },
2660
+ children: s
2645
2661
  },
2646
- d.value || `option-${m}`
2662
+ "__placeholder__"
2663
+ ),
2664
+ n.map((p, w) => /* @__PURE__ */ a(
2665
+ "option",
2666
+ {
2667
+ value: p.value,
2668
+ disabled: p.disabled,
2669
+ style: {
2670
+ backgroundColor: "var(--metakyc-input-bg, #ffffff)",
2671
+ color: p.disabled ? "var(--metakyc-text-secondary, #9ca3af)" : "var(--metakyc-text-primary, #111827)"
2672
+ },
2673
+ children: p.label
2674
+ },
2675
+ p.value || `option-${w}`
2647
2676
  ))
2648
2677
  ]
2649
2678
  }
2650
2679
  ),
2651
- t && /* @__PURE__ */ a("p", { className: "mt-1 text-sm text-danger-500", children: t }),
2652
- !t && r && /* @__PURE__ */ a("p", { className: "mt-1 text-sm text-gray-500", children: r })
2680
+ t && /* @__PURE__ */ a("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-error, #ef4444)" }, children: t }),
2681
+ !t && r && /* @__PURE__ */ a("p", { className: "mt-1 text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: r })
2653
2682
  ] })
2654
2683
  );
2655
2684
  Ae.displayName = "Select";
2656
- const or = ({
2685
+ const mr = ({
2657
2686
  label: e,
2658
2687
  value: t,
2659
2688
  onChange: r,
@@ -2662,22 +2691,22 @@ const or = ({
2662
2691
  disabled: l = !1,
2663
2692
  required: o = !1
2664
2693
  }) => {
2665
- const [c, d] = x(!1), [m, w] = x(""), N = te(null);
2666
- ee(() => {
2667
- const b = (p) => {
2668
- 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(""));
2669
2698
  };
2670
2699
  return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
2671
2700
  }, []);
2672
2701
  const y = n.filter(
2673
- (b) => b.label.toLowerCase().includes(m.toLowerCase())
2702
+ (b) => b.label.toLowerCase().includes(p.toLowerCase())
2674
2703
  ), h = (b) => {
2675
- l || (t.includes(b) ? r(t.filter((p) => p !== b)) : r([...t, b]));
2676
- }, g = (b, p) => {
2677
- 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));
2678
2707
  }, k = (b) => {
2679
- var p;
2680
- 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;
2681
2710
  };
2682
2711
  return /* @__PURE__ */ i("div", { className: "w-full metakyc-multiselect", ref: N, children: [
2683
2712
  e && /* @__PURE__ */ i("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
@@ -2688,7 +2717,7 @@ const or = ({
2688
2717
  /* @__PURE__ */ i(
2689
2718
  "div",
2690
2719
  {
2691
- onClick: () => !l && d(!c),
2720
+ onClick: () => !l && u(!c),
2692
2721
  className: ie(
2693
2722
  "metakyc-multiselect-trigger",
2694
2723
  "min-h-[42px] w-full px-3 py-2 rounded-lg border text-sm transition-colors",
@@ -2708,7 +2737,7 @@ const or = ({
2708
2737
  "button",
2709
2738
  {
2710
2739
  type: "button",
2711
- onClick: (p) => g(b, p),
2740
+ onClick: (m) => g(b, m),
2712
2741
  className: "metakyc-multiselect-chip-remove",
2713
2742
  style: {
2714
2743
  background: "transparent",
@@ -2750,7 +2779,7 @@ const or = ({
2750
2779
  "input",
2751
2780
  {
2752
2781
  type: "text",
2753
- value: m,
2782
+ value: p,
2754
2783
  onChange: (b) => w(b.target.value),
2755
2784
  placeholder: "Search...",
2756
2785
  autoFocus: !0,
@@ -2804,7 +2833,7 @@ const or = ({
2804
2833
  )
2805
2834
  ] })
2806
2835
  ] });
2807
- }, cr = ({
2836
+ }, pr = ({
2808
2837
  label: e,
2809
2838
  error: t,
2810
2839
  accept: r,
@@ -2814,26 +2843,26 @@ const or = ({
2814
2843
  value: o = [],
2815
2844
  className: c
2816
2845
  }) => {
2817
- const [d, m] = x(!1), w = te(null), N = (p) => {
2818
- if (!p) return;
2819
- 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);
2820
2849
  if (s && F.filter((v) => v.size > s).length > 0) {
2821
- const v = Ue(s);
2850
+ const v = je(s);
2822
2851
  alert(`Some files exceed the maximum size of ${v}`);
2823
2852
  return;
2824
2853
  }
2825
2854
  l == null || l(n ? [...o, ...F] : [F[0]]);
2826
- }, y = (p) => {
2827
- p.preventDefault(), m(!0);
2855
+ }, y = (m) => {
2856
+ m.preventDefault(), p(!0);
2828
2857
  }, h = () => {
2829
- m(!1);
2830
- }, g = (p) => {
2831
- p.preventDefault(), m(!1), N(p.dataTransfer.files);
2858
+ p(!1);
2859
+ }, g = (m) => {
2860
+ m.preventDefault(), p(!1), N(m.dataTransfer.files);
2832
2861
  }, k = () => {
2833
- var p;
2834
- (p = w.current) == null || p.click();
2835
- }, b = (p) => {
2836
- 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);
2837
2866
  l == null || l(F);
2838
2867
  };
2839
2868
  return /* @__PURE__ */ i("div", { className: ie("w-full", c), children: [
@@ -2843,7 +2872,7 @@ const or = ({
2843
2872
  {
2844
2873
  className: ie(
2845
2874
  "border-2 border-dashed rounded-lg p-6 text-center cursor-pointer transition-colors",
2846
- 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",
2847
2876
  t && "border-danger-500"
2848
2877
  ),
2849
2878
  onDragOver: y,
@@ -2859,7 +2888,7 @@ const or = ({
2859
2888
  className: "hidden",
2860
2889
  accept: r,
2861
2890
  multiple: n,
2862
- onChange: (p) => N(p.target.files)
2891
+ onChange: (m) => N(m.target.files)
2863
2892
  }
2864
2893
  ),
2865
2894
  /* @__PURE__ */ i("div", { className: "space-y-2", children: [
@@ -2887,13 +2916,13 @@ const or = ({
2887
2916
  ] }),
2888
2917
  s && /* @__PURE__ */ i("p", { className: "text-xs text-gray-500", children: [
2889
2918
  "Maximum file size: ",
2890
- Ue(s)
2919
+ je(s)
2891
2920
  ] })
2892
2921
  ] })
2893
2922
  ]
2894
2923
  }
2895
2924
  ),
2896
- 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(
2897
2926
  "div",
2898
2927
  {
2899
2928
  className: "flex items-center justify-between px-3 py-2 bg-gray-50 dark:bg-gray-700 rounded-lg",
@@ -2915,10 +2944,10 @@ const or = ({
2915
2944
  )
2916
2945
  }
2917
2946
  ),
2918
- /* @__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 }),
2919
2948
  /* @__PURE__ */ i("span", { className: "text-xs text-gray-500", children: [
2920
2949
  "(",
2921
- Ue(p.size),
2950
+ je(m.size),
2922
2951
  ")"
2923
2952
  ] })
2924
2953
  ] }),
@@ -2926,8 +2955,8 @@ const or = ({
2926
2955
  "button",
2927
2956
  {
2928
2957
  type: "button",
2929
- onClick: (C) => {
2930
- C.stopPropagation(), b(F);
2958
+ onClick: (S) => {
2959
+ S.stopPropagation(), b(F);
2931
2960
  },
2932
2961
  className: "ml-2 text-danger-500 hover:text-danger-700 focus:outline-none",
2933
2962
  children: /* @__PURE__ */ a("svg", { className: "h-5 w-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ a(
@@ -2946,7 +2975,7 @@ const or = ({
2946
2975
  )) }),
2947
2976
  t && /* @__PURE__ */ a("p", { className: "mt-1 text-sm text-danger-500", children: t })
2948
2977
  ] });
2949
- }, dr = Te(
2978
+ }, hr = $e(
2950
2979
  ({ countryCode: e = "+1", onCountryCodeChange: t, className: r, ...n }, s) => /* @__PURE__ */ i("div", { className: "w-full", children: [
2951
2980
  n.label && /* @__PURE__ */ i("label", { className: "block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1", children: [
2952
2981
  n.label,
@@ -2981,28 +3010,28 @@ const or = ({
2981
3010
  n.error && /* @__PURE__ */ a("p", { className: "mt-1 text-sm text-danger-500", children: n.error })
2982
3011
  ] })
2983
3012
  );
2984
- dr.displayName = "PhoneInput";
3013
+ hr.displayName = "PhoneInput";
2985
3014
  /**
2986
3015
  * @license lucide-react v0.574.0 - ISC
2987
3016
  *
2988
3017
  * This source code is licensed under the ISC license.
2989
3018
  * See the LICENSE file in the root directory of this source tree.
2990
3019
  */
2991
- 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();
2992
3021
  /**
2993
3022
  * @license lucide-react v0.574.0 - ISC
2994
3023
  *
2995
3024
  * This source code is licensed under the ISC license.
2996
3025
  * See the LICENSE file in the root directory of this source tree.
2997
3026
  */
2998
- 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();
2999
3028
  /**
3000
3029
  * @license lucide-react v0.574.0 - ISC
3001
3030
  *
3002
3031
  * This source code is licensed under the ISC license.
3003
3032
  * See the LICENSE file in the root directory of this source tree.
3004
3033
  */
3005
- const mr = (e) => e.replace(
3034
+ const yr = (e) => e.replace(
3006
3035
  /^([A-Z])|[\s-_]+(\w)/g,
3007
3036
  (t, r, n) => n ? n.toUpperCase() : r.toLowerCase()
3008
3037
  );
@@ -3012,8 +3041,8 @@ const mr = (e) => e.replace(
3012
3041
  * This source code is licensed under the ISC license.
3013
3042
  * See the LICENSE file in the root directory of this source tree.
3014
3043
  */
3015
- const Ve = (e) => {
3016
- const t = mr(e);
3044
+ const Xe = (e) => {
3045
+ const t = yr(e);
3017
3046
  return t.charAt(0).toUpperCase() + t.slice(1);
3018
3047
  };
3019
3048
  /**
@@ -3022,7 +3051,7 @@ const Ve = (e) => {
3022
3051
  * This source code is licensed under the ISC license.
3023
3052
  * See the LICENSE file in the root directory of this source tree.
3024
3053
  */
3025
- var pr = {
3054
+ var fr = {
3026
3055
  xmlns: "http://www.w3.org/2000/svg",
3027
3056
  width: 24,
3028
3057
  height: 24,
@@ -3039,7 +3068,7 @@ var pr = {
3039
3068
  * This source code is licensed under the ISC license.
3040
3069
  * See the LICENSE file in the root directory of this source tree.
3041
3070
  */
3042
- const hr = (e) => {
3071
+ const xr = (e) => {
3043
3072
  for (const t in e)
3044
3073
  if (t.startsWith("aria-") || t === "role" || t === "title")
3045
3074
  return !0;
@@ -3051,7 +3080,7 @@ const hr = (e) => {
3051
3080
  * This source code is licensed under the ISC license.
3052
3081
  * See the LICENSE file in the root directory of this source tree.
3053
3082
  */
3054
- const gr = Te(
3083
+ const br = $e(
3055
3084
  ({
3056
3085
  color: e = "currentColor",
3057
3086
  size: t = 24,
@@ -3061,21 +3090,21 @@ const gr = Te(
3061
3090
  children: l,
3062
3091
  iconNode: o,
3063
3092
  ...c
3064
- }, d) => je(
3093
+ }, u) => We(
3065
3094
  "svg",
3066
3095
  {
3067
- ref: d,
3068
- ...pr,
3096
+ ref: u,
3097
+ ...fr,
3069
3098
  width: t,
3070
3099
  height: t,
3071
3100
  stroke: e,
3072
3101
  strokeWidth: n ? Number(r) * 24 / Number(t) : r,
3073
- className: Xe("lucide", s),
3074
- ...!l && !hr(c) && { "aria-hidden": "true" },
3102
+ className: at("lucide", s),
3103
+ ...!l && !xr(c) && { "aria-hidden": "true" },
3075
3104
  ...c
3076
3105
  },
3077
3106
  [
3078
- ...o.map(([m, w]) => je(m, w)),
3107
+ ...o.map(([p, w]) => We(p, w)),
3079
3108
  ...Array.isArray(l) ? l : [l]
3080
3109
  ]
3081
3110
  )
@@ -3086,20 +3115,20 @@ const gr = Te(
3086
3115
  * This source code is licensed under the ISC license.
3087
3116
  * See the LICENSE file in the root directory of this source tree.
3088
3117
  */
3089
- const et = (e, t) => {
3090
- const r = Te(
3091
- ({ className: n, ...s }, l) => je(gr, {
3118
+ const nt = (e, t) => {
3119
+ const r = $e(
3120
+ ({ className: n, ...s }, l) => We(br, {
3092
3121
  ref: l,
3093
3122
  iconNode: t,
3094
- className: Xe(
3095
- `lucide-${ur(Ve(e))}`,
3123
+ className: at(
3124
+ `lucide-${gr(Xe(e))}`,
3096
3125
  `lucide-${e}`,
3097
3126
  n
3098
3127
  ),
3099
3128
  ...s
3100
3129
  })
3101
3130
  );
3102
- return r.displayName = Ve(e), r;
3131
+ return r.displayName = Xe(e), r;
3103
3132
  };
3104
3133
  /**
3105
3134
  * @license lucide-react v0.574.0 - ISC
@@ -3107,15 +3136,15 @@ const et = (e, t) => {
3107
3136
  * This source code is licensed under the ISC license.
3108
3137
  * See the LICENSE file in the root directory of this source tree.
3109
3138
  */
3110
- 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);
3111
3140
  /**
3112
3141
  * @license lucide-react v0.574.0 - ISC
3113
3142
  *
3114
3143
  * This source code is licensed under the ISC license.
3115
3144
  * See the LICENSE file in the root directory of this source tree.
3116
3145
  */
3117
- const fr = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], rt = et("chevron-right", fr);
3118
- 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) {
3119
3148
  const r = !t || t.length === 0 || t.every((n) => !n || !n.trim());
3120
3149
  if (e.isRequired && r)
3121
3150
  return e.errorMessage || "This field is required";
@@ -3144,7 +3173,7 @@ function xr(e, t) {
3144
3173
  }
3145
3174
  return null;
3146
3175
  }
3147
- function br(e) {
3176
+ function Nr(e) {
3148
3177
  const t = e.flatMap(
3149
3178
  (n, s) => (n.questions ?? []).map((l, o) => ({ question: l, groupIndex: s, qIdx: o }))
3150
3179
  ), r = /* @__PURE__ */ new Map();
@@ -3154,53 +3183,53 @@ function br(e) {
3154
3183
  }
3155
3184
  return Array.from(r.entries()).sort(([n], [s]) => n - s).map(([, n]) => n);
3156
3185
  }
3157
- const vr = ({
3186
+ const Sr = ({
3158
3187
  applicantId: e,
3159
3188
  onComplete: t,
3160
3189
  onBack: r
3161
3190
  }) => {
3162
- 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);
3163
- ye.useEffect(() => {
3164
- 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);
3165
3194
  }, [s]);
3166
- const k = Se(
3167
- () => n ? br(n.questionGroups) : [],
3195
+ const k = ke(
3196
+ () => n ? Nr(n.questionGroups) : [],
3168
3197
  [n]
3169
- ), b = h === k.length - 1, p = k[h] ?? [], F = Q((M, f) => {
3170
- 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) => {
3171
3200
  const D = { ...A };
3172
- return delete D[M], D;
3201
+ return delete D[T], D;
3173
3202
  });
3174
- }, []), C = Q(() => {
3175
- const M = {};
3176
- for (const { question: f } of p) {
3177
- const A = xr(f, m[f.id] ?? []);
3178
- 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);
3179
3208
  }
3180
- return y((f) => ({ ...f, ...M })), Object.keys(M).length === 0;
3181
- }, [p, m]), v = () => {
3182
- C() && g((M) => M + 1);
3183
- }, K = () => {
3184
- h > 0 ? g((M) => M - 1) : r == null || r();
3185
- }, Y = async () => {
3186
- 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))
3187
3216
  try {
3188
- const M = n.questionGroups.flatMap(
3217
+ const T = n.questionGroups.flatMap(
3189
3218
  (A) => (A.questions ?? []).map((D) => ({
3190
3219
  questionId: D.id,
3191
- values: m[D.id] ?? []
3220
+ values: p[D.id] ?? []
3192
3221
  }))
3193
3222
  ), f = {
3194
3223
  applicantId: e,
3195
3224
  questionnarieId: n.id,
3196
- questionResults: M
3225
+ questionResults: T
3197
3226
  };
3198
- await d(f), t == null || t();
3199
- } catch (M) {
3200
- console.error("Questionnaire submit error:", M);
3227
+ await u(f), t == null || t();
3228
+ } catch (T) {
3229
+ console.error("Questionnaire submit error:", T);
3201
3230
  }
3202
3231
  };
3203
- 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: [
3204
3233
  "Error loading questionnaire: ",
3205
3234
  c.message
3206
3235
  ] }) }) }) : n ? /* @__PURE__ */ i($, { children: [
@@ -3214,7 +3243,7 @@ const vr = ({
3214
3243
  " of ",
3215
3244
  k.length
3216
3245
  ] }),
3217
- /* @__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(
3218
3247
  "div",
3219
3248
  {
3220
3249
  className: "rounded-full transition-all duration-200",
@@ -3228,54 +3257,54 @@ const vr = ({
3228
3257
  )) })
3229
3258
  ] })
3230
3259
  ] }),
3231
- /* @__PURE__ */ a(B, { className: "space-y-6", children: p.map(({ question: M }) => /* @__PURE__ */ a(
3232
- wr,
3260
+ /* @__PURE__ */ a(B, { className: "space-y-6", children: m.map(({ question: T }) => /* @__PURE__ */ a(
3261
+ Cr,
3233
3262
  {
3234
- question: M,
3235
- value: m[M.id] ?? [],
3236
- error: N[M.id],
3237
- 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)
3238
3267
  },
3239
- M.id
3268
+ T.id
3240
3269
  )) }),
3241
3270
  /* @__PURE__ */ i(me, { className: "flex items-center justify-between", children: [
3242
3271
  /* @__PURE__ */ i(
3243
- q,
3272
+ U,
3244
3273
  {
3245
3274
  type: "button",
3246
3275
  variant: "outline",
3247
- onClick: K,
3276
+ onClick: q,
3248
3277
  style: { display: "flex", alignItems: "center", gap: "4px" },
3249
3278
  children: [
3250
- /* @__PURE__ */ a(tt, { size: 14 }),
3279
+ /* @__PURE__ */ a(st, { size: 14 }),
3251
3280
  h > 0 ? "Previous" : "Back"
3252
3281
  ]
3253
3282
  }
3254
3283
  ),
3255
3284
  b ? /* @__PURE__ */ a(
3256
- q,
3285
+ U,
3257
3286
  {
3258
3287
  type: "button",
3259
3288
  isLoading: o,
3260
- onClick: Y,
3289
+ onClick: H,
3261
3290
  children: "Continue"
3262
3291
  }
3263
3292
  ) : /* @__PURE__ */ i(
3264
- q,
3293
+ U,
3265
3294
  {
3266
3295
  type: "button",
3267
3296
  onClick: v,
3268
3297
  style: { display: "flex", alignItems: "center", gap: "4px" },
3269
3298
  children: [
3270
3299
  "Next",
3271
- /* @__PURE__ */ a(rt, { size: 14 })
3300
+ /* @__PURE__ */ a(it, { size: 14 })
3272
3301
  ]
3273
3302
  }
3274
3303
  )
3275
3304
  ] }),
3276
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 }) })
3277
3306
  ] }) : null;
3278
- }, wr = ({ question: e, value: t, error: r, onChange: n }) => {
3307
+ }, Cr = ({ question: e, value: t, error: r, onChange: n }) => {
3279
3308
  var o;
3280
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";
3281
3310
  return /* @__PURE__ */ i("div", { className: "space-y-2", children: [
@@ -3354,8 +3383,8 @@ const vr = ({
3354
3383
  {
3355
3384
  type: "checkbox",
3356
3385
  checked: t.includes(c),
3357
- onChange: (d) => {
3358
- 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));
3359
3388
  },
3360
3389
  className: "metakyc-option-input",
3361
3390
  style: {
@@ -3382,19 +3411,19 @@ const vr = ({
3382
3411
  ] }),
3383
3412
  r && l === "text" && null
3384
3413
  ] });
3385
- }, kr = ({
3414
+ }, Ar = ({
3386
3415
  applicantId: e,
3387
3416
  onComplete: t,
3388
3417
  onBack: r
3389
3418
  }) => {
3390
- 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) => {
3391
3420
  if (N.preventDefault(), !n) return;
3392
3421
  const y = await Promise.all(
3393
3422
  n.uploadDocumentFiles.map(async (g) => {
3394
- const k = d[g.id] || [], b = await Promise.all(
3395
- k.map(async (p) => ({
3396
- fileName: p.name,
3397
- 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)
3398
3427
  }))
3399
3428
  );
3400
3429
  return {
@@ -3409,7 +3438,7 @@ const vr = ({
3409
3438
  };
3410
3439
  await c(h), t == null || t();
3411
3440
  };
3412
- 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: [
3413
3442
  "Error loading document requirements: ",
3414
3443
  o.message
3415
3444
  ] }) }) }) : n ? /* @__PURE__ */ a("form", { onSubmit: w, children: /* @__PURE__ */ i($, { children: [
@@ -3418,29 +3447,29 @@ const vr = ({
3418
3447
  n.subtitle && /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: n.subtitle })
3419
3448
  ] }),
3420
3449
  /* @__PURE__ */ a(B, { className: "space-y-6", children: n.uploadDocumentFiles.map((N) => /* @__PURE__ */ a(
3421
- cr,
3450
+ pr,
3422
3451
  {
3423
3452
  label: N.displayName,
3424
3453
  accept: N.allowedTypes,
3425
3454
  multiple: N.multipleFile,
3426
3455
  maxSize: N.maxEachFileSizeByte,
3427
- value: d[N.id] || [],
3456
+ value: u[N.id] || [],
3428
3457
  onChange: (y) => {
3429
- m((h) => ({ ...h, [N.id]: y }));
3458
+ p((h) => ({ ...h, [N.id]: y }));
3430
3459
  }
3431
3460
  },
3432
3461
  N.id
3433
3462
  )) }),
3434
3463
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
3435
- r && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3436
- /* @__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" })
3437
3466
  ] })
3438
3467
  ] }) }) : null;
3439
- }, Nr = ({ applicantId: e, onComplete: t, onBack: r }) => {
3440
- 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 () => {
3441
3470
  await c(), t == null || t();
3442
3471
  };
3443
- 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: [
3444
3473
  "Error loading overview: ",
3445
3474
  o.message
3446
3475
  ] }) }) }) : n ? /* @__PURE__ */ i($, { children: [
@@ -3448,8 +3477,8 @@ const vr = ({
3448
3477
  /* @__PURE__ */ a("h2", { className: "text-lg font-bold", children: n.title || "Overview" }),
3449
3478
  n.description && /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: n.description })
3450
3479
  ] }),
3451
- /* @__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: [
3452
- /* @__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 }) }),
3453
3482
  /* @__PURE__ */ i(
3454
3483
  "div",
3455
3484
  {
@@ -3461,19 +3490,19 @@ const vr = ({
3461
3490
  background: "transparent"
3462
3491
  },
3463
3492
  children: [
3464
- /* @__PURE__ */ a("span", { className: "metakyc-step-title text-sm font-semibold text-gray-900 dark:text-white", children: m.title }),
3465
- 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 })
3466
3495
  ]
3467
3496
  }
3468
3497
  )
3469
- ] }, 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..." }) }) }),
3470
3499
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
3471
- r && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: r, children: "Back" }),
3472
- /* @__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" })
3473
3502
  ] })
3474
3503
  ] }) : null;
3475
3504
  };
3476
- function Sr(e, t) {
3505
+ function Er(e, t) {
3477
3506
  const r = !t || t.length === 0 || t.every((n) => !n || !n.trim());
3478
3507
  if (e.isRequired && r)
3479
3508
  return e.errorMessage || `${e.displayName} is required`;
@@ -3503,65 +3532,65 @@ function Sr(e, t) {
3503
3532
  }
3504
3533
  return null;
3505
3534
  }
3506
- function Cr(e) {
3535
+ function Rr(e) {
3507
3536
  const t = /* @__PURE__ */ new Map();
3508
3537
  return e.forEach((r, n) => {
3509
3538
  const s = r.pageNumber != null && r.pageNumber > 0 ? r.pageNumber : 1;
3510
3539
  t.has(s) || t.set(s, []), t.get(s).push({ criterion: r, idx: n });
3511
3540
  }), Array.from(t.entries()).sort(([r], [n]) => r - n).map(([, r]) => r);
3512
3541
  }
3513
- function Ar(e) {
3542
+ function Fr(e) {
3514
3543
  return e.builtInType === 1 ? "country" : !e.defaultValues || e.defaultValues.length === 0 ? "text" : e.multipleValue ? "checkbox" : "radio";
3515
3544
  }
3516
- const Ir = ({
3545
+ const Dr = ({
3517
3546
  applicantId: e,
3518
3547
  onComplete: t,
3519
3548
  onBack: r
3520
3549
  }) => {
3521
- 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);
3522
- ye.useEffect(() => {
3523
- 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);
3524
3553
  }, [s]);
3525
- const p = Se(
3526
- () => n && n.length > 0 ? Cr(n) : [],
3554
+ const m = ke(
3555
+ () => n && n.length > 0 ? Rr(n) : [],
3527
3556
  [n]
3528
- ), F = h === p.length - 1, C = p[h] ?? [];
3529
- ye.useEffect(() => {
3530
- !l && n && n.length === 0 && !k && !o && (b(!0), d({ applicantId: e, criteriaValueInputs: [] }).then(() => t == null ? void 0 : t()).catch(console.error));
3531
- }, [l, n, k, o, d, e, t]);
3532
- const v = Q((A, D) => {
3533
- w((V) => ({ ...V, [A]: D })), y((V) => {
3534
- const H = { ...V };
3535
- 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;
3536
3565
  });
3537
- }, []), K = Q(() => {
3566
+ }, []), q = Y(() => {
3538
3567
  const A = {};
3539
- for (const { criterion: D } of C) {
3540
- const V = Sr(D, m[D.id] ?? []);
3541
- 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);
3542
3571
  }
3543
3572
  return y((D) => ({ ...D, ...A })), Object.keys(A).length === 0;
3544
- }, [C, m]), Y = () => {
3545
- K() && g((A) => A + 1);
3546
- }, M = () => {
3573
+ }, [S, p]), H = () => {
3574
+ q() && g((A) => A + 1);
3575
+ }, T = () => {
3547
3576
  h > 0 ? g((A) => A - 1) : r == null || r();
3548
3577
  }, f = async () => {
3549
- if (!(!K() || !n))
3578
+ if (!(!q() || !n))
3550
3579
  try {
3551
- const A = n.map((V) => {
3552
- const H = (m[V.id] ?? []).filter((P) => P && P.trim());
3553
- return H.length > 0 ? { riskCriteriaId: V.id, values: H } : null;
3554
- }).filter((V) => V !== null);
3555
- 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();
3556
3585
  } catch (A) {
3557
3586
  console.error("Risk scoring submit error:", A);
3558
3587
  }
3559
3588
  };
3560
3589
  return l ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
3561
- /* @__PURE__ */ a(be, { className: "my-8" }),
3590
+ /* @__PURE__ */ a(xe, { className: "my-8" }),
3562
3591
  /* @__PURE__ */ a("p", { className: "text-center text-sm mt-4", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Loading risk scoring criteria…" })
3563
3592
  ] }) }) : !l && n && n.length === 0 ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
3564
- /* @__PURE__ */ a(be, { className: "my-8" }),
3593
+ /* @__PURE__ */ a(xe, { className: "my-8" }),
3565
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…" })
3566
3595
  ] }) }) : c ? /* @__PURE__ */ a($, { children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("p", { className: "text-danger-500", children: [
3567
3596
  "Error loading criteria: ",
@@ -3570,14 +3599,14 @@ const Ir = ({
3570
3599
  /* @__PURE__ */ i(oe, { children: [
3571
3600
  /* @__PURE__ */ a("h2", { className: "text-lg font-bold", children: "Risk Assessment" }),
3572
3601
  /* @__PURE__ */ a("p", { className: "text-sm", style: { color: "var(--metakyc-text-secondary, #6b7280)" }, children: "Please answer the following questions for risk evaluation" }),
3573
- 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: [
3574
3603
  /* @__PURE__ */ i("span", { className: "text-xs", style: { color: "var(--metakyc-text-muted, #9ca3af)" }, children: [
3575
3604
  "Page ",
3576
3605
  h + 1,
3577
3606
  " of ",
3578
- p.length
3607
+ m.length
3579
3608
  ] }),
3580
- /* @__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(
3581
3610
  "div",
3582
3611
  {
3583
3612
  className: "rounded-full transition-all duration-200",
@@ -3591,11 +3620,11 @@ const Ir = ({
3591
3620
  )) })
3592
3621
  ] })
3593
3622
  ] }),
3594
- /* @__PURE__ */ a(B, { className: "space-y-6", children: C.map(({ criterion: A }) => /* @__PURE__ */ a(
3595
- Er,
3623
+ /* @__PURE__ */ a(B, { className: "space-y-6", children: S.map(({ criterion: A }) => /* @__PURE__ */ a(
3624
+ Pr,
3596
3625
  {
3597
3626
  criterion: A,
3598
- value: m[A.id] ?? [],
3627
+ value: p[A.id] ?? [],
3599
3628
  error: N[A.id],
3600
3629
  onChange: (D) => v(A.id, D)
3601
3630
  },
@@ -3603,35 +3632,35 @@ const Ir = ({
3603
3632
  )) }),
3604
3633
  /* @__PURE__ */ i(me, { className: "flex items-center justify-between", children: [
3605
3634
  /* @__PURE__ */ i(
3606
- q,
3635
+ U,
3607
3636
  {
3608
3637
  type: "button",
3609
3638
  variant: "outline",
3610
- onClick: M,
3639
+ onClick: T,
3611
3640
  style: { display: "flex", alignItems: "center", gap: "4px" },
3612
3641
  children: [
3613
- /* @__PURE__ */ a(tt, { size: 14 }),
3642
+ /* @__PURE__ */ a(st, { size: 14 }),
3614
3643
  h > 0 ? "Previous" : "Back"
3615
3644
  ]
3616
3645
  }
3617
3646
  ),
3618
- F ? /* @__PURE__ */ a(q, { type: "button", isLoading: o, onClick: f, children: "Continue" }) : /* @__PURE__ */ i(
3619
- q,
3647
+ F ? /* @__PURE__ */ a(U, { type: "button", isLoading: o, onClick: f, children: "Continue" }) : /* @__PURE__ */ i(
3648
+ U,
3620
3649
  {
3621
3650
  type: "button",
3622
- onClick: Y,
3651
+ onClick: H,
3623
3652
  style: { display: "flex", alignItems: "center", gap: "4px" },
3624
3653
  children: [
3625
3654
  "Next",
3626
- /* @__PURE__ */ a(rt, { size: 14 })
3655
+ /* @__PURE__ */ a(it, { size: 14 })
3627
3656
  ]
3628
3657
  }
3629
3658
  )
3630
3659
  ] }),
3631
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 }) })
3632
3661
  ] }) : null;
3633
- }, Er = ({ criterion: e, value: t, error: r, onChange: n }) => {
3634
- 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;
3635
3664
  return /* @__PURE__ */ i("div", { className: "space-y-2", children: [
3636
3665
  /* @__PURE__ */ i("label", { className: "block text-sm font-medium", style: { color: "var(--metakyc-text-primary, #111827)" }, children: [
3637
3666
  e.displayName,
@@ -3704,7 +3733,7 @@ const Ir = ({
3704
3733
  type: "checkbox",
3705
3734
  checked: t.includes(o),
3706
3735
  onChange: (c) => {
3707
- 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));
3708
3737
  },
3709
3738
  className: "metakyc-option-input",
3710
3739
  style: {
@@ -3747,18 +3776,18 @@ const Ir = ({
3747
3776
  }
3748
3777
  )
3749
3778
  ] });
3750
- }, Rr = ({
3779
+ }, Lr = ({
3751
3780
  applicantId: e,
3752
3781
  onComplete: t,
3753
3782
  onBack: r
3754
3783
  }) => {
3755
- 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);
3756
3785
  return /* @__PURE__ */ a("form", { onSubmit: async (N) => {
3757
3786
  if (N.preventDefault(), s === null) {
3758
- m("Please select an investor type");
3787
+ p("Please select an investor type");
3759
3788
  return;
3760
3789
  }
3761
- c(!0), m(null);
3790
+ c(!0), p(null);
3762
3791
  try {
3763
3792
  const y = {
3764
3793
  applicantId: e,
@@ -3768,7 +3797,7 @@ const Ir = ({
3768
3797
  const h = await n.setInvestorCategorization(y);
3769
3798
  console.log("Investor categorization result:", h), t == null || t();
3770
3799
  } catch (y) {
3771
- 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");
3772
3801
  } finally {
3773
3802
  c(!1);
3774
3803
  }
@@ -3866,16 +3895,16 @@ const Ir = ({
3866
3895
  ] })
3867
3896
  }
3868
3897
  ),
3869
- 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: [
3870
3899
  /* @__PURE__ */ a("strong", { children: "Error:" }),
3871
3900
  " ",
3872
- d
3901
+ u
3873
3902
  ] }) })
3874
3903
  ] }),
3875
3904
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
3876
- 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" }),
3877
3906
  /* @__PURE__ */ a(
3878
- q,
3907
+ U,
3879
3908
  {
3880
3909
  type: "submit",
3881
3910
  isLoading: o,
@@ -3885,116 +3914,116 @@ const Ir = ({
3885
3914
  )
3886
3915
  ] })
3887
3916
  ] }) });
3888
- }, Fr = ({
3917
+ }, Mr = ({
3889
3918
  applicantId: e,
3890
3919
  onComplete: t,
3891
3920
  onBack: r
3892
3921
  }) => {
3893
- 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);
3894
- 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(() => {
3895
3924
  (async () => {
3896
3925
  try {
3897
3926
  c(!0), N(null), console.log("Loading appropriateness test for applicant:", e);
3898
- const E = await n.getAppropriatenessTest(e);
3899
- if (console.log("Appropriateness test data:", E), l(E), E.waitTimeSpanForNextTry && E.waitTimeSpanForNextTry !== "00:00:00") {
3900
- const Z = Y(E.waitTimeSpanForNextTry);
3901
- 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);
3902
3931
  }
3903
- } catch (E) {
3904
- 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");
3905
3934
  } finally {
3906
3935
  c(!1);
3907
3936
  }
3908
3937
  })();
3909
3938
  }, [e, n]);
3910
- const Y = (P) => {
3911
- const E = P.split(":").map(Number);
3912
- if (E.length === 3) {
3913
- const [Z, j, le] = E;
3914
- 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;
3915
3944
  }
3916
3945
  return 0;
3917
- }, M = (P) => {
3918
- const E = Math.floor(P / 60), Z = P % 60;
3919
- 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")}`;
3920
3949
  };
3921
- ee(() => {
3950
+ X(() => {
3922
3951
  if (!b || g <= 0) return;
3923
3952
  const P = setInterval(() => {
3924
- k((E) => E <= 1 ? (C(!0), 0) : E - 1);
3953
+ k((R) => R <= 1 ? (S(!0), 0) : R - 1);
3925
3954
  }, 1e3);
3926
3955
  return () => clearInterval(P);
3927
- }, [b, g]), ee(() => {
3956
+ }, [b, g]), X(() => {
3928
3957
  if (v <= 0) return;
3929
3958
  const P = setInterval(() => {
3930
- K((E) => E <= 1 ? 0 : E - 1);
3959
+ q((R) => R <= 1 ? 0 : R - 1);
3931
3960
  }, 1e3);
3932
3961
  return () => clearInterval(P);
3933
- }, [v]), ee(() => {
3934
- F && !d && D();
3962
+ }, [v]), X(() => {
3963
+ F && !u && D();
3935
3964
  }, [F]);
3936
3965
  const f = () => {
3937
- s && (p(!0), k(s.testDurationSec));
3938
- }, A = (P, E) => {
3939
- h((Z) => ({
3940
- ...Z,
3941
- [P]: E
3966
+ s && (m(!0), k(s.testDurationSec));
3967
+ }, A = (P, R) => {
3968
+ h((G) => ({
3969
+ ...G,
3970
+ [P]: R
3942
3971
  }));
3943
3972
  }, D = async (P) => {
3944
3973
  if (P && P.preventDefault(), !!s) {
3945
3974
  if (!F) {
3946
- const E = s.appropriatenessQuestions.length - Object.keys(y).length;
3947
- if (E > 0) {
3948
- 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.`);
3949
3978
  return;
3950
3979
  }
3951
3980
  }
3952
- m(!0), N(null);
3981
+ p(!0), N(null);
3953
3982
  try {
3954
- const E = s.appropriatenessQuestions.map(
3955
- (j) => ({
3956
- appropriatenessQuestionId: j.id,
3957
- value: y[j.id] || ""
3983
+ const R = s.appropriatenessQuestions.map(
3984
+ (K) => ({
3985
+ appropriatenessQuestionId: K.id,
3986
+ value: y[K.id] || ""
3958
3987
  // Empty string if not answered
3959
3988
  })
3960
- ), Z = {
3989
+ ), G = {
3961
3990
  applicantId: e,
3962
3991
  appropriatenessTestId: s.id,
3963
- appropriatenessQuestionResults: E
3992
+ appropriatenessQuestionResults: R
3964
3993
  };
3965
- console.log("Submitting appropriateness test:", Z);
3994
+ console.log("Submitting appropriateness test:", G);
3966
3995
  try {
3967
- const j = await n.fillAppropriatenessTest(Z);
3968
- 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));
3969
- } catch (j) {
3970
- if (j.code === 400 && j.message) {
3971
- const le = j.message;
3972
- 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);
3973
4002
  } else
3974
- throw j;
4003
+ throw K;
3975
4004
  }
3976
- } catch (E) {
3977
- 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({});
3978
4007
  } finally {
3979
- m(!1);
4008
+ p(!1);
3980
4009
  }
3981
4010
  }
3982
- }, V = async () => {
4011
+ }, Q = async () => {
3983
4012
  try {
3984
4013
  const P = await n.getAppropriatenessTest(e);
3985
4014
  if (console.log("Reloaded test data:", P), l(P), P.waitTimeSpanForNextTry && P.waitTimeSpanForNextTry !== "00:00:00") {
3986
- const E = Y(P.waitTimeSpanForNextTry);
3987
- E > 0 && K(E);
4015
+ const R = H(P.waitTimeSpanForNextTry);
4016
+ R > 0 && q(R);
3988
4017
  }
3989
4018
  } catch (P) {
3990
- console.error("Error reloading test data:", P), N((E) => E + `
4019
+ console.error("Error reloading test data:", P), N((R) => R + `
3991
4020
 
3992
4021
  Failed to reload test data. Please refresh the page.`);
3993
4022
  }
3994
4023
  };
3995
4024
  if (o)
3996
4025
  return /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
3997
- /* @__PURE__ */ a(be, { className: "my-8" }),
4026
+ /* @__PURE__ */ a(xe, { className: "my-8" }),
3998
4027
  /* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading appropriateness test..." })
3999
4028
  ] }) });
4000
4029
  if (!s)
@@ -4010,13 +4039,13 @@ Failed to reload test data. Please refresh the page.`);
4010
4039
  ] }),
4011
4040
  /* @__PURE__ */ i(B, { className: "py-12 text-center", children: [
4012
4041
  /* @__PURE__ */ i("div", { className: "mb-6", children: [
4013
- /* @__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) }),
4014
4043
  /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait before attempting the test again" })
4015
4044
  ] }),
4016
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 }) })
4017
4046
  ] })
4018
4047
  ] });
4019
- const H = s.testAllowedMaxTry - s.totalFailedTries;
4048
+ const W = s.testAllowedMaxTry - s.totalFailedTries;
4020
4049
  return b ? /* @__PURE__ */ a("form", { onSubmit: D, children: /* @__PURE__ */ i($, { children: [
4021
4050
  /* @__PURE__ */ a(oe, { children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
4022
4051
  /* @__PURE__ */ i("div", { children: [
@@ -4028,7 +4057,7 @@ Failed to reload test data. Please refresh the page.`);
4028
4057
  "div",
4029
4058
  {
4030
4059
  className: `text-3xl font-bold ${g <= 60 ? "text-danger-500" : "text-primary-500"}`,
4031
- children: M(g)
4060
+ children: T(g)
4032
4061
  }
4033
4062
  ),
4034
4063
  /* @__PURE__ */ a("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: "Time Remaining" })
@@ -4036,20 +4065,20 @@ Failed to reload test data. Please refresh the page.`);
4036
4065
  ] }) }),
4037
4066
  /* @__PURE__ */ i(B, { className: "space-y-6", children: [
4038
4067
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between mb-4", children: [
4039
- /* @__PURE__ */ i(Ne, { variant: "info", children: [
4068
+ /* @__PURE__ */ i(Se, { variant: "info", children: [
4040
4069
  "Question ",
4041
4070
  Object.keys(y).length,
4042
4071
  " of ",
4043
4072
  s.totalQuestionCount
4044
4073
  ] }),
4045
- /* @__PURE__ */ i(Ne, { variant: H > 1 ? "success" : "warning", children: [
4046
- H,
4074
+ /* @__PURE__ */ i(Se, { variant: W > 1 ? "success" : "warning", children: [
4075
+ W,
4047
4076
  " attempt",
4048
- H !== 1 ? "s" : "",
4077
+ W !== 1 ? "s" : "",
4049
4078
  " remaining"
4050
4079
  ] })
4051
4080
  ] }),
4052
- s.appropriatenessQuestions.map((P, E) => /* @__PURE__ */ i(
4081
+ s.appropriatenessQuestions.map((P, R) => /* @__PURE__ */ i(
4053
4082
  "div",
4054
4083
  {
4055
4084
  className: "p-4 border border-gray-200 dark:border-gray-700 rounded-lg",
@@ -4057,17 +4086,17 @@ Failed to reload test data. Please refresh the page.`);
4057
4086
  /* @__PURE__ */ i("div", { className: "mb-4", children: [
4058
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: [
4059
4088
  "Question ",
4060
- E + 1
4089
+ R + 1
4061
4090
  ] }),
4062
4091
  P.groupName && /* @__PURE__ */ a("span", { className: "ml-2 text-xs text-gray-500 dark:text-gray-400", children: P.groupName }),
4063
4092
  /* @__PURE__ */ a("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white mt-2", children: P.question })
4064
4093
  ] }),
4065
- /* @__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(
4066
4095
  "label",
4067
4096
  {
4068
4097
  className: `
4069
4098
  flex items-center p-3 border-2 rounded-lg cursor-pointer transition-all
4070
- ${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"}
4071
4100
  `,
4072
4101
  children: [
4073
4102
  /* @__PURE__ */ a(
@@ -4075,17 +4104,17 @@ Failed to reload test data. Please refresh the page.`);
4075
4104
  {
4076
4105
  type: "radio",
4077
4106
  name: `question-${P.id}`,
4078
- value: Z,
4079
- checked: y[P.id] === Z,
4107
+ value: G,
4108
+ checked: y[P.id] === G,
4080
4109
  onChange: (le) => A(P.id, le.target.value),
4081
4110
  className: "h-4 w-4 text-primary-500 border-gray-300 focus:ring-primary-500",
4082
- disabled: d
4111
+ disabled: u
4083
4112
  }
4084
4113
  ),
4085
- /* @__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 })
4086
4115
  ]
4087
4116
  },
4088
- j
4117
+ K
4089
4118
  )) })
4090
4119
  ]
4091
4120
  },
@@ -4103,20 +4132,20 @@ Failed to reload test data. Please refresh the page.`);
4103
4132
  ] }),
4104
4133
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
4105
4134
  /* @__PURE__ */ a(
4106
- q,
4135
+ U,
4107
4136
  {
4108
4137
  type: "button",
4109
4138
  variant: "outline",
4110
4139
  onClick: r,
4111
- disabled: d,
4140
+ disabled: u,
4112
4141
  children: "Cancel"
4113
4142
  }
4114
4143
  ),
4115
4144
  /* @__PURE__ */ a(
4116
- q,
4145
+ U,
4117
4146
  {
4118
4147
  type: "submit",
4119
- isLoading: d,
4148
+ isLoading: u,
4120
4149
  disabled: Object.keys(y).length < s.totalQuestionCount,
4121
4150
  children: F ? "Submitting..." : "Submit Test"
4122
4151
  }
@@ -4132,19 +4161,19 @@ Failed to reload test data. Please refresh the page.`);
4132
4161
  /* @__PURE__ */ i("div", { className: "space-y-4 mb-6", children: [
4133
4162
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
4134
4163
  /* @__PURE__ */ a("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Total Questions:" }),
4135
- /* @__PURE__ */ a(Ne, { variant: "info", children: s.totalQuestionCount })
4164
+ /* @__PURE__ */ a(Se, { variant: "info", children: s.totalQuestionCount })
4136
4165
  ] }),
4137
4166
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
4138
4167
  /* @__PURE__ */ a("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Time Limit:" }),
4139
- /* @__PURE__ */ a(Ne, { variant: "info", children: M(s.testDurationSec) })
4168
+ /* @__PURE__ */ a(Se, { variant: "info", children: T(s.testDurationSec) })
4140
4169
  ] }),
4141
4170
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
4142
4171
  /* @__PURE__ */ a("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Correct Answers Required:" }),
4143
- /* @__PURE__ */ a(Ne, { variant: "info", children: s.testCorrectAnswerPassLimit })
4172
+ /* @__PURE__ */ a(Se, { variant: "info", children: s.testCorrectAnswerPassLimit })
4144
4173
  ] }),
4145
4174
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between p-4 bg-blue-50 dark:bg-blue-900/20 rounded-lg", children: [
4146
4175
  /* @__PURE__ */ a("span", { className: "text-gray-700 dark:text-gray-300 font-medium", children: "Attempts Remaining:" }),
4147
- /* @__PURE__ */ a(Ne, { variant: H > 1 ? "success" : "warning", children: H })
4176
+ /* @__PURE__ */ a(Se, { variant: W > 1 ? "success" : "warning", children: W })
4148
4177
  ] })
4149
4178
  ] }),
4150
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: [
@@ -4152,28 +4181,28 @@ Failed to reload test data. Please refresh the page.`);
4152
4181
  " ",
4153
4182
  w
4154
4183
  ] }) }),
4155
- 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." }) })
4156
4185
  ] }),
4157
4186
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
4158
- 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" }),
4159
4188
  /* @__PURE__ */ a(
4160
- q,
4189
+ U,
4161
4190
  {
4162
4191
  type: "button",
4163
4192
  onClick: f,
4164
- disabled: H <= 0,
4193
+ disabled: W <= 0,
4165
4194
  children: "Start Test"
4166
4195
  }
4167
4196
  )
4168
4197
  ] })
4169
4198
  ] });
4170
- }, Dr = ({
4199
+ }, Tr = ({
4171
4200
  applicantId: e,
4172
4201
  onComplete: t,
4173
4202
  onBack: r
4174
4203
  }) => {
4175
- var Z, j, le, re;
4176
- 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({
4177
4206
  defaultValues: {
4178
4207
  street: "",
4179
4208
  streetNumber: "",
@@ -4184,32 +4213,32 @@ Failed to reload test data. Please refresh the page.`);
4184
4213
  phonenumber: ""
4185
4214
  }
4186
4215
  });
4187
- ee(() => {
4216
+ X(() => {
4188
4217
  (async () => {
4189
4218
  try {
4190
- const [L, ae] = await Promise.all([
4219
+ const [L, ee] = await Promise.all([
4191
4220
  n.getApplicantData(e),
4192
4221
  s.getCountries("", "en")
4193
4222
  ]);
4194
4223
  b(L);
4195
- const J = /* @__PURE__ */ new Set(), ce = ae.filter((ve) => {
4196
- const u = ve.abbreviation3 || ve.abbreviation;
4197
- 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);
4198
4227
  });
4199
- F(ce);
4200
- const z = L.applicantRequestData;
4201
- if (H.reset({
4202
- street: (z == null ? void 0 : z.street) || "",
4203
- streetNumber: (z == null ? void 0 : z.streetNumber) || "",
4204
- city: (z == null ? void 0 : z.city) || "",
4205
- zip: (z == null ? void 0 : z.zip) || "",
4206
- country: (z == null ? void 0 : z.country) || "",
4207
- nationality: (z == null ? void 0 : z.nationality) || "",
4208
- phonenumber: (z == null ? void 0 : z.phonenumber) || ""
4209
- }), L.kycRecords && L.kycRecords.length > 0 && L.kycRecords[0].providerTokenObject !== null && !V.current) {
4210
- 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;
4211
4240
  try {
4212
- await N(), Y(!0);
4241
+ await N(), H(!0);
4213
4242
  } catch (ve) {
4214
4243
  console.error("[Identity] Auto-request failed:", ve);
4215
4244
  }
@@ -4220,20 +4249,20 @@ Failed to reload test data. Please refresh the page.`);
4220
4249
  v(!1);
4221
4250
  }
4222
4251
  })();
4223
- }, [e]), ee(() => {
4224
- o && !K && (console.log("[Identity] Identity data already loaded, showing provider"), Y(!0));
4225
- }, [o, K]), ee(() => {
4226
- if (d) {
4227
- if (d.expiresAt) {
4228
- 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();
4229
4258
  if (Date.now() >= O) {
4230
4259
  console.warn("[Identity] Token has expired (expiresAt)"), D(!0), f("Your verification session has expired. Please restart.");
4231
4260
  return;
4232
4261
  }
4233
4262
  }
4234
- if (d.url)
4263
+ if (u.url)
4235
4264
  try {
4236
- const L = new URL(d.url).toString().toLowerCase();
4265
+ const L = new URL(u.url).toString().toLowerCase();
4237
4266
  if (L.includes("expired") || L.includes("invalid") || L.includes("error")) {
4238
4267
  console.warn("[Identity] Token URL indicates expiration"), D(!0), f("Your verification link has expired. Please restart.");
4239
4268
  return;
@@ -4241,49 +4270,49 @@ Failed to reload test data. Please refresh the page.`);
4241
4270
  } catch {
4242
4271
  console.error("[Identity] Invalid token URL");
4243
4272
  }
4244
- if (d.status === "expired" || d.error === "expired" || d.expired === !0) {
4273
+ if (u.status === "expired" || u.error === "expired" || u.expired === !0) {
4245
4274
  console.warn("[Identity] Token object indicates expiration"), D(!0), f("Your verification session has expired. Please restart.");
4246
4275
  return;
4247
4276
  }
4248
4277
  }
4249
- }, [d]), ee(() => {
4250
- if (c !== null && d && !h && K && !A) {
4278
+ }, [u]), X(() => {
4279
+ if (c !== null && u && !h && q && !A) {
4251
4280
  const O = c;
4252
- if (d.url) {
4253
- 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);
4254
4283
  try {
4255
- if (new URL(d.url), O === fe.SardinAI) {
4284
+ if (new URL(u.url), O === ye.SardinAI) {
4256
4285
  console.log("[SardinAI] Initializing Risk SDK in background...");
4257
4286
  try {
4258
- const L = De.parseProviderConfig(c, d, l);
4287
+ const L = De.parseProviderConfig(c, u, l);
4259
4288
  De.createProvider(c, L).initialize().then(() => {
4260
4289
  console.log("[SardinAI] Risk SDK initialized successfully in background");
4261
- }).catch((J) => {
4262
- console.warn("[SardinAI] Risk SDK initialization failed (non-blocking):", J);
4290
+ }).catch((Z) => {
4291
+ console.warn("[SardinAI] Risk SDK initialization failed (non-blocking):", Z);
4263
4292
  });
4264
4293
  } catch (L) {
4265
4294
  console.warn("[SardinAI] Risk SDK setup failed (non-blocking):", L);
4266
4295
  }
4267
4296
  }
4268
- g({ type: "url", url: d.url });
4297
+ g({ type: "url", url: u.url });
4269
4298
  } catch (L) {
4270
4299
  console.error("[Identity] Invalid URL:", L), f("Invalid verification URL. Please restart."), D(!0);
4271
4300
  }
4272
4301
  return;
4273
4302
  }
4274
- if (O === fe.SardinAI) {
4303
+ if (O === ye.SardinAI) {
4275
4304
  console.log("[SardinAI] No URL provided - initializing Risk SDK only..."), f(null);
4276
4305
  try {
4277
- const L = De.parseProviderConfig(c, d, l), ae = De.createProvider(c, L);
4278
- ae.initialize().then(() => {
4279
- 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(() => {
4280
4309
  t == null || t();
4281
4310
  }, 2e3);
4282
- }).catch((J) => {
4283
- var z;
4284
- console.error("[SardinAI] Failed to initialize:", J);
4285
- const ce = ((z = J.message) == null ? void 0 : z.toLowerCase()) || "";
4286
- 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}`);
4287
4316
  });
4288
4317
  } catch (L) {
4289
4318
  console.error("[SardinAI] Error creating provider:", L), f(`Configuration error: ${L.message}`);
@@ -4292,15 +4321,15 @@ Failed to reload test data. Please refresh the page.`);
4292
4321
  }
4293
4322
  try {
4294
4323
  f(null);
4295
- const L = De.parseProviderConfig(c, d, l), ae = De.createProvider(c, L);
4296
- O === fe.Sumsub ? (ae.initialize("identity-container").catch((J) => {
4297
- var ce;
4298
- console.error("[Sumsub] Initialization error:", J), f(`Failed to initialize: ${J.message}`), (ce = J.message) != null && ce.toLowerCase().includes("expired") && D(!0);
4299
- }), 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(() => {
4300
4329
  t == null || t();
4301
- })) : O === fe.Onfido && ae.initialize("identity-container").catch((J) => {
4302
- console.error("[Onfido] Initialization error:", J), f(`Failed to initialize: ${J.message}`);
4303
- }), 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);
4304
4333
  } catch (L) {
4305
4334
  console.error("[Identity] Provider setup error:", L), f(`Setup error: ${L.message}`);
4306
4335
  }
@@ -4313,23 +4342,23 @@ Failed to reload test data. Please refresh the page.`);
4313
4342
  console.error("[Identity] Error destroying provider:", O);
4314
4343
  }
4315
4344
  };
4316
- }, [c, d, h, K, t, A]);
4345
+ }, [c, u, h, q, t, A]);
4317
4346
  const P = async () => {
4318
4347
  try {
4319
- f(null), D(!1), await N(), Y(!0);
4348
+ f(null), D(!1), await N(), H(!0);
4320
4349
  } catch (O) {
4321
4350
  console.error("Error starting identity verification:", O);
4322
4351
  }
4323
- }, E = async () => {
4352
+ }, R = async () => {
4324
4353
  try {
4325
- 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);
4326
4355
  } catch (O) {
4327
4356
  console.error("Error restarting identity verification:", O), f(O.message || "Failed to restart verification");
4328
4357
  }
4329
4358
  };
4330
- if (C || m)
4359
+ if (S || p)
4331
4360
  return /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
4332
- /* @__PURE__ */ a(be, { className: "my-8" }),
4361
+ /* @__PURE__ */ a(xe, { className: "my-8" }),
4333
4362
  /* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading identity verification..." })
4334
4363
  ] }) });
4335
4364
  if (w)
@@ -4337,7 +4366,7 @@ Failed to reload test data. Please refresh the page.`);
4337
4366
  "Error: ",
4338
4367
  w.message
4339
4368
  ] }) }) });
4340
- if (K && (M || A))
4369
+ if (q && (T || A))
4341
4370
  return /* @__PURE__ */ i($, { children: [
4342
4371
  /* @__PURE__ */ a(oe, { children: /* @__PURE__ */ a("h2", { className: "text-2xl font-bold text-gray-900 dark:text-white", children: "Verification Session Issue" }) }),
4343
4372
  /* @__PURE__ */ i(B, { children: [
@@ -4362,7 +4391,7 @@ Failed to reload test data. Please refresh the page.`);
4362
4391
  ),
4363
4392
  /* @__PURE__ */ i("div", { children: [
4364
4393
  /* @__PURE__ */ a("h3", { className: "font-semibold text-red-900 dark:text-red-100 mb-1", children: A ? "Session Expired" : "Verification Error" }),
4365
- /* @__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." })
4366
4395
  ] })
4367
4396
  ] }) }),
4368
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: [
@@ -4375,26 +4404,26 @@ Failed to reload test data. Please refresh the page.`);
4375
4404
  ] })
4376
4405
  ] }),
4377
4406
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
4378
- r && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: r, children: "Back" }),
4379
- /* @__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" })
4380
4409
  ] })
4381
4410
  ] });
4382
- if (K && o) {
4411
+ if (q && o) {
4383
4412
  const O = c;
4384
- return d != null && d.url ? /* @__PURE__ */ i($, { children: [
4413
+ return u != null && u.url ? /* @__PURE__ */ i($, { children: [
4385
4414
  /* @__PURE__ */ a(oe, { children: /* @__PURE__ */ i("div", { className: "flex items-center justify-between", children: [
4386
4415
  /* @__PURE__ */ i("div", { children: [
4387
4416
  /* @__PURE__ */ a("h2", { className: "text-2xl font-bold", children: "Identity Verification" }),
4388
4417
  /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
4389
4418
  ] }),
4390
4419
  /* @__PURE__ */ a(
4391
- q,
4420
+ U,
4392
4421
  {
4393
4422
  type: "button",
4394
4423
  variant: "outline",
4395
4424
  size: "sm",
4396
- onClick: E,
4397
- disabled: m,
4425
+ onClick: R,
4426
+ disabled: p,
4398
4427
  children: "Restart"
4399
4428
  }
4400
4429
  )
@@ -4407,17 +4436,17 @@ Failed to reload test data. Please refresh the page.`);
4407
4436
  /* @__PURE__ */ a("div", { className: "w-full", style: { height: "600px" }, children: /* @__PURE__ */ a(
4408
4437
  "iframe",
4409
4438
  {
4410
- src: d.url,
4439
+ src: u.url,
4411
4440
  className: "w-full h-full border-0 rounded-lg",
4412
4441
  allow: "camera; microphone; geolocation",
4413
4442
  title: "Identity Verification",
4414
4443
  onLoad: (L) => {
4415
- var ae, J, ce;
4444
+ var ee, Z, ae;
4416
4445
  console.log("[Identity] Iframe loaded");
4417
4446
  try {
4418
- 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);
4419
4448
  if (Fe) {
4420
- 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()) || "";
4421
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."));
4422
4451
  }
4423
4452
  } catch {
@@ -4427,14 +4456,14 @@ Failed to reload test data. Please refresh the page.`);
4427
4456
  }
4428
4457
  ) })
4429
4458
  ] }),
4430
- r && /* @__PURE__ */ a(me, { children: /* @__PURE__ */ a(q, { variant: "outline", onClick: r, children: "Back" }) })
4431
- ] }) : 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: [
4432
4461
  /* @__PURE__ */ i(oe, { children: [
4433
4462
  /* @__PURE__ */ a("h2", { className: "text-2xl font-bold", children: "Device Risk Assessment" }),
4434
4463
  /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Analyzing device security and behavioral patterns..." })
4435
4464
  ] }),
4436
4465
  /* @__PURE__ */ a(B, { children: /* @__PURE__ */ i("div", { className: "text-center py-12", children: [
4437
- /* @__PURE__ */ a(be, { className: "mb-4" }),
4466
+ /* @__PURE__ */ a(xe, { className: "mb-4" }),
4438
4467
  /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400", children: "Please wait while we verify your device security" }),
4439
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" })
4440
4469
  ] }) })
@@ -4444,10 +4473,10 @@ Failed to reload test data. Please refresh the page.`);
4444
4473
  /* @__PURE__ */ a("p", { className: "text-gray-600 dark:text-gray-400 mt-1", children: "Please complete the identity verification process" })
4445
4474
  ] }),
4446
4475
  /* @__PURE__ */ a(B, { children: /* @__PURE__ */ a("div", { id: "identity-container", className: "min-h-[400px]" }) }),
4447
- 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" }) })
4448
4477
  ] });
4449
4478
  }
4450
- 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: [
4451
4480
  /* @__PURE__ */ i(oe, { children: [
4452
4481
  /* @__PURE__ */ a("h2", { className: "text-lg font-bold", children: "Review Your Information" }),
4453
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" })
@@ -4457,9 +4486,9 @@ Failed to reload test data. Please refresh the page.`);
4457
4486
  /* @__PURE__ */ i("div", { children: [
4458
4487
  /* @__PURE__ */ a("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Name" }),
4459
4488
  /* @__PURE__ */ i("p", { className: "mt-1 text-base", children: [
4460
- (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,
4461
4490
  " ",
4462
- (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
4463
4492
  ] })
4464
4493
  ] }),
4465
4494
  /* @__PURE__ */ i("div", { children: [
@@ -4468,7 +4497,7 @@ Failed to reload test data. Please refresh the page.`);
4468
4497
  ] }),
4469
4498
  /* @__PURE__ */ i("div", { children: [
4470
4499
  /* @__PURE__ */ a("label", { className: "block text-sm font-medium text-gray-500 dark:text-gray-400", children: "Date of Birth" }),
4471
- /* @__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" })
4472
4501
  ] })
4473
4502
  ] }),
4474
4503
  /* @__PURE__ */ i("div", { className: "space-y-4", children: [
@@ -4477,7 +4506,7 @@ Failed to reload test data. Please refresh the page.`);
4477
4506
  /* @__PURE__ */ a(
4478
4507
  Ie,
4479
4508
  {
4480
- control: H.control,
4509
+ control: W.control,
4481
4510
  name: "country",
4482
4511
  render: ({ field: O }) => /* @__PURE__ */ a(
4483
4512
  Ae,
@@ -4486,7 +4515,7 @@ Failed to reload test data. Please refresh the page.`);
4486
4515
  label: "Country",
4487
4516
  options: [
4488
4517
  { value: "", label: "Select country..." },
4489
- ...p.map((L) => ({
4518
+ ...m.map((L) => ({
4490
4519
  value: L.abbreviation3 || L.abbreviation,
4491
4520
  label: L.name
4492
4521
  }))
@@ -4498,7 +4527,7 @@ Failed to reload test data. Please refresh the page.`);
4498
4527
  /* @__PURE__ */ a(
4499
4528
  Ie,
4500
4529
  {
4501
- control: H.control,
4530
+ control: W.control,
4502
4531
  name: "nationality",
4503
4532
  render: ({ field: O }) => /* @__PURE__ */ a(
4504
4533
  Ae,
@@ -4507,7 +4536,7 @@ Failed to reload test data. Please refresh the page.`);
4507
4536
  label: "Nationality",
4508
4537
  options: [
4509
4538
  { value: "", label: "Select nationality..." },
4510
- ...p.map((L) => ({
4539
+ ...m.map((L) => ({
4511
4540
  value: L.abbreviation3 || L.abbreviation,
4512
4541
  label: L.name
4513
4542
  }))
@@ -4521,7 +4550,7 @@ Failed to reload test data. Please refresh the page.`);
4521
4550
  /* @__PURE__ */ a(
4522
4551
  Ie,
4523
4552
  {
4524
- control: H.control,
4553
+ control: W.control,
4525
4554
  name: "street",
4526
4555
  render: ({ field: O }) => /* @__PURE__ */ a(ue, { ...O, label: "Street" })
4527
4556
  }
@@ -4529,7 +4558,7 @@ Failed to reload test data. Please refresh the page.`);
4529
4558
  /* @__PURE__ */ a(
4530
4559
  Ie,
4531
4560
  {
4532
- control: H.control,
4561
+ control: W.control,
4533
4562
  name: "streetNumber",
4534
4563
  render: ({ field: O }) => /* @__PURE__ */ a(ue, { ...O, label: "Street Number" })
4535
4564
  }
@@ -4539,7 +4568,7 @@ Failed to reload test data. Please refresh the page.`);
4539
4568
  /* @__PURE__ */ a(
4540
4569
  Ie,
4541
4570
  {
4542
- control: H.control,
4571
+ control: W.control,
4543
4572
  name: "city",
4544
4573
  render: ({ field: O }) => /* @__PURE__ */ a(ue, { ...O, label: "City" })
4545
4574
  }
@@ -4547,7 +4576,7 @@ Failed to reload test data. Please refresh the page.`);
4547
4576
  /* @__PURE__ */ a(
4548
4577
  Ie,
4549
4578
  {
4550
- control: H.control,
4579
+ control: W.control,
4551
4580
  name: "zip",
4552
4581
  render: ({ field: O }) => /* @__PURE__ */ a(ue, { ...O, label: "ZIP/Postal Code" })
4553
4582
  }
@@ -4556,7 +4585,7 @@ Failed to reload test data. Please refresh the page.`);
4556
4585
  /* @__PURE__ */ a(
4557
4586
  Ie,
4558
4587
  {
4559
- control: H.control,
4588
+ control: W.control,
4560
4589
  name: "phonenumber",
4561
4590
  render: ({ field: O }) => /* @__PURE__ */ a(ue, { ...O, label: "Phone Number", type: "tel" })
4562
4591
  }
@@ -4564,11 +4593,11 @@ Failed to reload test data. Please refresh the page.`);
4564
4593
  ] })
4565
4594
  ] }),
4566
4595
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
4567
- r && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: r, children: "Back" }),
4568
- /* @__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" })
4569
4598
  ] })
4570
4599
  ] }) });
4571
- }, Ge = ({
4600
+ }, et = ({
4572
4601
  kycStatus: e,
4573
4602
  reviewStatus: t,
4574
4603
  workflowResult: r,
@@ -4618,21 +4647,21 @@ Failed to reload test data. Please refresh the page.`);
4618
4647
  iconBg: "bg-yellow-100 dark:bg-yellow-900/30",
4619
4648
  iconColor: "text-yellow-700 dark:text-yellow-400",
4620
4649
  message: "Your application is currently under manual review."
4621
- } : r === $e.Success ? {
4650
+ } : r === _e.Success ? {
4622
4651
  type: "success",
4623
4652
  title: "Process Complete",
4624
4653
  icon: "✓",
4625
4654
  iconBg: "bg-green-100 dark:bg-green-900/30",
4626
4655
  iconColor: "text-green-600 dark:text-green-400",
4627
4656
  message: "Your verification process has been completed successfully."
4628
- } : r === $e.Failed ? {
4657
+ } : r === _e.Failed ? {
4629
4658
  type: "error",
4630
4659
  title: "Process Failed",
4631
4660
  icon: "✕",
4632
4661
  iconBg: "bg-red-100 dark:bg-red-900/30",
4633
4662
  iconColor: "text-red-600 dark:text-red-400",
4634
4663
  message: "The verification process could not be completed."
4635
- } : r === $e.AdminReview ? {
4664
+ } : r === _e.AdminReview ? {
4636
4665
  type: "pending",
4637
4666
  title: "Admin Review Required",
4638
4667
  icon: "📋",
@@ -4658,7 +4687,7 @@ Failed to reload test data. Please refresh the page.`);
4658
4687
  ) }),
4659
4688
  /* @__PURE__ */ a("h2", { className: "text-3xl font-bold text-center text-gray-900 dark:text-white mb-4", children: c.title }),
4660
4689
  /* @__PURE__ */ a("div", { className: "flex justify-center mb-6", children: /* @__PURE__ */ a(
4661
- Ne,
4690
+ Se,
4662
4691
  {
4663
4692
  variant: c.type === "success" ? "success" : c.type === "error" ? "danger" : c.type === "pending" ? "warning" : "info",
4664
4693
  children: e != null ? Ee[e] : Re[t]
@@ -4702,15 +4731,15 @@ Failed to reload test data. Please refresh the page.`);
4702
4731
  ] }) })
4703
4732
  ] }),
4704
4733
  /* @__PURE__ */ i(me, { className: "flex justify-center gap-4", children: [
4705
- c.type === "success" && s && /* @__PURE__ */ a(q, { onClick: s, size: "lg", children: "Continue" }),
4706
- c.type === "error" && /* @__PURE__ */ i(ot, { children: [
4707
- l && /* @__PURE__ */ a(q, { variant: "outline", onClick: l, children: "Contact Support" }),
4708
- 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" })
4709
4738
  ] }),
4710
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" }) })
4711
4740
  ] })
4712
4741
  ] });
4713
- }, 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(
4714
4743
  "img",
4715
4744
  {
4716
4745
  src: e.url,
@@ -4725,7 +4754,7 @@ Failed to reload test data. Please refresh the page.`);
4725
4754
  console.warn("[Logo] Failed to load logo:", e.url), r.target.style.display = "none";
4726
4755
  }
4727
4756
  }
4728
- ) }), He = ({
4757
+ ) }), Ye = ({
4729
4758
  title: e,
4730
4759
  subtitle: t,
4731
4760
  className: r = ""
@@ -4733,7 +4762,7 @@ Failed to reload test data. Please refresh the page.`);
4733
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;
4734
4763
  return !l && !o ? null : /* @__PURE__ */ i("div", { className: `metakyc-header ${r}`, children: [
4735
4764
  /* @__PURE__ */ i("div", { className: "metakyc-header-title flex items-center text-xl font-bold text-gray-900 dark:text-white", children: [
4736
- l && /* @__PURE__ */ a(Pr, { config: n.logo }),
4765
+ l && /* @__PURE__ */ a(Or, { config: n.logo }),
4737
4766
  l && o && /* @__PURE__ */ a(
4738
4767
  "span",
4739
4768
  {
@@ -4746,11 +4775,11 @@ Failed to reload test data. Please refresh the page.`);
4746
4775
  ] }),
4747
4776
  t && /* @__PURE__ */ a("p", { className: "text-sm text-gray-600 dark:text-gray-400 mt-1", children: t })
4748
4777
  ] });
4749
- }, qe = ["firstName", "lastName", "email", "phonenumber", "dateOfBirth"];
4750
- function Ke(e) {
4778
+ }, He = ["firstName", "lastName", "email", "phonenumber", "dateOfBirth"];
4779
+ function Be(e) {
4751
4780
  return e == null || e === "" || Array.isArray(e) && e.length === 0;
4752
4781
  }
4753
- const Oe = {
4782
+ const ze = {
4754
4783
  width: "16px",
4755
4784
  height: "16px",
4756
4785
  minWidth: "16px",
@@ -4762,27 +4791,27 @@ const Oe = {
4762
4791
  padding: 0,
4763
4792
  display: "inline-block",
4764
4793
  verticalAlign: "middle"
4765
- }, Gr = ({
4794
+ }, ea = ({
4766
4795
  workflowKey: e,
4767
4796
  externalRefId: t,
4768
4797
  onSuccess: r,
4769
4798
  onCancel: n
4770
4799
  }) => {
4771
- var z, Fe, ve;
4772
- const { config: s, baseInformationService: l, currentTheme: o } = he(), { createApplicant: c, isLoading: d } = lr(), m = e || ((z = s.applicantForm) == null ? void 0 : z.workflowKey);
4773
- 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)
4774
4803
  throw new Error(
4775
4804
  "workflowKey is required. Provide it either as a prop to CreateApplicantForm or set it in config.applicantForm.workflowKey"
4776
4805
  );
4777
- const w = t || ((Fe = s.applicantForm) == null ? void 0 : Fe.externalRefId) || "", [N, y] = x([]), [h, g] = x(!0), k = te(!1), b = te(!1);
4778
- 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(() => {
4779
4808
  (async () => {
4780
4809
  if (!(k.current || b.current)) {
4781
4810
  k.current = !0, g(!0);
4782
4811
  try {
4783
- 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();
4784
4813
  y(
4785
- 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))
4786
4815
  ), b.current = !0;
4787
4816
  } catch (I) {
4788
4817
  console.error("Failed to load countries:", I);
@@ -4792,31 +4821,31 @@ const Oe = {
4792
4821
  }
4793
4822
  })();
4794
4823
  }, []);
4795
- const p = Se(
4824
+ const m = ke(
4796
4825
  () => o != null && o.applicantFormPages && o.applicantFormPages.length > 0 ? o.applicantFormPages : null,
4797
4826
  [o == null ? void 0 : o.applicantFormPages]
4798
- ), F = Se(() => {
4799
- const u = new Set(qe), I = o == null ? void 0 : o.applicantFormRequiredFields;
4800
- if (I) for (const T of I) u.add(T);
4801
- if (p)
4802
- for (const T of p)
4803
- for (const S of T.fields)
4804
- !S.isCustom && S.name && S.required && u.add(S.name);
4805
- return Array.from(u);
4806
- }, [o == null ? void 0 : o.applicantFormRequiredFields, p]), C = Se(() => {
4807
- var T;
4808
- if (p) {
4809
- const S = p.flatMap((_) => _.fields).filter((_) => !_.isCustom && _.name).map((_) => _.name), R = new Set(S);
4810
- for (const _ of qe) R.add(_);
4811
- 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);
4812
4841
  }
4813
- let u;
4814
- (T = s.applicantForm) != null && T.visibleFields ? u = s.applicantForm.visibleFields : o != null && o.applicantFormVisibleFields && o.applicantFormVisibleFields.length > 0 ? u = o.applicantFormVisibleFields : u = wt;
4815
- const I = new Set(u);
4816
- 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);
4817
4846
  return Array.from(I);
4818
- }, [(ve = s.applicantForm) == null ? void 0 : ve.visibleFields, o == null ? void 0 : o.applicantFormVisibleFields, p]), [v, K] = x({
4819
- workflowKey: m,
4847
+ }, [(Ge = s.applicantForm) == null ? void 0 : Ge.visibleFields, o == null ? void 0 : o.applicantFormVisibleFields, m]), [v, q] = x({
4848
+ workflowKey: p,
4820
4849
  firstName: "",
4821
4850
  lastName: "",
4822
4851
  title: "",
@@ -4840,211 +4869,228 @@ const Oe = {
4840
4869
  educationLevel: "",
4841
4870
  occupation: "",
4842
4871
  taxNumber: ""
4843
- }), [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(
4844
- (u) => !u.conditionalOn || Y[u.conditionalOn] === "true"
4845
- ) : null, [p, Y]);
4846
- ee(() => {
4847
- re && f >= re.length && re.length > 0 && A(re.length - 1);
4848
- }, [re == null ? void 0 : re.length]);
4849
- const O = (u) => {
4850
- 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;
4851
4884
  const I = {};
4852
- for (const S of u.fields)
4853
- if (S.isCustom) {
4854
- if (S.required && S.paramName) {
4855
- const R = Y[S.paramName], _ = S.displayText || S.label || S.paramName;
4856
- 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.`);
4857
4890
  }
4858
- } else if (S.name) {
4859
- const R = S.name;
4860
- if (F.includes(R) && Ke(v[R])) {
4861
- const _ = S.displayText || ((T = _e[R]) == null ? void 0 : T.label) || R;
4862
- 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.`;
4863
4896
  }
4864
4897
  }
4865
4898
  return I;
4866
- }, L = async (u) => {
4867
- var T;
4868
- const I = re;
4869
- if (I && !u) {
4870
- const S = O(I[f]);
4871
- if (Object.keys(S).length > 0) {
4872
- V(S);
4873
- return;
4874
- }
4875
- 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);
4876
4904
  return;
4877
4905
  }
4878
- if (I) {
4879
- let S = {};
4880
- for (const R of I)
4881
- S = { ...S, ...O(R) };
4882
- if (Object.keys(S).length > 0) {
4883
- 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);
4884
4914
  return;
4885
4915
  }
4886
4916
  }
4887
- Z(!0), P(null);
4917
+ G(!0), P(null);
4888
4918
  try {
4889
4919
  if (!v.externalRefId || v.externalRefId.trim() === "") {
4890
4920
  P("External Reference ID is required. Please pass it via config.applicantForm.externalRefId.");
4891
4921
  return;
4892
4922
  }
4893
- for (const W of F)
4894
- if (Ke(v[W])) {
4895
- const X = ((T = _e[W]) == null ? void 0 : T.label) || W;
4896
- P(`${X} is required.`);
4897
- return;
4898
- }
4899
- const S = {
4923
+ const d = {
4900
4924
  workflowKey: v.workflowKey,
4901
4925
  externalRefId: v.externalRefId.trim()
4902
4926
  };
4903
- C.forEach((W) => {
4904
- if (W === "externalRefId") return;
4905
- const X = v[W];
4906
- Ke(X) || (S[W] = X);
4907
- });
4908
- const R = [];
4909
- if (I) {
4910
- for (const W of I)
4911
- for (const X of W.fields)
4912
- if (X.isCustom && X.paramName) {
4913
- const ge = Y[X.paramName] ?? "";
4914
- R.push({ paramName: X.paramName, paramValue: ge });
4915
- }
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
+ }
4916
4952
  }
4917
- R.length > 0 && (S.applicantAdditionalDatas = R);
4918
- const _ = await c(S);
4919
- r(_.applicantId);
4920
- } catch (S) {
4921
- 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");
4922
4958
  } finally {
4923
- Z(!1);
4959
+ G(!1);
4924
4960
  }
4925
- }, ae = (u, I, T) => {
4926
- var We;
4927
- const S = _e[u];
4928
- if (!S) return null;
4929
- const R = F.includes(u), _ = D[u], W = T || S.label, X = I ?? u, ge = { required: R };
4930
- 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) {
4931
4977
  case "select":
4932
- if (u === "country" || u === "nationality" || u === "taxCountry" || u === "countryOfBirth")
4978
+ if (d === "country" || d === "nationality" || d === "taxCountry" || d === "countryOfBirth")
4933
4979
  return /* @__PURE__ */ a(
4934
4980
  Ae,
4935
4981
  {
4936
- ...ge,
4937
- label: W,
4938
- value: v[u] || "",
4939
- onChange: (ne) => j(u, ne.target.value),
4940
- 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],
4941
4987
  disabled: h
4942
4988
  },
4943
- X
4989
+ ce
4944
4990
  );
4945
- if (u === "salutation")
4991
+ if (d === "salutation")
4946
4992
  return /* @__PURE__ */ a(
4947
4993
  Ae,
4948
4994
  {
4949
- ...ge,
4950
- label: W,
4951
- value: ((We = v[u]) == null ? void 0 : We.toString()) || "",
4952
- 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),
4953
4999
  options: [
4954
5000
  { value: "", label: "Select salutation..." },
4955
- { value: Be.Male.toString(), label: "Male" },
4956
- { value: Be.Female.toString(), label: "Female" },
4957
- { 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" }
4958
5004
  ]
4959
5005
  },
4960
- X
5006
+ ce
4961
5007
  );
4962
- if (u === "defaultLanguage") {
4963
- 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;
4964
5010
  return /* @__PURE__ */ a(
4965
5011
  Ae,
4966
5012
  {
4967
- ...ge,
4968
- label: W,
4969
- value: v[u] || "",
4970
- onChange: (ze) => j(u, ze.target.value),
5013
+ ...re,
5014
+ label: te,
5015
+ value: v[d] || "",
5016
+ onChange: (qe) => K(d, qe.target.value),
4971
5017
  options: [{ value: "", label: "Select language..." }, ...ne]
4972
5018
  },
4973
- X
5019
+ ce
4974
5020
  );
4975
5021
  }
4976
5022
  return null;
4977
5023
  case "multiselect":
4978
- return u === "otherNationality" ? /* @__PURE__ */ a(
4979
- or,
5024
+ return d === "otherNationality" ? /* @__PURE__ */ a(
5025
+ mr,
4980
5026
  {
4981
- ...ge,
4982
- label: W,
4983
- value: v[u] || [],
4984
- onChange: (ne) => j(u, ne),
5027
+ ...re,
5028
+ label: te,
5029
+ value: v[d] || [],
5030
+ onChange: (ne) => K(d, ne),
4985
5031
  options: N,
4986
5032
  placeholder: "Select other nationalities...",
4987
5033
  disabled: h
4988
5034
  },
4989
- X
5035
+ ce
4990
5036
  ) : null;
4991
5037
  case "date":
4992
5038
  return /* @__PURE__ */ a(
4993
5039
  ue,
4994
5040
  {
4995
- ...ge,
5041
+ ...re,
4996
5042
  type: "date",
4997
- label: W,
4998
- value: v[u] || "",
4999
- onChange: (ne) => j(u, ne.target.value),
5000
- error: _
5043
+ label: te,
5044
+ value: v[d] || "",
5045
+ onChange: (ne) => K(d, ne.target.value),
5046
+ error: z
5001
5047
  },
5002
- X
5048
+ ce
5003
5049
  );
5004
5050
  case "email":
5005
5051
  return /* @__PURE__ */ a(
5006
5052
  ue,
5007
5053
  {
5008
- ...ge,
5054
+ ...re,
5009
5055
  type: "email",
5010
- label: W,
5011
- value: v[u] || "",
5012
- onChange: (ne) => j(u, ne.target.value),
5013
- error: _
5056
+ label: te,
5057
+ value: v[d] || "",
5058
+ onChange: (ne) => K(d, ne.target.value),
5059
+ error: z
5014
5060
  },
5015
- X
5061
+ ce
5016
5062
  );
5017
5063
  case "tel":
5018
5064
  return /* @__PURE__ */ a(
5019
5065
  ue,
5020
5066
  {
5021
- ...ge,
5067
+ ...re,
5022
5068
  type: "tel",
5023
- label: W,
5024
- value: v[u] || "",
5025
- onChange: (ne) => j(u, ne.target.value),
5026
- error: _
5069
+ label: te,
5070
+ value: v[d] || "",
5071
+ onChange: (ne) => K(d, ne.target.value),
5072
+ error: z
5027
5073
  },
5028
- X
5074
+ ce
5029
5075
  );
5030
5076
  default:
5031
5077
  return /* @__PURE__ */ a(
5032
5078
  ue,
5033
5079
  {
5034
- ...ge,
5080
+ ...re,
5035
5081
  type: "text",
5036
- label: W,
5037
- value: v[u] || "",
5038
- onChange: (ne) => j(u, ne.target.value),
5039
- error: _
5082
+ label: te,
5083
+ value: v[d] || "",
5084
+ onChange: (ne) => K(d, ne.target.value),
5085
+ error: z
5040
5086
  },
5041
- X
5087
+ ce
5042
5088
  );
5043
5089
  }
5044
- }, J = (u, I) => {
5045
- if (!u.paramName) return null;
5046
- const T = D[u.paramName], S = u.displayText || u.label || u.paramName;
5047
- 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")
5048
5094
  return /* @__PURE__ */ i("div", { className: "flex flex-col gap-1", children: [
5049
5095
  /* @__PURE__ */ i(
5050
5096
  "label",
@@ -5056,10 +5102,10 @@ const Oe = {
5056
5102
  "input",
5057
5103
  {
5058
5104
  type: "checkbox",
5059
- checked: Y[u.paramName] === "true",
5060
- 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"),
5061
5107
  className: "metakyc-option-input",
5062
- style: Oe
5108
+ style: ze
5063
5109
  }
5064
5110
  ),
5065
5111
  /* @__PURE__ */ i(
@@ -5068,17 +5114,17 @@ const Oe = {
5068
5114
  className: "metakyc-option-text",
5069
5115
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5070
5116
  children: [
5071
- S,
5072
- 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: "*" })
5073
5119
  ]
5074
5120
  }
5075
5121
  )
5076
5122
  ]
5077
5123
  }
5078
5124
  ),
5079
- 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 })
5080
5126
  ] }, `custom-${I}`);
5081
- if (u.customType === "link_checkbox")
5127
+ if (d.customType === "link_checkbox")
5082
5128
  return /* @__PURE__ */ i("div", { className: "flex flex-col gap-1", children: [
5083
5129
  /* @__PURE__ */ i(
5084
5130
  "label",
@@ -5090,10 +5136,10 @@ const Oe = {
5090
5136
  "input",
5091
5137
  {
5092
5138
  type: "checkbox",
5093
- checked: Y[u.paramName] === "true",
5094
- 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"),
5095
5141
  className: "metakyc-option-input",
5096
- style: { ...Oe, alignSelf: "flex-start", marginTop: "2px" }
5142
+ style: { ...ze, alignSelf: "flex-start", marginTop: "2px" }
5097
5143
  }
5098
5144
  ),
5099
5145
  /* @__PURE__ */ i(
@@ -5102,31 +5148,31 @@ const Oe = {
5102
5148
  className: "metakyc-option-text",
5103
5149
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5104
5150
  children: [
5105
- S,
5151
+ C,
5106
5152
  " ",
5107
- u.linkUrl && /* @__PURE__ */ a(
5153
+ d.linkUrl && /* @__PURE__ */ a(
5108
5154
  "a",
5109
5155
  {
5110
- href: u.linkUrl,
5156
+ href: d.linkUrl,
5111
5157
  target: "_blank",
5112
5158
  rel: "noopener noreferrer",
5113
5159
  className: "underline",
5114
5160
  style: { color: "var(--metakyc-primary, #2563eb)" },
5115
- onClick: (R) => R.stopPropagation(),
5116
- children: u.linkText || u.linkUrl
5161
+ onClick: (E) => E.stopPropagation(),
5162
+ children: d.linkText || d.linkUrl
5117
5163
  }
5118
5164
  ),
5119
- 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: "*" })
5120
5166
  ]
5121
5167
  }
5122
5168
  )
5123
5169
  ]
5124
5170
  }
5125
5171
  ),
5126
- 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 })
5127
5173
  ] }, `custom-${I}`);
5128
- if (u.customType === "group_checkbox") {
5129
- const R = (Y[u.paramName] || "").split(",").filter(Boolean);
5174
+ if (d.customType === "group_checkbox") {
5175
+ const E = (H[d.paramName] || "").split(",").filter(Boolean);
5130
5176
  return /* @__PURE__ */ i("div", { className: "flex flex-col gap-1.5", children: [
5131
5177
  /* @__PURE__ */ i(
5132
5178
  "div",
@@ -5134,12 +5180,12 @@ const Oe = {
5134
5180
  className: "text-sm font-medium",
5135
5181
  style: { color: "var(--metakyc-text-primary, #111827)" },
5136
5182
  children: [
5137
- S,
5138
- 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: "*" })
5139
5185
  ]
5140
5186
  }
5141
5187
  ),
5142
- /* @__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(
5143
5189
  "label",
5144
5190
  {
5145
5191
  className: "metakyc-option-label",
@@ -5149,13 +5195,13 @@ const Oe = {
5149
5195
  "input",
5150
5196
  {
5151
5197
  type: "checkbox",
5152
- checked: R.includes(_.value),
5153
- onChange: (W) => {
5154
- const X = W.target.checked ? [...R, _.value] : R.filter((ge) => ge !== _.value);
5155
- 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(","));
5156
5202
  },
5157
5203
  className: "metakyc-option-input",
5158
- style: Oe
5204
+ style: ze
5159
5205
  }
5160
5206
  ),
5161
5207
  /* @__PURE__ */ a(
@@ -5163,29 +5209,29 @@ const Oe = {
5163
5209
  {
5164
5210
  className: "metakyc-option-text",
5165
5211
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5166
- children: _.label
5212
+ children: z.label
5167
5213
  }
5168
5214
  )
5169
5215
  ]
5170
5216
  },
5171
- _.value
5217
+ z.value
5172
5218
  )) }),
5173
- 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 })
5174
5220
  ] }, `custom-${I}`);
5175
5221
  }
5176
- 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: [
5177
5223
  /* @__PURE__ */ i(
5178
5224
  "div",
5179
5225
  {
5180
5226
  className: "text-sm font-medium",
5181
5227
  style: { color: "var(--metakyc-text-primary, #111827)" },
5182
5228
  children: [
5183
- S,
5184
- 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: "*" })
5185
5231
  ]
5186
5232
  }
5187
5233
  ),
5188
- /* @__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(
5189
5235
  "label",
5190
5236
  {
5191
5237
  className: "metakyc-option-label",
@@ -5195,11 +5241,11 @@ const Oe = {
5195
5241
  "input",
5196
5242
  {
5197
5243
  type: "radio",
5198
- checked: Y[u.paramName] === R.value,
5199
- onChange: () => le(u.paramName, R.value),
5200
- 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}`,
5201
5247
  className: "metakyc-option-input",
5202
- style: Oe
5248
+ style: ze
5203
5249
  }
5204
5250
  ),
5205
5251
  /* @__PURE__ */ a(
@@ -5207,137 +5253,138 @@ const Oe = {
5207
5253
  {
5208
5254
  className: "metakyc-option-text",
5209
5255
  style: { fontSize: "14px", color: "var(--metakyc-text-primary, #111827)", lineHeight: "1.4" },
5210
- children: R.label
5256
+ children: E.label
5211
5257
  }
5212
5258
  )
5213
5259
  ]
5214
5260
  },
5215
- R.value
5261
+ E.value
5216
5262
  )) }),
5217
- 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 })
5218
5264
  ] }, `custom-${I}`) : /* @__PURE__ */ a(
5219
5265
  ue,
5220
5266
  {
5221
5267
  type: "text",
5222
- label: `${S}${u.required ? " *" : ""}`,
5223
- value: Y[u.paramName] || "",
5224
- onChange: (R) => le(u.paramName, R.target.value),
5225
- required: u.required,
5226
- 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
5227
5273
  },
5228
5274
  `custom-${I}`
5229
5275
  );
5230
- }, ce = (u) => /* @__PURE__ */ a("div", { className: "grid grid-cols-2 gap-4", children: u.fields.map((I, T) => {
5231
- const S = I.colSpan === 1 ? "col-span-1" : "col-span-2", R = I.isCustom ? `custom-${T}-${I.paramName}` : `builtin-${I.name}-${T}`;
5232
- 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);
5233
5279
  }) });
5234
5280
  if (h)
5235
5281
  return /* @__PURE__ */ a("div", { className: "metakyc-sdk", children: /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
5236
- /* @__PURE__ */ a(be, { className: "my-8" }),
5282
+ /* @__PURE__ */ a(xe, { className: "my-8" }),
5237
5283
  /* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading form..." })
5238
5284
  ] }) }) });
5239
- if (re) {
5240
- 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);
5241
5287
  return /* @__PURE__ */ a("div", { className: "metakyc-sdk", children: /* @__PURE__ */ i($, { children: [
5242
- /* @__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" }) }),
5243
5289
  /* @__PURE__ */ i(B, { children: [
5244
- (u.title || u.subtitle || u.description) && /* @__PURE__ */ i("div", { className: "mb-4", children: [
5245
- u.title && /* @__PURE__ */ a(
5290
+ (d.title || d.subtitle || d.description) && /* @__PURE__ */ i("div", { className: "mb-4", children: [
5291
+ d.title && /* @__PURE__ */ a(
5246
5292
  "h3",
5247
5293
  {
5248
5294
  className: "font-semibold text-base",
5249
5295
  style: { color: "var(--metakyc-text-primary, #111827)" },
5250
- children: u.title
5296
+ children: d.title
5251
5297
  }
5252
5298
  ),
5253
- u.subtitle && /* @__PURE__ */ a(
5299
+ d.subtitle && /* @__PURE__ */ a(
5254
5300
  "p",
5255
5301
  {
5256
5302
  className: "text-sm mt-0.5",
5257
5303
  style: { color: "var(--metakyc-text-secondary, #6b7280)" },
5258
- children: u.subtitle
5304
+ children: d.subtitle
5259
5305
  }
5260
5306
  ),
5261
- u.description && u.description !== u.subtitle && /* @__PURE__ */ a(
5307
+ d.description && d.description !== d.subtitle && /* @__PURE__ */ a(
5262
5308
  "p",
5263
5309
  {
5264
5310
  className: "text-xs mt-1",
5265
5311
  style: { color: "var(--metakyc-text-secondary, #6b7280)" },
5266
- children: u.description
5312
+ children: d.description
5267
5313
  }
5268
5314
  )
5269
5315
  ] }),
5270
- (H || R.length > 0) && /* @__PURE__ */ i("div", { className: "mb-4 p-3 bg-red-50 border border-red-200 rounded-lg", children: [
5271
- 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: [
5272
5318
  /* @__PURE__ */ a("strong", { children: "Error:" }),
5273
5319
  " ",
5274
- H
5320
+ W
5275
5321
  ] }),
5276
- 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))
5277
5323
  ] }),
5278
- S > 1 && /* @__PURE__ */ i("div", { className: "flex items-center gap-2 mb-4", children: [
5279
- re.map((_, W) => /* @__PURE__ */ a(
5280
- "div",
5281
- {
5282
- 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"}`,
5283
- style: W === f ? { backgroundColor: "var(--metakyc-primary, #2563eb)" } : W < f ? { backgroundColor: "var(--metakyc-primary-light, #dbeafe)", opacity: 0.7 } : void 0
5284
- },
5285
- W
5286
- )),
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
+ }),
5287
5336
  /* @__PURE__ */ i("span", { className: "text-xs text-gray-400 flex-shrink-0", children: [
5288
- f + 1,
5337
+ z,
5289
5338
  " / ",
5290
- S
5339
+ E
5291
5340
  ] })
5292
5341
  ] }),
5293
- ce(u)
5342
+ Le(d)
5294
5343
  ] }),
5295
5344
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
5296
5345
  /* @__PURE__ */ i("div", { children: [
5297
5346
  !I && /* @__PURE__ */ a(
5298
- q,
5347
+ U,
5299
5348
  {
5300
5349
  type: "button",
5301
5350
  variant: "outline",
5302
5351
  onClick: () => {
5303
- A((_) => _ - 1), V({});
5352
+ A(L), Q({});
5304
5353
  },
5305
- disabled: E || d,
5354
+ disabled: R || u,
5306
5355
  children: "Previous"
5307
5356
  }
5308
5357
  ),
5309
- 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" })
5310
5359
  ] }),
5311
5360
  /* @__PURE__ */ a(
5312
- q,
5361
+ U,
5313
5362
  {
5314
5363
  type: "button",
5315
- isLoading: E || d,
5316
- onClick: () => L(T),
5317
- children: T ? "Submit" : "Next"
5364
+ isLoading: R || u,
5365
+ onClick: M ? ae : Z,
5366
+ children: M ? "Submit" : "Next"
5318
5367
  }
5319
5368
  )
5320
5369
  ] })
5321
5370
  ] }) });
5322
5371
  }
5323
- return /* @__PURE__ */ a("div", { className: "metakyc-sdk", children: /* @__PURE__ */ a("form", { onSubmit: async (u) => {
5324
- u.preventDefault(), await L(!0);
5325
- }, children: /* @__PURE__ */ i($, { children: [
5326
- /* @__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" }) }),
5327
5374
  /* @__PURE__ */ i(B, { children: [
5328
- 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: [
5329
5376
  /* @__PURE__ */ a("strong", { children: "Error:" }),
5330
5377
  " ",
5331
- H
5378
+ W
5332
5379
  ] }) }),
5333
- /* @__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)) })
5334
5381
  ] }),
5335
5382
  /* @__PURE__ */ i(me, { className: "flex justify-between", children: [
5336
- n && /* @__PURE__ */ a(q, { type: "button", variant: "outline", onClick: n, disabled: E || d, children: "Cancel" }),
5337
- /* @__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" })
5338
5385
  ] })
5339
5386
  ] }) }) });
5340
- }, Zr = ({
5387
+ }, ta = ({
5341
5388
  applicantId: e,
5342
5389
  onComplete: t,
5343
5390
  onError: r,
@@ -5348,25 +5395,25 @@ const Oe = {
5348
5395
  progress: l,
5349
5396
  currentStep: o,
5350
5397
  steps: c,
5351
- workflowKey: d,
5352
- nextWorkflowKey: m,
5398
+ workflowKey: u,
5399
+ nextWorkflowKey: p,
5353
5400
  hasWorkflowChanged: w,
5354
5401
  isLoading: N,
5355
5402
  error: y,
5356
5403
  moveBack: h,
5357
5404
  refreshProgress: g
5358
- } = tr(e), [k, b] = ye.useState(!1);
5359
- if (ye.useEffect(() => {
5405
+ } = sr(e), [k, b] = ge.useState(!1);
5406
+ if (ge.useEffect(() => {
5360
5407
  y && r && r(y);
5361
- }, [y, r]), ye.useEffect(() => {
5408
+ }, [y, r]), ge.useEffect(() => {
5362
5409
  l != null && l.workflowResult && t && t(l.workflowResult);
5363
- }, [l == null ? void 0 : l.workflowResult, t]), ye.useEffect(() => {
5410
+ }, [l == null ? void 0 : l.workflowResult, t]), ge.useEffect(() => {
5364
5411
  n === "dark" ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
5365
- }, [n]), ye.useEffect(() => {
5412
+ }, [n]), ge.useEffect(() => {
5366
5413
  w && b(!1);
5367
5414
  }, [w]), N || !l)
5368
5415
  return /* @__PURE__ */ a("div", { className: s, children: /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
5369
- /* @__PURE__ */ a(be, { className: "my-8" }),
5416
+ /* @__PURE__ */ a(xe, { className: "my-8" }),
5370
5417
  /* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-4", children: "Loading workflow..." })
5371
5418
  ] }) }) });
5372
5419
  if (y)
@@ -5383,12 +5430,12 @@ const Oe = {
5383
5430
  /* @__PURE__ */ i("div", { className: "flex items-center justify-between text-sm", children: [
5384
5431
  /* @__PURE__ */ i("div", { className: "text-left", children: [
5385
5432
  /* @__PURE__ */ a("p", { className: "text-gray-500 dark:text-gray-400 mb-1", children: "Previous Workflow" }),
5386
- /* @__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 })
5387
5434
  ] }),
5388
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" }) }),
5389
5436
  /* @__PURE__ */ i("div", { className: "text-right", children: [
5390
5437
  /* @__PURE__ */ a("p", { className: "text-gray-500 dark:text-gray-400 mb-1", children: "New Workflow" }),
5391
- /* @__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 })
5392
5439
  ] })
5393
5440
  ] }),
5394
5441
  l.nextWorkflowName && /* @__PURE__ */ a("p", { className: "text-center text-gray-600 dark:text-gray-400 mt-2 text-xs", children: l.nextWorkflowName })
@@ -5402,9 +5449,9 @@ const Oe = {
5402
5449
  }
5403
5450
  )
5404
5451
  ] }) }) }) });
5405
- if (l.status === xe.Finished || l.status === xe.OnHold)
5452
+ if (l.status === fe.Finished || l.status === fe.OnHold)
5406
5453
  return /* @__PURE__ */ a("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ a(
5407
- Ge,
5454
+ et,
5408
5455
  {
5409
5456
  kycStatus: l.kycStatus,
5410
5457
  reviewStatus: l.reviewStatus,
@@ -5418,54 +5465,54 @@ const Oe = {
5418
5465
  ) });
5419
5466
  if (!o)
5420
5467
  return /* @__PURE__ */ a("div", { className: `metakyc-sdk ${s || ""}`, children: /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { children: [
5421
- /* @__PURE__ */ a(be, { className: "my-8" }),
5422
- /* @__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..." })
5423
5470
  ] }) }) });
5424
- const p = (v) => {
5471
+ const m = (v) => {
5425
5472
  switch (v) {
5426
- case U.Overview:
5473
+ case _.Overview:
5427
5474
  return "Overview";
5428
- case U.Questionaries:
5475
+ case _.Questionaries:
5429
5476
  return "Questionnaire";
5430
- case U.UploadDocument:
5477
+ case _.UploadDocument:
5431
5478
  return "Documents";
5432
- case U.IdentitySdk:
5479
+ case _.IdentitySdk:
5433
5480
  return "Identity";
5434
- case U.RiskScoring:
5481
+ case _.RiskScoring:
5435
5482
  return "Risk Assessment";
5436
- case U.InvestorCategorization:
5483
+ case _.InvestorCategorization:
5437
5484
  return "Investor Categorization";
5438
- case U.AppropriatenessTest:
5485
+ case _.AppropriatenessTest:
5439
5486
  return "Appropriateness Test";
5440
- case U.AdditionalData:
5487
+ case _.AdditionalData:
5441
5488
  return "Additional Data";
5442
- case U.ManualReview:
5489
+ case _.ManualReview:
5443
5490
  return "Review";
5444
5491
  default:
5445
5492
  return "";
5446
5493
  }
5447
5494
  }, F = () => {
5448
- 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;
5449
5496
  return /* @__PURE__ */ i("div", { className: "mb-6", children: [
5450
5497
  /* @__PURE__ */ i("div", { className: "flex items-start justify-between mb-4", children: [
5451
- /* @__PURE__ */ a(He, {}),
5452
- /* @__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: [
5453
5500
  "Step ",
5454
- Y,
5501
+ H,
5455
5502
  " of ",
5456
- M
5503
+ T
5457
5504
  ] })
5458
5505
  ] }),
5459
5506
  /* @__PURE__ */ a("div", { className: "flex items-center", children: v.map((f, A) => {
5460
- const D = A < K, V = f.order === o.order;
5461
- return /* @__PURE__ */ i(ye.Fragment, { children: [
5507
+ const D = A < q, Q = f.order === o.order;
5508
+ return /* @__PURE__ */ i(ge.Fragment, { children: [
5462
5509
  /* @__PURE__ */ i("div", { className: "flex items-center", children: [
5463
5510
  /* @__PURE__ */ a(
5464
5511
  "div",
5465
5512
  {
5466
5513
  className: `
5467
5514
  w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium
5468
- ${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"}
5469
5516
  `,
5470
5517
  children: A + 1
5471
5518
  }
@@ -5473,8 +5520,8 @@ const Oe = {
5473
5520
  /* @__PURE__ */ a(
5474
5521
  "span",
5475
5522
  {
5476
- className: `ml-2 text-sm ${V ? "font-semibold text-gray-900 dark:text-white" : "text-gray-600 dark:text-gray-400"}`,
5477
- 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}`
5478
5525
  }
5479
5526
  )
5480
5527
  ] }),
@@ -5487,7 +5534,7 @@ const Oe = {
5487
5534
  ] }, f.order);
5488
5535
  }) })
5489
5536
  ] });
5490
- }, C = () => {
5537
+ }, S = () => {
5491
5538
  const v = {
5492
5539
  applicantId: e,
5493
5540
  onComplete: async () => {
@@ -5496,24 +5543,24 @@ const Oe = {
5496
5543
  onBack: o.order > 0 ? h : void 0
5497
5544
  };
5498
5545
  switch (o.action) {
5499
- case U.Questionaries:
5500
- return /* @__PURE__ */ a(vr, { ...v });
5501
- case U.UploadDocument:
5502
- return /* @__PURE__ */ a(kr, { ...v });
5503
- case U.Overview:
5504
- return /* @__PURE__ */ a(Nr, { ...v });
5505
- case U.IdentitySdk:
5506
- return /* @__PURE__ */ a(Dr, { ...v });
5507
- case U.RiskScoring:
5546
+ case _.Questionaries:
5547
+ return /* @__PURE__ */ a(Sr, { ...v });
5548
+ case _.UploadDocument:
5549
+ return /* @__PURE__ */ a(Ar, { ...v });
5550
+ case _.Overview:
5508
5551
  return /* @__PURE__ */ a(Ir, { ...v });
5509
- case U.AdditionalData:
5510
- case U.InvestorCategorization:
5511
- return /* @__PURE__ */ a(Rr, { ...v });
5512
- case U.AppropriatenessTest:
5513
- return /* @__PURE__ */ a(Fr, { ...v });
5514
- 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:
5515
5562
  return /* @__PURE__ */ a(
5516
- Ge,
5563
+ et,
5517
5564
  {
5518
5565
  kycStatus: l.kycStatus,
5519
5566
  reviewStatus: l.reviewStatus,
@@ -5523,30 +5570,30 @@ const Oe = {
5523
5570
  );
5524
5571
  default:
5525
5572
  return /* @__PURE__ */ a($, { children: /* @__PURE__ */ i(B, { className: "py-12 text-center", children: [
5526
- /* @__PURE__ */ a("div", { className: "mb-4", children: /* @__PURE__ */ a(be, {}) }),
5573
+ /* @__PURE__ */ a("div", { className: "mb-4", children: /* @__PURE__ */ a(xe, {}) }),
5527
5574
  /* @__PURE__ */ i("p", { className: "text-gray-600 dark:text-gray-400 mb-2", children: [
5528
5575
  "Processing step: ",
5529
5576
  o.title || o.name
5530
5577
  ] }),
5531
5578
  /* @__PURE__ */ i("p", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
5532
5579
  "Action type: ",
5533
- U[o.action]
5580
+ _[o.action]
5534
5581
  ] })
5535
5582
  ] }) });
5536
5583
  }
5537
5584
  };
5538
5585
  return /* @__PURE__ */ i("div", { className: `metakyc-sdk ${s || ""}`, children: [
5539
5586
  F(),
5540
- C()
5587
+ S()
5541
5588
  ] });
5542
5589
  };
5543
- function Jr(e) {
5544
- return ke.object({
5545
- questionResults: ke.any()
5590
+ function ra(e) {
5591
+ return Ne.object({
5592
+ questionResults: Ne.any()
5546
5593
  }).passthrough();
5547
5594
  }
5548
- function Lr(e) {
5549
- let t = ke.array(ke.instanceof(File));
5595
+ function $r(e) {
5596
+ let t = Ne.array(Ne.instanceof(File));
5550
5597
  if (e.isRequired ? t = t.min(
5551
5598
  1,
5552
5599
  `${e.displayName} is required`
@@ -5567,139 +5614,139 @@ function Lr(e) {
5567
5614
  }
5568
5615
  return t;
5569
5616
  }
5570
- function Xr(e) {
5617
+ function aa(e) {
5571
5618
  const t = {};
5572
5619
  return e.uploadDocumentFiles.forEach((r) => {
5573
5620
  const n = `file_${r.id}`;
5574
- t[n] = Lr(r);
5575
- }), ke.object(t);
5621
+ t[n] = $r(r);
5622
+ }), Ne.object(t);
5576
5623
  }
5577
- function ea(e) {
5578
- return ke.any();
5624
+ function na(e) {
5625
+ return Ne.any();
5579
5626
  }
5580
- function Mr(e) {
5581
- return ke.string().min(1, "This question is required");
5627
+ function Br(e) {
5628
+ return Ne.string().min(1, "This question is required");
5582
5629
  }
5583
- function ta(e) {
5630
+ function sa(e) {
5584
5631
  const t = {};
5585
5632
  return e.appropriatenessQuestions.forEach((r) => {
5586
5633
  const n = `question_${r.id}`;
5587
- t[n] = Mr();
5588
- }), ke.object(t);
5634
+ t[n] = Br();
5635
+ }), Ne.object(t);
5589
5636
  }
5590
- const ra = ke.any();
5637
+ const ia = Ne.any();
5591
5638
  export {
5592
- Qe as ALLOWED_LANGUAGES,
5593
- dt as ApplicantProgressOnHoldReason,
5594
- xe as ApplicantProgressStatus,
5595
- Ct as ApplicantService,
5596
- mt as ApplicantStatus,
5597
- ft as AppropriatenessQuestionType,
5598
- Et as AppropriatenessTestService,
5599
- Fr as AppropriatenessTestStep,
5600
- Ne as Badge,
5601
- Pt as BaseInformationService,
5602
- 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,
5603
5650
  $ as Card,
5604
5651
  B as CardContent,
5605
5652
  me as CardFooter,
5606
5653
  oe as CardHeader,
5607
- Gr as CreateApplicantForm,
5608
- bt as CriteriaBuiltInType,
5609
- wt as DEFAULT_VISIBLE_FIELDS,
5610
- yt as DocumentReviewStatus,
5611
- Nt as EndpointBuilder,
5612
- Le as ErrorHandler,
5613
- Ut as EventEmitter,
5614
- _e as FIELD_METADATA,
5615
- gt as FileType,
5616
- cr as FileUpload,
5617
- Be as GenderType,
5618
- He as Header,
5619
- 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,
5620
5667
  De as IdentityProviderManager,
5621
- Dt as IdentityService,
5622
- fe as IdentityVerificationProvider,
5623
- Dr as IdentityVerificationStep,
5668
+ Tt as IdentityService,
5669
+ ye as IdentityVerificationProvider,
5670
+ Tr as IdentityVerificationStep,
5624
5671
  ue as Input,
5625
- Lt as InvestorCategorizationService,
5626
- Rr as InvestorCategorizationStep,
5672
+ $t as InvestorCategorizationService,
5673
+ Lr as InvestorCategorizationStep,
5627
5674
  pe as InvestorCategorizationType,
5628
- vt as InvestorCategoryType,
5629
- pt as KycProcessStatus,
5675
+ St as InvestorCategoryType,
5676
+ ft as KycProcessStatus,
5630
5677
  Ee as KycStatus,
5631
- Ge as KycStatusDisplay,
5632
- Zr as KycWorkflow,
5633
- Pr as Logo,
5634
- Je as MetaKYCContext,
5678
+ et as KycStatusDisplay,
5679
+ ta as KycWorkflow,
5680
+ Or as Logo,
5681
+ rt as MetaKYCContext,
5635
5682
  we as MetaKYCError,
5636
- Kr as MetaKYCProvider,
5637
- or as MultiSelect,
5638
- Wt as OnfidoProvider,
5639
- Rt as OverviewService,
5640
- Nr as OverviewStep,
5641
- dr as PhoneInput,
5642
- At as QuestionnaireService,
5643
- 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,
5644
5691
  Re as ReviewStatus,
5645
- xt as RiskCriteriaType,
5646
- ut as RiskLevel,
5647
- Ft as RiskScoringService,
5648
- Ir as RiskScoringStep,
5649
- Yt as SardinAIProvider,
5692
+ kt as RiskCriteriaType,
5693
+ gt as RiskLevel,
5694
+ Mt as RiskScoringService,
5695
+ Dr as RiskScoringStep,
5696
+ Zt as SardinAIProvider,
5650
5697
  Ae as Select,
5651
- be as Spinner,
5652
- Kt as StepRouter,
5653
- Ht as SumsubProvider,
5654
- Qt as ThemeManager,
5698
+ xe as Spinner,
5699
+ Yt as StepRouter,
5700
+ Vt as SumsubProvider,
5701
+ Jt as ThemeManager,
5655
5702
  se as ThemePreset,
5656
- _t as ThemeService,
5657
- It as UploadDocumentService,
5658
- kr as UploadDocumentStep,
5659
- ht as UserType,
5703
+ jt as ThemeService,
5704
+ Dt as UploadDocumentService,
5705
+ Ar as UploadDocumentStep,
5706
+ xt as UserType,
5660
5707
  Ce as ValueDataType,
5661
- jt as WorkflowOrchestrator,
5662
- $e as WorkflowResultType,
5663
- qt as WorkflowState,
5664
- U as WorkflowStepAction,
5665
- ra as appropriatenessTestSchema,
5666
- Qr as clearAllStorage,
5667
- Jt as clearApplicantId,
5668
- 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,
5669
5716
  ie as cn,
5670
- Mt as corporateTheme,
5671
- kt as defaultConfig,
5717
+ Bt as corporateTheme,
5718
+ At as defaultConfig,
5672
5719
  de as defaultTheme,
5673
- Vt as fileToBase64,
5674
- Tt as fintechTheme,
5675
- Ue as formatFileSize,
5676
- ta as generateAppropriatenessSchema,
5677
- Jr as generateQuestionnaireSchema,
5678
- ea as generateRiskScoringSchema,
5679
- Xr as generateUploadDocumentSchema,
5680
- Wr as getAcceptString,
5681
- Zt as getApplicantId,
5682
- Me as getThemePreset,
5683
- Yr as getWorkflowState,
5684
- Ot as healthcareTheme,
5685
- Ur as isScriptLoaded,
5686
- Ze as loadScript,
5687
- Bt as minimalTheme,
5688
- $t as modernTheme,
5689
- qr as removeScript,
5690
- Gt as saveApplicantId,
5691
- Xt as saveWorkflowState,
5692
- zt as themePresets,
5693
- lr as useApplicant,
5694
- Vr as useAppropriatenessTest,
5695
- sr as useIdentityVerification,
5696
- 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,
5697
5744
  he as useMetaKYC,
5698
- nr as useOverview,
5699
- rr as useQuestionnaire,
5700
- ir as useRiskScoring,
5701
- ar as useUploadDocument,
5702
- jr as validateFileSize,
5703
- 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
5704
5751
  };
5705
5752
  //# sourceMappingURL=index.js.map