@scandit/web-datacapture-core 8.4.0 → 8.5.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY.txt +2 -28
- package/build/electron/constants-D5Av3xIA.js +1 -0
- package/build/electron/constants-Tq_qHFkh.cjs +1 -0
- package/build/electron/main.cjs +1 -1
- package/build/electron/main.d.cts +12 -21
- package/build/electron/main.d.ts +12 -21
- package/build/electron/main.js +1 -1
- package/build/electron/preload.cjs +1 -1
- package/build/electron/preload.d.cts +4 -4
- package/build/electron/preload.d.ts +4 -4
- package/build/electron/preload.js +1 -1
- package/build/js/AdditionalLayerPosition-D_ouQ8wn.d.ts +7 -0
- package/build/js/AimerViewfinder-bCf_UrQu.d.ts +15 -0
- package/build/js/AimerViewfinder.d.ts +2 -22
- package/build/js/AimerViewfinder.js +1 -1
- package/build/js/Anchor-DxO9CbHk.d.ts +14 -0
- package/build/js/AnchorPositions-4M8lB28_.d.ts +42 -0
- package/build/js/AsyncStateMachine-gK_htWdT.d.ts +49 -0
- package/build/js/AudioCache-D893YEVZ.d.ts +37 -0
- package/build/js/BatteryInterface-BYl36ktu.d.ts +81 -0
- package/build/js/Brush-D6WUoW36.d.ts +32 -0
- package/build/js/Brush.d.ts +2 -32
- package/build/js/Brush.js +1 -1
- package/build/js/Camera-C7TNwqRo.d.ts +413 -0
- package/build/js/Camera.d.ts +2 -7
- package/build/js/Camera.js +1 -1
- package/build/js/CameraManager-DskA2C7T.js +35 -0
- package/build/js/CameraRelated.d.ts +2 -7
- package/build/js/CameraRelated.js +1 -1
- package/build/js/CavansDrawerAbstract-E_URl3X1.d.ts +37 -0
- package/build/js/Color-qNIvVO9c.d.ts +28 -0
- package/build/js/ColorType-Dj3_-sLJ.d.ts +7 -0
- package/build/js/CustomLocationsView-BmILmaYk.d.ts +59 -0
- package/build/js/DataCaptureContext-CYDrBO6_.d.ts +2017 -0
- package/build/js/DataCaptureContext-CbQes_57.js +6 -0
- package/build/js/DataCaptureContext.d.ts +2 -39
- package/build/js/DataCaptureContext.js +1 -1
- package/build/js/DataCaptureContextRelated.d.ts +2 -39
- package/build/js/DataCaptureContextRelated.js +1 -1
- package/build/js/DataCaptureContextSettings-jR9ArFal.d.ts +13 -0
- package/build/js/DataCaptureContextSettings.d.ts +2 -13
- package/build/js/DataCaptureContextSettings.js +1 -1
- package/build/js/DataCaptureError-fm19xgXy.d.ts +13 -0
- package/build/js/DataCaptureError.d.ts +2 -13
- package/build/js/DataCaptureError.js +1 -1
- package/build/js/DataCaptureVersion-CoBugUHX.d.ts +6 -0
- package/build/js/DataCaptureVersion.d.ts +2 -6
- package/build/js/DataCaptureVersion.js +1 -1
- package/build/js/DataCaptureView.d.ts +2 -39
- package/build/js/DataCaptureView.js +1 -1
- package/build/js/DataCaptureViewPlusRelated-DcAi6mWY.d.ts +50 -0
- package/build/js/DataCaptureViewPlusRelated.d.ts +2 -3
- package/build/js/DataCaptureViewPlusRelated.js +1 -1
- package/build/js/DefaultViewClassnames.d.ts +13 -13
- package/build/js/DefaultViewClassnames.js +1 -1
- package/build/js/Direction-Cii3d0QY.d.ts +12 -0
- package/build/js/DrawCommandBuffer-TbNqWVhj.d.ts +44 -0
- package/build/js/EventManager-Cr57hTzG.d.ts +9 -0
- package/build/js/Feedback-D4kA2xWA.d.ts +21 -0
- package/build/js/Feedback.d.ts +2 -21
- package/build/js/Feedback.js +1 -1
- package/build/js/FrameData.d.ts +2 -39
- package/build/js/FrameData.js +1 -1
- package/build/js/HtmlElementState-BeRz5m6o.d.ts +35 -0
- package/build/js/ImageFrameSource-YH6FmhqZ.d.ts +43 -0
- package/build/js/ImageFrameSource.d.ts +2 -47
- package/build/js/ImageFrameSource.js +1 -1
- package/build/js/JSONType-BJv7BUtr.d.ts +6 -0
- package/build/js/LaserlineViewfinder-Dkc264QQ.d.ts +17 -0
- package/build/js/LaserlineViewfinder.d.ts +2 -23
- package/build/js/LaserlineViewfinder.js +1 -1
- package/build/js/LoadingStatus-0KzcUFiY.d.ts +23 -0
- package/build/js/LoadingStatus.d.ts +2 -23
- package/build/js/LoadingStatus.js +1 -1
- package/build/js/Localization-LoX2FWJO.d.ts +44 -0
- package/build/js/Localization.d.ts +2 -44
- package/build/js/Localization.js +1 -1
- package/build/js/LocationSelection-BXqyUc16.d.ts +41 -0
- package/build/js/LocationSelection.d.ts +2 -44
- package/build/js/LocationSelection.js +1 -1
- package/build/js/MarginsWithUnit-BHhnV4t0.d.ts +38 -0
- package/build/js/MeasureUnit-D14sZoRp.d.ts +7 -0
- package/build/js/NotificationBuilder-B3uY_ZbG.d.ts +23 -0
- package/build/js/NotificationConfiguration-C-1Vhrpo.d.ts +22 -0
- package/build/js/NotificationPresenter/NotificationBuilder.d.ts +2 -25
- package/build/js/NotificationPresenter/NotificationBuilder.js +1 -1
- package/build/js/NotificationPresenter/NotificationConfiguration.d.ts +2 -24
- package/build/js/NotificationPresenter/NotificationConfiguration.js +1 -1
- package/build/js/NotificationPresenter/NotificationPresenter.d.ts +2 -14
- package/build/js/NotificationPresenter/NotificationStyle.d.ts +2 -9
- package/build/js/NotificationPresenter/NotificationStyle.js +1 -1
- package/build/js/NotificationPresenter/index.d.ts +6 -41
- package/build/js/NotificationPresenter/index.js +1 -1
- package/build/js/NotificationPresenter/private/ConcreteNotificationPresenter.d.ts +2 -48
- package/build/js/NotificationPresenter/private/ConcreteNotificationPresenter.js +1 -1
- package/build/js/NotificationPresenter/private/presets.d.ts +5 -41
- package/build/js/NotificationPresenter/private/presets.js +1 -1
- package/build/js/NotificationPresenter-D0g_arAJ.d.ts +9 -0
- package/build/js/NotificationStyle-COZXqLGO.d.ts +9 -0
- package/build/js/NumberWithUnit-UGwoucuQ.d.ts +19 -0
- package/build/js/OpenSourceSoftwareLicenseInfo-CpjUKTrl.d.ts +8 -0
- package/build/js/Orientation-BNtNH3yS.d.ts +10 -0
- package/build/js/OverrideState-CGTOUAyb.d.ts +8 -0
- package/build/js/Point-CD9Qi9ID.d.ts +20 -0
- package/build/js/PointWithUnit-C_e8HUvk.d.ts +26 -0
- package/build/js/Quadrilateral-DbJ7LU2U.d.ts +25 -0
- package/build/js/Rect-BVo37EKG.d.ts +19 -0
- package/build/js/RectWithUnit-OJ1xPlBN.d.ts +19 -0
- package/build/js/RectangularViewfinder-j93qfYTd.d.ts +36 -0
- package/build/js/RectangularViewfinder.d.ts +2 -40
- package/build/js/RectangularViewfinder.js +1 -1
- package/build/js/ScanditHTMLElement-CrbGsFpn.d.ts +5 -0
- package/build/js/ScanditIcon-FRMSos7x.d.ts +49 -0
- package/build/js/ScanditIcon.d.ts +2 -50
- package/build/js/ScanditIcon.js +1 -1
- package/build/js/ScanditIconBuilder-BtnTaVeJ.d.ts +66 -0
- package/build/js/ScanditIconBuilder.d.ts +3 -68
- package/build/js/ScanditIconBuilder.js +1 -1
- package/build/js/Serializable-Dbturs7d.d.ts +9 -0
- package/build/js/SingleImageUploader-CRDpQ9PA.d.ts +43 -0
- package/build/js/SingleImageUploader.d.ts +2 -48
- package/build/js/SingleImageUploader.js +1 -1
- package/build/js/SingleImageUploaderSettings-Y-cG1lpl.d.ts +33 -0
- package/build/js/SingleImageUploaderSettings.d.ts +2 -33
- package/build/js/SingleImageUploaderSettings.js +1 -1
- package/build/js/Size-i8Zhfc5b.d.ts +18 -0
- package/build/js/SizeMode-CkAAaxIg.d.ts +9 -0
- package/build/js/SizeWithAspect-Dg-YCV1Q.d.ts +12 -0
- package/build/js/SizeWithUnit-CNgvxsVj.d.ts +26 -0
- package/build/js/SizeWithUnitAndAspect-BrtiXpsG.d.ts +40 -0
- package/build/js/Sound-ByTzZ3ia.d.ts +21 -0
- package/build/js/Sound.d.ts +2 -21
- package/build/js/Sound.js +1 -1
- package/build/js/SvgIcon-CAR8Tf7x.d.ts +23 -0
- package/build/js/Vibration-B1J9JMda.d.ts +21 -0
- package/build/js/Vibration.d.ts +2 -21
- package/build/js/Vibration.js +1 -1
- package/build/js/View-BvEw8Q1D.d.ts +7 -0
- package/build/js/Viewfinder-DTjfkI0v.d.ts +19 -0
- package/build/js/Viewfinder.d.ts +2 -26
- package/build/js/Viewfinder.js +1 -1
- package/build/js/ViewfinderPlusRelated-CuUarlQb.d.ts +72 -0
- package/build/js/ViewfinderPlusRelated.d.ts +2 -76
- package/build/js/ViewfinderPlusRelated.js +1 -1
- package/build/js/WatermarkStack-CDKo8wBr.d.ts +41 -0
- package/build/js/ZoomGestureListener.d.ts +2 -3
- package/build/js/ZoomListener.d.ts +2 -7
- package/build/js/ZoomSwitchOrientation-Deylpp5l.d.ts +8 -0
- package/build/js/ZoomSwitchOrientation.d.ts +2 -8
- package/build/js/ZoomSwitchOrientation.js +1 -1
- package/build/js/areEqualArrays-BpuDaVrU.d.ts +4 -0
- package/build/js/assets/beepSound.d.ts +3 -3
- package/build/js/assets/beepSound.js +1 -1
- package/build/js/assets/folderImage.d.ts +3 -3
- package/build/js/assets/folderImage.js +1 -1
- package/build/js/assets/scanningByScandit.d.ts +3 -3
- package/build/js/assets/scanningByScandit.js +1 -1
- package/build/js/assets/transparentPixelImage.d.ts +3 -3
- package/build/js/assets/transparentPixelImage.js +1 -1
- package/build/js/browserCompatibility-DD4Tvtlv.d.ts +88 -0
- package/build/js/browserCompatibility.d.ts +2 -88
- package/build/js/browserCompatibility.js +1 -1
- package/build/js/browserHelper-BQPnAZ2Y.js +1 -0
- package/build/js/browserHelper-Dno5no9Z.d.ts +224 -0
- package/build/js/browserHelper.d.ts +2 -224
- package/build/js/browserHelper.js +1 -1
- package/build/js/clamp-B71RA4rG.d.ts +4 -0
- package/build/js/common-BisNSU4o.d.ts +25 -0
- package/build/js/commons/Anchor.d.ts +2 -14
- package/build/js/commons/Anchor.js +1 -1
- package/build/js/commons/Color.d.ts +2 -28
- package/build/js/commons/Color.js +1 -1
- package/build/js/commons/Direction.d.ts +2 -12
- package/build/js/commons/Direction.js +1 -1
- package/build/js/commons/JSONType.d.ts +2 -6
- package/build/js/commons/MarginsWithUnit.d.ts +2 -39
- package/build/js/commons/MarginsWithUnit.js +1 -1
- package/build/js/commons/MeasureUnit.d.ts +2 -7
- package/build/js/commons/MeasureUnit.js +1 -1
- package/build/js/commons/NumberWithUnit.d.ts +2 -19
- package/build/js/commons/NumberWithUnit.js +1 -1
- package/build/js/commons/Orientation.d.ts +2 -10
- package/build/js/commons/Orientation.js +1 -1
- package/build/js/commons/Point.d.ts +2 -20
- package/build/js/commons/Point.js +1 -1
- package/build/js/commons/PointWithUnit.d.ts +2 -27
- package/build/js/commons/PointWithUnit.js +1 -1
- package/build/js/commons/Quadrilateral.d.ts +2 -25
- package/build/js/commons/Quadrilateral.js +1 -1
- package/build/js/commons/Rect.d.ts +2 -19
- package/build/js/commons/Rect.js +1 -1
- package/build/js/commons/RectWithUnit.d.ts +2 -21
- package/build/js/commons/RectWithUnit.js +1 -1
- package/build/js/commons/Size.d.ts +2 -18
- package/build/js/commons/Size.js +1 -1
- package/build/js/commons/SizeMode.d.ts +2 -9
- package/build/js/commons/SizeMode.js +1 -1
- package/build/js/commons/SizeWithAspect.d.ts +2 -14
- package/build/js/commons/SizeWithAspect.js +1 -1
- package/build/js/commons/SizeWithUnit.d.ts +2 -27
- package/build/js/commons/SizeWithUnit.js +1 -1
- package/build/js/commons/SizeWithUnitAndAspect.d.ts +2 -42
- package/build/js/commons/SizeWithUnitAndAspect.js +1 -1
- package/build/js/controls/CameraFOVSwitchControl.d.ts +2 -76
- package/build/js/controls/CameraFOVSwitchControl.js +1 -1
- package/build/js/controls/CameraSwitchControl.d.ts +2 -66
- package/build/js/controls/CameraSwitchControl.js +1 -1
- package/build/js/controls/TorchSwitchControl.d.ts +2 -67
- package/build/js/controls/TorchSwitchControl.js +1 -1
- package/build/js/controls/ZoomSwitchControl.d.ts +2 -97
- package/build/js/controls/ZoomSwitchControl.js +1 -1
- package/build/js/controls/common.d.ts +2 -39
- package/build/js/controls/index.d.ts +2 -44
- package/build/js/controls/index.js +1 -1
- package/build/js/css-DUhStyMA.d.ts +4 -0
- package/build/js/debounce-B1bV6NXR.d.ts +4 -0
- package/build/js/defaults/DefaultsBrush.d.ts +4 -6
- package/build/js/defaults/DefaultsBrush.js +1 -1
- package/build/js/defaults/DefaultsCamera.d.ts +13 -51
- package/build/js/defaults/DefaultsCamera.js +1 -1
- package/build/js/defaults/DefaultsCameraSettings.d.ts +9 -14
- package/build/js/defaults/DefaultsCameraSettings.js +1 -1
- package/build/js/defaults/DefaultsDataCaptureView.d.ts +15 -18
- package/build/js/defaults/DefaultsDataCaptureView.js +1 -1
- package/build/js/defaults/DefaultsDeserializers.d.ts +6 -7
- package/build/js/defaults/DefaultsDeserializers.js +1 -1
- package/build/js/defaults/DefaultsFeedback.d.ts +4 -4
- package/build/js/defaults/DefaultsFeedback.js +1 -1
- package/build/js/defaults/DefaultsSingleImageUploader.d.ts +13 -13
- package/build/js/defaults/DefaultsSingleImageUploader.js +1 -1
- package/build/js/defaults/DefaultsViewfinders.d.ts +36 -41
- package/build/js/defaults/DefaultsViewfinders.js +1 -1
- package/build/js/deferred-BAgaHYOv.d.ts +9 -0
- package/build/js/defineCustomElements-D-wGrRhB.d.ts +4 -0
- package/build/js/domIdFromValues-i9GfVUED.d.ts +18 -0
- package/build/js/fromEntries-ByUS4mw-.d.ts +14 -0
- package/build/js/{global.d.d.ts → global.d.ts} +8 -11
- package/build/js/html-D92h5xTe.d.ts +60 -0
- package/build/js/hybridDesktopPlatformHelpers-DPAJQLcX.js +1 -0
- package/build/js/index-CBqIEC2q.d.ts +1 -0
- package/build/js/index-Cpl5B5iN.d.ts +58 -0
- package/build/js/index-PiddVj70.d.ts +9769 -0
- package/build/js/index.d.ts +57 -78
- package/build/js/index.js +1 -1
- package/build/js/isObject-DqOU8mxL.d.ts +4 -0
- package/build/js/isWorkerScope-CBqhEpK_.d.ts +4 -0
- package/build/js/license/OpenSourceSoftwareLicenseInfo.d.ts +2 -8
- package/build/js/license/OpenSourceSoftwareLicenseInfo.js +1 -1
- package/build/js/logger-D9wplwND.d.ts +30 -0
- package/build/js/logger.d.ts +2 -30
- package/build/js/logger.js +1 -1
- package/build/js/moduleLoader.d.ts +2 -39
- package/build/js/multithreadSimdHelper-BrYdWJgw.js +1 -0
- package/build/js/nativeHandle-DlljYL22.d.ts +4 -0
- package/build/js/private/AdditionalLayerPosition.d.ts +2 -6
- package/build/js/private/AdditionalLayerPosition.js +1 -1
- package/build/js/private/AnchorPositions.d.ts +2 -42
- package/build/js/private/AnchorPositions.js +1 -1
- package/build/js/private/BatteryInterface.d.ts +2 -81
- package/build/js/private/BatteryInterface.js +1 -1
- package/build/js/private/CameraAccess.d.ts +2 -7
- package/build/js/private/CameraAccess.js +1 -1
- package/build/js/private/CameraManager.d.ts +2 -39
- package/build/js/private/CameraManager.js +1 -1
- package/build/js/private/CameraPool.d.ts +76 -114
- package/build/js/private/CameraPool.js +1 -1
- package/build/js/private/CanvasDrawer.d.ts +30 -31
- package/build/js/private/CanvasDrawer.js +1 -1
- package/build/js/private/CanvasDrawerWithMetrics.d.ts +27 -66
- package/build/js/private/CanvasDrawerWithMetrics.js +1 -1
- package/build/js/private/CavansDrawerAbstract.d.ts +2 -37
- package/build/js/private/CavansDrawerAbstract.js +1 -1
- package/build/js/private/CoreModuleLicenseTextProvider.d.ts +13 -49
- package/build/js/private/CoreModuleLicenseTextProvider.js +1 -1
- package/build/js/private/CustomLocationsView.d.ts +2 -64
- package/build/js/private/CustomLocationsView.js +1 -1
- package/build/js/private/CustomLocationsViewStyles.d.ts +4 -4
- package/build/js/private/CustomLocationsViewStyles.js +17 -1
- package/build/js/private/DataCaptureContextRelated.d.ts +7 -44
- package/build/js/private/DrawCommandBuffer.d.ts +2 -44
- package/build/js/private/DrawCommandBuffer.js +1 -1
- package/build/js/private/EventManager.d.ts +2 -9
- package/build/js/private/EventManager.js +1 -1
- package/build/js/private/FrameReaders/ColorType.d.ts +2 -7
- package/build/js/private/FrameReaders/ColorType.js +1 -1
- package/build/js/private/FrameReaders/FrameReader.d.ts +2 -54
- package/build/js/private/FrameReaders/FrameReader.js +1 -1
- package/build/js/private/FrameReaders/FrameReaderAbstract.d.ts +2 -69
- package/build/js/private/FrameReaders/FrameReaderAbstract.js +1 -1
- package/build/js/private/FrameReaders/GrayScaleFrameReader.d.ts +2 -74
- package/build/js/private/FrameReaders/GrayScaleFrameReader.js +1 -1
- package/build/js/private/FrameReaders/WatermarkStack.d.ts +2 -41
- package/build/js/private/FrameReaders/WatermarkStack.js +1 -1
- package/build/js/private/FrameReaders/index.d.ts +3 -43
- package/build/js/private/FrameReaders/index.js +1 -1
- package/build/js/private/FrameReaders/webglUtilities.d.ts +3 -3
- package/build/js/private/FrameReaders/webglUtilities.js +1 -1
- package/build/js/private/GestureRecognizer/GestureRecognizer.d.ts +65 -66
- package/build/js/private/GestureRecognizer/GestureRecognizer.js +1 -1
- package/build/js/private/GestureRecognizer/PointerEventsDetector.d.ts +11 -15
- package/build/js/private/GestureRecognizer/PointerEventsDetector.js +1 -1
- package/build/js/private/GestureRecognizer/index.d.ts +2 -5
- package/build/js/private/GestureRecognizer/index.js +1 -1
- package/build/js/private/Helper.d.ts +7 -7
- package/build/js/private/Helper.js +1 -1
- package/build/js/private/HtmlElementState.d.ts +2 -37
- package/build/js/private/HtmlElementState.js +1 -1
- package/build/js/private/ImageConverterBase.d.ts +40 -40
- package/build/js/private/ImageConverterBase.js +1 -1
- package/build/js/private/ImageConverterMainThread.d.ts +6 -7
- package/build/js/private/ImageConverterMainThread.js +1 -1
- package/build/js/private/ModuleLicenseTextProvider.d.ts +4 -4
- package/build/js/private/NormalizedModuleLoaderOptions.d.ts +10 -46
- package/build/js/private/OrientationObserver.d.ts +26 -26
- package/build/js/private/OrientationObserver.js +1 -1
- package/build/js/private/Serializable.d.ts +2 -9
- package/build/js/private/SingleImageUploaderView.d.ts +52 -89
- package/build/js/private/SingleImageUploaderView.js +1 -1
- package/build/js/private/SingleImageUploaderViewStyles.d.ts +23 -23
- package/build/js/private/SingleImageUploaderViewStyles.js +31 -1
- package/build/js/private/View.d.ts +2 -7
- package/build/js/private/ViewClassNames.d.ts +13 -13
- package/build/js/private/ViewClassNames.js +1 -1
- package/build/js/private/ViewControls_related.d.ts +82 -121
- package/build/js/private/ViewControls_related.js +1 -0
- package/build/js/private/ViewStyles.d.ts +3 -3
- package/build/js/private/ViewStyles.js +1 -1
- package/build/js/private/ViewsRegistry.d.ts +4 -41
- package/build/js/private/ViewsRegistry.js +1 -1
- package/build/js/private/customHowler/AudioCache.d.ts +2 -37
- package/build/js/private/customHowler/AudioCache.js +1 -1
- package/build/js/private/customHowler/Howl.d.ts +141 -141
- package/build/js/private/customHowler/Howl.js +1 -1
- package/build/js/private/customHowler/HowlRegistry.d.ts +3 -3
- package/build/js/private/customHowler/HowlRegistry.js +1 -1
- package/build/js/private/customHowler/Html5Sound.d.ts +45 -45
- package/build/js/private/customHowler/Html5Sound.js +1 -1
- package/build/js/private/customHowler/UnlockManager.d.ts +32 -32
- package/build/js/private/customHowler/UnlockManager.js +1 -1
- package/build/js/private/customHowler/WebAudioContextManager.d.ts +127 -127
- package/build/js/private/customHowler/WebAudioContextManager.js +1 -1
- package/build/js/private/customHowler/debug.d.ts +3 -3
- package/build/js/private/customHowler/debug.js +1 -1
- package/build/js/private/customHowler/index.d.ts +2 -2
- package/build/js/private/customHowler/index.js +1 -1
- package/build/js/private/customHowler/setup.d.ts +4 -5
- package/build/js/private/customHowler/setup.js +1 -1
- package/build/js/private/djinni-types/index.d.ts +2 -57
- package/build/js/private/djinni-types/index.js +1 -1
- package/build/js/private/hybridDesktopPlatformHelpers.d.ts +5 -5
- package/build/js/private/hybridDesktopPlatformHelpers.js +1 -1
- package/build/js/private/multithreadSimdHelper.d.ts +3 -3
- package/build/js/private/multithreadSimdHelper.js +1 -1
- package/build/js/private/nativeHandle.d.ts +2 -4
- package/build/js/private/nativeHandle.js +1 -1
- package/build/js/private/privateAccess.d.ts +2 -8
- package/build/js/private/privateAccess.js +1 -1
- package/build/js/private/ui/atoms/AimerSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/AimerSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ArrowDownSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/ArrowDownSvgIcon.js +1 -2
- package/build/js/private/ui/atoms/ArrowLeftSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/ArrowLeftSvgIcon.js +1 -2
- package/build/js/private/ui/atoms/ArrowRightSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/ArrowRightSvgIcon.js +1 -2
- package/build/js/private/ui/atoms/ArrowUpSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/ArrowUpSvgIcon.js +1 -2
- package/build/js/private/ui/atoms/ArrowsUp.d.ts +13 -13
- package/build/js/private/ui/atoms/ArrowsUp.js +1 -1
- package/build/js/private/ui/atoms/Backdrop.d.ts +29 -23
- package/build/js/private/ui/atoms/Backdrop.js +1 -1
- package/build/js/private/ui/atoms/CalendarExclamationMarkSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/CalendarExclamationMarkSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/CameraFOVUltrawideSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/CameraFOVUltrawideSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/CameraFOVWideSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/CameraFOVWideSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/CameraSwitchReverseSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/CameraSwitchReverseSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/CameraSwitchSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/CameraSwitchSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/Card.d.ts +21 -22
- package/build/js/private/ui/atoms/Card.js +1 -1
- package/build/js/private/ui/atoms/CardList.d.ts +49 -51
- package/build/js/private/ui/atoms/CardList.js +1 -1
- package/build/js/private/ui/atoms/CheckSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/CheckSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ChevronDownSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/ChevronDownSvgIcon.js +1 -2
- package/build/js/private/ui/atoms/ChevronLeftSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/ChevronLeftSvgIcon.js +1 -2
- package/build/js/private/ui/atoms/ChevronRightSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/ChevronRightSvgIcon.js +1 -2
- package/build/js/private/ui/atoms/ChevronUpSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/ChevronUpSvgIcon.js +1 -2
- package/build/js/private/ui/atoms/CrossSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/CrossSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/DeleteSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/DeleteSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/Dot5xSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/Dot5xSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ExclamationMarkSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/ExclamationMarkSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/GlassSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/GlassSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/HandLensCheckSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/HandLensCheckSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/KeyboardSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/KeyboardSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/LowStockSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/LowStockSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/OnexSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/OnexSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/PauseSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/PauseSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/PrinterSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/PrinterSvgIcon.js +1 -2
- package/build/js/private/ui/atoms/ProgressBar.d.ts +22 -22
- package/build/js/private/ui/atoms/ProgressBar.js +1 -1
- package/build/js/private/ui/atoms/QuestionMarkSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/QuestionMarkSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/RestartSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/RestartSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/RoundedCheckSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/RoundedCheckSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/RoundedCrossSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/RoundedCrossSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/RoundedExclamationMarkSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/RoundedExclamationMarkSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ScanSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/ScanSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ShutterButton.d.ts +34 -34
- package/build/js/private/ui/atoms/ShutterButton.js +1 -1
- package/build/js/private/ui/atoms/SlashSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/SlashSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/StarFilledSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/StarFilledSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/StarHalfFilledSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/StarHalfFilledSvgIcon.js +1 -2
- package/build/js/private/ui/atoms/StarOutlinedSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/StarOutlinedSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/SvgIcon.d.ts +2 -23
- package/build/js/private/ui/atoms/SvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ToPickSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/ToPickSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/Toast.d.ts +41 -76
- package/build/js/private/ui/atoms/Toast.js +1 -1
- package/build/js/private/ui/atoms/TorchOffSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/TorchOffSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/TorchOnSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/TorchOnSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/TwoxSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/TwoxSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/WrongItemSvgIcon.d.ts +11 -12
- package/build/js/private/ui/atoms/WrongItemSvgIcon.js +1 -1
- package/build/js/private/ui/colors.d.ts +4 -5
- package/build/js/private/ui/colors.js +1 -1
- package/build/js/private/ui/molecules/ButtonEvents.d.ts +18 -18
- package/build/js/private/ui/molecules/ButtonEvents.js +1 -1
- package/build/js/private/ui/molecules/CameraFOVSwitchButton.d.ts +54 -57
- package/build/js/private/ui/molecules/CameraFOVSwitchButton.js +1 -1
- package/build/js/private/ui/molecules/CameraSwitchButton.d.ts +47 -50
- package/build/js/private/ui/molecules/CameraSwitchButton.js +1 -1
- package/build/js/private/ui/molecules/ControlsLayout.d.ts +12 -12
- package/build/js/private/ui/molecules/ControlsLayout.js +1 -1
- package/build/js/private/ui/molecules/HintPresenter.d.ts +2 -39
- package/build/js/private/ui/molecules/HintPresenter.js +1 -1
- package/build/js/private/ui/molecules/LoadingOverlay.d.ts +20 -20
- package/build/js/private/ui/molecules/LoadingOverlay.js +1 -1
- package/build/js/private/ui/molecules/TorchSwitchIconButton.d.ts +54 -60
- package/build/js/private/ui/molecules/TorchSwitchIconButton.js +1 -1
- package/build/js/private/ui/molecules/ZoomSwitchPill.d.ts +62 -65
- package/build/js/private/ui/molecules/ZoomSwitchPill.js +1 -1
- package/build/js/private/unsupportedBrowserError.d.ts +7 -7
- package/build/js/private/unsupportedBrowserError.js +1 -1
- package/build/js/private/utils/AnimationSimplePolyfill.d.ts +54 -54
- package/build/js/private/utils/AnimationSimplePolyfill.js +1 -1
- package/build/js/private/utils/AsyncStateMachine.d.ts +2 -49
- package/build/js/private/utils/AsyncStateMachine.js +1 -1
- package/build/js/private/utils/ScanditHTMLElement.d.ts +2 -6
- package/build/js/private/utils/ScanditHTMLElement.js +1 -1
- package/build/js/private/utils/areEqualArrays.d.ts +2 -4
- package/build/js/private/utils/areEqualArrays.js +1 -1
- package/build/js/private/utils/clamp.d.ts +2 -4
- package/build/js/private/utils/clamp.js +1 -1
- package/build/js/private/utils/cookieStore.d.ts +3 -3
- package/build/js/private/utils/cookieStore.js +1 -1
- package/build/js/private/utils/cookieStorePolyfill.d.ts +16 -16
- package/build/js/private/utils/cookieStorePolyfill.js +1 -1
- package/build/js/private/utils/css.d.ts +2 -4
- package/build/js/private/utils/css.js +1 -1
- package/build/js/private/utils/debounce.d.ts +2 -4
- package/build/js/private/utils/debounce.js +1 -1
- package/build/js/private/utils/deferred.d.ts +2 -9
- package/build/js/private/utils/deferred.js +1 -1
- package/build/js/private/utils/defineCustomElements.d.ts +2 -4
- package/build/js/private/utils/defineCustomElements.js +1 -1
- package/build/js/private/utils/domIdFromValues.d.ts +2 -18
- package/build/js/private/utils/domIdFromValues.js +1 -1
- package/build/js/private/utils/finalizationRegistryPolyfill.d.ts +3 -3
- package/build/js/private/utils/finalizationRegistryPolyfill.js +1 -1
- package/build/js/private/utils/fromEntries.d.ts +2 -14
- package/build/js/private/utils/fromEntries.js +1 -1
- package/build/js/private/utils/fromGrayScaleToRgba.d.ts +3 -3
- package/build/js/private/utils/fromGrayScaleToRgba.js +1 -1
- package/build/js/private/utils/getTimestamp.d.ts +3 -3
- package/build/js/private/utils/getTimestamp.js +1 -1
- package/build/js/private/utils/globalThisPolyfill.d.ts +3 -3
- package/build/js/private/utils/globalThisPolyfill.js +1 -1
- package/build/js/private/utils/html.d.ts +2 -60
- package/build/js/private/utils/html.js +1 -1
- package/build/js/private/utils/index.d.ts +21 -21
- package/build/js/private/utils/index.js +1 -1
- package/build/js/private/utils/isObject.d.ts +2 -4
- package/build/js/private/utils/isObject.js +1 -1
- package/build/js/private/utils/isPointerTouchEvent.d.ts +3 -3
- package/build/js/private/utils/isPointerTouchEvent.js +1 -1
- package/build/js/private/utils/isWorkerScope.d.ts +2 -4
- package/build/js/private/utils/isWorkerScope.js +1 -1
- package/build/js/private/utils/polyfillLoader.d.ts +11 -11
- package/build/js/private/utils/polyfillLoader.js +1 -1
- package/build/js/private/utils/quadrilateralUtils.d.ts +4 -6
- package/build/js/private/utils/quadrilateralUtils.js +1 -1
- package/build/js/private/utils/replaceImagesInViewUtils.d.ts +7 -43
- package/build/js/private/utils/replaceImagesInViewUtils.js +1 -1
- package/build/js/private/utils/safeCancelAnimation.d.ts +2 -53
- package/build/js/private/utils/safeCancelAnimation.js +1 -1
- package/build/js/private/utils/safeRequestAnimationFrame.d.ts +2 -23
- package/build/js/private/utils/safeRequestAnimationFrame.js +1 -1
- package/build/js/private/utils/safeStorage.d.ts +17 -17
- package/build/js/private/utils/safeStorage.js +1 -1
- package/build/js/private/utils/structuredClonePolyfill.d.ts +3 -3
- package/build/js/private/utils/structuredClonePolyfill.js +1 -1
- package/build/js/private/utils/throttle.d.ts +2 -4
- package/build/js/private/utils/throttle.js +1 -1
- package/build/js/private/utils/timeout.d.ts +2 -14
- package/build/js/private/utils/timeout.js +1 -1
- package/build/js/private/utils/unknownErrorToString.d.ts +2 -4
- package/build/js/private/utils/unknownErrorToString.js +1 -1
- package/build/js/private/utils/wait.d.ts +2 -4
- package/build/js/private/utils/wait.js +1 -1
- package/build/js/private/utils/waitTransitionEndForElement.d.ts +2 -4
- package/build/js/private/utils/waitTransitionEndForElement.js +1 -1
- package/build/js/private/utils/warnMultithreadingUnavailable.d.ts +3 -3
- package/build/js/private/utils/warnMultithreadingUnavailable.js +1 -2
- package/build/js/privateAccess-Cy_yPta4.d.ts +8 -0
- package/build/js/safeCancelAnimation-C9SG0625.d.ts +53 -0
- package/build/js/safeRequestAnimationFrame-CrVl8FPa.d.ts +23 -0
- package/build/js/throttle-ICpoGeaZ.d.ts +4 -0
- package/build/js/timeout-CHMzurwd.d.ts +14 -0
- package/build/js/translations-Bqx7KLdt.d.ts +12 -0
- package/build/js/translations.d.ts +2 -12
- package/build/js/translations.js +1 -1
- package/build/js/tsHelper-N1CSjsuN.d.ts +18 -0
- package/build/js/tsHelper.d.ts +2 -26
- package/build/js/tsHelper.js +1 -1
- package/build/js/unknownErrorToString-BGDQCTvQ.d.ts +4 -0
- package/build/js/wait-CRu1G76q.d.ts +4 -0
- package/build/js/waitTransitionEndForElement-BrVosj17.d.ts +4 -0
- package/build/js/worker/ImageConverterForwarder.d.ts +21 -57
- package/build/js/worker/ImageConverterForwarder.js +1 -1
- package/build/js/worker/ImageConverterWorker.d.ts +6 -7
- package/build/js/worker/ImageConverterWorker.js +1 -1
- package/build/js/worker/OverrideState.d.ts +2 -8
- package/build/js/worker/OverrideState.js +1 -1
- package/build/js/worker/ViewInfoHelper.d.ts +9 -46
- package/build/js/worker/ViewInfoHelper.js +1 -1
- package/build/js/worker/WorkerMain.d.ts +2 -63
- package/build/js/worker/WorkerMain.js +1 -1
- package/build/js/worker/dataCaptureEngine.d.ts +2 -39
- package/build/js/worker/dataCaptureEngine.js +1 -1
- package/build/js/worker/dataCaptureLoader.d.ts +2 -39
- package/build/js/worker/dataCaptureLoader.js +1 -1
- package/build/js/worker/dataCaptureWorkerRelated.d.ts +2 -39
- package/build/js/worker/dataCaptureWorkerRelated.js +1 -1
- package/build/js/worker/helper.d.ts +22 -13
- package/build/js/worker/helper.js +1 -1
- package/build/js/worker/helperFetch.d.ts +36 -22
- package/build/js/worker/helperFetch.js +1 -1
- package/build/js/worker/helperFs.d.ts +5 -5
- package/build/js/worker/helperFs.js +1 -1
- package/build/js/worker/importWasmScript.d.ts +3 -3
- package/build/js/worker/importWasmScript.js +1 -1
- package/build/js/worker/index.d.ts +2 -40
- package/build/js/worker/index.js +1 -1
- package/package.json +21 -11
- package/build/electron/chunk-6RVAZ75N.js +0 -1
- package/build/electron/common.cjs +0 -1
- package/build/electron/common.js +0 -0
- package/build/electron/constants.cjs +0 -1
- package/build/electron/constants.js +0 -1
- package/build/js/Camera-HgH6fwnW.d.ts +0 -410
- package/build/js/DataCaptureContext-Qg40v7QA.d.ts +0 -1740
- package/build/js/DataCaptureViewPlusRelated-BOrDBPHq.d.ts +0 -49
- package/build/js/chunks/chunk-24MGHMOY.js +0 -1
- package/build/js/chunks/chunk-2HTI5D6Y.js +0 -1
- package/build/js/chunks/chunk-2JIATMSD.js +0 -1
- package/build/js/chunks/chunk-2LSO6JEZ.js +0 -1
- package/build/js/chunks/chunk-3A4KLILV.js +0 -1
- package/build/js/chunks/chunk-3A7LM5JG.js +0 -1
- package/build/js/chunks/chunk-3KKUZY2T.js +0 -1
- package/build/js/chunks/chunk-3MKSI2DV.js +0 -1
- package/build/js/chunks/chunk-43GCMDYV.js +0 -1
- package/build/js/chunks/chunk-4BP7D26M.js +0 -1
- package/build/js/chunks/chunk-4F2Q2P2O.js +0 -1
- package/build/js/chunks/chunk-4KLHTKGW.js +0 -1
- package/build/js/chunks/chunk-4LGQ66HW.js +0 -1
- package/build/js/chunks/chunk-4QJAB4PO.js +0 -1
- package/build/js/chunks/chunk-4W2T3TLN.js +0 -1
- package/build/js/chunks/chunk-4WA2PCJE.js +0 -1
- package/build/js/chunks/chunk-4ZMCJXZS.js +0 -1
- package/build/js/chunks/chunk-5LXHD7FZ.js +0 -1
- package/build/js/chunks/chunk-5RCWM6NI.js +0 -1
- package/build/js/chunks/chunk-6AZW5IIG.js +0 -1
- package/build/js/chunks/chunk-6EEMWSEO.js +0 -1
- package/build/js/chunks/chunk-6H6FKGVE.js +0 -1
- package/build/js/chunks/chunk-6V2N4XHI.js +0 -1
- package/build/js/chunks/chunk-6W7FX6LD.js +0 -1
- package/build/js/chunks/chunk-76IGNICM.js +0 -1
- package/build/js/chunks/chunk-7HYFN4JO.js +0 -1
- package/build/js/chunks/chunk-7LTHFX4E.js +0 -1
- package/build/js/chunks/chunk-7OFC24NE.js +0 -1
- package/build/js/chunks/chunk-7SA74NKD.js +0 -0
- package/build/js/chunks/chunk-7SW2PEHB.js +0 -1
- package/build/js/chunks/chunk-AAEQZ45T.js +0 -1
- package/build/js/chunks/chunk-AAPD5YU3.js +0 -1
- package/build/js/chunks/chunk-ACFJP5SR.js +0 -1
- package/build/js/chunks/chunk-AE2LWVIB.js +0 -1
- package/build/js/chunks/chunk-AIC4H5KG.js +0 -2
- package/build/js/chunks/chunk-AIRWHLJH.js +0 -1
- package/build/js/chunks/chunk-ALQOQOAM.js +0 -1
- package/build/js/chunks/chunk-AZWFNBVA.js +0 -1
- package/build/js/chunks/chunk-BA3RP6L2.js +0 -1
- package/build/js/chunks/chunk-BDGRWHLY.js +0 -1
- package/build/js/chunks/chunk-BDLLVGRH.js +0 -1
- package/build/js/chunks/chunk-BZAQMYII.js +0 -1
- package/build/js/chunks/chunk-CAHJ3YOV.js +0 -1
- package/build/js/chunks/chunk-CAUB35PV.js +0 -1
- package/build/js/chunks/chunk-CD2BU66N.js +0 -1
- package/build/js/chunks/chunk-CERFU73N.js +0 -1
- package/build/js/chunks/chunk-CGK5V6XZ.js +0 -1
- package/build/js/chunks/chunk-CRUOVJHW.js +0 -1
- package/build/js/chunks/chunk-CX2R2XQK.js +0 -1
- package/build/js/chunks/chunk-CZI3JAVS.js +0 -35
- package/build/js/chunks/chunk-D222MT4V.js +0 -1
- package/build/js/chunks/chunk-DGDPZ73X.js +0 -1
- package/build/js/chunks/chunk-DGIQ3GF7.js +0 -1
- package/build/js/chunks/chunk-DN32UPQC.js +0 -1
- package/build/js/chunks/chunk-DZE2EYSZ.js +0 -1
- package/build/js/chunks/chunk-E4XJ4GKD.js +0 -1
- package/build/js/chunks/chunk-EMLXDXWN.js +0 -1
- package/build/js/chunks/chunk-ENYHCJGH.js +0 -1
- package/build/js/chunks/chunk-EP3GI7KA.js +0 -1
- package/build/js/chunks/chunk-EQ6V4W5K.js +0 -1
- package/build/js/chunks/chunk-EQRBQJYM.js +0 -1
- package/build/js/chunks/chunk-EV4OEANA.js +0 -1
- package/build/js/chunks/chunk-F2GMW4LP.js +0 -1
- package/build/js/chunks/chunk-FGO2SSRS.js +0 -1
- package/build/js/chunks/chunk-FHUC75ND.js +0 -1
- package/build/js/chunks/chunk-FR24G4R7.js +0 -1
- package/build/js/chunks/chunk-FTD535WI.js +0 -1
- package/build/js/chunks/chunk-G2BRTVN7.js +0 -1
- package/build/js/chunks/chunk-G7ORIX4S.js +0 -1
- package/build/js/chunks/chunk-GHR3BSUQ.js +0 -1
- package/build/js/chunks/chunk-GHTCNOQN.js +0 -1
- package/build/js/chunks/chunk-GPJEB376.js +0 -1
- package/build/js/chunks/chunk-GPPCTFZF.js +0 -1
- package/build/js/chunks/chunk-GPUTPXQM.js +0 -1
- package/build/js/chunks/chunk-GQ7A6533.js +0 -1
- package/build/js/chunks/chunk-GULNUBED.js +0 -1
- package/build/js/chunks/chunk-GVHXM75D.js +0 -1
- package/build/js/chunks/chunk-HBPGHXF2.js +0 -1
- package/build/js/chunks/chunk-I6SWF3FQ.js +0 -1
- package/build/js/chunks/chunk-IASACVTH.js +0 -1
- package/build/js/chunks/chunk-IJQG3OU6.js +0 -1
- package/build/js/chunks/chunk-IMXMNDKM.js +0 -1
- package/build/js/chunks/chunk-J3HHOJE3.js +0 -1
- package/build/js/chunks/chunk-JCKM5IJO.js +0 -0
- package/build/js/chunks/chunk-JFRSUCMO.js +0 -31
- package/build/js/chunks/chunk-JIGCOX5J.js +0 -1
- package/build/js/chunks/chunk-JS3T7K2Z.js +0 -1
- package/build/js/chunks/chunk-KAFNKP6O.js +0 -1
- package/build/js/chunks/chunk-KSCFPJAW.js +0 -1
- package/build/js/chunks/chunk-KXAJHLEO.js +0 -1
- package/build/js/chunks/chunk-KYNYQBNF.js +0 -17
- package/build/js/chunks/chunk-KZEBJGMU.js +0 -6
- package/build/js/chunks/chunk-L2STPTEN.js +0 -1
- package/build/js/chunks/chunk-L66S4DN2.js +0 -1
- package/build/js/chunks/chunk-LA6TM76R.js +0 -1
- package/build/js/chunks/chunk-LFJUGRQV.js +0 -1
- package/build/js/chunks/chunk-LSZZVJ6B.js +0 -1
- package/build/js/chunks/chunk-LV6LGCDC.js +0 -1
- package/build/js/chunks/chunk-LXOZUOZU.js +0 -1
- package/build/js/chunks/chunk-MA3GV76P.js +0 -1
- package/build/js/chunks/chunk-MA6UDVDJ.js +0 -1
- package/build/js/chunks/chunk-MBQZOWWF.js +0 -1
- package/build/js/chunks/chunk-N5YZEC56.js +0 -1
- package/build/js/chunks/chunk-NIKRAADM.js +0 -1
- package/build/js/chunks/chunk-NQF3GUK2.js +0 -1
- package/build/js/chunks/chunk-NVK73TNL.js +0 -1
- package/build/js/chunks/chunk-NYYGU4ZV.js +0 -1
- package/build/js/chunks/chunk-O4HDBWKK.js +0 -1
- package/build/js/chunks/chunk-O7EM4VIM.js +0 -1
- package/build/js/chunks/chunk-O7TZTIHO.js +0 -1
- package/build/js/chunks/chunk-OLUNDJBC.js +0 -1
- package/build/js/chunks/chunk-ORP45GHJ.js +0 -1
- package/build/js/chunks/chunk-OX64CCOP.js +0 -1
- package/build/js/chunks/chunk-Q7JWDX4U.js +0 -1
- package/build/js/chunks/chunk-QBDQQMQ5.js +0 -1
- package/build/js/chunks/chunk-QCRFVRSS.js +0 -1
- package/build/js/chunks/chunk-QCZSSQAQ.js +0 -1
- package/build/js/chunks/chunk-QFSNPY5Y.js +0 -1
- package/build/js/chunks/chunk-QG3MRQMP.js +0 -1
- package/build/js/chunks/chunk-QHBIT2WY.js +0 -1
- package/build/js/chunks/chunk-QIWPWOQG.js +0 -1
- package/build/js/chunks/chunk-QOCHMKNY.js +0 -1
- package/build/js/chunks/chunk-QQEY536Q.js +0 -1
- package/build/js/chunks/chunk-QUWP3ILW.js +0 -1
- package/build/js/chunks/chunk-R6E4CT22.js +0 -1
- package/build/js/chunks/chunk-R6SUMD5F.js +0 -1
- package/build/js/chunks/chunk-RG272MAJ.js +0 -1
- package/build/js/chunks/chunk-RSQRPDVQ.js +0 -1
- package/build/js/chunks/chunk-RXDVYEE5.js +0 -1
- package/build/js/chunks/chunk-RXPPTQAB.js +0 -1
- package/build/js/chunks/chunk-RXT3JWWR.js +0 -1
- package/build/js/chunks/chunk-RZTXUIJ5.js +0 -0
- package/build/js/chunks/chunk-SBC5K7IT.js +0 -1
- package/build/js/chunks/chunk-SEAVQZN6.js +0 -1
- package/build/js/chunks/chunk-SGL5J2CI.js +0 -1
- package/build/js/chunks/chunk-SHM7SU3B.js +0 -1
- package/build/js/chunks/chunk-SJIN27Q5.js +0 -1
- package/build/js/chunks/chunk-SK6L34IF.js +0 -1
- package/build/js/chunks/chunk-SNP4G4KV.js +0 -0
- package/build/js/chunks/chunk-T3AOBMAS.js +0 -1
- package/build/js/chunks/chunk-TKO5JMMS.js +0 -1
- package/build/js/chunks/chunk-TMIZ6Z75.js +0 -1
- package/build/js/chunks/chunk-TPHGDMKG.js +0 -1
- package/build/js/chunks/chunk-TR3NGINC.js +0 -1
- package/build/js/chunks/chunk-TTGJAMI2.js +0 -1
- package/build/js/chunks/chunk-U2WQ3WDE.js +0 -1
- package/build/js/chunks/chunk-U4IMOTYL.js +0 -1
- package/build/js/chunks/chunk-U6MFAGMG.js +0 -1
- package/build/js/chunks/chunk-U7ETOWGJ.js +0 -1
- package/build/js/chunks/chunk-UNO6YIIA.js +0 -1
- package/build/js/chunks/chunk-UWBNF47P.js +0 -1
- package/build/js/chunks/chunk-UWLAKRB2.js +0 -2
- package/build/js/chunks/chunk-UZWBB65W.js +0 -1
- package/build/js/chunks/chunk-V2OKMBZD.js +0 -1
- package/build/js/chunks/chunk-VJB527QZ.js +0 -1
- package/build/js/chunks/chunk-VSROWPI6.js +0 -1
- package/build/js/chunks/chunk-W33RVR5M.js +0 -1
- package/build/js/chunks/chunk-W3X3ZRQZ.js +0 -1
- package/build/js/chunks/chunk-W7VB532D.js +0 -1
- package/build/js/chunks/chunk-WARGMW7Z.js +0 -1
- package/build/js/chunks/chunk-WFKB322J.js +0 -1
- package/build/js/chunks/chunk-WGLHZXRT.js +0 -1
- package/build/js/chunks/chunk-WUHKODFA.js +0 -1
- package/build/js/chunks/chunk-XFQTFQYR.js +0 -1
- package/build/js/chunks/chunk-XR65N6EG.js +0 -1
- package/build/js/chunks/chunk-Y3TODCJD.js +0 -1
- package/build/js/chunks/chunk-Y7BTRVB4.js +0 -2
- package/build/js/chunks/chunk-Y7V35LNT.js +0 -1
- package/build/js/chunks/chunk-Y7ZNLVR2.js +0 -1
- package/build/js/chunks/chunk-YE2GYNRP.js +0 -1
- package/build/js/chunks/chunk-YJNJGCAN.js +0 -1
- package/build/js/chunks/chunk-YONR3EGV.js +0 -2
- package/build/js/chunks/chunk-YOTQPBO6.js +0 -1
- package/build/js/chunks/chunk-YRNH7TIR.js +0 -0
- package/build/js/chunks/chunk-YUZDO2PC.js +0 -1
- package/build/js/chunks/chunk-Z5LRFYGI.js +0 -1
- package/build/js/chunks/chunk-ZAXZRQYF.js +0 -1
- package/build/js/chunks/chunk-ZCF62ALL.js +0 -1
- package/build/js/chunks/chunk-ZKROZLQ4.js +0 -2
- package/build/js/common-4FJYEFaM.d.ts +0 -25
- package/build/js/global.d.js +0 -0
- package/build/js/private/ViewControls+related.js +0 -1
- package/build/js/worker/coreCapture.inlineWorker.d.ts +0 -46
- package/build/js/worker/coreCapture.inlineWorker.js +0 -1
- package/build/js/worker/inlineWorker.d.d.ts +0 -5
- package/build/js/worker/inlineWorker.d.js +0 -0
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/// <reference types="emscripten" />
|
|
2
|
-
import { Serializable } from './private/Serializable.js';
|
|
3
|
-
|
|
4
|
-
interface ZoomGestureListener {
|
|
5
|
-
didZoomInGesture?(zoomGesture: ZoomGesture): void;
|
|
6
|
-
didZoomOutGesture?(zoomGesture: ZoomGesture): void;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
declare enum LogoStyle {
|
|
10
|
-
Minimal = "minimal",
|
|
11
|
-
Extended = "extended"
|
|
12
|
-
}
|
|
13
|
-
interface FocusGestureJSON {
|
|
14
|
-
type: string;
|
|
15
|
-
}
|
|
16
|
-
type FocusGesture = Serializable<FocusGestureJSON>;
|
|
17
|
-
declare class TapToFocus implements FocusGesture, Serializable<FocusGestureJSON> {
|
|
18
|
-
private type;
|
|
19
|
-
toJSONObject(): FocusGestureJSON;
|
|
20
|
-
}
|
|
21
|
-
interface ZoomGestureJSON {
|
|
22
|
-
type: string;
|
|
23
|
-
}
|
|
24
|
-
interface ZoomGesture extends Serializable<ZoomGestureJSON> {
|
|
25
|
-
addListener(listener: ZoomGestureListener): void;
|
|
26
|
-
removeListener(listener: ZoomGestureListener): void;
|
|
27
|
-
triggerZoomIn(): void;
|
|
28
|
-
triggerZoomOut(): void;
|
|
29
|
-
}
|
|
30
|
-
declare class SwipeToZoom implements ZoomGesture {
|
|
31
|
-
private readonly type;
|
|
32
|
-
private readonly listeners;
|
|
33
|
-
addListener(listener: ZoomGestureListener): void;
|
|
34
|
-
removeListener(listener: ZoomGestureListener): void;
|
|
35
|
-
triggerZoomIn(): void;
|
|
36
|
-
triggerZoomOut(): void;
|
|
37
|
-
toJSONObject(): ZoomGestureJSON;
|
|
38
|
-
}
|
|
39
|
-
declare class PinchToZoom implements ZoomGesture {
|
|
40
|
-
private readonly type;
|
|
41
|
-
private readonly listeners;
|
|
42
|
-
addListener(listener: ZoomGestureListener): void;
|
|
43
|
-
removeListener(listener: ZoomGestureListener): void;
|
|
44
|
-
triggerZoomIn(): void;
|
|
45
|
-
triggerZoomOut(): void;
|
|
46
|
-
toJSONObject(): ZoomGestureJSON;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export { type FocusGesture as F, LogoStyle as L, PinchToZoom as P, SwipeToZoom as S, TapToFocus as T, type ZoomGesture as Z, type FocusGestureJSON as a, type ZoomGestureJSON as b, type ZoomGestureListener as c };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {b}from'./chunk-QBDQQMQ5.js';import {b as b$1}from'./chunk-LA6TM76R.js';import {a}from'./chunk-CX2R2XQK.js';var v=(e=>(e.Nonzero="nonzero",e.Evenodd="evenodd",e))(v||{}),n=class n extends b{constructor(e){super();this._context=null;this.isNextDrawPending=false;this.latestCommands=new Uint8Array([]);this.canvas=e,this.doDrawLoop=this.doDraw.bind(this);}get context(){if(!this._context&&(this._context=this.canvas.getContext("2d"),!this._context))throw new TypeError("CanvasRenderingContext cannot be retrieved.");return this._context}draw(e){if(this.latestCommands=e,!this.isCanvasReady()){this.postponeDraw();return}this.isNextDrawPending||(this.isNextDrawPending=true,a(this.doDrawLoop));}updateCanvasSizeAttributes(e,s,t=window.devicePixelRatio){let i=Math.round(e*t),r=Math.round(s*t);(i!==this.canvas.width||r!==this.canvas.height)&&(this.canvas.width=i,this.canvas.height=r,this.context.scale(t,t));}startObservingCanvasResize(){if(!this.resizeObserver){if(!n.ResizeObserver)throw new Error("PrivateCanvasDrawer.ResizeObserver is not set");this.resizeObserver=new n.ResizeObserver(e=>{var r;let[s]=e,{width:t,height:i}=(r=s.contentRect)!=null?r:this.canvas;t===0||i===0||(this.updateCanvasSizeAttributes(t,i),this.latestCommands.length!==0&&(this.draw(this.latestCommands),this.latestCommands=new Uint8Array([])));}),this.resizeObserver.observe(this.canvas);}}endObservingCanvasResize(){this.resizeObserver&&this.resizeObserver.unobserve(this.canvas);}doDraw(e){this.context.clearRect(0,0,this.canvas.width,this.canvas.height);let s=new b$1(this.latestCommands);for(;!s.isConsumed();){let t=s.extractCommandType();this.drawSingleCommand(t,s);}this.isNextDrawPending=false;}postponeDraw(){this.startObservingCanvasResize();}isCanvasReady(){return this.canvas.width>0&&this.canvas.height>0}};n.ResizeObserver="ResizeObserver"in globalThis?globalThis.ResizeObserver:void 0;var d=n;export{v as a,d as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-O7TZTIHO.js';function c(t){return t.endsWith("ms")?Number.parseFloat(t):t.endsWith("s")?Number.parseFloat(t)*1e3:0}function p(t,r){let o=getComputedStyle(t),s=o.transitionProperty.split(",").map(n=>n.trim()),a=o.transitionDuration.split(",").map(n=>c(n)),u=o.transitionDelay.split(",").map(n=>c(n)),e=s.findIndex(n=>n===r);if(e===-1)return 0;let i=a[e],m=u[e];return m!==null&&!Number.isNaN(m)?i+m:i}async function T(t,r){let{promise:o,resolve:s}=new a,a$1=p(t,r),u=setTimeout(()=>{s({type:"timeout",propertyName:r,elapsedTime:a$1+50});},a$1+50),e=i=>{i.propertyName===r&&i.type==="transitionend"&&(clearTimeout(u),s(i));};return t.addEventListener("transitionend",e,{once:true}),t.addEventListener("transitioncancel",e,{once:true}),o}export{T as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var A=(t=>(t.WidthAndHeight="widthAndHeight",t.WidthAndAspectRatio="widthAndAspectRatio",t.HeightAndAspectRatio="heightAndAspectRatio",t.ShorterDimensionAndAspectRatio="shorterDimensionAndAspectRatio",t))(A||{});export{A as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function t(r,e=100){return r?o(r,e).toLowerCase().replace(/[^a-z0-9]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,""):""}function o(r,e=100){return typeof r=="string"?r.slice(0,e):""}function s(r,e="id"){let i=r.map(n=>t(n)).filter(n=>!!n);return [t(e),...i].join("-")}export{s as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function n(t){if("customElements"in globalThis)for(let[e,o]of Object.entries(t))customElements.get(e)||customElements.define(e,o);}export{n as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(){return performance.now()}export{e as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-QG3MRQMP.js';var r=class{constructor(){this.frameColor=a.AimerViewfinder.frameColor;this.dotColor=a.AimerViewfinder.dotColor;this.type="aimer";}toJSONObject(){return {type:this.type,frameColor:this.frameColor.toJSON(),dotColor:this.dotColor.toJSON()}}};export{r as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-O7EM4VIM.js';import {a as a$2}from'./chunk-UWBNF47P.js';import {a as a$1}from'./chunk-3A4KLILV.js';var e=class e extends a{static create(){return e.register(),document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`<style>${e.tag}{display:flex}</style><svg width="${this.size}" height="${this.heightForViewbox(24,24)}" viewBox="0 0 24 24" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM12 7C11.4477 7 11 7.44772 11 8V13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13V8C13 7.44772 12.5523 7 12 7ZM12 17C12.5523 17 13 16.5523 13 16C13 15.4477 12.5523 15 12 15C11.4477 15 11 15.4477 11 16C11 16.5523 11.4477 17 12 17Z" fill="${this.fill}"/></svg>`}};e.tag="scandit-rounded-exclamation-mark-icon";var r=e;export{r as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {e}from'./chunk-CZI3JAVS.js';import {a as a$1}from'./chunk-XR65N6EG.js';import {a}from'./chunk-QCZSSQAQ.js';var m=class i{constructor(){this.type="imageFrameSource";this._listeners=new Set;this._currentState="off";this._desiredState="off";this._context=null;this._imageData=null;}get desiredState(){return this._desiredState}get context(){return this._context}set context(e){this._context=e;}get currentState(){return this._currentState}static async fromFile(e){let r=URL.createObjectURL(e),t=new Image;t.src=r;try{await t.decode();}catch{throw new a({name:"InvalidImageError",message:"Submitted file is not an image"})}finally{URL.revokeObjectURL(r);}return i.fromImage(t)}static async fromImage(e){let r=new i;try{await e.decode();}catch{throw new a({name:"InvalidImageError",message:"Submitted image cannot be decoded"})}let t=r.getCanvasAndContext(e.width,e.height);return t.drawImage(e,0,0),r._imageData=t.getImageData(0,0,e.width,e.height,{colorSpace:"srgb"}),r}static async fromImageData(e){let r=new i,t=r.getCanvasAndContext(e.width,e.height);try{t.putImageData(e,0,0);}catch(n){throw new a({name:"InvalidImageError",message:`Submitted image data does not seem valid (details: ${n})`})}return r._imageData=e,r}async switchToDesiredState(e){if(e==="on"){if(this.currentState==="on")return}else if(this.currentState==="off")return;if(this._desiredState=e,e==="off"){await this.setCurrentState("off");return}return this._imageData==null?(a$1.log(a$1.Level.Warn,"No image data to process."),this.processSubmittedImage({data:new Uint8ClampedArray(0),width:0,height:0,colorSpace:"srgb"})):this.processSubmittedImage(this._imageData)}addListener(e){e!=null&&this._listeners.add(e);}removeListener(e){e!=null&&this._listeners.delete(e);}toJSONObject(){return {type:this.type}}getCurrentState(){return this._currentState}getCanvasAndContext(e,r){let t=document.createElement("canvas");t.width=e,t.height=r;let n=t.getContext("2d");if(n==null)throw new a({name:"ImageFrameSourceError",message:"Could not generate a canvas context to get image data"});return n}async setCurrentState(e){if(e!==this._currentState)return this._currentState=e,this.notifyListeners(),this.notifyContext({type:"frameSourceState",newValue:e})}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);}async processSubmittedImage(e$1){var t;await this.setCurrentState("on");let r={data:e$1.data,width:e$1.width,height:e$1.height,frameId:e()};await((t=this._context)==null?void 0:t.sendFrameToProcessor(r)),await this.setCurrentState("off");}};export{m as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var A={CONTAINER_CLASS_NAME:"scandit-container",PAINTBOARDS_CONTAINER_CLASS_NAME:"scandit-paintboards",PAINTBOARD_CLASS_NAME:"scandit-paintboard",PAINTBOARD_CLASS_NAME_STATE_ON:"scandit-paintboard--camera-on",MIRRORED_CLASS_NAME:"scandit-mirrored",CAMERA_RECOVERY_CLASS_NAME:"scandit-camera-recovery",ERROR_CLASS_NAME:"scandit-error",SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME:"scandit-single-image-uploader-container",CANVAS_VIDEO_PREVIEW_CLASS_NAME:"scandit-canvas-video-preview",FROZEN_FRAME:"frozen-frame"};export{A as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {c as c$1}from'./chunk-ZAXZRQYF.js';import {a}from'./chunk-LV6LGCDC.js';import {c,b}from'./chunk-Y3TODCJD.js';import {a as a$1}from'./chunk-SJIN27Q5.js';var i=new a,o=null;function m(){return o||(o=new c),o}function h(){var t,e;let u=c$1();for(let c of u)c.dispose();(t=a$1)==null||t(`\u{1F3B5} Disposed ${u.length} Howl instances`),i.reset(),o&&(o.dispose(),o=null),b().clear(),(e=a$1)==null||e("\u{1F3A7} Audio buffer cache cleared during disposal");}function k(){h();}function w(){var t;if(i.isSetupComplete()||typeof document>"u")return;i.markSetupComplete(),(t=a$1)==null||t("\u{1F3A7} Setting up audio unlock event listeners");let u=e=>{var l,s,r,a,d;(d=a$1)==null||d(`\u{1F446} User ${e.type} detected at (${(s=(l=e.touches)==null?void 0:l[0])==null?void 0:s.clientX}, ${(a=(r=e.touches)==null?void 0:r[0])==null?void 0:a.clientY}), unlocking audio...`),m().unlock(),i.reset();};i.setup(u);}export{m as a,h as b,k as c,w as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a(e,r){if(e.length!==r.length)return false;let n=new Set(e);return r.every(t=>n.has(t))}export{a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {b,c,d}from'./chunk-4F2Q2P2O.js';function n(){b();}function p(){c();}function i(){d();}export{n as a,p as b,i as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var n=(t=>(t.Minimal="minimal",t.Extended="extended",t))(n||{}),r=class{constructor(){this.type="tapToFocus";}toJSONObject(){return {type:this.type}}},i=class{constructor(){this.type="swipeToZoom";this.listeners=new Set;}addListener(e){this.listeners.add(e);}removeListener(e){this.listeners.delete(e);}triggerZoomIn(){var e;for(let t of this.listeners)(e=t.didZoomInGesture)==null||e.call(t,this);}triggerZoomOut(){var e;for(let t of this.listeners)(e=t.didZoomOutGesture)==null||e.call(t,this);}toJSONObject(){return {type:this.type}}},s=class{constructor(){this.type="pinchToZoom";this.listeners=new Set;}addListener(e){this.listeners.add(e);}removeListener(e){this.listeners.delete(e);}triggerZoomIn(){var e;for(let t of this.listeners)(e=t.didZoomInGesture)==null||e.call(t,this);}triggerZoomOut(){var e;for(let t of this.listeners)(e=t.didZoomOutGesture)==null||e.call(t,this);}toJSONObject(){return {type:this.type}}};export{n as a,r as b,i as c,s as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {f}from'./chunk-UWLAKRB2.js';import {a}from'./chunk-XR65N6EG.js';function v({wasmURI:e,expectedHash:t,verifyResponseHash:l,progressCallback:o,successCallback:a$1,errorCallback:n,importObject:m,referredOrigin:u}){async function b(r){try{let i=await f({wasmURI:e,expectedHash:t,verifyResponseHash:l,onProgress:o,referredOrigin:u}),y=await(r!=null?r:i).arrayBuffer(),c=await globalThis.WebAssembly.instantiate(y,m);a$1(c.instance,c.module);}catch(i){a.log(a.Level.Error,i),a.log(a.Level.Error,`Couldn't instantiate Scandit SDK DataCapture library at ${e}, did you configure the path for it correctly?`),n==null||n(i);}}async function f$1(){let r;try{r=await f({wasmURI:e,expectedHash:t,verifyResponseHash:l,onProgress:o,referredOrigin:u});let i=await globalThis.WebAssembly.instantiateStreaming(r,m);a$1(i.instance,i.module);}catch(i){a.log(a.Level.Warn,i),a.log(a.Level.Warn,"WebAssembly streaming compile failed. Falling back to ArrayBuffer instantiation (this will make things slower)"),b((r==null?void 0:r.bodyUsed)===true?void 0:r);}}typeof globalThis.WebAssembly.instantiateStreaming=="function"?f$1():b();}async function d(e,t,l,o){return new Promise((a,n)=>{e().then(a).catch(m=>{let u=t*2;if(u>l){n(m);return}o(m),globalThis.setTimeout(()=>{d(e,u,l,o).then(a).catch(n);},t);});})}function w(e){var o,a;let t="unknown";if((o=e.href)!=null&&o.startsWith("blob:null/"))t="localhost";else {let n=((a=e.pathname)==null?void 0:a.length)>1&&!e.pathname.startsWith("/");t=new URL(n?e.pathname:e.origin).hostname;}return t.startsWith("[")&&t.endsWith("]")?(t=t.slice(1,-1),t):(/^(\d{1,3}\.){3}\d{1,3}$/.test(t)&&(t=t.split(".").map(n=>Number.parseInt(n,10).toString()).join(".")),t)}export{v as a,d as b,w as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-IMXMNDKM.js';import {a as a$1}from'./chunk-XR65N6EG.js';var n=class s{constructor(){this.type="singleImageUploader";this._settings=new a(null);this._desiredState="off";this.listeners=[];this._context=null;this._view=void 0;}static get default(){return new s}get desiredState(){return this._desiredState}get settings(){return this._settings}get context(){return this._context}set context(e){this._context=e;}set currentState(e){e!==this._currentState&&(this._currentState=e,this.notifyListeners(),this.notifyContext({type:"frameSourceState",newValue:e}));}get currentState(){return this._currentState}async switchToDesiredState(e){if(e==="on"){if(this.currentState==="on"||this.currentState==="starting")return}else if(this.currentState==="off"||this.currentState==="stopping")return;return this._desiredState=e,this.setCurrentState(e==="on"?"starting":"off")}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){return this._settings=e,this.notifyContext({type:"singleImageModeUploaderSettings",newValue:this._settings})}toJSONObject(){return {type:this.type,settings:this.settings.toJSONObject(),desiredState:this.desiredState}}getCurrentState(){return this._currentState}async setCurrentState(e){if(e!==this._currentState)return this._currentState=e,this.notifyListeners(),this.notifyContext({type:"frameSourceState",newValue:e})}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);}async processUploadedFileCapture(e){var t,r;try{await((t=this._context)==null?void 0:t.sendFrameToProcessor(e));}catch(o){a$1.warn(`Error while processing uploaded image: ${o}`);}finally{this.currentState="starting",(r=this._view)==null||r.onAfterImageProcessed();}}addView(e){this._view=e;}};export{n as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=class{constructor(){this.type="none";}toJSONObject(){return {type:this.type}}},r=new e;export{r as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {e,c,d,b}from'./chunk-CD2BU66N.js';import {a as a$1}from'./chunk-CRUOVJHW.js';import {a}from'./chunk-SGL5J2CI.js';var s=class u{constructor(){this._text="";this._tag="";this._textColor=a.fromHex(e.hintStyle.textColor);this._backgroundColor=a.fromHex(e.hintStyle.backgroundColor);}static init(t,o){let n=new u;return n._text=t,n._tag=o,n}withIcon(t){return this._icon=t,this}withTextColor(t){return this._textColor=t,this}withBackgroundColor(t){return this._backgroundColor=t,this}withNotificationStyle(t){this._style=t;let o={info:e,error:b,warning:d,success:c}[t];return this._textColor=a.fromHex(o.hintStyle.textColor),this._backgroundColor=a.fromHex(o.hintStyle.backgroundColor),this}build(){return new a$1(this._text,this._tag,this._style,this._icon,this._textColor,this._backgroundColor)}};export{s as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var a=(p=>(p.Unknown="unknown",p.Portrait="portrait",p.PortraitUpsideDown="portraitUpsideDown",p.LandscapeRight="landscapeRight",p.LandscapeLeft="landscapeLeft",p))(a||{});export{a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-U6MFAGMG.js';import {a as a$5}from'./chunk-QFSNPY5Y.js';import {a as a$2}from'./chunk-UWBNF47P.js';import {a as a$4}from'./chunk-3A4KLILV.js';import {a as a$6}from'./chunk-2LSO6JEZ.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$3}from'./chunk-LSZZVJ6B.js';var s="--view-finder-top",d="--view-finder-bottom",c="--hint-anchor-offset",T="--max-width-fraction",w="--horizontal-margin",f="--max-width-ratio-adjust",b=(t=>(t.Update="hintpresenterupdate",t.ViewFinderUpdateRequested="hintpresenterviewfinderupdaterequested",t))(b||{});function S(l,h=100){return typeof l=="string"?l.slice(0,h):""}var a=class a extends a$1{constructor(){super();this.onDidToastHideHandler=this.onDidToastHide.bind(this);let t=this.attachShadow({mode:"open"});t.innerHTML=a$2`<div id="root"><slot></slot></div>`,t.append(a.createStyleElement().cloneNode(true)),this.root=t.querySelector("#root");}static createStyleElement(){return a$3`:host{pointer-events:none}:host #root{inset:0;position:absolute;width:100%;${s}:0;${d}:0;${f}:1;z-index:1}::slotted(${b$1.tag}){left:50%;max-width:calc(var(${T})*var(${f})*100% - var(${w}));position:absolute;transform:translate(-50%);width:100%}::slotted(${b$1.tag}.${"aboveViewFinder"}){transform:translate(-50%,calc(-100% + var(${s}) - var(${c})))}::slotted(${b$1.tag}.${"belowViewFinder"}){transform:translate(-50%,calc(var(${d}) + var(${c})))}::slotted(${b$1.tag}.${"top"}){top:calc(var(${c}))}::slotted(${b$1.tag}.${"center"}){top:50%;transform:translate(-50%,-50%)}::slotted(${b$1.tag}.fitToText){width:fit-content}`}static register(){a$4({[a.tag]:a});}static create(){return a.register(),document.createElement(a.tag)}connectedCallback(){this.addEventListener("didhide",this.onDidToastHideHandler),this._viewFinderRect==null&&(this.root.style.setProperty(s,`${this.root.clientHeight/2}px`),this.root.style.setProperty(d,`${this.root.clientHeight/2+1}px`));}disconnectedCallback(){this.removeEventListener("didhide",this.onDidToastHideHandler);}setViewFinderRect(t){if(t===null){this.root.style.removeProperty(s),this.root.style.removeProperty(d);return}this._viewFinderRect=t;let{origin:{y:e},size:{height:i}}=this._viewFinderRect;this.root.style.setProperty(s,`${e}px`),this.root.style.setProperty(d,`${e+i}px`);}async handleMessage(t){let{type:e}=t;switch(e){case "showToast":{await this.showToast(t.payload);break}case "hideToast":{await this.hideToast(t.payload);break}case "showGuidance":{await this.showGuidance(t.payload);break}case "hideGuidance":{await this.hideGuidance(t.payload);break}case "startUpdateTimer":{this.startUpdateTimer(t.payload.duration.value);break}case "stopUpdateTimer":{this.stopUpdateTimer();break}}}setHintStyleToToast(t,e){t.textContent=e.text,t.hintStyle=e.hintStyle,t.className="",t.style.setProperty(c,`${t.hintStyle.hintAnchorOffset/16}rem`),t.style.setProperty(T,e.hintStyle.maxWidthFraction.toString()),t.style.setProperty(w,`${e.hintStyle.horizontalMargin/16}rem`),t.classList.add(e.hintStyle.hintAnchor),t.classList.toggle("fitToText",e.hintStyle.fitToText);}onDidToastHide(t){t.stopPropagation(),t.detail.target.remove();}getToastElementFromIdOrTag({id:t,tag:e}){var i;return (i=this.querySelector(`[data-id="${t}"]`))!=null?i:this.querySelector(`[data-tag="${e}"]`)}async showToast(t){var r;this.ensureViewFinderRectIsSet();let e=this.idFromHint(t),i=this.getToastElementFromIdOrTag({id:e,tag:(r=t.tag)!=null?r:""});if(i||(i=b$1.create(),i.dataset.id=e,t.tag!==""&&(i.dataset.tag=t.tag),this.append(i)),this.setHintStyleToToast(i,t),t.tag==="MoveCloserGuidance"){let n=a$5.create();n.setAttribute("slot","first-child"),i.append(n),i.setAttribute("direction","column");}return i.show()}showToastWithCustomIcon(t,e){var n;let i=this.idFromHint(t),r=this.getToastElementFromIdOrTag({id:i,tag:(n=t.tag)!=null?n:""});return r||(r=b$1.create(),r.dataset.id=i,t.tag!==""&&(r.dataset.tag=t.tag),this.append(r)),r.customIcon=e,this.setHintStyleToToast(r,t),r.show()}async hideToast(t){var i;let e=this.getToastElementFromIdOrTag({id:this.idFromHint(t),tag:(i=t.tag)!=null?i:""});return e==null?void 0:e.hide()}async showGuidance(t){return this.showToast(t)}async hideGuidance(t){return this.hideToast(t)}startUpdateTimer(t){this.intervalId=setInterval(()=>{this.dispatchEvent(new CustomEvent("hintpresenterupdate"));},t);}stopUpdateTimer(){clearInterval(this.intervalId);}ensureViewFinderRectIsSet(){(this._viewFinderRect==null||this._viewFinderRect.origin.x===0&&this._viewFinderRect.origin.y===0)&&this.dispatchEvent(new CustomEvent("hintpresenterviewfinderupdaterequested"));}idFromHint(t){var e;return a$6([t.hintStyle.textColor,t.hintStyle.backgroundColor,t.hintStyle.hintAnchor,(e=t.tag)!=null?e:"",S(t.text,30),t.hintStyle.textAlignment],"hint")}};a.tag="scandit-hints";var H=a;export{b as a,H as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-O7EM4VIM.js';import {a as a$2}from'./chunk-UWBNF47P.js';import {a as a$1}from'./chunk-3A4KLILV.js';var e=class e extends a{static create(){return e.register(),document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`<style>${e.tag}{display:flex}</style><svg width="${this.size}" height="${this.heightForViewbox(24,24)}" viewBox="0 0 24 24" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12ZM22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM16.7337 10.4937C17.0888 10.152 17.0888 9.59799 16.7337 9.25628C16.3787 8.91457 15.8031 8.91457 15.4481 9.25628L10.6364 13.8876L8.55192 11.8813C8.19689 11.5396 7.62129 11.5396 7.26627 11.8813C6.91124 12.223 6.91124 12.777 7.26627 13.1187L9.99354 15.7437C10.3486 16.0854 10.9242 16.0854 11.2792 15.7437L16.7337 10.4937Z" fill="${this.fill}"/></svg>`}};e.tag="scandit-rounded-check-icon";var c=e;export{c as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r=class{constructor(){this.subscribers=new Set;}subscribe(s){this.subscribers.add(s);}unsubscribe(s){this.subscribers.has(s)&&this.subscribers.delete(s);}notify(s){for(let e of this.subscribers)e(s);}},i=new r,b=i;export{r as a,b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-MA6UDVDJ.js';import {a as a$1}from'./chunk-BDGRWHLY.js';import {c}from'./chunk-4QJAB4PO.js';var r={focusGesture:null,zoomGestures:[new c],logoAnchor:"bottomRight",logoStyle:"extended",logoOffset:a$1.fromJSON({x:{value:0,unit:"fraction"},y:{value:0,unit:"fraction"}}),pointOfInterest:a$1.fromJSON({x:{value:.5,unit:"fraction"},y:{value:.5,unit:"fraction"}}),scanAreaMargins:a.fromJSON({left:{value:0,unit:"fraction"},right:{value:0,unit:"fraction"},top:{value:0,unit:"fraction"},bottom:{value:0,unit:"fraction"}}),cameraRecoveryText:"(This text is updated from translations)"};export{r as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var f=(o=>(o.Auto="auto",o.Off="off",o.On="on",o))(f||{});export{f as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-CGK5V6XZ.js';import {a}from'./chunk-IASACVTH.js';var o=class r{constructor(i,e){this._vibration=null;this._sound=null;this._vibration=i,this._sound=e;}static get defaultFeedback(){return new r(a.defaultVibration,a$1.defaultSound)}get vibration(){return this._vibration}get sound(){return this._sound}emit(){this.sound&&this.sound.play(),this.vibration&&this.vibration.vibrate();}toJSONObject(){let i={};return this.sound!==null&&(i.sound=this.sound.toJSONObject()),this.vibration!==null&&(i.vibration=this.vibration.toJSONObject()),i}};export{o as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-O7EM4VIM.js';import {a as a$2}from'./chunk-UWBNF47P.js';import {a as a$1}from'./chunk-3A4KLILV.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`<style>${e.tag}{display:flex}</style><svg width="${this.size}" height="${this.heightForViewbox(32,32)}" viewBox="0 0 32 32" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M16.625 15C17.3844 15 18 15.6156 18 16.375C18 17.1344 17.3844 17.75 16.625 17.75C15.8656 17.75 15.25 17.1344 15.25 16.375C15.25 15.6156 15.8656 15 16.625 15ZM20.75 16.375C20.75 14.0968 18.9032 12.25 16.625 12.25C14.3468 12.25 12.5 14.0968 12.5 16.375C12.5 18.6532 14.3468 20.5 16.625 20.5C18.9032 20.5 20.75 18.6532 20.75 16.375Z" fill="${this.fill}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M10.7223 13.2223C10.1853 13.7592 9.3147 13.7592 8.77773 13.2223C8.24076 12.6853 8.24076 11.8147 8.77773 11.2777L9.18046 10.875H8.375C7.61561 10.875 7 11.4906 7 12.25V21.875C7 22.6344 7.61561 23.25 8.375 23.25H16.625C17.3844 23.25 18 23.8656 18 24.625C18 25.3844 17.3844 26 16.625 26H8.375C6.09683 26 4.25 24.1532 4.25 21.875V12.25C4.25 9.97183 6.09683 8.125 8.375 8.125H9.18046L8.77773 7.72227C8.24076 7.1853 8.24076 6.3147 8.77773 5.77773C9.3147 5.24076 10.1853 5.24076 10.7223 5.77773L13.4723 8.52773C13.7301 8.78559 13.875 9.13533 13.875 9.5C13.875 9.86467 13.7301 10.2144 13.4723 10.4723L10.7223 13.2223Z" fill="${this.fill}"/><path fill-rule="evenodd" clip-rule="evenodd" d="M20.75 7.4375C20.75 7.0578 20.4422 6.75 20.0625 6.75H13.875C13.1156 6.75 12.5 6.13439 12.5 5.375C12.5 4.61561 13.1156 4 13.875 4H20.0625C21.961 4 23.5 5.53902 23.5 7.4375C23.5 7.8172 23.8078 8.125 24.1875 8.125H24.875C27.1532 8.125 29 9.97183 29 12.25V21.875C29 24.1532 27.1532 26 24.875 26H24.0695L24.4723 26.4027C25.0092 26.9397 25.0092 27.8103 24.4723 28.3473C23.9353 28.8842 23.0647 28.8842 22.5277 28.3473L19.7777 25.5973C19.2408 25.0603 19.2408 24.1897 19.7777 23.6527L22.5277 20.9027C23.0647 20.3658 23.9353 20.3658 24.4723 20.9027C25.0092 21.4397 25.0092 22.3103 24.4723 22.8473L24.0695 23.25H24.875C25.6344 23.25 26.25 22.6344 26.25 21.875V12.25C26.25 11.4906 25.6344 10.875 24.875 10.875H24.1875C22.289 10.875 20.75 9.33598 20.75 7.4375Z" fill="${this.fill}"/></svg>`}};e.tag="scandit-camera-switch-icon";var C=e;export{C as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-LFJUGRQV.js';import {a}from'./chunk-XR65N6EG.js';var l=class{constructor(){this.cameraPool=new Set;this.deviceCamerasDiscovered=false;}getOrCreate(e){var s;let{position:i,deviceId:a$1}=e,o=(s=e._isBestGuess)!=null?s:false;if(this.cameraPool.size===0)return this.push(e,"no camera in pool");let t=Array.from(this.cameraPool);if(a$1){let r=t.find(n=>n.deviceId===a$1);if(r)return r}if(o){let r=t.find(n=>n._isBestGuess);if(r)return r}if(!a$1){let r=t.find(n=>n.position===i);if(r)return r}return this.deviceCamerasDiscovered?(a.warn([`The camera you requested (id="${a$1}", position="${i}") could not be mapped to one of the camera`,"available on this device. Make sure to use Camera.getAll() to select one of the available cameras.","Returning the first available camera of the device",`(id="${t[0].deviceId}", label="${t[0].label}", position="${t[0].position}").`].join(" ")),t[0]):this.push(e,"getOrCreate() did not match with a camera from the pool")}integrateIncomingVideoDevices(e){this.debugLog(`Integrating ${e.length} cameras found on the device`,e);let i=Array.from(this.cameraPool),a=new Set,o=this.matchByDeviceId(e,i,a),t=this.mergeBestGuesses(o,i,a),s=this.forceMergeBestGuesses(t,i,a);this.pushOrDropLeftovers(s),this.removeOrphans(i,a),this.deviceCamerasDiscovered=true,this.debugLog("Camera pool state after integration of device cameras:"),this.logPool();}matchByDeviceId(e,i,a){let o=[];for(let t of e){if(!t.deviceId){o.push(t);continue}let s=i.find(r=>r.deviceId===t.deviceId&&!a.has(r));if(!s){o.push(t);continue}s[a$1].setLabel(t.label),s.position=t.position,s[a$1].resetUnmappedState(),a.add(s),this.debugLog("Updated pool camera by deviceId",{deviceId:s.deviceId,label:s.label,position:s.position});}return o}mergeBestGuesses(e,i,a){let o=[];for(let t of e){if(!t.deviceId){o.push(t);continue}let s=i.find(r=>!r.deviceId&&r.position===t.position&&!a.has(r));if(!s){o.push(t);continue}s[a$1].setDeviceId(t.deviceId),s[a$1].setLabel(t.label),s[a$1].resetUnmappedState(),a.add(s),this.debugLog("Merged best-guess pool camera with incoming device camera",{deviceId:s.deviceId,label:s.label,position:s.position});}return o}forceMergeBestGuesses(e,i,a){let o=i.filter(r=>!r.deviceId&&!a.has(r));if(o.length===0)return e;let t=[],s=0;for(let r of e){if(!r.deviceId||s>=o.length){t.push(r);continue}let n=o[s++];n[a$1].setDeviceId(r.deviceId),n[a$1].setLabel(r.label),n.position=r.position,n[a$1].resetUnmappedState(),a.add(n),this.debugLog("Force-merged best-guess pool camera with incoming device camera",{deviceId:n.deviceId,label:n.label,position:n.position});}return t}pushOrDropLeftovers(e){for(let i of e)i.deviceId?(this.push(i,"Device camera could not be matched by id or position"),this.debugLog("Added new camera to pool",{deviceId:i.deviceId,label:i.label,position:i.position})):this.debugLog("Dropping incoming camera without deviceId",{label:i.label,position:i.position});}removeOrphans(e,i){let a$2=e.filter(o=>!i.has(o));if(a$2.length!==0){a.warn(["Some cameras were created but could not be mapped to cameras found on the device.","This happens when you create more cameras than were discovered on the device.","These cameras will not be accessible."].join(" "));for(let o of a$2)a.warn("Removing non-updated camera:",{deviceId:o.deviceId,label:o.label,position:o.position}),o[a$1].markAsUnmappedToDeviceCameras(),this.cameraPool.delete(o);}}rebindToDeviceId(e,i){if(e.deviceId===i.deviceId){e[a$1].setLabel(i.label),e.position=i.position;return}let a=Array.from(this.cameraPool).find(o=>o.deviceId===i.deviceId&&o!==e);if(a){let o=e.deviceId,t=e.label,s=e.position;a[a$1].setDeviceId(o),a[a$1].setLabel(t),a.position=s,this.debugLog("Swapped identities during rebindToDeviceId",{rebound:{...i},demoted:{deviceId:o,label:t,position:s}});}e[a$1].setDeviceId(i.deviceId),e[a$1].setLabel(i.label),e.position=i.position;}get(){return Array.from(this.cameraPool)}clear(){this.cameraPool.clear(),this.deviceCamerasDiscovered=false;}push(e,i){return this.cameraPool.add(e),this.debugLog(`added camera to pool, reason: ${i}.`,`New pool size: ${this.cameraPool.size}`,JSON.stringify({deviceId:e.deviceId,position:e.position,label:e.label})),e}debugLog(...e){}logPool(){}dumpAsSimpleObjects(){return [...this.cameraPool].map(e=>({deviceId:e.deviceId,label:e.label,position:e.position}))}},h={[a$1]:{CameraPool:l}};var u=new l;export{h as a,u as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-O7EM4VIM.js';import {a as a$2}from'./chunk-UWBNF47P.js';import {a as a$1}from'./chunk-3A4KLILV.js';var t=class t extends a{static create(){return document.createElement(t.tag)}static register(){a$1({[t.tag]:t});}render(){return a$2`<style>${t.tag}{display:flex}${t.tag}[shadow] svg{filter:drop-shadow(0px 1px 2px rgba(18, 22, 25, .3))}</style><svg width="${this.size}" height="${this.heightForViewbox(32,32)}" viewBox="0 0 32 32" fill="none"><path d="M23.0072 11.0026H18.3321L19.9687 5.27515C20.0113 5.12618 20.0187 4.96936 19.9903 4.81705C19.9619 4.66475 19.8985 4.52112 19.8051 4.39748C19.7118 4.27385 19.5909 4.17359 19.4522 4.10462C19.3135 4.03564 19.1606 3.99983 19.0057 4H12.0031C11.7834 3.9999 11.5699 4.07207 11.3954 4.20538C11.2209 4.33868 11.095 4.52571 11.0374 4.73761L8.03623 15.7378C7.99509 15.8864 7.98889 16.0426 8.01812 16.1941C8.04735 16.3456 8.11122 16.4882 8.20472 16.6109C8.29823 16.7336 8.41884 16.833 8.55714 16.9014C8.69543 16.9697 8.84766 17.0052 9.00192 17.0049H13.8037L12.0191 26.83C11.9767 27.0569 12.0142 27.2915 12.1251 27.494C12.236 27.6964 12.4135 27.8543 12.6276 27.9408C12.8416 28.0273 13.0789 28.0372 13.2994 27.9687C13.5198 27.9002 13.7098 27.7575 13.8371 27.5649L23.8409 12.5592C23.9417 12.4085 23.9997 12.2331 24.0085 12.052C24.0174 11.8708 23.9769 11.6906 23.8912 11.5307C23.8056 11.3708 23.6781 11.2372 23.5224 11.1442C23.3667 11.0512 23.1886 11.0023 23.0072 11.0026Z" fill="${this.fill}"/></svg>`}};t.tag="scandit-torch-on-icon";var r=t;export{r as a};
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var r=class{constructor(){}setProperty(t,e){this[t]=e;}getProperty(t){return this[t]}toJSONObject(){return Object.keys(this).reduce((t,e)=>(t[e]=this.getProperty(e),t),{})}};export{r as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function o(){if(typeof globalThis<"u"&&"cookieStore"in globalThis&&globalThis.cookieStore!=null)return globalThis.cookieStore;throw new Error("CookieStore API is not available. loadPolyfills() call failed?")}export{o as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-SJIN27Q5.js';import {a as a$1}from'./chunk-CX2R2XQK.js';var d=class{constructor(e,n){this._paused=true;this._ended=false;this._seek=0;this.onEndedHandler=this.onEnded.bind(this);this.onPauseHandler=this.onPause.bind(this);this.onPlayHandler=this.onPlay.bind(this);this.node=new Audio,this.node.src=e,this.onInactive=n,this.node.addEventListener("ended",this.onEndedHandler),this.node.addEventListener("pause",this.onPauseHandler),this.node.addEventListener("play",this.onPlayHandler);}onEnded(){var e,n;this._paused=true,this._ended=true,(e=a)==null||e("\u{1F3B5} HTML5Sound: Playback ended"),(n=this.onInactive)==null||n.call(this,this);}onPause(){var e,n;this._paused=true,(e=a)==null||e("\u{1F3B5} HTML5Sound: Paused"),(n=this.onInactive)==null||n.call(this,this);}onPlay(){var e;this._paused=false,this._ended=false,(e=a)==null||e("\u{1F3B5} HTML5Sound: Playing");}play(){this._seek=0,this._paused=false,this._ended=false,this.node.currentTime=0,this.node.volume=1,a$1(()=>{let e=this.node.play();e&&e.catch(n=>{var s;n instanceof DOMException&&n.name==="AbortError"||(s=a)==null||s(`\u274C HTML5Sound.play() failed: ${n instanceof Error?n.message:String(n)}`);});});}pause(){this._paused||(this._paused=true,this._seek=this.node.currentTime,this.node.pause());}stop(){this._paused=true,this._ended=true,this._seek=0,this.node.currentTime=0,this.node.pause();}dispose(){var e;this.node.removeEventListener("ended",this.onEndedHandler),this.node.removeEventListener("pause",this.onPauseHandler),this.node.removeEventListener("play",this.onPlayHandler),(e=a)==null||e("\u{1F3B5} HTML5Sound: Disposed");}};export{d as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function l(){if(typeof globalThis=="object")return false;let e=(()=>{if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;if(typeof globalThis<"u")return globalThis;throw new Error("No global object found")})();return Object.defineProperty(e,"globalThis",{value:e,writable:true,configurable:true}),true}export{l as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-TPHGDMKG.js';import {a as a$2}from'./chunk-LSZZVJ6B.js';function a(){let i=a$2`@keyframes scandit-rotation{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.${a$1.CONTAINER_CLASS_NAME}{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;overflow:hidden;position:relative;touch-action:none;width:100%}.${a$1.CONTAINER_CLASS_NAME}:before{animation:scandit-rotation 1s linear infinite;background-color:#fff;content:" ";height:1px;left:0;opacity:0;pointer-events:none;position:absolute;top:0;width:1px}`,o=a$2`.${a$1.PAINTBOARDS_CONTAINER_CLASS_NAME}{height:inherit;position:relative;width:100%}.${a$1.PAINTBOARD_CLASS_NAME}{aspect-ratio:16/9;background-color:#000;height:100%;min-height:1px;min-width:1px;position:relative;width:100%}.${a$1.PAINTBOARD_CLASS_NAME}.${a$1.PAINTBOARD_CLASS_NAME_STATE_ON}{aspect-ratio:auto}.${a$1.PAINTBOARD_CLASS_NAME} video{display:block;height:100%;object-fit:cover;transition:opacity .3s;width:100%}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.MIRRORED_CLASS_NAME}{transform:scaleX(-1)}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.CAMERA_RECOVERY_CLASS_NAME}{align-items:center;background-color:#000;color:#fff;cursor:pointer;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;transition:background-color .2s;width:100%;z-index:5}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.CAMERA_RECOVERY_CLASS_NAME}:focus-visible{outline:2px solid #06c;outline-offset:-4px}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.CAMERA_RECOVERY_CLASS_NAME}:hover:not([hidden]){background-color:#000c}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.ERROR_CLASS_NAME}{align-items:center;background-color:#00000080;color:#fff;display:flex;height:100%;justify-content:center;left:0;position:absolute;text-align:center;top:0;width:100%;z-index:6}.${a$1.CAMERA_RECOVERY_CLASS_NAME}[hidden],.${a$1.ERROR_CLASS_NAME}[hidden]{display:none}.${a$1.PAINTBOARD_CLASS_NAME} canvas{height:100%;left:0;object-fit:cover;pointer-events:none;position:absolute;top:0;transition:opacity .3s;width:100%}`,n=a$2`.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME}{-webkit-tap-highlight-color:rgba(255,255,255,0);align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;width:100%}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME} label{align-items:center;cursor:pointer;display:flex;flex-direction:column;justify-content:center}.${a$1.PAINTBOARD_CLASS_NAME} .${a$1.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME} label input[type=file]{position:absolute;top:-9999px}.${a$1.PAINTBOARD_CLASS_NAME}.${a$1.SINGLE_IMAGE_UPLOADER_CONTAINER_CLASS_NAME} label button{pointer-events:none}`,A=a$2`.${a$1.FROZEN_FRAME}{height:100%;left:0;object-fit:cover;opacity:1;position:absolute;top:0;width:100%}.${a$1.FROZEN_FRAME}[hidden]{opacity:0;pointer-events:none;visibility:hidden}`;return [i,o,n,A]}export{a};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
function l(t,s=location){let n=t.endsWith("/")?t:`${t}/`;if(/^https?:\/\//.test(n))return n;let r=n.split("/").filter(a=>a.length>0).join("/"),e=r===""?"/":`/${r}/`;return s.protocol==="file:"||s.origin==="null"?`${s.href.split("/").slice(0,-1).join("/")}${e}`:`${s.origin}${e}`}function c(t){return /^https?:\/\/(?:[^./]*\.)*cdn.jsdelivr.net\//.test(t)?{result:true,cdnBaseURL:"https://cdn.jsdelivr.net/npm/"}:/^https?:\/\/(?:[^./]*\.)*unpkg.com\//.test(t)?{result:true,cdnBaseURL:"https://unpkg.com/"}:{result:false,cdnBaseURL:""}}function o(t){let i=/@scandit\/web-datacapture-[a-z]+/i.exec(t);return i?i[0]:null}function u(t,s,i){let n=s,r=c(n);if(r.result){let a=o(n);a!=null&&(n=`${r.cdnBaseURL}${a}@${t}/sdc-lib/`);}let e=i.replace(".wasm","");return r.result?{jsURI:`${n}${e}.js`,wasmURI:`${n}${e}.wasm`}:{jsURI:`${n}${e}.js?v=${t}`,wasmURI:`${n}${e}.wasm?v=${t}`}}
|
|
2
|
-
export{l as a,c as b,o as c,u as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-FGO2SSRS.js';function f(n){if(typeof n=="string")return n;if(a(n)){if(typeof n.message=="string")return n.message}else if(typeof(n==null?void 0:n.toString)=="function")return n.toString();return "unknown error"}export{f as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-GHR3BSUQ.js';import {d}from'./chunk-YUZDO2PC.js';import {b}from'./chunk-YONR3EGV.js';import {f,g}from'./chunk-D222MT4V.js';var c=class{constructor(){this.type="camera-fov";this.customIcons={wide:{idle:"",pressed:""},ultraWide:{idle:"",pressed:""}};this.fovSwitchButton=void 0;this.CameraFOVSwitchButtonClass=void 0;this.currentFrameSource=null;this.view=void 0;this.onCameraFOVChanged=this.handleCameraFOVChanged.bind(this);this.isTransitioning=false;}get cameraFOVWideImage(){return this.customIcons.wide.idle}set cameraFOVWideImage(e){this.customIcons.wide.idle=e,this.applyCustomImagesToButton();}get cameraFOVWidePressedImage(){return this.customIcons.wide.pressed}set cameraFOVWidePressedImage(e){this.customIcons.wide.pressed=e,this.applyCustomImagesToButton();}get cameraFOVUltraWideImage(){return this.customIcons.ultraWide.idle}set cameraFOVUltraWideImage(e){this.customIcons.ultraWide.idle=e,this.applyCustomImagesToButton();}get cameraFOVUltraWidePressedImage(){return this.customIcons.ultraWide.pressed}set cameraFOVUltraWidePressedImage(e){this.customIcons.ultraWide.pressed=e,this.applyCustomImagesToButton();}toJSONObject(){return {type:this.type}}async install(e){var a,r,n;this.CameraFOVSwitchButtonClass||(this.CameraFOVSwitchButtonClass=await import('../private/ui/molecules/CameraFOVSwitchButton.js').then(d=>d.CameraFOVSwitchButton),(a=this.CameraFOVSwitchButtonClass)==null||a.register()),this.view=e,this.currentFrameSource=(n=(r=e.getContext())==null?void 0:r.frameSource)!=null?n:null,this.fovSwitchButton=this.CameraFOVSwitchButtonClass.create(),this.fovSwitchButton.slot="bottomRight",this.fovSwitchButton.hidden=true,this.updateButtonMode(),this.fovSwitchButton.addEventListener("camera-fov-changed",this.onCameraFOVChanged);let t=e.controlsElement;return t&&t.append(this.fovSwitchButton),this.applyCustomImagesToButton(),await this.canShow()&&(await this.setInitialWideCamera(),this.updateButtonVisibility(true)),true}remove(e){e&&this.fovSwitchButton&&(this.fovSwitchButton.removeEventListener("camera-fov-changed",this.onCameraFOVChanged),this.fovSwitchButton.remove(),this.fovSwitchButton=null,this.currentFrameSource=null,this.view=void 0);}async update(e){var i,a;this.currentFrameSource=(a=(i=e.getContext())==null?void 0:i.frameSource)!=null?a:null,this.view=e,this.updateButtonMode();let t=await this.canShow();this.updateButtonVisibility(t);}updateButtonMode(){if(!this.fovSwitchButton)return;let t=this.isUltraWideBackCamera()?"0.5x":"1.0x";this.fovSwitchButton.mode=t;}applyCustomImagesToButton(){if(!this.fovSwitchButton)return;this.customIcons.wide.idle||this.customIcons.wide.pressed||this.customIcons.ultraWide.idle||this.customIcons.ultraWide.pressed?this.fovSwitchButton.setCustomImages(this.customIcons):this.fovSwitchButton.useCustomImages=false;}updateButtonVisibility(e){this.fovSwitchButton&&(this.fovSwitchButton.hidden=!e);}async canShow(){if(!b.isIOSDeviceWithExtendedCameraAccess())return false;let e=this.currentFrameSource;return e===null||!f(e)?false:d.isIOSBackDualWideCameraLabel(e.label)||d.isIOSBackCameraLabel(e.label)||d.isIOSUltraWideBackCameraLabel(e.label)}isUltraWideBackCamera(){let e=this.currentFrameSource;return f(e)?d.isIOSUltraWideBackCameraLabel(e.label):false}async handleCameraFOVChanged(e){await this.handleCameraFOVSwitch(),this.updateButtonMode();}async setInitialWideCamera(){var e,t;if(!this.isTransitioning&&!d.isIOSBackCameraLabel((t=(e=this.currentFrameSource)==null?void 0:e.label)!=null?t:"")){let a$1=(await a.getAll()).find(r=>d.isIOSBackCameraLabel(r.label));a$1&&await this.switchCameras(a$1);}}async handleCameraFOVSwitch(){if(this.isTransitioning)return false;let e=await this.getAlternativeCamera();return e?(await this.switchCameras(e),true):false}async getAlternativeCamera(){return (await a.getAll()).find(t=>this.isUltraWideBackCamera()?d.isIOSBackCameraLabel(t.label):d.isIOSUltraWideBackCameraLabel(t.label))}async switchCameras(e){var n;this.isTransitioning=true;let t=(n=this.view)==null?void 0:n.getContext(),i=t==null?void 0:t.frameSource,a,r;i!=null&&(a=new g(i.settings),r=i.desiredState),await(i==null?void 0:i.switchToDesiredState("off")),a!=null&&await e.applySettings(a),await(t==null?void 0:t.setFrameSource(e)),await(t==null?void 0:t.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=false;}};export{c as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-FR24G4R7.js';import {a as a$2}from'./chunk-F2GMW4LP.js';import {a as a$3}from'./chunk-ENYHCJGH.js';var a=class n{constructor(){this._shorterDimensionAndAspectRatio=null;}get widthAndHeight(){return this._widthAndHeight}get widthAndAspectRatio(){return this._widthAndAspectRatio}get heightAndAspectRatio(){return this._heightAndAspectRatio}get shorterDimensionAndAspectRatio(){return this._shorterDimensionAndAspectRatio}get sizingMode(){return this.widthAndAspectRatio?"widthAndAspectRatio":this.heightAndAspectRatio?"heightAndAspectRatio":this.shorterDimensionAndAspectRatio?"shorterDimensionAndAspectRatio":"widthAndHeight"}static sizeWithWidthAndHeight(t){let i=new n;return i._widthAndHeight=t,i}static sizeWithWidthAndAspectRatio(t,i){let e=new n;return e._widthAndAspectRatio=new a$1(t,i),e}static sizeWithHeightAndAspectRatio(t,i){let e=new n;return e._heightAndAspectRatio=new a$1(t,i),e}static sizeWithShorterDimensionAndAspectRatio(t,i){let e=new n;return e._shorterDimensionAndAspectRatio=new a$1(t,i),e}static fromJSON(t){if(t.width&&t.height)return n.sizeWithWidthAndHeight(new a$2(a$3.fromJSON(t.width),a$3.fromJSON(t.height)));if(t.width&&typeof t.aspect=="number")return n.sizeWithWidthAndAspectRatio(a$3.fromJSON(t.width),t.aspect);if(t.height&&typeof t.aspect=="number")return n.sizeWithHeightAndAspectRatio(a$3.fromJSON(t.height),t.aspect);if(t.shorterDimension&&typeof t.aspect=="number")return n.sizeWithShorterDimensionAndAspectRatio(a$3.fromJSON(t.shorterDimension),t.aspect);throw new Error(`SizeWithUnitAndAspectJSON is malformed: ${JSON.stringify(t)}`)}toJSONObject(){var t,i,e,r,A,p,c,d;switch(this.sizingMode){case "widthAndAspectRatio":return {width:(t=this.widthAndAspectRatio)==null?void 0:t.size.toJSONObject(),aspect:(i=this.widthAndAspectRatio)==null?void 0:i.aspect};case "heightAndAspectRatio":return {height:(e=this.heightAndAspectRatio)==null?void 0:e.size.toJSONObject(),aspect:(r=this.heightAndAspectRatio)==null?void 0:r.aspect};case "shorterDimensionAndAspectRatio":return {shorterDimension:(A=this.shorterDimensionAndAspectRatio)==null?void 0:A.size.toJSONObject(),aspect:(p=this.shorterDimensionAndAspectRatio)==null?void 0:p.aspect};default:return {width:(c=this.widthAndHeight)==null?void 0:c.width.toJSONObject(),height:(d=this.widthAndHeight)==null?void 0:d.height.toJSONObject()}}}};export{a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Symbol("SDC.NativeHandle");export{e as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-ENYHCJGH.js';var r=class e{constructor(i,n){this._x=i,this._y=n;}static get zero(){return new e(new a(0,"pixel"),new a(0,"pixel"))}get x(){return this._x}get y(){return this._y}static fromJSON(i){return new e(a.fromJSON(i.x),a.fromJSON(i.y))}toJSONObject(){return {x:this.x.toJSONObject(),y:this.y.toJSONObject()}}};export{r as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var A="PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNTQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTU4IDEwSDI4LjZMMjIuOS41QTEgMSAwIDAgMCAyMiAwSDJhMiAyIDAgMCAwLTIgMnY0NmE2IDYgMCAwIDAgNiA2aDQ4YTYgNiAwIDAgMCA2LTZWMTJhMiAyIDAgMCAwLTItMlptLTM3LjUgOGE0LjUgNC41IDAgMSAxIDAgOSA0LjUgNC41IDAgMCAxIDAtOVptMjcuNCAyNy41YTEgMSAwIDAgMS0uOS41SDEzYTEgMSAwIDAgMS0uOC0xLjVsNy0xMWExIDEgMCAwIDEgMS42LS4xbDUgNiA5LjQtMTVhMSAxIDAgMCAxIDEuMy0uM2wuNC40IDExIDIwYTEgMSAwIDAgMSAwIDFaIi8+PC9zdmc+";export{A as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-BDLLVGRH.js';function t(a){let e="document"in globalThis?globalThis.document:void 0,n=e==null?void 0:e.createRange().createContextualFragment(a);if(n)return n.firstElementChild}var r={Settings:{iconElement:t(atob(a)),informationElement:t("<p data-scandit-default>(This text is updated from translations)</p>"),buttonElement:t("<div data-scandit-default>(This text is updated from translations)</div>"),containerStyle:{backgroundColor:"#FFFFFF"},iconStyle:{fill:"#121619"},informationStyle:{color:"#121619",marginBottom:"2em"},buttonStyle:{color:"#FFFFFF",backgroundColor:"#121619",fontWeight:"bold",padding:"1.25em",width:"12em",textAlign:"center",textTransform:"uppercase"},onlyCameraCapture:false}};export{r as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-AZWFNBVA.js';var s={type:"none"},c=class{constructor(t){this.type="radius";this._radius=t;}get radius(){return this._radius}toJSONObject(){return {type:this.type,radius:this.radius.toJSONObject()}}},a=class n{constructor(){this.type="rectangular";}get sizeWithUnitAndAspect(){return this._sizeWithUnitAndAspect}static withSize(t){let i=new n;return i._sizeWithUnitAndAspect=a$1.sizeWithWidthAndHeight(t),i}static withWidthAndAspectRatio(t,i){let e=new n;return e._sizeWithUnitAndAspect=a$1.sizeWithWidthAndAspectRatio(t,i),e}static withHeightAndAspectRatio(t,i){let e=new n;return e._sizeWithUnitAndAspect=a$1.sizeWithHeightAndAspectRatio(t,i),e}toJSONObject(){return {type:this.type,size:this.sizeWithUnitAndAspect.toJSONObject()}}};export{s as a,c as b,a as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-O7TZTIHO.js';import {a as a$1}from'./chunk-XR65N6EG.js';var s=class{constructor(e,r){this.workerFunctions=e;this.options=r;this.imageIdCounter=0;this.conversions=new Map;}convertToJpeg(e,r){let t=this.imageIdCounter++,o=new a;this.conversions.set(t,o);let n=e.toBitmap();return this.workerFunctions.postMessage({type:"convertToJPEG",imageId:t,width:e.getWidth(),height:e.getHeight(),data:n,planes:e.getPlanes(),orientation:r,quality:this.options.quality},Array.from(new Set([n.buffer]))),o.promise}convertToBitmap(e){return {data:e.toBitmap(),byteOrder:1}}onConvertToJPEGResult(e,r){let t=this.conversions.get(e);t?(t.resolve(r),this.conversions.delete(e)):a$1.warn(`ImageConverterForwarder: Conversion for imageId ${e} not found in Map`);}};export{s as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-CRUOVJHW.js';function i(t){var f,c,a,s,l,x;let u=t.style,m={cornerRadius:4,fitToText:false,hintAnchor:"top",hintAnchorOffset:16,horizontalMargin:16,isAnimatedToView:true,lineHeight:24,maxLines:2,maxWidthFraction:1,textAlignment:"start",textSize:14,textWeight:700},n,o,e;switch(u){case "success":n="check",o="28d37fcc",e="ffffffff";break;case "error":n="exclamationMark",o="f94444cc",e="ffffffff";break;case "warning":n="exclamationMark",o="f9bf2bcc",e="111619ff";break;case "info":n="exclamationMark",o="111619cc",e="ffffffff";break;default:n="none",o="111619cc",e="ffffffff";break}return t.icon&&(n="none"),{hintStyle:{...m,hintIcon:n,backgroundColor:(c=(f=t.backgroundColor)==null?void 0:f.toJSON())!=null?c:o,textColor:(s=(a=t.textColor)==null?void 0:a.toJSON())!=null?s:e,iconColor:(x=(l=t.textColor)==null?void 0:l.toJSON())!=null?x:e},tag:t.tag,text:t.message}}var h=i(new a("Error","an-error","error")),k=i(new a("Success","a-success","success")),C=i(new a("Warning","a-warning","warning")),H=i(new a("Info","an-info","info"));export{i as a,h as b,k as c,C as d,H as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {d,a as a$2}from'./chunk-4F2Q2P2O.js';import {a as a$1,b as b$2}from'./chunk-ZAXZRQYF.js';import {a as a$3}from'./chunk-AAPD5YU3.js';import {b as b$1}from'./chunk-Y3TODCJD.js';import {a}from'./chunk-SJIN27Q5.js';import {b}from'./chunk-YONR3EGV.js';var A=class{constructor(t){this.audioBuffer=null;this.loadPromise=null;this.soundPool=[];this.soundPoolSize=25;this.inactiveSounds=new Set;var e;this.src=Array.isArray(t.src)?t.src[0]:t.src,t.html5!==void 0?this.html5=t.html5:this.html5=b.isIOS(),(e=a)==null||e(`\u{1F3B5} Howl created: using ${this.html5?"HTML5 <audio> (BLOCKING)":"Web Audio API (non-blocking)"}`),a$1(this),d();}async load(){if(this.loadPromise)return this.loadPromise;if(this.audioBuffer)return this.audioBuffer;let t=b$1().get(this.src);return t?(this.loadPromise=t,this.audioBuffer=await t,this.audioBuffer):(this.loadPromise=(async()=>{var e,i,s;try{let n=a$2().getContext(),a$1;if(this.src.startsWith("data:")){(e=a)==null||e("\u{1F50A} Decoding data URI directly (bypassing fetch)");let c=this.src.split(",")[1],r=atob(c),d=new Uint8Array(r.length);for(let l=0;l<r.length;l++)d[l]=r.charCodeAt(l);a$1=d.buffer;}else (i=a)==null||i(`\u{1F50A} Fetching audio from URL: ${this.src}`),a$1=await(await fetch(this.src)).arrayBuffer();let u=await n.decodeAudioData(a$1);return this.audioBuffer=u,u}catch(n){throw (s=a)==null||s(`Failed to load audio: ${n instanceof Error?n.message:String(n)}`),n}})(),b$1().set(this.src,this.loadPromise),this.loadPromise)}getSoundFromPool(){var e,i,s;if(this.inactiveSounds.size>0){let n=[...this.inactiveSounds][0];return this.inactiveSounds.delete(n),(e=a)==null||e(`\u{1F3B5} HTML5: Reusing sound from pool [${this.inactiveSounds.size} inactive, ${this.soundPool.length} total]`),n}if(this.soundPool.length<this.soundPoolSize){let n=new a$3(this.src,a=>{this.inactiveSounds.add(a);});return this.soundPool.push(n),(i=a)==null||i(`\u{1F3B5} HTML5: Created new sound, pool size: ${this.soundPool.length}/${this.soundPoolSize}`),n}(s=a)==null||s(`\u26A0\uFE0F HTML5: Sound pool exhausted (${this.soundPool.length}/${this.soundPoolSize}), force reusing first sound`);let t=this.soundPool[0];return this.inactiveSounds.delete(t),t}verifyAudioBuffer(t){if(!a)return;let e=t.getChannelData(0),i=0;for(let s=0;s<Math.min(1e3,e.length);s++)i=Math.max(i,Math.abs(e[s]));a(`\u{1F50A} Audio data check: max sample value = ${i.toFixed(4)} (first 1000 samples)`),i<.001&&a("\u274C WARNING: Audio appears to be SILENT - all samples near zero!");}handlePlaybackError(t){var e,i,s;t instanceof DOMException?t.name==="NotAllowedError"?(e=a)==null||e("\u274C Sound playback blocked by autoplay policy."):t.name!=="AbortError"&&((i=a)==null||i(`\u274C Sound playback failed: ${t.name} - ${t.message}`)):(s=a)==null||s(`\u274C Sound playback failed: ${t instanceof Error?t.message:String(t)}`);}async prepareAudioContext(t){var i,s,n,a$1;t.unlocked||((i=a)==null||i("\u26A0\uFE0F AudioContext not unlocked, attempting unlock..."),await t.unlock()),t.checkAndRecreateContextIfSampleRateChanged();let e=t.getContext();return (s=a)==null||s(`\u{1F50A} AudioContext state before play: ${e.state}`),e.state==="suspended"&&((n=a)==null||n("\u26A0\uFE0F AudioContext is suspended, resuming..."),await e.resume(),(a$1=a)==null||a$1(`\u{1F50A} AudioContext state after resume: ${e.state}`)),e}playHTML5(){var t,e;try{let i=this.getSoundFromPool();(t=a)==null||t(`\u{1F50A} HTML5: Playing [pool: ${this.soundPool.length}]`),i.play();}catch(i){(e=a)==null||e(`\u274C HTML5: Failed to setup playback: ${i instanceof Error?i.message:String(i)}`);}}play(){this.playAsync();}async playAsync(){var t,e,i,s,n,a$1;try{if(this.html5)return this.playHTML5();let u=a$2(),c=await this.prepareAudioContext(u),r=await this.load();this.verifyAudioBuffer(r);let d=c.createBufferSource();d.buffer=r,d.loop=false;let l=c.createGain();l.gain.value=1,(t=a)==null||t(`\u{1F50A} Setting gain to ${l.gain.value}`),d.connect(l);let b$1=u.getDestination();l.connect(b$1),(e=a)==null||e(`\u{1F50A} Connected to ${b.isIOS()?"MediaStreamDestination (iOS workaround)":"standard destination"}`),(i=a)==null||i(`\u{1F50A} Starting playback: ${r.duration}s, ${r.numberOfChannels}ch, ${r.sampleRate}Hz`),(s=a)==null||s(`\u{1F50A} Destination: ${c.destination.maxChannelCount}ch max, context SR: ${c.sampleRate}Hz`),(n=a)==null||n(`\u{1F50A} Gain value: ${l.gain.value}, Buffer length: ${r.length} samples`),d.onended=()=>{var m;d.disconnect(),(m=a)==null||m("\u{1F50A} Audio playback ended - source node disconnected");},d.start(0),(a$1=a)==null||a$1("\u2705 source.start(0) called successfully");}catch(u){this.handlePlaybackError(u);}}dispose(){var t;for(let e of this.soundPool)e.stop(),e.dispose();this.soundPool=[],this.inactiveSounds.clear(),(t=a)==null||t("\u{1F3B5} HTML5 sound pool cleared during Howl disposal"),b$2(this);}};export{A as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-CERFU73N.js';import {a as a$1}from'./chunk-XR65N6EG.js';var a=new Map;a.set("default",()=>import('../assets/beepSound.js'));var e=class e{constructor(r){this.resource=null;this.resource=r;}static get defaultSound(){return e._defaultSound instanceof e||(e._defaultSound=new e("default")),e._defaultSound}toJSONObject(){return this.resource!==null?{resource:this.resource}:{}}async play(){var r,t,i;if(this.resource==null||this.resource===""){a$1.warn("Sound resource is null or empty string. Cannot be played.");return}if(!this.audio){let l=await((i=(t=(r=a.get(this.resource))==null?void 0:r())==null?void 0:t.then(o=>(o==null?void 0:o.beepSound)||this.resource))!=null?i:Promise.resolve(this.resource));this.audio=new a$2({src:l});}this.audio.play();}};e._defaultSound=null;var s=e;export{s as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=class{constructor(o,r,i,e,l,s){this._message=o,this._tag=r,this._style=i,this._icon=e,this._textColor=l,this._backgroundColor=s;}get tag(){return this._tag}get message(){return this._message}get style(){return this._style||null}get icon(){return this._icon||null}get textColor(){return this._textColor}get backgroundColor(){return this._backgroundColor}};export{t as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function n(e){return typeof globalThis<"u"&&globalThis.requestAnimationFrame?globalThis.requestAnimationFrame(e):setTimeout(()=>{e(performance.now());},0)}function a(e){typeof globalThis<"u"&&globalThis.cancelAnimationFrame?globalThis.cancelAnimationFrame(e):clearTimeout(e);}export{n as a,a as b};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-3A7LM5JG.js';import {a as a$2}from'./chunk-QHBIT2WY.js';import {b,a as a$3}from'./chunk-SK6L34IF.js';import {a as a$6}from'./chunk-ZKROZLQ4.js';import {a}from'./chunk-NQF3GUK2.js';import {b as b$2}from'./chunk-7LTHFX4E.js';import {d}from'./chunk-YUZDO2PC.js';import {a as a$b}from'./chunk-QOCHMKNY.js';import {a as a$a}from'./chunk-KAFNKP6O.js';import {a as a$9}from'./chunk-E4XJ4GKD.js';import {b as b$4}from'./chunk-FTD535WI.js';import {a as a$5}from'./chunk-R6E4CT22.js';import {a as a$c}from'./chunk-4BP7D26M.js';import {b as b$1}from'./chunk-YONR3EGV.js';import {a as a$7,b as b$3}from'./chunk-CX2R2XQK.js';import {a as a$1}from'./chunk-XR65N6EG.js';import {a as a$8}from'./chunk-QCZSSQAQ.js';var z=`
|
|
2
|
-
attribute vec2 a_position;
|
|
3
|
-
varying vec2 v_texcoord;
|
|
4
|
-
|
|
5
|
-
void main() {
|
|
6
|
-
gl_Position = vec4(a_position, 0, 1);
|
|
7
|
-
v_texcoord = a_position * 0.5 + 0.5;
|
|
8
|
-
}
|
|
9
|
-
`,U=`
|
|
10
|
-
precision mediump float;
|
|
11
|
-
varying vec2 v_texcoord;
|
|
12
|
-
uniform sampler2D u_texture;
|
|
13
|
-
uniform float x_spacing; // Uniform for x-spacing between pixels
|
|
14
|
-
|
|
15
|
-
// Function to calculate grayscale
|
|
16
|
-
float toGray(vec4 color) {
|
|
17
|
-
return dot(color.rgb, vec3(0.299, 0.587, 0.114));
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
void main() {
|
|
21
|
-
// Sample adjacent pixels with spacing of 1/width
|
|
22
|
-
vec4 a = texture2D(u_texture, v_texcoord + vec2(0.0 * x_spacing, 0.0));
|
|
23
|
-
vec4 b = texture2D(u_texture, v_texcoord + vec2(1.0 * x_spacing, 0.0));
|
|
24
|
-
vec4 c = texture2D(u_texture, v_texcoord + vec2(2.0 * x_spacing, 0.0));
|
|
25
|
-
vec4 d = texture2D(u_texture, v_texcoord + vec2(3.0 * x_spacing, 0.0));
|
|
26
|
-
|
|
27
|
-
// Calculate grayscale values
|
|
28
|
-
float grayscaleA = toGray(a);
|
|
29
|
-
float grayscaleB = toGray(b);
|
|
30
|
-
float grayscaleC = toGray(c);
|
|
31
|
-
float grayscaleD = toGray(d);
|
|
32
|
-
|
|
33
|
-
// Set the final color with grayscale values
|
|
34
|
-
gl_FragColor = vec4(grayscaleA, grayscaleB, grayscaleC, grayscaleD);
|
|
35
|
-
}`,x=class extends a{constructor(t,i){super(t,i);this.colorType="GRAYSCALE";this._useRgbaFallback=false;this._positions=new Float32Array([-1,-1,-1,1,1,-1,1,-1,-1,1,1,1]);this._canvas=document.createElement("canvas");}get _webglContext(){var t;if(!this._ctx){if(this._ctx=(t=this._canvas)==null?void 0:t.getContext("webgl",{antialias:false}),!this._ctx)throw new Error("Cannot get WebGL context");this.setup();}return this._ctx}readFromSource(t){var R,_;let i=(R=t==null?void 0:t.videoWidth)!=null?R:this._contextWebGL.drawingBufferWidth,a=i%4!==0;if(a!==this._useRgbaFallback&&(a?(a$1.debug("[GrayScaleFrameReader] Video width not divisible by 4, falling back to RGBA reader for better performance",{width:i}),this._rgbaFallbackReader||(this._rgbaFallbackReader=new v(this._contextWebGL,{minPoolCapacity:this._minPoolCapacity,maxPoolCapacity:this._maxPoolCapacity}),this._rgbaFallbackReader.setup())):a$1.log(a$1.Level.Info,"[GrayScaleFrameReader] Video width now divisible by 4, using optimized grayscale reader",{width:i}),this._useRgbaFallback=a),this._useRgbaFallback&&this._rgbaFallbackReader)return this._rgbaFallbackReader.readFromSource(t);this.updateCanvasSizeIfNeeded(),this.updateFrameSizeIfNeeded();let{drawingBufferWidth:s,drawingBufferHeight:o,TEXTURE_2D:c,RGBA:d,UNSIGNED_BYTE:l,TRIANGLES:p}=this._webglContext;this._webglContext.viewport(0,0,s,o);let C=this._webglContext.getUniformLocation(this._shaderProgram,"x_spacing"),u=1/i;this._webglContext.uniform1f(C,u),this._webglContext.texImage2D(c,0,d,d,l,t),this._webglContext.drawArrays(p,0,6);let h=(_=this._framePool)==null?void 0:_.pop();if(!h)throw new Error("Frame pool found empty!");let f=s*o*4;return h.length!==f&&(a$1.warn("[GrayScaleFrameReader] Buffer from pool has wrong size, allocating new one",{bufferLength:h.length,requiredSize:f}),h=new Uint8ClampedArray(f)),this._webglContext.readPixels(0,0,s,o,d,l,h),{width:i,height:o,data:new Uint8ClampedArray(h.buffer,0,i*o),frameId:E(),colorType:"GRAYSCALE"}}setup(){this.initShaderProgram(),this.initBuffers(),this.initTexture();}dispose(){var t;this._ctx&&(this._shaderProgram&&(this._ctx.deleteProgram(this._shaderProgram),this._shaderProgram=null),this._positionBuffer&&(this._ctx.deleteBuffer(this._positionBuffer),this._positionBuffer=null),this._texture&&(this._ctx.deleteTexture(this._texture),this._texture=null),this._ctx=null),this._rgbaFallbackReader&&(this._rgbaFallbackReader.dispose(),this._rgbaFallbackReader=null),(t=this._framePool)==null||t.empty(),this._canvas=void 0;}updateCanvasSizeIfNeeded(){if(!this._canvas)return;let t=Math.ceil(this._contextWebGL.drawingBufferWidth/4);(this._canvas.width!==t||this._canvas.height!==this._contextWebGL.drawingBufferHeight)&&(this._canvas.width=t,this._canvas.height=this._contextWebGL.drawingBufferHeight);}updateFrameSizeIfNeeded(){let{drawingBufferWidth:t,drawingBufferHeight:i}=this._webglContext,a=t*i*4;this._frameSize!==a&&(this._frameSize=a,this._framePool&&this._framePool.empty(),this._framePool=new a$2({capacity:this._maxPoolCapacity,lowWaterMark:this._minPoolCapacity,createItem:()=>new Uint8ClampedArray(this._frameSize)}));}initShaderProgram(){let t=b(this._webglContext,this._webglContext.VERTEX_SHADER,z),i=b(this._webglContext,this._webglContext.FRAGMENT_SHADER,U);if(!t||!i)throw new Error("Shaders cannot be created");this._shaderProgram=a$3(this._webglContext,t,i),this._webglContext.useProgram(this._shaderProgram);}initBuffers(){this._positionBuffer=this._webglContext.createBuffer(),this._webglContext.bindBuffer(this._webglContext.ARRAY_BUFFER,this._positionBuffer),this._webglContext.bufferData(this._webglContext.ARRAY_BUFFER,this._positions,this._webglContext.STATIC_DRAW);let t=this._webglContext.getAttribLocation(this._shaderProgram,"a_position");this._webglContext.enableVertexAttribArray(t),this._webglContext.bindBuffer(this._webglContext.ARRAY_BUFFER,this._positionBuffer),this._webglContext.vertexAttribPointer(t,2,this._webglContext.FLOAT,false,0,0);}initTexture(){this._texture=this._webglContext.createTexture(),this._webglContext.bindTexture(this._webglContext.TEXTURE_2D,this._texture),this._webglContext.texParameteri(this._webglContext.TEXTURE_2D,this._webglContext.TEXTURE_WRAP_S,this._webglContext.CLAMP_TO_EDGE),this._webglContext.texParameteri(this._webglContext.TEXTURE_2D,this._webglContext.TEXTURE_WRAP_T,this._webglContext.CLAMP_TO_EDGE),this._webglContext.texParameteri(this._webglContext.TEXTURE_2D,this._webglContext.TEXTURE_MIN_FILTER,this._webglContext.LINEAR),this._webglContext.texParameteri(this._webglContext.TEXTURE_2D,this._webglContext.TEXTURE_MAG_FILTER,this._webglContext.LINEAR);let t=this._webglContext.getUniformLocation(this._shaderProgram,"u_texture");this._webglContext.uniform1i(t,0);}};var H=(a=>(a.CONTINUOUS="continuous",a.MANUAL="manual",a.NONE="none",a.SINGLE_SHOT="single-shot",a))(H||{}),X=(s=>(s[s.ULTRA_HD=0]="ULTRA_HD",s[s.FULL_HD=1]="FULL_HD",s[s.HD=2]="HD",s[s.SD=3]="SD",s[s.NONE=4]="NONE",s))(X||{});function E(){return a$4()}var q=(t=>(t.CAMERA_PROPERTIES="cameraProperties",t.CAMERA_ACCESS_ERROR="cameraAccessError",t))(q||{}),n=class n{constructor(){this.constraint=4;this.checkCameraVideoStreamAccessIfVisibleListener=this.checkCameraVideoStreamAccessIfVisible.bind(this);this.handleWebGLContextLostListener=this.handleWebGLContextLost.bind(this);this.listeners=new Map;this.mirrorImageOverrides=new Map;this.postStreamInitializationListener=this.postStreamInitialization.bind(this);this.triggerManualFocusListener=this.triggerManualFocus.bind(this);this.videoResizeListener=a$5(this.handleVideoResize.bind(this),500);this.videoTrackEndedListener=this.videoTrackEndedRecovery.bind(this);this.videoTrackMuteListener=this.videoTrackMuteRecovery.bind(this);this._synchronousFrameHandling=false;this._glFrameReaders={GRAYSCALE:null,RGBA:null};this._frameReaderType="RGBA";this.isVideoStreamPaused=false;this.handleVideoPauseHandler=this.handleVideoPause.bind(this);this.cameraPosition="worldFacing",this.gui={isCameraRecoveryVisible:()=>false,setCameraRecoveryVisible:()=>{}},this.isWebGLSupported=!b$1.checkBrowserCompatibility().missingFeatures.includes("webGL"),this.videoElement=document.createElement("video"),this.videoElement.autoplay=true,this.videoElement.playsInline=true,this.videoElement.muted=true,this.videoElement.style.opacity="0",this.videoElement.poster=a$6,this.canvas=document.createElement("canvas"),this.canvas.addEventListener("webglcontextlost",this.handleWebGLContextLostListener);}get mediaStream(){return this._mediaStream}set mediaStream(e){this._mediaStream=e,e&&(this.mediaTrackCapabilitiesPromise=new Promise(t=>{this.mediaTrackCapabilitiesPromiseResolver=t;}));}get synchronousFrameHandling(){return this._synchronousFrameHandling}get canvas2dContext(){return this._canvas2dContext||(this._canvas2dContext=this.canvas.getContext("2d",{willReadFrequently:true}),this._canvas2dContext==null&&a$1.warn("Unable to get 2d canvas context"),this.handleVideoResize()),this._canvas2dContext}get canvasWebGLContext(){var e;if(!this._canvas2dContext&&!this._canvasWebGLContext){if(!this.isWebGLSupported){a$1.warn("WebGL context not supported, falling back to 2d canvas context. This may impact the scanning performance.");return}let t=(e=this.canvas.getContext("webgl",{alpha:false,antialias:false}))!=null?e:this.canvas.getContext("experimental-webgl",{alpha:false,antialias:false});t!=null&&(this._canvasWebGLContext=t,this.handleVideoResize());}return this._canvasWebGLContext}static instance(){return n._instance==null&&(n._instance=new n),n._instance}dispose(){b$2.clear(),n._instance=null;}recycle(e){var t;(t=this.getFrameReader())==null||t.recycle(e);}getCurrentFrame(){var e;return (e=this._glFrameReaders.RGBA)==null?void 0:e.readFromSource(this.videoElement)}requestVideoFrame(e,t=this.videoElement){return "requestVideoFrameCallback"in HTMLVideoElement.prototype?t.requestVideoFrameCallback(e):a$7(e)}cancelVideoFrame(e,t=this.videoElement){if("cancelVideoFrameCallback"in HTMLVideoElement.prototype){t.cancelVideoFrameCallback(e);return}b$3(e);}addListener(e,t){var a;let i=(a=this.listeners.get(e))!=null?a:[];i.includes(t)||this.listeners.set(e,[...i,t]);}async applyCameraSettings(e){if(this.selectedCameraSettings=e,this.activeCamera==null)throw new a$8(n.noCameraErrorParameters);return this.initializeCameraWithSettings(this.activeCamera,e)}captureImage(){var e;if(((e=this.mediaStream)==null?void 0:e.active)!=null){if(this.canvasWebGLContext!=null)return this.captureImageForWebGLContext();if(this.canvas2dContext!=null)return this.captureImageFor2dContext()}return null}async initializeCameraWithSettings(e,t){if(this.cameraInitializationPromise&&await this.cameraInitializationPromise,e==null)throw new a$8(n.noCameraErrorParameters);return this.setSelectedCamera(e),this.selectedCameraSettings=t,this.activeCameraSettings=t,this.cameraInitializationPromise=this.initializeCameraAndCheckUpdatedSettings(e),this.cameraInitializationPromise}isMirrorImageEnabled(){if(this.selectedCamera&&this.activeCamera){let e=this.mirrorImageOverrides.get(this.activeCamera);return e!=null?e:this.activeCamera.position==="userFacing"}return false}isTapToFocusEnabled(){return this.tapToFocusEnabled}async isTorchAvailable(){var e;return this.mediaStream?(await this.waitForCapabilities(),((e=this.mediaTrackCapabilities)==null?void 0:e.torch)===true):false}async playVideo(){return new Promise(e=>{this._canvas2dContext&&this._canvas2dContext.clearRect(0,0,this.canvas.width,this.canvas.height);let t=this.videoElement.play();t==null?e():t.then(e).catch(()=>{e();});})}async reinitializeCamera(){if(this.activeCamera==null)a$1.debug("Camera reinitialization delayed");else {a$1.debug("Reinitialize camera:",this.activeCamera);try{let e=this.activeCamera;await this.stopStream(),await this.initializeCameraWithSettings(e,this.activeCameraSettings);}catch(e){throw a$1.warn("Couldn't access camera:",this.activeCamera,e),this.emit("cameraAccessError",e),e}}}removeListener(e,t){var s;let a=((s=this.listeners.get(e))!=null?s:[]).filter(o=>o!==t);this.listeners.set(e,a);}async setCameraPosition(e){var i;this.setInitialCameraPosition(e);let t=d.getMainCameraForPosition(await d.getCameras(),e);if(t&&t.deviceId!==((i=this.selectedCamera)==null?void 0:i.deviceId))return this.initializeCameraWithSettings(t,this.selectedCameraSettings)}async setExposure(e){var a,s,o,c,d,l,p,C;let t=(s=(a=this.mediaStream)==null?void 0:a.getVideoTracks())!=null?s:[];if(t.length===0||typeof t[0].applyConstraints!="function")return;await this.waitForCapabilities();let i=e.time!=null&&e.time>0?"manual":"continuous";if(((c=(o=this.mediaTrackCapabilities)==null?void 0:o.exposureMode)==null?void 0:c.includes(i))===true){if(await t[0].applyConstraints({advanced:[{exposureMode:i}]}),e.time!=null&&e.time>0&&this.mediaTrackCapabilities.exposureTime){let u=Math.max((d=this.mediaTrackCapabilities.exposureTime.min)!=null?d:.01,Math.min(e.time,(l=this.mediaTrackCapabilities.exposureTime.max)!=null?l:1e5));await t[0].applyConstraints({advanced:[{exposureTime:u}]});}else if(e.compensation!=null&&i==="continuous"&&this.mediaTrackCapabilities.exposureCompensation){let u=Math.max((p=this.mediaTrackCapabilities.exposureCompensation.min)!=null?p:-10,Math.min(e.compensation,(C=this.mediaTrackCapabilities.exposureCompensation.max)!=null?C:10));await t[0].applyConstraints({advanced:[{exposureCompensation:u}]});}}}async setFocus(e){var i,a,s,o,c;if(!this.mediaStream)return;let t=this.mediaStream.getVideoTracks();if(t.length>0&&typeof t[0].applyConstraints=="function"){await this.waitForCapabilities();let d=e>=0?"manual":"continuous";if(((a=(i=this.mediaTrackCapabilities)==null?void 0:i.focusMode)==null?void 0:a.includes(d))===true&&(await t[0].applyConstraints({advanced:[{focusMode:d}]}),d==="manual"&&this.mediaTrackCapabilities.focusDistance)){let l=Math.max(0,Math.min(e,1))*(((s=this.mediaTrackCapabilities.focusDistance.max)!=null?s:1e3)-((o=this.mediaTrackCapabilities.focusDistance.min)!=null?o:.01))+((c=this.mediaTrackCapabilities.focusDistance.min)!=null?c:.01);await t[0].applyConstraints({advanced:[{focusDistance:l}]});}}}async setFrameRate(e){var t,i,a;if(this.mediaStream&&(await this.waitForCapabilities(),(t=this.mediaTrackCapabilities)!=null&&t.frameRate)){let s=this.mediaStream.getVideoTracks();if(s.length>0&&typeof s[0].applyConstraints=="function"){let o=Math.min((i=this.mediaTrackCapabilities.frameRate.max)!=null?i:240,(a=e.max)!=null?a:240);await s[0].applyConstraints({advanced:[{frameRate:o}]});}}}setInitialCameraPosition(e){this.cameraPosition=e;}setInteractionOptions(e,t){this.torchToggleEnabled=e,this.tapToFocusEnabled=t;}setMirrorImageEnabled(e,t){this.selectedCamera&&(e?(this.videoElement.classList.add(n.MIRRORED_CLASS_NAME),this.canvas.classList.add(n.MIRRORED_CLASS_NAME)):(this.videoElement.classList.remove(n.MIRRORED_CLASS_NAME),this.canvas.classList.remove(n.MIRRORED_CLASS_NAME)),t&&this.mirrorImageOverrides.set(this.selectedCamera,e));}setSelectedCamera(e){this.selectedCamera=e;}setSelectedCameraSettings(e){this.selectedCameraSettings=e;}setTapToFocusEnabled(e){this.tapToFocusEnabled=e,this.mediaStream&&(this.tapToFocusEnabled?this.enableTapToFocusListeners():this.disableTapToFocusListeners());}async setTorchEnabled(e){var t;if(this.mediaStream&&((t=this.mediaTrackCapabilities)==null?void 0:t.torch)===true){this.torchEnabled=e;let i=this.mediaStream.getVideoTracks();i.length>0&&typeof i[0].applyConstraints=="function"&&await i[0].applyConstraints({advanced:[{torch:e}]});}}async setZoom(e){var t,i,a;if(this.mediaStream&&(await this.waitForCapabilities(),(t=this.mediaTrackCapabilities)!=null&&t.zoom)){let s=this.mediaStream.getVideoTracks();if(s.length>0&&typeof s[0].applyConstraints=="function"){let o=Math.max((i=this.mediaTrackCapabilities.zoom.min)!=null?i:1,Math.min(e,(a=this.mediaTrackCapabilities.zoom.max)!=null?a:16));await s[0].applyConstraints({advanced:[{zoom:o}]});}}}async setupCameras(){if(this.cameraSetupPromise)return this.cameraSetupPromise;let e=this.isVideoStreamPaused;return this.cameraSetupPromise=this.setupCamerasAndStream(),this.cameraSetupPromise.then(()=>{e||(this.isVideoStreamPaused=false);})}pauseStream(){if(this.mediaStream){for(let e of this.mediaStream.getVideoTracks())e.enabled=false;this.isVideoStreamPaused=true,a$1.debug("Paused camera video stream",this.mediaStream);}}resumeStream(){if(this.mediaStream){for(let e of this.mediaStream.getVideoTracks())e.enabled=true;this.isVideoStreamPaused=false,a$1.debug("Resumed camera video stream",this.mediaStream);}}async stopStream(e=false){this.activeCamera&&(this.activeCamera.currentResolution=void 0),this.activeCamera=void 0,this.torchEnabled=false,this.isVideoStreamPaused=false,this.mediaStream&&(a$1.debug(`Stop camera video stream access${e?" (abort access detection)":""}:`,this.mediaStream),a$1.debug("Stopping camera video stream access",this.mediaStream),document.removeEventListener("visibilitychange",this.checkCameraVideoStreamAccessIfVisibleListener),window.clearTimeout(this.cameraAccessTimeout),window.clearInterval(this.videoMetadataCheckInterval),window.clearTimeout(this.getCapabilitiesTimeout),window.clearTimeout(this.manualFocusWaitTimeout),window.clearTimeout(this.manualToAutofocusResumeTimeout),window.clearInterval(this.autofocusInterval),this.videoElement.pause(),await new Promise(t=>{setTimeout(()=>{var i,a,s;for(let o of (a=(i=this.mediaStream)==null?void 0:i.getVideoTracks())!=null?a:[])o.removeEventListener("ended",this.videoTrackEndedListener),o.stop();this.videoElement.srcObject=null,this._canvas2dContext&&this._canvas2dContext.clearRect(0,0,this.canvas.width,this.canvas.height),this.mediaStream=void 0,this.mediaTrackCapabilities=void 0,this.mediaTrackCapabilitiesPromise=void 0,this.mediaTrackCapabilitiesPromiseResolver=void 0,e||(s=this.abortedCameraInitializationResolveCallback)==null||s.call(this),t();},0);}));}stopVideoTracks(){if(this.mediaStream!=null)for(let e of this.mediaStream.getVideoTracks())e.stop();}async toggleTorch(){this.torchEnabled=!this.torchEnabled,await this.setTorchEnabled(this.torchEnabled);}updateCanvasVideoImage(){this.canvas2dContext.drawImage(this.videoElement,0,0);}async waitForCapabilities(){var e;return (e=this.mediaTrackCapabilitiesPromise)!=null?e:Promise.resolve()}setFrameReaderType(e){e!==this._frameReaderType&&(this._frameReaderType=e,a$1.log(a$1.Level.Debug,`Change frame reader type to ${this._frameReaderType} mode`));}async allowPictureInPicture(e){e?(this.videoElement.disablePictureInPicture=false,this.videoElement.removeAttribute("controlslist"),this.videoElement.removeAttribute("disablepictureinpicture")):(this.videoElement.disablePictureInPicture=true,this.videoElement.setAttribute("controlslist","nodownload"),this.videoElement.setAttribute("disablepictureinpicture","true")),await this.reinitializeCamera();}setFrameHandling(e){var t;this._synchronousFrameHandling=e,this._frameReaderOptions=this.getFrameReaderOptions(e),(t=this._glFrameReaders[this._frameReaderType])==null||t.dispose(),delete this._glFrameReaders[this._frameReaderType];}async setClipArea(e){if(this.activeCamera&&this.isVideoAndContextStateValid()){this.clipArea=e?this.frameRectFromViewRect(e):void 0,await this.initializeStreamForResolution(this.activeCamera,this.constraint,this.isVideoStreamPaused);return}this.clipArea=e;}frameRectFromViewRect(e){let t=this.videoElement.videoWidth/this.videoElement.clientWidth||1,i=this.videoElement.videoHeight/this.videoElement.clientHeight||1;return new a$9(new a$a(e.origin.x*t,e.origin.y*i),new a$b(e.size.width*t,e.size.height*i))}async accessAutoselectedCamera(e){let t=d.sortCamerasForCameraPosition(e,this.cameraPosition),i=t.shift();for(;i;)try{await this.initializeCameraWithSettings(i,this.selectedCameraSettings);return}catch(a){if(this.setSelectedCamera(),t.length>0){a$1.log(a$1.Level.Warn,"Couldn't access camera:",i,a),i=t.shift();continue}throw a}throw new a$8(n.noCameraErrorParameters)}getFrameReaderOptions(e){return e?{minPoolCapacity:0,maxPoolCapacity:1}:b$1.isDesktopDevice()?{maxPoolCapacity:2,minPoolCapacity:1}:{maxPoolCapacity:10,minPoolCapacity:3}}getFrameReader(){var t;if(this._glFrameReaders[this._frameReaderType])return this._glFrameReaders[this._frameReaderType];if(!this._canvasWebGLContext)return null;let e=(t=this._frameReaderOptions)!=null?t:this.getFrameReaderOptions(this._synchronousFrameHandling);switch(this._frameReaderType){case "GRAYSCALE":{this._glFrameReaders.GRAYSCALE=new x(this._canvasWebGLContext,e),this._glFrameReaders.RGBA=new v(this._canvasWebGLContext,{minPoolCapacity:1,maxPoolCapacity:2});break}case "RGBA":{this._glFrameReaders.RGBA=new v(this._canvasWebGLContext,e);break}default:b$4(this._frameReaderType);}return a$1.debug(`Created frame reader ${this._frameReaderType}`,e),this._glFrameReaders[this._frameReaderType]}async accessInitialCamera(){let e={position:this.cameraPosition,deviceId:"",label:""};try{await this.initializeCameraWithSettings(e,this.selectedCameraSettings);}catch{}finally{this.setSelectedCamera();}return e}recreateCanvas(){this.canvas.removeEventListener("webglcontextlost",this.handleWebGLContextLostListener),this._canvasWebGLContext=void 0,this._canvas2dContext=void 0;for(let t of Object.values(this._glFrameReaders))t==null||t.dispose();let e=document.createElement("canvas");e.addEventListener("webglcontextlost",this.handleWebGLContextLostListener),e.width=this.canvas.width,e.height=this.canvas.height,e.className=this.canvas.className,this.canvas=e;}captureImageFor2dContext(){if(!this.isVideoAndContextStateValid())return null;let{width:e,height:t}=this.canvas,i=E();return {colorType:"RGBA",data:this.canvas2dContext.getImageData(0,0,e,t).data,frameId:i,width:e,height:t}}areVideoAndWebGLSizeMismatching(){return this.canvasWebGLContext?this.canvasWebGLContext.drawingBufferWidth!==this.videoElement.videoWidth||this.canvasWebGLContext.drawingBufferHeight!==this.videoElement.videoHeight:true}captureImageForWebGLContext(){if(!this.isVideoAndContextStateValid()||!this.canvasWebGLContext||this.canvasWebGLContext.drawingBufferWidth<=2||this.canvasWebGLContext.drawingBufferHeight<=2||this.areVideoAndWebGLSizeMismatching()||this.getFrameReader()==null)return null;let e=this.getFrameReader().readFromSource(this.videoElement);if(e.data[3]!==255&&e.colorType==="RGBA"){if(a$1.log(a$1.Level.Warn,"Detected incorrect GPU accelerated WebGL image processing, switching to canvas mode"),this.recreateCanvas(),this.canvas2dContext==null)throw new Error("Unable to get 2d canvas context");return this.captureImage()}return e}async checkCameraAccess(e){return new Promise((t,i)=>{this.cameraAccessRejectCallback=a=>{a$1.log(a$1.Level.Debug,"Camera video stream access failure (video data load timeout):",e),this.gui.setCameraRecoveryVisible(true),i(a);},this.setCameraAccessTimeout();})}checkCameraVideoStreamAccessIfVisible(){document.visibilityState==="visible"&&(a$1.debug("Page is visible again, waiting for camera video stream start..."),document.removeEventListener("visibilitychange",this.checkCameraVideoStreamAccessIfVisibleListener),this.setCameraAccessTimeout());}async checkVideoMetadata(e){return new Promise((t,i)=>{this.videoElement.onloadeddata=()=>{if(this.videoElement.onloadeddata=null,window.clearTimeout(this.cameraAccessTimeout),this.videoElement.videoWidth>2&&this.videoElement.videoHeight>2&&this.videoElement.currentTime>0){this.updateActiveCameraCurrentResolution(e),a$1.log(a$1.Level.Debug,"Camera video stream access success:",e),t();return}let a=performance.now();window.clearInterval(this.videoMetadataCheckInterval),this.videoMetadataCheckInterval=window.setInterval(async()=>{if(this.videoElement.videoWidth<=2||this.videoElement.videoHeight<=2||this.videoElement.currentTime===0){if(performance.now()-a>n.videoMetadataCheckTimeoutMs){a$1.log(a$1.Level.Warn,"Camera video stream access failure (valid video metadata timeout):",e),window.clearInterval(this.videoMetadataCheckInterval),await this.stopStream(true),i(new a$8(n.notReadableErrorParameters));return}return}window.clearInterval(this.videoMetadataCheckInterval),this.updateActiveCameraCurrentResolution(e),a$1.log(a$1.Level.Debug,"Camera video stream access success:",e),t();},n.videoMetadataCheckIntervalMs);};})}disableTapToFocusListeners(){for(let e of ["touchend","mousedown"])this.videoElement.removeEventListener(e,this.triggerManualFocusListener);}emit(e,t){var a;let i=(a=this.listeners.get(e))!=null?a:[];for(let s of i)s(t);}enableTapToFocusListeners(){for(let e of ["touchend","mousedown"])this.videoElement.addEventListener(e,this.triggerManualFocusListener);}getActiveCamera(e,t,i){return e.length===1?e[0]:e.find(a=>a.deviceId===i||a.label!==""&&a.label===t)}getInitialCameraResolutionConstraint(e){var i;let t;switch((i=this.activeCameraSettings)==null?void 0:i.preferredResolution){case "uhd4k":{t=0;break}case "fullHd":{t=1;break}default:{t=2;break}}return t}async handleCameraInitializationError(e,t,i){if(!["OverconstrainedError","NotReadableError"].includes(i.name)||i.name==="NotReadableError"&&t===4)throw a$1.log(a$1.Level.Debug,"Camera video stream access failure (unrecoverable error)",e,i),i.name!=="NotAllowedError"&&d.markCameraAsInaccessible(e),i;if(i.name==="OverconstrainedError"&&t===4){if(e.deviceId==="")throw a$1.log(a$1.Level.Warn,"Camera video stream access failure (no camera with such type error)",e,i),i;a$1.log(a$1.Level.Warn,"Detected non-existent deviceId error, attempt to find and reaccess updated camera",e,i);let a=e.deviceId;if(await d.getCameras(true),a===e.deviceId)throw a$1.log(a$1.Level.Warn,"Camera video stream access failure (updated camera not found after non-existent deviceId error)",e,i),d.markCameraAsInaccessible(e),i;return a$1.log(a$1.Level.Warn,"Updated camera found (recovered from non-existent deviceId error), attempt to access it",e),this.initializeCameraForResolution(e)}return this.initializeCameraForResolution(e,t+1)}handleVideoResize(){if(!(this.videoElement.videoWidth<=2||this.videoElement.videoHeight<=2)){if(this.activeCamera&&this.updateActiveCameraCurrentResolution(this.activeCamera),this.canvasWebGLContext!=null){if(this.canvas.width===this.videoElement.videoWidth&&this.canvas.height===this.videoElement.videoHeight)return;this.canvas.width=this.videoElement.videoWidth,this.canvas.height=this.videoElement.videoHeight,this.canvasWebGLContext.viewport(0,0,this.canvasWebGLContext.drawingBufferWidth,this.canvasWebGLContext.drawingBufferHeight);}else if(this.canvas2dContext!=null){if(this.canvas.width===this.videoElement.videoWidth&&this.canvas.height===this.videoElement.videoHeight)return;this.canvas.width=this.videoElement.videoWidth,this.canvas.height=this.videoElement.videoHeight;}}}handleWebGLContextLost(){a$1.log(a$1.Level.Warn,"WebGL context has been lost, restoring..."),this._canvasWebGLContext=void 0,this.canvasWebGLContext?(this.handleVideoResize(),a$1.log(a$1.Level.Warn,"WebGL context restored")):a$1.log(a$1.Level.Error,"WebGL context restore failed");}async initializeCameraAndCheckUpdatedSettings(e){var t,i,a,s,o;try{if(await this.initializeCameraForResolution(e),this.selectedCameraSettings!==this.activeCameraSettings&&(this.selectedCameraSettings==null||this.activeCameraSettings==null||Object.keys(this.selectedCameraSettings).some(u=>{var h,f;return ((h=this.selectedCameraSettings)==null?void 0:h[u])!==((f=this.activeCameraSettings)==null?void 0:f[u])}))){this.activeCameraSettings=this.selectedCameraSettings,await this.initializeCameraAndCheckUpdatedSettings(e);return}this.activeCameraSettings&&this.activeCameraSettings.zoomFactor>1&&await this.setZoom(this.activeCameraSettings.zoomFactor);let c=(t=this.activeCameraSettings)==null?void 0:t.getProperty("minFrameRate"),d=(i=this.activeCameraSettings)==null?void 0:i.getProperty("maxFrameRate");(c!=null||d!=null)&&await this.setFrameRate({min:c,max:d});let l=(a=this.activeCameraSettings)==null?void 0:a.getProperty("manualLensPosition");l!=null&&await this.setFocus(l);let p=(s=this.activeCameraSettings)==null?void 0:s.getProperty("exposureTargetBias"),C=(o=this.activeCameraSettings)==null?void 0:o.getProperty("exposureDuration");(p!=null||C!=null)&&await this.setExposure({compensation:p,time:C});}finally{this.cameraInitializationPromise=void 0;}}async initializeCameraForResolution(e,t){var i;this.gui.setCameraRecoveryVisible(false),this.constraint=t!=null?t:this.getInitialCameraResolutionConstraint(e),this.mediaStream!=null&&e.deviceId!==""&&((i=this.activeCamera)==null?void 0:i.deviceId)===e.deviceId?await(b$1.isIPhone()?this.initializeStreamForResolution(e,this.constraint):this.updateStreamForResolution(e,this.constraint)):await this.initializeStreamForResolution(e,this.constraint);}async initializeStreamForResolution(e,t,i=false){var a;await this.stopStream();try{let s=(a=this.activeCameraSettings)==null?void 0:a.getProperty("preferredAspectRatio"),o=await d.accessCameraStream(e,t,s),c=await this.clipMediaStreamIfNeeded(o);if(a$1.log(a$1.Level.Debug,"Camera accessed, waiting for camera video stream start..."),typeof c.getVideoTracks()[0].getSettings=="function"){let d=c.getVideoTracks()[0].getSettings();if(d.width!=null&&d.height!=null&&(d.width===2||d.height===2)){if(a$1.log(a$1.Level.Debug,"Camera video stream access failure (invalid video metadata):",e),t===4)throw new a$8(n.notReadableErrorParameters);return await this.stopStream(),this.initializeStreamForResolution(e,t+1)}}this.mediaStream=c,i&&this.pauseStream();for(let d of this.mediaStream.getVideoTracks())d.addEventListener("ended",this.videoTrackEndedListener),d.addEventListener("mute",this.videoTrackMuteListener),d.addEventListener("unmute",this.videoTrackMuteListener);try{await this.setupCameraStreamVideo(e,c);}catch(d){if(t===4)throw d;return this.initializeStreamForResolution(e,t+1)}}catch(s){return this.handleCameraInitializationError(e,t,s)}}isVideoAndContextStateValid(){return this.videoElement.readyState===4&&this.videoElement.videoWidth>2&&this.videoElement.videoHeight>2&&this.canvas.width>2&&this.canvas.height>2}postStreamInitialization(){window.clearTimeout(this.getCapabilitiesTimeout),this.getCapabilitiesTimeout=window.setTimeout(()=>{this.storeStreamCapabilities(),this.setupAutofocus();},n.getCapabilitiesTimeoutMs);}async recoverStreamIfNeeded(){var t,i;let e=(t=this.mediaStream)==null?void 0:t.getVideoTracks();((i=e==null?void 0:e[0])==null?void 0:i.readyState)==="ended"&&await this.reinitializeCamera();}reportCameraProperties(e,t,i=true){this.emit("cameraProperties",{deviceId:e,isFrontFacing:t==="userFacing",hasAutofocus:i});}setCameraAccessTimeout(){window.clearTimeout(this.cameraAccessTimeout),this.cameraAccessTimeout=window.setTimeout(async()=>{var e;document.visibilityState==="visible"?(await this.stopStream(true),(e=this.cameraAccessRejectCallback)==null||e.call(this,new a$8(n.notReadableErrorParameters))):(a$1.debug("Page is currently not visible, delay camera video stream access detection"),document.addEventListener("visibilitychange",this.checkCameraVideoStreamAccessIfVisibleListener));},n.cameraAccessTimeoutMs);}setupAutofocus(){if(window.clearTimeout(this.manualFocusWaitTimeout),window.clearTimeout(this.manualToAutofocusResumeTimeout),this.mediaStream&&this.mediaTrackCapabilities){let e=this.mediaTrackCapabilities.focusMode;Array.isArray(e)&&!e.includes("continuous")&&e.includes("single-shot")&&(window.clearInterval(this.autofocusInterval),this.autofocusInterval=window.setInterval(this.triggerAutoFocus.bind(this),n.autofocusIntervalMs));}}async setupCameraStreamVideo(e,t){this.videoElement.addEventListener("loadedmetadata",this.postStreamInitializationListener),this.videoElement.addEventListener("resize",this.videoResizeListener),this.tapToFocusEnabled&&this.enableTapToFocusListeners();let i=Promise.race([this.checkCameraAccess(e),this.checkVideoMetadata(e),new Promise(a=>{this.abortedCameraInitializationResolveCallback=a;})]);return this.videoElement.srcObject=t,this.videoElement.load(),await this.playVideo(),this.handleVideoResize(),this.reportCameraProperties(e.deviceId,e.position),i}async setupCamerasAndStream(){var e,t;try{let i;this.selectedCamera==null&&(i=await this.accessInitialCamera());let a=await d.getCameras(false,true),s=(t=(e=this.mediaStream)==null?void 0:e.getVideoTracks()[0])==null?void 0:t.getSettings().deviceId;if(this.mediaStream&&i){let o=this.getActiveCamera(a,i.label,s);if(o){if(d.adjustCameraFromMediaStream(this.mediaStream,o),b$1.isDesktopDevice()&&(d.setMainCameraForPositionOverridesOnDesktop(this.cameraPosition,o),d.setMainCameraForPositionOverridesOnDesktop(o.position,o)),a.length===1||d.getMainCameraForPosition(a,this.cameraPosition)===o){a$1.debug("Initial camera access was correct (main camera), keep camera:",o),this.setSelectedCamera(o),this.updateActiveCameraCurrentResolution(o),await this.recoverStreamIfNeeded();return}a$1.debug("Initial camera access was incorrect (not main camera), change camera",{...i,deviceId:s});}else a$1.debug("Initial camera access was incorrect (unknown camera), change camera",{...i,deviceId:s});}if(this.selectedCamera==null){await this.accessAutoselectedCamera(a);return}await this.initializeCameraWithSettings(this.selectedCamera,this.selectedCameraSettings);}finally{this.cameraSetupPromise=void 0;}}storeStreamCapabilities(){var e;if(this.mediaStream){let t=this.mediaStream.getVideoTracks();t.length>0&&typeof t[0].getCapabilities=="function"&&(this.mediaTrackCapabilities=t[0].getCapabilities()),this.mediaTrackCapabilitiesPromiseResolver&&this.mediaTrackCapabilitiesPromiseResolver();}this.activeCamera&&this.reportCameraProperties(this.activeCamera.deviceId,this.activeCamera.position,((e=this.mediaTrackCapabilities)==null?void 0:e.focusMode)==null||this.mediaTrackCapabilities.focusMode.includes("continuous"));}async triggerAutoFocus(){await this.triggerFocusMode("single-shot");}async triggerFocusMode(e){if(this.mediaStream){let t=this.mediaStream.getVideoTracks();if(t.length>0&&typeof t[0].applyConstraints=="function")try{await t[0].applyConstraints({advanced:[{focusMode:e}]});}catch{}}}async triggerManualFocus(e){if(e&&(e.preventDefault(),e.type==="touchend"&&e.touches.length>0)||(window.clearTimeout(this.manualFocusWaitTimeout),window.clearTimeout(this.manualToAutofocusResumeTimeout),!this.mediaStream||!this.mediaTrackCapabilities))return;let t=this.mediaTrackCapabilities.focusMode;Array.isArray(t)&&t.includes("single-shot")&&(t.includes("continuous")&&t.includes("manual")?await this.triggerManualFocusForContinuous():t.includes("continuous")||await this.triggerManualFocusForSingleShot());}async triggerManualFocusForContinuous(){var i;if(!this.mediaStream)return;this.manualToAutofocusResumeTimeout=window.setTimeout(async()=>{await this.triggerFocusMode("continuous");},n.manualToAutofocusResumeTimeoutMs);let e=true,t=this.mediaStream.getVideoTracks();t.length>0&&typeof t[0].getConstraints=="function"&&(e=((i=t[0].getConstraints().advanced)==null?void 0:i.some(a=>a.focusMode==="manual"))===true),e?(await this.triggerFocusMode("continuous"),this.manualFocusWaitTimeout=window.setTimeout(async()=>{await this.triggerFocusMode("manual");},n.manualFocusWaitTimeoutMs)):await this.triggerFocusMode("manual");}async triggerManualFocusForSingleShot(){window.clearInterval(this.autofocusInterval),this.manualToAutofocusResumeTimeout=window.setTimeout(()=>{this.autofocusInterval=window.setInterval(this.triggerAutoFocus.bind(this),n.autofocusIntervalMs);},n.manualToAutofocusResumeTimeoutMs);try{await this.triggerFocusMode("single-shot");}catch{}}updateActiveCameraCurrentResolution(e){this.videoElement.videoWidth>2&&this.videoElement.videoHeight>2&&(e.currentResolution={width:this.videoElement.videoWidth,height:this.videoElement.videoHeight}),e.deviceId!==""&&(this.activeCamera=e,this.setMirrorImageEnabled(this.isMirrorImageEnabled(),false));}async updateStreamForResolution(e,t){var i;if(this.mediaStream==null)await this.initializeCameraForResolution(e,t);else try{let a=(i=this.activeCameraSettings)==null?void 0:i.getProperty("preferredAspectRatio");a$1.debug("Setting new resolution for active camera video stream..."),await this.mediaStream.getVideoTracks()[0].applyConstraints(d.getUserMediaVideoParameters(t,a)),await new Promise(o=>{this.videoElement.addEventListener("timeupdate",()=>{o();},{once:true});});let s=this.mediaStream.getVideoTracks()[0].getSettings();a$1.debug("New active camera video stream resolution set",{width:s.width,height:s.height});}catch(a){if(t===4)throw a;await this.updateStreamForResolution(e,t+1);}}async videoTrackEndedRecovery(){if(document.visibilityState==="visible")try{a$1.debug('Detected video track "ended" event, try to reinitialize camera'),await this.reinitializeCamera();}catch{}else a$1.debug("Page is currently not visible, delay camera reinitialization until visible"),document.addEventListener("visibilitychange",this.checkCameraVideoStreamAccessIfVisibleListener);}videoTrackMuteRecovery(e){if(this.videoElement.onloadeddata!=null){a$1.debug(`Detected video track "${e.type}" event, delay camera video stream access detection`),this.setCameraAccessTimeout();return}let t=e.type==="mute";t!==this.gui.isCameraRecoveryVisible()&&(a$1.debug(`Detected video track "${e.type}" event, ${t?"enable":"disable"} camera recovery`),this.gui.setCameraRecoveryVisible(t));}async clipMediaStreamIfNeeded(e){if(!this.clipArea)return e;let t=this.videoElement.cloneNode();t.srcObject=e,t.load();let i=document.createElement("canvas");i.width=this.clipArea.size.width,i.height=this.clipArea.size.height;let a=i.getContext("2d",{alpha:false,willReadFrequently:false});return a?(t.addEventListener("play",this.drawClippedFrame.bind(this,this.clipArea,t,a),{once:true}),t.addEventListener("pause",this.cleanupClippedStream.bind(this,t),{once:true}),await t.play(),i.captureStream()):e}drawClippedFrame(e,t,i){i.drawImage(t,e.origin.x,e.origin.y,e.size.width,e.size.height,0,0,e.size.width,e.size.height),this.clippedFrameRequestID=this.requestVideoFrame(this.drawClippedFrame.bind(this,e,t,i),t);}cleanupClippedStream(e){this.clippedFrameRequestID&&(this.cancelVideoFrame(this.clippedFrameRequestID,e),this.clippedFrameRequestID=void 0);}connectedCallback(e){e.replaceWith(this.videoElement),this.canvas.addEventListener("webglcontextlost",this.handleWebGLContextLostListener),this.videoElement.addEventListener("pause",this.handleVideoPauseHandler),this.playVideo();}disconnectedCallback(){this.canvas.removeEventListener("webglcontextlost",this.handleWebGLContextLostListener),this.videoElement.removeEventListener("pause",this.handleVideoPauseHandler),this.videoElement.remove(),this.videoElement.removeAttribute("width"),this.videoElement.removeAttribute("height"),this.videoElement.style.removeProperty("visibility");}getVideoElement(){return this.videoElement}handleVideoPause(){this.playVideo();}};n.autofocusIntervalMs=1500,n.cameraAccessTimeoutMs=4e3,n.getCapabilitiesTimeoutMs=500,n.manualFocusWaitTimeoutMs=400,n.manualToAutofocusResumeTimeoutMs=5e3,n.noCameraErrorParameters={name:"NoCameraAvailableError",message:"No camera available"},n.notReadableErrorParameters={name:"NotReadableError",message:"Could not initialize camera correctly"},n.videoMetadataCheckIntervalMs=50,n.videoMetadataCheckTimeoutMs=4e3,n.MIRRORED_CLASS_NAME=a$c.MIRRORED_CLASS_NAME,n._instance=null;var N=n;var v=class extends a{constructor(){super(...arguments);this.colorType="RGBA";}get _initialized(){return this._texture!=null&&this._framebuffer!=null}readFromSource(t){this._initialized||this.setup(),this.updateFrameSizeIfNeeded();let i=this._framePool.pop();return this._contextWebGL.texImage2D(this._contextWebGL.TEXTURE_2D,0,this._contextWebGL.RGBA,this._contextWebGL.RGBA,this._contextWebGL.UNSIGNED_BYTE,t),this._contextWebGL.readPixels(0,0,this._contextWebGL.drawingBufferWidth,this._contextWebGL.drawingBufferHeight,this._contextWebGL.RGBA,this._contextWebGL.UNSIGNED_BYTE,i),{width:this._contextWebGL.drawingBufferWidth,height:this._contextWebGL.drawingBufferHeight,data:i,frameId:E(),colorType:this.colorType}}setup(){this._texture=this._contextWebGL.createTexture(),this._texture==null&&a$1.warn("Could not create texture from WebGLRenderingContext"),this._contextWebGL.bindTexture(this._contextWebGL.TEXTURE_2D,this._texture),this._framebuffer=this._contextWebGL.createFramebuffer(),this._framebuffer==null&&a$1.warn("Could not create frameBuffer from WebGLRenderingContext"),this._contextWebGL.bindFramebuffer(this._contextWebGL.FRAMEBUFFER,this._framebuffer),this._contextWebGL.framebufferTexture2D(this._contextWebGL.FRAMEBUFFER,this._contextWebGL.COLOR_ATTACHMENT0,this._contextWebGL.TEXTURE_2D,this._texture,0),this._contextWebGL.texParameteri(this._contextWebGL.TEXTURE_2D,this._contextWebGL.TEXTURE_WRAP_S,this._contextWebGL.CLAMP_TO_EDGE),this._contextWebGL.texParameteri(this._contextWebGL.TEXTURE_2D,this._contextWebGL.TEXTURE_WRAP_T,this._contextWebGL.CLAMP_TO_EDGE),this._contextWebGL.texParameteri(this._contextWebGL.TEXTURE_2D,this._contextWebGL.TEXTURE_MIN_FILTER,this._contextWebGL.NEAREST),this._contextWebGL.texParameteri(this._contextWebGL.TEXTURE_2D,this._contextWebGL.TEXTURE_MAG_FILTER,this._contextWebGL.NEAREST);}dispose(){var t;this._texture!=null&&(this._contextWebGL.deleteTexture(this._texture),this._texture=null),this._framebuffer!=null&&(this._contextWebGL.deleteFramebuffer(this._framebuffer),this._framebuffer=null),(t=this._framePool)==null||t.empty();}updateFrameSizeIfNeeded(){var s;let{drawingBufferWidth:t,drawingBufferHeight:i}=this._contextWebGL,a=t*i*4;this._frameSize!==a&&(this._frameSize=a,(s=this._framePool)==null||s.empty(),this._framePool=new a$2({capacity:this._maxPoolCapacity,lowWaterMark:this._minPoolCapacity,createItem:()=>new Uint8ClampedArray(this._frameSize)}));}};export{v as a,x as b,H as c,X as d,E as e,q as f,N as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-U2WQ3WDE.js';var u=(o=>(o.On="on",o.Off="off",o.Standby="standby",o.Starting="starting",o.Stopping="stopping",o.BootingUp="bootingUp",o.WakingUp="wakingUp",o.GoingToSleep="goingToSleep",o.ShuttingDown="shuttingDown",o))(u||{}),m=(t=>(t.On="on",t.Off="off",t))(m||{}),c=(t=>(t.WorldFacing="worldFacing",t.UserFacing="userFacing",t))(c||{}),p=(r=>(r.Auto="auto",r.HD="hd",r.FullHD="fullHd",r.UHD4K="uhd4k",r))(p||{}),l=(r=>(r.None="none",r.Manual="manual",r.ManualUntilCapture="manualUntilCapture",r.AutoOnLocation="autoOnLocation",r))(l||{});function f(i){var e;return ((e=i==null?void 0:i.toJSONObject())==null?void 0:e.type)==="camera"}var n=class i{constructor(e){this.preferredResolution=a.settings.preferredResolution;this.zoomFactor=a.settings.zoomFactor;this.zoomGestureZoomFactor=a.settings.zoomGestureZoomFactor;this.zoomLevels=a.settings.zoomLevels;this.focus={focusGestureStrategy:a.settings.focusGestureStrategy};e!=null&&(this.preferredResolution=e.preferredResolution,this.zoomFactor=e.zoomFactor,this.zoomGestureZoomFactor=e.zoomGestureZoomFactor,this.zoomLevels=e.zoomLevels?[...e.zoomLevels]:[1,2],this.focusGestureStrategy=e.focusGestureStrategy,this.copyPrivatePropertiesFrom(e));}get focusGestureStrategy(){return this.focus.focusGestureStrategy}set focusGestureStrategy(e){this.focus.focusGestureStrategy=e;}copyPrivatePropertiesFrom(e){for(let[t,a]of Object.entries(e))Object.getOwnPropertyNames(this).includes(t)||this.setProperty(t,a);}static fromJSON(e){var a;let t=new i;return t.preferredResolution=e.preferredResolution,t.zoomFactor=e.zoomFactor,t.zoomGestureZoomFactor=e.zoomGestureZoomFactor,t.zoomLevels=(a=e.zoomLevels)!=null?a:[1,2],t.focusGestureStrategy=e.focusGestureStrategy,t.copyPrivatePropertiesFrom(e),t}setProperty(e,t){this[e]=t;}getProperty(e){return this[e]}toJSONObject(){let e={preferredResolution:this.preferredResolution,zoomFactor:this.zoomFactor,zoomGestureZoomFactor:this.zoomGestureZoomFactor,zoomLevels:this.zoomLevels,focus:{focusGestureStrategy:this.focus.focusGestureStrategy}},t={};for(let a of Object.keys(this))[...Object.keys(e),"focusGestureStrategy"].includes(a)||(t[a]=this[a]);return {...e,...t}}};export{u as a,m as b,c,p as d,l as e,f,n as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-DN32UPQC.js';import {a as a$8}from'./chunk-GVHXM75D.js';import {a as a$9}from'./chunk-G2BRTVN7.js';import {a}from'./chunk-GQ7A6533.js';import {c as c$1,a as a$a}from'./chunk-4W2T3TLN.js';import {c}from'./chunk-UWLAKRB2.js';import {a as a$1}from'./chunk-CAUB35PV.js';import {a as a$2}from'./chunk-QIWPWOQG.js';import {a as a$6}from'./chunk-HBPGHXF2.js';import {d}from'./chunk-AIC4H5KG.js';import {a as a$5}from'./chunk-O7TZTIHO.js';import {a as a$3}from'./chunk-XR65N6EG.js';import {a as a$7}from'./chunk-QCZSSQAQ.js';var P=class P{constructor(e,t){this.hintPresenterV2=null;this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL=5;this.redrawInterval=1e3/30;this.redrawRequests=[];this._isDrawLoopRunning=false;this.frameDataPool=new Map;this.lastFrameColorType="RGBA";this.lastFrameId=null;this.poorMansBenchmarkLogs=false;this.writableDataPathStandard="/scandit_sync_folder";this.resourceFilesSubfolder="resources";this.performanceMetricsReporterTimer=void 0;this.lastMetricsReportTime=0;this.metricsReportInterval=1e3;this.performanceMetrics={frameDataPoolSize:0,cameraOutputFrames:0,redrawRequestsCount:0,actualRedrawsCount:0,frameProcessingStartedCount:0,frameProcessedCount:0,frameSkippedCount:0};this.frameProcessingStartedCount=0;this.frameProcessingFinishedCount=0;this.gestureListener=null;this.webPlatformHintPresenter=null;this.deviceInstance=null;this.deviceInfo=null;this.lastViewInfo=new a(null);this.lastFrameProcessingStartedCount=0;this.lastFrameProcessingFinishedCount=0;this.moduleHandler=e,this.workerFunctions=t,this._loadProgressCallback=this._loadProgressCallback.bind(this),c(this.getWasmMetadata());}get Module(){return this.moduleHandler.get()}set isDrawLoopRunning(e){this._isDrawLoopRunning=e,!e&&typeof this.loopTimeoutId=="number"&&(clearTimeout(this.loopTimeoutId),this.loopTimeoutId=void 0);}get isDrawLoopRunning(){return this._isDrawLoopRunning}prepareFrameForListener(e){let t=this.lastFrameId;if(this.frameDataPool.size>=this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL){let l=this.frameDataPool.keys().next().value;l!=null&&this.frameDataPool.delete(l);}let r=e.getFrameData(),i=new Uint8ClampedArray(r);this.frameDataPool.set(t,{data:i,colorType:this.lastFrameColorType,frameId:t,width:e.getWidth(),height:e.getHeight()});let n=this.lastUsedModuleMirrorAxis==null?false:this.lastUsedModuleMirrorAxis!==this.Module.Axis.None;return {frameId:t,width:e.getWidth(),height:e.getHeight(),isFrameSourceMirrored:n,colorType:this.lastFrameColorType}}createContext(e){var f,m,C,b,y;let t=this.getModeDeserializers(),r=c$1(location);(r==="localhost"||r==="127.0.0.1")&&navigator.userAgent.includes("Electron")&&e.appName!=null&&(r+=`-${e.appName}`),this.parentDomain=e.parentDomain,this.contextDeserializer=new this.Module.DataCaptureContextDeserializer(this.writableDataPath,e.deviceId,e.context.deviceModelName,r,this.parentDomain,t,e.delayedRegistration,e.highEndBlurryRecognition,this.resourcePath);let i=this.contextDeserializer.contextFromJson(JSON.stringify(e.context));if(i==null){let a=this.contextDeserializer.getLastError();throw new Error(`Could not create the context: ${a}`)}let n=i.getView();this.context=i.getContext(),i.delete(),this.setupDeviceInterface(e.isTablet,e.batteryInfo);let l=this.Module.DataCaptureContextListener.extend("DataCaptureContextListener",{didChangeStatus:(a,o)=>{this.contextDidChangeStatus(JSON.parse(o.toJson())),a.delete();},didStartObservingContext:a=>{this.didStartObservingContext(),a.delete();},didStopObservingContext:a=>{a.delete();}}),c=this.Module.DataCaptureContextFrameListener.extend("DataCaptureContextFrameListener",{onObservationStarted:a=>{a.delete();},onObservationStopped:a=>{a.delete();},onFrameProcessingStarted:(a,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingStarted"}),o.delete(),a.delete();},onFrameProcessingFinished:(a,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingFinished"}),o.delete(),a.delete();},onFrameSkipped:(a,o)=>{this.workerFunctions.postMessage({type:"onFrameSkipped"}),o.delete(),a.delete();}}),h=this.Module.GestureRecognizer.extend("GestureRecognizer",{setGestureListener:(a,o)=>{var w;(w=this.gestureListener)==null||w.delete(),this.gestureListener=a.clone(),a.delete();}});(f=this.gestureRecognizer)==null||f.delete(),this.gestureRecognizer=new h;let g=new l;this.context.addListener(g),g.delete();let u=new c;this.context.addFrameListener(u),u.delete(),this.setView(n),(m=this.view)==null||m.setGestureRecognizer(this.gestureRecognizer);let p=this.Module.PlatformHintPresenter.extend("PlatformHintPresenter",{setHintPresenter:a=>{a.delete();},showToast:a=>{this.workerFunctions.postMessage({type:"showToast",payload:JSON.parse(a)});},hideToast:a=>{this.workerFunctions.postMessage({type:"hideToast",payload:JSON.parse(a)});},showGuidance:a=>{this.workerFunctions.postMessage({type:"showGuidance",payload:JSON.parse(a)});},hideGuidance:a=>{this.workerFunctions.postMessage({type:"hideGuidance",payload:JSON.parse(a)});},startUpdateTimer:a=>{this.workerFunctions.postMessage({type:"startUpdateTimer",payload:{duration:{unit:"ms",value:a}}});},stopUpdateTimer:()=>{this.workerFunctions.postMessage({type:"stopUpdateTimer"});}});(C=this.hintPresenterV2)==null||C.delete(),this.hintPresenterV2=null,(b=this.webPlatformHintPresenter)==null||b.delete(),this.webPlatformHintPresenter=null,this.webPlatformHintPresenter=new p,this.view&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter),(y=this.view)==null||y.setHintPresenterV2(this.hintPresenterV2)),this.webImageConverterInstance=this.getImageConverterInstance({quality:1}),this.Module.ImageConverter.setInstance(this.webImageConverterInstance);}convertToJPEGResult(e,t){this.webImageConverterInstance instanceof a$1&&this.webImageConverterInstance.onConvertToJPEGResult(e,t);}getImageConverterInstance(e){return this.workerFunctions.getOffscreenCanvas()!=null?new a$2(e):new a$1(this.workerFunctions,e)}onTap(e){var t;(t=this.gestureListener)==null||t.onTap(JSON.stringify(e));}hintPresenterV2Update(){var e;(e=this.hintPresenterV2)==null||e.update();}startReportingPerformanceMetrics(){this.performanceMetricsReporterTimer==null&&(this.lastMetricsReportTime=performance.now(),this.scheduleMetricsReporting());}scheduleMetricsReporting(){this.performanceMetricsReporterTimer=setTimeout(()=>{this.checkAndReportMetrics();},100);}checkAndReportMetrics(){let e=performance.now();e-this.lastMetricsReportTime>=this.metricsReportInterval&&(this.reportPerformanceMetrics(),this.performanceMetrics.cameraOutputFrames=0,this.performanceMetrics.redrawRequestsCount=0,this.performanceMetrics.actualRedrawsCount=0,this.lastMetricsReportTime=e),this._isDrawLoopRunning&&this.scheduleMetricsReporting();}async reportPerformanceMetrics(){let e=this.frameProcessingStartedCount-this.lastFrameProcessingStartedCount,r=this.frameProcessingFinishedCount-this.lastFrameProcessingFinishedCount;this.lastFrameProcessingStartedCount=this.frameProcessingStartedCount,this.lastFrameProcessingFinishedCount=this.frameProcessingFinishedCount;let i={cameraOutputFrames:this.performanceMetrics.cameraOutputFrames,redrawRequestsCount:this.performanceMetrics.redrawRequestsCount,actualRedrawsCount:this.performanceMetrics.actualRedrawsCount,frameDataPoolSize:this.performanceMetrics.frameDataPoolSize,frameProcessingStartedCount:e,frameProcessedCount:r,frameSkippedCount:this.performanceMetrics.frameSkippedCount};this.workerFunctions.postMessage({type:"performanceMetricsReport",payload:i});}deleteFrameData(e){this.frameDataPool.delete(e);}dispose(){var e,t,r,i,n;this.context.dispose(),this.frameDataPool.clear(),this.isDrawLoopRunning=false,this.cleanupMetricsReporting(),(e=this.gestureRecognizer)==null||e.delete(),this.gestureRecognizer=null,(t=this.gestureListener)==null||t.delete(),this.gestureListener=null,(r=this.hintPresenterV2)==null||r.delete(),this.hintPresenterV2=null,(i=this.webPlatformHintPresenter)==null||i.delete(),this.webPlatformHintPresenter=null,(n=this.deviceInstance)==null||n.delete(),this.deviceInstance=null,this.deviceInfo=null;}cleanupMetricsReporting(){this.performanceMetricsReporterTimer!=null&&(typeof this.performanceMetricsReporterTimer=="number"?cancelAnimationFrame(this.performanceMetricsReporterTimer):clearTimeout(this.performanceMetricsReporterTimer),this.performanceMetricsReporterTimer=void 0);}flushAnalytics(){this.context.flushAnalytics();}extractCentaurusLicense(e){return {payload:{centaurus:{licenseKey:this.Module.LicenseUtils[P.get3dPartyLicenseKeyMethodName](e)}}}}getModeDeserializers(){return new this.Module.VectorDataCaptureModeDeserializer}loadLibrary(e){return this.libraryLoadingPromise!=null?this.libraryLoadingPromise:(this.libraryLoadingPromise=this.setup(e),this.libraryLoadingPromise)}processFrame(e){var n;if(this.context==null)return a$3.debug("[processFrame] Context is null, returning frame without processing"),{payload:e,transferables:[e.data.buffer]};this.lastFrameId=e.frameId;let t=e.data,r=e.colorType==="GRAYSCALE"?this.Module.ImageBufferFormat.Grayscale8:this.Module.ImageBufferFormat.Rgba8888;this.lastFrameColorType=e.colorType==="GRAYSCALE"?"GRAYSCALE":"RGBA";let i=this.Module.allocateUint8Array(t.byteLength);return this.Module.HEAPU8.set(t,i),(n=this.imageFrameSource)==null||n.outputFrame(i,e.width,e.height,r),{payload:e,transferables:[e.data.buffer]}}reportCameraProperties(e){this.context.setCameraProperties(e.deviceId,e.isFrontFacing,e.hasAutofocus);}requestFrameData(e){let t=this.frameDataPool.get(e);if(t==null)return {payload:{data:null,frameId:null,colorType:null}};if(t.data.buffer.byteLength===0)return this.frameDataPool.delete(e),{payload:{data:null,frameId:null,colorType:null}};let r=t.data;t.colorType==="GRAYSCALE"&&(r=a$4(t.data,t.width,t.height));let i={payload:{data:r,frameId:t.frameId,colorType:t.colorType},transferables:[r.buffer]};return this.frameDataPool.delete(e),i}scheduleRedraw(e,t){this.addRedrawRequest(t),this.isDrawLoopRunning||this.startDrawLoop(e);}sendViewRefreshCommands(e){this.workerFunctions.postMessage({type:"draw",payload:e},[e.buffer]);}setFrameSource(e,t){var r;this.lastUsedModuleMirrorAxis=this.mapMirrorAxisOnModule(e),(r=this.imageFrameSource)==null||r.delete(),this.imageFrameSource=new this.Module.ImageBufferFrameSource(this.lastUsedModuleMirrorAxis,t,0),this.context.setFrameSource(this.imageFrameSource);}startDrawLoop(e){this.isDrawLoopRunning=true;let t=n=>this.redrawRequests.length>0&&this.redrawRequests[0]<=n,r=n=>{for(;this.redrawRequests.length>0&&this.redrawRequests[0]<=n;)this.redrawRequests.shift();},i=()=>{this.loopTimeoutId=setTimeout(()=>{if(!this.isDrawLoopRunning)return;let n=performance.now();if(t(n)){r(n),e.draw();let l=e.getDrawCommands();this.sendViewRefreshCommands(new Uint8Array(l));}i();},this.redrawInterval);};i();}updateContext(e){if(this.context!=null&&this.contextDeserializer!=null){e.view!=null&&!e.view.visible&&this.context.flushAnalytics();let t=this.onBeforeUpdateContextHook(e),r=this.contextDeserializer.updateContextFromJson(this.context,this.view,JSON.stringify(t.context));if(r==null){let n=this.contextDeserializer.getLastError();throw new Error(`Could not update the context: ${n}`)}this.context.delete(),this.context=r.getContext();let i=r.getView();r.delete(),i!=null&&t.view!=null&&(i.setViewSize(t.view.width,t.view.height,t.view.orientation),i.draw()),!this.hintPresenterV2&&this.webPlatformHintPresenter&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter)),i!=null&&this.hintPresenterV2&&i.setHintPresenterV2(this.hintPresenterV2),this.gestureRecognizer!=null&&(i==null||i.setGestureRecognizer(this.gestureRecognizer)),this.setView(i),this.notifyMainThreadOnViewInfoChanged(i),a$3.debug("context updated",t);}}notifyMainThreadOnViewInfoChanged(e){let t=this.getViewInfo(e);this.lastViewInfo.isSame(t)||(this.lastViewInfo.update(t),this.workerFunctions.postMessage({type:"viewSizeChanged",payload:t}));}getViewInfo(e){if(e!=null)try{let t=JSON.parse(e.getViewInfo());if(t!=null){let r=this.getOrientationFromNumber(t.orientation);return {...t,orientation:r}}}catch(t){a$3.error("Failed to get view size",t);}return null}getOrientationFromNumber(e){switch(e){case 90:return "landscapeRight";case 180:return "portraitUpsideDown";case 270:return "landscapeLeft";default:return "portrait"}}onBeforeUpdateContextHook(e){return e}onDocumentVisibilityChange(e){e==="hidden"&&this.context.flushAnalytics();}isFeatureSupported(e){return {payload:{supported:this.context.isFeatureSupported(e)}}}getViewfinderInfo(){var e,t;return {payload:{isDisplayingViewfinder:(t=(e=this.view)==null?void 0:e.isDisplayingViewfinder())!=null?t:false,rect:JSON.parse(this.view.getViewfinderRect())}}}getOpenSourceSoftwareLicenseInfo(){return {payload:{licenseText:this.Module.OpenSourceSoftwareLicenseInfo.getLicenseText()}}}getWasmDynamicLibraries(e){return this.getWasmSideModuleFileName()==null?[]:[`${e.replace(/\/[^/]*$/,"/")}${this.getWasmSideModuleFileName()}`]}getWasmCoreExpectedHash(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_HASH:globalThis.SDC_WASM_CORE_MT_HASH:e?globalThis.SDC_WASM_CORE_SIMD_HASH:""}getWasmCoreFileName(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_FILE_NAME:globalThis.SDC_WASM_CORE_MT_FILE_NAME:e?globalThis.SDC_WASM_CORE_SIMD_FILE_NAME:""}getWasmMetadata(){return globalThis.WASM_METADATA}getWasmSideModuleFileName(){return ""}_loadProgressCallback(e){this.workerFunctions.postMessage({type:"loadLibraryProgress",payload:e});}addRedrawRequest(e){this.redrawRequests.push(Math.round(performance.now())+e),this.redrawRequests.sort((t,r)=>t-r);}contextDidChangeStatus(e){e.code===260?e.message=e.message.replace("domain name",`domain name (${c$1(location)})`):e.code===265&&(e.message=e.message.replace("domain name",`domain name (${this.parentDomain})`)),this.workerFunctions.postMessage({type:"contextDidChangeStatus",payload:e});}didStartObservingContext(){this.workerFunctions.postMessage({type:"didStartObservingContext"});}mapMirrorAxisOnModule(e){switch(e){case "None":return this.Module.Axis.None;case "X":return this.Module.Axis.X;case "Y":return this.Module.Axis.Y;default:return this.Module.Axis.None}}setView(e){this.view=e,this.setViewRefreshHandler(e),e==null&&(this.isDrawLoopRunning=false,this.sendViewRefreshCommands(new Uint8Array([])));}addNativeOverlay(e){a$3.warn("addNativeOverlay has not been implemented for this module",e);}removeNativeOverlay(e){a$3.warn("removeNativeOverlay has not been implemented for this module",e);}setViewRefreshHandler(e){if(e==null||e.isViewRefreshHandlerSet)return;let t=this.Module.NeedsRedrawDelegate.extend("NeedsRedrawDelegate",{setNeedsRedrawIn:this.scheduleRedraw.bind(this,e)}),r=new t;e.setNeedsRedrawDelegate(r),e.isViewRefreshHandlerSet=true;}setupDataDecoding(){let e=this.moduleHandler.get(),t=e.DataDecoding.extend("DataDecoding",{decode(r,i){try{let n=JSON.parse(i),l=[];for(let c of n){let h=new TextDecoder(c.ianaName,{fatal:true});l.push(h.decode(r.slice(c.startIndex,c.endIndex)));}return l.join("")}catch{return ""}}});e.setDataDecoding(new t);}getBatteryData(){var t,r;let e=(r=(t=this.deviceInfo)==null?void 0:t.batteryInfo)==null?void 0:r.percentage;if(e!=null)return {percentage:e}}isTablet(){var e,t;return (t=(e=this.deviceInfo)==null?void 0:e.isTablet)!=null?t:false}setupDeviceInterface(e,t){this.deviceInfo={isTablet:e,batteryInfo:t};let r=this.moduleHandler.get(),i=r.DeviceInterface.extend("DeviceInterface",{getBatteryData:this.getBatteryData.bind(this),isTablet:this.isTablet.bind(this)});this.deviceInstance=new i,r.DeviceHolder.setCurrentDevice(this.deviceInstance);}updateBatteryInfo(e){this.deviceInfo&&(this.deviceInfo.batteryInfo=e);}start(e,t,r){e&&t&&(this.setupDataDecoding(),this.moduleHandler.get().callMain(),this.moduleHandler.get().__emscripten_proxy_main!==void 0||r());}getWritableDataPath(e){return e!=null?(a$3.debug(`IndexedDB database name override in use to recover from blocked standard database: ${e}`),e):this.writableDataPathStandard}numOfMBToPages(e){return Math.ceil(1024*e*1024/64/1024)}async setup({libraryLocation:e,locationPath:t,writableDataPathOverride:r,indexedDBTimeoutMs:i,verifyResponseHash:n,referredOrigin:l,fixedWasmMemory:c,simdSupport:h,threadsSupport:g}){var v;let u=false,p=false;this.writableDataPath=this.getWritableDataPath(r),this.resourcePath=`${e}${this.resourceFilesSubfolder}/`,globalThis.path=t;let{resolve:f,reject:m,promise:C}=new a$5,b=a$6.sdkVersion();if(b==="")throw new a$7({name:"Invalid library version",message:"Library version is not defined or empty, cannot generate proper path to library files."});let y=this.getWasmCoreFileName(h,g),a=d(b,e,y),{jsURI:o,wasmURI:w}=a,W={instantiateWasm:(d,H)=>(a$a({importObject:d,wasmURI:w,expectedHash:this.getWasmCoreExpectedHash(h,g),verifyResponseHash:n,successCallback:H,progressCallback:this._loadProgressCallback,errorCallback:N=>{m(N);},referredOrigin:l}),{})},M=c===null?null:new WebAssembly.Memory({initial:this.numOfMBToPages(c),maximum:this.numOfMBToPages(300),shared:g});return M!==null&&a$3.log(a$3.Level.Debug,"Fixed wasmMemory set",M),this.moduleHandler.set({...M?{wasmMemory:M}:{},mainScriptUrlOrBlob:o,canvas:(v=this.workerFunctions.getOffscreenCanvas())!=null?v:{getContext:()=>null},...W,dynamicLibraries:this.getWasmDynamicLibraries(w),locateFile:d=>e+d,noInitialRun:true,preRun:[async()=>{try{await a$8({writableDataPath:this.writableDataPath,indexedDBTimeoutMs:i});}catch(d){if(d.name==="BlockedIndexedDB"){m(d.toString());return}a$3.log(a$3.Level.Debug,"No IndexedDB support, some data will not be persisted:",d);}p=true,this.start(p,u,f);}],onMainComplete:()=>{if([u,p].includes(false)){a$3.log(a$3.Level.Warn,{runtimeLoaded:u,fileSystemSynced:p},"Both runtimeLoaded and fileSystemSynced should be true when calling onMainComplete"),m("onMainComplete has been called but runtime or file system was not ready.");return}f();},onRuntimeInitialized:()=>{u=true,this.start(p,u,f);},print:d=>{a$3.info(d);}}),await a$9(o,b)||m(`Couldn't retrieve Scandit Data Capture library at ${o}, did you configure the path for it correctly?`),C}};P.get3dPartyLicenseKeyMethodName=atob("Z2V0QmxpbmtJZExpY2Vuc2VLZXk=");var V=P;export{V as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-V2OKMBZD.js';import {a as a$5}from'./chunk-GHTCNOQN.js';import {a as a$1}from'./chunk-UWBNF47P.js';import {a as a$2}from'./chunk-3A4KLILV.js';import {a}from'./chunk-EV4OEANA.js';import {a as a$4}from'./chunk-LSZZVJ6B.js';var c="scandit-loading-overlay",t=class t extends a{constructor(){super();this._progressBar=null;this._label=null;let e=this.attachShadow({mode:"open"});e.innerHTML=a$1`<div class="loading-overlay"><label for="scandit-progress" class="message">Loading...</label><scandit-progress-bar id="scandit-progress" min="0" max="100"></scandit-progress-bar></div>`,e.append(t.createStyleElement().cloneNode(true));}set progress(e){this._progressBar&&(this._progressBar.value=e);}set message(e){this._label&&(this._label.textContent=e);}get message(){var e,r;return (r=(e=this._label)==null?void 0:e.textContent)!=null?r:""}static create(){return t.register(),document.createElement(t.tag)}static register(){a$2({[c]:t,[a$3.tag]:a$3});}static createStyleElement(){return a$4`@media (prefers-color-scheme:dark){.loading-overlay{--foreground-color:#fff;--background-color:#000000e6}}@media (prefers-color-scheme:light){.loading-overlay{--foreground-color:#000;--background-color:#ffffffe6}}${a$3.tag}{max-width:15rem}.loading-overlay{align-items:center;background-color:var(--background-color);display:flex;flex-direction:column;height:100%;justify-content:center;position:absolute;width:100%;z-index:1}:host([hidden]){display:none}.loading-overlay .message{color:var(--foreground-color);font-family:Open Sans,sans-serif;margin-bottom:1rem;text-align:center}`}connectedCallback(){var e,r;this._progressBar=(e=this.shadowRoot)==null?void 0:e.querySelector(a$3.tag),this._label=(r=this.shadowRoot)==null?void 0:r.querySelector("label"),this.message=a$5.getInstance().get("core.view.loading");}show(){this.removeAttribute("hidden");}hide(){this.setAttribute("hidden","");}};t.tag=c;var d=t;export{d as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function u(t,f,o){let a=f*o,n=new Uint8ClampedArray(a*4),i=new Uint32Array(n.buffer);for(let r=0;r<a;r++){let e=t[r];i[r]=4278190080|e<<16|e<<8|e;}return n}export{u as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=(o=>(o.AboveControls="above-controls",o))(e||{});export{e as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=class{constructor(e,t){this._origin=e,this._size=t;}get origin(){return this._origin}get size(){return this._size}toJSONObject(){return {origin:this.origin.toJSONObject(),size:this.size.toJSONObject()}}};export{i as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-XR65N6EG.js';var g=class{constructor(a){this.options=a;}get quality(){return this.options.quality}async convertToJpeg(a$1,e){try{let{width:t,height:r,planes:s}=this.validateAndExtractImageData(a$1);this.prepareCanvas(t,r);let o=this.processImageData(a$1,s,t,r);return await this.convertToJpegBytes(o,e)}catch(t){throw a.warn(`Failed to convert image to JPEG: ${t}`),t instanceof Error?t:new Error("Failed to convert image to JPEG")}}convertToBitmap(a){return {data:a.toBitmap(),byteOrder:1}}validateAndExtractImageData(a$1){let e=a$1.getWidth(),t=a$1.getHeight(),r=a$1.getPlanes();if(e<=0||t<=0)throw a.warn(`Invalid image dimensions: ${e}x${t}`),new Error(`Invalid image dimensions: ${e}x${t}`);if(!r||r.length===0)throw a.warn("ImageBuffer has no planes"),new Error("ImageBuffer has no planes");return {width:e,height:t,planes:r}}prepareCanvas(a,e){if(!this.ensureCanvas(a,e))throw new Error("Failed to create OffscreenCanvas");if(!this.canvas||!this.context)throw new Error("Canvas or context not properly initialized")}processImageData(a,e,t,r){let s=this.createImageDataFromBuffer(a,e,t,r);if(s===null)throw new Error("Failed to create ImageData");return this.validateImageData(s,t,r),s}validateImageData(a$1,e,t){var r;if(a$1.width!==e||a$1.height!==t)throw a.warn(`ImageData dimensions mismatch: expected ${e}x${t}, got ${a$1.width}x${a$1.height}`),new Error("ImageData dimensions mismatch");if(!a$1.data||a$1.data.length!==e*t*4)throw a.warn(`ImageData has invalid data length: expected ${e*t*4}, got ${((r=a$1.data)==null?void 0:r.length)||0}`),new Error("ImageData has invalid data length")}async convertToJpegBytes(a$1,e){if(!this.context||!this.canvas)throw new Error("Canvas or context not available");try{this.context.putImageData(a$1,0,0);}catch(o){throw a.warn(`Failed to put image data on canvas: ${o}`),new Error(`Failed to put image data on canvas: ${o}`)}let t=e!==0?this.applyRotation(this.canvas,e):this.canvas,r;try{r=await this.canvasToBlob(t);}catch(o){throw a.warn(`Failed to convert canvas to blob: ${o}`),new Error(`Failed to convert canvas to blob: ${o}`)}if(!r||r.size===0)throw a.warn("Canvas convertToBlob returned empty or null blob"),new Error("Failed to create JPEG blob");let s;try{s=await r.arrayBuffer();}catch(o){throw a.warn(`Failed to get array buffer from blob: ${o}`),new Error(`Failed to get array buffer from blob: ${o}`)}if(!s||s.byteLength===0)throw a.warn("Blob arrayBuffer returned empty or null buffer"),new Error("Failed to get array buffer from blob");return new Uint8Array(s)}ensureCanvas(a$1,e){try{return (!this.canvas||this.canvas.width!==a$1||this.canvas.height!==e)&&(this.canvas=this.getNewCanvas(a$1,e),this.context=this.canvas.getContext("2d")),this.context!==null}catch(t){return a.warn("Failed to create HTMLCanvasElement",t),false}}createImageDataFromBuffer(a$1,e,t,r){let s=new Set(e.map(o=>o.channel));try{if(this.isYUVFormat(s)){let n=a$1.toBitmap();return !n||n.length!==t*r*4?(a.warn(`Invalid bitmap data from toBitmap(): expected ${t*r*4} bytes, got ${(n==null?void 0:n.length)||0}`),null):new ImageData(new Uint8ClampedArray(n),t,r)}if(this.isRGBAFormat(s))return this.createImageDataFromRGBAPlanes(e,t,r);if(this.isRGBFormat(s))return this.createImageDataFromRGBPlanes(e,t,r);if(this.isGrayscaleFormat(s))return this.createImageDataFromGrayscalePlanes(e,t,r);a.warn(`Unknown image format with channels: ${Array.from(s).join(", ")}, falling back to toBitmap()`);let o=a$1.toBitmap();if(!o||o.length===0)return a.warn("toBitmap() returned empty or null data"),null;let l=o.length/(t*r);return l===4?new ImageData(new Uint8ClampedArray(o),t,r):(a.warn(`Unsupported format: ${l} bytes per pixel`),null)}catch(o){return a.warn(`Failed to create ImageData: ${o}`),null}}isYUVFormat(a){return a.has(0)&&a.has(1)&&a.has(2)}isRGBAFormat(a){return a.has(3)&&a.has(4)&&a.has(5)&&a.has(6)}isRGBFormat(a){return a.has(3)&&a.has(4)&&a.has(5)&&!a.has(6)}isGrayscaleFormat(a){return a.has(0)&&!a.has(1)&&!a.has(2)}createImageDataFromRGBAPlanes(a$1,e,t){let r=a$1.find(i=>i.channel===3),s=a$1.find(i=>i.channel===4),o=a$1.find(i=>i.channel===5),l=a$1.find(i=>i.channel===6);if(!r||!s||!o||!l)return a.warn("Missing RGBA planes"),null;let n=new Uint8ClampedArray(e*t*4);for(let i=0;i<t;i++)for(let c=0;c<e;c++){let u=(i*e+c)*4;n[u]=this.getPixelFromPlane(r,c,i),n[u+1]=this.getPixelFromPlane(s,c,i),n[u+2]=this.getPixelFromPlane(o,c,i),n[u+3]=this.getPixelFromPlane(l,c,i);}return new ImageData(n,e,t)}createImageDataFromRGBPlanes(a$1,e,t){let r=a$1.find(n=>n.channel===3),s=a$1.find(n=>n.channel===4),o=a$1.find(n=>n.channel===5);if(!r||!s||!o)return a.warn("Missing RGB planes"),null;let l=new Uint8ClampedArray(e*t*4);for(let n=0;n<t;n++)for(let i=0;i<e;i++){let c=(n*e+i)*4;l[c]=this.getPixelFromPlane(r,i,n),l[c+1]=this.getPixelFromPlane(s,i,n),l[c+2]=this.getPixelFromPlane(o,i,n),l[c+3]=255;}return new ImageData(l,e,t)}createImageDataFromGrayscalePlanes(a$1,e,t){let r=a$1.find(o=>o.channel===0);if(!r)return a.warn("Missing Y plane for grayscale"),null;let s=new Uint8ClampedArray(e*t*4);for(let o=0;o<t;o++)for(let l=0;l<e;l++){let n=(o*e+l)*4,i=this.getPixelFromPlane(r,l,o);s[n]=i,s[n+1]=i,s[n+2]=i,s[n+3]=255;}return new ImageData(s,e,t)}getPixelFromPlane(a,e,t){let r=Math.floor(e/(a.subsamplingX||1)),s=Math.floor(t/(a.subsamplingY||1)),o=a.rowStride,l=a.pixelStride,n=s*o+r*l,i=a.data;return n<i.length?i[n]:0}applyRotation(a,e){let t=e*Math.PI/180,r=e===90||e===270||e===-90||e===-270,s=r?a.height:a.width,o=r?a.width:a.height,l=this.getNewCanvas(s,o),n=l.getContext("2d");if(!n)throw new Error("Failed to get 2D context for rotated canvas");return n.translate(s/2,o/2),n.rotate(t),n.translate(-a.width/2,-a.height/2),n.drawImage(a,0,0),l}};g.JPEG_IMAGE_MIME_TYPE="image/jpeg";export{g as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=class i{constructor(e,r){this._value=e,this._unit=r;}get value(){return this._value}get unit(){return this._unit}static fromJSON(e){return new i(e.value,e.unit)}toJSONObject(){return {unit:this.unit,value:this.value}}};export{t as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t=class{constructor(){this._listeners=new Set;}get listeners(){return [...this._listeners]}addListener(e){this._listeners.add(e);}removeListener(e){this._listeners.delete(e);}};export{t as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(n){if(!n)return false;try{return n.cancel(),true}catch{return false}}async function t(n){if(n)try{await n.finished;}catch{}}export{e as a,t as b};
|