@incodetech/core 0.0.0-dev-20260716-2b4f5edb → 0.0.0-dev-20260717-87fac45b

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 (53) hide show
  1. package/dist/BrowserLazyImportProvider-BhoA957O.esm.js +114 -0
  2. package/dist/IFeatureManagementCapability-ErPJywQ_.d.ts +1121 -0
  3. package/dist/authentication.esm.js +2 -2
  4. package/dist/{authenticationManager-BVMQTy2C.esm.js → authenticationManager-DK8fsUqL.esm.js} +2 -2
  5. package/dist/{authenticationStateMachine-DvFeGMIc.esm.js → authenticationStateMachine-BlT8fkR6.esm.js} +2 -2
  6. package/dist/consent.d.ts +1 -1
  7. package/dist/{consentManager-2h_w6wFc.d.ts → consentManager-CsyToF8t.d.ts} +5 -5
  8. package/dist/{deepsightLoader-BGu6zfoZ.esm.js → deepsightLoader-C7HOhX6C.esm.js} +1 -1
  9. package/dist/document-capture.d.ts +1 -1
  10. package/dist/document-upload.d.ts +4 -4
  11. package/dist/{documentCaptureManager-Biz_PFqs.d.ts → documentCaptureManager-DBqK5ner.d.ts} +65 -65
  12. package/dist/ekyb.esm.js +2 -2
  13. package/dist/{ekybManager--3WIEWS5.esm.js → ekybManager-BMjf8ZNw.esm.js} +1 -1
  14. package/dist/{ekybStateMachine-B870YzwX.esm.js → ekybStateMachine-DfpEPLzD.esm.js} +1 -1
  15. package/dist/extensibility.d.ts +4 -4
  16. package/dist/extensibility.esm.js +6 -6
  17. package/dist/{faceCaptureManagerFactory-CDpqsxiU.esm.js → faceCaptureManagerFactory-BFv1KlL_.esm.js} +1 -1
  18. package/dist/{faceCaptureSetup-BXueiZo8.esm.js → faceCaptureSetup-Bxo1VNVw.esm.js} +2 -2
  19. package/dist/feature-management-Dw96qEMs.esm.js +468 -0
  20. package/dist/feature-management.d.ts +80 -0
  21. package/dist/feature-management.esm.js +2 -0
  22. package/dist/flow.esm.js +1 -1
  23. package/dist/{flowServices-DL7qnTQR.esm.js → flowServices-ymcivfU0.esm.js} +5 -3
  24. package/dist/id.esm.js +2 -2
  25. package/dist/{idCaptureManager-BoLeZff7.esm.js → idCaptureManager-BBfWW9Y0.esm.js} +1 -1
  26. package/dist/{idCaptureStateMachine-D2H3vwwf.esm.js → idCaptureStateMachine-_1pROAbA.esm.js} +5 -5
  27. package/dist/identity-reuse.d.ts +1 -1
  28. package/dist/{identityReuseManager-aTyLyYrr.d.ts → identityReuseManager-D6pD4hcZ.d.ts} +1 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.esm.js +1 -1
  31. package/dist/mandatory-consent.d.ts +1 -1
  32. package/dist/{mandatoryConsentManager-B2gRcE_x.d.ts → mandatoryConsentManager-BR8SLvd1.d.ts} +5 -5
  33. package/dist/{onDeviceFaceResults-4ODIm8fO.esm.js → onDeviceFaceResults-B3oTx-NK.esm.js} +1 -1
  34. package/dist/personhood.esm.js +2 -2
  35. package/dist/{recordingService-CkLJ00Pw.esm.js → recordingService-Comyo6yK.esm.js} +1 -1
  36. package/dist/selfie.esm.js +4 -4
  37. package/dist/{selfieManager-C_ynxeGZ.esm.js → selfieManager-CCR6VpoQ.esm.js} +2 -2
  38. package/dist/{selfieStateMachine-CFqYKJFF.esm.js → selfieStateMachine-D30gwMGq.esm.js} +2 -2
  39. package/dist/session-B9KT6qnE.esm.js +1 -0
  40. package/dist/session.esm.js +2 -2
  41. package/dist/{sessionInitializer-B6n-FYf7.esm.js → sessionInitializer-CrzyJ4Y0.esm.js} +4 -2
  42. package/dist/{setup-CgBvqGWw.d.ts → setup-BBfVpTog.d.ts} +115 -0
  43. package/dist/{setup-CeQfb7bE.esm.js → setup-CBijDJ0d.esm.js} +20 -2
  44. package/dist/src-0Jurt29N.esm.js +4482 -0
  45. package/dist/{tri-N-xlKhZK.esm.js → tri-4RsGrIt6.esm.js} +1 -113
  46. package/dist/tri.esm.js +1 -1
  47. package/dist/video-selfie.esm.js +2 -2
  48. package/dist/wasm.d.ts +1 -1
  49. package/dist/wasm.esm.js +1 -1
  50. package/dist/workflow.d.ts +4 -4
  51. package/dist/workflow.esm.js +7 -5
  52. package/package.json +8 -3
  53. package/dist/session-CThOl8m5.esm.js +0 -1
@@ -0,0 +1,114 @@
1
+ import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
2
+ //#region ../infra/src/providers/browser/BrowserLazyImportProvider.ts
3
+ /**
4
+ * Per-module {@link LazyImport} handle.
5
+ *
6
+ * Encapsulates the caching, deduplication, and optional-timeout logic for a
7
+ * single lazily-imported module:
8
+ * - Caches the resolved module (via a dedicated `loaded` flag, so a module
9
+ * that legitimately resolves `undefined` is still cached) and returns it
10
+ * immediately on subsequent calls.
11
+ * - Deduplicates concurrent `load()` calls behind a single in-flight promise.
12
+ * - Optionally races the dynamic import against a configurable timeout (ms).
13
+ * - On timeout or import error: emits a `console.warn`, clears the in-flight
14
+ * promise so the next `load()` call retries, and resolves `undefined`.
15
+ *
16
+ * An attempt-generation token (`attempt`) guards against a stale import
17
+ * mutating state after it has been superseded: when a load times out (or the
18
+ * handle is `reset()`), the token is bumped so the still-pending import can no
19
+ * longer write to `cachedValue` / `loaded`.
20
+ */
21
+ var LazyImportHandle = class {
22
+ constructor(_loader, _options, _timer) {
23
+ this._loader = _loader;
24
+ this._options = _options;
25
+ this._timer = _timer;
26
+ this._loaded = false;
27
+ this._attempt = 0;
28
+ }
29
+ get() {
30
+ return this._cachedValue;
31
+ }
32
+ load() {
33
+ if (this._loaded) return Promise.resolve(this._cachedValue);
34
+ if (!this._inFlight) this._inFlight = this.startLoad();
35
+ return this._inFlight;
36
+ }
37
+ reset() {
38
+ this._cachedValue = void 0;
39
+ this._loaded = false;
40
+ this._inFlight = void 0;
41
+ this._attempt++;
42
+ }
43
+ startLoad() {
44
+ const attempt = ++this._attempt;
45
+ const { timeoutMs } = this._options;
46
+ let loaderResult;
47
+ try {
48
+ loaderResult = this._loader();
49
+ } catch (err) {
50
+ loaderResult = Promise.reject(err);
51
+ }
52
+ const loadPromise = loaderResult.then((value) => {
53
+ if (attempt === this._attempt) {
54
+ this._cachedValue = value;
55
+ this._loaded = true;
56
+ }
57
+ return value;
58
+ }, (err) => {
59
+ if (attempt === this._attempt) {
60
+ this.warnFailure(err);
61
+ this._inFlight = void 0;
62
+ }
63
+ });
64
+ if (timeoutMs === void 0) return loadPromise;
65
+ let timeoutHandle;
66
+ const timeoutPromise = new Promise((resolve) => {
67
+ timeoutHandle = this._timer.setTimeout(() => {
68
+ if (attempt === this._attempt) {
69
+ this.warnTimeout(timeoutMs);
70
+ this._inFlight = void 0;
71
+ this._attempt++;
72
+ }
73
+ resolve(void 0);
74
+ }, timeoutMs);
75
+ });
76
+ return Promise.race([loadPromise, timeoutPromise]).finally(() => {
77
+ if (timeoutHandle !== void 0) this._timer.clearTimeout(timeoutHandle);
78
+ });
79
+ }
80
+ warnFailure(err) {
81
+ const { label, moduleName } = this._options;
82
+ console.warn(`[${label}] Failed to load ${moduleName}; ${this.fallback()}`, err);
83
+ }
84
+ warnTimeout(timeoutMs) {
85
+ const { label, moduleName } = this._options;
86
+ console.warn(`[${label}] ${moduleName} failed to load within ${timeoutMs / 1e3}s; ${this.fallback()}`);
87
+ }
88
+ fallback() {
89
+ return this._options.disabledMessage ?? "module will be unavailable.";
90
+ }
91
+ };
92
+ /**
93
+ * Concrete implementation of {@link ILazyImportCapability}.
94
+ *
95
+ * `create()` returns a per-module {@link LazyImportHandle}. The
96
+ * {@link ITimerCapability} is injected so tests can replace the real
97
+ * `setTimeout`/`clearTimeout` with a controllable fake.
98
+ */
99
+ var BrowserLazyImportProvider = class BrowserLazyImportProvider {
100
+ constructor(timer) {
101
+ this._timer = timer ?? BrowserTimerProvider.getInstance();
102
+ }
103
+ static getInstance() {
104
+ return this._instance ??= new BrowserLazyImportProvider();
105
+ }
106
+ static resetInstance() {
107
+ this._instance = void 0;
108
+ }
109
+ create(loader, options) {
110
+ return new LazyImportHandle(loader, options, this._timer);
111
+ }
112
+ };
113
+ //#endregion
114
+ export { BrowserLazyImportProvider as t };