@incodetech/core 0.0.0-dev-20260826-e81bd6f9 → 0.0.0-dev-20260826-80a51538

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 (93) hide show
  1. package/dist/{BrowserDiagnosticsCryptoProvider-DroaGhav.esm.js → BrowserDiagnosticsCryptoProvider-DfkPafSO.esm.js} +1 -1
  2. package/dist/{BrowserStorageProvider-C8847M9W.esm.js → BrowserStorageProvider-DC___749.esm.js} +1 -1
  3. package/dist/{IWasmUtilCapability-5-Pncgma.d.ts → IWasmUtilCapability-SNPhmIwB.d.ts} +0 -1
  4. package/dist/{MotionSensorProvider-CxTjgXe6.esm.js → MotionSensorProvider-Dq6GJ-ke.esm.js} +1 -1
  5. package/dist/ae-signature.esm.js +1 -1
  6. package/dist/{apiError-BbJ7ewMs.esm.js → apiError-C_90i3vV.esm.js} +1 -1
  7. package/dist/authentication.d.ts +3 -3
  8. package/dist/authentication.esm.js +2 -2
  9. package/dist/{authenticationManager-BXZfUKaI.esm.js → authenticationManager-7ec9wEfD.esm.js} +4 -4
  10. package/dist/{authenticationManager-QbR9ezH3.d.ts → authenticationManager-DFA73BWw.d.ts} +1 -1
  11. package/dist/{authenticationStateMachine-DS9N05Mj.esm.js → authenticationStateMachine-d7NM3jSI.esm.js} +2 -2
  12. package/dist/camera.esm.js +1 -1
  13. package/dist/consent.d.ts +1 -1
  14. package/dist/{consentManager-uhDPdU6i.d.ts → consentManager-DLOyIZzt.d.ts} +1 -1
  15. package/dist/{deepsightLoader-D_pTgevT.esm.js → deepsightLoader-CQ8p6f3n.esm.js} +6 -6
  16. package/dist/{deepsightService-BQO1pV6B.d.ts → deepsightService-MZOpj7Vp.d.ts} +1 -1
  17. package/dist/document-capture.esm.js +2 -2
  18. package/dist/{documentCaptureManager-BbdImodx.esm.js → documentCaptureManager-BsgEpSEe.esm.js} +1 -1
  19. package/dist/{documentCaptureStateMachine-BjBgWp7z.esm.js → documentCaptureStateMachine-BmcBWiUz.esm.js} +2 -2
  20. package/dist/dynamic-forms.esm.js +2 -2
  21. package/dist/{dynamicFormsManager-CBVWDFYZ.esm.js → dynamicFormsManager-BD78xRhz.esm.js} +1 -1
  22. package/dist/{dynamicFormsStateMachine-Cc_mw7BP.esm.js → dynamicFormsStateMachine-CQ8uFClH.esm.js} +1 -1
  23. package/dist/ekyb.esm.js +3 -3
  24. package/dist/{ekybManager-DQy8cwae.esm.js → ekybManager-Ce6FEncZ.esm.js} +1 -1
  25. package/dist/{ekybStateMachine-DvRr4p-k.esm.js → ekybStateMachine-mfXIl5v-.esm.js} +1 -1
  26. package/dist/electronic-signature.esm.js +1 -1
  27. package/dist/{electronicSignatureManager-5cwtDmd5.esm.js → electronicSignatureManager-q0-iMmIE.esm.js} +1 -1
  28. package/dist/extensibility.d.ts +11 -12
  29. package/dist/extensibility.esm.js +12 -12
  30. package/dist/{faceCaptureManagerFactory-ZRoAAJ-9.esm.js → faceCaptureManagerFactory-BQn2gK5B.esm.js} +3 -3
  31. package/dist/{faceCaptureManagerFactory-B0Ce6p_p.d.ts → faceCaptureManagerFactory-D-eOL-h6.d.ts} +4 -4
  32. package/dist/{faceCaptureSetup-CThWhLbH.esm.js → faceCaptureSetup-Civi4sX0.esm.js} +4 -4
  33. package/dist/{feature-management-BdXv1wdg.esm.js → feature-management-VVeaOPVH.esm.js} +1 -1
  34. package/dist/feature-management.esm.js +1 -1
  35. package/dist/flow.d.ts +2 -2
  36. package/dist/flow.esm.js +3 -3
  37. package/dist/{flowCompletionService-8LZdgnFO.esm.js → flowCompletionService-BeGI43Sa.esm.js} +1 -1
  38. package/dist/{flowServices-0Unj1i_g.esm.js → flowServices-B8KjJDqC.esm.js} +4 -4
  39. package/dist/geolocation.esm.js +2 -2
  40. package/dist/{geolocationManager-njjgkoz_.esm.js → geolocationManager-ZACmKzTE.esm.js} +1 -1
  41. package/dist/{geolocationStateMachine-ChxMczVf.esm.js → geolocationStateMachine-MsxfZhyZ.esm.js} +1 -1
  42. package/dist/id-ocr.d.ts +1 -1
  43. package/dist/id-selfie-flow.d.ts +1 -1
  44. package/dist/id-selfie-flow.esm.js +8 -8
  45. package/dist/id.d.ts +2 -2
  46. package/dist/id.esm.js +4 -4
  47. package/dist/idCaptureDefaults-SJH6Td2K.esm.js +276 -0
  48. package/dist/{idCaptureManager-w0XxDand.d.ts → idCaptureManager-C-ef1D5r.d.ts} +2 -2
  49. package/dist/{idCaptureManager-B7Hdyqoc.esm.js → idCaptureManager-kkVWhnDe.esm.js} +5 -5
  50. package/dist/{idCaptureServices-BSZquQ6d.esm.js → idCaptureServices-CLserSrT.esm.js} +5 -5
  51. package/dist/{idCaptureStateMachine-D7ms1UTC.esm.js → idCaptureStateMachine-DtGemWtA.esm.js} +11 -11
  52. package/dist/{idOcrManager-BF_cXZq8.d.ts → idOcrManager-CFlDwUvN.d.ts} +1 -1
  53. package/dist/identity-reuse.d.ts +1 -1
  54. package/dist/{identityReuseManager-v2TH5g7e.d.ts → identityReuseManager-BXEBBI3N.d.ts} +5 -5
  55. package/dist/index.esm.js +1 -1
  56. package/dist/mandatory-consent.d.ts +1 -1
  57. package/dist/{mandatoryConsentManager-BG3ZPM3f.d.ts → mandatoryConsentManager-CohPXtwL.d.ts} +5 -5
  58. package/dist/{onDeviceFaceResults-BxRVRs9-.esm.js → onDeviceFaceResults-B6Gtw21L.esm.js} +75 -12
  59. package/dist/{permissionGuards-DCzi2X20.esm.js → permissionGuards-DKnCqOsF.esm.js} +1 -1
  60. package/dist/{permissionServices-Ct-QgtAi.esm.js → permissionServices-QCFFUVkj.esm.js} +2 -2
  61. package/dist/personhood.d.ts +3 -3
  62. package/dist/personhood.esm.js +6 -6
  63. package/dist/qe-signature.esm.js +1 -1
  64. package/dist/{recordingService-CN3rO3Rl.esm.js → recordingService-DBxMZwD9.esm.js} +1 -1
  65. package/dist/{runChildModule-CWYUt6Eb.esm.js → runChildModule-BVRBfQKD.esm.js} +1 -1
  66. package/dist/{safeStorage-2nOSCCnG.esm.js → safeStorage-7CmStgyt.esm.js} +348 -363
  67. package/dist/{sdkVersion-CBs-fcJT.esm.js → sdkVersion-DayEIYK-.esm.js} +1 -1
  68. package/dist/selfie.d.ts +4 -4
  69. package/dist/selfie.esm.js +6 -6
  70. package/dist/{selfieManager-DeSGiO2o.esm.js → selfieManager-DZcXrdkt.esm.js} +4 -4
  71. package/dist/{selfieManager-BRb_-wHE.d.ts → selfieManager-DpU8kDro.d.ts} +1 -1
  72. package/dist/{selfieStateMachine-q9zW90MX.esm.js → selfieStateMachine-BJiFfV1Q.esm.js} +2 -2
  73. package/dist/{session-nsNphgUa.esm.js → session-Bat4R9kV.esm.js} +4 -4
  74. package/dist/session.esm.js +4 -4
  75. package/dist/{sessionInitializer-bq_60unZ.esm.js → sessionInitializer-DcdeBlD1.esm.js} +4 -4
  76. package/dist/{setup-FUYImQXy.esm.js → setup-P7NmS-XX.esm.js} +8 -8
  77. package/dist/trueSight-CpKAW400.esm.js +1 -0
  78. package/dist/{trueSightService-DA5Bt2s3.esm.js → trueSightService-CYxmF608.esm.js} +3 -3
  79. package/dist/{types-lw5kpZ0i2.d.ts → types-CyoB7Hym2.d.ts} +2 -2
  80. package/dist/{types-BMa0ZqAi.d.ts → types-DQ-TrzPk.d.ts} +1 -1
  81. package/dist/{types-jBSE34JY.d.ts → types-EDqrHgXD.d.ts} +1 -1
  82. package/dist/video-selfie.d.ts +1 -1
  83. package/dist/video-selfie.esm.js +4 -4
  84. package/dist/{videoSelfieCameraWarmer-DlYZA78k.esm.js → videoSelfieCameraWarmer-B6q6lWkk.esm.js} +4 -4
  85. package/dist/{videoSelfieStepDetector-g3PJIqyq.d.ts → videoSelfieStepDetector-DVXE0upL.d.ts} +2 -2
  86. package/dist/wasm.esm.js +4 -4
  87. package/dist/{wasmDefaults-BrwMccqW.esm.js → wasmDefaults-DEOK0oAq.esm.js} +1 -1
  88. package/dist/{wasmDsFlagSync-Dd7Yj25O.esm.js → wasmDsFlagSync-BTc8xI86.esm.js} +2 -2
  89. package/dist/{wasmWebClient-BzFsDjU6.esm.js → wasmWebClient-BJCaFeBL.esm.js} +55 -6
  90. package/dist/workflow.esm.js +16 -16
  91. package/package.json +3 -3
  92. package/dist/idCaptureDefaults-Dowxd3J3.esm.js +0 -226
  93. package/dist/trueSight-Cw9ktWo0.esm.js +0 -1
@@ -1,226 +0,0 @@
1
- import { d as WASM_MODEL_FILES } from "./wasmWebClient-BzFsDjU6.esm.js";
2
- import { i as getBarcodeEnhanceModelUrl } from "./wasmDefaults-BrwMccqW.esm.js";
3
- import { a as getResolvedModelSource, c as mlWasmJSApi_default, i as BaseWasmProvider } from "./safeStorage-2nOSCCnG.esm.js";
4
- import { t as IncodeCanvas } from "./canvas-E1zGkel4.esm.js";
5
- //#region ../infra/src/providers/wasm/IdCaptureProvider.ts
6
- var IdCaptureProvider = class extends BaseWasmProvider {
7
- constructor() {
8
- super(0);
9
- this.lastProcessResult = null;
10
- this.capturedCanvas = null;
11
- this.originalCapturedCanvas = null;
12
- this.lastDecodedBarcode = null;
13
- this.barcodeEnhancementModelLoaded = false;
14
- }
15
- async initialize(config) {
16
- if (config.videoSelfie === true) {
17
- this.pipelineType = 2;
18
- await this.initializeBase(config, "videoSelfieId");
19
- } else await this.initializeBase(config, "idCapture");
20
- }
21
- setCallbacks(callbacks) {
22
- this.ensureInitialized();
23
- const onCaptureWrapper = () => {
24
- callbacks.onCapture?.();
25
- };
26
- mlWasmJSApi_default.setIdCaptureCallbacks(this.getPipelineType(), callbacks.onFarAway ?? (() => {}), callbacks.onDetectionStarted ?? (() => {}), callbacks.onMaskChange ? (show, mask, top, orientation) => callbacks.onMaskChange?.(show, mask, top, orientation) : () => {}, callbacks.onBlur ?? (() => {}), callbacks.onGlare ?? (() => {}), callbacks.onCapturing ?? (() => {}), callbacks.onCapture ? onCaptureWrapper : () => {}, callbacks.onBestFrame ? (blur, glare, orientation) => callbacks.onBestFrame?.(blur, glare, orientation) : () => {}, callbacks.onIdNotDetected ?? (() => {}), callbacks.onSwitchToManualCapture ?? (() => {}), callbacks.onIdTypeChange ? (idType) => callbacks.onIdTypeChange?.(idType) : () => {}, callbacks.onIdSideChange ? (side) => callbacks.onIdSideChange?.(side) : () => {}, callbacks.onCapturingCounterValueChange ? (value) => callbacks.onCapturingCounterValueChange?.(value) : () => {});
27
- if (callbacks.onBarcodeDecoded) {
28
- const onBarcodeDecoded = callbacks.onBarcodeDecoded;
29
- mlWasmJSApi_default.setIdBarcodeDecodedCallback(this.getPipelineType(), (decoded) => {
30
- this.lastDecodedBarcode = decoded;
31
- onBarcodeDecoded(decoded);
32
- });
33
- } else mlWasmJSApi_default.setIdBarcodeDecodedCallback(this.getPipelineType(), () => {});
34
- }
35
- setThresholds(thresholds) {
36
- this.ensureInitialized();
37
- mlWasmJSApi_default.setIdCaptureThresholds(this.getPipelineType(), thresholds.blurThreshold, thresholds.blurChangeThreshold, thresholds.glareThreshold, thresholds.clsThreshold, thresholds.sideThreshold, thresholds.iouThreshold, thresholds.idDetectedTimeout, thresholds.autocaptureTimeout, thresholds.framesAggregationInterval);
38
- }
39
- setGeometry(geometry) {
40
- this.ensureInitialized();
41
- mlWasmJSApi_default.setIdCaptureGeometryParams(this.getPipelineType(), geometry.areaDown, geometry.areaUp, geometry.areaIOSPassportUp, geometry.areaIOSPassportDown, geometry.widthIOSUp, geometry.widthIOSDown, geometry.widthDown, geometry.widthUp, geometry.windowOuterWidth, geometry.windowOuterHeight, geometry.windowInnerWidth, geometry.windowInnerHeight);
42
- }
43
- setSettings(settings) {
44
- this.ensureInitialized();
45
- mlWasmJSApi_default.setIdCaptureConfigParams(this.getPipelineType(), settings.isFixedMask, settings.isIPhone14OrHigher, settings.idType, settings.blurCheckEnabled, settings.glareCheckEnabled, settings.faceQualityCheckEnabled, settings.iouCheckEnabled, settings.fpsLimitEnabled);
46
- }
47
- setModelType(modelType) {
48
- this.ensureInitialized();
49
- let wasmModelType;
50
- switch (modelType) {
51
- case "v1":
52
- wasmModelType = 0;
53
- break;
54
- case "v2":
55
- wasmModelType = 1;
56
- break;
57
- case "v3":
58
- wasmModelType = 2;
59
- break;
60
- default: throw new Error(`Unknown model type: ${modelType}`);
61
- }
62
- mlWasmJSApi_default.setIdCaptureModelType(this.getPipelineType(), wasmModelType);
63
- }
64
- setBarcodeCaptureEnabled(enabled) {
65
- this.ensureInitialized();
66
- mlWasmJSApi_default.setIdBarcodeCaptureEnabled(this.getPipelineType(), enabled);
67
- }
68
- setBarcodeAutoCaptureOnDecode(enabled) {
69
- this.ensureInitialized();
70
- mlWasmJSApi_default.setIdBarcodeAutoCaptureOnDecode(this.getPipelineType(), enabled);
71
- }
72
- async setBarcodeEnhancementModel() {
73
- this.ensureInitialized();
74
- if (this.barcodeEnhancementModelLoaded) return true;
75
- const modelUrl = getResolvedModelSource(WASM_MODEL_FILES.barcode, "idCapture") ?? getBarcodeEnhanceModelUrl();
76
- const applied = await mlWasmJSApi_default.setIdBarcodeEnhancementModel(this.getPipelineType(), modelUrl);
77
- this.barcodeEnhancementModelLoaded = applied;
78
- return applied;
79
- }
80
- getLastDecodedBarcode() {
81
- return this.lastDecodedBarcode;
82
- }
83
- /**
84
- * Processes a frame through the WASM pipeline and stores the result.
85
- */
86
- async processFrame(image) {
87
- const result = await this.processFrameWasm(image);
88
- const pipelineType = this.getPipelineType();
89
- if (result && (pipelineType === 0 || pipelineType === 2)) this.lastProcessResult = result;
90
- else this.lastProcessResult = null;
91
- }
92
- /**
93
- * Gets the last process result from the most recent frame processing.
94
- * @returns The last process result with quad coordinates, or null if not available
95
- */
96
- getLastProcessResult() {
97
- return this.lastProcessResult;
98
- }
99
- transformPerspective(canvas, frameRect) {
100
- this.ensureInitialized();
101
- const originalWidth = canvas.width();
102
- const originalHeight = canvas.height();
103
- try {
104
- const imageData = canvas.getImageData();
105
- if (!imageData) return canvas;
106
- const transformedCanvas = mlWasmJSApi_default.IdPerspectiveTransform(imageData, frameRect);
107
- if (transformedCanvas) {
108
- const wrappedCanvas = new IncodeCanvas(transformedCanvas);
109
- const wrappedWidth = wrappedCanvas.width();
110
- const wrappedHeight = wrappedCanvas.height();
111
- if (wrappedWidth === originalWidth && wrappedHeight === originalHeight) {
112
- const croppedCanvas = this.cropCanvasToRect(wrappedCanvas, {
113
- x: Math.round(frameRect.x),
114
- y: Math.round(frameRect.y),
115
- w: Math.round(frameRect.w),
116
- h: Math.round(frameRect.h)
117
- });
118
- if (croppedCanvas) return croppedCanvas;
119
- }
120
- return wrappedCanvas;
121
- }
122
- return canvas;
123
- } catch (_error) {
124
- return canvas;
125
- }
126
- }
127
- /**
128
- * Crops a canvas to the specified rectangle region.
129
- * @param canvas - The canvas to crop
130
- * @param rect - The rectangle to crop to (x, y, w, h)
131
- * @returns A new IncodeCanvas with the cropped region, or null if cropping fails
132
- */
133
- cropCanvasToRect(canvas, rect) {
134
- const canvasWidth = canvas.width();
135
- const canvasHeight = canvas.height();
136
- if (!canvasWidth || !canvasHeight) return null;
137
- const x = Math.max(0, Math.min(rect.x, canvasWidth));
138
- const y = Math.max(0, Math.min(rect.y, canvasHeight));
139
- const w = Math.max(1, Math.min(rect.w, canvasWidth - x));
140
- const h = Math.max(1, Math.min(rect.h, canvasHeight - y));
141
- const croppedCanvasElement = document.createElement("canvas");
142
- croppedCanvasElement.width = w;
143
- croppedCanvasElement.height = h;
144
- const ctx = croppedCanvasElement.getContext("2d");
145
- if (!ctx) return null;
146
- ctx.drawImage(canvas.canvas, x, y, w, h, 0, 0, w, h);
147
- return new IncodeCanvas(croppedCanvasElement);
148
- }
149
- /**
150
- * Gets the captured canvas (transformed for preview).
151
- * @returns The captured canvas, or null if not available
152
- */
153
- getCapturedCanvas() {
154
- return this.capturedCanvas;
155
- }
156
- /**
157
- * Gets the original captured canvas (full frame for upload).
158
- * @returns The original captured canvas, or null if not available
159
- */
160
- getOriginalCapturedCanvas() {
161
- return this.originalCapturedCanvas;
162
- }
163
- /**
164
- * Sets the captured canvases (original and transformed).
165
- * @param original - The original full-frame canvas (for upload)
166
- * @param transformed - The transformed canvas (for preview)
167
- */
168
- setCapturedCanvases(original, transformed) {
169
- this.originalCapturedCanvas = original;
170
- this.capturedCanvas = transformed;
171
- }
172
- /**
173
- * Re-arms WASM detection without discarding the captured result.
174
- *
175
- * Detection-session teardown runs immediately after a successful capture.
176
- * The captured canvases must remain available for the subsequent upload and
177
- * are only replaced by `setCapturedCanvases()` or cleared by a full reset.
178
- */
179
- resetDetectionState() {
180
- super.reset();
181
- this.lastProcessResult = null;
182
- this.lastDecodedBarcode = null;
183
- }
184
- reset() {
185
- this.resetDetectionState();
186
- this.capturedCanvas = null;
187
- this.originalCapturedCanvas = null;
188
- }
189
- async dispose() {
190
- await super.dispose();
191
- this.barcodeEnhancementModelLoaded = false;
192
- }
193
- };
194
- //#endregion
195
- //#region ../infra/src/wasm/idCaptureDefaults.ts
196
- /**
197
- * Default WASM thresholds for ID capture quality checks.
198
- * Based on legacy pipelinesConfig.ts values.
199
- */
200
- const DEFAULT_ID_CAPTURE_THRESHOLDS = {
201
- blurThreshold: .2,
202
- blurChangeThreshold: .2,
203
- glareThreshold: .3,
204
- clsThreshold: .98,
205
- sideThreshold: .8,
206
- iouThreshold: .8,
207
- idDetectedTimeout: 1e4,
208
- autocaptureTimeout: 5e3,
209
- framesAggregationInterval: 3e3
210
- };
211
- /**
212
- * Default geometry parameters for ID detection.
213
- * Window dimensions must be provided at runtime.
214
- */
215
- const DEFAULT_ID_CAPTURE_GEOMETRY = {
216
- areaDown: 25e3,
217
- areaUp: 55e3,
218
- areaIOSPassportUp: 3e4,
219
- areaIOSPassportDown: 2e4,
220
- widthIOSUp: 160,
221
- widthIOSDown: 85,
222
- widthDown: 110,
223
- widthUp: 205
224
- };
225
- //#endregion
226
- export { DEFAULT_ID_CAPTURE_THRESHOLDS as n, IdCaptureProvider as r, DEFAULT_ID_CAPTURE_GEOMETRY as t };
@@ -1 +0,0 @@
1
- import "./trueSightService-DA5Bt2s3.esm.js";