@incodetech/web 0.0.0-dev-20260608-c8c427ca → 0.0.0-dev-20260608-fe5ac64f

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 (206) hide show
  1. package/dist/ae-signature/ae-signature.es.js +15 -13
  2. package/dist/aligndevicelottie-DY_bX_p8.js +12769 -0
  3. package/dist/antifraud/antifraud.es.js +22 -19
  4. package/dist/authentication/authentication.es.js +42 -33
  5. package/dist/autoFocusTitle-DM6PvgcP.js +29 -0
  6. package/dist/{back-horizontal-hint-DsPhKbR4.js → back-horizontal-hint-BXYix0Wj.js} +26 -26
  7. package/dist/back-tutorial-vb1MxlrT.js +14597 -0
  8. package/dist/{back-vertical-hint-BFJbYQrX.js → back-vertical-hint-DNSh6JNH.js} +27 -27
  9. package/dist/backdevicelottie-HypPqBz7.js +16690 -0
  10. package/dist/blurdevicelottie-CBXtBFiJ.js +15951 -0
  11. package/dist/bottomSheet-BuzqNQtG.js +39 -0
  12. package/dist/browser-ponyfill-CLLvZCVg.js +441 -0
  13. package/dist/button-B-qlr4iI.js +35 -0
  14. package/dist/checkbox-CTPETqo5.js +96 -0
  15. package/dist/consent/consent.es.js +75 -64
  16. package/dist/countrySelector-CzyuaDIs.js +60 -0
  17. package/dist/cpf-ocr/cpf-ocr.es.js +2 -2
  18. package/dist/cpfOcr-7DkO3a4-.js +92 -0
  19. package/dist/cpfOcr-BrpGqevl.js +2 -0
  20. package/dist/cross-document-data-match/cross-document-data-match.es.js +20 -17
  21. package/dist/curp-validation/curp-validation.es.js +246 -211
  22. package/dist/customFields-CJxcEDgu.js +140 -0
  23. package/dist/customWatchlist-BvfsU7r-.js +36 -0
  24. package/dist/dateInputComposed-BsPQHG5o.js +1 -0
  25. package/dist/dateInputComposed-DY97tQVK.js +69 -0
  26. package/dist/defineProperty-mefzVtTv.js +39 -0
  27. package/dist/document-capture/document-capture.es.js +2 -2
  28. package/dist/documentCapture-CQSmWEdd.js +876 -0
  29. package/dist/documentCapture-r1zYPBgS.js +2 -0
  30. package/dist/dropdownComposed-BF4L-7mJ.js +380 -0
  31. package/dist/dropdownComposed-mvHuRFHn.js +1 -0
  32. package/dist/dynamicForms-DranXtuE.js +352 -0
  33. package/dist/ekyb/ekyb.es.js +2 -2
  34. package/dist/ekybModule-DOOUw8h0.js +2 -0
  35. package/dist/ekybModule-DSOvdViS.js +279 -0
  36. package/dist/ekyc/ekyc.es.js +2 -2
  37. package/dist/ekycModule-BYHmHRia.js +2 -0
  38. package/dist/ekycModule-DtzcD2wV.js +257 -0
  39. package/dist/electronic-signature/electronic-signature.es.js +2 -2
  40. package/dist/electronic-signature-B0SDITm5.js +426 -0
  41. package/dist/email/email.es.js +198 -78
  42. package/dist/emailInput-D8qiAdjn.js +39 -0
  43. package/dist/errorIcon-B0rmz3rw.js +26 -0
  44. package/dist/expiredId-Du3HsBaI.js +85 -0
  45. package/dist/extensibility-FK5oOsIJ.js +3070 -0
  46. package/dist/extensibility.es.js +26 -26
  47. package/dist/face-match/face-match.es.js +2 -2
  48. package/dist/faceMatch-C0UL_xA7.js +2 -0
  49. package/dist/faceMatch-DJMba1pt.js +343 -0
  50. package/dist/field-comparison/field-comparison.es.js +2 -2
  51. package/dist/fieldComparison-CcJA6KR5.js +88 -0
  52. package/dist/fieldComparison-CvnNOIWA.js +2 -0
  53. package/dist/{flip-animation-CuQ57qTn.js → flip-animation-BGRvygw9.js} +4221 -4221
  54. package/dist/flow/flow.es.js +597 -493
  55. package/dist/{front-horizontal-hint-CKm7PnmS.js → front-horizontal-hint-CLSU0iVo.js} +70 -70
  56. package/dist/{front-vertical-hint-CLHC2qoH.js → front-vertical-hint-BWq-yWQ8.js} +81 -81
  57. package/dist/frontdevicelottie-CLqitJhG.js +17314 -0
  58. package/dist/geolocation/geolocation.es.js +485 -395
  59. package/dist/glaredevicelottie-BS04U6Fc.js +14478 -0
  60. package/dist/governmentValidation/governmentValidation.es.js +67 -59
  61. package/dist/homeScreen-BsEYyiDB.js +264 -0
  62. package/dist/hooks-BtgmGvba.js +149 -0
  63. package/dist/i18n-gTHArCl9.js +2971 -0
  64. package/dist/icons-DKY3xDkf.js +360 -0
  65. package/dist/id/id.es.js +565 -413
  66. package/dist/id-laser-h-DX8UbVNH.js +467 -0
  67. package/dist/id-laser-v-DhnHdjlB.js +490 -0
  68. package/dist/id-tutorial-lj4iKtYT.js +13165 -0
  69. package/dist/id-verification/id-verification.es.js +21 -18
  70. package/dist/idOcr-CfqkKAZH.js +123 -0
  71. package/dist/identity-reuse/identity-reuse.es.js +168 -130
  72. package/dist/incode-logo-57XFniXU.js +4 -0
  73. package/dist/incodeComponent-CDJxFZvS.js +63 -0
  74. package/dist/incodeModule-DkA_yd0X.js +13 -0
  75. package/dist/index.es.js +16 -14
  76. package/dist/inputComposed-5V2nLTqH.js +99 -0
  77. package/dist/inputComposed-BPOYwUBl.js +1 -0
  78. package/dist/loadingIcon-DN62ugKs.js +148 -0
  79. package/dist/lottie_light-Dp9Bz3mf.js +9031 -0
  80. package/dist/mandatoryConsent-DxL7lmfQ.js +107 -0
  81. package/dist/modal-B5QeulDu.js +153 -0
  82. package/dist/modal.hooks-C7K9k_pY.js +202 -0
  83. package/dist/numberedStep-DVAyTPv1.js +13 -0
  84. package/dist/optionAccessibleLabel-Czc2YC8z.js +202 -0
  85. package/dist/otpInput-2IQ-JCK8.js +195 -0
  86. package/dist/page-6bCuq5Q6.js +70 -0
  87. package/dist/{passport-horizontal-hint-C_le0HVU.js → passport-horizontal-hint-DfVsf4Cc.js} +55 -55
  88. package/dist/{passport-tutorial-BYN4T_TE.js → passport-tutorial-zT1ZoA-D.js} +7096 -7084
  89. package/dist/{passport-vertical-hint-H-pyICSv.js → passport-vertical-hint-DVxbTyQp.js} +49 -49
  90. package/dist/pdf-BZA70WbM.js +22398 -0
  91. package/dist/pdfViewer-Dr63sJ51.js +114 -0
  92. package/dist/phone/phone.es.js +214 -87
  93. package/dist/phoneInputComposed-D_IabWKJ.js +12142 -0
  94. package/dist/processing-B_u8wUB7.js +8 -0
  95. package/dist/qe-signature/qe-signature.es.js +15 -13
  96. package/dist/radioGroupComposed-DwYW-Ld-.js +215 -0
  97. package/dist/redirect-to-mobile/redirect-to-mobile.es.js +2099 -859
  98. package/dist/registerIncodeElement-BJJGzVdq.js +11 -0
  99. package/dist/requiredLabelHint-DEadtiwx.js +17 -0
  100. package/dist/richText-C7GUm0WL.js +3153 -0
  101. package/dist/rolldown-runtime--E5BIlTp.js +33 -0
  102. package/dist/selfie/selfie.es.js +54 -42
  103. package/dist/selfieTutorial-CtruLyO2.js +2689 -0
  104. package/dist/signature/signature.es.js +765 -406
  105. package/dist/snackbar-Dz9crm39.js +16 -0
  106. package/dist/spinner-BfBIZkDQ.js +42 -0
  107. package/dist/spinner-DEDtE7Pz.js +1 -0
  108. package/dist/statusPage-B1Ef7J5K.js +28 -0
  109. package/dist/successIcon-rmzr-pxu.js +30 -0
  110. package/dist/tabs--UMd6eEB.js +103 -0
  111. package/dist/transitionSpinner-CWhGcr7c.js +26 -0
  112. package/dist/{tutorial-QzQ536BL.js → tutorial-y-nq6ZhF.js} +832 -578
  113. package/dist/types/index.d.ts +13 -4
  114. package/dist/typography-BK4AmfKX.js +45 -0
  115. package/dist/uiConfig-sgEkFuuA.js +25 -0
  116. package/dist/useModuleLoader-8LslB-YG.js +670 -0
  117. package/dist/vendor-preact-BH7vOa2r.js +957 -0
  118. package/dist/verificationResult-CbVRf6Kh.js +91 -0
  119. package/dist/verifiedByIncode-8QBn-kgZ.js +103 -0
  120. package/dist/watchlist/watchlist.es.js +31 -26
  121. package/dist/watchlistForBusiness-Dfn1UMow.js +80 -0
  122. package/dist/workflow/workflow.es.js +251 -209
  123. package/package.json +4 -2
  124. package/dist/aligndevicelottie-D8KsO77t.js +0 -12757
  125. package/dist/autoFocusTitle-BpYdaSUM.js +0 -16
  126. package/dist/back-tutorial-DhSE2FJo.js +0 -14585
  127. package/dist/backdevicelottie-CJWGVMdw.js +0 -16678
  128. package/dist/blurdevicelottie-Dxt2deEB.js +0 -15939
  129. package/dist/bottomSheet-QrpyatOD.js +0 -31
  130. package/dist/browser-ponyfill-Crda_c5R.js +0 -299
  131. package/dist/button-DcCUEn2n.js +0 -24
  132. package/dist/checkbox-DCCzBAuF.js +0 -86
  133. package/dist/countrySelector-CJ8egQ4C.js +0 -58
  134. package/dist/cpfOcr-Db06i-Lm.js +0 -2
  135. package/dist/cpfOcr-FixhUeMQ.js +0 -79
  136. package/dist/customFields-C1G9xHNX.js +0 -125
  137. package/dist/customWatchlist-IKEblz7u.js +0 -31
  138. package/dist/dateInputComposed-Cg8BvYSK.js +0 -1
  139. package/dist/dateInputComposed-Ddd7HLyM.js +0 -58
  140. package/dist/defineProperty-xczUyn-m.js +0 -39
  141. package/dist/documentCapture-D9I7FjGe.js +0 -2
  142. package/dist/documentCapture-b61wlala.js +0 -765
  143. package/dist/dropdownComposed-B4U0AIak.js +0 -1
  144. package/dist/dropdownComposed-CS2pyn-g.js +0 -293
  145. package/dist/dynamicForms-tYQog0kw.js +0 -298
  146. package/dist/ekybModule-C33C4JES.js +0 -237
  147. package/dist/ekybModule-LON6G2Bz.js +0 -2
  148. package/dist/ekycModule-BJOgtTAh.js +0 -225
  149. package/dist/ekycModule-BSf_DIG7.js +0 -2
  150. package/dist/electronic-signature-OdgTyso4.js +0 -406
  151. package/dist/emailInput-CU7mLB21.js +0 -37
  152. package/dist/errorIcon-DpHzAoAo.js +0 -24
  153. package/dist/expiredId-nfVAZgTL.js +0 -70
  154. package/dist/extensibility-BbNy3mVG.js +0 -2602
  155. package/dist/faceMatch-BIila4kf.js +0 -2
  156. package/dist/faceMatch-DJ7Mqujx.js +0 -206
  157. package/dist/fieldComparison-D2RSFYl-.js +0 -84
  158. package/dist/fieldComparison-DbUyouFd.js +0 -2
  159. package/dist/frontdevicelottie-65Vyfpff.js +0 -17302
  160. package/dist/glaredevicelottie-BEyaqtc6.js +0 -14466
  161. package/dist/homeScreen-CyPddxWl.js +0 -227
  162. package/dist/hooks-MxHtZWTS.js +0 -112
  163. package/dist/i18n-Kzzvkz94.js +0 -2019
  164. package/dist/icons-9I5g9-_1.js +0 -292
  165. package/dist/id-laser-h-iCPbFixz.js +0 -467
  166. package/dist/id-laser-v-CNzwliP2.js +0 -483
  167. package/dist/id-tutorial-CF4nO4oX.js +0 -13153
  168. package/dist/idOcr-DlMLMDqa.js +0 -97
  169. package/dist/incode-logo-DX016usY.js +0 -4
  170. package/dist/incodeComponent-BoFhgK7G.js +0 -50
  171. package/dist/incodeModule-BiCoAJ5k.js +0 -13
  172. package/dist/inputComposed-DAEey9xm.js +0 -94
  173. package/dist/inputComposed-eS4B0Mkh.js +0 -1
  174. package/dist/loadingIcon-BN5YRQUb.js +0 -104
  175. package/dist/lottie_light-DLqSnziX.js +0 -4419
  176. package/dist/mandatoryConsent-DNz2jZ43.js +0 -98
  177. package/dist/modal-ZqAhwiRF.js +0 -135
  178. package/dist/modal.hooks-LdusROLW.js +0 -126
  179. package/dist/numberedStep-CdLWASwL.js +0 -11
  180. package/dist/optionAccessibleLabel-DcygPaME.js +0 -140
  181. package/dist/otpInput-C4pk4BJU.js +0 -157
  182. package/dist/page-DA3R7q0J.js +0 -69
  183. package/dist/pdf-51QeiFSx.js +0 -14967
  184. package/dist/pdfViewer-rKzTHket.js +0 -64
  185. package/dist/phoneInputComposed-CjAxk2Gj.js +0 -11230
  186. package/dist/processing-DPktVde2.js +0 -6
  187. package/dist/radioGroupComposed-DRRxVk9Z.js +0 -178
  188. package/dist/registerIncodeElement-BHWOwdSS.js +0 -7
  189. package/dist/requiredLabelHint-B6FN3v88.js +0 -13
  190. package/dist/richText-6pIbydcz.js +0 -1973
  191. package/dist/rolldown-runtime-CYMK-g2i.js +0 -20
  192. package/dist/selfieTutorial-Yo9AlUoT.js +0 -2677
  193. package/dist/snackbar-CQiiWO4p.js +0 -14
  194. package/dist/spinner-B4dcie2T.js +0 -1
  195. package/dist/spinner-CKnjVHxw.js +0 -39
  196. package/dist/statusPage-B8b3Jg6N.js +0 -28
  197. package/dist/successIcon-SlKgTSty.js +0 -28
  198. package/dist/tabs-D7lGst3Q.js +0 -78
  199. package/dist/transitionSpinner-Di3bOyOu.js +0 -17
  200. package/dist/typography-CxjaknHN.js +0 -28
  201. package/dist/uiConfig-CwpQ-IM6.js +0 -20
  202. package/dist/useModuleLoader-Bqs7fglI.js +0 -517
  203. package/dist/vendor-preact-D6SntenC.js +0 -958
  204. package/dist/verificationResult-DhT3hH1b.js +0 -90
  205. package/dist/verifiedByIncode-DpbxzO0y.js +0 -101
  206. package/dist/watchlistForBusiness-CRXVbH4l.js +0 -75
@@ -1,21 +1,24 @@
1
- import { v as e } from "../vendor-preact-D6SntenC.js";
2
- import { c as t, o as n } from "../hooks-MxHtZWTS.js";
3
- import { t as r } from "../incodeComponent-BoFhgK7G.js";
4
- import { t as i } from "../spinner-CKnjVHxw.js";
5
- import { t as a } from "../expiredId-nfVAZgTL.js";
6
- import { t as o } from "../incodeModule-BiCoAJ5k.js";
7
- import { createIdVerificationManager as s } from "@incodetech/core/id-verification";
1
+ import { v as u } from "../vendor-preact-BH7vOa2r.js";
2
+ import { c as useManager, o as useModuleTerminalCallbacks } from "../hooks-BtgmGvba.js";
3
+ import { t as IncodeComponent } from "../incodeComponent-CDJxFZvS.js";
4
+ import { t as Spinner } from "../spinner-BfBIZkDQ.js";
5
+ import { t as ExpiredId } from "../expiredId-Du3HsBaI.js";
6
+ import { t as registerIncodeModuleElement } from "../incodeModule-DkA_yd0X.js";
7
+ import { createIdVerificationManager } from "@incodetech/core/id-verification";
8
8
  //#region src/modules/id-verification/id-verification.tsx
9
- var c = ({ config: r, onFinish: o }) => {
10
- let [c, l] = t(() => s({ config: r }));
11
- return n({
12
- status: c.status === "finished" ? "finished" : "loading",
13
- onFinish: o
14
- }), c.status === "expired" ? /* @__PURE__ */ e(a, { onContinue: () => l.continue() }) : /* @__PURE__ */ e(i, { fullScreen: !0 });
15
- }, l = ({ config: t, onFinish: n }) => /* @__PURE__ */ e(r, { children: t ? /* @__PURE__ */ e(c, {
16
- config: t,
17
- onFinish: n
9
+ var IdVerificationContent = ({ config, onFinish }) => {
10
+ const [state, manager] = useManager(() => createIdVerificationManager({ config }));
11
+ useModuleTerminalCallbacks({
12
+ status: state.status === "finished" ? "finished" : "loading",
13
+ onFinish
14
+ });
15
+ if (state.status === "expired") return /* @__PURE__ */ u(ExpiredId, { onContinue: () => manager.continue() });
16
+ return /* @__PURE__ */ u(Spinner, { fullScreen: true });
17
+ };
18
+ var IdVerification = ({ config, onFinish }) => /* @__PURE__ */ u(IncodeComponent, { children: config ? /* @__PURE__ */ u(IdVerificationContent, {
19
+ config,
20
+ onFinish
18
21
  }) : null });
19
- o(l, "incode-id-verification");
22
+ registerIncodeModuleElement(IdVerification, "incode-id-verification");
20
23
  //#endregion
21
- export { l as IdVerification };
24
+ export { IdVerification };
@@ -0,0 +1,123 @@
1
+ import { n as useTranslation } from "./i18n-gTHArCl9.js";
2
+ import { d as T, v as u } from "./vendor-preact-BH7vOa2r.js";
3
+ import { c as useManager, o as useModuleTerminalCallbacks } from "./hooks-BtgmGvba.js";
4
+ import { t as IncodeComponent } from "./incodeComponent-CDJxFZvS.js";
5
+ import { t as Page } from "./page-6bCuq5Q6.js";
6
+ import "./extensibility-FK5oOsIJ.js";
7
+ import { t as Button } from "./button-B-qlr4iI.js";
8
+ import { t as VerificationResult } from "./verificationResult-CbVRf6Kh.js";
9
+ import { t as InputComposed } from "./inputComposed-5V2nLTqH.js";
10
+ import { t as RadioGroupComposed } from "./radioGroupComposed-DwYW-Ld-.js";
11
+ import { t as DateInputComposed } from "./dateInputComposed-DY97tQVK.js";
12
+ import { t as registerIncodeModuleElement } from "./incodeModule-DkA_yd0X.js";
13
+ import { n as getRequiredHintMode, t as getFieldHint } from "./requiredLabelHint-DEadtiwx.js";
14
+ import { createIdOcrManager, getOcrFields } from "@incodetech/core/id-ocr";
15
+ //#region src/modules/id-ocr/idOcrForm.tsx
16
+ var TEXT_FIELD_COMPONENTS = {
17
+ text: InputComposed,
18
+ date: DateInputComposed
19
+ };
20
+ var IdOcrForm = ({ fields, data, validationErrors, isReadonly, onChange, onBlur, onContinue }) => {
21
+ const { t } = useTranslation();
22
+ const hasValidationErrors = validationErrors && Object.keys(validationErrors).length > 0;
23
+ const visibleFields = fields.filter((field) => {
24
+ if (field.key === "issuingCountry") return isReadonly === true;
25
+ if (field.key === "documentNumber" && isReadonly) return !!data.documentNumber;
26
+ return true;
27
+ });
28
+ const mode = T(() => getRequiredHintMode(visibleFields.map((f) => isReadonly ? false : f.required)), [visibleFields, isReadonly]);
29
+ const renderField = (field) => {
30
+ const value = data[field.key] ?? "";
31
+ const fieldErrorKey = validationErrors?.[field.key];
32
+ const fieldError = fieldErrorKey ? t(fieldErrorKey) : void 0;
33
+ const isFieldRequired = isReadonly ? false : field.required;
34
+ const hint = getFieldHint(mode, isFieldRequired);
35
+ const labelHint = hint ? t(`forms.label.${hint}`) : void 0;
36
+ if (field.type === "radio") return /* @__PURE__ */ u(RadioGroupComposed, {
37
+ id: `id-ocr-${field.key}`,
38
+ class: "IncodeIdOcrRadioGroup",
39
+ label: t(field.labelKey),
40
+ labelHint,
41
+ value,
42
+ options: (field.options ?? []).map((option) => ({
43
+ value: option.value,
44
+ label: t(option.label)
45
+ })),
46
+ required: isFieldRequired,
47
+ disabled: isReadonly,
48
+ onChange: (next) => onChange(field.key, next)
49
+ }, field.key);
50
+ const Component = TEXT_FIELD_COMPONENTS[field.type];
51
+ const max = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
52
+ return /* @__PURE__ */ u(Component, {
53
+ id: `id-ocr-${field.key}`,
54
+ label: t(field.labelKey),
55
+ labelHint,
56
+ value,
57
+ disabled: isReadonly,
58
+ required: isFieldRequired,
59
+ error: fieldError,
60
+ showErrorIcon: !!fieldError,
61
+ onInput: (e) => onChange(field.key, e.target.value),
62
+ onBlur: isReadonly || !onBlur ? void 0 : () => onBlur(field.key),
63
+ ...field.type === "date" && { max }
64
+ }, field.key);
65
+ };
66
+ return /* @__PURE__ */ u("div", {
67
+ className: "IncodeIdOcrForm",
68
+ children: [visibleFields.map(renderField), /* @__PURE__ */ u("div", {
69
+ className: "IncodeIdOcrButton",
70
+ children: /* @__PURE__ */ u(Button, {
71
+ onClick: onContinue,
72
+ disabled: hasValidationErrors,
73
+ children: t("common.continue")
74
+ })
75
+ })]
76
+ });
77
+ };
78
+ //#endregion
79
+ //#region src/modules/id-ocr/idOcr.tsx
80
+ var IdOcrContent = ({ config, onFinish }) => {
81
+ const { t } = useTranslation();
82
+ const [state, manager] = useManager(() => createIdOcrManager({ config }));
83
+ useModuleTerminalCallbacks({
84
+ status: state.status === "finished" ? "finished" : "loading",
85
+ onFinish
86
+ });
87
+ if (state.status === "finished") return null;
88
+ if (state.status === "success") return /* @__PURE__ */ u(VerificationResult, {
89
+ status: "success",
90
+ successTitle: t("idOcr.successTitle")
91
+ });
92
+ if (state.status === "error") return /* @__PURE__ */ u(VerificationResult, {
93
+ status: "failure",
94
+ onRetry: () => manager.retry()
95
+ });
96
+ if (state.status === "loading" || state.status === "submitting") return /* @__PURE__ */ u(VerificationResult, {
97
+ status: "submitting",
98
+ submittingTitle: t("common.holdOnASec"),
99
+ submittingSubtitle: t("idOcr.loadingSubtitle")
100
+ });
101
+ if (state.status === "readonly" || state.status === "inputting") return /* @__PURE__ */ u(Page, {
102
+ title: t("idOcr.title"),
103
+ className: "IncodeIdOcrPage",
104
+ hideFooterBranding: true,
105
+ children: /* @__PURE__ */ u(IdOcrForm, {
106
+ fields: getOcrFields(config),
107
+ data: state.formData,
108
+ validationErrors: state.status === "inputting" ? state.validationErrors : void 0,
109
+ isReadonly: state.status === "readonly",
110
+ onChange: (field, value) => manager.setField(field, value),
111
+ onBlur: state.status === "inputting" ? (field) => manager.validateField(field) : void 0,
112
+ onContinue: () => manager.continue()
113
+ }, state.ocrDocument)
114
+ });
115
+ return null;
116
+ };
117
+ var IdOcr = ({ config, onFinish }) => /* @__PURE__ */ u(IncodeComponent, { children: config ? /* @__PURE__ */ u(IdOcrContent, {
118
+ config,
119
+ onFinish
120
+ }) : null });
121
+ registerIncodeModuleElement(IdOcr, "incode-id-ocr");
122
+ //#endregion
123
+ export { IdOcr };
@@ -1,14 +1,19 @@
1
- import { n as e } from "../i18n-Kzzvkz94.js";
2
- import { _ as t, v as n } from "../vendor-preact-D6SntenC.js";
3
- import { c as r, o as i } from "../hooks-MxHtZWTS.js";
4
- import { t as a } from "../incodeComponent-BoFhgK7G.js";
5
- import { t as o } from "../page-DA3R7q0J.js";
6
- import { t as s } from "../spinner-CKnjVHxw.js";
7
- import { t as c } from "../button-DcCUEn2n.js";
8
- import { t as l } from "../incodeModule-BiCoAJ5k.js";
9
- import { SCAN_NEW_DOCUMENT as u, createIdentityReuseManager as d } from "@incodetech/core/identity-reuse";
1
+ import { n as useTranslation } from "../i18n-gTHArCl9.js";
2
+ import { _ as y, v as u } from "../vendor-preact-BH7vOa2r.js";
3
+ import { c as useManager, o as useModuleTerminalCallbacks } from "../hooks-BtgmGvba.js";
4
+ import { t as IncodeComponent } from "../incodeComponent-CDJxFZvS.js";
5
+ import { t as Page } from "../page-6bCuq5Q6.js";
6
+ import { t as Spinner } from "../spinner-BfBIZkDQ.js";
7
+ import { t as Button } from "../button-B-qlr4iI.js";
8
+ import { t as registerIncodeModuleElement } from "../incodeModule-DkA_yd0X.js";
9
+ import { SCAN_NEW_DOCUMENT, createIdentityReuseManager } from "@incodetech/core/identity-reuse";
10
10
  //#region src/modules/identity-reuse/identity-reuse.tsx
11
- var f = {
11
+ /**
12
+ * ISO 3166-1 alpha-3 → alpha-2 mapping for countries the SDK supports.
13
+ * The identity-reuse backend returns alpha-3 codes; flag rendering needs
14
+ * alpha-2. Extend as backend support expands; unmapped codes fall back to "".
15
+ */
16
+ var ISO3_TO_ISO2 = {
12
17
  USA: "US",
13
18
  MEX: "MX",
14
19
  CAN: "CA",
@@ -100,190 +105,223 @@ var f = {
100
105
  MLT: "MT",
101
106
  CYP: "CY"
102
107
  };
103
- function p(e) {
104
- if (!e) return "";
105
- let t = e.toUpperCase(), n = t.length === 3 ? f[t] ?? "" : t;
106
- if (n.length !== 2) return "";
107
- let r = 127397;
108
- return String.fromCodePoint(n.charCodeAt(0) + r, n.charCodeAt(1) + r);
108
+ /** Convert an ISO-2 or ISO-3 country code to a flag emoji. */
109
+ function countryCodeToFlag(countryCode) {
110
+ if (!countryCode) return "";
111
+ const upper = countryCode.toUpperCase();
112
+ const iso2 = upper.length === 3 ? ISO3_TO_ISO2[upper] ?? "" : upper;
113
+ if (iso2.length !== 2) return "";
114
+ const A_OFFSET = 127462 - "A".charCodeAt(0);
115
+ return String.fromCodePoint(iso2.charCodeAt(0) + A_OFFSET, iso2.charCodeAt(1) + A_OFFSET);
109
116
  }
110
- function m(e, t) {
111
- if (!Number.isFinite(e) || e <= 0) return null;
112
- let n = e >= 0xe8d4a51000 ? e : e * 1e3, r = new Date(n);
113
- return Number.isNaN(r.getTime()) ? null : new Intl.DateTimeFormat(t, {
117
+ /**
118
+ * Format a backend verification timestamp as a locale-aware short date
119
+ * (e.g. "15 Apr 2023" in en-US). Auto-detects unit: values >= 1e12 are
120
+ * treated as milliseconds, smaller values as unix seconds (the documents
121
+ * API returns seconds, possibly with fractional millis). Returns null if
122
+ * the value can't be parsed so the caller can hide the row instead of
123
+ * rendering a half-empty "Verified" with no date.
124
+ */
125
+ function formatVerifiedAt(timestamp, locale) {
126
+ if (!Number.isFinite(timestamp) || timestamp <= 0) return null;
127
+ const ms = timestamp >= 0xe8d4a51000 ? timestamp : timestamp * 1e3;
128
+ const date = new Date(ms);
129
+ if (Number.isNaN(date.getTime())) return null;
130
+ return new Intl.DateTimeFormat(locale, {
114
131
  day: "2-digit",
115
132
  month: "short",
116
133
  year: "numeric"
117
- }).format(r);
134
+ }).format(date);
118
135
  }
119
- var h = ({ checked: e }) => /* @__PURE__ */ n("span", {
120
- class: `IncodeIdentityReuseRadio ${e ? "IncodeIdentityReuseRadioChecked" : ""}`,
136
+ var RadioDot = ({ checked }) => /* @__PURE__ */ u("span", {
137
+ class: `IncodeIdentityReuseRadio ${checked ? "IncodeIdentityReuseRadioChecked" : ""}`,
121
138
  "aria-hidden": "true",
122
- children: e ? /* @__PURE__ */ n("span", { class: "IncodeIdentityReuseRadioInner" }) : null
123
- }), g = ({ document: t, selected: r, recommended: i, tabIndex: a, onSelect: o, locale: s }) => {
124
- let { t: c } = e(), l = c(`identityReuse.documentType.${t.documentType}`), u = p(t.countryCode), d = m(t.verifiedAt, s), f = c("identityReuse.verified", { defaultValue: "Verified" }), g = d ? `${f} ${d}` : null;
125
- return /* @__PURE__ */ n("button", {
139
+ children: checked ? /* @__PURE__ */ u("span", { class: "IncodeIdentityReuseRadioInner" }) : null
140
+ });
141
+ var DocumentCard = ({ document, selected, recommended, tabIndex, onSelect, locale }) => {
142
+ const { t } = useTranslation();
143
+ const typeLabel = t(`identityReuse.documentType.${document.documentType}`);
144
+ const flag = countryCodeToFlag(document.countryCode);
145
+ const verifiedDate = formatVerifiedAt(document.verifiedAt, locale);
146
+ const verifiedWord = t("identityReuse.verified", { defaultValue: "Verified" });
147
+ const verifiedLabel = verifiedDate ? `${verifiedWord} ${verifiedDate}` : null;
148
+ return /* @__PURE__ */ u("button", {
126
149
  type: "button",
127
- class: `IncodeIdentityReuseCard ${r ? "IncodeIdentityReuseCardSelected" : ""}`,
150
+ class: `IncodeIdentityReuseCard ${selected ? "IncodeIdentityReuseCardSelected" : ""}`,
128
151
  role: "radio",
129
- "aria-checked": r,
130
- tabIndex: a,
131
- onClick: o,
132
- "data-testid": `identity-reuse-document-${t.id}`,
133
- children: /* @__PURE__ */ n("div", {
152
+ "aria-checked": selected,
153
+ tabIndex,
154
+ onClick: onSelect,
155
+ "data-testid": `identity-reuse-document-${document.id}`,
156
+ children: /* @__PURE__ */ u("div", {
134
157
  class: "IncodeIdentityReuseCardBody",
135
158
  children: [
136
- /* @__PURE__ */ n("div", {
159
+ /* @__PURE__ */ u("div", {
137
160
  class: "IncodeIdentityReuseCardHeader",
138
- children: [/* @__PURE__ */ n("div", {
161
+ children: [/* @__PURE__ */ u("div", {
139
162
  class: "IncodeIdentityReuseCardHeaderLeft",
140
- children: [/* @__PURE__ */ n("span", {
163
+ children: [/* @__PURE__ */ u("span", {
141
164
  class: "IncodeIdentityReuseCardTypeLabel",
142
- children: l
143
- }), i ? /* @__PURE__ */ n("span", {
165
+ children: typeLabel
166
+ }), recommended ? /* @__PURE__ */ u("span", {
144
167
  class: "IncodeIdentityReuseBadgeRecommended",
145
- children: c("identityReuse.badge.recommended")
168
+ children: t("identityReuse.badge.recommended")
146
169
  }) : null]
147
- }), /* @__PURE__ */ n(h, { checked: r })]
170
+ }), /* @__PURE__ */ u(RadioDot, { checked: selected })]
148
171
  }),
149
- /* @__PURE__ */ n("p", {
172
+ /* @__PURE__ */ u("p", {
150
173
  class: "IncodeIdentityReuseCardIdentifier",
151
- children: [u ? /* @__PURE__ */ n("span", {
174
+ children: [flag ? /* @__PURE__ */ u("span", {
152
175
  "aria-hidden": "true",
153
- children: u
154
- }) : null, /* @__PURE__ */ n("span", { children: t.maskedNumber })]
176
+ children: flag
177
+ }) : null, /* @__PURE__ */ u("span", { children: document.maskedNumber })]
155
178
  }),
156
- g ? /* @__PURE__ */ n("p", {
179
+ verifiedLabel ? /* @__PURE__ */ u("p", {
157
180
  class: "IncodeIdentityReuseCardVerified",
158
- children: g
181
+ children: verifiedLabel
159
182
  }) : null
160
183
  ]
161
184
  })
162
185
  });
163
- }, _ = ({ selected: t, tabIndex: r, onSelect: i }) => {
164
- let { t: a } = e();
165
- return /* @__PURE__ */ n("button", {
186
+ };
187
+ var ScanNewRow = ({ selected, tabIndex, onSelect }) => {
188
+ const { t } = useTranslation();
189
+ return /* @__PURE__ */ u("button", {
166
190
  type: "button",
167
- class: `IncodeIdentityReuseCard IncodeIdentityReuseScanNewCard ${t ? "IncodeIdentityReuseCardSelected" : ""}`,
191
+ class: `IncodeIdentityReuseCard IncodeIdentityReuseScanNewCard ${selected ? "IncodeIdentityReuseCardSelected" : ""}`,
168
192
  role: "radio",
169
- "aria-checked": t,
170
- tabIndex: r,
171
- onClick: i,
193
+ "aria-checked": selected,
194
+ tabIndex,
195
+ onClick: onSelect,
172
196
  "data-testid": "identity-reuse-scan-new",
173
- children: [/* @__PURE__ */ n("div", {
197
+ children: [/* @__PURE__ */ u("div", {
174
198
  class: "IncodeIdentityReuseScanNewBody",
175
- children: [/* @__PURE__ */ n("span", {
199
+ children: [/* @__PURE__ */ u("span", {
176
200
  class: "IncodeIdentityReuseCardTypeLabel",
177
- children: a("identityReuse.scanANewDocument")
178
- }), /* @__PURE__ */ n("span", {
201
+ children: t("identityReuse.scanANewDocument")
202
+ }), /* @__PURE__ */ u("span", {
179
203
  class: "IncodeIdentityReuseBadgeSlowest",
180
- children: a("identityReuse.badge.slowest")
204
+ children: t("identityReuse.badge.slowest")
181
205
  })]
182
- }), /* @__PURE__ */ n(h, { checked: t })]
206
+ }), /* @__PURE__ */ u(RadioDot, { checked: selected })]
183
207
  });
184
- }, v = ({ config: a, manager: l, onFinish: f, onError: p }) => {
185
- let { t: m, i18n: h } = e(), v = h.language || "en", [y, b] = r(() => {
186
- if (l) return l;
187
- if (!a) throw Error("IdentityReuse config is required when no manager is provided");
188
- return d({ config: a });
189
- }, { manageLifecycle: !l });
190
- i({
191
- status: y.status === "finished" ? "finished" : "loading",
192
- onFinish: f
208
+ };
209
+ var IdentityReuseContent = ({ config, manager: externalManager, onFinish, onError }) => {
210
+ const { t, i18n } = useTranslation();
211
+ const locale = i18n.language || "en";
212
+ const [state, manager] = useManager(() => {
213
+ if (externalManager) return externalManager;
214
+ if (!config) throw new Error("IdentityReuse config is required when no manager is provided");
215
+ return createIdentityReuseManager({ config });
216
+ }, { manageLifecycle: !externalManager });
217
+ useModuleTerminalCallbacks({
218
+ status: state.status === "finished" ? "finished" : "loading",
219
+ onFinish
193
220
  });
194
- let x = y.status === "error" ? y.error : void 0;
195
- if (t(() => {
196
- x && p?.(x);
197
- }, [x, p]), y.status === "idle" || y.status === "loading" || y.status === "submitting") return /* @__PURE__ */ n(s, { title: m("identityReuse.loading") });
198
- if (y.status === "documentsFound") {
199
- let e = y.selectedDocumentId, t = [...y.documents.map((e) => e.id), u], r = e === void 0 ? 0 : Math.max(0, t.findIndex((t) => t === e)), i = m(e === u ? "identityReuse.cta.scanNew" : "identityReuse.cta.confirm"), a = (e) => {
200
- let t = e.currentTarget;
201
- if (!t) return;
202
- let n = t.querySelectorAll("[role=\"radio\"]");
203
- if (n.length === 0) return;
204
- let r = Array.from(n).findIndex((e) => e === document.activeElement);
205
- if (r === -1) return;
206
- let i = r;
207
- switch (e.key) {
221
+ const errorMessage = state.status === "error" ? state.error : void 0;
222
+ y(() => {
223
+ if (errorMessage) onError?.(errorMessage);
224
+ }, [errorMessage, onError]);
225
+ if (state.status === "idle" || state.status === "loading" || state.status === "submitting") return /* @__PURE__ */ u(Spinner, { title: t("identityReuse.loading") });
226
+ if (state.status === "documentsFound") {
227
+ const selectedId = state.selectedDocumentId;
228
+ const optionIds = [...state.documents.map((d) => d.id), SCAN_NEW_DOCUMENT];
229
+ const focusedIndex = selectedId === void 0 ? 0 : Math.max(0, optionIds.findIndex((id) => id === selectedId));
230
+ const ctaLabel = selectedId === SCAN_NEW_DOCUMENT ? t("identityReuse.cta.scanNew") : t("identityReuse.cta.confirm");
231
+ const handleRadiogroupKeyDown = (event) => {
232
+ const container = event.currentTarget;
233
+ if (!container) return;
234
+ const buttons = container.querySelectorAll("[role=\"radio\"]");
235
+ if (buttons.length === 0) return;
236
+ const currentIndex = Array.from(buttons).findIndex((b) => b === document.activeElement);
237
+ if (currentIndex === -1) return;
238
+ let nextIndex = currentIndex;
239
+ switch (event.key) {
208
240
  case "ArrowDown":
209
241
  case "ArrowRight":
210
- i = (r + 1) % n.length;
242
+ nextIndex = (currentIndex + 1) % buttons.length;
211
243
  break;
212
244
  case "ArrowUp":
213
245
  case "ArrowLeft":
214
- i = (r - 1 + n.length) % n.length;
246
+ nextIndex = (currentIndex - 1 + buttons.length) % buttons.length;
215
247
  break;
216
248
  case "Home":
217
- i = 0;
249
+ nextIndex = 0;
218
250
  break;
219
251
  case "End":
220
- i = n.length - 1;
252
+ nextIndex = buttons.length - 1;
221
253
  break;
222
254
  default: return;
223
255
  }
224
- e.preventDefault();
225
- let a = n[i];
226
- a && (a.focus(), a.click());
256
+ event.preventDefault();
257
+ const next = buttons[nextIndex];
258
+ if (next) {
259
+ next.focus();
260
+ next.click();
261
+ }
227
262
  };
228
- return /* @__PURE__ */ n(o, {
263
+ return /* @__PURE__ */ u(Page, {
229
264
  className: "IncodeIdentityReusePage",
230
- title: m("identityReuse.title"),
231
- subtitle: m("identityReuse.subtitle"),
232
- children: /* @__PURE__ */ n("div", {
265
+ title: t("identityReuse.title"),
266
+ subtitle: t("identityReuse.subtitle"),
267
+ children: /* @__PURE__ */ u("div", {
233
268
  class: "IncodeIdentityReuseBody",
234
- children: [/* @__PURE__ */ n("div", {
269
+ children: [/* @__PURE__ */ u("div", {
235
270
  class: "IncodeIdentityReuseList",
236
271
  role: "radiogroup",
237
- "aria-label": m("identityReuse.title"),
238
- onKeyDown: a,
239
- children: [y.documents.map((t, i) => /* @__PURE__ */ n(g, {
240
- document: t,
241
- selected: e === t.id,
242
- recommended: i === 0,
243
- tabIndex: i === r ? 0 : -1,
244
- onSelect: () => b.chooseDocument(t.id),
245
- locale: v
246
- }, t.id)), /* @__PURE__ */ n(_, {
247
- selected: e === u,
248
- tabIndex: r === y.documents.length ? 0 : -1,
249
- onSelect: () => b.chooseDocument(u)
272
+ "aria-label": t("identityReuse.title"),
273
+ onKeyDown: handleRadiogroupKeyDown,
274
+ children: [state.documents.map((document, index) => /* @__PURE__ */ u(DocumentCard, {
275
+ document,
276
+ selected: selectedId === document.id,
277
+ recommended: index === 0,
278
+ tabIndex: index === focusedIndex ? 0 : -1,
279
+ onSelect: () => manager.chooseDocument(document.id),
280
+ locale
281
+ }, document.id)), /* @__PURE__ */ u(ScanNewRow, {
282
+ selected: selectedId === SCAN_NEW_DOCUMENT,
283
+ tabIndex: focusedIndex === state.documents.length ? 0 : -1,
284
+ onSelect: () => manager.chooseDocument(SCAN_NEW_DOCUMENT)
250
285
  })]
251
- }), /* @__PURE__ */ n("div", {
286
+ }), /* @__PURE__ */ u("div", {
252
287
  class: "IncodeIdentityReuseActions",
253
- children: /* @__PURE__ */ n(c, {
254
- onClick: () => b.submit(),
255
- disabled: e === void 0,
288
+ children: /* @__PURE__ */ u(Button, {
289
+ onClick: () => manager.submit(),
290
+ disabled: selectedId === void 0,
256
291
  "data-testid": "identity-reuse-confirm-button",
257
- children: i
292
+ children: ctaLabel
258
293
  })
259
294
  })]
260
295
  })
261
296
  });
262
297
  }
263
- return y.status === "error" ? /* @__PURE__ */ n(o, {
298
+ if (state.status === "error") return /* @__PURE__ */ u(Page, {
264
299
  className: "IncodeIdentityReusePage",
265
- title: m("identityReuse.errorTitle"),
266
- subtitle: y.error,
267
- children: [/* @__PURE__ */ n("div", { class: "IncodeIdentityReuseContent" }), /* @__PURE__ */ n("div", {
300
+ title: t("identityReuse.errorTitle"),
301
+ subtitle: state.error,
302
+ children: [/* @__PURE__ */ u("div", { class: "IncodeIdentityReuseContent" }), /* @__PURE__ */ u("div", {
268
303
  class: "IncodeIdentityReuseActions",
269
- children: [/* @__PURE__ */ n(c, {
270
- onClick: () => b.retry(),
304
+ children: [/* @__PURE__ */ u(Button, {
305
+ onClick: () => manager.retry(),
271
306
  "data-testid": "identity-reuse-retry-button",
272
- children: m("identityReuse.cta.retry")
273
- }), /* @__PURE__ */ n(c, {
274
- onClick: () => b.skip(),
307
+ children: t("identityReuse.cta.retry")
308
+ }), /* @__PURE__ */ u(Button, {
309
+ onClick: () => manager.skip(),
275
310
  variant: "link",
276
311
  "data-testid": "identity-reuse-skip-button",
277
- children: m("identityReuse.cta.skip")
312
+ children: t("identityReuse.cta.skip")
278
313
  })]
279
314
  })]
280
- }) : (y.status, null);
281
- }, y = ({ config: e, manager: t, onFinish: r, onError: i }) => /* @__PURE__ */ n(a, { children: e || t ? /* @__PURE__ */ n(v, {
282
- config: e,
283
- manager: t,
284
- onFinish: r,
285
- onError: i
315
+ });
316
+ if (state.status === "finished") return null;
317
+ return null;
318
+ };
319
+ var IdentityReuse = ({ config, manager, onFinish, onError }) => /* @__PURE__ */ u(IncodeComponent, { children: config || manager ? /* @__PURE__ */ u(IdentityReuseContent, {
320
+ config,
321
+ manager,
322
+ onFinish,
323
+ onError
286
324
  }) : null });
287
- l(y, "incode-identity-reuse");
325
+ registerIncodeModuleElement(IdentityReuse, "incode-identity-reuse");
288
326
  //#endregion
289
- export { y as IdentityReuse };
327
+ export { IdentityReuse };
@@ -0,0 +1,4 @@
1
+ //#region src/shared/page/incode-logo.svg
2
+ var incode_logo_default = "data:image/svg+xml,%3csvg%20width='76'%20height='20'%20viewBox='0%200%2076%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M40.1687%206.01811C42.2312%206.01811%2043.7927%206.59655%2044.8446%207.76024C45.8919%208.91831%2046.4126%2010.5865%2046.4126%2012.7583C46.4126%2014.93%2045.8748%2016.6105%2044.794%2017.7944C43.7102%2018.9815%2042.1729%2019.5735%2040.1937%2019.5735C38.1479%2019.5735%2036.5973%2018.99%2035.5546%2017.8187L35.4273%2017.6701C34.4729%2016.5101%2033.9984%2014.871%2033.9984%2012.7583C33.9984%208.28671%2036.0703%206.01811%2040.1687%206.01811ZM69.1127%206.01781C71.1144%206.01781%2072.5953%206.66904%2073.5373%207.97333C74.4288%209.2077%2074.8837%2010.9053%2074.9066%2013.0629L74.9058%2013.5242H66.1149C66.2174%2014.6334%2066.5602%2015.4734%2067.141%2016.0538C67.7488%2016.662%2068.6195%2016.9679%2069.7639%2016.9679C70.5188%2016.9679%2071.2373%2016.8742%2071.921%2016.6862C72.6048%2016.4995%2073.2105%2016.2581%2073.735%2015.9646L73.9814%2015.8267V18.666L73.8821%2018.7093C72.5607%2019.286%2071.0464%2019.5732%2069.3379%2019.5732C67.4088%2019.5732%2065.8853%2018.986%2064.7769%2017.8093C63.6699%2016.6348%2063.1183%2014.9722%2063.1183%2012.833C63.1183%2010.6451%2063.6389%208.96055%2064.6862%207.78517C65.7359%206.60632%2067.2157%206.01781%2069.1127%206.01781ZM60.3976%201.06738V16.3832C60.3976%2017.0998%2060.0996%2017.7092%2059.5124%2018.198C58.9425%2018.6724%2058.2282%2019.0207%2057.3718%2019.2435C56.5257%2019.4635%2055.6531%2019.5731%2054.7534%2019.5731C52.9298%2019.5731%2051.4237%2019.056%2050.2406%2018.0202C49.0485%2016.9752%2048.4588%2015.1678%2048.4588%2012.6072C48.4588%2010.5545%2048.9627%208.9421%2049.9753%207.77411C50.9938%206.60175%2052.4982%206.01774%2054.4782%206.01774C54.9416%206.01774%2055.4735%206.07665%2056.0742%206.19449C56.582%206.296%2057.0453%206.43849%2057.4648%206.62252V1.06738H60.3976ZM27.911%206.04223C29.2828%206.04223%2030.5881%206.29619%2031.8264%206.80393L31.9291%206.84604V9.55797L31.6992%209.46109C30.4503%208.93473%2029.3127%208.67257%2028.2863%208.67257C27.0102%208.67257%2026.0684%208.98809%2025.4521%209.61162C24.8366%2010.2352%2024.5242%2011.2397%2024.5242%2012.6331C24.5242%2014.0959%2024.8298%2015.1535%2025.4314%2015.8092C26.029%2016.4619%2027.002%2016.7923%2028.3613%2016.7923C29.4706%2016.7923%2030.589%2016.5234%2031.7164%2015.9842L31.9534%2015.8708V18.5903L31.8552%2018.634C30.6349%2019.1773%2029.3283%2019.4483%2027.936%2019.4483C26.2154%2019.4483%2024.7637%2018.9753%2023.5868%2018.0285L23.4123%2017.8829L23.2796%2017.7636C22.1516%2016.7067%2021.5914%2015.0592%2021.5914%2012.8332C21.5914%2010.4557%2022.186%208.72379%2023.3849%207.64725C24.5757%206.57726%2026.0871%206.04223%2027.911%206.04223ZM4.11045%206.39262L4.13613%2019.1987H1.15293V6.39262H4.11045ZM13.5766%206.0423C15.365%206.0423%2016.6948%206.41948%2017.5636%207.18368C18.4372%207.95269%2018.8706%209.13902%2018.8706%2010.7331V19.1984H15.9127V11.0838C15.9127%209.42945%2014.9988%208.62337%2013.1013%208.62337C12.3086%208.62337%2011.5458%208.73548%2010.8133%208.95959L10.5401%209.04888V19.1984H7.58147V7.40579L7.67177%207.35974C8.43481%206.97061%209.36013%206.65415%2010.4506%206.40815L10.8116%206.33134C11.7692%206.13867%2012.6905%206.0423%2013.5766%206.0423ZM40.1687%208.5477C39.0014%208.5477%2038.1814%208.89722%2037.6896%209.59114C37.1869%2010.3012%2036.932%2011.3564%2036.932%2012.7583C36.932%2014.1602%2037.1948%2015.223%2037.7142%2015.9499C38.2224%2016.6613%2039.0345%2017.0182%2040.1687%2017.0182C42.3685%2017.0182%2043.4555%2015.6249%2043.4555%2012.7583C43.4555%2011.325%2043.1888%2010.2632%2042.6636%209.57056C42.1472%208.89036%2041.3203%208.5477%2040.1687%208.5477ZM54.8535%208.59807C52.5835%208.59807%2051.4659%209.9271%2051.4659%2012.6579C51.4659%2014.0276%2051.7253%2015.0917%2052.2391%2015.8527C52.7378%2016.5945%2053.6185%2016.9678%2054.9035%2016.9678C55.6556%2016.9678%2056.2834%2016.8792%2056.7876%2016.7028C57.2156%2016.553%2057.4279%2016.378%2057.4604%2016.186L57.4648%2016.1332V9.25404L57.2778%209.15611C56.9611%208.99923%2056.6189%208.87406%2056.2512%208.78123C55.7705%208.65917%2055.3045%208.59807%2054.8535%208.59807ZM69.0377%208.49888C68.192%208.49888%2067.5412%208.71795%2067.0743%209.15366C66.6631%209.5374%2066.3731%2010.1684%2066.2101%2011.0498L66.1771%2011.2425H71.8784L71.8489%2011.0453C71.7111%2010.208%2071.4421%209.58986%2071.0461%209.18626C70.5969%208.72981%2069.9303%208.49888%2069.0377%208.49888ZM4.21085%201.94156V4.64764H1.07715V1.94156H4.21085Z'%20fill='%23006AFF'/%3e%3c/svg%3e";
3
+ //#endregion
4
+ export { incode_logo_default as t };
@@ -0,0 +1,63 @@
1
+ import { n as useTranslation } from "./i18n-gTHArCl9.js";
2
+ import { _ as y, l as A, p as d, r as $, v as u } from "./vendor-preact-BH7vOa2r.js";
3
+ import { s as useScreenOrientation } from "./hooks-BtgmGvba.js";
4
+ import { isIPad } from "@incodetech/core/device";
5
+ //#region src/shared/icons/rotate-icon.svg
6
+ var rotate_icon_default = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='90'%20height='90'%20viewBox='0%200%2090%2090'%3e%3cg%20fill='%2320263D'%3e%3cpath%20d='M84.12%2027.54l-2.58-2.58L65.036%208.456l-2.58-2.58c-3.127-3.127-8.58-2.764-12.157.81L6.69%2050.306c-3.574%203.574-3.938%209.027-.81%2012.158l21.66%2021.66c3.128%203.127%208.58%202.764%2012.157-.81l43.617-43.616c3.574-3.578%203.937-9.03.806-12.158zm-5.524%208.617l-42.439%2042.44c-1.3%201.3-3.28%201.432-4.42.296l-20.63-20.63c-1.14-1.14-1.008-3.12.297-4.42l42.438-42.44c1.302-1.3%203.282-1.432%204.422-.296l1.031%201.032c1.14%201.14%201.009%203.12-.296%204.421-1.302%201.301-1.433%203.281-.297%204.421L69.02%2031.297c1.14%201.14%203.12%201.01%204.421-.296%201.301-1.301%203.281-1.432%204.421-.296l1.031%201.031c1.137%201.14%201.005%203.12-.296%204.421zM51.885%2090a3.135%203.135%200%2001-2.22-5.351l8.925-8.925a3.138%203.138%200%20014.646.233l3.308%204.046c10.114-5.374%2017.081-15.994%2017.178-28.14a3.136%203.136%200%20013.136-3.113h.026a3.14%203.14%200%20013.112%203.161C89.835%2072.746%2072.746%2089.835%2051.911%2090h-.026zM38.115%200a3.135%203.135%200%20012.22%205.351l-8.925%208.925a3.125%203.125%200%2001-2.378.915%203.138%203.138%200%2001-2.272-1.147l-3.308-4.046C13.34%2015.37%206.373%2025.99%206.274%2038.138a3.14%203.14%200%2001-3.139%203.112h-.026a3.139%203.139%200%2001-3.11-3.161C.166%2017.254%2017.255.165%2038.09%200h.026z'/%3e%3c/g%3e%3c/svg%3e";
7
+ //#endregion
8
+ //#region src/shared/landscapeBlocker/landscapeBlocker.tsx
9
+ function usePortalContainer() {
10
+ const [container, setContainer] = d(null);
11
+ const containerRef = A(null);
12
+ y(() => {
13
+ const el = document.createElement("div");
14
+ el.setAttribute("data-incode-landscape-portal", "");
15
+ document.body.appendChild(el);
16
+ containerRef.current = el;
17
+ setContainer(el);
18
+ return () => {
19
+ el.remove();
20
+ containerRef.current = null;
21
+ };
22
+ }, []);
23
+ return container;
24
+ }
25
+ function LandscapeBlocker() {
26
+ const { t } = useTranslation();
27
+ const container = usePortalContainer();
28
+ if (!container) return null;
29
+ return $(/* @__PURE__ */ u("div", {
30
+ class: "IncodeLandscapeBlocker",
31
+ children: [
32
+ /* @__PURE__ */ u("img", {
33
+ class: "IncodeLandscapeBlocker-icon",
34
+ src: rotate_icon_default,
35
+ alt: "",
36
+ "aria-hidden": true
37
+ }),
38
+ /* @__PURE__ */ u("p", {
39
+ class: "IncodeLandscapeBlocker-text",
40
+ children: t("common.landscape")
41
+ }),
42
+ /* @__PURE__ */ u("p", {
43
+ class: "IncodeLandscapeBlocker-text",
44
+ children: isIPad() ? t("common.rotateIpad") : t("common.rotate")
45
+ })
46
+ ]
47
+ }), container);
48
+ }
49
+ //#endregion
50
+ //#region src/shared/componentRoot/incodeComponent.tsx
51
+ /**
52
+ * Wraps UI modules with the standard container.
53
+ * Shows a landscape blocker overlay on mobile (excluding iPad) when device is rotated to landscape.
54
+ */
55
+ function IncodeComponent({ children }) {
56
+ const { isLandscapeMobile } = useScreenOrientation();
57
+ return /* @__PURE__ */ u("div", {
58
+ class: "IncodeComponent",
59
+ children: [children, isLandscapeMobile ? /* @__PURE__ */ u(LandscapeBlocker, {}) : null]
60
+ });
61
+ }
62
+ //#endregion
63
+ export { LandscapeBlocker as n, IncodeComponent as t };
@@ -0,0 +1,13 @@
1
+ import { t as registerIncodeElement } from "./registerIncodeElement-BJJGzVdq.js";
2
+ //#region src/shared/webComponent/incodeModule.ts
3
+ var incodeModulePropKeys = [
4
+ "config",
5
+ "manager",
6
+ "onFinish",
7
+ "onError"
8
+ ];
9
+ function registerIncodeModuleElement(component, tagName) {
10
+ registerIncodeElement(component, tagName, incodeModulePropKeys);
11
+ }
12
+ //#endregion
13
+ export { registerIncodeModuleElement as t };