@incodetech/core 0.0.0-dev-20261120-4f0e9db3 → 0.0.0-dev-20261120-7dd435b2

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 (99) hide show
  1. package/dist/{FaceDetectionProvider-BTG5wGlQ.esm.js → FaceDetectionProvider-CRCS2SEb.esm.js} +4 -4
  2. package/dist/ae-signature.esm.js +1 -1
  3. package/dist/{apiError-BDUPorNP.esm.js → apiError-69Iy1fgN.esm.js} +1 -1
  4. package/dist/authentication.d.ts +3 -3
  5. package/dist/authentication.esm.js +2 -2
  6. package/dist/{authenticationManager-VFfb65yT.d.ts → authenticationManager-BJElkTsj.d.ts} +1 -1
  7. package/dist/{authenticationManager-2KCY2lqs.esm.js → authenticationManager-fsVUjjtL.esm.js} +3 -3
  8. package/dist/{authenticationStateMachine-CW-CJ8Lx.esm.js → authenticationStateMachine-BzcAg1f5.esm.js} +3 -3
  9. package/dist/curp-validation.d.ts +1 -1
  10. package/dist/{curpValidationManager-Bk-3V09c.d.ts → curpValidationManager-CmL52FU8.d.ts} +1 -1
  11. package/dist/{deepsightCaptureConfig-CLAsF0nQ.esm.js → deepsightCaptureConfig-DnXIp_lC.esm.js} +2 -2
  12. package/dist/{deepsightLoader-BEK2R7ZZ.esm.js → deepsightLoader-D_0nuVGK.esm.js} +4 -4
  13. package/dist/{definitionSource-Nw0YCbpe.esm.js → definitionSource-B-Z2EgJJ.esm.js} +36 -23
  14. package/dist/{desktopCameraElection-C_ImnDZ-.esm.js → desktopCameraElection-By6Xn2V6.esm.js} +4 -4
  15. package/dist/document-capture.d.ts +1 -1
  16. package/dist/document-signature.esm.js +1 -1
  17. package/dist/{documentCaptureManager-DOgJTJ4F.d.ts → documentCaptureManager-Bul0b4KJ.d.ts} +1 -1
  18. package/dist/{documentSignatureStateMachine-pgUkUdzj.esm.js → documentSignatureStateMachine-BmeH83Lp.esm.js} +1 -1
  19. package/dist/dynamic-forms.esm.js +2 -2
  20. package/dist/{dynamicFormsManager-DXCG8Lmz.esm.js → dynamicFormsManager-DCXstqJK.esm.js} +1 -1
  21. package/dist/{dynamicFormsStateMachine-ByK0tUIG.esm.js → dynamicFormsStateMachine-1d8sBzN4.esm.js} +1 -1
  22. package/dist/ekyb.d.ts +1 -1
  23. package/dist/ekyb.esm.js +2 -2
  24. package/dist/{ekybManager-K761CMdC.esm.js → ekybManager-DQOYOj9L.esm.js} +1 -1
  25. package/dist/{ekybStateMachine-DYaVNBFl.esm.js → ekybStateMachine-tpK4lDhb.esm.js} +3 -3
  26. package/dist/ekyc-prefill.esm.js +2 -2
  27. package/dist/ekyc.esm.js +3 -3
  28. package/dist/{ekycManager-KMAJDirs.esm.js → ekycManager-p3uenUEi.esm.js} +1 -1
  29. package/dist/{ekycPrefillManager-C_5o2NEe.esm.js → ekycPrefillManager-ruqxdUpK.esm.js} +1 -1
  30. package/dist/{ekycPrefillStateMachine-DaAFdg6Y.esm.js → ekycPrefillStateMachine-DnxnBdS9.esm.js} +3 -3
  31. package/dist/{ekycRules-1hyjJ6bw.esm.js → ekycRules-BH_Ll_0A.esm.js} +1 -1
  32. package/dist/{ekycStateMachine-adBX8aPX.esm.js → ekycStateMachine-D0NAHzS7.esm.js} +485 -4
  33. package/dist/{ekycUtils-D9ui9Ztp.esm.js → ekycUtils-DEvtEyBI.esm.js} +5 -0
  34. package/dist/electronic-signature.esm.js +1 -1
  35. package/dist/{electronicSignatureManager-BPSvQYSd.esm.js → electronicSignatureManager-93kJsuMw.esm.js} +1 -1
  36. package/dist/extensibility.d.ts +9 -9
  37. package/dist/extensibility.esm.js +13 -13
  38. package/dist/{faceCaptureManagerFactory-Dw4rArfu.d.ts → faceCaptureManagerFactory-CHqmyOjM.d.ts} +3 -3
  39. package/dist/{faceCaptureManagerFactory-CAIXB_2-.esm.js → faceCaptureManagerFactory-De_3NLRQ.esm.js} +2 -2
  40. package/dist/{faceCaptureSetup-DESKJDVg.esm.js → faceCaptureSetup-CAX08NY3.esm.js} +7 -7
  41. package/dist/{feature-management-DII_8JdU.esm.js → feature-management-D8JABuAI.esm.js} +1 -1
  42. package/dist/feature-management.esm.js +1 -1
  43. package/dist/flow-events.d.ts +1 -1
  44. package/dist/flow.d.ts +5 -5
  45. package/dist/flow.esm.js +3 -3
  46. package/dist/{flowCompletionService-CdyWY0Ii.esm.js → flowCompletionService-DtG5RDvE.esm.js} +1 -1
  47. package/dist/{flowServices-DPs5UokI.esm.js → flowServices-Msrx_Oyu.esm.js} +5 -5
  48. package/dist/geolocation.esm.js +2 -2
  49. package/dist/{geolocationManager-DoSiGy8Q.esm.js → geolocationManager-HAk04zPn.esm.js} +1 -1
  50. package/dist/{geolocationStateMachine-CDDsiZmc.esm.js → geolocationStateMachine-Dksu9cjN.esm.js} +1 -1
  51. package/dist/home.d.ts +1 -1
  52. package/dist/id-selfie-flow.d.ts +1 -1
  53. package/dist/id-selfie-flow.esm.js +6 -6
  54. package/dist/id.d.ts +2 -2
  55. package/dist/id.esm.js +3 -3
  56. package/dist/{idCaptureManager-B3-rWWz-.d.ts → idCaptureManager-CgkQW3Xc.d.ts} +2 -2
  57. package/dist/{idCaptureManager-WBz5Gvna.esm.js → idCaptureManager-QxDyQxyO.esm.js} +4 -4
  58. package/dist/{idCaptureServices-AMJoNX5k.esm.js → idCaptureServices-B7uspz-g.esm.js} +2 -2
  59. package/dist/{idCaptureStateMachine-DTBy1P0s.esm.js → idCaptureStateMachine-rraG9pbC.esm.js} +11 -11
  60. package/dist/{index-BO2syo87.d.ts → index-CoePktWH.d.ts} +1 -1
  61. package/dist/index.esm.js +1 -1
  62. package/dist/kyb-checks.esm.js +2 -2
  63. package/dist/{kybChecksManager--g-1WGkO.esm.js → kybChecksManager-3S3V_AZU.esm.js} +1 -1
  64. package/dist/{kybChecksStateMachine-nTxeg4Jp.esm.js → kybChecksStateMachine-N9XUxVUt.esm.js} +1 -1
  65. package/dist/mandatory-consent.d.ts +2 -2
  66. package/dist/{mandatoryConsentManager-tQQHJHR9.d.ts → mandatoryConsentManager-DgA4x-Ct.d.ts} +1 -1
  67. package/dist/qe-signature.esm.js +1 -1
  68. package/dist/{recordingService-Cq7lODc8.esm.js → recordingService-CokD7l-H.esm.js} +1 -1
  69. package/dist/{runChildModule-BFM0uvLM.esm.js → runChildModule-BDSYH6vy.esm.js} +1 -1
  70. package/dist/{sdkVersion-DxTsRyLA.esm.js → sdkVersion-vxAbaiHq.esm.js} +1 -1
  71. package/dist/selfie.d.ts +3 -3
  72. package/dist/selfie.esm.js +7 -7
  73. package/dist/{selfieErrorUtils-4QTl2M-H.esm.js → selfieErrorUtils-DHi9_UtE.esm.js} +1 -1
  74. package/dist/{selfieManager-BH139ucU.esm.js → selfieManager-B6osBAVj.esm.js} +3 -3
  75. package/dist/{selfieManager-CAlDV761.d.ts → selfieManager-DrBYj5kA.d.ts} +1 -1
  76. package/dist/{selfieStateMachine-BIY0ovyk.esm.js → selfieStateMachine-YaO-fN1H.esm.js} +3 -3
  77. package/dist/{session-C_Vvp2mV.esm.js → session-Dya2aZ7p.esm.js} +4 -4
  78. package/dist/session.d.ts +1 -1
  79. package/dist/session.esm.js +4 -4
  80. package/dist/{sessionInitializer-14rcQf99.esm.js → sessionInitializer-BxewVjwS.esm.js} +4 -4
  81. package/dist/{setup-C5Ty8M3U.esm.js → setup-_flyR308.esm.js} +5 -5
  82. package/dist/trueSight-BxpHtAYM.esm.js +1 -0
  83. package/dist/{trueSightService-CX3u3xOc.esm.js → trueSightService-FjoQ1k9e.esm.js} +1 -1
  84. package/dist/{types-BtieSXdV.d.ts → types-4Re9FSOw.d.ts} +1 -1
  85. package/dist/types-BtrJ5fkm.d.ts +6 -0
  86. package/dist/{types-BYSIIyN_.d.ts → types-C1056-J1.d.ts} +1 -1
  87. package/dist/{types-CawvkSTI.d.ts → types-CEGG70FK.d.ts} +1 -1
  88. package/dist/{types-CVfyv-Uw.d.ts → types-DHpz4Y37.d.ts} +1 -1
  89. package/dist/{types-BHgD4YZF.d.ts → types-b0l9b83G.d.ts} +1 -1
  90. package/dist/video-selfie.d.ts +1 -1
  91. package/dist/video-selfie.esm.js +3 -3
  92. package/dist/{videoSelfieCameraWarmer-DkkeecdR.esm.js → videoSelfieCameraWarmer-DZQvVsni.esm.js} +3 -3
  93. package/dist/{videoSelfieStepDetector-D1kmMhBl.d.ts → videoSelfieStepDetector-DC_Qh7qI.d.ts} +2 -2
  94. package/dist/wasm.esm.js +1 -1
  95. package/dist/workflow.d.ts +1 -1
  96. package/dist/workflow.esm.js +19 -19
  97. package/package.json +1 -1
  98. package/dist/trueSight-CH-dOOLR.esm.js +0 -1
  99. package/dist/types-BSqs9HKF.d.ts +0 -6
@@ -1,9 +1,9 @@
1
1
  import { l as wasmRuntime } from "./warmup-CBaYXBuZ.esm.js";
2
- import { t as ensureWasmPipelines } from "./setup-C5Ty8M3U.esm.js";
2
+ import { t as ensureWasmPipelines } from "./setup-_flyR308.esm.js";
3
3
  import { r as BaseWasmProvider } from "./WasmUtilProvider-BDXl-HzX.esm.js";
4
4
  import { t as api, u as endpoints } from "./api-BNxrW8xK.esm.js";
5
- import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity } from "./trueSightService-CX3u3xOc.esm.js";
6
- import "./trueSight-CH-dOOLR.esm.js";
5
+ import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity } from "./trueSightService-FjoQ1k9e.esm.js";
6
+ import "./trueSight-BxpHtAYM.esm.js";
7
7
  import { t as addDeviceStats } from "./stats-CrqhpKkP.esm.js";
8
8
  import { t as getDeviceClass } from "./getDeviceClass-Dcy9erbl.esm.js";
9
9
  import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
@@ -234,7 +234,7 @@ function startDetection(params) {
234
234
  };
235
235
  }
236
236
  async function initializeDeepsightSession(options) {
237
- const { loadDeepsightSession } = await import("./deepsightLoader-BEK2R7ZZ.esm.js");
237
+ const { loadDeepsightSession } = await import("./deepsightLoader-D_0nuVGK.esm.js");
238
238
  return loadDeepsightSession({
239
239
  ds: options.ds,
240
240
  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-BPSvQYSd.esm.js";
1
+ import { c as areAllConsented, i as AE_CONSENT_KEYS, r as electronicSignatureMachine, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-93kJsuMw.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 { d as categoryForEndpoint, u as trueSightLog } from "./trueSightService-CX3u3xOc.esm.js";
1
+ import { d as categoryForEndpoint, u as trueSightLog } from "./trueSightService-FjoQ1k9e.esm.js";
2
2
  //#region src/internal/http/apiError.ts
3
3
  /**
4
4
  * Incode API error.
@@ -1,4 +1,4 @@
1
- import { C as authenticationMachine, S as createAuthenticationActor, b as AuthenticationActor, x as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-Dw4rArfu.js";
2
- import { t as AuthenticationConfig } from "./types-BSqs9HKF.js";
3
- import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager-VFfb65yT.js";
1
+ import { C as authenticationMachine, S as createAuthenticationActor, b as AuthenticationActor, x as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-CHqmyOjM.js";
2
+ import { t as AuthenticationConfig } from "./types-BtrJ5fkm.js";
3
+ import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager-BJElkTsj.js";
4
4
  export { type AuthenticationActor, type AuthenticationConfig, type AuthenticationManager, type AuthenticationState, type CreateAuthenticationActorOptions, authenticationMachine, createAuthenticationActor, createAuthenticationManager };
@@ -1,3 +1,3 @@
1
- import { t as authenticationMachine } from "./authenticationStateMachine-CW-CJ8Lx.esm.js";
2
- import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-2KCY2lqs.esm.js";
1
+ import { t as authenticationMachine } from "./authenticationStateMachine-BzcAg1f5.esm.js";
2
+ import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-fsVUjjtL.esm.js";
3
3
  export { authenticationMachine, createAuthenticationActor, createAuthenticationManager };
@@ -1,6 +1,6 @@
1
1
  import { t as Manager } from "./Manager-DufwKlav.js";
2
2
  import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
3
- import { b as AuthenticationActor, n as FaceCaptureManagerState, t as FaceCaptureManager, x as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-Dw4rArfu.js";
3
+ import { b as AuthenticationActor, n as FaceCaptureManagerState, t as FaceCaptureManager, x as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-CHqmyOjM.js";
4
4
  //#region src/modules/authentication/authenticationManager.d.ts
5
5
  type AuthenticationState = FaceCaptureManagerState;
6
6
  /**
@@ -1,10 +1,10 @@
1
- import { u as BrowserStorageProvider } from "./setup-C5Ty8M3U.esm.js";
1
+ import { u as BrowserStorageProvider } from "./setup-_flyR308.esm.js";
2
2
  import { t as WasmUtilProvider } from "./WasmUtilProvider-BDXl-HzX.esm.js";
3
3
  import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
4
4
  import "./events-ChMS-UzR.esm.js";
5
5
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
6
- import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-CAIXB_2-.esm.js";
7
- import { t as authenticationMachine } from "./authenticationStateMachine-CW-CJ8Lx.esm.js";
6
+ import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-De_3NLRQ.esm.js";
7
+ import { t as authenticationMachine } from "./authenticationStateMachine-BzcAg1f5.esm.js";
8
8
  //#region src/modules/authentication/authenticationActor.ts
9
9
  function createAuthenticationActor(options) {
10
10
  const dependencies = options.dependencies ?? {
@@ -1,8 +1,8 @@
1
1
  import { i as assign } from "./xstate.esm-CIqUf_i6.esm.js";
2
2
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
3
- import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-DESKJDVg.esm.js";
4
- import { d as isOnDeviceMode, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-BTG5wGlQ.esm.js";
5
- import { l as PROTECTED_CAPTURE_TARGET } from "./desktopCameraElection-C_ImnDZ-.esm.js";
3
+ import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-CAX08NY3.esm.js";
4
+ import { d as isOnDeviceMode, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-CRCS2SEb.esm.js";
5
+ import { l as PROTECTED_CAPTURE_TARGET } from "./desktopCameraElection-By6Xn2V6.esm.js";
6
6
  //#region src/modules/authentication/authenticationErrorUtils.ts
7
7
  const AUTH_ERROR_MAP = {
8
8
  SPOOF_ATTEMPT_DETECTED: FACE_ERROR_CODES.SPOOF_ATTEMPT_DETECTED,
@@ -1,4 +1,4 @@
1
- import { a as CurpValidationActor, c as CurpValidationErrors, d as GenerateCurpFieldDef, f as GenerateCurpFieldType, i as createCurpValidationManagerFromActor, l as CurpValidationRule, n as CurpValidationState, o as curpValidationMachine, p as GenerateCurpForm, r as createCurpValidationManager, s as CurpValidationConfig, t as CurpValidationManager, u as EnterCurpFieldDef } from "./curpValidationManager-Bk-3V09c.js";
1
+ import { a as CurpValidationActor, c as CurpValidationErrors, d as GenerateCurpFieldDef, f as GenerateCurpFieldType, i as createCurpValidationManagerFromActor, l as CurpValidationRule, n as CurpValidationState, o as curpValidationMachine, p as GenerateCurpForm, r as createCurpValidationManager, s as CurpValidationConfig, t as CurpValidationManager, u as EnterCurpFieldDef } from "./curpValidationManager-CmL52FU8.js";
2
2
  //#region src/modules/curp-validation/curpValidationUtils.d.ts
3
3
  type MexicanState = {
4
4
  value: string;
@@ -1,7 +1,7 @@
1
1
  import { i as ActorRefFrom } from "./spawn-COZKetCS.js";
2
2
  import { t as Manager } from "./Manager-DufwKlav.js";
3
3
  import "./Actor-DqjOqDfU.js";
4
- import { i as FlowModuleConfig } from "./types-BtieSXdV.js";
4
+ import { i as FlowModuleConfig } from "./types-4Re9FSOw.js";
5
5
  //#region src/modules/curp-validation/types.d.ts
6
6
  type CurpValidationConfig = FlowModuleConfig['CURP_VALIDATION'] & {
7
7
  /** Maximum validation retries before auto-advancing. @default 1 */
@@ -1,5 +1,5 @@
1
- import { u as trueSightLog, w as utf8ByteLength } from "./trueSightService-CX3u3xOc.esm.js";
2
- import "./trueSight-CH-dOOLR.esm.js";
1
+ import { u as trueSightLog, w as utf8ByteLength } from "./trueSightService-FjoQ1k9e.esm.js";
2
+ import "./trueSight-BxpHtAYM.esm.js";
3
3
  import { t as getDeviceClass } from "./getDeviceClass-Dcy9erbl.esm.js";
4
4
  //#region src/internal/deepsight/deepsightCaptureConfig.ts
5
5
  /**
@@ -1,8 +1,8 @@
1
1
  import { t as WasmUtilProvider } from "./WasmUtilProvider-BDXl-HzX.esm.js";
2
- import { u as trueSightLog } from "./trueSightService-CX3u3xOc.esm.js";
3
- import { t as SDK_VERSION } from "./sdkVersion-DxTsRyLA.esm.js";
4
- import "./trueSight-CH-dOOLR.esm.js";
5
- import { C as fingerprintSignalsReporter, S as BrowserEnvironmentProvider, _ as isBrowserSimulation, n as getFingerprintEnabled, t as getDisableIpify, w as SDK_PLATFORM, x as IpifyProvider, y as getThumbmarkId } from "./sessionInitializer-14rcQf99.esm.js";
2
+ import { u as trueSightLog } from "./trueSightService-FjoQ1k9e.esm.js";
3
+ import { t as SDK_VERSION } from "./sdkVersion-vxAbaiHq.esm.js";
4
+ import "./trueSight-BxpHtAYM.esm.js";
5
+ import { C as fingerprintSignalsReporter, S as BrowserEnvironmentProvider, _ as isBrowserSimulation, n as getFingerprintEnabled, t as getDisableIpify, w as SDK_PLATFORM, x as IpifyProvider, y as getThumbmarkId } from "./sessionInitializer-BxewVjwS.esm.js";
6
6
  import { t as getParsedUserAgent } from "./getParsedUserAgent-DhQPeKqw.esm.js";
7
7
  import { t as getUserAgent } from "./getBrowser-CBiibsL-.esm.js";
8
8
  import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-BX01stN8.esm.js";
@@ -52,30 +52,43 @@ function buildStreetValue(street, houseNumber, hasHouseNoField) {
52
52
  if (houseNumber && street) return `${houseNumber} ${street}`;
53
53
  return houseNumber ?? street ?? "";
54
54
  }
55
+ /** The suggestion-filled fields a source can show as a dropdown. */
56
+ const DROPDOWN_ADDRESS_FIELDS = ["city", "state"];
55
57
  /**
56
- * Keeps an address suggestion's region inside the `state` dropdown. A region
57
- * that matches an option's value or label, ignoring case, becomes that
58
- * option's value. One that matches none is dropped, as if the suggestion had
59
- * no region, so the previous `state` stays if it matches an option the same
60
- * way, also as that option's value (a prefill can leave `KOWLOON`, or a value
61
- * no option has). Without this, a code such as `HK` would pass `required` and
62
- * be submitted though the dropdown can't show it. A free-text `state` takes
63
- * the suggestion as it is. Shared between eKYC and eKYB address forms; run it
64
- * on `fillFromSuggestion`'s values.
58
+ * Compares ignoring case and accents, so `Istanbul` and `ISTANBUL` find
59
+ * `İstanbul`, and `Kowloon` finds `KOWLOON`.
65
60
  */
66
- function keepSuggestedStateInOptions(fields, previous, next) {
67
- const options = fields.find((field) => field.name === "state")?.options;
68
- const suggested = next.state;
69
- if (!options || !suggested) return next;
70
- const optionFor = (value) => {
71
- const wanted = value?.trim().toUpperCase();
72
- if (!wanted) return void 0;
73
- return options.find((option) => option.value.toUpperCase() === wanted || option.label.toUpperCase() === wanted)?.value;
74
- };
75
- return {
76
- ...next,
77
- state: optionFor(suggested) ?? optionFor(previous.state)
78
- };
61
+ const foldForMatch = (text) => text.trim().normalize("NFD").replace(/\p{M}/gu, "").toUpperCase();
62
+ /**
63
+ * Keeps an address suggestion's city and region inside their dropdowns, for a
64
+ * source that shows `city` (TR provinces) or `state` (HK regions, US states) as
65
+ * one. A suggested value that matches an option's value or label, ignoring case
66
+ * and accents, becomes that option's value. One that matches none is dropped,
67
+ * as if the suggestion had no such value, so the previous value stays if it
68
+ * matches an option the same way, also as that option's value (a prefill can
69
+ * leave `KOWLOON`, or a value no option has). Without this, a code such as `HK`
70
+ * or a district such as `Kadıköy` would pass `required` and be submitted though
71
+ * the dropdown can't show it. A free-text field takes the suggestion as it is.
72
+ * Shared between eKYC and eKYB address forms; run it on `fillFromSuggestion`'s
73
+ * values.
74
+ */
75
+ function keepSuggestionInOptions(fields, previous, next) {
76
+ let result = next;
77
+ for (const name of DROPDOWN_ADDRESS_FIELDS) {
78
+ const options = fields.find((field) => field.name === name)?.options;
79
+ const suggested = next[name];
80
+ if (!options || !suggested) continue;
81
+ const optionFor = (value) => {
82
+ const wanted = value ? foldForMatch(value) : "";
83
+ if (!wanted) return void 0;
84
+ return options.find((option) => foldForMatch(option.value) === wanted || foldForMatch(option.label) === wanted)?.value;
85
+ };
86
+ result = {
87
+ ...result,
88
+ [name]: optionFor(suggested) ?? optionFor(previous[name])
89
+ };
90
+ }
91
+ return result;
79
92
  }
80
93
  const POSTAL_CODE_MAX_LENGTH_BY_COUNTRY = {
81
94
  US: 10,
@@ -218,4 +231,4 @@ function createBundledDefinitionSource(definitions) {
218
231
  return { select: (query) => byQuery.get(queryKey(query)) };
219
232
  }
220
233
  //#endregion
221
- export { getPostalCodeMaxLength as a, fillFromSuggestion as c, getPostalCodeErrorParams as i, getStreetLevelErrorForSuggestion as l, formatPostalCode as n, validatePostalCode as o, getPostalCodeErrorKey as r, STREET_LEVEL_REQUIRED_ERROR as s, createBundledDefinitionSource as t, keepSuggestedStateInOptions as u };
234
+ export { getPostalCodeMaxLength as a, fillFromSuggestion as c, getPostalCodeErrorParams as i, getStreetLevelErrorForSuggestion as l, formatPostalCode as n, validatePostalCode as o, getPostalCodeErrorKey as r, STREET_LEVEL_REQUIRED_ERROR as s, createBundledDefinitionSource as t, keepSuggestionInOptions as u };
@@ -3,14 +3,14 @@ import { d as CAMERA_CYCLE_OWNERSHIP_DOMAIN, f as getCameraCycleOwnershipDomain,
3
3
  import { r as setWasmDeepsightConfigSync } from "./wasmDeepsightConfigSync-DukEcrU8.esm.js";
4
4
  import { i as utilityWasmApi } from "./WasmUtilProvider-BDXl-HzX.esm.js";
5
5
  import { t as api, u as endpoints } from "./api-BNxrW8xK.esm.js";
6
- import { u as trueSightLog } from "./trueSightService-CX3u3xOc.esm.js";
7
- import "./trueSight-CH-dOOLR.esm.js";
8
- import { m as getFeatureGate } from "./feature-management-DII_8JdU.esm.js";
6
+ import { u as trueSightLog } from "./trueSightService-FjoQ1k9e.esm.js";
7
+ import "./trueSight-BxpHtAYM.esm.js";
8
+ import { m as getFeatureGate } from "./feature-management-D8JABuAI.esm.js";
9
9
  import { t as fromCallback } from "./xstate-actors.esm-BCcwgosu.esm.js";
10
10
  import { c as isCameraDenialErrorName, n as enumerateVideoDevices, o as withAudioTracks, r as requestCameraAccess, s as clearCameraGrantedInDocument, u as markCameraGrantedInDocument } from "./camera-CJKApt0x.esm.js";
11
11
  import { l as queryCameraPermission } from "./permissionServices-BB14DItB.esm.js";
12
12
  import { t as getDeviceClass } from "./getDeviceClass-Dcy9erbl.esm.js";
13
- import { t as deepsightCaptureConfigText } from "./deepsightCaptureConfig-CLAsF0nQ.esm.js";
13
+ import { t as deepsightCaptureConfigText } from "./deepsightCaptureConfig-DnXIp_lC.esm.js";
14
14
  import { r as selectBestBackDevice, t as isBackCameraLabel } from "./backCameraLabel-yda5ugE4.esm.js";
15
15
  //#region ../infra/src/capabilities/ICameraCycleCapability.ts
16
16
  /**
@@ -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, u as DocumentUploadStatus } from "./types-Cy6Lx3L6.js";
2
- import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-DOgJTJ4F.js";
2
+ import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-Bul0b4KJ.js";
3
3
  export { DOCUMENT_CAPTURE_ERROR_CODES, type DocumentCaptureActor, type DocumentCaptureConfig, type DocumentCaptureErrorCode, type DocumentCaptureManager, type DocumentCaptureNextPageType, type DocumentCaptureState, type DocumentType, type DocumentUploadStatus, createDocumentCaptureManager, createDocumentCaptureManagerFromActor, documentCaptureMachine };
@@ -2,7 +2,7 @@ import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
2
2
  import { t as createManagerInstrumentation } from "./events-ChMS-UzR.esm.js";
3
3
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
4
4
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
5
- import { a as hasReadAll, i as hasDownloads, n as canSubmitSignature, r as documentSignatureMachine, t as canOpenSign } from "./documentSignatureStateMachine-pgUkUdzj.esm.js";
5
+ import { a as hasReadAll, i as hasDownloads, n as canSubmitSignature, r as documentSignatureMachine, t as canOpenSign } from "./documentSignatureStateMachine-BmeH83Lp.esm.js";
6
6
  //#region src/modules/document-signature/documentSignatureActor.ts
7
7
  function createDocumentSignatureActor(options) {
8
8
  return createActor(documentSignatureMachine, { input: { config: options.config } }).start();
@@ -263,7 +263,7 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
263
263
  type: "fileSizeOkForNonGallery";
264
264
  params: unknown;
265
265
  };
266
- }>, never, "uploading" | "closed" | "success" | "finished" | "initCamera" | "tutorial" | "capturing" | "preview" | "failure" | "nextPage" | "finalizing" | {
266
+ }>, never, "uploading" | "closed" | "success" | "finished" | "capturing" | "failure" | "initCamera" | "tutorial" | "preview" | "nextPage" | "finalizing" | {
267
267
  permissions: "idle" | "denied" | "waitingForUser" | "requesting" | "learnMore";
268
268
  }, string, DocumentCaptureInput, NonReducibleUnknown, EventObject, MetaObject, {
269
269
  readonly id: "documentCapture";
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, v as addEvent } from "./types-CBQN04Rh.esm.js";
2
2
  import { t as api, u as endpoints } from "./api-BNxrW8xK.esm.js";
3
3
  import "./events-ChMS-UzR.esm.js";
4
- import { i as toIncodeApiError } from "./apiError-BDUPorNP.esm.js";
4
+ import { i as toIncodeApiError } from "./apiError-69Iy1fgN.esm.js";
5
5
  import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
6
6
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
7
7
  //#region src/modules/document-signature/documentSignatureServices.ts
@@ -1,3 +1,3 @@
1
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-ByK0tUIG.esm.js";
2
- import { t as createDynamicFormsManager } from "./dynamicFormsManager-DXCG8Lmz.esm.js";
1
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-1d8sBzN4.esm.js";
2
+ import { t as createDynamicFormsManager } from "./dynamicFormsManager-DCXstqJK.esm.js";
3
3
  export { createDynamicFormsManager, dynamicFormsMachine };
@@ -3,7 +3,7 @@ import { t as createManagerInstrumentation } from "./events-ChMS-UzR.esm.js";
3
3
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
4
4
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
5
5
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
6
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-ByK0tUIG.esm.js";
6
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-1d8sBzN4.esm.js";
7
7
  //#region src/modules/dynamic-forms/dynamicFormsActor.ts
8
8
  function createDynamicFormsActor(options) {
9
9
  return createActor(dynamicFormsMachine, { input: { config: options.config } }).start();
@@ -1,5 +1,5 @@
1
1
  import { t as api, u as endpoints } from "./api-BNxrW8xK.esm.js";
2
- import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-BDUPorNP.esm.js";
2
+ import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-69Iy1fgN.esm.js";
3
3
  import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
5
5
  import { n as calendarDateError } from "./calendarDate-DcqGuEht.esm.js";
package/dist/ekyb.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./xstate.cjs-D6Ur0X1F.js";
2
2
  import { n as AddressSuggestion } from "./textRules-D4NRinKY.js";
3
- import { i as FlowModuleConfig } from "./types-BtieSXdV.js";
3
+ import { i as FlowModuleConfig } from "./types-4Re9FSOw.js";
4
4
  import { a as EkybValidationError, n as EkybCountry, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-BgRHw-dR.js";
5
5
  import { n as EkybState, o as ekybMachine, r as createEkybManager, t as EkybManager } from "./ekybManager-BflWuTe4.js";
6
6
  //#region src/modules/ekyb/ekybServices.d.ts
package/dist/ekyb.esm.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { h as isSupportedCountry, l as ALL_COUNTRIES, p as SUPPORTED_COUNTRIES, s as toEkybConfig, u as DEV_ONLY_COUNTRIES } from "./ekybUtils-Z9MhFAer.esm.js";
2
- import { t as ekybMachine } from "./ekybStateMachine-DYaVNBFl.esm.js";
3
- import { t as createEkybManager } from "./ekybManager-K761CMdC.esm.js";
2
+ import { t as ekybMachine } from "./ekybStateMachine-tpK4lDhb.esm.js";
3
+ import { t as createEkybManager } from "./ekybManager-DQOYOj9L.esm.js";
4
4
  export { ALL_COUNTRIES, DEV_ONLY_COUNTRIES, SUPPORTED_COUNTRIES, createEkybManager, ekybMachine, isSupportedCountry, toEkybConfig };
@@ -3,7 +3,7 @@ import { t as createManagerInstrumentation } from "./events-ChMS-UzR.esm.js";
3
3
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
4
4
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
5
5
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
6
- import { t as ekybMachine } from "./ekybStateMachine-DYaVNBFl.esm.js";
6
+ import { t as ekybMachine } from "./ekybStateMachine-tpK4lDhb.esm.js";
7
7
  //#region src/modules/ekyb/ekybActor.ts
8
8
  /**
9
9
  * Creates and starts an eKYB actor.
@@ -1,11 +1,11 @@
1
1
  import { t as api, u as endpoints } from "./api-BNxrW8xK.esm.js";
2
- import { n as getFlow } from "./flowServices-DPs5UokI.esm.js";
2
+ import { n as getFlow } from "./flowServices-Msrx_Oyu.esm.js";
3
3
  import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
5
5
  import { a as requiresAddressValidation, c as ADDRESS_FIELDS, d as FIELD_NAME_MAPPING, f as FIELD_ORDER, h as isSupportedCountry, i as isFormFieldEntry, l as ALL_COUNTRIES, m as UBO_FIELD_LABELS, n as hasAtLeastOneAddressField, o as sortModulesByOrder, r as isFieldOptional, s as toEkybConfig } from "./ekybUtils-Z9MhFAer.esm.js";
6
6
  import { t as usStateOptions } from "./usStates-CwOQ2kAx.esm.js";
7
7
  import { n as requiresCnpjValidation, r as validateCNPJ } from "./cnpj-Bl_olpdX.esm.js";
8
- import { a as getPostalCodeMaxLength, c as fillFromSuggestion, i as getPostalCodeErrorParams, l as getStreetLevelErrorForSuggestion, n as formatPostalCode, o as validatePostalCode, r as getPostalCodeErrorKey, s as STREET_LEVEL_REQUIRED_ERROR, t as createBundledDefinitionSource, u as keepSuggestedStateInOptions } from "./definitionSource-Nw0YCbpe.esm.js";
8
+ import { a as getPostalCodeMaxLength, c as fillFromSuggestion, i as getPostalCodeErrorParams, l as getStreetLevelErrorForSuggestion, n as formatPostalCode, o as validatePostalCode, r as getPostalCodeErrorKey, s as STREET_LEVEL_REQUIRED_ERROR, t as createBundledDefinitionSource, u as keepSuggestionInOptions } from "./definitionSource-B-Z2EgJJ.esm.js";
9
9
  import { n as checkSupport, r as DYNAMIC_REQUIRED_KEY, t as resolveForm } from "./resolveForm-DaaQSVWp.esm.js";
10
10
  import { r as isFormDefinitionsEnabled, t as debounceSearchActor } from "./addressSearch-BKlynuBr.esm.js";
11
11
  //#region src/modules/ekyb/ekybValidators.ts
@@ -1880,7 +1880,7 @@ const ekybMachine = setup({
1880
1880
  const { suggestion } = event;
1881
1881
  const activeFields = new Set(context.fields.map((f) => f.name));
1882
1882
  const { values: filled } = fillFromSuggestion(context.values, {}, suggestion, activeFields);
1883
- const newValues = keepSuggestedStateInOptions(context.fields, context.values, filled);
1883
+ const newValues = keepSuggestionInOptions(context.fields, context.values, filled);
1884
1884
  const errs = context.validationErrors;
1885
1885
  let newErrors = errs;
1886
1886
  if (errs) {
@@ -1,3 +1,3 @@
1
- import { i as toEkycPrefillConfig, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-DaAFdg6Y.esm.js";
2
- import { t as createEkycPrefillManager } from "./ekycPrefillManager-C_5o2NEe.esm.js";
1
+ import { i as toEkycPrefillConfig, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-DnxnBdS9.esm.js";
2
+ import { t as createEkycPrefillManager } from "./ekycPrefillManager-ruqxdUpK.esm.js";
3
3
  export { createEkycPrefillManager, ekycPrefillMachine, toEkycPrefillConfig };
package/dist/ekyc.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as ekycMachine } from "./ekycStateMachine-adBX8aPX.esm.js";
2
- import { l as toEkycConfig } from "./ekycUtils-D9ui9Ztp.esm.js";
3
- import { t as createEkycManager } from "./ekycManager-KMAJDirs.esm.js";
1
+ import { t as ekycMachine } from "./ekycStateMachine-D0NAHzS7.esm.js";
2
+ import { l as toEkycConfig } from "./ekycUtils-DEvtEyBI.esm.js";
3
+ import { t as createEkycManager } from "./ekycManager-p3uenUEi.esm.js";
4
4
  export { createEkycManager, ekycMachine, toEkycConfig };
@@ -3,7 +3,7 @@ import { t as createManagerInstrumentation } from "./events-ChMS-UzR.esm.js";
3
3
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
4
4
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
5
5
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
6
- import { i as isStepValid, n as buildEkycSteps, r as clampStepIndex, t as ekycMachine } from "./ekycStateMachine-adBX8aPX.esm.js";
6
+ import { i as isStepValid, n as buildEkycSteps, r as clampStepIndex, t as ekycMachine } from "./ekycStateMachine-D0NAHzS7.esm.js";
7
7
  //#region src/modules/ekyc/ekycActor.ts
8
8
  /**
9
9
  * Creates and starts an eKYC actor.
@@ -1,6 +1,6 @@
1
1
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
2
2
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
3
- import { n as isAnyOfMissing, r as validateForm, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-DaAFdg6Y.esm.js";
3
+ import { n as isAnyOfMissing, r as validateForm, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-DnxnBdS9.esm.js";
4
4
  //#region src/modules/ekyc-prefill/ekycPrefillActor.ts
5
5
  /** Creates and starts an eKYC Pre-fill actor, idle until `LOAD`. */
6
6
  function createEkycPrefillActor(options = {}) {
@@ -1,10 +1,10 @@
1
1
  import { t as api, u as endpoints } from "./api-BNxrW8xK.esm.js";
2
- import { i as toIncodeApiError } from "./apiError-BDUPorNP.esm.js";
2
+ import { i as toIncodeApiError } from "./apiError-69Iy1fgN.esm.js";
3
3
  import { n as loadPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
4
4
  import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
5
5
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
6
- import { i as cleanName, l as validateEkycField, n as projectRules, o as formatSSN } from "./ekycRules-1hyjJ6bw.esm.js";
7
- import { t as createBundledDefinitionSource } from "./definitionSource-Nw0YCbpe.esm.js";
6
+ import { i as cleanName, l as validateEkycField, n as projectRules, o as formatSSN } from "./ekycRules-BH_Ll_0A.esm.js";
7
+ import { t as createBundledDefinitionSource } from "./definitionSource-B-Z2EgJJ.esm.js";
8
8
  import { n as checkSupport, t as resolveForm } from "./resolveForm-DaaQSVWp.esm.js";
9
9
  import { t as formatPhoneE164 } from "./phoneFormat-C3q0Ukh4.esm.js";
10
10
  import { t as formatCPF } from "./idOcrCpfUtils-D5Gwskxu.esm.js";
@@ -2,7 +2,7 @@ import { t as getLocalIsoDate } from "./IBrowserEnvironmentCapability-D7JG7ML3.e
2
2
  import { n as loadPhoneValidation, t as getPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
3
3
  import { t as isValidCurp } from "./curp-DZGvefg3.esm.js";
4
4
  import { n as calendarDateError } from "./calendarDate-DcqGuEht.esm.js";
5
- import { i as getPostalCodeErrorParams, o as validatePostalCode, r as getPostalCodeErrorKey, s as STREET_LEVEL_REQUIRED_ERROR } from "./definitionSource-Nw0YCbpe.esm.js";
5
+ import { i as getPostalCodeErrorParams, o as validatePostalCode, r as getPostalCodeErrorKey, s as STREET_LEVEL_REQUIRED_ERROR } from "./definitionSource-B-Z2EgJJ.esm.js";
6
6
  import { r as DYNAMIC_REQUIRED_KEY } from "./resolveForm-DaaQSVWp.esm.js";
7
7
  import { t as validateCPF } from "./cpf-DDXMTLYr.esm.js";
8
8
  import { n as hasAllowedCharacters } from "./phoneFormat-C3q0Ukh4.esm.js";