@incodetech/core 2.1.0-rc.2 → 2.1.0-rc.3

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 (259) hide show
  1. package/dist/3dAvatarProvider-ChciZmjE.esm.js +28214 -0
  2. package/dist/{BrowserStorageProvider-D5xc7Lqo.esm.js → BrowserStorageProvider-CrrN540a.esm.js} +1 -25
  3. package/dist/BrowserVisibilityObserverProvider-rim9Jrz-.esm.js +25 -0
  4. package/dist/Face2DProvider-BeLlYBbB.esm.js +824 -0
  5. package/dist/FaceDetectionProvider-B78455D4.d.ts +119 -0
  6. package/dist/IVisibilityObserverCapability-BbWjgpiF.d.ts +12 -0
  7. package/dist/IWasmUtilCapability-d2XvzaCk.d.ts +145 -0
  8. package/dist/IpifyProvider-BRW14_uo.esm.js +51 -0
  9. package/dist/{Manager-B2OEDYqf.d.ts → Manager-CJ3G2zqi.d.ts} +1 -4
  10. package/dist/{OpenViduRecordingProvider-DF7A4ZNJ.esm.js → OpenViduRecordingProvider-B_0GKkzc.esm.js} +1 -1
  11. package/dist/PrivacyLensProvider-hDzaDzZ6.esm.js +339 -0
  12. package/dist/StateMachine-C_AY4cs7.d.ts +2 -0
  13. package/dist/{StreamCanvasCapture-Dr5n_iK1.esm.js → StreamCanvasCapture-Bz17q4FP.esm.js} +1 -1
  14. package/dist/StreamCanvasCapture-DS1TOoiH.d.ts +42 -0
  15. package/dist/{WasmUtilProvider-CIu373BZ.esm.js → WasmUtilProvider-ADG54T6M.esm.js} +16 -1
  16. package/dist/{addressSearch-BH96a3fq.esm.js → addressSearch-DJyNTg5S.esm.js} +4 -4
  17. package/dist/{ae-signature-CDEN8y-w.esm.js → ae-signature-DlElqFrZ.esm.js} +1 -1
  18. package/dist/ae-signature.d.ts +4 -3
  19. package/dist/ae-signature.esm.js +10 -9
  20. package/dist/antifraud.d.ts +4 -3
  21. package/dist/antifraud.esm.js +7 -6
  22. package/dist/{antifraudManager-DZifA5zX.esm.js → antifraudManager-BKdQoMFf.esm.js} +4 -3
  23. package/dist/{antifraudManager-B7WQTIdu.d.ts → antifraudManager-DpIvbrZP.d.ts} +2 -2
  24. package/dist/{antifraudStateMachine-DlKrK2hL.esm.js → antifraudStateMachine-C0NGnP9W.esm.js} +3 -3
  25. package/dist/{api-DUZwyz0o.esm.js → api-DsbUi7TO.esm.js} +21 -2
  26. package/dist/authentication.d.ts +19 -12
  27. package/dist/authentication.esm.js +33 -27
  28. package/dist/{authenticationManager-Dve7mGLe.d.ts → authenticationManager-CdPbNS2H.d.ts} +3 -3
  29. package/dist/{authenticationManager-BM4LzyV7.esm.js → authenticationManager-Dtl1vcET.esm.js} +6 -6
  30. package/dist/{authenticationStateMachine-Chx3ySdT.esm.js → authenticationStateMachine-D-hOlg8p.esm.js} +8 -8
  31. package/dist/avatar.d.ts +3 -0
  32. package/dist/avatar.esm.js +3 -0
  33. package/dist/{backCameraStream-iftkf3rd.esm.js → backCameraStream-ZyqrFyjO.esm.js} +3 -3
  34. package/dist/{browser-DlFgHpoC-7tbRR1aR.esm.js → browser-DlFgHpoC-qLKs75Qp.esm.js} +1 -1
  35. package/dist/{browserSimulation-CGjpdNA1.esm.js → browserSimulation-TsSoavQv.esm.js} +153 -1216
  36. package/dist/camera-DUkgmYMo.esm.js +79 -0
  37. package/dist/camera.d.ts +7 -1
  38. package/dist/camera.esm.js +4 -4
  39. package/dist/{StreamCanvasCapture-Ctgyx-oD.d.ts → canvas-CJUmoXSD.d.ts} +1 -41
  40. package/dist/certificate-issuance.d.ts +31 -30
  41. package/dist/certificate-issuance.esm.js +8 -7
  42. package/dist/{certificateIssuanceStateMachine-CLNXtXaC.esm.js → certificateIssuanceStateMachine-C07m7qtP.esm.js} +4 -4
  43. package/dist/clientLifecycle-Ct7h9uxx.esm.js +534 -0
  44. package/dist/consent.d.ts +4 -3
  45. package/dist/consent.esm.js +7 -6
  46. package/dist/{consentManager-psDCeJ0E.esm.js → consentManager-BtnPZUW4.esm.js} +4 -3
  47. package/dist/{consentManager-BqUGU_YD.d.ts → consentManager-DufVo9D9.d.ts} +52 -52
  48. package/dist/{consentStateMachine-DRsFFSHE.esm.js → consentStateMachine-DO2JqoZW.esm.js} +3 -3
  49. package/dist/cpf-ocr.d.ts +4 -3
  50. package/dist/cpf-ocr.esm.js +7 -6
  51. package/dist/{cpfOcrManager-BxcgxvgO.esm.js → cpfOcrManager-C4rLgKsu.esm.js} +6 -5
  52. package/dist/{cpfOcrManager-B2u9hMzd.d.ts → cpfOcrManager-DqZZ94Gt.d.ts} +19 -19
  53. package/dist/createFaceAvatar-B8pFpy6o.d.ts +401 -0
  54. package/dist/createFaceAvatar-BOHDKQRq.esm.js +46 -0
  55. package/dist/cross-document-data-match.d.ts +2 -1
  56. package/dist/cross-document-data-match.esm.js +6 -5
  57. package/dist/curp-validation.d.ts +10 -7
  58. package/dist/curp-validation.esm.js +7 -6
  59. package/dist/{curpValidationManager-BgLDw0Ub.esm.js → curpValidationManager-BafobPXC.esm.js} +4 -3
  60. package/dist/{curpValidationManager-Bt6CVD8b.d.ts → curpValidationManager-Co6LZAHT.d.ts} +3 -3
  61. package/dist/{curpValidationStateMachine-BK_wJ48C.esm.js → curpValidationStateMachine-DXTPK6vI.esm.js} +3 -3
  62. package/dist/custom-fields.d.ts +3 -2
  63. package/dist/custom-fields.esm.js +6 -5
  64. package/dist/custom-watchlist.d.ts +2 -1
  65. package/dist/custom-watchlist.esm.js +6 -5
  66. package/dist/{customWatchlistStateMachine-Bi4P59HM.esm.js → customWatchlistStateMachine-B4G3Chkx.esm.js} +3 -3
  67. package/dist/{deepsightLoader-BMmvk0X6.esm.js → deepsightLoader-DHSVD776.esm.js} +14 -13
  68. package/dist/{deepsightService-CEZrdiW0.esm.js → deepsightService-CDahSjGP.esm.js} +9 -38
  69. package/dist/deepsightService-CMB9XjES.d.ts +69 -0
  70. package/dist/device.d.ts +9 -1
  71. package/dist/device.esm.js +5 -5
  72. package/dist/document-capture.d.ts +175 -174
  73. package/dist/document-capture.esm.js +14 -13
  74. package/dist/document-upload.d.ts +48 -47
  75. package/dist/document-upload.esm.js +9 -8
  76. package/dist/{documentCaptureStateMachine-MpwpJO7t.esm.js → documentCaptureStateMachine-DSOX2epf.esm.js} +7 -7
  77. package/dist/dynamic-forms.d.ts +4 -192
  78. package/dist/dynamic-forms.esm.js +8 -160
  79. package/dist/dynamicFormsManager-BOefZbyF.esm.js +168 -0
  80. package/dist/dynamicFormsManager-CUYLOj9g.d.ts +239 -0
  81. package/dist/{dynamicFormsStateMachine-Do84A4uU.esm.js → dynamicFormsStateMachine-BXHcaocI.esm.js} +4 -4
  82. package/dist/ekyb.d.ts +9 -6
  83. package/dist/ekyb.esm.js +20 -17
  84. package/dist/{ekybStateMachine-nsuPOw3f.esm.js → ekybStateMachine-CCSeqjCt.esm.js} +5 -5
  85. package/dist/ekyc.d.ts +4 -3
  86. package/dist/ekyc.esm.js +9 -8
  87. package/dist/{ekycStateMachine-DcynX0rj.esm.js → ekycStateMachine-DkLVTOyA.esm.js} +5 -5
  88. package/dist/electronic-signature.d.ts +4 -3
  89. package/dist/electronic-signature.esm.js +9 -8
  90. package/dist/{electronicSignatureManager-B63aAuI5.esm.js → electronicSignatureManager-DjzUzqZj.esm.js} +50 -87
  91. package/dist/email.d.ts +5 -4
  92. package/dist/email.esm.js +9 -8
  93. package/dist/{emailManager-DxHjAe5u.esm.js → emailManager-B_XzEsXH.esm.js} +5 -4
  94. package/dist/{emailManager-C6D2u4mQ.d.ts → emailManager-fHASH6uo.d.ts} +3 -3
  95. package/dist/{emailStateMachine-758f34gg.esm.js → emailStateMachine-fqJ42b19.esm.js} +5 -5
  96. package/dist/{endpoints-BM2_j_IE.esm.js → endpoints-BzMJFAPV.esm.js} +13 -0
  97. package/dist/{events-DN-u67gb.esm.js → events-CqGY1yMq.esm.js} +2 -188
  98. package/dist/events.d.ts +2 -0
  99. package/dist/events.esm.js +3 -2
  100. package/dist/extensibility.d.ts +37 -26
  101. package/dist/extensibility.esm.js +74 -59
  102. package/dist/{externalFetch-crimxkN9.esm.js → externalFetch-CyhBfD-n.esm.js} +1 -1
  103. package/dist/face-match.d.ts +2 -2
  104. package/dist/face-match.esm.js +6 -5
  105. package/dist/{faceCaptureManagerFactory-BNXZchWX.esm.js → faceCaptureManagerFactory-2brKTzMb.esm.js} +25 -16
  106. package/dist/faceCaptureManagerFactory-CGKbf7zt.d.ts +400 -0
  107. package/dist/{faceCaptureSetup-Dqb09D24.esm.js → faceCaptureSetup-CDUVU1nl.esm.js} +97 -13
  108. package/dist/{faceMatchStateMachine-FikRaUZH.esm.js → faceMatchStateMachine-DUeUjEPx.esm.js} +3 -3
  109. package/dist/field-comparison.d.ts +4 -3
  110. package/dist/field-comparison.esm.js +6 -5
  111. package/dist/{fieldComparisonManager-Dic0DVgl.esm.js → fieldComparisonManager-B9W0a9A5.esm.js} +5 -4
  112. package/dist/{fieldComparisonManager-BXc6-DJv.d.ts → fieldComparisonManager-DdLqDeB2.d.ts} +2 -2
  113. package/dist/fiscal-qr.d.ts +5 -3
  114. package/dist/fiscal-qr.esm.js +13 -12
  115. package/dist/flow-events.d.ts +8 -6
  116. package/dist/flow.d.ts +21 -13
  117. package/dist/flow.esm.js +28 -19
  118. package/dist/{flowCompletionService-CdGDKv0z.d.ts → flowCompletionService-BIqSTZcd.d.ts} +2 -1
  119. package/dist/{flowCompletionService-D_CsiDZM.esm.js → flowCompletionService-qEqh_g14.esm.js} +3 -3
  120. package/dist/{flowServices-ar5DXv71.esm.js → flowServices-C4piblgx.esm.js} +24 -9
  121. package/dist/geolocation.d.ts +4 -127
  122. package/dist/geolocation.esm.js +8 -115
  123. package/dist/geolocationManager-BP2Do9O-.esm.js +123 -0
  124. package/dist/geolocationManager-Cs50eRlC.d.ts +156 -0
  125. package/dist/{geolocationStateMachine-BWjrMGS_.esm.js → geolocationStateMachine-BYfOOOG0.esm.js} +4 -4
  126. package/dist/{getDeviceClass-rXKlXywy.esm.js → getDeviceClass-DGGzzfqm.esm.js} +1 -1
  127. package/dist/getDeviceData-TrKM8NPh.esm.js +101 -0
  128. package/dist/government-validation.d.ts +4 -3
  129. package/dist/government-validation.esm.js +8 -7
  130. package/dist/{governmentValidationStateMachine-BoF7U1of.esm.js → governmentValidationStateMachine-CwoPPO8b.esm.js} +5 -5
  131. package/dist/home.d.ts +18 -15
  132. package/dist/home.esm.js +4 -3
  133. package/dist/http.esm.js +2 -2
  134. package/dist/id-ocr.d.ts +4 -625
  135. package/dist/id-ocr.esm.js +8 -84
  136. package/dist/id-verification.d.ts +28 -27
  137. package/dist/id-verification.esm.js +6 -5
  138. package/dist/id.d.ts +16 -11
  139. package/dist/id.esm.js +39 -32
  140. package/dist/idCaptureDefaults-DNJON8Xo.esm.js +188 -0
  141. package/dist/{idCaptureManager-BvGUSN2e.d.ts → idCaptureManager-BVdvfJys.d.ts} +40 -10
  142. package/dist/{idCaptureManager-Bm6Wm6Qv.esm.js → idCaptureManager-Bo9DCQSU.esm.js} +14 -11
  143. package/dist/{idCaptureStateMachine-D1YhOj6n.esm.js → idCaptureStateMachine-BeDidMLU.esm.js} +395 -382
  144. package/dist/idOcrManager-BkRDrpZu.esm.js +92 -0
  145. package/dist/idOcrManager-CJzrmM91.d.ts +641 -0
  146. package/dist/{idOcrStateMachine-YMCDGplq.esm.js → idOcrStateMachine-DRZc4FBl.esm.js} +5 -5
  147. package/dist/{idVerificationStateMachine-Bo1IYuZH.esm.js → idVerificationStateMachine-oqiERKpg.esm.js} +3 -3
  148. package/dist/identity-reuse.d.ts +4 -3
  149. package/dist/identity-reuse.esm.js +7 -6
  150. package/dist/{identityReuseManager-D0knIrOy.esm.js → identityReuseManager-Bu62LToE.esm.js} +4 -3
  151. package/dist/{identityReuseManager-DcWSvC-A.d.ts → identityReuseManager-TWKbXuvY.d.ts} +33 -33
  152. package/dist/{identityReuseStateMachine-CSQfZOqD.esm.js → identityReuseStateMachine-BmONeF6B.esm.js} +3 -3
  153. package/dist/{index-BgxYUYuD.d.ts → index-DtUlD-bz.d.ts} +2 -2
  154. package/dist/{index-DV134v62.d.ts → index-Icld-cKW.d.ts} +175 -295
  155. package/dist/index.d.ts +3 -3
  156. package/dist/index.esm.js +16 -13
  157. package/dist/{invokeOnCaptureCallback-Dzemudhk.esm.js → invokeOnCaptureCallback-v_PV_IJz.esm.js} +1 -1
  158. package/dist/{lib-7ZQ9BdKH.esm.js → lib-B050WTth.esm.js} +1 -1
  159. package/dist/mandatory-consent.d.ts +10 -7
  160. package/dist/mandatory-consent.esm.js +7 -6
  161. package/dist/{mandatoryConsentManager-Tzl5Qd35.d.ts → mandatoryConsentManager-Bmdjo14S.d.ts} +50 -50
  162. package/dist/{mandatoryConsentManager-Lon46nPQ.esm.js → mandatoryConsentManager-CQ3jirlZ.esm.js} +4 -3
  163. package/dist/{mandatoryConsentStateMachine-D_dZ7IF6.esm.js → mandatoryConsentStateMachine-DkJJLHqC.esm.js} +3 -3
  164. package/dist/mediaRecorderOptions-C3NAkVgK.esm.js +42 -0
  165. package/dist/mediapipeShared-CRAKVElv.esm.js +67 -0
  166. package/dist/{recordingService-CxMJP4tQ.esm.js → onDeviceFaceResults-DVBggeq8.esm.js} +71 -389
  167. package/dist/{openviduLazy-oAXXI9w_.esm.js → openviduLazy-BTOIauGP.esm.js} +2 -2
  168. package/dist/openviduLazy-Dov8oKfL.esm.js +3 -0
  169. package/dist/{permissionGuards-D-Z-lgNj.esm.js → permissionGuards-BR2oN573.esm.js} +1 -1
  170. package/dist/{permissionServices-CPDboRoE.esm.js → permissionServices-BJhGL13R.esm.js} +7 -4
  171. package/dist/personhood.d.ts +534 -0
  172. package/dist/personhood.esm.js +1494 -0
  173. package/dist/phone.d.ts +5 -4
  174. package/dist/phone.esm.js +9 -8
  175. package/dist/{phoneManager-TSq1Ief6.d.ts → phoneManager-BOTcjXgs.d.ts} +3 -3
  176. package/dist/{phoneManager-Blt4Oc2P.esm.js → phoneManager-BWlxqbyD.esm.js} +5 -4
  177. package/dist/{phoneStateMachine-W3c6Z8sj.esm.js → phoneStateMachine-B_V9nODs.esm.js} +5 -5
  178. package/dist/{qe-signature-CQLK6LKE.esm.js → qe-signature-BhFnI9pT.esm.js} +1 -1
  179. package/dist/qe-signature.d.ts +4 -3
  180. package/dist/qe-signature.esm.js +10 -9
  181. package/dist/recordingService-m_1xCthr.esm.js +347 -0
  182. package/dist/redirect-to-mobile.d.ts +4 -3
  183. package/dist/redirect-to-mobile.esm.js +9 -8
  184. package/dist/{redirectToMobileManager-DCvpKdkD.esm.js → redirectToMobileManager-BaAo9rgi.esm.js} +5 -4
  185. package/dist/{redirectToMobileManager-yOHAmwg-.d.ts → redirectToMobileManager-Br0KZK1G.d.ts} +2 -2
  186. package/dist/{redirectToMobileStateMachine-DC9z4Vfu.esm.js → redirectToMobileStateMachine-DoAnf2ql.esm.js} +10 -12
  187. package/dist/{runChildModule-C9G0wfVC.esm.js → runChildModule-0nQfjVVo.esm.js} +3 -3
  188. package/dist/selfie.d.ts +19 -12
  189. package/dist/selfie.esm.js +34 -28
  190. package/dist/{selfieManager-BRL6c_Oc.esm.js → selfieManager-D_ZFERsE.esm.js} +6 -6
  191. package/dist/{selfieManager-imY2dAcH.d.ts → selfieManager-R0Jw5sjb.d.ts} +3 -3
  192. package/dist/{selfieStateMachine-D2Q0uwDK.esm.js → selfieStateMachine-CIgeeiN9.esm.js} +4 -4
  193. package/dist/{session-Be_IA1e0.esm.js → session-9jIfKFCc.esm.js} +3 -3
  194. package/dist/session.d.ts +7 -5
  195. package/dist/session.esm.js +16 -14
  196. package/dist/{sessionInitializer-CaiGA8GP.esm.js → sessionInitializer-C_TYIgyk.esm.js} +11 -107
  197. package/dist/{setup-BJZAkajt.d.ts → setup-CpRnXxn8.d.ts} +16 -3
  198. package/dist/setup-DHc6OaHm.esm.js +562 -0
  199. package/dist/signature.d.ts +3 -2
  200. package/dist/signature.esm.js +6 -5
  201. package/dist/{signatureStateMachine-DAxXmMrk.esm.js → signatureStateMachine-DtoiPzys.esm.js} +3 -3
  202. package/dist/{stats-DntyIiGr.esm.js → stats-CYcScXcO.esm.js} +2 -2
  203. package/dist/stats.esm.js +3 -3
  204. package/dist/thumbmarkAdapter-fHBUDlAP.esm.js +1194 -0
  205. package/dist/{tri-CtxWthxz.esm.js → tri-BG1iJsr4.esm.js} +12 -2
  206. package/dist/tri.d.ts +1 -1
  207. package/dist/{tri.esm-CrWAulDi.esm.js → tri.esm-DUC01NgO.esm.js} +27 -23
  208. package/dist/tri.esm.js +2 -2
  209. package/dist/trust-graph.d.ts +4 -3
  210. package/dist/trust-graph.esm.js +4 -3
  211. package/dist/{types-DpTWgfKY.d.ts → types-BklZ_Wne.d.ts} +1 -1
  212. package/dist/{types-Dv-9WPJX.d.ts → types-BsYXnC5s.d.ts} +39 -3
  213. package/dist/types-CxW2e0Ar.d.ts +132 -0
  214. package/dist/{types-Z9wv19v2.d.ts → types-DgGlgyZT.d.ts} +1 -1
  215. package/dist/types-ElOJAGaM.esm.js +189 -0
  216. package/dist/video-C2WIj6TS.esm.js +36 -0
  217. package/dist/video-selfie.d.ts +351 -0
  218. package/dist/video-selfie.esm.js +1509 -0
  219. package/dist/videoSelfieSteps-7M5vxKn-.esm.js +58 -0
  220. package/dist/{warmup--6HA3yUR.d.ts → warmup-BJZPQIiX.d.ts} +5 -1
  221. package/dist/wasm.d.ts +4 -4
  222. package/dist/wasm.esm.js +17 -14
  223. package/dist/watchlist-for-business.d.ts +2 -1
  224. package/dist/watchlist-for-business.esm.js +6 -5
  225. package/dist/watchlist.d.ts +2 -1
  226. package/dist/watchlist.esm.js +6 -5
  227. package/dist/{watchlistForBusinessStateMachine-DtefJb-D.esm.js → watchlistForBusinessStateMachine-DvEunDxs.esm.js} +3 -3
  228. package/dist/{watchlistStateMachine-B0aIS2_n.esm.js → watchlistStateMachine-AHXVf-TB.esm.js} +3 -3
  229. package/dist/workflow.d.ts +230 -98
  230. package/dist/workflow.esm.js +123 -79
  231. package/dist/{xstate.esm-Dkm1jy5u.esm.js → xstate.esm-Bomq1a0z.esm.js} +41 -1
  232. package/package.json +16 -1
  233. package/dist/IpifyProvider-oZf7Ke1O.esm.js +0 -167
  234. package/dist/camera-x4LjGTjZ.esm.js +0 -22
  235. package/dist/deepsightService-ByNKY5Jv.d.ts +0 -276
  236. package/dist/faceCaptureManagerFactory-CL-7T_vH.d.ts +0 -731
  237. package/dist/getBrowser-Dv8LZyHE.esm.js +0 -8
  238. package/dist/openviduLazy-B_s6jnEk.esm.js +0 -3
  239. package/dist/setup-C7tintPc.esm.js +0 -1064
  240. /package/dist/{Actor-fIPLXfoi.d.ts → Actor-CGEelYtQ.d.ts} +0 -0
  241. /package/dist/{BrowserTimerProvider-BVgutW_b.esm.js → BrowserTimerProvider-CHloo0eQ.esm.js} +0 -0
  242. /package/dist/{ITimerCapability-BvH0pDwp.esm.js → ITimerCapability-pltuG1E8.esm.js} +0 -0
  243. /package/dist/{MotionSensorProvider-C9fPAJdS.esm.js → MotionSensorProvider-DCbId4De.esm.js} +0 -0
  244. /package/dist/{apiError-D-GTvFrH.esm.js → apiError-DNS2OCEX.esm.js} +0 -0
  245. /package/dist/{camera-biGPWlmx.d.ts → camera-CNVUo-bC.d.ts} +0 -0
  246. /package/dist/{canvas-7uX2izHb.esm.js → canvas-_I95hkPg.esm.js} +0 -0
  247. /package/dist/{chunk-BK1xu56N.esm.js → chunk-CIKcdghV.esm.js} +0 -0
  248. /package/dist/{cpf-xBg-DFNn.esm.js → cpf-BKaho0j_.esm.js} +0 -0
  249. /package/dist/{dateUtils-8dCcuArE.esm.js → dateUtils-7-tQYRNN.esm.js} +0 -0
  250. /package/dist/{getDeviceClass-C0zrM97a.esm.js → getDeviceClass-DavNdcxh.esm.js} +0 -0
  251. /package/dist/{http-CfVTgMfU.esm.js → http-BkiUT7EB.esm.js} +0 -0
  252. /package/dist/{index-52_qi4bd.d.ts → index-XTtxaahe.d.ts} +0 -0
  253. /package/dist/{otp-D87RTwrx.esm.js → otp-Bfnzf7I3.esm.js} +0 -0
  254. /package/dist/{otp-BHJnjEEc.d.ts → otp-M4iy57XY.d.ts} +0 -0
  255. /package/dist/{platform-BfoqeM61.esm.js → platform-uIVQUnJP.esm.js} +0 -0
  256. /package/dist/{types-BdVOWGGW.esm.js → types-CMcxlSmH.esm.js} +0 -0
  257. /package/dist/{types-DYZja-k9.d.ts → types-D_IceWxT.d.ts} +0 -0
  258. /package/dist/{types-F0IXbaCB.d.ts → types-Duy2rDxF.d.ts} +0 -0
  259. /package/dist/{urlUtils-8RNHyW3x.esm.js → urlUtils-BZqFU9rR.esm.js} +0 -0
@@ -1,20 +1,21 @@
1
- import { d as IdCaptureModelType, i as mlWasmJSApi_default, n as BaseWasmProvider, u as WasmPipelineType } from "./WasmUtilProvider-CIu373BZ.esm.js";
2
- import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BVgutW_b.esm.js";
3
- import { r as getToken, t as api } from "./api-DUZwyz0o.esm.js";
4
- import { C as revokeObjectURL } from "./events-DN-u67gb.esm.js";
5
- import { t as endpoints } from "./endpoints-BM2_j_IE.esm.js";
6
- import { t as addDeviceStats } from "./stats-DntyIiGr.esm.js";
7
- import { t as getDisableIpify } from "./sessionInitializer-CaiGA8GP.esm.js";
8
- import { n as isDesktop } from "./platform-BfoqeM61.esm.js";
9
- import { a as fromPromise, i as fromCallback, n as sendTo, o as and, r as assign, t as setup } from "./xstate.esm-Dkm1jy5u.esm.js";
10
- import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-CPDboRoE.esm.js";
11
- import { _ as startRecording, g as createRecordingSession, i as flagIdManualReview, n as preloadOpenViduProvider, v as stopRecording$1, y as StreamCanvasProcessingSession } from "./recordingService-CxMJP4tQ.esm.js";
12
- import { t as IncodeCanvas } from "./canvas-7uX2izHb.esm.js";
13
- import { n as getBackCameraStream } from "./backCameraStream-iftkf3rd.esm.js";
14
- import { n as getWindowDimensions } from "./getDeviceClass-C0zrM97a.esm.js";
15
- import { t as getDeviceClass } from "./getDeviceClass-rXKlXywy.esm.js";
16
- import { t as StreamCanvasCapture } from "./StreamCanvasCapture-Dr5n_iK1.esm.js";
17
- import { n as needsMotionPrimeOnlyFromPermission, r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-D-Z-lgNj.esm.js";
1
+ import { t as BrowserTimerProvider } from "./BrowserTimerProvider-CHloo0eQ.esm.js";
2
+ import { r as getToken, t as api } from "./api-DsbUi7TO.esm.js";
3
+ import { v as revokeObjectURL } from "./events-CqGY1yMq.esm.js";
4
+ import { t as endpoints } from "./endpoints-BzMJFAPV.esm.js";
5
+ import { t as addDeviceStats } from "./stats-CYcScXcO.esm.js";
6
+ import { t as getDisableIpify } from "./sessionInitializer-C_TYIgyk.esm.js";
7
+ import { n as isDesktop } from "./platform-uIVQUnJP.esm.js";
8
+ import { a as fromPromise, c as not, i as fromCallback, n as sendTo, o as and, r as assign, t as setup } from "./xstate.esm-Bomq1a0z.esm.js";
9
+ import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-BJhGL13R.esm.js";
10
+ import { _ as stopRecording$1, g as startRecording, h as createRecordingSession, y as StreamCanvasProcessingSession } from "./onDeviceFaceResults-DVBggeq8.esm.js";
11
+ import { t as IncodeCanvas } from "./canvas-_I95hkPg.esm.js";
12
+ import { n as getBackCameraStream } from "./backCameraStream-ZyqrFyjO.esm.js";
13
+ import { n as getWindowDimensions } from "./getDeviceClass-DavNdcxh.esm.js";
14
+ import { t as getDeviceClass } from "./getDeviceClass-DGGzzfqm.esm.js";
15
+ import { t as StreamCanvasCapture } from "./StreamCanvasCapture-Bz17q4FP.esm.js";
16
+ import { n as needsMotionPrimeOnlyFromPermission, r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-BR2oN573.esm.js";
17
+ import { i as flagIdManualReview, n as preloadOpenViduProvider } from "./recordingService-m_1xCthr.esm.js";
18
+ import { i as IdCaptureProvider, n as DEFAULT_ID_CAPTURE_MODEL_VERSION, r as DEFAULT_ID_CAPTURE_THRESHOLDS } from "./idCaptureDefaults-DNJON8Xo.esm.js";
18
19
 
19
20
  //#region src/modules/id/digitalUpload/digitalUploadErrors.ts
20
21
  const TERMINAL_FAIL_REASONS = new Set(["DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED", "ID_TYPE_UNACCEPTABLE"]);
@@ -390,147 +391,57 @@ function mapFailReasonToErrorKey(response, expectedTab) {
390
391
  }
391
392
 
392
393
  //#endregion
393
- //#region ../infra/src/providers/wasm/IdCaptureProvider.ts
394
- var IdCaptureProvider = class extends BaseWasmProvider {
395
- constructor() {
396
- super(WasmPipelineType.IdBlurGlarePipeline);
397
- this.lastProcessResult = null;
398
- this.capturedCanvas = null;
399
- this.originalCapturedCanvas = null;
400
- }
401
- async initialize(config) {
402
- await this.initializeBase(config, "idCapture");
403
- }
404
- setCallbacks(callbacks) {
405
- this.ensureInitialized();
406
- const onCaptureWrapper = () => {
407
- callbacks.onCapture?.();
408
- };
409
- mlWasmJSApi_default.setIdCaptureCallbacks(this.getPipelineType(), callbacks.onFarAway ?? (() => {}), callbacks.onDetectionStarted ?? (() => {}), callbacks.onMaskChange ? (show, mask, top, orientation) => callbacks.onMaskChange?.(show, mask, top, orientation) : () => {}, callbacks.onBlur ?? (() => {}), callbacks.onGlare ?? (() => {}), callbacks.onCapturing ?? (() => {}), callbacks.onCapture ? onCaptureWrapper : () => {}, callbacks.onBestFrame ? (blur, glare, orientation) => callbacks.onBestFrame?.(blur, glare, orientation) : () => {}, callbacks.onIdNotDetected ?? (() => {}), callbacks.onSwitchToManualCapture ?? (() => {}), callbacks.onIdTypeChange ? (idType) => callbacks.onIdTypeChange?.(idType) : () => {}, callbacks.onIdSideChange ? (side) => callbacks.onIdSideChange?.(side) : () => {}, callbacks.onCapturingCounterValueChange ? (value) => callbacks.onCapturingCounterValueChange?.(value) : () => {});
410
- }
411
- setThresholds(thresholds) {
412
- this.ensureInitialized();
413
- mlWasmJSApi_default.setIdCaptureThresholds(this.getPipelineType(), thresholds.blurThreshold, thresholds.blurChangeThreshold, thresholds.glareThreshold, thresholds.clsThreshold, thresholds.sideThreshold, thresholds.iouThreshold, thresholds.idDetectedTimeout, thresholds.autocaptureTimeout, thresholds.framesAggregationInterval);
414
- }
415
- setGeometry(geometry) {
416
- this.ensureInitialized();
417
- mlWasmJSApi_default.setIdCaptureGeometryParams(this.getPipelineType(), geometry.areaDown, geometry.areaUp, geometry.areaIOSPassportUp, geometry.areaIOSPassportDown, geometry.widthIOSUp, geometry.widthIOSDown, geometry.widthDown, geometry.widthUp, geometry.windowOuterWidth, geometry.windowOuterHeight, geometry.windowInnerWidth, geometry.windowInnerHeight);
418
- }
419
- setSettings(settings) {
420
- this.ensureInitialized();
421
- mlWasmJSApi_default.setIdCaptureConfigParams(this.getPipelineType(), settings.isFixedMask, settings.isIPhone14OrHigher, settings.idType, settings.blurCheckEnabled, settings.glareCheckEnabled, settings.faceQualityCheckEnabled, settings.iouCheckEnabled, settings.fpsLimitEnabled);
422
- }
423
- setModelType(modelType) {
424
- this.ensureInitialized();
425
- let wasmModelType;
426
- switch (modelType) {
427
- case "v1":
428
- wasmModelType = IdCaptureModelType.IdCaptureV1x;
429
- break;
430
- case "v2":
431
- wasmModelType = IdCaptureModelType.IdCaptureV2x;
432
- break;
433
- case "v3":
434
- wasmModelType = IdCaptureModelType.IdCaptureV3x;
435
- break;
436
- default: throw new Error(`Unknown model type: ${modelType}`);
394
+ //#region ../infra/src/media/imageFile.ts
395
+ const DEFAULT_IMAGE_MIME_TYPE = "image/jpeg";
396
+ const DEFAULT_IMAGE_QUALITY = .92;
397
+ const canNormalizeImageFile = (file) => file.type.startsWith("image/") && typeof document !== "undefined" && typeof Image !== "undefined" && typeof URL !== "undefined" && typeof URL.createObjectURL === "function";
398
+ const readFileAsDataUrl = (file) => new Promise((resolve, reject) => {
399
+ const reader = new FileReader();
400
+ reader.onload = () => {
401
+ const result = reader.result;
402
+ if (typeof result === "string") {
403
+ resolve(result);
404
+ return;
437
405
  }
438
- mlWasmJSApi_default.setIdCaptureModelType(this.getPipelineType(), wasmModelType);
439
- }
440
- /**
441
- * Processes a frame through the WASM pipeline and stores the result.
442
- */
443
- async processFrame(image) {
444
- const result = await this.processFrameWasm(image);
445
- const pipelineType = this.getPipelineType();
446
- if (result && pipelineType === WasmPipelineType.IdBlurGlarePipeline) this.lastProcessResult = result;
447
- else this.lastProcessResult = null;
448
- }
449
- /**
450
- * Gets the last process result from the most recent frame processing.
451
- * @returns The last process result with quad coordinates, or null if not available
452
- */
453
- getLastProcessResult() {
454
- return this.lastProcessResult;
455
- }
456
- transformPerspective(canvas, frameRect) {
457
- this.ensureInitialized();
458
- const originalWidth = canvas.width();
459
- const originalHeight = canvas.height();
460
- try {
461
- const imageData = canvas.getImageData();
462
- if (!imageData) return canvas;
463
- const transformedCanvas = mlWasmJSApi_default.IdPerspectiveTransform(imageData, frameRect);
464
- if (transformedCanvas) {
465
- const wrappedCanvas = new IncodeCanvas(transformedCanvas);
466
- const wrappedWidth = wrappedCanvas.width();
467
- const wrappedHeight = wrappedCanvas.height();
468
- if (wrappedWidth === originalWidth && wrappedHeight === originalHeight) {
469
- const croppedCanvas = this.cropCanvasToRect(wrappedCanvas, {
470
- x: Math.round(frameRect.x),
471
- y: Math.round(frameRect.y),
472
- w: Math.round(frameRect.w),
473
- h: Math.round(frameRect.h)
474
- });
475
- if (croppedCanvas) return croppedCanvas;
476
- }
477
- return wrappedCanvas;
478
- }
479
- return canvas;
480
- } catch (_error) {
481
- return canvas;
482
- }
483
- }
484
- /**
485
- * Crops a canvas to the specified rectangle region.
486
- * @param canvas - The canvas to crop
487
- * @param rect - The rectangle to crop to (x, y, w, h)
488
- * @returns A new IncodeCanvas with the cropped region, or null if cropping fails
489
- */
490
- cropCanvasToRect(canvas, rect) {
491
- const canvasWidth = canvas.width();
492
- const canvasHeight = canvas.height();
493
- if (!canvasWidth || !canvasHeight) return null;
494
- const x = Math.max(0, Math.min(rect.x, canvasWidth));
495
- const y = Math.max(0, Math.min(rect.y, canvasHeight));
496
- const w = Math.max(1, Math.min(rect.w, canvasWidth - x));
497
- const h = Math.max(1, Math.min(rect.h, canvasHeight - y));
498
- const croppedCanvasElement = document.createElement("canvas");
499
- croppedCanvasElement.width = w;
500
- croppedCanvasElement.height = h;
501
- const ctx = croppedCanvasElement.getContext("2d");
502
- if (!ctx) return null;
503
- ctx.drawImage(canvas.canvas, x, y, w, h, 0, 0, w, h);
504
- return new IncodeCanvas(croppedCanvasElement);
505
- }
506
- /**
507
- * Gets the captured canvas (transformed for preview).
508
- * @returns The captured canvas, or null if not available
509
- */
510
- getCapturedCanvas() {
511
- return this.capturedCanvas;
512
- }
513
- /**
514
- * Gets the original captured canvas (full frame for upload).
515
- * @returns The original captured canvas, or null if not available
516
- */
517
- getOriginalCapturedCanvas() {
518
- return this.originalCapturedCanvas;
519
- }
520
- /**
521
- * Sets the captured canvases (original and transformed).
522
- * @param original - The original full-frame canvas (for upload)
523
- * @param transformed - The transformed canvas (for preview)
524
- */
525
- setCapturedCanvases(original, transformed) {
526
- this.originalCapturedCanvas = original;
527
- this.capturedCanvas = transformed;
406
+ reject(/* @__PURE__ */ new Error("FileReader produced non-string result"));
407
+ };
408
+ reader.onerror = () => {
409
+ reject(reader.error ?? /* @__PURE__ */ new Error("FileReader failed"));
410
+ };
411
+ reader.readAsDataURL(file);
412
+ });
413
+ const loadImage = (url) => new Promise((resolve, reject) => {
414
+ const image = new Image();
415
+ image.onload = () => resolve(image);
416
+ image.onerror = () => reject(/* @__PURE__ */ new Error("Image decoding failed"));
417
+ image.src = url;
418
+ });
419
+ const fileToCanvasDataUrl = async (file, options) => {
420
+ const objectUrl = URL.createObjectURL(file);
421
+ try {
422
+ const image = await loadImage(objectUrl);
423
+ const width = image.naturalWidth || image.width;
424
+ const height = image.naturalHeight || image.height;
425
+ if (width <= 0 || height <= 0) return readFileAsDataUrl(file);
426
+ const canvas = document.createElement("canvas");
427
+ canvas.width = width;
428
+ canvas.height = height;
429
+ const context = canvas.getContext("2d");
430
+ if (!context) return readFileAsDataUrl(file);
431
+ context.fillStyle = "#fff";
432
+ context.fillRect(0, 0, width, height);
433
+ context.drawImage(image, 0, 0, width, height);
434
+ return canvas.toDataURL(options.mimeType ?? DEFAULT_IMAGE_MIME_TYPE, options.quality ?? DEFAULT_IMAGE_QUALITY);
435
+ } finally {
436
+ URL.revokeObjectURL(objectUrl);
528
437
  }
529
- reset() {
530
- super.reset();
531
- this.lastProcessResult = null;
532
- this.capturedCanvas = null;
533
- this.originalCapturedCanvas = null;
438
+ };
439
+ const imageFileToDataUrl = async (file, options = {}) => {
440
+ if (!canNormalizeImageFile(file)) return readFileAsDataUrl(file);
441
+ try {
442
+ return await fileToCanvasDataUrl(file, options);
443
+ } catch {
444
+ return readFileAsDataUrl(file);
534
445
  }
535
446
  };
536
447
 
@@ -769,7 +680,7 @@ function preloadIdRecordingProvider(config) {
769
680
  preloadOpenViduProvider();
770
681
  }
771
682
  async function createOpenViduRecordingProvider() {
772
- const { OpenViduRecordingProvider } = await import("./OpenViduRecordingProvider-DF7A4ZNJ.esm.js");
683
+ const { OpenViduRecordingProvider } = await import("./OpenViduRecordingProvider-B_0GKkzc.esm.js");
773
684
  return new OpenViduRecordingProvider();
774
685
  }
775
686
  async function startRecordingSession(params) {
@@ -844,49 +755,47 @@ async function uploadManualIdFile(params) {
844
755
 
845
756
  //#endregion
846
757
  //#region src/modules/id/manualUpload/manualUploadServices.ts
847
- /**
848
- * Read a File's bytes and return the raw base64 payload (the portion after
849
- * `data:<mime>;base64,`). The backend's `/omni/add/*-id/v2` endpoints reject
850
- * full data-URLs with `IllegalArgumentException: Illegal base64 character 3a`,
851
- * so the prefix must be stripped before posting. Mirrors the live-camera
852
- * path in `packages/infra/src/media/canvas.ts:getBase64Image()`.
853
- */
854
- function fileToBase64Payload(file) {
855
- return new Promise((resolve, reject) => {
856
- const reader = new FileReader();
857
- reader.onload = () => {
858
- const result = reader.result;
859
- if (typeof result !== "string") {
860
- reject(/* @__PURE__ */ new Error("FileReader produced non-string result"));
861
- return;
862
- }
863
- const commaIndex = result.indexOf(",");
864
- resolve(commaIndex === -1 ? result : result.slice(commaIndex + 1));
865
- };
866
- reader.onerror = () => {
867
- reject(reader.error ?? /* @__PURE__ */ new Error("FileReader failed"));
868
- };
869
- reader.readAsDataURL(file);
870
- });
871
- }
758
+ const stripDataUrlPrefix = (dataUrl) => {
759
+ const commaIndex = dataUrl.indexOf(",");
760
+ return commaIndex === -1 ? dataUrl : dataUrl.slice(commaIndex + 1);
761
+ };
762
+ const getBase64PayloadByteLength = (payload) => {
763
+ const normalized = payload.replace(/\s/g, "");
764
+ let padding = 0;
765
+ if (normalized.endsWith("==")) padding = 2;
766
+ else if (normalized.endsWith("=")) padding = 1;
767
+ return Math.max(0, Math.floor(normalized.length * 3 / 4) - padding);
768
+ };
769
+ const isBase64PayloadWithinSize = (payload, maxBytes) => getBase64PayloadByteLength(payload) <= maxBytes;
770
+ const fileToBase64Payload = async (file) => {
771
+ return stripDataUrlPrefix(await imageFileToDataUrl(file));
772
+ };
872
773
 
873
774
  //#endregion
874
775
  //#region src/modules/id/manualUpload/manualUploadStateMachine.ts
875
776
  const uploadManualFileActor = fromPromise(async ({ input, signal }) => {
876
777
  const base64Image = await fileToBase64Payload(input.file);
877
- return uploadManualIdFile({
878
- side: input.side,
879
- base64Image,
880
- retry: input.retry,
881
- onlyFront: input.onlyFront,
882
- isSecondId: input.isSecondId,
883
- extractIdFace: input.extractIdFace,
884
- signal
885
- });
778
+ if (!isBase64PayloadWithinSize(base64Image, MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES)) return { type: "fileTooLarge" };
779
+ return {
780
+ type: "uploaded",
781
+ response: await uploadManualIdFile({
782
+ side: input.side,
783
+ base64Image,
784
+ retry: input.retry,
785
+ onlyFront: input.onlyFront,
786
+ isSecondId: input.isSecondId,
787
+ extractIdFace: input.extractIdFace,
788
+ signal
789
+ })
790
+ };
886
791
  });
887
- const getUploadResponseFromEvent = (event) => {
792
+ const getUploadOutputFromEvent = (event) => {
888
793
  if ("output" in event) return event.output;
889
794
  };
795
+ const getUploadResponseFromEvent = (event) => {
796
+ const output = getUploadOutputFromEvent(event);
797
+ return output?.type === "uploaded" ? output.response : void 0;
798
+ };
890
799
  const _manualUploadMachine = setup({
891
800
  types: {
892
801
  context: {},
@@ -944,14 +853,15 @@ const _manualUploadMachine = setup({
944
853
  errorSide: null
945
854
  })),
946
855
  recordSkipBackFromResponse: assign(({ event }) => {
947
- if (!("output" in event)) return {};
948
- if (!event.output.skipBackIdCapture) return {};
856
+ const response = getUploadResponseFromEvent(event);
857
+ if (!response) return {};
858
+ if (!response.skipBackIdCapture) return {};
949
859
  return { skipBackFromServer: true };
950
860
  }),
951
861
  decrementManualUploadRetries: assign(({ context }) => ({ retriesLeft: Math.max(0, context.retriesLeft - 1) })),
952
862
  setManualUploadErrorFromResponse: assign(({ context, event }) => {
953
- if (!("output" in event)) return {};
954
- const response = event.output;
863
+ const response = getUploadResponseFromEvent(event);
864
+ if (!response) return {};
955
865
  return { errorMessage: mapFailReasonToErrorKey(response, context.activeTab) ?? "manualIdUpload.generic" };
956
866
  }),
957
867
  setManualUploadGenericError: assign(() => ({ errorMessage: "manualIdUpload.generic" })),
@@ -990,7 +900,8 @@ const _manualUploadMachine = setup({
990
900
  const response = getUploadResponseFromEvent(event);
991
901
  if (!response) return false;
992
902
  return mapFailReasonToErrorKey(response, context.activeTab) !== null;
993
- }
903
+ },
904
+ manualUploadPayloadTooLarge: ({ event }) => getUploadOutputFromEvent(event)?.type === "fileTooLarge"
994
905
  }
995
906
  }).createMachine({
996
907
  id: "manualUpload",
@@ -1064,22 +975,30 @@ const _manualUploadMachine = setup({
1064
975
  isSecondId: context.isSecondId,
1065
976
  extractIdFace: context.extractIdFace
1066
977
  }),
1067
- onDone: [{
1068
- guard: "manualUploadResponseHasError",
1069
- target: "checkRetries",
1070
- actions: [
1071
- "decrementManualUploadRetries",
1072
- "setManualUploadErrorFromResponse",
1073
- "markErrorSideFront"
1074
- ]
1075
- }, {
1076
- target: "selecting",
1077
- actions: [
1078
- "markFrontUploaded",
1079
- "recordSkipBackFromResponse",
1080
- "clearManualUploadError"
1081
- ]
1082
- }],
978
+ onDone: [
979
+ {
980
+ guard: "manualUploadPayloadTooLarge",
981
+ target: "selecting",
982
+ actions: ["setManualUploadFileTooLargeError", "markErrorSideFront"]
983
+ },
984
+ {
985
+ guard: "manualUploadResponseHasError",
986
+ target: "checkRetries",
987
+ actions: [
988
+ "decrementManualUploadRetries",
989
+ "setManualUploadErrorFromResponse",
990
+ "markErrorSideFront"
991
+ ]
992
+ },
993
+ {
994
+ target: "selecting",
995
+ actions: [
996
+ "markFrontUploaded",
997
+ "recordSkipBackFromResponse",
998
+ "clearManualUploadError"
999
+ ]
1000
+ }
1001
+ ],
1083
1002
  onError: {
1084
1003
  target: "checkRetries",
1085
1004
  actions: [
@@ -1099,18 +1018,26 @@ const _manualUploadMachine = setup({
1099
1018
  onlyFront: false,
1100
1019
  isSecondId: context.isSecondId
1101
1020
  }),
1102
- onDone: [{
1103
- guard: "manualUploadResponseHasError",
1104
- target: "checkRetries",
1105
- actions: [
1106
- "decrementManualUploadRetries",
1107
- "setManualUploadErrorFromResponse",
1108
- "markErrorSideBack"
1109
- ]
1110
- }, {
1111
- target: "selecting",
1112
- actions: ["markBackUploaded", "clearManualUploadError"]
1113
- }],
1021
+ onDone: [
1022
+ {
1023
+ guard: "manualUploadPayloadTooLarge",
1024
+ target: "selecting",
1025
+ actions: ["setManualUploadFileTooLargeError", "markErrorSideBack"]
1026
+ },
1027
+ {
1028
+ guard: "manualUploadResponseHasError",
1029
+ target: "checkRetries",
1030
+ actions: [
1031
+ "decrementManualUploadRetries",
1032
+ "setManualUploadErrorFromResponse",
1033
+ "markErrorSideBack"
1034
+ ]
1035
+ },
1036
+ {
1037
+ target: "selecting",
1038
+ actions: ["markBackUploaded", "clearManualUploadError"]
1039
+ }
1040
+ ],
1114
1041
  onError: {
1115
1042
  target: "checkRetries",
1116
1043
  actions: [
@@ -1131,18 +1058,26 @@ const _manualUploadMachine = setup({
1131
1058
  isSecondId: context.isSecondId,
1132
1059
  extractIdFace: context.extractIdFace
1133
1060
  }),
1134
- onDone: [{
1135
- guard: "manualUploadResponseHasError",
1136
- target: "checkRetries",
1137
- actions: [
1138
- "decrementManualUploadRetries",
1139
- "setManualUploadErrorFromResponse",
1140
- "markErrorSidePassport"
1141
- ]
1142
- }, {
1143
- target: "selecting",
1144
- actions: ["markPassportUploaded", "clearManualUploadError"]
1145
- }],
1061
+ onDone: [
1062
+ {
1063
+ guard: "manualUploadPayloadTooLarge",
1064
+ target: "selecting",
1065
+ actions: ["setManualUploadFileTooLargeError", "markErrorSidePassport"]
1066
+ },
1067
+ {
1068
+ guard: "manualUploadResponseHasError",
1069
+ target: "checkRetries",
1070
+ actions: [
1071
+ "decrementManualUploadRetries",
1072
+ "setManualUploadErrorFromResponse",
1073
+ "markErrorSidePassport"
1074
+ ]
1075
+ },
1076
+ {
1077
+ target: "selecting",
1078
+ actions: ["markPassportUploaded", "clearManualUploadError"]
1079
+ }
1080
+ ],
1146
1081
  onError: {
1147
1082
  target: "checkRetries",
1148
1083
  actions: [
@@ -1231,6 +1166,157 @@ function mapIdManualUploadScreenName(value, context) {
1231
1166
  return "IDmanual.upload.uploadedFront";
1232
1167
  }
1233
1168
 
1169
+ //#endregion
1170
+ //#region src/modules/id/idCaptureGuards.ts
1171
+ const hasShowTutorialGuard = ({ context }) => context.config.showTutorial;
1172
+ const hasAgeAssuranceGuard = ({ context }) => context.config.ageAssurance === true;
1173
+ const hasShowDocumentChooserGuard = ({ context }) => !context.config.onlyBack && (context.config.showDocumentChooserScreen ?? false);
1174
+ const isPermissionGrantedGuard = ({ event }) => {
1175
+ if ("output" in event) return event.output === "granted";
1176
+ return false;
1177
+ };
1178
+ const isReadyForCaptureGuard = ({ context, event }) => {
1179
+ return isReadyForCaptureFromPermission(resolveStoredPermissionResult("output" in event ? event.output : void 0, context.permissionResult), context.config.ds);
1180
+ };
1181
+ const needsMotionPrimeOnlyGuard = ({ context, event }) => {
1182
+ return needsMotionPrimeOnlyFromPermission(resolveStoredPermissionResult("output" in event ? event.output : void 0, context.permissionResult), context.config.ds);
1183
+ };
1184
+ const isPermissionDeniedErrorGuard = ({ event }) => {
1185
+ if ("error" in event) {
1186
+ const error = event.error;
1187
+ return error?.name === "NotAllowedError" || error?.name === "PermissionDeniedError";
1188
+ }
1189
+ return false;
1190
+ };
1191
+ const hasStreamGuard = ({ context }) => context.stream !== void 0;
1192
+ const hasAttemptsRemainingGuard = ({ context }) => context.attemptsRemaining > 0;
1193
+ const hasCapturedImageGuard = ({ context }) => {
1194
+ return context.provider?.getCapturedCanvas() !== null;
1195
+ };
1196
+ const hasUploadValidationErrorGuard = ({ context }) => {
1197
+ if (!context.uploadResponse) return false;
1198
+ return validateUploadResponse(context.uploadResponse, {
1199
+ skipGlareFront: context.uploadResponse.skipGlareFront,
1200
+ skipGlareBack: context.uploadResponse.skipGlareBack
1201
+ }) !== void 0;
1202
+ };
1203
+ const isFrontModeGuard = ({ context }) => context.currentMode === "front" || context.currentMode === "passport";
1204
+ /**
1205
+ * `config.onlyFront` from the orchestrated flow JSON is intentionally not
1206
+ * read here: the flow value cannot account for per-document overrides, so the
1207
+ * backend resolves the real policy per document at upload time
1208
+ * (via `skipBackIdCapture` on the upload response). Standalone
1209
+ * `idCaptureManager` consumers that pass `onlyFront: true` directly will
1210
+ * therefore also be ignored — re-wire this guard if that capability is needed
1211
+ * again.
1212
+ */
1213
+ const isOnlyFrontGuard = (_args) => false;
1214
+ const shouldContinueToBackGuard = ({ context }) => {
1215
+ if (context.currentMode !== "front" && context.currentMode !== "passport") return false;
1216
+ if (context.config.onlyBack) return false;
1217
+ if (context.config.usSmartCapture) return false;
1218
+ if (context.uploadResponse?.skipBackIdCapture) return false;
1219
+ return true;
1220
+ };
1221
+ const shouldContinueToFrontGuard = ({ context }) => context.config.usSmartCapture === true && context.currentMode === "back" && context.uploadResponse?.forceFrontIdCapture === true;
1222
+ const hasMandatoryConsentGuard = ({ context }) => context.uploadResponse?.showMandatoryConsent === true;
1223
+ const isDeepsightEnabledGuard = ({ context }) => context.dependencies !== void 0;
1224
+ const isDeepsightReadyGuard = ({ context }) => context.deepsightService !== void 0;
1225
+ const needsDeepsightInitGuard = ({ context }) => context.dependencies !== void 0 && context.deepsightService === void 0 && !context.deepsightInitAttempted;
1226
+ const hasOnlyManualUploadAvailableGuard = ({ context }) => context.availableDocumentTypes.length === 1 && context.availableDocumentTypes[0] === "manualIdUpload";
1227
+ /** No capture option is enabled — the ID module is misconfigured. */
1228
+ const hasNoDocumentTypesAvailableGuard = ({ context }) => context.availableDocumentTypes.length === 0;
1229
+ const isManualIdUploadSelectedGuard = ({ event }) => event.type === "SELECT_DOCUMENT" && event.documentType === "manualIdUpload";
1230
+ const isDigitalIdUploadSelectedGuard = ({ event }) => event.type === "SELECT_DOCUMENT" && event.documentType === "digitalIdUpload";
1231
+ const isUploadExpiredGuard = ({ context }) => context.uploadResponse?.isDocumentExpired === true;
1232
+ /**
1233
+ * Fixed cap on same-side expired retries, intentionally decoupled from the
1234
+ * dashboard-configurable `captureAttempts`.
1235
+ *
1236
+ * Business decision: the expired-ID retry policy is a fixed UX limit ("let the
1237
+ * user try a different ID a bounded number of times"), separate from the
1238
+ * generic capture-quality retry budget. The value `3` and this separation are
1239
+ * prescribed by the ENG-41643 spec — "[WEB] Document FE - Handle Expired ID
1240
+ * Errors on Front and Back ID Capture"
1241
+ * (https://app.notion.com/p/3264c3caef498080a44adf5ab62fcb77): *"Add
1242
+ * `MAX_EXPIRED_FIRST_SIDE_ATTEMPTS = 3` constant"* / *"Allow up to 3 attempts
1243
+ * when expired ID is detected on first side capture"*. SDK V1 implements it as
1244
+ * exactly this hardcoded constant (incode-welcome `Capture.tsx`), independent
1245
+ * of the configured capture-attempts; this restores that parity for ENG-46592
1246
+ * (https://app.notion.com/p/36b4c3caef4980f58f3ee3b1b4e234f2).
1247
+ *
1248
+ * NOTE: ENG-45666's acceptance text says the cap should follow "a specified
1249
+ * number of times if differently set on dashboard/SDK level". That wording
1250
+ * conflicts with the ENG-41643 spec + V1 for the *expired* path specifically;
1251
+ * V1 parity was chosen as source of truth here (see changeset
1252
+ * `eng-46592-r2-expired-id-v1-parity`). The configurable `captureAttempts`
1253
+ * still governs generic (non-expired) capture retries.
1254
+ */
1255
+ const MAX_EXPIRED_FIRST_SIDE_ATTEMPTS = 3;
1256
+ /**
1257
+ * True when *this* expired upload will exhaust the same-side expired budget.
1258
+ * Compares the post-increment count, so the exhaustion branch can be picked in
1259
+ * the same tick that runs `incrementExpiredAttempts`:
1260
+ * - attempt 1 → 0+1=1 (not exhausted)
1261
+ * - attempt 2 → 1+1=2 (not exhausted)
1262
+ * - attempt 3 → 2+1=3 (exhausted, force-back / finish)
1263
+ */
1264
+ const isExpiredAttemptsExhaustedGuard = ({ context }) => context.expiredAttempts + 1 >= MAX_EXPIRED_FIRST_SIDE_ATTEMPTS;
1265
+ const isNotPassportModeGuard = ({ context }) => context.currentMode !== "passport";
1266
+ /**
1267
+ * V1 parity for `shouldApplyAlwaysCaptureBackOverride` — force-redirects to
1268
+ * back capture after expired-front-attempts exhaust, but only when:
1269
+ * - we're on the front side
1270
+ * - `alwaysCaptureBackOfId` is set
1271
+ * - the flow isn't single-side (onlyBack / usSmartCapture)
1272
+ * - the session isn't a Digital ID upload (digital IDs are PDFs — no back
1273
+ * side exists, so the override never applies regardless of config)
1274
+ */
1275
+ const shouldForceBackOnExpiredGuard = ({ context }) => context.currentMode === "front" && context.config.alwaysCaptureBackOfId === true && !context.config.onlyBack && !context.config.usSmartCapture && !context.isDigitalUpload;
1276
+ const wasExpiredFromUploadGuard = ({ context }) => context.expiredFromUpload === true;
1277
+ const shouldSkipProcessIdGuard = ({ context }) => context.skipProcessId === true;
1278
+ /**
1279
+ * Bug 4 fix: when `expiredExhausted` is reached via the per-upload-expired
1280
+ * exhaustion path with a back side captured (or the entire single-side back
1281
+ * flow), we want `processId` to run once on Continue so the backend
1282
+ * processes whatever sides were uploaded. Front-only exhaustion (no back to
1283
+ * process) and the force-back V1 path keep using `setSkipProcessId` instead.
1284
+ */
1285
+ const shouldProcessAfterExhaustionGuard = ({ context }) => context.exhaustedFromUpload === true && context.currentMode === "back" && (context.config.onlyBack === true || context.config.usSmartCapture === true);
1286
+ /**
1287
+ * `processing.onDone` reads this to short-circuit straight to `finished`
1288
+ * after the post-exhaustion `processId` call returns — without it, an
1289
+ * `isDocumentExpired:true` response would loop back to the Expired screen
1290
+ * we just terminated.
1291
+ */
1292
+ const forceFinishAfterProcessingGuard = ({ context }) => context.forceFinishAfterProcessing === true;
1293
+ /**
1294
+ * Cap on the end-of-flow (`processId`) expired path — digital uploads and the
1295
+ * multi-side post-capture process step. This path intentionally still keys off
1296
+ * the dashboard-configurable `config.captureAttempts`, unlike the per-upload
1297
+ * (camera) same-side expired path, which uses the fixed
1298
+ * `MAX_EXPIRED_FIRST_SIDE_ATTEMPTS` (decoupled for V1 parity — see ENG-46592).
1299
+ * The two expired caps are therefore different by design.
1300
+ */
1301
+ const isProcessingExpiredExhaustedGuard = ({ context }) => context.processingExpiredAttempts + 1 >= context.config.captureAttempts;
1302
+ /**
1303
+ * True when capturing the back side of a two-sided (front+back) ID flow.
1304
+ * Used to redirect an expired-back capture to front rather than retrying
1305
+ * the same back side (Figma Story #2.1).
1306
+ * Excludes onlyBack and usSmartCapture — those are single-side back flows
1307
+ * with no front to redirect to.
1308
+ */
1309
+ const isBackModeInMultiSideFlowGuard = ({ context }) => context.currentMode === "back" && !context.config.onlyBack && !context.config.usSmartCapture;
1310
+ /**
1311
+ * True once the user has already been redirected from an expired second-side
1312
+ * (back) capture to the first side (front) for their one extra attempt
1313
+ * (V1's `expiredRedirected`). Used to make the expired-back→front redirect a
1314
+ * one-shot: any subsequent expired upload routes to `expiredExhausted` instead
1315
+ * of redirecting again, so total captures stay within the backend's
1316
+ * max-attempts/OCR cap (ENG-46592 / re-respects ENG-45666).
1317
+ */
1318
+ const wasExpiredRedirectedGuard = ({ context }) => context.expiredRedirected === true;
1319
+
1234
1320
  //#endregion
1235
1321
  //#region src/modules/id/idCaptureHelpers.ts
1236
1322
  /**
@@ -1255,28 +1341,22 @@ function getAvailableDocumentTypes(config) {
1255
1341
  for (const [configProperty, adjustedType] of DOCUMENT_TYPES_CONFIG_TO_ADJUSTED_MAP) if (config[configProperty]) adjustedDocumentTypes.push(adjustedType);
1256
1342
  return adjustedDocumentTypes;
1257
1343
  }
1258
-
1259
- //#endregion
1260
- //#region ../infra/src/wasm/idCaptureDefaults.ts
1261
- /**
1262
- * Default WASM thresholds for ID capture quality checks.
1263
- * Based on legacy pipelinesConfig.ts values.
1264
- */
1265
- const DEFAULT_ID_CAPTURE_THRESHOLDS = {
1266
- blurThreshold: .2,
1267
- blurChangeThreshold: .2,
1268
- glareThreshold: .3,
1269
- clsThreshold: .98,
1270
- sideThreshold: .8,
1271
- iouThreshold: .8,
1272
- idDetectedTimeout: 1e4,
1273
- autocaptureTimeout: 5e3,
1274
- framesAggregationInterval: 3e3
1275
- };
1276
1344
  /**
1277
- * Default model version for ID capture.
1345
+ * Which manual-upload tabs to show. Falls back to both tabs when neither
1346
+ * `enableId` nor `enablePassport` is set (no accepted documents).
1278
1347
  */
1279
- const DEFAULT_ID_CAPTURE_MODEL_VERSION = "v2";
1348
+ function getManualUploadTabs(config) {
1349
+ const showIdTab = !!config.enableId;
1350
+ const showPassportTab = !!config.enablePassport;
1351
+ if (!showIdTab && !showPassportTab) return {
1352
+ showIdTab: true,
1353
+ showPassportTab: true
1354
+ };
1355
+ return {
1356
+ showIdTab,
1357
+ showPassportTab
1358
+ };
1359
+ }
1280
1360
 
1281
1361
  //#endregion
1282
1362
  //#region src/modules/id/idCaptureActors.ts
@@ -1580,7 +1660,7 @@ const startRecordingActor = fromPromise(async ({ input }) => {
1580
1660
  });
1581
1661
  const initializeDeepsightSessionActor = fromPromise(async ({ input }) => {
1582
1662
  if (!input.dependencies) return;
1583
- const { loadDeepsightSession } = await import("./deepsightLoader-BMmvk0X6.esm.js");
1663
+ const { loadDeepsightSession } = await import("./deepsightLoader-DHSVD776.esm.js");
1584
1664
  return loadDeepsightSession({
1585
1665
  ds: input.ds,
1586
1666
  storage: input.dependencies.storage,
@@ -1838,115 +1918,12 @@ function getCurrentModeFromEvent(context, event) {
1838
1918
  }
1839
1919
 
1840
1920
  //#endregion
1841
- //#region src/modules/id/idCaptureGuards.ts
1842
- const hasShowTutorialGuard = ({ context }) => context.config.showTutorial;
1843
- const hasAgeAssuranceGuard = ({ context }) => context.config.ageAssurance === true;
1844
- const hasShowDocumentChooserGuard = ({ context }) => !context.config.onlyBack && (context.config.showDocumentChooserScreen ?? false);
1845
- const isPermissionGrantedGuard = ({ event }) => {
1846
- if ("output" in event) return event.output === "granted";
1847
- return false;
1848
- };
1849
- const isReadyForCaptureGuard = ({ context, event }) => {
1850
- return isReadyForCaptureFromPermission(resolveStoredPermissionResult("output" in event ? event.output : void 0, context.permissionResult), context.config.ds);
1851
- };
1852
- const needsMotionPrimeOnlyGuard = ({ context, event }) => {
1853
- return needsMotionPrimeOnlyFromPermission(resolveStoredPermissionResult("output" in event ? event.output : void 0, context.permissionResult), context.config.ds);
1854
- };
1855
- const isPermissionDeniedErrorGuard = ({ event }) => {
1856
- if ("error" in event) {
1857
- const error = event.error;
1858
- return error?.name === "NotAllowedError" || error?.name === "PermissionDeniedError";
1859
- }
1860
- return false;
1861
- };
1862
- const hasStreamGuard = ({ context }) => context.stream !== void 0;
1863
- const hasAttemptsRemainingGuard = ({ context }) => context.attemptsRemaining > 0;
1864
- const hasCapturedImageGuard = ({ context }) => {
1865
- return context.provider?.getCapturedCanvas() !== null;
1866
- };
1867
- const hasUploadValidationErrorGuard = ({ context }) => {
1868
- if (!context.uploadResponse) return false;
1869
- return validateUploadResponse(context.uploadResponse, {
1870
- skipGlareFront: context.uploadResponse.skipGlareFront,
1871
- skipGlareBack: context.uploadResponse.skipGlareBack
1872
- }) !== void 0;
1873
- };
1874
- const isFrontModeGuard = ({ context }) => context.currentMode === "front" || context.currentMode === "passport";
1875
- /**
1876
- * `config.onlyFront` from the orchestrated flow JSON is intentionally not
1877
- * read here: the flow value cannot account for per-document overrides, so the
1878
- * backend resolves the real policy per document at upload time
1879
- * (via `skipBackIdCapture` on the upload response). Standalone
1880
- * `idCaptureManager` consumers that pass `onlyFront: true` directly will
1881
- * therefore also be ignored — re-wire this guard if that capability is needed
1882
- * again.
1883
- */
1884
- const isOnlyFrontGuard = (_args) => false;
1885
- const shouldContinueToBackGuard = ({ context }) => {
1886
- if (context.currentMode !== "front" && context.currentMode !== "passport") return false;
1887
- if (context.config.onlyBack) return false;
1888
- if (context.config.usSmartCapture) return false;
1889
- if (context.uploadResponse?.skipBackIdCapture) {
1890
- if (!(context.config.alwaysCaptureBackOfId === true && context.currentMode !== "passport")) return false;
1891
- }
1892
- return true;
1893
- };
1894
- const shouldContinueToFrontGuard = ({ context }) => context.config.usSmartCapture === true && context.currentMode === "back" && context.uploadResponse?.forceFrontIdCapture === true;
1895
- const hasMandatoryConsentGuard = ({ context }) => context.uploadResponse?.showMandatoryConsent === true;
1896
- const isDeepsightEnabledGuard = ({ context }) => context.dependencies !== void 0;
1897
- const isDeepsightReadyGuard = ({ context }) => context.deepsightService !== void 0;
1898
- const needsDeepsightInitGuard = ({ context }) => context.dependencies !== void 0 && context.deepsightService === void 0 && !context.deepsightInitAttempted;
1899
- const hasOnlyManualUploadAvailableGuard = ({ context }) => context.availableDocumentTypes.length === 1 && context.availableDocumentTypes[0] === "manualIdUpload";
1900
- const isManualIdUploadSelectedGuard = ({ event }) => event.type === "SELECT_DOCUMENT" && event.documentType === "manualIdUpload";
1901
- const isDigitalIdUploadSelectedGuard = ({ event }) => event.type === "SELECT_DOCUMENT" && event.documentType === "digitalIdUpload";
1902
- const isUploadExpiredGuard = ({ context }) => context.uploadResponse?.isDocumentExpired === true;
1903
- /**
1904
- * True when *this* expired upload will exhaust the budget. Compares the
1905
- * post-increment count, so the exhaustion branch can be picked in the same
1906
- * tick that runs `incrementExpiredAttempts`. With `captureAttempts=3`:
1907
- * - attempt 1 → 0+1=1 (not exhausted)
1908
- * - attempt 2 → 1+1=2 (not exhausted)
1909
- * - attempt 3 → 2+1=3 (exhausted, force-back / finish)
1910
- */
1911
- const isExpiredAttemptsExhaustedGuard = ({ context }) => context.expiredAttempts + 1 >= context.config.captureAttempts;
1912
- const isNotPassportModeGuard = ({ context }) => context.currentMode !== "passport";
1913
- /**
1914
- * V1 parity for `shouldApplyAlwaysCaptureBackOverride` — force-redirects to
1915
- * back capture after expired-front-attempts exhaust, but only when:
1916
- * - we're on the front side
1917
- * - `alwaysCaptureBackOfId` is set
1918
- * - the flow isn't single-side (onlyBack / usSmartCapture)
1919
- * - the session isn't a Digital ID upload (digital IDs are PDFs — no back
1920
- * side exists, so the override never applies regardless of config)
1921
- */
1922
- const shouldForceBackOnExpiredGuard = ({ context }) => context.currentMode === "front" && context.config.alwaysCaptureBackOfId === true && !context.config.onlyBack && !context.config.usSmartCapture && !context.isDigitalUpload;
1923
- const wasExpiredFromUploadGuard = ({ context }) => context.expiredFromUpload === true;
1924
- const shouldSkipProcessIdGuard = ({ context }) => context.skipProcessId === true;
1925
- /**
1926
- * Bug 4 fix: when `expiredExhausted` is reached via the per-upload-expired
1927
- * exhaustion path with a back side captured (or the entire single-side back
1928
- * flow), we want `processId` to run once on Continue so the backend
1929
- * processes whatever sides were uploaded. Front-only exhaustion (no back to
1930
- * process) and the force-back V1 path keep using `setSkipProcessId` instead.
1931
- */
1932
- const shouldProcessAfterExhaustionGuard = ({ context }) => context.exhaustedFromUpload === true && context.currentMode === "back";
1933
- /**
1934
- * `processing.onDone` reads this to short-circuit straight to `finished`
1935
- * after the post-exhaustion `processId` call returns — without it, an
1936
- * `isDocumentExpired:true` response would loop back to the Expired screen
1937
- * we just terminated.
1938
- */
1939
- const forceFinishAfterProcessingGuard = ({ context }) => context.forceFinishAfterProcessing === true;
1921
+ //#region src/modules/id/idCaptureStateMachine.ts
1940
1922
  /**
1941
- * Cap on the end-of-flow expired path. All capture types (camera, digital,
1942
- * manual) share `config.captureAttempts` for consistency the user-visible
1943
- * "X attempts remaining" counter is the same regardless of how the document
1944
- * was submitted.
1923
+ * Shown/logged when an ID capture module has no accepted documents and no
1924
+ * other capture option enabledthere is nothing to capture (ENG-43983).
1945
1925
  */
1946
- const isProcessingExpiredExhaustedGuard = ({ context }) => context.processingExpiredAttempts + 1 >= context.config.captureAttempts;
1947
-
1948
- //#endregion
1949
- //#region src/modules/id/idCaptureStateMachine.ts
1926
+ const ID_CAPTURE_NO_DOCUMENT_TYPES_ERROR = "ID capture module has no accepted documents and no capture option enabled";
1950
1927
  function getIdErrorCodeFromUnknown(error) {
1951
1928
  if (error instanceof Error) {
1952
1929
  const message = error.message;
@@ -2142,6 +2119,7 @@ const _idCaptureMachine = setup({
2142
2119
  setSkipProcessId: assign({ skipProcessId: () => true }),
2143
2120
  setExpiredFromUpload: assign({ expiredFromUpload: () => true }),
2144
2121
  setExhaustedFromUpload: assign({ exhaustedFromUpload: () => true }),
2122
+ setExpiredRedirected: assign({ expiredRedirected: () => true }),
2145
2123
  setForceFinishAfterProcessing: assign({ forceFinishAfterProcessing: () => true }),
2146
2124
  clearExpiredFromUpload: assign({ expiredFromUpload: () => false })
2147
2125
  },
@@ -2166,6 +2144,7 @@ const _idCaptureMachine = setup({
2166
2144
  isDeepsightReady: isDeepsightReadyGuard,
2167
2145
  needsDeepsightInit: needsDeepsightInitGuard,
2168
2146
  hasOnlyManualUploadAvailable: hasOnlyManualUploadAvailableGuard,
2147
+ hasNoDocumentTypesAvailable: hasNoDocumentTypesAvailableGuard,
2169
2148
  isManualIdUploadSelected: isManualIdUploadSelectedGuard,
2170
2149
  isDigitalIdUploadSelected: isDigitalIdUploadSelectedGuard,
2171
2150
  isUploadExpired: isUploadExpiredGuard,
@@ -2177,6 +2156,8 @@ const _idCaptureMachine = setup({
2177
2156
  isProcessingExpiredExhausted: isProcessingExpiredExhaustedGuard,
2178
2157
  shouldProcessAfterExhaustion: shouldProcessAfterExhaustionGuard,
2179
2158
  forceFinishAfterProcessing: forceFinishAfterProcessingGuard,
2159
+ isBackModeInMultiSideFlow: isBackModeInMultiSideFlowGuard,
2160
+ wasExpiredRedirected: wasExpiredRedirectedGuard,
2180
2161
  isManualUploadExhausted: ({ event }) => event.output?.result === "exhausted",
2181
2162
  isDigitalUploadExhausted: ({ event }) => event.output?.result === "exhausted",
2182
2163
  isDigitalUploadSuccessful: ({ event }) => event.output?.result === "success"
@@ -2203,6 +2184,7 @@ const _idCaptureMachine = setup({
2203
2184
  recordingSession: void 0,
2204
2185
  attemptsRemaining: input.config.captureAttempts,
2205
2186
  expiredAttempts: 0,
2187
+ expiredRedirected: false,
2206
2188
  processingExpiredAttempts: 0,
2207
2189
  skipProcessId: input.config.skipProcessId === true,
2208
2190
  expiredFromUpload: false,
@@ -2236,6 +2218,11 @@ const _idCaptureMachine = setup({
2236
2218
  },
2237
2219
  states: {
2238
2220
  idle: { on: { LOAD: [
2221
+ {
2222
+ target: "error",
2223
+ guard: "hasNoDocumentTypesAvailable",
2224
+ actions: [() => console.error(ID_CAPTURE_NO_DOCUMENT_TYPES_ERROR), assign({ error: () => ID_CAPTURE_NO_DOCUMENT_TYPES_ERROR })]
2225
+ },
2239
2226
  {
2240
2227
  target: "manualIdUpload",
2241
2228
  guard: "hasOnlyManualUploadAvailable"
@@ -2732,6 +2719,15 @@ const _idCaptureMachine = setup({
2732
2719
  target: "#idCapture.finished",
2733
2720
  guard: and(["shouldSkipProcessId", "isUploadExpired"])
2734
2721
  },
2722
+ {
2723
+ target: "#idCapture.expiredExhausted",
2724
+ guard: and([
2725
+ "isNotPassportMode",
2726
+ "isUploadExpired",
2727
+ "wasExpiredRedirected"
2728
+ ]),
2729
+ actions: ["setExhaustedFromUpload"]
2730
+ },
2735
2731
  {
2736
2732
  target: "#idCapture.expiredExhausted",
2737
2733
  guard: and([
@@ -2931,6 +2927,20 @@ const _idCaptureMachine = setup({
2931
2927
  }
2932
2928
  },
2933
2929
  expired: { on: { RETRY_CAPTURE: [
2930
+ {
2931
+ target: "#idCapture.backFinished",
2932
+ guard: and([
2933
+ "wasExpiredFromUpload",
2934
+ "isBackModeInMultiSideFlow",
2935
+ not("wasExpiredRedirected")
2936
+ ]),
2937
+ actions: [
2938
+ "resetDetection",
2939
+ "clearExpiredFromUpload",
2940
+ "clearUploadFailure",
2941
+ "setExpiredRedirected"
2942
+ ]
2943
+ },
2934
2944
  {
2935
2945
  target: "#idCapture.capture",
2936
2946
  guard: "wasExpiredFromUpload",
@@ -2960,22 +2970,25 @@ const _idCaptureMachine = setup({
2960
2970
  actions: "resetContext"
2961
2971
  }
2962
2972
  ] } },
2963
- expiredExhausted: { on: { CONTINUE_EXHAUSTED: [
2964
- {
2965
- target: "#idCapture.frontFinished",
2966
- guard: "shouldForceBackOnExpired",
2967
- actions: ["setSkipProcessId"]
2968
- },
2969
- {
2970
- target: "#idCapture.processing",
2971
- guard: "shouldProcessAfterExhaustion",
2972
- actions: ["setForceFinishAfterProcessing"]
2973
- },
2974
- {
2975
- target: "#idCapture.finished",
2976
- actions: ["setSkipProcessId"]
2977
- }
2978
- ] } },
2973
+ expiredExhausted: {
2974
+ entry: "flagIdManualReview",
2975
+ on: { CONTINUE_EXHAUSTED: [
2976
+ {
2977
+ target: "#idCapture.frontFinished",
2978
+ guard: "shouldForceBackOnExpired",
2979
+ actions: ["setSkipProcessId"]
2980
+ },
2981
+ {
2982
+ target: "#idCapture.processing",
2983
+ guard: "shouldProcessAfterExhaustion",
2984
+ actions: ["setForceFinishAfterProcessing"]
2985
+ },
2986
+ {
2987
+ target: "#idCapture.finished",
2988
+ actions: ["setSkipProcessId"]
2989
+ }
2990
+ ] }
2991
+ },
2979
2992
  finished: {
2980
2993
  entry: [
2981
2994
  "stopMediaRecording",
@@ -3082,4 +3095,4 @@ const _idCaptureMachine = setup({
3082
3095
  const idCaptureMachine = _idCaptureMachine;
3083
3096
 
3084
3097
  //#endregion
3085
- export { processId as a, stopStream as c, validateUploadResponse as d, ID_ERROR_CODES as f, mapDigitalIdScreenName as g, MANUAL_UPLOAD_MAX_RETRIES as h, preloadIdRecordingProvider as i, uploadIdImage as l, MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES as m, mapIdManualUploadScreenName as n, startRecordingSession as o, MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS as p, initializeIdCapture as r, stopRecording as s, idCaptureMachine as t, uploadManualIdFile as u };
3098
+ export { MANUAL_UPLOAD_MAX_RETRIES as _, initializeIdCapture as a, startRecordingSession as c, uploadIdImage as d, uploadManualIdFile as f, MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES as g, MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS as h, mapIdManualUploadScreenName as i, stopRecording as l, ID_ERROR_CODES as m, getManualUploadTabs as n, preloadIdRecordingProvider as o, validateUploadResponse as p, MAX_EXPIRED_FIRST_SIDE_ATTEMPTS as r, processId as s, idCaptureMachine as t, stopStream as u, mapDigitalIdScreenName as v };