@incodetech/web 2.1.1 → 2.2.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/dist/ae-signature/ae-signature.es.js +7 -4
  2. package/dist/antifraud/antifraud.es.js +6 -6
  3. package/dist/authentication/authentication.es.js +7 -7
  4. package/dist/{autoFocusTitle-CuRu2lPg.js → autoFocusTitle-D7VzaZ2P.js} +6 -3
  5. package/dist/{back-horizontal-hint-xTnSQbzn.js → back-horizontal-hint-BBGuJ75y.js} +1 -1
  6. package/dist/{back-vertical-hint-BWWlHfX2.js → back-vertical-hint-B9usJ5lY.js} +1 -1
  7. package/dist/base.css +425 -3290
  8. package/dist/{bottomSheet-CnWbbUAM.js → bottomSheet-Cp8DLulN.js} +7 -8
  9. package/dist/certificate-issuance/certificate-issuance.es.js +34 -87
  10. package/dist/certificate-issuance/styles.css +0 -41
  11. package/dist/{checkbox-1wUHSoaK.js → checkbox-Jgwh943i.js} +5 -5
  12. package/dist/connectionError-Bl5E35Qm.js +45 -0
  13. package/dist/consent/consent.es.js +10 -12
  14. package/dist/consent/styles.css +5 -4
  15. package/dist/{countrySelector-SvUOyPo0.js → countrySelector-Sd-u1WGf.js} +3 -3
  16. package/dist/cross-document-data-match/cross-document-data-match.es.js +13 -10
  17. package/dist/curp-validation/curp-validation.es.js +28 -29
  18. package/dist/curp-validation/styles.css +47 -0
  19. package/dist/{customFields-BDsXR7A-.js → customFields-CiEguXX9.js} +13 -14
  20. package/dist/{customWatchlist-CYoRNCim.js → customWatchlist-BSAW87qq.js} +9 -9
  21. package/dist/dashboardTheme-FtPiizV0.js +223 -0
  22. package/dist/{dateInputComposed-DuaofcBl.js → dateInputComposed-D0WEYWkS.js} +5 -5
  23. package/dist/dateInputComposed-DKQJz0kJ.js +1 -0
  24. package/dist/document-capture/document-capture.es.js +1 -1
  25. package/dist/document-capture/styles.css +85 -70
  26. package/dist/{documentCapture-DhbO-A-V.js → documentCapture-GFNkI1ly.js} +218 -136
  27. package/dist/documentCapture-sB2_X-we.js +2 -0
  28. package/dist/{dropdownComposed-CoU0enG6.js → dropdownComposed-BXleSN7n.js} +18 -11
  29. package/dist/dropdownComposed-DE-VJgcR.js +1 -0
  30. package/dist/dynamic-forms/styles.css +58 -6
  31. package/dist/{dynamicForms-BifGbC9F.js → dynamicForms-DU5fT72-.js} +53 -45
  32. package/dist/ekyb/ekyb.es.js +1 -1
  33. package/dist/ekyb/styles.css +1 -28
  34. package/dist/{ekybModule-DGnTw5UV.js → ekybModule-CMcpoTgh.js} +51 -27
  35. package/dist/ekybModule-CR9A6Fqb.js +2 -0
  36. package/dist/ekyc/ekyc.es.js +1 -1
  37. package/dist/ekyc/styles.css +2 -2
  38. package/dist/{ekycModule-Dxpdd0ns.js → ekycModule-BTO8iIwh.js} +45 -19
  39. package/dist/ekycModule-CewwzYvk.js +2 -0
  40. package/dist/electronic-signature/electronic-signature.es.js +1 -1
  41. package/dist/{ae-signature → electronic-signature}/styles.css +2 -2
  42. package/dist/{electronic-signature-Ueoffasr.js → electronic-signature-COBKJBjU.js} +31 -23
  43. package/dist/email/email.es.js +10 -11
  44. package/dist/{emailInput-DsLkDtER.js → emailInput-mPPvterQ.js} +4 -4
  45. package/dist/{expiredId-BZXLrLk-.js → expiredId-CD5ETLV9.js} +6 -6
  46. package/dist/{extensibility-7sRIN0JC.js → extensibility-DBilbbhC.js} +440 -374
  47. package/dist/extensibility.es.js +24 -28
  48. package/dist/face-match/face-match.es.js +1 -1
  49. package/dist/face-match/styles.css +9 -609
  50. package/dist/faceMatch-2pfSeXeA.js +2 -0
  51. package/dist/{faceMatch-DyTBoMDm.js → faceMatch-CwDBO9Is.js} +71 -79
  52. package/dist/field-comparison/field-comparison.es.js +1 -1
  53. package/dist/fieldComparison-DUYp39WI.js +2 -0
  54. package/dist/{fieldComparison-L_knHqgw.js → fieldComparison-dDvSYYQP.js} +11 -12
  55. package/dist/finalSuccessScreen-B9kb72WR.js +500 -0
  56. package/dist/fiscal-qr/fiscal-qr.es.js +12 -12
  57. package/dist/flip-animation-CvN8FLNc.js +6996 -0
  58. package/dist/flow/flow.es.js +84 -48
  59. package/dist/flow/styles.css +908 -5423
  60. package/dist/{front-horizontal-hint-B84GgTO1.js → front-horizontal-hint-D3CrWViZ.js} +1 -1
  61. package/dist/{front-vertical-hint-Bs_avngq.js → front-vertical-hint-BoLZvyx5.js} +1 -1
  62. package/dist/geolocation/geolocation.es.js +36 -13
  63. package/dist/geolocation/styles.css +1 -1
  64. package/dist/government-validation/government-validation.es.js +11 -12
  65. package/dist/{homeScreen-B6T0JVh8.js → homeScreen-Dycy1yhN.js} +7 -9
  66. package/dist/{icons-CJJbIpBq.js → icons-D0cfSCBM.js} +92 -7
  67. package/dist/id/id.es.js +222 -52
  68. package/dist/id/styles.css +290 -10
  69. package/dist/id-back-of-card-DO593HH8.js +83 -0
  70. package/dist/id-back-of-card-vertical-DArEQ0hE.js +88 -0
  71. package/dist/id-front-of-card-Bcit7Pnq.js +308 -0
  72. package/dist/id-front-of-card-vertical-Bcr-KXcl.js +278 -0
  73. package/dist/id-laser-h-BaUHzX-d.js +480 -0
  74. package/dist/{id-laser-v-BiUXkM4x.js → id-laser-v-Dv9yEYJE.js} +7 -17
  75. package/dist/id-selfie-flow/id-selfie-flow.es.js +239 -0
  76. package/dist/id-selfie-flow/styles.css +749 -0
  77. package/dist/id-verification/id-verification.es.js +13 -9
  78. package/dist/{idOcr-WFBvqy3b.js → idOcr-riTHUOlr.js} +14 -15
  79. package/dist/identity-reuse/identity-reuse.es.js +6 -8
  80. package/dist/identity-reuse/styles.css +1 -1
  81. package/dist/{incode-logo-57XFniXU.js → incode-logo-cGsd55rc.js} +64 -1
  82. package/dist/incodeComponent-B-daxouV.js +713 -0
  83. package/dist/incodeModule-uyUrSSUM.js +25 -0
  84. package/dist/index.es.js +16 -5
  85. package/dist/inputComposed-CABc288U.js +1 -0
  86. package/dist/{inputComposed-C1R2LAa3.js → inputComposed-Pp_XN1-h.js} +9 -9
  87. package/dist/{mandatoryConsent-D0GTKu-H.js → mandatoryConsent-DSAjFc0h.js} +9 -11
  88. package/dist/manualCaptureButton-BY8dRhGA.js +300 -0
  89. package/dist/{capture-CkGvdDNH.js → manualCaptureButton-BldgUGso.js} +68 -198
  90. package/dist/{modal-OxkFuuiR.js → modal-BlczH_pL.js} +4 -4
  91. package/dist/{modal.hooks-ZrzmHAUa.js → modal.hooks-BvXzNWvY.js} +1 -1
  92. package/dist/{numberedStep-CEb-lFJm.js → numberedStep-DUs77Gy3.js} +1 -1
  93. package/dist/{optionAccessibleLabel-gfF-58Mv.js → optionAccessibleLabel-Dmz3eRsO.js} +6 -6
  94. package/dist/{otpInput-CnDc6pQm.js → otpInput-B3vUjmBF.js} +72 -36
  95. package/dist/{passport-horizontal-hint-Bj0ZJY0g.js → passport-horizontal-hint-DgnU-8bl.js} +1 -1
  96. package/dist/{passport-vertical-hint-Dfk77xUJ.js → passport-vertical-hint-Dd2Wknw7.js} +1 -1
  97. package/dist/{pdf-BqtJTlor.js → pdf-BUoY_2gv.js} +1 -1
  98. package/dist/pdfViewer-4xNYiBI1.js +2 -0
  99. package/dist/{pdfViewer-B97DmT9m.js → pdfViewer-BGFFFvmi.js} +5 -7
  100. package/dist/phone/phone.es.js +13 -12
  101. package/dist/{phoneInputComposed-DMiXfF-1.js → phoneInputComposed-D1ZBsd4S.js} +7 -6
  102. package/dist/{processing-BeUMfdJJ.js → processing-vGhs5Gvb.js} +2 -2
  103. package/dist/qe-signature/qe-signature.es.js +7 -4
  104. package/dist/{radioGroupComposed-DuQxslB2.js → radioGroupComposed-CYPHpI6a.js} +16 -15
  105. package/dist/redirect-to-mobile/redirect-to-mobile.es.js +132 -45
  106. package/dist/redirect-to-mobile/styles.css +20 -10
  107. package/dist/{registerIncodeElement-DaNjbAwZ.js → registerIncodeElement-BduCekz5.js} +1 -1
  108. package/dist/{richText-CB1fmegc.js → richText-2OnIN9ff.js} +3 -1607
  109. package/dist/selfie/selfie.es.js +10 -10
  110. package/dist/selfie/styles.css +16 -949
  111. package/dist/signature/signature.es.js +27 -19
  112. package/dist/{ae-signature/styles2.css → signature/styles.css} +4 -4
  113. package/dist/{snackbar-DS7Mv62v.js → snackbar-BzyWgQ7J.js} +2 -2
  114. package/dist/spacer-Bnmh-DfR.js +2344 -0
  115. package/dist/{spinner-BMeIEK1d.js → spinner-HP_c74K-.js} +45 -4
  116. package/dist/statusPage-C0vTVW0Q.js +36 -0
  117. package/dist/{successIcon-B5mGvdx1.js → successIcon-Bj8Y9CuI.js} +1 -1
  118. package/dist/{tabs-C__chW-u.js → tabs-B_TxQ9ZQ.js} +4 -3
  119. package/dist/themes/dark.css +35 -0
  120. package/dist/themes/light.css +35 -0
  121. package/dist/{tutorial-CCfPuVKX.js → tutorial-Cuy2ZEG9.js} +222 -180
  122. package/dist/types/ae-signature.d.ts +91 -5
  123. package/dist/types/antifraud.d.ts +86 -3
  124. package/dist/types/authentication.d.ts +86 -3
  125. package/dist/types/certificate-issuance.d.ts +86 -3
  126. package/dist/types/consent.d.ts +86 -3
  127. package/dist/types/cross-document-data-match.d.ts +88 -4
  128. package/dist/types/curp-validation.d.ts +86 -3
  129. package/dist/types/document-capture.d.ts +88 -4
  130. package/dist/types/ekyb.d.ts +88 -4
  131. package/dist/types/ekyc.d.ts +88 -4
  132. package/dist/types/electronic-signature.d.ts +87 -4
  133. package/dist/types/email.d.ts +82 -22
  134. package/dist/types/extensibility.d.ts +160 -5
  135. package/dist/types/face-match.d.ts +84 -22
  136. package/dist/types/field-comparison.d.ts +86 -3
  137. package/dist/types/fiscal-qr.d.ts +89 -5
  138. package/dist/types/flow.d.ts +92 -2
  139. package/dist/types/geolocation.d.ts +86 -3
  140. package/dist/types/government-validation.d.ts +86 -3
  141. package/dist/types/id-selfie-flow.d.ts +161 -0
  142. package/dist/types/id-verification.d.ts +87 -4
  143. package/dist/types/id.d.ts +88 -5
  144. package/dist/types/identity-reuse.d.ts +82 -2
  145. package/dist/types/index.d.ts +109 -1
  146. package/dist/types/phone.d.ts +83 -24
  147. package/dist/types/qe-signature.d.ts +91 -5
  148. package/dist/types/redirect-to-mobile.d.ts +4 -1
  149. package/dist/types/selfie.d.ts +86 -3
  150. package/dist/types/signature.d.ts +91 -5
  151. package/dist/types/video-selfie.d.ts +83 -6
  152. package/dist/types/watchlist.d.ts +91 -5
  153. package/dist/types/workflow.d.ts +85 -2
  154. package/dist/{i18n-CU4xq8qC.js → uiConfig-D7ezQeZ7.js} +63 -3
  155. package/dist/{useModuleLoader-Bi26kJbg.js → useModuleLoader-BImpfi_R.js} +37 -248
  156. package/dist/{vendor-preact-DThS2ZQ_.js → vendor-preact-mvwZ8mJj.js} +1 -1
  157. package/dist/{verificationResult-BWWkmeiA.js → verificationResult-IUf0w1aR.js} +26 -15
  158. package/dist/video-selfie/styles.css +349 -1202
  159. package/dist/video-selfie/video-selfie.es.js +120 -381
  160. package/dist/watchlist/watchlist.es.js +16 -13
  161. package/dist/{watchlistForBusiness-D2Uo_TwF.js → watchlistForBusiness-zT9gCfTc.js} +12 -13
  162. package/dist/workflow/styles.css +501 -3977
  163. package/dist/workflow/workflow.es.js +26 -19
  164. package/package.json +22 -20
  165. package/dist/button-Dz6AsbmF.js +0 -40
  166. package/dist/cameraView-DIEzM5ru.js +0 -47
  167. package/dist/cpf-ocr/cpf-ocr.es.js +0 -2
  168. package/dist/cpf-ocr/styles.css +0 -45
  169. package/dist/cpfOcr-B79245-3.js +0 -2
  170. package/dist/cpfOcr-BhxT-lRN.js +0 -92
  171. package/dist/dateInputComposed-DRzZi6uy.js +0 -1
  172. package/dist/documentCapture-DXYYyxZl.js +0 -2
  173. package/dist/dropdownComposed-BAoxIIsE.js +0 -1
  174. package/dist/ekybModule-C6Nttked.js +0 -2
  175. package/dist/ekycModule-CDIEjI6V.js +0 -2
  176. package/dist/errorIcon-BA4T6iy-.js +0 -26
  177. package/dist/faceMatch-B_HvxLm_.js +0 -2
  178. package/dist/fieldComparison-DfNEuEE5.js +0 -2
  179. package/dist/flip-animation-CZYSUtMm.js +0 -6983
  180. package/dist/hooks-CNu7o-v8.js +0 -186
  181. package/dist/id-laser-h-CzPegPMn.js +0 -467
  182. package/dist/incodeComponent-CfzJGETt.js +0 -64
  183. package/dist/incodeModule-B-4_3JrK.js +0 -13
  184. package/dist/inputComposed-BaY5q9WM.js +0 -1
  185. package/dist/loadingIcon-B0ysgiNq.js +0 -148
  186. package/dist/page-DidH_RkX.js +0 -171
  187. package/dist/spinner-BCDCoi9C.js +0 -1
  188. package/dist/statusPage-Bk8nJwXV.js +0 -28
  189. package/dist/transitionSpinner-CuNCqHNi.js +0 -30
  190. package/dist/types/cpf-ocr.d.ts +0 -12
  191. package/dist/typography-BZIpjo97.js +0 -45
  192. package/dist/uiConfig-D2_wawvr.js +0 -25
  193. /package/dist/{aligndevicelottie-DFscByAI.js → aligndevicelottie-CfoZ5Uus.js} +0 -0
  194. /package/dist/{back-tutorial-cI_4VHmE.js → back-tutorial-BHyRHyET.js} +0 -0
  195. /package/dist/{backdevicelottie-COyhTrxM.js → backdevicelottie-yKkczgFy.js} +0 -0
  196. /package/dist/{blurdevicelottie-BLVeJHEG.js → blurdevicelottie-8BbophdM.js} +0 -0
  197. /package/dist/{browser-ponyfill-Df13Th-G.js → browser-ponyfill-CBjGwwPW.js} +0 -0
  198. /package/dist/{defineProperty-Qjefk7Uf.js → defineProperty-BbpBna-2.js} +0 -0
  199. /package/dist/{frontdevicelottie-B4tE2PYQ.js → frontdevicelottie-CFcahVLk.js} +0 -0
  200. /package/dist/{glaredevicelottie-D1pR73sx.js → glaredevicelottie-Cnvah0kz.js} +0 -0
  201. /package/dist/{id-tutorial-DwO90SAm.js → id-tutorial-BOOsXlAJ.js} +0 -0
  202. /package/dist/{lottie_light-C6B2ec41.js → lottie_light-Bv56F2Ae.js} +0 -0
  203. /package/dist/{passport-tutorial-D9JNsMsM.js → passport-tutorial-CeSup6m9.js} +0 -0
  204. /package/dist/{requiredLabelHint-D0RhuMed.js → requiredLabelHint-Dx0WS2cR.js} +0 -0
  205. /package/dist/{selfieTutorial-pB-N-fj5.js → selfieTutorial-CYa8bq6B.js} +0 -0
@@ -1,231 +1,20 @@
1
- import { a as createI18n, i as setI18nInstance, n as useTranslation, r as hasI18nInstance } from "./i18n-CU4xq8qC.js";
2
- import { _ as y, l as A, p as d, v as u } from "./vendor-preact-DThS2ZQ_.js";
3
- import { t as setUiConfig } from "./uiConfig-D2_wawvr.js";
4
- import { t as Page } from "./page-DidH_RkX.js";
5
- import { t as Button } from "./button-Dz6AsbmF.js";
6
- import { t as ErrorIcon } from "./errorIcon-BA4T6iy-.js";
1
+ import { c as createI18n, o as hasI18nInstance, s as setI18nInstance } from "./uiConfig-D7ezQeZ7.js";
2
+ import { _ as y, l as A, p as d, v as u } from "./vendor-preact-mvwZ8mJj.js";
3
+ import { a as getStandaloneSetupPolicy, n as preloadDashboardTheme } from "./dashboardTheme-FtPiizV0.js";
4
+ import "./incodeComponent-B-daxouV.js";
5
+ import { r as Button } from "./incode-logo-cGsd55rc.js";
7
6
  import { initializeWasmUtil, resolveWasmConfig, setWasmConfig, upgradeToWasmHttpClient, warmupWasm } from "@incodetech/core/wasm";
8
- import { getDeviceClass } from "@incodetech/core/device";
7
+ import { isDesktopOrEmulated } from "@incodetech/core/device";
9
8
  import { createOrchestratedFlowManager, getFlow, getRequiredWasmPipelines } from "@incodetech/core/flow";
10
9
  import { getFinishStatus, initializeSession } from "@incodetech/core/session";
11
- import { api } from "@incodetech/core/http";
12
- //#region src/shared/terminalErrorPage/terminalErrorPage.tsx
13
- /**
14
- * Terminal error screen shown by `<incode-flow>` / `<incode-workflow>` when
15
- * the SDK reaches an unrecoverable error state — both during initialization
16
- * (e.g. `/omni/start` or `/omni/workflow/info` returns `4028` "not activated")
17
- * and during the flow/workflow lifecycle (e.g. `/omni/workflow/process/node`,
18
- * `/omni/finish-status`, or a child module's terminal error).
19
- *
20
- * When the error carries a backend-provided `error`/`message` (surfaced via
21
- * `IncodeApiError.message` from core's service wrappers), it's rendered
22
- * verbatim as the subtitle. Generic transport failures fall back to a
23
- * translated default.
24
- *
25
- * Layout: `Page` is used for the Incode logo + optional "Verified by Incode"
26
- * footer only — the title/subtitle/titleTopSlot slots are deliberately *not*
27
- * used so we can vertically center the status block (icon + title + message)
28
- * within the available height at every viewport size. The Try again button
29
- * is anchored to the bottom of the content area. The screen intentionally
30
- * has no close button — the only exit is "Try again", which delegates to
31
- * `onRetry`.
32
- */
33
- var TerminalErrorPage = ({ message, onRetry }) => {
34
- const { t } = useTranslation();
35
- const titleRef = A(null);
36
- y(() => {
37
- titleRef.current?.focus();
38
- }, []);
39
- const handleRetry = () => {
40
- if (onRetry) {
41
- onRetry();
42
- return;
43
- }
44
- if (typeof window !== "undefined") window.location.reload();
45
- };
46
- return /* @__PURE__ */ u(Page, {
47
- className: "IncodeTerminalErrorPage",
48
- "data-testid": "terminal-error-page",
49
- children: /* @__PURE__ */ u("div", {
50
- class: "IncodeTerminalErrorPageBody",
51
- children: [/* @__PURE__ */ u("div", {
52
- class: "IncodeTerminalErrorPageStatus",
53
- children: [
54
- /* @__PURE__ */ u(ErrorIcon, { size: 64 }),
55
- /* @__PURE__ */ u("h2", {
56
- ref: titleRef,
57
- class: "IncodeTerminalErrorPageTitle",
58
- tabIndex: -1,
59
- children: t("common.somethingWentWrong")
60
- }),
61
- /* @__PURE__ */ u("p", {
62
- class: "IncodeTerminalErrorPageMessage",
63
- children: message ?? t("common.unexpectedError")
64
- })
65
- ]
66
- }), /* @__PURE__ */ u("div", {
67
- class: "IncodeTerminalErrorPageFooter",
68
- children: /* @__PURE__ */ u(Button, {
69
- onClick: handleRetry,
70
- children: t("common.tryAgain")
71
- })
72
- })]
73
- })
74
- });
75
- };
76
- //#endregion
77
- //#region src/styles/generatePalette.ts
78
- function hexToHsl(hex) {
79
- let normalizedHex = hex.replace("#", "");
80
- if (normalizedHex.length === 3) normalizedHex = normalizedHex.split("").map((char) => char + char).join("");
81
- const result = /^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(normalizedHex);
82
- if (!result) return null;
83
- const r = Number.parseInt(result[1], 16) / 255;
84
- const g = Number.parseInt(result[2], 16) / 255;
85
- const b = Number.parseInt(result[3], 16) / 255;
86
- const max = Math.max(r, g, b);
87
- const min = Math.min(r, g, b);
88
- let h = 0;
89
- let s = 0;
90
- const l = (max + min) / 2;
91
- if (max !== min) {
92
- const d = max - min;
93
- s = l > .5 ? d / (2 - max - min) : d / (max + min);
94
- switch (max) {
95
- case r:
96
- h = ((g - b) / d + (g < b ? 6 : 0)) / 6;
97
- break;
98
- case g:
99
- h = ((b - r) / d + 2) / 6;
100
- break;
101
- case b:
102
- h = ((r - g) / d + 4) / 6;
103
- break;
104
- }
105
- }
106
- return {
107
- h: h * 360,
108
- s: s * 100,
109
- l: l * 100
110
- };
111
- }
112
- function hslToHex(h, s, l) {
113
- const hNorm = h / 360;
114
- const sNorm = s / 100;
115
- const lNorm = l / 100;
116
- let r;
117
- let g;
118
- let b;
119
- if (sNorm === 0) r = g = b = lNorm;
120
- else {
121
- const hue2rgb = (p, q, t) => {
122
- if (t < 0) t += 1;
123
- if (t > 1) t -= 1;
124
- if (t < 1 / 6) return p + (q - p) * 6 * t;
125
- if (t < 1 / 2) return q;
126
- if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
127
- return p;
128
- };
129
- const q = lNorm < .5 ? lNorm * (1 + sNorm) : lNorm + sNorm - lNorm * sNorm;
130
- const p = 2 * lNorm - q;
131
- r = hue2rgb(p, q, hNorm + 1 / 3);
132
- g = hue2rgb(p, q, hNorm);
133
- b = hue2rgb(p, q, hNorm - 1 / 3);
134
- }
135
- const toHex = (n) => {
136
- const hex = Math.round(n * 255).toString(16);
137
- return hex.length === 1 ? `0${hex}` : hex;
138
- };
139
- return `#${toHex(r)}${toHex(g)}${toHex(b)}`;
140
- }
141
- function generateBrandPalette(mainColor) {
142
- const hsl = hexToHsl(mainColor);
143
- if (!hsl) throw new Error(`Invalid color format: ${mainColor}`);
144
- return {
145
- "50": hslToHex(hsl.h, hsl.s, 95),
146
- "200": hslToHex(hsl.h, hsl.s, 80),
147
- "300": hslToHex(hsl.h, hsl.s, 65),
148
- "400": hslToHex(hsl.h, hsl.s, Math.min(100, hsl.l + 10)),
149
- "500": mainColor,
150
- "600": hslToHex(hsl.h, hsl.s, Math.max(0, hsl.l - 10)),
151
- "900": hslToHex(hsl.h, hsl.s, 20)
152
- };
153
- }
154
- //#endregion
155
- //#region src/styles/applyTheme.ts
156
- function applyTheme(mainColor, buttonColor) {
157
- if (typeof document === "undefined") return;
158
- const palette = generateBrandPalette(mainColor);
159
- let styleElement = document.getElementById("incode-theme");
160
- if (!styleElement) {
161
- styleElement = document.createElement("style");
162
- styleElement.id = "incode-theme";
163
- document.head.appendChild(styleElement);
164
- }
165
- const buttonTextColor = buttonColor || "#ffffff";
166
- const css = `
167
- :root,
168
- :host {
169
- --primitive-color-brand-50: ${palette["50"]};
170
- --primitive-color-brand-200: ${palette["200"]};
171
- --primitive-color-brand-300: ${palette["300"]};
172
- --primitive-color-brand-400: ${palette["400"]};
173
- --primitive-color-brand-500: ${palette["500"]};
174
- --primitive-color-brand-600: ${palette["600"]};
175
- --primitive-color-brand-900: ${palette["900"]};
176
- --button-primary-text-default: ${buttonTextColor};
177
- }
178
- `;
179
- styleElement.textContent = css;
180
- }
181
- //#endregion
182
- //#region src/styles/fetchTheme.ts
183
- async function fetchAssets() {
184
- return (await api.get("/omni/asset/fetch-all")).data;
185
- }
186
- var dataUrlCache = /* @__PURE__ */ new Map();
187
- async function urlToDataUrl(url) {
188
- if (url.startsWith("data:")) return url;
189
- const cached = dataUrlCache.get(url);
190
- if (cached) return cached;
191
- const blob = await (await fetch(url)).blob();
192
- const dataUrl = await new Promise((resolve, reject) => {
193
- const reader = new FileReader();
194
- reader.onloadend = () => resolve(reader.result);
195
- reader.onerror = reject;
196
- reader.readAsDataURL(blob);
197
- });
198
- dataUrlCache.set(url, dataUrl);
199
- return dataUrl;
200
- }
201
- async function fetchTheme$1() {
202
- const assets = await fetchAssets();
203
- if (!assets.theme) throw new Error("Theme URL not found in assets response");
204
- const themeUrl = assets.theme;
205
- const isAbsoluteUrl = themeUrl.startsWith("http://") || themeUrl.startsWith("https://");
206
- let theme;
207
- if (isAbsoluteUrl) {
208
- const themeResponse = await fetch(themeUrl);
209
- if (!themeResponse.ok) throw new Error(`Failed to fetch theme: ${themeResponse.statusText}`);
210
- theme = await themeResponse.json();
211
- } else theme = (await api.get(themeUrl)).data;
212
- const logoUrl = assets["logo.png"] || assets["logo.svg"] || assets["logo.jpg"] || assets["logo.jpeg"] || assets["logo.webp"] || theme.logo;
213
- let cachedLogoUrl = logoUrl;
214
- if (logoUrl) cachedLogoUrl = await urlToDataUrl(logoUrl);
215
- return {
216
- ...theme,
217
- logo: cachedLogoUrl
218
- };
219
- }
220
- async function fetchAndApplyTheme() {
221
- const theme = await fetchTheme$1();
222
- if (theme.main) applyTheme(theme.main, theme.buttonColor);
223
- return theme;
10
+ //#region src/shared/device/redirectDeviceClassification.ts
11
+ function isDesktopOrEmulated$1() {
12
+ return isDesktopOrEmulated();
224
13
  }
225
14
  //#endregion
226
15
  //#region src/modules/flow/flowInit.ts
227
16
  var lazyIdModule = () => import("./id/id.es.js").then((m) => m.Id);
228
- var loadLazyHomeScreen = () => import("./homeScreen-B6T0JVh8.js").then((m) => m.HomeScreen);
17
+ var loadLazyHomeScreen = () => import("./homeScreen-Dycy1yhN.js").then((m) => m.HomeScreen);
229
18
  var homeScreenPreloadPromise;
230
19
  /**
231
20
  * Headless flow keys: backend-only steps with no UI. `<incode-flow>` renders
@@ -245,7 +34,6 @@ function getLazyCoreMachineLoader(moduleKey) {
245
34
  if (moduleKey === "AUTHENTICATION") return () => import("@incodetech/core/authentication").then((m) => m.authenticationMachine);
246
35
  if (moduleKey === "ID" || moduleKey === "TUTORIAL_ID" || moduleKey === "SECOND_ID") return () => import("@incodetech/core/id").then((m) => m.idCaptureMachine);
247
36
  if (moduleKey === "ID_OCR") return () => import("@incodetech/core/id-ocr").then((m) => m.idOcrStateMachine);
248
- if (moduleKey === "CPF_OCR") return () => import("@incodetech/core/cpf-ocr").then((m) => m.cpfOcrMachine);
249
37
  if (moduleKey === "FACE_MATCH") return () => import("@incodetech/core/face-match").then((m) => m.faceMatchMachine);
250
38
  if (moduleKey === "CURP_VALIDATION") return () => import("@incodetech/core/curp-validation").then((m) => m.curpValidationMachine);
251
39
  if (moduleKey === "GOVT_VALIDATION_PROVISIONING" || moduleKey === "INE_VALIDATION") return () => import("@incodetech/core/government-validation").then((m) => m.governmentValidationMachine);
@@ -290,32 +78,31 @@ var LAZY_UI_MODULES = {
290
78
  ID_CAPTURE: lazyIdModule,
291
79
  TUTORIAL_ID: lazyIdModule,
292
80
  SECOND_ID: lazyIdModule,
293
- FACE_MATCH: () => import("./faceMatch-B_HvxLm_.js").then((m) => m.FaceMatch),
81
+ FACE_MATCH: () => import("./faceMatch-2pfSeXeA.js").then((m) => m.FaceMatch),
294
82
  CURP_VALIDATION: () => import("./curp-validation/curp-validation.es.js").then((m) => m.CurpValidation),
295
83
  GOVT_VALIDATION_PROVISIONING: () => import("./government-validation/government-validation.es.js").then((m) => m.GovernmentValidation),
296
84
  INE_VALIDATION: () => import("./government-validation/government-validation.es.js").then((m) => m.GovernmentValidation),
297
85
  GEOLOCATION: () => import("./geolocation/geolocation.es.js").then((m) => m.Geolocation),
298
- EXTERNAL_VERIFICATION: () => import("./ekycModule-CDIEjI6V.js").then((m) => m.EkycModule),
299
- EKYB: () => import("./ekybModule-C6Nttked.js").then((m) => m.EkybModule),
300
- DOCUMENT_CAPTURE: () => import("./documentCapture-DXYYyxZl.js").then((m) => m.DocumentCapture),
301
- ADDRESS: () => import("./documentCapture-DXYYyxZl.js").then((m) => m.DocumentCapture),
86
+ EXTERNAL_VERIFICATION: () => import("./ekycModule-CewwzYvk.js").then((m) => m.EkycModule),
87
+ EKYB: () => import("./ekybModule-CR9A6Fqb.js").then((m) => m.EkybModule),
88
+ DOCUMENT_CAPTURE: () => import("./documentCapture-sB2_X-we.js").then((m) => m.DocumentCapture),
89
+ ADDRESS: () => import("./documentCapture-sB2_X-we.js").then((m) => m.DocumentCapture),
302
90
  COMBINED_CONSENT: () => import("./consent/consent.es.js").then((m) => m.Consent),
303
- MANDATORY_CONSENT: () => import("./mandatoryConsent-D0GTKu-H.js").then((m) => m.MandatoryConsent),
304
- ML_CONSENT: () => import("./mandatoryConsent-D0GTKu-H.js").then((m) => m.MandatoryConsent),
91
+ MANDATORY_CONSENT: () => import("./mandatoryConsent-DSAjFc0h.js").then((m) => m.MandatoryConsent),
92
+ ML_CONSENT: () => import("./mandatoryConsent-DSAjFc0h.js").then((m) => m.MandatoryConsent),
305
93
  SIGNATURE: () => import("./signature/signature.es.js").then((m) => m.Signature),
306
- ID_OCR: () => import("./idOcr-WFBvqy3b.js").then((m) => m.IdOcr),
307
- CPF_OCR: () => import("./cpfOcr-B79245-3.js").then((m) => m.CpfOcr),
94
+ ID_OCR: () => import("./idOcr-riTHUOlr.js").then((m) => m.IdOcr),
308
95
  ANTIFRAUD: () => import("./antifraud/antifraud.es.js").then((m) => m.Antifraud),
309
- CUSTOM_FIELDS: () => import("./customFields-BDsXR7A-.js").then((m) => m.CustomFields),
96
+ CUSTOM_FIELDS: () => import("./customFields-CiEguXX9.js").then((m) => m.CustomFields),
310
97
  WATCHLIST: () => import("./watchlist/watchlist.es.js").then((m) => m.Watchlist),
311
- WATCHLIST_BUSINESS: () => import("./watchlistForBusiness-D2Uo_TwF.js").then((m) => m.WatchlistForBusiness),
312
- INCODE_WATCHLIST: () => import("./customWatchlist-CYoRNCim.js").then((m) => m.CustomWatchlist),
98
+ WATCHLIST_BUSINESS: () => import("./watchlistForBusiness-zT9gCfTc.js").then((m) => m.WatchlistForBusiness),
99
+ INCODE_WATCHLIST: () => import("./customWatchlist-BSAW87qq.js").then((m) => m.CustomWatchlist),
313
100
  AE_SIGNATURE: () => import("./ae-signature/ae-signature.es.js").then((m) => m.AeSignature),
314
101
  QE_SIGNATURE: () => import("./qe-signature/qe-signature.es.js").then((m) => m.QeSignature),
315
102
  CROSS_DOCUMENT_DATA_MATCH: () => import("./cross-document-data-match/cross-document-data-match.es.js").then((m) => m.CrossDocumentDataMatch),
316
- DYNAMIC_FORMS: () => import("./dynamicForms-BifGbC9F.js").then((m) => m.DynamicForms),
103
+ DYNAMIC_FORMS: () => import("./dynamicForms-DU5fT72-.js").then((m) => m.DynamicForms),
317
104
  CERTIFICATE_ISSUANCE: () => import("./certificate-issuance/certificate-issuance.es.js").then((m) => m.CertificateIssuance),
318
- FIELD_COMPARISON: () => import("./fieldComparison-DfNEuEE5.js").then((m) => m.FieldComparison),
105
+ FIELD_COMPARISON: () => import("./fieldComparison-DUYp39WI.js").then((m) => m.FieldComparison),
319
106
  FISCAL_QR: () => import("./fiscal-qr/fiscal-qr.es.js").then((m) => m.FiscalQr),
320
107
  VIDEO_ONBOARDING: () => import("./video-selfie/video-selfie.es.js").then((m) => m.VideoSelfie)
321
108
  };
@@ -349,7 +136,7 @@ function preloadRedirectToMobile() {
349
136
  }
350
137
  function createFlowManager(options = {}) {
351
138
  const scopedLazyModules = {};
352
- const isDesktop = options.isDesktop ?? getDeviceClass() === "desktop";
139
+ const isDesktop = options.isDesktop ?? isDesktopOrEmulated$1();
353
140
  const { enableHome, ...flowFetchOptions } = options;
354
141
  let endScreen = {
355
142
  endScreenTitle: null,
@@ -383,7 +170,9 @@ function createFlowManager(options = {}) {
383
170
  } });
384
171
  }
385
172
  async function setupSDK(options) {
386
- await initializeSession({ token: options.token });
173
+ const sessionOptions = { token: options.token };
174
+ if (options.preloadFlow !== void 0) sessionOptions.preloadFlow = options.preloadFlow;
175
+ await initializeSession(sessionOptions);
387
176
  if (hasI18nInstance()) return;
388
177
  setI18nInstance(createI18n(options.lang ? { lang: options.lang } : void 0));
389
178
  }
@@ -395,18 +184,18 @@ async function initializeFlowManager(options) {
395
184
  });
396
185
  flowManager.load();
397
186
  }
398
- async function fetchTheme() {
187
+ async function fetchTheme(token) {
399
188
  try {
400
- const theme = await fetchAndApplyTheme();
401
- const uiConfig = {
402
- logoSrc: theme.logo,
403
- subtitle: theme.subtitle,
404
- hideFooterBranding: theme.hideFooterBranding
405
- };
406
- setUiConfig(uiConfig);
189
+ const activeToken = token ?? getStandaloneSetupPolicy().token;
190
+ if (!activeToken) return {};
191
+ const theme = await preloadDashboardTheme(activeToken);
407
192
  return {
408
193
  theme,
409
- uiConfig
194
+ uiConfig: {
195
+ logoSrc: theme.logo,
196
+ subtitle: theme.subtitle,
197
+ hideFooterBranding: theme.hideFooterBranding
198
+ }
410
199
  };
411
200
  } catch {
412
201
  return {};
@@ -673,4 +462,4 @@ function usePrefetchNextModule(steps, currentStepIndex, modules, currentModuleLo
673
462
  ]);
674
463
  }
675
464
  //#endregion
676
- export { warmupWasmIfNeeded as _, resolveApiKey as a, HEADLESS_FLOW_MODULE_KEYS as c, fetchTheme as d, initializeFlowManager as f, setupSDK as g, preloadRedirectToMobile as h, HEADLESS_WORKFLOW_MODULE_KEYS as i, LAZY_UI_MODULES as l, preloadHomeScreen as m, useModulePreloader as n, extractIncodeStatus as o, preloadFirstModule as p, usePrefetchNextModule as r, UnsupportedModule as s, useModuleLoader as t, createFlowManager as u, fetchAndApplyTheme as v, TerminalErrorPage as y };
465
+ export { warmupWasmIfNeeded as _, resolveApiKey as a, HEADLESS_FLOW_MODULE_KEYS as c, fetchTheme as d, initializeFlowManager as f, setupSDK as g, preloadRedirectToMobile as h, HEADLESS_WORKFLOW_MODULE_KEYS as i, LAZY_UI_MODULES as l, preloadHomeScreen as m, useModulePreloader as n, extractIncodeStatus as o, preloadFirstModule as p, usePrefetchNextModule as r, UnsupportedModule as s, useModuleLoader as t, createFlowManager as u, isDesktopOrEmulated$1 as v };
@@ -952,4 +952,4 @@ var preact_markup_module_default = function(t) {
952
952
  }, i;
953
953
  }(x$2);
954
954
  //#endregion
955
- export { y as _, D as a, Q$1 as b, z as c, T$1 as d, _ as f, x$1 as g, q$1 as h, C as i, A$1 as l, g$1 as m, c as n, P as o, d$1 as p, $ as r, gn as s, preact_markup_module_default as t, F$1 as u, u$2 as v, k$2 as x, K$1 as y };
955
+ export { k$2 as S, y as _, D as a, Q$1 as b, z as c, T$1 as d, _ as f, x$1 as g, q$1 as h, C as i, A$1 as l, g$1 as m, c as n, P as o, d$1 as p, $ as r, gn as s, preact_markup_module_default as t, F$1 as u, u$2 as v, _$1 as x, K$1 as y };
@@ -1,14 +1,15 @@
1
- import { n as useTranslation } from "./i18n-CU4xq8qC.js";
2
- import { v as u, x as k } from "./vendor-preact-DThS2ZQ_.js";
3
- import { t as Page } from "./page-DidH_RkX.js";
4
- import { t as Spinner } from "./spinner-BMeIEK1d.js";
5
- import { t as Button } from "./button-Dz6AsbmF.js";
6
- import { t as ErrorIcon } from "./errorIcon-BA4T6iy-.js";
7
- import { h as WarningIcon } from "./icons-CJJbIpBq.js";
8
- import { t as SuccessIcon } from "./successIcon-B5mGvdx1.js";
9
- import { t as AutoFocusTitle } from "./autoFocusTitle-CuRu2lPg.js";
1
+ import { a as useTranslation } from "./uiConfig-D7ezQeZ7.js";
2
+ import { S as k, v as u } from "./vendor-preact-mvwZ8mJj.js";
3
+ import { o as Page } from "./incodeComponent-B-daxouV.js";
4
+ import { t as Spacer } from "./spacer-Bnmh-DfR.js";
5
+ import { t as Spinner } from "./spinner-HP_c74K-.js";
6
+ import { n as ErrorIcon, r as Button } from "./incode-logo-cGsd55rc.js";
7
+ import { v as WarningIcon } from "./icons-D0cfSCBM.js";
8
+ import { t as SuccessIcon } from "./successIcon-Bj8Y9CuI.js";
9
+ import { t as AutoFocusTitle } from "./autoFocusTitle-D7VzaZ2P.js";
10
10
  //#region src/shared/verificationResult/verificationResult.tsx
11
- var VerificationResult = ({ status, submittingTitle, successTitle, failureTitle, warningTitle, submittingSubtitle, onRetry, onSkip, retryLabel, skipLabel, hideFooterBranding = true, footerBrandingSlot }) => {
11
+ var SUBTITLE_ID = "IncodeVerificationResultSubtitle";
12
+ var VerificationResult = ({ status, submittingTitle, successTitle, failureTitle, warningTitle, submittingSubtitle, errorMessage, onRetry, onSkip, retryLabel, skipLabel, hideFooterBranding = true, footerBrandingSlot }) => {
12
13
  const { t } = useTranslation();
13
14
  const hasActions = Boolean(onRetry || onSkip);
14
15
  const buildResultContent = () => {
@@ -21,7 +22,7 @@ var VerificationResult = ({ status, submittingTitle, successTitle, failureTitle,
21
22
  };
22
23
  const iconByStatus = {
23
24
  success: /* @__PURE__ */ u(SuccessIcon, { size: 64 }),
24
- warning: /* @__PURE__ */ u(WarningIcon, { size: 40 }),
25
+ warning: /* @__PURE__ */ u(WarningIcon, { size: 64 }),
25
26
  failure: /* @__PURE__ */ u(ErrorIcon, { size: 64 })
26
27
  };
27
28
  const titleByStatus = {
@@ -30,10 +31,20 @@ var VerificationResult = ({ status, submittingTitle, successTitle, failureTitle,
30
31
  failure: failureTitle ?? t("verification.failureTitle")
31
32
  };
32
33
  return {
33
- mainContent: /* @__PURE__ */ u(k, { children: [iconByStatus[status], /* @__PURE__ */ u(AutoFocusTitle, {
34
- className: "IncodeVerificationResult__title",
35
- children: titleByStatus[status]
36
- })] }),
34
+ mainContent: /* @__PURE__ */ u(k, { children: [
35
+ iconByStatus[status],
36
+ /* @__PURE__ */ u(Spacer, { size: 16 }),
37
+ /* @__PURE__ */ u(AutoFocusTitle, {
38
+ className: "IncodeVerificationResult__title",
39
+ describedById: errorMessage ? SUBTITLE_ID : void 0,
40
+ children: titleByStatus[status]
41
+ }),
42
+ errorMessage ? /* @__PURE__ */ u("p", {
43
+ id: SUBTITLE_ID,
44
+ className: "IncodeVerificationResult__subtitle",
45
+ children: errorMessage
46
+ }) : null
47
+ ] }),
37
48
  showActions: status === "warning" || status === "failure"
38
49
  };
39
50
  };