@incodetech/web 2.2.0-rc.8 → 2.3.0-rc.0

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 (296) hide show
  1. package/THIRD_PARTY_NOTICES.txt +398 -0
  2. package/dist/ae-signature/ae-signature.es.js +4 -4
  3. package/dist/af-ZA-DTqKc5t4.js +3041 -0
  4. package/dist/am-EGNy2cbo.js +3041 -0
  5. package/dist/antifraud/antifraud.es.js +4 -4
  6. package/dist/ar-AE-Cb55U6s-.js +3057 -0
  7. package/dist/ar-EG-C8ucZII6.js +3057 -0
  8. package/dist/ar-MUpu33jy.js +3057 -0
  9. package/dist/assets/dm-sans-latin-400-normal.woff2 +0 -0
  10. package/dist/assets/dm-sans-latin-500-normal.woff2 +0 -0
  11. package/dist/assets/dm-sans-latin-600-normal.woff2 +0 -0
  12. package/dist/assets/dm-sans-latin-700-normal.woff2 +0 -0
  13. package/dist/assets/rethink-sans-latin-800-normal.woff2 +0 -0
  14. package/dist/authentication/authentication.es.js +15 -11
  15. package/dist/{autoFocusTitle-DB-23sv_.js → autoFocusTitle-CIbcUW_x.js} +2 -2
  16. package/dist/az-DlXjPSya.js +3041 -0
  17. package/dist/{back-horizontal-hint-CjdigFZj.js → back-horizontal-hint-UQ7Nof6k.js} +1 -1
  18. package/dist/{back-vertical-hint-OhaKsINF.js → back-vertical-hint-Crc8ybfk.js} +1 -1
  19. package/dist/base.css +917 -283
  20. package/dist/baseTutorial-DkL0vjUa.js +172 -0
  21. package/dist/bn-BuTjJr44.js +3041 -0
  22. package/dist/bottomSheet-DtUFrIAG.js +101 -0
  23. package/dist/bs-DUzGtLhU.js +3045 -0
  24. package/dist/ca-B6SY43GQ.js +3041 -0
  25. package/dist/cameraOverlay-Dn0r4NR9.js +2 -0
  26. package/dist/cameraOverlayHeader-CsokPtuL.js +43 -0
  27. package/dist/cameraView-DrTBPNWX.js +49 -0
  28. package/dist/captureFooter-DWCaAdIU.js +67 -0
  29. package/dist/ceb-DmXy5txv.js +3041 -0
  30. package/dist/certificate-issuance/certificate-issuance.es.js +19 -14
  31. package/dist/certificate-issuance/styles.css.js +1 -0
  32. package/dist/{checkbox-FGA-Ij-D.js → checkbox-D0wfscwg.js} +9 -8
  33. package/dist/{connectionError-BurQq_4R.js → connectionError-B61O7L3N.js} +4 -4
  34. package/dist/consent/consent.es.js +26 -33
  35. package/dist/consent/styles.css +4 -4
  36. package/dist/consent/styles.css.js +1 -0
  37. package/dist/countries-5e8kwG_m.js +8560 -0
  38. package/dist/{countrySelector-COZ7XQHp.js → countrySelector-C60Cdc5P.js} +8 -10
  39. package/dist/cross-document-data-match/cross-document-data-match.es.js +4 -4
  40. package/dist/cs-CZ-Gn3ZmW27.js +3049 -0
  41. package/dist/cs-dsQ7umNS.js +3049 -0
  42. package/dist/curp-validation/curp-validation.es.js +15 -22
  43. package/dist/curp-validation/styles.css.js +1 -0
  44. package/dist/custom-fields/styles.css.js +1 -0
  45. package/dist/{customFields-rVMTo1Yu.js → customFields-BdnLB6L1.js} +44 -19
  46. package/dist/{customWatchlist-DgpXtVRf.js → customWatchlist-DzeHJAa3.js} +14 -11
  47. package/dist/da-DK-CFQaOERk.js +3041 -0
  48. package/dist/{dashboardTheme-BUDq5UYs.js → dashboardTheme-BwKtcRSO.js} +31 -7
  49. package/dist/{dateInputComposed-DSgV0wnb.js → dateInputComposed-BcmKKwRL.js} +5 -5
  50. package/dist/dateInputComposed-DPM6l_SL.js +1 -0
  51. package/dist/de-BqG02U9o.js +3041 -0
  52. package/dist/document-capture/document-capture.es.js +1 -1
  53. package/dist/document-capture/styles.css +4 -4
  54. package/dist/document-capture/styles.css.js +1 -0
  55. package/dist/{documentCapture-sZj09g0I.js → documentCapture-CoMsW_gC.js} +16 -17
  56. package/dist/documentCapture-DMxz9eqT.js +2 -0
  57. package/dist/dropdownComposed-CXwC9j18.js +1 -0
  58. package/dist/{dropdownComposed-CEegNzG4.js → dropdownComposed-DYdI3B4r.js} +9 -9
  59. package/dist/{dynamicForms-t3vepXqJ.js → dynamic-forms/dynamic-forms.es.js} +24 -19
  60. package/dist/dynamic-forms/styles.css +5 -0
  61. package/dist/dynamic-forms/styles.css.js +1 -0
  62. package/dist/ekyb/ekyb.es.js +1 -1
  63. package/dist/ekyb/styles.css +15 -13
  64. package/dist/ekyb/styles.css.js +1 -0
  65. package/dist/{ekybModule-Dvkf5WAr.js → ekybModule-BRh9D01p.js} +17 -30
  66. package/dist/ekybModule-C5NPsc0F.js +2 -0
  67. package/dist/ekyc/ekyc.es.js +1 -1
  68. package/dist/ekyc/styles.css +17 -16
  69. package/dist/ekyc/styles.css.js +1 -0
  70. package/dist/{ekycModule-C5QXVGP7.js → ekycModule-Da6Bl3jg.js} +14 -29
  71. package/dist/ekycModule-DwKPvgA8.js +2 -0
  72. package/dist/el-BP_RmMeB.js +3041 -0
  73. package/dist/el-GR-9I2fVd-W.js +3041 -0
  74. package/dist/electronic-signature/electronic-signature.es.js +1 -1
  75. package/dist/electronic-signature/styles.css +62 -2
  76. package/dist/electronic-signature/styles.css.js +1 -0
  77. package/dist/{electronic-signature-CyE8F7LZ.js → electronic-signature-KFF7qbid.js} +65 -18
  78. package/dist/email/email.es.js +9 -8
  79. package/dist/email/styles.css.js +1 -0
  80. package/dist/{emailInput-CsT8_C01.js → emailInput-B_qAEKBC.js} +4 -4
  81. package/dist/en-DG-poeSJZ7W.js +3041 -0
  82. package/dist/en-DnIfMNS1.js +3041 -0
  83. package/dist/errorContent-CMNfCIo_.js +58 -0
  84. package/dist/es-2x55EFTs.js +3041 -0
  85. package/dist/es-419-DgAnO5DV.js +3041 -0
  86. package/dist/es-ES-BSnroYMU.js +3041 -0
  87. package/dist/es-MX-CfztSSs4.js +3041 -0
  88. package/dist/et-CPoI8fYI.js +3041 -0
  89. package/dist/{expiredId-BQ1uPh7b.js → expiredId-DJYL_--M.js} +22 -27
  90. package/dist/extensibility.es.js +701 -24
  91. package/dist/fa-IR-CVf6F8GG.js +3041 -0
  92. package/dist/face-match/face-match.es.js +1 -1
  93. package/dist/face-match/styles.css +76 -40
  94. package/dist/face-match/styles.css.js +1 -0
  95. package/dist/{faceMatch-Rf-MMdto.js → faceMatch-CwoYbKBB.js} +7 -8
  96. package/dist/faceMatch-DCkrehin.js +2 -0
  97. package/dist/fi-FI-A4oUFztt.js +3041 -0
  98. package/dist/field-comparison/field-comparison.es.js +1 -1
  99. package/dist/field-comparison/styles.css +12 -0
  100. package/dist/field-comparison/styles.css.js +1 -0
  101. package/dist/{fieldComparison-BnGj3nNp.js → fieldComparison-D2WI5cYb.js} +27 -11
  102. package/dist/fieldComparison-OwqIkMRe.js +2 -0
  103. package/dist/fieldLabelHint-CxjArYkQ.js +16 -0
  104. package/dist/{finalSuccessScreen-B9uB3bST.js → finalSuccessScreen-BtJ5o2pi.js} +13 -14
  105. package/dist/fiscal-qr/fiscal-qr.es.js +22 -9
  106. package/dist/fiscal-qr/styles.css +13 -1
  107. package/dist/fiscal-qr/styles.css.js +1 -0
  108. package/dist/{extensibility-C5XqL_A3.js → flipAnimation-Bb5FQVF-.js} +608 -1005
  109. package/dist/flow/flow.es.js +308 -62
  110. package/dist/flow/shell/styles.css +402 -0
  111. package/dist/flow/shell/styles.css.js +1 -0
  112. package/dist/flow/styles.css +582 -312
  113. package/dist/formField-CBwWQ7wD.js +60 -0
  114. package/dist/fr-CA-CI4CD8PC.js +3045 -0
  115. package/dist/fr-ON88Zj-c.js +3045 -0
  116. package/dist/{front-horizontal-hint-Bhz1rq-w.js → front-horizontal-hint-mgovnJf3.js} +1 -1
  117. package/dist/{front-vertical-hint-C4FC1ksx.js → front-vertical-hint-qXMVdLri.js} +1 -1
  118. package/dist/geolocation/geolocation.es.js +9 -9
  119. package/dist/geolocation/styles.css +4 -4
  120. package/dist/geolocation/styles.css.js +1 -0
  121. package/dist/government-validation/government-validation.es.js +38 -86
  122. package/dist/government-validation/styles.css +2 -38
  123. package/dist/government-validation/styles.css.js +1 -0
  124. package/dist/he-pbmbYdr4.js +3049 -0
  125. package/dist/hi-DUIfQ6FS.js +3041 -0
  126. package/dist/hmn-DL-aQCTc.js +3041 -0
  127. package/dist/{homeScreen-Bv9mUUOF.js → homeScreen-vLMuzGDq.js} +8 -7
  128. package/dist/hr-DfJZSVnR.js +3045 -0
  129. package/dist/ht-DkZi3f0t.js +3041 -0
  130. package/dist/hu-ClhgOpVy.js +3041 -0
  131. package/dist/{icons-ChHV5iHi.js → icons-eIgP34nj.js} +99 -11
  132. package/dist/id/id.es.js +575 -62
  133. package/dist/id/styles.css +114 -45
  134. package/dist/id/styles.css.js +1 -0
  135. package/dist/id-DzyWelEE.js +3035 -0
  136. package/dist/{id-back-of-card-C4XViC7W.js → id-back-of-card-B6EcmiCs.js} +1 -1
  137. package/dist/{id-back-of-card-vertical-DCz0rj8m.js → id-back-of-card-vertical-B3FXhPpj.js} +1 -1
  138. package/dist/{id-front-of-card-CUA1ocVF.js → id-front-of-card-V_BlLaZr.js} +1 -1
  139. package/dist/{id-front-of-card-vertical-Ddm_BwD3.js → id-front-of-card-vertical-CuZjL8kc.js} +1 -1
  140. package/dist/id-ocr/styles.css.js +1 -0
  141. package/dist/id-selfie-flow/id-selfie-flow.es.js +10 -9
  142. package/dist/id-selfie-flow/styles.css +40 -8
  143. package/dist/id-verification/id-verification.es.js +5 -5
  144. package/dist/{idOcr-Da1-2sWY.js → idOcr-C5R3RWuL.js} +13 -16
  145. package/dist/identity-reuse/identity-reuse.es.js +8 -113
  146. package/dist/identity-reuse/styles.css +1 -1
  147. package/dist/{incode-logo-DeIDDejm.js → incode-logo-BzJOZr3f.js} +1 -64
  148. package/dist/{incodeComponent-BtFz-bx2.js → incodeComponent-D3_BSWan.js} +192 -22
  149. package/dist/{incodeModule-9K8KUs61.js → incodeModule-BQgvYKyr.js} +3 -3
  150. package/dist/index.es.js +4 -3
  151. package/dist/{inputComposed-C2zTEXsp.js → inputComposed-CTZnsHLi.js} +9 -9
  152. package/dist/inputComposed-wy0-orhJ.js +1 -0
  153. package/dist/it-D_u7w6N4.js +3041 -0
  154. package/dist/ja-Drh4oAoU.js +3035 -0
  155. package/dist/ja-JP-Pdxq82Pi.js +3035 -0
  156. package/dist/jv-DFcKF0Jp.js +3035 -0
  157. package/dist/ka--2y3Ae63.js +3041 -0
  158. package/dist/kk-CAs7inco.js +3041 -0
  159. package/dist/km-BlxkLYfw.js +3035 -0
  160. package/dist/ko-B1XhW0dx.js +3035 -0
  161. package/dist/ko-KP-DO1TCCY3.js +3035 -0
  162. package/dist/ky-BN92RThU.js +3041 -0
  163. package/dist/lo-DPUo8xJT.js +3035 -0
  164. package/dist/lt-CYBwI4Sq.js +3049 -0
  165. package/dist/lv-eBlwWu05.js +3045 -0
  166. package/dist/{mandatoryConsent-CxShVycM.js → mandatoryConsent-D96_9XTp.js} +10 -7
  167. package/dist/manualCaptureButton-C9H2_SJS.js +63 -0
  168. package/dist/{manualCaptureButton-DzJFIEfu.js → manualCaptureButton-igyQk3Yb.js} +10 -55
  169. package/dist/mk-QMUTND8Y.js +3041 -0
  170. package/dist/mn-CCTUOA1D.js +3041 -0
  171. package/dist/{modal-BH2wi8Q0.js → modal-CmF_MYIK.js} +7 -6
  172. package/dist/{modal.hooks-DcakflQ4.js → modal.hooks-B0Wrc9s2.js} +7 -1
  173. package/dist/ms-BKJgaJfx.js +3035 -0
  174. package/dist/my-DyLbN8b0.js +3035 -0
  175. package/dist/nb-NO-TVHxhuqB.js +3041 -0
  176. package/dist/ne-gBLZraiK.js +3041 -0
  177. package/dist/nl-CrO6Mvej.js +3041 -0
  178. package/dist/{numberedStep-DqtXyT11.js → numberedStep-DYznpDKc.js} +1 -1
  179. package/dist/{optionAccessibleLabel-C5iZCrlq.js → optionAccessibleLabel-CqBUOBxK.js} +6 -6
  180. package/dist/{otpInput-CvPR3ZpP.js → otpInput-tEovwPs7.js} +8 -83
  181. package/dist/{passport-horizontal-hint-DzkhjC8Q.js → passport-horizontal-hint-6Ghn2EEN.js} +1 -1
  182. package/dist/{passport-vertical-hint-Bd0BQn2Y.js → passport-vertical-hint-UPFFpdf4.js} +1 -1
  183. package/dist/passwordInputComposed-DNlYgHHW.js +74 -0
  184. package/dist/{pdf-BUoY_2gv.js → pdf-CFubyG0B.js} +1 -1
  185. package/dist/{pdfViewer-TTZmPABh.js → pdfViewer-4u14PDPr.js} +4 -4
  186. package/dist/pdfViewer-e2o97yIv.js +2 -0
  187. package/dist/{manualCaptureButton-D58WsS-x.js → permissions-DowRodJj.js} +200 -105
  188. package/dist/phone/phone.es.js +10 -9
  189. package/dist/phone/styles.css +1 -1
  190. package/dist/phone/styles.css.js +1 -0
  191. package/dist/{phoneInputComposed-byyszNoS.js → phoneInputComposed-B6sv-uB2.js} +20 -8412
  192. package/dist/pl-Bde7cCcc.js +3049 -0
  193. package/dist/{processing-B2eaSGLu.js → processing-s6GfNwuL.js} +2 -2
  194. package/dist/pt-BR-DFr2fPNi.js +3041 -0
  195. package/dist/pt-DhDCeOLY.js +3041 -0
  196. package/dist/pt-PT-CpiPMuNf.js +3041 -0
  197. package/dist/qe-signature/qe-signature.es.js +4 -4
  198. package/dist/radioGroupComposed-CJkzLiFc.js +1 -0
  199. package/dist/{radioGroupComposed-DQzTWutW.js → radioGroupComposed-DmoMukus.js} +15 -71
  200. package/dist/redirect-to-mobile/redirect-to-mobile.es.js +34 -178
  201. package/dist/redirect-to-mobile/styles.css +2 -27
  202. package/dist/redirect-to-mobile/styles.css.js +1 -0
  203. package/dist/{registerIncodeElement-DW2PE_DX.js → registerIncodeElement-CbZczi4S.js} +1 -1
  204. package/dist/resendTimer-Cskll9rx.js +79 -0
  205. package/dist/{useModuleLoader-DxOEZ0vn.js → resolveApiKey-CB1_7ISm.js} +70 -222
  206. package/dist/{richText-CEwM8jib.js → richText-C8-Ny2SD.js} +9 -9
  207. package/dist/ro-B_ITJxYh.js +3045 -0
  208. package/dist/ru-Cg4U-rYv.js +3049 -0
  209. package/dist/ru-RU-fR_tbAfz.js +3049 -0
  210. package/dist/selfie/selfie.es.js +184 -8
  211. package/dist/selfie/styles.css +225 -36
  212. package/dist/selfie/styles.css.js +1 -0
  213. package/dist/signature/signature.es.js +8 -9
  214. package/dist/signature/styles.css.js +1 -0
  215. package/dist/sk-DbraxlnX.js +3049 -0
  216. package/dist/sl-DXgvmUsz.js +3049 -0
  217. package/dist/smsTabContent-Dado9q8t.js +172 -0
  218. package/dist/so-HI13bXme.js +3041 -0
  219. package/dist/{spacer-DLEDuWEx.js → spacer-ayyj5lMa.js} +10 -10
  220. package/dist/spinner-Z-5sEEDQ.js +88 -0
  221. package/dist/sr-DAb2JkvB.js +3045 -0
  222. package/dist/sr-Latn-DzSc6KyA.js +3045 -0
  223. package/dist/sr-YU-C9HskKa8.js +3045 -0
  224. package/dist/{statusPage-BF4qGjF3.js → statusPage-Bqz3Ci4f.js} +4 -4
  225. package/dist/sv-SE-B3X2fvQj.js +3041 -0
  226. package/dist/sw-BVL9Boua.js +3041 -0
  227. package/dist/{tabs-BGL1oRLb.js → tabs-B-ERCzA4.js} +2 -2
  228. package/dist/th-Cq87oDI8.js +3035 -0
  229. package/dist/th-TH-CY5gd6Bd.js +3035 -0
  230. package/dist/themes/dark.css +125 -0
  231. package/dist/themes/light.css +124 -0
  232. package/dist/tl-DUm9tRZ_.js +3041 -0
  233. package/dist/tl-PH-CNYNkY1M.js +3041 -0
  234. package/dist/tr-Cg3WJqb6.js +3041 -0
  235. package/dist/{tutorial-LQuJ4dse.js → tutorial-CHNfV-I3.js} +40 -226
  236. package/dist/types/certificate-issuance.d.ts +4 -4
  237. package/dist/types/dynamic-forms.d.ts +177 -0
  238. package/dist/types/extensibility.d.ts +75 -23
  239. package/dist/types/flow.d.ts +37 -0
  240. package/dist/types/government-validation.d.ts +2 -1
  241. package/dist/types/index.d.ts +28 -4
  242. package/dist/types/video-selfie.d.ts +6 -161
  243. package/dist/typography-ikD4-Z8S.js +53 -0
  244. package/dist/{uiConfig-Dqnjankd.js → uiConfig-C1jdTj-i.js} +184 -8
  245. package/dist/uk-C7hhE-77.js +3049 -0
  246. package/dist/uk-UA-DRsynQ5S.js +3049 -0
  247. package/dist/ur-BEX50SCe.js +3041 -0
  248. package/dist/useCoverMedia-VLw3OYN_.js +149 -0
  249. package/dist/useModuleLoader-DpcbSKBH.js +176 -0
  250. package/dist/uz-BYlUXaIK.js +3041 -0
  251. package/dist/{vendor-preact-BPXMFRom.js → vendor-preact-C0jX1Cbq.js} +68 -181
  252. package/dist/{verificationResult-q_zD_Pxh.js → verificationResult-B26DDXFT.js} +32 -25
  253. package/dist/vi-DddAM-WF.js +3035 -0
  254. package/dist/video-selfie/styles.css +51 -17
  255. package/dist/video-selfie/styles.css.js +1 -0
  256. package/dist/video-selfie/video-selfie.es.js +35 -23
  257. package/dist/watchlist/watchlist.es.js +7 -7
  258. package/dist/watchlist-for-business/styles.css.js +1 -0
  259. package/dist/{watchlistForBusiness-C_zqdY4P.js → watchlistForBusiness-o4F6Czxp.js} +28 -16
  260. package/dist/workflow/styles.css +1073 -356
  261. package/dist/workflow/workflow.es.js +17 -15
  262. package/dist/zh-CN-B8y9prPe.js +3035 -0
  263. package/dist/zh-HANT-ChrXbHBA.js +3035 -0
  264. package/dist/zh-TW-DrkMIR_e.js +3035 -0
  265. package/dist/zh-aG_wPYUs.js +3035 -0
  266. package/package.json +32 -22
  267. package/dist/bottomSheet-BWEUBq8m.js +0 -38
  268. package/dist/dateInputComposed-BGC37jC7.js +0 -1
  269. package/dist/documentCapture-CO9kIxru.js +0 -2
  270. package/dist/dropdownComposed-Bf4EcKFw.js +0 -1
  271. package/dist/ekybModule-uN0ComAn.js +0 -2
  272. package/dist/ekycModule-B7KRJ7l3.js +0 -2
  273. package/dist/faceMatch-DjD2hgBp.js +0 -2
  274. package/dist/fieldComparison-DFH4hUM_.js +0 -2
  275. package/dist/inputComposed-kKtrvJU5.js +0 -1
  276. package/dist/pdfViewer-C1B-07Wu.js +0 -2
  277. package/dist/requiredLabelHint-Dx0WS2cR.js +0 -17
  278. package/dist/snackbar-eBOj46AK.js +0 -16
  279. package/dist/spinner-CJCOHUKx.js +0 -95
  280. package/dist/successIcon-DS8BLsgy.js +0 -30
  281. package/dist/types/dynamic-forms/styles.d.ts +0 -1
  282. /package/dist/{aligndevicelottie-CfoZ5Uus.js → aligndevicelottie-B12hbVhG.js} +0 -0
  283. /package/dist/{back-tutorial-BHyRHyET.js → back-tutorial-XdmQ0Wml.js} +0 -0
  284. /package/dist/{backdevicelottie-yKkczgFy.js → backdevicelottie-m_DOD8xE.js} +0 -0
  285. /package/dist/{blurdevicelottie-8BbophdM.js → blurdevicelottie-DQo_hTMD.js} +0 -0
  286. /package/dist/{browser-ponyfill-CBjGwwPW.js → browser-ponyfill-ZkeBm4ji.js} +0 -0
  287. /package/dist/{defineProperty-BbpBna-2.js → defineProperty-BojnCa44.js} +0 -0
  288. /package/dist/{flip-animation-CvN8FLNc.js → flip-animation-VicedlT5.js} +0 -0
  289. /package/dist/{frontdevicelottie-CFcahVLk.js → frontdevicelottie-CyIerlMv.js} +0 -0
  290. /package/dist/{glaredevicelottie-Cnvah0kz.js → glaredevicelottie-QM2C6Ivp.js} +0 -0
  291. /package/dist/{id-laser-h-BaUHzX-d.js → id-laser-h-B0-iXcvl.js} +0 -0
  292. /package/dist/{id-laser-v-Dv9yEYJE.js → id-laser-v-Bqh6vimi.js} +0 -0
  293. /package/dist/{id-tutorial-BOOsXlAJ.js → id-tutorial-IhmAzrIF.js} +0 -0
  294. /package/dist/{lottie_light-Bv56F2Ae.js → lottie_light-CzZ3CHBk.js} +0 -0
  295. /package/dist/{passport-tutorial-CeSup6m9.js → passport-tutorial-61vlloJS.js} +0 -0
  296. /package/dist/{selfieTutorial-CYa8bq6B.js → selfieTutorial-BRQ2QNxQ.js} +0 -0
@@ -1,729 +1,21 @@
1
- import { a as useTranslation } from "./uiConfig-Dqnjankd.js";
2
- import { C as k, a as D, c as z, d as T, f as _, g as q, l as A, o as P, p as d, v as y, y as u } from "./vendor-preact-BPXMFRom.js";
3
- import { d as usePresence, f as useTimeoutHandle, l as TransitionSpinner, m as useEventListener, o as Page, p as useResizeObserver, u as useFeatureManagement } from "./incodeComponent-BtFz-bx2.js";
4
- import { a as useAnimationData, d as cn, r as AnimatedAsset, t as Spacer } from "./spacer-DLEDuWEx.js";
5
- import { n as Title, t as Spinner } from "./spinner-CJCOHUKx.js";
6
- import { n as ErrorIcon, r as Button } from "./incode-logo-DeIDDejm.js";
7
- import "./processing-B2eaSGLu.js";
8
- import { _ as CalendarIcon, c as EllipseIcon, h as CaptureButtonIcon, i as HelpIcon, o as EyeOffIcon, r as LockIcon, s as EyeIcon, t as SvgLightningIcon, u as ChevronRightIcon } from "./icons-ChHV5iHi.js";
9
- import { t as SuccessIcon } from "./successIcon-DS8BLsgy.js";
10
- import { t as Modal } from "./modal-BH2wi8Q0.js";
11
- import { r as BaseTutorial } from "./tutorial-LQuJ4dse.js";
12
- import "./verificationResult-q_zD_Pxh.js";
13
- import "./connectionError-BurQq_4R.js";
14
- import { t as InputComposed } from "./inputComposed-C2zTEXsp.js";
15
- import "./inputComposed-kKtrvJU5.js";
16
- import "./otpInput-CvPR3ZpP.js";
17
- import "./checkbox-FGA-Ij-D.js";
18
- import "./radioGroupComposed-DQzTWutW.js";
19
- import "./phoneInputComposed-byyszNoS.js";
20
- import "./dropdownComposed-Bf4EcKFw.js";
21
- import "./dateInputComposed-BGC37jC7.js";
22
- import "./bottomSheet-BWEUBq8m.js";
23
- import { a as CameraView, i as usePreloadCaptureAnimations, n as CaptureNotification, o as CameraFrame } from "./manualCaptureButton-DzJFIEfu.js";
24
- import "./manualCaptureButton-D58WsS-x.js";
25
- import { n as RedStrikeIcon, t as ExpiredId } from "./expiredId-BQ1uPh7b.js";
26
- import { getDeviceClass } from "@incodetech/core/device";
1
+ import { o as useTranslation } from "./uiConfig-C1jdTj-i.js";
2
+ import { S as k, _ as y, a as P, c as A, d as _, f as d, h as q, i as D, s as z, u as T, v as u } from "./vendor-preact-C0jX1Cbq.js";
3
+ import { c as Page, d as TransitionSpinner, f as useFeatureManagement, g as useEventListener, h as useResizeObserver, m as useTimeoutHandle, p as usePresence } from "./incodeComponent-D3_BSWan.js";
4
+ import { a as useAnimationData, d as cn, r as AnimatedAsset, t as Spacer } from "./spacer-ayyj5lMa.js";
5
+ import { o as TypographyP, r as TypographyH3, t as Title } from "./typography-ikD4-Z8S.js";
6
+ import { t as Spinner } from "./spinner-Z-5sEEDQ.js";
7
+ import { a as LockIcon, f as ChevronRightIcon, t as SvgLightningIcon, x as Button } from "./icons-eIgP34nj.js";
8
+ import { t as Modal } from "./modal-CmF_MYIK.js";
9
+ import { n as ProgressBar, t as CaptureFooter } from "./captureFooter-DWCaAdIU.js";
10
+ import { n as getCountryDisplayName, t as countryFlagEmoji } from "./countries-5e8kwG_m.js";
11
+ import { n as CameraFrame, t as CameraView } from "./cameraView-DrTBPNWX.js";
12
+ import { n as CameraOverlay, t as CameraOverlayHeader } from "./cameraOverlayHeader-CsokPtuL.js";
13
+ import { t as BaseTutorial } from "./baseTutorial-DkL0vjUa.js";
14
+ import { n as RedStrikeIcon, t as ExpiredId } from "./expiredId-DJYL_--M.js";
15
+ import { i as usePreloadCaptureAnimations, n as CaptureNotification } from "./manualCaptureButton-igyQk3Yb.js";
27
16
  import { eventModuleNames, recordExperimentAssignmentOnce } from "@incodetech/core/events";
28
- import { ONBOARDING_WEB_SDK_PARAMETER_STORE, booleanParam, defineExperimentParams, resolveExperiment } from "@incodetech/core/feature-management";
17
+ import { ONBOARDING_WEB_SDK_PARAMETER_STORE, booleanParam, defineExperimentParams, enumParam, numberParam, resolveExperiment } from "@incodetech/core/feature-management";
29
18
  import "@incodetech/core/id";
30
- //#region src/shared/overlay/overlay.tsx
31
- var Overlay = ({ children, "aria-labelledby": ariaLabelledBy, class: className }) => {
32
- return /* @__PURE__ */ u("div", {
33
- class: `IncodeOverlay ${className ?? ""}`,
34
- role: "dialog",
35
- "aria-modal": "true",
36
- "aria-labelledby": ariaLabelledBy,
37
- children: /* @__PURE__ */ u("div", {
38
- class: "IncodeOverlayContainer",
39
- children: /* @__PURE__ */ u("div", {
40
- class: "IncodeOverlayBody",
41
- children
42
- })
43
- })
44
- });
45
- };
46
- //#endregion
47
- //#region src/shared/progressBar/progressBar.tsx
48
- var ProgressBar = ({ progress, label, className, labelledById }) => /* @__PURE__ */ u("div", {
49
- class: cn("IncodeProgressBarContainer", className),
50
- children: [/* @__PURE__ */ u("div", {
51
- class: "IncodeProgressBar",
52
- role: "progressbar",
53
- "aria-valuenow": progress,
54
- "aria-valuemin": 0,
55
- "aria-valuemax": 100,
56
- "aria-label": labelledById ? void 0 : label,
57
- "aria-labelledby": labelledById,
58
- children: /* @__PURE__ */ u("div", {
59
- class: "IncodeProgressBarFill",
60
- style: { width: `${progress}%` }
61
- })
62
- }), label ? /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u(Spacer, { size: 24 }), /* @__PURE__ */ u("p", {
63
- class: "IncodeProgressBarLabel",
64
- children: label
65
- })] }) : null]
66
- });
67
- //#endregion
68
- //#region src/shared/passwordInputComposed/passwordInputComposed.tsx
69
- var PasswordInputComposed = D(({ id, value, class: className, invalid, showPasswordAriaLabel, hidePasswordAriaLabel, defaultVisible = false, requirementsHeading, requirements = [], requirementMetLabel, requirementUnmetLabel, ...restProps }, ref) => {
70
- const [visible, setVisible] = d(defaultVisible);
71
- const hasValue = !!(value && String(value).length > 0);
72
- const allMet = requirements.every((requirement) => requirement.met);
73
- const showRequirementsError = hasValue && requirements.length > 0 && !allMet;
74
- const requirementsHeadingId = `${id}-requirements-heading`;
75
- return /* @__PURE__ */ u("div", {
76
- class: cn("IncodePasswordInputComposed", className),
77
- children: [/* @__PURE__ */ u(InputComposed, {
78
- ...restProps,
79
- id,
80
- ref,
81
- value,
82
- type: visible ? "text" : "password",
83
- invalid: showRequirementsError || invalid,
84
- rightIcon: /* @__PURE__ */ u("button", {
85
- type: "button",
86
- class: "IncodePasswordInputComposedToggle",
87
- "aria-label": visible ? hidePasswordAriaLabel : showPasswordAriaLabel,
88
- "aria-pressed": visible,
89
- "aria-controls": id,
90
- "data-testid": `${id}-toggle-visibility`,
91
- onClick: () => setVisible((currentlyVisible) => !currentlyVisible),
92
- children: visible ? /* @__PURE__ */ u(EyeOffIcon, { size: 24 }) : /* @__PURE__ */ u(EyeIcon, { size: 24 })
93
- })
94
- }), requirements.length > 0 && /* @__PURE__ */ u("div", {
95
- class: "IncodePasswordInputComposedRequirements",
96
- children: [requirementsHeading && /* @__PURE__ */ u("p", {
97
- id: requirementsHeadingId,
98
- class: "IncodePasswordInputComposedRequirementsHeading",
99
- "data-invalid": showRequirementsError,
100
- "data-testid": requirementsHeadingId,
101
- children: [showRequirementsError && /* @__PURE__ */ u("span", {
102
- class: "IncodePasswordInputComposedRequirementsHeadingIcon",
103
- "aria-hidden": "true",
104
- children: /* @__PURE__ */ u(ErrorIcon, { size: 16 })
105
- }), requirementsHeading]
106
- }), /* @__PURE__ */ u("ul", {
107
- class: "IncodePasswordInputComposedRequirementsList",
108
- "aria-live": "polite",
109
- "aria-labelledby": requirementsHeading ? requirementsHeadingId : void 0,
110
- "data-testid": `${id}-requirements`,
111
- children: requirements.map(({ key, label, met }) => /* @__PURE__ */ u("li", {
112
- class: "IncodePasswordInputComposedRequirement",
113
- "data-met": met,
114
- "data-testid": `${id}-requirement-${key}`,
115
- children: [
116
- /* @__PURE__ */ u("span", {
117
- "aria-hidden": "true",
118
- class: "IncodePasswordInputComposedRequirementIcon",
119
- children: met ? /* @__PURE__ */ u(SuccessIcon, { size: 16 }) : /* @__PURE__ */ u(EllipseIcon, { size: 16 })
120
- }),
121
- /* @__PURE__ */ u("span", {
122
- class: "IncodePasswordInputComposedRequirementLabel",
123
- children: label
124
- }),
125
- (requirementMetLabel || requirementUnmetLabel) && /* @__PURE__ */ u("span", {
126
- class: "IncodeSrOnly",
127
- children: met ? requirementMetLabel : requirementUnmetLabel
128
- })
129
- ]
130
- }, key))
131
- })]
132
- })]
133
- });
134
- });
135
- //#endregion
136
- //#region src/shared/segmentedDateInput/segmentedDateInput.tsx
137
- /**
138
- * ⚠️ EXPERIMENTAL — DO NOT USE IN FORMS.
139
- *
140
- * This component is an in-progress alternative to `DateInputComposed` that
141
- * renders mm/dd/yyyy as three independent segments. It is not production-ready
142
- * and is intentionally not wired into any form module (curp-validation,
143
- * custom-fields, dynamic-forms, ekyc, etc.). Those forms must continue to use
144
- * `DateInputComposed` (native `<input type="date">`).
145
- *
146
- * Kept here for ongoing iteration and external preview only.
147
- */
148
- var ISO_DATE_RE = /^(\d{4})-(\d{2})-(\d{2})$/;
149
- var US_DATE_RE = /^(\d{1,2})\/(\d{1,2})\/(\d{4})$/;
150
- var EMPTY_SEGMENTS = {
151
- mm: "",
152
- dd: "",
153
- yyyy: ""
154
- };
155
- var parseISO = (value) => {
156
- if (!value) return EMPTY_SEGMENTS;
157
- const m = ISO_DATE_RE.exec(value);
158
- if (!m) return EMPTY_SEGMENTS;
159
- return {
160
- yyyy: m[1],
161
- mm: m[2],
162
- dd: m[3]
163
- };
164
- };
165
- var isValidDate = (yyyy, mm, dd) => {
166
- if (yyyy < 1 || mm < 1 || mm > 12 || dd < 1 || dd > 31) return false;
167
- const date = new Date(yyyy, mm - 1, dd);
168
- return date.getFullYear() === yyyy && date.getMonth() === mm - 1 && date.getDate() === dd;
169
- };
170
- /**
171
- * Number of days in the (potentially partial) MM/YYYY combination. Falls back
172
- * to a non-leap year (any year not divisible by 4) when the year is unknown
173
- * or incomplete, so February can never accept 30 or 31 once the month is set.
174
- */
175
- var getDaysInMonth = (mm, yyyy) => {
176
- const m = Number(mm);
177
- if (!Number.isFinite(m) || m < 1 || m > 12) return 31;
178
- const y = Number(yyyy);
179
- const referenceYear = Number.isFinite(y) && y > 0 && yyyy.length === 4 ? y : 2001;
180
- return new Date(referenceYear, m, 0).getDate();
181
- };
182
- var segmentsToISO = ({ mm, dd, yyyy }) => {
183
- if (yyyy.length !== 4 || mm.length === 0 || dd.length === 0) return "";
184
- const Y = Number(yyyy);
185
- const M = Number(mm);
186
- const D = Number(dd);
187
- if (!isValidDate(Y, M, D)) return "";
188
- return `${yyyy}-${String(M).padStart(2, "0")}-${String(D).padStart(2, "0")}`;
189
- };
190
- /**
191
- * Compute the segment order for a given locale via Intl.DateTimeFormat —
192
- * e.g. en-US → ['mm','dd','yyyy'], en-GB / de / es → ['dd','mm','yyyy'],
193
- * ja / ko / zh / ISO → ['yyyy','mm','dd']. Always falls back to US ordering
194
- * if the locale is unknown or Intl returns something unexpected.
195
- */
196
- var getSegmentOrder = (locale) => {
197
- try {
198
- const parts = new Intl.DateTimeFormat(locale || void 0).formatToParts(new Date(2e3, 0, 15));
199
- const order = [];
200
- for (const part of parts) if (part.type === "year") order.push("yyyy");
201
- else if (part.type === "month") order.push("mm");
202
- else if (part.type === "day") order.push("dd");
203
- if (order.length === 3 && new Set(order).size === 3) return order;
204
- } catch {}
205
- return [
206
- "mm",
207
- "dd",
208
- "yyyy"
209
- ];
210
- };
211
- /** Build next/previous navigation maps from a concrete segment order. */
212
- var buildNavMaps = (order) => {
213
- const next = {
214
- mm: null,
215
- dd: null,
216
- yyyy: null
217
- };
218
- const prev = {
219
- mm: null,
220
- dd: null,
221
- yyyy: null
222
- };
223
- order.forEach((key, i) => {
224
- next[key] = order[i + 1] ?? null;
225
- prev[key] = order[i - 1] ?? null;
226
- });
227
- return {
228
- next,
229
- prev
230
- };
231
- };
232
- var SEGMENT_RANGES = {
233
- mm: {
234
- min: 1,
235
- max: 12,
236
- pad: 2
237
- },
238
- dd: {
239
- min: 1,
240
- max: 31,
241
- pad: 2
242
- },
243
- yyyy: {
244
- min: 1,
245
- max: 9999,
246
- pad: 4
247
- }
248
- };
249
- /**
250
- * Largest digit that can still be the *first* of a valid two-digit value for
251
- * each segment. Anything above this means the user typed a digit that can't
252
- * start a valid 2-digit value (e.g. `3` in MM — there's no valid month from
253
- * 30 to 39), so we commit it as a zero-padded single digit and auto-advance.
254
- *
255
- * mm: max 12 → first digit 0, 1 are still ambiguous; 2–9 commit immediately
256
- * dd: max 31 → first digit 0, 1, 2, 3 are still ambiguous; 4–9 commit
257
- * yyyy: any first digit is fine, never auto-commit early
258
- */
259
- var SEGMENT_MAX_AMBIGUOUS_FIRST_DIGIT = {
260
- mm: 1,
261
- dd: 3,
262
- yyyy: 9
263
- };
264
- var padSegment = (key, n) => String(n).padStart(SEGMENT_RANGES[key].pad, "0");
265
- /**
266
- * Increment / decrement a segment value, wrapping at the segment's range.
267
- * Empty segments default sensibly: ArrowUp on empty starts at the min value
268
- * (or current year for `yyyy`); ArrowDown starts at the max.
269
- *
270
- * Mirrors the keyboard model of native <input type="date"> and React Aria's
271
- * `DateField`, without the `role="spinbutton"` that would re-introduce the
272
- * "9.1 percent" screen reader announcement on empty segments.
273
- */
274
- var stepSegment = (key, currentValue, direction) => {
275
- const { min, max } = SEGMENT_RANGES[key];
276
- if (currentValue === "") {
277
- if (key === "yyyy") return padSegment(key, (/* @__PURE__ */ new Date()).getFullYear());
278
- return padSegment(key, direction === 1 ? min : max);
279
- }
280
- const n = Number(currentValue);
281
- if (Number.isNaN(n)) return padSegment(key, min);
282
- let next = n + direction;
283
- if (next > max) next = min;
284
- if (next < min) next = max;
285
- return padSegment(key, next);
286
- };
287
- /**
288
- * ⚠️ Experimental — do not use in forms.
289
- *
290
- * Use `DateInputComposed` instead. See the file-level note at the top of this
291
- * module for context.
292
- *
293
- * @experimental
294
- */
295
- var SegmentedDateInput = D(({ id, label, labelHint, "aria-label": ariaLabel, error, showErrorIcon, helper, showHelperIcon, required, suppressMessages = false, class: className, value, onInput, disabled, min, max, name, autocomplete: autocompleteAttr, autoComplete, ...restProps }, ref) => {
296
- const { i18n } = useTranslation();
297
- const segmentOrder = T(() => getSegmentOrder(i18n.language), [i18n.language]);
298
- const navMaps = T(() => buildNavMaps(segmentOrder), [segmentOrder]);
299
- const autocompleteValue = typeof autoComplete === "string" ? autoComplete : typeof autocompleteAttr === "string" ? autocompleteAttr : void 0;
300
- /**
301
- * Map the consumer-supplied autocomplete to per-segment + hidden-input
302
- * tokens. The HTML spec defines `bday-day` / `bday-month` / `bday-year`
303
- * for separate fields, paired with `bday` on a full-date input. Anything
304
- * else passes through unchanged. Default is "off" so the browser doesn't
305
- * suggest random history entries on individual numeric segments.
306
- */
307
- const getSegmentAutocomplete = (key) => {
308
- if (!autocompleteValue) return "off";
309
- if (autocompleteValue === "bday") return key === "mm" ? "bday-month" : key === "dd" ? "bday-day" : "bday-year";
310
- return autocompleteValue;
311
- };
312
- const hiddenAutocomplete = autocompleteValue ?? void 0;
313
- const hiddenRef = A(null);
314
- const iconButtonRef = A(null);
315
- const segmentRefs = {
316
- mm: A(null),
317
- dd: A(null),
318
- yyyy: A(null)
319
- };
320
- const [segments, setSegments] = d(() => parseISO(value));
321
- y(() => {
322
- setSegments((curr) => {
323
- if (segmentsToISO(curr) === (value ?? "")) return curr;
324
- return parseISO(value);
325
- });
326
- }, [value]);
327
- y(() => {
328
- const hidden = hiddenRef.current;
329
- if (!hidden) return;
330
- const next = value ?? "";
331
- if (hidden.value !== next) hidden.value = next;
332
- }, [value]);
333
- const setHiddenRef = (el) => {
334
- hiddenRef.current = el;
335
- if (typeof ref === "function") ref(el);
336
- else if (ref) ref.current = el;
337
- };
338
- const labelId = `${id}-label`;
339
- const helperId = `${id}-helper`;
340
- const errorId = `${id}-error`;
341
- const formatHintId = `${id}-format-hint`;
342
- const formatHintText = T(() => {
343
- const labels = {
344
- mm: "month",
345
- dd: "day",
346
- yyyy: "year"
347
- };
348
- return `Date format: ${segmentOrder.map((k) => labels[k]).join(", ")}.`;
349
- }, [segmentOrder]);
350
- const describedByIds = [
351
- formatHintId,
352
- !suppressMessages && helper ? helperId : null,
353
- !suppressMessages && error ? errorId : null
354
- ].filter(Boolean).join(" ");
355
- const fireOnInput = (next) => {
356
- const iso = segmentsToISO(next);
357
- const hidden = hiddenRef.current;
358
- if (hidden) hidden.value = iso;
359
- const event = new Event("input", { bubbles: true });
360
- Object.defineProperty(event, "target", {
361
- value: hidden,
362
- enumerable: true,
363
- configurable: true
364
- });
365
- onInput(event);
366
- };
367
- const writeSegment = (key, val) => {
368
- let next = {
369
- ...segments,
370
- [key]: val
371
- };
372
- if (next.dd && next.mm) {
373
- const days = getDaysInMonth(next.mm, next.yyyy);
374
- const ddNum = Number(next.dd);
375
- if (Number.isFinite(ddNum) && ddNum > days) next = {
376
- ...next,
377
- dd: padSegment("dd", days)
378
- };
379
- }
380
- setSegments(next);
381
- fireOnInput(next);
382
- };
383
- const focusSegment = (key) => {
384
- if (!key) return;
385
- const el = segmentRefs[key].current;
386
- if (!el) return;
387
- el.focus();
388
- const len = el.value.length;
389
- try {
390
- el.setSelectionRange(len, len);
391
- } catch {}
392
- };
393
- const handleSegmentInput = (key, maxLen) => (e) => {
394
- const target = e.target;
395
- let sanitized = target.value.replace(/\D/g, "").slice(0, maxLen);
396
- let shouldAdvance = false;
397
- if (sanitized.length === 1 && Number(sanitized) > SEGMENT_MAX_AMBIGUOUS_FIRST_DIGIT[key]) {
398
- sanitized = padSegment(key, Number(sanitized));
399
- shouldAdvance = true;
400
- }
401
- if (sanitized.length === maxLen) {
402
- const n = Number(sanitized);
403
- const { max } = SEGMENT_RANGES[key];
404
- if (Number.isFinite(n) && n > max) sanitized = padSegment(key, max);
405
- shouldAdvance = true;
406
- }
407
- if (sanitized !== target.value) target.value = sanitized;
408
- writeSegment(key, sanitized);
409
- if (shouldAdvance) focusSegment(navMaps.next[key]);
410
- };
411
- const handleSegmentKeyDown = (key) => (e) => {
412
- const target = e.target;
413
- const caret = target.selectionStart ?? 0;
414
- if (e.key === "ArrowUp" || e.key === "ArrowDown") {
415
- e.preventDefault();
416
- const direction = e.key === "ArrowUp" ? 1 : -1;
417
- const nextVal = stepSegment(key, target.value, direction);
418
- target.value = nextVal;
419
- writeSegment(key, nextVal);
420
- try {
421
- target.select();
422
- } catch {}
423
- } else if (e.key === "Backspace" && target.value === "" && caret === 0) {
424
- e.preventDefault();
425
- focusSegment(navMaps.prev[key]);
426
- } else if (e.key === "ArrowLeft" && caret === 0) {
427
- e.preventDefault();
428
- focusSegment(navMaps.prev[key]);
429
- } else if (e.key === "ArrowRight" && caret === target.value.length) {
430
- e.preventDefault();
431
- focusSegment(navMaps.next[key]);
432
- } else if (e.key === "/" || e.key === "-" || e.key === " ") if (target.value.length > 0) {
433
- e.preventDefault();
434
- focusSegment(navMaps.next[key]);
435
- } else e.preventDefault();
436
- };
437
- const handleSegmentBlur = (key, padTo) => (e) => {
438
- const v = e.target.value;
439
- if (!v) return;
440
- let normalized = v.padStart(padTo, "0");
441
- const n = Number(normalized);
442
- const { min, max } = SEGMENT_RANGES[key];
443
- if (Number.isFinite(n)) {
444
- if (n < min) normalized = padSegment(key, min);
445
- else if (n > max) normalized = padSegment(key, max);
446
- }
447
- if (normalized !== v) writeSegment(key, normalized);
448
- };
449
- const handleSegmentFocus = (e) => {
450
- const target = e.target;
451
- try {
452
- target.select();
453
- } catch {}
454
- };
455
- const handlePaste = (e) => {
456
- const text = e.clipboardData?.getData("text")?.trim() ?? "";
457
- if (!text) return;
458
- const iso = ISO_DATE_RE.exec(text);
459
- const us = US_DATE_RE.exec(text);
460
- let next = null;
461
- if (iso) next = {
462
- yyyy: iso[1],
463
- mm: iso[2],
464
- dd: iso[3]
465
- };
466
- else if (us) next = {
467
- mm: us[1].padStart(2, "0"),
468
- dd: us[2].padStart(2, "0"),
469
- yyyy: us[3]
470
- };
471
- if (next) {
472
- e.preventDefault();
473
- setSegments(next);
474
- fireOnInput(next);
475
- focusSegment("yyyy");
476
- }
477
- };
478
- const handleHiddenChange = (e) => {
479
- const target = e.target;
480
- setSegments(parseISO(target.value));
481
- onInput(e);
482
- const iconBtn = iconButtonRef.current;
483
- if (iconBtn && document.activeElement === target) try {
484
- iconBtn.focus();
485
- } catch {}
486
- };
487
- const handleIconClick = (e) => {
488
- if (disabled) {
489
- e.preventDefault();
490
- return;
491
- }
492
- const hidden = hiddenRef.current;
493
- if (!hidden) return;
494
- try {
495
- hidden.click();
496
- } catch {}
497
- try {
498
- if (typeof hidden.showPicker === "function") hidden.showPicker();
499
- } catch {}
500
- };
501
- const hasValue = !!segmentsToISO(segments);
502
- const isInvalid = !!error;
503
- const groupLabelProps = label ? { "aria-labelledby": labelId } : ariaLabel ? { "aria-label": ariaLabel } : {};
504
- const SEGMENT_META = {
505
- mm: {
506
- maxLen: 2,
507
- placeholder: "MM",
508
- ariaLabel: "Month"
509
- },
510
- dd: {
511
- maxLen: 2,
512
- placeholder: "DD",
513
- ariaLabel: "Day"
514
- },
515
- yyyy: {
516
- maxLen: 4,
517
- placeholder: "YYYY",
518
- ariaLabel: "Year"
519
- }
520
- };
521
- const renderSegment = (key) => {
522
- const { maxLen, placeholder, ariaLabel: segAriaLabel } = SEGMENT_META[key];
523
- return /* @__PURE__ */ u("input", {
524
- ref: (el) => {
525
- segmentRefs[key].current = el;
526
- },
527
- id: `${id}-${key}`,
528
- class: cn("IncodeSegmentedDateInputSegment", `IncodeSegmentedDateInputSegment--${key}`),
529
- type: "text",
530
- inputMode: "numeric",
531
- autoComplete: getSegmentAutocomplete(key),
532
- autoCorrect: "off",
533
- spellcheck: false,
534
- maxLength: maxLen,
535
- size: maxLen,
536
- placeholder,
537
- "aria-label": segAriaLabel,
538
- "aria-required": required ? "true" : void 0,
539
- "aria-invalid": isInvalid ? "true" : void 0,
540
- value: segments[key],
541
- disabled,
542
- "data-testid": `${id}-${key}`,
543
- onInput: handleSegmentInput(key, maxLen),
544
- onKeyDown: handleSegmentKeyDown(key),
545
- onBlur: handleSegmentBlur(key, maxLen),
546
- onFocus: handleSegmentFocus,
547
- onPaste: handlePaste
548
- });
549
- };
550
- return /* @__PURE__ */ u("div", {
551
- class: cn("IncodeInputComposed IncodeSegmentedDateInput", className),
552
- children: [
553
- label && /* @__PURE__ */ u("label", {
554
- id: labelId,
555
- class: "IncodeInputComposedLabel",
556
- htmlFor: `${id}-${segmentOrder[0]}`,
557
- "data-testid": `${id}-label`,
558
- children: [label, labelHint && /* @__PURE__ */ u("span", {
559
- class: "IncodeInputComposedLabelHint",
560
- "data-testid": `${id}-label-hint`,
561
- children: labelHint
562
- })]
563
- }),
564
- /* @__PURE__ */ u("div", {
565
- class: "IncodeInputComposedWrapper",
566
- children: [
567
- /* @__PURE__ */ u("div", {
568
- role: "group",
569
- class: cn("IncodeSegmentedDateInputField", isInvalid && "IncodeSegmentedDateInputField--invalid", disabled && "IncodeSegmentedDateInputField--disabled"),
570
- "data-has-value": hasValue ? "true" : void 0,
571
- "data-disabled": disabled ? "true" : void 0,
572
- "aria-invalid": isInvalid ? "true" : void 0,
573
- "aria-describedby": describedByIds || void 0,
574
- ...groupLabelProps,
575
- children: segmentOrder.map((key, i) => /* @__PURE__ */ u(k, { children: [renderSegment(key), i < segmentOrder.length - 1 && /* @__PURE__ */ u("span", {
576
- class: "IncodeSegmentedDateInputSeparator",
577
- "aria-hidden": "true",
578
- children: "/"
579
- })] }, key))
580
- }),
581
- /* @__PURE__ */ u("span", {
582
- id: formatHintId,
583
- class: "IncodeSrOnly",
584
- "data-testid": `${id}-format-hint`,
585
- children: formatHintText
586
- }),
587
- /* @__PURE__ */ u("input", {
588
- ref: setHiddenRef,
589
- id,
590
- type: "date",
591
- name,
592
- defaultValue: value,
593
- min,
594
- max,
595
- disabled,
596
- required,
597
- "aria-required": required ? "true" : void 0,
598
- autoComplete: hiddenAutocomplete,
599
- class: "IncodeSegmentedDateInputHiddenNative",
600
- tabIndex: -1,
601
- "aria-hidden": "true",
602
- "data-has-value": hasValue ? "true" : void 0,
603
- "data-testid": `${id}-native`,
604
- onInput: handleHiddenChange,
605
- onChange: handleHiddenChange,
606
- ...restProps
607
- }),
608
- /* @__PURE__ */ u("button", {
609
- ref: iconButtonRef,
610
- type: "button",
611
- class: "IncodeSegmentedDateInputIconButton",
612
- onClick: handleIconClick,
613
- onTouchEnd: handleIconClick,
614
- disabled,
615
- "aria-label": "Open date picker",
616
- "data-testid": `${id}-picker-trigger`,
617
- children: /* @__PURE__ */ u("span", {
618
- class: "IncodeSegmentedDateInputIcon",
619
- children: /* @__PURE__ */ u(CalendarIcon, {})
620
- })
621
- })
622
- ]
623
- }),
624
- !suppressMessages && error && /* @__PURE__ */ u("div", {
625
- class: "IncodeInputComposedErrorWrapper",
626
- role: "alert",
627
- "data-testid": `${id}-error-wrapper`,
628
- children: [showErrorIcon && /* @__PURE__ */ u("div", {
629
- class: "IncodeInputComposedIconWrapper",
630
- children: /* @__PURE__ */ u(ErrorIcon, { size: 16 })
631
- }), /* @__PURE__ */ u("p", {
632
- id: errorId,
633
- class: "IncodeInputComposedError",
634
- children: error
635
- })]
636
- }),
637
- !suppressMessages && helper && !error && /* @__PURE__ */ u("div", {
638
- class: "IncodeInputComposedHelperWrapper",
639
- "data-testid": `${id}-helper-wrapper`,
640
- children: [showHelperIcon && /* @__PURE__ */ u("div", {
641
- class: "IncodeInputComposedIconWrapper",
642
- children: /* @__PURE__ */ u(SuccessIcon, { size: 16 })
643
- }), /* @__PURE__ */ u("p", {
644
- id: helperId,
645
- class: "IncodeInputComposedHelper",
646
- children: helper
647
- })]
648
- })
649
- ]
650
- });
651
- });
652
- SegmentedDateInput.displayName = "SegmentedDateInput";
653
- //#endregion
654
- //#region src/shared/textArea/textArea.tsx
655
- var TextArea = D((props, ref) => {
656
- const { class: className, rows = 4, ...restProps } = props;
657
- return /* @__PURE__ */ u("textarea", {
658
- ...restProps,
659
- ref,
660
- rows,
661
- class: cn("IncodeTextArea", className)
662
- });
663
- });
664
- //#endregion
665
- //#region src/shared/textAreaComposed/textAreaComposed.tsx
666
- var TextAreaComposed = D(({ id, label, labelHint, "aria-label": ariaLabel, error, showErrorIcon, helper, showHelperIcon, required, rows = 4, class: className, ...restProps }, ref) => {
667
- const helperId = `${id}-helper`;
668
- const errorId = `${id}-error`;
669
- const describedByIds = [helper ? helperId : null, error ? errorId : null].filter(Boolean).join(" ");
670
- return /* @__PURE__ */ u("div", {
671
- class: cn("IncodeTextAreaComposed", className),
672
- children: [
673
- label && /* @__PURE__ */ u("label", {
674
- class: "IncodeTextAreaComposedLabel",
675
- htmlFor: id,
676
- "data-testid": `${id}-label`,
677
- children: [label, labelHint && /* @__PURE__ */ u("span", {
678
- class: "IncodeTextAreaComposedLabelHint",
679
- "data-testid": `${id}-label-hint`,
680
- children: labelHint
681
- })]
682
- }),
683
- /* @__PURE__ */ u("div", {
684
- class: "IncodeTextAreaComposedWrapper",
685
- children: /* @__PURE__ */ u(TextArea, {
686
- id,
687
- rows,
688
- ...restProps,
689
- ref,
690
- required,
691
- ...!label && ariaLabel ? { "aria-label": ariaLabel } : {},
692
- "aria-describedby": describedByIds || void 0,
693
- "aria-required": required ? "true" : void 0,
694
- "aria-invalid": error ? "true" : void 0
695
- })
696
- }),
697
- error && /* @__PURE__ */ u("div", {
698
- class: "IncodeTextAreaComposedErrorWrapper",
699
- role: "alert",
700
- "data-testid": `${id}-error-wrapper`,
701
- children: [showErrorIcon && /* @__PURE__ */ u("div", {
702
- class: "IncodeTextAreaComposedIconWrapper",
703
- children: /* @__PURE__ */ u(ErrorIcon, { size: 17 })
704
- }), /* @__PURE__ */ u("p", {
705
- id: errorId,
706
- class: "IncodeTextAreaComposedError",
707
- children: error
708
- })]
709
- }),
710
- helper && !error && /* @__PURE__ */ u("div", {
711
- class: "IncodeTextAreaComposedHelperWrapper",
712
- "data-testid": `${id}-helper-wrapper`,
713
- children: [showHelperIcon && /* @__PURE__ */ u("div", {
714
- class: "IncodeTextAreaComposedIconWrapper",
715
- children: /* @__PURE__ */ u(SuccessIcon, { size: 17 })
716
- }), /* @__PURE__ */ u("p", {
717
- id: helperId,
718
- class: "IncodeTextAreaComposedHelper",
719
- children: helper
720
- })]
721
- })
722
- ]
723
- });
724
- });
725
- TextAreaComposed.displayName = "TextAreaComposed";
726
- //#endregion
727
19
  //#region src/shared/card/verificationOption/verificationOptionCard.tsx
728
20
  function VerificationOptionCardList({ children }) {
729
21
  return /* @__PURE__ */ u("div", {
@@ -770,138 +62,6 @@ function VerificationOptionCardTag({ label }) {
770
62
  });
771
63
  }
772
64
  //#endregion
773
- //#region src/shared/cameraOverlay/cameraOverlay.tsx
774
- /**
775
- * Absolute-positioned flex-column overlay that sits on top of the camera video.
776
- *
777
- * Expected child order:
778
- * 1. (optional) Module-specific header extras (e.g. CaptureNotification)
779
- * 2. CameraOverlayHeader
780
- * 3. CameraFrame
781
- * 4. CaptureFooter
782
- */
783
- var CameraOverlay = ({ children, className }) => {
784
- return /* @__PURE__ */ u("div", {
785
- class: cn("IncodeCameraOverlay", className),
786
- children
787
- });
788
- };
789
- //#endregion
790
- //#region src/shared/cameraOverlay/cameraOverlayHeader.tsx
791
- var CameraOverlayHeader = ({ title, subtitle, visible = true, className, titleId, titleRef }) => {
792
- const fallbackTitleRef = A(null);
793
- const resolvedTitleRef = titleRef ?? fallbackTitleRef;
794
- y(() => {
795
- resolvedTitleRef.current?.focus();
796
- }, [resolvedTitleRef]);
797
- return /* @__PURE__ */ u("div", {
798
- class: cn("IncodeCameraOverlayHeader", !visible && "IncodeCameraOverlayHeaderHidden", className),
799
- children: [/* @__PURE__ */ u(Title, {
800
- ref: resolvedTitleRef,
801
- id: titleId,
802
- className: "IncodeCameraOverlayHeaderTitle",
803
- tabIndex: -1,
804
- children: title
805
- }), /* @__PURE__ */ u("p", {
806
- class: "IncodeCameraOverlayHeaderSubtitle",
807
- children: subtitle
808
- })]
809
- });
810
- };
811
- //#endregion
812
- //#region src/shared/captureFooter/captureFooter.tsx
813
- var CaptureFooter = ({ onOpenHelp, onCapture, isManualCapture, captureAriaLabel, captureAriaDescribedBy, helpAriaLabel, helpButtonRef, captureButtonRef, encryptionLabel, children, hideActions }) => {
814
- const { t } = useTranslation();
815
- const isCaptureSectionVisible = !hideActions && isManualCapture && Boolean(onCapture);
816
- const isHelpSectionVisible = !hideActions;
817
- return /* @__PURE__ */ u("div", {
818
- class: "IncodeCaptureFooter",
819
- children: [
820
- /* @__PURE__ */ u("div", {
821
- class: "IncodeCaptureFooterEncryption",
822
- children: [/* @__PURE__ */ u(LockIcon, { className: "IncodeCaptureFooterEncryptionIcon" }), /* @__PURE__ */ u("span", { children: encryptionLabel ?? t("idv2.capture.allDataIsEncrypted") })]
823
- }),
824
- isCaptureSectionVisible && /* @__PURE__ */ u("div", {
825
- class: "IncodeCaptureFooterCaptureSection",
826
- children: [children, /* @__PURE__ */ u("button", {
827
- ref: captureButtonRef,
828
- type: "button",
829
- class: "IncodeCaptureFooterCaptureButton",
830
- onClick: onCapture,
831
- "aria-label": captureAriaLabel ?? t("manualCapture.ariaLabel"),
832
- "aria-describedby": captureAriaDescribedBy,
833
- "data-testid": "capture-button",
834
- children: /* @__PURE__ */ u(CaptureButtonIcon, {})
835
- })]
836
- }),
837
- isHelpSectionVisible && /* @__PURE__ */ u("div", {
838
- class: "IncodeCaptureFooterHelp",
839
- children: /* @__PURE__ */ u(Button, {
840
- ref: helpButtonRef,
841
- variant: "link",
842
- onClick: onOpenHelp,
843
- "aria-label": helpAriaLabel ?? t("idv2.needHelp.open"),
844
- class: "IncodeCaptureFooterHelpButton",
845
- "data-testid": "capture-help-button",
846
- children: /* @__PURE__ */ u(HelpIcon, {})
847
- })
848
- })
849
- ]
850
- });
851
- };
852
- //#endregion
853
- //#region src/shared/manualCapture/manualCapture.tsx
854
- function captureFrameFromVideo(video) {
855
- if (video.readyState < 2 || video.videoWidth === 0 || video.videoHeight === 0) return null;
856
- const canvas = document.createElement("canvas");
857
- canvas.width = video.videoWidth;
858
- canvas.height = video.videoHeight;
859
- const ctx = canvas.getContext("2d");
860
- if (!ctx) return null;
861
- ctx.drawImage(video, 0, 0);
862
- return canvas.toDataURL("image/jpeg", .92).split(",")[1] ?? null;
863
- }
864
- var ManualCapture = ({ stream, onCapture, disabled }) => {
865
- const videoRef = A(null);
866
- y(() => {
867
- if (videoRef.current && stream) {
868
- videoRef.current.srcObject = stream;
869
- videoRef.current.play().catch(() => {});
870
- }
871
- }, [stream]);
872
- const handleCapture = q(() => {
873
- const video = videoRef.current;
874
- if (!video || disabled) return;
875
- const base64 = captureFrameFromVideo(video);
876
- if (base64) onCapture(base64);
877
- }, [onCapture, disabled]);
878
- return /* @__PURE__ */ u("div", {
879
- class: "IncodeManualCapture",
880
- children: [/* @__PURE__ */ u("div", {
881
- class: "IncodeManualCaptureVideoContainer",
882
- children: /* @__PURE__ */ u("video", {
883
- ref: videoRef,
884
- autoplay: true,
885
- playsInline: true,
886
- muted: true,
887
- class: "IncodeManualCaptureVideo",
888
- "aria-label": "Camera stream for document capture"
889
- })
890
- }), /* @__PURE__ */ u("div", {
891
- class: "IncodeManualCaptureButtonContainer",
892
- children: /* @__PURE__ */ u(Button, {
893
- variant: "primary",
894
- size: "L",
895
- onClick: handleCapture,
896
- disabled,
897
- class: "IncodeManualCaptureButton",
898
- "aria-label": "Capture document",
899
- children: "Capture"
900
- })
901
- })]
902
- });
903
- };
904
- //#endregion
905
65
  //#region src/modules/id/assets/blurIcon.tsx
906
66
  var BlurIcon = ({ className }) => {
907
67
  return /* @__PURE__ */ u("svg", {
@@ -1190,6 +350,263 @@ var useCaptureResultPreview = (state) => {
1190
350
  };
1191
351
  };
1192
352
  //#endregion
353
+ //#region src/modules/id/capture/captureHelpers.ts
354
+ /**
355
+ * Which layer(s) the capture screen mounts.
356
+ *
357
+ * The crossfade wins outright while it runs: on the IDC-05 treatment the machine
358
+ * commits the frame on its own clock, so `uploading` arrives *before* the fade
359
+ * rather than after it, and letting `uploading` win would hard-cut the live
360
+ * layer away mid-animation.
361
+ *
362
+ * A `present` phase keeps the live layer mounted through the manual-capture
363
+ * result preview, where a committed `previewImageUrl` already exists but the frozen still
364
+ * is deliberately still on screen.
365
+ */
366
+ function getCaptureStageView(state, phase) {
367
+ if (!state.previewImageUrl) return "live";
368
+ if (phase === "exiting") return "crossfade";
369
+ if (phase === "present") return "live";
370
+ return state.captureStatus === "capturing" || state.captureStatus === "uploading" ? "analyzing" : "live";
371
+ }
372
+ function getCaptureMode(state) {
373
+ return state.currentMode === "passport" ? "passport" : "id";
374
+ }
375
+ /**
376
+ * Whether the manual-capture button is on screen right now: either the
377
+ * genuine auto-capture-failed fallback (`detectionStatus === 'manualCapture'`)
378
+ * or the `showCaptureButtonInAuto` shortcut (autocapture still running, button
379
+ * offered as an optional shortcut). Shared by `Capture`'s render and
380
+ * `useManualTooltipExperiment`'s sticky latch so the two can't drift apart.
381
+ */
382
+ function isManualCaptureShown(state) {
383
+ return state.detectionStatus === "manualCapture" || state.showCaptureButtonInAuto && state.captureStatus === "detecting" && state.detectionStatus !== "capturing";
384
+ }
385
+ //#endregion
386
+ //#region src/modules/id/experiments/constants.ts
387
+ var CAMERA_PERMISSION_UX = {
388
+ CONTROL: "control",
389
+ PENDING: "pending",
390
+ PERMISSION_SHEET: "permissionSheet",
391
+ HOW_IT_WORKS: "howItWorks"
392
+ };
393
+ var ID_CAPTURE_STATUS = {
394
+ TUTORIAL: "tutorial",
395
+ PERMISSIONS: "permissions",
396
+ LOADING: "loading",
397
+ CAPTURE: "capture"
398
+ };
399
+ /** Underlying machine phases core collapses into `status: 'loading'`. */
400
+ var ID_CAPTURE_LOADING_PHASE = { PERMISSIONS_IDLE: "permissionsIdle" };
401
+ /** Underlying machine phases core collapses into `status: 'tutorial'`. */
402
+ var ID_CAPTURE_TUTORIAL_PHASE = {
403
+ CHECKING_PERMISSION: "checkingPermission",
404
+ READY: "ready",
405
+ INITIALIZING_CAMERA: "initializingCamera",
406
+ WAITING_FOR_PERMISSION: "waitingForPermission",
407
+ WAITING_FOR_CAMERA: "waitingForCamera"
408
+ };
409
+ /** Tutorial phases where the user has already continued and the CTA must show busy. */
410
+ var CONTINUING_TUTORIAL_PHASES = new Set([ID_CAPTURE_TUTORIAL_PHASE.WAITING_FOR_PERMISSION, ID_CAPTURE_TUTORIAL_PHASE.WAITING_FOR_CAMERA]);
411
+ var PERMISSION_DIALOG_STATUS = {
412
+ IDLE: "idle",
413
+ MOTION_ONLY: "motionOnly",
414
+ REQUESTING: "requesting"
415
+ };
416
+ var EXPERIMENT_LIFECYCLE_STATUS = { PENDING: "pending" };
417
+ /** IDC-08 arms — console-owned values, kebab-case `auto-dismiss` included. */
418
+ var MANUAL_TOOLTIP = {
419
+ CONTROL: "control",
420
+ REMOVE: "remove",
421
+ AUTO_DISMISS: "auto-dismiss"
422
+ };
423
+ var MANUAL_TOOLTIP_VARIANTS = [
424
+ MANUAL_TOOLTIP.CONTROL,
425
+ MANUAL_TOOLTIP.REMOVE,
426
+ MANUAL_TOOLTIP.AUTO_DISMISS
427
+ ];
428
+ /**
429
+ * Today's shipped CSS dwell (`manualCaptureTooltipExit` animation-delay) — the
430
+ * control arm's behavior, so also the param default: an unallocated/control
431
+ * session that omits `autoDismissIntervalMs` must reproduce this exactly, not
432
+ * the treatment's shortened dwell.
433
+ */
434
+ var MANUAL_TOOLTIP_DISMISS_DELAY_MS = 3500;
435
+ /** One `experimentAssigned` per session (default — today's product decision). */
436
+ var MANUAL_TOOLTIP_DEDUPE_RULE_ONCE = "once";
437
+ /** One `experimentAssigned` per (ID-module allocation, side). */
438
+ var MANUAL_TOOLTIP_DEDUPE_RULE_PER_CAPTURE = "per-capture";
439
+ //#endregion
440
+ //#region src/modules/id/experiments/idExperiments.ts
441
+ /**
442
+ * Code-owned registry of ID-module UI experiments. Each entry is a
443
+ * self-describing object param on `onboarding_web_sdk_ps`; see
444
+ * `useIdExperiment` for how it is read and reported.
445
+ */
446
+ var ID_EXPERIMENTS = {
447
+ flipCapturedCard: {
448
+ storeParam: "idcExp07FlipInCaptureState",
449
+ module: eventModuleNames.idCapture,
450
+ ...defineExperimentParams({ shouldFlipCapturedCard: booleanParam(false) })
451
+ },
452
+ cameraPermissionSheet: {
453
+ storeParam: "idcExp01PermissionSheet",
454
+ module: eventModuleNames.idCapture,
455
+ ...defineExperimentParams({ showPermissionSheet: booleanParam(false) })
456
+ },
457
+ darkCameraLoading: {
458
+ storeParam: "idcExp04DarkCameraLoading",
459
+ module: eventModuleNames.idCapture,
460
+ ...defineExperimentParams({ showDarkCameraLoading: booleanParam(false) })
461
+ },
462
+ cameraPermissionHowItWorks: {
463
+ storeParam: "idcExp02HowItWorks",
464
+ module: eventModuleNames.idCapture,
465
+ ...defineExperimentParams({ showHowItWorks: booleanParam(false) })
466
+ },
467
+ manualTooltip: {
468
+ storeParam: "idcExp08ManualTooltip",
469
+ module: eventModuleNames.idCapture,
470
+ ...defineExperimentParams({
471
+ manualTooltipVariant: enumParam(MANUAL_TOOLTIP.CONTROL, MANUAL_TOOLTIP_VARIANTS),
472
+ autoDismissIntervalMs: numberParam(MANUAL_TOOLTIP_DISMISS_DELAY_MS, {
473
+ min: 0,
474
+ max: 1e4,
475
+ integer: true
476
+ })
477
+ })
478
+ }
479
+ };
480
+ //#endregion
481
+ //#region src/experiments/makeUseModuleExperiment.ts
482
+ /**
483
+ * Builds a per-module experiment hook bound to `registry` (e.g.
484
+ * `ID_EXPERIMENTS`). Each experiment is a self-describing object param on the
485
+ * shared `onboarding_web_sdk_ps` store; the hook resolves it once at the
486
+ * visibility site (single-phase read — exposure logged on that read).
487
+ */
488
+ function makeUseModuleExperiment(registry) {
489
+ return function useModuleExperiment({ key, enabled = true, reportAssignment = true, dedupeKey, conditions }) {
490
+ const spec = registry[key];
491
+ const { value: store, status } = useFeatureManagement("parameterStore", ONBOARDING_WEB_SDK_PARAMETER_STORE);
492
+ const conditionsKey = conditions ? JSON.stringify(conditions) : "";
493
+ const resolvedDedupeKey = dedupeKey ?? spec.storeParam;
494
+ const resolved = T(() => enabled && status === "ready" ? resolveExperiment(spec, { store }) : {
495
+ params: { ...spec.defaults },
496
+ assignment: null
497
+ }, [
498
+ enabled,
499
+ status,
500
+ store,
501
+ spec
502
+ ]);
503
+ const assignment = resolved.assignment;
504
+ const variant = typeof assignment?.variant === "string" ? assignment.variant : null;
505
+ y(() => {
506
+ if (!assignment || !reportAssignment) return;
507
+ recordExperimentAssignmentOnce(spec.module, resolvedDedupeKey, {
508
+ ...assignment,
509
+ conditions: conditionsKey ? JSON.parse(conditionsKey) : void 0
510
+ });
511
+ }, [
512
+ assignment,
513
+ reportAssignment,
514
+ spec,
515
+ resolvedDedupeKey,
516
+ conditionsKey
517
+ ]);
518
+ return {
519
+ variant,
520
+ status,
521
+ params: resolved.params
522
+ };
523
+ };
524
+ }
525
+ //#endregion
526
+ //#region src/modules/id/experiments/useIdExperiment.ts
527
+ /**
528
+ * ID-module binding of `makeUseModuleExperiment` (see `@/experiments` for
529
+ * the shared parameter-store/analytics-gate/assignment-recording mechanics),
530
+ * bound to `ID_EXPERIMENTS`.
531
+ *
532
+ * Pass `enabled: false` for a surface/mode the treatment can never apply to
533
+ * (e.g. passport in `flipCapturedCard`) so that surface neither logs an
534
+ * exposure nor records an assignment; `params` still resolves to the
535
+ * registry-declared defaults so callers don't need a separate
536
+ * branch.
537
+ */
538
+ var useIdExperiment = makeUseModuleExperiment(ID_EXPERIMENTS);
539
+ //#endregion
540
+ //#region src/modules/id/experiments/useManualTooltipExperiment.ts
541
+ /**
542
+ * IDC-08: resolves the manual-capture tooltip/title arm.
543
+ *
544
+ * A timing constraint the shared `useIdExperiment` hook doesn't cover on its
545
+ * own:
546
+ *
547
+ * **Expose at capture entry, report at treatment show (else at commit).**
548
+ * The arm is resolved (and Statsig-exposed) from the first render of
549
+ * `Capture` so the exposed population stays symmetric across arms, but the
550
+ * `experimentAssigned` interview-event lands at the first of two moments:
551
+ * the render where the manual-capture surface (the thing the arms actually
552
+ * change) becomes visible — so a session that sees the treatment and then
553
+ * abandons is still counted — or, for sessions that never show it, once a
554
+ * frame is committed. Reporting a never-shown session before commit would
555
+ * misdescribe it: `showedManualCapture: false` could still flip to `true`,
556
+ * but the first-wins dedupe would have already locked it in.
557
+ * `reportAssignment` gates the report without re-gating (and so
558
+ * re-exposing) the resolve.
559
+ *
560
+ * Reporting granularity is remote-selectable via
561
+ * `MANUAL_TOOLTIP_DEDUPE_RULE_PARAM` (ships ahead of the PM/mobile sync on
562
+ * the final rule, so it can be flipped without a code change): `'once'`
563
+ * (default) is one `experimentAssigned` per session — `Capture` unmounts
564
+ * between the front and back side, so whichever side reports first is the
565
+ * one the event describes, and the other side's report is a no-op.
566
+ * `'per-capture'` is one event per (ID-module allocation, side) instead — see
567
+ * `getManualTooltipDedupeKey`.
568
+ */
569
+ function useManualTooltipExperiment(manager, state) {
570
+ const { value: onboardingParameterStore } = useFeatureManagement("parameterStore", ONBOARDING_WEB_SDK_PARAMETER_STORE, { disableExposureLog: true });
571
+ const dedupeKey = getManualTooltipDedupeKey(onboardingParameterStore, manager, state);
572
+ const showedManualCaptureRef = A(false);
573
+ if (isManualCaptureShown(state)) showedManualCaptureRef.current = true;
574
+ const { params, status } = useIdExperiment({
575
+ key: "manualTooltip",
576
+ enabled: true,
577
+ reportAssignment: showedManualCaptureRef.current || state.captureStatus === "uploading" || state.captureStatus === "holdOn",
578
+ dedupeKey,
579
+ conditions: { showedManualCapture: showedManualCaptureRef.current }
580
+ });
581
+ let dismissDelayMs = MANUAL_TOOLTIP_DISMISS_DELAY_MS;
582
+ if (status === EXPERIMENT_LIFECYCLE_STATUS.PENDING) return {
583
+ variant: MANUAL_TOOLTIP.CONTROL,
584
+ dismissDelayMs
585
+ };
586
+ if (params.manualTooltipVariant === MANUAL_TOOLTIP.AUTO_DISMISS) dismissDelayMs = params.autoDismissIntervalMs;
587
+ return {
588
+ variant: params.manualTooltipVariant,
589
+ dismissDelayMs
590
+ };
591
+ }
592
+ var captureOccurrences = /* @__PURE__ */ new WeakMap();
593
+ var nextCaptureOccurrence = 1;
594
+ function getCaptureOccurrence(manager) {
595
+ let occurrence = captureOccurrences.get(manager);
596
+ if (occurrence === void 0) {
597
+ occurrence = nextCaptureOccurrence++;
598
+ captureOccurrences.set(manager, occurrence);
599
+ }
600
+ return occurrence;
601
+ }
602
+ function getManualTooltipDedupeKey(store, manager, state) {
603
+ const dedupeRule = store.get("idcExp08ManualTooltipDedupeRule", "once") === "per-capture" ? MANUAL_TOOLTIP_DEDUPE_RULE_PER_CAPTURE : MANUAL_TOOLTIP_DEDUPE_RULE_ONCE;
604
+ const captureInstance = getCaptureOccurrence(manager);
605
+ const base = ID_EXPERIMENTS.manualTooltip.storeParam;
606
+ if (dedupeRule === "once") return base;
607
+ return `${base}:${captureInstance}:${state.currentMode}:${state.attemptsRemaining}`;
608
+ }
609
+ //#endregion
1193
610
  //#region src/modules/id/shared/captureFrame.tsx
1194
611
  var CaptureFrame = ({ orientation, mode, state, children, className }) => {
1195
612
  const isHorizontal = orientation !== "vertical";
@@ -1336,7 +753,7 @@ var GreenCheckIcon = ({ className, ...rest }) => /* @__PURE__ */ u("svg", {
1336
753
  //#region src/modules/id/processing/idProcessingResult.tsx
1337
754
  var FADE_OUT_ANIMATION_NAME = "incodeIdProcessingResultFadeOut";
1338
755
  var EXIT_WATCHDOG_MS = 3500;
1339
- var IdProcessingResult = ({ variant, imageUrl, orientation, mode, title, subtitle, buttonText, onButtonClick, attemptsRemaining, blurImage, fadeOutOnClick }) => {
756
+ var IdProcessingResult = ({ variant, imageUrl, orientation, mode, title, subtitle, buttonText, onButtonClick, attemptsRemaining, blurImage, fadeOutOnClick, children }) => {
1340
757
  const { t } = useTranslation();
1341
758
  const titleRef = A(null);
1342
759
  const [isExiting, setIsExiting] = d(false);
@@ -1371,29 +788,32 @@ var IdProcessingResult = ({ variant, imageUrl, orientation, mode, title, subtitl
1371
788
  blurImage,
1372
789
  topContent: /* @__PURE__ */ u("div", {
1373
790
  class: cn("IncodeIdProcessingResultContent", isExiting && "IncodeIdProcessingResultContentExiting"),
1374
- role: "status",
1375
791
  onAnimationEnd: handleExitAnimationEnd,
1376
- children: [
1377
- variant === "success" ? /* @__PURE__ */ u(GreenCheckIcon, { className: "IncodeIdProcessingResultIcon" }) : /* @__PURE__ */ u(RedStrikeIcon, { className: "IncodeIdProcessingResultIcon" }),
1378
- /* @__PURE__ */ u(Spacer, { size: 16 }),
1379
- title && /* @__PURE__ */ u(Title, {
1380
- ref: titleRef,
1381
- className: "IncodeIdProcessingResultTitle",
1382
- tabIndex: -1,
1383
- children: title
1384
- }),
1385
- subtitle && /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u(Spacer, { size: 12 }), /* @__PURE__ */ u("p", {
1386
- class: "IncodeIdProcessingResultSubtitle",
1387
- children: subtitle
1388
- })] })
1389
- ]
792
+ children: [/* @__PURE__ */ u("div", {
793
+ class: "IncodeIdProcessingResultStatus",
794
+ role: "status",
795
+ children: [
796
+ variant === "success" ? /* @__PURE__ */ u(GreenCheckIcon, { className: "IncodeIdProcessingResultIcon" }) : /* @__PURE__ */ u(RedStrikeIcon, { className: "IncodeIdProcessingResultIcon" }),
797
+ /* @__PURE__ */ u(Spacer, { size: 16 }),
798
+ title && /* @__PURE__ */ u(Title, {
799
+ ref: titleRef,
800
+ className: "IncodeIdProcessingResultTitle",
801
+ tabIndex: -1,
802
+ children: title
803
+ }),
804
+ subtitle && /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u(Spacer, { size: 12 }), /* @__PURE__ */ u("p", {
805
+ class: "IncodeIdProcessingResultSubtitle",
806
+ children: subtitle
807
+ })] })
808
+ ]
809
+ }), children]
1390
810
  }),
1391
811
  bottomContent: /* @__PURE__ */ u("div", {
1392
812
  class: cn("IncodeIdProcessingResultButtonContainer", isExiting && "IncodeIdProcessingResultButtonContainerExiting"),
1393
813
  onAnimationEnd: handleExitAnimationEnd,
1394
- children: [attemptsRemaining !== void 0 && attemptsRemaining > 0 && /* @__PURE__ */ u("p", {
814
+ children: [attemptsRemaining !== void 0 && /* @__PURE__ */ u("p", {
1395
815
  class: "IncodeIdProcessingResultAttempts",
1396
- children: t("v2.idError.attemptsLeft", { count: attemptsRemaining })
816
+ children: attemptsRemaining === 0 ? t("idv2.capture.processing.noAttemptsRemaining") : t("v2.idError.attemptsLeft", { count: attemptsRemaining })
1397
817
  }), /* @__PURE__ */ u(Button, {
1398
818
  onClick: handleButtonClick,
1399
819
  disabled: isExiting,
@@ -1404,72 +824,19 @@ var IdProcessingResult = ({ variant, imageUrl, orientation, mode, title, subtitl
1404
824
  });
1405
825
  };
1406
826
  //#endregion
1407
- //#region src/experiments/makeUseModuleExperiment.ts
1408
- /**
1409
- * Builds a per-module experiment hook bound to `registry` (e.g.
1410
- * `ID_EXPERIMENTS`). Each experiment is a self-describing object param on the
1411
- * shared `onboarding_web_sdk_ps` store; the hook resolves it once at the
1412
- * visibility site (single-phase read — exposure logged on that read).
1413
- */
1414
- function makeUseModuleExperiment(registry) {
1415
- return function useModuleExperiment({ key, enabled = true, conditions }) {
1416
- const spec = registry[key];
1417
- const { value: store, status } = useFeatureManagement("parameterStore", ONBOARDING_WEB_SDK_PARAMETER_STORE, { enabled });
1418
- const conditionsKey = conditions ? JSON.stringify(conditions) : "";
1419
- const resolved = T(() => enabled && status === "ready" ? resolveExperiment(spec, { store }) : {
1420
- params: { ...spec.defaults },
1421
- assignment: null
1422
- }, [
1423
- enabled,
1424
- status,
1425
- store,
1426
- spec
1427
- ]);
1428
- const assignment = resolved.assignment;
1429
- const variant = typeof assignment?.variant === "string" ? assignment.variant : null;
1430
- y(() => {
1431
- if (!assignment) return;
1432
- recordExperimentAssignmentOnce(spec.module, spec.storeParam, {
1433
- ...assignment,
1434
- conditions: conditionsKey ? JSON.parse(conditionsKey) : void 0
1435
- });
1436
- }, [
1437
- assignment,
1438
- spec,
1439
- conditionsKey
1440
- ]);
1441
- return {
1442
- variant,
1443
- status,
1444
- params: resolved.params
1445
- };
1446
- };
827
+ //#region src/modules/id/experiments/flipCapturedCardEligibility.ts
828
+ /** Whether the captured-card treatment has a camera image it can physically flip. */
829
+ function canFlipCapturedCard(mode, previewImageUrl) {
830
+ return mode !== "passport" && Boolean(previewImageUrl);
1447
831
  }
1448
832
  //#endregion
1449
- //#region src/modules/id/experiments/useIdExperiment.ts
1450
- /**
1451
- * ID-module binding of `makeUseModuleExperiment` (see `@/experiments` for
1452
- * the shared parameter-store/analytics-gate/assignment-recording mechanics),
1453
- * bound to `ID_EXPERIMENTS`.
1454
- *
1455
- * Pass `enabled: false` for a surface/mode the treatment can never apply to
1456
- * (e.g. passport in `flipCapturedCard`) so that surface neither logs an
1457
- * exposure nor records an assignment; `params` still resolves to the
1458
- * registry-declared defaults so callers don't need a separate
1459
- * branch.
1460
- */
1461
- var useIdExperiment = makeUseModuleExperiment({ flipCapturedCard: {
1462
- storeParam: "idcExp07FlipInCaptureState",
1463
- module: eventModuleNames.idCapture,
1464
- ...defineExperimentParams({ shouldFlipCapturedCard: booleanParam(false) })
1465
- } });
1466
- //#endregion
1467
833
  //#region src/modules/id/processing/idSuccess.tsx
1468
834
  var IdSuccess = ({ manager, state, blurImage }) => {
1469
835
  const { t } = useTranslation();
836
+ const hasNextSide = state.needsBackCapture || state.needsFrontCapture;
1470
837
  const { params } = useIdExperiment({
1471
838
  key: "flipCapturedCard",
1472
- enabled: state.currentMode !== "passport"
839
+ enabled: canFlipCapturedCard(state.currentMode, state.previewImageUrl) && hasNextSide
1473
840
  });
1474
841
  const shouldFlipCapturedCard = params.shouldFlipCapturedCard;
1475
842
  if (!state.previewImageUrl && !state.barcodeFastPathCaptured) return null;
@@ -1498,6 +865,184 @@ var IdSuccess = ({ manager, state, blurImage }) => {
1498
865
  });
1499
866
  };
1500
867
  //#endregion
868
+ //#region src/shared/acceptedDocumentCard/assets/driversLicenseIcon.tsx
869
+ var DriversLicenseIcon = ({ class: className }) => /* @__PURE__ */ u("svg", {
870
+ xmlns: "http://www.w3.org/2000/svg",
871
+ width: "20",
872
+ height: "20",
873
+ viewBox: "0 0 20 20",
874
+ fill: "none",
875
+ "aria-hidden": "true",
876
+ class: className,
877
+ children: /* @__PURE__ */ u("path", {
878
+ "fill-rule": "evenodd",
879
+ "clip-rule": "evenodd",
880
+ d: "M4.96989 7.80578L5.74572 5.65245C5.81739 5.44661 5.94239 5.26495 6.10989 5.12411C6.27572 4.98411 6.47656 4.89161 6.68572 4.85661C8.87991 4.51078 11.1049 4.51078 13.2974 4.85661C13.5124 4.89078 13.7149 4.98328 13.8824 5.12328C14.0491 5.26328 14.1757 5.44578 14.2499 5.65828L15.0232 7.80578C11.6791 8.12578 8.31406 8.12578 4.96989 7.80578ZM13.7082 12.5141C13.2007 12.5141 12.7874 12.1008 12.7874 11.5924C12.7874 11.0849 13.2007 10.6716 13.7082 10.6716C14.2166 10.6716 14.6299 11.0849 14.6299 11.5924C14.6299 12.1008 14.2166 12.5141 13.7082 12.5141ZM6.28489 12.5141C5.77656 12.5141 5.36322 12.1008 5.36322 11.5924C5.36322 11.0849 5.77656 10.6716 6.28489 10.6716C6.79239 10.6716 7.20572 11.0849 7.20572 11.5924C7.20572 12.1008 6.79239 12.5141 6.28489 12.5141ZM18.1041 8.06161C18.0557 7.71995 17.7341 7.48162 17.3974 7.52995C17.0332 7.58161 16.6674 7.62161 16.3024 7.66578C16.3024 7.66578 16.3016 7.66411 16.3007 7.66245L15.4274 5.23995C15.2816 4.82078 15.0241 4.44911 14.6849 4.16495C14.3441 3.87995 13.9332 3.69245 13.4941 3.62161C11.1707 3.25661 8.81491 3.25578 6.48572 3.62245C6.04989 3.69578 5.64072 3.88411 5.30489 4.16828C4.96739 4.45161 4.71156 4.82161 4.56739 5.23495L3.69572 7.65578C3.69406 7.65911 3.69156 7.66245 3.68989 7.66578C3.32489 7.62161 2.95989 7.58161 2.59572 7.52995C2.25406 7.48578 1.93739 7.71911 1.88906 8.06161C1.84072 8.40326 2.07822 8.71992 2.41989 8.76826C2.72989 8.81242 3.04072 8.84492 3.35156 8.88326L2.94406 9.44409C2.52239 10.0249 2.29906 10.7108 2.29906 11.4283V15.6158C2.29906 16.1866 2.76322 16.6508 3.33406 16.6508H5.00072C5.57156 16.6508 6.03489 16.1866 6.03489 15.6158V15.2316C6.03489 15.1758 6.04489 15.1191 6.06572 15.0683C6.08739 15.0149 6.11822 14.9683 6.15822 14.9283C6.19739 14.8883 6.24406 14.8566 6.29489 14.8349C6.34572 14.8141 6.40239 14.8024 6.45906 14.8024H13.5182C13.5749 14.8024 13.6307 14.8141 13.6816 14.8349C13.7332 14.8566 13.7799 14.8883 13.8199 14.9283C13.8582 14.9683 13.8899 15.0149 13.9107 15.0658C13.9316 15.1191 13.9424 15.1749 13.9416 15.2333V15.6158C13.9416 16.1866 14.4049 16.6508 14.9757 16.6508H16.6591C17.2291 16.6508 17.6932 16.1866 17.6932 15.6158V11.4124C17.6932 10.6891 17.4674 9.99659 17.0374 9.40992L16.6449 8.88326C16.9541 8.84492 17.2641 8.81242 17.5732 8.76826C17.9149 8.71992 18.1524 8.40326 18.1041 8.06161Z",
881
+ fill: "var(--icon-neutral-300)"
882
+ })
883
+ });
884
+ //#endregion
885
+ //#region src/shared/acceptedDocumentCard/assets/identificationCardIcon.tsx
886
+ var IdentificationCardIcon = ({ class: className }) => /* @__PURE__ */ u("svg", {
887
+ xmlns: "http://www.w3.org/2000/svg",
888
+ width: "20",
889
+ height: "20",
890
+ viewBox: "0 0 20 20",
891
+ fill: "none",
892
+ "aria-hidden": "true",
893
+ class: className,
894
+ children: /* @__PURE__ */ u("path", {
895
+ "fill-rule": "evenodd",
896
+ "clip-rule": "evenodd",
897
+ d: "M14.7887 9.39382H11.8662C11.4879 9.39382 11.1804 9.08715 11.1804 8.70882C11.1804 8.32964 11.4879 8.02297 11.8662 8.02297H14.7887C15.167 8.02297 15.4737 8.32964 15.4737 8.70882C15.4737 9.08715 15.167 9.39382 14.7887 9.39382ZM14.7887 12.4847H12.9695C12.5912 12.4847 12.2845 12.178 12.2845 11.7997C12.2845 11.4205 12.5912 11.1138 12.9695 11.1138H14.7887C15.167 11.1138 15.4737 11.4205 15.4737 11.7997C15.4737 12.178 15.167 12.4847 14.7887 12.4847ZM10.3937 13.6797L5.0612 13.6872C4.9787 13.6872 4.89953 13.6547 4.8412 13.5972C4.7837 13.5388 4.7512 13.4597 4.7512 13.378C4.7512 12.2505 5.6712 11.1138 7.72703 11.1138C9.78287 11.1138 10.7037 12.2472 10.7037 13.3705C10.7037 13.5413 10.5654 13.6797 10.3937 13.6797ZM7.72703 6.29464C8.79204 6.29464 9.65787 7.16047 9.65787 8.22547C9.65787 9.29048 8.79204 10.1572 7.72703 10.1572C6.66203 10.1572 5.7962 9.29048 5.7962 8.22547C5.7962 7.16047 6.66203 6.29464 7.72703 6.29464ZM14.207 3.16797H6.04036C3.79036 3.16797 2.20703 4.83463 2.20703 7.16797V12.8347C2.20703 15.168 3.79036 16.8347 6.04036 16.8347H14.207C16.457 16.8347 18.0404 15.168 18.0404 12.8347V7.16797C18.0404 4.83463 16.457 3.16797 14.207 3.16797Z",
898
+ fill: "var(--icon-neutral-300)"
899
+ })
900
+ });
901
+ //#endregion
902
+ //#region src/shared/acceptedDocumentCard/assets/passportIcon.tsx
903
+ var PassportIcon$1 = ({ class: className }) => /* @__PURE__ */ u("svg", {
904
+ xmlns: "http://www.w3.org/2000/svg",
905
+ width: "20",
906
+ height: "20",
907
+ viewBox: "0 0 20 20",
908
+ fill: "none",
909
+ "aria-hidden": "true",
910
+ class: className,
911
+ children: [/* @__PURE__ */ u("path", {
912
+ d: "M9.9975 10.2773C9.24125 10.2773 8.625 10.8946 8.625 11.6523C8.625 12.4049 9.24017 13.019 9.9975 13.019C10.7548 13.019 11.37 12.4049 11.37 11.6523C11.37 10.8946 10.7538 10.2773 9.9975 10.2773Z",
913
+ fill: "var(--icon-neutral-300)"
914
+ }), /* @__PURE__ */ u("path", {
915
+ "fill-rule": "evenodd",
916
+ "clip-rule": "evenodd",
917
+ d: "M5.96198 17.9186H14.0386C15.2545 17.9186 16.2428 16.9311 16.2428 15.7186V7.86028C16.2428 6.81169 15.504 5.93273 14.5192 5.71305C14.5023 5.70929 14.485 5.70752 14.4677 5.70752H6.72651C6.49651 5.70752 6.30985 5.52085 6.30985 5.29085C6.30985 5.06085 6.49651 4.87419 6.72651 4.87419H14.237C14.375 4.87419 14.487 4.76226 14.487 4.62419V3.87694C14.487 3.31778 14.2336 2.80111 13.792 2.45861C13.3511 2.11694 12.7878 2.00028 12.2461 2.13944L4.96948 4.02278C4.25615 4.20278 3.75781 4.84444 3.75781 5.58528V15.7186C3.75781 16.9311 4.74698 17.9186 5.96198 17.9186ZM7.37715 11.652C7.37715 10.2047 8.5527 9.02699 9.99962 9.02699C11.4466 9.02699 12.6221 10.2047 12.6221 11.652C12.6221 13.0959 11.4459 14.2687 9.99962 14.2687C8.55337 14.2687 7.37715 13.0959 7.37715 11.652Z",
918
+ fill: "var(--icon-neutral-300)"
919
+ })]
920
+ });
921
+ //#endregion
922
+ //#region src/shared/acceptedDocumentCard/assets/residenceDocumentIcon.tsx
923
+ var ResidenceDocumentIcon = ({ class: className }) => /* @__PURE__ */ u("svg", {
924
+ xmlns: "http://www.w3.org/2000/svg",
925
+ width: "20",
926
+ height: "20",
927
+ viewBox: "0 0 20 20",
928
+ fill: "none",
929
+ "aria-hidden": "true",
930
+ class: className,
931
+ children: [/* @__PURE__ */ u("path", {
932
+ "fill-rule": "evenodd",
933
+ "clip-rule": "evenodd",
934
+ d: "M11.0406 13.3633C10.9006 13.2949 10.559 13.2949 10.0431 13.2949C9.52729 13.2949 9.18646 13.2949 9.05812 13.3574C8.92646 13.4174 8.82729 13.5191 8.76562 13.6474C8.70312 13.7791 8.70312 14.1199 8.70312 14.6366V17.5724C8.70312 17.7105 8.81513 17.8224 8.95313 17.8224H11.1331C11.2712 17.8224 11.3831 17.7105 11.3831 17.5724V14.6366C11.3831 14.1208 11.3831 13.7799 11.3206 13.6491C11.259 13.5191 11.1598 13.4183 11.0406 13.3633Z",
935
+ fill: "var(--icon-neutral-300)"
936
+ }), /* @__PURE__ */ u("path", {
937
+ "fill-rule": "evenodd",
938
+ "clip-rule": "evenodd",
939
+ d: "M18.0187 7.75148L15.602 5.83815V4.10232C15.602 3.64232 15.2295 3.26898 14.7687 3.26898C14.3087 3.26898 13.9353 3.64232 13.9353 4.10232V4.51815L11.7453 2.78315C10.7186 1.97482 9.28448 1.97649 8.25615 2.78482L1.98448 7.75148C1.62365 8.03732 1.56198 8.56146 1.84782 8.92229C2.13365 9.28313 2.65782 9.34229 3.01865 9.05813L3.12365 8.97563V14.6465C3.12365 16.3973 4.54948 17.8215 6.30198 17.8215H7.20698C7.34505 17.8215 7.45698 17.7095 7.45698 17.5715V14.6356C7.45698 13.9006 7.45698 13.4948 7.64198 13.109C7.82948 12.7156 8.14448 12.4023 8.52948 12.2256C8.90282 12.0448 9.30948 12.0448 10.047 12.0448C10.7853 12.0448 11.192 12.0448 11.5787 12.2323C11.9512 12.4031 12.2662 12.7173 12.4528 13.1098C12.637 13.494 12.637 13.8998 12.637 14.6356V17.5715C12.637 17.7095 12.7489 17.8215 12.887 17.8215H13.7011C15.4536 17.8215 16.8795 16.3973 16.8795 14.6465V8.97563L16.9845 9.05813C17.137 9.17979 17.3195 9.23813 17.5012 9.23813C17.747 9.23813 17.9903 9.12979 18.1553 8.92229C18.4403 8.56146 18.3795 8.03732 18.0187 7.75148Z",
940
+ fill: "var(--icon-neutral-300)"
941
+ })]
942
+ });
943
+ //#endregion
944
+ //#region src/shared/acceptedDocumentCard/acceptedDocumentCard.constants.ts
945
+ /** Used for every document type without a dedicated icon in the design system. */
946
+ var DefaultDocumentIcon = IdentificationCardIcon;
947
+ var DOCUMENT_CONFIG = {
948
+ IdentificationCard: {
949
+ label: "idv2.unacceptedId.identificationCard",
950
+ Icon: IdentificationCardIcon
951
+ },
952
+ Passport: {
953
+ label: "idv2.unacceptedId.passport",
954
+ Icon: PassportIcon$1
955
+ },
956
+ DriversLicense: {
957
+ label: "idv2.unacceptedId.driversLicense",
958
+ Icon: DriversLicenseIcon
959
+ },
960
+ ResidenceDocument: {
961
+ label: "idv2.unacceptedId.residenceDocument",
962
+ Icon: ResidenceDocumentIcon
963
+ },
964
+ BirthCertificate: { label: "idv2.unacceptedId.birthCertificate" },
965
+ TravelDocument: { label: "idv2.unacceptedId.travelDocument" },
966
+ WeaponLicense: { label: "idv2.unacceptedId.weaponLicense" },
967
+ MedicalCard: { label: "idv2.unacceptedId.medicalCard" },
968
+ TribalIdentification: { label: "idv2.unacceptedId.tribalIdentification" },
969
+ Currency: { label: "idv2.unacceptedId.currency" },
970
+ VehicleRegistration: { label: "idv2.unacceptedId.vehicleRegistration" },
971
+ TaxIdentification: { label: "idv2.unacceptedId.taxIdentification" },
972
+ Visa: { label: "idv2.unacceptedId.visa" },
973
+ Permit: { label: "idv2.unacceptedId.permit" },
974
+ Military: { label: "idv2.unacceptedId.military" },
975
+ VoterIdentification: { label: "idv2.unacceptedId.voterIdentification" },
976
+ FederalID: { label: "idv2.unacceptedId.federalId" },
977
+ Unknown: { label: "idv2.unacceptedId.unknown" },
978
+ Other: { label: "idv2.unacceptedId.other" }
979
+ };
980
+ //#endregion
981
+ //#region src/shared/acceptedDocumentCard/acceptedDocumentCard.tsx
982
+ function resolveDocumentConfig(documentType) {
983
+ const config = DOCUMENT_CONFIG[documentType] ?? DOCUMENT_CONFIG.Other;
984
+ return {
985
+ label: config.label,
986
+ Icon: config.Icon ?? DefaultDocumentIcon
987
+ };
988
+ }
989
+ var AcceptedDocumentCard = ({ acceptedDocuments }) => {
990
+ const { t } = useTranslation();
991
+ const hasAcceptedDocuments = !!acceptedDocuments?.length;
992
+ return /* @__PURE__ */ u("div", {
993
+ class: "IncodeAcceptedDocumentCard",
994
+ children: /* @__PURE__ */ u("div", {
995
+ class: cn("IncodeAcceptedDocumentCardContainer", !hasAcceptedDocuments && "IncodeAcceptedDocumentCardContainerEmpty"),
996
+ children: hasAcceptedDocuments ? /* @__PURE__ */ u("ul", {
997
+ class: "IncodeAcceptedDocumentCardList",
998
+ children: [...new Set(acceptedDocuments)].map((documentType) => {
999
+ const { Icon, label } = resolveDocumentConfig(documentType);
1000
+ return /* @__PURE__ */ u("li", {
1001
+ class: "IncodeAcceptedDocumentCardItem",
1002
+ children: [/* @__PURE__ */ u(Icon, {}), /* @__PURE__ */ u(TypographyP, {
1003
+ className: "IncodeAcceptedDocumentCardItemLabel",
1004
+ children: t(label)
1005
+ })]
1006
+ }, documentType);
1007
+ })
1008
+ }) : /* @__PURE__ */ u("div", {
1009
+ class: "IncodeAcceptedDocumentCardEmptyState",
1010
+ children: [/* @__PURE__ */ u(DefaultDocumentIcon, { class: "IncodeAcceptedDocumentCardEmptyStateIcon" }), /* @__PURE__ */ u(TypographyP, {
1011
+ className: "IncodeAcceptedDocumentCardEmptyStateText",
1012
+ children: t("idv2.unacceptedId.noDocuments")
1013
+ })]
1014
+ })
1015
+ })
1016
+ });
1017
+ };
1018
+ //#endregion
1019
+ //#region src/modules/id/processing/unacceptedIdDocuments.tsx
1020
+ var UnacceptedIdDocuments = ({ acceptedDocuments, countryCode }) => {
1021
+ const { t, i18n } = useTranslation();
1022
+ const locale = i18n.language || "en";
1023
+ const flag = countryCode ? countryFlagEmoji(countryCode) : "";
1024
+ return /* @__PURE__ */ u("div", {
1025
+ class: "IncodeUnacceptedIdDocuments",
1026
+ children: [countryCode && /* @__PURE__ */ u("div", {
1027
+ class: "IncodeUnacceptedIdDocumentsCountry",
1028
+ children: [/* @__PURE__ */ u(TypographyH3, {
1029
+ className: "IncodeUnacceptedIdDocumentsCountryHeading",
1030
+ children: t("idv2.unacceptedId.acceptedDocuments")
1031
+ }), /* @__PURE__ */ u("span", {
1032
+ class: "IncodeUnacceptedIdDocumentsCountryLabel",
1033
+ children: [flag && /* @__PURE__ */ u("span", {
1034
+ class: "IncodeUnacceptedIdDocumentsCountryFlag",
1035
+ "aria-hidden": "true",
1036
+ children: flag
1037
+ }), /* @__PURE__ */ u("span", {
1038
+ class: "IncodeUnacceptedIdDocumentsCountryName",
1039
+ children: getCountryDisplayName(countryCode, locale)
1040
+ })]
1041
+ })]
1042
+ }), /* @__PURE__ */ u(AcceptedDocumentCard, { acceptedDocuments })]
1043
+ });
1044
+ };
1045
+ //#endregion
1501
1046
  //#region src/modules/id/processing/idError.tsx
1502
1047
  var IdError = ({ manager, state, blurImage, ..._rest }) => {
1503
1048
  const { t } = useTranslation();
@@ -1514,10 +1059,20 @@ var IdError = ({ manager, state, blurImage, ..._rest }) => {
1514
1059
  })]
1515
1060
  });
1516
1061
  const mode = state.currentMode === "passport" ? "passport" : "id";
1517
- if (!state.previewImageUrl) return null;
1062
+ const unacceptableIdType = state.uploadError === "ID_TYPE_UNACCEPTABLE";
1063
+ if (!unacceptableIdType && !state.previewImageUrl) return null;
1064
+ let unacceptedIdDocumentsSlot = null;
1065
+ let imageUrl = state.previewImageUrl;
1066
+ if (unacceptableIdType) {
1067
+ imageUrl = void 0;
1068
+ unacceptedIdDocumentsSlot = /* @__PURE__ */ u(UnacceptedIdDocuments, {
1069
+ acceptedDocuments: state.acceptedDocuments,
1070
+ countryCode: state.countryCode
1071
+ });
1072
+ }
1518
1073
  return /* @__PURE__ */ u(IdProcessingResult, {
1519
1074
  variant: "error",
1520
- imageUrl: state.previewImageUrl,
1075
+ imageUrl,
1521
1076
  orientation: state.orientation,
1522
1077
  mode,
1523
1078
  title: state.uploadErrorMessage ? t(state.uploadErrorMessage) : void 0,
@@ -1525,7 +1080,8 @@ var IdError = ({ manager, state, blurImage, ..._rest }) => {
1525
1080
  buttonText: state.canRetry ? t("idv2.capture.processing.tryAgain") : t("idv2.capture.processing.continue"),
1526
1081
  onButtonClick: () => manager.continueFromError(),
1527
1082
  attemptsRemaining: state.attemptsRemaining,
1528
- blurImage
1083
+ blurImage,
1084
+ children: unacceptedIdDocumentsSlot
1529
1085
  });
1530
1086
  };
1531
1087
  //#endregion
@@ -1593,12 +1149,12 @@ var IdNoAttempts = ({ manager }) => {
1593
1149
  };
1594
1150
  //#endregion
1595
1151
  //#region src/modules/id/capture/idHint.tsx
1596
- var FrontHorizontalHintSvg = z(() => import("./front-horizontal-hint-Bhz1rq-w.js"));
1597
- var FrontVerticalHintSvg = z(() => import("./front-vertical-hint-C4FC1ksx.js"));
1598
- var BackHorizontalHintSvg = z(() => import("./back-horizontal-hint-CjdigFZj.js"));
1599
- var BackVerticalHintSvg = z(() => import("./back-vertical-hint-OhaKsINF.js"));
1600
- var PassportHorizontalHintSvg = z(() => import("./passport-horizontal-hint-DzkhjC8Q.js"));
1601
- var PassportVerticalHintSvg = z(() => import("./passport-vertical-hint-Bd0BQn2Y.js"));
1152
+ var FrontHorizontalHintSvg = z(() => import("./front-horizontal-hint-mgovnJf3.js"));
1153
+ var FrontVerticalHintSvg = z(() => import("./front-vertical-hint-qXMVdLri.js"));
1154
+ var BackHorizontalHintSvg = z(() => import("./back-horizontal-hint-UQ7Nof6k.js"));
1155
+ var BackVerticalHintSvg = z(() => import("./back-vertical-hint-Crc8ybfk.js"));
1156
+ var PassportHorizontalHintSvg = z(() => import("./passport-horizontal-hint-6Ghn2EEN.js"));
1157
+ var PassportVerticalHintSvg = z(() => import("./passport-vertical-hint-UPFFpdf4.js"));
1602
1158
  var CARD_WIDTH_IN_SVG = {
1603
1159
  "front-horizontal": 348,
1604
1160
  "back-horizontal": 348,
@@ -1707,7 +1263,19 @@ var resolveResultView = (t) => ({
1707
1263
  subtitle: t("idv2.capture.resultPreview.subtitle")
1708
1264
  }
1709
1265
  });
1710
- var resolveLiveView = ({ t, mode, detectionStatus, isCapturing }) => {
1266
+ /** IDC-08 control/default copy the title's shared idle vocabulary. */
1267
+ function getFillFrameTitle(t, mode) {
1268
+ if (mode === "passport") return t("idv2.capture.fillFramePassport");
1269
+ else if (mode === "back") return t("idv2.capture.fillFrameBack");
1270
+ return t("idv2.capture.fillFrameFront");
1271
+ }
1272
+ /** IDC-08 `remove`/`auto-dismiss` title — states the action instead of "fill the frame". */
1273
+ function getManualCaptureTitle(t, mode) {
1274
+ if (mode === "passport") return t("idv2.capture.manualCapture.capturePassport");
1275
+ else if (mode === "back") return t("idv2.capture.manualCapture.captureBack");
1276
+ return t("idv2.capture.manualCapture.captureFront");
1277
+ }
1278
+ var resolveLiveView = ({ t, mode, detectionStatus, isCapturing, showManualCapture, manualTooltipVariant }) => {
1711
1279
  if (isCapturing || detectionStatus === "capturing") return {
1712
1280
  frameState: "capturing",
1713
1281
  header: {
@@ -1721,26 +1289,31 @@ var resolveLiveView = ({ t, mode, detectionStatus, isCapturing }) => {
1721
1289
  frameState: hasDetectionError ? "error" : "idle",
1722
1290
  header: null
1723
1291
  };
1724
- const subtitle = isManualCapture ? "" : t("idv2.capture.autoCapture");
1292
+ const isManualTooltipTreatment = showManualCapture && manualTooltipVariant !== MANUAL_TOOLTIP.CONTROL;
1293
+ const title = isManualTooltipTreatment ? getManualCaptureTitle(t, mode) : getFillFrameTitle(t, mode);
1294
+ let subtitle = t("idv2.capture.autoCapture");
1295
+ if (isManualTooltipTreatment && manualTooltipVariant === MANUAL_TOOLTIP.REMOVE) subtitle = t("idv2.capture.manualCapture.pressButton");
1296
+ else if (isManualCapture) subtitle = "";
1725
1297
  return {
1726
1298
  frameState: "idle",
1727
1299
  header: {
1728
- title: mode === "passport" ? t("idv2.capture.fillFramePassport") : mode === "back" ? t("idv2.capture.fillFrameBack") : t("idv2.capture.fillFrameFront"),
1300
+ title,
1729
1301
  subtitle
1730
1302
  }
1731
1303
  };
1732
1304
  };
1733
1305
  //#endregion
1734
1306
  //#region src/modules/id/capture/captureOverlay.tsx
1735
- var MANUAL_CAPTURE_TOOLTIP_EXIT_ANIMATION = "manualCaptureTooltipExit";
1736
- var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCapturing, showManualCapture, onCapture, onOpenHelp, helpButtonRef, captureButtonRef, hideFooterActions, resultPreview }, ref) => {
1307
+ var MANUAL_CAPTURE_TOOLTIP_EXIT_ANIMATIONS = ["manualCaptureTooltipExit", "manualCaptureTooltipExitAutoDismiss"];
1308
+ var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCapturing, showManualCapture, onCapture, onOpenHelp, helpButtonRef, captureButtonRef, hideFooterActions, resultPreview, manualTooltipUx }, ref) => {
1737
1309
  const { t } = useTranslation();
1738
1310
  usePreloadCaptureAnimations();
1739
1311
  const isResultPreview = resultPreview !== void 0;
1312
+ const isTooltipRemoved = manualTooltipUx.variant === MANUAL_TOOLTIP.REMOVE;
1740
1313
  const hasShownIdHintRef = A(false);
1741
1314
  const cameraOverlayHeaderTitleRef = A(null);
1742
1315
  const [showIdHint, setShowIdHint] = d(false);
1743
- const [manualCaptureTooltipDismissed, setManualCaptureTooltipDismissed] = d(false);
1316
+ const [manualCaptureTooltipDismissed, setManualCaptureTooltipDismissed] = d(isTooltipRemoved);
1744
1317
  y(() => {
1745
1318
  if (detectionStatus === "idNotDetected") {
1746
1319
  if (hasShownIdHintRef.current) return;
@@ -1751,10 +1324,10 @@ var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCa
1751
1324
  if (showIdHint) setShowIdHint(false);
1752
1325
  }, [detectionStatus, showIdHint]);
1753
1326
  y(() => {
1754
- if (!showManualCapture) setManualCaptureTooltipDismissed(false);
1755
- }, [showManualCapture]);
1327
+ if (!showManualCapture) setManualCaptureTooltipDismissed(isTooltipRemoved);
1328
+ }, [showManualCapture, isTooltipRemoved]);
1756
1329
  const handleManualCaptureTooltipAnimationEnd = (event) => {
1757
- if (event.animationName !== MANUAL_CAPTURE_TOOLTIP_EXIT_ANIMATION) return;
1330
+ if (!MANUAL_CAPTURE_TOOLTIP_EXIT_ANIMATIONS.includes(event.animationName)) return;
1758
1331
  setManualCaptureTooltipDismissed(true);
1759
1332
  };
1760
1333
  y(() => {
@@ -1768,18 +1341,23 @@ var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCa
1768
1341
  t,
1769
1342
  mode,
1770
1343
  detectionStatus,
1771
- isCapturing
1344
+ isCapturing,
1345
+ showManualCapture,
1346
+ manualTooltipVariant: manualTooltipUx.variant
1772
1347
  }), [
1773
1348
  isResultPreview,
1774
1349
  t,
1775
1350
  mode,
1776
1351
  detectionStatus,
1777
- isCapturing
1352
+ isCapturing,
1353
+ showManualCapture,
1354
+ manualTooltipUx.variant
1778
1355
  ]);
1779
1356
  const isPassport = mode === "passport";
1780
1357
  const frameOrientation = orientation !== "vertical" ? "horizontal" : "vertical";
1781
- const showManualCaptureTooltip = !isResultPreview && showManualCapture && !manualCaptureTooltipDismissed;
1358
+ const showManualCaptureNode = !isResultPreview && showManualCapture;
1782
1359
  const showCounter = isCapturing && counterValue > 0;
1360
+ const captureAriaLabel = header?.title ? `${header.title}. ${t("manualCapture.ariaLabel")}` : void 0;
1783
1361
  const manualCaptureTooltip = /* @__PURE__ */ u("div", {
1784
1362
  id: "manual-capture-tooltip",
1785
1363
  class: "IncodeIdManualCaptureTooltip",
@@ -1831,12 +1409,14 @@ var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCa
1831
1409
  onOpenHelp,
1832
1410
  onCapture,
1833
1411
  isManualCapture: showManualCapture,
1412
+ captureAriaLabel,
1834
1413
  helpButtonRef,
1835
1414
  captureButtonRef,
1836
- captureAriaDescribedBy: showManualCaptureTooltip ? "manual-capture-tooltip" : void 0,
1415
+ captureAriaDescribedBy: showManualCaptureNode ? "manual-capture-tooltip" : void 0,
1837
1416
  hideActions: hideFooterActions,
1838
- children: showManualCaptureTooltip ? /* @__PURE__ */ u("div", {
1839
- class: "IncodeIdManualCaptureTooltipContainer",
1417
+ children: showManualCaptureNode ? /* @__PURE__ */ u("div", {
1418
+ class: cn("IncodeIdManualCaptureTooltipContainer", manualTooltipUx.variant === MANUAL_TOOLTIP.AUTO_DISMISS && "IncodeIdManualCaptureTooltipContainerAutoDismiss", manualCaptureTooltipDismissed && "IncodeIdManualCaptureTooltipContainerSrOnly"),
1419
+ style: { "--manual-capture-tooltip-dismiss-delay": `${manualTooltipUx.dismissDelayMs}ms` },
1840
1420
  onAnimationEnd: handleManualCaptureTooltipAnimationEnd,
1841
1421
  children: manualCaptureTooltip
1842
1422
  }) : null
@@ -1845,36 +1425,15 @@ var CaptureOverlay = D(({ mode, orientation, detectionStatus, counterValue, isCa
1845
1425
  });
1846
1426
  });
1847
1427
  //#endregion
1848
- //#region src/modules/id/capture/captureHelpers.ts
1849
- /**
1850
- * Which layer(s) the capture screen mounts.
1851
- *
1852
- * The crossfade wins outright while it runs: on the IDC-05 treatment the machine
1853
- * commits the frame on its own clock, so `uploading` arrives *before* the fade
1854
- * rather than after it, and letting `uploading` win would hard-cut the live
1855
- * layer away mid-animation.
1856
- *
1857
- * A `present` phase keeps the live layer mounted through the manual-capture
1858
- * result preview, where a committed `previewImageUrl` already exists but the frozen still
1859
- * is deliberately still on screen.
1860
- */
1861
- function getCaptureStageView(state, phase) {
1862
- if (!state.previewImageUrl) return "live";
1863
- if (phase === "exiting") return "crossfade";
1864
- if (phase === "present") return "live";
1865
- return state.captureStatus === "uploading" ? "analyzing" : "live";
1866
- }
1867
- function getCaptureMode(state) {
1868
- return state.currentMode === "passport" ? "passport" : "id";
1869
- }
1870
- //#endregion
1871
1428
  //#region src/modules/id/capture/capture.tsx
1872
1429
  var Capture = ({ manager, state }) => {
1873
1430
  const { enabled: resultPreviewEnabled, phase: resultPreviewPhase, isResultPreview, resultPreviewImageUrl, onCrossfadeEnd } = useCaptureResultPreview(state);
1431
+ const manualTooltipUx = useManualTooltipExperiment(manager, state);
1874
1432
  const stageView = getCaptureStageView(state, resultPreviewPhase);
1875
1433
  const isCrossfadeStage = stageView === "crossfade";
1876
1434
  const isLiveStage = stageView === "live";
1877
1435
  if (state.captureStatus === "holdOn") return /* @__PURE__ */ u(TransitionSpinner, { subtitleKey: "idv2.capture.holdOn.subtitle" });
1436
+ if ((state.captureStatus === "capturing" || state.captureStatus === "uploading") && !state.previewImageUrl) return /* @__PURE__ */ u(TransitionSpinner, { subtitleKey: "idv2.capture.holdOn.subtitle" });
1878
1437
  if (state.captureStatus === "success" && (state.previewImageUrl || state.barcodeFastPathCaptured)) return /* @__PURE__ */ u(IdSuccess, {
1879
1438
  manager,
1880
1439
  state,
@@ -1909,7 +1468,8 @@ var Capture = ({ manager, state }) => {
1909
1468
  state,
1910
1469
  isResultPreview,
1911
1470
  resultPreviewImageUrl,
1912
- hideFooterActions: !isLiveStage
1471
+ hideFooterActions: !isLiveStage,
1472
+ manualTooltipUx
1913
1473
  })
1914
1474
  }, "live");
1915
1475
  return /* @__PURE__ */ u("div", {
@@ -1917,7 +1477,7 @@ var Capture = ({ manager, state }) => {
1917
1477
  children: [idAnalyzingSlot, captureViewSlot]
1918
1478
  });
1919
1479
  };
1920
- var CaptureView = ({ manager, state, isResultPreview, resultPreviewImageUrl, hideFooterActions }) => {
1480
+ var CaptureView = ({ manager, state, isResultPreview, resultPreviewImageUrl, hideFooterActions, manualTooltipUx }) => {
1921
1481
  const frameRef = A(null);
1922
1482
  const helpButtonRef = A(null);
1923
1483
  const captureButtonRef = A(null);
@@ -1937,8 +1497,7 @@ var CaptureView = ({ manager, state, isResultPreview, resultPreviewImageUrl, hid
1937
1497
  useEventListener("resize", reportFrame);
1938
1498
  useResizeObserver(frameRef, reportFrame);
1939
1499
  const isCapturing = !isResultPreview && (state.captureStatus === "capturing" || state.detectionStatus === "capturing");
1940
- const detectionStatus = state.detectionStatus;
1941
- const showManualCapture = detectionStatus === "manualCapture" || state.showCaptureButtonInAuto && state.captureStatus === "detecting" && detectionStatus !== "capturing";
1500
+ const showManualCapture = isManualCaptureShown(state);
1942
1501
  const resultPreview = isResultPreview && resultPreviewImageUrl ? {
1943
1502
  imageUrl: resultPreviewImageUrl,
1944
1503
  blurImage: state.ageAssurance
@@ -1960,7 +1519,7 @@ var CaptureView = ({ manager, state, isResultPreview, resultPreviewImageUrl, hid
1960
1519
  const handleCapture = () => {
1961
1520
  manager.capture();
1962
1521
  };
1963
- const mirrored = getDeviceClass() === "desktop";
1522
+ const mirrored = !state.usingBackCamera;
1964
1523
  return /* @__PURE__ */ u(Page, {
1965
1524
  hideHeader: true,
1966
1525
  hideFooterBranding: true,
@@ -1984,7 +1543,8 @@ var CaptureView = ({ manager, state, isResultPreview, resultPreviewImageUrl, hid
1984
1543
  helpButtonRef,
1985
1544
  captureButtonRef,
1986
1545
  resultPreview,
1987
- hideFooterActions
1546
+ hideFooterActions,
1547
+ manualTooltipUx
1988
1548
  })
1989
1549
  }),
1990
1550
  /* @__PURE__ */ u("div", { ref: portalRef }),
@@ -1998,30 +1558,66 @@ var CaptureView = ({ manager, state, isResultPreview, resultPreviewImageUrl, hid
1998
1558
  });
1999
1559
  };
2000
1560
  //#endregion
1561
+ //#region src/modules/id/tutorialHelpers.ts
1562
+ /**
1563
+ * Resolves the tutorial's animation and copy for one document/side pairing.
1564
+ *
1565
+ * The three shapes are mutually exclusive, so each returns whole — passport
1566
+ * wins over side, matching the order the screen's copy was authored in.
1567
+ */
1568
+ function getTutorialContent(t, isPassport, isBack, disclaimerText) {
1569
+ let adjustedDisclaimerText;
1570
+ if (isBack) adjustedDisclaimerText = t("idv2.backTutorial.disclaimer");
1571
+ else adjustedDisclaimerText = t("idv2.tutorial.v2.autocapture");
1572
+ if (disclaimerText) adjustedDisclaimerText = disclaimerText;
1573
+ if (isPassport) return {
1574
+ animationKey: "id.tutorial.passport",
1575
+ title: t("idv2.capture.passport.title"),
1576
+ subtitle: t("idv2.capture.passport.subtitle"),
1577
+ disclaimerText: adjustedDisclaimerText
1578
+ };
1579
+ if (isBack) return {
1580
+ animationKey: "id.tutorial.back",
1581
+ title: t("idv2.backTutorial.title"),
1582
+ subtitle: t("idv2.backTutorial.subtitle"),
1583
+ disclaimerText: adjustedDisclaimerText
1584
+ };
1585
+ return {
1586
+ animationKey: "id.tutorial.front",
1587
+ title: t("idv2.tutorial.title"),
1588
+ subtitle: t("idv2.tutorial.subtitle"),
1589
+ disclaimerText: adjustedDisclaimerText
1590
+ };
1591
+ }
1592
+ //#endregion
2001
1593
  //#region src/modules/id/tutorial.tsx
2002
- var Tutorial = ({ manager, state }) => {
1594
+ var Tutorial = ({ manager, documentType, mode, isLoading: isLoadingProp, actionsSlot, onContinue, disclaimerText, shouldScaleAnimationContainer = true }) => {
2003
1595
  const { t } = useTranslation();
2004
- const [isLoading, setIsLoading] = d(false);
2005
- const isPassport = state.selectedDocumentType === "passport";
2006
- const isBack = state.currentMode === "back";
2007
- const { data: animationData, isOverride } = useAnimationData(isPassport ? "id.tutorial.passport" : isBack ? "id.tutorial.back" : "id.tutorial.front");
2008
- const title = isPassport ? t("idv2.capture.passport.title") : isBack ? t("idv2.backTutorial.title") : t("idv2.tutorial.title");
2009
- const subtitle = isPassport ? t("idv2.capture.passport.subtitle") : isBack ? t("idv2.backTutorial.subtitle") : t("idv2.tutorial.subtitle");
2010
- const disclaimerText = isBack ? t("idv2.backTutorial.disclaimer") : t("idv2.tutorial.v2.autocapture");
1596
+ const [internalIsLoading, setInternalIsLoading] = d(false);
1597
+ const isLoading = isLoadingProp ?? internalIsLoading;
1598
+ const isPassport = documentType === "passport";
1599
+ const tutorialContent = getTutorialContent(t, isPassport, mode === "back", disclaimerText);
1600
+ const { data: animationData, isOverride } = useAnimationData(tutorialContent.animationKey);
2011
1601
  const handleContinue = async () => {
2012
- setIsLoading(true);
1602
+ if (isLoadingProp === void 0) setInternalIsLoading(true);
1603
+ if (onContinue) {
1604
+ onContinue();
1605
+ return;
1606
+ }
2013
1607
  await manager.nextStep();
2014
1608
  };
2015
1609
  return /* @__PURE__ */ u(BaseTutorial, {
2016
1610
  animationData,
2017
1611
  recolor: !isOverride,
2018
- title,
2019
- subtitle,
1612
+ title: tutorialContent.title,
1613
+ subtitle: tutorialContent.subtitle,
2020
1614
  onContinue: handleContinue,
2021
1615
  buttonText: t("idv2.tutorial.startScan"),
2022
- disclaimerText,
1616
+ disclaimerText: tutorialContent.disclaimerText,
2023
1617
  isLoading,
2024
- className: cn("IncodeIdTutorial", isPassport ? "IncodeIdTutorialPassport" : "IncodeIdTutorialId")
1618
+ actionsSlot,
1619
+ className: cn("IncodeIdTutorial", isPassport ? "IncodeIdTutorialPassport" : "IncodeIdTutorialId"),
1620
+ shouldScaleAnimationContainer
2025
1621
  });
2026
1622
  };
2027
1623
  //#endregion
@@ -3050,40 +2646,47 @@ var DigitalIdIcon = () => {
3050
2646
  //#endregion
3051
2647
  //#region src/modules/id/chooser/chooser.constants.ts
3052
2648
  var CHOOSER_OPTIONS_LOOKUP = {
2649
+ digitalIdRedirect: {
2650
+ type: "digitalIdRedirect",
2651
+ icon: DigitalIdIcon,
2652
+ title: "idv2.chooser.digitalIdRedirectButtonTitle",
2653
+ testId: "verification-option-digitalIdRedirect",
2654
+ weight: 1
2655
+ },
3053
2656
  digitalIdUpload: {
3054
2657
  type: "digitalIdUpload",
3055
2658
  icon: DigitalIdIcon,
3056
2659
  title: "idv2.chooser.digitalIdUploadButtonTitle",
3057
2660
  testId: "verification-option-digitalIdUpload",
3058
- weight: 1
2661
+ weight: 2
3059
2662
  },
3060
2663
  id: {
3061
2664
  type: "id",
3062
2665
  icon: IdCardIcon,
3063
2666
  title: "idv2.chooser.idButtonTitle",
3064
2667
  testId: "verification-option-id",
3065
- weight: 2
2668
+ weight: 3
3066
2669
  },
3067
2670
  passport: {
3068
2671
  type: "passport",
3069
2672
  icon: PassportIcon,
3070
2673
  title: "idv2.chooser.passportButtonTitle",
3071
2674
  testId: "verification-option-passport",
3072
- weight: 3
2675
+ weight: 4
3073
2676
  },
3074
2677
  digitalId: {
3075
2678
  icon: DeviceWalletsIcon,
3076
2679
  title: "idv2.chooser.digitalIdButtonTitle",
3077
2680
  testId: "verification-option-digitalId",
3078
2681
  type: "digitalId",
3079
- weight: 4
2682
+ weight: 5
3080
2683
  },
3081
2684
  manualIdUpload: {
3082
2685
  type: "manualIdUpload",
3083
2686
  icon: UploadIdIcon,
3084
2687
  title: "idv2.chooser.manualUploadButtonTitle",
3085
2688
  testId: "verification-option-manualIdUpload",
3086
- weight: 5
2689
+ weight: 6
3087
2690
  }
3088
2691
  };
3089
2692
  //#endregion
@@ -3154,4 +2757,4 @@ var FlipAnimation = ({ manager, direction }) => {
3154
2757
  });
3155
2758
  };
3156
2759
  //#endregion
3157
- export { TextArea as _, IdNoAttempts as a, ProgressBar as b, useIdExperiment as c, CaptureFooter as d, CameraOverlayHeader as f, TextAreaComposed as g, VerificationOptionCardList as h, Capture as i, CaptureFrame as l, VerificationOptionCard as m, Chooser as n, IdExpired as o, CameraOverlay as p, Tutorial as r, IdError as s, FlipAnimation as t, ManualCapture as u, SegmentedDateInput as v, Overlay as x, PasswordInputComposed as y };
2760
+ export { VerificationOptionCard as _, IdNoAttempts as a, canFlipCapturedCard as c, CAMERA_PERMISSION_UX as d, CONTINUING_TUTORIAL_PHASES as f, PERMISSION_DIALOG_STATUS as g, ID_CAPTURE_STATUS as h, Capture as i, CaptureFrame as l, ID_CAPTURE_LOADING_PHASE as m, Chooser as n, IdExpired as o, EXPERIMENT_LIFECYCLE_STATUS as p, Tutorial as r, IdError as s, FlipAnimation as t, useIdExperiment as u, VerificationOptionCardList as v };