@jaak.ai/stamps 1.0.0-dev.9 → 1.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.
- package/README.md +71 -10
- package/dist/cjs/document-detector_19.cjs.entry.js +149 -59
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/stamps.cjs.js +1 -1
- package/dist/collection/components/document-detector/document-detector.js +113 -25
- package/dist/collection/components/shared/mb-component/mb-component.js +28 -3
- package/dist/collection/utils/device.helpers.js +1 -1
- package/dist/esm/document-detector_19.entry.js +149 -59
- package/dist/esm/loader.js +1 -1
- package/dist/esm/stamps.js +1 -1
- package/dist/stamps/p-ae1d9117.entry.js +9 -0
- package/dist/stamps/stamps.esm.js +1 -1
- package/dist/types/components/document-detector/document-detector.d.ts +18 -1
- package/dist/types/components/shared/mb-component/mb-component.d.ts +2 -0
- package/dist/types/components.d.ts +29 -0
- package/package.json +1 -1
- package/dist/stamps/p-f4015454.entry.js +0 -9
|
@@ -2,6 +2,7 @@ import { Host, h, } from "@stencil/core";
|
|
|
2
2
|
import { SdkService } from "../../utils/sdk.service";
|
|
3
3
|
import { TranslationService } from "../../utils/translation.service";
|
|
4
4
|
import * as GenericHelpers from "../../utils/generic.helpers";
|
|
5
|
+
import * as DeviceHelpers from "../../utils/device.helpers";
|
|
5
6
|
import { StatusDocumentDetector } from "../../utils/status.document-detector";
|
|
6
7
|
export class DocumentDetector {
|
|
7
8
|
constructor() {
|
|
@@ -10,22 +11,7 @@ export class DocumentDetector {
|
|
|
10
11
|
this.engineLocation = "https://storage.googleapis.com/jaak-storage/models/web/document-detector/v2.0.0";
|
|
11
12
|
this.workerLocation = "https://storage.googleapis.com/jaak-storage/models/web/document-detector/v2.0.0/BlinkIDWasmSDK.worker.min.js";
|
|
12
13
|
this.wasmType = "ADVANCE";
|
|
13
|
-
this.blinkIdVariant = "lightweight";
|
|
14
14
|
this.recognizers = ['BlinkIdMultiSideRecognizer'];
|
|
15
|
-
this.recognizerOptions = {
|
|
16
|
-
BlinkIdMultiSideRecognizer: {
|
|
17
|
-
returnEncodedFullDocumentImage: true,
|
|
18
|
-
returnEncodedFaceImage: true,
|
|
19
|
-
returnEncodedSignatureImage: true,
|
|
20
|
-
fullDocumentImageExtensionFactors: {
|
|
21
|
-
upFactor: 0.1,
|
|
22
|
-
downFactor: 0.1,
|
|
23
|
-
leftFactor: 0.1,
|
|
24
|
-
rightFactor: 0.1
|
|
25
|
-
},
|
|
26
|
-
fullDocumentImageDpi: 300
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
15
|
this.recognitionPauseTimeout = 3800;
|
|
30
16
|
this.cameraExperienceStateDurations = null;
|
|
31
17
|
this.enableDrag = false;
|
|
@@ -53,7 +39,7 @@ export class DocumentDetector {
|
|
|
53
39
|
};
|
|
54
40
|
this.ready = {
|
|
55
41
|
emit: (data) => {
|
|
56
|
-
this.status.emit(StatusDocumentDetector.
|
|
42
|
+
this.status.emit(StatusDocumentDetector.RECORDING);
|
|
57
43
|
return undefined;
|
|
58
44
|
}
|
|
59
45
|
};
|
|
@@ -72,13 +58,12 @@ export class DocumentDetector {
|
|
|
72
58
|
};
|
|
73
59
|
this.feedback = {
|
|
74
60
|
emit: (data) => {
|
|
75
|
-
console.log(data);
|
|
76
61
|
return undefined;
|
|
77
62
|
}
|
|
78
63
|
};
|
|
79
64
|
this.cameraScanStarted = {
|
|
80
65
|
emit: () => {
|
|
81
|
-
this.status.emit(StatusDocumentDetector.
|
|
66
|
+
this.status.emit(StatusDocumentDetector.FRONT_SIDE_DETECTION);
|
|
82
67
|
return undefined;
|
|
83
68
|
}
|
|
84
69
|
};
|
|
@@ -96,17 +81,57 @@ export class DocumentDetector {
|
|
|
96
81
|
};
|
|
97
82
|
this.restart = false;
|
|
98
83
|
this.licenseKey = undefined;
|
|
84
|
+
this.blinkIdVariant = "lightweight";
|
|
85
|
+
this.recognizerOptions = {
|
|
86
|
+
BlinkIdMultiSideRecognizer: {
|
|
87
|
+
returnEncodedFullDocumentImage: true,
|
|
88
|
+
returnEncodedFaceImage: true,
|
|
89
|
+
returnEncodedSignatureImage: true,
|
|
90
|
+
fullDocumentImageExtensionFactors: {
|
|
91
|
+
upFactor: 0.1,
|
|
92
|
+
downFactor: 0.1,
|
|
93
|
+
leftFactor: 0.1,
|
|
94
|
+
rightFactor: 0.1
|
|
95
|
+
},
|
|
96
|
+
fullDocumentImageDpi: 300
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
99
|
this.config = undefined;
|
|
100
100
|
}
|
|
101
101
|
configHandler(newConfig) {
|
|
102
|
-
if (newConfig
|
|
102
|
+
if (newConfig) {
|
|
103
103
|
this.licenseKey = newConfig.key;
|
|
104
|
+
this.blinkIdVariant = newConfig.dynamicMode ? (DeviceHelpers.isDesktop() ? "full" : "lightweight") : "lightweight";
|
|
105
|
+
if (newConfig.strictMode === false) {
|
|
106
|
+
this.recognizerOptions = {
|
|
107
|
+
BlinkIdMultiSideRecognizer: {
|
|
108
|
+
...this.recognizerOptions.BlinkIdMultiSideRecognizer,
|
|
109
|
+
enableBlurFilter: false,
|
|
110
|
+
enableGlareFilter: false,
|
|
111
|
+
blurStrictnessLevel: 2,
|
|
112
|
+
glareStrictnessLevel: 2
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
this.recognizerOptions = {
|
|
118
|
+
BlinkIdMultiSideRecognizer: {
|
|
119
|
+
...this.recognizerOptions.BlinkIdMultiSideRecognizer,
|
|
120
|
+
enableBlurFilter: true,
|
|
121
|
+
enableGlareFilter: true,
|
|
122
|
+
blurStrictnessLevel: 1,
|
|
123
|
+
glareStrictnessLevel: 1
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
this.init();
|
|
104
128
|
}
|
|
105
129
|
}
|
|
106
130
|
async setUiState(state) {
|
|
107
131
|
this.mbComponentEl.setUiState(state);
|
|
108
132
|
}
|
|
109
133
|
async startCameraScan() {
|
|
134
|
+
this.status.emit(StatusDocumentDetector.INITIALIZING);
|
|
110
135
|
this.mbComponentEl.startCameraScan();
|
|
111
136
|
}
|
|
112
137
|
async startImageScan(file) {
|
|
@@ -133,8 +158,31 @@ export class DocumentDetector {
|
|
|
133
158
|
}, 100);
|
|
134
159
|
}
|
|
135
160
|
componentWillLoad() {
|
|
136
|
-
if (this.config
|
|
161
|
+
if (this.config) {
|
|
137
162
|
this.licenseKey = this.config.key;
|
|
163
|
+
this.blinkIdVariant = this.config.dynamicMode ? (DeviceHelpers.isDesktop() ? "full" : "lightweight") : "lightweight";
|
|
164
|
+
if (this.config.strictMode === false) {
|
|
165
|
+
this.recognizerOptions = {
|
|
166
|
+
BlinkIdMultiSideRecognizer: {
|
|
167
|
+
...this.recognizerOptions.BlinkIdMultiSideRecognizer,
|
|
168
|
+
enableBlurFilter: false,
|
|
169
|
+
enableGlareFilter: false,
|
|
170
|
+
blurStrictnessLevel: 2,
|
|
171
|
+
glareStrictnessLevel: 2
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
this.recognizerOptions = {
|
|
177
|
+
BlinkIdMultiSideRecognizer: {
|
|
178
|
+
...this.recognizerOptions.BlinkIdMultiSideRecognizer,
|
|
179
|
+
enableBlurFilter: true,
|
|
180
|
+
enableGlareFilter: true,
|
|
181
|
+
blurStrictnessLevel: 1,
|
|
182
|
+
glareStrictnessLevel: 1
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
}
|
|
138
186
|
}
|
|
139
187
|
this.init();
|
|
140
188
|
}
|
|
@@ -160,7 +208,45 @@ export class DocumentDetector {
|
|
|
160
208
|
this.finalTranslations = this.translations
|
|
161
209
|
? this.translations
|
|
162
210
|
: rawTranslations;
|
|
163
|
-
|
|
211
|
+
const customTranslations = {};
|
|
212
|
+
if (this.config && this.config.translation) {
|
|
213
|
+
if (this.config.translation.front) {
|
|
214
|
+
customTranslations["camera-feedback-scan-front"] = this.config.translation.front;
|
|
215
|
+
}
|
|
216
|
+
if (this.config.translation.back) {
|
|
217
|
+
customTranslations["camera-feedback-scan-back"] = this.config.translation.back;
|
|
218
|
+
}
|
|
219
|
+
if (this.config.translation.changeSide) {
|
|
220
|
+
customTranslations["camera-feedback-flip"] = this.config.translation.changeSide;
|
|
221
|
+
}
|
|
222
|
+
if (this.config.translation.adjustAngle) {
|
|
223
|
+
customTranslations["camera-feedback-adjust-angle"] = this.config.translation.adjustAngle;
|
|
224
|
+
}
|
|
225
|
+
if (this.config.translation.cameraFeedbackBlur) {
|
|
226
|
+
customTranslations["camera-feedback-blur"] = this.config.translation.cameraFeedbackBlur;
|
|
227
|
+
}
|
|
228
|
+
if (this.config.translation.cameraFeedbackFacePhotoCovered) {
|
|
229
|
+
customTranslations["camera-feedback-face-photo-covered"] = this.config.translation.cameraFeedbackFacePhotoCovered;
|
|
230
|
+
}
|
|
231
|
+
if (this.config.translation.cameraFeedbackGlare) {
|
|
232
|
+
customTranslations["camera-feedback-glare"] = this.config.translation.cameraFeedbackGlare;
|
|
233
|
+
}
|
|
234
|
+
if (this.config.translation.cameraFeedbackWrongSide) {
|
|
235
|
+
customTranslations["camera-feedback-wrong-side"] = this.config.translation.cameraFeedbackWrongSide;
|
|
236
|
+
}
|
|
237
|
+
if (this.config.translation.moveCloser) {
|
|
238
|
+
customTranslations["camera-feedback-move-closer"] = this.config.translation.moveCloser;
|
|
239
|
+
}
|
|
240
|
+
if (this.config.translation.moveFarther) {
|
|
241
|
+
customTranslations["camera-feedback-move-farther"] = this.config.translation.moveFarther;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
// Merge custom translations with finalTranslations
|
|
245
|
+
const mergedTranslations = {
|
|
246
|
+
...(this.finalTranslations || {}),
|
|
247
|
+
...customTranslations
|
|
248
|
+
};
|
|
249
|
+
this.translationService = new TranslationService(mergedTranslations);
|
|
164
250
|
this.sdkService = new SdkService();
|
|
165
251
|
}
|
|
166
252
|
render() {
|
|
@@ -169,7 +255,7 @@ export class DocumentDetector {
|
|
|
169
255
|
}, onFeedback: (ev) => {
|
|
170
256
|
this.feedbackEl.show(ev.detail);
|
|
171
257
|
this.feedback.emit(ev.detail);
|
|
172
|
-
}, onScanSuccess: (ev) => this.scanSuccess.emit(ev.detail), onReady: (ev) => this.ready.emit(ev.detail), onCameraScanStarted: (ev) => this.cameraScanStarted.emit(ev.detail), onImageScanStarted: (ev) => this.imageScanStarted.emit(ev.detail), onScanError: (ev) => this.scanError.emit(ev.detail), onScanAborted: (ev) => this.scanAborted.emit(ev.detail) })), h("mb-feedback", { dir: this.hostEl.getAttribute("dir"), visible: !this.hideFeedback, ref: (el) => (this.feedbackEl = el) }))));
|
|
258
|
+
}, onScanSuccess: (ev) => this.scanSuccess.emit(ev.detail), onReady: (ev) => this.ready.emit(ev.detail), onCameraScanStarted: (ev) => this.cameraScanStarted.emit(ev.detail), onImageScanStarted: (ev) => this.imageScanStarted.emit(ev.detail), onScanError: (ev) => this.scanError.emit(ev.detail), onScanAborted: (ev) => this.scanAborted.emit(ev.detail), onStatus: (ev) => this.status.emit(ev.detail) })), h("mb-feedback", { dir: this.hostEl.getAttribute("dir"), visible: !this.hideFeedback, ref: (el) => (this.feedbackEl = el) }))));
|
|
173
259
|
}
|
|
174
260
|
static get is() { return "document-detector"; }
|
|
175
261
|
static get encapsulation() { return "shadow"; }
|
|
@@ -206,8 +292,8 @@ export class DocumentDetector {
|
|
|
206
292
|
"type": "unknown",
|
|
207
293
|
"mutable": true,
|
|
208
294
|
"complexType": {
|
|
209
|
-
"original": "{\n key: string;\n }",
|
|
210
|
-
"resolved": "{ key: string; }",
|
|
295
|
+
"original": "{\n key: string;\n dynamicMode: boolean;\n strictMode: boolean;\n translation: {\n front: string;\n back: string;\n changeSide: string;\n adjustAngle: string;\n cameraFeedbackBlur: string;\n cameraFeedbackFacePhotoCovered: string;\n cameraFeedbackGlare: string;\n cameraFeedbackWrongSide: string;\n moveCloser: string;\n moveFarther: string;\n }\n }",
|
|
296
|
+
"resolved": "{ key: string; dynamicMode: boolean; strictMode: boolean; translation: { front: string; back: string; changeSide: string; adjustAngle: string; cameraFeedbackBlur: string; cameraFeedbackFacePhotoCovered: string; cameraFeedbackGlare: string; cameraFeedbackWrongSide: string; moveCloser: string; moveFarther: string; }; }",
|
|
211
297
|
"references": {}
|
|
212
298
|
},
|
|
213
299
|
"required": false,
|
|
@@ -221,7 +307,9 @@ export class DocumentDetector {
|
|
|
221
307
|
}
|
|
222
308
|
static get states() {
|
|
223
309
|
return {
|
|
224
|
-
"restart": {}
|
|
310
|
+
"restart": {},
|
|
311
|
+
"blinkIdVariant": {},
|
|
312
|
+
"recognizerOptions": {}
|
|
225
313
|
};
|
|
226
314
|
}
|
|
227
315
|
static get events() {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CameraExperienceState, Code,
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
|
+
import { CameraExperienceState, Code, FeedbackCode, ImageRecognitionType, MultiSideImageType, RecognitionStatus, SDKError, } from "../../../utils/data-structures";
|
|
3
3
|
import * as ErrorTypes from "../../../utils/error-structures";
|
|
4
|
-
import {
|
|
4
|
+
import { ErrorCodes, LicenseErrorType, sdkErrors, } from "@microblink/blinkid-in-browser-sdk";
|
|
5
5
|
import * as DeviceHelpers from "../../../utils/device.helpers";
|
|
6
6
|
import * as GenericHelpers from "../../../utils/generic.helpers";
|
|
7
7
|
import * as Utils from "./mb-component.utils";
|
|
8
|
+
import { StatusDocumentDetector } from "../../../utils/status.document-detector";
|
|
8
9
|
export class MbComponent {
|
|
9
10
|
constructor() {
|
|
10
11
|
this.screens = {
|
|
@@ -396,9 +397,11 @@ export class MbComponent {
|
|
|
396
397
|
break;
|
|
397
398
|
case RecognitionStatus.DetectionStatusFail:
|
|
398
399
|
this.cameraExperience.setState(CameraExperienceState.Default, this.isBackSide);
|
|
400
|
+
this.status.emit(StatusDocumentDetector.DOCUMENT_NOT_FOUND);
|
|
399
401
|
break;
|
|
400
402
|
case RecognitionStatus.DetectionStatusSuccess:
|
|
401
403
|
this.detectionSuccessLock = true;
|
|
404
|
+
this.status.emit(StatusDocumentDetector.DOCUMENT_DETECTED);
|
|
402
405
|
window.setTimeout(() => {
|
|
403
406
|
if (this.detectionSuccessLock) {
|
|
404
407
|
this.cameraExperience.setState(CameraExperienceState.Detection);
|
|
@@ -542,6 +545,8 @@ export class MbComponent {
|
|
|
542
545
|
break;
|
|
543
546
|
// handle flipping of other documents
|
|
544
547
|
case RecognitionStatus.OnFirstSideResult:
|
|
548
|
+
this.status.emit(StatusDocumentDetector.CHANGE_SIDE);
|
|
549
|
+
this.status.emit(StatusDocumentDetector.BACK_SIDE_DETECTION);
|
|
545
550
|
this.sdkService.videoRecognizer.pauseRecognition();
|
|
546
551
|
window.setTimeout(async () => {
|
|
547
552
|
if (this.areHelpScreensOpen) {
|
|
@@ -2150,6 +2155,26 @@ export class MbComponent {
|
|
|
2150
2155
|
"resolved": "boolean",
|
|
2151
2156
|
"references": {}
|
|
2152
2157
|
}
|
|
2158
|
+
}, {
|
|
2159
|
+
"method": "status",
|
|
2160
|
+
"name": "status",
|
|
2161
|
+
"bubbles": true,
|
|
2162
|
+
"cancelable": true,
|
|
2163
|
+
"composed": true,
|
|
2164
|
+
"docs": {
|
|
2165
|
+
"tags": [],
|
|
2166
|
+
"text": ""
|
|
2167
|
+
},
|
|
2168
|
+
"complexType": {
|
|
2169
|
+
"original": "StatusDocumentDetector",
|
|
2170
|
+
"resolved": "StatusDocumentDetector.BACK_SIDE_DETECTION | StatusDocumentDetector.CHANGE_SIDE | StatusDocumentDetector.DETECTION_FAILED | StatusDocumentDetector.DOCUMENT_DETECTED | StatusDocumentDetector.DOCUMENT_NOT_FOUND | StatusDocumentDetector.ERROR | StatusDocumentDetector.FRONT_SIDE_DETECTION | StatusDocumentDetector.INITIALIZING | StatusDocumentDetector.RECORDING | StatusDocumentDetector.RESULTS_EMPTY | StatusDocumentDetector.RESULTS_SUCCESS | StatusDocumentDetector.RUNNING",
|
|
2171
|
+
"references": {
|
|
2172
|
+
"StatusDocumentDetector": {
|
|
2173
|
+
"location": "import",
|
|
2174
|
+
"path": "../../../utils/status.document-detector"
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
}
|
|
2153
2178
|
}];
|
|
2154
2179
|
}
|
|
2155
2180
|
static get methods() {
|
|
@@ -33,5 +33,5 @@ export async function checkMandatoryCapabilites() {
|
|
|
33
33
|
* Determine whether this is a desktop device based on the screen resolution.
|
|
34
34
|
*/
|
|
35
35
|
export function isDesktop() {
|
|
36
|
-
return !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
36
|
+
return !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|Tablet/i.test(navigator.userAgent);
|
|
37
37
|
}
|
|
@@ -6027,6 +6027,43 @@ function setWebComponentParts(hostEl) {
|
|
|
6027
6027
|
hostEl.setAttribute("part", partParts.join(" ").trim());
|
|
6028
6028
|
}
|
|
6029
6029
|
|
|
6030
|
+
function hasVideoDevices() {
|
|
6031
|
+
return new Promise((resolve) => {
|
|
6032
|
+
if (!window.navigator ||
|
|
6033
|
+
!window.navigator.mediaDevices ||
|
|
6034
|
+
typeof window.navigator.mediaDevices.enumerateDevices !== "function") {
|
|
6035
|
+
resolve(false);
|
|
6036
|
+
return;
|
|
6037
|
+
}
|
|
6038
|
+
window.navigator.mediaDevices.enumerateDevices().then((devices) => {
|
|
6039
|
+
devices = devices || [];
|
|
6040
|
+
for (const device of devices) {
|
|
6041
|
+
if (device && device.kind === "videoinput") {
|
|
6042
|
+
resolve(true);
|
|
6043
|
+
return;
|
|
6044
|
+
}
|
|
6045
|
+
}
|
|
6046
|
+
resolve(false);
|
|
6047
|
+
});
|
|
6048
|
+
});
|
|
6049
|
+
}
|
|
6050
|
+
function isWasmSupported() {
|
|
6051
|
+
return new Promise((resolve) => {
|
|
6052
|
+
const wasmSupport = isBrowserSupported();
|
|
6053
|
+
resolve(wasmSupport);
|
|
6054
|
+
});
|
|
6055
|
+
}
|
|
6056
|
+
async function checkMandatoryCapabilites() {
|
|
6057
|
+
const wasmSupport = await isWasmSupported();
|
|
6058
|
+
return wasmSupport;
|
|
6059
|
+
}
|
|
6060
|
+
/**
|
|
6061
|
+
* Determine whether this is a desktop device based on the screen resolution.
|
|
6062
|
+
*/
|
|
6063
|
+
function isDesktop() {
|
|
6064
|
+
return !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|Tablet/i.test(navigator.userAgent);
|
|
6065
|
+
}
|
|
6066
|
+
|
|
6030
6067
|
var StatusDocumentDetector;
|
|
6031
6068
|
(function (StatusDocumentDetector) {
|
|
6032
6069
|
StatusDocumentDetector["RECORDING"] = "RECORDING";
|
|
@@ -6055,22 +6092,7 @@ const DocumentDetector = class {
|
|
|
6055
6092
|
this.engineLocation = "https://storage.googleapis.com/jaak-storage/models/web/document-detector/v2.0.0";
|
|
6056
6093
|
this.workerLocation = "https://storage.googleapis.com/jaak-storage/models/web/document-detector/v2.0.0/BlinkIDWasmSDK.worker.min.js";
|
|
6057
6094
|
this.wasmType = "ADVANCE";
|
|
6058
|
-
this.blinkIdVariant = "lightweight";
|
|
6059
6095
|
this.recognizers = ['BlinkIdMultiSideRecognizer'];
|
|
6060
|
-
this.recognizerOptions = {
|
|
6061
|
-
BlinkIdMultiSideRecognizer: {
|
|
6062
|
-
returnEncodedFullDocumentImage: true,
|
|
6063
|
-
returnEncodedFaceImage: true,
|
|
6064
|
-
returnEncodedSignatureImage: true,
|
|
6065
|
-
fullDocumentImageExtensionFactors: {
|
|
6066
|
-
upFactor: 0.1,
|
|
6067
|
-
downFactor: 0.1,
|
|
6068
|
-
leftFactor: 0.1,
|
|
6069
|
-
rightFactor: 0.1
|
|
6070
|
-
},
|
|
6071
|
-
fullDocumentImageDpi: 300
|
|
6072
|
-
}
|
|
6073
|
-
};
|
|
6074
6096
|
this.recognitionPauseTimeout = 3800;
|
|
6075
6097
|
this.cameraExperienceStateDurations = null;
|
|
6076
6098
|
this.enableDrag = false;
|
|
@@ -6098,7 +6120,7 @@ const DocumentDetector = class {
|
|
|
6098
6120
|
};
|
|
6099
6121
|
this.ready = {
|
|
6100
6122
|
emit: (data) => {
|
|
6101
|
-
this.status.emit(StatusDocumentDetector.
|
|
6123
|
+
this.status.emit(StatusDocumentDetector.RECORDING);
|
|
6102
6124
|
return undefined;
|
|
6103
6125
|
}
|
|
6104
6126
|
};
|
|
@@ -6117,13 +6139,12 @@ const DocumentDetector = class {
|
|
|
6117
6139
|
};
|
|
6118
6140
|
this.feedback = {
|
|
6119
6141
|
emit: (data) => {
|
|
6120
|
-
console.log(data);
|
|
6121
6142
|
return undefined;
|
|
6122
6143
|
}
|
|
6123
6144
|
};
|
|
6124
6145
|
this.cameraScanStarted = {
|
|
6125
6146
|
emit: () => {
|
|
6126
|
-
this.status.emit(StatusDocumentDetector.
|
|
6147
|
+
this.status.emit(StatusDocumentDetector.FRONT_SIDE_DETECTION);
|
|
6127
6148
|
return undefined;
|
|
6128
6149
|
}
|
|
6129
6150
|
};
|
|
@@ -6141,17 +6162,57 @@ const DocumentDetector = class {
|
|
|
6141
6162
|
};
|
|
6142
6163
|
this.restart = false;
|
|
6143
6164
|
this.licenseKey = undefined;
|
|
6165
|
+
this.blinkIdVariant = "lightweight";
|
|
6166
|
+
this.recognizerOptions = {
|
|
6167
|
+
BlinkIdMultiSideRecognizer: {
|
|
6168
|
+
returnEncodedFullDocumentImage: true,
|
|
6169
|
+
returnEncodedFaceImage: true,
|
|
6170
|
+
returnEncodedSignatureImage: true,
|
|
6171
|
+
fullDocumentImageExtensionFactors: {
|
|
6172
|
+
upFactor: 0.1,
|
|
6173
|
+
downFactor: 0.1,
|
|
6174
|
+
leftFactor: 0.1,
|
|
6175
|
+
rightFactor: 0.1
|
|
6176
|
+
},
|
|
6177
|
+
fullDocumentImageDpi: 300
|
|
6178
|
+
}
|
|
6179
|
+
};
|
|
6144
6180
|
this.config = undefined;
|
|
6145
6181
|
}
|
|
6146
6182
|
configHandler(newConfig) {
|
|
6147
|
-
if (newConfig
|
|
6183
|
+
if (newConfig) {
|
|
6148
6184
|
this.licenseKey = newConfig.key;
|
|
6185
|
+
this.blinkIdVariant = newConfig.dynamicMode ? (isDesktop() ? "full" : "lightweight") : "lightweight";
|
|
6186
|
+
if (newConfig.strictMode === false) {
|
|
6187
|
+
this.recognizerOptions = {
|
|
6188
|
+
BlinkIdMultiSideRecognizer: {
|
|
6189
|
+
...this.recognizerOptions.BlinkIdMultiSideRecognizer,
|
|
6190
|
+
enableBlurFilter: false,
|
|
6191
|
+
enableGlareFilter: false,
|
|
6192
|
+
blurStrictnessLevel: 2,
|
|
6193
|
+
glareStrictnessLevel: 2
|
|
6194
|
+
}
|
|
6195
|
+
};
|
|
6196
|
+
}
|
|
6197
|
+
else {
|
|
6198
|
+
this.recognizerOptions = {
|
|
6199
|
+
BlinkIdMultiSideRecognizer: {
|
|
6200
|
+
...this.recognizerOptions.BlinkIdMultiSideRecognizer,
|
|
6201
|
+
enableBlurFilter: true,
|
|
6202
|
+
enableGlareFilter: true,
|
|
6203
|
+
blurStrictnessLevel: 1,
|
|
6204
|
+
glareStrictnessLevel: 1
|
|
6205
|
+
}
|
|
6206
|
+
};
|
|
6207
|
+
}
|
|
6208
|
+
this.init();
|
|
6149
6209
|
}
|
|
6150
6210
|
}
|
|
6151
6211
|
async setUiState(state) {
|
|
6152
6212
|
this.mbComponentEl.setUiState(state);
|
|
6153
6213
|
}
|
|
6154
6214
|
async startCameraScan() {
|
|
6215
|
+
this.status.emit(StatusDocumentDetector.INITIALIZING);
|
|
6155
6216
|
this.mbComponentEl.startCameraScan();
|
|
6156
6217
|
}
|
|
6157
6218
|
async startImageScan(file) {
|
|
@@ -6178,8 +6239,31 @@ const DocumentDetector = class {
|
|
|
6178
6239
|
}, 100);
|
|
6179
6240
|
}
|
|
6180
6241
|
componentWillLoad() {
|
|
6181
|
-
if (this.config
|
|
6242
|
+
if (this.config) {
|
|
6182
6243
|
this.licenseKey = this.config.key;
|
|
6244
|
+
this.blinkIdVariant = this.config.dynamicMode ? (isDesktop() ? "full" : "lightweight") : "lightweight";
|
|
6245
|
+
if (this.config.strictMode === false) {
|
|
6246
|
+
this.recognizerOptions = {
|
|
6247
|
+
BlinkIdMultiSideRecognizer: {
|
|
6248
|
+
...this.recognizerOptions.BlinkIdMultiSideRecognizer,
|
|
6249
|
+
enableBlurFilter: false,
|
|
6250
|
+
enableGlareFilter: false,
|
|
6251
|
+
blurStrictnessLevel: 2,
|
|
6252
|
+
glareStrictnessLevel: 2
|
|
6253
|
+
}
|
|
6254
|
+
};
|
|
6255
|
+
}
|
|
6256
|
+
else {
|
|
6257
|
+
this.recognizerOptions = {
|
|
6258
|
+
BlinkIdMultiSideRecognizer: {
|
|
6259
|
+
...this.recognizerOptions.BlinkIdMultiSideRecognizer,
|
|
6260
|
+
enableBlurFilter: true,
|
|
6261
|
+
enableGlareFilter: true,
|
|
6262
|
+
blurStrictnessLevel: 1,
|
|
6263
|
+
glareStrictnessLevel: 1
|
|
6264
|
+
}
|
|
6265
|
+
};
|
|
6266
|
+
}
|
|
6183
6267
|
}
|
|
6184
6268
|
this.init();
|
|
6185
6269
|
}
|
|
@@ -6205,7 +6289,45 @@ const DocumentDetector = class {
|
|
|
6205
6289
|
this.finalTranslations = this.translations
|
|
6206
6290
|
? this.translations
|
|
6207
6291
|
: rawTranslations;
|
|
6208
|
-
|
|
6292
|
+
const customTranslations = {};
|
|
6293
|
+
if (this.config && this.config.translation) {
|
|
6294
|
+
if (this.config.translation.front) {
|
|
6295
|
+
customTranslations["camera-feedback-scan-front"] = this.config.translation.front;
|
|
6296
|
+
}
|
|
6297
|
+
if (this.config.translation.back) {
|
|
6298
|
+
customTranslations["camera-feedback-scan-back"] = this.config.translation.back;
|
|
6299
|
+
}
|
|
6300
|
+
if (this.config.translation.changeSide) {
|
|
6301
|
+
customTranslations["camera-feedback-flip"] = this.config.translation.changeSide;
|
|
6302
|
+
}
|
|
6303
|
+
if (this.config.translation.adjustAngle) {
|
|
6304
|
+
customTranslations["camera-feedback-adjust-angle"] = this.config.translation.adjustAngle;
|
|
6305
|
+
}
|
|
6306
|
+
if (this.config.translation.cameraFeedbackBlur) {
|
|
6307
|
+
customTranslations["camera-feedback-blur"] = this.config.translation.cameraFeedbackBlur;
|
|
6308
|
+
}
|
|
6309
|
+
if (this.config.translation.cameraFeedbackFacePhotoCovered) {
|
|
6310
|
+
customTranslations["camera-feedback-face-photo-covered"] = this.config.translation.cameraFeedbackFacePhotoCovered;
|
|
6311
|
+
}
|
|
6312
|
+
if (this.config.translation.cameraFeedbackGlare) {
|
|
6313
|
+
customTranslations["camera-feedback-glare"] = this.config.translation.cameraFeedbackGlare;
|
|
6314
|
+
}
|
|
6315
|
+
if (this.config.translation.cameraFeedbackWrongSide) {
|
|
6316
|
+
customTranslations["camera-feedback-wrong-side"] = this.config.translation.cameraFeedbackWrongSide;
|
|
6317
|
+
}
|
|
6318
|
+
if (this.config.translation.moveCloser) {
|
|
6319
|
+
customTranslations["camera-feedback-move-closer"] = this.config.translation.moveCloser;
|
|
6320
|
+
}
|
|
6321
|
+
if (this.config.translation.moveFarther) {
|
|
6322
|
+
customTranslations["camera-feedback-move-farther"] = this.config.translation.moveFarther;
|
|
6323
|
+
}
|
|
6324
|
+
}
|
|
6325
|
+
// Merge custom translations with finalTranslations
|
|
6326
|
+
const mergedTranslations = {
|
|
6327
|
+
...(this.finalTranslations || {}),
|
|
6328
|
+
...customTranslations
|
|
6329
|
+
};
|
|
6330
|
+
this.translationService = new TranslationService(mergedTranslations);
|
|
6209
6331
|
this.sdkService = new SdkService();
|
|
6210
6332
|
}
|
|
6211
6333
|
render() {
|
|
@@ -6214,7 +6336,7 @@ const DocumentDetector = class {
|
|
|
6214
6336
|
}, onFeedback: (ev) => {
|
|
6215
6337
|
this.feedbackEl.show(ev.detail);
|
|
6216
6338
|
this.feedback.emit(ev.detail);
|
|
6217
|
-
}, onScanSuccess: (ev) => this.scanSuccess.emit(ev.detail), onReady: (ev) => this.ready.emit(ev.detail), onCameraScanStarted: (ev) => this.cameraScanStarted.emit(ev.detail), onImageScanStarted: (ev) => this.imageScanStarted.emit(ev.detail), onScanError: (ev) => this.scanError.emit(ev.detail), onScanAborted: (ev) => this.scanAborted.emit(ev.detail) })), h("mb-feedback", { dir: this.hostEl.getAttribute("dir"), visible: !this.hideFeedback, ref: (el) => (this.feedbackEl = el) }))));
|
|
6339
|
+
}, onScanSuccess: (ev) => this.scanSuccess.emit(ev.detail), onReady: (ev) => this.ready.emit(ev.detail), onCameraScanStarted: (ev) => this.cameraScanStarted.emit(ev.detail), onImageScanStarted: (ev) => this.imageScanStarted.emit(ev.detail), onScanError: (ev) => this.scanError.emit(ev.detail), onScanAborted: (ev) => this.scanAborted.emit(ev.detail), onStatus: (ev) => this.status.emit(ev.detail) })), h("mb-feedback", { dir: this.hostEl.getAttribute("dir"), visible: !this.hideFeedback, ref: (el) => (this.feedbackEl = el) }))));
|
|
6218
6340
|
}
|
|
6219
6341
|
get hostEl() { return getElement(this); }
|
|
6220
6342
|
static get watchers() { return {
|
|
@@ -6276,43 +6398,6 @@ const MbButton = class {
|
|
|
6276
6398
|
};
|
|
6277
6399
|
MbButton.style = mbButtonCss;
|
|
6278
6400
|
|
|
6279
|
-
function hasVideoDevices() {
|
|
6280
|
-
return new Promise((resolve) => {
|
|
6281
|
-
if (!window.navigator ||
|
|
6282
|
-
!window.navigator.mediaDevices ||
|
|
6283
|
-
typeof window.navigator.mediaDevices.enumerateDevices !== "function") {
|
|
6284
|
-
resolve(false);
|
|
6285
|
-
return;
|
|
6286
|
-
}
|
|
6287
|
-
window.navigator.mediaDevices.enumerateDevices().then((devices) => {
|
|
6288
|
-
devices = devices || [];
|
|
6289
|
-
for (const device of devices) {
|
|
6290
|
-
if (device && device.kind === "videoinput") {
|
|
6291
|
-
resolve(true);
|
|
6292
|
-
return;
|
|
6293
|
-
}
|
|
6294
|
-
}
|
|
6295
|
-
resolve(false);
|
|
6296
|
-
});
|
|
6297
|
-
});
|
|
6298
|
-
}
|
|
6299
|
-
function isWasmSupported() {
|
|
6300
|
-
return new Promise((resolve) => {
|
|
6301
|
-
const wasmSupport = isBrowserSupported();
|
|
6302
|
-
resolve(wasmSupport);
|
|
6303
|
-
});
|
|
6304
|
-
}
|
|
6305
|
-
async function checkMandatoryCapabilites() {
|
|
6306
|
-
const wasmSupport = await isWasmSupported();
|
|
6307
|
-
return wasmSupport;
|
|
6308
|
-
}
|
|
6309
|
-
/**
|
|
6310
|
-
* Determine whether this is a desktop device based on the screen resolution.
|
|
6311
|
-
*/
|
|
6312
|
-
function isDesktop() {
|
|
6313
|
-
return !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
6314
|
-
}
|
|
6315
|
-
|
|
6316
6401
|
const mbButtonClassicCss = ":host{box-sizing:border-box;display:block}:host button{display:block;border:none;margin:0;padding:7px 16px;color:var(--mb-component-button-classic-text-color);background:var(--mb-component-button-classic-background);border:1px solid var(--mb-component-button-classic-background);border-radius:var(--mb-component-button-classic-border-radius);font-family:var(--mb-font-family);font-size:var(--mb-component-button-classic-font-size);font-weight:var(--mb-component-button-classic-font-weight)}:host button:not([disabled]){cursor:pointer}:host button[disabled]{opacity:0.5;pointer-events:none}:host(.mobile){width:50%;display:flex;flex-direction:column}:host(.mobile) button{display:block;border:none;margin:0;padding:7px 16px;color:var(--mb-component-button-classic-text-color);background:var(--mb-component-button-classic-background);border:1px solid var(--mb-component-button-classic-background);border-radius:var(--mb-component-button-classic-border-radius);font-family:var(--mb-font-family);font-size:var(--mb-component-button-classic-font-size);font-weight:var(--mb-component-button-classic-font-weight)}:host(.mobile) button:not([disabled]){cursor:pointer}:host(.mobile) button[disabled]{opacity:0.5;pointer-events:none}:host(.quit-mobile){width:170%;display:flex;flex-direction:column}:host(.quit-mobile) button{display:block;border:none;margin:0;padding:7px 16px;color:var(--mb-component-button-classic-text-color);background:var(--mb-component-button-classic-background);border:1px solid var(--mb-component-button-classic-background);border-radius:var(--mb-component-button-classic-border-radius);font-family:var(--mb-font-family);font-size:var(--mb-component-button-classic-font-size);font-weight:var(--mb-component-button-classic-font-weight)}:host(.quit-mobile) button:not([disabled]){cursor:pointer}:host(.quit-mobile) button[disabled]{opacity:0.5;pointer-events:none}:host(.inverted) a,:host(.inverted) button{background-color:white;color:var(--mb-component-button-classic-inverted-text-color);border:1px solid var(--mb-component-button-classic-inverted-border-color)}:host(.inverted) button:hover,:host(.inverted) button:active,:host(.inverted) button:focus{cursor:pointer;background-color:var(--mb-component-button-classic-inverted-hover-background)}:host(.inverted) button:focus{border-color:var(--mb-component-button-classic-focused-border-color)}";
|
|
6317
6402
|
|
|
6318
6403
|
const MbButtonClassic = class {
|
|
@@ -6899,6 +6984,7 @@ const MbComponent = class {
|
|
|
6899
6984
|
this.imageScanStarted = createEvent(this, "imageScanStarted", 7);
|
|
6900
6985
|
this.scanAborted = createEvent(this, "scanAborted", 7);
|
|
6901
6986
|
this.setIsCameraActive = createEvent(this, "setIsCameraActive", 7);
|
|
6987
|
+
this.status = createEvent(this, "status", 7);
|
|
6902
6988
|
this.screens = {
|
|
6903
6989
|
action: null,
|
|
6904
6990
|
error: null,
|
|
@@ -7288,9 +7374,11 @@ const MbComponent = class {
|
|
|
7288
7374
|
break;
|
|
7289
7375
|
case RecognitionStatus.DetectionStatusFail:
|
|
7290
7376
|
this.cameraExperience.setState(CameraExperienceState.Default, this.isBackSide);
|
|
7377
|
+
this.status.emit(StatusDocumentDetector.DOCUMENT_NOT_FOUND);
|
|
7291
7378
|
break;
|
|
7292
7379
|
case RecognitionStatus.DetectionStatusSuccess:
|
|
7293
7380
|
this.detectionSuccessLock = true;
|
|
7381
|
+
this.status.emit(StatusDocumentDetector.DOCUMENT_DETECTED);
|
|
7294
7382
|
window.setTimeout(() => {
|
|
7295
7383
|
if (this.detectionSuccessLock) {
|
|
7296
7384
|
this.cameraExperience.setState(CameraExperienceState.Detection);
|
|
@@ -7434,6 +7522,8 @@ const MbComponent = class {
|
|
|
7434
7522
|
break;
|
|
7435
7523
|
// handle flipping of other documents
|
|
7436
7524
|
case RecognitionStatus.OnFirstSideResult:
|
|
7525
|
+
this.status.emit(StatusDocumentDetector.CHANGE_SIDE);
|
|
7526
|
+
this.status.emit(StatusDocumentDetector.BACK_SIDE_DETECTION);
|
|
7437
7527
|
this.sdkService.videoRecognizer.pauseRecognition();
|
|
7438
7528
|
window.setTimeout(async () => {
|
|
7439
7529
|
if (this.areHelpScreensOpen) {
|
package/dist/esm/loader.js
CHANGED
|
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
13
|
return patchEsm().then(() => {
|
|
14
|
-
return bootstrapLazy([["mb-tooltip",[[1,"mb-tooltip",{"show":[4],"message":[1],"arrowPosition":[1,"arrow-position"],"showWarningIcon":[4,"show-warning-icon"],"showInfoIcon":[4,"show-info-icon"],"textAlign":[1,"text-align"],"containerWidth":[1,"container-width"]}]]],["document-detector_19",[[1,"document-detector",{"licenseKey":[1025,"license-key"],"config":[1040],"restart":[32],"setUiState":[64],"startCameraScan":[64],"startImageScan":[64],"startMultiSideImageScan":[64],"setUiMessage":[64],"getProductIntegrationInfo":[64],"restartComponent":[64]}],[1,"mb-component",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1025,"wasm-type"],"blinkIdVariant":[1,"blink-id-variant"],"recognizers":[1040],"recognizerOptions":[1040],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"includeSuccessFrame":[4,"include-success-frame"],"enableDrag":[4,"enable-drag"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"rtl":[4],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"showScanningLine":[4,"show-scanning-line"],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconDragAndDropGalleryDefault":[1,"icon-drag-and-drop-gallery-default"],"iconDragAndDropWarningDefault":[1,"icon-drag-and-drop-warning-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"sdkService":[16],"translationService":[16],"cameraId":[1,"camera-id"],"allowHelpScreens":[4,"allow-help-screens"],"allowHelpScreensFab":[4,"allow-help-screens-fab"],"allowHelpScreensOnboarding":[4,"allow-help-screens-onboarding"],"allowHelpScreensOnboardingPerpetuity":[4,"allow-help-screens-onboarding-perpetuity"],"helpScreensTooltipPauseTimeout":[2,"help-screens-tooltip-pause-timeout"],"pingProxyUrl":[1,"ping-proxy-url"],"galleryExperienceModalErrorWindowVisible":[32],"clearIsCameraActive":[32],"apiProcessStatusVisible":[32],"apiProcessStatusState":[32],"startCameraScan":[64],"startImageScan":[64],"startMultiSideImageScan":[64],"setUiState":[64]},[[8,"keyup","handleKeyUp"]]],[1,"mb-container"],[1,"mb-feedback",{"visible":[4],"paragraphClassName":[32],"paragraphValue":[32],"show":[64]}],[1,"mb-camera-experience",{"type":[1],"cameraExperienceStateDurations":[16],"showOverlay":[4,"show-overlay"],"translationService":[16],"apiState":[1,"api-state"],"cameraFlipped":[1028,"camera-flipped"],"showScanningLine":[4,"show-scanning-line"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"clearIsCameraActive":[4,"clear-is-camera-active"],"allowHelpScreens":[4,"allow-help-screens"],"allowHelpScreensFab":[4,"allow-help-screens-fab"],"allowHelpScreensOnboarding":[4,"allow-help-screens-onboarding"],"allowHelpScreensOnboardingPerpetuity":[4,"allow-help-screens-onboarding-perpetuity"],"helpScreensTooltipPauseTimeout":[2,"help-screens-tooltip-pause-timeout"],"cameraCursorBarcodeClassName":[32],"cameraCursorIdentityCardClassName":[32],"scanningLineBarcodeClassName":[32],"cameraMessageIdentityCardContent":[32],"cameraMessageIdentityCardClassName":[32],"setActiveCamera":[64],"populateCameraDevices":[64],"setCameraFlipState":[64],"initializeHelpScreens":[64],"openHelpScreensOnboarding":[64],"terminateHelpScreens":[64],"setState":[64],"resetState":[64]}],[1,"mb-api-process-status",{"visible":[4],"state":[1],"translationService":[16]}],[1,"mb-button",{"clickHandler":[16],"disabled":[4],"visible":[4],"selected":[4],"imageSrcDefault":[1,"image-src-default"],"imageSrcActive":[1,"image-src-active"],"imageAlt":[1,"image-alt"],"label":[1],"buttonTitle":[1,"button-title"]}],[1,"mb-completed",{"icon":[1]}],[1,"mb-image-box",{"boxTitle":[1,"box-title"],"anchorText":[1,"anchor-text"],"clear":[64]}],[1,"mb-screen",{"visible":[4]}],[1,"mb-spinner",{"icon":[1],"size":[1]}],[1,"mb-help",{"allow":[4],"allowFab":[4,"allow-fab"],"allowOnboarding":[4,"allow-onboarding"],"allowOnboardingPerpetuity":[4,"allow-onboarding-perpetuity"],"tooltipPauseTimeout":[2,"tooltip-pause-timeout"],"translationService":[16],"isInitialized":[32],"isTooltipShownHover":[32],"isTooltipShownTimer":[32],"isModalShown":[32],"activeStepIndex":[32],"initialize":[64],"openOnboarding":[64],"openHelpScreens":[64],"close":[64],"terminate":[64]}],[1,"mb-camera-toolbar",{"showClose":[4,"show-close"],"clearIsCameraActive":[4,"clear-is-camera-active"],"enableCameraFlip":[4,"enable-camera-flip"],"cameraFlipped":[4,"camera-flipped"],"showCloseButton":[32],"isDesktop":[32],"setActiveCamera":[64],"populateCameraDevices":[64]},[[2,"setIsCameraActive","handleSetIsCameraActive"]]],[1,"mb-button-classic",{"inverted":[4],"quit":[4],"disabled":[4],"preventDefault":[4,"prevent-default"],"clickHandler":[16]}],[1,"mb-camera-selection",{"clearIsCameraActive":[4,"clear-is-camera-active"],"activeCamera":[32],"cameraList":[32],"isListVisible":[32],"setActiveCamera":[64],"populateCameraDevices":[64]}],[1,"mb-overlay",{"fullscreen":[4],"visible":[4]}],[1,"mb-progress-tracker",{"size":[2],"current":[2]}],[1,"mb-tooltip-advanced",{"show":[4],"message":[1],"arrowPosition":[1,"arrow-position"],"textAlign":[1,"text-align"]}],[1,"mb-modal",{"visible":[4],"elevated":[4],"centered":[4],"modalTitle":[1,"modal-title"],"content":[1],"contentCentered":[4,"content-centered"],"showBackButton":[4,"show-back-button"],"hideFooter":[4,"hide-footer"],"hideCloseButton":[4,"hide-close-button"]}]]]], options);
|
|
14
|
+
return bootstrapLazy([["mb-tooltip",[[1,"mb-tooltip",{"show":[4],"message":[1],"arrowPosition":[1,"arrow-position"],"showWarningIcon":[4,"show-warning-icon"],"showInfoIcon":[4,"show-info-icon"],"textAlign":[1,"text-align"],"containerWidth":[1,"container-width"]}]]],["document-detector_19",[[1,"document-detector",{"licenseKey":[1025,"license-key"],"config":[1040],"restart":[32],"blinkIdVariant":[32],"recognizerOptions":[32],"setUiState":[64],"startCameraScan":[64],"startImageScan":[64],"startMultiSideImageScan":[64],"setUiMessage":[64],"getProductIntegrationInfo":[64],"restartComponent":[64]}],[1,"mb-component",{"allowHelloMessage":[4,"allow-hello-message"],"engineLocation":[1,"engine-location"],"workerLocation":[1,"worker-location"],"licenseKey":[1,"license-key"],"wasmType":[1025,"wasm-type"],"blinkIdVariant":[1,"blink-id-variant"],"recognizers":[1040],"recognizerOptions":[1040],"recognitionTimeout":[2,"recognition-timeout"],"recognitionPauseTimeout":[2,"recognition-pause-timeout"],"cameraExperienceStateDurations":[16],"includeSuccessFrame":[4,"include-success-frame"],"enableDrag":[4,"enable-drag"],"hideLoadingAndErrorUi":[4,"hide-loading-and-error-ui"],"rtl":[4],"scanFromCamera":[4,"scan-from-camera"],"scanFromImage":[4,"scan-from-image"],"thoroughScanFromImage":[4,"thorough-scan-from-image"],"galleryOverlayType":[1,"gallery-overlay-type"],"galleryDropType":[1,"gallery-drop-type"],"showActionLabels":[4,"show-action-labels"],"showModalWindows":[4,"show-modal-windows"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"showScanningLine":[4,"show-scanning-line"],"iconCameraDefault":[1,"icon-camera-default"],"iconCameraActive":[1,"icon-camera-active"],"iconGalleryDefault":[1,"icon-gallery-default"],"iconDragAndDropGalleryDefault":[1,"icon-drag-and-drop-gallery-default"],"iconDragAndDropWarningDefault":[1,"icon-drag-and-drop-warning-default"],"iconGalleryActive":[1,"icon-gallery-active"],"iconInvalidFormat":[1,"icon-invalid-format"],"iconSpinnerScreenLoading":[1,"icon-spinner-screen-loading"],"iconSpinnerFromGalleryExperience":[1,"icon-spinner-from-gallery-experience"],"iconGalleryScanningCompleted":[1,"icon-gallery-scanning-completed"],"sdkService":[16],"translationService":[16],"cameraId":[1,"camera-id"],"allowHelpScreens":[4,"allow-help-screens"],"allowHelpScreensFab":[4,"allow-help-screens-fab"],"allowHelpScreensOnboarding":[4,"allow-help-screens-onboarding"],"allowHelpScreensOnboardingPerpetuity":[4,"allow-help-screens-onboarding-perpetuity"],"helpScreensTooltipPauseTimeout":[2,"help-screens-tooltip-pause-timeout"],"pingProxyUrl":[1,"ping-proxy-url"],"galleryExperienceModalErrorWindowVisible":[32],"clearIsCameraActive":[32],"apiProcessStatusVisible":[32],"apiProcessStatusState":[32],"startCameraScan":[64],"startImageScan":[64],"startMultiSideImageScan":[64],"setUiState":[64]},[[8,"keyup","handleKeyUp"]]],[1,"mb-container"],[1,"mb-feedback",{"visible":[4],"paragraphClassName":[32],"paragraphValue":[32],"show":[64]}],[1,"mb-camera-experience",{"type":[1],"cameraExperienceStateDurations":[16],"showOverlay":[4,"show-overlay"],"translationService":[16],"apiState":[1,"api-state"],"cameraFlipped":[1028,"camera-flipped"],"showScanningLine":[4,"show-scanning-line"],"showCameraFeedbackBarcodeMessage":[4,"show-camera-feedback-barcode-message"],"clearIsCameraActive":[4,"clear-is-camera-active"],"allowHelpScreens":[4,"allow-help-screens"],"allowHelpScreensFab":[4,"allow-help-screens-fab"],"allowHelpScreensOnboarding":[4,"allow-help-screens-onboarding"],"allowHelpScreensOnboardingPerpetuity":[4,"allow-help-screens-onboarding-perpetuity"],"helpScreensTooltipPauseTimeout":[2,"help-screens-tooltip-pause-timeout"],"cameraCursorBarcodeClassName":[32],"cameraCursorIdentityCardClassName":[32],"scanningLineBarcodeClassName":[32],"cameraMessageIdentityCardContent":[32],"cameraMessageIdentityCardClassName":[32],"setActiveCamera":[64],"populateCameraDevices":[64],"setCameraFlipState":[64],"initializeHelpScreens":[64],"openHelpScreensOnboarding":[64],"terminateHelpScreens":[64],"setState":[64],"resetState":[64]}],[1,"mb-api-process-status",{"visible":[4],"state":[1],"translationService":[16]}],[1,"mb-button",{"clickHandler":[16],"disabled":[4],"visible":[4],"selected":[4],"imageSrcDefault":[1,"image-src-default"],"imageSrcActive":[1,"image-src-active"],"imageAlt":[1,"image-alt"],"label":[1],"buttonTitle":[1,"button-title"]}],[1,"mb-completed",{"icon":[1]}],[1,"mb-image-box",{"boxTitle":[1,"box-title"],"anchorText":[1,"anchor-text"],"clear":[64]}],[1,"mb-screen",{"visible":[4]}],[1,"mb-spinner",{"icon":[1],"size":[1]}],[1,"mb-help",{"allow":[4],"allowFab":[4,"allow-fab"],"allowOnboarding":[4,"allow-onboarding"],"allowOnboardingPerpetuity":[4,"allow-onboarding-perpetuity"],"tooltipPauseTimeout":[2,"tooltip-pause-timeout"],"translationService":[16],"isInitialized":[32],"isTooltipShownHover":[32],"isTooltipShownTimer":[32],"isModalShown":[32],"activeStepIndex":[32],"initialize":[64],"openOnboarding":[64],"openHelpScreens":[64],"close":[64],"terminate":[64]}],[1,"mb-camera-toolbar",{"showClose":[4,"show-close"],"clearIsCameraActive":[4,"clear-is-camera-active"],"enableCameraFlip":[4,"enable-camera-flip"],"cameraFlipped":[4,"camera-flipped"],"showCloseButton":[32],"isDesktop":[32],"setActiveCamera":[64],"populateCameraDevices":[64]},[[2,"setIsCameraActive","handleSetIsCameraActive"]]],[1,"mb-button-classic",{"inverted":[4],"quit":[4],"disabled":[4],"preventDefault":[4,"prevent-default"],"clickHandler":[16]}],[1,"mb-camera-selection",{"clearIsCameraActive":[4,"clear-is-camera-active"],"activeCamera":[32],"cameraList":[32],"isListVisible":[32],"setActiveCamera":[64],"populateCameraDevices":[64]}],[1,"mb-overlay",{"fullscreen":[4],"visible":[4]}],[1,"mb-progress-tracker",{"size":[2],"current":[2]}],[1,"mb-tooltip-advanced",{"show":[4],"message":[1],"arrowPosition":[1,"arrow-position"],"textAlign":[1,"text-align"]}],[1,"mb-modal",{"visible":[4],"elevated":[4],"centered":[4],"modalTitle":[1,"modal-title"],"content":[1],"contentCentered":[4,"content-centered"],"showBackButton":[4,"show-back-button"],"hideFooter":[4,"hide-footer"],"hideCloseButton":[4,"hide-close-button"]}]]]], options);
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
|