@incodetech/core 0.0.0-dev-20260407-2c382da → 0.0.0-dev-20260407-ebd92aa

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 (114) hide show
  1. package/dist/{BaseWasmProvider--AzPfwOm.esm.js → BaseWasmProvider-CQgeReKV.esm.js} +1 -785
  2. package/dist/MotionSensorProvider-BTDLt08l.esm.js +254 -0
  3. package/dist/OpenViduRecordingProvider-PvkEhhDq.esm.js +87 -0
  4. package/dist/StateMachine-DU1S4Cik.d.ts +2 -0
  5. package/dist/{WasmUtilProvider-BonqBWdj.esm.js → WasmUtilProvider-C45HStLj.esm.js} +1 -1
  6. package/dist/{addressSearch-B8Fo4v9V.esm.js → addressSearch-C5qzDvkN.esm.js} +4 -4
  7. package/dist/antifraud.d.ts +1 -1
  8. package/dist/antifraud.esm.js +3 -3
  9. package/dist/authentication.d.ts +11 -9
  10. package/dist/authentication.esm.js +18 -13
  11. package/dist/{authenticationManager-Bd10YGSO.d.ts → authenticationManager-CXTPgE_2.d.ts} +2 -2
  12. package/dist/{authenticationManager-B4gSCgrO.esm.js → authenticationManager-D4esVx-z.esm.js} +7 -6
  13. package/dist/{backCameraStream-DF_d7hTz.esm.js → backCameraStream-CUo1USCT.esm.js} +2 -2
  14. package/dist/camera.d.ts +16 -0
  15. package/dist/camera.esm.js +5 -0
  16. package/dist/consent.d.ts +52 -52
  17. package/dist/consent.esm.js +3 -3
  18. package/dist/curp-validation.d.ts +5 -5
  19. package/dist/curp-validation.esm.js +3 -3
  20. package/dist/{deepsightLoader-DKgEdLIS.esm.js → deepsightLoader-Bs5jHgca.esm.js} +10 -7
  21. package/dist/deepsightService-C3gQ_9Ml.esm.js +493 -0
  22. package/dist/{deepsightService-Ciu0atv5.d.ts → deepsightService-CyEcAH-I.d.ts} +193 -197
  23. package/dist/device.d.ts +46 -0
  24. package/dist/device.esm.js +106 -0
  25. package/dist/document-capture.d.ts +3 -3
  26. package/dist/document-capture.esm.js +6 -6
  27. package/dist/document-upload.d.ts +4 -4
  28. package/dist/document-upload.esm.js +6 -6
  29. package/dist/ekyb.d.ts +3 -3
  30. package/dist/ekyb.esm.js +9 -9
  31. package/dist/ekyc.d.ts +3 -3
  32. package/dist/ekyc.esm.js +5 -5
  33. package/dist/email.d.ts +3 -3
  34. package/dist/email.esm.js +5 -5
  35. package/dist/{emailManager-CpAwvP3v.esm.js → emailManager-CZ2IGW0g.esm.js} +4 -4
  36. package/dist/{emailManager-BQPIJR_O.d.ts → emailManager-CtA6Tvry.d.ts} +2 -2
  37. package/dist/events-BlVGS-8F.esm.js +472 -0
  38. package/dist/events.d.ts +232 -0
  39. package/dist/events.esm.js +4 -0
  40. package/dist/extensibility.d.ts +15 -13
  41. package/dist/extensibility.esm.js +25 -20
  42. package/dist/face-match.d.ts +1 -1
  43. package/dist/face-match.esm.js +3 -3
  44. package/dist/{faceCaptureManagerFactory-CdwpYykv.d.ts → faceCaptureManagerFactory-Bp_mC9b2.d.ts} +8 -6
  45. package/dist/faceCaptureSetup-DzlTPjT9.esm.js +828 -0
  46. package/dist/flow.d.ts +17 -9
  47. package/dist/flow.esm.js +68 -21
  48. package/dist/{flowCompletionService-TnWijsSw.esm.js → flowCompletionService-N6-xypy-.esm.js} +2 -2
  49. package/dist/{flowServices-CO2sIR3D.esm.js → flowServices-xgqnJ64L.esm.js} +3 -3
  50. package/dist/geolocation.d.ts +2 -2
  51. package/dist/geolocation.esm.js +4 -4
  52. package/dist/getBrowser-B800KRAi.esm.js +41 -0
  53. package/dist/getDeviceClass-BKd2FOAf.esm.js +14 -0
  54. package/dist/government-validation.d.ts +2 -2
  55. package/dist/government-validation.esm.js +4 -4
  56. package/dist/http.d.ts +57 -0
  57. package/dist/http.esm.js +3 -0
  58. package/dist/id.d.ts +11 -10
  59. package/dist/id.esm.js +20 -16
  60. package/dist/{idCaptureManager-IdqsAASp.d.ts → idCaptureManager-Bx298yFC.d.ts} +9 -7
  61. package/dist/{idCaptureManager-DaLU1ug7.esm.js → idCaptureManager-bowLKHEs.esm.js} +75 -58
  62. package/dist/index.d.ts +3 -611
  63. package/dist/index.esm.js +10 -562
  64. package/dist/{lib-i-4qLKdG.esm.js → lib-Cq5Wc-Hd.esm.js} +1 -1
  65. package/dist/mandatory-consent.d.ts +55 -55
  66. package/dist/mandatory-consent.esm.js +3 -3
  67. package/dist/openviduLazy-BdsxPGgp.esm.js +12 -0
  68. package/dist/openviduLazy-NTgGtkeK.esm.js +3 -0
  69. package/dist/permissionServices-CDqkkway.esm.js +50 -0
  70. package/dist/phone.d.ts +3 -3
  71. package/dist/phone.esm.js +5 -5
  72. package/dist/{phoneManager-BAPHSXx8.esm.js → phoneManager-CscgaER2.esm.js} +4 -4
  73. package/dist/{phoneManager-DA8WUJtl.d.ts → phoneManager-DlaiZtwZ.d.ts} +2 -2
  74. package/dist/recordingService-BDx_6XR9.esm.js +1024 -0
  75. package/dist/redirect-to-mobile.d.ts +2 -2
  76. package/dist/redirect-to-mobile.esm.js +4 -4
  77. package/dist/selfie.d.ts +11 -9
  78. package/dist/selfie.esm.js +18 -13
  79. package/dist/{selfieManager-BSkzncsa.esm.js → selfieManager-DVvvlMMf.esm.js} +5 -4
  80. package/dist/{selfieManager-Dft5wZQ_.d.ts → selfieManager-UBgYgVnw.d.ts} +2 -2
  81. package/dist/{session-OglUYC9l.esm.js → session-PLjFj_T3.esm.js} +5 -19
  82. package/dist/session.d.ts +46 -2
  83. package/dist/session.esm.js +7 -4
  84. package/dist/setup-DfinQjIF.d.ts +120 -0
  85. package/dist/setup-fvDWE7f8.esm.js +450 -0
  86. package/dist/signature.d.ts +2 -2
  87. package/dist/signature.esm.js +3 -3
  88. package/dist/{stats-BVigf5Rn.esm.js → stats-BZ1kFW4p.esm.js} +1 -1
  89. package/dist/stats.esm.js +2 -2
  90. package/dist/{types-CiLyvJGb.d.ts → types-DcqFYowa.d.ts} +1 -1
  91. package/dist/{types-D8Y1faI5.d.ts → types-DufUK-_f.d.ts} +1 -1
  92. package/dist/types-UPqCMQKa.d.ts +5 -0
  93. package/dist/{StateMachine-CM_aOfNL.d.ts → warmup-yzJJKXFi.d.ts} +1 -4
  94. package/dist/wasm.d.ts +15 -0
  95. package/dist/wasm.esm.js +10 -0
  96. package/dist/{Manager-C6AGXEq_.esm.js → xstate.esm-BXrcOcSC.esm.js} +103 -507
  97. package/package.json +18 -2
  98. package/dist/StreamCanvasCapture-DkpkIgyL.esm.js +0 -410
  99. package/dist/endpoints-CI5-28jT.esm.js +0 -69
  100. package/dist/faceCaptureSetup-DbXgtcp7.esm.js +0 -1561
  101. package/dist/id-CzDAG_kM.esm.js +0 -0
  102. package/dist/index-BuVKc9bv.d.ts +0 -1
  103. /package/dist/{Actor-By8WNHi-.d.ts → Actor-Cz_KnN47.d.ts} +0 -0
  104. /package/dist/{BrowserEnvironmentProvider-BECjyw3_.esm.js → BrowserEnvironmentProvider--xQUs3sg.esm.js} +0 -0
  105. /package/dist/{BrowserTimerProvider-CIqH6hJp.esm.js → BrowserTimerProvider-CkHEwJFa.esm.js} +0 -0
  106. /package/dist/{Manager-CCT_-HuZ.d.ts → Manager-N01KfnVA.d.ts} +0 -0
  107. /package/dist/{api-C2uzxrpN.esm.js → api-CyI8qTie.esm.js} +0 -0
  108. /package/dist/{browserSimulation-DYAk0Ipe.esm.js → browserSimulation-yzDdWSBf.esm.js} +0 -0
  109. /package/dist/{camera-6XJdOeBF.d.ts → camera-BcVDCZxW.d.ts} +0 -0
  110. /package/dist/{camera-DAuRUvnp.esm.js → camera-CsT06Zqy.esm.js} +0 -0
  111. /package/dist/{chunk-D6hkk-hd.esm.js → chunk-BcQWkoAq.esm.js} +0 -0
  112. /package/dist/{displayErrors-CGJwvrTl.d.ts → displayErrors-C0mf2glb.d.ts} +0 -0
  113. /package/dist/{flowCompletionService-BOd4Rk8n.d.ts → flowCompletionService-Dloh6J8n.d.ts} +0 -0
  114. /package/dist/{platform-DdhkonXk.esm.js → platform-Dcuv6w60.esm.js} +0 -0
package/dist/flow.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- import { a as WasmPipeline, t as AnyStateMachine } from "./StateMachine-CM_aOfNL.js";
2
- import "./camera-6XJdOeBF.js";
3
- import "./types-CiLyvJGb.js";
4
- import { n as FlowModule, r as FlowModuleConfig, t as Flow } from "./types-D8Y1faI5.js";
5
- import { t as Manager } from "./Manager-CCT_-HuZ.js";
6
- import { n as GetFinishStatusFn, t as FinishStatus } from "./flowCompletionService-BOd4Rk8n.js";
1
+ import { n as WasmPipeline } from "./warmup-yzJJKXFi.js";
2
+ import { t as Manager } from "./Manager-N01KfnVA.js";
3
+ import { t as AnyStateMachine } from "./StateMachine-DU1S4Cik.js";
4
+ import "./camera-BcVDCZxW.js";
5
+ import "./types-DcqFYowa.js";
6
+ import { n as FlowModule, r as FlowModuleConfig, t as Flow } from "./types-DufUK-_f.js";
7
+ import { n as GetFinishStatusFn, t as FinishStatus } from "./flowCompletionService-Dloh6J8n.js";
7
8
 
8
9
  //#region src/modules/flow/flowUtils.d.ts
9
10
 
@@ -181,9 +182,15 @@ type ModuleRegistry = {
181
182
  SELFIE?: AnyStateMachine;
182
183
  [key: string]: AnyStateMachine | undefined;
183
184
  };
185
+ type LazyModuleRegistry = {
186
+ [key: string]: (() => Promise<AnyStateMachine | {
187
+ default: AnyStateMachine;
188
+ }>) | undefined;
189
+ };
184
190
  type OrchestratedFlowInput = {
185
191
  getFlow: GetFlowFn;
186
- modules: ModuleRegistry;
192
+ modules?: ModuleRegistry;
193
+ lazyModules?: LazyModuleRegistry;
187
194
  getFinishStatus?: GetFinishStatusFn;
188
195
  };
189
196
  type OrchestratedFlowEvent = {
@@ -236,7 +243,8 @@ type OrchestratedFlowErrorState = {
236
243
  type OrchestratedFlowState = OrchestratedFlowIdleState | OrchestratedFlowLoadingState | OrchestratedFlowReadyState | OrchestratedFlowFinishedState | OrchestratedFlowErrorState;
237
244
  type CreateOrchestratedFlowActorOptions = {
238
245
  getFlow?: GetFlowFn;
239
- modules: ModuleRegistry;
246
+ modules?: ModuleRegistry;
247
+ lazyModules?: LazyModuleRegistry;
240
248
  getFinishStatus?: OrchestratedFlowInput['getFinishStatus'];
241
249
  };
242
250
  declare function createOrchestratedFlowManager(options: CreateOrchestratedFlowActorOptions): Manager<OrchestratedFlowState> & {
@@ -288,4 +296,4 @@ declare function createOrchestratedFlowManager(options: CreateOrchestratedFlowAc
288
296
  isModuleEnabled: (moduleKey: string) => boolean;
289
297
  };
290
298
  //#endregion
291
- export { type FinishStatus, type Flow, type FlowModule, type FlowModuleConfig, type FlowReadyState, type FlowState, type LazyModule, type ModuleLoader, type ModuleLoaderRegistry, type ModuleRegistry, type OrchestratedFlowFinishedState, type OrchestratedFlowInput, type OrchestratedFlowReadyState, type OrchestratedFlowState, createFlowManager, createModuleLoader, createOrchestratedFlowManager, getRequiredWasmPipelines, normalizeFlowModules };
299
+ export { type FinishStatus, type Flow, type FlowModule, type FlowModuleConfig, type FlowReadyState, type FlowState, type LazyModule, type LazyModuleRegistry, type ModuleLoader, type ModuleLoaderRegistry, type ModuleRegistry, type OrchestratedFlowFinishedState, type OrchestratedFlowInput, type OrchestratedFlowReadyState, type OrchestratedFlowState, createFlowManager, createModuleLoader, createOrchestratedFlowManager, getRequiredWasmPipelines, normalizeFlowModules };
package/dist/flow.esm.js CHANGED
@@ -1,11 +1,11 @@
1
- import "./browserSimulation-DYAk0Ipe.esm.js";
2
- import "./api-C2uzxrpN.esm.js";
3
- import { C as createActor, S as fromPromise, b as assign, s as createManagerInstrumentation, t as createManager, x as fromCallback, y as setup } from "./Manager-C6AGXEq_.esm.js";
4
- import "./endpoints-CI5-28jT.esm.js";
5
- import "./session-OglUYC9l.esm.js";
6
- import "./BrowserEnvironmentProvider-BECjyw3_.esm.js";
7
- import { n as getRequiredWasmPipelines, r as normalizeFlowModules, t as getFlow } from "./flowServices-CO2sIR3D.esm.js";
8
- import { t as getFinishStatus } from "./flowCompletionService-TnWijsSw.esm.js";
1
+ import "./api-CyI8qTie.esm.js";
2
+ import { o as createManagerInstrumentation } from "./events-BlVGS-8F.esm.js";
3
+ import "./session-PLjFj_T3.esm.js";
4
+ import "./BrowserEnvironmentProvider--xQUs3sg.esm.js";
5
+ import "./browserSimulation-yzDdWSBf.esm.js";
6
+ import { a as createActor, i as fromPromise, n as assign, o as createManager, r as fromCallback, t as setup } from "./xstate.esm-BXrcOcSC.esm.js";
7
+ import { n as getRequiredWasmPipelines, r as normalizeFlowModules, t as getFlow } from "./flowServices-xgqnJ64L.esm.js";
8
+ import { t as getFinishStatus } from "./flowCompletionService-N6-xypy-.esm.js";
9
9
 
10
10
  //#region src/modules/flow/flowStateMachine.ts
11
11
  const flowMachine = setup({
@@ -319,6 +319,16 @@ const orchestratedFlowMachine = setup({
319
319
  subscription.unsubscribe();
320
320
  actor.stop();
321
321
  };
322
+ }),
323
+ resolveCurrentModuleMachine: fromPromise(async ({ input }) => {
324
+ if (!input.moduleKey) return;
325
+ const eagerMachine = input.modules[input.moduleKey];
326
+ if (eagerMachine) return eagerMachine;
327
+ const lazyLoader = input.lazyModules[input.moduleKey];
328
+ if (!lazyLoader) return;
329
+ const loaded = await lazyLoader();
330
+ if (loaded && typeof loaded === "object" && "default" in loaded && loaded.default) return loaded.default;
331
+ return loaded;
322
332
  })
323
333
  },
324
334
  actions: {
@@ -331,6 +341,8 @@ const orchestratedFlowMachine = setup({
331
341
  config: void 0,
332
342
  getFlow: context.getFlow,
333
343
  registeredModules: context.registeredModules,
344
+ lazyRegisteredModules: context.lazyRegisteredModules,
345
+ currentModuleMachine: void 0,
334
346
  getFinishStatus: context.getFinishStatus,
335
347
  finishStatus: void 0
336
348
  })),
@@ -347,7 +359,8 @@ const orchestratedFlowMachine = setup({
347
359
  steps: flowModules.map((m) => m.key),
348
360
  currentStepIndex: flowModules.length > 0 ? 0 : -1,
349
361
  currentStep: firstModule?.key,
350
- config
362
+ config,
363
+ currentModuleMachine: void 0
351
364
  };
352
365
  }),
353
366
  setError: assign(({ event }) => ({ error: String(event.error) })),
@@ -361,9 +374,11 @@ const orchestratedFlowMachine = setup({
361
374
  return {
362
375
  currentStepIndex: nextIndex,
363
376
  currentStep: module?.key,
364
- config
377
+ config,
378
+ currentModuleMachine: void 0
365
379
  };
366
380
  }),
381
+ setCurrentModuleMachine: assign(({ event }) => ({ currentModuleMachine: event.output })),
367
382
  setFinishStatus: assign(({ event }) => ({ finishStatus: event.output }))
368
383
  },
369
384
  guards: {
@@ -373,7 +388,11 @@ const orchestratedFlowMachine = setup({
373
388
  if (!("output" in event)) return false;
374
389
  const firstModuleKey = event.output.flowModules?.[0]?.key;
375
390
  if (!firstModuleKey) return false;
376
- return context.registeredModules[firstModuleKey] != null;
391
+ return context.registeredModules[firstModuleKey] != null || context.lazyRegisteredModules[firstModuleKey] != null;
392
+ },
393
+ hasCurrentModuleMachine: ({ event }) => {
394
+ if (!("output" in event)) return false;
395
+ return event.output != null;
377
396
  }
378
397
  }
379
398
  }).createMachine({
@@ -387,7 +406,9 @@ const orchestratedFlowMachine = setup({
387
406
  currentStep: void 0,
388
407
  config: void 0,
389
408
  getFlow: input.getFlow,
390
- registeredModules: input.modules,
409
+ registeredModules: input.modules ?? {},
410
+ lazyRegisteredModules: input.lazyModules ?? {},
411
+ currentModuleMachine: void 0,
391
412
  getFinishStatus: input.getFinishStatus ?? getFinishStatus,
392
413
  finishStatus: void 0
393
414
  }),
@@ -402,7 +423,7 @@ const orchestratedFlowMachine = setup({
402
423
  src: "fetchFlow",
403
424
  input: ({ context }) => ({ getFlow: context.getFlow }),
404
425
  onDone: [{
405
- target: "runningModule",
426
+ target: "resolvingModule",
406
427
  guard: "hasModule",
407
428
  actions: "setFlowData"
408
429
  }, {
@@ -422,6 +443,33 @@ const orchestratedFlowMachine = setup({
422
443
  actions: "resetContext"
423
444
  } }
424
445
  },
446
+ resolvingModule: {
447
+ invoke: {
448
+ id: "resolveCurrentModuleMachine",
449
+ src: "resolveCurrentModuleMachine",
450
+ input: ({ context }) => ({
451
+ moduleKey: context.currentStep,
452
+ modules: context.registeredModules,
453
+ lazyModules: context.lazyRegisteredModules
454
+ }),
455
+ onDone: [{
456
+ target: "runningModule",
457
+ guard: "hasCurrentModuleMachine",
458
+ actions: "setCurrentModuleMachine"
459
+ }, {
460
+ target: "error",
461
+ actions: assign(({ context }) => ({ error: context.currentStep ? `No registered module found for: ${context.currentStep}` : "No registered module found: flow has no modules" }))
462
+ }],
463
+ onError: {
464
+ target: "error",
465
+ actions: "setError"
466
+ }
467
+ },
468
+ on: { RESET: {
469
+ target: "idle",
470
+ actions: "resetContext"
471
+ } }
472
+ },
425
473
  runningModule: {
426
474
  invoke: {
427
475
  id: "currentModule",
@@ -429,7 +477,7 @@ const orchestratedFlowMachine = setup({
429
477
  input: ({ context }) => {
430
478
  if (!context.currentStep) throw new Error("No current step");
431
479
  return {
432
- machine: context.registeredModules[context.currentStep],
480
+ machine: context.currentModuleMachine,
433
481
  config: context.config
434
482
  };
435
483
  },
@@ -437,9 +485,8 @@ const orchestratedFlowMachine = setup({
437
485
  target: "completing",
438
486
  guard: "isLastStep"
439
487
  }, {
440
- target: "runningModule",
441
- actions: "incrementStep",
442
- reenter: true
488
+ target: "resolvingModule",
489
+ actions: "incrementStep"
443
490
  }],
444
491
  onError: {
445
492
  target: "error",
@@ -451,9 +498,8 @@ const orchestratedFlowMachine = setup({
451
498
  target: "completing",
452
499
  guard: "isLastStep"
453
500
  }, {
454
- target: "runningModule",
455
- actions: "incrementStep",
456
- reenter: true
501
+ target: "resolvingModule",
502
+ actions: "incrementStep"
457
503
  }],
458
504
  MODULE_ERROR: {
459
505
  target: "error",
@@ -504,7 +550,7 @@ const orchestratedFlowMachine = setup({
504
550
  function mapState(snapshot) {
505
551
  const { value, context } = snapshot;
506
552
  if (value === "idle") return { status: "idle" };
507
- if (value === "loading" || typeof value === "object") return { status: "loading" };
553
+ if (value === "loading" || value === "resolvingModule" || typeof value === "object") return { status: "loading" };
508
554
  switch (value) {
509
555
  case "runningModule": {
510
556
  const childSnapshot = snapshot.children.currentModule?.getSnapshot();
@@ -589,6 +635,7 @@ function createOrchestratedFlowActor(options) {
589
635
  return createActor(orchestratedFlowMachine, { input: {
590
636
  getFlow: options.getFlow ?? getFlow,
591
637
  modules: options.modules,
638
+ lazyModules: options.lazyModules,
592
639
  getFinishStatus: options.getFinishStatus
593
640
  } }).start();
594
641
  }
@@ -1,5 +1,5 @@
1
- import { t as api } from "./api-C2uzxrpN.esm.js";
2
- import { t as endpoints } from "./endpoints-CI5-28jT.esm.js";
1
+ import { t as api } from "./api-CyI8qTie.esm.js";
2
+ import { _ as endpoints } from "./events-BlVGS-8F.esm.js";
3
3
 
4
4
  //#region src/modules/flow/flowCompletionService.ts
5
5
  const getFinishStatus = async (flowId, signal) => {
@@ -1,6 +1,6 @@
1
- import { t as api } from "./api-C2uzxrpN.esm.js";
2
- import { t as endpoints } from "./endpoints-CI5-28jT.esm.js";
3
- import { i as initializeSession, r as getSessionFingerprintResult } from "./session-OglUYC9l.esm.js";
1
+ import { t as api } from "./api-CyI8qTie.esm.js";
2
+ import { _ as endpoints } from "./events-BlVGS-8F.esm.js";
3
+ import { n as getSessionFingerprintResult, r as initializeSession } from "./session-PLjFj_T3.esm.js";
4
4
 
5
5
  //#region src/modules/flow/flowUtils.ts
6
6
  const WASM_MODULE_PIPELINES = {
@@ -1,5 +1,5 @@
1
- import "./Actor-By8WNHi-.js";
2
- import { t as Manager } from "./Manager-CCT_-HuZ.js";
1
+ import { t as Manager } from "./Manager-N01KfnVA.js";
2
+ import "./Actor-Cz_KnN47.js";
3
3
 
4
4
  //#region ../infra/src/capabilities/IGeolocationCapability.d.ts
5
5
  type GeolocationCoords = {
@@ -1,7 +1,7 @@
1
- import { r as isIOS, t as isAndroid } from "./platform-DdhkonXk.esm.js";
2
- import { t as api } from "./api-C2uzxrpN.esm.js";
3
- import { C as createActor, S as fromPromise, b as assign, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, y as setup } from "./Manager-C6AGXEq_.esm.js";
4
- import { t as endpoints } from "./endpoints-CI5-28jT.esm.js";
1
+ import { t as api } from "./api-CyI8qTie.esm.js";
2
+ import { _ as endpoints, n as eventModuleNames, o as createManagerInstrumentation } from "./events-BlVGS-8F.esm.js";
3
+ import { a as createActor, i as fromPromise, n as assign, o as createManager, t as setup } from "./xstate.esm-BXrcOcSC.esm.js";
4
+ import { r as isIOS, t as isAndroid } from "./platform-Dcuv6w60.esm.js";
5
5
 
6
6
  //#region ../infra/src/providers/browser/BrowserGeolocationProvider.ts
7
7
  var BrowserGeolocationProvider = class {
@@ -0,0 +1,41 @@
1
+ //#region ../infra/src/device/getDeviceClass.ts
2
+ function getDeviceInfo() {
3
+ if (typeof navigator === "undefined") return {
4
+ userAgent: "",
5
+ platform: "",
6
+ maxTouchPoints: 0
7
+ };
8
+ return {
9
+ userAgent: navigator.userAgent,
10
+ platform: navigator.platform,
11
+ maxTouchPoints: navigator.maxTouchPoints
12
+ };
13
+ }
14
+ /**
15
+ * Gets the current window dimensions.
16
+ * Returns default values (1280x720) in non-browser environments.
17
+ */
18
+ function getWindowDimensions(defaultWidth = 1280, defaultHeight = 720) {
19
+ if (typeof window === "undefined") return {
20
+ outerWidth: defaultWidth,
21
+ outerHeight: defaultHeight,
22
+ innerWidth: defaultWidth,
23
+ innerHeight: defaultHeight
24
+ };
25
+ return {
26
+ outerWidth: window.outerWidth,
27
+ outerHeight: window.outerHeight,
28
+ innerWidth: window.innerWidth,
29
+ innerHeight: window.innerHeight
30
+ };
31
+ }
32
+
33
+ //#endregion
34
+ //#region ../infra/src/device/getBrowser.ts
35
+ function getUserAgent() {
36
+ if (typeof navigator === "undefined") return "";
37
+ return navigator.userAgent;
38
+ }
39
+
40
+ //#endregion
41
+ export { getDeviceInfo as n, getWindowDimensions as r, getUserAgent as t };
@@ -0,0 +1,14 @@
1
+ import { n as getDeviceInfo } from "./getBrowser-B800KRAi.esm.js";
2
+
3
+ //#region src/internal/device/getDeviceClass.ts
4
+ function getDeviceClass() {
5
+ const { userAgent, platform, maxTouchPoints } = getDeviceInfo();
6
+ if (!userAgent) return "desktop";
7
+ const ua = userAgent.toLowerCase();
8
+ if (/iphone|ipad|ipod/.test(ua) || platform === "MacIntel" && maxTouchPoints > 1) return "ios";
9
+ if (/android/.test(ua)) return "android";
10
+ return "desktop";
11
+ }
12
+
13
+ //#endregion
14
+ export { getDeviceClass as t };
@@ -1,5 +1,5 @@
1
- import "./Actor-By8WNHi-.js";
2
- import { t as Manager } from "./Manager-CCT_-HuZ.js";
1
+ import { t as Manager } from "./Manager-N01KfnVA.js";
2
+ import "./Actor-Cz_KnN47.js";
3
3
 
4
4
  //#region src/modules/government-validation/types.d.ts
5
5
  type GovernmentValidationConfig = {
@@ -1,7 +1,7 @@
1
- import { t as api } from "./api-C2uzxrpN.esm.js";
2
- import { C as createActor, S as fromPromise, b as assign, s as createManagerInstrumentation, t as createManager, x as fromCallback, y as setup } from "./Manager-C6AGXEq_.esm.js";
3
- import { t as endpoints } from "./endpoints-CI5-28jT.esm.js";
4
- import { t as BrowserTimerProvider } from "./BrowserTimerProvider-CIqH6hJp.esm.js";
1
+ import { t as api } from "./api-CyI8qTie.esm.js";
2
+ import { _ as endpoints, o as createManagerInstrumentation } from "./events-BlVGS-8F.esm.js";
3
+ import { a as createActor, i as fromPromise, n as assign, o as createManager, r as fromCallback, t as setup } from "./xstate.esm-BXrcOcSC.esm.js";
4
+ import { t as BrowserTimerProvider } from "./BrowserTimerProvider-CkHEwJFa.esm.js";
5
5
 
6
6
  //#region src/modules/government-validation/governmentValidationServices.ts
7
7
  async function processGovernmentValidation(signal) {
package/dist/http.d.ts ADDED
@@ -0,0 +1,57 @@
1
+ //#region ../infra/src/http/types.d.ts
2
+
3
+ type RequestConfig = {
4
+ method?: string;
5
+ url: string;
6
+ headers?: Record<string, string>;
7
+ query?: Record<string, string | number | boolean | undefined>;
8
+ params?: Record<string, string | number | boolean | undefined>;
9
+ body?: unknown;
10
+ signal?: AbortSignal;
11
+ timeout?: number;
12
+ parse?: 'json' | 'text' | 'blob' | 'arrayBuffer' | 'response';
13
+ onUploadProgress?: (progress: number) => void;
14
+ };
15
+ type HttpResponse<T = unknown> = {
16
+ ok: boolean;
17
+ status: number;
18
+ statusText: string;
19
+ url: string;
20
+ headers: Record<string, string>;
21
+ data: T;
22
+ };
23
+ type HttpClient = {
24
+ defaults: {
25
+ baseURL: string;
26
+ headers: Record<string, string>;
27
+ };
28
+ request<T = unknown>(config: RequestConfig): Promise<HttpResponse<T>>;
29
+ get<T = unknown>(url: string, config?: Omit<RequestConfig, 'method' | 'url'>): Promise<HttpResponse<T>>;
30
+ post<T = unknown>(url: string, body?: unknown, config?: Omit<RequestConfig, 'method' | 'url' | 'body'>): Promise<HttpResponse<T>>;
31
+ put<T = unknown>(url: string, body?: unknown, config?: Omit<RequestConfig, 'method' | 'url' | 'body'>): Promise<HttpResponse<T>>;
32
+ patch<T = unknown>(url: string, body?: unknown, config?: Omit<RequestConfig, 'method' | 'url' | 'body'>): Promise<HttpResponse<T>>;
33
+ delete<T = unknown>(url: string, config?: Omit<RequestConfig, 'method' | 'url'>): Promise<HttpResponse<T>>;
34
+ head<T = unknown>(url: string, config?: Omit<RequestConfig, 'method' | 'url'>): Promise<HttpResponse<T>>;
35
+ options<T = unknown>(url: string, config?: Omit<RequestConfig, 'method' | 'url'>): Promise<HttpResponse<T>>;
36
+ setHeader(name: string, value: string): void;
37
+ };
38
+ //#endregion
39
+ //#region src/internal/http/api.d.ts
40
+ type MethodConfig = {
41
+ headers?: Record<string, string>;
42
+ signal?: AbortSignal;
43
+ timeout?: number;
44
+ query?: Record<string, string | number | boolean | undefined>;
45
+ onUploadProgress?: (progress: number) => void;
46
+ };
47
+ type ApiClient = {
48
+ get<T>(url: string, config?: MethodConfig): Promise<HttpResponse<T>>;
49
+ post<T>(url: string, data?: unknown, config?: MethodConfig): Promise<HttpResponse<T>>;
50
+ put<T>(url: string, data?: unknown, config?: MethodConfig): Promise<HttpResponse<T>>;
51
+ patch<T>(url: string, data?: unknown, config?: MethodConfig): Promise<HttpResponse<T>>;
52
+ delete<T>(url: string, config?: MethodConfig): Promise<HttpResponse<T>>;
53
+ };
54
+ declare function getApi(): HttpClient;
55
+ declare const api: ApiClient;
56
+ //#endregion
57
+ export { api, getApi };
@@ -0,0 +1,3 @@
1
+ import { n as getApi, t as api } from "./api-CyI8qTie.esm.js";
2
+
3
+ export { api, getApi };
package/dist/id.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- import "./StateMachine-CM_aOfNL.js";
2
- import "./Actor-By8WNHi-.js";
3
- import { c as PermissionResult, l as PermissionStatus } from "./deepsightService-Ciu0atv5.js";
4
- import { A as IdCaptureEvent, B as UploadIdResponse, C as CapturedImage, D as IdCaptureConfig, E as ID_ERROR_CODES, F as IdDocumentType, H as IdCaptureSettings, I as IdError, L as IdErrorCode, M as IdCaptureInput, N as IdCaptureMode, O as IdCaptureContext, P as IdCaptureThresholds, R as IdFlowStep, S as CaptureIdResponse, T as DetectionStatus, V as DetectionOrientation, _ as CreateIdCaptureActorOptions, a as IdCaptureInitResult, b as IdCaptureMachine, c as UploadIdImageParams, d as processId, f as startRecordingSession, g as validateUploadResponse, h as uploadIdImage, j as IdCaptureGeometry, k as IdCaptureDependencies, l as ValidationError, m as stopStream, n as IdCaptureState, o as InitializeIdCaptureParams, p as stopRecording, r as createIdCaptureManager, s as StartRecordingParams, t as IdCaptureManager, u as initializeIdCapture, v as IdCaptureActor, w as DetectionArea, x as idCaptureMachine, y as createIdCaptureActor, z as RecordingSession } from "./idCaptureManager-IdqsAASp.js";
5
- import { t as CameraStream } from "./camera-6XJdOeBF.js";
6
- import "./types-CiLyvJGb.js";
7
- import "./types-D8Y1faI5.js";
8
- import "./Manager-CCT_-HuZ.js";
9
- import "./index-BuVKc9bv.js";
10
- export { CameraStream, CaptureIdResponse, CapturedImage, CreateIdCaptureActorOptions, DetectionArea, DetectionOrientation, DetectionStatus, ID_ERROR_CODES, IdCaptureActor, IdCaptureConfig, IdCaptureContext, IdCaptureDependencies, IdCaptureEvent, IdCaptureGeometry, IdCaptureInitResult, IdCaptureInput, IdCaptureMachine, IdCaptureManager, IdCaptureMode, IdCaptureSettings, IdCaptureState, IdCaptureThresholds, IdDocumentType, IdError, IdErrorCode, IdFlowStep, InitializeIdCaptureParams, PermissionResult, PermissionStatus, RecordingSession, StartRecordingParams, UploadIdImageParams, UploadIdResponse, ValidationError, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
1
+ import "./warmup-yzJJKXFi.js";
2
+ import "./Manager-N01KfnVA.js";
3
+ import "./Actor-Cz_KnN47.js";
4
+ import "./StateMachine-DU1S4Cik.js";
5
+ import { t as CameraStream } from "./camera-BcVDCZxW.js";
6
+ import "./types-DcqFYowa.js";
7
+ import "./types-DufUK-_f.js";
8
+ import "./deepsightService-CyEcAH-I.js";
9
+ import { n as PermissionStatus, t as PermissionResult } from "./types-UPqCMQKa.js";
10
+ import { A as IdCaptureDependencies, B as RecordingSession, C as CaptureIdResponse, D as ID_ERROR_CODES, E as DetectionStatus, F as IdCaptureThresholds, H as DetectionOrientation, I as IdDocumentType, L as IdError, M as IdCaptureGeometry, N as IdCaptureInput, O as IdCaptureConfig, P as IdCaptureMode, R as IdErrorCode, S as idCaptureMachine, T as DetectionArea, U as IdCaptureSettings, V as UploadIdResponse, _ as validateUploadResponse, a as IdCaptureInitResult, b as createIdCaptureActor, c as UploadIdImageParams, d as preloadIdRecordingProvider, f as processId, g as uploadIdImage, h as stopStream, j as IdCaptureEvent, k as IdCaptureContext, l as ValidationError, m as stopRecording, n as IdCaptureState, o as InitializeIdCaptureParams, p as startRecordingSession, r as createIdCaptureManager, s as StartRecordingParams, t as IdCaptureManager, u as initializeIdCapture, v as CreateIdCaptureActorOptions, w as CapturedImage, x as IdCaptureMachine, y as IdCaptureActor, z as IdFlowStep } from "./idCaptureManager-Bx298yFC.js";
11
+ export { CameraStream, CaptureIdResponse, CapturedImage, type CreateIdCaptureActorOptions, DetectionArea, DetectionOrientation, DetectionStatus, ID_ERROR_CODES, type IdCaptureActor, IdCaptureConfig, type IdCaptureContext, IdCaptureDependencies, type IdCaptureEvent, IdCaptureGeometry, IdCaptureInitResult, type IdCaptureInput, type IdCaptureMachine, type IdCaptureManager, IdCaptureMode, IdCaptureSettings, type IdCaptureState, IdCaptureThresholds, IdDocumentType, IdError, IdErrorCode, IdFlowStep, InitializeIdCaptureParams, PermissionResult, PermissionStatus, RecordingSession, StartRecordingParams, UploadIdImageParams, UploadIdResponse, ValidationError, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, preloadIdRecordingProvider, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
package/dist/id.esm.js CHANGED
@@ -1,17 +1,21 @@
1
- import "./platform-DdhkonXk.esm.js";
2
- import "./BaseWasmProvider--AzPfwOm.esm.js";
3
- import "./StreamCanvasCapture-DkpkIgyL.esm.js";
4
- import "./browserSimulation-DYAk0Ipe.esm.js";
5
- import "./api-C2uzxrpN.esm.js";
6
- import "./Manager-C6AGXEq_.esm.js";
7
- import "./endpoints-CI5-28jT.esm.js";
8
- import "./session-OglUYC9l.esm.js";
9
- import "./BrowserEnvironmentProvider-BECjyw3_.esm.js";
10
- import { a as initializeIdCapture, c as stopRecording, d as validateUploadResponse, f as ID_ERROR_CODES, i as idCaptureMachine, l as stopStream, o as processId, r as createIdCaptureActor, s as startRecordingSession, t as createIdCaptureManager, u as uploadIdImage } from "./idCaptureManager-DaLU1ug7.esm.js";
11
- import "./BrowserTimerProvider-CIqH6hJp.esm.js";
12
- import "./camera-DAuRUvnp.esm.js";
13
- import "./stats-BVigf5Rn.esm.js";
14
- import "./backCameraStream-DF_d7hTz.esm.js";
15
- import "./id-CzDAG_kM.esm.js";
1
+ import "./BaseWasmProvider-CQgeReKV.esm.js";
2
+ import "./api-CyI8qTie.esm.js";
3
+ import "./events-BlVGS-8F.esm.js";
4
+ import "./session-PLjFj_T3.esm.js";
5
+ import "./BrowserEnvironmentProvider--xQUs3sg.esm.js";
6
+ import "./browserSimulation-yzDdWSBf.esm.js";
7
+ import "./xstate.esm-BXrcOcSC.esm.js";
8
+ import "./recordingService-BDx_6XR9.esm.js";
9
+ import "./deepsightService-C3gQ_9Ml.esm.js";
10
+ import "./camera-CsT06Zqy.esm.js";
11
+ import "./getBrowser-B800KRAi.esm.js";
12
+ import "./stats-BZ1kFW4p.esm.js";
13
+ import "./MotionSensorProvider-BTDLt08l.esm.js";
14
+ import "./permissionServices-CDqkkway.esm.js";
15
+ import "./platform-Dcuv6w60.esm.js";
16
+ import "./backCameraStream-CUo1USCT.esm.js";
17
+ import "./getDeviceClass-BKd2FOAf.esm.js";
18
+ import "./BrowserTimerProvider-CkHEwJFa.esm.js";
19
+ import { a as initializeIdCapture, c as startRecordingSession, d as uploadIdImage, f as validateUploadResponse, i as idCaptureMachine, l as stopRecording, o as preloadIdRecordingProvider, p as ID_ERROR_CODES, r as createIdCaptureActor, s as processId, t as createIdCaptureManager, u as stopStream } from "./idCaptureManager-bowLKHEs.esm.js";
16
20
 
17
- export { ID_ERROR_CODES, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
21
+ export { ID_ERROR_CODES, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, preloadIdRecordingProvider, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
@@ -1,9 +1,10 @@
1
- import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-CM_aOfNL.js";
2
- import { t as ActorRefFrom } from "./Actor-By8WNHi-.js";
3
- import { a as StreamCanvasCapture, c as PermissionResult, d as RecordingConnection, f as IMLProviderCapability, l as PermissionStatus, m as IncodeCanvas, o as IStorageCapability, p as MLProviderConfig, s as IMotionSensorCapability, t as DeepsightService, u as IRecordingCapability } from "./deepsightService-Ciu0atv5.js";
4
- import { t as CameraStream } from "./camera-6XJdOeBF.js";
5
- import { a as TutorialIdConfig, i as RegulationTypes, t as Flow } from "./types-D8Y1faI5.js";
6
- import { t as Manager } from "./Manager-CCT_-HuZ.js";
1
+ import { t as Manager } from "./Manager-N01KfnVA.js";
2
+ import { t as ActorRefFrom } from "./Actor-Cz_KnN47.js";
3
+ import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-DU1S4Cik.js";
4
+ import { t as CameraStream } from "./camera-BcVDCZxW.js";
5
+ import { a as TutorialIdConfig, i as RegulationTypes, t as Flow } from "./types-DufUK-_f.js";
6
+ import { c as IMLProviderCapability, d as IRecordingCapability, f as RecordingConnection, i as IncodeCanvas, l as MLProviderConfig, n as IMotionSensorCapability, r as StreamCanvasCapture, t as DeepsightService, u as IStorageCapability } from "./deepsightService-CyEcAH-I.js";
7
+ import { n as PermissionStatus, t as PermissionResult } from "./types-UPqCMQKa.js";
7
8
 
8
9
  //#region ../infra/src/capabilities/IIdCaptureCapability.d.ts
9
10
  /**
@@ -513,6 +514,7 @@ type StartRecordingParams = {
513
514
  existing?: RecordingSession;
514
515
  type: 'frontId' | 'backId';
515
516
  };
517
+ declare function preloadIdRecordingProvider(config: IdCaptureConfig): void;
516
518
  declare function startRecordingSession(params: StartRecordingParams): Promise<RecordingSession | undefined>;
517
519
  declare function stopRecording(session: RecordingSession): void;
518
520
  declare function processId(isSecondId?: boolean, queueName?: string, signal?: AbortSignal): Promise<{
@@ -643,4 +645,4 @@ declare function createIdCaptureManagerFromActor(actor: IdCaptureActor): Manager
643
645
  };
644
646
  type IdCaptureManager = ReturnType<typeof createIdCaptureManager>;
645
647
  //#endregion
646
- export { IdCaptureEvent as A, UploadIdResponse as B, CapturedImage as C, IdCaptureConfig as D, ID_ERROR_CODES as E, IdDocumentType as F, IdCaptureSettings as H, IdError as I, IdErrorCode as L, IdCaptureInput as M, IdCaptureMode as N, IdCaptureContext as O, IdCaptureThresholds as P, IdFlowStep as R, CaptureIdResponse as S, DetectionStatus as T, DetectionOrientation as V, CreateIdCaptureActorOptions as _, IdCaptureInitResult as a, IdCaptureMachine as b, UploadIdImageParams as c, processId as d, startRecordingSession as f, validateUploadResponse as g, uploadIdImage as h, createIdCaptureManagerFromActor as i, IdCaptureGeometry as j, IdCaptureDependencies as k, ValidationError as l, stopStream as m, IdCaptureState as n, InitializeIdCaptureParams as o, stopRecording as p, createIdCaptureManager as r, StartRecordingParams as s, IdCaptureManager as t, initializeIdCapture as u, IdCaptureActor as v, DetectionArea as w, idCaptureMachine as x, createIdCaptureActor as y, RecordingSession as z };
648
+ export { IdCaptureDependencies as A, RecordingSession as B, CaptureIdResponse as C, ID_ERROR_CODES as D, DetectionStatus as E, IdCaptureThresholds as F, DetectionOrientation as H, IdDocumentType as I, IdError as L, IdCaptureGeometry as M, IdCaptureInput as N, IdCaptureConfig as O, IdCaptureMode as P, IdErrorCode as R, idCaptureMachine as S, DetectionArea as T, IdCaptureSettings as U, UploadIdResponse as V, validateUploadResponse as _, IdCaptureInitResult as a, createIdCaptureActor as b, UploadIdImageParams as c, preloadIdRecordingProvider as d, processId as f, uploadIdImage as g, stopStream as h, createIdCaptureManagerFromActor as i, IdCaptureEvent as j, IdCaptureContext as k, ValidationError as l, stopRecording as m, IdCaptureState as n, InitializeIdCaptureParams as o, startRecordingSession as p, createIdCaptureManager as r, StartRecordingParams as s, IdCaptureManager as t, initializeIdCapture as u, CreateIdCaptureActorOptions as v, CapturedImage as w, IdCaptureMachine as x, IdCaptureActor as y, IdFlowStep as z };