@incodetech/core 2.4.1-agentic.4 → 2.4.1-agentic.6

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 (201) hide show
  1. package/dist/DateFormattingProvider-DPq9zco-.esm.js +25 -0
  2. package/dist/{FaceDetectionProvider-CuWUIxqF.esm.js → FaceDetectionProvider-DjXSD4uI.esm.js} +7 -7
  3. package/dist/addressSearch-D6cKPWmk.esm.js +72 -0
  4. package/dist/ae-signature.esm.js +1 -1
  5. package/dist/antifraud.esm.js +2 -2
  6. package/dist/{antifraudManager-BObuHBjn.esm.js → antifraudManager-CbIwM35x.esm.js} +2 -2
  7. package/dist/{antifraudStateMachine-Dfrd2-26.esm.js → antifraudStateMachine-qNNXrlsP.esm.js} +1 -1
  8. package/dist/{api-CpP4PS4S.esm.js → api-C_P9YXbL.esm.js} +1 -0
  9. package/dist/{apiError-CUF7K_XZ.esm.js → apiError-DzZ5OriE.esm.js} +1 -1
  10. package/dist/{attemptCarry-WOkfvFMw.esm.js → attemptCarry-BaAXPR_w.esm.js} +1 -1
  11. package/dist/authentication.d.ts +3 -3
  12. package/dist/authentication.esm.js +2 -2
  13. package/dist/{authenticationManager-PlKb1nOo.esm.js → authenticationManager-B-l8_8tH.esm.js} +4 -4
  14. package/dist/{authenticationManager-CWmh7aSY.d.ts → authenticationManager-DKLRA91K.d.ts} +1 -1
  15. package/dist/{authenticationStateMachine-BFR0oKdS.esm.js → authenticationStateMachine-Cg00UH7p.esm.js} +3 -3
  16. package/dist/{browser-pQZA35G2-C0fRj-ID.esm.js → browser-pQZA35G2-DJEJnmCd.esm.js} +1 -1
  17. package/dist/certificate-issuance.esm.js +2 -2
  18. package/dist/{certificateIssuanceManager-IRO_1Ug6.esm.js → certificateIssuanceManager-CrF3wjCH.esm.js} +2 -2
  19. package/dist/{certificateIssuanceStateMachine-CjxTBZuH.esm.js → certificateIssuanceStateMachine-uSD9IkcV.esm.js} +1 -1
  20. package/dist/consent.d.ts +1 -1
  21. package/dist/consent.esm.js +2 -2
  22. package/dist/{consentManager-DMlSL6Ax.esm.js → consentManager-BD7wwgat.esm.js} +2 -2
  23. package/dist/{consentManager-D8rgr5Dv.d.ts → consentManager-DXetSxcx.d.ts} +5 -5
  24. package/dist/{consentStateMachine-DIYSMxKQ.esm.js → consentStateMachine-BAiLDE3D.esm.js} +1 -1
  25. package/dist/{cpf-uAZTPUBy.esm.js → cpf-BIADjddF.esm.js} +1 -25
  26. package/dist/cross-document-data-match.esm.js +1 -1
  27. package/dist/{crossDocumentDataMatchManager-BFTdiEDB.esm.js → crossDocumentDataMatchManager-CUc1uACE.esm.js} +2 -2
  28. package/dist/curp-validation.d.ts +1 -1
  29. package/dist/curp-validation.esm.js +2 -2
  30. package/dist/{curpValidationManager-z8428oCM.d.ts → curpValidationManager-Crz3bnCo.d.ts} +1 -1
  31. package/dist/{curpValidationManager-DNpC3wyf.esm.js → curpValidationManager-DBfZSQbu.esm.js} +2 -2
  32. package/dist/{curpValidationStateMachine-B3iVsDyt.esm.js → curpValidationStateMachine-DyAEyScb.esm.js} +2 -2
  33. package/dist/custom-fields.esm.js +1 -1
  34. package/dist/custom-watchlist.esm.js +2 -2
  35. package/dist/{customFieldsManager-CvI-pDT3.esm.js → customFieldsManager-BZhIPyaY.esm.js} +2 -2
  36. package/dist/{customWatchlistManager-BuHtUb0y.esm.js → customWatchlistManager-B4cmxi__.esm.js} +2 -2
  37. package/dist/{customWatchlistStateMachine-CiVD9wyF.esm.js → customWatchlistStateMachine-ZZoDGRAZ.esm.js} +1 -1
  38. package/dist/{deepsightLoader-DkADlKGZ.esm.js → deepsightLoader-S0ktD2dZ.esm.js} +3 -3
  39. package/dist/{addressSearch-DzbE9Ogt.esm.js → definitionSource-1vPLtuXE.esm.js} +1 -72
  40. package/dist/{desktopCameraElection-BGMtYwk3.esm.js → desktopCameraElection-m2dAj6Zu.esm.js} +1 -1
  41. package/dist/document-capture.d.ts +1 -1
  42. package/dist/document-capture.esm.js +2 -2
  43. package/dist/{documentCaptureManager-CD5iQiUI.d.ts → documentCaptureManager-DDfviFg0.d.ts} +1 -1
  44. package/dist/{documentCaptureManager-DLPqruXJ.esm.js → documentCaptureManager-v57klTso.esm.js} +2 -2
  45. package/dist/{documentCaptureStateMachine-DCvWQhFG.esm.js → documentCaptureStateMachine-CgCtimSa.esm.js} +2 -2
  46. package/dist/dynamic-forms.esm.js +2 -2
  47. package/dist/{dynamicFormsManager-CzEx6NHv.esm.js → dynamicFormsManager-BKAlol5I.esm.js} +2 -2
  48. package/dist/{dynamicFormsStateMachine-uy2rO9_-.esm.js → dynamicFormsStateMachine-DTyEVRIb.esm.js} +2 -2
  49. package/dist/ekyb.d.ts +1 -1
  50. package/dist/ekyb.esm.js +2 -2
  51. package/dist/{ekybManager-DpeuX31I.esm.js → ekybManager-BYFWVBTW.esm.js} +2 -2
  52. package/dist/{ekybStateMachine-CDBsMLvu.esm.js → ekybStateMachine-CxSx0HNz.esm.js} +6 -4
  53. package/dist/ekyc-prefill.d.ts +17 -0
  54. package/dist/ekyc-prefill.esm.js +3 -0
  55. package/dist/ekyc.d.ts +2 -2
  56. package/dist/ekyc.esm.js +3 -3
  57. package/dist/{ekycManager-DymCvmVB.esm.js → ekycManager-Bwv-qYAZ.esm.js} +2 -2
  58. package/dist/{ekycManager-DlGIn9wA.d.ts → ekycManager-CERRvIfg.d.ts} +1 -1
  59. package/dist/ekycPrefillManager-CbI1rTKP.esm.js +102 -0
  60. package/dist/ekycPrefillManager-DHfC1T9s.d.ts +565 -0
  61. package/dist/ekycPrefillStateMachine-ClGEAsOy.esm.js +686 -0
  62. package/dist/ekycRules-B7vXnbdg.esm.js +319 -0
  63. package/dist/{ekycStateMachine-CoFCUJ2z.esm.js → ekycStateMachine-DlN1RCob.esm.js} +418 -533
  64. package/dist/{ekycUtils-GRuMELYr.esm.js → ekycUtils-K6VJXnOg.esm.js} +18 -6
  65. package/dist/electronic-signature.esm.js +1 -1
  66. package/dist/{electronicSignatureManager-DM_e0gFI.esm.js → electronicSignatureManager-Co_sso4-.esm.js} +3 -3
  67. package/dist/email.esm.js +2 -2
  68. package/dist/{emailManager-CGoE3CUe.esm.js → emailManager-BSaGg1Gl.esm.js} +2 -2
  69. package/dist/{emailStateMachine-KgHfDNvM.esm.js → emailStateMachine-CaoPZtZN.esm.js} +2 -2
  70. package/dist/{events-ggpBBaZ8.esm.js → events-kU5WJU4B.esm.js} +1 -1
  71. package/dist/events.esm.js +1 -1
  72. package/dist/extensibility.d.ts +15 -14
  73. package/dist/extensibility.esm.js +36 -35
  74. package/dist/face-match.esm.js +2 -2
  75. package/dist/{faceCaptureManagerFactory-D9bwl07b.esm.js → faceCaptureManagerFactory-ErFltb83.esm.js} +2 -2
  76. package/dist/{faceCaptureManagerFactory-DV2ULUYS.d.ts → faceCaptureManagerFactory-ZudYP6Qp.d.ts} +3 -3
  77. package/dist/{faceCaptureSetup-DgPLnOKa.esm.js → faceCaptureSetup-D9VsC504.esm.js} +9 -9
  78. package/dist/{faceMatchManager-D2xKPjjQ.esm.js → faceMatchManager-qPJsa5Ac.esm.js} +2 -2
  79. package/dist/{faceMatchStateMachine-CUvwiQi9.esm.js → faceMatchStateMachine-D90ZHY1r.esm.js} +2 -2
  80. package/dist/{feature-management-Yfp00gNu.esm.js → feature-management-TNTHwnkm.esm.js} +1 -1
  81. package/dist/feature-management.esm.js +1 -1
  82. package/dist/field-comparison.esm.js +1 -1
  83. package/dist/{fieldComparisonManager-DgDbEeFZ.esm.js → fieldComparisonManager-BLLj_Ey1.esm.js} +2 -2
  84. package/dist/fiscal-qr.esm.js +1 -1
  85. package/dist/{fiscalQrManager-BZeklojR.esm.js → fiscalQrManager-Bh3rxb7Y.esm.js} +2 -2
  86. package/dist/flow-events.d.ts +1 -1
  87. package/dist/flow.d.ts +9 -8
  88. package/dist/flow.esm.js +46 -10
  89. package/dist/{flowCompletionService-fJuLyBEb.esm.js → flowCompletionService-BvoiqVJA.esm.js} +2 -2
  90. package/dist/{flowServices-DORczGzA.esm.js → flowServices-BkrZ4ZU5.esm.js} +8 -8
  91. package/dist/geolocation.esm.js +2 -2
  92. package/dist/{geolocationManager-C6Gt3ePt.esm.js → geolocationManager-hU9kxsr8.esm.js} +2 -2
  93. package/dist/{geolocationStateMachine-Dw6D4uRM.esm.js → geolocationStateMachine-DyYMzzIb.esm.js} +3 -3
  94. package/dist/government-validation.esm.js +2 -2
  95. package/dist/{governmentValidationManager-CjChjZ3C.esm.js → governmentValidationManager-D5HkBqfr.esm.js} +2 -2
  96. package/dist/{governmentValidationStateMachine-AEbn3Afi.esm.js → governmentValidationStateMachine-BwMClTqC.esm.js} +1 -1
  97. package/dist/home.d.ts +1 -1
  98. package/dist/home.esm.js +1 -1
  99. package/dist/http.esm.js +1 -1
  100. package/dist/id-ocr.d.ts +2 -2
  101. package/dist/id-ocr.esm.js +3 -19
  102. package/dist/id-selfie-flow.d.ts +1 -1
  103. package/dist/id-selfie-flow.esm.js +6 -6
  104. package/dist/id-verification.esm.js +2 -2
  105. package/dist/id.d.ts +2 -2
  106. package/dist/id.esm.js +3 -3
  107. package/dist/{idCaptureManager-CCA2D1Ah.d.ts → idCaptureManager-NRGuCVv2.d.ts} +2 -2
  108. package/dist/{idCaptureManager-DymxK9jy.esm.js → idCaptureManager-Xxlpem7N.esm.js} +6 -6
  109. package/dist/{idCaptureServices-TSSPG-WW.esm.js → idCaptureServices-199UFURA.esm.js} +4 -4
  110. package/dist/{idCaptureStateMachine-BBF-qMAd.esm.js → idCaptureStateMachine-Bv-dhwgK.esm.js} +42 -14
  111. package/dist/idOcrCpfUtils-Nfln1Psb.esm.js +18 -0
  112. package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-B5xeI2lg.d.ts} +3 -3
  113. package/dist/{idOcrManager-xyEZNOBa.esm.js → idOcrManager-BMK2oou0.esm.js} +2 -2
  114. package/dist/{idOcrStateMachine-DNKXh4Rn.esm.js → idOcrStateMachine-RjNycN07.esm.js} +8 -7
  115. package/dist/{idVerificationManager-DdnvYfgN.esm.js → idVerificationManager-4wY-Ee4j.esm.js} +2 -2
  116. package/dist/{idVerificationStateMachine-DtIBCa32.esm.js → idVerificationStateMachine-Bj00uWvh.esm.js} +1 -1
  117. package/dist/identity-reuse.d.ts +1 -1
  118. package/dist/identity-reuse.esm.js +2 -2
  119. package/dist/{identityReuseManager-CcpovlfD.esm.js → identityReuseManager-CCZ-ES2E.esm.js} +2 -2
  120. package/dist/{identityReuseManager-B1birg5X.d.ts → identityReuseManager-ooAbp6Kc.d.ts} +4 -4
  121. package/dist/{identityReuseStateMachine-DxZFWy47.esm.js → identityReuseStateMachine-BtpkGpYZ.esm.js} +1 -1
  122. package/dist/{index-DC0P2Vzw.d.ts → index-BGnYn_4J.d.ts} +1 -1
  123. package/dist/{index-BfSZvEHi.d.ts → index-DlVDVTcf.d.ts} +34 -18
  124. package/dist/index.d.ts +1 -1
  125. package/dist/index.esm.js +1 -1
  126. package/dist/{invokeOnCaptureCallback-BJ0GVHGr.esm.js → invokeOnCaptureCallback-BkvXSZfa.esm.js} +1 -1
  127. package/dist/kyb-checks.esm.js +2 -2
  128. package/dist/{kybChecksManager-CDHqbT9w.esm.js → kybChecksManager-CEEih5pC.esm.js} +1 -1
  129. package/dist/{kybChecksStateMachine-CzkwMKKB.esm.js → kybChecksStateMachine-DOE71Lv7.esm.js} +5 -4
  130. package/dist/mandatory-consent.d.ts +2 -2
  131. package/dist/mandatory-consent.esm.js +2 -2
  132. package/dist/{mandatoryConsentManager-B4vCYslr.esm.js → mandatoryConsentManager-BBeOo3Sz.esm.js} +2 -2
  133. package/dist/{mandatoryConsentManager-9PHQGri5.d.ts → mandatoryConsentManager-MhZYQg10.d.ts} +6 -6
  134. package/dist/{mandatoryConsentStateMachine-DWslYPA3.esm.js → mandatoryConsentStateMachine-BJEyS63E.esm.js} +1 -1
  135. package/dist/{multipartRecordingService-BTqkHGG9.esm.js → multipartRecordingService-2iVLb-2Y.esm.js} +1 -1
  136. package/dist/phone.esm.js +2 -2
  137. package/dist/{phoneFormat-JJNaWthV.esm.js → phoneFormat-DEpESpz2.esm.js} +13 -1
  138. package/dist/{phoneManager-Dy5tODCU.esm.js → phoneManager-BylOWecM.esm.js} +2 -2
  139. package/dist/{phoneServices-DJgyOzU2.esm.js → phoneServices-Crge7uSV.esm.js} +1 -1
  140. package/dist/{phoneStateMachine-DnlPhnw7.esm.js → phoneStateMachine-CHnhCS-4.esm.js} +2 -2
  141. package/dist/{processFaceMatch-Bst83HaS.esm.js → processFaceMatch-BveUAHts.esm.js} +1 -1
  142. package/dist/qe-signature.esm.js +1 -1
  143. package/dist/{recordingService-CTko6Cjn.esm.js → recordingService-DKXaaOHO.esm.js} +2 -2
  144. package/dist/redirect-to-mobile.esm.js +2 -2
  145. package/dist/{redirectToMobileManager-CCSNyi19.esm.js → redirectToMobileManager-DUpLyXsq.esm.js} +2 -2
  146. package/dist/{redirectToMobileStateMachine-BKyOdAUe.esm.js → redirectToMobileStateMachine-D0DW4y-f.esm.js} +1 -1
  147. package/dist/{resolveForm-O7-r79VA.esm.js → resolveForm-f9PhUo9j.esm.js} +1 -209
  148. package/dist/{runChildModule-WaHpne_n.esm.js → runChildModule-CDixuH1W.esm.js} +2 -2
  149. package/dist/{sdkVersion-D0wnG9m1.esm.js → sdkVersion-BNA7_9wn.esm.js} +1 -1
  150. package/dist/selfie.d.ts +3 -3
  151. package/dist/selfie.esm.js +9 -9
  152. package/dist/{selfieErrorUtils-Sd36xaui.esm.js → selfieErrorUtils-Geee35WF.esm.js} +1 -1
  153. package/dist/{selfieManager-DmZFzs1-.d.ts → selfieManager-BPOlD-UN.d.ts} +1 -1
  154. package/dist/{selfieManager-Q23b7zS_.esm.js → selfieManager-DVWFz5tv.esm.js} +4 -4
  155. package/dist/{selfieStateMachine-BzSAxwIs.esm.js → selfieStateMachine-D9KQUtMs.esm.js} +3 -3
  156. package/dist/{session-XoKY3xHd.esm.js → session-DoFzV1FT.esm.js} +4 -4
  157. package/dist/session.d.ts +1 -1
  158. package/dist/session.esm.js +5 -5
  159. package/dist/{sessionInitializer-CN9C6ItC.esm.js → sessionInitializer-DOZzSzqm.esm.js} +7 -7
  160. package/dist/{setup-W-Tho5PO.esm.js → setup-B6WhRfCS.esm.js} +10 -13
  161. package/dist/{setup-CmqnkqsR.d.ts → setup-prV5HQCQ.d.ts} +1 -1
  162. package/dist/signature.esm.js +2 -2
  163. package/dist/{signatureManager-CwqjcxPg.esm.js → signatureManager-QlegdTo3.esm.js} +2 -2
  164. package/dist/{signatureStateMachine-DBVDd1Eu.esm.js → signatureStateMachine-DFbbbFwg.esm.js} +1 -1
  165. package/dist/{stats-CatA2dea.esm.js → stats-Bv5PiWvo.esm.js} +1 -1
  166. package/dist/stats.esm.js +1 -1
  167. package/dist/step-up.d.ts +15 -21
  168. package/dist/step-up.esm.js +17 -26
  169. package/dist/{tri-6laLcIfQ.esm.js → tri-B9aoyV2Z.esm.js} +3 -32
  170. package/dist/tri.d.ts +1 -1
  171. package/dist/tri.esm-DgtAka_v.esm.js +2145 -0
  172. package/dist/tri.esm.js +1 -1
  173. package/dist/{trueSightService-BPs_VmAj.esm.js → trueSightService-nGcZHLsZ.esm.js} +3 -3
  174. package/dist/trust-graph.esm.js +1 -1
  175. package/dist/{types-Csh8vzPo.d.ts → types-0Rr7etmf.d.ts} +1 -1
  176. package/dist/types-B2M1IPZn.d.ts +6 -0
  177. package/dist/{types-BEVHQbbC.d.ts → types-BD9sV5oG.d.ts} +1 -1
  178. package/dist/{types-CuMJ2M7D.d.ts → types-BaDx6utW.d.ts} +4 -1
  179. package/dist/{types-BPm1JSu7.d.ts → types-BpJ21a4T.d.ts} +1 -1
  180. package/dist/{types-CJ7Yl9K-.d.ts → types-Bpo97EOh.d.ts} +4 -2
  181. package/dist/{types-CRaFu6wS.d.ts → types-CquDWYfv.d.ts} +6 -2
  182. package/dist/types-D9vIGFbl.d.ts +115 -0
  183. package/dist/{types-Cd0J0F9D.d.ts → types-NMBsvLIN.d.ts} +1 -1
  184. package/dist/usStates-CwOQ2kAx.esm.js +209 -0
  185. package/dist/video-selfie.d.ts +1 -1
  186. package/dist/video-selfie.esm.js +6 -6
  187. package/dist/{videoSelfieCameraWarmer-DWGX1ByR.esm.js → videoSelfieCameraWarmer-BH8HH2Yo.esm.js} +4 -4
  188. package/dist/{videoSelfieStepDetector-Dv3Mgws-.d.ts → videoSelfieStepDetector-B78BE_x9.d.ts} +2 -2
  189. package/dist/wasm.d.ts +1 -1
  190. package/dist/wasm.esm.js +1 -1
  191. package/dist/watchlist-for-business.esm.js +2 -2
  192. package/dist/watchlist.esm.js +2 -2
  193. package/dist/{watchlistForBusinessManager-DqUpAEj_.esm.js → watchlistForBusinessManager-DOYmIiaj.esm.js} +2 -2
  194. package/dist/{watchlistForBusinessStateMachine-DdaPl2PS.esm.js → watchlistForBusinessStateMachine-D8qIyL8w.esm.js} +1 -1
  195. package/dist/{watchlistManager-CdpXzT4B.esm.js → watchlistManager-BJGLRv-x.esm.js} +2 -2
  196. package/dist/{watchlistStateMachine-ofHW_lPk.esm.js → watchlistStateMachine-DeLfuGSl.esm.js} +1 -1
  197. package/dist/workflow.d.ts +1 -1
  198. package/dist/workflow.esm.js +42 -36
  199. package/package.json +6 -1
  200. package/dist/tri.esm-DgTlfPhR.esm.js +0 -3838
  201. package/dist/types-J6g6iKe_.d.ts +0 -6
package/dist/flow.esm.js CHANGED
@@ -1,10 +1,10 @@
1
- import { y as addEvent } from "./events-ggpBBaZ8.esm.js";
1
+ import { y as addEvent } from "./events-kU5WJU4B.esm.js";
2
2
  import { i as retryAfterReconnect } from "./connectivity-BCuEoQ-n.esm.js";
3
- import { a as resolveDashboardModuleConfig, c as getRequiredWasmPipelines, d as resolveFlowModuleConfig, h as mergeDashboardConfig, l as loadFlowConfigConverters, n as getFlow, o as enrichFlowModuleConfig, r as preloadDashboardFlow, s as getNextRequiredWasmPipelines, t as completeDeferredActivation, u as normalizeFlowModules } from "./flowServices-DORczGzA.esm.js";
3
+ import { a as resolveDashboardModuleConfig, c as getRequiredWasmPipelines, d as resolveFlowModuleConfig, h as mergeDashboardConfig, l as loadFlowConfigConverters, n as getFlow, o as enrichFlowModuleConfig, r as preloadDashboardFlow, s as getNextRequiredWasmPipelines, t as completeDeferredActivation, u as normalizeFlowModules } from "./flowServices-BkrZ4ZU5.esm.js";
4
4
  import { i as assign, s as createActor, t as setup, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
5
5
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
6
- import { n as getFinishStatus, r as getTotalScoreStatus, t as classifyScoreStatus } from "./flowCompletionService-fJuLyBEb.esm.js";
7
- import { n as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-WaHpne_n.esm.js";
6
+ import { n as getFinishStatus, r as getTotalScoreStatus, t as classifyScoreStatus } from "./flowCompletionService-BvoiqVJA.esm.js";
7
+ import { n as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-CDixuH1W.esm.js";
8
8
  import { n as isAdvanceableError } from "./advanceableErrors-k-U-cL5m.esm.js";
9
9
  //#region src/modules/flow/noOpFlowModuleMachine.ts
10
10
  const noOpFlowModuleMachine = /* @__PURE__ */ (() => setup({}).createMachine({
@@ -13,6 +13,37 @@ const noOpFlowModuleMachine = /* @__PURE__ */ (() => setup({}).createMachine({
13
13
  states: { finished: { type: "final" } }
14
14
  }))();
15
15
  //#endregion
16
+ //#region src/modules/flow/flowOcrSteps.ts
17
+ /** Prepare the standard two-ID journey without changing standalone dashboard configuration. */
18
+ function prepareFlowOcrSteps(flow) {
19
+ const modules = flow.flowModules;
20
+ const firstIds = modules.filter((module) => module.key === "ID" || module.key === "TUTORIAL_ID");
21
+ const secondIds = modules.filter((module) => module.key === "SECOND_ID");
22
+ const reviews = modules.filter((module) => module.key === "ID_OCR");
23
+ if (firstIds.length !== 1 || secondIds.length !== 1 || reviews.length !== 1) return flow;
24
+ const [first] = firstIds;
25
+ const [second] = secondIds;
26
+ const [review] = reviews;
27
+ if (review.configuration.ocrDocument !== void 0 || modules.indexOf(first) >= modules.indexOf(second) || modules.indexOf(review) < modules.indexOf(first)) return flow;
28
+ const reviewFor = (ocrDocument) => ({
29
+ ...review,
30
+ configuration: {
31
+ ...review.configuration,
32
+ ocrDocument,
33
+ secondId: false
34
+ }
35
+ });
36
+ return {
37
+ ...flow,
38
+ flowModules: modules.flatMap((module) => {
39
+ if (module === review) return [];
40
+ if (module === first) return [module, reviewFor("first")];
41
+ if (module === second && review.configuration.secondId !== false) return [module, reviewFor("second")];
42
+ return [module];
43
+ })
44
+ };
45
+ }
46
+ //#endregion
16
47
  //#region src/modules/flow/flowStateMachine.ts
17
48
  /**
18
49
  * Flow-level `ds` (Deepsight) lives on the flow, not on the module, so it has
@@ -47,7 +78,7 @@ const flowMachine = /* @__PURE__ */ (() => setup({
47
78
  getFlow: context.getFlow
48
79
  })),
49
80
  setFlowData: assign(({ event }) => {
50
- const flow = event.output;
81
+ const flow = prepareFlowOcrSteps(event.output);
51
82
  return {
52
83
  flow,
53
84
  steps: (flow.flowModules ?? []).map((m) => m.key),
@@ -190,7 +221,9 @@ function createApi({ actor, getSnapshot, trackElementClicked }) {
190
221
  function getModuleConfig(moduleKey) {
191
222
  const snapshot = getSnapshot();
192
223
  if (!snapshot.matches("ready")) return;
193
- return (snapshot.context.flow?.flowModules.find((m) => m.key === moduleKey))?.configuration;
224
+ const { flow, currentStepIndex } = snapshot.context;
225
+ const activeModule = flow?.flowModules[currentStepIndex];
226
+ return (activeModule?.key === moduleKey ? activeModule : flow?.flowModules.find((m) => m.key === moduleKey))?.configuration;
194
227
  }
195
228
  function isModuleEnabled(moduleKey) {
196
229
  const snapshot = getSnapshot();
@@ -255,8 +288,9 @@ function createApi({ actor, getSnapshot, trackElementClicked }) {
255
288
  },
256
289
  /**
257
290
  * Gets the configuration for a specific module by its key.
291
+ * Returns the active occurrence when the current step has that key.
258
292
  * Useful for accessing config of modules other than the current one.
259
- * @param moduleKey - The unique key identifier of the module
293
+ * @param moduleKey - The module key
260
294
  * @returns The module configuration or `undefined` if not found or not in `ready` state
261
295
  */
262
296
  getModuleConfig,
@@ -440,7 +474,7 @@ const orchestratedFlowMachine = /* @__PURE__ */ (() => setup({
440
474
  setHomeContinueLoading: assign({ isHomeContinueLoading: true }),
441
475
  clearHomeContinueLoading: assign({ isHomeContinueLoading: false }),
442
476
  setFlowData: assign(({ event }) => {
443
- const flow = event.output;
477
+ const flow = prepareFlowOcrSteps(event.output);
444
478
  const flowModules = flow.flowModules ?? [];
445
479
  const firstModule = flowModules[0];
446
480
  const config = getModuleConfig(firstModule, flow);
@@ -454,7 +488,7 @@ const orchestratedFlowMachine = /* @__PURE__ */ (() => setup({
454
488
  };
455
489
  }),
456
490
  setActivatedFlow: assign(({ context, event }) => {
457
- const flow = event.output;
491
+ const flow = prepareFlowOcrSteps(event.output);
458
492
  const flowModules = flow.flowModules ?? [];
459
493
  const steps = flowModules.map((m) => m.key);
460
494
  let insertedAt = steps.findIndex((key, i) => key !== context.steps[i]);
@@ -911,7 +945,9 @@ function createOrchestratedFlowApi({ actor, getSnapshot, trackElementClicked },
911
945
  function getModuleConfig(moduleKey) {
912
946
  const snapshot = getSnapshot();
913
947
  if (snapshot.value !== "runningModule") return;
914
- return (snapshot.context.flow?.flowModules.find((m) => m.key === moduleKey))?.configuration;
948
+ const { flow, currentStepIndex } = snapshot.context;
949
+ const activeModule = flow?.flowModules[currentStepIndex];
950
+ return (activeModule?.key === moduleKey ? activeModule : flow?.flowModules.find((m) => m.key === moduleKey))?.configuration;
915
951
  }
916
952
  function isModuleEnabled(moduleKey) {
917
953
  const snapshot = getSnapshot();
@@ -1,5 +1,5 @@
1
- import { t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
2
- import { i as toIncodeApiError } from "./apiError-CUF7K_XZ.esm.js";
1
+ import { t as api, u as endpoints } from "./api-C_P9YXbL.esm.js";
2
+ import { i as toIncodeApiError } from "./apiError-DzZ5OriE.esm.js";
3
3
  //#region src/modules/flow/flowCompletionService.ts
4
4
  const getFinishStatus = async (flowId, signal) => {
5
5
  const url = `${endpoints.finishStatus}${flowId ? `?flowId=${flowId}` : ""}`;
@@ -1,11 +1,11 @@
1
1
  import { r as getWasmStatus } from "./warmup-DtB0DJpl.esm.js";
2
- import { r as getToken, t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
3
- import { a as initializeSession, f as whenSessionFingerprintSettled, i as getSessionFingerprintResult, p as getStandaloneFlowPolicy, t as endDeviceHashWait } from "./sessionInitializer-CN9C6ItC.esm.js";
4
- import { E as updateFeatureManagementUser } from "./feature-management-Yfp00gNu.esm.js";
5
- import { i as toIncodeApiError } from "./apiError-CUF7K_XZ.esm.js";
6
- import "./session-XoKY3xHd.esm.js";
2
+ import { r as getToken, t as api, u as endpoints } from "./api-C_P9YXbL.esm.js";
3
+ import { a as initializeSession, f as whenSessionFingerprintSettled, i as getSessionFingerprintResult, p as getStandaloneFlowPolicy, t as endDeviceHashWait } from "./sessionInitializer-DOZzSzqm.esm.js";
4
+ import { E as updateFeatureManagementUser } from "./feature-management-TNTHwnkm.esm.js";
5
+ import { i as toIncodeApiError } from "./apiError-DzZ5OriE.esm.js";
6
+ import "./session-DoFzV1FT.esm.js";
7
7
  import { n as loadPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
8
- import { a as prefetchStartInfo } from "./phoneServices-DJgyOzU2.esm.js";
8
+ import { a as prefetchStartInfo } from "./phoneServices-Crge7uSV.esm.js";
9
9
  //#region src/modules/flow/dashboardConfig.ts
10
10
  function isPlainObject(value) {
11
11
  if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
@@ -95,7 +95,7 @@ let configConverters;
95
95
  async function loadFlowConfigConverters(flow) {
96
96
  const needed = flow.flowModules.some((module) => module.key === "EXTERNAL_VERIFICATION" || module.key === "EKYB");
97
97
  if (configConverters || !needed) return;
98
- const [ekyc, ekyb] = await Promise.all([import("./ekycUtils-GRuMELYr.esm.js").then((n) => n.n), import("./ekybUtils-Cw8Ta9Qi.esm.js").then((n) => n.t)]);
98
+ const [ekyc, ekyb] = await Promise.all([import("./ekycUtils-K6VJXnOg.esm.js").then((n) => n.n), import("./ekybUtils-Cw8Ta9Qi.esm.js").then((n) => n.t)]);
99
99
  configConverters = {
100
100
  toEkycConfig: ekyc.toEkycConfig,
101
101
  toEkybConfig: ekyb.toEkybConfig
@@ -111,7 +111,7 @@ function resolveFlowModuleConfig(module, flow) {
111
111
  };
112
112
  if (module.key === "ID_OCR") return {
113
113
  ...config,
114
- secondId: config.secondId ?? flow.flowModules.some((candidate) => candidate.key === "SECOND_ID"),
114
+ secondId: config.ocrDocument === void 0 && (config.secondId ?? flow.flowModules.some((candidate) => candidate.key === "SECOND_ID")),
115
115
  flowId: flow.flowId
116
116
  };
117
117
  if (module.key === "SECOND_ID") return {
@@ -1,3 +1,3 @@
1
- import { t as createGeolocationManager } from "./geolocationManager-C6Gt3ePt.esm.js";
2
- import { t as geolocationMachine } from "./geolocationStateMachine-Dw6D4uRM.esm.js";
1
+ import { t as createGeolocationManager } from "./geolocationManager-hU9kxsr8.esm.js";
2
+ import { t as geolocationMachine } from "./geolocationStateMachine-DyYMzzIb.esm.js";
3
3
  export { createGeolocationManager, geolocationMachine };
@@ -1,6 +1,6 @@
1
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ggpBBaZ8.esm.js";
1
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-kU5WJU4B.esm.js";
2
2
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
3
- import { t as geolocationMachine } from "./geolocationStateMachine-Dw6D4uRM.esm.js";
3
+ import { t as geolocationMachine } from "./geolocationStateMachine-DyYMzzIb.esm.js";
4
4
  //#region ../infra/src/providers/browser/BrowserGeolocationProvider.ts
5
5
  var BrowserGeolocationProvider = class {
6
6
  getCurrentPosition() {
@@ -1,9 +1,9 @@
1
- import { t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
1
+ import { t as api, u as endpoints } from "./api-C_P9YXbL.esm.js";
2
2
  import { a as isIOS, t as isAndroid } from "./platform-aPh7gTWh.esm.js";
3
- import { n as isConnectivityError } from "./apiError-CUF7K_XZ.esm.js";
3
+ import { n as isConnectivityError } from "./apiError-DzZ5OriE.esm.js";
4
4
  import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
5
5
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
6
- import { t as carryAttempts } from "./attemptCarry-WOkfvFMw.esm.js";
6
+ import { t as carryAttempts } from "./attemptCarry-BaAXPR_w.esm.js";
7
7
  //#region src/modules/geolocation/geolocationServices.ts
8
8
  async function addGeolocation(params, signal) {
9
9
  const res = await api.post(endpoints.addGeolocation, {
@@ -1,3 +1,3 @@
1
- import { t as governmentValidationMachine } from "./governmentValidationStateMachine-AEbn3Afi.esm.js";
2
- import { n as createGovernmentValidationManagerFromActor, t as createGovernmentValidationManager } from "./governmentValidationManager-CjChjZ3C.esm.js";
1
+ import { t as governmentValidationMachine } from "./governmentValidationStateMachine-BwMClTqC.esm.js";
2
+ import { n as createGovernmentValidationManagerFromActor, t as createGovernmentValidationManager } from "./governmentValidationManager-D5HkBqfr.esm.js";
3
3
  export { createGovernmentValidationManager, createGovernmentValidationManagerFromActor, governmentValidationMachine };
@@ -1,7 +1,7 @@
1
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ggpBBaZ8.esm.js";
1
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-kU5WJU4B.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 governmentValidationMachine } from "./governmentValidationStateMachine-AEbn3Afi.esm.js";
4
+ import { t as governmentValidationMachine } from "./governmentValidationStateMachine-BwMClTqC.esm.js";
5
5
  //#region src/modules/government-validation/governmentValidationActor.ts
6
6
  function createGovernmentValidationActor(options) {
7
7
  return createActor(governmentValidationMachine, { input: { config: options.config } }).start();
@@ -1,4 +1,4 @@
1
- import { t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
1
+ import { t as api, u as endpoints } from "./api-C_P9YXbL.esm.js";
2
2
  import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
3
3
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
4
4
  //#region src/modules/government-validation/governmentValidationServices.ts
package/dist/home.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { A as StateMachine, p as EventObject, v as MetaObject, y as NonReducibleUnknown } from "./spawn-D9jgw9pW.js";
2
2
  import { t as Manager } from "./Manager-C9T5amUN.js";
3
- import { t as EmptyConfig } from "./types-CRaFu6wS.js";
3
+ import { t as EmptyConfig } from "./types-CquDWYfv.js";
4
4
  //#region src/modules/home/types.d.ts
5
5
  type HomeConfig = EmptyConfig;
6
6
  //#endregion
package/dist/home.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ggpBBaZ8.esm.js";
1
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-kU5WJU4B.esm.js";
2
2
  import { s as createActor, t as setup, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
3
3
  //#region src/modules/home/homeStateMachine.ts
4
4
  const homeMachine = setup({ types: {
package/dist/http.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as getApi, t as api } from "./api-CpP4PS4S.esm.js";
1
+ import { n as getApi, t as api } from "./api-C_P9YXbL.esm.js";
2
2
  export { api, getApi };
package/dist/id-ocr.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { i as UpdateOcrDataParams, n as OcrData, o as ValidationRule, r as OcrFieldConfig, t as IdOcrConfig } from "./types-CJ7Yl9K-.js";
2
- import { a as IdOcrActor, i as createIdOcrManagerFromActor, n as IdOcrState, o as IdOcrOcrDocument, r as createIdOcrManager, s as idOcrStateMachine, t as IdOcrManager } from "./idOcrManager-DT3kPIB3.js";
1
+ import { i as UpdateOcrDataParams, n as OcrData, o as ValidationRule, r as OcrFieldConfig, t as IdOcrConfig } from "./types-Bpo97EOh.js";
2
+ import { a as IdOcrActor, i as createIdOcrManagerFromActor, n as IdOcrState, o as IdOcrOcrDocument, r as createIdOcrManager, s as idOcrStateMachine, t as IdOcrManager } from "./idOcrManager-B5xeI2lg.js";
3
3
  //#region src/modules/id-ocr/idOcrFields.d.ts
4
4
  declare const OCR_FIELDS: OcrFieldConfig[];
5
5
  declare const getOcrFields: (config: Pick<IdOcrConfig, "cpfOnly" | "flowId">) => OcrFieldConfig[];
@@ -1,20 +1,4 @@
1
- import { t as validateCPF } from "./cpf-uAZTPUBy.esm.js";
2
- import { a as MIN_AGE, i as CPFFlowIds, n as OCR_FIELDS, r as getOcrFields, t as idOcrStateMachine } from "./idOcrStateMachine-DNKXh4Rn.esm.js";
3
- import { n as createIdOcrManagerFromActor, t as createIdOcrManager } from "./idOcrManager-xyEZNOBa.esm.js";
4
- //#region src/modules/id-ocr/idOcrCpfUtils.ts
5
- function formatCPF(value) {
6
- const digits = value.replace(/\D/g, "").slice(0, 11);
7
- const first = digits.slice(0, 3);
8
- const second = digits.slice(3, 6);
9
- const third = digits.slice(6, 9);
10
- const verifier = digits.slice(9, 11);
11
- if (digits.length > 9) return `${first}.${second}.${third}-${verifier}`;
12
- if (digits.length > 6) return `${first}.${second}.${third}`;
13
- if (digits.length > 3) return `${first}.${second}`;
14
- return first;
15
- }
16
- function isValidCPF(value) {
17
- return validateCPF(value);
18
- }
19
- //#endregion
1
+ import { n as isValidCPF, t as formatCPF } from "./idOcrCpfUtils-Nfln1Psb.esm.js";
2
+ import { a as MIN_AGE, i as CPFFlowIds, n as OCR_FIELDS, r as getOcrFields, t as idOcrStateMachine } from "./idOcrStateMachine-RjNycN07.esm.js";
3
+ import { n as createIdOcrManagerFromActor, t as createIdOcrManager } from "./idOcrManager-BMK2oou0.esm.js";
20
4
  export { CPFFlowIds, MIN_AGE, OCR_FIELDS, createIdOcrManager, createIdOcrManagerFromActor, formatCPF, getOcrFields, idOcrStateMachine, isValidCPF };
@@ -4,7 +4,7 @@ import "./Actor-DpTj5PFb.js";
4
4
  import { t as CameraStream } from "./camera-9wWD-pwg.js";
5
5
  import { t as DetectionOrientation } from "./IIdCaptureCapability-CGcEt2Cw.js";
6
6
  import { n as FinishStatus } from "./flowCompletionService-BlAHsKyv.js";
7
- import { a as FacingMode, c as VideoSelfieStep, i as CameraCompositor, n as VideoSelfieDetectionStatus, r as VideoSelfieValidationFailure, t as StepDetector } from "./videoSelfieStepDetector-Dv3Mgws-.js";
7
+ import { a as FacingMode, c as VideoSelfieStep, i as CameraCompositor, n as VideoSelfieDetectionStatus, r as VideoSelfieValidationFailure, t as StepDetector } from "./videoSelfieStepDetector-B78BE_x9.js";
8
8
  //#region src/modules/id-selfie-flow/types.d.ts
9
9
  /**
10
10
  * The capture steps an ID + Selfie flow session can run, in flow order. A
@@ -1,17 +1,17 @@
1
- import { t as ensureWasmPipelines } from "./setup-W-Tho5PO.esm.js";
1
+ import { t as ensureWasmPipelines } from "./setup-B6WhRfCS.esm.js";
2
2
  import { t as WasmUtilProvider } from "./WasmUtilProvider-Dp2V-Uct.esm.js";
3
3
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
4
- import { a as resolveDashboardModuleConfig, f as facingModeForStep } from "./flowServices-DORczGzA.esm.js";
4
+ import { a as resolveDashboardModuleConfig, f as facingModeForStep } from "./flowServices-BkrZ4ZU5.esm.js";
5
5
  import { i as assign, r as sendTo, s as createActor, t as setup, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
6
6
  import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-8Gzepa_A.esm.js";
7
- import { c as uploadSelfie, n as encryptSelfieImage, o as startDetection, s as processFace, t as FaceDetectionProvider } from "./FaceDetectionProvider-CuWUIxqF.esm.js";
7
+ import { c as uploadSelfie, n as encryptSelfieImage, o as startDetection, s as processFace, t as FaceDetectionProvider } from "./FaceDetectionProvider-DjXSD4uI.esm.js";
8
8
  import { t as StreamCanvasProcessingSession } from "./StreamCanvasProcessingSession-CBnbTnOr.esm.js";
9
9
  import { n as getWindowDimensions } from "./getDeviceClass-CeBiEayS.esm.js";
10
10
  import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider, t as DEFAULT_ID_CAPTURE_GEOMETRY } from "./idCaptureDefaults-Dszuq9ng.esm.js";
11
- import { _ as validateUploadResponse, d as processId, g as uploadIdImage, v as ID_ERROR_CODES } from "./idCaptureServices-TSSPG-WW.esm.js";
11
+ import { _ as validateUploadResponse, d as processId, g as uploadIdImage, v as ID_ERROR_CODES } from "./idCaptureServices-199UFURA.esm.js";
12
12
  import { t as StreamCanvasCapture } from "./StreamCanvasCapture-C9jtgBdT.esm.js";
13
- import { n as getFinishStatus } from "./flowCompletionService-fJuLyBEb.esm.js";
14
- import { a as isSelfieValidationError, i as delay, n as defaultAcquireCamera, o as isWrongVideoSelfieIdSide } from "./videoSelfieCameraWarmer-DWGX1ByR.esm.js";
13
+ import { n as getFinishStatus } from "./flowCompletionService-BvoiqVJA.esm.js";
14
+ import { a as isSelfieValidationError, i as delay, n as defaultAcquireCamera, o as isWrongVideoSelfieIdSide } from "./videoSelfieCameraWarmer-BH8HH2Yo.esm.js";
15
15
  import { t as CameraCompositor } from "./CameraCompositor-DN7NkJzV.esm.js";
16
16
  //#region src/modules/id-selfie-flow/idSelfieFlowStepDetector.ts
17
17
  /** Default autocapture window for the selfie step. */
@@ -1,3 +1,3 @@
1
- import { t as idVerificationMachine } from "./idVerificationStateMachine-DtIBCa32.esm.js";
2
- import { n as createIdVerificationManagerFromActor, t as createIdVerificationManager } from "./idVerificationManager-DdnvYfgN.esm.js";
1
+ import { t as idVerificationMachine } from "./idVerificationStateMachine-Bj00uWvh.esm.js";
2
+ import { n as createIdVerificationManagerFromActor, t as createIdVerificationManager } from "./idVerificationManager-4wY-Ee4j.esm.js";
3
3
  export { createIdVerificationManager, createIdVerificationManagerFromActor, idVerificationMachine };
package/dist/id.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
2
2
  import { n as PermissionStatus, t as PermissionResult } from "./types-BEwVKkLJ.js";
3
- import { A as ValidationError, B as processId, C as AddBarcodeParams, D as InitializeIdCaptureParams, E as IdCaptureInitResult, F as getRealQualityValue, G as uploadIdImage, H as startRecordingSession, I as initializeIdCapture, K as validateUploadResponse, L as isSuspendableRecordingSession, M as barcodeToBase64, N as disposeRecordingSession, O as StartRecordingParams, P as finalizeRecordingSession, R as pauseRecordingForAttempt, S as idCaptureMachine, T as ID_QUALITY_BACKEND_VALIDATION_GATE, U as stopRecording, V as resumeRecordingAfterPause, W as stopStream, _ as idCaptureOnlyMachine, a as RenderWalletError, b as createIdCaptureActor, c as DeviceWalletManager, d as CreateDeviceWalletActorOptions, f as resolveWalletPlatform, g as IdCaptureOnlyMachine, h as createIdCaptureOnlyActor, j as addBarcode, k as UploadIdImageParams, l as DeviceWalletState, m as IdCaptureOnlyActor, n as IdCaptureManager, o as RenderWalletParams, p as CreateIdCaptureOnlyActorOptions, r as IdCaptureState, s as renderWallet, t as createIdCaptureManager, u as createDeviceWalletManager, v as CreateIdCaptureActorOptions, w as FinalizedIdRecording, x as IdCaptureMachine, y as IdCaptureActor, z as prepareRecordingForCameraRetry } from "./idCaptureManager-CCA2D1Ah.js";
3
+ import { A as ValidationError, B as processId, C as AddBarcodeParams, D as InitializeIdCaptureParams, E as IdCaptureInitResult, F as getRealQualityValue, G as uploadIdImage, H as startRecordingSession, I as initializeIdCapture, K as validateUploadResponse, L as isSuspendableRecordingSession, M as barcodeToBase64, N as disposeRecordingSession, O as StartRecordingParams, P as finalizeRecordingSession, R as pauseRecordingForAttempt, S as idCaptureMachine, T as ID_QUALITY_BACKEND_VALIDATION_GATE, U as stopRecording, V as resumeRecordingAfterPause, W as stopStream, _ as idCaptureOnlyMachine, a as RenderWalletError, b as createIdCaptureActor, c as DeviceWalletManager, d as CreateDeviceWalletActorOptions, f as resolveWalletPlatform, g as IdCaptureOnlyMachine, h as createIdCaptureOnlyActor, j as addBarcode, k as UploadIdImageParams, l as DeviceWalletState, m as IdCaptureOnlyActor, n as IdCaptureManager, o as RenderWalletParams, p as CreateIdCaptureOnlyActorOptions, r as IdCaptureState, s as renderWallet, t as createIdCaptureManager, u as createDeviceWalletManager, v as CreateIdCaptureActorOptions, w as FinalizedIdRecording, x as IdCaptureMachine, y as IdCaptureActor, z as prepareRecordingForCameraRetry } from "./idCaptureManager-NRGuCVv2.js";
4
4
  import { t as CameraStream } from "./camera-9wWD-pwg.js";
5
5
  import { r as IdCaptureSettings, t as DetectionOrientation } from "./IIdCaptureCapability-CGcEt2Cw.js";
6
- import { A as DigitalIdCountryDetectionDependencies, B as DeviceWalletDecryptResponse, C as IdCapturedImageData, D as IdFlowStep, E as IdErrorCode, F as DigitalIdPlatformSupport, H as DeviceWalletOutput, I as ResolvedDigitalIdRoute, J as RedirectReturnParams, K as DigitalIdProviderId, L as isRedirectFlowType, M as DIGITAL_ID_REGISTRY, N as DigitalIdDocumentType, O as UploadIdResponse, P as DigitalIdFunnelEntry, R as resolveDigitalIdImplementation, S as IdCaptureThresholds, T as IdError, U as DeviceWalletPlatform, V as DeviceWalletFailReason, W as DeviceWalletProvider, _ as IdCaptureGeometry, a as CaptureOnlyResponse, b as IdCaptureOnlyConfig, c as DetectionStatus, d as IdCaptureContext, f as IdCaptureDependencies, g as IdCaptureEvent, h as IdCaptureDigitalIdRedirectOption, i as CaptureIdResponse, j as DIGITAL_ID_DOCUMENT_TYPES, l as ID_ERROR_CODES, m as IdCaptureDigitalIdMethod, n as AcceptedDocumentType, o as CapturedImage, p as IdCaptureDigitalIdFlowType, r as AddBarcodeV3Response, s as DetectionArea, t as AcceptedDocument, u as IdCaptureConfig, v as IdCaptureInput, w as IdDocumentType, x as IdCaptureOutput, y as IdCaptureMode, z as DeviceWalletDecision } from "./types-BPm1JSu7.js";
6
+ import { A as DigitalIdCountryDetectionDependencies, B as DeviceWalletDecryptResponse, C as IdCapturedImageData, D as IdFlowStep, E as IdErrorCode, F as DigitalIdPlatformSupport, H as DeviceWalletOutput, I as ResolvedDigitalIdRoute, J as RedirectReturnParams, K as DigitalIdProviderId, L as isRedirectFlowType, M as DIGITAL_ID_REGISTRY, N as DigitalIdDocumentType, O as UploadIdResponse, P as DigitalIdFunnelEntry, R as resolveDigitalIdImplementation, S as IdCaptureThresholds, T as IdError, U as DeviceWalletPlatform, V as DeviceWalletFailReason, W as DeviceWalletProvider, _ as IdCaptureGeometry, a as CaptureOnlyResponse, b as IdCaptureOnlyConfig, c as DetectionStatus, d as IdCaptureContext, f as IdCaptureDependencies, g as IdCaptureEvent, h as IdCaptureDigitalIdRedirectOption, i as CaptureIdResponse, j as DIGITAL_ID_DOCUMENT_TYPES, l as ID_ERROR_CODES, m as IdCaptureDigitalIdMethod, n as AcceptedDocumentType, o as CapturedImage, p as IdCaptureDigitalIdFlowType, r as AddBarcodeV3Response, s as DetectionArea, t as AcceptedDocument, u as IdCaptureConfig, v as IdCaptureInput, w as IdDocumentType, x as IdCaptureOutput, y as IdCaptureMode, z as DeviceWalletDecision } from "./types-BpJ21a4T.js";
7
7
  //#region src/modules/id/deviceWallet/deviceWalletErrors.d.ts
8
8
  /**
9
9
  * Fail reason → i18n key for the device-wallet error screen (same shape as
package/dist/id.esm.js CHANGED
@@ -1,6 +1,6 @@
1
- import { d as DIGITAL_ID_REGISTRY, f as isRedirectFlowType, h as createDeviceWalletManager, m as renderWallet, p as resolveDigitalIdImplementation, t as idCaptureMachine, u as DIGITAL_ID_DOCUMENT_TYPES, v as resolveWalletPlatform } from "./idCaptureStateMachine-BBF-qMAd.esm.js";
2
- import { a as idCaptureOnlyMachine, i as createIdCaptureOnlyActor, n as createIdCaptureOnlyManager, o as createIdCaptureActor, r as createIdCaptureOnlyManagerFromActor, t as createIdCaptureManager } from "./idCaptureManager-DymxK9jy.esm.js";
3
- import { _ as validateUploadResponse, a as finalizeRecordingSession, c as isSuspendableRecordingSession, d as processId, f as resumeRecordingAfterPause, g as uploadIdImage, h as stopStream, i as disposeRecordingSession, l as pauseRecordingForAttempt, m as stopRecording, n as addBarcode, o as getRealQualityValue, p as startRecordingSession, r as barcodeToBase64, s as initializeIdCapture, t as ID_QUALITY_BACKEND_VALIDATION_GATE, u as prepareRecordingForCameraRetry, v as ID_ERROR_CODES } from "./idCaptureServices-TSSPG-WW.esm.js";
1
+ import { d as DIGITAL_ID_REGISTRY, f as isRedirectFlowType, h as createDeviceWalletManager, m as renderWallet, p as resolveDigitalIdImplementation, t as idCaptureMachine, u as DIGITAL_ID_DOCUMENT_TYPES, v as resolveWalletPlatform } from "./idCaptureStateMachine-Bv-dhwgK.esm.js";
2
+ import { a as idCaptureOnlyMachine, i as createIdCaptureOnlyActor, n as createIdCaptureOnlyManager, o as createIdCaptureActor, r as createIdCaptureOnlyManagerFromActor, t as createIdCaptureManager } from "./idCaptureManager-Xxlpem7N.esm.js";
3
+ import { _ as validateUploadResponse, a as finalizeRecordingSession, c as isSuspendableRecordingSession, d as processId, f as resumeRecordingAfterPause, g as uploadIdImage, h as stopStream, i as disposeRecordingSession, l as pauseRecordingForAttempt, m as stopRecording, n as addBarcode, o as getRealQualityValue, p as startRecordingSession, r as barcodeToBase64, s as initializeIdCapture, t as ID_QUALITY_BACKEND_VALIDATION_GATE, u as prepareRecordingForCameraRetry, v as ID_ERROR_CODES } from "./idCaptureServices-199UFURA.esm.js";
4
4
  //#region src/modules/id/deviceWallet/deviceWalletErrors.ts
5
5
  /**
6
6
  * Fail reason → i18n key for the device-wallet error screen (same shape as
@@ -4,14 +4,14 @@ import "./Actor-DpTj5PFb.js";
4
4
  import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
5
5
  import "./index-DpTj5PFb.js";
6
6
  import "./createFaceAvatar-lYX0VTYs.js";
7
- import { a as RegulationTypes } from "./types-CRaFu6wS.js";
7
+ import { a as RegulationTypes } from "./types-CquDWYfv.js";
8
8
  import { i as WasmUtilConfig, n as IWasmUtilCapability, r as VirtualCameraCheckOutput, t as FingerprintSignalType } from "./IWasmUtilCapability-Cqiaxydi.js";
9
9
  import { n as PermissionStatus } from "./types-BEwVKkLJ.js";
10
10
  import { t as BaseWasmProvider } from "./BaseWasmProvider-Bq3OHo7P.js";
11
11
  import { n as DeepsightService } from "./StreamCanvasCapture-C3xNfOsv.js";
12
12
  import { t as CameraStream } from "./camera-9wWD-pwg.js";
13
13
  import { i as Pdf417DecodeResult, n as IIdCaptureCapability, t as DetectionOrientation } from "./IIdCaptureCapability-CGcEt2Cw.js";
14
- import { B as DeviceWalletDecryptResponse, E as IdErrorCode, G as DeviceWalletServices, K as DigitalIdProviderId, O as UploadIdResponse, U as DeviceWalletPlatform, V as DeviceWalletFailReason, W as DeviceWalletProvider, Y as IDigitalCredentialsCapability, b as IdCaptureOnlyConfig, c as DetectionStatus, d as IdCaptureContext, f as IdCaptureDependencies, g as IdCaptureEvent, h as IdCaptureDigitalIdRedirectOption, i as CaptureIdResponse, k as IAnalyticsCapability, q as FailureReason, r as AddBarcodeV3Response, s as DetectionArea, t as AcceptedDocument, u as IdCaptureConfig, v as IdCaptureInput, w as IdDocumentType, x as IdCaptureOutput, y as IdCaptureMode, z as DeviceWalletDecision } from "./types-BPm1JSu7.js";
14
+ import { B as DeviceWalletDecryptResponse, E as IdErrorCode, G as DeviceWalletServices, K as DigitalIdProviderId, O as UploadIdResponse, U as DeviceWalletPlatform, V as DeviceWalletFailReason, W as DeviceWalletProvider, Y as IDigitalCredentialsCapability, b as IdCaptureOnlyConfig, c as DetectionStatus, d as IdCaptureContext, f as IdCaptureDependencies, g as IdCaptureEvent, h as IdCaptureDigitalIdRedirectOption, i as CaptureIdResponse, k as IAnalyticsCapability, q as FailureReason, r as AddBarcodeV3Response, s as DetectionArea, t as AcceptedDocument, u as IdCaptureConfig, v as IdCaptureInput, w as IdDocumentType, x as IdCaptureOutput, y as IdCaptureMode, z as DeviceWalletDecision } from "./types-BpJ21a4T.js";
15
15
  //#region src/internal/http/endpoints.d.ts
16
16
  /**
17
17
  * Backend `CaptureType` for the `captureType` query param on `add/front-id`,
@@ -1,6 +1,6 @@
1
- import { u as BrowserStorageProvider } from "./setup-W-Tho5PO.esm.js";
2
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ggpBBaZ8.esm.js";
3
- import { t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
1
+ import { u as BrowserStorageProvider } from "./setup-B6WhRfCS.esm.js";
2
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-kU5WJU4B.esm.js";
3
+ import { t as api, u as endpoints } from "./api-C_P9YXbL.esm.js";
4
4
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
5
5
  import { i as assign, s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
6
6
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
@@ -9,9 +9,9 @@ import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-BtiR5pig.esm.js";
9
9
  import { t as BrowserVisibilityObserverProvider } from "./BrowserVisibilityObserverProvider-BrJN1B8A.esm.js";
10
10
  import { c as resetWasmMotionPrimedForModule, o as requiresMotionPermissionUserGesture, r as primeMotionFromUserGestureIfNeeded } from "./permissionServices-D190ATGD.esm.js";
11
11
  import { t as getDeviceClass } from "./getDeviceClass-DoIWuKI8.esm.js";
12
- import { _ as mapDeviceWalletScreenName, a as createIdProtectedCaptureController, c as hasOnCaptureCallback, g as BrowserDigitalCredentialsProvider, i as createIdCaptureOnlyDeliveryActor, l as pickIdCaptureOnlyConfig, n as provideIdProtectedCaptureController, o as findIdProtectedCaptureController, r as attachIdProtectedCaptureController, s as captureOnlyNeedsBack, t as idCaptureMachine } from "./idCaptureStateMachine-BBF-qMAd.esm.js";
13
- import { b as resolveCountdownStepMs, v as ID_ERROR_CODES, x as resolveIdCaptureThresholds, y as resolveCaptureOptimizingTreatment } from "./idCaptureServices-TSSPG-WW.esm.js";
14
- import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-BJ0GVHGr.esm.js";
12
+ import { _ as mapDeviceWalletScreenName, a as createIdProtectedCaptureController, c as hasOnCaptureCallback, g as BrowserDigitalCredentialsProvider, i as createIdCaptureOnlyDeliveryActor, l as pickIdCaptureOnlyConfig, n as provideIdProtectedCaptureController, o as findIdProtectedCaptureController, r as attachIdProtectedCaptureController, s as captureOnlyNeedsBack, t as idCaptureMachine } from "./idCaptureStateMachine-Bv-dhwgK.esm.js";
13
+ import { b as resolveCountdownStepMs, v as ID_ERROR_CODES, x as resolveIdCaptureThresholds, y as resolveCaptureOptimizingTreatment } from "./idCaptureServices-199UFURA.esm.js";
14
+ import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-BkvXSZfa.esm.js";
15
15
  //#region src/modules/id/digitalUpload/instrumentation.ts
16
16
  const TERMINAL_REASONS = /* @__PURE__ */ new Set(["DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED", "ID_TYPE_UNACCEPTABLE"]);
17
17
  function isHoldingState(value) {
@@ -1,6 +1,6 @@
1
- import { t as ensureWasmPipelines } from "./setup-W-Tho5PO.esm.js";
2
- import { t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
3
- import { i as numberParam, m as getFeatureGate, n as defineExperimentParams, t as booleanParam, u as resolveExperimentOnce } from "./feature-management-Yfp00gNu.esm.js";
1
+ import { t as ensureWasmPipelines } from "./setup-B6WhRfCS.esm.js";
2
+ import { t as api, u as endpoints } from "./api-C_P9YXbL.esm.js";
3
+ import { i as numberParam, m as getFeatureGate, n as defineExperimentParams, t as booleanParam, u as resolveExperimentOnce } from "./feature-management-TNTHwnkm.esm.js";
4
4
  import { i as isDesktop } from "./platform-aPh7gTWh.esm.js";
5
5
  import { n as isBackFacingTrack } from "./backCameraLabel-yda5ugE4.esm.js";
6
6
  import { t as getDeviceClass } from "./getDeviceClass-DoIWuKI8.esm.js";
@@ -436,7 +436,7 @@ async function startRecordingSession(params) {
436
436
  const [compositorModule, recorderModule, serviceModule] = await Promise.all([
437
437
  import("./CameraCompositor-DN7NkJzV.esm.js").then((n) => n.n),
438
438
  import("./WorkerEncoderRecordingProvider-B1ODYtgN.esm.js").then((n) => n.n),
439
- import("./multipartRecordingService-BTqkHGG9.esm.js").then((n) => n.n)
439
+ import("./multipartRecordingService-2iVLb-2Y.esm.js").then((n) => n.n)
440
440
  ]);
441
441
  const recordingSource = params.stream.clone();
442
442
  const compositor = compositorModule.createRecordingCompositor();
@@ -1,24 +1,24 @@
1
1
  import { n as getTimestamp, r as revokeObjectURL } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
2
- import { l as isGoogleWalletSignedRequestsEnabled, t as ensureWasmPipelines, u as BrowserStorageProvider } from "./setup-W-Tho5PO.esm.js";
2
+ import { l as isGoogleWalletSignedRequestsEnabled, t as ensureWasmPipelines, u as BrowserStorageProvider } from "./setup-B6WhRfCS.esm.js";
3
3
  import { t as WasmUtilProvider } from "./WasmUtilProvider-Dp2V-Uct.esm.js";
4
- import { n as eventModuleNames, o as createManagerInstrumentation, s as recordExperimentAssignmentOnce, y as addEvent } from "./events-ggpBBaZ8.esm.js";
5
- import { r as getToken, t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
6
- import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity, u as trueSightLog, y as isTrueSightTesting } from "./trueSightService-BPs_VmAj.esm.js";
7
- import { n as getDisableIpify } from "./sessionInitializer-CN9C6ItC.esm.js";
4
+ import { n as eventModuleNames, o as createManagerInstrumentation, s as recordExperimentAssignmentOnce, y as addEvent } from "./events-kU5WJU4B.esm.js";
5
+ import { r as getToken, t as api, u as endpoints } from "./api-C_P9YXbL.esm.js";
6
+ import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity, u as trueSightLog, y as isTrueSightTesting } from "./trueSightService-nGcZHLsZ.esm.js";
7
+ import { n as getDisableIpify } from "./sessionInitializer-DOZzSzqm.esm.js";
8
8
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
9
- import { s as exposeExperimentOnce } from "./feature-management-Yfp00gNu.esm.js";
10
- import { t as addDeviceStats } from "./stats-CatA2dea.esm.js";
9
+ import { s as exposeExperimentOnce } from "./feature-management-TNTHwnkm.esm.js";
10
+ import { t as addDeviceStats } from "./stats-Bv5PiWvo.esm.js";
11
11
  import { a as isIOS, c as isIPhone14OrHigher, f as isSamsungDevice, s as isIPad, t as isAndroid, u as isMacOsSafari } from "./platform-aPh7gTWh.esm.js";
12
- import "./session-XoKY3xHd.esm.js";
12
+ import "./session-DoFzV1FT.esm.js";
13
13
  import { c as not, i as assign, l as raise, n as enqueueActions, o as and, r as sendTo, s as createActor, t as setup, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
14
14
  import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-8Gzepa_A.esm.js";
15
15
  import { r as getUrlSearchParam, t as buildUrlWithSearchParams } from "./urlUtils-B2wagB5v.esm.js";
16
16
  import { s as isCameraDenialErrorName } from "./camera-E_Kcre4O.esm.js";
17
17
  import { i as requestMotionPermission, n as invokeRequestPermissionActor, o as requiresMotionPermissionUserGesture, t as checkPermission, u as queryPermission } from "./permissionServices-D190ATGD.esm.js";
18
- import { i as cameraCycleProvider, n as createCameraCycleOwnership, o as flagIdManualReview, r as runProtectedAttempt, s as PROTECTED_CAPTURE_TARGET, t as electDesktopCameraDevice } from "./desktopCameraElection-BGMtYwk3.esm.js";
18
+ import { i as cameraCycleProvider, n as createCameraCycleOwnership, o as flagIdManualReview, r as runProtectedAttempt, s as PROTECTED_CAPTURE_TARGET, t as electDesktopCameraDevice } from "./desktopCameraElection-m2dAj6Zu.esm.js";
19
19
  import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
20
20
  import { n as needsMotionPrimeOnlyFromPermission, r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-DFV-Ws0a.esm.js";
21
- import { t as carryAttempts } from "./attemptCarry-WOkfvFMw.esm.js";
21
+ import { t as carryAttempts } from "./attemptCarry-BaAXPR_w.esm.js";
22
22
  import { t as StreamCanvasProcessingSession } from "./StreamCanvasProcessingSession-CBnbTnOr.esm.js";
23
23
  import { t as sleep } from "./ITimerCapability-DgdDzp8G.esm.js";
24
24
  import { t as getBrowser } from "./getBrowser-Cbe1C4Tn.esm.js";
@@ -26,7 +26,7 @@ import { t as isBackCameraLabel } from "./backCameraLabel-yda5ugE4.esm.js";
26
26
  import { n as getWindowDimensions } from "./getDeviceClass-CeBiEayS.esm.js";
27
27
  import { t as getDeviceClass } from "./getDeviceClass-DoIWuKI8.esm.js";
28
28
  import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider } from "./idCaptureDefaults-Dszuq9ng.esm.js";
29
- import { C as OPTIMIZING_WATCHDOG_MARGIN_MS, S as CAPTURE_OPTIMIZING, _ as validateUploadResponse, a as finalizeRecordingSession, b as resolveCountdownStepMs, c as isSuspendableRecordingSession, d as processId, f as resumeRecordingAfterPause, g as uploadIdImage, h as stopStream, i as disposeRecordingSession, l as pauseRecordingForAttempt, m as stopRecording, n as addBarcode, o as getRealQualityValue, p as startRecordingSession, s as initializeIdCapture, u as prepareRecordingForCameraRetry, v as ID_ERROR_CODES, w as getIdCameraStream, x as resolveIdCaptureThresholds } from "./idCaptureServices-TSSPG-WW.esm.js";
29
+ import { C as OPTIMIZING_WATCHDOG_MARGIN_MS, S as CAPTURE_OPTIMIZING, _ as validateUploadResponse, a as finalizeRecordingSession, b as resolveCountdownStepMs, c as isSuspendableRecordingSession, d as processId, f as resumeRecordingAfterPause, g as uploadIdImage, h as stopStream, i as disposeRecordingSession, l as pauseRecordingForAttempt, m as stopRecording, n as addBarcode, o as getRealQualityValue, p as startRecordingSession, s as initializeIdCapture, u as prepareRecordingForCameraRetry, v as ID_ERROR_CODES, w as getIdCameraStream, x as resolveIdCaptureThresholds } from "./idCaptureServices-199UFURA.esm.js";
30
30
  import { t as StreamCanvasCapture } from "./StreamCanvasCapture-C9jtgBdT.esm.js";
31
31
  import { n as runVirtualCameraCheck, t as frameSources } from "./virtualCameraCheck-eFOm2C9q.esm.js";
32
32
  //#region src/modules/id/digitalUpload/digitalUploadErrors.ts
@@ -1382,7 +1382,20 @@ function getPermissionOutput(event) {
1382
1382
  }
1383
1383
  const hasShowTutorialGuard = ({ context }) => context.config.showTutorial;
1384
1384
  const hasAgeAssuranceGuard = ({ context }) => context.config.ageAssurance === true;
1385
- const hasShowDocumentChooserGuard = ({ context }) => !context.config.onlyBack && (context.config.showDocumentChooserScreen ?? false);
1385
+ /** Camera capture has something to capture: an ID or a passport is accepted. */
1386
+ const hasPhysicalDocumentType = (context) => context.availableDocumentTypes.some((type) => type === "id" || type === "passport");
1387
+ /**
1388
+ * The chooser shows when configured, and also when only digital-ID options
1389
+ * are available: hiding it would otherwise fall through to camera capture of
1390
+ * a document the module does not accept (PRI-6436).
1391
+ */
1392
+ const hasShowDocumentChooserGuard = ({ context }) => context.availableDocumentTypes.length > 0 && !hasPhysicalDocumentType(context) || !context.config.onlyBack && (context.config.showDocumentChooserScreen ?? false);
1393
+ /**
1394
+ * Chooser hidden and a single web-redirect provider (e.g. FTN) is the only
1395
+ * option: enter it directly. Unlike the device wallet, the redirect needs no
1396
+ * user activation, so no chooser click is required (PRI-6436).
1397
+ */
1398
+ const isSoleDigitalIdRedirectWithoutChooserGuard = ({ context }) => !(context.config.showDocumentChooserScreen ?? false) && context.availableDocumentTypes.length === 1 && context.availableDocumentTypes[0] === "digitalIdRedirect" && context.digitalIdRedirectOptions.length === 1;
1386
1399
  const isPermissionGrantedGuard = ({ event }) => {
1387
1400
  return getPermissionOutput(event) === "granted";
1388
1401
  };
@@ -2031,7 +2044,7 @@ fromPromise(async ({ input }) => {
2031
2044
  });
2032
2045
  fromPromise(async ({ input }) => {
2033
2046
  if (!input.dependencies) return;
2034
- const { loadDeepsightSession } = await import("./deepsightLoader-DkADlKGZ.esm.js");
2047
+ const { loadDeepsightSession } = await import("./deepsightLoader-S0ktD2dZ.esm.js");
2035
2048
  return loadDeepsightSession({
2036
2049
  ds: input.ds,
2037
2050
  storage: input.dependencies.storage,
@@ -2474,7 +2487,7 @@ function cleanup(service) {
2474
2487
  service.cleanup();
2475
2488
  } catch {}
2476
2489
  }
2477
- function createIdMetadataPreparationCoordinator(load = async (input) => (await import("./deepsightLoader-DkADlKGZ.esm.js")).loadDeepsightSession(input)) {
2490
+ function createIdMetadataPreparationCoordinator(load = async (input) => (await import("./deepsightLoader-S0ktD2dZ.esm.js")).loadDeepsightSession(input)) {
2478
2491
  let disposed = false;
2479
2492
  let preparation;
2480
2493
  let service;
@@ -4380,6 +4393,10 @@ const idCaptureMachine = setup({
4380
4393
  performStopMediaRecording(context);
4381
4394
  },
4382
4395
  clearRecordingSession: assign({ recordingSession: () => void 0 }),
4396
+ selectSoleDigitalIdRedirect: assign({
4397
+ selectedDocumentType: () => "digitalIdRedirect",
4398
+ selectedDigitalIdProviderId: ({ context }) => context.digitalIdRedirectOptions[0]?.providerId
4399
+ }),
4383
4400
  setSelectedDocument: assign({
4384
4401
  selectedDocumentType: ({ event }) => {
4385
4402
  if ("documentType" in event) return event.documentType;
@@ -4624,6 +4641,7 @@ const idCaptureMachine = setup({
4624
4641
  isDeepsightReady: isDeepsightReadyGuard,
4625
4642
  needsDeepsightInit: needsDeepsightInitGuard,
4626
4643
  hasNoDocumentTypesAvailable: hasNoDocumentTypesAvailableGuard,
4644
+ isSoleDigitalIdRedirectWithoutChooser: isSoleDigitalIdRedirectWithoutChooserGuard,
4627
4645
  isDigitalIdUploadSelected: ({ event }) => isDigitalIdUploadSelectedGuard({ event: asPublicIdEvent(event) }),
4628
4646
  isDigitalIdRedirectSelected: ({ event }) => isDigitalIdRedirectSelectedGuard({ event: asPublicIdEvent(event) }),
4629
4647
  isDigitalIdSelected: ({ event }) => isDigitalIdSelectedGuard({ event: asPublicIdEvent(event) }),
@@ -4796,6 +4814,11 @@ const idCaptureMachine = setup({
4796
4814
  guard: "hasNoDocumentTypesAvailable",
4797
4815
  actions: [() => console.error(ID_CAPTURE_NO_DOCUMENT_TYPES_ERROR), assign({ error: () => ID_CAPTURE_NO_DOCUMENT_TYPES_ERROR })]
4798
4816
  },
4817
+ {
4818
+ target: "digitalIdRedirect",
4819
+ guard: "isSoleDigitalIdRedirectWithoutChooser",
4820
+ actions: ["selectSoleDigitalIdRedirect"]
4821
+ },
4799
4822
  {
4800
4823
  target: "detectingCountry",
4801
4824
  guard: and(["hasShowDocumentChooser", "needsCountryDetection"])
@@ -5896,6 +5919,11 @@ const idCaptureMachine = setup({
5896
5919
  target: "#idCapture.finished",
5897
5920
  actions: ["storeDigitalIdRedirectResult", "clearPendingDigitalIdRedirect"]
5898
5921
  },
5922
+ {
5923
+ target: "closed",
5924
+ guard: "isSoleDigitalIdRedirectWithoutChooser",
5925
+ actions: ["clearPendingDigitalIdRedirect"]
5926
+ },
5899
5927
  {
5900
5928
  target: "detectingCountry",
5901
5929
  guard: and(["hasShowDocumentChooser", "needsCountryDetection"]),
@@ -0,0 +1,18 @@
1
+ import { t as validateCPF } from "./cpf-BIADjddF.esm.js";
2
+ //#region src/modules/id-ocr/idOcrCpfUtils.ts
3
+ function formatCPF(value) {
4
+ const digits = value.replace(/\D/g, "").slice(0, 11);
5
+ const first = digits.slice(0, 3);
6
+ const second = digits.slice(3, 6);
7
+ const third = digits.slice(6, 9);
8
+ const verifier = digits.slice(9, 11);
9
+ if (digits.length > 9) return `${first}.${second}.${third}-${verifier}`;
10
+ if (digits.length > 6) return `${first}.${second}.${third}`;
11
+ if (digits.length > 3) return `${first}.${second}`;
12
+ return first;
13
+ }
14
+ function isValidCPF(value) {
15
+ return validateCPF(value);
16
+ }
17
+ //#endregion
18
+ export { isValidCPF as n, formatCPF as t };
@@ -1,7 +1,7 @@
1
1
  import { A as StateMachine, C as StateValue, D as PromiseActorLogic, a as ActorRefFromLogic, b as RequiredActorOptions, c as AnyEventObject, g as IsNotNever, h as InputFrom, i as ActorRefFrom, k as MachineSnapshot, m as GetConcreteByKey, o as AnyActorLogic, p as EventObject, r as ActorRef, s as AnyActorRef, u as ConditionalRequired, v as MetaObject, w as Values, x as RequiredLogicInput, y as NonReducibleUnknown } from "./spawn-D9jgw9pW.js";
2
2
  import { t as Manager } from "./Manager-C9T5amUN.js";
3
3
  import "./Actor-DpTj5PFb.js";
4
- import { a as UpdateOcrResponse, i as UpdateOcrDataParams, n as OcrData, t as IdOcrConfig } from "./types-CJ7Yl9K-.js";
4
+ import { a as UpdateOcrResponse, i as UpdateOcrDataParams, n as OcrData, t as IdOcrConfig } from "./types-Bpo97EOh.js";
5
5
  //#region src/modules/id-ocr/idOcrStateMachine.d.ts
6
6
  type IdOcrOcrDocument = 'first' | 'second';
7
7
  type IdOcrContext = {
@@ -109,7 +109,7 @@ declare const idOcrStateMachine: StateMachine<IdOcrContext, {
109
109
  type: "shouldProceedWithoutSubmitToSecondId";
110
110
  params: unknown;
111
111
  };
112
- }>, never, "error" | "idle" | "success" | "finished" | "submitting" | "loading" | "inputting" | "readonly" | "validatingContinue", string, IdOcrInput, NonReducibleUnknown, EventObject, MetaObject, {
112
+ }>, never, "error" | "idle" | "success" | "finished" | "loading" | "submitting" | "inputting" | "readonly" | "validatingContinue", string, IdOcrInput, NonReducibleUnknown, EventObject, MetaObject, {
113
113
  readonly id: "idOcr";
114
114
  readonly initial: "idle";
115
115
  readonly context: ({ input }: {
@@ -210,7 +210,7 @@ declare const idOcrStateMachine: StateMachine<IdOcrContext, {
210
210
  config: IdOcrConfig;
211
211
  formData: UpdateOcrDataParams;
212
212
  editedFields: {};
213
- activeOcrDocument: IdOcrOcrDocument;
213
+ activeOcrDocument: "second" | "first";
214
214
  };
215
215
  readonly states: {
216
216
  readonly idle: {
@@ -1,6 +1,6 @@
1
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ggpBBaZ8.esm.js";
1
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-kU5WJU4B.esm.js";
2
2
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
3
- import { t as idOcrStateMachine } from "./idOcrStateMachine-DNKXh4Rn.esm.js";
3
+ import { t as idOcrStateMachine } from "./idOcrStateMachine-RjNycN07.esm.js";
4
4
  //#region src/modules/id-ocr/idOcrActor.ts
5
5
  function createIdOcrActor(options) {
6
6
  return createActor(idOcrStateMachine, { input: { config: options.config } }).start();