@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
package/README.md
CHANGED
|
@@ -264,6 +264,10 @@ El `document-detector` es un componente web que utiliza tecnología de reconocim
|
|
|
264
264
|
- **Captura de imágenes**: Guarda imágenes del documento, rostro y firma cuando están disponibles.
|
|
265
265
|
- **Interfaz personalizable**: Permite adaptar la apariencia y comportamiento a las necesidades de tu aplicación.
|
|
266
266
|
- **Eventos detallados**: Proporciona eventos para cada etapa del proceso de escaneo.
|
|
267
|
+
- **Modo dinámico**: Optimiza automáticamente el rendimiento según el dispositivo (escritorio o móvil).
|
|
268
|
+
- **Filtros de calidad ajustables**: Controla la rigurosidad de los filtros de desenfoque y brillo.
|
|
269
|
+
- **Traducciones personalizables**: Permite personalizar todos los mensajes mostrados al usuario.
|
|
270
|
+
- **Capacidad de reinicio**: Facilita reiniciar el componente sin necesidad de recargarlo.
|
|
267
271
|
|
|
268
272
|
### Ciclo de Vida del Componente
|
|
269
273
|
|
|
@@ -287,9 +291,20 @@ El `document-detector` es un componente web que utiliza tecnología de reconocim
|
|
|
287
291
|
license-key="TU_CLAVE_DE_LICENCIA">
|
|
288
292
|
</document-detector>
|
|
289
293
|
|
|
290
|
-
<!-- O usando la propiedad config -->
|
|
294
|
+
<!-- O usando la propiedad config con opciones avanzadas -->
|
|
291
295
|
<document-detector
|
|
292
|
-
config='{
|
|
296
|
+
config='{
|
|
297
|
+
"key": "TU_CLAVE_DE_LICENCIA",
|
|
298
|
+
"dynamicMode": true,
|
|
299
|
+
"strictMode": true,
|
|
300
|
+
"translation": {
|
|
301
|
+
"front": "Escanea el frente de tu documento",
|
|
302
|
+
"back": "Ahora escanea el reverso",
|
|
303
|
+
"changeSide": "Voltea el documento",
|
|
304
|
+
"cameraFeedbackBlur": "El documento está borroso",
|
|
305
|
+
"cameraFeedbackGlare": "Evita el reflejo en el documento"
|
|
306
|
+
}
|
|
307
|
+
}'>
|
|
293
308
|
</document-detector>
|
|
294
309
|
```
|
|
295
310
|
|
|
@@ -307,15 +322,30 @@ detector.addEventListener('status', (event) => {
|
|
|
307
322
|
case 'INITIALIZING':
|
|
308
323
|
console.log('El detector se está inicializando');
|
|
309
324
|
break;
|
|
310
|
-
case 'READY':
|
|
311
|
-
console.log('El detector está listo para escanear');
|
|
312
|
-
break;
|
|
313
325
|
case 'RECORDING':
|
|
314
326
|
console.log('La cámara está activa y grabando');
|
|
315
327
|
break;
|
|
328
|
+
case 'FRONT_SIDE_DETECTION':
|
|
329
|
+
console.log('Detectando el frente del documento');
|
|
330
|
+
break;
|
|
331
|
+
case 'BACK_SIDE_DETECTION':
|
|
332
|
+
console.log('Detectando el reverso del documento');
|
|
333
|
+
break;
|
|
334
|
+
case 'DOCUMENT_DETECTED':
|
|
335
|
+
console.log('Documento detectado correctamente');
|
|
336
|
+
break;
|
|
337
|
+
case 'CHANGE_SIDE':
|
|
338
|
+
console.log('Es necesario voltear el documento');
|
|
339
|
+
break;
|
|
316
340
|
case 'RESULTS_SUCCESS':
|
|
317
341
|
console.log('Se han obtenido resultados exitosamente');
|
|
318
342
|
break;
|
|
343
|
+
case 'RESULTS_EMPTY':
|
|
344
|
+
console.log('No se encontraron datos en el documento');
|
|
345
|
+
break;
|
|
346
|
+
case 'DETECTION_FAILED':
|
|
347
|
+
console.log('Falló la detección del documento');
|
|
348
|
+
break;
|
|
319
349
|
case 'ERROR':
|
|
320
350
|
console.log('Ha ocurrido un error en el detector');
|
|
321
351
|
break;
|
|
@@ -356,6 +386,8 @@ function escanearDesdeImagen(archivo) {
|
|
|
356
386
|
// Reiniciar el componente (útil cuando se necesita resetear el estado)
|
|
357
387
|
function reiniciarEscaneo() {
|
|
358
388
|
detector.restartComponent();
|
|
389
|
+
// El método restartComponent reinicia internamente el componente y vuelve a iniciar
|
|
390
|
+
// el escaneo por cámara automáticamente, sin necesidad de llamar a startCameraScan()
|
|
359
391
|
}
|
|
360
392
|
|
|
361
393
|
// Ejemplo de uso con un input de archivo
|
|
@@ -393,7 +425,31 @@ document-detector::part(mb-camera-video) {
|
|
|
393
425
|
| Propiedad | Tipo | Descripción |
|
|
394
426
|
|--------------------------|-------------------------------------------|--------------------------------------------|
|
|
395
427
|
| `license-key` | string | Clave de licencia para el SDK |
|
|
396
|
-
| `config` |
|
|
428
|
+
| `config` | object | Configuración del componente (ver detalle abajo) |
|
|
429
|
+
|
|
430
|
+
#### Objeto de configuración (`config`)
|
|
431
|
+
|
|
432
|
+
| Propiedad | Tipo | Descripción |
|
|
433
|
+
|--------------------------|-------------------------------------------|--------------------------------------------|
|
|
434
|
+
| `key` | string | Clave de licencia para el SDK |
|
|
435
|
+
| `dynamicMode` | boolean | Cuando está activado, utiliza la variante completa del SDK en escritorio y la ligera en móviles |
|
|
436
|
+
| `strictMode` | boolean | Controla los filtros de desenfoque y brillo. Cuando está activado, se aplican filtros más estrictos |
|
|
437
|
+
| `translation` | object | Configuración de traducciones personalizadas (ver detalle abajo) |
|
|
438
|
+
|
|
439
|
+
#### Objeto de traducción (`config.translation`)
|
|
440
|
+
|
|
441
|
+
| Propiedad | Tipo | Descripción |
|
|
442
|
+
|--------------------------------|-------------------------------------------|--------------------------------------------|
|
|
443
|
+
| `front` | string | Mensaje para escanear el frente del documento |
|
|
444
|
+
| `back` | string | Mensaje para escanear el reverso del documento |
|
|
445
|
+
| `changeSide` | string | Mensaje para voltear el documento |
|
|
446
|
+
| `adjustAngle` | string | Mensaje para ajustar el ángulo del documento |
|
|
447
|
+
| `cameraFeedbackBlur` | string | Mensaje cuando el documento está borroso |
|
|
448
|
+
| `cameraFeedbackFacePhotoCovered`| string | Mensaje cuando la foto de la cara está cubierta |
|
|
449
|
+
| `cameraFeedbackGlare` | string | Mensaje cuando hay deslumbramiento en el documento |
|
|
450
|
+
| `cameraFeedbackWrongSide` | string | Mensaje cuando se muestra el lado incorrecto del documento |
|
|
451
|
+
| `moveCloser` | string | Mensaje para acercar el documento |
|
|
452
|
+
| `moveFarther` | string | Mensaje para alejar el documento |
|
|
397
453
|
|
|
398
454
|
### Eventos
|
|
399
455
|
|
|
@@ -426,13 +482,18 @@ document-detector::part(mb-camera-video) {
|
|
|
426
482
|
|
|
427
483
|
```typescript
|
|
428
484
|
enum StatusDocumentDetector {
|
|
429
|
-
INITIALIZING = "INITIALIZING",
|
|
430
|
-
READY = "READY",
|
|
431
485
|
RECORDING = "RECORDING",
|
|
486
|
+
ERROR = "ERROR",
|
|
432
487
|
RUNNING = "RUNNING",
|
|
488
|
+
INITIALIZING = "INITIALIZING",
|
|
489
|
+
FRONT_SIDE_DETECTION = "FRONT_SIDE_DETECTION",
|
|
490
|
+
BACK_SIDE_DETECTION = "BACK_SIDE_DETECTION",
|
|
491
|
+
DOCUMENT_NOT_FOUND = "DOCUMENT_NOT_FOUND",
|
|
492
|
+
DOCUMENT_DETECTED = "DOCUMENT_DETECTED",
|
|
493
|
+
CHANGE_SIDE = "CHANGE_SIDE",
|
|
433
494
|
RESULTS_SUCCESS = "RESULTS_SUCCESS",
|
|
434
|
-
|
|
435
|
-
|
|
495
|
+
RESULTS_EMPTY = "RESULTS_EMPTY",
|
|
496
|
+
DETECTION_FAILED = "DETECTION_FAILED"
|
|
436
497
|
}
|
|
437
498
|
```
|
|
438
499
|
|
|
@@ -6031,6 +6031,43 @@ function setWebComponentParts(hostEl) {
|
|
|
6031
6031
|
hostEl.setAttribute("part", partParts.join(" ").trim());
|
|
6032
6032
|
}
|
|
6033
6033
|
|
|
6034
|
+
function hasVideoDevices() {
|
|
6035
|
+
return new Promise((resolve) => {
|
|
6036
|
+
if (!window.navigator ||
|
|
6037
|
+
!window.navigator.mediaDevices ||
|
|
6038
|
+
typeof window.navigator.mediaDevices.enumerateDevices !== "function") {
|
|
6039
|
+
resolve(false);
|
|
6040
|
+
return;
|
|
6041
|
+
}
|
|
6042
|
+
window.navigator.mediaDevices.enumerateDevices().then((devices) => {
|
|
6043
|
+
devices = devices || [];
|
|
6044
|
+
for (const device of devices) {
|
|
6045
|
+
if (device && device.kind === "videoinput") {
|
|
6046
|
+
resolve(true);
|
|
6047
|
+
return;
|
|
6048
|
+
}
|
|
6049
|
+
}
|
|
6050
|
+
resolve(false);
|
|
6051
|
+
});
|
|
6052
|
+
});
|
|
6053
|
+
}
|
|
6054
|
+
function isWasmSupported() {
|
|
6055
|
+
return new Promise((resolve) => {
|
|
6056
|
+
const wasmSupport = isBrowserSupported();
|
|
6057
|
+
resolve(wasmSupport);
|
|
6058
|
+
});
|
|
6059
|
+
}
|
|
6060
|
+
async function checkMandatoryCapabilites() {
|
|
6061
|
+
const wasmSupport = await isWasmSupported();
|
|
6062
|
+
return wasmSupport;
|
|
6063
|
+
}
|
|
6064
|
+
/**
|
|
6065
|
+
* Determine whether this is a desktop device based on the screen resolution.
|
|
6066
|
+
*/
|
|
6067
|
+
function isDesktop() {
|
|
6068
|
+
return !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile|Tablet/i.test(navigator.userAgent);
|
|
6069
|
+
}
|
|
6070
|
+
|
|
6034
6071
|
var StatusDocumentDetector;
|
|
6035
6072
|
(function (StatusDocumentDetector) {
|
|
6036
6073
|
StatusDocumentDetector["RECORDING"] = "RECORDING";
|
|
@@ -6059,22 +6096,7 @@ const DocumentDetector = class {
|
|
|
6059
6096
|
this.engineLocation = "https://storage.googleapis.com/jaak-storage/models/web/document-detector/v2.0.0";
|
|
6060
6097
|
this.workerLocation = "https://storage.googleapis.com/jaak-storage/models/web/document-detector/v2.0.0/BlinkIDWasmSDK.worker.min.js";
|
|
6061
6098
|
this.wasmType = "ADVANCE";
|
|
6062
|
-
this.blinkIdVariant = "lightweight";
|
|
6063
6099
|
this.recognizers = ['BlinkIdMultiSideRecognizer'];
|
|
6064
|
-
this.recognizerOptions = {
|
|
6065
|
-
BlinkIdMultiSideRecognizer: {
|
|
6066
|
-
returnEncodedFullDocumentImage: true,
|
|
6067
|
-
returnEncodedFaceImage: true,
|
|
6068
|
-
returnEncodedSignatureImage: true,
|
|
6069
|
-
fullDocumentImageExtensionFactors: {
|
|
6070
|
-
upFactor: 0.1,
|
|
6071
|
-
downFactor: 0.1,
|
|
6072
|
-
leftFactor: 0.1,
|
|
6073
|
-
rightFactor: 0.1
|
|
6074
|
-
},
|
|
6075
|
-
fullDocumentImageDpi: 300
|
|
6076
|
-
}
|
|
6077
|
-
};
|
|
6078
6100
|
this.recognitionPauseTimeout = 3800;
|
|
6079
6101
|
this.cameraExperienceStateDurations = null;
|
|
6080
6102
|
this.enableDrag = false;
|
|
@@ -6102,7 +6124,7 @@ const DocumentDetector = class {
|
|
|
6102
6124
|
};
|
|
6103
6125
|
this.ready = {
|
|
6104
6126
|
emit: (data) => {
|
|
6105
|
-
this.status.emit(StatusDocumentDetector.
|
|
6127
|
+
this.status.emit(StatusDocumentDetector.RECORDING);
|
|
6106
6128
|
return undefined;
|
|
6107
6129
|
}
|
|
6108
6130
|
};
|
|
@@ -6121,13 +6143,12 @@ const DocumentDetector = class {
|
|
|
6121
6143
|
};
|
|
6122
6144
|
this.feedback = {
|
|
6123
6145
|
emit: (data) => {
|
|
6124
|
-
console.log(data);
|
|
6125
6146
|
return undefined;
|
|
6126
6147
|
}
|
|
6127
6148
|
};
|
|
6128
6149
|
this.cameraScanStarted = {
|
|
6129
6150
|
emit: () => {
|
|
6130
|
-
this.status.emit(StatusDocumentDetector.
|
|
6151
|
+
this.status.emit(StatusDocumentDetector.FRONT_SIDE_DETECTION);
|
|
6131
6152
|
return undefined;
|
|
6132
6153
|
}
|
|
6133
6154
|
};
|
|
@@ -6145,17 +6166,57 @@ const DocumentDetector = class {
|
|
|
6145
6166
|
};
|
|
6146
6167
|
this.restart = false;
|
|
6147
6168
|
this.licenseKey = undefined;
|
|
6169
|
+
this.blinkIdVariant = "lightweight";
|
|
6170
|
+
this.recognizerOptions = {
|
|
6171
|
+
BlinkIdMultiSideRecognizer: {
|
|
6172
|
+
returnEncodedFullDocumentImage: true,
|
|
6173
|
+
returnEncodedFaceImage: true,
|
|
6174
|
+
returnEncodedSignatureImage: true,
|
|
6175
|
+
fullDocumentImageExtensionFactors: {
|
|
6176
|
+
upFactor: 0.1,
|
|
6177
|
+
downFactor: 0.1,
|
|
6178
|
+
leftFactor: 0.1,
|
|
6179
|
+
rightFactor: 0.1
|
|
6180
|
+
},
|
|
6181
|
+
fullDocumentImageDpi: 300
|
|
6182
|
+
}
|
|
6183
|
+
};
|
|
6148
6184
|
this.config = undefined;
|
|
6149
6185
|
}
|
|
6150
6186
|
configHandler(newConfig) {
|
|
6151
|
-
if (newConfig
|
|
6187
|
+
if (newConfig) {
|
|
6152
6188
|
this.licenseKey = newConfig.key;
|
|
6189
|
+
this.blinkIdVariant = newConfig.dynamicMode ? (isDesktop() ? "full" : "lightweight") : "lightweight";
|
|
6190
|
+
if (newConfig.strictMode === false) {
|
|
6191
|
+
this.recognizerOptions = {
|
|
6192
|
+
BlinkIdMultiSideRecognizer: {
|
|
6193
|
+
...this.recognizerOptions.BlinkIdMultiSideRecognizer,
|
|
6194
|
+
enableBlurFilter: false,
|
|
6195
|
+
enableGlareFilter: false,
|
|
6196
|
+
blurStrictnessLevel: 2,
|
|
6197
|
+
glareStrictnessLevel: 2
|
|
6198
|
+
}
|
|
6199
|
+
};
|
|
6200
|
+
}
|
|
6201
|
+
else {
|
|
6202
|
+
this.recognizerOptions = {
|
|
6203
|
+
BlinkIdMultiSideRecognizer: {
|
|
6204
|
+
...this.recognizerOptions.BlinkIdMultiSideRecognizer,
|
|
6205
|
+
enableBlurFilter: true,
|
|
6206
|
+
enableGlareFilter: true,
|
|
6207
|
+
blurStrictnessLevel: 1,
|
|
6208
|
+
glareStrictnessLevel: 1
|
|
6209
|
+
}
|
|
6210
|
+
};
|
|
6211
|
+
}
|
|
6212
|
+
this.init();
|
|
6153
6213
|
}
|
|
6154
6214
|
}
|
|
6155
6215
|
async setUiState(state) {
|
|
6156
6216
|
this.mbComponentEl.setUiState(state);
|
|
6157
6217
|
}
|
|
6158
6218
|
async startCameraScan() {
|
|
6219
|
+
this.status.emit(StatusDocumentDetector.INITIALIZING);
|
|
6159
6220
|
this.mbComponentEl.startCameraScan();
|
|
6160
6221
|
}
|
|
6161
6222
|
async startImageScan(file) {
|
|
@@ -6182,8 +6243,31 @@ const DocumentDetector = class {
|
|
|
6182
6243
|
}, 100);
|
|
6183
6244
|
}
|
|
6184
6245
|
componentWillLoad() {
|
|
6185
|
-
if (this.config
|
|
6246
|
+
if (this.config) {
|
|
6186
6247
|
this.licenseKey = this.config.key;
|
|
6248
|
+
this.blinkIdVariant = this.config.dynamicMode ? (isDesktop() ? "full" : "lightweight") : "lightweight";
|
|
6249
|
+
if (this.config.strictMode === false) {
|
|
6250
|
+
this.recognizerOptions = {
|
|
6251
|
+
BlinkIdMultiSideRecognizer: {
|
|
6252
|
+
...this.recognizerOptions.BlinkIdMultiSideRecognizer,
|
|
6253
|
+
enableBlurFilter: false,
|
|
6254
|
+
enableGlareFilter: false,
|
|
6255
|
+
blurStrictnessLevel: 2,
|
|
6256
|
+
glareStrictnessLevel: 2
|
|
6257
|
+
}
|
|
6258
|
+
};
|
|
6259
|
+
}
|
|
6260
|
+
else {
|
|
6261
|
+
this.recognizerOptions = {
|
|
6262
|
+
BlinkIdMultiSideRecognizer: {
|
|
6263
|
+
...this.recognizerOptions.BlinkIdMultiSideRecognizer,
|
|
6264
|
+
enableBlurFilter: true,
|
|
6265
|
+
enableGlareFilter: true,
|
|
6266
|
+
blurStrictnessLevel: 1,
|
|
6267
|
+
glareStrictnessLevel: 1
|
|
6268
|
+
}
|
|
6269
|
+
};
|
|
6270
|
+
}
|
|
6187
6271
|
}
|
|
6188
6272
|
this.init();
|
|
6189
6273
|
}
|
|
@@ -6209,7 +6293,45 @@ const DocumentDetector = class {
|
|
|
6209
6293
|
this.finalTranslations = this.translations
|
|
6210
6294
|
? this.translations
|
|
6211
6295
|
: rawTranslations;
|
|
6212
|
-
|
|
6296
|
+
const customTranslations = {};
|
|
6297
|
+
if (this.config && this.config.translation) {
|
|
6298
|
+
if (this.config.translation.front) {
|
|
6299
|
+
customTranslations["camera-feedback-scan-front"] = this.config.translation.front;
|
|
6300
|
+
}
|
|
6301
|
+
if (this.config.translation.back) {
|
|
6302
|
+
customTranslations["camera-feedback-scan-back"] = this.config.translation.back;
|
|
6303
|
+
}
|
|
6304
|
+
if (this.config.translation.changeSide) {
|
|
6305
|
+
customTranslations["camera-feedback-flip"] = this.config.translation.changeSide;
|
|
6306
|
+
}
|
|
6307
|
+
if (this.config.translation.adjustAngle) {
|
|
6308
|
+
customTranslations["camera-feedback-adjust-angle"] = this.config.translation.adjustAngle;
|
|
6309
|
+
}
|
|
6310
|
+
if (this.config.translation.cameraFeedbackBlur) {
|
|
6311
|
+
customTranslations["camera-feedback-blur"] = this.config.translation.cameraFeedbackBlur;
|
|
6312
|
+
}
|
|
6313
|
+
if (this.config.translation.cameraFeedbackFacePhotoCovered) {
|
|
6314
|
+
customTranslations["camera-feedback-face-photo-covered"] = this.config.translation.cameraFeedbackFacePhotoCovered;
|
|
6315
|
+
}
|
|
6316
|
+
if (this.config.translation.cameraFeedbackGlare) {
|
|
6317
|
+
customTranslations["camera-feedback-glare"] = this.config.translation.cameraFeedbackGlare;
|
|
6318
|
+
}
|
|
6319
|
+
if (this.config.translation.cameraFeedbackWrongSide) {
|
|
6320
|
+
customTranslations["camera-feedback-wrong-side"] = this.config.translation.cameraFeedbackWrongSide;
|
|
6321
|
+
}
|
|
6322
|
+
if (this.config.translation.moveCloser) {
|
|
6323
|
+
customTranslations["camera-feedback-move-closer"] = this.config.translation.moveCloser;
|
|
6324
|
+
}
|
|
6325
|
+
if (this.config.translation.moveFarther) {
|
|
6326
|
+
customTranslations["camera-feedback-move-farther"] = this.config.translation.moveFarther;
|
|
6327
|
+
}
|
|
6328
|
+
}
|
|
6329
|
+
// Merge custom translations with finalTranslations
|
|
6330
|
+
const mergedTranslations = {
|
|
6331
|
+
...(this.finalTranslations || {}),
|
|
6332
|
+
...customTranslations
|
|
6333
|
+
};
|
|
6334
|
+
this.translationService = new TranslationService(mergedTranslations);
|
|
6213
6335
|
this.sdkService = new SdkService();
|
|
6214
6336
|
}
|
|
6215
6337
|
render() {
|
|
@@ -6218,7 +6340,7 @@ const DocumentDetector = class {
|
|
|
6218
6340
|
}, onFeedback: (ev) => {
|
|
6219
6341
|
this.feedbackEl.show(ev.detail);
|
|
6220
6342
|
this.feedback.emit(ev.detail);
|
|
6221
|
-
}, 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) })), index.h("mb-feedback", { dir: this.hostEl.getAttribute("dir"), visible: !this.hideFeedback, ref: (el) => (this.feedbackEl = el) }))));
|
|
6343
|
+
}, 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) })), index.h("mb-feedback", { dir: this.hostEl.getAttribute("dir"), visible: !this.hideFeedback, ref: (el) => (this.feedbackEl = el) }))));
|
|
6222
6344
|
}
|
|
6223
6345
|
get hostEl() { return index.getElement(this); }
|
|
6224
6346
|
static get watchers() { return {
|
|
@@ -6280,43 +6402,6 @@ const MbButton = class {
|
|
|
6280
6402
|
};
|
|
6281
6403
|
MbButton.style = mbButtonCss;
|
|
6282
6404
|
|
|
6283
|
-
function hasVideoDevices() {
|
|
6284
|
-
return new Promise((resolve) => {
|
|
6285
|
-
if (!window.navigator ||
|
|
6286
|
-
!window.navigator.mediaDevices ||
|
|
6287
|
-
typeof window.navigator.mediaDevices.enumerateDevices !== "function") {
|
|
6288
|
-
resolve(false);
|
|
6289
|
-
return;
|
|
6290
|
-
}
|
|
6291
|
-
window.navigator.mediaDevices.enumerateDevices().then((devices) => {
|
|
6292
|
-
devices = devices || [];
|
|
6293
|
-
for (const device of devices) {
|
|
6294
|
-
if (device && device.kind === "videoinput") {
|
|
6295
|
-
resolve(true);
|
|
6296
|
-
return;
|
|
6297
|
-
}
|
|
6298
|
-
}
|
|
6299
|
-
resolve(false);
|
|
6300
|
-
});
|
|
6301
|
-
});
|
|
6302
|
-
}
|
|
6303
|
-
function isWasmSupported() {
|
|
6304
|
-
return new Promise((resolve) => {
|
|
6305
|
-
const wasmSupport = isBrowserSupported();
|
|
6306
|
-
resolve(wasmSupport);
|
|
6307
|
-
});
|
|
6308
|
-
}
|
|
6309
|
-
async function checkMandatoryCapabilites() {
|
|
6310
|
-
const wasmSupport = await isWasmSupported();
|
|
6311
|
-
return wasmSupport;
|
|
6312
|
-
}
|
|
6313
|
-
/**
|
|
6314
|
-
* Determine whether this is a desktop device based on the screen resolution.
|
|
6315
|
-
*/
|
|
6316
|
-
function isDesktop() {
|
|
6317
|
-
return !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
6318
|
-
}
|
|
6319
|
-
|
|
6320
6405
|
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)}";
|
|
6321
6406
|
|
|
6322
6407
|
const MbButtonClassic = class {
|
|
@@ -6903,6 +6988,7 @@ const MbComponent = class {
|
|
|
6903
6988
|
this.imageScanStarted = index.createEvent(this, "imageScanStarted", 7);
|
|
6904
6989
|
this.scanAborted = index.createEvent(this, "scanAborted", 7);
|
|
6905
6990
|
this.setIsCameraActive = index.createEvent(this, "setIsCameraActive", 7);
|
|
6991
|
+
this.status = index.createEvent(this, "status", 7);
|
|
6906
6992
|
this.screens = {
|
|
6907
6993
|
action: null,
|
|
6908
6994
|
error: null,
|
|
@@ -7292,9 +7378,11 @@ const MbComponent = class {
|
|
|
7292
7378
|
break;
|
|
7293
7379
|
case RecognitionStatus.DetectionStatusFail:
|
|
7294
7380
|
this.cameraExperience.setState(CameraExperienceState.Default, this.isBackSide);
|
|
7381
|
+
this.status.emit(StatusDocumentDetector.DOCUMENT_NOT_FOUND);
|
|
7295
7382
|
break;
|
|
7296
7383
|
case RecognitionStatus.DetectionStatusSuccess:
|
|
7297
7384
|
this.detectionSuccessLock = true;
|
|
7385
|
+
this.status.emit(StatusDocumentDetector.DOCUMENT_DETECTED);
|
|
7298
7386
|
window.setTimeout(() => {
|
|
7299
7387
|
if (this.detectionSuccessLock) {
|
|
7300
7388
|
this.cameraExperience.setState(CameraExperienceState.Detection);
|
|
@@ -7438,6 +7526,8 @@ const MbComponent = class {
|
|
|
7438
7526
|
break;
|
|
7439
7527
|
// handle flipping of other documents
|
|
7440
7528
|
case RecognitionStatus.OnFirstSideResult:
|
|
7529
|
+
this.status.emit(StatusDocumentDetector.CHANGE_SIDE);
|
|
7530
|
+
this.status.emit(StatusDocumentDetector.BACK_SIDE_DETECTION);
|
|
7441
7531
|
this.sdkService.videoRecognizer.pauseRecognition();
|
|
7442
7532
|
window.setTimeout(async () => {
|
|
7443
7533
|
if (this.areHelpScreensOpen) {
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["mb-tooltip.cjs",[[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.cjs",[[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);
|
|
17
|
+
return index.bootstrapLazy([["mb-tooltip.cjs",[[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.cjs",[[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);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
package/dist/cjs/stamps.cjs.js
CHANGED
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy([["mb-tooltip.cjs",[[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.cjs",[[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);
|
|
20
|
+
return index.bootstrapLazy([["mb-tooltip.cjs",[[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.cjs",[[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);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|