@incodetech/core 0.0.0-dev-20261029-54b5d90b → 0.0.0-dev-20261029-1590a4a5

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 (105) hide show
  1. package/dist/{FaceDetectionProvider-vuQyxdgw.esm.js → FaceDetectionProvider-D-Rsz-8A.esm.js} +5 -5
  2. package/dist/{addressSearch-CBw55d_y.esm.js → addressSearch-B0cu1Cuf.esm.js} +6 -3
  3. package/dist/ae-signature.esm.js +1 -1
  4. package/dist/{apiError-yEoFN7nS.esm.js → apiError-vItp-zoV.esm.js} +1 -1
  5. package/dist/authentication.d.ts +3 -3
  6. package/dist/authentication.esm.js +2 -2
  7. package/dist/{authenticationManager-CC67pNoL.d.ts → authenticationManager-CfD9LLbU.d.ts} +1 -1
  8. package/dist/{authenticationManager-OL-xHluZ.esm.js → authenticationManager-mwu8CKAO.esm.js} +3 -3
  9. package/dist/{authenticationStateMachine-CrUWYp0B.esm.js → authenticationStateMachine-D7f7NM5o.esm.js} +2 -2
  10. package/dist/cnpj-Co1ottYN.esm.js +77 -0
  11. package/dist/consent.d.ts +1 -1
  12. package/dist/{consentManager-ybzeu6sI.d.ts → consentManager-_q9yJUku.d.ts} +1 -1
  13. package/dist/curp-validation.d.ts +1 -1
  14. package/dist/{curpValidationManager-HRSYsugw.d.ts → curpValidationManager-CXpFE-Mv.d.ts} +1 -1
  15. package/dist/{deepsightLoader-BCRRvq1r.esm.js → deepsightLoader-C7EABNW7.esm.js} +4 -4
  16. package/dist/{deepsightService-DsaXB5-6.esm.js → deepsightService-BDm9pGJY.esm.js} +1 -1
  17. package/dist/dynamic-forms.d.ts +2 -2
  18. package/dist/dynamic-forms.esm.js +2 -2
  19. package/dist/{dynamicFormsManager-C0dHs1ty.d.ts → dynamicFormsManager-9kwY8Bf5.d.ts} +1 -1
  20. package/dist/{dynamicFormsManager-BG0ro9jL.esm.js → dynamicFormsManager-BDi68HX5.esm.js} +1 -1
  21. package/dist/{dynamicFormsStateMachine-CxKKFx8B.esm.js → dynamicFormsStateMachine-DyW9lxKq.esm.js} +1 -1
  22. package/dist/ekyb.d.ts +4 -4
  23. package/dist/ekyb.esm.js +3 -3
  24. package/dist/{ekybManager-lZOHO33y.d.ts → ekybManager-TB6ZG5lX.d.ts} +2 -2
  25. package/dist/{ekybManager-CriO4ylY.esm.js → ekybManager-lK1WUgFv.esm.js} +1 -1
  26. package/dist/{ekybStateMachine-DfEjemtn.esm.js → ekybStateMachine-i-HrUy6z.esm.js} +5 -32
  27. package/dist/ekyc.d.ts +3 -3
  28. package/dist/ekyc.esm.js +3 -3
  29. package/dist/{ekycManager-Ci7zQBP1.d.ts → ekycManager-BSQteIfC.d.ts} +1 -1
  30. package/dist/{ekycManager-DbF76iGU.esm.js → ekycManager-BnHD1My0.esm.js} +1 -1
  31. package/dist/{ekycStateMachine-16xp3B1E.esm.js → ekycStateMachine-DflJVAT5.esm.js} +1118 -434
  32. package/dist/ekycUtils-BFncpC4F.esm.js +1401 -0
  33. package/dist/electronic-signature.esm.js +1 -1
  34. package/dist/{electronicSignatureManager-CUMYwKaP.esm.js → electronicSignatureManager-C_hkcVqg.esm.js} +1 -1
  35. package/dist/extensibility.d.ts +14 -14
  36. package/dist/extensibility.esm.js +12 -12
  37. package/dist/{faceCaptureManagerFactory-DmaAHq73.esm.js → faceCaptureManagerFactory--QjYVql1.esm.js} +1 -1
  38. package/dist/{faceCaptureManagerFactory-vchnR2CA.d.ts → faceCaptureManagerFactory-C3RG3oYt.d.ts} +3 -3
  39. package/dist/{faceCaptureSetup-DzN8sMtf.esm.js → faceCaptureSetup-Dkh01Ewe.esm.js} +3 -3
  40. package/dist/{feature-management-fLC-ZOgN.esm.js → feature-management-pqT7dS8h.esm.js} +1 -1
  41. package/dist/feature-management.esm.js +1 -1
  42. package/dist/flow-events.d.ts +1 -1
  43. package/dist/flow.d.ts +8 -8
  44. package/dist/flow.esm.js +3 -3
  45. package/dist/{flowCompletionService-CV7AJ5t5.esm.js → flowCompletionService-DlmDpvMy.esm.js} +1 -1
  46. package/dist/{flowServices-Ck5Ykktg.esm.js → flowServices-DDj0PiLX.esm.js} +6 -48
  47. package/dist/geolocation.esm.js +2 -2
  48. package/dist/{geolocationManager-D_X-F8D_.esm.js → geolocationManager-CbG02U2e.esm.js} +1 -1
  49. package/dist/{geolocationStateMachine-VEb33y34.esm.js → geolocationStateMachine-DNJqatw8.esm.js} +1 -1
  50. package/dist/home.d.ts +1 -1
  51. package/dist/id-ocr.d.ts +1 -1
  52. package/dist/id-selfie-flow.d.ts +1 -1
  53. package/dist/id-selfie-flow.esm.js +6 -6
  54. package/dist/id.d.ts +2 -2
  55. package/dist/id.esm.js +3 -3
  56. package/dist/{idCaptureManager-C0TIc4jT.d.ts → idCaptureManager-8w07suSB.d.ts} +2 -2
  57. package/dist/{idCaptureManager-BPnz8K_b.esm.js → idCaptureManager-DPaNW0x6.esm.js} +3 -3
  58. package/dist/{idCaptureServices-C4zXFzgb.esm.js → idCaptureServices-BUXVMeMv.esm.js} +2 -2
  59. package/dist/{idCaptureStateMachine-DwNURJ0q.esm.js → idCaptureStateMachine-CCCRb9W8.esm.js} +9 -9
  60. package/dist/{idOcrManager-BTdHlJ9D.d.ts → idOcrManager-DT3kPIB3.d.ts} +1 -1
  61. package/dist/{index-tLPVy1zj.d.ts → index-DMDAk85K.d.ts} +1 -1
  62. package/dist/index.esm.js +1 -1
  63. package/dist/mandatory-consent.d.ts +2 -2
  64. package/dist/{mandatoryConsentManager-BivN-7vc.d.ts → mandatoryConsentManager-xx3mY-xw.d.ts} +2 -2
  65. package/dist/qe-signature.esm.js +1 -1
  66. package/dist/{runChildModule-CpdllAv0.esm.js → runChildModule-CBc5XPXP.esm.js} +1 -1
  67. package/dist/{sdkVersion-DyRg1wpo.esm.js → sdkVersion-C53zG0EV.esm.js} +1 -1
  68. package/dist/selfie.d.ts +3 -3
  69. package/dist/selfie.esm.js +6 -6
  70. package/dist/{selfieErrorUtils-C8wM5TSf.esm.js → selfieErrorUtils-Bwc-0Cna.esm.js} +1 -1
  71. package/dist/{selfieManager-BdQ7Cfu5.esm.js → selfieManager-Bn4Nt7I_.esm.js} +3 -3
  72. package/dist/{selfieManager-ClCgI2fn.d.ts → selfieManager-CFgylJo7.d.ts} +1 -1
  73. package/dist/{selfieStateMachine-DhLcBWh0.esm.js → selfieStateMachine-DnovfAdX.esm.js} +3 -3
  74. package/dist/{session-CbT-tprx.esm.js → session-BwUFt_IP.esm.js} +3 -3
  75. package/dist/session.d.ts +1 -1
  76. package/dist/session.esm.js +4 -4
  77. package/dist/{sessionInitializer-B5OuCAfv.esm.js → sessionInitializer-6cQFdVhh.esm.js} +3 -3
  78. package/dist/{setup-Ck3OJbjx.esm.js → setup-Bga8Uduy.esm.js} +4 -4
  79. package/dist/{trueSightService-qeFOITec.esm.js → trueSightService-CI1XQJhE.esm.js} +1 -1
  80. package/dist/{types-D-cdiQD8.d.ts → types-B2FK_wYb.d.ts} +40 -1
  81. package/dist/types-B9C8W01q.d.ts +34 -0
  82. package/dist/{types-CjUSw9yM.d.ts → types-C397LhmN.d.ts} +1 -1
  83. package/dist/types-C3dgFVhg.d.ts +6 -0
  84. package/dist/{types-tsXa6u2J.d.ts → types-DuD8TRJU.d.ts} +3 -2
  85. package/dist/{types-BDYrxX_V.d.ts → types-O88kK1QD.d.ts} +1 -1
  86. package/dist/{types-DJBn6wVV.d.ts → types-PTZHRhGX.d.ts} +1 -1
  87. package/dist/{types-GbGmnFsh.d.ts → types-e8fCsvvk.d.ts} +1 -1
  88. package/dist/{types-ClQspDyT.d.ts → types-fNjgqdt2.d.ts} +1 -1
  89. package/dist/video-selfie.d.ts +1 -1
  90. package/dist/video-selfie.esm.js +3 -3
  91. package/dist/{videoSelfieCameraWarmer-D4BDHWtA.esm.js → videoSelfieCameraWarmer-B1UvWzqc.esm.js} +3 -3
  92. package/dist/{videoSelfieStepDetector-NTgtiQJp.d.ts → videoSelfieStepDetector-FJ0osSpU.d.ts} +2 -2
  93. package/dist/wasm.esm.js +1 -1
  94. package/dist/watchlist-for-business.d.ts +2 -1
  95. package/dist/watchlist-for-business.esm.js +2 -2
  96. package/dist/{watchlistForBusinessManager-B3GDPZrr.d.ts → watchlistForBusinessManager-DX2AyM4Y.d.ts} +54 -18
  97. package/dist/{watchlistForBusinessManager-UD1i94xo.esm.js → watchlistForBusinessManager-PKTQ09-2.esm.js} +36 -6
  98. package/dist/watchlistForBusinessStateMachine-CBgJuLJC.esm.js +166 -0
  99. package/dist/workflow.d.ts +1 -1
  100. package/dist/workflow.esm.js +17 -17
  101. package/package.json +1 -1
  102. package/dist/ekycUtils-tST1hG2_.esm.js +0 -478
  103. package/dist/types-Cp_84WIM.d.ts +0 -6
  104. package/dist/watchlistForBusinessStateMachine-CQXOjGhS.esm.js +0 -78
  105. /package/dist/{types-BSBzhHRH2.d.ts → types-BSBzhHRH.d.ts} +0 -0
@@ -1,16 +1,16 @@
1
1
  import { l as wasmRuntime } from "./warmup-D-Y2iAoP.esm.js";
2
- import { t as ensureWasmPipelines } from "./setup-Ck3OJbjx.esm.js";
2
+ import { t as ensureWasmPipelines } from "./setup-Bga8Uduy.esm.js";
3
3
  import { r as BaseWasmProvider } from "./WasmUtilProvider-DqtPEKsY.esm.js";
4
4
  import { t as api, u as endpoints } from "./api-BG98lkot.esm.js";
5
- import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity } from "./trueSightService-qeFOITec.esm.js";
6
- import "./sessionInitializer-B5OuCAfv.esm.js";
5
+ import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity } from "./trueSightService-CI1XQJhE.esm.js";
6
+ import "./sessionInitializer-6cQFdVhh.esm.js";
7
7
  import { t as addDeviceStats } from "./stats-D3Cxg6PL.esm.js";
8
8
  import { c as isIPhone14OrHigher, i as isDesktop } from "./platform-DkcRc9JV.esm.js";
9
9
  import { i as requestCameraAccess, o as stopCameraStream, r as getCameraReacquisitionConstraints } from "./camera-sIa9ceW2.esm.js";
10
10
  import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
11
11
  import { o as StreamCanvasProcessingSession } from "./multipartRecordingService-YhlbyjI4.esm.js";
12
12
  import { i as hasBackCamera, n as getBackCameraStream, r as getDesktopCameraStream, t as ensureFrontCameraStream } from "./backCameraStream-CMvXj4X4.esm.js";
13
- import "./deepsightService-DsaXB5-6.esm.js";
13
+ import "./deepsightService-BDm9pGJY.esm.js";
14
14
  import { t as getDeviceClass } from "./getDeviceClass-bsWdEDxP.esm.js";
15
15
  //#region src/internal/faceCapture/onDeviceFaceResults.ts
16
16
  /**
@@ -271,7 +271,7 @@ function startDetection(params) {
271
271
  };
272
272
  }
273
273
  async function initializeDeepsightSession(options) {
274
- const { loadDeepsightSession } = await import("./deepsightLoader-BCRRvq1r.esm.js");
274
+ const { loadDeepsightSession } = await import("./deepsightLoader-C7EABNW7.esm.js");
275
275
  return loadDeepsightSession({
276
276
  ds: options.ds,
277
277
  storage: options.storage
@@ -1,7 +1,8 @@
1
1
  import { t as api, u as endpoints } from "./api-BG98lkot.esm.js";
2
2
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
3
3
  import { t as fromCallback } from "./xstate-actors.esm-8Gzepa_A.esm.js";
4
- const usStateOptions = Object.values({
4
+ //#region src/shared/usStates.ts
5
+ const usStates = {
5
6
  AL: {
6
7
  code: "AL",
7
8
  name: "Alabama"
@@ -202,7 +203,8 @@ const usStateOptions = Object.values({
202
203
  code: "WY",
203
204
  name: "Wyoming"
204
205
  }
205
- }).map((state) => ({
206
+ };
207
+ const usStateOptions = Object.values(usStates).map((state) => ({
206
208
  value: state.code,
207
209
  label: state.name
208
210
  }));
@@ -435,6 +437,7 @@ function checkSupport(definition, ids) {
435
437
  });
436
438
  for (const key of keys) need("condition", ids.conditions, key, `${path}.requiredWhen[${i}]`);
437
439
  });
440
+ field.prefill?.forEach((id, i) => need("prefillSource", ids.prefillSources, id, `${path}.prefill[${i}]`));
438
441
  const lock = field.phone?.lockCountry;
439
442
  if (typeof lock === "string" && lock !== "whenPhoneRisk") problems.push({
440
443
  category: "phoneLock",
@@ -598,4 +601,4 @@ const debounceSearchActor = fromCallback(({ input, sendBack }) => {
598
601
  };
599
602
  });
600
603
  //#endregion
601
- export { checkSupport as a, getPostalCodeErrorKey as c, DYNAMIC_REQUIRED_KEY as d, STREET_LEVEL_REQUIRED_ERROR as f, usStateOptions as h, createBundledDefinitionSource as i, getPostalCodeMaxLength as l, getStreetLevelErrorForSuggestion as m, isFormDefinitionsEnabled as n, FIXED_DIGIT_POSTAL_CODE_LENGTH as o, fillFromSuggestion as p, resolveForm as r, formatPostalCode as s, debounceSearchActor as t, validatePostalCode as u };
604
+ export { usStates as _, createBundledDefinitionSource as a, formatPostalCode as c, validatePostalCode as d, DYNAMIC_REQUIRED_KEY as f, usStateOptions as g, getStreetLevelErrorForSuggestion as h, resolveForm as i, getPostalCodeErrorKey as l, fillFromSuggestion as m, searchAddress as n, checkSupport as o, STREET_LEVEL_REQUIRED_ERROR as p, isFormDefinitionsEnabled as r, FIXED_DIGIT_POSTAL_CODE_LENGTH as s, debounceSearchActor as t, getPostalCodeMaxLength as u };
@@ -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-CUMYwKaP.esm.js";
1
+ import { c as areAllConsented, i as AE_CONSENT_KEYS, r as electronicSignatureMachine, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-C_hkcVqg.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-qeFOITec.esm.js";
1
+ import { d as categoryForEndpoint, u as trueSightLog } from "./trueSightService-CI1XQJhE.esm.js";
2
2
  //#region src/internal/http/apiError.ts
3
3
  /**
4
4
  * Incode API error.
@@ -1,4 +1,4 @@
1
- import { C as authenticationMachine, S as createAuthenticationActor, b as AuthenticationActor, x as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-vchnR2CA.js";
2
- import { t as AuthenticationConfig } from "./types-Cp_84WIM.js";
3
- import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager-CC67pNoL.js";
1
+ import { C as authenticationMachine, S as createAuthenticationActor, b as AuthenticationActor, x as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-C3RG3oYt.js";
2
+ import { t as AuthenticationConfig } from "./types-C3dgFVhg.js";
3
+ import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager-CfD9LLbU.js";
4
4
  export { type AuthenticationActor, type AuthenticationConfig, type AuthenticationManager, type AuthenticationState, type CreateAuthenticationActorOptions, authenticationMachine, createAuthenticationActor, createAuthenticationManager };
@@ -1,3 +1,3 @@
1
- import { t as authenticationMachine } from "./authenticationStateMachine-CrUWYp0B.esm.js";
2
- import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-OL-xHluZ.esm.js";
1
+ import { t as authenticationMachine } from "./authenticationStateMachine-D7f7NM5o.esm.js";
2
+ import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-mwu8CKAO.esm.js";
3
3
  export { authenticationMachine, createAuthenticationActor, createAuthenticationManager };
@@ -1,6 +1,6 @@
1
1
  import { t as Manager } from "./Manager-C9T5amUN.js";
2
2
  import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
3
- import { b as AuthenticationActor, n as FaceCaptureManagerState, t as FaceCaptureManager, x as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-vchnR2CA.js";
3
+ import { b as AuthenticationActor, n as FaceCaptureManagerState, t as FaceCaptureManager, x as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-C3RG3oYt.js";
4
4
  //#region src/modules/authentication/authenticationManager.d.ts
5
5
  type AuthenticationState = FaceCaptureManagerState;
6
6
  /**
@@ -1,9 +1,9 @@
1
- import { u as BrowserStorageProvider } from "./setup-Ck3OJbjx.esm.js";
1
+ import { u as BrowserStorageProvider } from "./setup-Bga8Uduy.esm.js";
2
2
  import { t as WasmUtilProvider } from "./WasmUtilProvider-DqtPEKsY.esm.js";
3
3
  import { n as eventModuleNames } from "./events-Dh1gMk0J.esm.js";
4
4
  import { s as createActor } from "./xstate.esm-DSajW7CJ.esm.js";
5
- import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-DmaAHq73.esm.js";
6
- import { t as authenticationMachine } from "./authenticationStateMachine-CrUWYp0B.esm.js";
5
+ import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory--QjYVql1.esm.js";
6
+ import { t as authenticationMachine } from "./authenticationStateMachine-D7f7NM5o.esm.js";
7
7
  //#region src/modules/authentication/authenticationActor.ts
8
8
  function createAuthenticationActor(options) {
9
9
  const dependencies = options.dependencies ?? {
@@ -1,7 +1,7 @@
1
1
  import { i as assign } from "./xstate.esm-DSajW7CJ.esm.js";
2
2
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
3
- import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-DzN8sMtf.esm.js";
4
- import { d as FACE_ERROR_CODES, f as isOnDeviceMode } from "./FaceDetectionProvider-vuQyxdgw.esm.js";
3
+ import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-Dkh01Ewe.esm.js";
4
+ import { d as FACE_ERROR_CODES, f as isOnDeviceMode } from "./FaceDetectionProvider-D-Rsz-8A.esm.js";
5
5
  import { o as PROTECTED_CAPTURE_TARGET } from "./createCameraCycleOwnership-c3noNWxH.esm.js";
6
6
  //#region src/modules/authentication/authenticationErrorUtils.ts
7
7
  const AUTH_ERROR_MAP = {
@@ -0,0 +1,77 @@
1
+ //#region src/shared/validators/cnpj.ts
2
+ /** Countries whose tax ID is a CNPJ and must pass {@link validateCNPJ}. */
3
+ const COUNTRIES_WITH_CNPJ_VALIDATION = ["BR"];
4
+ const CNPJ_FORMATTED_LENGTH = 18;
5
+ const CNPJ_CLEAN_LENGTH = 14;
6
+ const INVALID_CNPJ_PATTERNS = [
7
+ "00000000000000",
8
+ "11111111111111",
9
+ "22222222222222",
10
+ "33333333333333",
11
+ "44444444444444",
12
+ "55555555555555",
13
+ "66666666666666",
14
+ "77777777777777",
15
+ "88888888888888",
16
+ "99999999999999"
17
+ ];
18
+ const CNPJ_FIRST_DIGIT_FACTORS = [
19
+ 5,
20
+ 4,
21
+ 3,
22
+ 2,
23
+ 9,
24
+ 8,
25
+ 7,
26
+ 6,
27
+ 5,
28
+ 4,
29
+ 3,
30
+ 2
31
+ ];
32
+ const CNPJ_SECOND_DIGIT_FACTORS = [
33
+ 6,
34
+ 5,
35
+ 4,
36
+ 3,
37
+ 2,
38
+ 9,
39
+ 8,
40
+ 7,
41
+ 6,
42
+ 5,
43
+ 4,
44
+ 3,
45
+ 2
46
+ ];
47
+ function cleanCnpjString(cnpj) {
48
+ return cnpj.replace(/\./g, "").replace(/\//g, "").replace(/-/g, "");
49
+ }
50
+ function calculateVerificationDigit(cnpjString, factors) {
51
+ let digit = 11 - factors.reduce((acc, factor, index) => acc + Number.parseInt(cnpjString.charAt(index), 10) * factor, 0) % 11;
52
+ if (digit >= 10) digit = 0;
53
+ return digit.toString();
54
+ }
55
+ /**
56
+ * Validates a Brazilian CNPJ number (14-digit checksum).
57
+ * Accepts formatted (00.000.000/0000-00) or unformatted input.
58
+ */
59
+ function validateCNPJ(cnpjInput) {
60
+ if (!cnpjInput || typeof cnpjInput !== "string") return false;
61
+ let cnpj = cnpjInput.trim();
62
+ if (cnpj.length === CNPJ_FORMATTED_LENGTH) cnpj = cleanCnpjString(cnpj);
63
+ if (cnpj.length !== CNPJ_CLEAN_LENGTH) return false;
64
+ if (!/^\d+$/.test(cnpj)) return false;
65
+ if (INVALID_CNPJ_PATTERNS.includes(cnpj)) return false;
66
+ const first = calculateVerificationDigit(cnpj, CNPJ_FIRST_DIGIT_FACTORS);
67
+ if (cnpj.charAt(12) !== first) return false;
68
+ const second = calculateVerificationDigit(cnpj, CNPJ_SECOND_DIGIT_FACTORS);
69
+ if (cnpj.charAt(13) !== second) return false;
70
+ return true;
71
+ }
72
+ /** Returns true when CNPJ validation applies for the given country. */
73
+ function requiresCnpjValidation(country) {
74
+ return COUNTRIES_WITH_CNPJ_VALIDATION.includes(country);
75
+ }
76
+ //#endregion
77
+ export { requiresCnpjValidation as n, validateCNPJ as r, COUNTRIES_WITH_CNPJ_VALIDATION 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-ybzeu6sI.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-_q9yJUku.js";
2
2
  export { type ConsentActor, type ConsentCheckbox, type ConsentConfig, type ConsentManager, type ConsentState, consentMachine, createConsentManager, createConsentManagerFromActor };
@@ -101,7 +101,7 @@ declare const consentMachine: StateMachine<ConsentContext, {
101
101
  }>, {
102
102
  type: "canSubmit";
103
103
  params: unknown;
104
- }, never, "error" | "idle" | "finished" | "loading" | "submitting" | "display", string, ConsentInput, NonReducibleUnknown, EventObject, MetaObject, {
104
+ }, never, "error" | "idle" | "finished" | "submitting" | "loading" | "display", string, ConsentInput, NonReducibleUnknown, EventObject, MetaObject, {
105
105
  readonly id: "consent";
106
106
  readonly initial: "idle";
107
107
  readonly context: ({ input }: {
@@ -1,4 +1,4 @@
1
- import { a as CurpValidationActor, c as CurpValidationErrors, d as GenerateCurpFieldDef, f as GenerateCurpFieldType, i as createCurpValidationManagerFromActor, l as CurpValidationRule, n as CurpValidationState, o as curpValidationMachine, p as GenerateCurpForm, r as createCurpValidationManager, s as CurpValidationConfig, t as CurpValidationManager, u as EnterCurpFieldDef } from "./curpValidationManager-HRSYsugw.js";
1
+ import { a as CurpValidationActor, c as CurpValidationErrors, d as GenerateCurpFieldDef, f as GenerateCurpFieldType, i as createCurpValidationManagerFromActor, l as CurpValidationRule, n as CurpValidationState, o as curpValidationMachine, p as GenerateCurpForm, r as createCurpValidationManager, s as CurpValidationConfig, t as CurpValidationManager, u as EnterCurpFieldDef } from "./curpValidationManager-CXpFE-Mv.js";
2
2
  //#region src/modules/curp-validation/curpValidationUtils.d.ts
3
3
  type MexicanState = {
4
4
  value: string;
@@ -1,7 +1,7 @@
1
1
  import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
2
2
  import { t as Manager } from "./Manager-C9T5amUN.js";
3
3
  import "./Actor-DpTj5PFb.js";
4
- import { i as FlowModuleConfig } from "./types-tsXa6u2J.js";
4
+ import { i as FlowModuleConfig } from "./types-DuD8TRJU.js";
5
5
  //#region src/modules/curp-validation/types.d.ts
6
6
  type CurpValidationConfig = FlowModuleConfig['CURP_VALIDATION'] & {
7
7
  /** Maximum validation retries before auto-advancing. @default 1 */
@@ -1,10 +1,10 @@
1
1
  import { t as WasmUtilProvider } from "./WasmUtilProvider-DqtPEKsY.esm.js";
2
- import { u as trueSightLog } from "./trueSightService-qeFOITec.esm.js";
3
- import { t as SDK_VERSION } from "./sdkVersion-DyRg1wpo.esm.js";
4
- import { S as BrowserEnvironmentProvider, n as getFingerprintEnabled, t as getDisableIpify, x as IpifyProvider } from "./sessionInitializer-B5OuCAfv.esm.js";
2
+ import { u as trueSightLog } from "./trueSightService-CI1XQJhE.esm.js";
3
+ import { t as SDK_VERSION } from "./sdkVersion-C53zG0EV.esm.js";
4
+ import { S as BrowserEnvironmentProvider, n as getFingerprintEnabled, t as getDisableIpify, x as IpifyProvider } from "./sessionInitializer-6cQFdVhh.esm.js";
5
5
  import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-CWvvmM2E.esm.js";
6
6
  import { t as MotionSensorProvider } from "./MotionSensorProvider-DYxh8TjR.esm.js";
7
- import { t as createDeepsightService } from "./deepsightService-DsaXB5-6.esm.js";
7
+ import { t as createDeepsightService } from "./deepsightService-BDm9pGJY.esm.js";
8
8
  //#region ../infra/src/providers/browser/VisibilityProvider.ts
9
9
  var VisibilityProvider = class {
10
10
  constructor() {
@@ -1,5 +1,5 @@
1
1
  import { t as api } from "./api-BG98lkot.esm.js";
2
- import { C as fingerprintSignalsReporter, _ as isBrowserSimulation, y as getThumbmarkId } from "./sessionInitializer-B5OuCAfv.esm.js";
2
+ import { C as fingerprintSignalsReporter, _ as isBrowserSimulation, y as getThumbmarkId } from "./sessionInitializer-6cQFdVhh.esm.js";
3
3
  import { t as addDeviceStats } from "./stats-D3Cxg6PL.esm.js";
4
4
  import { t as getParsedUserAgent } from "./getParsedUserAgent-DhQPeKqw.esm.js";
5
5
  import { t as getUserAgent } from "./getBrowser-CBiibsL-.esm.js";
@@ -1,3 +1,3 @@
1
- import { i as Screen, n as InputType, r as Question, t as DynamicFormsConfig } from "./types-BSBzhHRH2.js";
2
- import { c as DynamicFormsValidationErrors, n as DynamicFormsState, o as DynamicFormsResult, r as createDynamicFormsManager, s as dynamicFormsMachine, t as DynamicFormsManager } from "./dynamicFormsManager-C0dHs1ty.js";
1
+ import { i as Screen, n as InputType, r as Question, t as DynamicFormsConfig } from "./types-BSBzhHRH.js";
2
+ import { c as DynamicFormsValidationErrors, n as DynamicFormsState, o as DynamicFormsResult, r as createDynamicFormsManager, s as dynamicFormsMachine, t as DynamicFormsManager } from "./dynamicFormsManager-9kwY8Bf5.js";
3
3
  export { type DynamicFormsConfig, type DynamicFormsManager, type DynamicFormsResult, type DynamicFormsState, type DynamicFormsValidationErrors, type InputType, type Question, type Screen, createDynamicFormsManager, dynamicFormsMachine };
@@ -1,3 +1,3 @@
1
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-CxKKFx8B.esm.js";
2
- import { t as createDynamicFormsManager } from "./dynamicFormsManager-BG0ro9jL.esm.js";
1
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-DyW9lxKq.esm.js";
2
+ import { t as createDynamicFormsManager } from "./dynamicFormsManager-BDi68HX5.esm.js";
3
3
  export { createDynamicFormsManager, dynamicFormsMachine };
@@ -1,7 +1,7 @@
1
1
  import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
2
2
  import { t as Manager } from "./Manager-C9T5amUN.js";
3
3
  import "./Actor-DpTj5PFb.js";
4
- import { i as Screen, t as DynamicFormsConfig } from "./types-BSBzhHRH2.js";
4
+ import { i as Screen, t as DynamicFormsConfig } from "./types-BSBzhHRH.js";
5
5
  //#region src/modules/dynamic-forms/dynamicFormsFields.d.ts
6
6
  /** Map of `questionId` → currently-displayed i18n error key. */
7
7
  type DynamicFormsValidationErrors = Partial<Record<string, string>>;
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dh1gMk0J.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
4
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-CxKKFx8B.esm.js";
4
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-DyW9lxKq.esm.js";
5
5
  //#region src/modules/dynamic-forms/dynamicFormsActor.ts
6
6
  function createDynamicFormsActor(options) {
7
7
  return createActor(dynamicFormsMachine, { input: { config: options.config } }).start();
@@ -1,5 +1,5 @@
1
1
  import { t as api, u as endpoints } from "./api-BG98lkot.esm.js";
2
- import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-yEoFN7nS.esm.js";
2
+ import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-vItp-zoV.esm.js";
3
3
  import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
5
5
  import { t as isoDateToMs } from "./dateUtils-CvG0FvK8.esm.js";
package/dist/ekyb.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import "./Manager-C9T5amUN.js";
2
- import { c as AddressSuggestion } from "./types-D-cdiQD8.js";
3
- import { i as FlowModuleConfig } from "./types-tsXa6u2J.js";
4
- import { a as EkybValidationError, n as EkybCountry, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-CjUSw9yM.js";
5
- import { n as EkybState, o as ekybMachine, r as createEkybManager, t as EkybManager } from "./ekybManager-lZOHO33y.js";
2
+ import { u as AddressSuggestion } from "./types-B2FK_wYb.js";
3
+ import { i as FlowModuleConfig } from "./types-DuD8TRJU.js";
4
+ import { a as EkybValidationError, n as EkybCountry, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-C397LhmN.js";
5
+ import { n as EkybState, o as ekybMachine, r as createEkybManager, t as EkybManager } from "./ekybManager-TB6ZG5lX.js";
6
6
  //#region src/modules/ekyb/ekybServices.d.ts
7
7
  type EkybFlowConfig = FlowModuleConfig['EKYB'];
8
8
  //#endregion
package/dist/ekyb.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as isSupportedCountry, O as SUPPORTED_COUNTRIES, b as ALL_COUNTRIES, v as toEkybConfig, w as DEV_ONLY_COUNTRIES } from "./flowServices-Ck5Ykktg.esm.js";
2
- import { t as ekybMachine } from "./ekybStateMachine-DfEjemtn.esm.js";
3
- import { t as createEkybManager } from "./ekybManager-CriO4ylY.esm.js";
1
+ import { E as isSupportedCountry, b as ALL_COUNTRIES, v as toEkybConfig, w as SUPPORTED_COUNTRIES, x as DEV_ONLY_COUNTRIES } from "./flowServices-DDj0PiLX.esm.js";
2
+ import { t as ekybMachine } from "./ekybStateMachine-i-HrUy6z.esm.js";
3
+ import { t as createEkybManager } from "./ekybManager-lK1WUgFv.esm.js";
4
4
  export { ALL_COUNTRIES, DEV_ONLY_COUNTRIES, SUPPORTED_COUNTRIES, createEkybManager, ekybMachine, isSupportedCountry, toEkybConfig };
@@ -1,8 +1,8 @@
1
1
  import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
2
2
  import { t as Manager } from "./Manager-C9T5amUN.js";
3
3
  import "./Actor-DpTj5PFb.js";
4
- import { c as AddressSuggestion } from "./types-D-cdiQD8.js";
5
- import { i as EkybFormValues, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-CjUSw9yM.js";
4
+ import { u as AddressSuggestion } from "./types-B2FK_wYb.js";
5
+ import { i as EkybFormValues, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-C397LhmN.js";
6
6
  //#region src/modules/ekyb/ekybStateMachine.d.ts
7
7
  declare const ekybMachine: any;
8
8
  type EkybMachine = typeof ekybMachine;
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dh1gMk0J.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
4
- import { t as ekybMachine } from "./ekybStateMachine-DfEjemtn.esm.js";
4
+ import { t as ekybMachine } from "./ekybStateMachine-i-HrUy6z.esm.js";
5
5
  //#region src/modules/ekyb/ekybActor.ts
6
6
  /**
7
7
  * Creates and starts an eKYB actor.
@@ -1,34 +1,10 @@
1
1
  import { t as api, u as endpoints } from "./api-BG98lkot.esm.js";
2
- import { A as isSupportedCountry, C as COUNTRIES_WITH_CNPJ_VALIDATION, D as INVALID_CNPJ_PATTERNS, E as FIELD_ORDER, S as CNPJ_SECOND_DIGIT_FACTORS, T as FIELD_NAME_MAPPING, _ as sortModulesByOrder, b as ALL_COUNTRIES, g as requiresAddressValidation, h as isFieldOptional, k as UBO_FIELD_LABELS, m as hasAtLeastOneAddressField, n as getFlow, v as toEkybConfig, x as CNPJ_FIRST_DIGIT_FACTORS, y as ADDRESS_FIELDS } from "./flowServices-Ck5Ykktg.esm.js";
2
+ import { C as FIELD_ORDER, E as isSupportedCountry, S as FIELD_NAME_MAPPING, T as UBO_FIELD_LABELS, _ as sortModulesByOrder, b as ALL_COUNTRIES, g as requiresAddressValidation, h as isFieldOptional, m as hasAtLeastOneAddressField, n as getFlow, v as toEkybConfig, y as ADDRESS_FIELDS } from "./flowServices-DDj0PiLX.esm.js";
3
3
  import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
5
- import { a as checkSupport, c as getPostalCodeErrorKey, d as DYNAMIC_REQUIRED_KEY, f as STREET_LEVEL_REQUIRED_ERROR, h as usStateOptions, i as createBundledDefinitionSource, l as getPostalCodeMaxLength, m as getStreetLevelErrorForSuggestion, n as isFormDefinitionsEnabled, o as FIXED_DIGIT_POSTAL_CODE_LENGTH, p as fillFromSuggestion, r as resolveForm, s as formatPostalCode, t as debounceSearchActor, u as validatePostalCode } from "./addressSearch-CBw55d_y.esm.js";
5
+ import { a as createBundledDefinitionSource, c as formatPostalCode, d as validatePostalCode, f as DYNAMIC_REQUIRED_KEY, g as usStateOptions, h as getStreetLevelErrorForSuggestion, i as resolveForm, l as getPostalCodeErrorKey, m as fillFromSuggestion, o as checkSupport, p as STREET_LEVEL_REQUIRED_ERROR, r as isFormDefinitionsEnabled, s as FIXED_DIGIT_POSTAL_CODE_LENGTH, t as debounceSearchActor, u as getPostalCodeMaxLength } from "./addressSearch-B0cu1Cuf.esm.js";
6
+ import { n as requiresCnpjValidation, r as validateCNPJ } from "./cnpj-Co1ottYN.esm.js";
6
7
  //#region src/modules/ekyb/ekybValidators.ts
7
- function cleanCnpjString(cnpj) {
8
- return cnpj.replace(/\./g, "").replace(/\//g, "").replace(/-/g, "");
9
- }
10
- function calculateVerificationDigit(cnpjString, factors) {
11
- let digit = 11 - factors.reduce((acc, factor, index) => acc + Number.parseInt(cnpjString.charAt(index), 10) * factor, 0) % 11;
12
- if (digit >= 10) digit = 0;
13
- return digit.toString();
14
- }
15
- /**
16
- * Validates a Brazilian CNPJ number (14-digit checksum).
17
- * Accepts formatted (00.000.000/0000-00) or unformatted input.
18
- */
19
- function validateCNPJ(cnpjInput) {
20
- if (!cnpjInput || typeof cnpjInput !== "string") return false;
21
- let cnpj = cnpjInput.trim();
22
- if (cnpj.length === 18) cnpj = cleanCnpjString(cnpj);
23
- if (cnpj.length !== 14) return false;
24
- if (!/^\d+$/.test(cnpj)) return false;
25
- if (INVALID_CNPJ_PATTERNS.includes(cnpj)) return false;
26
- const first = calculateVerificationDigit(cnpj, CNPJ_FIRST_DIGIT_FACTORS);
27
- if (cnpj.charAt(12) !== first) return false;
28
- const second = calculateVerificationDigit(cnpj, CNPJ_SECOND_DIGIT_FACTORS);
29
- if (cnpj.charAt(13) !== second) return false;
30
- return true;
31
- }
32
8
  const buildPostalCodeParams = (country) => {
33
9
  const fixedLen = FIXED_DIGIT_POSTAL_CODE_LENGTH[country];
34
10
  if (fixedLen !== void 0) return { length: fixedLen };
@@ -169,10 +145,6 @@ function validateEkybUboField(ubos, fieldKey) {
169
145
  params: { fieldName: UBO_FIELD_LABELS[field] }
170
146
  };
171
147
  }
172
- /** Returns true when CNPJ validation applies for the given country. */
173
- function requiresCnpjValidation(country) {
174
- return COUNTRIES_WITH_CNPJ_VALIDATION.includes(country);
175
- }
176
148
  //#endregion
177
149
  //#region ../form-definitions/generated/ekyb.ts
178
150
  const EKYB_DEFINITIONS = {
@@ -367,7 +339,8 @@ const EKYB_SUPPORTED_IDS = {
367
339
  transforms: /* @__PURE__ */ new Set(),
368
340
  groupRules: /* @__PURE__ */ new Set(),
369
341
  optionLists: new Set(Object.keys(OPTION_LISTS)),
370
- conditions: /* @__PURE__ */ new Set()
342
+ conditions: /* @__PURE__ */ new Set(),
343
+ prefillSources: /* @__PURE__ */ new Set()
371
344
  };
372
345
  /** Today's UBO actions use a fixed limit and a single collection. */
373
346
  const UBO_COLLECTION = "ubos";
package/dist/ekyc.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as EkycValidationError, c as AddressSuggestion, i as EkycModuleConfig, o as EkycValidationErrors, t as EkycConfig } from "./types-D-cdiQD8.js";
2
- import { n as EkycState, o as ekycMachine, r as createEkycManager, t as EkycManager } from "./ekycManager-Ci7zQBP1.js";
1
+ import { c as EkycValidationErrors, i as EkycFieldDisplayMode, n as EkycDisplayModes, o as EkycModuleConfig, s as EkycValidationError, t as EkycConfig, u as AddressSuggestion } from "./types-B2FK_wYb.js";
2
+ import { n as EkycState, o as ekycMachine, r as createEkycManager, t as EkycManager } from "./ekycManager-BSQteIfC.js";
3
3
  //#region src/modules/ekyc/ekycUtils.d.ts
4
4
  /**
5
5
  * Normalizes any supported eKYC config input into a manager-ready `EkycConfig`.
@@ -18,4 +18,4 @@ import { n as EkycState, o as ekycMachine, r as createEkycManager, t as EkycMana
18
18
  */
19
19
  declare function toEkycConfig(config: Partial<EkycModuleConfig> & Partial<EkycConfig>): EkycConfig;
20
20
  //#endregion
21
- export { type AddressSuggestion, type EkycConfig, type EkycManager, type EkycModuleConfig, type EkycState, type EkycValidationError, type EkycValidationErrors, createEkycManager, ekycMachine, toEkycConfig };
21
+ export { type AddressSuggestion, type EkycConfig, type EkycDisplayModes, type EkycFieldDisplayMode, type EkycManager, type EkycModuleConfig, type EkycState, type EkycValidationError, type EkycValidationErrors, createEkycManager, ekycMachine, toEkycConfig };
package/dist/ekyc.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as toEkycConfig } from "./ekycUtils-tST1hG2_.esm.js";
2
- import { t as ekycMachine } from "./ekycStateMachine-16xp3B1E.esm.js";
3
- import { t as createEkycManager } from "./ekycManager-DbF76iGU.esm.js";
1
+ import { c as toEkycConfig } from "./ekycUtils-BFncpC4F.esm.js";
2
+ import { t as ekycMachine } from "./ekycStateMachine-DflJVAT5.esm.js";
3
+ import { t as createEkycManager } from "./ekycManager-BnHD1My0.esm.js";
4
4
  export { createEkycManager, ekycMachine, toEkycConfig };
@@ -1,7 +1,7 @@
1
1
  import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
2
2
  import { t as Manager } from "./Manager-C9T5amUN.js";
3
3
  import "./Actor-DpTj5PFb.js";
4
- import { c as AddressSuggestion, n as EkycFieldDef, o as EkycValidationErrors, r as EkycFormValues, t as EkycConfig } from "./types-D-cdiQD8.js";
4
+ import { a as EkycFormValues, c as EkycValidationErrors, r as EkycFieldDef, t as EkycConfig, u as AddressSuggestion } from "./types-B2FK_wYb.js";
5
5
  //#region src/modules/ekyc/ekycStateMachine.d.ts
6
6
  declare const ekycMachine: any;
7
7
  type EkycMachine = typeof ekycMachine;
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dh1gMk0J.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
4
- import { t as ekycMachine } from "./ekycStateMachine-16xp3B1E.esm.js";
4
+ import { t as ekycMachine } from "./ekycStateMachine-DflJVAT5.esm.js";
5
5
  //#region src/modules/ekyc/ekycActor.ts
6
6
  /**
7
7
  * Creates and starts an eKYC actor.