@incodetech/core 2.0.0 → 2.0.1-rc.0

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 (178) hide show
  1. package/dist/Actor-CI32dTbG.d.ts +2 -0
  2. package/dist/BaseWasmProvider-C_DLEI40.esm.js +1118 -0
  3. package/dist/BrowserStorageProvider-CuOW1Er2.esm.js +55 -0
  4. package/dist/BrowserTimerProvider-DhNc_x02.esm.js +22 -0
  5. package/dist/ITimerCapability-C67ZRskg.esm.js +7 -0
  6. package/dist/IpifyProvider-D7jx52AL.esm.js +139 -0
  7. package/dist/Manager-C8PrhBOx.d.ts +19 -0
  8. package/dist/MotionSensorProvider-4v7xkqAp.esm.js +254 -0
  9. package/dist/OpenViduRecordingProvider-CMu6XVdc.esm.js +87 -0
  10. package/dist/StateMachine-BCQrZJhf.d.ts +2 -0
  11. package/dist/WasmUtilProvider-j98OJf-S.esm.js +114 -0
  12. package/dist/addressSearch-BpTbTWCa.esm.js +430 -0
  13. package/dist/ae-signature-DDDZmWXj.esm.js +12 -0
  14. package/dist/ae-signature.d.ts +25 -0
  15. package/dist/ae-signature.esm.js +8 -0
  16. package/dist/antifraud.d.ts +57 -0
  17. package/dist/antifraud.esm.js +45 -0
  18. package/dist/antifraudStateMachine-O0TMf6yc.esm.js +39 -0
  19. package/dist/api-CESGtpbH.esm.js +53 -0
  20. package/dist/authentication.d.ts +12 -0
  21. package/dist/authentication.esm.js +25 -0
  22. package/dist/authenticationManager-5M-fKzXx.esm.js +67 -0
  23. package/dist/authenticationManager-C83GNIhl.d.ts +66 -0
  24. package/dist/authenticationStateMachine-BMZqatiF.esm.js +139 -0
  25. package/dist/backCameraStream-DMdMeGk2.esm.js +346 -0
  26. package/dist/browserSimulation-gxD8cSpM.esm.js +20 -0
  27. package/dist/camera-DBSxa6ML.d.ts +4 -0
  28. package/dist/camera-PA2Ljri3.esm.js +22 -0
  29. package/dist/camera.d.ts +15 -0
  30. package/dist/camera.esm.js +5 -0
  31. package/dist/chunk-CRF6K_H_.esm.js +49 -0
  32. package/dist/consent.d.ts +398 -0
  33. package/dist/consent.esm.js +79 -0
  34. package/dist/consentStateMachine-CCT-B60O.esm.js +151 -0
  35. package/dist/cpf-PPz2Njto.esm.js +38 -0
  36. package/dist/cpf-ocr.d.ts +204 -0
  37. package/dist/cpf-ocr.esm.js +177 -0
  38. package/dist/cross-document-data-match.d.ts +34 -0
  39. package/dist/cross-document-data-match.esm.js +71 -0
  40. package/dist/curp-validation.d.ts +188 -0
  41. package/dist/curp-validation.esm.js +110 -0
  42. package/dist/curpValidationStateMachine-CitWLr2c.esm.js +595 -0
  43. package/dist/custom-fields.d.ts +115 -0
  44. package/dist/custom-fields.esm.js +177 -0
  45. package/dist/custom-watchlist.d.ts +66 -0
  46. package/dist/custom-watchlist.esm.js +86 -0
  47. package/dist/dateUtils-UoN5xswP.esm.js +23 -0
  48. package/dist/deepsightLoader-Cm4JIT_z.esm.js +52 -0
  49. package/dist/deepsightService-CEVxzehb.d.ts +412 -0
  50. package/dist/deepsightService-O74l4Y__.esm.js +489 -0
  51. package/dist/device.d.ts +46 -0
  52. package/dist/device.esm.js +106 -0
  53. package/dist/displayErrors-DqJ_IbsG.d.ts +39 -0
  54. package/dist/document-capture.d.ts +906 -0
  55. package/dist/document-capture.esm.js +156 -0
  56. package/dist/document-upload.d.ts +331 -0
  57. package/dist/document-upload.esm.js +203 -0
  58. package/dist/documentCaptureStateMachine-BqzTDy9k.esm.js +394 -0
  59. package/dist/dynamic-forms.d.ts +178 -0
  60. package/dist/dynamic-forms.esm.js +323 -0
  61. package/dist/ekyb.d.ts +148 -0
  62. package/dist/ekyb.esm.js +127 -0
  63. package/dist/ekybStateMachine-BR2let5f.esm.js +674 -0
  64. package/dist/ekyc.d.ts +164 -0
  65. package/dist/ekyc.esm.js +104 -0
  66. package/dist/ekycStateMachine-oeO0Iekd.esm.js +10626 -0
  67. package/dist/electronic-signature.d.ts +4 -0
  68. package/dist/electronic-signature.esm.js +7 -0
  69. package/dist/electronicSignatureManager-D9OHzTpG.esm.js +428 -0
  70. package/dist/email.d.ts +4 -0
  71. package/dist/email.esm.js +9 -0
  72. package/dist/emailManager-DIfnS5g1.d.ts +352 -0
  73. package/dist/emailManager-wAV0LE-H.esm.js +238 -0
  74. package/dist/emailStateMachine-DOf4j58N.esm.js +292 -0
  75. package/dist/endpoints-CnN3SyDa.esm.js +87 -0
  76. package/dist/events-D6-e4vok.esm.js +596 -0
  77. package/dist/events.d.ts +265 -0
  78. package/dist/events.esm.js +4 -0
  79. package/dist/extensibility.d.ts +122 -0
  80. package/dist/extensibility.esm.js +43 -0
  81. package/dist/face-match.d.ts +228 -0
  82. package/dist/face-match.esm.js +173 -0
  83. package/dist/faceCaptureManagerFactory-Dh2PdGlF.esm.js +290 -0
  84. package/dist/faceCaptureManagerFactory-yqtpxjnN.d.ts +690 -0
  85. package/dist/faceCaptureSetup-B3faSpYA.esm.js +873 -0
  86. package/dist/faceMatchStateMachine-DNFrxTFS.esm.js +127 -0
  87. package/dist/flow-events.d.ts +6 -0
  88. package/dist/flow-events.esm.js +0 -0
  89. package/dist/flow.d.ts +358 -0
  90. package/dist/flow.esm.js +825 -0
  91. package/dist/flowCompletionService-DhkT4SRY.d.ts +10 -0
  92. package/dist/flowCompletionService-P54yzGvA.esm.js +13 -0
  93. package/dist/flowServices-DG3IdWw6.esm.js +188 -0
  94. package/dist/geolocation.d.ts +127 -0
  95. package/dist/geolocation.esm.js +89 -0
  96. package/dist/geolocationStateMachine-asasuHY2.esm.js +105 -0
  97. package/dist/getBrowser-BSXUTWXw.esm.js +41 -0
  98. package/dist/getDeviceClass-BSntT9_j.esm.js +14 -0
  99. package/dist/government-validation.d.ts +67 -0
  100. package/dist/government-validation.esm.js +81 -0
  101. package/dist/governmentValidationStateMachine-BDDYrJTo.esm.js +271 -0
  102. package/dist/home.d.ts +99 -0
  103. package/dist/home.esm.js +61 -0
  104. package/dist/http.d.ts +68 -0
  105. package/dist/http.esm.js +3 -0
  106. package/dist/id-ocr.d.ts +635 -0
  107. package/dist/id-ocr.esm.js +86 -0
  108. package/dist/id-verification.d.ts +190 -0
  109. package/dist/id-verification.esm.js +43 -0
  110. package/dist/id.d.ts +24 -0
  111. package/dist/id.esm.js +164 -0
  112. package/dist/idCaptureManager-Fyd0eam-.d.ts +958 -0
  113. package/dist/idCaptureManager-ZPkD7Gjk.esm.js +581 -0
  114. package/dist/idCaptureStateMachine-BK0bPHoc.esm.js +2963 -0
  115. package/dist/idOcrStateMachine-YbjjC_Gg.esm.js +388 -0
  116. package/dist/idVerificationStateMachine-xbw9HP1Z.esm.js +71 -0
  117. package/dist/identity-reuse.d.ts +530 -0
  118. package/dist/identity-reuse.esm.js +274 -0
  119. package/dist/index-BcRG8rtJ.d.ts +97 -0
  120. package/dist/index-DZoqeAo9.d.ts +1177 -0
  121. package/dist/index.d.ts +3 -0
  122. package/dist/index.esm.js +12 -0
  123. package/dist/invokeOnCaptureCallback-rc6kBHo5.esm.js +30 -0
  124. package/dist/lib-BB0B_qQX.esm.js +12499 -0
  125. package/dist/mandatory-consent.d.ts +412 -0
  126. package/dist/mandatory-consent.esm.js +78 -0
  127. package/dist/mandatoryConsentStateMachine-Cnco1jvn.esm.js +126 -0
  128. package/dist/openviduLazy-Cm0XFh_v.esm.js +3 -0
  129. package/dist/openviduLazy-Cok70ZSg.esm.js +12 -0
  130. package/dist/permissionServices-D_i6nzEw.esm.js +50 -0
  131. package/dist/phone.d.ts +4 -0
  132. package/dist/phone.esm.js +9 -0
  133. package/dist/phoneManager-B6M30hKE.d.ts +397 -0
  134. package/dist/phoneManager-DAJbGhlY.esm.js +256 -0
  135. package/dist/phoneStateMachine-CuPARRaT.esm.js +351 -0
  136. package/dist/platform-CfrjKhmi.esm.js +83 -0
  137. package/dist/qe-signature-DFo_Cc-I.esm.js +12 -0
  138. package/dist/qe-signature.d.ts +25 -0
  139. package/dist/qe-signature.esm.js +8 -0
  140. package/dist/recordingService-Ig2UgbLv.esm.js +1003 -0
  141. package/dist/redirect-to-mobile.d.ts +107 -0
  142. package/dist/redirect-to-mobile.esm.js +102 -0
  143. package/dist/redirectToMobileStateMachine-BOEqe46A.esm.js +249 -0
  144. package/dist/runChildModule-CqqwqAkW.esm.js +219 -0
  145. package/dist/selfie.d.ts +26 -0
  146. package/dist/selfie.esm.js +146 -0
  147. package/dist/selfieManager-D0lSgd-J.d.ts +68 -0
  148. package/dist/selfieManager-Duisl7qN.esm.js +60 -0
  149. package/dist/selfieStateMachine-D76whWEf.esm.js +68 -0
  150. package/dist/session-CGtQJJzB.esm.js +3206 -0
  151. package/dist/session.d.ts +217 -0
  152. package/dist/session.esm.js +9 -0
  153. package/dist/setup-C5AITV8m.d.ts +254 -0
  154. package/dist/setup-DsM8IG7k.esm.js +887 -0
  155. package/dist/signature.d.ts +94 -0
  156. package/dist/signature.esm.js +66 -0
  157. package/dist/signatureStateMachine-B5-QVUve.esm.js +132 -0
  158. package/dist/stats-CIfiPzb1.esm.js +16 -0
  159. package/dist/stats.d.ts +16 -0
  160. package/dist/stats.esm.js +4 -0
  161. package/dist/trust-graph.d.ts +54 -0
  162. package/dist/trust-graph.esm.js +56 -0
  163. package/dist/types-B06Ypu2F.d.ts +49 -0
  164. package/dist/types-BP1m8VRw.d.ts +340 -0
  165. package/dist/types-CAD4va6a.d.ts +5 -0
  166. package/dist/types-CFV9G_7j.d.ts +24 -0
  167. package/dist/warmup-CEcppFiS.d.ts +63 -0
  168. package/dist/wasm.d.ts +15 -0
  169. package/dist/wasm.esm.js +12 -0
  170. package/dist/watchlist-for-business.d.ts +79 -0
  171. package/dist/watchlist-for-business.esm.js +148 -0
  172. package/dist/watchlist.d.ts +62 -0
  173. package/dist/watchlist.esm.js +86 -0
  174. package/dist/watchlistServices-DMbUhkBX.esm.js +12 -0
  175. package/dist/workflow.d.ts +907 -0
  176. package/dist/workflow.esm.js +702 -0
  177. package/dist/xstate.esm-B70JrNqo.esm.js +3404 -0
  178. package/package.json +1 -1
@@ -0,0 +1,430 @@
1
+ import { t as BrowserTimerProvider } from "./BrowserTimerProvider-DhNc_x02.esm.js";
2
+ import { t as api } from "./api-CESGtpbH.esm.js";
3
+ import { t as endpoints } from "./endpoints-CnN3SyDa.esm.js";
4
+ import { i as fromCallback } from "./xstate.esm-B70JrNqo.esm.js";
5
+
6
+ //#region src/shared/usStates.ts
7
+ const usStates = {
8
+ AL: {
9
+ code: "AL",
10
+ name: "Alabama"
11
+ },
12
+ AK: {
13
+ code: "AK",
14
+ name: "Alaska"
15
+ },
16
+ AZ: {
17
+ code: "AZ",
18
+ name: "Arizona"
19
+ },
20
+ AR: {
21
+ code: "AR",
22
+ name: "Arkansas"
23
+ },
24
+ CA: {
25
+ code: "CA",
26
+ name: "California"
27
+ },
28
+ CO: {
29
+ code: "CO",
30
+ name: "Colorado"
31
+ },
32
+ CT: {
33
+ code: "CT",
34
+ name: "Connecticut"
35
+ },
36
+ DE: {
37
+ code: "DE",
38
+ name: "Delaware"
39
+ },
40
+ FL: {
41
+ code: "FL",
42
+ name: "Florida"
43
+ },
44
+ GA: {
45
+ code: "GA",
46
+ name: "Georgia"
47
+ },
48
+ HI: {
49
+ code: "HI",
50
+ name: "Hawaii"
51
+ },
52
+ ID: {
53
+ code: "ID",
54
+ name: "Idaho"
55
+ },
56
+ IL: {
57
+ code: "IL",
58
+ name: "Illinois"
59
+ },
60
+ IN: {
61
+ code: "IN",
62
+ name: "Indiana"
63
+ },
64
+ IA: {
65
+ code: "IA",
66
+ name: "Iowa"
67
+ },
68
+ KS: {
69
+ code: "KS",
70
+ name: "Kansas"
71
+ },
72
+ KY: {
73
+ code: "KY",
74
+ name: "Kentucky"
75
+ },
76
+ LA: {
77
+ code: "LA",
78
+ name: "Louisiana"
79
+ },
80
+ ME: {
81
+ code: "ME",
82
+ name: "Maine"
83
+ },
84
+ MD: {
85
+ code: "MD",
86
+ name: "Maryland"
87
+ },
88
+ MA: {
89
+ code: "MA",
90
+ name: "Massachusetts"
91
+ },
92
+ MI: {
93
+ code: "MI",
94
+ name: "Michigan"
95
+ },
96
+ MN: {
97
+ code: "MN",
98
+ name: "Minnesota"
99
+ },
100
+ MS: {
101
+ code: "MS",
102
+ name: "Mississippi"
103
+ },
104
+ MO: {
105
+ code: "MO",
106
+ name: "Missouri"
107
+ },
108
+ MT: {
109
+ code: "MT",
110
+ name: "Montana"
111
+ },
112
+ NE: {
113
+ code: "NE",
114
+ name: "Nebraska"
115
+ },
116
+ NV: {
117
+ code: "NV",
118
+ name: "Nevada"
119
+ },
120
+ NH: {
121
+ code: "NH",
122
+ name: "New Hampshire"
123
+ },
124
+ NJ: {
125
+ code: "NJ",
126
+ name: "New Jersey"
127
+ },
128
+ NM: {
129
+ code: "NM",
130
+ name: "New Mexico"
131
+ },
132
+ NY: {
133
+ code: "NY",
134
+ name: "New York"
135
+ },
136
+ NC: {
137
+ code: "NC",
138
+ name: "North Carolina"
139
+ },
140
+ ND: {
141
+ code: "ND",
142
+ name: "North Dakota"
143
+ },
144
+ OH: {
145
+ code: "OH",
146
+ name: "Ohio"
147
+ },
148
+ OK: {
149
+ code: "OK",
150
+ name: "Oklahoma"
151
+ },
152
+ OR: {
153
+ code: "OR",
154
+ name: "Oregon"
155
+ },
156
+ PA: {
157
+ code: "PA",
158
+ name: "Pennsylvania"
159
+ },
160
+ RI: {
161
+ code: "RI",
162
+ name: "Rhode Island"
163
+ },
164
+ SC: {
165
+ code: "SC",
166
+ name: "South Carolina"
167
+ },
168
+ SD: {
169
+ code: "SD",
170
+ name: "South Dakota"
171
+ },
172
+ TN: {
173
+ code: "TN",
174
+ name: "Tennessee"
175
+ },
176
+ TX: {
177
+ code: "TX",
178
+ name: "Texas"
179
+ },
180
+ UT: {
181
+ code: "UT",
182
+ name: "Utah"
183
+ },
184
+ VT: {
185
+ code: "VT",
186
+ name: "Vermont"
187
+ },
188
+ VA: {
189
+ code: "VA",
190
+ name: "Virginia"
191
+ },
192
+ WA: {
193
+ code: "WA",
194
+ name: "Washington"
195
+ },
196
+ WV: {
197
+ code: "WV",
198
+ name: "West Virginia"
199
+ },
200
+ WI: {
201
+ code: "WI",
202
+ name: "Wisconsin"
203
+ },
204
+ WY: {
205
+ code: "WY",
206
+ name: "Wyoming"
207
+ }
208
+ };
209
+ const usStateOptions = Object.values(usStates).map((state) => ({
210
+ value: state.code,
211
+ label: state.name
212
+ }));
213
+
214
+ //#endregion
215
+ //#region src/shared/postalCode.ts
216
+ const DEFAULT_POSTAL_CODE_MAX_LENGTH = 8;
217
+ const POSTAL_CODE_MAX_LENGTH_BY_COUNTRY = {
218
+ US: 10,
219
+ BR: 9,
220
+ GB: 8,
221
+ UK: 8,
222
+ AR: 8,
223
+ CA: 7,
224
+ IL: 7,
225
+ CN: 6,
226
+ NG: 6,
227
+ DE: 5,
228
+ ES: 5,
229
+ FR: 5,
230
+ IT: 5,
231
+ KE: 5,
232
+ MX: 5
233
+ };
234
+ const POSTAL_CODE_FORMAT_ERROR_KEYS = new Set([
235
+ "verification.errors.zipCodeInvalidFormat",
236
+ "verification.errors.postalCodeInvalidFormat",
237
+ "verification.errors.invalidPostalCodeFixedLength",
238
+ "verification.errors.CAPostalCodeInvalidFormat",
239
+ "verification.errors.UKPostalCodeInvalidFormat",
240
+ "verification.errors.ARPostalCodeInvalidFormat"
241
+ ]);
242
+ const FIXED_LENGTH_KEY = "verification.errors.invalidPostalCodeFixedLength";
243
+ const FIXED_DIGIT_POSTAL_CODE_LENGTH = {
244
+ DE: 5,
245
+ ES: 5,
246
+ FR: 5,
247
+ IT: 5,
248
+ KE: 5,
249
+ MX: 5,
250
+ CN: 6,
251
+ NG: 6,
252
+ IL: 7
253
+ };
254
+ function getPostalCodeMaxLength(country) {
255
+ return POSTAL_CODE_MAX_LENGTH_BY_COUNTRY[country] ?? DEFAULT_POSTAL_CODE_MAX_LENGTH;
256
+ }
257
+ function getPostalCodeErrorKey(country) {
258
+ if (country in FIXED_DIGIT_POSTAL_CODE_LENGTH) return FIXED_LENGTH_KEY;
259
+ if (country === "CA") return "verification.errors.CAPostalCodeInvalidFormat";
260
+ if (country === "AR") return "verification.errors.ARPostalCodeInvalidFormat";
261
+ if (country === "GB" || country === "UK") return "verification.errors.UKPostalCodeInvalidFormat";
262
+ if (country === "US") return "verification.errors.zipCodeInvalidFormat";
263
+ return "verification.errors.postalCodeInvalidFormat";
264
+ }
265
+ const US_POSTAL_CODE_REGEX = /^(?:\d{5}|\d{9}|\d{5}-\d{4})$/;
266
+ const BR_POSTAL_CODE_REGEX = /^(?:\d{5}|\d{8}|\d{5}-\d{3})$/;
267
+ const CA_POSTAL_CODE_REGEX = /^[A-Za-z]\d[A-Za-z] \d[A-Za-z]\d$/;
268
+ const UK_POSTAL_CODE_REGEX = /^(?:[A-Z]{2}\d|[A-Z]{2}\d{2}|[A-Z]\d|[A-Z]\d{2}|[A-Z]\d[A-Z]|[A-Z]{2}\d[A-Z]) \d[A-Z]{2}$/;
269
+ const AR_POSTAL_CODE_REGEX = /^[A-Za-z]\d{4}[A-Za-z]{3}$/;
270
+ const FIVE_DIGIT_REGEX = /^\d{5}$/;
271
+ const SIX_DIGIT_REGEX = /^\d{6}$/;
272
+ const IL_POSTAL_CODE_REGEX = /^\d{7}$/;
273
+ /**
274
+ * Validates a postal code by country.
275
+ * Covers all countries used by eKYC and eKYB.
276
+ */
277
+ function validatePostalCode(postalCode, country) {
278
+ if (!postalCode) return false;
279
+ switch (country) {
280
+ case "US": return US_POSTAL_CODE_REGEX.test(postalCode);
281
+ case "BR": return BR_POSTAL_CODE_REGEX.test(postalCode);
282
+ case "CA": return CA_POSTAL_CODE_REGEX.test(postalCode);
283
+ case "GB":
284
+ case "UK": return UK_POSTAL_CODE_REGEX.test(postalCode.toUpperCase());
285
+ case "AR": return AR_POSTAL_CODE_REGEX.test(postalCode.replace(/\s/g, "").toUpperCase());
286
+ case "IL": return IL_POSTAL_CODE_REGEX.test(postalCode);
287
+ case "CN":
288
+ case "NG": return SIX_DIGIT_REGEX.test(postalCode);
289
+ case "DE":
290
+ case "FR":
291
+ case "IT":
292
+ case "ES":
293
+ case "MX":
294
+ case "KE": return FIVE_DIGIT_REGEX.test(postalCode);
295
+ case "CM": return postalCode.length > 0;
296
+ default: {
297
+ const stripped = postalCode.replace(/\D/g, "");
298
+ return /^\d+$/.test(stripped) && [5, DEFAULT_POSTAL_CODE_MAX_LENGTH].includes(stripped.length);
299
+ }
300
+ }
301
+ }
302
+ /**
303
+ * Progressively formats postal code input by country.
304
+ * Covers all countries used by eKYC and eKYB.
305
+ */
306
+ function formatPostalCode(value, country) {
307
+ if (country === "US" || country === "BR") {
308
+ const maxDigits = country === "US" ? 9 : 8;
309
+ const hasDash = value.includes("-");
310
+ const digits = value.replace(/\D/g, "").slice(0, maxDigits);
311
+ if (digits.length <= 5) {
312
+ if (hasDash && digits.length === 5) return `${digits}-`;
313
+ return digits;
314
+ }
315
+ if (hasDash) return `${digits.slice(0, 5)}-${digits.slice(5)}`;
316
+ return digits;
317
+ }
318
+ if (country === "ES") return value.replace(/\D/g, "").slice(0, 5);
319
+ if (country === "CA") {
320
+ const normalized = value.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 6);
321
+ if (normalized.length <= 3) return normalized;
322
+ return `${normalized.slice(0, 3)} ${normalized.slice(3)}`;
323
+ }
324
+ if (country === "GB" || country === "UK") {
325
+ const normalized = value.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 7);
326
+ if (normalized.length <= 3) return normalized;
327
+ return `${normalized.slice(0, -3)} ${normalized.slice(-3)}`;
328
+ }
329
+ if (country === "AR") return value.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 8);
330
+ if (country === "IL") return value.replace(/\D/g, "").slice(0, 7);
331
+ if (country === "CN" || country === "NG") return value.replace(/\D/g, "").slice(0, 6);
332
+ if (country === "DE" || country === "FR" || country === "IT" || country === "MX" || country === "KE") return value.replace(/\D/g, "").slice(0, 5);
333
+ return value.slice(0, DEFAULT_POSTAL_CODE_MAX_LENGTH);
334
+ }
335
+
336
+ //#endregion
337
+ //#region src/shared/displayErrors.ts
338
+ const DYNAMIC_REQUIRED_KEY = "verification.errors.fieldRequiredDynamic";
339
+
340
+ //#endregion
341
+ //#region src/shared/addressSuggestion.ts
342
+ /**
343
+ * Fills form values from an address autocomplete suggestion.
344
+ * Shared between eKYC and eKYB address forms.
345
+ */
346
+ function fillFromSuggestion(values, touched, suggestion, activeFields) {
347
+ const newValues = { ...values };
348
+ const newTouched = { ...touched };
349
+ const hasHouseNoField = !activeFields || activeFields.has("houseNo");
350
+ const streetValue = buildStreetValue(suggestion.street, suggestion.houseNumber, hasHouseNoField);
351
+ if (streetValue) {
352
+ newValues.street = streetValue;
353
+ newTouched.street = true;
354
+ }
355
+ if (suggestion.city) {
356
+ newValues.city = suggestion.city;
357
+ newTouched.city = true;
358
+ }
359
+ if (suggestion.stateCode) {
360
+ newValues.state = suggestion.stateCode;
361
+ newTouched.state = true;
362
+ }
363
+ if (suggestion.postalCode) {
364
+ newValues.postalCode = suggestion.postalCode;
365
+ newTouched.postalCode = true;
366
+ }
367
+ if (suggestion.houseNumber && hasHouseNoField) {
368
+ newValues.houseNo = suggestion.houseNumber;
369
+ newTouched.houseNo = true;
370
+ }
371
+ return {
372
+ values: newValues,
373
+ touched: newTouched
374
+ };
375
+ }
376
+ function buildStreetValue(street, houseNumber, hasHouseNoField) {
377
+ if (hasHouseNoField) return street ?? "";
378
+ if (houseNumber && street) return `${houseNumber} ${street}`;
379
+ return houseNumber ?? street ?? "";
380
+ }
381
+
382
+ //#endregion
383
+ //#region src/shared/addressSearch.ts
384
+ /** Searches for address suggestions via the address autocomplete API. */
385
+ async function searchAddress(query, signal) {
386
+ const res = await api.post(endpoints.addressAutocomplete, { search: query }, { signal });
387
+ if (!res.ok) throw new Error(`POST ${endpoints.addressAutocomplete} failed: ${res.status} ${res.statusText}`);
388
+ return { apiResponse: { items: (res.data.apiResponse?.items ?? []).map((item, i) => {
389
+ const addr = item.address ?? item;
390
+ return {
391
+ id: item.id ?? i,
392
+ label: addr.label ?? item.title ?? "",
393
+ street: addr.street,
394
+ city: addr.city,
395
+ stateCode: addr.stateCode ?? addr.state,
396
+ postalCode: addr.postalCode,
397
+ houseNumber: addr.houseNumber,
398
+ countryCode: addr.countryCode
399
+ };
400
+ }) } };
401
+ }
402
+ const DEBOUNCE_MS = 300;
403
+ /**
404
+ * XState callback actor that debounces address search requests.
405
+ * Cancels in-flight HTTP requests when the actor is stopped.
406
+ */
407
+ const debounceSearchActor = fromCallback(({ input, sendBack }) => {
408
+ const timerProvider = BrowserTimerProvider.getInstance();
409
+ const controller = new AbortController();
410
+ const handle = timerProvider.setTimeout(async () => {
411
+ try {
412
+ sendBack({
413
+ type: "RESULTS",
414
+ suggestions: (await searchAddress(input.query, controller.signal)).apiResponse?.items ?? []
415
+ });
416
+ } catch {
417
+ if (!controller.signal.aborted) sendBack({
418
+ type: "RESULTS",
419
+ suggestions: []
420
+ });
421
+ }
422
+ }, DEBOUNCE_MS);
423
+ return () => {
424
+ timerProvider.clearTimeout(handle);
425
+ controller.abort();
426
+ };
427
+ });
428
+
429
+ //#endregion
430
+ export { POSTAL_CODE_FORMAT_ERROR_KEYS as a, getPostalCodeMaxLength as c, FIXED_DIGIT_POSTAL_CODE_LENGTH as i, validatePostalCode as l, fillFromSuggestion as n, formatPostalCode as o, DYNAMIC_REQUIRED_KEY as r, getPostalCodeErrorKey as s, debounceSearchActor as t, usStateOptions as u };
@@ -0,0 +1,12 @@
1
+ import { t as createElectronicSignatureManager } from "./electronicSignatureManager-D9OHzTpG.esm.js";
2
+
3
+ //#region src/modules/ae-signature/index.ts
4
+ function createAeSignatureManager(options) {
5
+ return createElectronicSignatureManager({ config: {
6
+ ...options.config,
7
+ variant: "ae"
8
+ } });
9
+ }
10
+
11
+ //#endregion
12
+ export { createAeSignatureManager as t };
@@ -0,0 +1,25 @@
1
+ import { t as Manager } from "./Manager-C8PrhBOx.js";
2
+ import "./Actor-CI32dTbG.js";
3
+ import { a as AE_CONSENT_KEYS, c as ConsentKey, g as getDefaultConsentChecks, i as electronicSignatureMachine, l as ElectronicSignatureConfig, m as areAllConsented, n as ElectronicSignatureState, s as ConsentChecks, u as ElectronicSignatureDocument } from "./index-DZoqeAo9.js";
4
+
5
+ //#region src/modules/ae-signature/index.d.ts
6
+
7
+ type AeSignatureConfig = Omit<ElectronicSignatureConfig, 'variant'>;
8
+ declare function createAeSignatureManager(options: {
9
+ config: AeSignatureConfig;
10
+ }): Manager<ElectronicSignatureState> & {
11
+ load(): void;
12
+ setConsent(name: ConsentKey, checked: boolean): void;
13
+ selectFile(fileName: string, fileData: ArrayBuffer, fileUrl: string): void;
14
+ replaceFile(): void;
15
+ confirmFile(): void;
16
+ viewDocument(url: string): void;
17
+ closeDocumentView(): void;
18
+ sign(): void;
19
+ finish(): void;
20
+ retry(): void;
21
+ close(): void;
22
+ };
23
+ type AeSignatureManager = ReturnType<typeof createAeSignatureManager>;
24
+ //#endregion
25
+ export { AE_CONSENT_KEYS, AeSignatureConfig, type ElectronicSignatureDocument as AeSignatureDocument, AeSignatureManager, type ElectronicSignatureState as AeSignatureState, type ConsentChecks, electronicSignatureMachine as aeSignatureMachine, areAllConsented, createAeSignatureManager, getDefaultConsentChecks };
@@ -0,0 +1,8 @@
1
+ import "./api-CESGtpbH.esm.js";
2
+ import "./events-D6-e4vok.esm.js";
3
+ import "./endpoints-CnN3SyDa.esm.js";
4
+ import "./xstate.esm-B70JrNqo.esm.js";
5
+ import { a as areAllConsented, n as electronicSignatureMachine, r as AE_CONSENT_KEYS, s as getDefaultConsentChecks } from "./electronicSignatureManager-D9OHzTpG.esm.js";
6
+ import { t as createAeSignatureManager } from "./ae-signature-DDDZmWXj.esm.js";
7
+
8
+ export { AE_CONSENT_KEYS, electronicSignatureMachine as aeSignatureMachine, areAllConsented, createAeSignatureManager, getDefaultConsentChecks };
@@ -0,0 +1,57 @@
1
+ import { t as Manager } from "./Manager-C8PrhBOx.js";
2
+
3
+ //#region src/modules/antifraud/antifraudManager.d.ts
4
+ type AntifraudIdleState = {
5
+ status: 'idle';
6
+ };
7
+ type AntifraudProcessingState = {
8
+ status: 'processing';
9
+ };
10
+ type AntifraudFinishedState = {
11
+ status: 'finished';
12
+ };
13
+ /**
14
+ * Union of all possible antifraud manager states.
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * const state = antifraudManager.getState();
19
+ * if (state.status === 'finished') {
20
+ * console.log('Antifraud check complete');
21
+ * }
22
+ * ```
23
+ */
24
+ type AntifraudState = AntifraudIdleState | AntifraudProcessingState | AntifraudFinishedState;
25
+ /**
26
+ * Creates an antifraud manager for headless or UI-driven usage.
27
+ *
28
+ * @example Headless usage
29
+ * ```typescript
30
+ * const manager = createAntifraudManager();
31
+ * manager.subscribe((state) => console.log(state.status));
32
+ * manager.load();
33
+ * ```
34
+ */
35
+ declare function createAntifraudManager(): Manager<AntifraudState> & {
36
+ /**
37
+ * Kicks off the antifraud process.
38
+ * Transitions from 'idle' to 'processing'.
39
+ */
40
+ load(): void;
41
+ };
42
+ type AntifraudManager = ReturnType<typeof createAntifraudManager>;
43
+ //#endregion
44
+ //#region src/modules/antifraud/antifraudStateMachine.d.ts
45
+ declare const antifraudMachine: any;
46
+ //#endregion
47
+ //#region src/modules/antifraud/types.d.ts
48
+ /**
49
+ * Configuration options for the antifraud module.
50
+ *
51
+ * The antifraud module requires no configuration — it is a fire-and-forget
52
+ * process that runs the backend antifraud check and completes regardless of
53
+ * the API outcome.
54
+ */
55
+ type AntifraudConfig = Record<string, never>;
56
+ //#endregion
57
+ export { type AntifraudConfig, type AntifraudManager, type AntifraudState, antifraudMachine, createAntifraudManager };
@@ -0,0 +1,45 @@
1
+ import "./api-CESGtpbH.esm.js";
2
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-D6-e4vok.esm.js";
3
+ import "./endpoints-CnN3SyDa.esm.js";
4
+ import { c as createManager, s as createActor } from "./xstate.esm-B70JrNqo.esm.js";
5
+ import { t as antifraudMachine } from "./antifraudStateMachine-O0TMf6yc.esm.js";
6
+
7
+ //#region src/modules/antifraud/antifraudActor.ts
8
+ function createAntifraudActor() {
9
+ return createActor(antifraudMachine).start();
10
+ }
11
+
12
+ //#endregion
13
+ //#region src/modules/antifraud/antifraudManager.ts
14
+ function mapState(snapshot) {
15
+ const typedSnapshot = snapshot;
16
+ if (typedSnapshot.matches("processing")) return { status: "processing" };
17
+ if (typedSnapshot.matches("finished")) return { status: "finished" };
18
+ return { status: "idle" };
19
+ }
20
+ function createApi({ actor }) {
21
+ return { load() {
22
+ actor.send({ type: "LOAD" });
23
+ } };
24
+ }
25
+ /**
26
+ * Creates an antifraud manager for headless or UI-driven usage.
27
+ *
28
+ * @example Headless usage
29
+ * ```typescript
30
+ * const manager = createAntifraudManager();
31
+ * manager.subscribe((state) => console.log(state.status));
32
+ * manager.load();
33
+ * ```
34
+ */
35
+ function createAntifraudManager() {
36
+ return createManager({
37
+ actor: createAntifraudActor(),
38
+ mapState,
39
+ createApi,
40
+ instrumentation: createManagerInstrumentation(eventModuleNames.antifraud)
41
+ });
42
+ }
43
+
44
+ //#endregion
45
+ export { antifraudMachine, createAntifraudManager };
@@ -0,0 +1,39 @@
1
+ import { t as api } from "./api-CESGtpbH.esm.js";
2
+ import { t as endpoints } from "./endpoints-CnN3SyDa.esm.js";
3
+ import { a as fromPromise, t as setup } from "./xstate.esm-B70JrNqo.esm.js";
4
+
5
+ //#region src/modules/antifraud/antifraudServices.ts
6
+ async function processAntifraud(signal) {
7
+ const res = await api.get(endpoints.processAntifraud, { signal });
8
+ if (!res.ok) throw new Error(`GET ${endpoints.processAntifraud} failed: ${res.status} ${res.statusText}`);
9
+ return res.data;
10
+ }
11
+
12
+ //#endregion
13
+ //#region src/modules/antifraud/antifraudStateMachine.ts
14
+ const antifraudMachine = setup({
15
+ types: {
16
+ context: {},
17
+ events: {}
18
+ },
19
+ actors: { processAntifraud: fromPromise(async ({ signal }) => {
20
+ return processAntifraud(signal);
21
+ }) }
22
+ }).createMachine({
23
+ id: "antifraud",
24
+ initial: "idle",
25
+ context: {},
26
+ states: {
27
+ idle: { on: { LOAD: { target: "processing" } } },
28
+ processing: { invoke: {
29
+ id: "processAntifraud",
30
+ src: "processAntifraud",
31
+ onDone: { target: "finished" },
32
+ onError: { target: "finished" }
33
+ } },
34
+ finished: { type: "final" }
35
+ }
36
+ });
37
+
38
+ //#endregion
39
+ export { antifraudMachine as t };
@@ -0,0 +1,53 @@
1
+ //#region src/internal/http/api.ts
2
+ let client = null;
3
+ let currentToken = null;
4
+ function setClient(httpClient) {
5
+ client = httpClient;
6
+ }
7
+ function setToken(token) {
8
+ currentToken = token;
9
+ }
10
+ function getToken() {
11
+ return currentToken;
12
+ }
13
+ function getApi() {
14
+ if (!client) throw new Error("SDK not configured. Call setup({ apiURL: \"...\" }) first.");
15
+ return client;
16
+ }
17
+ function isApiConfigured() {
18
+ return client !== null;
19
+ }
20
+ function resetApi() {
21
+ client = null;
22
+ currentToken = null;
23
+ }
24
+ function addTokenHeader(config) {
25
+ if (!currentToken) return config ?? {};
26
+ return {
27
+ ...config,
28
+ headers: {
29
+ ...config?.headers,
30
+ "X-Incode-Hardware-Id": currentToken
31
+ }
32
+ };
33
+ }
34
+ const api = {
35
+ get(url, config) {
36
+ return getApi().get(url, addTokenHeader(config));
37
+ },
38
+ post(url, data, config) {
39
+ return getApi().post(url, data, addTokenHeader(config));
40
+ },
41
+ put(url, data, config) {
42
+ return getApi().put(url, data, addTokenHeader(config));
43
+ },
44
+ patch(url, data, config) {
45
+ return getApi().patch(url, data, addTokenHeader(config));
46
+ },
47
+ delete(url, config) {
48
+ return getApi().delete(url, addTokenHeader(config));
49
+ }
50
+ };
51
+
52
+ //#endregion
53
+ export { resetApi as a, isApiConfigured as i, getApi as n, setClient as o, getToken as r, setToken as s, api as t };
@@ -0,0 +1,12 @@
1
+ import "./warmup-CEcppFiS.js";
2
+ import "./Manager-C8PrhBOx.js";
3
+ import "./Actor-CI32dTbG.js";
4
+ import "./StateMachine-BCQrZJhf.js";
5
+ import { D as authenticationMachine, S as AuthenticationConfig, b as CreateAuthenticationActorOptions, x as createAuthenticationActor, y as AuthenticationActor } from "./faceCaptureManagerFactory-yqtpxjnN.js";
6
+ import "./camera-DBSxa6ML.js";
7
+ import "./types-CFV9G_7j.js";
8
+ import "./types-BP1m8VRw.js";
9
+ import "./deepsightService-CEVxzehb.js";
10
+ import "./types-CAD4va6a.js";
11
+ import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager-C83GNIhl.js";
12
+ export { type AuthenticationActor, type AuthenticationConfig, type AuthenticationManager, type AuthenticationState, type CreateAuthenticationActorOptions, authenticationMachine, createAuthenticationActor, createAuthenticationManager };