@incodetech/core 0.0.0-dev-20260728-af4e1aee → 0.0.0-dev-20260729-9461bce1

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 (139) hide show
  1. package/dist/{addressSearch-DEYnZoez.esm.js → addressSearch-oyJf4OZO.esm.js} +1 -1
  2. package/dist/ae-signature.esm.js +1 -1
  3. package/dist/antifraud.esm.js +2 -2
  4. package/dist/{antifraudManager-CFsD4BgV.esm.js → antifraudManager-CQ0zC0jZ.esm.js} +1 -1
  5. package/dist/{antifraudStateMachine-VB-aXHct.esm.js → antifraudStateMachine-MfVOsgZf.esm.js} +1 -1
  6. package/dist/authentication.d.ts +3 -3
  7. package/dist/authentication.esm.js +2 -2
  8. package/dist/{authenticationManager-B2KZQ9zw.d.ts → authenticationManager-BGM8bpD0.d.ts} +1 -1
  9. package/dist/{authenticationManager-BDkpqQ-5.esm.js → authenticationManager-G4OrneRc.esm.js} +2 -2
  10. package/dist/{authenticationStateMachine-lTogTlQv.esm.js → authenticationStateMachine-CRaoYKLp.esm.js} +4 -4
  11. package/dist/certificate-issuance.esm.js +1 -1
  12. package/dist/{certificateIssuanceStateMachine-Di_bLlkP.esm.js → certificateIssuanceStateMachine-BrbhvQ3k.esm.js} +1 -1
  13. package/dist/consent.esm.js +2 -2
  14. package/dist/{consentManager-0EiBXYtL.esm.js → consentManager-fOURtjzF.esm.js} +1 -1
  15. package/dist/{consentStateMachine-STURxpEc.esm.js → consentStateMachine-BCVxc6mI.esm.js} +1 -1
  16. package/dist/cross-document-data-match.esm.js +1 -1
  17. package/dist/{crossDocumentDataMatchManager-Dw7euiiZ.esm.js → crossDocumentDataMatchManager-DaJvZ8m1.esm.js} +1 -1
  18. package/dist/curp-validation.d.ts +1 -1
  19. package/dist/curp-validation.esm.js +2 -2
  20. package/dist/{curpValidationManager-BGj9U3E0.esm.js → curpValidationManager-CKRo8Mch.esm.js} +1 -1
  21. package/dist/{curpValidationManager-BEWD-Lvo.d.ts → curpValidationManager-DVGr7Fq7.d.ts} +1 -1
  22. package/dist/{curpValidationStateMachine-Dq6l4oeZ.esm.js → curpValidationStateMachine-DMdmcv5-.esm.js} +1 -1
  23. package/dist/custom-fields.esm.js +1 -1
  24. package/dist/custom-watchlist.esm.js +1 -1
  25. package/dist/{customWatchlistStateMachine-BuQML-pk.esm.js → customWatchlistStateMachine-DB2I9_OR.esm.js} +1 -1
  26. package/dist/{deepsightLoader-DDu_KUyv.esm.js → deepsightLoader-AdX0vjwb.esm.js} +2 -2
  27. package/dist/document-capture.d.ts +1 -1
  28. package/dist/document-capture.esm.js +2 -2
  29. package/dist/document-upload.d.ts +4 -4
  30. package/dist/document-upload.esm.js +1 -1
  31. package/dist/{documentCaptureManager-DBRQX16v.esm.js → documentCaptureManager-iTx0jqU4.esm.js} +1 -1
  32. package/dist/{documentCaptureManager-B-J1lXcH.d.ts → documentCaptureManager-pEqMY_Oo.d.ts} +4 -4
  33. package/dist/{documentCaptureStateMachine-BXgH9gGq.esm.js → documentCaptureStateMachine-CrdQsDn2.esm.js} +1 -1
  34. package/dist/dynamic-forms.d.ts +2 -2
  35. package/dist/dynamic-forms.esm.js +2 -2
  36. package/dist/{dynamicFormsManager-DI0sCyVB.esm.js → dynamicFormsManager-BNIbGJmh.esm.js} +7 -3
  37. package/dist/{dynamicFormsManager-BYac2uEY.d.ts → dynamicFormsManager-fhK0yINk.d.ts} +9 -1
  38. package/dist/{dynamicFormsStateMachine-BQqAwNQ-.esm.js → dynamicFormsStateMachine-DKUOlqmi.esm.js} +69 -4
  39. package/dist/ekyb.d.ts +1 -1
  40. package/dist/ekyb.esm.js +3 -3
  41. package/dist/{ekybManager-BQQyRMqw.esm.js → ekybManager-BUWJUews.esm.js} +1 -1
  42. package/dist/{ekybStateMachine-jsiqdGjv.esm.js → ekybStateMachine-CYLZDKC7.esm.js} +3 -3
  43. package/dist/ekyc.esm.js +2 -2
  44. package/dist/{ekycManager-Cl2e4Knv.esm.js → ekycManager-C6Wc4wRj.esm.js} +1 -1
  45. package/dist/{ekycStateMachine-9Mm7LBea.esm.js → ekycStateMachine-fHXM6pc0.esm.js} +2 -2
  46. package/dist/electronic-signature.esm.js +1 -1
  47. package/dist/{electronicSignatureManager-BXIpAJ5m.esm.js → electronicSignatureManager-hJ9YaAvD.esm.js} +1 -1
  48. package/dist/email.esm.js +2 -2
  49. package/dist/{emailManager-Dmt1YrtS.esm.js → emailManager-B_Q6MfUq.esm.js} +1 -1
  50. package/dist/{emailStateMachine-DQS-QMgQ.esm.js → emailStateMachine-DHfDd8LI.esm.js} +1 -1
  51. package/dist/{endpoints-CfRg7iAr.esm.js → endpoints-BwKx4Gne.esm.js} +1 -0
  52. package/dist/extensibility.d.ts +10 -10
  53. package/dist/extensibility.esm.js +24 -24
  54. package/dist/face-match.esm.js +2 -2
  55. package/dist/{faceCaptureManagerFactory-B2TUje5s.d.ts → faceCaptureManagerFactory-B92LFT16.d.ts} +3 -3
  56. package/dist/{faceCaptureManagerFactory-DaYwl0Yq.esm.js → faceCaptureManagerFactory-Bkc1HLRL.esm.js} +1 -1
  57. package/dist/{faceCaptureSetup-DlmX-9nD.esm.js → faceCaptureSetup-BQEQriDi.esm.js} +2 -2
  58. package/dist/{faceMatchManager-fPX11GnX.esm.js → faceMatchManager-Bh5wFMyh.esm.js} +1 -1
  59. package/dist/{faceMatchStateMachine-D_7UX1rV.esm.js → faceMatchStateMachine-QIf8gak4.esm.js} +1 -1
  60. package/dist/field-comparison.esm.js +1 -1
  61. package/dist/{fieldComparisonManager-USUE9qDr.esm.js → fieldComparisonManager-B_3cIH9t.esm.js} +1 -1
  62. package/dist/fiscal-qr.esm.js +1 -1
  63. package/dist/flow-events.d.ts +1 -1
  64. package/dist/flow.d.ts +6 -6
  65. package/dist/flow.esm.js +2 -2
  66. package/dist/{flowCompletionService-D5oIlcza.esm.js → flowCompletionService-6yWz7xwZ.esm.js} +1 -1
  67. package/dist/{flowServices-T5JoA_1N.esm.js → flowServices-Cf63iD-o.esm.js} +6 -4
  68. package/dist/geolocation.esm.js +2 -2
  69. package/dist/{geolocationManager-zeqAcVHC.esm.js → geolocationManager-gKopAolS.esm.js} +1 -1
  70. package/dist/{geolocationStateMachine-DxSETS9_.esm.js → geolocationStateMachine-Cac3eKge.esm.js} +1 -1
  71. package/dist/government-validation.esm.js +1 -1
  72. package/dist/{governmentValidationStateMachine-loZfWcU9.esm.js → governmentValidationStateMachine-Be1ruaNj.esm.js} +1 -1
  73. package/dist/home.d.ts +1 -1
  74. package/dist/id-ocr.esm.js +2 -2
  75. package/dist/id-verification.esm.js +2 -2
  76. package/dist/id.d.ts +2 -2
  77. package/dist/id.esm.js +2 -2
  78. package/dist/{idCaptureManager-D6fKtXhM.d.ts → idCaptureManager-C-WjmsN4.d.ts} +2 -2
  79. package/dist/{idCaptureManager-DaqabBBZ.esm.js → idCaptureManager-Dg8pxseH.esm.js} +1 -1
  80. package/dist/{idCaptureStateMachine-CU1CsT7x.esm.js → idCaptureStateMachine-B2e_wX0x.esm.js} +7 -7
  81. package/dist/{idOcrManager-CnIWzuqU.esm.js → idOcrManager-8WPK22Kq.esm.js} +1 -1
  82. package/dist/{idOcrStateMachine-Cqi8173Y.esm.js → idOcrStateMachine-Cfq5gJ0f.esm.js} +1 -1
  83. package/dist/{idVerificationManager-BTsyXjv6.esm.js → idVerificationManager-DBVs8TRS.esm.js} +1 -1
  84. package/dist/{idVerificationStateMachine-7BSciEJk.esm.js → idVerificationStateMachine-xtTSJDrB.esm.js} +1 -1
  85. package/dist/identity-reuse.esm.js +2 -2
  86. package/dist/{identityReuseManager-BjMJHKLP.esm.js → identityReuseManager-B8jNZNHu.esm.js} +1 -1
  87. package/dist/{identityReuseStateMachine-B0IFF3R7.esm.js → identityReuseStateMachine-DdwSrghH.esm.js} +1 -1
  88. package/dist/{index-X9serOZT.d.ts → index-CLMF0QLQ.d.ts} +1 -1
  89. package/dist/index.esm.js +1 -1
  90. package/dist/mandatory-consent.d.ts +2 -2
  91. package/dist/mandatory-consent.esm.js +2 -2
  92. package/dist/{mandatoryConsentManager-BOOjm7SU.esm.js → mandatoryConsentManager-BAKnA7U_.esm.js} +1 -1
  93. package/dist/{mandatoryConsentManager-IKpruo6V.d.ts → mandatoryConsentManager-Dcgmj1Cd.d.ts} +1 -1
  94. package/dist/{mandatoryConsentStateMachine-BP3npRnI.esm.js → mandatoryConsentStateMachine-3a1psaoK.esm.js} +1 -1
  95. package/dist/{onDeviceFaceResults-bUR2uNg0.esm.js → onDeviceFaceResults-DbSP6iTw.esm.js} +3 -3
  96. package/dist/personhood.d.ts +1 -1
  97. package/dist/personhood.esm.js +3 -3
  98. package/dist/phone.esm.js +2 -2
  99. package/dist/{phoneManager-C3aqq6jS.esm.js → phoneManager-dizEvG20.esm.js} +1 -1
  100. package/dist/{phoneStateMachine-CLGcLA8t.esm.js → phoneStateMachine-DxmYoLg8.esm.js} +1 -1
  101. package/dist/qe-signature.esm.js +1 -1
  102. package/dist/{recordingService-ChBo1rvx.esm.js → recordingService-C8jFtEKZ.esm.js} +2 -2
  103. package/dist/redirect-to-mobile.esm.js +2 -2
  104. package/dist/{redirectToMobileManager-BO0BVfgM.esm.js → redirectToMobileManager-BCInKNqp.esm.js} +1 -1
  105. package/dist/{redirectToMobileStateMachine-BQuhw8_L.esm.js → redirectToMobileStateMachine-TSHtrr5D.esm.js} +1 -1
  106. package/dist/selfie.d.ts +3 -3
  107. package/dist/selfie.esm.js +5 -5
  108. package/dist/{selfieErrorUtils-BAEYvNVr.esm.js → selfieErrorUtils-1aFaxF3Q.esm.js} +2 -2
  109. package/dist/{selfieManager-BT7dmOHi.d.ts → selfieManager-CxeMb2tM.d.ts} +1 -1
  110. package/dist/{selfieManager-9Eci1f5e.esm.js → selfieManager-KbDEkivf.esm.js} +2 -2
  111. package/dist/{selfieStateMachine-CKRTfYh8.esm.js → selfieStateMachine-BiuQiED3.esm.js} +3 -3
  112. package/dist/session-CrAUqlgX.esm.js +1 -0
  113. package/dist/session.d.ts +1 -1
  114. package/dist/session.esm.js +4 -4
  115. package/dist/{sessionInitializer-CgjN51b2.esm.js → sessionInitializer-DyJ4nLFJ.esm.js} +3 -3
  116. package/dist/{setup-BFGd-cxt.esm.js → setup-MlGXfrG8.esm.js} +4 -4
  117. package/dist/signature.esm.js +1 -1
  118. package/dist/{signatureStateMachine-zRLvEGTw.esm.js → signatureStateMachine-CCcFhvuv.esm.js} +1 -1
  119. package/dist/{stats-4DAk7TYl.esm.js → stats-CKtpeAhi.esm.js} +1 -1
  120. package/dist/stats.esm.js +1 -1
  121. package/dist/{types-BK-v1UYb.d.ts → types-BBQjIaK4.d.ts} +1 -1
  122. package/dist/{types-xIEGXWk8.d.ts → types-BSBzhHRH.d.ts} +9 -0
  123. package/dist/{types-DjHL5Wa9.d.ts → types-BX_XkMsQ.d.ts} +1 -1
  124. package/dist/{types-DznwkfTc.d.ts → types-C2n-6lCx.d.ts} +1 -1
  125. package/dist/types-CrUhpMDP.d.ts +6 -0
  126. package/dist/{types-NSJbROLr.d.ts → types-KPvmag_B.d.ts} +2 -0
  127. package/dist/video-selfie.d.ts +2 -2
  128. package/dist/video-selfie.esm.js +5 -5
  129. package/dist/wasm.esm.js +1 -1
  130. package/dist/watchlist-for-business.esm.js +1 -1
  131. package/dist/watchlist.esm.js +2 -2
  132. package/dist/{watchlistForBusinessStateMachine-Rc6BAwlr.esm.js → watchlistForBusinessStateMachine-DZZNfYsA.esm.js} +1 -1
  133. package/dist/{watchlistManager-FRMpgcWW.esm.js → watchlistManager-CMFZ0aqP.esm.js} +1 -1
  134. package/dist/{watchlistStateMachine-64y9XBjm.esm.js → watchlistStateMachine-CmhlwIhk.esm.js} +1 -1
  135. package/dist/workflow.d.ts +5 -5
  136. package/dist/workflow.esm.js +30 -30
  137. package/package.json +1 -1
  138. package/dist/session-B3d0Xtee.esm.js +0 -1
  139. package/dist/types-sK-eGomM.d.ts +0 -6
@@ -1,6 +1,6 @@
1
1
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
2
2
  import { t as api } from "./api-BDTZNnca.esm.js";
3
- import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
3
+ import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
4
4
  import { t as fromCallback } from "./xstate-actors.esm-CtI5S0f4.esm.js";
5
5
  const usStateOptions = Object.values({
6
6
  AL: {
@@ -1,4 +1,4 @@
1
- import { a as areAllConsented, n as electronicSignatureMachine, r as AE_CONSENT_KEYS, s as getDefaultConsentChecks, t as createElectronicSignatureManager } from "./electronicSignatureManager-BXIpAJ5m.esm.js";
1
+ import { a as areAllConsented, n as electronicSignatureMachine, r as AE_CONSENT_KEYS, s as getDefaultConsentChecks, t as createElectronicSignatureManager } from "./electronicSignatureManager-hJ9YaAvD.esm.js";
2
2
  //#region src/modules/ae-signature/index.ts
3
3
  function createAeSignatureManager(options) {
4
4
  return createElectronicSignatureManager({ config: {
@@ -1,3 +1,3 @@
1
- import { t as antifraudMachine } from "./antifraudStateMachine-VB-aXHct.esm.js";
2
- import { n as createAntifraudManagerFromActor, t as createAntifraudManager } from "./antifraudManager-CFsD4BgV.esm.js";
1
+ import { t as antifraudMachine } from "./antifraudStateMachine-MfVOsgZf.esm.js";
2
+ import { n as createAntifraudManagerFromActor, t as createAntifraudManager } from "./antifraudManager-CQ0zC0jZ.esm.js";
3
3
  export { antifraudMachine, createAntifraudManager, createAntifraudManagerFromActor };
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
- import { t as antifraudMachine } from "./antifraudStateMachine-VB-aXHct.esm.js";
4
+ import { t as antifraudMachine } from "./antifraudStateMachine-MfVOsgZf.esm.js";
5
5
  //#region src/modules/antifraud/antifraudActor.ts
6
6
  function createAntifraudActor() {
7
7
  return createActor(antifraudMachine).start();
@@ -1,5 +1,5 @@
1
1
  import { t as api } from "./api-BDTZNnca.esm.js";
2
- import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
2
+ import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
3
3
  import { t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
5
5
  //#region src/modules/antifraud/antifraudServices.ts
@@ -1,4 +1,4 @@
1
- import { b as createAuthenticationActor, v as AuthenticationActor, x as authenticationMachine, y as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-B2TUje5s.js";
2
- import { t as AuthenticationConfig } from "./types-sK-eGomM.js";
3
- import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager-B2KZQ9zw.js";
1
+ import { b as createAuthenticationActor, v as AuthenticationActor, x as authenticationMachine, y as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-B92LFT16.js";
2
+ import { t as AuthenticationConfig } from "./types-CrUhpMDP.js";
3
+ import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager-BGM8bpD0.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-lTogTlQv.esm.js";
2
- import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-BDkpqQ-5.esm.js";
1
+ import { t as authenticationMachine } from "./authenticationStateMachine-CRaoYKLp.esm.js";
2
+ import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-G4OrneRc.esm.js";
3
3
  export { authenticationMachine, createAuthenticationActor, createAuthenticationManager };
@@ -1,6 +1,6 @@
1
1
  import { t as Manager } from "./Manager-CQQ99QOI.js";
2
2
  import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
3
- import { n as FaceCaptureManagerState, t as FaceCaptureManager, v as AuthenticationActor, y as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-B2TUje5s.js";
3
+ import { n as FaceCaptureManagerState, t as FaceCaptureManager, v as AuthenticationActor, y as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-B92LFT16.js";
4
4
  //#region src/modules/authentication/authenticationManager.d.ts
5
5
  type AuthenticationState = FaceCaptureManagerState;
6
6
  /**
@@ -1,9 +1,9 @@
1
1
  import { t as WasmUtilProvider } from "./WasmUtilProvider-BrWOTaVG.esm.js";
2
2
  import { n as eventModuleNames } from "./events-Dy8PyVO5.esm.js";
3
3
  import { o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
- import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-DaYwl0Yq.esm.js";
4
+ import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-Bkc1HLRL.esm.js";
5
5
  import { t as BrowserStorageProvider } from "./BrowserStorageProvider-P6aUarE9.esm.js";
6
- import { t as authenticationMachine } from "./authenticationStateMachine-lTogTlQv.esm.js";
6
+ import { t as authenticationMachine } from "./authenticationStateMachine-CRaoYKLp.esm.js";
7
7
  //#region src/modules/authentication/authenticationActor.ts
8
8
  function createAuthenticationActor(options) {
9
9
  const dependencies = options.dependencies ?? {
@@ -1,10 +1,10 @@
1
1
  import { t as api } from "./api-BDTZNnca.esm.js";
2
- import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
3
- import { t as addDeviceStats } from "./stats-4DAk7TYl.esm.js";
2
+ import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
3
+ import { t as addDeviceStats } from "./stats-CKtpeAhi.esm.js";
4
4
  import { r as assign } from "./xstate.esm-Cf4e0Cfd.esm.js";
5
5
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
6
- import { t as faceCaptureMachine } from "./faceCaptureSetup-DlmX-9nD.esm.js";
7
- import { i as prepareOnDeviceFaceUpload, n as isOnDeviceMode, r as postOnDeviceFaceResults, t as defaultPrepareFaceUpload } from "./onDeviceFaceResults-bUR2uNg0.esm.js";
6
+ import { t as faceCaptureMachine } from "./faceCaptureSetup-BQEQriDi.esm.js";
7
+ import { i as prepareOnDeviceFaceUpload, n as isOnDeviceMode, r as postOnDeviceFaceResults, t as defaultPrepareFaceUpload } from "./onDeviceFaceResults-DbSP6iTw.esm.js";
8
8
  import { t as getDeviceClass } from "./getDeviceClass-BGmoQmjj.esm.js";
9
9
  import { t as FACE_ERROR_CODES } from "./types-BN5RPPIZ.esm.js";
10
10
  //#region src/modules/authentication/authenticationErrorUtils.ts
@@ -1,6 +1,6 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
2
2
  import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
3
- import { a as MIN_PASSWORD_LENGTH, i as validatePassword, n as emptyPasswordValidations, o as PASSWORD_VALIDATION_KEYS, r as isPasswordValid, s as REQUIREMENT_I18N_KEYS, t as certificateIssuanceMachine } from "./certificateIssuanceStateMachine-Di_bLlkP.esm.js";
3
+ import { a as MIN_PASSWORD_LENGTH, i as validatePassword, n as emptyPasswordValidations, o as PASSWORD_VALIDATION_KEYS, r as isPasswordValid, s as REQUIREMENT_I18N_KEYS, t as certificateIssuanceMachine } from "./certificateIssuanceStateMachine-BrbhvQ3k.esm.js";
4
4
  //#region src/modules/certificate-issuance/certificateIssuanceActor.ts
5
5
  /**
6
6
  * Creates and starts a certificate issuance actor.
@@ -1,5 +1,5 @@
1
1
  import { n as getApi, r as getToken } from "./api-BDTZNnca.esm.js";
2
- import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
2
+ import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
3
3
  import { r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
5
5
  import { t as externalFetch } from "./externalFetch-BKBThAUC.esm.js";
@@ -1,3 +1,3 @@
1
- import { t as consentMachine } from "./consentStateMachine-STURxpEc.esm.js";
2
- import { n as createConsentManagerFromActor, t as createConsentManager } from "./consentManager-0EiBXYtL.esm.js";
1
+ import { t as consentMachine } from "./consentStateMachine-BCVxc6mI.esm.js";
2
+ import { n as createConsentManagerFromActor, t as createConsentManager } from "./consentManager-fOURtjzF.esm.js";
3
3
  export { consentMachine, createConsentManager, createConsentManagerFromActor };
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
- import { t as consentMachine } from "./consentStateMachine-STURxpEc.esm.js";
4
+ import { t as consentMachine } from "./consentStateMachine-BCVxc6mI.esm.js";
5
5
  //#region src/modules/consent/consentActor.ts
6
6
  function createConsentActor(options) {
7
7
  return createActor(consentMachine, { input: { config: options.config } }).start();
@@ -1,5 +1,5 @@
1
1
  import { t as api } from "./api-BDTZNnca.esm.js";
2
- import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
2
+ import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
3
3
  import { r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
5
5
  //#region src/modules/consent/consentServices.ts
@@ -1,2 +1,2 @@
1
- import { n as createCrossDocumentDataMatchManagerFromActor, r as crossDocumentDataMatchMachine, t as createCrossDocumentDataMatchManager } from "./crossDocumentDataMatchManager-Dw7euiiZ.esm.js";
1
+ import { n as createCrossDocumentDataMatchManagerFromActor, r as crossDocumentDataMatchMachine, t as createCrossDocumentDataMatchManager } from "./crossDocumentDataMatchManager-DaJvZ8m1.esm.js";
2
2
  export { createCrossDocumentDataMatchManager, createCrossDocumentDataMatchManagerFromActor, crossDocumentDataMatchMachine };
@@ -1,6 +1,6 @@
1
1
  import { t as api } from "./api-BDTZNnca.esm.js";
2
2
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
3
- import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
3
+ import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
4
4
  import { c as createManager, o as createActor, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
5
5
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
6
6
  import { t as sleep } from "./ITimerCapability-DgdDzp8G.esm.js";
@@ -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-BEWD-Lvo.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-DVGr7Fq7.js";
2
2
  //#region src/modules/curp-validation/curpValidationUtils.d.ts
3
3
  type MexicanState = {
4
4
  value: string;
@@ -1,3 +1,3 @@
1
- import { i as mexicanStates, n as ENTER_CURP_FIELD, r as GENERATE_CURP_FIELDS, t as curpValidationMachine } from "./curpValidationStateMachine-Dq6l4oeZ.esm.js";
2
- import { n as createCurpValidationManagerFromActor, t as createCurpValidationManager } from "./curpValidationManager-BGj9U3E0.esm.js";
1
+ import { i as mexicanStates, n as ENTER_CURP_FIELD, r as GENERATE_CURP_FIELDS, t as curpValidationMachine } from "./curpValidationStateMachine-DMdmcv5-.esm.js";
2
+ import { n as createCurpValidationManagerFromActor, t as createCurpValidationManager } from "./curpValidationManager-CKRo8Mch.esm.js";
3
3
  export { ENTER_CURP_FIELD, GENERATE_CURP_FIELDS, createCurpValidationManager, createCurpValidationManagerFromActor, curpValidationMachine, mexicanStates };
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
- import { t as curpValidationMachine } from "./curpValidationStateMachine-Dq6l4oeZ.esm.js";
4
+ import { t as curpValidationMachine } from "./curpValidationStateMachine-DMdmcv5-.esm.js";
5
5
  //#region src/modules/curp-validation/curpValidationActor.ts
6
6
  function createCurpValidationActor(options) {
7
7
  return createActor(curpValidationMachine, { input: { config: options.config } }).start();
@@ -1,7 +1,7 @@
1
1
  import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
2
2
  import { t as Manager } from "./Manager-CQQ99QOI.js";
3
3
  import "./Actor-iTq7YY48.js";
4
- import { i as FlowModuleConfig } from "./types-NSJbROLr.js";
4
+ import { i as FlowModuleConfig } from "./types-KPvmag_B.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,5 +1,5 @@
1
1
  import { t as api } from "./api-BDTZNnca.esm.js";
2
- import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
2
+ import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
3
3
  import { r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
5
5
  //#region src/modules/curp-validation/curpValidationUtils.ts
@@ -1,7 +1,7 @@
1
1
  import { t as api } from "./api-BDTZNnca.esm.js";
2
2
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
3
3
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
4
- import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
4
+ import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
5
5
  import { c as createManager, o as createActor, r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
6
6
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
7
7
  import { t as isoDateToMs } from "./dateUtils-CvG0FvK8.esm.js";
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
- import { t as customWatchlistMachine } from "./customWatchlistStateMachine-BuQML-pk.esm.js";
4
+ import { t as customWatchlistMachine } from "./customWatchlistStateMachine-DB2I9_OR.esm.js";
5
5
  //#region src/modules/custom-watchlist/customWatchlistActor.ts
6
6
  function createCustomWatchlistActor() {
7
7
  return createActor(customWatchlistMachine).start();
@@ -1,5 +1,5 @@
1
1
  import { t as api } from "./api-BDTZNnca.esm.js";
2
- import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
2
+ import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
3
3
  import { r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
5
5
  //#region src/modules/custom-watchlist/customWatchlistServices.ts
@@ -1,7 +1,7 @@
1
1
  import { t as WasmUtilProvider } from "./WasmUtilProvider-BrWOTaVG.esm.js";
2
2
  import { t as api } from "./api-BDTZNnca.esm.js";
3
- import { t as addDeviceStats } from "./stats-4DAk7TYl.esm.js";
4
- import { g as getThumbmarkId, m as IpifyProvider, n as getFingerprintEnabled, p as isBrowserSimulation, t as getDisableIpify, v as BrowserEnvironmentProvider } from "./sessionInitializer-CgjN51b2.esm.js";
3
+ import { t as addDeviceStats } from "./stats-CKtpeAhi.esm.js";
4
+ import { g as getThumbmarkId, m as IpifyProvider, n as getFingerprintEnabled, p as isBrowserSimulation, t as getDisableIpify, v as BrowserEnvironmentProvider } from "./sessionInitializer-DyJ4nLFJ.esm.js";
5
5
  import { t as getParsedUserAgent } from "./getParsedUserAgent-pJjATANs.esm.js";
6
6
  import { t as getUserAgent } from "./getBrowser-Cb8Zgrgp.esm.js";
7
7
  import { t as MotionSensorProvider } from "./MotionSensorProvider-DYvM90IX.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 } from "./types-B4BObr_7.js";
2
- import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-B-J1lXcH.js";
2
+ import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-pEqMY_Oo.js";
3
3
  export { DOCUMENT_CAPTURE_ERROR_CODES, type DocumentCaptureActor, type DocumentCaptureConfig, type DocumentCaptureErrorCode, type DocumentCaptureManager, type DocumentCaptureNextPageType, type DocumentCaptureState, type DocumentType, createDocumentCaptureManager, createDocumentCaptureManagerFromActor, documentCaptureMachine };
@@ -1,3 +1,3 @@
1
- import { n as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-BXgH9gGq.esm.js";
2
- import { n as createDocumentCaptureManagerFromActor, t as createDocumentCaptureManager } from "./documentCaptureManager-DBRQX16v.esm.js";
1
+ import { n as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-CrdQsDn2.esm.js";
2
+ import { n as createDocumentCaptureManagerFromActor, t as createDocumentCaptureManager } from "./documentCaptureManager-iTx0jqU4.esm.js";
3
3
  export { DOCUMENT_CAPTURE_ERROR_CODES, createDocumentCaptureManager, createDocumentCaptureManagerFromActor, documentCaptureMachine };
@@ -38,6 +38,10 @@ declare const documentUploadMachine: StateMachine<DocumentUploadContext, {
38
38
  id: string | undefined;
39
39
  };
40
40
  }>, Values<{
41
+ setError: {
42
+ type: "setError";
43
+ params: NonReducibleUnknown;
44
+ };
41
45
  setStream: {
42
46
  type: "setStream";
43
47
  params: NonReducibleUnknown;
@@ -50,10 +54,6 @@ declare const documentUploadMachine: StateMachine<DocumentUploadContext, {
50
54
  type: "setProgress";
51
55
  params: NonReducibleUnknown;
52
56
  };
53
- setError: {
54
- type: "setError";
55
- params: NonReducibleUnknown;
56
- };
57
57
  clearError: {
58
58
  type: "clearError";
59
59
  params: NonReducibleUnknown;
@@ -1,6 +1,6 @@
1
1
  import { t as api } from "./api-BDTZNnca.esm.js";
2
2
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
3
- import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
3
+ import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
4
4
  import { c as createManager, o as createActor, r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
5
5
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
6
6
  import { a as stopCameraStream } from "./camera-BmFEyPP_.esm.js";
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
- import { n as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-BXgH9gGq.esm.js";
4
+ import { n as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-CrdQsDn2.esm.js";
5
5
  //#region src/modules/document-capture/documentCaptureActor.ts
6
6
  function createDocumentCaptureActor(options) {
7
7
  return createActor(documentCaptureMachine, { input: { config: options.config } }).start();
@@ -98,6 +98,10 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
98
98
  id: string | undefined;
99
99
  };
100
100
  }>, Values<{
101
+ decrementAttemptsRemaining: {
102
+ type: "decrementAttemptsRemaining";
103
+ params: NonReducibleUnknown;
104
+ };
101
105
  setStream: {
102
106
  type: "setStream";
103
107
  params: NonReducibleUnknown;
@@ -114,10 +118,6 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
114
118
  type: "stopStream";
115
119
  params: NonReducibleUnknown;
116
120
  };
117
- decrementAttemptsRemaining: {
118
- type: "decrementAttemptsRemaining";
119
- params: NonReducibleUnknown;
120
- };
121
121
  setCapturedDocument: {
122
122
  type: "setCapturedDocument";
123
123
  params: NonReducibleUnknown;
@@ -1,5 +1,5 @@
1
1
  import { t as api } from "./api-BDTZNnca.esm.js";
2
- import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
2
+ import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
3
3
  import { r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
5
5
  import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-CkHL1BjH.esm.js";
@@ -1,3 +1,3 @@
1
- import { i as Screen, n as InputType, r as Question, t as DynamicFormsConfig } from "./types-xIEGXWk8.js";
2
- import { c as DynamicFormsValidationErrors, n as DynamicFormsState, o as DynamicFormsResult, r as createDynamicFormsManager, s as dynamicFormsMachine, t as DynamicFormsManager } from "./dynamicFormsManager-BYac2uEY.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-fhK0yINk.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-BQqAwNQ-.esm.js";
2
- import { t as createDynamicFormsManager } from "./dynamicFormsManager-DI0sCyVB.esm.js";
1
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-DKUOlqmi.esm.js";
2
+ import { t as createDynamicFormsManager } from "./dynamicFormsManager-BNIbGJmh.esm.js";
3
3
  export { createDynamicFormsManager, dynamicFormsMachine };
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-BQqAwNQ-.esm.js";
4
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-DKUOlqmi.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();
@@ -79,7 +79,9 @@ function mapState(snapshot) {
79
79
  answers: context.answers,
80
80
  answerValidity: context.answerValidity,
81
81
  validationErrors: context.validationErrors,
82
- canSubmit: hasNoErrors(context.validationErrors)
82
+ canSubmit: hasNoErrors(context.validationErrors),
83
+ prefilledQuestionIds: Object.keys(context.prefilledValues),
84
+ nonEditableQuestionIds: context.nonEditableQuestionIds
83
85
  };
84
86
  if (typedSnapshot.matches("submitting")) {
85
87
  const currentScreen = context.screens[context.currentScreenIndex];
@@ -90,7 +92,9 @@ function mapState(snapshot) {
90
92
  currentScreen,
91
93
  answers: context.answers,
92
94
  answerValidity: context.answerValidity,
93
- validationErrors: context.validationErrors
95
+ validationErrors: context.validationErrors,
96
+ prefilledQuestionIds: Object.keys(context.prefilledValues),
97
+ nonEditableQuestionIds: context.nonEditableQuestionIds
94
98
  };
95
99
  }
96
100
  if (typedSnapshot.matches("success")) return { status: "success" };
@@ -1,7 +1,7 @@
1
1
  import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
2
2
  import { t as Manager } from "./Manager-CQQ99QOI.js";
3
3
  import "./Actor-iTq7YY48.js";
4
- import { i as Screen, t as DynamicFormsConfig } from "./types-xIEGXWk8.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>>;
@@ -46,6 +46,10 @@ type DynamicFormsInputtingState = {
46
46
  answerValidity: Record<string, boolean>;
47
47
  validationErrors?: DynamicFormsValidationErrors;
48
48
  canSubmit: boolean;
49
+ /** questionIds that received a prefilled value — show the "from ID" marker. */
50
+ prefilledQuestionIds: string[];
51
+ /** questionIds prefilled with a non-editable value — render read-only. */
52
+ nonEditableQuestionIds: string[];
49
53
  };
50
54
  /**
51
55
  * Submitting the current screen's answers to the backend.
@@ -65,6 +69,10 @@ type DynamicFormsSubmittingState = {
65
69
  answers: Record<string, string>;
66
70
  answerValidity: Record<string, boolean>;
67
71
  validationErrors?: DynamicFormsValidationErrors;
72
+ /** questionIds that received a prefilled value — show the "from ID" marker. */
73
+ prefilledQuestionIds: string[];
74
+ /** questionIds prefilled with a non-editable value — render read-only. */
75
+ nonEditableQuestionIds: string[];
68
76
  };
69
77
  /**
70
78
  * All screens submitted — success screen visible for ~3 s before
@@ -1,5 +1,5 @@
1
1
  import { t as api } from "./api-BDTZNnca.esm.js";
2
- import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
2
+ import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
3
3
  import { r as toIncodeApiError, t as IncodeApiError } from "./apiError-B-PkYxln.esm.js";
4
4
  import { r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
5
5
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
@@ -75,6 +75,16 @@ async function fetchForms(flowId, signal) {
75
75
  if (!res.ok) throw new Error(`GET ${endpoints.moduleConfig} failed: ${res.status} ${res.statusText}`);
76
76
  return res.data;
77
77
  }
78
+ /**
79
+ * Fetches Form Pre-fill values resolved from the interview. Keyed by session
80
+ * token (no flowId param). Called once per form only when >=1 question has a
81
+ * `prefillSource`. A failure throws — the machine degrades to a blank form.
82
+ */
83
+ async function fetchPrefill(signal) {
84
+ const res = await api.get(endpoints.dynamicFormsPrefill, { signal });
85
+ if (!res.ok) throw new Error(`GET ${endpoints.dynamicFormsPrefill} failed: ${res.status} ${res.statusText}`);
86
+ return res.data;
87
+ }
78
88
  async function submitFormAnswer(params, signal) {
79
89
  try {
80
90
  return (await api.post(endpoints.dynamicFormsSubmitAnswer, {
@@ -138,6 +148,23 @@ function buildPrefillAnswers(screens, prefillValue) {
138
148
  if (questions.length !== 1) return {};
139
149
  return { [questions[0].questionId]: value };
140
150
  }
151
+ const PREFILL_UNSUPPORTED_TYPES = /* @__PURE__ */ new Set(["PHONE", "MULTISELECT"]);
152
+ function effectiveInputType(question) {
153
+ return question.inputType ?? question.overrides ?? "TEXT";
154
+ }
155
+ function isPrefillSupported(question) {
156
+ return !PREFILL_UNSUPPORTED_TYPES.has(effectiveInputType(question));
157
+ }
158
+ /** The prefilled values that belong to a given screen's questions. */
159
+ function pickPrefillForScreen(formScreen, prefilledValues) {
160
+ if (!formScreen) return {};
161
+ const picked = {};
162
+ for (const question of formScreen.questions) {
163
+ const value = prefilledValues[question.questionId];
164
+ if (value !== void 0) picked[question.questionId] = value;
165
+ }
166
+ return picked;
167
+ }
141
168
  const dynamicFormsMachine = setup({
142
169
  types: {
143
170
  context: {},
@@ -148,6 +175,7 @@ const dynamicFormsMachine = setup({
148
175
  fetchScreens: fromPromise(async ({ input, signal }) => {
149
176
  return fetchForms(input.flowId, signal);
150
177
  }),
178
+ fetchPrefill: fromPromise(async ({ signal }) => fetchPrefill(signal)),
151
179
  submitScreenAnswers: fromPromise(async ({ input, signal }) => {
152
180
  const { screen: formScreen, answers, submittedAnswers } = input;
153
181
  const submitted = { ...submittedAnswers };
@@ -212,13 +240,34 @@ const dynamicFormsMachine = setup({
212
240
  const nextScreen = context.screens[nextIndex];
213
241
  return {
214
242
  currentScreenIndex: nextIndex,
215
- answers: {},
243
+ answers: pickPrefillForScreen(nextScreen, context.prefilledValues),
216
244
  submittedAnswers: {},
217
245
  answerValidity: {},
218
246
  currentScreenFields: nextScreen ? buildScreenFields(nextScreen) : [],
219
247
  validationErrors: void 0
220
248
  };
221
249
  }),
250
+ seedPrefill: assign(({ context, event }) => {
251
+ const resolved = event.output;
252
+ const typeById = /* @__PURE__ */ new Map();
253
+ for (const formScreen of context.screens) for (const question of formScreen.questions) typeById.set(question.questionId, effectiveInputType(question));
254
+ const prefilledValues = {};
255
+ const nonEditableQuestionIds = [];
256
+ for (const questionId of Object.keys(resolved)) {
257
+ const type = typeById.get(questionId);
258
+ if (!type || PREFILL_UNSUPPORTED_TYPES.has(type)) continue;
259
+ prefilledValues[questionId] = resolved[questionId].value;
260
+ if (resolved[questionId].editable === false) nonEditableQuestionIds.push(questionId);
261
+ }
262
+ return {
263
+ prefilledValues,
264
+ nonEditableQuestionIds,
265
+ answers: {
266
+ ...context.answers,
267
+ ...prefilledValues
268
+ }
269
+ };
270
+ }),
222
271
  markCompleted: assign({ result: "completed" }),
223
272
  markSkipped: assign({ result: "skipped" }),
224
273
  setLoginHintError: assign(({ context, event }) => {
@@ -233,6 +282,7 @@ const dynamicFormsMachine = setup({
233
282
  guards: {
234
283
  hasPreloadedScreens: ({ context }) => (context.config.screens?.length ?? 0) > 0,
235
284
  hasFlowId: ({ context }) => !!context.config.flowId,
285
+ hasPrefillSources: ({ context }) => context.screens.some((formScreen) => formScreen.questions.some((question) => question.prefillSource != null && isPrefillSupported(question))),
236
286
  isLastScreen: ({ context }) => context.currentScreenIndex >= context.screens.length - 1,
237
287
  isScreenValid: ({ context }) => Object.keys(context.validationErrors ?? {}).length === 0,
238
288
  isLoginHintLocked: ({ event }) => {
@@ -258,13 +308,15 @@ const dynamicFormsMachine = setup({
258
308
  submittedAnswers: {},
259
309
  answerValidity: {},
260
310
  currentScreenFields: firstScreen ? buildScreenFields(firstScreen) : [],
311
+ prefilledValues: {},
312
+ nonEditableQuestionIds: [],
261
313
  result: null
262
314
  };
263
315
  },
264
316
  states: {
265
317
  idle: { on: { LOAD: [
266
318
  {
267
- target: "inputting",
319
+ target: "resolvingPrefill",
268
320
  guard: "hasPreloadedScreens"
269
321
  },
270
322
  {
@@ -278,7 +330,7 @@ const dynamicFormsMachine = setup({
278
330
  src: "fetchScreens",
279
331
  input: ({ context }) => ({ flowId: context.config.flowId ?? "" }),
280
332
  onDone: {
281
- target: "inputting",
333
+ target: "resolvingPrefill",
282
334
  actions: "setScreens"
283
335
  },
284
336
  onError: {
@@ -286,6 +338,19 @@ const dynamicFormsMachine = setup({
286
338
  actions: "markSkipped"
287
339
  }
288
340
  } },
341
+ resolvingPrefill: { always: [{
342
+ guard: "hasPrefillSources",
343
+ target: "prefilling"
344
+ }, { target: "inputting" }] },
345
+ prefilling: { invoke: {
346
+ id: "fetchPrefill",
347
+ src: "fetchPrefill",
348
+ onDone: {
349
+ target: "inputting",
350
+ actions: "seedPrefill"
351
+ },
352
+ onError: { target: "inputting" }
353
+ } },
289
354
  inputting: {
290
355
  initial: "editing",
291
356
  states: {
package/dist/ekyb.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./StateMachine-EDpYWy0i.js";
2
2
  import { c as AddressSuggestion } from "./types-Bk_6dmDa.js";
3
- import { i as FlowModuleConfig } from "./types-NSJbROLr.js";
3
+ import { i as FlowModuleConfig } from "./types-KPvmag_B.js";
4
4
  import { a as EkybValidationError, n as EkybCountry, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-BfHiko5D.js";
5
5
  import { n as EkybState, o as ekybMachine, r as createEkybManager, t as EkybManager } from "./ekybManager-Dzswb_b8.js";
6
6
  //#region src/modules/ekyb/ekybServices.d.ts
package/dist/ekyb.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as SUPPORTED_COUNTRIES, O as isSupportedCountry, S as DEV_ONLY_COUNTRIES, g as toEkybConfig, v as ALL_COUNTRIES } from "./flowServices-T5JoA_1N.esm.js";
2
- import { t as ekybMachine } from "./ekybStateMachine-jsiqdGjv.esm.js";
3
- import { t as createEkybManager } from "./ekybManager-BQQyRMqw.esm.js";
1
+ import { E as SUPPORTED_COUNTRIES, O as isSupportedCountry, S as DEV_ONLY_COUNTRIES, g as toEkybConfig, v as ALL_COUNTRIES } from "./flowServices-Cf63iD-o.esm.js";
2
+ import { t as ekybMachine } from "./ekybStateMachine-CYLZDKC7.esm.js";
3
+ import { t as createEkybManager } from "./ekybManager-BUWJUews.esm.js";
4
4
  export { ALL_COUNTRIES, DEV_ONLY_COUNTRIES, SUPPORTED_COUNTRIES, createEkybManager, ekybMachine, isSupportedCountry, toEkybConfig };
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dy8PyVO5.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
4
- import { t as ekybMachine } from "./ekybStateMachine-jsiqdGjv.esm.js";
4
+ import { t as ekybMachine } from "./ekybStateMachine-CYLZDKC7.esm.js";
5
5
  //#region src/modules/ekyb/ekybActor.ts
6
6
  /**
7
7
  * Creates and starts an eKYB actor.
@@ -1,9 +1,9 @@
1
1
  import { t as api } from "./api-BDTZNnca.esm.js";
2
- import { t as endpoints } from "./endpoints-CfRg7iAr.esm.js";
3
- import { C as FIELD_NAME_MAPPING, D as UBO_FIELD_LABELS, O as isSupportedCountry, T as INVALID_CNPJ_PATTERNS, _ as ADDRESS_FIELDS, b as CNPJ_SECOND_DIGIT_FACTORS, f as hasAtLeastOneAddressField, g as toEkybConfig, h as sortModulesByOrder, m as requiresAddressValidation, p as isFieldOptional, t as getFlow, v as ALL_COUNTRIES, w as FIELD_ORDER, x as COUNTRIES_WITH_CNPJ_VALIDATION, y as CNPJ_FIRST_DIGIT_FACTORS } from "./flowServices-T5JoA_1N.esm.js";
2
+ import { t as endpoints } from "./endpoints-BwKx4Gne.esm.js";
3
+ import { C as FIELD_NAME_MAPPING, D as UBO_FIELD_LABELS, O as isSupportedCountry, T as INVALID_CNPJ_PATTERNS, _ as ADDRESS_FIELDS, b as CNPJ_SECOND_DIGIT_FACTORS, f as hasAtLeastOneAddressField, g as toEkybConfig, h as sortModulesByOrder, m as requiresAddressValidation, p as isFieldOptional, t as getFlow, v as ALL_COUNTRIES, w as FIELD_ORDER, x as COUNTRIES_WITH_CNPJ_VALIDATION, y as CNPJ_FIRST_DIGIT_FACTORS } from "./flowServices-Cf63iD-o.esm.js";
4
4
  import { r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
5
5
  import { n as fromPromise } from "./xstate-actors.esm-CtI5S0f4.esm.js";
6
- import { a as getPostalCodeMaxLength, c as STREET_LEVEL_REQUIRED_ERROR, d as usStateOptions, i as getPostalCodeErrorKey, l as fillFromSuggestion, n as FIXED_DIGIT_POSTAL_CODE_LENGTH, o as validatePostalCode, r as formatPostalCode, s as DYNAMIC_REQUIRED_KEY, t as debounceSearchActor, u as getStreetLevelErrorForSuggestion } from "./addressSearch-DEYnZoez.esm.js";
6
+ import { a as getPostalCodeMaxLength, c as STREET_LEVEL_REQUIRED_ERROR, d as usStateOptions, i as getPostalCodeErrorKey, l as fillFromSuggestion, n as FIXED_DIGIT_POSTAL_CODE_LENGTH, o as validatePostalCode, r as formatPostalCode, s as DYNAMIC_REQUIRED_KEY, t as debounceSearchActor, u as getStreetLevelErrorForSuggestion } from "./addressSearch-oyJf4OZO.esm.js";
7
7
  //#region src/modules/ekyb/ekybValidators.ts
8
8
  function cleanCnpjString(cnpj) {
9
9
  return cnpj.replace(/\./g, "").replace(/\//g, "").replace(/-/g, "");
package/dist/ekyc.esm.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { i as toEkycConfig } from "./ekycUtils-Dew1rBG0.esm.js";
2
- import { t as ekycMachine } from "./ekycStateMachine-9Mm7LBea.esm.js";
3
- import { t as createEkycManager } from "./ekycManager-Cl2e4Knv.esm.js";
2
+ import { t as ekycMachine } from "./ekycStateMachine-fHXM6pc0.esm.js";
3
+ import { t as createEkycManager } from "./ekycManager-C6Wc4wRj.esm.js";
4
4
  export { createEkycManager, ekycMachine, toEkycConfig };