@incodetech/core 0.0.0-dev-20261116-3ec7b7bd → 0.0.0-dev-20261117-96ea37ad

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.
Files changed (86) hide show
  1. package/dist/{FaceDetectionProvider-DtWTzhdl.esm.js → FaceDetectionProvider-CNu-TWXu.esm.js} +4 -4
  2. package/dist/ae-signature.esm.js +1 -1
  3. package/dist/{apiError-CPNXKYOV.esm.js → apiError-CDvhOvoO.esm.js} +1 -1
  4. package/dist/authentication.esm.js +2 -2
  5. package/dist/{authenticationManager-CZp8XZJY.esm.js → authenticationManager-CAZNsfpV.esm.js} +3 -3
  6. package/dist/{authenticationStateMachine-BFfOIsAw.esm.js → authenticationStateMachine-BmtndZRs.esm.js} +2 -2
  7. package/dist/calendarDate-DcqGuEht.esm.js +35 -0
  8. package/dist/consent.d.ts +1 -1
  9. package/dist/{consentManager-B0YKqYtZ.d.ts → consentManager-CMed_O5F.d.ts} +8 -8
  10. package/dist/curp-validation.esm.js +2 -2
  11. package/dist/{curpValidationManager-CbvBDoE1.esm.js → curpValidationManager-BuA6p_T7.esm.js} +1 -1
  12. package/dist/{curpValidationStateMachine-BQ8XK2Y3.esm.js → curpValidationStateMachine-CgUNfRaR.esm.js} +8 -3
  13. package/dist/custom-fields.esm.js +1 -1
  14. package/dist/{customFieldsManager-BRqSCR9R.esm.js → customFieldsManager-BQePQpNk.esm.js} +8 -10
  15. package/dist/{deepsightLoader-CAx598dT.esm.js → deepsightLoader-Dl7B0eeQ.esm.js} +3 -3
  16. package/dist/document-capture.d.ts +1 -1
  17. package/dist/{documentCaptureManager-BZBmcOKI.d.ts → documentCaptureManager-Cs6iJJ_T.d.ts} +5 -5
  18. package/dist/dynamic-forms.esm.js +2 -2
  19. package/dist/{dynamicFormsManager-DCvgD3NM.esm.js → dynamicFormsManager-CyhuPTRV.esm.js} +1 -1
  20. package/dist/{dynamicFormsStateMachine-DfgwjRqH.esm.js → dynamicFormsStateMachine-DJPuqmr0.esm.js} +7 -4
  21. package/dist/ekyb.esm.js +2 -2
  22. package/dist/{ekybManager-Bko0uSve.esm.js → ekybManager-C-5mzXHJ.esm.js} +1 -1
  23. package/dist/{ekybStateMachine-Dh2QeiVL.esm.js → ekybStateMachine-Cseu2q0j.esm.js} +1 -1
  24. package/dist/ekyc-prefill.d.ts +1 -1
  25. package/dist/ekyc-prefill.esm.js +2 -2
  26. package/dist/ekyc.esm.js +2 -2
  27. package/dist/{ekycManager-nRT0rxei.esm.js → ekycManager-CmgzNQmQ.esm.js} +1 -1
  28. package/dist/{ekycPrefillManager-GEPxl5VU.esm.js → ekycPrefillManager-CEevGgnk.esm.js} +1 -1
  29. package/dist/{ekycPrefillManager-BcLhkpp8.d.ts → ekycPrefillManager-CUFTaI8e.d.ts} +30 -30
  30. package/dist/{ekycPrefillStateMachine-uvDimQw2.esm.js → ekycPrefillStateMachine-CyQMJoRH.esm.js} +2 -2
  31. package/dist/{ekycRules-DXP2hqVw.esm.js → ekycRules-1hyjJ6bw.esm.js} +7 -4
  32. package/dist/{ekycStateMachine-nwJRel2s.esm.js → ekycStateMachine-C72Oe1_T.esm.js} +1 -1
  33. package/dist/electronic-signature.esm.js +1 -1
  34. package/dist/{electronicSignatureManager-CrNhyWu4.esm.js → electronicSignatureManager-CEOLPWJ5.esm.js} +1 -1
  35. package/dist/extensibility.d.ts +7 -7
  36. package/dist/extensibility.esm.js +17 -17
  37. package/dist/{faceCaptureManagerFactory-BYnWj3Dl.esm.js → faceCaptureManagerFactory-VcuvTFZr.esm.js} +1 -1
  38. package/dist/{faceCaptureSetup-DODac3ax.esm.js → faceCaptureSetup-BLWPqVmN.esm.js} +3 -3
  39. package/dist/{feature-management-DgXnJeIf.esm.js → feature-management-C_Mrreiv.esm.js} +1 -1
  40. package/dist/feature-management.esm.js +1 -1
  41. package/dist/flow.esm.js +3 -3
  42. package/dist/{flowCompletionService-B9ustmZu.esm.js → flowCompletionService-BoHW9tIo.esm.js} +1 -1
  43. package/dist/{flowServices-CRld4kkf.esm.js → flowServices-C4ilAPYa.esm.js} +4 -4
  44. package/dist/geolocation.d.ts +1 -1
  45. package/dist/geolocation.esm.js +2 -2
  46. package/dist/{geolocationManager-CHm7AVPP.esm.js → geolocationManager-Bu0QAfIz.esm.js} +1 -1
  47. package/dist/{geolocationManager-CENrvxpK.d.ts → geolocationManager-Del2ddmt.d.ts} +1 -1
  48. package/dist/{geolocationStateMachine-CWXQPhdZ.esm.js → geolocationStateMachine-Bt5oEFcO.esm.js} +1 -1
  49. package/dist/id-ocr.d.ts +1 -1
  50. package/dist/id-ocr.esm.js +2 -2
  51. package/dist/id-selfie-flow.esm.js +6 -6
  52. package/dist/id.esm.js +3 -3
  53. package/dist/{idCaptureManager-UKvCqd__.esm.js → idCaptureManager-avinoVFq.esm.js} +3 -3
  54. package/dist/{idCaptureServices-BRjUnwN9.esm.js → idCaptureServices-C3qNxso4.esm.js} +2 -2
  55. package/dist/{idCaptureStateMachine-CkadfO_u.esm.js → idCaptureStateMachine-BayI6iu8.esm.js} +8 -8
  56. package/dist/{idOcrManager-im7VfJQi.esm.js → idOcrManager-TyU_UwSz.esm.js} +1 -1
  57. package/dist/{idOcrManager-DflRx-_u.d.ts → idOcrManager-voLpv_jJ.d.ts} +1 -1
  58. package/dist/{idOcrStateMachine-B832arAl.esm.js → idOcrStateMachine-Bjk_SV6h.esm.js} +7 -0
  59. package/dist/identity-reuse.d.ts +1 -1
  60. package/dist/{identityReuseManager-CZ-qJ_Aa.d.ts → identityReuseManager-D_jiHp1n.d.ts} +4 -4
  61. package/dist/index.esm.js +1 -1
  62. package/dist/kyb-checks.esm.js +2 -2
  63. package/dist/{kybChecksManager-MUhCAPqf.esm.js → kybChecksManager-D8HIczp0.esm.js} +1 -1
  64. package/dist/{kybChecksStateMachine-DBy9ZQ0w.esm.js → kybChecksStateMachine-Ba2H0VqB.esm.js} +1 -1
  65. package/dist/mandatory-consent.d.ts +1 -1
  66. package/dist/{mandatoryConsentManager-DszYRM5U.d.ts → mandatoryConsentManager-DanZLRn3.d.ts} +8 -8
  67. package/dist/qe-signature.esm.js +1 -1
  68. package/dist/{runChildModule-BJIZb9Ud.esm.js → runChildModule-2wK4TTxA.esm.js} +1 -1
  69. package/dist/{sdkVersion-D7JHf95f.esm.js → sdkVersion-CumgW6tC.esm.js} +1 -1
  70. package/dist/selfie.esm.js +6 -6
  71. package/dist/{selfieErrorUtils-DHkfkwwr.esm.js → selfieErrorUtils-CjFjJVXW.esm.js} +1 -1
  72. package/dist/{selfieManager-CS_MXb7-.esm.js → selfieManager-CQY8VkVe.esm.js} +3 -3
  73. package/dist/{selfieStateMachine-DCsYEHCR.esm.js → selfieStateMachine-BrJD5L-G.esm.js} +3 -3
  74. package/dist/{session-DIJHnuWM.esm.js → session-D3uKAAaT.esm.js} +3 -3
  75. package/dist/session.esm.js +4 -4
  76. package/dist/{sessionInitializer-AORXxhvP.esm.js → sessionInitializer-eFUOtIdq.esm.js} +3 -3
  77. package/dist/{setup-BsUYZ5BQ.esm.js → setup-CNR39VJP.esm.js} +4 -4
  78. package/dist/{trueSightService-CoUZOwrU.esm.js → trueSightService-DrGbuaNH.esm.js} +1 -1
  79. package/dist/video-selfie.esm.js +3 -3
  80. package/dist/{videoSelfieCameraWarmer-Cnq1RW9_.esm.js → videoSelfieCameraWarmer-CfQFzYSZ.esm.js} +3 -3
  81. package/dist/wasm.esm.js +1 -1
  82. package/dist/watchlist-for-business.esm.js +2 -2
  83. package/dist/{watchlistForBusinessManager-BH6M4kqA.esm.js → watchlistForBusinessManager-Bd7Vm2Fr.esm.js} +1 -1
  84. package/dist/{watchlistForBusinessStateMachine-BMWm5mcP.esm.js → watchlistForBusinessStateMachine-B6GOpt-D.esm.js} +7 -2
  85. package/dist/workflow.esm.js +19 -19
  86. package/package.json +3 -3
@@ -1,9 +1,9 @@
1
1
  import { l as wasmRuntime } from "./warmup-BZOMg303.esm.js";
2
- import { t as ensureWasmPipelines } from "./setup-BsUYZ5BQ.esm.js";
2
+ import { t as ensureWasmPipelines } from "./setup-CNR39VJP.esm.js";
3
3
  import { r as BaseWasmProvider } from "./WasmUtilProvider-0xTxgP0R.esm.js";
4
4
  import { t as api, u as endpoints } from "./api-CZpuJuZl.esm.js";
5
- import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity } from "./trueSightService-CoUZOwrU.esm.js";
6
- import "./sessionInitializer-AORXxhvP.esm.js";
5
+ import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity } from "./trueSightService-DrGbuaNH.esm.js";
6
+ import "./sessionInitializer-eFUOtIdq.esm.js";
7
7
  import { t as addDeviceStats } from "./stats-DoByUnTa.esm.js";
8
8
  import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
9
9
  import { t as StreamCanvasProcessingSession } from "./StreamCanvasProcessingSession-CBnbTnOr.esm.js";
@@ -235,7 +235,7 @@ function startDetection(params) {
235
235
  };
236
236
  }
237
237
  async function initializeDeepsightSession(options) {
238
- const { loadDeepsightSession } = await import("./deepsightLoader-CAx598dT.esm.js");
238
+ const { loadDeepsightSession } = await import("./deepsightLoader-Dl7B0eeQ.esm.js");
239
239
  return loadDeepsightSession({
240
240
  ds: options.ds,
241
241
  storage: options.storage
@@ -1,4 +1,4 @@
1
- import { c as areAllConsented, i as AE_CONSENT_KEYS, r as electronicSignatureMachine, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-CrNhyWu4.esm.js";
1
+ import { c as areAllConsented, i as AE_CONSENT_KEYS, r as electronicSignatureMachine, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-CEOLPWJ5.esm.js";
2
2
  //#region src/modules/ae-signature/index.ts
3
3
  function createAeSignatureManager(options) {
4
4
  return createElectronicSignatureManager({ config: {
@@ -1,4 +1,4 @@
1
- import { d as categoryForEndpoint, u as trueSightLog } from "./trueSightService-CoUZOwrU.esm.js";
1
+ import { d as categoryForEndpoint, u as trueSightLog } from "./trueSightService-DrGbuaNH.esm.js";
2
2
  //#region src/internal/http/apiError.ts
3
3
  /**
4
4
  * Incode API error.
@@ -1,3 +1,3 @@
1
- import { t as authenticationMachine } from "./authenticationStateMachine-BFfOIsAw.esm.js";
2
- import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-CZp8XZJY.esm.js";
1
+ import { t as authenticationMachine } from "./authenticationStateMachine-BmtndZRs.esm.js";
2
+ import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-CAZNsfpV.esm.js";
3
3
  export { authenticationMachine, createAuthenticationActor, createAuthenticationManager };
@@ -1,10 +1,10 @@
1
- import { u as BrowserStorageProvider } from "./setup-BsUYZ5BQ.esm.js";
1
+ import { u as BrowserStorageProvider } from "./setup-CNR39VJP.esm.js";
2
2
  import { t as WasmUtilProvider } from "./WasmUtilProvider-0xTxgP0R.esm.js";
3
3
  import { n as eventModuleNames } from "./types-DYYMdAGv.esm.js";
4
4
  import "./events-CP3yOzAl.esm.js";
5
5
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
6
- import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-BYnWj3Dl.esm.js";
7
- import { t as authenticationMachine } from "./authenticationStateMachine-BFfOIsAw.esm.js";
6
+ import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-VcuvTFZr.esm.js";
7
+ import { t as authenticationMachine } from "./authenticationStateMachine-BmtndZRs.esm.js";
8
8
  //#region src/modules/authentication/authenticationActor.ts
9
9
  function createAuthenticationActor(options) {
10
10
  const dependencies = options.dependencies ?? {
@@ -1,7 +1,7 @@
1
1
  import { i as assign } from "./xstate.esm-CIqUf_i6.esm.js";
2
2
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
3
- import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-DODac3ax.esm.js";
4
- import { d as isOnDeviceMode, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-DtWTzhdl.esm.js";
3
+ import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-BLWPqVmN.esm.js";
4
+ import { d as isOnDeviceMode, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-CNu-TWXu.esm.js";
5
5
  import { s as PROTECTED_CAPTURE_TARGET } from "./desktopCameraElection-BKFjsQpO.esm.js";
6
6
  //#region src/modules/authentication/authenticationErrorUtils.ts
7
7
  const AUTH_ERROR_MAP = {
@@ -0,0 +1,35 @@
1
+ //#region src/internal/forms/checks/calendarDate.ts
2
+ const ISO_DATE = /^(\d{4})-(\d{2})-(\d{2})$/;
3
+ const DAYS = [
4
+ 31,
5
+ 28,
6
+ 31,
7
+ 30,
8
+ 31,
9
+ 30,
10
+ 31,
11
+ 31,
12
+ 30,
13
+ 31,
14
+ 30,
15
+ 31
16
+ ];
17
+ const INVALID_DATE_ERROR_KEY = "validation.invalidDate";
18
+ /** An ISO date that exists in the Gregorian calendar. */
19
+ function isCalendarDate(value) {
20
+ const match = ISO_DATE.exec(value);
21
+ if (!match) return false;
22
+ const year = Number(match[1]);
23
+ const month = Number(match[2]);
24
+ const day = Number(match[3]);
25
+ if (year < 1 || month < 1 || month > 12 || day < 1) return false;
26
+ const leap = year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
27
+ return day <= (month === 2 && leap ? 29 : DAYS[month - 1] ?? 0);
28
+ }
29
+ /** Leaves required checks and whitespace normalization to the caller. */
30
+ function calendarDateError(value) {
31
+ if (value === void 0 || value === "") return void 0;
32
+ return typeof value === "string" && isCalendarDate(value) ? void 0 : INVALID_DATE_ERROR_KEY;
33
+ }
34
+ //#endregion
35
+ export { calendarDateError as n, INVALID_DATE_ERROR_KEY as t };
package/dist/consent.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as ConsentActor, c as ConsentConfig, i as createConsentManagerFromActor, n as ConsentState, o as consentMachine, r as createConsentManager, s as ConsentCheckbox, t as ConsentManager } from "./consentManager-B0YKqYtZ.js";
1
+ import { a as ConsentActor, c as ConsentConfig, i as createConsentManagerFromActor, n as ConsentState, o as consentMachine, r as createConsentManager, s as ConsentCheckbox, t as ConsentManager } from "./consentManager-CMed_O5F.js";
2
2
  export { type ConsentActor, type ConsentCheckbox, type ConsentConfig, type ConsentManager, type ConsentState, consentMachine, createConsentManager, createConsentManagerFromActor };
@@ -75,20 +75,16 @@ declare const consentMachine: StateMachine<ConsentContext, {
75
75
  id: string | undefined;
76
76
  };
77
77
  }>, Values<{
78
- setError: {
79
- type: "setError";
80
- params: NonReducibleUnknown;
81
- };
82
78
  clearError: {
83
79
  type: "clearError";
84
80
  params: NonReducibleUnknown;
85
81
  };
86
- setLoadError: {
87
- type: "setLoadError";
82
+ setError: {
83
+ type: "setError";
88
84
  params: NonReducibleUnknown;
89
85
  };
90
- resetContext: {
91
- type: "resetContext";
86
+ setLoadError: {
87
+ type: "setLoadError";
92
88
  params: NonReducibleUnknown;
93
89
  };
94
90
  setConsentData: {
@@ -99,6 +95,10 @@ declare const consentMachine: StateMachine<ConsentContext, {
99
95
  type: "toggleCheckbox";
100
96
  params: NonReducibleUnknown;
101
97
  };
98
+ resetContext: {
99
+ type: "resetContext";
100
+ params: NonReducibleUnknown;
101
+ };
102
102
  }>, {
103
103
  type: "canSubmit";
104
104
  params: unknown;
@@ -1,3 +1,3 @@
1
- import { i as mexicanStates, n as ENTER_CURP_FIELD, r as GENERATE_CURP_FIELDS, t as curpValidationMachine } from "./curpValidationStateMachine-BQ8XK2Y3.esm.js";
2
- import { n as createCurpValidationManagerFromActor, t as createCurpValidationManager } from "./curpValidationManager-CbvBDoE1.esm.js";
1
+ import { i as mexicanStates, n as ENTER_CURP_FIELD, r as GENERATE_CURP_FIELDS, t as curpValidationMachine } from "./curpValidationStateMachine-CgUNfRaR.esm.js";
2
+ import { n as createCurpValidationManagerFromActor, t as createCurpValidationManager } from "./curpValidationManager-BuA6p_T7.esm.js";
3
3
  export { ENTER_CURP_FIELD, GENERATE_CURP_FIELDS, createCurpValidationManager, createCurpValidationManagerFromActor, curpValidationMachine, mexicanStates };
@@ -4,7 +4,7 @@ import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
4
4
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
5
5
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
6
6
  import { t as isValidCurp } from "./curp-DZGvefg3.esm.js";
7
- import { r as GENERATE_CURP_FIELDS, t as curpValidationMachine } from "./curpValidationStateMachine-BQ8XK2Y3.esm.js";
7
+ import { r as GENERATE_CURP_FIELDS, t as curpValidationMachine } from "./curpValidationStateMachine-CgUNfRaR.esm.js";
8
8
  //#region src/modules/curp-validation/curpValidationActor.ts
9
9
  function createCurpValidationActor(options) {
10
10
  return createActor(curpValidationMachine, { input: { config: options.config } }).start();
@@ -1,8 +1,10 @@
1
+ import { t as getLocalIsoDate } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
1
2
  import { t as api, u as endpoints } from "./api-CZpuJuZl.esm.js";
2
3
  import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
3
4
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
4
5
  import { t as carryAttempts } from "./attemptCarry-BecGGZK8.esm.js";
5
6
  import { t as isValidCurp } from "./curp-DZGvefg3.esm.js";
7
+ import { n as calendarDateError } from "./calendarDate-DcqGuEht.esm.js";
6
8
  //#region src/modules/curp-validation/curpValidationUtils.ts
7
9
  /** Convert YYYY-MM-DD to DD/MM/YYYY for the API */
8
10
  function formatDateForApi(date) {
@@ -257,7 +259,10 @@ const createValidators = () => ({
257
259
  }
258
260
  });
259
261
  const normalizeFieldValue = (value) => typeof value === "string" ? value : String(value ?? "");
260
- const evaluateRules = (value, validation, validators) => {
262
+ const evaluateRules = (value, validation, validators, type) => {
263
+ const dateError = type === "date" ? calendarDateError(value.trim()) : void 0;
264
+ if (dateError) return dateError;
265
+ if (type === "date" && value.trim() > getLocalIsoDate()) return "verification.errors.futureDate";
261
266
  if (!validation) return void 0;
262
267
  for (const rule of validation) {
263
268
  const error = validators[rule.type](value);
@@ -273,7 +278,7 @@ const validateGenerateCurpForm = (data, fields) => {
273
278
  const validators = createValidators();
274
279
  return fields.reduce((errors, field) => {
275
280
  const value = normalizeFieldValue(data[field.key]);
276
- const error = evaluateRules(value, field.validation, validators);
281
+ const error = evaluateRules(value, field.validation, validators, field.type);
277
282
  if (error) errors[field.key] = error;
278
283
  return errors;
279
284
  }, {});
@@ -287,7 +292,7 @@ const validateGenerateCurpField = (data, fieldKey, fields) => {
287
292
  if (!field) return void 0;
288
293
  const validators = createValidators();
289
294
  const value = normalizeFieldValue(data[fieldKey]);
290
- return evaluateRules(value, field.validation, validators);
295
+ return evaluateRules(value, field.validation, validators, field.type);
291
296
  };
292
297
  /**
293
298
  * Runs the single CURP-entry field through its validation rules.
@@ -1,2 +1,2 @@
1
- import { n as createCustomFieldsManagerFromActor, r as customFieldsMachine, t as createCustomFieldsManager } from "./customFieldsManager-BRqSCR9R.esm.js";
1
+ import { n as createCustomFieldsManagerFromActor, r as customFieldsMachine, t as createCustomFieldsManager } from "./customFieldsManager-BQePQpNk.esm.js";
2
2
  export { createCustomFieldsManager, createCustomFieldsManagerFromActor, customFieldsMachine };
@@ -5,6 +5,7 @@ import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
5
5
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
6
6
  import { i as assign, s as createActor, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
7
7
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
8
+ import { n as calendarDateError } from "./calendarDate-DcqGuEht.esm.js";
8
9
  import { t as isoDateToMs } from "./dateUtils-CvG0FvK8.esm.js";
9
10
  //#region src/modules/custom-fields/customFieldsServices.ts
10
11
  async function submitCustomFields(params, signal) {
@@ -21,19 +22,16 @@ function transformFields(fields, customFields) {
21
22
  else result[key] = value;
22
23
  return result;
23
24
  }
24
- function isFormComplete(fields, customFields) {
25
- return customFields.every((field) => {
26
- if (field.type === "BOOLEAN") return true;
27
- const value = fields[field.name];
28
- return value !== void 0 && value !== "";
29
- });
30
- }
31
- function validateRequiredFields(fields, customFields) {
25
+ function validateFields(fields, customFields) {
32
26
  const errors = {};
33
27
  for (const field of customFields) {
34
28
  if (field.type === "BOOLEAN") continue;
35
29
  const value = fields[field.name];
36
30
  if (value === void 0 || value === "") errors[field.name] = REQUIRED_FIELD_ERROR;
31
+ else if (field.type === "DATE") {
32
+ const dateError = calendarDateError(value);
33
+ if (dateError) errors[field.name] = dateError;
34
+ }
37
35
  }
38
36
  return Object.keys(errors).length > 0 ? errors : void 0;
39
37
  }
@@ -59,13 +57,13 @@ const customFieldsMachine = setup({
59
57
  validationErrors: Object.keys(validationErrors).length > 0 ? validationErrors : void 0
60
58
  };
61
59
  }),
62
- setValidationErrors: assign(({ context }) => ({ validationErrors: validateRequiredFields(context.fields, context.config.customFields) })),
60
+ setValidationErrors: assign(({ context }) => ({ validationErrors: validateFields(context.fields, context.config.customFields) })),
63
61
  markSuccess: assign({ result: "success" }),
64
62
  markFailed: assign({ result: "failed" })
65
63
  },
66
64
  guards: {
67
65
  apiSucceeded: ({ event }) => event.output.success,
68
- isFormComplete: ({ context }) => isFormComplete(context.fields, context.config.customFields)
66
+ isFormComplete: ({ context }) => validateFields(context.fields, context.config.customFields) === void 0
69
67
  }
70
68
  }).createMachine({
71
69
  id: "customFields",
@@ -1,7 +1,7 @@
1
1
  import { t as WasmUtilProvider } from "./WasmUtilProvider-0xTxgP0R.esm.js";
2
- import { u as trueSightLog } from "./trueSightService-CoUZOwrU.esm.js";
3
- import { t as SDK_VERSION } from "./sdkVersion-D7JHf95f.esm.js";
4
- import { C as BrowserEnvironmentProvider, S as IpifyProvider, T as SDK_PLATFORM, b as getThumbmarkId, n as getDisableIpify, r as getFingerprintEnabled, v as isBrowserSimulation, w as fingerprintSignalsReporter } from "./sessionInitializer-AORXxhvP.esm.js";
2
+ import { u as trueSightLog } from "./trueSightService-DrGbuaNH.esm.js";
3
+ import { t as SDK_VERSION } from "./sdkVersion-CumgW6tC.esm.js";
4
+ import { C as BrowserEnvironmentProvider, S as IpifyProvider, T as SDK_PLATFORM, b as getThumbmarkId, n as getDisableIpify, r as getFingerprintEnabled, v as isBrowserSimulation, w as fingerprintSignalsReporter } from "./sessionInitializer-eFUOtIdq.esm.js";
5
5
  import { t as getParsedUserAgent } from "./getParsedUserAgent-DhQPeKqw.esm.js";
6
6
  import { t as getUserAgent } from "./getBrowser-CBiibsL-.esm.js";
7
7
  import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-DPK7qGgo.esm.js";
@@ -1,3 +1,3 @@
1
1
  import { a as DocumentCaptureErrorCode, c as DocumentType, n as DOCUMENT_CAPTURE_ERROR_CODES, r as DocumentCaptureConfig, s as DocumentCaptureNextPageType, u as DocumentUploadStatus } from "./types-CyNndVAT.js";
2
- import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-BZBmcOKI.js";
2
+ import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-Cs6iJJ_T.js";
3
3
  export { DOCUMENT_CAPTURE_ERROR_CODES, type DocumentCaptureActor, type DocumentCaptureConfig, type DocumentCaptureErrorCode, type DocumentCaptureManager, type DocumentCaptureNextPageType, type DocumentCaptureState, type DocumentType, type DocumentUploadStatus, createDocumentCaptureManager, createDocumentCaptureManagerFromActor, documentCaptureMachine };
@@ -102,14 +102,14 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
102
102
  id: string | undefined;
103
103
  };
104
104
  }>, Values<{
105
- decrementAttemptsRemaining: {
106
- type: "decrementAttemptsRemaining";
107
- params: NonReducibleUnknown;
108
- };
109
105
  clearError: {
110
106
  type: "clearError";
111
107
  params: NonReducibleUnknown;
112
108
  };
109
+ decrementAttemptsRemaining: {
110
+ type: "decrementAttemptsRemaining";
111
+ params: NonReducibleUnknown;
112
+ };
113
113
  setStream: {
114
114
  type: "setStream";
115
115
  params: NonReducibleUnknown;
@@ -263,7 +263,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
263
263
  type: "fileSizeOkForNonGallery";
264
264
  params: unknown;
265
265
  };
266
- }>, never, "uploading" | "closed" | "success" | "finished" | "initCamera" | "tutorial" | "capturing" | "preview" | "failure" | "nextPage" | "finalizing" | {
266
+ }>, never, "uploading" | "closed" | "success" | "finished" | "capturing" | "failure" | "initCamera" | "tutorial" | "preview" | "nextPage" | "finalizing" | {
267
267
  permissions: "idle" | "denied" | "waitingForUser" | "requesting" | "learnMore";
268
268
  }, string, DocumentCaptureInput, NonReducibleUnknown, EventObject, MetaObject, {
269
269
  readonly id: "documentCapture";
@@ -1,3 +1,3 @@
1
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-DfgwjRqH.esm.js";
2
- import { t as createDynamicFormsManager } from "./dynamicFormsManager-DCvgD3NM.esm.js";
1
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-DJPuqmr0.esm.js";
2
+ import { t as createDynamicFormsManager } from "./dynamicFormsManager-CyhuPTRV.esm.js";
3
3
  export { createDynamicFormsManager, dynamicFormsMachine };
@@ -3,7 +3,7 @@ import { t as createManagerInstrumentation } from "./events-CP3yOzAl.esm.js";
3
3
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
4
4
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
5
5
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
6
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-DfgwjRqH.esm.js";
6
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-DJPuqmr0.esm.js";
7
7
  //#region src/modules/dynamic-forms/dynamicFormsActor.ts
8
8
  function createDynamicFormsActor(options) {
9
9
  return createActor(dynamicFormsMachine, { input: { config: options.config } }).start();
@@ -1,7 +1,8 @@
1
1
  import { t as api, u as endpoints } from "./api-CZpuJuZl.esm.js";
2
- import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-CPNXKYOV.esm.js";
2
+ import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-CDvhOvoO.esm.js";
3
3
  import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
5
+ import { n as calendarDateError } from "./calendarDate-DcqGuEht.esm.js";
5
6
  import { t as isoDateToMs } from "./dateUtils-CvG0FvK8.esm.js";
6
7
  //#region src/modules/dynamic-forms/dynamicFormsFields.ts
7
8
  function getEffectiveType(question) {
@@ -38,7 +39,9 @@ const VALIDATORS = {
38
39
  formatViaAnswerValidity: ({ questionId, answerValidity }, rule) => answerValidity[questionId] === false ? rule.errorKey : void 0
39
40
  };
40
41
  const normalizeValue = (value) => typeof value === "string" ? value : String(value ?? "");
41
- function evaluateRules(input, rules) {
42
+ function evaluateRules(input, rules, inputType) {
43
+ const dateError = inputType === "DATE" ? calendarDateError(input.value.trim()) : void 0;
44
+ if (dateError) return dateError;
42
45
  for (const rule of rules) {
43
46
  const error = rule.type === "required" ? VALIDATORS.required(input) : VALIDATORS.formatViaAnswerValidity(input, rule);
44
47
  if (error) return error;
@@ -51,7 +54,7 @@ function validateScreenForm(answers, fields, answerValidity) {
51
54
  value: normalizeValue(answers[field.questionId]),
52
55
  questionId: field.questionId,
53
56
  answerValidity
54
- }, field.validation);
57
+ }, field.validation, field.inputType);
55
58
  if (error) errors[field.questionId] = error;
56
59
  return errors;
57
60
  }, {});
@@ -64,7 +67,7 @@ function validateScreenField(answers, questionId, fields, answerValidity) {
64
67
  value: normalizeValue(answers[questionId]),
65
68
  questionId,
66
69
  answerValidity
67
- }, field.validation);
70
+ }, field.validation, field.inputType);
68
71
  }
69
72
  //#endregion
70
73
  //#region src/modules/dynamic-forms/dynamicFormsServices.ts
package/dist/ekyb.esm.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { c as ALL_COUNTRIES, f as SUPPORTED_COUNTRIES, l as DEV_ONLY_COUNTRIES, m as isSupportedCountry, o as toEkybConfig } from "./ekybUtils-Cw8Ta9Qi.esm.js";
2
- import { t as ekybMachine } from "./ekybStateMachine-Dh2QeiVL.esm.js";
3
- import { t as createEkybManager } from "./ekybManager-Bko0uSve.esm.js";
2
+ import { t as ekybMachine } from "./ekybStateMachine-Cseu2q0j.esm.js";
3
+ import { t as createEkybManager } from "./ekybManager-C-5mzXHJ.esm.js";
4
4
  export { ALL_COUNTRIES, DEV_ONLY_COUNTRIES, SUPPORTED_COUNTRIES, createEkybManager, ekybMachine, isSupportedCountry, toEkybConfig };
@@ -3,7 +3,7 @@ import { t as createManagerInstrumentation } from "./events-CP3yOzAl.esm.js";
3
3
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
4
4
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
5
5
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
6
- import { t as ekybMachine } from "./ekybStateMachine-Dh2QeiVL.esm.js";
6
+ import { t as ekybMachine } from "./ekybStateMachine-Cseu2q0j.esm.js";
7
7
  //#region src/modules/ekyb/ekybActor.ts
8
8
  /**
9
9
  * Creates and starts an eKYB actor.
@@ -1,5 +1,5 @@
1
1
  import { t as api, u as endpoints } from "./api-CZpuJuZl.esm.js";
2
- import { n as getFlow } from "./flowServices-CRld4kkf.esm.js";
2
+ import { n as getFlow } from "./flowServices-C4ilAPYa.esm.js";
3
3
  import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
5
5
  import { a as sortModulesByOrder, c as ALL_COUNTRIES, d as FIELD_ORDER, i as requiresAddressValidation, m as isSupportedCountry, n as hasAtLeastOneAddressField, o as toEkybConfig, p as UBO_FIELD_LABELS, r as isFieldOptional, s as ADDRESS_FIELDS, u as FIELD_NAME_MAPPING } from "./ekybUtils-Cw8Ta9Qi.esm.js";
@@ -1,6 +1,6 @@
1
1
  import { a as EkycFormValues, c as EkycValidationErrors, s as EkycValidationError } from "./types-DEa3taWc.js";
2
2
  import { a as EkycPrefillFieldDef, c as EkycPrefillModuleConfig, i as EkycPrefillErrorKind, l as EkycPrefillServedField, n as EkycPrefillConfigField, s as EkycPrefillInputFormat, t as EkycPrefillConfig } from "./types-B-PIc0en.js";
3
- import { a as EkycPrefillFormState, c as EkycPrefillManager, d as EkycPrefillSubmittingState, f as createEkycPrefillManager, h as ekycPrefillMachine, i as EkycPrefillFinishedState, l as EkycPrefillMisconfiguredState, n as EkycPrefillClosedState, o as EkycPrefillIdleState, r as EkycPrefillErrorState, s as EkycPrefillLimitReachedState, t as EkycPrefillAnyOfState, u as EkycPrefillState } from "./ekycPrefillManager-BcLhkpp8.js";
3
+ import { a as EkycPrefillFormState, c as EkycPrefillManager, d as EkycPrefillSubmittingState, f as createEkycPrefillManager, h as ekycPrefillMachine, i as EkycPrefillFinishedState, l as EkycPrefillMisconfiguredState, n as EkycPrefillClosedState, o as EkycPrefillIdleState, r as EkycPrefillErrorState, s as EkycPrefillLimitReachedState, t as EkycPrefillAnyOfState, u as EkycPrefillState } from "./ekycPrefillManager-CUFTaI8e.js";
4
4
  //#region src/modules/ekyc-prefill/ekycPrefillConfig.d.ts
5
5
  /**
6
6
  * Normalizes the served `EKYC_PREFILL` configuration. Idempotent, so a
@@ -1,3 +1,3 @@
1
- import { i as toEkycPrefillConfig, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-uvDimQw2.esm.js";
2
- import { t as createEkycPrefillManager } from "./ekycPrefillManager-GEPxl5VU.esm.js";
1
+ import { i as toEkycPrefillConfig, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-CyQMJoRH.esm.js";
2
+ import { t as createEkycPrefillManager } from "./ekycPrefillManager-CEevGgnk.esm.js";
3
3
  export { createEkycPrefillManager, ekycPrefillMachine, toEkycPrefillConfig };
package/dist/ekyc.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as ekycMachine } from "./ekycStateMachine-nwJRel2s.esm.js";
1
+ import { t as ekycMachine } from "./ekycStateMachine-C72Oe1_T.esm.js";
2
2
  import { l as toEkycConfig } from "./ekycUtils-FcqA6oU4.esm.js";
3
- import { t as createEkycManager } from "./ekycManager-nRT0rxei.esm.js";
3
+ import { t as createEkycManager } from "./ekycManager-CmgzNQmQ.esm.js";
4
4
  export { createEkycManager, ekycMachine, toEkycConfig };
@@ -3,7 +3,7 @@ import { t as createManagerInstrumentation } from "./events-CP3yOzAl.esm.js";
3
3
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
4
4
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
5
5
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
6
- import { i as isStepValid, n as buildEkycSteps, r as clampStepIndex, t as ekycMachine } from "./ekycStateMachine-nwJRel2s.esm.js";
6
+ import { i as isStepValid, n as buildEkycSteps, r as clampStepIndex, t as ekycMachine } from "./ekycStateMachine-C72Oe1_T.esm.js";
7
7
  //#region src/modules/ekyc/ekycActor.ts
8
8
  /**
9
9
  * Creates and starts an eKYC actor.
@@ -1,6 +1,6 @@
1
1
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
2
2
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
3
- import { n as isAnyOfMissing, r as validateForm, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-uvDimQw2.esm.js";
3
+ import { n as isAnyOfMissing, r as validateForm, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-CyQMJoRH.esm.js";
4
4
  //#region src/modules/ekyc-prefill/ekycPrefillActor.ts
5
5
  /** Creates and starts an eKYC Pre-fill actor, idle until `LOAD`. */
6
6
  function createEkycPrefillActor(options = {}) {
@@ -28,15 +28,10 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
28
28
  } | {
29
29
  type: "CLOSE";
30
30
  }, {
31
- [x: string]: ActorRefFromLogic<PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>> | ActorRefFromLogic<PromiseActorLogic<void, {
31
+ [x: string]: ActorRefFromLogic<PromiseActorLogic<void, {
32
32
  hasPhone: boolean;
33
- }, EventObject>> | undefined;
33
+ }, EventObject>> | ActorRefFromLogic<PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>> | undefined;
34
34
  }, Values<{
35
- submit: {
36
- src: "submit";
37
- logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
38
- id: string | undefined;
39
- };
40
35
  loadPhoneRules: {
41
36
  src: "loadPhoneRules";
42
37
  logic: PromiseActorLogic<void, {
@@ -44,6 +39,11 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
44
39
  }, EventObject>;
45
40
  id: string | undefined;
46
41
  };
42
+ submit: {
43
+ src: "submit";
44
+ logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
45
+ id: string | undefined;
46
+ };
47
47
  }>, Values<{
48
48
  applyForm: {
49
49
  type: "applyForm";
@@ -82,10 +82,6 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
82
82
  params: NonReducibleUnknown;
83
83
  };
84
84
  }>, Values<{
85
- isValid: {
86
- type: "isValid";
87
- params: unknown;
88
- };
89
85
  phoneRulesFailed: {
90
86
  type: "phoneRulesFailed";
91
87
  params: unknown;
@@ -98,6 +94,10 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
98
94
  type: "canRender";
99
95
  params: unknown;
100
96
  };
97
+ isValid: {
98
+ type: "isValid";
99
+ params: unknown;
100
+ };
101
101
  isBadRequest: {
102
102
  type: "isBadRequest";
103
103
  params: unknown;
@@ -110,20 +110,24 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
110
110
  type: "isLimitReached";
111
111
  params: unknown;
112
112
  };
113
- }>, never, "error" | "idle" | "closed" | "finished" | "submitting" | "misconfigured" | "limitReached" | {
113
+ }>, never, "error" | "idle" | "closed" | "finished" | "misconfigured" | "submitting" | "limitReached" | {
114
114
  form: "inputting" | "validating";
115
115
  }, string, EkycPrefillInput, NonReducibleUnknown, EventObject, MetaObject, {
116
116
  readonly id: "ekycPrefill";
117
117
  readonly initial: "idle";
118
118
  readonly context: ({ input }: {
119
119
  spawn: {
120
- <TSrc extends "submit" | "loadPhoneRules">(logic: TSrc, ...[options]: ({
121
- src: "submit";
122
- logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
120
+ <TSrc extends "loadPhoneRules" | "submit">(logic: TSrc, ...[options]: ({
121
+ src: "loadPhoneRules";
122
+ logic: PromiseActorLogic<void, {
123
+ hasPhone: boolean;
124
+ }, EventObject>;
123
125
  id: string | undefined;
124
126
  } extends (infer T) ? T extends {
125
- src: "submit";
126
- logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
127
+ src: "loadPhoneRules";
128
+ logic: PromiseActorLogic<void, {
129
+ hasPhone: boolean;
130
+ }, EventObject>;
127
131
  id: string | undefined;
128
132
  } ? T extends {
129
133
  src: TSrc;
@@ -133,16 +137,12 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
133
137
  input?: InputFrom<T["logic"]> | undefined;
134
138
  syncSnapshot?: boolean;
135
139
  } & { [K in RequiredActorOptions<T>]: unknown; }) | undefined], IsNotNever<RequiredActorOptions<T>>> : never : never : never) | ({
136
- src: "loadPhoneRules";
137
- logic: PromiseActorLogic<void, {
138
- hasPhone: boolean;
139
- }, EventObject>;
140
+ src: "submit";
141
+ logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
140
142
  id: string | undefined;
141
143
  } extends (infer T_1) ? T_1 extends {
142
- src: "loadPhoneRules";
143
- logic: PromiseActorLogic<void, {
144
- hasPhone: boolean;
145
- }, EventObject>;
144
+ src: "submit";
145
+ logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
146
146
  id: string | undefined;
147
147
  } ? T_1 extends {
148
148
  src: TSrc;
@@ -152,11 +152,6 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
152
152
  input?: InputFrom<T_1["logic"]> | undefined;
153
153
  syncSnapshot?: boolean;
154
154
  } & { [K_1 in RequiredActorOptions<T_1>]: unknown; }) | undefined], IsNotNever<RequiredActorOptions<T_1>>> : never : never : never)): ActorRefFromLogic<GetConcreteByKey<Values<{
155
- submit: {
156
- src: "submit";
157
- logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
158
- id: string | undefined;
159
- };
160
155
  loadPhoneRules: {
161
156
  src: "loadPhoneRules";
162
157
  logic: PromiseActorLogic<void, {
@@ -164,6 +159,11 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
164
159
  }, EventObject>;
165
160
  id: string | undefined;
166
161
  };
162
+ submit: {
163
+ src: "submit";
164
+ logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
165
+ id: string | undefined;
166
+ };
167
167
  }>, "src", TSrc>["logic"]>;
168
168
  <TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: ({
169
169
  id?: never;
@@ -1,9 +1,9 @@
1
1
  import { t as api, u as endpoints } from "./api-CZpuJuZl.esm.js";
2
- import { i as toIncodeApiError } from "./apiError-CPNXKYOV.esm.js";
2
+ import { i as toIncodeApiError } from "./apiError-CDvhOvoO.esm.js";
3
3
  import { n as loadPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
4
4
  import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
5
5
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
6
- import { i as cleanName, l as validateEkycField, n as projectRules, o as formatSSN } from "./ekycRules-DXP2hqVw.esm.js";
6
+ import { i as cleanName, l as validateEkycField, n as projectRules, o as formatSSN } from "./ekycRules-1hyjJ6bw.esm.js";
7
7
  import { t as createBundledDefinitionSource } from "./definitionSource-Nw0YCbpe.esm.js";
8
8
  import { n as checkSupport, t as resolveForm } from "./resolveForm-DaaQSVWp.esm.js";
9
9
  import { t as formatPhoneE164 } from "./phoneFormat-C3q0Ukh4.esm.js";
@@ -1,6 +1,7 @@
1
1
  import { t as getLocalIsoDate } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
2
2
  import { n as loadPhoneValidation, t as getPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
3
3
  import { t as isValidCurp } from "./curp-DZGvefg3.esm.js";
4
+ import { n as calendarDateError } from "./calendarDate-DcqGuEht.esm.js";
4
5
  import { i as getPostalCodeErrorParams, o as validatePostalCode, r as getPostalCodeErrorKey, s as STREET_LEVEL_REQUIRED_ERROR } from "./definitionSource-Nw0YCbpe.esm.js";
5
6
  import { r as DYNAMIC_REQUIRED_KEY } from "./resolveForm-DaaQSVWp.esm.js";
6
7
  import { t as validateCPF } from "./cpf-DDXMTLYr.esm.js";
@@ -160,8 +161,8 @@ function matchesCharTemplate(value, templates, ignoreCase = false) {
160
161
  /**
161
162
  * `maxAge`: an ISO `YYYY-MM-DD` date of birth at most `years` full years
162
163
  * before `today`, also ISO, in the user's calendar. As in SDK1, someone turns
163
- * a year older on their birthday. A value that isn't an ISO date passes; the
164
- * date input owns that.
164
+ * a year older on their birthday. Field structure validation checks calendar
165
+ * dates before this age rule runs.
165
166
  */
166
167
  function isWithinMaxAge(value, today, years) {
167
168
  if (!/^\d{4}-\d{2}-\d{2}$/.test(value)) return true;
@@ -180,8 +181,8 @@ function hasNameCharacters(value) {
180
181
  //#region src/internal/forms/checks/notFuture.ts
181
182
  /**
182
183
  * `notFuture`: an ISO `YYYY-MM-DD` date on or before `today`, also ISO, in
183
- * the user's calendar. A value that isn't an ISO date passes; the date input
184
- * owns that.
184
+ * the user's calendar. Field structure validation checks calendar dates
185
+ * before this range rule runs.
185
186
  */
186
187
  function isNotFuture(value, today) {
187
188
  if (!/^\d{4}-\d{2}-\d{2}$/.test(value)) return true;
@@ -374,6 +375,8 @@ const withRuleMessage = (error, rule) => !rule.message || error.key === rule.mes
374
375
  key: rule.message
375
376
  };
376
377
  const evaluateRules = (value, rules, field, values, validators) => {
378
+ const dateError = field.type === "date" ? calendarDateError(value.trim()) : void 0;
379
+ if (dateError) return { key: dateError };
377
380
  if (!rules) return void 0;
378
381
  for (const rule of rules) {
379
382
  const error = validators[rule.type](value, rule, field, values);