@scandit/web-datacapture-core 7.1.0-beta.1 → 7.1.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.
Files changed (121) hide show
  1. package/build/js/{Camera-Dpk6E99b.d.ts → Camera-DsOMNsZu.d.ts} +1 -0
  2. package/build/js/Camera.d.ts +3 -1
  3. package/build/js/Camera.js +1 -1
  4. package/build/js/CameraAccess.d.ts +3 -1
  5. package/build/js/CameraRelated.d.ts +3 -1
  6. package/build/js/DataCaptureContext.d.ts +3 -1
  7. package/build/js/DataCaptureContext.js +1 -1
  8. package/build/js/DataCaptureContextRelated.d.ts +3 -1
  9. package/build/js/DataCaptureVersion.js +1 -1
  10. package/build/js/DataCaptureView.d.ts +3 -1
  11. package/build/js/DataCaptureView.js +1 -1
  12. package/build/js/Defaults.d.ts +3 -1
  13. package/build/js/FrameData.d.ts +3 -1
  14. package/build/js/ImageFrameSource.d.ts +3 -1
  15. package/build/js/ScanditIcon.d.ts +50 -0
  16. package/build/js/ScanditIcon.js +1 -0
  17. package/build/js/ScanditIconBuilder.d.ts +63 -0
  18. package/build/js/ScanditIconBuilder.js +1 -0
  19. package/build/js/SingleImageUploader.d.ts +3 -1
  20. package/build/js/chunks/{chunk-FQK2YWUZ.js → chunk-4YVKSEZS.js} +1 -1
  21. package/build/js/chunks/{chunk-M46MIHI5.js → chunk-5E7ISPKS.js} +1 -1
  22. package/build/js/chunks/{chunk-BYRUZJLS.js → chunk-64US32RY.js} +1 -1
  23. package/build/js/chunks/{chunk-FTMRPIKJ.js → chunk-76CQG6HG.js} +1 -1
  24. package/build/js/chunks/{chunk-4BDVHW3U.js → chunk-7ALHRD5L.js} +1 -1
  25. package/build/js/chunks/{chunk-TCJPGGHY.js → chunk-7B2VPGLP.js} +1 -1
  26. package/build/js/chunks/chunk-7LG2KINM.js +1 -0
  27. package/build/js/chunks/chunk-A4OAOJ72.js +1 -0
  28. package/build/js/chunks/chunk-AD3CNBDO.js +1 -0
  29. package/build/js/chunks/chunk-BOCQXSFU.js +1 -0
  30. package/build/js/chunks/{chunk-FE5V34QK.js → chunk-BWOCR6MD.js} +1 -1
  31. package/build/js/chunks/{chunk-MAMZS5CH.js → chunk-DVQH5JLR.js} +1 -1
  32. package/build/js/chunks/{chunk-FJCUED6E.js → chunk-EFNSFA3N.js} +1 -1
  33. package/build/js/chunks/{chunk-5IVFVUF4.js → chunk-FFFXM7UY.js} +1 -1
  34. package/build/js/chunks/{chunk-KJS3Z56B.js → chunk-FHGLVS66.js} +1 -1
  35. package/build/js/chunks/{chunk-GMM3ROKD.js → chunk-GZ4F55TI.js} +1 -1
  36. package/build/js/chunks/{chunk-SKRKDAFC.js → chunk-KRWPFM7Z.js} +1 -1
  37. package/build/js/chunks/{chunk-6OQQP3SM.js → chunk-MST2ECFN.js} +1 -1
  38. package/build/js/chunks/{chunk-UGYFPSXM.js → chunk-QK3D2DQM.js} +1 -1
  39. package/build/js/chunks/{chunk-LFWLFZZA.js → chunk-U2GDN6EV.js} +1 -1
  40. package/build/js/index.d.ts +6 -2
  41. package/build/js/index.js +3 -3
  42. package/build/js/private/CameraAccess.d.ts +3 -1
  43. package/build/js/private/CameraManager.d.ts +3 -1
  44. package/build/js/private/CameraManager.js +1 -1
  45. package/build/js/private/CanvasDrawerWithMetrics.d.ts +3 -1
  46. package/build/js/private/CoreModuleLicenseTextProvider.d.ts +3 -1
  47. package/build/js/private/DataCaptureContextRelated.d.ts +3 -1
  48. package/build/js/private/FrameReaders/FrameReader.d.ts +3 -1
  49. package/build/js/private/FrameReaders/FrameReaderAbstract.d.ts +3 -1
  50. package/build/js/private/FrameReaders/GrayScaleFrameReader.d.ts +3 -1
  51. package/build/js/private/FrameReaders/GrayScaleFrameReader.js +1 -1
  52. package/build/js/private/FrameReaders/index.d.ts +3 -1
  53. package/build/js/private/FrameReaders/index.js +1 -1
  54. package/build/js/private/NormalizedConfigureOptions.d.ts +5 -1
  55. package/build/js/private/ViewControls+related.js +1 -1
  56. package/build/js/private/ViewControls_related.d.ts +3 -1
  57. package/build/js/private/ViewsRegistry.d.ts +3 -1
  58. package/build/js/private/ui/atoms/ArrowDownSvgIcon.js +1 -1
  59. package/build/js/private/ui/atoms/ArrowLeftSvgIcon.js +1 -1
  60. package/build/js/private/ui/atoms/ArrowRightSvgIcon.js +1 -1
  61. package/build/js/private/ui/atoms/ArrowUpSvgIcon.js +1 -1
  62. package/build/js/private/ui/atoms/ArrowsUp.js +1 -1
  63. package/build/js/private/ui/atoms/CalendarExclamationMarkSvgIcon.js +12 -12
  64. package/build/js/private/ui/atoms/CameraSwitchReverseSvgIcon.js +1 -1
  65. package/build/js/private/ui/atoms/CameraSwitchSvgIcon.js +1 -1
  66. package/build/js/private/ui/atoms/CheckSvgIcon.js +3 -3
  67. package/build/js/private/ui/atoms/{BoxWithCrossSvgIcon.d.ts → ChevronDownSvgIcon.d.ts} +5 -5
  68. package/build/js/private/ui/atoms/ChevronDownSvgIcon.js +21 -0
  69. package/build/js/private/ui/atoms/{BoxArrowDownSvgIcon.d.ts → ChevronLeftSvgIcon.d.ts} +5 -5
  70. package/build/js/private/ui/atoms/ChevronLeftSvgIcon.js +21 -0
  71. package/build/js/private/ui/atoms/ChevronRightSvgIcon.d.ts +17 -0
  72. package/build/js/private/ui/atoms/ChevronRightSvgIcon.js +20 -0
  73. package/build/js/private/ui/atoms/ChevronUpSvgIcon.d.ts +17 -0
  74. package/build/js/private/ui/atoms/ChevronUpSvgIcon.js +21 -0
  75. package/build/js/private/ui/atoms/CrossSvgIcon.js +5 -8
  76. package/build/js/private/ui/atoms/Dot5xSvgIcon.js +1 -1
  77. package/build/js/private/ui/atoms/ExclamationMarkSvgIcon.js +4 -10
  78. package/build/js/private/ui/atoms/GlassSvgIcon.js +3 -3
  79. package/build/js/private/ui/atoms/HandLensCheckSvgIcon.js +3 -11
  80. package/build/js/private/ui/atoms/LowStockSvgIcon.d.ts +17 -0
  81. package/build/js/private/ui/atoms/LowStockSvgIcon.js +12 -0
  82. package/build/js/private/ui/atoms/OnexSvgIcon.js +1 -1
  83. package/build/js/private/ui/atoms/PrinterSvgIcon.d.ts +17 -0
  84. package/build/js/private/ui/atoms/PrinterSvgIcon.js +24 -0
  85. package/build/js/private/ui/atoms/ProgressBar.js +1 -1
  86. package/build/js/private/ui/atoms/QuestionMarkSvgIcon.js +4 -17
  87. package/build/js/private/ui/atoms/RoundedCheckSvgIcon.js +1 -1
  88. package/build/js/private/ui/atoms/RoundedExclamationMarkSvgIcon.js +1 -1
  89. package/build/js/private/ui/atoms/ShutterButton.js +1 -1
  90. package/build/js/private/ui/atoms/StarFilledSvgIcon.js +3 -3
  91. package/build/js/private/ui/atoms/StarHalfFilledSvgIcon.js +1 -1
  92. package/build/js/private/ui/atoms/{StarSvgIcon.d.ts → StarOutlinedSvgIcon.d.ts} +4 -4
  93. package/build/js/private/ui/atoms/StarOutlinedSvgIcon.js +13 -0
  94. package/build/js/private/ui/atoms/SvgIcon.js +1 -1
  95. package/build/js/private/ui/atoms/ToPickSvgIcon.js +3 -18
  96. package/build/js/private/ui/atoms/Toast.d.ts +2 -1
  97. package/build/js/private/ui/atoms/Toast.js +1 -1
  98. package/build/js/private/ui/atoms/TwoxSvgIcon.js +1 -1
  99. package/build/js/private/ui/atoms/WrongItemSvgIcon.d.ts +17 -0
  100. package/build/js/private/ui/atoms/WrongItemSvgIcon.js +15 -0
  101. package/build/js/private/ui/molecules/HintPresenter.d.ts +2 -1
  102. package/build/js/private/ui/molecules/HintPresenter.js +1 -1
  103. package/build/js/private/ui/molecules/LoadingOverlay.js +1 -1
  104. package/build/js/private/utils/index.js +1 -1
  105. package/build/js/sdk.d.ts +3 -1
  106. package/build/js/worker/WorkerMain.d.ts +3 -1
  107. package/build/js/worker/WorkerMain.js +1 -1
  108. package/build/js/worker/dataCapture.inlineWorker.d.ts +3 -1
  109. package/build/js/worker/dataCapture.inlineWorker.js +1 -1
  110. package/build/js/worker/dataCaptureEngine.d.ts +3 -1
  111. package/build/js/worker/dataCaptureEngine.js +1 -1
  112. package/build/js/worker/dataCaptureLoader.d.ts +3 -1
  113. package/build/js/worker/dataCaptureWorkerRelated.d.ts +3 -1
  114. package/build/js/worker/index.d.ts +3 -1
  115. package/build/js/worker/index.js +1 -1
  116. package/package.json +1 -1
  117. package/build/js/chunks/chunk-3BMXPFN5.js +0 -1
  118. package/build/js/chunks/chunk-PZEOQRCA.js +0 -1
  119. package/build/js/private/ui/atoms/BoxArrowDownSvgIcon.js +0 -21
  120. package/build/js/private/ui/atoms/BoxWithCrossSvgIcon.js +0 -21
  121. package/build/js/private/ui/atoms/StarSvgIcon.js +0 -14
@@ -3,6 +3,7 @@ import { Serializable } from './private/Serializable.js';
3
3
  import { WatermarkStack } from './private/FrameReaders/WatermarkStack.js';
4
4
  import { Optional, MethodSignature } from './tsHelper.js';
5
5
  import { Size, Orientation, MarginsWithUnitJSON, PointWithUnitJSON, Anchor, MarginsWithUnit, PointWithUnit, Point, Quadrilateral, JSONType, RectJSON, PointJSON } from './Common.js';
6
+ import './ScanditIcon.js';
6
7
  import { DataCaptureContextSettings, DataCaptureContextSettingsJSON } from './DataCaptureContextSettings.js';
7
8
  import { LogoStyle, FocusGestureJSON, ZoomGestureJSON, FocusGesture, ZoomGesture } from './DataCaptureViewPlusRelated.js';
8
9
  import { Control } from './ViewControls.js';
@@ -1,9 +1,11 @@
1
1
  /// <reference types="emscripten" />
2
- export { g as Camera, e as CameraJSON, f as VideoFrameResolution } from './Camera-Dpk6E99b.js';
2
+ export { g as Camera, e as CameraJSON, f as VideoFrameResolution } from './Camera-DsOMNsZu.js';
3
3
  import './private/Serializable.js';
4
4
  import './private/FrameReaders/WatermarkStack.js';
5
5
  import './tsHelper.js';
6
6
  import './Common.js';
7
+ import './ScanditIcon.js';
8
+ import './private/utils/ScanditHTMLElement.js';
7
9
  import './DataCaptureContextSettings.js';
8
10
  import './DataCaptureViewPlusRelated.js';
9
11
  import './ViewControls.js';
@@ -1 +1 @@
1
- export{a as Camera}from'./chunks/chunk-GMM3ROKD.js';
1
+ export{a as Camera}from'./chunks/chunk-GZ4F55TI.js';
@@ -1,9 +1,11 @@
1
1
  /// <reference types="emscripten" />
2
- export { m as CameraAccess, n as DeviceCamera } from './Camera-Dpk6E99b.js';
2
+ export { m as CameraAccess, n as DeviceCamera } from './Camera-DsOMNsZu.js';
3
3
  import './private/Serializable.js';
4
4
  import './private/FrameReaders/WatermarkStack.js';
5
5
  import './tsHelper.js';
6
6
  import './Common.js';
7
+ import './ScanditIcon.js';
8
+ import './private/utils/ScanditHTMLElement.js';
7
9
  import './DataCaptureContextSettings.js';
8
10
  import './DataCaptureViewPlusRelated.js';
9
11
  import './ViewControls.js';
@@ -1,9 +1,11 @@
1
1
  /// <reference types="emscripten" />
2
- export { C as CameraPosition, l as CameraSettings, i as CameraSettingsFromJSON, j as CameraSettingsJSON, h as CameraSettingsJSONBase, F as FocusGestureStrategy, a as FrameSource, d as FrameSourceJSON, c as FrameSourceListener, b as FrameSourceState, T as TorchState, V as VideoResolution, k as isCameraFrameSource } from './Camera-Dpk6E99b.js';
2
+ export { C as CameraPosition, l as CameraSettings, i as CameraSettingsFromJSON, j as CameraSettingsJSON, h as CameraSettingsJSONBase, F as FocusGestureStrategy, a as FrameSource, d as FrameSourceJSON, c as FrameSourceListener, b as FrameSourceState, T as TorchState, V as VideoResolution, k as isCameraFrameSource } from './Camera-DsOMNsZu.js';
3
3
  import './private/Serializable.js';
4
4
  import './private/FrameReaders/WatermarkStack.js';
5
5
  import './tsHelper.js';
6
6
  import './Common.js';
7
+ import './ScanditIcon.js';
8
+ import './private/utils/ScanditHTMLElement.js';
7
9
  import './DataCaptureContextSettings.js';
8
10
  import './DataCaptureViewPlusRelated.js';
9
11
  import './ViewControls.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { o as Change, u as DataCaptureComponent, t as DataCaptureComponentJSON, B as DataCaptureContext, x as DataCaptureContextCreationOptions, y as DataCaptureContextJSON, q as DataCaptureMode, r as DataCaptureModeJSON, P as PrivateChangeSet, s as PrivateDataCaptureComponent, w as PrivateDataCaptureContext, v as PrivateDataCaptureContextOptions, p as PrivateDataCaptureMode, A as PrivateFrameHandler, z as PrivateFrameHandlerResponse } from './Camera-Dpk6E99b.js';
2
+ export { o as Change, u as DataCaptureComponent, t as DataCaptureComponentJSON, B as DataCaptureContext, x as DataCaptureContextCreationOptions, y as DataCaptureContextJSON, q as DataCaptureMode, r as DataCaptureModeJSON, P as PrivateChangeSet, s as PrivateDataCaptureComponent, w as PrivateDataCaptureContext, v as PrivateDataCaptureContextOptions, p as PrivateDataCaptureMode, A as PrivateFrameHandler, z as PrivateFrameHandlerResponse } from './Camera-DsOMNsZu.js';
3
3
  import './Common.js';
4
4
  import './DataCaptureContextSettings.js';
5
5
  import './license/OpenSourceSoftwareLicenseInfo.js';
@@ -7,6 +7,8 @@ import './private/HtmlElementState.js';
7
7
  import './private/Serializable.js';
8
8
  import './tsHelper.js';
9
9
  import './private/FrameReaders/WatermarkStack.js';
10
+ import './ScanditIcon.js';
11
+ import './private/utils/ScanditHTMLElement.js';
10
12
  import './DataCaptureViewPlusRelated.js';
11
13
  import './ViewControls.js';
12
14
  import './private/CustomLocationsView.js';
@@ -1 +1 @@
1
- export{a as DataCaptureContext}from'./chunks/chunk-UGYFPSXM.js';
1
+ export{a as DataCaptureContext}from'./chunks/chunk-QK3D2DQM.js';
@@ -1,5 +1,6 @@
1
1
  /// <reference types="emscripten" />
2
- export { H as ContextStatus, G as ContextStatusJSON, E as DataCaptureContextListener, I as PrivateMirrorAxis } from './Camera-Dpk6E99b.js';
2
+ export { H as ContextStatus, G as ContextStatusJSON, E as DataCaptureContextListener, I as PrivateMirrorAxis } from './Camera-DsOMNsZu.js';
3
+ import './ScanditIcon.js';
3
4
  import './private/Serializable.js';
4
5
  import './private/FrameReaders/WatermarkStack.js';
5
6
  import './tsHelper.js';
@@ -15,3 +16,4 @@ import './private/HtmlElementState.js';
15
16
  import './worker/OverrideState.js';
16
17
  import './logger.js';
17
18
  import './LoadingStatus.js';
19
+ import './private/utils/ScanditHTMLElement.js';
@@ -1 +1 @@
1
- export{a as DataCaptureVersion}from'./chunks/chunk-3BMXPFN5.js';
1
+ export{a as DataCaptureVersion}from'./chunks/chunk-A4OAOJ72.js';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="emscripten" />
2
2
  import './Common.js';
3
- export { J as DataCaptureOverlay, M as DataCaptureView, L as DataCaptureViewJSON, K as DataCaptureViewListener } from './Camera-Dpk6E99b.js';
3
+ export { J as DataCaptureOverlay, M as DataCaptureView, L as DataCaptureViewJSON, K as DataCaptureViewListener } from './Camera-DsOMNsZu.js';
4
4
  import './DataCaptureViewPlusRelated.js';
5
5
  import './ViewControls.js';
6
6
  import './private/CustomLocationsView.js';
@@ -8,6 +8,8 @@ import './private/Serializable.js';
8
8
  import './private/AnchorPositions.js';
9
9
  import './private/FrameReaders/WatermarkStack.js';
10
10
  import './tsHelper.js';
11
+ import './ScanditIcon.js';
12
+ import './private/utils/ScanditHTMLElement.js';
11
13
  import './DataCaptureContextSettings.js';
12
14
  import './license/OpenSourceSoftwareLicenseInfo.js';
13
15
  import './private/HtmlElementState.js';
@@ -1 +1 @@
1
- export{a as DataCaptureView}from'./chunks/chunk-FJCUED6E.js';
1
+ export{a as DataCaptureView}from'./chunks/chunk-EFNSFA3N.js';
@@ -1,12 +1,14 @@
1
1
  /// <reference types="emscripten" />
2
2
  import * as CSS from 'csstype';
3
- import { V as VideoResolution, F as FocusGestureStrategy, C as CameraPosition } from './Camera-Dpk6E99b.js';
3
+ import { V as VideoResolution, F as FocusGestureStrategy, C as CameraPosition } from './Camera-DsOMNsZu.js';
4
4
  import { MarginsWithUnit, PointWithUnit, Anchor, Color } from './Common.js';
5
5
  import { FocusGestureJSON, FocusGesture, ZoomGestureJSON, ZoomGesture, LogoStyle } from './DataCaptureViewPlusRelated.js';
6
6
  import { RectangularViewfinderStyle, PrivateRectangularViewfinderDefault } from './ViewfinderPlusRelated.js';
7
7
  import './private/Serializable.js';
8
8
  import './private/FrameReaders/WatermarkStack.js';
9
9
  import './tsHelper.js';
10
+ import './ScanditIcon.js';
11
+ import './private/utils/ScanditHTMLElement.js';
10
12
  import './DataCaptureContextSettings.js';
11
13
  import './ViewControls.js';
12
14
  import './private/CustomLocationsView.js';
@@ -1,5 +1,6 @@
1
1
  /// <reference types="emscripten" />
2
- export { N as FrameData, O as PrivateLoadableFrameData, Q as convertToPublicFrameData } from './Camera-Dpk6E99b.js';
2
+ export { N as FrameData, O as PrivateLoadableFrameData, Q as convertToPublicFrameData } from './Camera-DsOMNsZu.js';
3
+ import './ScanditIcon.js';
3
4
  import './private/Serializable.js';
4
5
  import './private/FrameReaders/WatermarkStack.js';
5
6
  import './tsHelper.js';
@@ -15,3 +16,4 @@ import './private/HtmlElementState.js';
15
16
  import './worker/OverrideState.js';
16
17
  import './logger.js';
17
18
  import './LoadingStatus.js';
19
+ import './private/utils/ScanditHTMLElement.js';
@@ -1,9 +1,11 @@
1
1
  /// <reference types="emscripten" />
2
- import { a as FrameSource, b as FrameSourceState, c as FrameSourceListener } from './Camera-Dpk6E99b.js';
2
+ import { a as FrameSource, b as FrameSourceState, c as FrameSourceListener } from './Camera-DsOMNsZu.js';
3
3
  import { Serializable } from './private/Serializable.js';
4
4
  import './private/FrameReaders/WatermarkStack.js';
5
5
  import './tsHelper.js';
6
6
  import './Common.js';
7
+ import './ScanditIcon.js';
8
+ import './private/utils/ScanditHTMLElement.js';
7
9
  import './DataCaptureContextSettings.js';
8
10
  import './DataCaptureViewPlusRelated.js';
9
11
  import './ViewControls.js';
@@ -0,0 +1,50 @@
1
+ /// <reference types="emscripten" />
2
+ import { Color } from './Common.js';
3
+ import { ScanditHTMLElement } from './private/utils/ScanditHTMLElement.js';
4
+ import './private/Serializable.js';
5
+
6
+ declare enum ScanditIconShape {
7
+ Circle = "circle",
8
+ Square = "square"
9
+ }
10
+ declare class ScanditIcon extends ScanditHTMLElement {
11
+ static tag: "scandit-barcode-icon-container";
12
+ private static readonly observedAttributes;
13
+ private containerElement;
14
+ private onSlotChangeListener;
15
+ constructor();
16
+ get iconColor(): Color;
17
+ protected set iconColor(value: Color);
18
+ get backgroundColor(): Color;
19
+ protected set backgroundColor(color: Color);
20
+ get backgroundStrokeColor(): Color;
21
+ protected set backgroundStrokeColor(color: Color);
22
+ get backgroundStrokeWidth(): number;
23
+ protected set backgroundStrokeWidth(value: number);
24
+ get backgroundShape(): ScanditIconShape | null;
25
+ protected set backgroundShape(value: ScanditIconShape | null);
26
+ protected set width(width: number);
27
+ protected get width(): number;
28
+ protected set height(height: number);
29
+ protected get height(): number;
30
+ static create(): ScanditIcon;
31
+ private static register;
32
+ private static createStyleElement;
33
+ private onSlotChange;
34
+ connectedCallback(): void;
35
+ disconnectedCallback(): void;
36
+ private render;
37
+ private attributeChangedCallback;
38
+ private getStylePropertyValue;
39
+ private setStylePropertyValue;
40
+ private updateIconSizeProperty;
41
+ private setIconSize;
42
+ private updateFillIconColor;
43
+ }
44
+ declare global {
45
+ interface HTMLElementTagNameMap {
46
+ [ScanditIcon.tag]: ScanditIcon;
47
+ }
48
+ }
49
+
50
+ export { ScanditIcon, ScanditIconShape };
@@ -0,0 +1 @@
1
+ export{b as ScanditIcon,a as ScanditIconShape}from'./chunks/chunk-AD3CNBDO.js';
@@ -0,0 +1,63 @@
1
+ /// <reference types="emscripten" />
2
+ import { Color } from './Common.js';
3
+ import { SvgIcon } from './private/ui/atoms/SvgIcon.js';
4
+ import { ScanditIconShape, ScanditIcon } from './ScanditIcon.js';
5
+ import './private/Serializable.js';
6
+ import './private/utils/ScanditHTMLElement.js';
7
+
8
+ declare enum ScanditIconType {
9
+ ChevronRight = "chevronRight",
10
+ ChevronLeft = "chevronLeft",
11
+ ChevronDown = "chevronDown",
12
+ ChevronUp = "chevronUp",
13
+ ArrowUp = "arrowUp",
14
+ ArrowRight = "arrowRight",
15
+ ArrowDown = "arrowDown",
16
+ ArrowLeft = "arrowLeft",
17
+ Checkmark = "checkMark",
18
+ XMark = "xMark",
19
+ QuestionMark = "questionMark",
20
+ ExclamationMark = "exclamationMark",
21
+ LowStock = "lowStock",
22
+ ExpiredItem = "expiredItem",
23
+ ToPick = "toPick",
24
+ InspectItem = "inspectItem",
25
+ WrongItem = "wrongItem",
26
+ FragileItem = "fragileItem",
27
+ StarOutlined = "starOutlined",
28
+ StarFilled = "starFilled",
29
+ StarHalfFilled = "starHalfFilled",
30
+ Print = "print",
31
+ CameraSwitch = "cameraSwitch",
32
+ DotFiveX = "dotFiveX",
33
+ OneX = "oneX",
34
+ TwoX = "twoX"
35
+ }
36
+ declare const ScanditIconForIconType: Record<ScanditIconType, Promise<{
37
+ register(): void;
38
+ create(): SvgIcon;
39
+ }>>;
40
+ declare class ScanditIconBuilder {
41
+ private iconName;
42
+ private backgroundShape;
43
+ private backgroundStrokeColor;
44
+ private iconColor;
45
+ private backgroundStrokeWidth;
46
+ private backgroundColor;
47
+ private width;
48
+ private height;
49
+ private iconSize;
50
+ constructor();
51
+ withIcon(icon: ScanditIconType): ScanditIconBuilder;
52
+ withBackgroundShape(backgroundShape: ScanditIconShape | null): ScanditIconBuilder;
53
+ withIconColor(color: Color): ScanditIconBuilder;
54
+ withBackgroundColor(color: Color): ScanditIconBuilder;
55
+ withBackgroundStrokeColor(backgroundStrokeColor: Color): ScanditIconBuilder;
56
+ withBackgroundStrokeWidth(backgroundStrokeWidth: number): ScanditIconBuilder;
57
+ build(): Promise<ScanditIcon>;
58
+ private withWidth;
59
+ private withHeight;
60
+ private withIconSize;
61
+ }
62
+
63
+ export { ScanditIconBuilder, ScanditIconForIconType, ScanditIconShape, ScanditIconType };
@@ -0,0 +1 @@
1
+ export{c as ScanditIconBuilder,b as ScanditIconForIconType,a as ScanditIconType}from'./chunks/chunk-7LG2KINM.js';export{a as ScanditIconShape}from'./chunks/chunk-AD3CNBDO.js';
@@ -1,10 +1,12 @@
1
1
  /// <reference types="emscripten" />
2
- import { d as FrameSourceJSON, b as FrameSourceState, a as FrameSource, c as FrameSourceListener } from './Camera-Dpk6E99b.js';
2
+ import { d as FrameSourceJSON, b as FrameSourceState, a as FrameSource, c as FrameSourceListener } from './Camera-DsOMNsZu.js';
3
3
  import { SingleImageUploaderSettingsJSON, SingleImageUploaderSettings } from './SingleImageUploaderSettings.js';
4
4
  import { Serializable } from './private/Serializable.js';
5
5
  import './private/FrameReaders/WatermarkStack.js';
6
6
  import './tsHelper.js';
7
7
  import './Common.js';
8
+ import './ScanditIcon.js';
9
+ import './private/utils/ScanditHTMLElement.js';
8
10
  import './DataCaptureContextSettings.js';
9
11
  import './DataCaptureViewPlusRelated.js';
10
12
  import './ViewControls.js';
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-GMM3ROKD.js';import {d as d$1}from'./chunk-BIGR7VVJ.js';import {a}from'./chunk-XR65N6EG.js';import {a as a$2}from'./chunk-MU4VAJIM.js';import {f as f$1,g as g$1}from'./chunk-NQC64CT7.js';var S=(t=>(t.Idle="idle",t.Pressed="pressed",t))(S||{}),d=class{constructor(e,t){this.state="idle";this.isHover=!1;this.control=e,this.domHost=t,this.onTouchStartListener=this.onTouchStart.bind(this),this.onMouseEnterListener=this.onMouseEnter.bind(this),this.onMouseLeaveListener=this.onMouseLeave.bind(this),this.onClickListener=this.onClick.bind(this),this.setup();}get frameSource(){var e,t;return (t=(e=this.control.view)==null?void 0:e.getContext())==null?void 0:t.frameSource}get context(){var e;return (e=this.control.view)==null?void 0:e.getContext()}async install(){this.button||this.setup();let e=await this.canShow();return e?(this.updateButtonBackground(this.button,this.getImageFromState()),this.show()):this.hide(),e}remove(e=!1){e&&this.button?(this.button.removeEventListener("mouseenter",this.onMouseEnterListener),this.button.removeEventListener("mouseleave",this.onMouseLeaveListener),this.button.removeEventListener("touchstart",this.onTouchStartListener),this.button.removeEventListener("click",this.onClickListener),this.button.remove(),this.isHover=!1,this.button=void 0):this.hide();}hide(){this.button&&(this.button.style.display="none");}show(){this.button&&(this.button.style.display="block");}setupButton(){let e=document.createElement("button");return e.type="button",e.style.display="none",e.className=`scandit-control-widget scandit-control-widget-${this.control.type}`,this.updateButtonBackground(e,this.getImageFromState()),this.domHost.append(e),e.addEventListener("mouseenter",this.onMouseEnterListener),e.addEventListener("mouseleave",this.onMouseLeaveListener),a$2.isDesktopDevice()||e.addEventListener("touchstart",this.onTouchStartListener),e.addEventListener("click",this.onClickListener),e.setAttribute("aria-pressed",String(this.state==="pressed")),this.button=e,this.button}setup(){this.setupButton();}onTouchStart(){var e,t;(e=this.button)==null||e.removeEventListener("mouseenter",this.onMouseEnterListener),(t=this.button)==null||t.removeEventListener("mouseleave",this.onMouseLeaveListener);}onMouseEnter(){this.isHover=!0,this.updateButtonBackground(this.button,this.getImageFromState());}onMouseLeave(){this.isHover=!1,this.updateButtonBackground(this.button,this.getImageFromState());}onClick(){var e;this.state=this.state==="pressed"?"idle":"pressed",this.buttonClicked(),this.updateButtonBackground(this.button,this.getImageFromState()),(e=this.button)==null||e.setAttribute("aria-pressed",String(this.state==="pressed"));}updateButtonBackground(e,t){t!=null&&e!=null&&(e.style.backgroundImage=`url(${JSON.stringify(t)})`);}},C=class extends d{constructor(e,t){super(e,t);}async buttonClicked(){await this.frameSource.setDesiredTorchState(this.retrieveTorchState()==="on"?"off":"on");}async canShow(){return this.isTorchAvailable()}getImageFromState(){return this.retrieveTorchState()==="on"?this.isHover?this.control.torchOnPressedImage:this.control.torchOnImage:this.isHover?this.control.torchOffPressedImage:this.control.torchOffImage}setup(){if(this.control.torchOffImage==null||this.control.torchOnImage==null){a.log(a.Level.Warn,"TorchSwitchControl icon is not set or is empty, the control will not be rendered.");return}super.setup();}async isTorchAvailable(){return f$1(this.frameSource)?this.frameSource.isTorchAvailable():!1}retrieveTorchState(){return f$1(this.frameSource)?this.frameSource.getDesiredTorchState():"off"}},f=class o extends d{constructor(e,t){super(e,t);}static get CameraAccess(){return d$1}static get Camera(){return a$1}async canShow(){return (await o.CameraAccess.getCameras()).length>1}getImageFromState(){return this.isHover?this.control.pressedImage:this.control.idleImage}async buttonClicked(){if(this.isTransitioning)return;let e=await this.getNextDeviceCamera();e&&await this.switchCameras(e);}setup(){if(this.control.idleImage==null){a.log(a.Level.Warn,"CameraSwitchControl idle icon is not set or is empty, the control will not be rendered.");return}super.setup();}async getNextDeviceCamera(){var s,n;let e=await o.CameraAccess.getCameras(),t=this.frameSource?this.frameSource:null,i=(s=t==null?void 0:t.cameraManager.activeCamera)==null?void 0:s.deviceId,r=e.findIndex(c=>c.deviceId===i);return r>-1?(n=e[r+1])!=null?n:e[0]:e.length>0?e[0]:null}async switchCameras(e){var n,c,u;this.isTransitioning=!0;let t=(n=this.context)==null?void 0:n.frameSource,i,r;t!=null&&(i=new g$1(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off"));let s=o.Camera.fromDeviceCamera(e);i!=null&&await s.applySettings(i),await((c=this.context)==null?void 0:c.setFrameSource(s)),await((u=this.context)==null?void 0:u.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=!1;}},g=class o extends d{constructor(e,t){super(e,t);}static get Camera(){return a$1}static get CameraAccess(){return d$1}async install(){let e=await super.install();return e&&await this.setInitialCamera(),e}async canShow(){return !a$2.isIOSDeviceWithExtendedCameraAccess()||!f$1(this.frameSource)?!1:d$1.isIOSBackDualWideCameraLabel(this.frameSource.label)||d$1.isIOSBackCameraLabel(this.frameSource.label)||d$1.isIOSUltraWideBackCameraLabel(this.frameSource.label)}getImageFromState(){return this.isUltraWideBackCamera()?this.isHover?this.control.cameraFOVUltraWidePressedImage:this.control.cameraFOVUltraWideImage:this.isHover?this.control.cameraFOVWidePressedImage:this.control.cameraFOVWideImage}async buttonClicked(){if(this.isTransitioning)return;let e=await this.getAlternativeDeviceCamera();e&&await this.switchCameras(e);}setup(){if(this.control.cameraFOVUltraWideImage==null||this.control.cameraFOVWideImage==null){a.log(a.Level.Warn,"CameraFOVSwitchControl icon is not set or is empty, the control will not be rendered.");return}super.setup();}async setInitialCamera(){var e,t;if(!this.isTransitioning&&!d$1.isIOSBackCameraLabel((t=(e=this.frameSource)==null?void 0:e.label)!=null?t:"")){let r=(await o.CameraAccess.getCameras()).find(s=>d$1.isIOSBackCameraLabel(s.label));r&&await this.switchCameras(r);}}isUltraWideBackCamera(){return f$1(this.frameSource)?d$1.isIOSUltraWideBackCameraLabel(this.frameSource.label):!1}async getAlternativeDeviceCamera(){return (await o.CameraAccess.getCameras()).find(t=>this.isUltraWideBackCamera()?d$1.isIOSBackCameraLabel(t.label):d$1.isIOSUltraWideBackCameraLabel(t.label))}async switchCameras(e){var n,c,u;this.isTransitioning=!0;let t=(n=this.context)==null?void 0:n.frameSource,i,r;t!=null&&(i=new g$1(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off"));let s=o.Camera.fromDeviceCamera(e);i!=null&&await s.applySettings(i),await((c=this.context)==null?void 0:c.setFrameSource(s)),await((u=this.context)==null?void 0:u.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=!1;}};export{S as a,C as b,f as c,g as d};
1
+ import {a as a$1}from'./chunk-GZ4F55TI.js';import {d as d$1}from'./chunk-BIGR7VVJ.js';import {a}from'./chunk-XR65N6EG.js';import {a as a$2}from'./chunk-MU4VAJIM.js';import {f as f$1,g as g$1}from'./chunk-NQC64CT7.js';var S=(t=>(t.Idle="idle",t.Pressed="pressed",t))(S||{}),d=class{constructor(e,t){this.state="idle";this.isHover=!1;this.control=e,this.domHost=t,this.onTouchStartListener=this.onTouchStart.bind(this),this.onMouseEnterListener=this.onMouseEnter.bind(this),this.onMouseLeaveListener=this.onMouseLeave.bind(this),this.onClickListener=this.onClick.bind(this),this.setup();}get frameSource(){var e,t;return (t=(e=this.control.view)==null?void 0:e.getContext())==null?void 0:t.frameSource}get context(){var e;return (e=this.control.view)==null?void 0:e.getContext()}async install(){this.button||this.setup();let e=await this.canShow();return e?(this.updateButtonBackground(this.button,this.getImageFromState()),this.show()):this.hide(),e}remove(e=!1){e&&this.button?(this.button.removeEventListener("mouseenter",this.onMouseEnterListener),this.button.removeEventListener("mouseleave",this.onMouseLeaveListener),this.button.removeEventListener("touchstart",this.onTouchStartListener),this.button.removeEventListener("click",this.onClickListener),this.button.remove(),this.isHover=!1,this.button=void 0):this.hide();}hide(){this.button&&(this.button.style.display="none");}show(){this.button&&(this.button.style.display="block");}setupButton(){let e=document.createElement("button");return e.type="button",e.style.display="none",e.className=`scandit-control-widget scandit-control-widget-${this.control.type}`,this.updateButtonBackground(e,this.getImageFromState()),this.domHost.append(e),e.addEventListener("mouseenter",this.onMouseEnterListener),e.addEventListener("mouseleave",this.onMouseLeaveListener),a$2.isDesktopDevice()||e.addEventListener("touchstart",this.onTouchStartListener),e.addEventListener("click",this.onClickListener),e.setAttribute("aria-pressed",String(this.state==="pressed")),this.button=e,this.button}setup(){this.setupButton();}onTouchStart(){var e,t;(e=this.button)==null||e.removeEventListener("mouseenter",this.onMouseEnterListener),(t=this.button)==null||t.removeEventListener("mouseleave",this.onMouseLeaveListener);}onMouseEnter(){this.isHover=!0,this.updateButtonBackground(this.button,this.getImageFromState());}onMouseLeave(){this.isHover=!1,this.updateButtonBackground(this.button,this.getImageFromState());}onClick(){var e;this.state=this.state==="pressed"?"idle":"pressed",this.buttonClicked(),this.updateButtonBackground(this.button,this.getImageFromState()),(e=this.button)==null||e.setAttribute("aria-pressed",String(this.state==="pressed"));}updateButtonBackground(e,t){t!=null&&e!=null&&(e.style.backgroundImage=`url(${JSON.stringify(t)})`);}},C=class extends d{constructor(e,t){super(e,t);}async buttonClicked(){await this.frameSource.setDesiredTorchState(this.retrieveTorchState()==="on"?"off":"on");}async canShow(){return this.isTorchAvailable()}getImageFromState(){return this.retrieveTorchState()==="on"?this.isHover?this.control.torchOnPressedImage:this.control.torchOnImage:this.isHover?this.control.torchOffPressedImage:this.control.torchOffImage}setup(){if(this.control.torchOffImage==null||this.control.torchOnImage==null){a.log(a.Level.Warn,"TorchSwitchControl icon is not set or is empty, the control will not be rendered.");return}super.setup();}async isTorchAvailable(){return f$1(this.frameSource)?this.frameSource.isTorchAvailable():!1}retrieveTorchState(){return f$1(this.frameSource)?this.frameSource.getDesiredTorchState():"off"}},f=class o extends d{constructor(e,t){super(e,t);}static get CameraAccess(){return d$1}static get Camera(){return a$1}async canShow(){return (await o.CameraAccess.getCameras()).length>1}getImageFromState(){return this.isHover?this.control.pressedImage:this.control.idleImage}async buttonClicked(){if(this.isTransitioning)return;let e=await this.getNextDeviceCamera();e&&await this.switchCameras(e);}setup(){if(this.control.idleImage==null){a.log(a.Level.Warn,"CameraSwitchControl idle icon is not set or is empty, the control will not be rendered.");return}super.setup();}async getNextDeviceCamera(){var s,n;let e=await o.CameraAccess.getCameras(),t=this.frameSource?this.frameSource:null,i=(s=t==null?void 0:t.cameraManager.activeCamera)==null?void 0:s.deviceId,r=e.findIndex(c=>c.deviceId===i);return r>-1?(n=e[r+1])!=null?n:e[0]:e.length>0?e[0]:null}async switchCameras(e){var n,c,u;this.isTransitioning=!0;let t=(n=this.context)==null?void 0:n.frameSource,i,r;t!=null&&(i=new g$1(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off"));let s=o.Camera.fromDeviceCamera(e);i!=null&&await s.applySettings(i),await((c=this.context)==null?void 0:c.setFrameSource(s)),await((u=this.context)==null?void 0:u.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=!1;}},g=class o extends d{constructor(e,t){super(e,t);}static get Camera(){return a$1}static get CameraAccess(){return d$1}async install(){let e=await super.install();return e&&await this.setInitialCamera(),e}async canShow(){return !a$2.isIOSDeviceWithExtendedCameraAccess()||!f$1(this.frameSource)?!1:d$1.isIOSBackDualWideCameraLabel(this.frameSource.label)||d$1.isIOSBackCameraLabel(this.frameSource.label)||d$1.isIOSUltraWideBackCameraLabel(this.frameSource.label)}getImageFromState(){return this.isUltraWideBackCamera()?this.isHover?this.control.cameraFOVUltraWidePressedImage:this.control.cameraFOVUltraWideImage:this.isHover?this.control.cameraFOVWidePressedImage:this.control.cameraFOVWideImage}async buttonClicked(){if(this.isTransitioning)return;let e=await this.getAlternativeDeviceCamera();e&&await this.switchCameras(e);}setup(){if(this.control.cameraFOVUltraWideImage==null||this.control.cameraFOVWideImage==null){a.log(a.Level.Warn,"CameraFOVSwitchControl icon is not set or is empty, the control will not be rendered.");return}super.setup();}async setInitialCamera(){var e,t;if(!this.isTransitioning&&!d$1.isIOSBackCameraLabel((t=(e=this.frameSource)==null?void 0:e.label)!=null?t:"")){let r=(await o.CameraAccess.getCameras()).find(s=>d$1.isIOSBackCameraLabel(s.label));r&&await this.switchCameras(r);}}isUltraWideBackCamera(){return f$1(this.frameSource)?d$1.isIOSUltraWideBackCameraLabel(this.frameSource.label):!1}async getAlternativeDeviceCamera(){return (await o.CameraAccess.getCameras()).find(t=>this.isUltraWideBackCamera()?d$1.isIOSBackCameraLabel(t.label):d$1.isIOSUltraWideBackCameraLabel(t.label))}async switchCameras(e){var n,c,u;this.isTransitioning=!0;let t=(n=this.context)==null?void 0:n.frameSource,i,r;t!=null&&(i=new g$1(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off"));let s=o.Camera.fromDeviceCamera(e);i!=null&&await s.applySettings(i),await((c=this.context)==null?void 0:c.setFrameSource(s)),await((u=this.context)==null?void 0:u.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=!1;}};export{S as a,C as b,f as c,g as d};
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-MAMZS5CH.js';import {a as a$1}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'./chunk-DVQH5JLR.js';import {a as a$1}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import {b as b$1}from'./chunk-FE5V34QK.js';import {a as a$7}from'./chunk-6OQQP3SM.js';import {b,a as a$6}from'./chunk-5S537AFM.js';import {a as a$5}from'./chunk-3A4KLILV.js';import {a as a$3}from'./chunk-U6BTTEV6.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$4}from'./chunk-GE4CBD4E.js';import {a as a$2}from'./chunk-R6E4CT22.js';var o="--view-finder-top",a="--view-finder-bottom",l="--hint-anchor-offset",w="--max-width-fraction",$="--horizontal-margin",c="--max-width-ratio-adjust",E=(d=>(d.Update="hintpresenterupdate",d))(E||{});function s(p,d=100){return typeof p=="string"?p.slice(0,d):""}var n=class n extends a$1{constructor(){super();this.onDidToastHideHandler=this.onDidToastHide.bind(this);this.orientationObserver=new b;this.onOrientationChangeHandler=a$2(this.onOrientationChange.bind(this),200);let t=this.attachShadow({mode:"open"});t.innerHTML=a$3`
1
+ import {b as b$1}from'./chunk-BWOCR6MD.js';import {a as a$7}from'./chunk-MST2ECFN.js';import {b,a as a$6}from'./chunk-5S537AFM.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$5}from'./chunk-3A4KLILV.js';import {a as a$3}from'./chunk-U6BTTEV6.js';import {a as a$4}from'./chunk-GE4CBD4E.js';import {a as a$2}from'./chunk-R6E4CT22.js';var o="--view-finder-top",a="--view-finder-bottom",l="--hint-anchor-offset",w="--max-width-fraction",$="--horizontal-margin",c="--max-width-ratio-adjust",E=(d=>(d.Update="hintpresenterupdate",d))(E||{});function s(p,d=100){return typeof p=="string"?p.slice(0,d):""}var n=class n extends a$1{constructor(){super();this.onDidToastHideHandler=this.onDidToastHide.bind(this);this.orientationObserver=new b;this.onOrientationChangeHandler=a$2(this.onOrientationChange.bind(this),200);let t=this.attachShadow({mode:"open"});t.innerHTML=a$3`
2
2
  <div id="root">
3
3
  <slot></slot>
4
4
  </div>
@@ -1,3 +1,3 @@
1
- import {b,a as a$4,c,f as f$1}from'./chunk-T5QHKJ2U.js';import {a as a$5}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-U6BTTEV6.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$3}from'./chunk-GE4CBD4E.js';var h="scandit-progress-bar",n="aria-valuenow",f="aria-valuemin",w="aria-valuemax",a=class a extends a$1{constructor(){super();let e=this.attachShadow({mode:"open"});e.innerHTML=a$2`
1
+ import {b,a as a$4,c,f as f$1}from'./chunk-T5QHKJ2U.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$5}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-U6BTTEV6.js';import {a as a$3}from'./chunk-GE4CBD4E.js';var h="scandit-progress-bar",n="aria-valuenow",f="aria-valuemin",w="aria-valuemax",a=class a extends a$1{constructor(){super();let e=this.attachShadow({mode:"open"});e.innerHTML=a$2`
2
2
  <div id="scandit-progress" role="progressbar" aria-valuemin="0" aria-valuemax="100" />
3
3
  `,e.append(a.createStyleElement().cloneNode(!0)),this.progress=e.querySelector("#scandit-progress");}static get observedAttributes(){return ["value","min","max"]}static createStyleElement(){return a$3`:host{display:inline-block;--indeterminate-bubble-width:35%;--accent-color:#${b.toJSON()};--start-gradient-color:#${a$4.toJSON()};--end-gradient-color:#${c.toJSON()};--secondary-color:#${f$1.toJSON()};width:100%}:host [role=progressbar]{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:.5rem;overflow:hidden;position:relative}:host [role=progressbar]:after,:host [role=progressbar]:before{background:var(--accent-color);border-radius:.5rem;content:" ";height:.5rem;left:0;position:absolute;top:0}:host([variant=gradient]) [role=progressbar]:after,:host([variant=gradient]) [role=progressbar]:before{background:linear-gradient(90deg,var(--start-gradient-color) 0,var(--end-gradient-color) 100%)}:host(:focus-visible){border-radius:.5rem;outline-color:var(--accent-color);outline-offset:5px}:host [role=progressbar]:not([aria-valuenow]):after{animation:indeterminate-progress-bar 2.5s ease infinite;width:var(--indeterminate-bubble-width);z-index:1}:host [role=progressbar][aria-valuenow]:after{animation:none;width:0}:host [role=progressbar][aria-valuenow]:before{background-color:var(--accent-color);border-radius:.5rem;transition:width .3s linear;width:calc(var(--aria-valuenow)*1%)}:host [role=progressbar]{background-color:var(--secondary-color);border-radius:.5rem}@keyframes indeterminate-progress-bar{0%{left:0}50%{left:calc(100% - var(--indeterminate-bubble-width))}}`}get min(){var r;let e=(r=this.getAttribute("min"))!=null?r:0;return Number(e)}get max(){var r;let e=(r=this.getAttribute("max"))!=null?r:1;return Number(e)}set max(e){e!==null&&this.setAttribute("max",String(e));}get value(){let e=this.getAttribute("value");return e==null||e===""?null:Number(e)}set value(e){if(e==null){this.removeAttribute("value");return}e>=this.min&&e<=this.max&&this.setAttribute("value",String(e));}static create(){return document.createElement(h)}static register(){a$5({[a.tag]:a});}attributeChangedCallback(){this.update();}connectedCallback(){this.update();}update(){let{min:e,max:r,value:i,progress:t}=this;if(t==null||t.setAttribute(f,e.toString()),t==null||t.setAttribute(w,r.toString()),i==null){t==null||t.removeAttribute(n),t==null||t.removeAttribute("style");return}if(i>=e&&i<=r){let v=(i-e)/(r-e)*100,l=String(v);t==null||t.setAttribute(n,l),t==null||t.setAttribute("style",`--${n}: ${l}`);}}};a.tag=h;var o=a;o.register();export{o as a};
@@ -1,4 +1,4 @@
1
- import {a as a$5}from'./chunk-FTMRPIKJ.js';import {a as a$6}from'./chunk-7XQ3GHYH.js';import {a as a$3}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-U6BTTEV6.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$4}from'./chunk-GE4CBD4E.js';var d="scandit-loading-overlay",t=class t extends a$1{constructor(){super();this._progressBar=null;this._label=null;let e=this.attachShadow({mode:"open"});e.innerHTML=a$2`
1
+ import {a as a$5}from'./chunk-76CQG6HG.js';import {a as a$6}from'./chunk-7XQ3GHYH.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$3}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-U6BTTEV6.js';import {a as a$4}from'./chunk-GE4CBD4E.js';var d="scandit-loading-overlay",t=class t extends a$1{constructor(){super();this._progressBar=null;this._label=null;let e=this.attachShadow({mode:"open"});e.innerHTML=a$2`
2
2
  <div class="loading-overlay">
3
3
  <label for="scandit-progress" class="message">Loading...</label>
4
4
  <scandit-progress-bar id="scandit-progress" min="0" max="100"></scandit-progress-bar>
@@ -1,4 +1,4 @@
1
- import {b,a as a$2}from'./chunk-SK6L34IF.js';import {a}from'./chunk-MW5PTAU7.js';import {a as a$1}from'./chunk-QHBIT2WY.js';var m=`
1
+ import {a}from'./chunk-MW5PTAU7.js';import {a as a$1}from'./chunk-QHBIT2WY.js';import {b,a as a$2}from'./chunk-SK6L34IF.js';var m=`
2
2
  attribute vec2 a_position;
3
3
  varying vec2 v_texcoord;
4
4
 
@@ -0,0 +1 @@
1
+ import {b}from'./chunk-AD3CNBDO.js';import {n}from'./chunk-LDJ53PEJ.js';var h=(r=>(r.ChevronRight="chevronRight",r.ChevronLeft="chevronLeft",r.ChevronDown="chevronDown",r.ChevronUp="chevronUp",r.ArrowUp="arrowUp",r.ArrowRight="arrowRight",r.ArrowDown="arrowDown",r.ArrowLeft="arrowLeft",r.Checkmark="checkMark",r.XMark="xMark",r.QuestionMark="questionMark",r.ExclamationMark="exclamationMark",r.LowStock="lowStock",r.ExpiredItem="expiredItem",r.ToPick="toPick",r.InspectItem="inspectItem",r.WrongItem="wrongItem",r.FragileItem="fragileItem",r.StarOutlined="starOutlined",r.StarFilled="starFilled",r.StarHalfFilled="starHalfFilled",r.Print="print",r.CameraSwitch="cameraSwitch",r.DotFiveX="dotFiveX",r.OneX="oneX",r.TwoX="twoX",r))(h||{}),l={arrowDown:import('../private/ui/atoms/ArrowDownSvgIcon.js').then(o=>o.ArrowDownSvgIcon),arrowLeft:import('../private/ui/atoms/ArrowLeftSvgIcon.js').then(o=>o.ArrowLeftSvgIcon),arrowRight:import('../private/ui/atoms/ArrowRightSvgIcon.js').then(o=>o.ArrowRightSvgIcon),arrowUp:import('../private/ui/atoms/ArrowUpSvgIcon.js').then(o=>o.ArrowUpSvgIcon),chevronRight:import('../private/ui/atoms/ChevronRightSvgIcon.js').then(o=>o.ChevronRightSvgIcon),chevronLeft:import('../private/ui/atoms/ChevronLeftSvgIcon.js').then(o=>o.ChevronLeftSvgIcon),chevronDown:import('../private/ui/atoms/ChevronDownSvgIcon.js').then(o=>o.ChevronDownSvgIcon),chevronUp:import('../private/ui/atoms/ChevronUpSvgIcon.js').then(o=>o.ChevronUpSvgIcon),toPick:import('../private/ui/atoms/ToPickSvgIcon.js').then(o=>o.ToPickSvgIcon),xMark:import('../private/ui/atoms/CrossSvgIcon.js').then(o=>o.CrossSvgIcon),checkMark:import('../private/ui/atoms/CheckSvgIcon.js').then(o=>o.CheckSvgIcon),questionMark:import('../private/ui/atoms/QuestionMarkSvgIcon.js').then(o=>o.QuestionMarkSvgIcon),exclamationMark:import('../private/ui/atoms/ExclamationMarkSvgIcon.js').then(o=>o.ExclamationMarkSvgIcon),lowStock:import('../private/ui/atoms/LowStockSvgIcon.js').then(o=>o.LowStockSvgIcon),inspectItem:import('../private/ui/atoms/HandLensCheckSvgIcon.js').then(o=>o.HandLensCheckSvgIcon),expiredItem:import('../private/ui/atoms/CalendarExclamationMarkSvgIcon.js').then(o=>o.CalendarExclamationMarkSvgIcon),wrongItem:import('../private/ui/atoms/WrongItemSvgIcon.js').then(o=>o.WrongItemSvgIcon),fragileItem:import('../private/ui/atoms/GlassSvgIcon.js').then(o=>o.GlassSvgIcon),starOutlined:import('../private/ui/atoms/StarOutlinedSvgIcon.js').then(o=>o.StarOutlinedSvgIcon),starFilled:import('../private/ui/atoms/StarFilledSvgIcon.js').then(o=>o.StarFilledSvgIcon),starHalfFilled:import('../private/ui/atoms/StarHalfFilledSvgIcon.js').then(o=>o.StarHalfFilledSvgIcon),print:import('../private/ui/atoms/PrinterSvgIcon.js').then(o=>o.PrinterSvgIcon),cameraSwitch:import('../private/ui/atoms/CameraSwitchSvgIcon.js').then(o=>o.CameraSwitchSvgIcon),oneX:import('../private/ui/atoms/OnexSvgIcon.js').then(o=>o.OnexSvgIcon),twoX:import('../private/ui/atoms/TwoxSvgIcon.js').then(o=>o.TwoxSvgIcon),dotFiveX:import('../private/ui/atoms/Dot5xSvgIcon.js').then(o=>o.Dot5xSvgIcon)},a=class{constructor(){this.iconName=null;this.backgroundShape=null;this.iconColor=n.fromHex("#fff");this.backgroundStrokeWidth=0;this.width=32;this.height=32;this.iconSize=null;}withIcon(t){return this.iconName=t,this}withBackgroundShape(t){return this.backgroundShape=t,this}withIconColor(t){return this.iconColor=t,this}withBackgroundColor(t){return this.backgroundColor=t,this}withBackgroundStrokeColor(t){return this.backgroundStrokeColor=t,this}withBackgroundStrokeWidth(t){return this.backgroundStrokeWidth=t,this}async build(){let t=b.create();t.backgroundStrokeWidth=this.backgroundStrokeWidth,t.backgroundShape=this.backgroundShape,this.backgroundColor!=null&&(t.backgroundColor=this.backgroundColor),this.backgroundStrokeColor!=null&&(t.backgroundStrokeColor=this.backgroundStrokeColor);let n=null;if(this.iconName!=null){let i=await l[this.iconName];i.register(),n=i.create(),t.append(n);}return t.width=this.width,t.height=this.height,t.iconColor=this.iconColor,n!=null&&this.iconSize!=null&&(n.size=this.iconSize),t}withWidth(t){return this.width=t,this}withHeight(t){return this.height=t,this}withIconSize(t){return this.iconSize=t,this}};export{h as a,l as b,a as c};
@@ -0,0 +1 @@
1
+ var e;(o=>{function i(){let r="7.1.0";return r}o.sdkVersion=i;})(e||(e={}));export{e as a};
@@ -0,0 +1 @@
1
+ import {e}from'./chunk-T5QHKJ2U.js';import {a}from'./chunk-EV4OEANA.js';import {a as a$2}from'./chunk-3A4KLILV.js';import {a as a$1}from'./chunk-U6BTTEV6.js';import {a as a$3}from'./chunk-GE4CBD4E.js';import {n as n$1}from'./chunk-LDJ53PEJ.js';var v=(e=>(e.Circle="circle",e.Square="square",e))(v||{}),c="--width",l="--height",h="--background-color",d="--stroke-color",p="--stroke-width",n=class n extends a{constructor(){super();this.onSlotChangeListener=this.onSlotChange.bind(this);let e=this.attachShadow({mode:"open"});e.innerHTML=a$1`<div class="container shape-none"><slot /></div>`,this.containerElement=e.querySelector(".container"),this.setStylePropertyValue(c,"32px"),this.setStylePropertyValue(l,"32px"),this.setStylePropertyValue(h,"transparent"),this.setStylePropertyValue(d,"#fff"),this.setStylePropertyValue(p,"0px"),e.append(n.createStyleElement().cloneNode(!0));}get iconColor(){var o,r;let e=(o=this.shadowRoot)==null?void 0:o.querySelector("slot"),t=(r=e==null?void 0:e.assignedElements())!=null?r:[];return n$1.fromHex(t[0].fill)}set iconColor(e){this.render({propChanged:"iconcolor",value:`#${e.toJSON()}`});}get backgroundColor(){return n$1.fromHex(this.getStylePropertyValue(h))}set backgroundColor(e){this.render({propChanged:"backgroundcolor",value:`#${e.toJSON()}`});}get backgroundStrokeColor(){return n$1.fromHex(this.getStylePropertyValue(d))}set backgroundStrokeColor(e){this.render({propChanged:"backgroundstrokecolor",value:`#${e.toJSON()}`});}get backgroundStrokeWidth(){let e=this.getStylePropertyValue(p);return Number.parseInt(e,10)}set backgroundStrokeWidth(e){this.render({propChanged:"backgroundstrokewidth",value:String(e)});}get backgroundShape(){var t;let e=(t=/shape-(.*)/.exec(this.containerElement.classList.value))==null?void 0:t[1];return e!=null&&e!=="none"?e:null}set backgroundShape(e){this.render({propChanged:"backgroundshape",value:e!=null?e:"none"});}set width(e){this.render({propChanged:"width",value:String(e)}),this.updateIconSizeProperty(e,this.height);}get width(){let e=this.getStylePropertyValue(c).replace("px","");return Number.parseInt(e,10)}set height(e){this.render({propChanged:"height",value:String(e)}),this.updateIconSizeProperty(this.width,e);}get height(){let e=this.getStylePropertyValue(l).replace("px","");return Number.parseInt(e,10)}static create(){return n.register(),document.createElement(n.tag)}static register(){a$2({[n.tag]:n});}static createStyleElement(){return a$3`:host{display:inline-block;--width:32px;--height:32px;--background-color:transparent;--stroke-color:#fff;--stroke-width:0px}:host([hidden]){display:none}.container{background-color:var(--background-color);box-shadow:0 1px 2px 0 #${e.withAlpha(.3).toJSON()};height:calc(var(--height) - var(--stroke-width));outline:var(--stroke-width) solid var(--stroke-color);position:relative;width:calc(var(--width) - var(--stroke-width))}.container.shape-${"circle"}{border-radius:50%}.container.shape-${"square"}{border-radius:0}.container.shape-none{box-shadow:unset}::slotted(*){left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}`}onSlotChange(){this.updateIconSizeProperty(this.width,this.height);}connectedCallback(){var t;let e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");e==null||e.addEventListener("slotchange",this.onSlotChangeListener);}disconnectedCallback(){var t;let e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");e==null||e.removeEventListener("slotchange",this.onSlotChangeListener);}render({propChanged:e,value:t}){switch(e){case"width":{this.setStylePropertyValue(c,`${t}px`);break}case"height":{this.setStylePropertyValue(l,`${t}px`);break}case"backgroundstrokewidth":{this.setStylePropertyValue(p,`${t}px`);break}case"backgroundstrokecolor":{this.setStylePropertyValue(d,t);break}case"backgroundcolor":{this.setStylePropertyValue(h,t);break}case"iconcolor":{this.updateFillIconColor(n$1.fromHex(t));break}case"backgroundshape":{let o=t;this.containerElement.classList.toggle("shape-circle",o==="circle"),this.containerElement.classList.toggle("shape-square",o==="square"),this.containerElement.classList.toggle("shape-none",o==="none");break}}}attributeChangedCallback(e,t,o){this.render({propChanged:e,value:o});}getStylePropertyValue(e){return this.containerElement.style.getPropertyValue(e)}setStylePropertyValue(e,t){this.containerElement.style.setProperty(e,t);}updateIconSizeProperty(e,t){var s,u;let o=(s=this.shadowRoot)==null?void 0:s.querySelector("slot"),r=(u=o==null?void 0:o.assignedElements())!=null?u:[],a=Math.min(e,t);for(let C of r)C.size=a/2;}setIconSize(e){var r,a;let t=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),o=(a=t==null?void 0:t.assignedElements())!=null?a:[];for(let s of o)s.size=e;}updateFillIconColor(e){var r,a;let t=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),o=(a=t==null?void 0:t.assignedElements())!=null?a:[];for(let s of o)s.fill=`#${e.toJSON()}`;}};n.tag="scandit-barcode-icon-container",n.observedAttributes=["width","height","backgroundstrokecolor","backgroundcolor","backgroundstrokewidth","iconcolor","backgroundshape"];var y=n;export{v as a,y as b};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-FHGLVS66.js';var t=new a(globalThis,{get:()=>globalThis.Module,set:e=>{globalThis.Module=e;}});function l(e){}export{t as a,l as b};
@@ -1,4 +1,4 @@
1
- import {a as a$3}from'./chunk-M46MIHI5.js';import {a as a$2}from'./chunk-5IVFVUF4.js';import {e as e$1}from'./chunk-T5QHKJ2U.js';import {a as a$6}from'./chunk-3A4KLILV.js';import {a as a$4}from'./chunk-U6BTTEV6.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$5}from'./chunk-GE4CBD4E.js';var b=(i=>(i.DidShow="didshow",i.DidHide="didhide",i.WillShow="willshow",i))(b||{}),o="--text-size",s="--text-color",n="--text-alignment",a="--text-weight",r="--line-height",l="--background-color",c="--corner-radius",h="--max-lines",x="ease-in-out",e=class e extends a$1{constructor(){super();this.toast=null;this._hintStyle=null;this.currentAnimation=null;this.animationDuration=250;let t=this.attachShadow({mode:"open"});this._exclamationIcon=a$2.create(),this._checkIcon=a$3.create(),this._exclamationIcon.size=24,this._checkIcon.size=24,t.innerHTML=a$4`
1
+ import {a as a$3}from'./chunk-5E7ISPKS.js';import {a as a$2}from'./chunk-FFFXM7UY.js';import {e as e$1}from'./chunk-T5QHKJ2U.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$6}from'./chunk-3A4KLILV.js';import {a as a$4}from'./chunk-U6BTTEV6.js';import {a as a$5}from'./chunk-GE4CBD4E.js';var b=(i=>(i.DidShow="didshow",i.DidHide="didhide",i.WillShow="willshow",i))(b||{}),o="--text-size",s="--text-color",n="--text-alignment",a="--text-weight",r="--line-height",l="--background-color",c="--corner-radius",h="--max-lines",x="ease-in-out",e=class e extends a$1{constructor(){super();this.toast=null;this._hintStyle=null;this.currentAnimation=null;this.animationDuration=250;let t=this.attachShadow({mode:"open"});this._exclamationIcon=a$2.create(),this._checkIcon=a$3.create(),this._exclamationIcon.size=24,this._checkIcon.size=24,t.innerHTML=a$4`
2
2
  <div class="toast">
3
3
  <slot name="first-child"></slot>
4
4
  <div class="left">
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-U6BTTEV6.js';import {a}from'./chunk-EV4OEANA.js';var r="inline-style",e=class e extends a{get fill(){var t;return (t=this.getAttribute("fill"))!=null?t:"black"}set fill(t){this.setAttribute("fill",t);}get size(){var t;return Number((t=this.getAttribute("size"))!=null?t:"32")}set size(t){this.setAttribute("size",t.toString());}get[r](){return this.getAttribute(r)}set[r](t){t==null?this.removeAttribute(r):this.setAttribute(r,t);}static create(){return a$1({[e.tag]:e}),document.createElement(e.tag)}render(){return a$2`<div></div>`}heightForViewbox(t,i){return this.size*this.aspectRatioForViewbox(t,i)}aspectRatioForViewbox(t,i){return i/t}connectedCallback(){this.innerHTML=this.render();}attributeChangedCallback(t,i,b){b!==i&&(this.innerHTML=this.render());}};e.tag="scandit-svg-icon",e.observedAttributes=["fill","size"];var u=e;export{u as a};
1
+ import {a}from'./chunk-EV4OEANA.js';import {a as a$1}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-U6BTTEV6.js';var r="inline-style",e=class e extends a{get fill(){var t;return (t=this.getAttribute("fill"))!=null?t:"black"}set fill(t){this.setAttribute("fill",t);}get size(){var t;return Number((t=this.getAttribute("size"))!=null?t:"32")}set size(t){this.setAttribute("size",t.toString());}get[r](){return this.getAttribute(r)}set[r](t){t==null?this.removeAttribute(r):this.setAttribute(r,t);}static create(){return a$1({[e.tag]:e}),document.createElement(e.tag)}render(){return a$2`<div></div>`}heightForViewbox(t,i){return this.size*this.aspectRatioForViewbox(t,i)}aspectRatioForViewbox(t,i){return i/t}connectedCallback(){this.innerHTML=this.render();}attributeChangedCallback(t,i,b){b!==i&&(this.innerHTML=this.render());}};e.tag="scandit-svg-icon",e.observedAttributes=["fill","size"];var u=e;export{u as a};
@@ -1,4 +1,4 @@
1
- import {a as a$6}from'./chunk-4BDVHW3U.js';import {b as b$3}from'./chunk-BYRUZJLS.js';import {d as d$2,c,b as b$4}from'./chunk-FQK2YWUZ.js';import {a as a$e}from'./chunk-FNFCPBQI.js';import {a as a$2}from'./chunk-N5YZEC56.js';import {a as a$a}from'./chunk-JRBLEJMD.js';import {b,a as a$3}from'./chunk-5S537AFM.js';import {a as a$c}from'./chunk-46WJFV3I.js';import {a as a$7}from'./chunk-GAVFMG2G.js';import {a as a$b}from'./chunk-RIMH6UPR.js';import {a as a$8}from'./chunk-KYNYQBNF.js';import {a as a$h}from'./chunk-ZKROZLQ4.js';import {a as a$5}from'./chunk-6MF4F3EH.js';import {a as a$f}from'./chunk-DMOXDUF6.js';import {b as b$1}from'./chunk-457L5N2F.js';import {a as a$1}from'./chunk-VJB527QZ.js';import {a as a$9}from'./chunk-NMX4VHW2.js';import {a}from'./chunk-7XQ3GHYH.js';import {d as d$1}from'./chunk-SKRKDAFC.js';import {a as a$d}from'./chunk-XR65N6EG.js';import {d}from'./chunk-CAIEX6BZ.js';import {a as a$4,b as b$2,i,f}from'./chunk-LDJ53PEJ.js';import {a as a$g}from'./chunk-WUHKODFA.js';var w="core.camera.recovery",B=class q{constructor(){this.focusGesture=d.DataCaptureView.focusGesture;this.zoomGesture=d.DataCaptureView.zoomGesture;this._scanAreaMargins=d.DataCaptureView.scanAreaMargins;this._pointOfInterest=d.DataCaptureView.pointOfInterest;this._logoStyle=d.DataCaptureView.logoStyle;this._logoAnchor=d.DataCaptureView.logoAnchor;this._logoOffset=d.DataCaptureView.logoOffset;this._context=null;this.overlays=[];this.controls=[];this.controlWidgets=new WeakMap;this.frozenFrameCanvas=document.createElement("canvas");this.listeners=[];this.isVideoElementDetached=!1;this.orientation="portrait";this.hiddenProperties={stopVideoTracksOnVisibilityChange:!0,freezeFrameWhenStoppingFrameSource:!0};this.orientationObserver=new b;this.onOrientationChangeListener=this.onOrientationChange.bind(this);this.onHintPresenterUpdateHandler=this.onHintPresenterUpdate.bind(this);this.onBeforeShowToastsHandler=this.onBeforeShowToasts.bind(this);this.onWorkerMessageHandler=this.onWorkerMessage.bind(this);this.visibilityListener=this.onVisibilityChange.bind(this),this.cameraRecoveryListener=this.cameraRecovery.bind(this),a.getInstance().updateIfMissing(a$1);}get scanAreaMargins(){return this._scanAreaMargins}set scanAreaMargins(e){var t;this._scanAreaMargins=e,(t=this.privateContext)==null||t.update();}get pointOfInterest(){return this._pointOfInterest}set pointOfInterest(e){var t;this._pointOfInterest=e,(t=this.privateContext)==null||t.update();}get logoStyle(){return this._logoStyle}set logoStyle(e){var t;this._logoStyle=e,(t=this.privateContext)==null||t.update();}get logoAnchor(){return this._logoAnchor}set logoAnchor(e){var t;this._logoAnchor=e,(t=this.privateContext)==null||t.update();}get logoOffset(){return this._logoOffset}set logoOffset(e){var t;this._logoOffset=e,(t=this.privateContext)==null||t.update();}get cameraRecoveryText(){return a.getInstance().get(w)}get width(){var e,t;return Math.round((t=(e=this.htmlElementState)==null?void 0:e.width)!=null?t:0)}get height(){var e,t;return Math.round((t=(e=this.htmlElementState)==null?void 0:e.height)!=null?t:0)}get canvasDrawer(){return !this._canvasDrawer&&this.canvasElement!=null&&(this._canvasDrawer=new b$1(this.canvasElement),this._canvasDrawer.startObservingCanvasResize()),this._canvasDrawer}get privateContext(){return this._context}static async forContext(e){let t=new q;return await t.setContext(e),t}showProgressBar(){var e;(e=this.loadingOverlay)==null||e.show();}hideProgressBar(){var e;(e=this.loadingOverlay)==null||e.hide();}setProgressBarPercentage(e){this.loadingOverlay&&(this.loadingOverlay.progress=e);}setProgressBarMessage(e){this.loadingOverlay&&(this.loadingOverlay.message=e);}getContext(){return this._context}async setContext(e){var t,i,n;if(this._context=e,e){if(this.overlays.length>0&&((t=this.privateContext)==null?void 0:t.modes.size)===0)throw new Error(["Cannot assign this view to this context. This view has overlays but the context does not have any mode attached matching these overlays.","Remove the overlays first before attaching the view to the context, or add the corresponding mode to the context before attaching this view."].join(" "));await e.setView(this),(i=this.privateContext)==null||i.subscribeToWorkerMessages(this.onWorkerMessageHandler),(n=this._context)!=null&&n.frameSource&&await this.onFrameSourceChange(this._context.frameSource);}}connectToElement(e){var t,i,n;this.orientationObserver.register(),this.setupHtmlElement(e),(t=this.canvasDrawer)==null||t.startObservingCanvasResize(),this.htmlElementDidChange(),a$2.add(this),this.orientation=this.orientationObserver.orientation.value,this.orientationObserver.addEventListener(a$3,this.onOrientationChangeListener),(i=this.hintPresenter)==null||i.addEventListener("hintpresenterupdate",this.onHintPresenterUpdateHandler),(n=this.hintPresenter)==null||n.addEventListener("willshow",this.onBeforeShowToastsHandler),this.localizationSubscription=a.getInstance().subscribe(a=>{a[w]!=null&&(this.cameraRecoveryElement.textContent=a[w]);});}detachFromElement(){var e,t,i,n,a,o,l,m;(e=this.htmlElementState)==null||e.removeListeners(),this.removeStyles(),(t=this.canvasDrawer)==null||t.endObservingCanvasResize(),document.removeEventListener("visibilitychange",this.visibilityListener);for(let h of ["touchend","mousedown"])this.cameraRecoveryElement.removeEventListener(h,this.cameraRecoveryListener);(i=this.loadingOverlay)==null||i.remove(),(n=this.customLocationsView)==null||n.unmount(),this.htmlElementDidChange(),(a=this.gestureRecognizer)==null||a.removeAllListeners(),this.clearHtmlElementContent(),a$2.delete(this),this.orientationObserver.unregister(),this.orientationObserver.removeEventListener(a$3,this.onOrientationChangeListener),(o=this.hintPresenter)==null||o.removeEventListener("hintpresenterupdate",this.onHintPresenterUpdateHandler),(l=this.hintPresenter)==null||l.removeEventListener("willshow",this.onBeforeShowToastsHandler),(m=this.localizationSubscription)==null||m.cancel();}async addOverlay(e){var t;this.overlays.includes(e)||(this.overlays.push(e),await((t=this.privateContext)==null?void 0:t.update([{type:"addOverlay",newValue:e}])));}async removeOverlay(e){var t;this.overlays.includes(e)&&(this.overlays.splice(this.overlays.indexOf(e),1),await((t=this.privateContext)==null?void 0:t.update([{type:"removeOverlay",newValue:e}])));}addListener(e){this.listeners.includes(e)||this.listeners.push(e);}removeListener(e){this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}viewPointForFramePoint(e){var v,b,O,P,L,V,D,A;let t={width:(b=(v=this.htmlElementState)==null?void 0:v.width)!=null?b:0,height:(P=(O=this.htmlElementState)==null?void 0:O.height)!=null?P:0},i={width:(V=(L=this.videoElement)==null?void 0:L.videoWidth)!=null?V:0,height:(A=(D=this.videoElement)==null?void 0:D.videoHeight)!=null?A:0},n=t.width/t.height,a=i.width/i.height,o=n>a?t.width/i.width:t.height/i.height,l={x:e.x*o,y:e.y*o},m=(i.width*o-t.width)/2,h=(i.height*o-t.height)/2;return new a$4(l.x-m,l.y-h)}viewQuadrilateralForFrameQuadrilateral(e){let t=this.viewPointForFramePoint(e.topLeft),i=this.viewPointForFramePoint(e.topRight),n=this.viewPointForFramePoint(e.bottomLeft),a=this.viewPointForFramePoint(e.bottomRight);return new b$2(t,i,a,n)}addControl(e){var t;this.controls.includes(e)||(e.view=this,this.controls.push(e),this.controlsUpdated(),(t=this.privateContext)==null||t.update([{type:"addControl",newValue:e}]));}removeControl(e){var t;if(this.controls.includes(e)){e.view=null;let i=this.controls.splice(this.controls.indexOf(e),1);this.getControlWidget(i[0]).remove(!0),this.controlsUpdated(),(t=this.privateContext)==null||t.update([{type:"removeControl",newValue:e}]);}}toJSONObject(){var e;return {scanAreaMargins:this.scanAreaMargins.toJSONObject(),pointOfInterest:this.pointOfInterest.toJSONObject(),logoAnchor:this.logoAnchor,logoOffset:this.logoOffset.toJSONObject(),logoHidden:(e=this.logoHidden)!=null?e:!1,logoStyle:this.logoStyle,overlays:this.overlays.map(t=>t.toJSONObject()),controls:this.controls.map(t=>t.toJSONObject()),focusGesture:this.focusGesture?this.focusGesture.toJSONObject():null,zoomGesture:this.zoomGesture?this.zoomGesture.toJSONObject():null}}isCameraRecoveryVisible(){return !this.cameraRecoveryElement.hidden}setCameraRecoveryVisible(e){this.cameraRecoveryElement.hidden=!e;}async allowPictureInPicture(e){await d$1.instance().allowPictureInPicture(e);}viewAnchorPositionsForFrameAnchorPositions(e){let t=this.viewPointForFramePoint(e.topLeft),i=this.viewPointForFramePoint(e.topRight),n=this.viewPointForFramePoint(e.bottomLeft),a=this.viewPointForFramePoint(e.bottomRight),o=this.viewPointForFramePoint(e.centerLeft),l=this.viewPointForFramePoint(e.centerRight),m=this.viewPointForFramePoint(e.topCenter),h=this.viewPointForFramePoint(e.bottomCenter),v=this.viewPointForFramePoint(e.center);return new a$5(t,i,a,n,o,m,l,h,v)}setDidTapCustomLocationsViewListener(e){this.customLocationsView&&this.customLocationsView.listener===null&&(this.customLocationsView.listener=e);}renderCustomLocationsView(e){this.customLocationsView!=null&&(this.customLocationsView.setMirrored(d$1.instance().isMirrorImageEnabled()),this.customLocationsView.render(e));}removeStyles(){for(let e of document.querySelectorAll("style[scandit]"))e.remove();}onHintPresenterUpdate(e){var t;(t=this.privateContext)==null||t.workerCommand("hintPresenterV2update",{});}clearHtmlElementContent(){var e;this.htmlElement&&((e=this.canvasDrawer)==null||e.endObservingCanvasResize(),this.htmlElement.innerHTML="",this.cameraPaintboardElement=void 0,this.singleImageUploaderPaintboardElement=void 0,this.htmlElement=void 0);}setupHtmlElement(e){var o,l,m;this.createStyles(),this.htmlElement=e,b$3.register();let t=`
1
+ import {b as b$3}from'./chunk-64US32RY.js';import {a as a$6}from'./chunk-7ALHRD5L.js';import {a as a$c}from'./chunk-46WJFV3I.js';import {d as d$2,c,b as b$4}from'./chunk-4YVKSEZS.js';import {a as a$e}from'./chunk-FNFCPBQI.js';import {a as a$2}from'./chunk-N5YZEC56.js';import {a as a$a}from'./chunk-JRBLEJMD.js';import {b,a as a$3}from'./chunk-5S537AFM.js';import {a as a$f}from'./chunk-DMOXDUF6.js';import {b as b$1}from'./chunk-457L5N2F.js';import {a as a$7}from'./chunk-GAVFMG2G.js';import {a as a$b}from'./chunk-RIMH6UPR.js';import {a as a$8}from'./chunk-KYNYQBNF.js';import {a as a$h}from'./chunk-ZKROZLQ4.js';import {a as a$5}from'./chunk-6MF4F3EH.js';import {a as a$1}from'./chunk-VJB527QZ.js';import {a as a$9}from'./chunk-NMX4VHW2.js';import {a}from'./chunk-7XQ3GHYH.js';import {d as d$1}from'./chunk-KRWPFM7Z.js';import {a as a$d}from'./chunk-XR65N6EG.js';import {d}from'./chunk-CAIEX6BZ.js';import {a as a$4,b as b$2,i,f}from'./chunk-LDJ53PEJ.js';import {a as a$g}from'./chunk-WUHKODFA.js';var w="core.camera.recovery",B=class q{constructor(){this.focusGesture=d.DataCaptureView.focusGesture;this.zoomGesture=d.DataCaptureView.zoomGesture;this._scanAreaMargins=d.DataCaptureView.scanAreaMargins;this._pointOfInterest=d.DataCaptureView.pointOfInterest;this._logoStyle=d.DataCaptureView.logoStyle;this._logoAnchor=d.DataCaptureView.logoAnchor;this._logoOffset=d.DataCaptureView.logoOffset;this._context=null;this.overlays=[];this.controls=[];this.controlWidgets=new WeakMap;this.frozenFrameCanvas=document.createElement("canvas");this.listeners=[];this.isVideoElementDetached=!1;this.orientation="portrait";this.hiddenProperties={stopVideoTracksOnVisibilityChange:!0,freezeFrameWhenStoppingFrameSource:!0};this.orientationObserver=new b;this.onOrientationChangeListener=this.onOrientationChange.bind(this);this.onHintPresenterUpdateHandler=this.onHintPresenterUpdate.bind(this);this.onBeforeShowToastsHandler=this.onBeforeShowToasts.bind(this);this.onWorkerMessageHandler=this.onWorkerMessage.bind(this);this.visibilityListener=this.onVisibilityChange.bind(this),this.cameraRecoveryListener=this.cameraRecovery.bind(this),a.getInstance().updateIfMissing(a$1);}get scanAreaMargins(){return this._scanAreaMargins}set scanAreaMargins(e){var t;this._scanAreaMargins=e,(t=this.privateContext)==null||t.update();}get pointOfInterest(){return this._pointOfInterest}set pointOfInterest(e){var t;this._pointOfInterest=e,(t=this.privateContext)==null||t.update();}get logoStyle(){return this._logoStyle}set logoStyle(e){var t;this._logoStyle=e,(t=this.privateContext)==null||t.update();}get logoAnchor(){return this._logoAnchor}set logoAnchor(e){var t;this._logoAnchor=e,(t=this.privateContext)==null||t.update();}get logoOffset(){return this._logoOffset}set logoOffset(e){var t;this._logoOffset=e,(t=this.privateContext)==null||t.update();}get cameraRecoveryText(){return a.getInstance().get(w)}get width(){var e,t;return Math.round((t=(e=this.htmlElementState)==null?void 0:e.width)!=null?t:0)}get height(){var e,t;return Math.round((t=(e=this.htmlElementState)==null?void 0:e.height)!=null?t:0)}get canvasDrawer(){return !this._canvasDrawer&&this.canvasElement!=null&&(this._canvasDrawer=new b$1(this.canvasElement),this._canvasDrawer.startObservingCanvasResize()),this._canvasDrawer}get privateContext(){return this._context}static async forContext(e){let t=new q;return await t.setContext(e),t}showProgressBar(){var e;(e=this.loadingOverlay)==null||e.show();}hideProgressBar(){var e;(e=this.loadingOverlay)==null||e.hide();}setProgressBarPercentage(e){this.loadingOverlay&&(this.loadingOverlay.progress=e);}setProgressBarMessage(e){this.loadingOverlay&&(this.loadingOverlay.message=e);}getContext(){return this._context}async setContext(e){var t,i,n;if(this._context=e,e){if(this.overlays.length>0&&((t=this.privateContext)==null?void 0:t.modes.size)===0)throw new Error(["Cannot assign this view to this context. This view has overlays but the context does not have any mode attached matching these overlays.","Remove the overlays first before attaching the view to the context, or add the corresponding mode to the context before attaching this view."].join(" "));await e.setView(this),(i=this.privateContext)==null||i.subscribeToWorkerMessages(this.onWorkerMessageHandler),(n=this._context)!=null&&n.frameSource&&await this.onFrameSourceChange(this._context.frameSource);}}connectToElement(e){var t,i,n;this.orientationObserver.register(),this.setupHtmlElement(e),(t=this.canvasDrawer)==null||t.startObservingCanvasResize(),this.htmlElementDidChange(),a$2.add(this),this.orientation=this.orientationObserver.orientation.value,this.orientationObserver.addEventListener(a$3,this.onOrientationChangeListener),(i=this.hintPresenter)==null||i.addEventListener("hintpresenterupdate",this.onHintPresenterUpdateHandler),(n=this.hintPresenter)==null||n.addEventListener("willshow",this.onBeforeShowToastsHandler),this.localizationSubscription=a.getInstance().subscribe(a=>{a[w]!=null&&(this.cameraRecoveryElement.textContent=a[w]);});}detachFromElement(){var e,t,i,n,a,o,l,m;(e=this.htmlElementState)==null||e.removeListeners(),this.removeStyles(),(t=this.canvasDrawer)==null||t.endObservingCanvasResize(),document.removeEventListener("visibilitychange",this.visibilityListener);for(let h of ["touchend","mousedown"])this.cameraRecoveryElement.removeEventListener(h,this.cameraRecoveryListener);(i=this.loadingOverlay)==null||i.remove(),(n=this.customLocationsView)==null||n.unmount(),this.htmlElementDidChange(),(a=this.gestureRecognizer)==null||a.removeAllListeners(),this.clearHtmlElementContent(),a$2.delete(this),this.orientationObserver.unregister(),this.orientationObserver.removeEventListener(a$3,this.onOrientationChangeListener),(o=this.hintPresenter)==null||o.removeEventListener("hintpresenterupdate",this.onHintPresenterUpdateHandler),(l=this.hintPresenter)==null||l.removeEventListener("willshow",this.onBeforeShowToastsHandler),(m=this.localizationSubscription)==null||m.cancel();}async addOverlay(e){var t;this.overlays.includes(e)||(this.overlays.push(e),await((t=this.privateContext)==null?void 0:t.update([{type:"addOverlay",newValue:e}])));}async removeOverlay(e){var t;this.overlays.includes(e)&&(this.overlays.splice(this.overlays.indexOf(e),1),await((t=this.privateContext)==null?void 0:t.update([{type:"removeOverlay",newValue:e}])));}addListener(e){this.listeners.includes(e)||this.listeners.push(e);}removeListener(e){this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}viewPointForFramePoint(e){var v,b,O,P,L,V,D,A;let t={width:(b=(v=this.htmlElementState)==null?void 0:v.width)!=null?b:0,height:(P=(O=this.htmlElementState)==null?void 0:O.height)!=null?P:0},i={width:(V=(L=this.videoElement)==null?void 0:L.videoWidth)!=null?V:0,height:(A=(D=this.videoElement)==null?void 0:D.videoHeight)!=null?A:0},n=t.width/t.height,a=i.width/i.height,o=n>a?t.width/i.width:t.height/i.height,l={x:e.x*o,y:e.y*o},m=(i.width*o-t.width)/2,h=(i.height*o-t.height)/2;return new a$4(l.x-m,l.y-h)}viewQuadrilateralForFrameQuadrilateral(e){let t=this.viewPointForFramePoint(e.topLeft),i=this.viewPointForFramePoint(e.topRight),n=this.viewPointForFramePoint(e.bottomLeft),a=this.viewPointForFramePoint(e.bottomRight);return new b$2(t,i,a,n)}addControl(e){var t;this.controls.includes(e)||(e.view=this,this.controls.push(e),this.controlsUpdated(),(t=this.privateContext)==null||t.update([{type:"addControl",newValue:e}]));}removeControl(e){var t;if(this.controls.includes(e)){e.view=null;let i=this.controls.splice(this.controls.indexOf(e),1);this.getControlWidget(i[0]).remove(!0),this.controlsUpdated(),(t=this.privateContext)==null||t.update([{type:"removeControl",newValue:e}]);}}toJSONObject(){var e;return {scanAreaMargins:this.scanAreaMargins.toJSONObject(),pointOfInterest:this.pointOfInterest.toJSONObject(),logoAnchor:this.logoAnchor,logoOffset:this.logoOffset.toJSONObject(),logoHidden:(e=this.logoHidden)!=null?e:!1,logoStyle:this.logoStyle,overlays:this.overlays.map(t=>t.toJSONObject()),controls:this.controls.map(t=>t.toJSONObject()),focusGesture:this.focusGesture?this.focusGesture.toJSONObject():null,zoomGesture:this.zoomGesture?this.zoomGesture.toJSONObject():null}}isCameraRecoveryVisible(){return !this.cameraRecoveryElement.hidden}setCameraRecoveryVisible(e){this.cameraRecoveryElement.hidden=!e;}async allowPictureInPicture(e){await d$1.instance().allowPictureInPicture(e);}viewAnchorPositionsForFrameAnchorPositions(e){let t=this.viewPointForFramePoint(e.topLeft),i=this.viewPointForFramePoint(e.topRight),n=this.viewPointForFramePoint(e.bottomLeft),a=this.viewPointForFramePoint(e.bottomRight),o=this.viewPointForFramePoint(e.centerLeft),l=this.viewPointForFramePoint(e.centerRight),m=this.viewPointForFramePoint(e.topCenter),h=this.viewPointForFramePoint(e.bottomCenter),v=this.viewPointForFramePoint(e.center);return new a$5(t,i,a,n,o,m,l,h,v)}setDidTapCustomLocationsViewListener(e){this.customLocationsView&&this.customLocationsView.listener===null&&(this.customLocationsView.listener=e);}renderCustomLocationsView(e){this.customLocationsView!=null&&(this.customLocationsView.setMirrored(d$1.instance().isMirrorImageEnabled()),this.customLocationsView.render(e));}removeStyles(){for(let e of document.querySelectorAll("style[scandit]"))e.remove();}onHintPresenterUpdate(e){var t;(t=this.privateContext)==null||t.workerCommand("hintPresenterV2update",{});}clearHtmlElementContent(){var e;this.htmlElement&&((e=this.canvasDrawer)==null||e.endObservingCanvasResize(),this.htmlElement.innerHTML="",this.cameraPaintboardElement=void 0,this.singleImageUploaderPaintboardElement=void 0,this.htmlElement=void 0);}setupHtmlElement(e){var o,l,m;this.createStyles(),this.htmlElement=e,b$3.register();let t=`
2
2
  <div class="${a$9.CONTAINER_CLASS_NAME}">
3
3
  <div class="${a$9.PAINTBOARDS_CONTAINER_CLASS_NAME}">
4
4
  <div data-js-id="loading-overlay"></div>
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-MAMZS5CH.js';import {a as a$1}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'./chunk-DVQH5JLR.js';import {a as a$1}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-U6BTTEV6.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1 +1 @@
1
- import {a}from'./chunk-LFWLFZZA.js';import {a as a$4}from'./chunk-AIRWHLJH.js';import {a as a$3}from'./chunk-FGO2SSRS.js';import {a as a$1}from'./chunk-QCRFVRSS.js';import {b}from'./chunk-FTD535WI.js';import {a as a$2}from'./chunk-XR65N6EG.js';var h=class{constructor(a$2,e){this.onMessageListener=this.onMessage.bind(this);this.workerSelf=a$2,this.dataCaptureInstance=new a(e,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)}),a$1(a$2)&&this.listenToMessages();}listenToMessages(){this.workerSelf.addEventListener("message",this.onMessageListener),this.workerSelf.addEventListener("error",a=>{a$2.log(a$2.Level.Error,a);}),this.workerSelf.addEventListener("messageerror",a=>{a$2.log(a$2.Level.Error,a);});}postMessage(a,e){this.workerSelf.postMessage(a,e!=null?e:[]);}getOffscreenCanvas(){if(typeof this.workerSelf.OffscreenCanvas=="function")return new this.workerSelf.OffscreenCanvas(32,32)}hasPayload(a){return a$3(a)&&"payload"in a}hasTransferables(a){return a$3(a)&&Array.isArray(a.transferables)}async respondWith(a,e,u){let r=null,t;try{t=u(),t instanceof Promise&&(t=await t);}catch(l){t=void 0,r=a$4(l);}let i={type:"workerTaskId",command:a,id:e,payload:this.hasPayload(t)?t.payload:void 0};r!=null&&(i.error=r),this.postMessage(i,this.hasTransferables(t)?t.transferables:[]);}onMessage(a){switch(a.data.command){case"loadLibrary":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.loadLibrary({libraryLocation:e.libraryLocation,locationPath:e.locationPath,referredOrigin:e.referredOrigin,writableDataPathOverride:e.writableDataPathOverride,overrideThreadsSupport:e.overrideThreadsSupport,overrideSimdSupport:e.overrideSimdSupport,verifyResponseHash:e.verifyResponseHash,fixedWasmMemory:e.fixedWasmMemory}));}break}case"onTap":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.onTap(e.point);});}break}case"hintPresenterV2update":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.hintPresenterV2Update();});}break}case"createContext":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.createContext({context:e.context,deviceId:e.deviceId,delayedRegistration:e.delayedRegistration,highEndBlurryRecognition:e.highEndBlurryRecognition,appName:e.appName,parentDomain:e.parentDomain}));}break}case"setFrameSource":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.setFrameSource(e.mirrorAxis,e.isCameraFrameSource));}break}case"processFrame":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.processFrame({data:e.data,width:e.width,height:e.height,colorType:e.colorType}));}break}case"requestFrameData":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.requestFrameData(e.frameId));}break}case"deleteFrameData":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.deleteFrameData(e.frameId);});}break}case"updateContext":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.updateContext(e));}break}case"dispose":{this.respondWith(a.data.command,a.data.id,()=>this.dataCaptureInstance.dispose());break}case"flushAnalytics":{this.respondWith(a.data.command,a.data.id,()=>{this.dataCaptureInstance.flushAnalytics();});break}case"reportCameraProperties":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.reportCameraProperties(e));}break}case"setLogLevel":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{a$2.setLevel(e.level);});}break}case"extractCentaurusLicense":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.extractCentaurusLicense(e.licenseKey));}break}case"documentVisibility":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.onDocumentVisibilityChange(e.state);});}break}case"isFeatureSupported":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.isFeatureSupported(e.feature));}break}case"getViewfinderInfo":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getViewfinderInfo());}break}case"getOpenSourceSoftwareLicenseInfo":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getOpenSourceSoftwareLicenseInfo());}break}default:return b(a.data),!1}return !0}};export{h as a};
1
+ import {a}from'./chunk-U2GDN6EV.js';import {a as a$1}from'./chunk-QCRFVRSS.js';import {a as a$4}from'./chunk-AIRWHLJH.js';import {a as a$3}from'./chunk-FGO2SSRS.js';import {b}from'./chunk-FTD535WI.js';import {a as a$2}from'./chunk-XR65N6EG.js';var h=class{constructor(a$2,e){this.onMessageListener=this.onMessage.bind(this);this.workerSelf=a$2,this.dataCaptureInstance=new a(e,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)}),a$1(a$2)&&this.listenToMessages();}listenToMessages(){this.workerSelf.addEventListener("message",this.onMessageListener),this.workerSelf.addEventListener("error",a=>{a$2.log(a$2.Level.Error,a);}),this.workerSelf.addEventListener("messageerror",a=>{a$2.log(a$2.Level.Error,a);});}postMessage(a,e){this.workerSelf.postMessage(a,e!=null?e:[]);}getOffscreenCanvas(){if(typeof this.workerSelf.OffscreenCanvas=="function")return new this.workerSelf.OffscreenCanvas(32,32)}hasPayload(a){return a$3(a)&&"payload"in a}hasTransferables(a){return a$3(a)&&Array.isArray(a.transferables)}async respondWith(a,e,u){let r=null,t;try{t=u(),t instanceof Promise&&(t=await t);}catch(l){t=void 0,r=a$4(l);}let i={type:"workerTaskId",command:a,id:e,payload:this.hasPayload(t)?t.payload:void 0};r!=null&&(i.error=r),this.postMessage(i,this.hasTransferables(t)?t.transferables:[]);}onMessage(a){switch(a.data.command){case"loadLibrary":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.loadLibrary({libraryLocation:e.libraryLocation,locationPath:e.locationPath,referredOrigin:e.referredOrigin,writableDataPathOverride:e.writableDataPathOverride,overrideThreadsSupport:e.overrideThreadsSupport,overrideSimdSupport:e.overrideSimdSupport,verifyResponseHash:e.verifyResponseHash,fixedWasmMemory:e.fixedWasmMemory}));}break}case"onTap":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.onTap(e.point);});}break}case"hintPresenterV2update":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.hintPresenterV2Update();});}break}case"createContext":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.createContext({context:e.context,deviceId:e.deviceId,delayedRegistration:e.delayedRegistration,highEndBlurryRecognition:e.highEndBlurryRecognition,appName:e.appName,parentDomain:e.parentDomain}));}break}case"setFrameSource":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.setFrameSource(e.mirrorAxis,e.isCameraFrameSource));}break}case"processFrame":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.processFrame({data:e.data,width:e.width,height:e.height,colorType:e.colorType}));}break}case"requestFrameData":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.requestFrameData(e.frameId));}break}case"deleteFrameData":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.deleteFrameData(e.frameId);});}break}case"updateContext":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.updateContext(e));}break}case"dispose":{this.respondWith(a.data.command,a.data.id,()=>this.dataCaptureInstance.dispose());break}case"flushAnalytics":{this.respondWith(a.data.command,a.data.id,()=>{this.dataCaptureInstance.flushAnalytics();});break}case"reportCameraProperties":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.reportCameraProperties(e));}break}case"setLogLevel":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{a$2.setLevel(e.level);});}break}case"extractCentaurusLicense":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.extractCentaurusLicense(e.licenseKey));}break}case"documentVisibility":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.onDocumentVisibilityChange(e.state);});}break}case"isFeatureSupported":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.isFeatureSupported(e.feature));}break}case"getViewfinderInfo":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getViewfinderInfo());}break}case"getOpenSourceSoftwareLicenseInfo":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getOpenSourceSoftwareLicenseInfo());}break}default:return b(a.data),!1}return !0}};export{h as a};
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-5TKCHVG2.js';import {d}from'./chunk-SKRKDAFC.js';import {a}from'./chunk-XR65N6EG.js';import {a as a$2}from'./chunk-MU4VAJIM.js';import {g as g$1}from'./chunk-NQC64CT7.js';import {d as d$1}from'./chunk-CAIEX6BZ.js';var g=class n{constructor(e){this.deviceId="";this.type="camera";this._currentState="off";this._settings=new g$1;this._desiredTorchState="off";this._desiredState="off";this.listeners=[];this._context=null;this.stateTransitionStrategyMap={off:{on:this.transitionFromStateOffToOn.bind(this),standby:this.transitionFromStateOffToStandby.bind(this)},on:{off:this.transitionFromStateOnToOff.bind(this),standby:this.transitionFromStateOnToStandby.bind(this)},standby:{off:this.transitionFromStateStandbyToOff.bind(this),on:this.transitionFromStateStandbyToOn.bind(this)}};this.cameraManager=e!=null?e:d.instance(),this.updateCanvasVideoImage=this.updateCanvasVideoImage.bind(this),this.captureAndSend=this.captureAndSend.bind(this);}static get default(){let e=new n;return e.position="worldFacing",e}get desiredState(){return this._desiredState}get settings(){return this._settings}get currentResolution(){var e;return (e=this._currentResolution)!=null?e:null}get context(){return this._context}set context(e){this._context=e,this._context&&this.currentState==="on"&&this.startSendingCapturesToWorker();}get currentState(){return this._currentState}static atPosition(e){if(d$1.Camera.availablePositions.includes(e)){let t=new n;return t.position=e,t}return a.log(a.Level.Warn,`invalid CameraPosition: "${e}"`),null}static fromDeviceCamera(e){let t=n.atPosition(e.position);return t.deviceId=e.deviceId,t.label=e.label,t}async switchToDesiredState(e){var t,i;return this.currentTransitionStrategyPromise&&await this.currentTransitionStrategyPromise,this.currentTransitionStrategyPromise=(i=(t=this.stateTransitionStrategyMap[this.currentState])==null?void 0:t[e])==null?void 0:i.call(t).catch(r=>{if(r instanceof DOMException&&r.message==="The associated Track is in an invalid state"){a.log(a.Level.Warn,r);return}throw r}),this.currentTransitionStrategyPromise}getDesiredTorchState(){return this._desiredTorchState}async setDesiredTorchState(e){this._desiredTorchState=e,await this.cameraManager.setTorchEnabled(this._desiredTorchState==="on"),await this.notifyContext({type:"torchState",newValue:this._desiredTorchState});}async isTorchAvailable(){return this.cameraManager.isTorchAvailable()}addListener(e){e!=null&&(this.listeners.includes(e)||this.listeners.push(e));}removeListener(e){e!=null&&this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}async applySettings(e){var i;this._settings=new g$1(e);let t=this.settings.getProperty("grayScaleFrameReader");if(this.cameraManager.setFrameReaderType(t===!0?"GRAYSCALE":"RGBA"),this.currentState==="on"||this.currentState==="standby"){let r=this.cameraManager.activeCameraSettings;(r==null?void 0:r.preferredResolution)!==this.settings.preferredResolution&&(await this.cameraManager.applyCameraSettings(this.settings),(i=this.cameraManager.activeCamera)!=null&&i.currentResolution&&(this._currentResolution={width:this.cameraManager.activeCamera.currentResolution.width,height:this.cameraManager.activeCamera.currentResolution.height})),await this.cameraManager.setZoom(this.settings.zoomFactor);let o=this.settings.getProperty("minFrameRate"),c=this.settings.getProperty("maxFrameRate");(o!=null||c!=null)&&await this.cameraManager.setFrameRate({min:o,max:c});let m=this.settings.getProperty("manualLensPosition");m!=null&&await this.cameraManager.setFocus(m);let u=this.settings.getProperty("exposureTargetBias"),d=this.settings.getProperty("exposureDuration");(u!=null||d!=null)&&await this.cameraManager.setExposure({compensation:u,time:d});}return this.notifyContext({type:"cameraSettings",newValue:this.settings})}toJSONObject(){return {type:this.type,position:this.position,settings:this.settings.toJSONObject(),desiredState:this.desiredState,desiredTorchState:this._desiredTorchState}}getMirrorImageEnabled(){var e;return (e=this._desiredMirrorImageEnabled)!=null?e:this.cameraManager.isMirrorImageEnabled()}async setMirrorImageEnabled(e){this._desiredMirrorImageEnabled=e,this.cameraManager.setMirrorImageEnabled(e,!0),this.context&&await this.context.setFrameSource(this);}getCurrentState(){return this._currentState}async setCurrentState(e){if(e!==this._currentState){this._currentState=e,this.notifyListeners();try{await this.notifyContext({type:"frameSourceState",newValue:e}),e==="on"&&this.startSendingCapturesToWorker();}catch(t){a.log(a.Level.Warn,"Error while notifying context about new state of Camera");}}}async setupCamera(){if(this.cameraManager.setSelectedCameraSettings(this.settings),this.deviceId==="")this.cameraManager.setSelectedCamera(),this.cameraManager.setInitialCameraPosition(this.position);else {let t=(await a$1.getCameras()).find(i=>i.deviceId===this.deviceId);t&&(this.cameraManager.setInitialCameraPosition(t.position),this.cameraManager.setSelectedCamera(t));}await this.cameraManager.setupCameras(),typeof this._desiredMirrorImageEnabled=="boolean"?this.cameraManager.setMirrorImageEnabled(this._desiredMirrorImageEnabled,!0):this.cameraManager.setMirrorImageEnabled(this.cameraManager.isMirrorImageEnabled(),!1),this.context&&await this.context.setFrameSource(this),this.cameraManager.activeCamera&&(this.label=this.cameraManager.activeCamera.label,this.position=this.cameraManager.activeCamera.position,this.deviceId=this.cameraManager.activeCamera.deviceId,this._currentResolution=this.cameraManager.activeCamera.currentResolution);}async notifyContext(e){if(this.context)return this.context.update([e])}notifyListeners(){for(let e of this.listeners)e.didChangeState&&e.didChangeState(this,this.currentState);}updateCanvasVideoImage(){this.currentState==="on"&&this.context&&(this.cameraManager.updateCanvasVideoImage(),this._lastCanvasVideoPreviewAnimationFrame=this.cameraManager.requestVideoFrame(this.updateCanvasVideoImage));}async captureAndSend(){if(this.currentState!=="on"||!this.context)return;if(!this.context.hasEnabledMode()){this._lastCaptureRequestAnimationFrame=this.cameraManager.requestVideoFrame(this.captureAndSend);return}let e=null;try{e=this.cameraManager.captureImage();}catch(t){a.log(a.Level.Warn,t.message);}finally{if(e!=null)if(this.cameraManager.synchronousFrameHandling){let t=await this.context.sendFrameToProcessor(e);this.cameraManager.recycle(t.data);}else this.context.sendFrameToProcessor(e).then(t=>(this.cameraManager.recycle(t.data),null)).catch(t=>{a.warn("error while recycling uint8array",t);});this._lastCaptureRequestAnimationFrame=this.cameraManager.requestVideoFrame(this.captureAndSend);}}startSendingCapturesToWorker(){this.stopSendingCapturesToWorker(),this.captureAndSend();}stopSendingCapturesToWorker(){this._lastCanvasVideoPreviewAnimationFrame!=null&&this.cameraManager.cancelVideoFrame(this._lastCanvasVideoPreviewAnimationFrame),this._lastCaptureRequestAnimationFrame!=null&&this.cameraManager.cancelVideoFrame(this._lastCaptureRequestAnimationFrame);}async transitionFromStateOffToOn(){if(!(this.currentState==="on"||this.currentState==="starting"||this.currentState==="wakingUp")){this._desiredState="on",await this.setCurrentState("starting");try{await this.setupCamera(),await this.setCurrentState("on");}catch(e){throw a.log(a.Level.Error,e),await this.setCurrentState("off"),e}}}async transitionFromStateOffToStandby(){if(!(this.currentState==="standby"||this.currentState==="bootingUp"||this.currentState==="goingToSleep")){if(await this.isAndroidWebView()){a.log(a.Level.Warn,'Warning: "Standby" state does not work inside web views. Falling back to state "On".'),await this.transitionFromStateOffToOn();return}this._desiredState="standby",await this.setCurrentState("bootingUp");try{await this.setupCamera(),this.cameraManager.pauseStream(),await this.setCurrentState("standby");}catch(e){throw a.log(a.Level.Error,e),await this.setCurrentState("off"),e}await this.setCurrentState("standby"),await this.setDesiredTorchState("off");}}async transitionFromStateOnToOff(){this.currentState==="off"||this.currentState==="stopping"||(this._desiredState="off",await this.setCurrentState("stopping"),await this.cameraManager.stopStream(),await this.setCurrentState("off"),await this.setDesiredTorchState("off"));}async transitionFromStateOnToStandby(){if(!(this.currentState==="standby"||this.currentState==="bootingUp"||this.currentState==="goingToSleep")){if(await this.isAndroidWebView()){a.log(a.Level.Warn,'Warning: "Standby" state does not work inside web views. Falling back to state "Off".'),await this.transitionFromStateOnToOff();return}this._desiredState="standby",await this.setCurrentState("goingToSleep"),this.cameraManager.pauseStream(),await this.setCurrentState("standby"),await this.setDesiredTorchState("off");}}async transitionFromStateStandbyToOff(){this.currentState==="off"||this.currentState==="stopping"||(this._desiredState="off",await this.setCurrentState("shuttingDown"),await this.cameraManager.stopStream(),await this.setCurrentState("off"),await this.setDesiredTorchState("off"));}async transitionFromStateStandbyToOn(){this.currentState==="on"||this.currentState==="starting"||this.currentState==="wakingUp"||(this._desiredState="on",await this.setCurrentState("wakingUp"),this.cameraManager.resumeStream(),await this.setCurrentState("on"));}async isAndroidWebView(){return this._isAndroidWebView==null&&(this._isAndroidWebView=await a$2.isAndroidWebView()),this._isAndroidWebView}isZoomAvailable(){var e;return ((e=this.cameraManager.mediaTrackCapabilities)==null?void 0:e.zoom)!=null}};export{g as a};
1
+ import {a as a$1}from'./chunk-5TKCHVG2.js';import {d}from'./chunk-KRWPFM7Z.js';import {a}from'./chunk-XR65N6EG.js';import {a as a$2}from'./chunk-MU4VAJIM.js';import {g as g$1}from'./chunk-NQC64CT7.js';import {d as d$1}from'./chunk-CAIEX6BZ.js';var g=class n{constructor(e){this.deviceId="";this.type="camera";this._currentState="off";this._settings=new g$1;this._desiredTorchState="off";this._desiredState="off";this.listeners=[];this._context=null;this.stateTransitionStrategyMap={off:{on:this.transitionFromStateOffToOn.bind(this),standby:this.transitionFromStateOffToStandby.bind(this)},on:{off:this.transitionFromStateOnToOff.bind(this),standby:this.transitionFromStateOnToStandby.bind(this)},standby:{off:this.transitionFromStateStandbyToOff.bind(this),on:this.transitionFromStateStandbyToOn.bind(this)}};this.cameraManager=e!=null?e:d.instance(),this.updateCanvasVideoImage=this.updateCanvasVideoImage.bind(this),this.captureAndSend=this.captureAndSend.bind(this);}static get default(){let e=new n;return e.position="worldFacing",e}get desiredState(){return this._desiredState}get settings(){return this._settings}get currentResolution(){var e;return (e=this._currentResolution)!=null?e:null}get context(){return this._context}set context(e){this._context=e,this._context&&this.currentState==="on"&&this.startSendingCapturesToWorker();}get currentState(){return this._currentState}static atPosition(e){if(d$1.Camera.availablePositions.includes(e)){let t=new n;return t.position=e,t}return a.log(a.Level.Warn,`invalid CameraPosition: "${e}"`),null}static fromDeviceCamera(e){let t=n.atPosition(e.position);return t.deviceId=e.deviceId,t.label=e.label,t}async switchToDesiredState(e){var t,i;return this.currentTransitionStrategyPromise&&await this.currentTransitionStrategyPromise,this.currentTransitionStrategyPromise=(i=(t=this.stateTransitionStrategyMap[this.currentState])==null?void 0:t[e])==null?void 0:i.call(t).catch(r=>{if(r instanceof DOMException&&r.message==="The associated Track is in an invalid state"){a.log(a.Level.Warn,r);return}throw r}),this.currentTransitionStrategyPromise}getDesiredTorchState(){return this._desiredTorchState}async setDesiredTorchState(e){this._desiredTorchState=e,await this.cameraManager.setTorchEnabled(this._desiredTorchState==="on"),await this.notifyContext({type:"torchState",newValue:this._desiredTorchState});}async isTorchAvailable(){return this.cameraManager.isTorchAvailable()}addListener(e){e!=null&&(this.listeners.includes(e)||this.listeners.push(e));}removeListener(e){e!=null&&this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}async applySettings(e){var i;this._settings=new g$1(e);let t=this.settings.getProperty("grayScaleFrameReader");if(this.cameraManager.setFrameReaderType(t===!0?"GRAYSCALE":"RGBA"),this.currentState==="on"||this.currentState==="standby"){let r=this.cameraManager.activeCameraSettings;(r==null?void 0:r.preferredResolution)!==this.settings.preferredResolution&&(await this.cameraManager.applyCameraSettings(this.settings),(i=this.cameraManager.activeCamera)!=null&&i.currentResolution&&(this._currentResolution={width:this.cameraManager.activeCamera.currentResolution.width,height:this.cameraManager.activeCamera.currentResolution.height})),await this.cameraManager.setZoom(this.settings.zoomFactor);let o=this.settings.getProperty("minFrameRate"),c=this.settings.getProperty("maxFrameRate");(o!=null||c!=null)&&await this.cameraManager.setFrameRate({min:o,max:c});let m=this.settings.getProperty("manualLensPosition");m!=null&&await this.cameraManager.setFocus(m);let u=this.settings.getProperty("exposureTargetBias"),d=this.settings.getProperty("exposureDuration");(u!=null||d!=null)&&await this.cameraManager.setExposure({compensation:u,time:d});}return this.notifyContext({type:"cameraSettings",newValue:this.settings})}toJSONObject(){return {type:this.type,position:this.position,settings:this.settings.toJSONObject(),desiredState:this.desiredState,desiredTorchState:this._desiredTorchState}}getMirrorImageEnabled(){var e;return (e=this._desiredMirrorImageEnabled)!=null?e:this.cameraManager.isMirrorImageEnabled()}async setMirrorImageEnabled(e){this._desiredMirrorImageEnabled=e,this.cameraManager.setMirrorImageEnabled(e,!0),this.context&&await this.context.setFrameSource(this);}getCurrentState(){return this._currentState}async setCurrentState(e){if(e!==this._currentState){this._currentState=e,this.notifyListeners();try{await this.notifyContext({type:"frameSourceState",newValue:e}),e==="on"&&this.startSendingCapturesToWorker();}catch(t){a.log(a.Level.Warn,"Error while notifying context about new state of Camera");}}}async setupCamera(){if(this.cameraManager.setSelectedCameraSettings(this.settings),this.deviceId==="")this.cameraManager.setSelectedCamera(),this.cameraManager.setInitialCameraPosition(this.position);else {let t=(await a$1.getCameras()).find(i=>i.deviceId===this.deviceId);t&&(this.cameraManager.setInitialCameraPosition(t.position),this.cameraManager.setSelectedCamera(t));}await this.cameraManager.setupCameras(),typeof this._desiredMirrorImageEnabled=="boolean"?this.cameraManager.setMirrorImageEnabled(this._desiredMirrorImageEnabled,!0):this.cameraManager.setMirrorImageEnabled(this.cameraManager.isMirrorImageEnabled(),!1),this.context&&await this.context.setFrameSource(this),this.cameraManager.activeCamera&&(this.label=this.cameraManager.activeCamera.label,this.position=this.cameraManager.activeCamera.position,this.deviceId=this.cameraManager.activeCamera.deviceId,this._currentResolution=this.cameraManager.activeCamera.currentResolution);}async notifyContext(e){if(this.context)return this.context.update([e])}notifyListeners(){for(let e of this.listeners)e.didChangeState&&e.didChangeState(this,this.currentState);}updateCanvasVideoImage(){this.currentState==="on"&&this.context&&(this.cameraManager.updateCanvasVideoImage(),this._lastCanvasVideoPreviewAnimationFrame=this.cameraManager.requestVideoFrame(this.updateCanvasVideoImage));}async captureAndSend(){if(this.currentState!=="on"||!this.context)return;if(!this.context.hasEnabledMode()){this._lastCaptureRequestAnimationFrame=this.cameraManager.requestVideoFrame(this.captureAndSend);return}let e=null;try{e=this.cameraManager.captureImage();}catch(t){a.log(a.Level.Warn,t.message);}finally{if(e!=null)if(this.cameraManager.synchronousFrameHandling){let t=await this.context.sendFrameToProcessor(e);this.cameraManager.recycle(t.data);}else this.context.sendFrameToProcessor(e).then(t=>(this.cameraManager.recycle(t.data),null)).catch(t=>{a.warn("error while recycling uint8array",t);});this._lastCaptureRequestAnimationFrame=this.cameraManager.requestVideoFrame(this.captureAndSend);}}startSendingCapturesToWorker(){this.stopSendingCapturesToWorker(),this.captureAndSend();}stopSendingCapturesToWorker(){this._lastCanvasVideoPreviewAnimationFrame!=null&&this.cameraManager.cancelVideoFrame(this._lastCanvasVideoPreviewAnimationFrame),this._lastCaptureRequestAnimationFrame!=null&&this.cameraManager.cancelVideoFrame(this._lastCaptureRequestAnimationFrame);}async transitionFromStateOffToOn(){if(!(this.currentState==="on"||this.currentState==="starting"||this.currentState==="wakingUp")){this._desiredState="on",await this.setCurrentState("starting");try{await this.setupCamera(),await this.setCurrentState("on");}catch(e){throw a.log(a.Level.Error,e),await this.setCurrentState("off"),e}}}async transitionFromStateOffToStandby(){if(!(this.currentState==="standby"||this.currentState==="bootingUp"||this.currentState==="goingToSleep")){if(await this.isAndroidWebView()){a.log(a.Level.Warn,'Warning: "Standby" state does not work inside web views. Falling back to state "On".'),await this.transitionFromStateOffToOn();return}this._desiredState="standby",await this.setCurrentState("bootingUp");try{await this.setupCamera(),this.cameraManager.pauseStream(),await this.setCurrentState("standby");}catch(e){throw a.log(a.Level.Error,e),await this.setCurrentState("off"),e}await this.setCurrentState("standby"),await this.setDesiredTorchState("off");}}async transitionFromStateOnToOff(){this.currentState==="off"||this.currentState==="stopping"||(this._desiredState="off",await this.setCurrentState("stopping"),await this.cameraManager.stopStream(),await this.setCurrentState("off"),await this.setDesiredTorchState("off"));}async transitionFromStateOnToStandby(){if(!(this.currentState==="standby"||this.currentState==="bootingUp"||this.currentState==="goingToSleep")){if(await this.isAndroidWebView()){a.log(a.Level.Warn,'Warning: "Standby" state does not work inside web views. Falling back to state "Off".'),await this.transitionFromStateOnToOff();return}this._desiredState="standby",await this.setCurrentState("goingToSleep"),this.cameraManager.pauseStream(),await this.setCurrentState("standby"),await this.setDesiredTorchState("off");}}async transitionFromStateStandbyToOff(){this.currentState==="off"||this.currentState==="stopping"||(this._desiredState="off",await this.setCurrentState("shuttingDown"),await this.cameraManager.stopStream(),await this.setCurrentState("off"),await this.setDesiredTorchState("off"));}async transitionFromStateStandbyToOn(){this.currentState==="on"||this.currentState==="starting"||this.currentState==="wakingUp"||(this._desiredState="on",await this.setCurrentState("wakingUp"),this.cameraManager.resumeStream(),await this.setCurrentState("on"));}async isAndroidWebView(){return this._isAndroidWebView==null&&(this._isAndroidWebView=await a$2.isAndroidWebView()),this._isAndroidWebView}isZoomAvailable(){var e;return ((e=this.cameraManager.mediaTrackCapabilities)==null?void 0:e.zoom)!=null}};export{g as a};