@incodetech/core 2.4.1 → 2.5.0-rc.1

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 (312) hide show
  1. package/dist/Actor-DqjOqDfU.d.ts +1 -0
  2. package/dist/{BaseWasmProvider-Bq3OHo7P.d.ts → BaseWasmProvider-bBNquvYn.d.ts} +2 -2
  3. package/dist/BrowserNetworkStatusProvider-BrDXBEDd.esm.js +21 -0
  4. package/dist/{multipartRecordingService-CLwrF5wD.esm.js → CameraCompositor-ppyMYVoY.esm.js} +7 -744
  5. package/dist/DateFormattingProvider-DPq9zco-.esm.js +25 -0
  6. package/dist/{FaceDetectionProvider-J_-1Cwck.esm.js → FaceDetectionProvider-D0DbKUKC.esm.js} +28 -64
  7. package/dist/IBrowserEnvironmentCapability-D7JG7ML3.esm.js +16 -0
  8. package/dist/IGeolocationCapability-r49Qo7rR.d.ts +10 -0
  9. package/dist/{IIdCaptureCapability-CGcEt2Cw.d.ts → IIdCaptureCapability-C-5M8pP1.d.ts} +2 -2
  10. package/dist/{IWasmUtilCapability-GF2n7sfm.d.ts → IWasmUtilCapability-BRn0wz8v.d.ts} +33 -6
  11. package/dist/Manager-BvXAwDv9.esm.js +125 -0
  12. package/dist/{Manager-C9T5amUN.d.ts → Manager-DufwKlav.d.ts} +1 -7
  13. package/dist/MultipartRecordingProvider-CduV32Qa.esm.js +151 -0
  14. package/dist/{PhoneValidationProvider-SZiOS0jB.esm.js → PhoneValidationProvider-Co4zk2en.esm.js} +7 -0
  15. package/dist/{StreamCanvasCapture-7JRf-2ck.d.ts → StreamCanvasCapture-BOwciHDC.d.ts} +20 -4
  16. package/dist/{StreamCanvasCapture-C9jtgBdT.esm.js → StreamCanvasCapture-CXd87trH.esm.js} +18 -3
  17. package/dist/StreamCanvasProcessingSession-CBnbTnOr.esm.js +42 -0
  18. package/dist/{WasmUtilProvider-DtJuBdt-.esm.js → WasmUtilProvider-0xTxgP0R.esm.js} +114 -25
  19. package/dist/WorkerEncoderRecordingProvider-CsDED9UU.esm.js +80 -0
  20. package/dist/addressSearch-Rxm1K67A.esm.js +73 -0
  21. package/dist/{advanceableErrors-q_pfU3Cn.esm.js → advanceableErrors-CxZyPRyh.esm.js} +4 -2
  22. package/dist/ae-signature.d.ts +2 -2
  23. package/dist/ae-signature.esm.js +1 -1
  24. package/dist/antifraud.d.ts +1 -1
  25. package/dist/antifraud.esm.js +2 -2
  26. package/dist/{antifraudManager-DbGCvlJs.d.ts → antifraudManager-BxfCsyA7.d.ts} +3 -3
  27. package/dist/{antifraudManager-CaweCYnY.esm.js → antifraudManager-DKNOi9-z.esm.js} +5 -3
  28. package/dist/{antifraudStateMachine-DRl0UVyA.esm.js → antifraudStateMachine-BJ6PmCsw.esm.js} +3 -3
  29. package/dist/{api-Cz90EHyu.esm.js → api-CZpuJuZl.esm.js} +11 -6
  30. package/dist/{apiError-9Yi8xMeB.esm.js → apiError-DJHHF70K.esm.js} +1 -1
  31. package/dist/attemptCarry-BecGGZK8.esm.js +45 -0
  32. package/dist/authentication.d.ts +3 -3
  33. package/dist/authentication.esm.js +2 -2
  34. package/dist/{authenticationManager-BIZC55Bi.d.ts → authenticationManager-B0WPJjvz.d.ts} +2 -2
  35. package/dist/{authenticationManager-pKQS4fHT.esm.js → authenticationManager-CkjV81NT.esm.js} +7 -6
  36. package/dist/{authenticationStateMachine-D_DygKtQ.esm.js → authenticationStateMachine-BoPwxHAI.esm.js} +50 -18
  37. package/dist/avatar.d.ts +1 -1
  38. package/dist/backCameraLabel-yda5ugE4.esm.js +67 -0
  39. package/dist/{backCameraStream-CMvXj4X4.esm.js → backCameraStream-DS1oDiUq.esm.js} +12 -107
  40. package/dist/{callback-645_omgz.d.ts → callback-BmjJ1G-5.d.ts} +1 -1
  41. package/dist/{camera-sIa9ceW2.esm.js → camera-E_Kcre4O.esm.js} +15 -23
  42. package/dist/camera.d.ts +2 -2
  43. package/dist/camera.esm.js +1 -1
  44. package/dist/certificate-issuance.d.ts +1 -1
  45. package/dist/certificate-issuance.esm.js +2 -2
  46. package/dist/{certificateIssuanceManager-Dr8A4Lgr.d.ts → certificateIssuanceManager-BcYhxO63.d.ts} +4 -3
  47. package/dist/{certificateIssuanceManager-BfeMv2PU.esm.js → certificateIssuanceManager-DaUklfNj.esm.js} +5 -3
  48. package/dist/{certificateIssuanceStateMachine-Frgjbjw8.esm.js → certificateIssuanceStateMachine-_EQcjGE3.esm.js} +4 -4
  49. package/dist/cnpj-Bl_olpdX.esm.js +79 -0
  50. package/dist/connectivity-BCuEoQ-n.esm.js +114 -0
  51. package/dist/consent.d.ts +1 -1
  52. package/dist/consent.esm.js +2 -2
  53. package/dist/{consentManager-Ca8FHlC4.d.ts → consentManager-B2F_VeAo.d.ts} +13 -5
  54. package/dist/{consentManager-CvEu8h_W.esm.js → consentManager-BPocwpm2.esm.js} +7 -4
  55. package/dist/{consentStateMachine-DJTgN_-1.esm.js → consentStateMachine-DgiIcT9q.esm.js} +22 -9
  56. package/dist/cpf-DDXMTLYr.esm.js +37 -0
  57. package/dist/{createFaceAvatar-lYX0VTYs.d.ts → createFaceAvatar-BimBTONm.d.ts} +1 -1
  58. package/dist/cross-document-data-match.d.ts +1 -1
  59. package/dist/cross-document-data-match.esm.js +1 -1
  60. package/dist/{crossDocumentDataMatchManager-Cu141CE8.esm.js → crossDocumentDataMatchManager-BfA29Aji.esm.js} +6 -4
  61. package/dist/{crossDocumentDataMatchManager-yCWCOzcU.d.ts → crossDocumentDataMatchManager-crZcIUSY.d.ts} +3 -3
  62. package/dist/curp-DZGvefg3.esm.js +14 -0
  63. package/dist/curp-validation.d.ts +1 -1
  64. package/dist/curp-validation.esm.js +2 -2
  65. package/dist/{curpValidationManager-B-z9q5V3.esm.js → curpValidationManager-CbvBDoE1.esm.js} +6 -3
  66. package/dist/{curpValidationManager-C9sqoh9n.d.ts → curpValidationManager-Ci2iVuog.d.ts} +4 -4
  67. package/dist/{curpValidationStateMachine-vDEFLMPw.esm.js → curpValidationStateMachine-BQ8XK2Y3.esm.js} +30 -22
  68. package/dist/custom-fields.d.ts +1 -1
  69. package/dist/custom-fields.esm.js +1 -1
  70. package/dist/custom-watchlist.d.ts +1 -1
  71. package/dist/custom-watchlist.esm.js +2 -2
  72. package/dist/{customFieldsManager-D1ex2cFM.esm.js → customFieldsManager-BRqSCR9R.esm.js} +6 -4
  73. package/dist/{customFieldsManager-CF-cO8ap.d.ts → customFieldsManager-CdWTbsew.d.ts} +3 -3
  74. package/dist/{customWatchlistManager-CTI-SGk0.esm.js → customWatchlistManager-Bd1ooIDB.esm.js} +5 -3
  75. package/dist/{customWatchlistManager-DolUswyR.d.ts → customWatchlistManager-lJrveDS4.d.ts} +3 -3
  76. package/dist/{customWatchlistStateMachine-hmRd0f2I.esm.js → customWatchlistStateMachine-r8nGhyo1.esm.js} +3 -3
  77. package/dist/{deepsightService-C3DVBOZd.esm.js → deepsightLoader-ngnhyO6B.esm.js} +39 -69
  78. package/dist/definitionSource-Nw0YCbpe.esm.js +221 -0
  79. package/dist/{createCameraCycleOwnership-Dj_LHUvN.esm.js → desktopCameraElection-BKFjsQpO.esm.js} +178 -41
  80. package/dist/device.esm.js +2 -2
  81. package/dist/document-capture.d.ts +3 -3
  82. package/dist/document-capture.esm.js +2 -2
  83. package/dist/{documentCaptureManager-DUJwpKC5.esm.js → documentCaptureManager-BKaJVQxg.esm.js} +30 -20
  84. package/dist/{documentCaptureManager-DkyDtm3Y.d.ts → documentCaptureManager-BZBmcOKI.d.ts} +41 -7
  85. package/dist/{documentCaptureStateMachine-B8i7GnLh.esm.js → documentCaptureStateMachine-BYLb5Azk.esm.js} +107 -58
  86. package/dist/dynamic-forms.d.ts +2 -2
  87. package/dist/dynamic-forms.esm.js +2 -2
  88. package/dist/{dynamicFormsManager-C0dHs1ty.d.ts → dynamicFormsManager-C45pTncO.d.ts} +4 -4
  89. package/dist/{dynamicFormsManager-DK_oc5Oy.esm.js → dynamicFormsManager-CC3t8bqX.esm.js} +5 -3
  90. package/dist/{dynamicFormsStateMachine-CGlIAWZ6.esm.js → dynamicFormsStateMachine-Vsn6kszV.esm.js} +4 -4
  91. package/dist/ekyb.d.ts +5 -5
  92. package/dist/ekyb.esm.js +3 -3
  93. package/dist/{ekybManager-BaZ_7CEu.d.ts → ekybManager-BflWuTe4.d.ts} +5 -5
  94. package/dist/{ekybManager-BLgkiWXw.esm.js → ekybManager-DgNO6c0e.esm.js} +5 -3
  95. package/dist/{ekybStateMachine-BfgOUZMK.esm.js → ekybStateMachine-DHybwePr.esm.js} +40 -56
  96. package/dist/ekybUtils-Cw8Ta9Qi.esm.js +140 -0
  97. package/dist/ekyc-prefill.d.ts +17 -0
  98. package/dist/ekyc-prefill.esm.js +3 -0
  99. package/dist/ekyc.d.ts +4 -3
  100. package/dist/ekyc.esm.js +3 -3
  101. package/dist/{ekycManager-DW-ynodd.d.ts → ekycManager-BKVQazAb.d.ts} +49 -7
  102. package/dist/{ekycManager-BO-Lui3t.esm.js → ekycManager-nRT0rxei.esm.js} +39 -16
  103. package/dist/ekycPrefillManager-DOTl3Y2w.d.ts +566 -0
  104. package/dist/ekycPrefillManager-Drq_nYJ3.esm.js +103 -0
  105. package/dist/ekycPrefillStateMachine-CycO-K3B.esm.js +687 -0
  106. package/dist/ekycRules-DXP2hqVw.esm.js +479 -0
  107. package/dist/ekycStateMachine-nwJRel2s.esm.js +7897 -0
  108. package/dist/ekycUtils-FcqA6oU4.esm.js +1491 -0
  109. package/dist/electronic-signature.d.ts +1 -1
  110. package/dist/electronic-signature.esm.js +1 -1
  111. package/dist/{electronicSignatureManager-DTSLOvKR.d.ts → electronicSignatureManager-5tYz-a4o.d.ts} +4 -3
  112. package/dist/{electronicSignatureManager-CjKvJ6E-.esm.js → electronicSignatureManager-hn-_ADP5.esm.js} +8 -6
  113. package/dist/email.d.ts +1 -1
  114. package/dist/email.esm.js +2 -2
  115. package/dist/{emailManager-ButFktRm.esm.js → emailManager-Co4jarT1.esm.js} +5 -3
  116. package/dist/{emailManager-Dy6omJVp.d.ts → emailManager-pM7ZPuMa.d.ts} +3 -3
  117. package/dist/{emailStateMachine-BXtlC0NV.esm.js → emailStateMachine-CTEaYncs.esm.js} +34 -22
  118. package/dist/events-CP3yOzAl.esm.js +299 -0
  119. package/dist/events.d.ts +3 -1
  120. package/dist/events.esm.js +2 -1
  121. package/dist/extensibility.d.ts +43 -41
  122. package/dist/extensibility.esm.js +39 -37
  123. package/dist/{externalFetch-DrR9xshk.esm.js → externalFetch-CQY41QT1.esm.js} +4 -1
  124. package/dist/face-match.d.ts +1 -1
  125. package/dist/face-match.esm.js +2 -2
  126. package/dist/{faceCaptureManagerFactory-BDGhg24q.esm.js → faceCaptureManagerFactory-B2POCGth.esm.js} +17 -6
  127. package/dist/{faceCaptureManagerFactory-1hzeS_rB.d.ts → faceCaptureManagerFactory-BZjGT392.d.ts} +84 -72
  128. package/dist/{faceCaptureSetup-CvGYG4GZ.esm.js → faceCaptureSetup-DCBK1osx.esm.js} +117 -482
  129. package/dist/{faceMatchManager-DIgG-UFS.d.ts → faceMatchManager-C5b5WtcY.d.ts} +23 -7
  130. package/dist/{faceMatchManager-DWFUQjMQ.esm.js → faceMatchManager-CGmNGbov.esm.js} +5 -3
  131. package/dist/{faceMatchStateMachine-CUCvlydD.esm.js → faceMatchStateMachine-BuHt7kec.esm.js} +68 -29
  132. package/dist/{feature-management-D4ne_hXW.esm.js → feature-management-BFfuXr1M.esm.js} +35 -21
  133. package/dist/feature-management.esm.js +1 -1
  134. package/dist/field-comparison.d.ts +1 -1
  135. package/dist/field-comparison.esm.js +1 -1
  136. package/dist/{fieldComparisonManager-v3knTYV_.esm.js → fieldComparisonManager-VgCU4X96.esm.js} +6 -4
  137. package/dist/{fieldComparisonManager-CUX4gza2.d.ts → fieldComparisonManager-mFOHRhVd.d.ts} +3 -3
  138. package/dist/fiscal-qr.d.ts +1 -1
  139. package/dist/fiscal-qr.esm.js +1 -1
  140. package/dist/{fiscalQrManager-Dt9fHG7h.esm.js → fiscalQrManager-D4G-4xKE.esm.js} +9 -7
  141. package/dist/{fiscalQrManager-D0Iy7EKR.d.ts → fiscalQrManager-DFnFVpP9.d.ts} +3 -3
  142. package/dist/flow-events.d.ts +1 -1
  143. package/dist/flow.d.ts +75 -24
  144. package/dist/flow.esm.js +288 -70
  145. package/dist/{flowCompletionService-Cemwaa5b.esm.js → flowCompletionService-Crry_GxY.esm.js} +24 -3
  146. package/dist/{flowServices-X6Rwf_7E.esm.js → flowServices-Cj8SQjQT.esm.js} +447 -183
  147. package/dist/geolocation.d.ts +1 -1
  148. package/dist/geolocation.esm.js +2 -2
  149. package/dist/{geolocationManager-Dn24g1fl.d.ts → geolocationManager-CENrvxpK.d.ts} +19 -20
  150. package/dist/{geolocationManager-B0dc5rW9.esm.js → geolocationManager-qpTiVlc6.esm.js} +9 -9
  151. package/dist/{geolocationStateMachine-B3rcoODF.esm.js → geolocationStateMachine-Dk10UW9G.esm.js} +14 -10
  152. package/dist/{getDeviceClass-bsWdEDxP.esm.js → getDeviceClass-DoIWuKI8.esm.js} +1 -1
  153. package/dist/government-validation.d.ts +1 -1
  154. package/dist/government-validation.esm.js +2 -2
  155. package/dist/{governmentValidationManager-BtXWHICu.esm.js → governmentValidationManager-6JQQkzha.esm.js} +5 -3
  156. package/dist/{governmentValidationManager-B82zOut8.d.ts → governmentValidationManager-De_vU7bm.d.ts} +4 -4
  157. package/dist/{governmentValidationStateMachine-COL-Vs48.esm.js → governmentValidationStateMachine-wBunpfQ9.esm.js} +3 -3
  158. package/dist/home.d.ts +4 -3
  159. package/dist/home.esm.js +4 -2
  160. package/dist/http.esm.js +1 -1
  161. package/dist/id-ocr.d.ts +2 -2
  162. package/dist/id-ocr.esm.js +3 -19
  163. package/dist/id-selfie-flow.d.ts +6 -5
  164. package/dist/id-selfie-flow.esm.js +14 -12
  165. package/dist/id-verification.d.ts +1 -1
  166. package/dist/id-verification.esm.js +2 -2
  167. package/dist/id.d.ts +4 -17
  168. package/dist/id.esm.js +4 -4
  169. package/dist/{idCaptureDefaults-BGsG2OAs.esm.js → idCaptureDefaults-Drh207VJ.esm.js} +3 -3
  170. package/dist/{idCaptureManager-0M02hSuC.d.ts → idCaptureManager-C4Xk02cS.d.ts} +76 -12
  171. package/dist/{idCaptureManager-IouAnrFm.esm.js → idCaptureManager-RrDMn2tS.esm.js} +68 -19
  172. package/dist/{idCaptureServices-VTKIPSpT.esm.js → idCaptureServices-BqDlOnzD.esm.js} +29 -198
  173. package/dist/{idCaptureStateMachine-_Pn2Xkpb.esm.js → idCaptureStateMachine-DFa1GOap.esm.js} +962 -554
  174. package/dist/idOcrCpfUtils-D5Gwskxu.esm.js +18 -0
  175. package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-C0C7lFGd.d.ts} +7 -6
  176. package/dist/{idOcrManager-D3-HNMXP.esm.js → idOcrManager-im7VfJQi.esm.js} +5 -3
  177. package/dist/{idOcrStateMachine-DyENX6Ki.esm.js → idOcrStateMachine-B832arAl.esm.js} +11 -10
  178. package/dist/{idVerificationManager-BJapZfpy.d.ts → idVerificationManager-B6R8xNZq.d.ts} +4 -3
  179. package/dist/{idVerificationManager-iWz7Avkr.esm.js → idVerificationManager-PMGM4hXY.esm.js} +5 -3
  180. package/dist/{idVerificationStateMachine-CL1kUdBe.esm.js → idVerificationStateMachine-DeeugC00.esm.js} +3 -3
  181. package/dist/identity-reuse.d.ts +2 -2
  182. package/dist/identity-reuse.esm.js +2 -2
  183. package/dist/identity-search.d.ts +97 -0
  184. package/dist/identity-search.esm.js +97 -0
  185. package/dist/{identityReuseManager-ooAbp6Kc.d.ts → identityReuseManager-CZ-qJ_Aa.d.ts} +82 -15
  186. package/dist/{identityReuseManager-CD1ucp1d.esm.js → identityReuseManager-CjFZ7WRa.esm.js} +9 -4
  187. package/dist/{identityReuseStateMachine-DfV81wQC.esm.js → identityReuseStateMachine-CLFjPp13.esm.js} +22 -25
  188. package/dist/index-DHuAkTe0.d.ts +1 -0
  189. package/dist/{index-CKQ9QBZP.d.ts → index-DxYNO94y.d.ts} +2 -2
  190. package/dist/index.d.ts +1 -1
  191. package/dist/index.esm.js +1 -1
  192. package/dist/{invokeOnCaptureCallback-DYrkOXO6.esm.js → invokeOnCaptureCallback-lXP41N7b.esm.js} +1 -1
  193. package/dist/kyb-checks.d.ts +3 -0
  194. package/dist/kyb-checks.esm.js +3 -0
  195. package/dist/kybChecksManager-B7Di9auB.d.ts +95 -0
  196. package/dist/kybChecksManager-CcEXyOlg.esm.js +90 -0
  197. package/dist/kybChecksStateMachine-DEKqDA2G.esm.js +720 -0
  198. package/dist/mandatory-consent.d.ts +2 -2
  199. package/dist/mandatory-consent.esm.js +2 -2
  200. package/dist/{mandatoryConsentManager-qYojnZYg.d.ts → mandatoryConsentManager-Bh1asNJh.d.ts} +28 -11
  201. package/dist/{mandatoryConsentManager-Cwqx1nK7.esm.js → mandatoryConsentManager-Dh3pBhOe.esm.js} +7 -4
  202. package/dist/{mandatoryConsentStateMachine-pXWqAHo_.esm.js → mandatoryConsentStateMachine-BjuI72HZ.esm.js} +32 -13
  203. package/dist/mediaRecorderOptions-g1TwTlhd.esm.js +87 -0
  204. package/dist/multipartRecordingService-WgK8ieRI.esm.js +407 -0
  205. package/dist/{permissionGuards-gcy3U0SL.esm.js → permissionGuards-pcrrqrPR.esm.js} +1 -1
  206. package/dist/{permissionServices-Ca-tSNhT.esm.js → permissionServices-DFJlH7K3.esm.js} +11 -9
  207. package/dist/phone-number.d.ts +7 -1
  208. package/dist/phone-number.esm.js +15 -2
  209. package/dist/phone.d.ts +1 -1
  210. package/dist/phone.esm.js +2 -2
  211. package/dist/phoneFormat-C3q0Ukh4.esm.js +27 -0
  212. package/dist/{phoneManager-BO-LTih5.d.ts → phoneManager-VO1HEoUZ.d.ts} +8 -3
  213. package/dist/{phoneManager-KKUq-Vgo.esm.js → phoneManager-rA7updqF.esm.js} +6 -4
  214. package/dist/phoneServices-CFXcwCFr.esm.js +77 -0
  215. package/dist/{phoneStateMachine-D2QWS2cu.esm.js → phoneStateMachine-DKdY2Scx.esm.js} +56 -84
  216. package/dist/{phoneValidation-DnBcNUNh.esm.js → phoneValidation-OggtfjRt.esm.js} +1 -2
  217. package/dist/{platform-DkcRc9JV.esm.js → platform-aPh7gTWh.esm.js} +15 -1
  218. package/dist/processFaceMatch-B_DkDTE5.esm.js +21 -0
  219. package/dist/qe-signature.d.ts +2 -2
  220. package/dist/qe-signature.esm.js +1 -1
  221. package/dist/recordingService-DxiwS8TV.esm.js +397 -0
  222. package/dist/redirect-to-mobile.d.ts +2 -2
  223. package/dist/redirect-to-mobile.esm.js +2 -2
  224. package/dist/{redirectToMobileManager-uHW3dyuQ.esm.js → redirectToMobileManager-DjsEtWLq.esm.js} +9 -6
  225. package/dist/{redirectToMobileManager-CVsvpVbQ.d.ts → redirectToMobileManager-pT6FiPE7.d.ts} +6 -4
  226. package/dist/{redirectToMobileStateMachine-b-H-ipGM.esm.js → redirectToMobileStateMachine-CMjjUXSu.esm.js} +67 -28
  227. package/dist/resolveForm-DaaQSVWp.esm.js +146 -0
  228. package/dist/{runChildModule-DSpP41Hl.esm.js → runChildModule-CJzb91Cf.esm.js} +9 -7
  229. package/dist/{sdkVersion-DKHwWEyH.esm.js → sdkVersion-k-QlBWlU.esm.js} +1 -1
  230. package/dist/selfie.d.ts +4 -4
  231. package/dist/selfie.esm.js +13 -12
  232. package/dist/{selfieErrorUtils-DoN1KFSQ.esm.js → selfieErrorUtils-F449y_PI.esm.js} +1 -1
  233. package/dist/{selfieManager-DtQegA6T.esm.js → selfieManager-Ba2YqjfY.esm.js} +7 -6
  234. package/dist/{selfieManager-BJdNu_nd.d.ts → selfieManager-aPdwxSFt.d.ts} +2 -2
  235. package/dist/{selfieStateMachine-CnCwJZuC.esm.js → selfieStateMachine-CTjb-Qr4.esm.js} +5 -5
  236. package/dist/{session-CNUfjlRc.esm.js → session-DPL5QWRx.esm.js} +77 -9
  237. package/dist/session.d.ts +96 -10
  238. package/dist/session.esm.js +7 -6
  239. package/dist/{sessionInitializer-JM_glXR2.esm.js → sessionInitializer-43LQITNU.esm.js} +359 -115
  240. package/dist/{setup-YPKTUCY5.d.ts → setup-DpOr8H_l.d.ts} +2 -2
  241. package/dist/{setup-C5tfWt6W.esm.js → setup-lcBOfaNE.esm.js} +36 -27
  242. package/dist/signature.d.ts +1 -1
  243. package/dist/signature.esm.js +2 -2
  244. package/dist/{signatureManager-f_dPAGXn.esm.js → signatureManager-BgAja97K.esm.js} +5 -3
  245. package/dist/{signatureManager-BpVt_Jv7.d.ts → signatureManager-daT_8fj_.d.ts} +3 -3
  246. package/dist/{signatureStateMachine-C-nUq_oq.esm.js → signatureStateMachine-CVPmvU2p.esm.js} +3 -3
  247. package/dist/{spawn-D9jgw9pW.d.ts → spawn-COZKetCS.d.ts} +1 -1
  248. package/dist/{stats-BEvexnKC.esm.js → stats-DoByUnTa.esm.js} +1 -1
  249. package/dist/stats.esm.js +1 -1
  250. package/dist/textRules-D4NRinKY.d.ts +41 -0
  251. package/dist/{trueSightService-fLmL_cyg.esm.js → trueSightService-Bs6xqUXD.esm.js} +22 -10
  252. package/dist/trust-graph.d.ts +4 -3
  253. package/dist/trust-graph.esm.js +5 -3
  254. package/dist/{types-yPH8lAH-.d.ts → types-9wlf1-GE.d.ts} +3 -3
  255. package/dist/types-B-PIc0en.d.ts +115 -0
  256. package/dist/types-B9C8W01q.d.ts +34 -0
  257. package/dist/{types-0L-eFDmr.d.ts → types-BgRHw-dR.d.ts} +1 -1
  258. package/dist/{types-CJ7Yl9K-.d.ts → types-Bpo97EOh.d.ts} +4 -2
  259. package/dist/{types-BQA7lRDV.d.ts → types-C3rfDzgE.d.ts} +4 -2
  260. package/dist/types-CE1jkHw3.d.ts +6 -0
  261. package/dist/types-CTaL0XJz.d.ts +80 -0
  262. package/dist/{types-DUnFZ08M.d.ts → types-CyNndVAT.d.ts} +16 -8
  263. package/dist/types-DEa3taWc.d.ts +217 -0
  264. package/dist/{types-CK8Jbjkp.d.ts → types-DFP7eSle.d.ts} +1 -1
  265. package/dist/{types-Ckir_BEs.d.ts → types-DJPU3W2M.d.ts} +3 -2
  266. package/dist/{types-DPIDuhut.d.ts → types-DNVzoRvi.d.ts} +2 -1
  267. package/dist/{events-Du2A4-Qr.esm.js → types-DYYMdAGv.esm.js} +4 -299
  268. package/dist/{types-B6HsSzpk.d.ts → types-Ddc4Tr_f.d.ts} +42 -6
  269. package/dist/{types-BAxn7MpY.d.ts → types-YA7ieDOx.d.ts} +125 -50
  270. package/dist/{urlUtils-6jsE6rKp.esm.js → urlUtils-eYiyWjh0.esm.js} +4 -1
  271. package/dist/usStates-CwOQ2kAx.esm.js +209 -0
  272. package/dist/video-selfie.d.ts +16 -14
  273. package/dist/video-selfie.esm.js +100 -24
  274. package/dist/{videoSelfieCameraWarmer-BBNKiau1.esm.js → videoSelfieCameraWarmer-a7GBfmEZ.esm.js} +27 -28
  275. package/dist/{videoSelfieFlowModuleMachine-BCFVHBQ1.esm.js → videoSelfieFlowModuleMachine-IWdxw1TW.esm.js} +1 -1
  276. package/dist/{videoSelfieStepDetector-CGsTltqB.d.ts → videoSelfieStepDetector-DRrh4P0A.d.ts} +10 -5
  277. package/dist/virtualCameraCheck-eFOm2C9q.esm.js +27 -0
  278. package/dist/{warmup-BO57syF6.d.ts → warmup-BNhIuURi.d.ts} +18 -2
  279. package/dist/{warmup-BElYWRh7.esm.js → warmup-BZOMg303.esm.js} +243 -30
  280. package/dist/wasm.d.ts +9 -3
  281. package/dist/wasm.esm.js +3 -3
  282. package/dist/{wasmDsFlagSync-CYj5LL9z.esm.js → wasmDsFlagSync-DPK7qGgo.esm.js} +1 -1
  283. package/dist/wasmMetadataVersionSync-U8EFUr1T.esm.js +27 -0
  284. package/dist/{wasmWebClient-BjZw_7OB.esm.js → wasmWebClient-CyLCM31e.esm.js} +45 -26
  285. package/dist/watchlist-for-business.d.ts +2 -1
  286. package/dist/watchlist-for-business.esm.js +2 -2
  287. package/dist/watchlist.d.ts +1 -1
  288. package/dist/watchlist.esm.js +2 -2
  289. package/dist/{watchlistForBusinessManager-CZZOFkGl.esm.js → watchlistForBusinessManager-BH6M4kqA.esm.js} +40 -8
  290. package/dist/{watchlistForBusinessManager-B3GDPZrr.d.ts → watchlistForBusinessManager-l7ZERQcV.d.ts} +57 -21
  291. package/dist/watchlistForBusinessStateMachine-BMWm5mcP.esm.js +166 -0
  292. package/dist/{watchlistManager-DXtX94SN.esm.js → watchlistManager-BDaVjzLW.esm.js} +5 -3
  293. package/dist/{watchlistManager-DJQOd8Pw.d.ts → watchlistManager-DQq4GxBO.d.ts} +3 -3
  294. package/dist/{watchlistStateMachine-McALifag.esm.js → watchlistStateMachine-Cx-6QAvu.esm.js} +3 -3
  295. package/dist/workflow.d.ts +234 -45
  296. package/dist/workflow.esm.js +194 -80
  297. package/dist/{xstate-actors.esm-8Gzepa_A.esm.js → xstate-actors.esm-BCcwgosu.esm.js} +1 -1
  298. package/dist/xstate.cjs-D6Ur0X1F.d.ts +7 -0
  299. package/dist/{xstate.esm-DSajW7CJ.esm.js → xstate.esm-CIqUf_i6.esm.js} +1 -125
  300. package/package.json +24 -7
  301. package/dist/Actor-DpTj5PFb.d.ts +0 -1
  302. package/dist/IBrowserEnvironmentCapability-DEaRRk-R.esm.js +0 -9
  303. package/dist/addressSearch-DPjIKJrX.esm.js +0 -563
  304. package/dist/cpf-uAZTPUBy.esm.js +0 -61
  305. package/dist/deepsightLoader-sH7920zw.esm.js +0 -55
  306. package/dist/ekycStateMachine-CDnI_NRq.esm.js +0 -1443
  307. package/dist/ekycUtils-zY8CdKJL.esm.js +0 -300
  308. package/dist/index-DpTj5PFb.d.ts +0 -1
  309. package/dist/types-BvLo3U4u.d.ts +0 -134
  310. package/dist/types-zOgZqMni.d.ts +0 -6
  311. package/dist/watchlistForBusinessStateMachine-B66E7jud.esm.js +0 -78
  312. /package/dist/{types-BSBzhHRH2.d.ts → types-BSBzhHRH.d.ts} +0 -0
@@ -1,17 +1,18 @@
1
- import { t as api } from "./api-Cz90EHyu.esm.js";
2
- import { h as isBrowserSimulation, v as getThumbmarkId, x as fingerprintSignalsReporter } from "./sessionInitializer-JM_glXR2.esm.js";
3
- import { t as addDeviceStats } from "./stats-BEvexnKC.esm.js";
1
+ import { t as WasmUtilProvider } from "./WasmUtilProvider-0xTxgP0R.esm.js";
2
+ import { u as trueSightLog } from "./trueSightService-Bs6xqUXD.esm.js";
3
+ import { t as SDK_VERSION } from "./sdkVersion-k-QlBWlU.esm.js";
4
+ import { C as BrowserEnvironmentProvider, S as IpifyProvider, T as SDK_PLATFORM, b as getThumbmarkId, n as getDisableIpify, r as getFingerprintEnabled, v as isBrowserSimulation, w as fingerprintSignalsReporter } from "./sessionInitializer-43LQITNU.esm.js";
4
5
  import { t as getParsedUserAgent } from "./getParsedUserAgent-DhQPeKqw.esm.js";
5
6
  import { t as getUserAgent } from "./getBrowser-CBiibsL-.esm.js";
6
- import { i as requestCameraAccess, o as stopCameraStream } from "./camera-sIa9ceW2.esm.js";
7
- import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
8
- import { t as createHiddenVideoElement } from "./video-BtSWtHy1.esm.js";
7
+ import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-DPK7qGgo.esm.js";
8
+ import { t as MotionSensorProvider } from "./MotionSensorProvider-DYxh8TjR.esm.js";
9
9
  import { t as getDeviceInfo } from "./getDeviceClass-CeBiEayS.esm.js";
10
+ import { n as runVirtualCameraCheck } from "./virtualCameraCheck-eFOm2C9q.esm.js";
10
11
  //#region src/internal/deepsight/metadataService.ts
11
- function createMetadataService(wasmUtil, visibility, browserEnv, ipLookup) {
12
+ function createMetadataService(wasmUtil, browserEnv, ipLookup) {
12
13
  return {
13
14
  async initialize(sdkVersion, disableIpify = false, disableFingerprint = false) {
14
- wasmUtil.setSdkPlatform("WEBAPP");
15
+ wasmUtil.setSdkPlatform(SDK_PLATFORM);
15
16
  wasmUtil.setSdkVersion(sdkVersion);
16
17
  const ua = getUserAgent();
17
18
  const parsedUa = getParsedUserAgent(ua);
@@ -31,6 +32,7 @@ function createMetadataService(wasmUtil, visibility, browserEnv, ipLookup) {
31
32
  model,
32
33
  os: parsedUa.os.name ?? "",
33
34
  osVersion: parsedUa.os.version ?? "",
35
+ osVer: parsedUa.os.version ?? "",
34
36
  screenDimensions,
35
37
  numTouchPoints: deviceInfo.maxTouchPoints,
36
38
  fingerprintHash,
@@ -84,10 +86,7 @@ function createMetadataService(wasmUtil, visibility, browserEnv, ipLookup) {
84
86
  setMotionStatus(status) {
85
87
  wasmUtil.setMotionStatus(status);
86
88
  },
87
- setBackgroundMode(backgroundMode) {
88
- wasmUtil.setBackgroundMode(backgroundMode || visibility.wasBackgrounded);
89
- visibility.reset();
90
- },
89
+ setBackgroundMode(_backgroundMode) {},
91
90
  estimatePerformance() {
92
91
  return wasmUtil.estimatePerformance();
93
92
  },
@@ -130,60 +129,15 @@ function createMotionStatusService(motionSensor) {
130
129
  };
131
130
  }
132
131
  //#endregion
133
- //#region src/internal/virtualCameraCheck.ts
134
- const frameSources = {
135
- front: "FRONT_ID",
136
- back: "BACK_ID",
137
- selfie: "SELFIE"
138
- };
139
- /**
140
- * Sends the analyzed frame image to the backend for logging.
141
- */
142
- async function logFrame({ source, base64Image, token }) {
143
- try {
144
- return (await api.post("/omni/log/frame/v2", { base64Image }, {
145
- query: { source },
146
- headers: { "X-Incode-Hardware-Id": token }
147
- })).data;
148
- } catch {
149
- return;
150
- }
151
- }
152
- /**
153
- * Runs the WASM virtual camera check and handles logging and stats.
154
- */
155
- async function runVirtualCameraCheck({ wasmUtil, source, token }) {
156
- const output = {
157
- canvas: null,
158
- itr: null,
159
- skipped: null
160
- };
161
- await wasmUtil.poc(output);
162
- if (output.skipped !== false) return;
163
- if (output.canvas && token) {
164
- const base64Image = new IncodeCanvas(output.canvas).getBase64Image();
165
- if (base64Image) logFrame({
166
- source,
167
- base64Image,
168
- token
169
- });
170
- }
171
- if (output.itr === true) {
172
- addDeviceStats({ virtualCameraDetected: true });
173
- wasmUtil.setZc("FAIL");
174
- } else if (output.itr === false) wasmUtil.setZc("PASS");
175
- }
176
- //#endregion
177
132
  //#region src/internal/deepsight/deepsightService.ts
178
133
  function createDeepsightService(config) {
179
- const metadata = createMetadataService(config.wasmUtil, config.visibility, config.browserEnv, config.ipLookup);
134
+ const metadata = createMetadataService(config.wasmUtil, config.browserEnv, config.ipLookup);
180
135
  const motion = createMotionStatusService(config.motionSensor);
181
136
  const finalizeCaptureMetadata = () => {
182
137
  metadata.preparePipelineState();
183
138
  const motionStatus = motion.check();
184
139
  metadata.setMotionStatus(motionStatus);
185
140
  metadata.getCheck();
186
- metadata.setBackgroundMode(false);
187
141
  };
188
142
  return {
189
143
  metadata,
@@ -212,16 +166,7 @@ function createDeepsightService(config) {
212
166
  token: sessionToken
213
167
  });
214
168
  },
215
- async performPrcCheck(params) {
216
- const prcStream = await requestCameraAccess(params.constraints);
217
- const hiddenVideo = createHiddenVideoElement(prcStream);
218
- try {
219
- await config.wasmUtil.prc();
220
- } finally {
221
- hiddenVideo.dispose();
222
- stopCameraStream(prcStream);
223
- }
224
- },
169
+ async performPrcCheck(_params) {},
225
170
  async analyzeFrame(imageData) {
226
171
  await motion.start();
227
172
  await metadata.analyzeFrame(imageData);
@@ -249,4 +194,29 @@ function createDeepsightService(config) {
249
194
  };
250
195
  }
251
196
  //#endregion
252
- export { frameSources as n, runVirtualCameraCheck as r, createDeepsightService as t };
197
+ //#region src/internal/deepsight/deepsightLoader.ts
198
+ async function loadDeepsightSession(options) {
199
+ try {
200
+ return await loadDeepsightSessionInternal(options);
201
+ } catch (error) {
202
+ trueSightLog("warning", "deepsight", "other", `deepsight load failed error=${String(error)}`);
203
+ throw error;
204
+ }
205
+ }
206
+ async function loadDeepsightSessionInternal(options) {
207
+ setWasmDsFlagSync(options.ds === true);
208
+ const service = createDeepsightService({
209
+ sdkVersion: SDK_VERSION,
210
+ wasmUtil: await WasmUtilProvider.getInstance(),
211
+ browserEnv: new BrowserEnvironmentProvider(),
212
+ motionSensor: new MotionSensorProvider(),
213
+ ipLookup: new IpifyProvider()
214
+ });
215
+ const disableIpify = options.disableIpify ?? getDisableIpify();
216
+ const disableFingerprint = options.disableFingerprint ?? !getFingerprintEnabled();
217
+ await service.initialize(disableIpify, disableFingerprint);
218
+ await service.startMotionSensors();
219
+ return service;
220
+ }
221
+ //#endregion
222
+ export { loadDeepsightSession };
@@ -0,0 +1,221 @@
1
+ //#region src/shared/addressSuggestion.ts
2
+ /** Shown when an autocomplete suggestion has no street (city/region-level result). */
3
+ const STREET_LEVEL_REQUIRED_ERROR = { key: "verification.errors.streetLevelRequired" };
4
+ function isStreetMissingFromSuggestion(suggestion) {
5
+ return !suggestion.street?.trim();
6
+ }
7
+ /**
8
+ * Validation error for `street` after selecting a suggestion without `street`,
9
+ * or `undefined` when the suggestion is street-level or street is not active.
10
+ */
11
+ function getStreetLevelErrorForSuggestion(suggestion, activeFields) {
12
+ if (!activeFields.has("street")) return void 0;
13
+ return isStreetMissingFromSuggestion(suggestion) ? STREET_LEVEL_REQUIRED_ERROR : void 0;
14
+ }
15
+ /**
16
+ * Fills form values from an address autocomplete suggestion.
17
+ * Shared between eKYC and eKYB address forms.
18
+ */
19
+ function fillFromSuggestion(values, touched, suggestion, activeFields) {
20
+ const newValues = { ...values };
21
+ const newTouched = { ...touched };
22
+ const hasHouseNoField = !activeFields || activeFields.has("houseNo");
23
+ const hasStreetField = !activeFields || activeFields.has("street");
24
+ const streetValue = buildStreetValue(suggestion.street, suggestion.houseNumber, hasHouseNoField);
25
+ if (hasStreetField) {
26
+ newValues.street = streetValue;
27
+ newTouched.street = true;
28
+ }
29
+ if (suggestion.city) {
30
+ newValues.city = suggestion.city;
31
+ newTouched.city = true;
32
+ }
33
+ if (suggestion.stateCode) {
34
+ newValues.state = suggestion.stateCode;
35
+ newTouched.state = true;
36
+ }
37
+ if (suggestion.postalCode) {
38
+ newValues.postalCode = suggestion.postalCode;
39
+ newTouched.postalCode = true;
40
+ }
41
+ if (suggestion.houseNumber && hasHouseNoField) {
42
+ newValues.houseNo = suggestion.houseNumber;
43
+ newTouched.houseNo = true;
44
+ }
45
+ return {
46
+ values: newValues,
47
+ touched: newTouched
48
+ };
49
+ }
50
+ function buildStreetValue(street, houseNumber, hasHouseNoField) {
51
+ if (hasHouseNoField) return street ?? "";
52
+ if (houseNumber && street) return `${houseNumber} ${street}`;
53
+ return houseNumber ?? street ?? "";
54
+ }
55
+ /**
56
+ * Keeps an address suggestion's region inside the `state` dropdown. A region
57
+ * that matches an option's value or label, ignoring case, becomes that
58
+ * option's value. One that matches none is dropped, as if the suggestion had
59
+ * no region, so the previous `state` stays if it matches an option the same
60
+ * way, also as that option's value (a prefill can leave `KOWLOON`, or a value
61
+ * no option has). Without this, a code such as `HK` would pass `required` and
62
+ * be submitted though the dropdown can't show it. A free-text `state` takes
63
+ * the suggestion as it is. Shared between eKYC and eKYB address forms; run it
64
+ * on `fillFromSuggestion`'s values.
65
+ */
66
+ function keepSuggestedStateInOptions(fields, previous, next) {
67
+ const options = fields.find((field) => field.name === "state")?.options;
68
+ const suggested = next.state;
69
+ if (!options || !suggested) return next;
70
+ const optionFor = (value) => {
71
+ const wanted = value?.trim().toUpperCase();
72
+ if (!wanted) return void 0;
73
+ return options.find((option) => option.value.toUpperCase() === wanted || option.label.toUpperCase() === wanted)?.value;
74
+ };
75
+ return {
76
+ ...next,
77
+ state: optionFor(suggested) ?? optionFor(previous.state)
78
+ };
79
+ }
80
+ const POSTAL_CODE_MAX_LENGTH_BY_COUNTRY = {
81
+ US: 10,
82
+ BR: 9,
83
+ GB: 8,
84
+ UK: 8,
85
+ AR: 8,
86
+ CA: 7,
87
+ NL: 6,
88
+ PT: 8
89
+ };
90
+ const FIXED_LENGTH_KEY = "verification.errors.invalidPostalCodeFixedLength";
91
+ /**
92
+ * Countries whose postal code is a fixed number of digits. It sets the
93
+ * check, the input's max length and the digits-only typing mask.
94
+ */
95
+ const FIXED_DIGIT_POSTAL_CODE_LENGTH = {
96
+ BE: 4,
97
+ DK: 4,
98
+ NO: 4,
99
+ PH: 4,
100
+ DE: 5,
101
+ ES: 5,
102
+ FI: 5,
103
+ FR: 5,
104
+ GR: 5,
105
+ IT: 5,
106
+ KE: 5,
107
+ MX: 5,
108
+ CN: 6,
109
+ IN: 6,
110
+ NG: 6,
111
+ RO: 6,
112
+ SG: 6,
113
+ IL: 7
114
+ };
115
+ function getPostalCodeMaxLength(country) {
116
+ return POSTAL_CODE_MAX_LENGTH_BY_COUNTRY[country] ?? FIXED_DIGIT_POSTAL_CODE_LENGTH[country] ?? 8;
117
+ }
118
+ function getPostalCodeErrorKey(country) {
119
+ if (country in FIXED_DIGIT_POSTAL_CODE_LENGTH) return FIXED_LENGTH_KEY;
120
+ if (country === "CA") return "verification.errors.CAPostalCodeInvalidFormat";
121
+ if (country === "AR") return "verification.errors.ARPostalCodeInvalidFormat";
122
+ if (country === "GB" || country === "UK") return "verification.errors.UKPostalCodeInvalidFormat";
123
+ if (country === "NL") return "verification.errors.NLPostalCodeInvalidFormat";
124
+ if (country === "PT") return "verification.errors.PTPostalCodeInvalidFormat";
125
+ if (country === "US") return "verification.errors.zipCodeInvalidFormat";
126
+ return "verification.errors.postalCodeInvalidFormat";
127
+ }
128
+ /**
129
+ * The params of a postal code's error message: the digit count for a
130
+ * fixed-length format, otherwise the maximum length. US and BR don't count
131
+ * the dash.
132
+ */
133
+ function getPostalCodeErrorParams(country) {
134
+ const fixedLength = FIXED_DIGIT_POSTAL_CODE_LENGTH[country];
135
+ if (fixedLength !== void 0) return { length: fixedLength };
136
+ let maxLength = getPostalCodeMaxLength(country);
137
+ if (country === "US" || country === "BR") maxLength = maxLength - 1;
138
+ return { maxLength };
139
+ }
140
+ const US_POSTAL_CODE_REGEX = /^(?:\d{5}|\d{9}|\d{5}-\d{4})$/;
141
+ const BR_POSTAL_CODE_REGEX = /^(?:\d{5}|\d{8}|\d{5}-\d{3})$/;
142
+ const CA_POSTAL_CODE_REGEX = /^[A-Za-z]\d[A-Za-z] \d[A-Za-z]\d$/;
143
+ const UK_POSTAL_CODE_REGEX = /^(?:[A-Z]{2}\d|[A-Z]{2}\d{2}|[A-Z]\d|[A-Z]\d{2}|[A-Z]\d[A-Z]|[A-Z]{2}\d[A-Z]) \d[A-Z]{2}$/;
144
+ const AR_POSTAL_CODE_REGEX = /^[A-Za-z]\d{4}[A-Za-z]{3}$/;
145
+ /** Four digits and two uppercase letters, such as 1016DV. */
146
+ const NL_POSTAL_CODE_REGEX = /^\d{4}[A-Z]{2}$/;
147
+ /** Seven digits, the first 1 to 9, with or without a hyphen: 4430-458. */
148
+ const PT_POSTAL_CODE_REGEX = /^[1-9]\d{3}-?\d{3}$/;
149
+ /**
150
+ * Validates a postal code by country.
151
+ * Covers all countries used by eKYC and eKYB.
152
+ */
153
+ function validatePostalCode(postalCode, country) {
154
+ if (!postalCode) return false;
155
+ const fixedDigits = FIXED_DIGIT_POSTAL_CODE_LENGTH[country];
156
+ if (fixedDigits !== void 0) return postalCode.length === fixedDigits && /^\d+$/.test(postalCode);
157
+ switch (country) {
158
+ case "US": return US_POSTAL_CODE_REGEX.test(postalCode);
159
+ case "BR": return BR_POSTAL_CODE_REGEX.test(postalCode);
160
+ case "CA": return CA_POSTAL_CODE_REGEX.test(postalCode);
161
+ case "GB":
162
+ case "UK": return UK_POSTAL_CODE_REGEX.test(postalCode.toUpperCase());
163
+ case "AR": return AR_POSTAL_CODE_REGEX.test(postalCode.replace(/\s/g, "").toUpperCase());
164
+ case "NL": return NL_POSTAL_CODE_REGEX.test(postalCode);
165
+ case "PT": return PT_POSTAL_CODE_REGEX.test(postalCode);
166
+ case "CM": return postalCode.length > 0;
167
+ default: {
168
+ const stripped = postalCode.replace(/\D/g, "");
169
+ return /^\d+$/.test(stripped) && [5, 8].includes(stripped.length);
170
+ }
171
+ }
172
+ }
173
+ /**
174
+ * Progressively formats postal code input by country.
175
+ * Covers all countries used by eKYC and eKYB.
176
+ */
177
+ function formatPostalCode(value, country) {
178
+ const fixedDigits = FIXED_DIGIT_POSTAL_CODE_LENGTH[country];
179
+ if (fixedDigits !== void 0) return value.replace(/\D/g, "").slice(0, fixedDigits);
180
+ if (country === "US" || country === "BR") {
181
+ const maxDigits = country === "US" ? 9 : 8;
182
+ const hasDash = value.includes("-");
183
+ const digits = value.replace(/\D/g, "").slice(0, maxDigits);
184
+ if (digits.length <= 5) {
185
+ if (hasDash && digits.length === 5) return `${digits}-`;
186
+ return digits;
187
+ }
188
+ if (hasDash) return `${digits.slice(0, 5)}-${digits.slice(5)}`;
189
+ return digits;
190
+ }
191
+ if (country === "CA") {
192
+ const normalized = value.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 6);
193
+ if (normalized.length <= 3) return normalized;
194
+ return `${normalized.slice(0, 3)} ${normalized.slice(3)}`;
195
+ }
196
+ if (country === "GB" || country === "UK") {
197
+ const normalized = value.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 7);
198
+ if (normalized.length <= 3) return normalized;
199
+ return `${normalized.slice(0, -3)} ${normalized.slice(-3)}`;
200
+ }
201
+ if (country === "AR") return value.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 8);
202
+ if (country === "PT") {
203
+ const digits = value.replace(/\D/g, "").slice(0, 7);
204
+ return digits.length <= 4 ? digits : `${digits.slice(0, 4)}-${digits.slice(4)}`;
205
+ }
206
+ if (country === "NL") return `${value.replace(/\D/g, "").slice(0, 4)}${value.replace(/[^A-Za-z]/g, "").slice(0, 2).toUpperCase()}`;
207
+ return value.slice(0, 8);
208
+ }
209
+ //#endregion
210
+ //#region src/internal/forms/definitionSource.ts
211
+ const queryKey = ({ module, source, country }) => `${module}|${source ?? ""}|${country ?? ""}`;
212
+ /**
213
+ * The definitions bundled with this build. Matches module, source and country
214
+ * exactly, so a pair without its own definition keeps the current builder.
215
+ */
216
+ function createBundledDefinitionSource(definitions) {
217
+ const byQuery = new Map(Object.values(definitions).map((definition) => [queryKey(definition), definition]));
218
+ return { select: (query) => byQuery.get(queryKey(query)) };
219
+ }
220
+ //#endregion
221
+ export { getPostalCodeMaxLength as a, fillFromSuggestion as c, getPostalCodeErrorParams as i, getStreetLevelErrorForSuggestion as l, formatPostalCode as n, validatePostalCode as o, getPostalCodeErrorKey as r, STREET_LEVEL_REQUIRED_ERROR as s, createBundledDefinitionSource as t, keepSuggestedStateInOptions as u };
@@ -1,7 +1,12 @@
1
- import { t as getTimestamp } from "./IBrowserEnvironmentCapability-DEaRRk-R.esm.js";
2
- import { c as wasmRuntime, l as CAMERA_CYCLE_OWNERSHIP_DOMAIN, u as getCameraCycleOwnershipDomain } from "./warmup-BElYWRh7.esm.js";
3
- import { t as api, u as endpoints } from "./api-Cz90EHyu.esm.js";
4
- import { t as fromCallback } from "./xstate-actors.esm-8Gzepa_A.esm.js";
1
+ import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
2
+ import { d as getCameraCycleOwnershipDomain, l as wasmRuntime, u as CAMERA_CYCLE_OWNERSHIP_DOMAIN } from "./warmup-BZOMg303.esm.js";
3
+ import { i as utilityWasmApi } from "./WasmUtilProvider-0xTxgP0R.esm.js";
4
+ import { t as api, u as endpoints } from "./api-CZpuJuZl.esm.js";
5
+ import { t as fromCallback } from "./xstate-actors.esm-BCcwgosu.esm.js";
6
+ import { l as markCameraGrantedInDocument, n as enumerateVideoDevices, o as clearCameraGrantedInDocument, s as isCameraDenialErrorName } from "./camera-E_Kcre4O.esm.js";
7
+ import { l as queryCameraPermission } from "./permissionServices-DFJlH7K3.esm.js";
8
+ import { r as selectBestBackDevice, t as isBackCameraLabel } from "./backCameraLabel-yda5ugE4.esm.js";
9
+ import { t as getDeviceClass } from "./getDeviceClass-DoIWuKI8.esm.js";
5
10
  //#region ../infra/src/capabilities/ICameraCycleCapability.ts
6
11
  /**
7
12
  * Fixed protected-endpoint identifiers owned by ml-wasm-kit.
@@ -30,6 +35,57 @@ async function flagIdManualReview() {
30
35
  } catch {}
31
36
  }
32
37
  //#endregion
38
+ //#region ../infra/src/media/cameraCycleFailure.ts
39
+ /**
40
+ * Reads the `DOMException`-style name of what the kit's camera step handed to
41
+ * `onCameraFailed`. The kit forwards the browser's rejection unchanged on every
42
+ * branch but one, so this is the error's own `name` when it has one. The
43
+ * exception is the unnamed iPad front-camera failure; see
44
+ * {@link classifyCameraCycleFailure}. That value has no name, so this returns
45
+ * `undefined` for it.
46
+ */
47
+ function cameraCycleFailureName(error) {
48
+ if (typeof error !== "object" || error === null) return;
49
+ const { name } = error;
50
+ return typeof name === "string" && name.length > 0 ? name : void 0;
51
+ }
52
+ /**
53
+ * True for the value the kit's iPad front-camera branch reports for every
54
+ * `getUserMedia` rejection. `InitialStreamAcquisition::formatFailureForHost`
55
+ * copies the error's own enumerable properties into a plain object tagged
56
+ * `type: 'permissionDenied'`, which drops the prototype `name` getter. A busy
57
+ * camera and a real denial therefore look the same, and the branch never
58
+ * retries.
59
+ */
60
+ function isUnnamedIpadCameraFailure(error) {
61
+ return typeof error === "object" && error !== null && cameraCycleFailureName(error) === void 0 && error.type === "permissionDenied";
62
+ }
63
+ /** How long a permission query may take before the failure counts as unknown. */
64
+ const PERMISSION_QUERY_TIMEOUT_MS = 1e3;
65
+ async function queryWithTimeout(query) {
66
+ let timer;
67
+ try {
68
+ return await Promise.race([query(), new Promise((resolve) => {
69
+ timer = setTimeout(() => resolve("prompt"), PERMISSION_QUERY_TIMEOUT_MS);
70
+ })]);
71
+ } finally {
72
+ clearTimeout(timer);
73
+ }
74
+ }
75
+ /**
76
+ * Resolves what an `onCameraFailed` value means before anyone routes on it.
77
+ * Named failures pass through unchanged. For the unnamed iPad front-camera
78
+ * failure, the browser's camera permission decides: `denied` becomes a
79
+ * `NotAllowedError`, so the permission screen handles it. Anything else stays
80
+ * unnamed and takes the generic, retryable error path. The SDK's own
81
+ * permission step succeeded moments before the camera step, so a failure there
82
+ * is far more likely a busy or over-constrained camera than a denial.
83
+ */
84
+ async function classifyCameraCycleFailure(error, query = queryCameraPermission) {
85
+ if (!isUnnamedIpadCameraFailure(error)) return error;
86
+ return await queryWithTimeout(query) === "denied" ? new DOMException("Camera permission denied", "NotAllowedError") : error;
87
+ }
88
+ //#endregion
33
89
  //#region ../infra/src/providers/wasm/CameraCycleProvider.ts
34
90
  function asRecord(value) {
35
91
  return typeof value === "object" && value !== null ? value : null;
@@ -123,12 +179,45 @@ function sanitizeProtectedResponse(request, raw) {
123
179
  }
124
180
  }
125
181
  var CameraCycleProvider = class {
126
- constructor(runtime = wasmRuntime) {
182
+ constructor(runtime = wasmRuntime, deepsightFlag = utilityWasmApi) {
127
183
  this.runtime = runtime;
184
+ this.deepsightFlag = deepsightFlag;
128
185
  this[CAMERA_CYCLE_OWNERSHIP_DOMAIN] = getCameraCycleOwnershipDomain(runtime);
129
186
  }
130
- adoptStream(stream, constraints, options) {
131
- return this.runtime.adoptCameraStream(stream, constraints, options);
187
+ /**
188
+ * Fills `ds` from the SDK's deepsight flag — the JS-side `dsEnabled_` the
189
+ * utility facade replays into every `poc`/`rsp` call — unless the caller set
190
+ * it, so the in-step pre-capture IAD sees the flag `prc` used to receive.
191
+ *
192
+ * A failure is held until the step settles and classified first
193
+ * (`classifyCameraCycleFailure`): the unnamed iPad front-camera failure
194
+ * becomes a `NotAllowedError` only when the browser reports the camera
195
+ * permission as denied.
196
+ *
197
+ * Also feeds the document camera-grant memo, which `getUserMedia` paths feed
198
+ * through `trackCameraAcquisition` and the kit cannot: READY marks the grant,
199
+ * a permission denial clears it, any other failure leaves it untouched.
200
+ */
201
+ async startCameraCycle(options, callbacks) {
202
+ const step = {};
203
+ await this.runtime.startCameraCycle({
204
+ ...options,
205
+ ds: options.ds ?? this.deepsightFlag.getDsEnabled()
206
+ }, {
207
+ onNewFrame: callbacks.onNewFrame,
208
+ onFirstFrame: callbacks.onFirstFrame,
209
+ onCameraReady: (audioStream) => {
210
+ markCameraGrantedInDocument();
211
+ callbacks.onCameraReady(audioStream);
212
+ },
213
+ onCameraFailed: (error) => {
214
+ step.failure ??= { error };
215
+ }
216
+ });
217
+ if (!step.failure) return;
218
+ const error = await classifyCameraCycleFailure(step.failure.error);
219
+ if (isCameraDenialErrorName(cameraCycleFailureName(error))) clearCameraGrantedInDocument();
220
+ callbacks.onCameraFailed(error);
132
221
  }
133
222
  setWorkflowConsuming(workflow, consuming) {
134
223
  if (consuming && (workflow === 2 || workflow === 3)) throw new Error("[Incode SDK] Protected still capture is unavailable for video-selfie workflows.");
@@ -205,7 +294,7 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
205
294
  let pendingReadyStream = null;
206
295
  let pendingDeliveryEvent = null;
207
296
  let visibilityGeneration = 0;
208
- let unadoptedStream = input.streamSource.kind === "preAcquired" ? input.streamSource.stream : null;
297
+ let hostStream = null;
209
298
  let resourcesReleased = false;
210
299
  let cycleTransferred = false;
211
300
  let commandQueue = Promise.resolve();
@@ -223,9 +312,8 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
223
312
  if (startupStartedAt === void 0 || !input.onStartupTiming) return;
224
313
  try {
225
314
  input.onStartupTiming({
226
- acquireMs: startupTiming.acquireMs ?? 0,
227
- adoptMs: startupTiming.adoptMs ?? 0,
228
- prcMs: startupTiming.prcMs ?? 0,
315
+ cameraStepMs: startupTiming.cameraStepMs ?? 0,
316
+ ...startupTiming.firstFrameMs === void 0 ? {} : { firstFrameMs: startupTiming.firstFrameMs },
229
317
  displayStreamMs: startupTiming.displayStreamMs ?? 0,
230
318
  configureMs: startupTiming.configureMs ?? 0,
231
319
  recorderMs: startupTiming.recorderMs ?? 0,
@@ -237,12 +325,13 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
237
325
  const sendParent = (event) => {
238
326
  sendBack(event);
239
327
  };
240
- const releaseRawStream = (stream) => {
328
+ const stopTracks = (stream) => {
329
+ if (!stream) return;
241
330
  try {
242
- input.releaseUnadoptedStream(stream);
331
+ stream.getTracks().forEach((track) => track.stop());
243
332
  } catch {}
244
333
  };
245
- const reportFailure = (stage, code, http = {}) => {
334
+ const reportFailure = (stage, code, details = {}) => {
246
335
  if (!active) return;
247
336
  sendParent({
248
337
  type: "PROTECTED_ATTEMPT_FAILED",
@@ -250,7 +339,7 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
250
339
  failure: {
251
340
  stage,
252
341
  code,
253
- ...http
342
+ ...details
254
343
  }
255
344
  });
256
345
  };
@@ -272,8 +361,8 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
272
361
  postPocDisplayStream = null;
273
362
  pendingDeliveryEvent = null;
274
363
  finalizeDeferred = false;
275
- if (unadoptedStream) releaseRawStream(unadoptedStream);
276
- unadoptedStream = null;
364
+ stopTracks(hostStream);
365
+ hostStream = null;
277
366
  if (cycleTransferred) input.cycleOwnership.releaseByAttempt();
278
367
  else input.cycleOwnership.releaseByController();
279
368
  };
@@ -283,8 +372,8 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
283
372
  ready = false;
284
373
  releaseResources();
285
374
  };
286
- const failClosed = (stage, code) => {
287
- reportFailure(stage, code);
375
+ const failClosed = (stage, code, details = {}) => {
376
+ reportFailure(stage, code, details);
288
377
  deactivate();
289
378
  };
290
379
  const stopConsuming = () => {
@@ -345,38 +434,52 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
345
434
  let stage = "acquire";
346
435
  try {
347
436
  startupStartedAt = now();
348
- const acquisitionStartedAt = now();
349
- const acquired = input.streamSource.kind === "preAcquired" ? {
350
- stream: input.streamSource.stream,
351
- constraints: input.streamSource.constraints
352
- } : await input.streamSource.acquire(abortController.signal);
353
- startupTiming.acquireMs = Math.max(0, now() - acquisitionStartedAt);
437
+ const cameraStepStartedAt = now();
438
+ const options = await input.cameraStep();
354
439
  if (!active || abortController.signal.aborted) {
355
- releaseRawStream(acquired.stream);
440
+ stopTracks(options.hs);
356
441
  return;
357
442
  }
358
- unadoptedStream = acquired.stream;
359
- stage = "adopt";
360
- if (input.beforeAdopt) {
361
- await input.beforeAdopt(acquired.stream);
362
- if (!active || abortController.signal.aborted) return;
443
+ hostStream = options.hs ?? null;
444
+ if (input.preflight) {
445
+ stage = "configure";
446
+ input.preflight();
447
+ stage = "acquire";
448
+ }
449
+ const step = { outcome: null };
450
+ await input.cycle.startCameraCycle(options, {
451
+ onFirstFrame: () => {
452
+ startupTiming.firstFrameMs ??= Math.max(0, now() - cameraStepStartedAt);
453
+ },
454
+ onCameraReady: (audioStream) => {
455
+ stopTracks(audioStream);
456
+ step.outcome ??= { ready: true };
457
+ },
458
+ onCameraFailed: (error) => {
459
+ step.outcome ??= {
460
+ ready: false,
461
+ error
462
+ };
463
+ }
464
+ });
465
+ startupTiming.cameraStepMs = Math.max(0, now() - cameraStepStartedAt);
466
+ if (!active) return;
467
+ if (step.outcome === null) throw new Error("protected camera step ended without an outcome");
468
+ if (!step.outcome.ready) {
469
+ failClosed("acquire", "protected-attempt-acquire-failed", { errorName: cameraCycleFailureName(step.outcome.error) });
470
+ return;
363
471
  }
364
- const adoption = measure(() => input.cycle.adoptStream(acquired.stream, acquired.constraints, input.captureOptions));
365
- startupTiming.adoptMs = adoption.durationMs;
366
- if (!adoption.value) throw new Error("protected camera stream adoption was rejected");
367
- unadoptedStream = null;
368
472
  input.cycleOwnership.transferToAttempt();
369
473
  cycleTransferred = true;
370
- stage = "prc";
371
- const prcStartedAt = now();
372
- await input.runPrc();
373
- startupTiming.prcMs = Math.max(0, now() - prcStartedAt);
374
- if (!active) return;
375
474
  const displayStreamResult = measure(() => input.cycle.getUnprotectedStream());
376
475
  startupTiming.displayStreamMs = displayStreamResult.durationMs;
377
476
  const displayStream = displayStreamResult.value;
378
477
  if (!displayStream) throw new Error("protected camera cycle did not provide a stream");
379
478
  stage = "configure";
479
+ if (input.afterReady) {
480
+ await input.afterReady(displayStream);
481
+ if (!active) return;
482
+ }
380
483
  const configureStartedAt = now();
381
484
  await input.configureWorkflow();
382
485
  startupTiming.configureMs = Math.max(0, now() - configureStartedAt);
@@ -833,4 +936,38 @@ function createCameraCycleOwnership(cycle) {
833
936
  };
834
937
  }
835
938
  //#endregion
836
- export { flagIdManualReview as a, flagFaceManualReview as i, runProtectedAttempt as n, PROTECTED_CAPTURE_TARGET as o, cameraCycleProvider as r, createCameraCycleOwnership as t };
939
+ //#region src/internal/camera/desktopCameraElection.ts
940
+ /**
941
+ * Picks the exact camera the kit's camera step should open on desktop.
942
+ *
943
+ * On desktop, ml-wasm-kit ignores the facing preference and always requests
944
+ * `facingMode: 'user'` (`InitialStreamConstraints::desktopVideoSpec`), but it
945
+ * honours an exact device id (`di`). Electing the device here restores the
946
+ * ENG-47583 host corrections without JavaScript opening a camera:
947
+ * - a rear capture pins the best back-labelled device, so a Surface opens its
948
+ * rear camera for ID (#543);
949
+ * - a front capture pins the first device not labelled as a back camera, but
950
+ * only when a back camera exists, so the browser cannot hand the rear camera
951
+ * back for a selfie after an ID capture (#551).
952
+ *
953
+ * Returns `''`, which leaves the choice to the kit, off desktop, when labels
954
+ * are unavailable, or when nothing needs pinning. Labels are available here
955
+ * because the SDK's permission step runs before every capture. Like #551,
956
+ * "first non-back device" can pick a Windows Hello IR sensor on machines that
957
+ * expose one; that tradeoff is unchanged.
958
+ */
959
+ async function electDesktopCameraDevice(facing) {
960
+ if (getDeviceClass() !== "desktop") return "";
961
+ let devices;
962
+ try {
963
+ devices = await enumerateVideoDevices();
964
+ } catch {
965
+ return "";
966
+ }
967
+ const backDevices = devices.filter((device) => isBackCameraLabel(device.label));
968
+ if (backDevices.length === 0) return "";
969
+ if (facing === "environment") return selectBestBackDevice(backDevices).deviceId;
970
+ return devices.find((device) => device.label !== "" && !isBackCameraLabel(device.label))?.deviceId ?? "";
971
+ }
972
+ //#endregion
973
+ export { flagFaceManualReview as a, cameraCycleProvider as i, createCameraCycleOwnership as n, flagIdManualReview as o, runProtectedAttempt as r, PROTECTED_CAPTURE_TARGET as s, electDesktopCameraDevice as t };