@incodetech/core 2.0.0-rc.0 → 2.0.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/package.json +3 -3
  2. package/dist/Actor-CI32dTbG.d.ts +0 -2
  3. package/dist/BaseWasmProvider-C_DLEI40.esm.js +0 -1118
  4. package/dist/BrowserStorageProvider-CuOW1Er2.esm.js +0 -55
  5. package/dist/BrowserTimerProvider-DhNc_x02.esm.js +0 -22
  6. package/dist/ITimerCapability-C67ZRskg.esm.js +0 -7
  7. package/dist/IpifyProvider-D7jx52AL.esm.js +0 -139
  8. package/dist/Manager-C8PrhBOx.d.ts +0 -19
  9. package/dist/MotionSensorProvider-4v7xkqAp.esm.js +0 -254
  10. package/dist/OpenViduRecordingProvider-CMu6XVdc.esm.js +0 -87
  11. package/dist/StateMachine-BCQrZJhf.d.ts +0 -2
  12. package/dist/WasmUtilProvider-j98OJf-S.esm.js +0 -114
  13. package/dist/addressSearch-BpTbTWCa.esm.js +0 -430
  14. package/dist/ae-signature-DDDZmWXj.esm.js +0 -12
  15. package/dist/ae-signature.d.ts +0 -25
  16. package/dist/ae-signature.esm.js +0 -8
  17. package/dist/antifraud.d.ts +0 -57
  18. package/dist/antifraud.esm.js +0 -45
  19. package/dist/antifraudStateMachine-O0TMf6yc.esm.js +0 -39
  20. package/dist/api-CESGtpbH.esm.js +0 -53
  21. package/dist/authentication.d.ts +0 -12
  22. package/dist/authentication.esm.js +0 -25
  23. package/dist/authenticationManager-5M-fKzXx.esm.js +0 -67
  24. package/dist/authenticationManager-C83GNIhl.d.ts +0 -66
  25. package/dist/authenticationStateMachine-BMZqatiF.esm.js +0 -139
  26. package/dist/backCameraStream-DMdMeGk2.esm.js +0 -346
  27. package/dist/browserSimulation-gxD8cSpM.esm.js +0 -20
  28. package/dist/camera-DBSxa6ML.d.ts +0 -4
  29. package/dist/camera-PA2Ljri3.esm.js +0 -22
  30. package/dist/camera.d.ts +0 -15
  31. package/dist/camera.esm.js +0 -5
  32. package/dist/chunk-CRF6K_H_.esm.js +0 -49
  33. package/dist/consent.d.ts +0 -398
  34. package/dist/consent.esm.js +0 -79
  35. package/dist/consentStateMachine-CCT-B60O.esm.js +0 -151
  36. package/dist/cpf-PPz2Njto.esm.js +0 -38
  37. package/dist/cpf-ocr.d.ts +0 -204
  38. package/dist/cpf-ocr.esm.js +0 -177
  39. package/dist/cross-document-data-match.d.ts +0 -34
  40. package/dist/cross-document-data-match.esm.js +0 -71
  41. package/dist/curp-validation.d.ts +0 -188
  42. package/dist/curp-validation.esm.js +0 -110
  43. package/dist/curpValidationStateMachine-CitWLr2c.esm.js +0 -595
  44. package/dist/custom-fields.d.ts +0 -115
  45. package/dist/custom-fields.esm.js +0 -177
  46. package/dist/custom-watchlist.d.ts +0 -66
  47. package/dist/custom-watchlist.esm.js +0 -86
  48. package/dist/dateUtils-UoN5xswP.esm.js +0 -23
  49. package/dist/deepsightLoader-Cm4JIT_z.esm.js +0 -52
  50. package/dist/deepsightService-CEVxzehb.d.ts +0 -412
  51. package/dist/deepsightService-O74l4Y__.esm.js +0 -489
  52. package/dist/device.d.ts +0 -46
  53. package/dist/device.esm.js +0 -106
  54. package/dist/displayErrors-DqJ_IbsG.d.ts +0 -39
  55. package/dist/document-capture.d.ts +0 -906
  56. package/dist/document-capture.esm.js +0 -156
  57. package/dist/document-upload.d.ts +0 -331
  58. package/dist/document-upload.esm.js +0 -203
  59. package/dist/documentCaptureStateMachine-BqzTDy9k.esm.js +0 -394
  60. package/dist/dynamic-forms.d.ts +0 -178
  61. package/dist/dynamic-forms.esm.js +0 -323
  62. package/dist/ekyb.d.ts +0 -148
  63. package/dist/ekyb.esm.js +0 -127
  64. package/dist/ekybStateMachine-B59rQjgj.esm.js +0 -674
  65. package/dist/ekyc.d.ts +0 -164
  66. package/dist/ekyc.esm.js +0 -104
  67. package/dist/ekycStateMachine-oeO0Iekd.esm.js +0 -10626
  68. package/dist/electronic-signature.d.ts +0 -4
  69. package/dist/electronic-signature.esm.js +0 -7
  70. package/dist/electronicSignatureManager-D9OHzTpG.esm.js +0 -428
  71. package/dist/email.d.ts +0 -4
  72. package/dist/email.esm.js +0 -9
  73. package/dist/emailManager-DIfnS5g1.d.ts +0 -352
  74. package/dist/emailManager-wAV0LE-H.esm.js +0 -238
  75. package/dist/emailStateMachine-DOf4j58N.esm.js +0 -292
  76. package/dist/endpoints-CnN3SyDa.esm.js +0 -87
  77. package/dist/events-D6-e4vok.esm.js +0 -596
  78. package/dist/events.d.ts +0 -265
  79. package/dist/events.esm.js +0 -4
  80. package/dist/extensibility.d.ts +0 -122
  81. package/dist/extensibility.esm.js +0 -43
  82. package/dist/face-match.d.ts +0 -228
  83. package/dist/face-match.esm.js +0 -173
  84. package/dist/faceCaptureManagerFactory-Dh2PdGlF.esm.js +0 -290
  85. package/dist/faceCaptureManagerFactory-yqtpxjnN.d.ts +0 -690
  86. package/dist/faceCaptureSetup-B3faSpYA.esm.js +0 -873
  87. package/dist/faceMatchStateMachine-DNFrxTFS.esm.js +0 -127
  88. package/dist/flow-events.d.ts +0 -6
  89. package/dist/flow-events.esm.js +0 -0
  90. package/dist/flow.d.ts +0 -358
  91. package/dist/flow.esm.js +0 -825
  92. package/dist/flowCompletionService-DhkT4SRY.d.ts +0 -10
  93. package/dist/flowCompletionService-P54yzGvA.esm.js +0 -13
  94. package/dist/flowServices-DTsm-Vf1.esm.js +0 -188
  95. package/dist/geolocation.d.ts +0 -127
  96. package/dist/geolocation.esm.js +0 -89
  97. package/dist/geolocationStateMachine-asasuHY2.esm.js +0 -105
  98. package/dist/getBrowser-BSXUTWXw.esm.js +0 -41
  99. package/dist/getDeviceClass-BSntT9_j.esm.js +0 -14
  100. package/dist/government-validation.d.ts +0 -67
  101. package/dist/government-validation.esm.js +0 -81
  102. package/dist/governmentValidationStateMachine-BDDYrJTo.esm.js +0 -271
  103. package/dist/home.d.ts +0 -99
  104. package/dist/home.esm.js +0 -61
  105. package/dist/http.d.ts +0 -68
  106. package/dist/http.esm.js +0 -3
  107. package/dist/id-ocr.d.ts +0 -635
  108. package/dist/id-ocr.esm.js +0 -86
  109. package/dist/id-verification.d.ts +0 -190
  110. package/dist/id-verification.esm.js +0 -43
  111. package/dist/id.d.ts +0 -24
  112. package/dist/id.esm.js +0 -164
  113. package/dist/idCaptureManager-B9TGA5dq.d.ts +0 -956
  114. package/dist/idCaptureManager-DMK0GIt3.esm.js +0 -581
  115. package/dist/idCaptureStateMachine-Bq0fVZXl.esm.js +0 -2954
  116. package/dist/idOcrStateMachine-YbjjC_Gg.esm.js +0 -388
  117. package/dist/idVerificationStateMachine-xbw9HP1Z.esm.js +0 -71
  118. package/dist/identity-reuse.d.ts +0 -530
  119. package/dist/identity-reuse.esm.js +0 -274
  120. package/dist/index-BLKtMA0g.d.ts +0 -1177
  121. package/dist/index-BcRG8rtJ.d.ts +0 -97
  122. package/dist/index.d.ts +0 -3
  123. package/dist/index.esm.js +0 -12
  124. package/dist/invokeOnCaptureCallback-rc6kBHo5.esm.js +0 -30
  125. package/dist/lib-BB0B_qQX.esm.js +0 -12499
  126. package/dist/mandatory-consent.d.ts +0 -412
  127. package/dist/mandatory-consent.esm.js +0 -78
  128. package/dist/mandatoryConsentStateMachine-Cnco1jvn.esm.js +0 -126
  129. package/dist/openviduLazy-Cm0XFh_v.esm.js +0 -3
  130. package/dist/openviduLazy-Cok70ZSg.esm.js +0 -12
  131. package/dist/permissionServices-D_i6nzEw.esm.js +0 -50
  132. package/dist/phone.d.ts +0 -4
  133. package/dist/phone.esm.js +0 -9
  134. package/dist/phoneManager-B6M30hKE.d.ts +0 -397
  135. package/dist/phoneManager-DAJbGhlY.esm.js +0 -256
  136. package/dist/phoneStateMachine-CuPARRaT.esm.js +0 -351
  137. package/dist/platform-CfrjKhmi.esm.js +0 -83
  138. package/dist/qe-signature-DFo_Cc-I.esm.js +0 -12
  139. package/dist/qe-signature.d.ts +0 -25
  140. package/dist/qe-signature.esm.js +0 -8
  141. package/dist/recordingService-Ig2UgbLv.esm.js +0 -1003
  142. package/dist/redirect-to-mobile.d.ts +0 -107
  143. package/dist/redirect-to-mobile.esm.js +0 -102
  144. package/dist/redirectToMobileStateMachine-BOEqe46A.esm.js +0 -249
  145. package/dist/runChildModule-CqqwqAkW.esm.js +0 -219
  146. package/dist/selfie.d.ts +0 -26
  147. package/dist/selfie.esm.js +0 -146
  148. package/dist/selfieManager-D0lSgd-J.d.ts +0 -68
  149. package/dist/selfieManager-Duisl7qN.esm.js +0 -60
  150. package/dist/selfieStateMachine-D76whWEf.esm.js +0 -68
  151. package/dist/session-BS-d_vuE.esm.js +0 -3206
  152. package/dist/session.d.ts +0 -217
  153. package/dist/session.esm.js +0 -9
  154. package/dist/setup-Buy-hyj4.esm.js +0 -887
  155. package/dist/setup-C5AITV8m.d.ts +0 -254
  156. package/dist/signature.d.ts +0 -94
  157. package/dist/signature.esm.js +0 -66
  158. package/dist/signatureStateMachine-B5-QVUve.esm.js +0 -132
  159. package/dist/stats-CIfiPzb1.esm.js +0 -16
  160. package/dist/stats.d.ts +0 -16
  161. package/dist/stats.esm.js +0 -4
  162. package/dist/trust-graph.d.ts +0 -54
  163. package/dist/trust-graph.esm.js +0 -56
  164. package/dist/types-B06Ypu2F.d.ts +0 -49
  165. package/dist/types-BP1m8VRw.d.ts +0 -340
  166. package/dist/types-CAD4va6a.d.ts +0 -5
  167. package/dist/types-CFV9G_7j.d.ts +0 -24
  168. package/dist/warmup-CEcppFiS.d.ts +0 -63
  169. package/dist/wasm.d.ts +0 -15
  170. package/dist/wasm.esm.js +0 -12
  171. package/dist/watchlist-for-business.d.ts +0 -79
  172. package/dist/watchlist-for-business.esm.js +0 -148
  173. package/dist/watchlist.d.ts +0 -62
  174. package/dist/watchlist.esm.js +0 -86
  175. package/dist/watchlistServices-DMbUhkBX.esm.js +0 -12
  176. package/dist/workflow.d.ts +0 -907
  177. package/dist/workflow.esm.js +0 -702
  178. package/dist/xstate.esm-B70JrNqo.esm.js +0 -3404
@@ -1,430 +0,0 @@
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 };
@@ -1,12 +0,0 @@
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 };
@@ -1,25 +0,0 @@
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-BLKtMA0g.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 };
@@ -1,8 +0,0 @@
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 };
@@ -1,57 +0,0 @@
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 };
@@ -1,45 +0,0 @@
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 };
@@ -1,39 +0,0 @@
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 };
@@ -1,53 +0,0 @@
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 };
@@ -1,12 +0,0 @@
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 };