@incodetech/core 0.0.0-dev-20261014-17c86ff6 → 0.0.0-dev-20261014-1670df29

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 (81) hide show
  1. package/dist/{FaceDetectionProvider-C3TfpNoU.esm.js → FaceDetectionProvider-nnhjmMV8.esm.js} +6 -6
  2. package/dist/ae-signature.esm.js +1 -1
  3. package/dist/{apiError-Crt05WQR.esm.js → apiError-BQGiCr9h.esm.js} +1 -1
  4. package/dist/attemptCarry-BCQgBZ7b.esm.js +45 -0
  5. package/dist/authentication.esm.js +2 -2
  6. package/dist/{authenticationManager-BPCglvRl.esm.js → authenticationManager-BLRj_oL4.esm.js} +3 -3
  7. package/dist/{authenticationStateMachine-DuYePbDx.esm.js → authenticationStateMachine-O7C5PXyH.esm.js} +2 -2
  8. package/dist/certificate-issuance.esm.js +2 -2
  9. package/dist/{certificateIssuanceManager-CMg4SgL4.esm.js → certificateIssuanceManager-DpQlzzx5.esm.js} +1 -1
  10. package/dist/{certificateIssuanceStateMachine-Cs64QmYH.esm.js → certificateIssuanceStateMachine-CaOzoYfA.esm.js} +1 -1
  11. package/dist/connectivity-HSl0diCx.esm.js +133 -0
  12. package/dist/consent.d.ts +1 -1
  13. package/dist/{consentManager-Cv_0QKLD.d.ts → consentManager-Ca8FHlC4.d.ts} +8 -8
  14. package/dist/curp-validation.esm.js +2 -2
  15. package/dist/{curpValidationManager-DBNIn8BF.esm.js → curpValidationManager-DmfAsC6f.esm.js} +1 -1
  16. package/dist/{curpValidationStateMachine-DAxImy8p.esm.js → curpValidationStateMachine-B9sCPRaH.esm.js} +25 -14
  17. package/dist/{deepsightLoader-CvTg_kjm.esm.js → deepsightLoader-UXGc403Q.esm.js} +4 -4
  18. package/dist/{deepsightService-BYCHaPmd.esm.js → deepsightService-DI0uiE68.esm.js} +1 -1
  19. package/dist/document-capture.d.ts +1 -1
  20. package/dist/document-capture.esm.js +2 -2
  21. package/dist/{documentCaptureManager-DkyDtm3Y.d.ts → documentCaptureManager-DfoKYNcx.d.ts} +9 -1
  22. package/dist/{documentCaptureManager-C9XUnYU6.esm.js → documentCaptureManager-pkph2Ise.esm.js} +1 -1
  23. package/dist/{documentCaptureStateMachine-BHDsCfhL.esm.js → documentCaptureStateMachine-BTiH2YGb.esm.js} +38 -30
  24. package/dist/dynamic-forms.esm.js +2 -2
  25. package/dist/{dynamicFormsManager-6iRjKrB0.esm.js → dynamicFormsManager-jXO_VdVI.esm.js} +1 -1
  26. package/dist/{dynamicFormsStateMachine-CZoUwpKM.esm.js → dynamicFormsStateMachine-BxGrebr6.esm.js} +1 -1
  27. package/dist/ekyb.esm.js +3 -3
  28. package/dist/{ekybManager-CT_JQdsu.esm.js → ekybManager-BsEC0z6j.esm.js} +1 -1
  29. package/dist/{ekybStateMachine-C7t6vXDy.esm.js → ekybStateMachine-782_EAbL.esm.js} +1 -1
  30. package/dist/electronic-signature.esm.js +1 -1
  31. package/dist/{electronicSignatureManager-BkroUsg5.esm.js → electronicSignatureManager-BvKmLsO7.esm.js} +2 -2
  32. package/dist/email.esm.js +2 -2
  33. package/dist/{emailManager-CtlKRRaR.esm.js → emailManager-wsqyGXcv.esm.js} +1 -1
  34. package/dist/{emailStateMachine-5Neq3rE5.esm.js → emailStateMachine-g1zgI6-w.esm.js} +31 -19
  35. package/dist/extensibility.d.ts +4 -4
  36. package/dist/extensibility.esm.js +15 -15
  37. package/dist/{externalFetch-DrR9xshk.esm.js → externalFetch-mShctxq_.esm.js} +3 -0
  38. package/dist/{faceCaptureManagerFactory-DAHyC1O_.esm.js → faceCaptureManagerFactory-Bkq-Zyud.esm.js} +1 -1
  39. package/dist/{faceCaptureSetup-Du7zdL7Y.esm.js → faceCaptureSetup-DGbFv_lR.esm.js} +20 -6
  40. package/dist/{feature-management-B2JEpoCb.esm.js → feature-management-BxNNoDb_.esm.js} +1 -1
  41. package/dist/feature-management.esm.js +1 -1
  42. package/dist/flow.esm.js +6 -9
  43. package/dist/{flowCompletionService-DyhDnWkk.esm.js → flowCompletionService-DoOZsAkE.esm.js} +1 -1
  44. package/dist/{flowServices-CF3-ie-3.esm.js → flowServices-J5PML3Fw.esm.js} +4 -4
  45. package/dist/geolocation.d.ts +1 -1
  46. package/dist/geolocation.esm.js +2 -2
  47. package/dist/{geolocationManager-Dn24g1fl.d.ts → geolocationManager-CpIjrPEG.d.ts} +14 -8
  48. package/dist/{geolocationManager-D-DRi03N.esm.js → geolocationManager-CsEoGzz_.esm.js} +5 -7
  49. package/dist/{geolocationStateMachine-hsoBC3si.esm.js → geolocationStateMachine-BRd4yWfe.esm.js} +10 -6
  50. package/dist/id-selfie-flow.esm.js +8 -8
  51. package/dist/id.esm.js +3 -3
  52. package/dist/{idCaptureDefaults-DBfhJEmA.esm.js → idCaptureDefaults-DADOO6VS.esm.js} +1 -1
  53. package/dist/{idCaptureManager-B1CqJDgK.esm.js → idCaptureManager-CTqOUIzb.esm.js} +3 -3
  54. package/dist/{idCaptureServices-E8iBP8O7.esm.js → idCaptureServices-Bq4RdayZ.esm.js} +4 -4
  55. package/dist/{idCaptureStateMachine-nldpCE5N.esm.js → idCaptureStateMachine-C_c-xD-u.esm.js} +52 -27
  56. package/dist/index.esm.js +1 -1
  57. package/dist/mandatory-consent.d.ts +1 -1
  58. package/dist/{mandatoryConsentManager-BkaLkcA2.d.ts → mandatoryConsentManager-ntGT3XBv.d.ts} +4 -4
  59. package/dist/{multipartRecordingService-DbeQpXdU.esm.js → multipartRecordingService-BUQfonSs.esm.js} +1 -11
  60. package/dist/phone.esm.js +2 -2
  61. package/dist/{phoneManager-BGBcpqsk.esm.js → phoneManager-DCkYa3x8.esm.js} +1 -1
  62. package/dist/{phoneStateMachine-CEm2y7yG.esm.js → phoneStateMachine-D1NKQ-zM.esm.js} +35 -23
  63. package/dist/qe-signature.esm.js +1 -1
  64. package/dist/{runChildModule-Bk8iIlOY.esm.js → runChildModule-ibVgOupr.esm.js} +1 -1
  65. package/dist/{sdkVersion-CO8QI7Kw.esm.js → sdkVersion-DgSsq5kd.esm.js} +1 -1
  66. package/dist/selfie.esm.js +6 -6
  67. package/dist/{selfieErrorUtils--ujzZ8DE.esm.js → selfieErrorUtils-DaLNGKZY.esm.js} +1 -1
  68. package/dist/{selfieManager-B-GvEZyH.esm.js → selfieManager-CiGj1cvO.esm.js} +3 -3
  69. package/dist/{selfieStateMachine-CzoyDjAC.esm.js → selfieStateMachine-vA55Kf8-.esm.js} +3 -3
  70. package/dist/{session-BPn7B0C0.esm.js → session-CW9L_h0-.esm.js} +3 -3
  71. package/dist/session.d.ts +19 -1
  72. package/dist/session.esm.js +6 -5
  73. package/dist/{sessionInitializer-BGQRpBpf.esm.js → sessionInitializer-8oSHIE22.esm.js} +7 -6
  74. package/dist/{setup-DI95aSUq.esm.js → setup-slU1A4sr.esm.js} +4 -4
  75. package/dist/{trueSightService-Ddz01P53.esm.js → trueSightService-Bzjy3-tE.esm.js} +14 -5
  76. package/dist/video-selfie.esm.js +24 -11
  77. package/dist/{videoSelfieCameraWarmer-D3uPqG3d.esm.js → videoSelfieCameraWarmer-COsjS4Q1.esm.js} +5 -5
  78. package/dist/wasm.esm.js +2 -2
  79. package/dist/workflow.d.ts +3 -0
  80. package/dist/workflow.esm.js +34 -28
  81. package/package.json +1 -1
@@ -1,17 +1,17 @@
1
- import { c as trueSightHintTransition, r as noteTrueSightCaptureActivity } from "./trueSightService-Ddz01P53.esm.js";
1
+ import { c as trueSightHintTransition, r as noteTrueSightCaptureActivity } from "./trueSightService-Bzjy3-tE.esm.js";
2
2
  import { s as wasmRuntime } from "./warmup-DMtbyb2l.esm.js";
3
3
  import { r as BaseWasmProvider } from "./WasmUtilProvider-CIdnE7Fx.esm.js";
4
4
  import { t as api } from "./api-Bx3gKW_y.esm.js";
5
- import { t as ensureWasmPipelines } from "./setup-DI95aSUq.esm.js";
5
+ import { t as ensureWasmPipelines } from "./setup-slU1A4sr.esm.js";
6
6
  import { t as endpoints } from "./endpoints-DHzlkQNe.esm.js";
7
- import "./sessionInitializer-BGQRpBpf.esm.js";
7
+ import "./sessionInitializer-8oSHIE22.esm.js";
8
8
  import { t as addDeviceStats } from "./stats-DmG_tkGk.esm.js";
9
9
  import { c as isIPhone14OrHigher, i as isDesktop } from "./platform-DkcRc9JV.esm.js";
10
10
  import { i as requestCameraAccess, o as stopCameraStream, r as getCameraReacquisitionConstraints } from "./camera-sIa9ceW2.esm.js";
11
11
  import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
12
- import { o as StreamCanvasProcessingSession } from "./multipartRecordingService-DbeQpXdU.esm.js";
12
+ import { o as StreamCanvasProcessingSession } from "./multipartRecordingService-BUQfonSs.esm.js";
13
13
  import { i as hasBackCamera, n as getBackCameraStream, r as getDesktopCameraStream, t as ensureFrontCameraStream } from "./backCameraStream-CMvXj4X4.esm.js";
14
- import "./deepsightService-BYCHaPmd.esm.js";
14
+ import "./deepsightService-DI0uiE68.esm.js";
15
15
  import { t as getDeviceClass } from "./getDeviceClass-bsWdEDxP.esm.js";
16
16
  //#region src/internal/faceCapture/onDeviceFaceResults.ts
17
17
  /**
@@ -272,7 +272,7 @@ function startDetection(params) {
272
272
  };
273
273
  }
274
274
  async function initializeDeepsightSession(options) {
275
- const { loadDeepsightSession } = await import("./deepsightLoader-CvTg_kjm.esm.js");
275
+ const { loadDeepsightSession } = await import("./deepsightLoader-UXGc403Q.esm.js");
276
276
  return loadDeepsightSession({
277
277
  ds: options.ds,
278
278
  storage: options.storage
@@ -1,4 +1,4 @@
1
- import { c as areAllConsented, i as AE_CONSENT_KEYS, r as electronicSignatureMachine, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-BkroUsg5.esm.js";
1
+ import { c as areAllConsented, i as AE_CONSENT_KEYS, r as electronicSignatureMachine, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-BvKmLsO7.esm.js";
2
2
  //#region src/modules/ae-signature/index.ts
3
3
  function createAeSignatureManager(options) {
4
4
  return createElectronicSignatureManager({ config: {
@@ -1,4 +1,4 @@
1
- import { l as trueSightLog, u as categoryForEndpoint } from "./trueSightService-Ddz01P53.esm.js";
1
+ import { l as trueSightLog, u as categoryForEndpoint } from "./trueSightService-Bzjy3-tE.esm.js";
2
2
  //#region src/internal/http/apiError.ts
3
3
  /**
4
4
  * Incode API error.
@@ -0,0 +1,45 @@
1
+ import { r as getToken } from "./api-Bx3gKW_y.esm.js";
2
+ import { a as watchConnectivity } from "./connectivity-HSl0diCx.esm.js";
3
+ //#region src/internal/session/attemptCarry.ts
4
+ const carried = /* @__PURE__ */ new Map();
5
+ /**
6
+ * Keeps spent attempts across the remount after a connectivity loss: the
7
+ * session boundary stops the step while offline and mounts a new manager on
8
+ * recovery. Call once in the machine's `context` factory.
9
+ *
10
+ * `read` sees every snapshot until connectivity is lost, so an attempt whose
11
+ * outcome arrives after the loss is not charged. It returns the counters the
12
+ * next mount starts with; a step that reached its no-attempts outcome must
13
+ * return a value its start guard reads as spent. Only an actor that ends while
14
+ * connectivity is lost leaves a carry, and the next actor of the same machine
15
+ * in the session takes it once.
16
+ */
17
+ function carryAttempts(machineId, self, read) {
18
+ const token = getToken();
19
+ if (token === null) return {};
20
+ const key = `${token}:${machineId}`;
21
+ const restored = carried.get(key) ?? {};
22
+ carried.delete(key);
23
+ let carry = restored;
24
+ let lost = false;
25
+ const unwatch = watchConnectivity((next) => {
26
+ lost = next;
27
+ });
28
+ const end = () => {
29
+ unwatch();
30
+ if (lost) carried.set(key, carry);
31
+ };
32
+ self.subscribe({
33
+ next: (snapshot) => {
34
+ if (!lost) carry = read(snapshot, carry);
35
+ },
36
+ complete: end,
37
+ error: (err) => {
38
+ end();
39
+ throw err;
40
+ }
41
+ });
42
+ return restored;
43
+ }
44
+ //#endregion
45
+ export { carryAttempts as t };
@@ -1,3 +1,3 @@
1
- import { t as authenticationMachine } from "./authenticationStateMachine-DuYePbDx.esm.js";
2
- import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-BPCglvRl.esm.js";
1
+ import { t as authenticationMachine } from "./authenticationStateMachine-O7C5PXyH.esm.js";
2
+ import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-BLRj_oL4.esm.js";
3
3
  export { authenticationMachine, createAuthenticationActor, createAuthenticationManager };
@@ -1,9 +1,9 @@
1
1
  import { t as WasmUtilProvider } from "./WasmUtilProvider-CIdnE7Fx.esm.js";
2
2
  import { n as eventModuleNames } from "./events-CAgFE-k3.esm.js";
3
- import { u as BrowserStorageProvider } from "./setup-DI95aSUq.esm.js";
3
+ import { u as BrowserStorageProvider } from "./setup-slU1A4sr.esm.js";
4
4
  import { s as createActor } from "./xstate.esm-DSajW7CJ.esm.js";
5
- import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-DAHyC1O_.esm.js";
6
- import { t as authenticationMachine } from "./authenticationStateMachine-DuYePbDx.esm.js";
5
+ import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-Bkq-Zyud.esm.js";
6
+ import { t as authenticationMachine } from "./authenticationStateMachine-O7C5PXyH.esm.js";
7
7
  //#region src/modules/authentication/authenticationActor.ts
8
8
  function createAuthenticationActor(options) {
9
9
  const dependencies = options.dependencies ?? {
@@ -1,7 +1,7 @@
1
1
  import { i as assign } from "./xstate.esm-DSajW7CJ.esm.js";
2
2
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
3
- import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-Du7zdL7Y.esm.js";
4
- import { d as FACE_ERROR_CODES, f as isOnDeviceMode } from "./FaceDetectionProvider-C3TfpNoU.esm.js";
3
+ import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-DGbFv_lR.esm.js";
4
+ import { d as FACE_ERROR_CODES, f as isOnDeviceMode } from "./FaceDetectionProvider-nnhjmMV8.esm.js";
5
5
  import { o as PROTECTED_CAPTURE_TARGET } from "./createCameraCycleOwnership-kdlhkmmY.esm.js";
6
6
  //#region src/modules/authentication/authenticationErrorUtils.ts
7
7
  const AUTH_ERROR_MAP = {
@@ -1,3 +1,3 @@
1
- import { a as MIN_PASSWORD_LENGTH, i as validatePassword, n as emptyPasswordValidations, o as PASSWORD_VALIDATION_KEYS, r as isPasswordValid, s as REQUIREMENT_I18N_KEYS, t as certificateIssuanceMachine } from "./certificateIssuanceStateMachine-Cs64QmYH.esm.js";
2
- import { n as createCertificateIssuanceManagerFromActor, t as createCertificateIssuanceManager } from "./certificateIssuanceManager-CMg4SgL4.esm.js";
1
+ import { a as MIN_PASSWORD_LENGTH, i as validatePassword, n as emptyPasswordValidations, o as PASSWORD_VALIDATION_KEYS, r as isPasswordValid, s as REQUIREMENT_I18N_KEYS, t as certificateIssuanceMachine } from "./certificateIssuanceStateMachine-CaOzoYfA.esm.js";
2
+ import { n as createCertificateIssuanceManagerFromActor, t as createCertificateIssuanceManager } from "./certificateIssuanceManager-DpQlzzx5.esm.js";
3
3
  export { MIN_PASSWORD_LENGTH, PASSWORD_VALIDATION_KEYS, REQUIREMENT_I18N_KEYS, certificateIssuanceMachine, createCertificateIssuanceManager, createCertificateIssuanceManagerFromActor, emptyPasswordValidations, isPasswordValid, validatePassword };
@@ -1,6 +1,6 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CAgFE-k3.esm.js";
2
2
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
3
- import { r as isPasswordValid, t as certificateIssuanceMachine } from "./certificateIssuanceStateMachine-Cs64QmYH.esm.js";
3
+ import { r as isPasswordValid, t as certificateIssuanceMachine } from "./certificateIssuanceStateMachine-CaOzoYfA.esm.js";
4
4
  //#region src/modules/certificate-issuance/certificateIssuanceActor.ts
5
5
  /**
6
6
  * Creates and starts a certificate issuance actor.
@@ -2,7 +2,7 @@ import { n as getApi, r as getToken } from "./api-Bx3gKW_y.esm.js";
2
2
  import { t as endpoints } from "./endpoints-DHzlkQNe.esm.js";
3
3
  import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
5
- import { t as externalFetch } from "./externalFetch-DrR9xshk.esm.js";
5
+ import { t as externalFetch } from "./externalFetch-mShctxq_.esm.js";
6
6
  //#region src/modules/certificate-issuance/certificateIssuanceServices.ts
7
7
  function buildIssueCertificateUrl(baseURL) {
8
8
  return `${baseURL.endsWith("/") ? baseURL.slice(0, -1) : baseURL}${endpoints.certificateIssuanceIssue}`;
@@ -0,0 +1,133 @@
1
+ import { r as subscribeHttpErrors } from "./HttpRequestError-Bh0pNGSC.esm.js";
2
+ import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
3
+ //#region ../infra/src/providers/browser/BrowserNetworkStatusProvider.ts
4
+ function listen(type, listener) {
5
+ if (typeof window === "undefined" || typeof window.addEventListener !== "function") return () => {};
6
+ window.addEventListener(type, listener);
7
+ return () => {
8
+ window.removeEventListener(type, listener);
9
+ };
10
+ }
11
+ var BrowserNetworkStatusProvider = class {
12
+ onOnline(listener) {
13
+ return listen("online", listener);
14
+ }
15
+ onOffline(listener) {
16
+ return listen("offline", listener);
17
+ }
18
+ isOnline() {
19
+ return typeof navigator === "undefined" || navigator.onLine !== false;
20
+ }
21
+ };
22
+ //#endregion
23
+ //#region src/internal/session/connectivity.ts
24
+ const SETTLE_MS = 1500;
25
+ const network = new BrowserNetworkStatusProvider();
26
+ const timer = BrowserTimerProvider.getInstance();
27
+ const listeners = /* @__PURE__ */ new Set();
28
+ let lost = false;
29
+ /** Counts losses, so a retry can tell a loss happened during its request. */
30
+ let losses = 0;
31
+ let started = false;
32
+ let settle;
33
+ function cancelSettle() {
34
+ if (settle === void 0) return;
35
+ timer.clearTimeout(settle);
36
+ settle = void 0;
37
+ }
38
+ function set(next) {
39
+ cancelSettle();
40
+ if (lost === next) return;
41
+ lost = next;
42
+ if (next) losses += 1;
43
+ for (const listener of [...listeners]) listener(next);
44
+ }
45
+ /** Lazy, so headless users that never subscribe keep fail-fast requests. */
46
+ function start() {
47
+ if (started) return;
48
+ started = true;
49
+ lost = !network.isOnline();
50
+ network.onOffline(() => set(true));
51
+ network.onOnline(() => {
52
+ cancelSettle();
53
+ settle = timer.setTimeout(() => set(false), SETTLE_MS);
54
+ });
55
+ subscribeHttpErrors((error) => {
56
+ if (error.status === 0 && !network.isOnline()) set(true);
57
+ });
58
+ }
59
+ /**
60
+ * Subscribes to connectivity loss and recovery. The listener receives `true`
61
+ * when the browser goes offline (or a request fails while it reports offline,
62
+ * before the `offline` event arrives), and
63
+ * `false` 1.5 s after the browser reports `online` (or on
64
+ * {@link resumeConnectivity}). Fires `true` at once if connectivity is already
65
+ * lost. Returns an unsubscribe function.
66
+ */
67
+ function onConnectivityChange(listener) {
68
+ start();
69
+ return watchConnectivity(listener);
70
+ }
71
+ /**
72
+ * Like {@link onConnectivityChange}, but does not start the store, so
73
+ * headless users that never subscribe keep fail-fast requests (and this
74
+ * listener then never fires).
75
+ */
76
+ function watchConnectivity(listener) {
77
+ listeners.add(listener);
78
+ if (lost) listener(true);
79
+ return () => {
80
+ listeners.delete(listener);
81
+ };
82
+ }
83
+ /** True while connectivity is lost. Starts the store, like a subscribe. */
84
+ function isConnectivityLost() {
85
+ start();
86
+ return lost;
87
+ }
88
+ /**
89
+ * Ends the lost state at once, without the settle wait. Returns `false` and
90
+ * does nothing while the browser still reports offline.
91
+ */
92
+ function resumeConnectivity() {
93
+ if (!network.isOnline()) return false;
94
+ set(false);
95
+ return true;
96
+ }
97
+ /** Resolves when connectivity is no longer lost; rejects on abort. */
98
+ function untilOnline(signal) {
99
+ if (!lost) return Promise.resolve();
100
+ if (signal?.aborted) return Promise.reject(signal.reason);
101
+ return new Promise((resolve, reject) => {
102
+ const onChange = (next) => {
103
+ if (next) return;
104
+ listeners.delete(onChange);
105
+ signal?.removeEventListener("abort", onAbort);
106
+ resolve();
107
+ };
108
+ const onAbort = () => {
109
+ listeners.delete(onChange);
110
+ reject(signal?.reason);
111
+ };
112
+ listeners.add(onChange);
113
+ signal?.addEventListener("abort", onAbort, { once: true });
114
+ });
115
+ }
116
+ /**
117
+ * Runs `run`; when it fails while connectivity is lost, waits for reconnect
118
+ * and runs it again. Any other failure is rethrown, so callers keep their
119
+ * existing error handling. Use only for requests that are safe to repeat.
120
+ */
121
+ async function retryAfterReconnect(run, signal) {
122
+ for (;;) {
123
+ const before = losses;
124
+ try {
125
+ return await run();
126
+ } catch (error) {
127
+ if (signal?.aborted || !lost && losses === before) throw error;
128
+ await untilOnline(signal);
129
+ }
130
+ }
131
+ }
132
+ //#endregion
133
+ export { watchConnectivity as a, retryAfterReconnect as i, onConnectivityChange as n, BrowserNetworkStatusProvider as o, resumeConnectivity as r, isConnectivityLost as t };
package/dist/consent.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as ConsentActor, c as ConsentConfig, i as createConsentManagerFromActor, n as ConsentState, o as consentMachine, r as createConsentManager, s as ConsentCheckbox, t as ConsentManager } from "./consentManager-Cv_0QKLD.js";
1
+ import { a as ConsentActor, c as ConsentConfig, i as createConsentManagerFromActor, n as ConsentState, o as consentMachine, r as createConsentManager, s as ConsentCheckbox, t as ConsentManager } from "./consentManager-Ca8FHlC4.js";
2
2
  export { type ConsentActor, type ConsentCheckbox, type ConsentConfig, type ConsentManager, type ConsentState, consentMachine, createConsentManager, createConsentManagerFromActor };
@@ -77,14 +77,6 @@ declare const consentMachine: StateMachine<ConsentContext, {
77
77
  type: "setError";
78
78
  params: NonReducibleUnknown;
79
79
  };
80
- clearError: {
81
- type: "clearError";
82
- params: NonReducibleUnknown;
83
- };
84
- resetContext: {
85
- type: "resetContext";
86
- params: NonReducibleUnknown;
87
- };
88
80
  setConsentData: {
89
81
  type: "setConsentData";
90
82
  params: NonReducibleUnknown;
@@ -93,6 +85,14 @@ declare const consentMachine: StateMachine<ConsentContext, {
93
85
  type: "toggleCheckbox";
94
86
  params: NonReducibleUnknown;
95
87
  };
88
+ clearError: {
89
+ type: "clearError";
90
+ params: NonReducibleUnknown;
91
+ };
92
+ resetContext: {
93
+ type: "resetContext";
94
+ params: NonReducibleUnknown;
95
+ };
96
96
  }>, {
97
97
  type: "canSubmit";
98
98
  params: unknown;
@@ -1,3 +1,3 @@
1
- import { a as mexicanStates, n as ENTER_CURP_FIELD, r as GENERATE_CURP_FIELDS, t as curpValidationMachine } from "./curpValidationStateMachine-DAxImy8p.esm.js";
2
- import { n as createCurpValidationManagerFromActor, t as createCurpValidationManager } from "./curpValidationManager-DBNIn8BF.esm.js";
1
+ import { a as mexicanStates, n as ENTER_CURP_FIELD, r as GENERATE_CURP_FIELDS, t as curpValidationMachine } from "./curpValidationStateMachine-B9sCPRaH.esm.js";
2
+ import { n as createCurpValidationManagerFromActor, t as createCurpValidationManager } from "./curpValidationManager-DmfAsC6f.esm.js";
3
3
  export { ENTER_CURP_FIELD, GENERATE_CURP_FIELDS, createCurpValidationManager, createCurpValidationManagerFromActor, curpValidationMachine, mexicanStates };
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CAgFE-k3.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
4
- import { i as isValidCurp, r as GENERATE_CURP_FIELDS, t as curpValidationMachine } from "./curpValidationStateMachine-DAxImy8p.esm.js";
4
+ import { i as isValidCurp, r as GENERATE_CURP_FIELDS, t as curpValidationMachine } from "./curpValidationStateMachine-B9sCPRaH.esm.js";
5
5
  //#region src/modules/curp-validation/curpValidationActor.ts
6
6
  function createCurpValidationActor(options) {
7
7
  return createActor(curpValidationMachine, { input: { config: options.config } }).start();
@@ -2,6 +2,7 @@ import { t as api } from "./api-Bx3gKW_y.esm.js";
2
2
  import { t as endpoints } from "./endpoints-DHzlkQNe.esm.js";
3
3
  import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
5
+ import { t as carryAttempts } from "./attemptCarry-BCQgBZ7b.esm.js";
5
6
  //#region src/modules/curp-validation/curpValidationUtils.ts
6
7
  const CURP_PATTERN = /^([A-Z][AEIOUX][A-Z]{2}\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])[HMX](?:AS|B[CS]|C[CLMSH]|D[FG]|G[TR]|HG|JC|M[CNS]|N[ETL]|OC|PL|Q[TR]|S[PLR]|T[CSL]|VZ|YN|ZS)[B-DF-HJ-NP-TV-Z]{3}[A-Z\d])(\d)$/;
7
8
  function isValidCurp(curp) {
@@ -432,22 +433,32 @@ const curpValidationMachine = setup({
432
433
  }).createMachine({
433
434
  id: "curpValidation",
434
435
  initial: "idle",
435
- context: ({ input }) => ({
436
- config: input.config,
437
- curp: "",
438
- generateForm: { ...DEFAULT_GENERATE_FORM },
439
- retriesLeft: input.config.maxRetries ?? 1,
440
- generatedCurp: void 0,
441
- error: void 0,
442
- fromGenerate: false,
443
- fromAutoVerify: false
444
- }),
436
+ context: ({ input, self }) => {
437
+ const carried = carryAttempts("curpValidation", self, (s) => ({ retriesLeft: s.matches("failure") || s.matches("generateError") ? s.context.retriesLeft - 1 : s.context.retriesLeft }));
438
+ return {
439
+ config: input.config,
440
+ curp: "",
441
+ generateForm: { ...DEFAULT_GENERATE_FORM },
442
+ retriesLeft: carried.retriesLeft ?? input.config.maxRetries ?? 1,
443
+ generatedCurp: void 0,
444
+ error: void 0,
445
+ fromGenerate: false,
446
+ fromAutoVerify: false
447
+ };
448
+ },
445
449
  states: {
446
450
  idle: { on: {
447
- LOAD: [{
448
- target: "loading",
449
- guard: "hasPrefillFromOcr"
450
- }, { target: "enterCurp" }],
451
+ LOAD: [
452
+ {
453
+ target: "finished",
454
+ guard: ({ context }) => context.retriesLeft < Math.min(0, context.config.maxRetries ?? 1)
455
+ },
456
+ {
457
+ target: "loading",
458
+ guard: "hasPrefillFromOcr"
459
+ },
460
+ { target: "enterCurp" }
461
+ ],
451
462
  CLOSE: "closed"
452
463
  } },
453
464
  loading: {
@@ -1,10 +1,10 @@
1
- import { l as trueSightLog } from "./trueSightService-Ddz01P53.esm.js";
1
+ import { l as trueSightLog } from "./trueSightService-Bzjy3-tE.esm.js";
2
2
  import { t as WasmUtilProvider } from "./WasmUtilProvider-CIdnE7Fx.esm.js";
3
- import { t as SDK_VERSION } from "./sdkVersion-CO8QI7Kw.esm.js";
4
- import { _ as IpifyProvider, b as BrowserEnvironmentProvider, n as getFingerprintEnabled, t as getDisableIpify } from "./sessionInitializer-BGQRpBpf.esm.js";
3
+ import { t as SDK_VERSION } from "./sdkVersion-DgSsq5kd.esm.js";
4
+ import { _ as IpifyProvider, b as BrowserEnvironmentProvider, n as getFingerprintEnabled, t as getDisableIpify } from "./sessionInitializer-8oSHIE22.esm.js";
5
5
  import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-BXCGqP48.esm.js";
6
6
  import { t as MotionSensorProvider } from "./MotionSensorProvider-DYxh8TjR.esm.js";
7
- import { t as createDeepsightService } from "./deepsightService-BYCHaPmd.esm.js";
7
+ import { t as createDeepsightService } from "./deepsightService-DI0uiE68.esm.js";
8
8
  //#region ../infra/src/providers/browser/VisibilityProvider.ts
9
9
  var VisibilityProvider = class {
10
10
  constructor() {
@@ -1,5 +1,5 @@
1
1
  import { t as api } from "./api-Bx3gKW_y.esm.js";
2
- import { h as isBrowserSimulation, v as getThumbmarkId, x as fingerprintSignalsReporter } from "./sessionInitializer-BGQRpBpf.esm.js";
2
+ import { h as isBrowserSimulation, v as getThumbmarkId, x as fingerprintSignalsReporter } from "./sessionInitializer-8oSHIE22.esm.js";
3
3
  import { t as addDeviceStats } from "./stats-DmG_tkGk.esm.js";
4
4
  import { t as getParsedUserAgent } from "./getParsedUserAgent-DhQPeKqw.esm.js";
5
5
  import { t as getUserAgent } from "./getBrowser-CBiibsL-.esm.js";
@@ -1,3 +1,3 @@
1
1
  import { a as DocumentCaptureErrorCode, c as DocumentType, n as DOCUMENT_CAPTURE_ERROR_CODES, r as DocumentCaptureConfig, s as DocumentCaptureNextPageType } from "./types-DUnFZ08M.js";
2
- import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-DkyDtm3Y.js";
2
+ import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-DfoKYNcx.js";
3
3
  export { DOCUMENT_CAPTURE_ERROR_CODES, type DocumentCaptureActor, type DocumentCaptureConfig, type DocumentCaptureErrorCode, type DocumentCaptureManager, type DocumentCaptureNextPageType, type DocumentCaptureState, type DocumentType, createDocumentCaptureManager, createDocumentCaptureManagerFromActor, documentCaptureMachine };
@@ -1,3 +1,3 @@
1
- import { r as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-BHDsCfhL.esm.js";
2
- import { n as createDocumentCaptureManagerFromActor, t as createDocumentCaptureManager } from "./documentCaptureManager-C9XUnYU6.esm.js";
1
+ import { r as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-BTiH2YGb.esm.js";
2
+ import { n as createDocumentCaptureManagerFromActor, t as createDocumentCaptureManager } from "./documentCaptureManager-pkph2Ise.esm.js";
3
3
  export { DOCUMENT_CAPTURE_ERROR_CODES, createDocumentCaptureManager, createDocumentCaptureManagerFromActor, documentCaptureMachine };
@@ -192,6 +192,10 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
192
192
  params: NonReducibleUnknown;
193
193
  };
194
194
  }>, Values<{
195
+ isOutOfAttempts: {
196
+ type: "isOutOfAttempts";
197
+ params: unknown;
198
+ };
195
199
  allowSkip: {
196
200
  type: "allowSkip";
197
201
  params: unknown;
@@ -260,7 +264,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
260
264
  readonly on: {
261
265
  readonly CLOSE: ".closed";
262
266
  };
263
- readonly context: ({ input }: {
267
+ readonly context: ({ input, self }: {
264
268
  spawn: {
265
269
  <TSrc extends "uploadDocument" | "requestPermission" | "checkPermission" | "initCamera" | "finalizeDocumentRequest">(logic: TSrc, ...[options]: ({
266
270
  src: "uploadDocument";
@@ -524,6 +528,10 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
524
528
  };
525
529
  readonly states: {
526
530
  readonly tutorial: {
531
+ readonly always: {
532
+ readonly target: "finished";
533
+ readonly guard: "isOutOfAttempts";
534
+ };
527
535
  readonly on: {
528
536
  readonly OPEN_METHOD_SELECTION: {
529
537
  readonly actions: "openMethodSelection";
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CAgFE-k3.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
4
- import { n as DEFAULT_MAX_FILE_SIZE, r as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-BHDsCfhL.esm.js";
4
+ import { n as DEFAULT_MAX_FILE_SIZE, r as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-BTiH2YGb.esm.js";
5
5
  //#region src/modules/document-capture/documentCaptureActor.ts
6
6
  function createDocumentCaptureActor(options) {
7
7
  return createActor(documentCaptureMachine, { input: { config: options.config } }).start();
@@ -5,6 +5,7 @@ import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
5
5
  import { o as stopCameraStream } from "./camera-sIa9ceW2.esm.js";
6
6
  import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-d2UW0r_L.esm.js";
7
7
  import { r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-Bf4LbHjC.esm.js";
8
+ import { t as carryAttempts } from "./attemptCarry-BCQgBZ7b.esm.js";
8
9
  import { n as getBackCameraStream } from "./backCameraStream-CMvXj4X4.esm.js";
9
10
  //#region src/modules/document-capture/types.ts
10
11
  const PROCESSING_TYPE_MAP = {
@@ -194,6 +195,7 @@ const documentCaptureMachine = setup({
194
195
  })
195
196
  },
196
197
  guards: {
198
+ isOutOfAttempts: ({ context }) => context.attemptsRemaining <= 0 && context.attemptsRemaining < context.config.captureAttempts,
197
199
  allowSkip: ({ context }) => context.config.allowSkipDocumentCapture && context.pageNumber === 1,
198
200
  fileSizeOk: ({ context, event }) => {
199
201
  return event.file.size <= context.config.maxFileSize;
@@ -223,7 +225,7 @@ const documentCaptureMachine = setup({
223
225
  id: "documentCapture",
224
226
  initial: "tutorial",
225
227
  on: { CLOSE: ".closed" },
226
- context: ({ input }) => {
228
+ context: ({ input, self }) => {
227
229
  const { processingType = "addressStatement", captureMode, allowSkipDocumentCapture, disableSkipPoa, captureAttempts = 3, sendBase64 = false, maxFileSize = DEFAULT_MAX_FILE_SIZE, onlyPdf = false, title, text, step2Title, step2Text } = input.config;
228
230
  return {
229
231
  config: {
@@ -248,42 +250,48 @@ const documentCaptureMachine = setup({
248
250
  helpOpen: false,
249
251
  progress: 0,
250
252
  error: void 0,
251
- attemptsRemaining: captureAttempts,
253
+ attemptsRemaining: carryAttempts("documentCapture", self, (s) => ({ attemptsRemaining: s.context.attemptsRemaining })).attemptsRemaining ?? captureAttempts,
252
254
  pageNumber: 1,
253
255
  nextPageType: "none"
254
256
  };
255
257
  },
256
258
  states: {
257
- tutorial: { on: {
258
- OPEN_METHOD_SELECTION: { actions: "openMethodSelection" },
259
- CLOSE_METHOD_SELECTION: { actions: ["closeMethodSelection", "clearCaptureMethod"] },
260
- SELECT_UPLOAD_METHOD: { actions: "setCaptureMethodFile" },
261
- DESELECT_UPLOAD_METHOD: { actions: "clearCaptureMethod" },
262
- CAPTURE: [{
263
- target: "permissions",
264
- guard: "allowsCameraCapture",
265
- actions: ["closeMethodSelection", "clearCaptureMethod"]
266
- }, {
267
- target: "capturing",
268
- actions: ["closeMethodSelection", "clearCaptureMethod"]
269
- }],
270
- FILE_SELECTED: [{
271
- target: "preview",
272
- guard: "fileSizeOk",
273
- actions: [
274
- "setCapturedDocument",
275
- "setCaptureMethodFile",
276
- "closeMethodSelection"
277
- ]
278
- }, {
279
- target: "tutorial",
280
- actions: ["setFileTooLargeError", "closeMethodSelection"]
281
- }],
282
- SKIP: {
259
+ tutorial: {
260
+ always: {
283
261
  target: "finished",
284
- guard: "allowSkip"
262
+ guard: "isOutOfAttempts"
263
+ },
264
+ on: {
265
+ OPEN_METHOD_SELECTION: { actions: "openMethodSelection" },
266
+ CLOSE_METHOD_SELECTION: { actions: ["closeMethodSelection", "clearCaptureMethod"] },
267
+ SELECT_UPLOAD_METHOD: { actions: "setCaptureMethodFile" },
268
+ DESELECT_UPLOAD_METHOD: { actions: "clearCaptureMethod" },
269
+ CAPTURE: [{
270
+ target: "permissions",
271
+ guard: "allowsCameraCapture",
272
+ actions: ["closeMethodSelection", "clearCaptureMethod"]
273
+ }, {
274
+ target: "capturing",
275
+ actions: ["closeMethodSelection", "clearCaptureMethod"]
276
+ }],
277
+ FILE_SELECTED: [{
278
+ target: "preview",
279
+ guard: "fileSizeOk",
280
+ actions: [
281
+ "setCapturedDocument",
282
+ "setCaptureMethodFile",
283
+ "closeMethodSelection"
284
+ ]
285
+ }, {
286
+ target: "tutorial",
287
+ actions: ["setFileTooLargeError", "closeMethodSelection"]
288
+ }],
289
+ SKIP: {
290
+ target: "finished",
291
+ guard: "allowSkip"
292
+ }
285
293
  }
286
- } },
294
+ },
287
295
  permissions: {
288
296
  initial: "idle",
289
297
  states: {
@@ -1,3 +1,3 @@
1
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-CZoUwpKM.esm.js";
2
- import { t as createDynamicFormsManager } from "./dynamicFormsManager-6iRjKrB0.esm.js";
1
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-BxGrebr6.esm.js";
2
+ import { t as createDynamicFormsManager } from "./dynamicFormsManager-jXO_VdVI.esm.js";
3
3
  export { createDynamicFormsManager, dynamicFormsMachine };
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CAgFE-k3.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
4
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-CZoUwpKM.esm.js";
4
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-BxGrebr6.esm.js";
5
5
  //#region src/modules/dynamic-forms/dynamicFormsActor.ts
6
6
  function createDynamicFormsActor(options) {
7
7
  return createActor(dynamicFormsMachine, { input: { config: options.config } }).start();
@@ -1,6 +1,6 @@
1
1
  import { t as api } from "./api-Bx3gKW_y.esm.js";
2
2
  import { t as endpoints } from "./endpoints-DHzlkQNe.esm.js";
3
- import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-Crt05WQR.esm.js";
3
+ import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-BQGiCr9h.esm.js";
4
4
  import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
5
5
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
6
6
  import { t as isoDateToMs } from "./dateUtils-CvG0FvK8.esm.js";
package/dist/ekyb.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as isSupportedCountry, O as SUPPORTED_COUNTRIES, b as ALL_COUNTRIES, v as toEkybConfig, w as DEV_ONLY_COUNTRIES } from "./flowServices-CF3-ie-3.esm.js";
2
- import { t as ekybMachine } from "./ekybStateMachine-C7t6vXDy.esm.js";
3
- import { t as createEkybManager } from "./ekybManager-CT_JQdsu.esm.js";
1
+ import { A as isSupportedCountry, O as SUPPORTED_COUNTRIES, b as ALL_COUNTRIES, v as toEkybConfig, w as DEV_ONLY_COUNTRIES } from "./flowServices-J5PML3Fw.esm.js";
2
+ import { t as ekybMachine } from "./ekybStateMachine-782_EAbL.esm.js";
3
+ import { t as createEkybManager } from "./ekybManager-BsEC0z6j.esm.js";
4
4
  export { ALL_COUNTRIES, DEV_ONLY_COUNTRIES, SUPPORTED_COUNTRIES, createEkybManager, ekybMachine, isSupportedCountry, toEkybConfig };
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CAgFE-k3.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
4
- import { t as ekybMachine } from "./ekybStateMachine-C7t6vXDy.esm.js";
4
+ import { t as ekybMachine } from "./ekybStateMachine-782_EAbL.esm.js";
5
5
  //#region src/modules/ekyb/ekybActor.ts
6
6
  /**
7
7
  * Creates and starts an eKYB actor.
@@ -1,6 +1,6 @@
1
1
  import { t as api } from "./api-Bx3gKW_y.esm.js";
2
2
  import { t as endpoints } from "./endpoints-DHzlkQNe.esm.js";
3
- import { A as isSupportedCountry, C as COUNTRIES_WITH_CNPJ_VALIDATION, D as INVALID_CNPJ_PATTERNS, E as FIELD_ORDER, S as CNPJ_SECOND_DIGIT_FACTORS, T as FIELD_NAME_MAPPING, _ as sortModulesByOrder, b as ALL_COUNTRIES, g as requiresAddressValidation, h as isFieldOptional, k as UBO_FIELD_LABELS, m as hasAtLeastOneAddressField, n as getFlow, v as toEkybConfig, x as CNPJ_FIRST_DIGIT_FACTORS, y as ADDRESS_FIELDS } from "./flowServices-CF3-ie-3.esm.js";
3
+ import { A as isSupportedCountry, C as COUNTRIES_WITH_CNPJ_VALIDATION, D as INVALID_CNPJ_PATTERNS, E as FIELD_ORDER, S as CNPJ_SECOND_DIGIT_FACTORS, T as FIELD_NAME_MAPPING, _ as sortModulesByOrder, b as ALL_COUNTRIES, g as requiresAddressValidation, h as isFieldOptional, k as UBO_FIELD_LABELS, m as hasAtLeastOneAddressField, n as getFlow, v as toEkybConfig, x as CNPJ_FIRST_DIGIT_FACTORS, y as ADDRESS_FIELDS } from "./flowServices-J5PML3Fw.esm.js";
4
4
  import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
5
5
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
6
6
  import { a as FIXED_DIGIT_POSTAL_CODE_LENGTH, c as getPostalCodeMaxLength, d as STREET_LEVEL_REQUIRED_ERROR, f as fillFromSuggestion, i as checkSupport, l as validatePostalCode, m as usStateOptions, n as resolveForm, o as formatPostalCode, p as getStreetLevelErrorForSuggestion, r as createBundledDefinitionSource, s as getPostalCodeErrorKey, t as debounceSearchActor, u as DYNAMIC_REQUIRED_KEY } from "./addressSearch-BiYZjvp3.esm.js";