@incodetech/core 0.0.0-dev-20261116-c15e749f → 0.0.0-dev-20261116-af0edf7e

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 (100) hide show
  1. package/dist/{FaceDetectionProvider-B99Nr-zl.esm.js → FaceDetectionProvider-DJ3j9AUx.esm.js} +4 -4
  2. package/dist/ae-signature.esm.js +1 -1
  3. package/dist/{apiError-C3vTAT37.esm.js → apiError-CrhSAO2n.esm.js} +1 -1
  4. package/dist/authentication.d.ts +3 -3
  5. package/dist/authentication.esm.js +2 -2
  6. package/dist/{authenticationManager-aZzFZo6V.d.ts → authenticationManager-DRaugLgH.d.ts} +1 -1
  7. package/dist/{authenticationManager-2BpobEGh.esm.js → authenticationManager-D_MFkgZc.esm.js} +3 -3
  8. package/dist/{authenticationStateMachine-BYgvkd0R.esm.js → authenticationStateMachine-CCCRzCMn.esm.js} +2 -2
  9. package/dist/consent.d.ts +1 -1
  10. package/dist/{consentManager-B0YKqYtZ.d.ts → consentManager-DlvhoJYc.d.ts} +1 -1
  11. package/dist/curp-validation.d.ts +1 -1
  12. package/dist/{curpValidationManager-BfF2Qa5b.d.ts → curpValidationManager-Ci2iVuog.d.ts} +1 -1
  13. package/dist/{deepsightLoader-Cflwb0MF.esm.js → deepsightLoader-ChGk5xPL.esm.js} +3 -3
  14. package/dist/{definitionSource-BbeyVsUt.esm.js → definitionSource-Nw0YCbpe.esm.js} +26 -1
  15. package/dist/document-capture.d.ts +1 -1
  16. package/dist/{documentCaptureManager-BZBmcOKI.d.ts → documentCaptureManager-Dd3T6bcs.d.ts} +4 -4
  17. package/dist/dynamic-forms.esm.js +2 -2
  18. package/dist/{dynamicFormsManager-D_R4BLGJ.esm.js → dynamicFormsManager-Cw6GTtwI.esm.js} +1 -1
  19. package/dist/{dynamicFormsStateMachine-CdgUw2lX.esm.js → dynamicFormsStateMachine-D-Z5qtla.esm.js} +1 -1
  20. package/dist/ekyb.d.ts +1 -1
  21. package/dist/ekyb.esm.js +2 -2
  22. package/dist/{ekybManager-DLebrUE1.esm.js → ekybManager-fRzlxhFh.esm.js} +1 -1
  23. package/dist/{ekybStateMachine-DQ9J-FmN.esm.js → ekybStateMachine-CcJU0uRo.esm.js} +4 -3
  24. package/dist/ekyc-prefill.d.ts +1 -1
  25. package/dist/ekyc-prefill.esm.js +2 -2
  26. package/dist/ekyc.esm.js +3 -3
  27. package/dist/{ekycManager-fNTBP3jK.esm.js → ekycManager-nRT0rxei.esm.js} +1 -1
  28. package/dist/{ekycPrefillManager-BcLhkpp8.d.ts → ekycPrefillManager-C11D5yiF.d.ts} +1 -1
  29. package/dist/{ekycPrefillManager-CSuhSKU-.esm.js → ekycPrefillManager-CRAE43Mc.esm.js} +1 -1
  30. package/dist/{ekycPrefillStateMachine-DWRgq-Xp.esm.js → ekycPrefillStateMachine-DvAclaRa.esm.js} +3 -3
  31. package/dist/{ekycRules-BtKqNbSh.esm.js → ekycRules-DXP2hqVw.esm.js} +1 -1
  32. package/dist/{ekycStateMachine-B3AYpG8S.esm.js → ekycStateMachine-nwJRel2s.esm.js} +174 -4
  33. package/dist/{ekycUtils-Cp9M-bBI.esm.js → ekycUtils-FcqA6oU4.esm.js} +5 -0
  34. package/dist/electronic-signature.esm.js +1 -1
  35. package/dist/{electronicSignatureManager-Niq6kSWt.esm.js → electronicSignatureManager-DAo6oX0Q.esm.js} +1 -1
  36. package/dist/extensibility.d.ts +13 -13
  37. package/dist/extensibility.esm.js +13 -13
  38. package/dist/{faceCaptureManagerFactory-XkMOX4z5.d.ts → faceCaptureManagerFactory-CRGajjZ4.d.ts} +3 -3
  39. package/dist/{faceCaptureManagerFactory-EuqrecIE.esm.js → faceCaptureManagerFactory-D9_RYq6V.esm.js} +1 -1
  40. package/dist/{faceCaptureSetup-D4RwJrCr.esm.js → faceCaptureSetup-DfguzOfn.esm.js} +3 -3
  41. package/dist/{feature-management-CFgXB6oY.esm.js → feature-management-DhZ_q0Uu.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-BeGLm0d-.esm.js → flowCompletionService-HKgc7kWO.esm.js} +1 -1
  47. package/dist/{flowServices-C4u6lJ66.esm.js → flowServices-Dt6WBGMo.esm.js} +5 -5
  48. package/dist/geolocation.d.ts +1 -1
  49. package/dist/geolocation.esm.js +2 -2
  50. package/dist/{geolocationManager-gcP92Zr3.esm.js → geolocationManager-CycDkeT6.esm.js} +1 -1
  51. package/dist/{geolocationManager-CENrvxpK.d.ts → geolocationManager-Del2ddmt.d.ts} +1 -1
  52. package/dist/{geolocationStateMachine-Cfs2ekAz.esm.js → geolocationStateMachine-D5UFNB6v.esm.js} +1 -1
  53. package/dist/home.d.ts +1 -1
  54. package/dist/id-ocr.d.ts +1 -1
  55. package/dist/id-selfie-flow.d.ts +1 -1
  56. package/dist/id-selfie-flow.esm.js +6 -6
  57. package/dist/id.d.ts +2 -2
  58. package/dist/id.esm.js +3 -3
  59. package/dist/{idCaptureManager-CwGC7a2t.esm.js → idCaptureManager-BjuqNvDP.esm.js} +3 -3
  60. package/dist/{idCaptureManager-BRYJflLy.d.ts → idCaptureManager-Cqx2y_fC.d.ts} +2 -2
  61. package/dist/{idCaptureServices-B7yT-52j.esm.js → idCaptureServices-2MH0nm5F.esm.js} +2 -2
  62. package/dist/{idCaptureStateMachine-CT4JGyJi.esm.js → idCaptureStateMachine-Bs-uCVBA.esm.js} +8 -8
  63. package/dist/{idOcrManager-DflRx-_u.d.ts → idOcrManager-C3BHGgSb.d.ts} +1 -1
  64. package/dist/{index-B52Rq3En.d.ts → index-DxYNO94y.d.ts} +1 -1
  65. package/dist/index.esm.js +1 -1
  66. package/dist/kyb-checks.esm.js +2 -2
  67. package/dist/{kybChecksManager-Dz57Bkd0.esm.js → kybChecksManager-CSeexvp2.esm.js} +1 -1
  68. package/dist/{kybChecksStateMachine-DAgpsumL.esm.js → kybChecksStateMachine-DaKbu1GK.esm.js} +1 -1
  69. package/dist/mandatory-consent.d.ts +2 -2
  70. package/dist/{mandatoryConsentManager-B8gtexL8.d.ts → mandatoryConsentManager-D76rLUsm.d.ts} +2 -2
  71. package/dist/qe-signature.esm.js +1 -1
  72. package/dist/{runChildModule-CfGSfMV6.esm.js → runChildModule-DlJxIoUP.esm.js} +1 -1
  73. package/dist/{sdkVersion-DU6iPlYj.esm.js → sdkVersion-DrC3hGtu.esm.js} +1 -1
  74. package/dist/selfie.d.ts +3 -3
  75. package/dist/selfie.esm.js +6 -6
  76. package/dist/{selfieErrorUtils-IPgudh5D.esm.js → selfieErrorUtils-b50Cgu12.esm.js} +1 -1
  77. package/dist/{selfieManager-KLP66c1d.d.ts → selfieManager-DihwheJ6.d.ts} +1 -1
  78. package/dist/{selfieManager-N3JnYIIV.esm.js → selfieManager-iD-FjNCO.esm.js} +3 -3
  79. package/dist/{selfieStateMachine-BIlkbR8a.esm.js → selfieStateMachine-DPkQ_jvd.esm.js} +3 -3
  80. package/dist/{session-6KwyyUNG.esm.js → session-CtDoabxg.esm.js} +3 -3
  81. package/dist/session.d.ts +1 -1
  82. package/dist/session.esm.js +4 -4
  83. package/dist/{sessionInitializer-BpyHjSLK.esm.js → sessionInitializer-13-kkJZT.esm.js} +3 -3
  84. package/dist/{setup-BP245r33.esm.js → setup-DKqX_xdq.esm.js} +4 -4
  85. package/dist/{trueSightService-Rj3DMzb2.esm.js → trueSightService-Cy38GINi.esm.js} +1 -1
  86. package/dist/{types-BsWmnAUf.d.ts → types-9wlf1-GE.d.ts} +1 -1
  87. package/dist/types-CE1jkHw3.d.ts +6 -0
  88. package/dist/{types-DS_RiYko.d.ts → types-Cpdum4vi.d.ts} +1 -1
  89. package/dist/{types-Xp1E3FVT.d.ts → types-DFP7eSle.d.ts} +1 -1
  90. package/dist/{types-B4VMIIgN.d.ts → types-DJPU3W2M.d.ts} +1 -1
  91. package/dist/{types-C1IvtlAM.d.ts → types-Ddc4Tr_f.d.ts} +1 -1
  92. package/dist/video-selfie.d.ts +1 -1
  93. package/dist/video-selfie.esm.js +3 -3
  94. package/dist/{videoSelfieCameraWarmer-BmUAww-g.esm.js → videoSelfieCameraWarmer-B1qA9tqW.esm.js} +3 -3
  95. package/dist/{videoSelfieStepDetector-Ret6gbJg.d.ts → videoSelfieStepDetector-DRrh4P0A.d.ts} +2 -2
  96. package/dist/wasm.esm.js +1 -1
  97. package/dist/workflow.d.ts +1 -1
  98. package/dist/workflow.esm.js +17 -17
  99. package/package.json +3 -3
  100. package/dist/types-BBvW20-Z.d.ts +0 -6
@@ -1,9 +1,9 @@
1
1
  import { l as wasmRuntime } from "./warmup-BZOMg303.esm.js";
2
- import { t as ensureWasmPipelines } from "./setup-BP245r33.esm.js";
2
+ import { t as ensureWasmPipelines } from "./setup-DKqX_xdq.esm.js";
3
3
  import { r as BaseWasmProvider } from "./WasmUtilProvider-0xTxgP0R.esm.js";
4
4
  import { t as api, u as endpoints } from "./api-CZpuJuZl.esm.js";
5
- import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity } from "./trueSightService-Rj3DMzb2.esm.js";
6
- import "./sessionInitializer-BpyHjSLK.esm.js";
5
+ import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity } from "./trueSightService-Cy38GINi.esm.js";
6
+ import "./sessionInitializer-13-kkJZT.esm.js";
7
7
  import { t as addDeviceStats } from "./stats-DoByUnTa.esm.js";
8
8
  import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
9
9
  import { t as StreamCanvasProcessingSession } from "./StreamCanvasProcessingSession-CBnbTnOr.esm.js";
@@ -235,7 +235,7 @@ function startDetection(params) {
235
235
  };
236
236
  }
237
237
  async function initializeDeepsightSession(options) {
238
- const { loadDeepsightSession } = await import("./deepsightLoader-Cflwb0MF.esm.js");
238
+ const { loadDeepsightSession } = await import("./deepsightLoader-ChGk5xPL.esm.js");
239
239
  return loadDeepsightSession({
240
240
  ds: options.ds,
241
241
  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-Niq6kSWt.esm.js";
1
+ import { c as areAllConsented, i as AE_CONSENT_KEYS, r as electronicSignatureMachine, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-DAo6oX0Q.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-Rj3DMzb2.esm.js";
1
+ import { d as categoryForEndpoint, u as trueSightLog } from "./trueSightService-Cy38GINi.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-XkMOX4z5.js";
2
- import { t as AuthenticationConfig } from "./types-BBvW20-Z.js";
3
- import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager-aZzFZo6V.js";
1
+ import { C as authenticationMachine, S as createAuthenticationActor, b as AuthenticationActor, x as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-CRGajjZ4.js";
2
+ import { t as AuthenticationConfig } from "./types-CE1jkHw3.js";
3
+ import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager-DRaugLgH.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-BYgvkd0R.esm.js";
2
- import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-2BpobEGh.esm.js";
1
+ import { t as authenticationMachine } from "./authenticationStateMachine-CCCRzCMn.esm.js";
2
+ import { r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-D_MFkgZc.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-XkMOX4z5.js";
3
+ import { b as AuthenticationActor, n as FaceCaptureManagerState, t as FaceCaptureManager, x as CreateAuthenticationActorOptions } from "./faceCaptureManagerFactory-CRGajjZ4.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-BP245r33.esm.js";
1
+ import { u as BrowserStorageProvider } from "./setup-DKqX_xdq.esm.js";
2
2
  import { t as WasmUtilProvider } from "./WasmUtilProvider-0xTxgP0R.esm.js";
3
3
  import { n as eventModuleNames } from "./types-DYYMdAGv.esm.js";
4
4
  import "./events-CP3yOzAl.esm.js";
5
5
  import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
6
- import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-EuqrecIE.esm.js";
7
- import { t as authenticationMachine } from "./authenticationStateMachine-BYgvkd0R.esm.js";
6
+ import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-D9_RYq6V.esm.js";
7
+ import { t as authenticationMachine } from "./authenticationStateMachine-CCCRzCMn.esm.js";
8
8
  //#region src/modules/authentication/authenticationActor.ts
9
9
  function createAuthenticationActor(options) {
10
10
  const dependencies = options.dependencies ?? {
@@ -1,7 +1,7 @@
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-D4RwJrCr.esm.js";
4
- import { d as isOnDeviceMode, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-B99Nr-zl.esm.js";
3
+ import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-DfguzOfn.esm.js";
4
+ import { d as isOnDeviceMode, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-DJ3j9AUx.esm.js";
5
5
  import { s as PROTECTED_CAPTURE_TARGET } from "./desktopCameraElection-BKFjsQpO.esm.js";
6
6
  //#region src/modules/authentication/authenticationErrorUtils.ts
7
7
  const AUTH_ERROR_MAP = {
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-B0YKqYtZ.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-DlvhoJYc.js";
2
2
  export { type ConsentActor, type ConsentCheckbox, type ConsentConfig, type ConsentManager, type ConsentState, consentMachine, createConsentManager, createConsentManagerFromActor };
@@ -102,7 +102,7 @@ declare const consentMachine: StateMachine<ConsentContext, {
102
102
  }>, {
103
103
  type: "canSubmit";
104
104
  params: unknown;
105
- }, never, "error" | "idle" | "finished" | "submitting" | "loading" | "display", string, ConsentInput, NonReducibleUnknown, EventObject, MetaObject, {
105
+ }, never, "error" | "idle" | "finished" | "loading" | "submitting" | "display", string, ConsentInput, NonReducibleUnknown, EventObject, MetaObject, {
106
106
  readonly id: "consent";
107
107
  readonly initial: "idle";
108
108
  readonly context: ({ input }: {
@@ -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-BfF2Qa5b.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-Ci2iVuog.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-C1IvtlAM.js";
4
+ import { i as FlowModuleConfig } from "./types-Ddc4Tr_f.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,7 +1,7 @@
1
1
  import { t as WasmUtilProvider } from "./WasmUtilProvider-0xTxgP0R.esm.js";
2
- import { u as trueSightLog } from "./trueSightService-Rj3DMzb2.esm.js";
3
- import { t as SDK_VERSION } from "./sdkVersion-DU6iPlYj.esm.js";
4
- import { C as BrowserEnvironmentProvider, S as IpifyProvider, T as SDK_PLATFORM, b as getThumbmarkId, n as getDisableIpify, r as getFingerprintEnabled, v as isBrowserSimulation, w as fingerprintSignalsReporter } from "./sessionInitializer-BpyHjSLK.esm.js";
2
+ import { u as trueSightLog } from "./trueSightService-Cy38GINi.esm.js";
3
+ import { t as SDK_VERSION } from "./sdkVersion-DrC3hGtu.esm.js";
4
+ import { C as BrowserEnvironmentProvider, S as IpifyProvider, T as SDK_PLATFORM, b as getThumbmarkId, n as getDisableIpify, r as getFingerprintEnabled, v as isBrowserSimulation, w as fingerprintSignalsReporter } from "./sessionInitializer-13-kkJZT.esm.js";
5
5
  import { t as getParsedUserAgent } from "./getParsedUserAgent-DhQPeKqw.esm.js";
6
6
  import { t as getUserAgent } from "./getBrowser-CBiibsL-.esm.js";
7
7
  import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-DPK7qGgo.esm.js";
@@ -52,6 +52,31 @@ function buildStreetValue(street, houseNumber, hasHouseNoField) {
52
52
  if (houseNumber && street) return `${houseNumber} ${street}`;
53
53
  return houseNumber ?? street ?? "";
54
54
  }
55
+ /**
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.
65
+ */
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
+ };
79
+ }
55
80
  const POSTAL_CODE_MAX_LENGTH_BY_COUNTRY = {
56
81
  US: 10,
57
82
  BR: 9,
@@ -193,4 +218,4 @@ function createBundledDefinitionSource(definitions) {
193
218
  return { select: (query) => byQuery.get(queryKey(query)) };
194
219
  }
195
220
  //#endregion
196
- 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 };
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 };
@@ -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-CyNndVAT.js";
2
- import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-BZBmcOKI.js";
2
+ import { a as DocumentCaptureActor, i as createDocumentCaptureManagerFromActor, n as DocumentCaptureState, o as documentCaptureMachine, r as createDocumentCaptureManager, t as DocumentCaptureManager } from "./documentCaptureManager-Dd3T6bcs.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 };
@@ -102,14 +102,14 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
102
102
  id: string | undefined;
103
103
  };
104
104
  }>, Values<{
105
- decrementAttemptsRemaining: {
106
- type: "decrementAttemptsRemaining";
107
- params: NonReducibleUnknown;
108
- };
109
105
  clearError: {
110
106
  type: "clearError";
111
107
  params: NonReducibleUnknown;
112
108
  };
109
+ decrementAttemptsRemaining: {
110
+ type: "decrementAttemptsRemaining";
111
+ params: NonReducibleUnknown;
112
+ };
113
113
  setStream: {
114
114
  type: "setStream";
115
115
  params: NonReducibleUnknown;
@@ -1,3 +1,3 @@
1
- import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-CdgUw2lX.esm.js";
2
- import { t as createDynamicFormsManager } from "./dynamicFormsManager-D_R4BLGJ.esm.js";
1
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-D-Z5qtla.esm.js";
2
+ import { t as createDynamicFormsManager } from "./dynamicFormsManager-Cw6GTtwI.esm.js";
3
3
  export { createDynamicFormsManager, dynamicFormsMachine };
@@ -3,7 +3,7 @@ import { t as createManagerInstrumentation } from "./events-CP3yOzAl.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-CdgUw2lX.esm.js";
6
+ import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-D-Z5qtla.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-CZpuJuZl.esm.js";
2
- import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-C3vTAT37.esm.js";
2
+ import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-CrhSAO2n.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 { t as isoDateToMs } from "./dateUtils-CvG0FvK8.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-C1IvtlAM.js";
3
+ import { i as FlowModuleConfig } from "./types-Ddc4Tr_f.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 { c as ALL_COUNTRIES, f as SUPPORTED_COUNTRIES, l as DEV_ONLY_COUNTRIES, m as isSupportedCountry, o as toEkybConfig } from "./ekybUtils-Cw8Ta9Qi.esm.js";
2
- import { t as ekybMachine } from "./ekybStateMachine-DQ9J-FmN.esm.js";
3
- import { t as createEkybManager } from "./ekybManager-DLebrUE1.esm.js";
2
+ import { t as ekybMachine } from "./ekybStateMachine-CcJU0uRo.esm.js";
3
+ import { t as createEkybManager } from "./ekybManager-fRzlxhFh.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-CP3yOzAl.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-DQ9J-FmN.esm.js";
6
+ import { t as ekybMachine } from "./ekybStateMachine-CcJU0uRo.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-CZpuJuZl.esm.js";
2
- import { n as getFlow } from "./flowServices-C4u6lJ66.esm.js";
2
+ import { n as getFlow } from "./flowServices-Dt6WBGMo.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 sortModulesByOrder, c as ALL_COUNTRIES, d as FIELD_ORDER, i as requiresAddressValidation, m as isSupportedCountry, n as hasAtLeastOneAddressField, o as toEkybConfig, p as UBO_FIELD_LABELS, r as isFieldOptional, s as ADDRESS_FIELDS, u as FIELD_NAME_MAPPING } from "./ekybUtils-Cw8Ta9Qi.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 } from "./definitionSource-BbeyVsUt.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";
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-Rxm1K67A.esm.js";
11
11
  //#region src/modules/ekyb/ekybValidators.ts
@@ -754,7 +754,8 @@ const ekybMachine = setup({
754
754
  fillAddressFields: assign(({ context, event }) => {
755
755
  const { suggestion } = event;
756
756
  const activeFields = new Set(context.fields.map((f) => f.name));
757
- const { values: newValues } = fillFromSuggestion(context.values, {}, suggestion, activeFields);
757
+ const { values: filled } = fillFromSuggestion(context.values, {}, suggestion, activeFields);
758
+ const newValues = keepSuggestedStateInOptions(context.fields, context.values, filled);
758
759
  const errs = context.validationErrors;
759
760
  let newErrors = errs;
760
761
  if (errs) {
@@ -1,6 +1,6 @@
1
1
  import { a as EkycFormValues, c as EkycValidationErrors, s as EkycValidationError } from "./types-DEa3taWc.js";
2
2
  import { a as EkycPrefillFieldDef, c as EkycPrefillModuleConfig, i as EkycPrefillErrorKind, l as EkycPrefillServedField, n as EkycPrefillConfigField, s as EkycPrefillInputFormat, t as EkycPrefillConfig } from "./types-B-PIc0en.js";
3
- import { a as EkycPrefillFormState, c as EkycPrefillManager, d as EkycPrefillSubmittingState, f as createEkycPrefillManager, h as ekycPrefillMachine, i as EkycPrefillFinishedState, l as EkycPrefillMisconfiguredState, n as EkycPrefillClosedState, o as EkycPrefillIdleState, r as EkycPrefillErrorState, s as EkycPrefillLimitReachedState, t as EkycPrefillAnyOfState, u as EkycPrefillState } from "./ekycPrefillManager-BcLhkpp8.js";
3
+ import { a as EkycPrefillFormState, c as EkycPrefillManager, d as EkycPrefillSubmittingState, f as createEkycPrefillManager, h as ekycPrefillMachine, i as EkycPrefillFinishedState, l as EkycPrefillMisconfiguredState, n as EkycPrefillClosedState, o as EkycPrefillIdleState, r as EkycPrefillErrorState, s as EkycPrefillLimitReachedState, t as EkycPrefillAnyOfState, u as EkycPrefillState } from "./ekycPrefillManager-C11D5yiF.js";
4
4
  //#region src/modules/ekyc-prefill/ekycPrefillConfig.d.ts
5
5
  /**
6
6
  * Normalizes the served `EKYC_PREFILL` configuration. Idempotent, so a
@@ -1,3 +1,3 @@
1
- import { i as toEkycPrefillConfig, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-DWRgq-Xp.esm.js";
2
- import { t as createEkycPrefillManager } from "./ekycPrefillManager-CSuhSKU-.esm.js";
1
+ import { i as toEkycPrefillConfig, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-DvAclaRa.esm.js";
2
+ import { t as createEkycPrefillManager } from "./ekycPrefillManager-CRAE43Mc.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-B3AYpG8S.esm.js";
2
- import { l as toEkycConfig } from "./ekycUtils-Cp9M-bBI.esm.js";
3
- import { t as createEkycManager } from "./ekycManager-fNTBP3jK.esm.js";
1
+ import { t as ekycMachine } from "./ekycStateMachine-nwJRel2s.esm.js";
2
+ import { l as toEkycConfig } from "./ekycUtils-FcqA6oU4.esm.js";
3
+ import { t as createEkycManager } from "./ekycManager-nRT0rxei.esm.js";
4
4
  export { createEkycManager, ekycMachine, toEkycConfig };
@@ -3,7 +3,7 @@ import { t as createManagerInstrumentation } from "./events-CP3yOzAl.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-B3AYpG8S.esm.js";
6
+ import { i as isStepValid, n as buildEkycSteps, r as clampStepIndex, t as ekycMachine } from "./ekycStateMachine-nwJRel2s.esm.js";
7
7
  //#region src/modules/ekyc/ekycActor.ts
8
8
  /**
9
9
  * Creates and starts an eKYC actor.
@@ -110,7 +110,7 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
110
110
  type: "isLimitReached";
111
111
  params: unknown;
112
112
  };
113
- }>, never, "error" | "idle" | "closed" | "finished" | "submitting" | "misconfigured" | "limitReached" | {
113
+ }>, never, "error" | "idle" | "closed" | "finished" | "misconfigured" | "submitting" | "limitReached" | {
114
114
  form: "inputting" | "validating";
115
115
  }, string, EkycPrefillInput, NonReducibleUnknown, EventObject, MetaObject, {
116
116
  readonly id: "ekycPrefill";
@@ -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-DWRgq-Xp.esm.js";
3
+ import { n as isAnyOfMissing, r as validateForm, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-DvAclaRa.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-CZpuJuZl.esm.js";
2
- import { i as toIncodeApiError } from "./apiError-C3vTAT37.esm.js";
2
+ import { i as toIncodeApiError } from "./apiError-CrhSAO2n.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-BtKqNbSh.esm.js";
7
- import { t as createBundledDefinitionSource } from "./definitionSource-BbeyVsUt.esm.js";
6
+ import { i as cleanName, l as validateEkycField, n as projectRules, o as formatSSN } from "./ekycRules-DXP2hqVw.esm.js";
7
+ import { t as createBundledDefinitionSource } from "./definitionSource-Nw0YCbpe.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";
@@ -1,7 +1,7 @@
1
1
  import { t as getLocalIsoDate } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
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
- import { i as getPostalCodeErrorParams, o as validatePostalCode, r as getPostalCodeErrorKey, s as STREET_LEVEL_REQUIRED_ERROR } from "./definitionSource-BbeyVsUt.esm.js";
4
+ import { i as getPostalCodeErrorParams, o as validatePostalCode, r as getPostalCodeErrorKey, s as STREET_LEVEL_REQUIRED_ERROR } from "./definitionSource-Nw0YCbpe.esm.js";
5
5
  import { r as DYNAMIC_REQUIRED_KEY } from "./resolveForm-DaaQSVWp.esm.js";
6
6
  import { t as validateCPF } from "./cpf-DDXMTLYr.esm.js";
7
7
  import { n as hasAllowedCharacters } from "./phoneFormat-C3q0Ukh4.esm.js";
@@ -2,12 +2,12 @@ import { t as api, u as endpoints } from "./api-CZpuJuZl.esm.js";
2
2
  import { t as getPhoneValidation } from "./phoneValidation-OggtfjRt.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
- import { a as formatPhoneNational, c as oneOfRequiredErrorKey, i as cleanName, l as validateEkycField, n as projectRules, o as formatSSN, s as loadPhoneValidator, t as RULES, u as validateEkycForm } from "./ekycRules-BtKqNbSh.esm.js";
5
+ import { a as formatPhoneNational, c as oneOfRequiredErrorKey, i as cleanName, l as validateEkycField, n as projectRules, o as formatSSN, s as loadPhoneValidator, t as RULES, u as validateEkycForm } from "./ekycRules-DXP2hqVw.esm.js";
6
6
  import { n as usStates, t as usStateOptions } from "./usStates-CwOQ2kAx.esm.js";
7
- import { a as getPostalCodeMaxLength, c as fillFromSuggestion, l as getStreetLevelErrorForSuggestion, n as formatPostalCode, t as createBundledDefinitionSource } from "./definitionSource-BbeyVsUt.esm.js";
7
+ import { a as getPostalCodeMaxLength, c as fillFromSuggestion, l as getStreetLevelErrorForSuggestion, n as formatPostalCode, t as createBundledDefinitionSource, u as keepSuggestedStateInOptions } from "./definitionSource-Nw0YCbpe.esm.js";
8
8
  import { n as checkSupport, t as resolveForm } from "./resolveForm-DaaQSVWp.esm.js";
9
9
  import { n as searchAddress, r as isFormDefinitionsEnabled, t as debounceSearchActor } from "./addressSearch-Rxm1K67A.esm.js";
10
- import { C as TAX_ID_SOURCES, S as STREET_SOURCES, _ as MIDDLE_NAME_SOURCES, a as getEKYCFields, b as POSTAL_CODE_SOURCES, c as resolveEkycSource, d as APARTMENT_SOURCES, f as CITY_SOURCES, g as HOUSE_NO_SOURCES, h as EMAIL_SOURCES, i as getEKYCDisplayModes, l as toEkycConfig, m as COUNTRY_SELECTOR_DISABLED_SOURCES, o as isFieldOptional, p as COUNTRY_CODE_OMITTED_SOURCES, r as getEKYCCountry, s as mapToEKYCvalue, t as EKYC_GROUP_KEYS, u as ADDRESS_STATE_SOURCES, v as NAME_SOURCES, w as VOCABULARY, x as STATE_CODE_HINTS, y as ONE_OF_REQUIRED_GROUPS } from "./ekycUtils-Cp9M-bBI.esm.js";
10
+ import { C as TAX_ID_SOURCES, S as STREET_SOURCES, _ as MIDDLE_NAME_SOURCES, a as getEKYCFields, b as POSTAL_CODE_SOURCES, c as resolveEkycSource, d as APARTMENT_SOURCES, f as CITY_SOURCES, g as HOUSE_NO_SOURCES, h as EMAIL_SOURCES, i as getEKYCDisplayModes, l as toEkycConfig, m as COUNTRY_SELECTOR_DISABLED_SOURCES, o as isFieldOptional, p as COUNTRY_CODE_OMITTED_SOURCES, r as getEKYCCountry, s as mapToEKYCvalue, t as EKYC_GROUP_KEYS, u as ADDRESS_STATE_SOURCES, v as NAME_SOURCES, w as VOCABULARY, x as STATE_CODE_HINTS, y as ONE_OF_REQUIRED_GROUPS } from "./ekycUtils-FcqA6oU4.esm.js";
11
11
  import { t as DateFormattingProvider } from "./DateFormattingProvider-DPq9zco-.esm.js";
12
12
  import { t as formatPhoneE164 } from "./phoneFormat-C3q0Ukh4.esm.js";
13
13
  //#region src/internal/forms/resolvePrefill.ts
@@ -3199,6 +3199,175 @@ const EKYC_DEFINITIONS = {
3199
3199
  }
3200
3200
  }
3201
3201
  },
3202
+ "ekyc/HK/HK_RESIDENT_REGISTER": {
3203
+ schemaVersion: 1,
3204
+ vocabulary: "1.3",
3205
+ id: "ekyc/HK/HK_RESIDENT_REGISTER",
3206
+ module: "ekyc",
3207
+ country: "HK",
3208
+ source: "HK_RESIDENT_REGISTER",
3209
+ sections: [{ id: "address" }],
3210
+ fields: [
3211
+ {
3212
+ name: "firstName",
3213
+ kind: "text",
3214
+ group: "name",
3215
+ required: true,
3216
+ label: { key: "verification.labels.firstName" },
3217
+ placeholder: { key: "verification.placeholder.firstName" },
3218
+ input: {
3219
+ maxLength: 100,
3220
+ autofill: "givenName"
3221
+ },
3222
+ rules: [{ id: "nameCharacters" }],
3223
+ prefill: ["document.firstName", "poa.firstName"]
3224
+ },
3225
+ {
3226
+ name: "surName",
3227
+ kind: "text",
3228
+ group: "name",
3229
+ required: true,
3230
+ label: { key: "verification.labels.surName" },
3231
+ placeholder: { key: "verification.placeholder.surname" },
3232
+ input: {
3233
+ maxLength: 100,
3234
+ autofill: "familyName"
3235
+ },
3236
+ rules: [{ id: "nameCharacters" }],
3237
+ prefill: ["document.paternalLastName", "poa.lastName"]
3238
+ },
3239
+ {
3240
+ name: "dateOfBirth",
3241
+ kind: "date",
3242
+ group: "dateOfBirth",
3243
+ label: { key: "verification.labels.dateOfBirth" },
3244
+ input: { autofill: "birthday" },
3245
+ rules: [{
3246
+ id: "maxAge",
3247
+ params: { years: 120 }
3248
+ }, { id: "notFuture" }],
3249
+ prefill: ["document.birthDate"]
3250
+ },
3251
+ {
3252
+ name: "gender",
3253
+ kind: "choice",
3254
+ group: "gender",
3255
+ widget: "radio",
3256
+ label: { key: "verification.labels.gender" },
3257
+ options: [{
3258
+ value: "F",
3259
+ label: { key: "common.female" }
3260
+ }, {
3261
+ value: "M",
3262
+ label: { key: "common.male" }
3263
+ }]
3264
+ },
3265
+ {
3266
+ name: "email",
3267
+ kind: "text",
3268
+ group: "email",
3269
+ required: true,
3270
+ label: { key: "verification.labels.email" },
3271
+ placeholder: { key: "verification.placeholder.email" },
3272
+ input: {
3273
+ keyboard: "email",
3274
+ autofill: "email"
3275
+ },
3276
+ rules: [{ id: "emailFormat" }],
3277
+ prefill: ["emailModule.email"]
3278
+ },
3279
+ {
3280
+ name: "phone",
3281
+ kind: "phone",
3282
+ group: "phone",
3283
+ required: true,
3284
+ label: { key: "verification.labels.phone" },
3285
+ input: { autofill: "phone" },
3286
+ phone: { lockCountry: "whenPhoneRisk" },
3287
+ rules: [{ id: "phoneFormat" }],
3288
+ payload: { transforms: [{ id: "e164" }] },
3289
+ prefill: ["phoneModule.phone"]
3290
+ },
3291
+ {
3292
+ name: "apartment",
3293
+ kind: "text",
3294
+ group: "address",
3295
+ section: "address",
3296
+ label: { key: "verification.labels.apartment" },
3297
+ placeholder: { key: "verification.placeholder.apartment" },
3298
+ input: { autofill: "addressLine2" }
3299
+ },
3300
+ {
3301
+ name: "buildingName",
3302
+ kind: "text",
3303
+ group: "address",
3304
+ section: "address",
3305
+ label: { key: "verification.labels.buildingName" }
3306
+ },
3307
+ {
3308
+ name: "houseNo",
3309
+ kind: "text",
3310
+ group: "address",
3311
+ section: "address",
3312
+ label: { key: "verification.labels.houseNo" },
3313
+ prefill: ["document.houseNumber", "poa.houseNumber"]
3314
+ },
3315
+ {
3316
+ name: "street",
3317
+ kind: "text",
3318
+ group: "address",
3319
+ section: "address",
3320
+ widget: "addressSearch",
3321
+ label: { key: "verification.labels.street" },
3322
+ input: { autofill: "addressLine1" },
3323
+ rules: [{ id: "noPoBox" }],
3324
+ prefill: ["document.street", "poa.street"]
3325
+ },
3326
+ {
3327
+ name: "city",
3328
+ kind: "text",
3329
+ group: "address",
3330
+ section: "address",
3331
+ label: { key: "verification.labels.area" },
3332
+ input: { autofill: "addressLevel2" },
3333
+ prefill: ["document.city", "poa.city"]
3334
+ },
3335
+ {
3336
+ name: "state",
3337
+ kind: "choice",
3338
+ group: "address",
3339
+ section: "address",
3340
+ required: true,
3341
+ widget: "select",
3342
+ label: { key: "verification.labels.chooseState" },
3343
+ placeholder: { key: "verification.placeholder.state" },
3344
+ input: { autofill: "addressLevel1" },
3345
+ options: [
3346
+ {
3347
+ value: "Hong Kong",
3348
+ label: { key: "Hong Kong" }
3349
+ },
3350
+ {
3351
+ value: "Kowloon",
3352
+ label: { key: "Kowloon" }
3353
+ },
3354
+ {
3355
+ value: "New Territories",
3356
+ label: { key: "New Territories" }
3357
+ }
3358
+ ],
3359
+ payload: { transforms: [{ id: "uppercase" }] },
3360
+ prefill: ["document.state", "poa.state"]
3361
+ }
3362
+ ],
3363
+ submit: {
3364
+ static: { plugins: ["kyc"] },
3365
+ context: {
3366
+ source: "source",
3367
+ countryCode: "country"
3368
+ }
3369
+ }
3370
+ },
3202
3371
  "ekyc/IN/IN_DMV": {
3203
3372
  schemaVersion: 1,
3204
3373
  vocabulary: "1.3",
@@ -7461,7 +7630,8 @@ const ekycMachine = setup({
7461
7630
  fillAddressFields: assign(({ context, event }) => {
7462
7631
  const { suggestion } = event;
7463
7632
  const activeFields = new Set(context.fields.filter((f) => !isLocked(f)).map((f) => f.name));
7464
- const { values: newValues } = fillFromSuggestion(context.values, {}, suggestion, activeFields);
7633
+ const { values: filled } = fillFromSuggestion(context.values, {}, suggestion, activeFields);
7634
+ const newValues = keepSuggestedStateInOptions(context.fields, context.values, filled);
7465
7635
  const clearedErrors = omitKeys(context.validationErrors, ADDRESS_AUTOCOMPLETE_KEYS);
7466
7636
  const streetError = getStreetLevelErrorForSuggestion(suggestion, activeFields);
7467
7637
  const validationErrors = {
@@ -96,6 +96,11 @@ const EKYC_INDEX = [
96
96
  country: "GT",
97
97
  source: "GT_1"
98
98
  },
99
+ {
100
+ id: "ekyc/HK/HK_RESIDENT_REGISTER",
101
+ country: "HK",
102
+ source: "HK_RESIDENT_REGISTER"
103
+ },
99
104
  {
100
105
  id: "ekyc/IN/IN_DMV",
101
106
  country: "IN",
@@ -1,2 +1,2 @@
1
- import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, i as AE_CONSENT_KEYS, l as getConsentKeys, n as createElectronicSignatureManagerFromActor, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-Niq6kSWt.esm.js";
1
+ import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, i as AE_CONSENT_KEYS, l as getConsentKeys, n as createElectronicSignatureManagerFromActor, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-DAo6oX0Q.esm.js";
2
2
  export { AE_CONSENT_KEYS, NAMIRIAL_QES_CONSENT_KEYS, NAMIRIAL_QES_PROVIDER_CODE, QE_CONSENT_KEYS, areAllConsented, createElectronicSignatureManager, createElectronicSignatureManagerFromActor, electronicSignatureMachine, getConsentKeys, getDefaultConsentChecks };
@@ -2,7 +2,7 @@ import { n as eventModuleNames } from "./types-DYYMdAGv.esm.js";
2
2
  import { t as api, u as endpoints } from "./api-CZpuJuZl.esm.js";
3
3
  import { t as createManagerInstrumentation } from "./events-CP3yOzAl.esm.js";
4
4
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
5
- import { i as toIncodeApiError, n as isConnectivityError, t as IncodeApiError } from "./apiError-C3vTAT37.esm.js";
5
+ import { i as toIncodeApiError, n as isConnectivityError, t as IncodeApiError } from "./apiError-CrhSAO2n.esm.js";
6
6
  import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
7
7
  import { i as assign, s as createActor, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
8
8
  import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";