@jaak.ai/stamps 1.0.0-beta.2 → 1.0.0-dev.10

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.
@@ -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/i.test(navigator.userAgent);
6069
+ }
6070
+
6034
6071
  var StatusDocumentDetector;
6035
6072
  (function (StatusDocumentDetector) {
6036
6073
  StatusDocumentDetector["RECORDING"] = "RECORDING";
@@ -6059,7 +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";
6099
+ this.blinkIdVariant = isDesktop() ? "full" : "lightweight";
6063
6100
  this.recognizers = ['BlinkIdMultiSideRecognizer'];
6064
6101
  this.recognizerOptions = {
6065
6102
  BlinkIdMultiSideRecognizer: {
@@ -6280,43 +6317,6 @@ const MbButton = class {
6280
6317
  };
6281
6318
  MbButton.style = mbButtonCss;
6282
6319
 
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
6320
  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
6321
 
6322
6322
  const MbButtonClassic = class {
@@ -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,7 +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
+ this.blinkIdVariant = DeviceHelpers.isDesktop() ? "full" : "lightweight";
14
15
  this.recognizers = ['BlinkIdMultiSideRecognizer'];
15
16
  this.recognizerOptions = {
16
17
  BlinkIdMultiSideRecognizer: {
@@ -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/i.test(navigator.userAgent);
6065
+ }
6066
+
6030
6067
  var StatusDocumentDetector;
6031
6068
  (function (StatusDocumentDetector) {
6032
6069
  StatusDocumentDetector["RECORDING"] = "RECORDING";
@@ -6055,7 +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";
6095
+ this.blinkIdVariant = isDesktop() ? "full" : "lightweight";
6059
6096
  this.recognizers = ['BlinkIdMultiSideRecognizer'];
6060
6097
  this.recognizerOptions = {
6061
6098
  BlinkIdMultiSideRecognizer: {
@@ -6276,43 +6313,6 @@ const MbButton = class {
6276
6313
  };
6277
6314
  MbButton.style = mbButtonCss;
6278
6315
 
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
6316
  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
6317
 
6318
6318
  const MbButtonClassic = class {