@scandit/web-datacapture-core 8.1.0 → 8.2.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.
Files changed (262) hide show
  1. package/LICENSE +1 -1
  2. package/build/js/Camera.js +1 -1
  3. package/build/js/{DataCaptureContext-fzPdCXUX.d.ts → DataCaptureContext-COl4JuSo.d.ts} +319 -214
  4. package/build/js/DataCaptureContext.d.ts +7 -7
  5. package/build/js/DataCaptureContext.js +1 -1
  6. package/build/js/DataCaptureContextRelated.d.ts +9 -9
  7. package/build/js/DataCaptureVersion.js +1 -1
  8. package/build/js/DataCaptureView.d.ts +7 -7
  9. package/build/js/DataCaptureView.js +1 -1
  10. package/build/js/Feedback.js +1 -1
  11. package/build/js/FrameData.d.ts +8 -8
  12. package/build/js/FrameData.js +1 -1
  13. package/build/js/ImageFrameSource.js +1 -1
  14. package/build/js/NotificationPresenter/index.d.ts +4 -4
  15. package/build/js/NotificationPresenter/private/ConcreteNotificationPresenter.d.ts +4 -4
  16. package/build/js/NotificationPresenter/private/presets.d.ts +8 -8
  17. package/build/js/ScanditIcon.d.ts +1 -1
  18. package/build/js/ScanditIcon.js +1 -1
  19. package/build/js/ScanditIconBuilder.d.ts +2 -1
  20. package/build/js/ScanditIconBuilder.js +1 -1
  21. package/build/js/Vibration.js +1 -1
  22. package/build/js/browserHelper.d.ts +8 -1
  23. package/build/js/browserHelper.js +1 -1
  24. package/build/js/chunks/{chunk-UQVVJP5Z.js → chunk-2OCDIZIS.js} +1 -1
  25. package/build/js/chunks/chunk-3A7LM5JG.js +1 -0
  26. package/build/js/chunks/chunk-3DUIJMFT.js +1 -0
  27. package/build/js/chunks/chunk-3MKSI2DV.js +1 -0
  28. package/build/js/chunks/{chunk-GJBUPJIM.js → chunk-4DNKMVCD.js} +1 -1
  29. package/build/js/chunks/{chunk-X2ZGBI4S.js → chunk-5DYRW7WM.js} +1 -1
  30. package/build/js/chunks/chunk-5JVQUPEF.js +2 -0
  31. package/build/js/chunks/chunk-6DTJIONB.js +1 -0
  32. package/build/js/chunks/chunk-6EEMWSEO.js +1 -0
  33. package/build/js/chunks/{chunk-RL4LGOQS.js → chunk-6IWAI6XT.js} +1 -1
  34. package/build/js/chunks/chunk-6OKFTR6P.js +1 -0
  35. package/build/js/chunks/{chunk-J6LCRGZO.js → chunk-7HYFN4JO.js} +1 -1
  36. package/build/js/chunks/{chunk-O7QIRKOP.js → chunk-7OFC24NE.js} +1 -1
  37. package/build/js/chunks/chunk-AAEQZ45T.js +1 -0
  38. package/build/js/chunks/chunk-BD2C4EUH.js +1 -0
  39. package/build/js/chunks/chunk-CAUB35PV.js +1 -0
  40. package/build/js/chunks/chunk-CGZTKEVQ.js +1 -0
  41. package/build/js/chunks/chunk-CMOH3SZ2.js +1 -0
  42. package/build/js/chunks/chunk-DGIQ3GF7.js +1 -0
  43. package/build/js/chunks/chunk-DJSMVDVM.js +1 -0
  44. package/build/js/chunks/chunk-DN32UPQC.js +1 -0
  45. package/build/js/chunks/chunk-EMLXDXWN.js +1 -0
  46. package/build/js/chunks/chunk-GQ7A6533.js +1 -0
  47. package/build/js/chunks/chunk-HBRR74H7.js +1 -0
  48. package/build/js/chunks/chunk-HQFHOI5U.js +1 -0
  49. package/build/js/chunks/chunk-JIGCOX5J.js +1 -0
  50. package/build/js/chunks/chunk-K57UYTCR.js +6 -0
  51. package/build/js/chunks/chunk-KE4OXEHM.js +1 -0
  52. package/build/js/chunks/{chunk-4F5JUHOJ.js → chunk-KSCFPJAW.js} +1 -1
  53. package/build/js/chunks/{chunk-W6HSMZGZ.js → chunk-KVRNF3VA.js} +1 -1
  54. package/build/js/chunks/chunk-KXAJHLEO.js +1 -0
  55. package/build/js/chunks/chunk-M73IKBDO.js +1 -0
  56. package/build/js/chunks/{chunk-C657OBED.js → chunk-MKOAX27U.js} +1 -1
  57. package/build/js/chunks/{chunk-Q45KFJIS.js → chunk-MUUHAY6N.js} +1 -1
  58. package/build/js/chunks/{chunk-24IG7HUA.js → chunk-O4HDBWKK.js} +1 -1
  59. package/build/js/chunks/chunk-O7EM4VIM.js +1 -0
  60. package/build/js/chunks/chunk-PJDP6LOG.js +35 -0
  61. package/build/js/chunks/chunk-PM5CNTBV.js +1 -0
  62. package/build/js/chunks/chunk-QFSNPY5Y.js +1 -0
  63. package/build/js/chunks/{chunk-3LVMEVOI.js → chunk-QIWPWOQG.js} +1 -1
  64. package/build/js/chunks/{chunk-BIJB4K7G.js → chunk-QUWP3ILW.js} +1 -1
  65. package/build/js/chunks/{chunk-AFCJ24Y3.js → chunk-QYTZLT3L.js} +1 -1
  66. package/build/js/chunks/{chunk-D6JKW7G4.js → chunk-RP4YFAF2.js} +1 -1
  67. package/build/js/chunks/{chunk-BGUY24J4.js → chunk-RZ45ODIK.js} +1 -1
  68. package/build/js/chunks/{chunk-457L5N2F.js → chunk-SAMF6XBX.js} +1 -1
  69. package/build/js/chunks/{chunk-BFLBICOJ.js → chunk-TGOZ2BNY.js} +1 -1
  70. package/build/js/chunks/chunk-TTGJAMI2.js +1 -0
  71. package/build/js/chunks/{chunk-523EQN4Z.js → chunk-U7ETOWGJ.js} +1 -1
  72. package/build/js/chunks/{chunk-L7WVCDGR.js → chunk-UB4YB6TK.js} +1 -1
  73. package/build/js/chunks/chunk-UWVAZAFS.js +2 -0
  74. package/build/js/chunks/{chunk-RHMGLXJ3.js → chunk-V2OKMBZD.js} +1 -1
  75. package/build/js/chunks/{chunk-TXVFFRVY.js → chunk-VJ7ZYB4V.js} +1 -1
  76. package/build/js/chunks/chunk-VSROWPI6.js +1 -0
  77. package/build/js/chunks/chunk-W33RVR5M.js +1 -0
  78. package/build/js/chunks/chunk-X3GOCLVQ.js +1 -0
  79. package/build/js/chunks/{chunk-4JH6EEAE.js → chunk-XIAF6V7E.js} +1 -1
  80. package/build/js/chunks/{chunk-LORGLY2X.js → chunk-YE2GYNRP.js} +1 -1
  81. package/build/js/controls/CameraFOVSwitchControl.d.ts +8 -8
  82. package/build/js/controls/CameraFOVSwitchControl.js +1 -1
  83. package/build/js/controls/CameraSwitchControl.d.ts +8 -8
  84. package/build/js/controls/CameraSwitchControl.js +1 -1
  85. package/build/js/controls/TorchSwitchControl.d.ts +8 -8
  86. package/build/js/controls/TorchSwitchControl.js +1 -1
  87. package/build/js/controls/common.d.ts +8 -8
  88. package/build/js/controls/index.d.ts +8 -8
  89. package/build/js/controls/index.js +1 -1
  90. package/build/js/defaults/DefaultsCamera.d.ts +30 -0
  91. package/build/js/defaults/DefaultsDataCaptureView.js +1 -1
  92. package/build/js/index.d.ts +15 -15
  93. package/build/js/index.js +1 -1
  94. package/build/js/moduleLoader.d.ts +8 -8
  95. package/build/js/private/CameraAccess.js +1 -1
  96. package/build/js/private/CameraManager.d.ts +10 -10
  97. package/build/js/private/CameraManager.js +1 -1
  98. package/build/js/private/CameraPool.d.ts +7 -7
  99. package/build/js/private/CanvasDrawer.d.ts +1 -1
  100. package/build/js/private/CanvasDrawer.js +1 -1
  101. package/build/js/private/CanvasDrawerWithMetrics.d.ts +21 -13
  102. package/build/js/private/CanvasDrawerWithMetrics.js +1 -1
  103. package/build/js/private/CoreModuleLicenseTextProvider.d.ts +8 -8
  104. package/build/js/private/CoreModuleLicenseTextProvider.js +1 -1
  105. package/build/js/private/CustomLocationsView.js +1 -1
  106. package/build/js/private/DataCaptureContextRelated.d.ts +8 -8
  107. package/build/js/private/FrameReaders/FrameReader.d.ts +8 -8
  108. package/build/js/private/FrameReaders/FrameReader.js +1 -1
  109. package/build/js/private/FrameReaders/FrameReaderAbstract.d.ts +8 -8
  110. package/build/js/private/FrameReaders/GrayScaleFrameReader.d.ts +8 -8
  111. package/build/js/private/FrameReaders/GrayScaleFrameReader.js +1 -1
  112. package/build/js/private/FrameReaders/index.d.ts +8 -8
  113. package/build/js/private/FrameReaders/index.js +1 -1
  114. package/build/js/private/GestureRecognizer/GestureRecognizer.js +1 -1
  115. package/build/js/private/GestureRecognizer/PointerEventsDetector.d.ts +1 -1
  116. package/build/js/private/GestureRecognizer/PointerEventsDetector.js +1 -1
  117. package/build/js/private/GestureRecognizer/index.js +1 -1
  118. package/build/js/private/ImageConverterBase.d.ts +2 -1
  119. package/build/js/private/ImageConverterBase.js +1 -1
  120. package/build/js/private/ImageConverterMainThread.js +1 -1
  121. package/build/js/private/NormalizedModuleLoaderOptions.d.ts +8 -8
  122. package/build/js/private/OrientationObserver.js +1 -1
  123. package/build/js/private/SingleImageUploaderView.d.ts +35 -0
  124. package/build/js/private/SingleImageUploaderView.js +1 -1
  125. package/build/js/private/ViewControls+related.js +1 -1
  126. package/build/js/private/ViewControls_related.d.ts +8 -8
  127. package/build/js/private/ViewsRegistry.d.ts +8 -8
  128. package/build/js/private/djinni-types/index.d.ts +10 -1
  129. package/build/js/private/djinni-types/index.js +1 -1
  130. package/build/js/private/hybridDesktopPlatformHelpers.js +1 -1
  131. package/build/js/private/ui/atoms/AimerSvgIcon.js +1 -1
  132. package/build/js/private/ui/atoms/ArrowDownSvgIcon.js +1 -1
  133. package/build/js/private/ui/atoms/ArrowLeftSvgIcon.js +1 -1
  134. package/build/js/private/ui/atoms/ArrowRightSvgIcon.js +1 -1
  135. package/build/js/private/ui/atoms/ArrowUpSvgIcon.js +1 -1
  136. package/build/js/private/ui/atoms/ArrowsUp.js +1 -1
  137. package/build/js/private/ui/atoms/Backdrop.d.ts +1 -1
  138. package/build/js/private/ui/atoms/Backdrop.js +1 -1
  139. package/build/js/private/ui/atoms/CalendarExclamationMarkSvgIcon.js +1 -1
  140. package/build/js/private/ui/atoms/CameraFOVUltrawideSvgIcon.js +1 -1
  141. package/build/js/private/ui/atoms/CameraFOVWideSvgIcon.js +1 -1
  142. package/build/js/private/ui/atoms/CameraSwitchReverseSvgIcon.js +1 -1
  143. package/build/js/private/ui/atoms/CameraSwitchSvgIcon.js +1 -1
  144. package/build/js/private/ui/atoms/Card.js +1 -1
  145. package/build/js/private/ui/atoms/CardList.js +1 -1
  146. package/build/js/private/ui/atoms/CheckSvgIcon.js +1 -1
  147. package/build/js/private/ui/atoms/ChevronDownSvgIcon.js +1 -1
  148. package/build/js/private/ui/atoms/ChevronLeftSvgIcon.js +1 -1
  149. package/build/js/private/ui/atoms/ChevronRightSvgIcon.js +1 -1
  150. package/build/js/private/ui/atoms/ChevronUpSvgIcon.js +1 -1
  151. package/build/js/private/ui/atoms/CrossSvgIcon.js +1 -1
  152. package/build/js/private/ui/atoms/DeleteSvgIcon.js +1 -1
  153. package/build/js/private/ui/atoms/Dot5xSvgIcon.js +1 -1
  154. package/build/js/private/ui/atoms/ExclamationMarkSvgIcon.js +1 -1
  155. package/build/js/private/ui/atoms/GlassSvgIcon.d.ts +1 -1
  156. package/build/js/private/ui/atoms/GlassSvgIcon.js +1 -1
  157. package/build/js/private/ui/atoms/HandLensCheckSvgIcon.js +1 -1
  158. package/build/js/private/ui/atoms/KeyboardSvgIcon.js +1 -1
  159. package/build/js/private/ui/atoms/LowStockSvgIcon.js +1 -1
  160. package/build/js/private/ui/atoms/OnexSvgIcon.js +1 -1
  161. package/build/js/private/ui/atoms/PauseSvgIcon.d.ts +17 -0
  162. package/build/js/private/ui/atoms/PauseSvgIcon.js +1 -0
  163. package/build/js/private/ui/atoms/PrinterSvgIcon.js +1 -1
  164. package/build/js/private/ui/atoms/ProgressBar.js +1 -1
  165. package/build/js/private/ui/atoms/QuestionMarkSvgIcon.d.ts +1 -1
  166. package/build/js/private/ui/atoms/QuestionMarkSvgIcon.js +1 -1
  167. package/build/js/private/ui/atoms/RestartSvgIcon.js +1 -1
  168. package/build/js/private/ui/atoms/RoundedCheckSvgIcon.js +1 -1
  169. package/build/js/private/ui/atoms/RoundedCrossSvgIcon.js +1 -1
  170. package/build/js/private/ui/atoms/RoundedExclamationMarkSvgIcon.js +1 -1
  171. package/build/js/private/ui/atoms/ScanSvgIcon.d.ts +17 -0
  172. package/build/js/private/ui/atoms/ScanSvgIcon.js +1 -0
  173. package/build/js/private/ui/atoms/ShutterButton.js +1 -1
  174. package/build/js/private/ui/atoms/SlashSvgIcon.js +1 -1
  175. package/build/js/private/ui/atoms/StarFilledSvgIcon.js +1 -1
  176. package/build/js/private/ui/atoms/StarHalfFilledSvgIcon.js +1 -1
  177. package/build/js/private/ui/atoms/StarOutlinedSvgIcon.js +1 -1
  178. package/build/js/private/ui/atoms/SvgIcon.d.ts +1 -0
  179. package/build/js/private/ui/atoms/SvgIcon.js +1 -1
  180. package/build/js/private/ui/atoms/ToPickSvgIcon.js +1 -1
  181. package/build/js/private/ui/atoms/Toast.d.ts +9 -14
  182. package/build/js/private/ui/atoms/Toast.js +1 -1
  183. package/build/js/private/ui/atoms/TorchOffSvgIcon.js +1 -1
  184. package/build/js/private/ui/atoms/TorchOnSvgIcon.js +1 -1
  185. package/build/js/private/ui/atoms/TwoxSvgIcon.js +1 -1
  186. package/build/js/private/ui/atoms/WrongItemSvgIcon.js +1 -1
  187. package/build/js/private/ui/colors.d.ts +5 -1
  188. package/build/js/private/ui/colors.js +1 -1
  189. package/build/js/private/ui/molecules/CameraFOVSwitchButton.js +1 -1
  190. package/build/js/private/ui/molecules/CameraSwitchButton.js +1 -1
  191. package/build/js/private/ui/molecules/ControlsLayout.js +1 -1
  192. package/build/js/private/ui/molecules/HintPresenter.d.ts +7 -7
  193. package/build/js/private/ui/molecules/HintPresenter.js +1 -1
  194. package/build/js/private/ui/molecules/LoadingOverlay.js +1 -1
  195. package/build/js/private/ui/molecules/TorchSwitchIconButton.js +1 -1
  196. package/build/js/private/utils/cookieStore.d.ts +18 -0
  197. package/build/js/private/utils/cookieStore.js +1 -0
  198. package/build/js/private/utils/cookieStorePolyfill.d.ts +43 -0
  199. package/build/js/private/utils/cookieStorePolyfill.js +1 -0
  200. package/build/js/private/utils/fromGrayScaleToRgba.d.ts +12 -0
  201. package/build/js/private/utils/fromGrayScaleToRgba.js +1 -0
  202. package/build/js/private/utils/getTimestamp.d.ts +9 -0
  203. package/build/js/private/utils/getTimestamp.js +1 -0
  204. package/build/js/private/utils/globalThisPolyfill.d.ts +2 -2
  205. package/build/js/private/utils/globalThisPolyfill.js +1 -1
  206. package/build/js/private/utils/index.js +1 -1
  207. package/build/js/private/utils/polyfillLoader.d.ts +2 -0
  208. package/build/js/private/utils/polyfillLoader.js +1 -1
  209. package/build/js/private/utils/replaceImagesInViewUtils.d.ts +8 -8
  210. package/build/js/private/utils/safeStorage.d.ts +4 -3
  211. package/build/js/private/utils/safeStorage.js +1 -1
  212. package/build/js/private/utils/warnMultithreadingUnavailable.js +1 -1
  213. package/build/js/worker/ImageConverterForwarder.d.ts +10 -9
  214. package/build/js/worker/ImageConverterForwarder.js +1 -1
  215. package/build/js/worker/ImageConverterWorker.js +1 -1
  216. package/build/js/worker/ViewInfoHelper.d.ts +47 -0
  217. package/build/js/worker/ViewInfoHelper.js +1 -0
  218. package/build/js/worker/WorkerMain.d.ts +8 -8
  219. package/build/js/worker/WorkerMain.js +1 -1
  220. package/build/js/worker/coreCapture.inlineWorker.d.ts +8 -8
  221. package/build/js/worker/coreCapture.inlineWorker.js +1 -1
  222. package/build/js/worker/dataCaptureEngine.d.ts +7 -7
  223. package/build/js/worker/dataCaptureEngine.js +1 -1
  224. package/build/js/worker/dataCaptureLoader.d.ts +9 -9
  225. package/build/js/worker/dataCaptureLoader.js +1 -1
  226. package/build/js/worker/dataCaptureWorkerRelated.d.ts +7 -7
  227. package/build/js/worker/helperFs.js +1 -1
  228. package/build/js/worker/index.d.ts +8 -8
  229. package/build/js/worker/index.js +1 -1
  230. package/package.json +4 -6
  231. package/build/js/chunks/chunk-4GKVQAVF.js +0 -1
  232. package/build/js/chunks/chunk-4ZAHOKYN.js +0 -1
  233. package/build/js/chunks/chunk-5C4OO6CX.js +0 -35
  234. package/build/js/chunks/chunk-5IGOKD23.js +0 -1
  235. package/build/js/chunks/chunk-5JAPQHXF.js +0 -1
  236. package/build/js/chunks/chunk-ADFFBLII.js +0 -1
  237. package/build/js/chunks/chunk-ATTDETQP.js +0 -0
  238. package/build/js/chunks/chunk-AWPUSRYW.js +0 -1
  239. package/build/js/chunks/chunk-BG2MAWWN.js +0 -1
  240. package/build/js/chunks/chunk-C3EY6I75.js +0 -2
  241. package/build/js/chunks/chunk-DMOXDUF6.js +0 -1
  242. package/build/js/chunks/chunk-DQ2IFWM5.js +0 -1
  243. package/build/js/chunks/chunk-DZKZ6RMW.js +0 -1
  244. package/build/js/chunks/chunk-F2IJCZAS.js +0 -1
  245. package/build/js/chunks/chunk-F6TT5US7.js +0 -1
  246. package/build/js/chunks/chunk-GHDJPETZ.js +0 -1
  247. package/build/js/chunks/chunk-MBL5Q2H2.js +0 -1
  248. package/build/js/chunks/chunk-MKTACV3Q.js +0 -1
  249. package/build/js/chunks/chunk-NDQQHCZN.js +0 -1
  250. package/build/js/chunks/chunk-PA2BMEFD.js +0 -1
  251. package/build/js/chunks/chunk-R4KME2DS.js +0 -6
  252. package/build/js/chunks/chunk-SOCEWYYO.js +0 -1
  253. package/build/js/chunks/chunk-SVJ6BU5X.js +0 -1
  254. package/build/js/chunks/chunk-TU44BW74.js +0 -1
  255. package/build/js/chunks/chunk-V6RG452U.js +0 -1
  256. package/build/js/chunks/chunk-VBUDN72N.js +0 -2
  257. package/build/js/chunks/chunk-WL2XKPJD.js +0 -1
  258. package/build/js/chunks/chunk-X4LJRWLI.js +0 -1
  259. package/build/js/chunks/chunk-XINFYUZW.js +0 -1
  260. package/build/js/chunks/chunk-YRQ34YNY.js +0 -1
  261. package/build/js/chunks/chunk-ZEBGTTCX.js +0 -1
  262. /package/build/js/chunks/{chunk-3CXYB36D.js → chunk-6XU4Z34Q.js} +0 -0
@@ -1 +0,0 @@
1
- import {a as a$6}from'./chunk-4ZAHOKYN.js';import {a as a$7}from'./chunk-G2BRTVN7.js';import {c as c$1,a as a$8}from'./chunk-4W2T3TLN.js';import {c}from'./chunk-UWLAKRB2.js';import {a}from'./chunk-F6TT5US7.js';import {a as a$1}from'./chunk-3LVMEVOI.js';import {a as a$4}from'./chunk-X4LJRWLI.js';import {d}from'./chunk-AIC4H5KG.js';import {a as a$3}from'./chunk-O7TZTIHO.js';import {a as a$2}from'./chunk-XR65N6EG.js';import {a as a$5}from'./chunk-QCZSSQAQ.js';var D=class D{constructor(e,t){this.hintPresenterV2=null;this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL=10;this.redrawInterval=1e3/30;this.redrawRequests=[];this._isDrawLoopRunning=false;this.frameDataPool=new Map;this.lastFrameColorType="RGBA";this.lastFrameCounter=-1;this.poorMansBenchmarkLogs=false;this.writableDataPathStandard="/scandit_sync_folder";this.resourceFilesSubfolder="resources";this.performanceMetricsReporterTimer=void 0;this.performanceMetrics={frameDataPoolSize:0,processedFramesCount:0,redrawRequestsCount:0,actualRedrawsCount:0};this.gestureListener=null;this.webPlatformHintPresenter=null;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}convertToLoadableFrameData(e){let t=this.getNextFrameId();this.frameDataPool.set(t,{data:new Uint8ClampedArray(e.getFrameData()),colorType:this.lastFrameColorType});let s=this.lastUsedModuleMirrorAxis==null?false:this.lastUsedModuleMirrorAxis!==this.Module.Axis.None;return {frameId:t,width:e.getWidth(),height:e.getHeight(),isFrameSourceMirrored:s,colorType:this.lastFrameColorType}}createContext(e){var h,b,g,w,C;let t=this.getModeDeserializers(),s=c$1(location);(s==="localhost"||s==="127.0.0.1")&&navigator.userAgent.includes("Electron")&&e.appName!=null&&(s+=`-${e.appName}`),this.parentDomain=e.parentDomain,this.contextDeserializer=new this.Module.DataCaptureContextDeserializer(this.writableDataPath,e.deviceId,e.context.deviceModelName,s,this.parentDomain,t,e.delayedRegistration,e.highEndBlurryRecognition,this.resourcePath);let a=this.contextDeserializer.contextFromJson(JSON.stringify(e.context));if(a==null){let r=this.contextDeserializer.getLastError();throw new Error(`Could not create the context: ${r}`)}let n=a.getView();this.context=a.getContext(),a.delete();let l=this.Module.DataCaptureContextListener.extend("DataCaptureContextListener",{didChangeStatus:(r,o)=>{this.contextDidChangeStatus(JSON.parse(o.toJson())),r.delete();},didStartObservingContext:r=>{this.didStartObservingContext(),r.delete();},didStopObservingContext:r=>{r.delete();}}),u=this.Module.DataCaptureContextFrameListener.extend("DataCaptureContextFrameListener",{onObservationStarted:r=>{r.delete();},onObservationStopped:r=>{r.delete();},onFrameProcessingStarted:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingStarted"}),o.delete(),r.delete();},onFrameProcessingFinished:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingFinished"}),o.delete(),r.delete();},onFrameSkipped:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameSkipped"}),o.delete(),r.delete();}}),m=this.Module.GestureRecognizer.extend("GestureRecognizer",{setGestureListener:(r,o)=>{var y;(y=this.gestureListener)==null||y.delete(),this.gestureListener=r.clone(),r.delete();}});(h=this.gestureRecognizer)==null||h.delete(),this.gestureRecognizer=new m;let c=new l;this.context.addListener(c),c.delete();let p=new u;this.context.addFrameListener(p),p.delete(),this.setView(n),(b=this.view)==null||b.setGestureRecognizer(this.gestureRecognizer);let f=this.Module.PlatformHintPresenter.extend("PlatformHintPresenter",{setHintPresenter:r=>{r.delete();},showToast:r=>{this.workerFunctions.postMessage({type:"showToast",payload:JSON.parse(r)});},hideToast:r=>{this.workerFunctions.postMessage({type:"hideToast",payload:JSON.parse(r)});},showGuidance:r=>{this.workerFunctions.postMessage({type:"showGuidance",payload:JSON.parse(r)});},hideGuidance:r=>{this.workerFunctions.postMessage({type:"hideGuidance",payload:JSON.parse(r)});},startUpdateTimer:r=>{this.workerFunctions.postMessage({type:"startUpdateTimer",payload:{duration:{unit:"ms",value:r}}});},stopUpdateTimer:()=>{this.workerFunctions.postMessage({type:"stopUpdateTimer"});}});(g=this.hintPresenterV2)==null||g.delete(),this.hintPresenterV2=null,(w=this.webPlatformHintPresenter)==null||w.delete(),this.webPlatformHintPresenter=null,this.webPlatformHintPresenter=new f,this.view&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter),(C=this.view)==null||C.setHintPresenterV2(this.hintPresenterV2)),this.webImageConverterInstance=this.getImageConverterInstance({quality:1}),this.Module.ImageConverter.setInstance(this.webImageConverterInstance);}convertToJPEGResult(e,t){this.webImageConverterInstance instanceof a&&this.webImageConverterInstance.onConvertToJPEGResult(e,t);}getImageConverterInstance(e){return this.workerFunctions.getOffscreenCanvas()!=null?new a$1(e):new a(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.performanceMetricsReporterTimer=setInterval(()=>{this.reportPerformanceMetrics();for(let e of Object.keys(this.performanceMetrics))this.performanceMetrics[e]=0;},1e3));}async reportPerformanceMetrics(){this.workerFunctions.postMessage({type:"performanceMetricsReport",payload:{...this.performanceMetrics}});}deleteFrameData(e){this.frameDataPool.delete(e);}dispose(){var e,t,s,a;this.context.dispose(),this.frameDataPool.clear(),this.isDrawLoopRunning=false,this.lastFrameCounter=-1,(e=this.gestureRecognizer)==null||e.delete(),this.gestureRecognizer=null,(t=this.gestureListener)==null||t.delete(),this.gestureListener=null,(s=this.hintPresenterV2)==null||s.delete(),this.hintPresenterV2=null,(a=this.webPlatformHintPresenter)==null||a.delete(),this.webPlatformHintPresenter=null;}flushAnalytics(){this.context.flushAnalytics();}extractCentaurusLicense(e){return {payload:{centaurus:{licenseKey:this.Module.LicenseUtils[D.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 {payload:e,transferables:[e.data.buffer]};let t=e.data,s=e.colorType==="GRAYSCALE"?this.Module.ImageBufferFormat.Grayscale8:this.Module.ImageBufferFormat.Rgba8888;this.lastFrameColorType=e.colorType==="GRAYSCALE"?"GRAYSCALE":"RGBA";let a=this.Module.allocateUint8Array(t.byteLength);return this.Module.HEAPU8.set(t,a),(n=this.imageFrameSource)==null||n.outputFrame(a,e.width,e.height,s),{payload:e,transferables:[e.data.buffer]}}reportCameraProperties(e){this.context.setCameraProperties(e.deviceId,e.isFrontFacing,e.hasAutofocus);}requestFrameData(e){var a;let{data:t,colorType:s}=(a=this.frameDataPool.get(e))!=null?a:{data:null,colorType:null};return t==null?{payload:{data:null,colorType:null}}:{payload:{data:t,colorType:s},transferables:[t.buffer]}}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 s;this.lastUsedModuleMirrorAxis=this.mapMirrorAxisOnModule(e),(s=this.imageFrameSource)==null||s.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,s=n=>{for(;this.redrawRequests.length>0&&this.redrawRequests[0]<=n;)this.redrawRequests.shift();},a=()=>{this.loopTimeoutId=setTimeout(()=>{if(!this.isDrawLoopRunning)return;let n=performance.now();if(t(n)){s(n),e.draw();let l=e.getDrawCommands();this.sendViewRefreshCommands(new Uint8Array(l));}a();},this.redrawInterval);};a();}updateContext(e){if(this.context!=null&&this.contextDeserializer!=null){e.view!=null&&!e.view.visible&&this.context.flushAnalytics();let t=this.onBeforeUpdateContextHook(e),s=this.contextDeserializer.updateContextFromJson(this.context,this.view,JSON.stringify(t.context));if(s==null){let n=this.contextDeserializer.getLastError();throw new Error(`Could not update the context: ${n}`)}this.context.delete(),this.context=s.getContext();let a=s.getView();s.delete(),a!=null&&t.view!=null&&a.setViewSize(t.view.width,t.view.height,t.view.orientation),!this.hintPresenterV2&&this.webPlatformHintPresenter&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter)),a!=null&&this.hintPresenterV2&&a.setHintPresenterV2(this.hintPresenterV2),this.gestureRecognizer!=null&&(a==null||a.setGestureRecognizer(this.gestureRecognizer)),this.setView(a),a$2.debug("context updated",t);}}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()}}}getNextFrameId(){return this.lastFrameCounter++,this.lastFrameCounter>=this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL&&(this.lastFrameCounter=0),this.lastFrameCounter}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,s)=>t-s);}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$2.warn("addNativeOverlay has not been implemented for this module",e);}removeNativeOverlay(e){a$2.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)}),s=new t;e.setNeedsRedrawDelegate(s),e.isViewRefreshHandlerSet=true;}setupDataDecoding(){let e=this.moduleHandler.get(),t=e.DataDecoding.extend("DataDecoding",{decode(s,a){try{let n=JSON.parse(a),l=[];for(let u of n){let m=new TextDecoder(u.ianaName,{fatal:true});l.push(m.decode(s.slice(u.startIndex,u.endIndex)));}return l.join("")}catch{return ""}}});e.setDataDecoding(new t);}start(e,t,s){e&&t&&(this.setupDataDecoding(),this.moduleHandler.get().callMain(),this.moduleHandler.get().__emscripten_proxy_main!==void 0||s());}getWritableDataPath(e){return e!=null?(a$2.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:s,verifyResponseHash:a,referredOrigin:n,fixedWasmMemory:l,simdSupport:u,threadsSupport:m}){var v;let c=false,p=false;this.writableDataPath=this.getWritableDataPath(s),this.resourcePath=`${e}${this.resourceFilesSubfolder}/`,globalThis.path=t;let{resolve:f,reject:h,promise:b}=new a$3,g=a$4.sdkVersion();if(g==="")throw new a$5({name:"Invalid library version",message:"Library version is not defined or empty, cannot generate proper path to library files."});let w=this.getWasmCoreFileName(u,m),C=d(g,e,w),{jsURI:r,wasmURI:o}=C,y={instantiateWasm:(d,O)=>(a$8({importObject:d,wasmURI:o,expectedHash:this.getWasmCoreExpectedHash(u,m),verifyResponseHash:a,successCallback:O,progressCallback:this._loadProgressCallback,errorCallback:W=>{h(W);},referredOrigin:n}),{})},M=l===null?null:new WebAssembly.Memory({initial:this.numOfMBToPages(l),maximum:this.numOfMBToPages(300),shared:m});return M!==null&&a$2.log(a$2.Level.Debug,"Fixed wasmMemory set",M),this.moduleHandler.set({...M?{wasmMemory:M}:{},mainScriptUrlOrBlob:r,canvas:(v=this.workerFunctions.getOffscreenCanvas())!=null?v:{getContext:()=>null},...y,dynamicLibraries:this.getWasmDynamicLibraries(o),locateFile:d=>e+d,noInitialRun:true,preRun:[async()=>{try{await a$6({writableDataPath:this.writableDataPath});}catch(d){if(d.name==="BlockedIndexedDB"){h(d.toString());return}a$2.log(a$2.Level.Debug,"No IndexedDB support, some data will not be persisted:",d);}p=true,this.start(p,c,f);}],onMainComplete:()=>{if([c,p].includes(false)){a$2.log(a$2.Level.Warn,{runtimeLoaded:c,fileSystemSynced:p},"Both runtimeLoaded and fileSystemSynced should be true when calling onMainComplete"),h("onMainComplete has been called but runtime or file system was not ready.");return}f();},onRuntimeInitialized:()=>{c=true,this.start(p,c,f);},print:d=>{a$2.log(a$2.Level.Info,d);}}),await a$7(r,g)||h(`Couldn't retrieve Scandit Data Capture library at ${r}, did you configure the path for it correctly?`),b}};D.get3dPartyLicenseKeyMethodName=atob("Z2V0QmxpbmtJZExpY2Vuc2VLZXk=");var k=D;export{k as a};
@@ -1 +0,0 @@
1
- import {a}from'./chunk-NQF3GUK2.js';import {a as a$2}from'./chunk-QHBIT2WY.js';import {a as a$1}from'./chunk-XR65N6EG.js';var n=class extends a{constructor(){super(...arguments);this.colorType="RGBA";}get _initialized(){return this._texture!=null&&this._framebuffer!=null}readFromSource(e){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,e),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,colorType:this.colorType}}setup(){this._texture=this._contextWebGL.createTexture(),this._texture==null&&a$1.log(a$1.Level.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.log(a$1.Level.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 e;this._texture!=null&&(this._contextWebGL.deleteTexture(this._texture),this._texture=null),this._framebuffer!=null&&(this._contextWebGL.deleteFramebuffer(this._framebuffer),this._framebuffer=null),(e=this._framePool)==null||e.empty();}updateFrameSizeIfNeeded(){var o;let{drawingBufferWidth:e,drawingBufferHeight:i}=this._contextWebGL,r=e*i*4;this._frameSize!==r&&(this._frameSize=r,(o=this._framePool)==null||o.empty(),this._framePool=new a$2({capacity:this._maxPoolCapacity,lowWaterMark:this._minPoolCapacity,createItem:()=>new Uint8ClampedArray(this._frameSize)}));}};export{n as a};
@@ -1 +0,0 @@
1
- import {a}from'./chunk-5JAPQHXF.js';import {a as a$1}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-UWBNF47P.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(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 t=e;t.register();export{t as a};
@@ -1 +0,0 @@
1
- import {a as a$1}from'./chunk-O7TZTIHO.js';import {a as a$2}from'./chunk-XR65N6EG.js';var a=class{constructor(e,t){this.workerFunctions=e;this.options=t;this.imageIdCounter=0;this.conversions=new Map;}convertToJpeg(e,t){let r=this.imageIdCounter++,n=new a$1;this.conversions.set(r,n);let o=e.toBitmap();return this.workerFunctions.postMessage({type:"convertToJPEG",imageId:r,width:e.getWidth(),height:e.getHeight(),data:o,planes:e.getPlanes(),orientation:t,quality:this.options.quality},Array.from(new Set([o.buffer]))),n.promise}onConvertToJPEGResult(e,t){let r=this.conversions.get(e);r?(r.resolve(t),this.conversions.delete(e)):a$2.warn(`ImageConverterForwarder: Conversion for imageId ${e} not found in Map`);}};export{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")}}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
- import {b}from'./chunk-MKTACV3Q.js';import {a}from'./chunk-XR65N6EG.js';var d=class p{constructor(e){this.workerCommandId=1;this.workerTasks=new Map;this.workerListeners=[];var r;this.libraryLocation=e.libraryLocation,this.workerMessageListener=this.onWorkerMessage.bind(this),this.dataCaptureWorker.addEventListener("message",this.workerMessageListener),this.verifyResponseHash=e.verifyResponseHash,this.highEndBlurryRecognition=(r=e.highEndBlurryRecognition)!=null?r:false,this.simdSupport=e.simdSupport,this.threadsSupport=e.threadsSupport,typeof e.loadProgressNotifier=="function"&&this.addWorkerListener(a=>{var o;a.type==="loadLibraryProgress"&&((o=e.loadProgressNotifier)==null||o.call(e,a.payload));});}get dataCaptureWorker(){return (this._dataCaptureWorker)!=null||(this._dataCaptureWorker=(void 0)),this._dataCaptureWorker}get name(){return "CoreLoader"}get fixedWasmMemory(){return null}static async create(e){var a$1;let r=new p(e);return await r.workerCommand("setLogLevel",{level:(a$1=e.logLevel)!=null?a$1:a.Level.Debug}),await r.load(),r}async load(){var e;try{await this.workerCommand("loadLibrary",{libraryLocation:this.libraryLocation,locationPath:window.location.pathname,referredOrigin:window.location.origin,writableDataPathOverride:(e=b.getItem("scanditWritableDataPathOverride"))!=null?e:void 0,verifyResponseHash:this.verifyResponseHash,fixedWasmMemory:this.fixedWasmMemory,simdSupport:this.simdSupport,threadsSupport:this.threadsSupport});}catch(r){if(r!=null&&typeof r=="object"&&typeof r.error=="string"&&r.error.includes("BlockedIndexedDB"))return await this.terminateDataCaptureWorker(false),this.dataCaptureWorker.addEventListener("message",this.workerMessageListener),b.setItem("scanditWritableDataPathOverride",`/scandit_sync_folder_${[...crypto.getRandomValues(new Uint32Array(2))].map(a=>a.toString(32)).join("")}`),this.load();throw r}}async workerCommand(e,r,a){return new Promise((o,s)=>{let t=this.workerCommandId++;this.workerTasks.set(t,{resolve:o,reject:s,command:e});let l={...r,command:e,id:t};this.dataCaptureWorker.postMessage(l,a);})}async terminateDataCaptureWorker(e=true){var r,a;e&&await this.workerCommand("dispose",{}),(r=this._dataCaptureWorker)==null||r.removeEventListener("message",this.workerMessageListener),(a=this._dataCaptureWorker)==null||a.terminate(),this._dataCaptureWorker=void 0;}addWorkerListener(e){this.workerListeners.push(e);}removeWorkerListener(e){this.workerListeners.includes(e)&&this.workerListeners.splice(this.workerListeners.indexOf(e),1);}getOptions(){return {libraryLocation:this.libraryLocation,simdSupport:this.simdSupport,threadsSupport:this.threadsSupport,verifyResponseHash:this.verifyResponseHash}}onWorkerMessage(e){let r=e.data;if(r.type==="workerTaskId"&&typeof r.id=="number"){let{id:a,error:o,payload:s}=r,t=this.workerTasks.get(a);o==null?t==null||t.resolve(s):t==null||t.reject(r),this.workerTasks.delete(a);}else for(let a of this.workerListeners)a(r);}};export{d as a};
@@ -1 +0,0 @@
1
- import {a}from'./chunk-XR65N6EG.js';var s=class o{constructor(e){this.memoryFallback=new Map;o.isStorageTypeSupported(e)?(this.storage=e==="localStorage"?globalThis.localStorage:globalThis.sessionStorage,this.isSupported=true):(this.isSupported=false,a.debug(`Failed to access ${e}. Fallback to memory storage.`));}get length(){return this.storage?this.storage.length:this.memoryFallback.size}static isStorageTypeSupported(e){try{return e==="localStorage"?globalThis.localStorage.setItem("test","test"):globalThis.sessionStorage.setItem("test","test"),e==="localStorage"?globalThis.localStorage.removeItem("test"):globalThis.sessionStorage.removeItem("test"),true}catch{return false}}key(e){return this.storage?this.storage.key(e):Array.from(this.memoryFallback.keys())[e]}getItem(e){var t;return this.storage?this.storage.getItem(e):(t=this.memoryFallback.get(e))!=null?t:null}setItem(e,t){this.storage?this.storage.setItem(e,t):this.memoryFallback.set(e,t);}removeItem(e){this.storage?this.storage.removeItem(e):this.memoryFallback.delete(e);}clear(){this.storage?this.storage.clear():this.memoryFallback.clear();}},l=new s("localStorage"),i=new s("sessionStorage");export{s as a,l as b,i as c};
@@ -1 +0,0 @@
1
- import {a as a$4}from'./chunk-RHMGLXJ3.js';import {a as a$6}from'./chunk-GHTCNOQN.js';import {a as a$3}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-UWBNF47P.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$5}from'./chunk-LSZZVJ6B.js';var d="scandit-loading-overlay",t=class t extends a$1{constructor(){super();this._progressBar=null;this._label=null;let e=this.attachShadow({mode:"open"});e.innerHTML=a$2`<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 document.createElement(t.tag)}static register(){a$3({[d]:t});}static createStyleElement(){return a$5`@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$4.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$4.tag),this._label=(r=this.shadowRoot)==null?void 0:r.querySelector("label"),this.message=a$6.getInstance().get("core.view.loading");}show(){this.removeAttribute("hidden");}hide(){this.setAttribute("hidden","");}};t.tag=d;var a=t;a.register();export{a};
@@ -1 +0,0 @@
1
- import {a as a$2}from'./chunk-SGL5J2CI.js';import {a as a$3}from'./chunk-3A4KLILV.js';import {a}from'./chunk-UWBNF47P.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$4}from'./chunk-LSZZVJ6B.js';var s=a`<div role="listitem"><slot></slot></div>`,r=class r extends a$1{constructor(){super();let o=this.attachShadow({mode:"open"});o.innerHTML=s,o.append(r.createStyleElement().cloneNode(true));}set haloGlow(o){this.toggleAttribute("halo-glow",o);}get haloGlow(){return this.hasAttribute("halo-glow")}set border(o){this.toggleAttribute("border",o);}get border(){return this.hasAttribute("border")}set backgroundColor(o){this.style.setProperty("--background-color",`#${o.toJSON()}`);}get backgroundColor(){return a$2.fromHex(this.style.getPropertyValue("--background-color"))}set borderColor(o){this.style.setProperty("--border-color",`#${o.toJSON()}`);}get borderColor(){return a$2.fromHex(this.style.getPropertyValue("--border-color"))}static create(){return document.createElement(r.tag)}static register(){a$3({[r.tag]:r});}static createStyleElement(){return a$4`@keyframes gradientShift{0%{background-position-x:100%}50%{background-position-x:0}to{background-position-x:100%}}:host{--corner-radius:0.75rem;--background-color:#ffffffe6;--border-color:#0000;--glow-max-width:1rem;--glow-horizontal-edge:min(5%,var(--glow-max-width));--glow-vertical-edge:min(20%,var(--glow-max-width));--glow-horizontal-start:calc(100% - var(--glow-horizontal-edge));--glow-vertical-start:calc(100% - var(--glow-vertical-edge));--card-min-height:5rem;--card-max-height:100px;backdrop-filter:saturate(180%) blur(20px);background-color:var(--background-color);border:1px solid var(--border-color);border-radius:var(--corner-radius);box-shadow:0 2px 6px 0 #12161926;box-sizing:border-box;display:block;font-family:SF Pro Text,sans-serif;max-height:var(--card-max-height);min-height:var(--card-min-height);min-width:200px;overflow:hidden;position:relative}:host>div[role=listitem]{height:100%;max-height:var(--card-max-height);min-height:var(--card-min-height);position:relative}:host([halo-glow])>div:before{animation:gradientShift 8s ease-in-out .2s infinite;background:linear-gradient(90deg,#ffd89b,#ff6f91 20%,#a566ff 45%,#64f6ff 70%,#ffd89b);background-size:300% 300%;border-radius:var(--corner-radius);content:"";filter:blur(30px);inset:0;mask:linear-gradient(to right,#000 0,#0000 var(--glow-horizontal-edge),#0000 var(--glow-horizontal-start),#000 100%),linear-gradient(to bottom,#000 0,#0000 var(--glow-vertical-edge),#0000 var(--glow-vertical-start),#000 100%);mask-composite:intersect;-webkit-mask:linear-gradient(to right,#000 0,#0000 var(--glow-horizontal-edge),#0000 var(--glow-horizontal-start),#000 100%),linear-gradient(to bottom,#000 0,#0000 var(--glow-vertical-edge),#0000 var(--glow-vertical-start),#000 100%);-webkit-mask-composite:source-over;opacity:1;position:absolute;transition:opacity .3s ease;z-index:0}:host([halo-glow])>div:before{opacity:.75}:host([halo-glow][border])>div:before{opacity:.75!important}:host(:not([halo-glow]))>div:before{animation:none;mask:none;-webkit-mask:none;opacity:0}:host([border]){--border-color:#d92121}:host(:not([border])){--border-color:#0000}`}};r.tag="scandit-basic-card";var e=r;e.register();export{e as a};
@@ -1,6 +0,0 @@
1
- import {a as a$6}from'./chunk-C3EY6I75.js';import {a as a$9,c as c$2,b as b$3}from'./chunk-X2ZGBI4S.js';import {a as a$g}from'./chunk-BA3RP6L2.js';import {a as a$7}from'./chunk-AIC4H5KG.js';import {a as a$e}from'./chunk-4F5JUHOJ.js';import {a as a$c}from'./chunk-JS3T7K2Z.js';import {b as b$2}from'./chunk-6H6FKGVE.js';import {a as a$b}from'./chunk-N5YZEC56.js';import {a as a$5}from'./chunk-VJB527QZ.js';import {a as a$4}from'./chunk-GHTCNOQN.js';import {a as a$1}from'./chunk-LXOZUOZU.js';import {a as a$d}from'./chunk-FGO2SSRS.js';import {d}from'./chunk-ADFFBLII.js';import {a as a$8}from'./chunk-GPJEB376.js';import {b as b$1}from'./chunk-VBUDN72N.js';import {c as c$1,e}from'./chunk-SBC5K7IT.js';import {a as a$3}from'./chunk-XR65N6EG.js';import {f as f$1}from'./chunk-3D2HNEVH.js';import {a as a$f}from'./chunk-WUHKODFA.js';import {a as a$2}from'./chunk-7SW2PEHB.js';import {a as a$a}from'./chunk-QCZSSQAQ.js';import {c}from'./chunk-TR3NGINC.js';var $=[{from:"unconfigured",to:"configuring"},{from:"configuring",to:"configured"},{from:"configuring",to:"unconfigured"},{from:"configured",to:"creating-context"},{from:"creating-context",to:"ready"},{from:"creating-context",to:"unconfigured"},{from:"ready",to:"unconfigured"},{from:"configured",to:"unconfigured"}];function f(C,e,t){let r=t.value;return t.value=function(...n){let i=g.stateMachine;return i.currentState==="ready"&&g.mainDataCaptureLoader!=null?r.apply(this,n):i.isInitializing||i.currentState==="configured"?i.waitForState("ready").then(()=>r.apply(this,n)):Promise.reject(new Error(`Please call DataCaptureContext.forLicenseKey() before calling ${String(e)}`))},t}function j(C){return C[a$g]!=null}function P(C){return "skipSerialization"in C||C[a$g]!=null}var z,B,U,a=class a{constructor(){this._asyncImageConverterInstance=void 0;this.framework="web";this.runtimeEnvironment={deviceOS:(z=b$1.getUserAgentInfo().getOS().name)!=null?z:"",browser:(B=b$1.getUserAgentInfo().getBrowser().name)!=null?B:"",browserVersion:(U=b$1.getUserAgentInfo().getBrowser().version)!=null?U:"",get deviceModelName(){let{model:e,vendor:t}=b$1.getUserAgentInfo().getDevice();return (t==null||t==="")&&(t="Unknown"),(e==null||e==="")&&(e="Unknown"),[t,e].join(" ")}};this.settings=new a$2;this._frameSource=null;this._view=null;this.modes=new Set;this.components=[];this.listeners=[];this.updateListeners=new Set;this.cameraPropertiesReportListener=this.reportCameraProperties.bind(this);this.cameraAccessErrorListener=this.onCameraAccessError.bind(this);this.onWorkerMessageListener=this.onWorkerMessage.bind(this);this.onVisibilityChangeListener=this.onVisibilityChange.bind(this);this.pendingWorkerMessageListeners=new Set;this.delayedRegistration=false;this.highEndBlurryRecognition=false;this._frameHandlers=[];this._useSynchronousFrameFlow=false;}static get moduleLicenseTextProviders(){return [new b]}static get sharedInstance(){return a._sharedInstance==null&&(a._sharedInstance=new a),a._sharedInstance}static get currentState(){return a.stateMachine.currentState}static get isReady(){return a.stateMachine.currentState==="ready"}static get isInitializing(){return a.stateMachine.isInitializing}static addStateListener(e){a.stateMachine.addListener(e);}static removeStateListener(e){a.stateMachine.removeListener(e);}async initializeWithOptions(e){var t,r,n,i,o,s,u,p,c;this.licenseKey=(r=(t=e.licenseKey)!=null?t:a.userLicenseKey)!=null?r:"",this.deviceName=(n=e.deviceName)!=null?n:"",this.dataCaptureInstance=(i=e.dataCaptureInstance)!=null?i:a.mainDataCaptureLoader,this.delayedRegistration=(o=e.delayedRegistration)!=null?o:false,e.settings!=null&&(this.settings=e.settings),this.highEndBlurryRecognition=(c=(p=(s=e.dataCaptureInstance)==null?void 0:s.highEndBlurryRecognition)!=null?p:(u=a.mainDataCaptureLoader)==null?void 0:u.highEndBlurryRecognition)!=null?c:false;for(let S of this.pendingWorkerMessageListeners)this.dataCaptureInstance.addWorkerListener(S);this.pendingWorkerMessageListeners.clear(),this.settings!=null&&await this.applySettings(this.settings),await this.createContext();}get frameSource(){return this._frameSource}get workerCommand(){if(this.dataCaptureInstance==null)throw new Error("Cannot call workerCommand before dataCaptureInstance is set");return this.dataCaptureInstance.workerCommand.bind(this.dataCaptureInstance)}static async forLicenseKey(e,t){return a$3.debug(`forLicenseKey called, current state: ${a.stateMachine.currentState}`),a.stateMachine.currentState==="ready"?(a$3.debug("DataCaptureContext is already ready, returning existing instance"),a.sharedInstance):a.stateMachine.isInitializing?(a$3.debug("DataCaptureContext is already initializing, waiting for completion"),await a.stateMachine.waitForState("ready"),a.sharedInstance):(a.stateMachine.currentState==="unconfigured"&&(a$3.debug("Starting initialization from unconfigured state"),await a.stateMachine.executeAsyncTransition({targetState:"configuring",action:async()=>{await a.internalConfigure(e,t);},onSuccess:"configured",onError:"unconfigured"}),await a.stateMachine.executeAsyncTransition({targetState:"creating-context",action:async()=>{await a.sharedInstance.initializeWithOptions({licenseKey:e,deviceName:t.deviceName,settings:t.settings});},onSuccess:"ready",onError:"unconfigured"})),a.sharedInstance)}static async internalConfigure(e$1,t){var S;a$4.getInstance().updateIfMissing(a$5);let{forceAllPolyfills:r,overrideThreadsSupport:n,overrideSimdSupport:i}=a.getOverridesFromQueryString(),[o,s,u]=await Promise.all([a$6({forceAllPolyfills:r}),c$1(),e()]);n!=="auto"&&(a$3.warn(`Threads support override: was ${u} is now ${n==="on"}`),u=n==="on"),i!=="auto"&&(a$3.warn(`SIMD support override: was ${s} is now ${i==="on"}`),s=i==="on"),a.capabilityInfo={simdSupport:s,threadsSupport:u},a$3.debug(`Capability info detected - SIMD: ${s}, Threads: ${u}`),await a.validateOptions({...t,licenseKey:e$1});let p={licenseKey:e$1,libraryLocation:a$7(t.libraryLocation),moduleLoaders:t.moduleLoaders,logLevel:(S=t.logLevel)!=null?S:a$3.Level.Debug,verifyResponseHash:true,loadProgressNotifier:b$2.notify.bind(b$2),simdSupport:s,threadsSupport:u};a$3.setLevel(p.logLevel),a.userLicenseKey=p.licenseKey,a.libraryLocation=p.libraryLocation,b$2.subscribe(a.updateViewsWithProgress);let c=b$1.checkBrowserCompatibility();if(!c.fullSupport&&!c.scannerSupport)throw new a$8(c);b$1.isSupportedIOSVersion()||a$3.warn(`Warning: Minimum supported iOS version is 14.6.
2
- Please check the minimum system requirements here:
3
- https://docs.scandit.com/system-requirements#browser-compatibility`),a.dataCaptureLoaders=await a.loadModules(p.moduleLoaders,p),a.mainDataCaptureLoader=[...a.dataCaptureLoaders.entries()][0][1],b$2.unsubscribe(a.updateViewsWithProgress);}static async forLicenseKeyInElectronPath(e,t){if(!a$9())throw new a$a({name:"MisconfigurationError",message:"forLicenseKeyInElectronPath can only be used in Electron applications"});let r=await c$2({licenseDataPath:e});if(r==null)throw new a$a({name:"NoLicenseKeyError",message:`Cannot retrieve license key for Electron app at ${e}`});return a.forLicenseKey(r.licenseKey,{...t})}static updateViewsWithProgress({percentage:e}){for(let t of a$b.values())t.setProgressBarPercentage(e);}static getOverridesFromQueryString(){var o,s,u;function e(p){return ["auto","off","on"].includes(p)}let t=new URLSearchParams(window.location.search),[r="auto",n="auto",i=false]=[(o=t.get("pthreads"))==null?void 0:o.toLowerCase(),(s=t.get("simd"))==null?void 0:s.toLowerCase(),((u=t.get("forceAllPolyfills"))==null?void 0:u.toLowerCase())==="true"];return {overrideThreadsSupport:e(r)?r:"auto",overrideSimdSupport:e(n)?n:"auto",forceAllPolyfills:i}}static async validateOptions(e){if(e.licenseKey==null||e.licenseKey.trim().length<64)throw new a$a({name:"NoLicenseKeyError",message:"No license key provided"});if(typeof e.libraryLocation!="string")throw new a$a({name:"MisconfigurationError",message:'Option "libraryLocation" was not provided'});if(!Array.isArray(e.moduleLoaders)||e.moduleLoaders.length===0)throw new a$a({name:"MisconfigurationError",message:'Option "moduleLoaders" is missing or empty'});let t=e.moduleLoaders.map(r=>r.moduleName);if(!["BarcodeCapture","IdCapture","LabelCapture"].includes(t[0]))throw new a$a({name:"MisconfigurationError",message:'Main modules must be loaded before side modules. For example "BarcodeCapture" must be loaded before "Parser".'})}static async loadModules(e,t){let r=new Map,n=new Map;for(let i of e)n.set(i.moduleName,i.load(t));await Promise.all(n.values());for(let[i,o]of n)r.set(i,await o);return r}static async getOpenSourceSoftwareLicenseInfo(){let e=[];for(let r of a.moduleLicenseTextProviders){let n=await r.getLicenseText();e.push(n);}let t=e.join(`
4
-
5
- `);return new a$c(t)}async setFrameSource(e){let t=e!==this._frameSource;if(this._frameSource!==null&&(this._frameSource.context=null),this._frameSource=e!=null?e:null,e&&(e.context=this,await this.workerCommand("setFrameSource",{mirrorAxis:this.getMirrorAxisForFrameSource(e),isCameraFrameSource:f$1(e)})),await this.update([{type:"frameSourceState",newValue:this.frameSource}]),t)for(let r of this.listeners)r.didChangeFrameSource&&r.didChangeFrameSource(this,this._frameSource);}addListener(e){this.listeners.includes(e)||this.listeners.push(e);}async flushAnalytics(){await this.workerCommand("flushAnalytics",{});}removeListener(e){this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}async addMode(e){this.modes.add(e),await e.attachedToContext(this),this.updateCameraFrameFlow(),await this.update([],{updateContext:!P(e)});}async removeMode(e){this.modes.delete(e),await e.detachedFromContext(),this.updateCameraFrameFlow(),await this.update([],{updateContext:!P(e)});}async setMode(e){this.modes.has(e)||(this.modes.clear(),this.modes.add(e),await e.attachedToContext(this),this.updateCameraFrameFlow(),await this.update());}async removeCurrentMode(){for(let e of this.modes)await e.detachedFromContext();this.modes.clear(),await this.update();}async removeAllModes(){let e=Array.from(this.modes);for(let t of e)await this.removeMode(t);}async dispose(){if(a.stateMachine.currentState!=="unconfigured")try{await a.stateMachine.executeAsyncTransition({targetState:"unconfigured",action:async()=>{d.instance().removeListener("cameraProperties",this.cameraPropertiesReportListener),d.instance().removeListener("cameraAccessError",this.cameraAccessErrorListener),this.unsubscribeToVisibilityChange(this.onVisibilityChangeListener);for(let e of this.modes)await e.detachedFromContext();this._view&&(await this._view.setContext(null),this._view=null),this.dataCaptureInstance&&(await this.dataCaptureInstance.terminateDataCaptureWorker(true).catch(()=>{}),this.dataCaptureInstance=void 0);},onSuccess:"unconfigured",onError:"unconfigured"});}catch(e){if(a.stateMachine.currentState==="unconfigured")return;throw e}finally{this.modes.clear(),this.listeners=[],this.components.length=0,this.updateListeners.clear(),this.pendingWorkerMessageListeners.clear(),this.delayedRegistration=false,this.highEndBlurryRecognition=false,this._frameHandlers.length=0,this.frameSource&&(this.frameSource.context=null,this._frameSource=null),this.licenseKey="",this.deviceName="";}}async applySettings(e){this.settings=e,await this.update();}toJSONObject(){var e,t;return {licenseKey:this.licenseKey,framework:this.framework,deviceName:this.deviceName,...this.runtimeEnvironment,modes:[...this.modes].filter(r=>!P(r)).map(r=>r.toJSONObject()),components:this.components.map(r=>r.toJSONObject()),frameSource:this.frameSource?this.frameSource.toJSONObject():null,settings:this.settings.toJSONObject(),view:(t=(e=this._view)==null?void 0:e.toJSONObject())!=null?t:null}}getView(){return this._view}async setView(e){return this._view=e,this.update([{type:"viewSet",newValue:e}])}async getAppName(){let e=null;if(a$9()){let t=await b$3();if((t==null?void 0:t.appName)==null||t.appName==="")throw new Error("Cannot retrieve electron appName. Did you set it up in package.json? https://www.electronjs.org/docs/latest/api/app#appgetname");e=t.appName;}return e}urlToHostname(e){try{return new URL(e!=null?e:"").hostname}catch{return ""}}getParentDomain(){var t;let e="";return parent!==window&&(e||(e=this.urlToHostname((t=location.ancestorOrigins)==null?void 0:t[0])),e||(e=this.urlToHostname(document.referrer)),e||(e="")),e.startsWith("[")&&e.endsWith("]")&&(e=e.slice(1,-1)),e}async createContext(){await this.workerCommand("createContext",{context:this.toJSONObject(),deviceId:a.deviceID,delayedRegistration:this.delayedRegistration,highEndBlurryRecognition:this.highEndBlurryRecognition,appName:await this.getAppName(),parentDomain:this.getParentDomain()}),this.subscribeToWorkerMessages(this.onWorkerMessageListener),this.subscribeToCameraManagerEvents(),this.subscribeToVisibilityChange(this.onVisibilityChangeListener),this._view!=null&&await this.setView(this._view),this.frameSource!=null&&await this.setFrameSource(this.frameSource);}subscribeToVisibilityChange(e){document.addEventListener("visibilitychange",e);}unsubscribeToVisibilityChange(e){document.removeEventListener("visibilitychange",e);}async requestFrameData(e){return this.workerCommand("requestFrameData",{frameId:e})}performanceMark(e){a$d(globalThis.performance)&&typeof globalThis.performance.mark=="function"&&performance.mark(e);}async sendFrameToProcessor(e){let t=e instanceof ImageData?{data:e.data,width:e.width,height:e.height}:e,r=await this.sendFrameToHandlers(t);return t.data=r.capture.data,r.skip?r.capture:(this.performanceMark("processFrameBeforeSDC"),this.sendFrameToSDC(t))}async sendFrameToHandlers(e){for(let t of this._frameHandlers)if((await t(e)).action==="skip")return {skip:true,capture:e};return {skip:false,capture:e}}async sendFrameToSDC(e){return this.workerCommand("processFrame",e,[e.data.buffer])}registerFrameHandler(e){this._frameHandlers.includes(e)||this._frameHandlers.push(e);}unregisterFrameHandler(e){this._frameHandlers.includes(e)&&this._frameHandlers.splice(this._frameHandlers.indexOf(e),1);}onVisibilityChange(){this.workerCommand("documentVisibility",{state:document.visibilityState});}getImageConverterInstance(e){return this._asyncImageConverterInstance==null&&(this._asyncImageConverterInstance=new a$e(e)),this._asyncImageConverterInstance}onWorkerMessage(e){if(e.type==="contextDidChangeStatus"){e.payload.isValid||a$3.error(e.payload);for(let t of this.listeners)t.didChangeStatus&&t.didChangeStatus(this,a$f.fromJSON(e.payload));}if(e.type==="didStartObservingContext")for(let t of this.listeners)t.didStartObservingContext&&t.didStartObservingContext(this);e.type==="onFrameProcessingFinished"&&this.performanceMark("processFrameAfterSDC"),e.type==="convertToJPEG"&&this.convertImageToJPEG(e);}async convertImageToJPEG(e){let{imageId:t,width:r,height:n,data:i,planes:o,orientation:s,quality:u}=e,p={getWidth:()=>r,getHeight:()=>n,getPlanes:()=>o,toBitmap:()=>i,getBitmapRepresentationFromYUV:()=>{throw new Error("Not implemented")},deepCopy:()=>{throw new Error("Not implemented")}},c=await this.getImageConverterInstance({quality:u}).convertToJpeg(p,s);return this.workerCommand("convertToJPEGResult",{imageId:t,result:c})}subscribeToCameraManagerEvents(){d.instance().addListener("cameraProperties",this.cameraPropertiesReportListener),d.instance().addListener("cameraAccessError",this.cameraAccessErrorListener);}async reportCameraProperties(e){return this.workerCommand("reportCameraProperties",e)}onCameraAccessError(e){for(let t of this.listeners)t.didChangeStatus&&t.didChangeStatus(this,a$f.fromJSON({code:33794,isValid:true,message:typeof(e==null?void 0:e.toString)=="function"?e.toString():"Unknown error"}));}async update(e=[],{updateContext:t=true}={}){var r,n;t&&await this.updateContext();for(let i of e){switch(i.type){case "frameSourceState":{await((r=this._view)==null?void 0:r.onFrameSourceChange(this.frameSource));break}case "singleImageModeUploaderSettings":{(n=this._view)==null||n.onSingleImageUploaderSettingsChange(i.newValue);break}case "addOverlay":{await this.addNativeOverlay(i.newValue);break}case "removeOverlay":{await this.removeNativeOverlay(i.newValue);break}}for(let o of this.updateListeners)o(i);}}async updateContext(){await this.workerCommand("updateContext",{context:this.toJSONObject(),...this.getViewInfo()}).catch(e=>a$3.warn("Error while updating context:",e,this.toJSONObject()));}getViewInfo(){return this._view!=null?{view:{width:this._view.width,height:this._view.height,visible:this._view.width>0&&this._view.height>0,orientation:this._view.orientation}}:{view:null}}getMirrorAxisForFrameSource(e){let t="None";return f$1(e)&&e.getMirrorImageEnabled()&&(t="Y"),t}async addComponent(e){if(!this.components.includes(e))return this.components.push(e),e._context=this,this.update()}async addNativeOverlay(e){if(j(e))return this.workerCommand("addNativeOverlay",{overlayHandle:e[a$g]})}async removeNativeOverlay(e){if(j(e))return this.workerCommand("removeNativeOverlay",{overlayHandle:e[a$g]})}subscribeToWorkerMessages(e){this.dataCaptureInstance?this.dataCaptureInstance.addWorkerListener(e):this.pendingWorkerMessageListeners.add(e);}unsubscribeToWorkerMessages(e){this.dataCaptureInstance&&this.dataCaptureInstance.removeWorkerListener(e),this.pendingWorkerMessageListeners.delete(e);}hasEnabledMode(){return [...this.modes].some(e=>e.isEnabled())}updateCameraFrameFlow(){let e=[...this.modes].some(t=>t._synchronousFrameFlow===true);d.instance().setFrameHandling(e);}async isFeatureSupported(e){return (await this.workerCommand("isFeatureSupported",{feature:e})).supported}};a.deviceID=b$1.getDeviceId(),a.stateMachine=new a$1("unconfigured",$),a.mainDataCaptureLoader=void 0,a.dataCaptureLoaders=new Map,a.libraryLocation=void 0,a.userLicenseKey=null,a.capabilityInfo=void 0,c([f],a.prototype,"setFrameSource",1),c([f],a.prototype,"addMode",1),c([f],a.prototype,"removeMode",1),c([f],a.prototype,"setMode",1),c([f],a.prototype,"removeCurrentMode",1),c([f],a.prototype,"isFeatureSupported",1);var g=a;var b=class{constructor(e=g,t=a$3,r=globalThis.fetch.bind(globalThis)){this.staticContext=g;this.staticContext=e,this.logger=t,this.fetch=r;}get workerCommand(){var e;return (e=this.staticContext.mainDataCaptureLoader)==null?void 0:e.workerCommand.bind(this.staticContext.mainDataCaptureLoader)}async getLicenseText(){var i,o;let e=this.staticContext.stateMachine.currentState;if(e==="unconfigured"||e==="configuring")return this.logger.warn('You must call "DataCaptureContext.forLicenseKey" before retrieving open source license text info.'),"";let t=new URL(`${((i=this.staticContext.libraryLocation)!=null?i:"").replace(/\/$/,"")}/license/web-core-license.txt`),[r,n]=await Promise.all([(o=this.workerCommand)==null?void 0:o.call(this,"getOpenSourceSoftwareLicenseInfo",{}),this.fetchWebLicenseText(t.toString())]);return [r==null?void 0:r.licenseText,n].filter(s=>s!=null).join(`
6
- `)}async fetchWebLicenseText(e){return this.fetch(e,{mode:"cors",credentials:"include",headers:{"Content-Type":"text/plain"}}).then(async t=>{if(!t.ok)throw new Error(`${t.status} ${t.statusText}`);return t.text()}).catch(t=>(this.logger.warn(`Failed to fetch license from ${e}: ${t.toString()}`),null))}};export{b as a,g as b};
@@ -1 +0,0 @@
1
- import {a as a$1}from'./chunk-SGL5J2CI.js';var e=a$1.fromRGBA(46,193,206,1),n=a$1.fromRGBA(98,209,218,1),t=a$1.fromRGBA(151,224,230,1),c=a$1.fromRGBA(203,240,243,1),a=a$1.fromRGBA(18,22,25,1),m=a$1.fromRGBA(218,225,231,1),p=a$1.fromRGBA(40,211,128,1),G=a$1.fromRGBA(83,220,153,1),R=a$1.fromRGBA(126,229,179,1),B=a$1.fromRGBA(169,237,204,1),f=a$1.fromRGBA(212,246,230,1),s=a$1.fromRGBA(251,192,44,1),x=a$1.fromRGBA(252,205,86,1),y=a$1.fromRGBA(253,217,128,1),A=a$1.fromRGBA(254,230,171,1),d=a$1.fromRGBA(254,242,213,1),S=a$1.fromRGBA(250,68,70,1),l=a$1.fromRGBA(251,105,107,1),g=a$1.fromRGBA(252,143,144,1),i=a$1.fromRGBA(253,180,181,1),O=a$1.fromRGBA(254,218,218,1),T=a$1.fromRGBA(10,51,144,1),u=a$1.fromRGBA(22,96,217,1),C=a$1.fromRGBA(217,231,255,1);export{e as a,n as b,t as c,c as d,a as e,m as f,p as g,G as h,R as i,B as j,f as k,s as l,x as m,y as n,A as o,d as p,S as q,l as r,g as s,i as t,O as u,T as v,u as w,C as x};
@@ -1 +0,0 @@
1
- async function u(e,l){let t=document.createElement("canvas");t.width=this.width,t.height=this.height;let o=t.getContext("2d");if(!o)throw new Error("Could not get 2d context from an HTMLCanvasElement");let s=await this.getData();if(s==null)return null;let m;if(this.colorType==="GRAYSCALE"){let n=this.width*this.height,a=new Uint8ClampedArray(n*4);for(let r=0;r<n;r++){let h=s[r],i=r*4;a[i]=h,a[i+1]=h,a[i+2]=h,a[i+3]=255;}m=new ImageData(a,this.width,this.height);}else m=new ImageData(s,this.width,this.height);return o.putImageData(m,0,0),new Promise((n,a)=>{t.toBlob(r=>{if(t=null,o=null,r===null){a(new Error("Could not create Blob object from canvas"));return}n(r);},e,l);})}function c(e,l){let t={width:e.width,height:e.height,isFrameSourceMirrored:e.isFrameSourceMirrored,colorType:e.colorType,getData:async()=>(await l.requestFrameData(e.frameId)).data};return t.toBlob=u.bind(t),t}export{c as a};
@@ -1 +0,0 @@
1
- import {b}from'./chunk-24IG7HUA.js';import {a as a$1}from'./chunk-SGL5J2CI.js';var h=(t=>(t.ArrowDown="arrowDown",t.ArrowLeft="arrowLeft",t.ArrowRight="arrowRight",t.ArrowUp="arrowUp",t.CameraSwitch="cameraSwitch",t.Checkmark="checkMark",t.ChevronDown="chevronDown",t.ChevronLeft="chevronLeft",t.ChevronRight="chevronRight",t.ChevronUp="chevronUp",t.Delete="delete",t.DotFiveX="dotFiveX",t.ExclamationMark="exclamationMark",t.ExpiredItem="expiredItem",t.FragileItem="fragileItem",t.InspectItem="inspectItem",t.Keyboard="keyboard",t.LowStock="lowStock",t.OneX="oneX",t.Print="print",t.QuestionMark="questionMark",t.Restart="restart",t.Slash="slash",t.StarFilled="starFilled",t.StarHalfFilled="starHalfFilled",t.StarOutlined="starOutlined",t.ToPick="toPick",t.TwoX="twoX",t.WrongItem="wrongItem",t.XMark="xMark",t))(h||{}),l={arrowDown:import('../private/ui/atoms/ArrowDownSvgIcon.js').then(o=>o.ArrowDownSvgIcon),arrowLeft:import('../private/ui/atoms/ArrowLeftSvgIcon.js').then(o=>o.ArrowLeftSvgIcon),arrowRight:import('../private/ui/atoms/ArrowRightSvgIcon.js').then(o=>o.ArrowRightSvgIcon),arrowUp:import('../private/ui/atoms/ArrowUpSvgIcon.js').then(o=>o.ArrowUpSvgIcon),cameraSwitch:import('../private/ui/atoms/CameraSwitchSvgIcon.js').then(o=>o.CameraSwitchSvgIcon),checkMark:import('../private/ui/atoms/CheckSvgIcon.js').then(o=>o.CheckSvgIcon),chevronDown:import('../private/ui/atoms/ChevronDownSvgIcon.js').then(o=>o.ChevronDownSvgIcon),chevronLeft:import('../private/ui/atoms/ChevronLeftSvgIcon.js').then(o=>o.ChevronLeftSvgIcon),chevronRight:import('../private/ui/atoms/ChevronRightSvgIcon.js').then(o=>o.ChevronRightSvgIcon),chevronUp:import('../private/ui/atoms/ChevronUpSvgIcon.js').then(o=>o.ChevronUpSvgIcon),delete:import('../private/ui/atoms/DeleteSvgIcon.js').then(o=>o.DeleteSvgIcon),dotFiveX:import('../private/ui/atoms/Dot5xSvgIcon.js').then(o=>o.Dot5xSvgIcon),exclamationMark:import('../private/ui/atoms/ExclamationMarkSvgIcon.js').then(o=>o.ExclamationMarkSvgIcon),expiredItem:import('../private/ui/atoms/CalendarExclamationMarkSvgIcon.js').then(o=>o.CalendarExclamationMarkSvgIcon),fragileItem:import('../private/ui/atoms/GlassSvgIcon.js').then(o=>o.GlassSvgIcon),inspectItem:import('../private/ui/atoms/HandLensCheckSvgIcon.js').then(o=>o.HandLensCheckSvgIcon),keyboard:import('../private/ui/atoms/KeyboardSvgIcon.js').then(o=>o.KeyboardSvgIcon),lowStock:import('../private/ui/atoms/LowStockSvgIcon.js').then(o=>o.LowStockSvgIcon),oneX:import('../private/ui/atoms/OnexSvgIcon.js').then(o=>o.OnexSvgIcon),print:import('../private/ui/atoms/PrinterSvgIcon.js').then(o=>o.PrinterSvgIcon),questionMark:import('../private/ui/atoms/QuestionMarkSvgIcon.js').then(o=>o.QuestionMarkSvgIcon),restart:import('../private/ui/atoms/RestartSvgIcon.js').then(o=>o.RestartSvgIcon),slash:import('../private/ui/atoms/SlashSvgIcon.js').then(o=>o.SlashSvgIcon),starFilled:import('../private/ui/atoms/StarFilledSvgIcon.js').then(o=>o.StarFilledSvgIcon),starHalfFilled:import('../private/ui/atoms/StarHalfFilledSvgIcon.js').then(o=>o.StarHalfFilledSvgIcon),starOutlined:import('../private/ui/atoms/StarOutlinedSvgIcon.js').then(o=>o.StarOutlinedSvgIcon),toPick:import('../private/ui/atoms/ToPickSvgIcon.js').then(o=>o.ToPickSvgIcon),twoX:import('../private/ui/atoms/TwoxSvgIcon.js').then(o=>o.TwoxSvgIcon),wrongItem:import('../private/ui/atoms/WrongItemSvgIcon.js').then(o=>o.WrongItemSvgIcon),xMark:import('../private/ui/atoms/CrossSvgIcon.js').then(o=>o.CrossSvgIcon)},a=class{constructor(){this.iconName=null;this.backgroundShape=null;this.iconColor=a$1.fromHex("#fff");this.backgroundStrokeWidth=0;this.width=32;this.height=32;this.iconSize=null;}withIcon(r){return this.iconName=r,this}withBackgroundShape(r){return this.backgroundShape=r,this}withIconColor(r){return this.iconColor=r,this}withBackgroundColor(r){return this.backgroundColor=r,this}withBackgroundStrokeColor(r){return this.backgroundStrokeColor=r,this}withBackgroundStrokeWidth(r){return this.backgroundStrokeWidth=r,this}async build(){let r=b.create();r.backgroundStrokeWidth=this.backgroundStrokeWidth,r.backgroundShape=this.backgroundShape,this.backgroundColor!=null&&(r.backgroundColor=this.backgroundColor),this.backgroundStrokeColor!=null&&(r.backgroundStrokeColor=this.backgroundStrokeColor);let n=null;if(this.iconName!=null){let e=await l[this.iconName];e.register(),n=e.create(),r.append(n);}return r.width=this.width,r.height=this.height,r.iconColor=this.iconColor,n!=null&&this.iconSize!=null&&(n.size=this.iconSize),r}withIconSize(r){return this.iconSize=r,this}withWidth(r){return this.width=r,this}withHeight(r){return this.height=r,this}};export{h as a,l as b,a as c};
@@ -1 +0,0 @@
1
- import {c,a as a$1,b}from'./chunk-JFRSUCMO.js';import {a as a$3}from'./chunk-EQRBQJYM.js';import {a as a$2}from'./chunk-GHTCNOQN.js';import {a as a$4}from'./chunk-XR65N6EG.js';var a=class a{constructor(e){this.canUploadFile=false;this._mounted=false;this._loading=false;this._htmlRoot=void 0;this._canvas=void 0;this._onInputCheck=void 0;this._onBeforeFileRead=void 0;this._onImageLoadError=void 0;this._onFileReaderError=void 0;this._onCaptureReady=void 0;this._resizedImageSizeLimit=1440;this._inputElement=void 0;this._buttonElement=void 0;this._informationElement=void 0;this._chooseImageText="";this._localizationSubscription=void 0;this._onLocalizationUpdated=this.onLocalizationUpdated.bind(this);this._settings=e;}get canvas(){return this._canvas||(this._canvas=document.createElement("canvas")),this._canvas}get canvasContext(){return this._canvasContext||(this._canvasContext=this.canvas.getContext("2d",{willReadFrequently:true})),this._canvasContext}mount(e){var g;if(this._mounted)return;if(!document.head.querySelector(`[data-component=${a.componentName}]`)){let s=document.createElement("style");s.dataset.component=a.componentName,s.textContent=c,document.head.append(s);}let t=document.createElement("div");t.className=a$1.SINGLE_IMAGE_UPLOADER_CONTAINER,Object.assign(t.style,b.SINGLE_IMAGE_UPLOADER_CONTAINER_STYLE,this._settings.containerStyle),e.append(t);let{iconElement:n,iconStyle:r,informationElement:i,informationStyle:l,buttonElement:d,buttonStyle:h,onlyCameraCapture:p}=this._settings;Object.assign(n.style,b.SINGLE_IMAGE_UPLOADER_ICON_STYLE,r,{maxWidth:"100px",maxHeight:"100px"}),t.append(n),i.hasAttribute(a.DEFAULT_DOM_ATTRIBUTE)&&(Object.assign(i.style,b.SINGLE_IMAGE_UPLOADER_INFORMATION_STYLE,l),i.textContent=a$2.getInstance().get("core.singleImageUploader.title")),t.append(i);let o=document.createElement("input");o.type="file",o.accept="image/*",p&&(o.capture="environment",o.dataset.onlyCaptureOnMobile="environment"),o.addEventListener("change",s=>{this.onFileUpload(s);}),o.addEventListener("click",s=>{var m;(m=this._onInputCheck)==null||m.call(this,s);}),o.addEventListener("keydown",s=>{var m;(m=this._onInputCheck)==null||m.call(this,s);});let v=document.createElement("label");v.append(o),d.hasAttribute(a.DEFAULT_DOM_ATTRIBUTE)&&Object.assign(d.style,b.SINGLE_IMAGE_UPLOADER_BUTTON_STYLE,h),v.append(d),t.append(v);let E=document.createRange().createContextualFragment(atob(a$3)).firstElementChild;Object.assign(E.style,{position:"absolute",bottom:"1em",right:"1em",width:"10em"}),t.append(E),this._htmlRoot=t,this._mounted=true,this._inputElement=o,this._buttonElement=d,this._chooseImageText=(g=d.textContent)!=null?g:"",this._informationElement=i,this._localizationSubscription=a$2.getInstance().subscribe(this._onLocalizationUpdated);}unmount(){var e,t,n;this._mounted&&((e=this._htmlRoot)==null||e.remove(),(t=document.head.querySelector(`[data-component=${a.componentName}]`))==null||t.remove(),(n=this._localizationSubscription)==null||n.cancel(),this._mounted=false);}setButtonState(e){this._inputElement&&(this._inputElement.disabled=e==="disabled");}getButtonState(){return this._inputElement?this._inputElement.disabled?"disabled":"enabled":"disabled"}onInputCheck(e){this._onInputCheck=e;}onBeforeFileRead(e){this._onBeforeFileRead=e;}onImageLoadError(e){this._onImageLoadError=e;}onFileReaderError(e){this._onFileReaderError=e;}onCaptureReady(e){this._onCaptureReady=e;}onAfterImageProcessed(){this.setLoading(false);}onLocalizationUpdated(){var e,t;(e=this._buttonElement)!=null&&e.hasAttribute(a.DEFAULT_DOM_ATTRIBUTE)&&(this._buttonElement.textContent=a$2.getInstance().get("core.singleImageUploader.button")),(t=this._informationElement)!=null&&t.hasAttribute(a.DEFAULT_DOM_ATTRIBUTE)&&(this._informationElement.textContent=a$2.getInstance().get("core.singleImageUploader.title"));}setLoading(e){this._buttonElement&&(this.setButtonState(e?"disabled":"enabled"),this._buttonElement.textContent=e?"...":this._chooseImageText,this._loading=e);}getResizedImageDimensions(e,t){return e<=this._resizedImageSizeLimit&&t<=this._resizedImageSizeLimit?{width:e,height:t}:e>t?{width:this._resizedImageSizeLimit,height:Math.round(t/e*this._resizedImageSizeLimit)}:{width:Math.round(e/t*this._resizedImageSizeLimit),height:this._resizedImageSizeLimit}}onImageLoad(e){var i;let{height:t,width:n}=this.getResizedImageDimensions(e.naturalWidth,e.naturalHeight);this.canvasContext.canvas.width=n,this.canvasContext.canvas.height=t,this.canvasContext.drawImage(e,0,0,n,t);let r={data:this.canvasContext.getImageData(0,0,n,t).data,width:n,height:t};(i=this._onCaptureReady)==null||i.call(this,r);}onFileReaderLoad(e,t,n){e.value="",t.result!=null&&(n.addEventListener("load",()=>{this.onImageLoad(n);},{once:true}),n.addEventListener("error",r=>{var i;(i=this._onImageLoadError)==null||i.call(this,r),this.setLoading(false);},{once:true}),n.src=t.result);}async onFileUpload(e){var d;this.setLoading(true);let t=e.currentTarget,{files:n}=t;if(n==null||n.length===0){this.setLoading(false);return}let r=(d=this._onBeforeFileRead)==null?void 0:d.call(this,e);if(r instanceof Promise&&await r,!this.canUploadFile){t.value="",a$4.warn("Can't upload file, no capture mode enabled."),this.setLoading(false);return}let i=new Image,l=new FileReader;l.addEventListener("load",()=>{this.onFileReaderLoad(t,l,i);}),l.addEventListener("error",h=>{var p;(p=this._onFileReaderError)==null||p.call(this,h),this.setLoading(false);}),l.readAsDataURL(n[0]);}};a.componentName="SingleImageUploaderView",a.DEFAULT_DOM_ATTRIBUTE="data-scandit-default";var I=a;export{I as a};
@@ -1,2 +0,0 @@
1
- import {b as b$2}from'./chunk-MKTACV3Q.js';import {c,d,b as b$1,a as a$1,e}from'./chunk-SBC5K7IT.js';import {a,b}from'./chunk-TR3NGINC.js';var Ae=a((Y,ie)=>{(function(m,u){var I="1.0.40",U="",x="?",E="function",g="undefined",C="object",O="string",y="major",e="model",n="name",i="type",o="vendor",r="version",T="architecture",N="console",l="mobile",w="tablet",S="smarttv",_="wearable",q="embedded",X=500,W="Amazon",L="Apple",oe="ASUS",j="BlackBerry",a="Browser",t="Chrome",b="Edge",h="Firefox",k="Google",F="Huawei",P="LG",ne="Microsoft",be="Motorola",V="Opera",G="Samsung",ce="Sharp",$="Sony",re="Xiaomi",te="Zebra",ue="Facebook",we="Chromium OS",de="Mac OS",pe=" Browser",Te=function(d,p){var c={};for(var v in d)p[v]&&p[v].length%2===0?c[v]=p[v].concat(d[v]):c[v]=d[v];return c},K=function(d){for(var p={},c=0;c<d.length;c++)p[d[c].toUpperCase()]=d[c];return p},fe=function(d,p){return typeof d===O?D(p).indexOf(D(d))!==-1:false},D=function(d){return d.toLowerCase()},_e=function(d){return typeof d===O?d.replace(/[^\d\.]/g,U).split(".")[0]:u},ae=function(d,p){if(typeof d===O)return d=d.replace(/^\s\s*/,U),typeof p===g?d:d.substring(0,X)},H=function(d,p){for(var c=0,v,B,R,f,s,M;c<p.length&&!s;){var se=p[c],ve=p[c+1];for(v=B=0;v<se.length&&!s&&se[v];)if(s=se[v++].exec(d),s)for(R=0;R<ve.length;R++)M=s[++B],f=ve[R],typeof f===C&&f.length>0?f.length===2?typeof f[1]==E?this[f[0]]=f[1].call(this,M):this[f[0]]=f[1]:f.length===3?typeof f[1]===E&&!(f[1].exec&&f[1].test)?this[f[0]]=M?f[1].call(this,M,f[2]):u:this[f[0]]=M?M.replace(f[1],f[2]):u:f.length===4&&(this[f[0]]=M?f[3].call(this,M.replace(f[1],f[2])):u):this[f]=M||u;c+=2;}},Z=function(d,p){for(var c in p)if(typeof p[c]===C&&p[c].length>0){for(var v=0;v<p[c].length;v++)if(fe(p[c][v],d))return c===x?u:c}else if(fe(p[c],d))return c===x?u:c;return p.hasOwnProperty("*")?p["*"]:d},Ue={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},me={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ge={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[r,[n,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[r,[n,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[n,r],[/opios[\/ ]+([\w\.]+)/i],[r,[n,V+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[r,[n,V+" GX"]],[/\bopr\/([\w\.]+)/i],[r,[n,V]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[r,[n,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[r,[n,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[n,r],[/quark(?:pc)?\/([-\w\.]+)/i],[r,[n,"Quark"]],[/\bddg\/([\w\.]+)/i],[r,[n,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[r,[n,"UC"+a]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[r,[n,"WeChat"]],[/konqueror\/([\w\.]+)/i],[r,[n,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[r,[n,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[r,[n,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[r,[n,"Smart Lenovo "+a]],[/(avast|avg)\/([\w\.]+)/i],[[n,/(.+)/,"$1 Secure "+a],r],[/\bfocus\/([\w\.]+)/i],[r,[n,h+" Focus"]],[/\bopt\/([\w\.]+)/i],[r,[n,V+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[r,[n,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[r,[n,"Dolphin"]],[/coast\/([\w\.]+)/i],[r,[n,V+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[r,[n,"MIUI"+pe]],[/fxios\/([\w\.-]+)/i],[r,[n,h]],[/\bqihoobrowser\/?([\w\.]*)/i],[r,[n,"360"]],[/\b(qq)\/([\w\.]+)/i],[[n,/(.+)/,"$1Browser"],r],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[n,/(.+)/,"$1"+pe],r],[/samsungbrowser\/([\w\.]+)/i],[r,[n,G+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[r,[n,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[n,"Sogou Mobile"],r],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[n,r],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[n],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[r,n],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[n,ue],r],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[n,r],[/\bgsa\/([\w\.]+) .*safari\//i],[r,[n,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[r,[n,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[r,[n,t+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[n,t+" WebView"],r],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[r,[n,"Android "+a]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[n,r],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[r,[n,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[r,n],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[n,[r,Z,Ue]],[/(webkit|khtml)\/([\w\.]+)/i],[n,r],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[n,"Netscape"],r],[/(wolvic|librewolf)\/([\w\.]+)/i],[n,r],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[r,[n,h+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[n,[r,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[n,[r,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[T,"amd64"]],[/(ia32(?=;))/i],[[T,D]],[/((?:i[346]|x)86)[;\)]/i],[[T,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[T,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[T,"armhf"]],[/windows (ce|mobile); ppc;/i],[[T,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[T,/ower/,U,D]],[/(sun4\w)[;\)]/i],[[T,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[T,D]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[e,[o,G],[i,w]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[e,[o,G],[i,l]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[e,[o,L],[i,l]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[e,[o,L],[i,w]],[/(macintosh);/i],[e,[o,L]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[e,[o,ce],[i,l]],[/(?:honor)([-\w ]+)[;\)]/i],[e,[o,"Honor"],[i,l]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[e,[o,F],[i,w]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[e,[o,F],[i,l]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[e,/_/g," "],[o,re],[i,l]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[e,/_/g," "],[o,re],[i,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[e,[o,"OPPO"],[i,l]],[/\b(opd2\d{3}a?) bui/i],[e,[o,"OPPO"],[i,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[e,[o,"Vivo"],[i,l]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[e,[o,"Realme"],[i,l]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[e,[o,be],[i,l]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[e,[o,be],[i,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[e,[o,P],[i,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[e,[o,P],[i,l]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[e,[o,"Lenovo"],[i,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[e,/_/g," "],[o,"Nokia"],[i,l]],[/(pixel c)\b/i],[e,[o,k],[i,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[e,[o,k],[i,l]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[e,[o,$],[i,l]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[e,"Xperia Tablet"],[o,$],[i,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[e,[o,"OnePlus"],[i,l]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[e,[o,W],[i,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[e,/(.+)/g,"Fire Phone $1"],[o,W],[i,l]],[/(playbook);[-\w\),; ]+(rim)/i],[e,o,[i,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[e,[o,j],[i,l]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[e,[o,oe],[i,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[e,[o,oe],[i,l]],[/(nexus 9)/i],[e,[o,"HTC"],[i,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[o,[e,/_/g," "],[i,l]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[e,[o,"TCL"],[i,w]],[/(itel) ((\w+))/i],[[o,D],e,[i,Z,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[e,[o,"Acer"],[i,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[e,[o,"Meizu"],[i,l]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[e,[o,"Ulefone"],[i,l]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[e,[o,"Energizer"],[i,l]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[e,[o,"Cat"],[i,l]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[e,[o,"Smartfren"],[i,l]],[/droid.+; (a(?:015|06[35]|142p?))/i],[e,[o,"Nothing"],[i,l]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[o,e,[i,l]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[o,e,[i,w]],[/(surface duo)/i],[e,[o,ne],[i,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[e,[o,"Fairphone"],[i,l]],[/(u304aa)/i],[e,[o,"AT&T"],[i,l]],[/\bsie-(\w*)/i],[e,[o,"Siemens"],[i,l]],[/\b(rct\w+) b/i],[e,[o,"RCA"],[i,w]],[/\b(venue[\d ]{2,7}) b/i],[e,[o,"Dell"],[i,w]],[/\b(q(?:mv|ta)\w+) b/i],[e,[o,"Verizon"],[i,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[e,[o,"Barnes & Noble"],[i,w]],[/\b(tm\d{3}\w+) b/i],[e,[o,"NuVision"],[i,w]],[/\b(k88) b/i],[e,[o,"ZTE"],[i,w]],[/\b(nx\d{3}j) b/i],[e,[o,"ZTE"],[i,l]],[/\b(gen\d{3}) b.+49h/i],[e,[o,"Swiss"],[i,l]],[/\b(zur\d{3}) b/i],[e,[o,"Swiss"],[i,w]],[/\b((zeki)?tb.*\b) b/i],[e,[o,"Zeki"],[i,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[o,"Dragon Touch"],e,[i,w]],[/\b(ns-?\w{0,9}) b/i],[e,[o,"Insignia"],[i,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[e,[o,"NextBook"],[i,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[o,"Voice"],e,[i,l]],[/\b(lvtel\-)?(v1[12]) b/i],[[o,"LvTel"],e,[i,l]],[/\b(ph-1) /i],[e,[o,"Essential"],[i,l]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[e,[o,"Envizen"],[i,w]],[/\b(trio[-\w\. ]+) b/i],[e,[o,"MachSpeed"],[i,w]],[/\btu_(1491) b/i],[e,[o,"Rotor"],[i,w]],[/(shield[\w ]+) b/i],[e,[o,"Nvidia"],[i,w]],[/(sprint) (\w+)/i],[o,e,[i,l]],[/(kin\.[onetw]{3})/i],[[e,/\./g," "],[o,ne],[i,l]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[e,[o,te],[i,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[e,[o,te],[i,l]],[/smart-tv.+(samsung)/i],[o,[i,S]],[/hbbtv.+maple;(\d+)/i],[[e,/^/,"SmartTV"],[o,G],[i,S]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[o,P],[i,S]],[/(apple) ?tv/i],[o,[e,L+" TV"],[i,S]],[/crkey/i],[[e,t+"cast"],[o,k],[i,S]],[/droid.+aft(\w+)( bui|\))/i],[e,[o,W],[i,S]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[e,[o,ce],[i,S]],[/(bravia[\w ]+)( bui|\))/i],[e,[o,$],[i,S]],[/(mitv-\w{5}) bui/i],[e,[o,re],[i,S]],[/Hbbtv.*(technisat) (.*);/i],[o,e,[i,S]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[o,ae],[e,ae],[i,S]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[i,S]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[o,e,[i,N]],[/droid.+; (shield) bui/i],[e,[o,"Nvidia"],[i,N]],[/(playstation [345portablevi]+)/i],[e,[o,$],[i,N]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[e,[o,ne],[i,N]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[e,[o,G],[i,_]],[/((pebble))app/i],[o,e,[i,_]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[e,[o,L],[i,_]],[/droid.+; (glass) \d/i],[e,[o,k],[i,_]],[/droid.+; (wt63?0{2,3})\)/i],[e,[o,te],[i,_]],[/droid.+; (glass) \d/i],[e,[o,k],[i,_]],[/(pico) (4|neo3(?: link|pro)?)/i],[o,e,[i,_]],[/; (quest( \d| pro)?)/i],[e,[o,ue],[i,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[o,[i,q]],[/(aeobc)\b/i],[e,[o,W],[i,q]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[e,[i,l]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[e,[i,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[i,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[i,l]],[/(android[-\w\. ]{0,9});.+buil/i],[e,[o,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[r,[n,b+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[n,r],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[r,[n,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[n,r],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[r,n]],os:[[/microsoft (windows) (vista|xp)/i],[n,r],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[n,[r,Z,me]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[r,Z,me],[n,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[r,/_/g,"."],[n,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[n,de],[r,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[r,n],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[n,r],[/\(bb(10);/i],[r,[n,j]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[r,[n,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[r,[n,h+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[r,[n,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[r,[n,"watchOS"]],[/crkey\/([\d\.]+)/i],[r,[n,t+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[n,we],r],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[n,r],[/(sunos) ?([\w\.\d]*)/i],[[n,"Solaris"],r],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[n,r]]},A=function(d,p){if(typeof d===C&&(p=d,d=u),!(this instanceof A))return new A(d,p).getResult();var c=typeof m!==g&&m.navigator?m.navigator:u,v=d||(c&&c.userAgent?c.userAgent:U),B=c&&c.userAgentData?c.userAgentData:u,R=p?Te(ge,p):ge,f=c&&c.userAgent==v;return this.getBrowser=function(){var s={};return s[n]=u,s[r]=u,H.call(s,v,R.browser),s[y]=_e(s[r]),f&&c&&c.brave&&typeof c.brave.isBrave==E&&(s[n]="Brave"),s},this.getCPU=function(){var s={};return s[T]=u,H.call(s,v,R.cpu),s},this.getDevice=function(){var s={};return s[o]=u,s[e]=u,s[i]=u,H.call(s,v,R.device),f&&!s[i]&&B&&B.mobile&&(s[i]=l),f&&s[e]=="Macintosh"&&c&&typeof c.standalone!==g&&c.maxTouchPoints&&c.maxTouchPoints>2&&(s[e]="iPad",s[i]=w),s},this.getEngine=function(){var s={};return s[n]=u,s[r]=u,H.call(s,v,R.engine),s},this.getOS=function(){var s={};return s[n]=u,s[r]=u,H.call(s,v,R.os),f&&!s[n]&&B&&B.platform&&B.platform!="Unknown"&&(s[n]=B.platform.replace(/chrome os/i,we).replace(/macos/i,de)),s},this.getResult=function(){return {ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return v},this.setUA=function(s){return v=typeof s===O&&s.length>X?ae(s,X):s,this},this.setUA(v),this};A.VERSION=I,A.BROWSER=K([n,r,y]),A.CPU=K([T]),A.DEVICE=K([e,o,i,N,l,S,w,_,q]),A.ENGINE=A.OS=K([n,r]),typeof Y!==g?(typeof ie!==g&&ie.exports&&(Y=ie.exports=A),Y.UAParser=A):typeof define===E&&define.amd?define(function(){return A}):typeof m!==g&&(m.UAParser=A);var z=typeof m!==g&&(m.jQuery||m.Zepto);if(z&&!z.ua){var J=new A;z.ua=J.getResult(),z.ua.get=function(){return J.getUA()},z.ua.set=function(d){J.setUA(d);var p=J.getResult();for(var c in p)z.ua[c]=p[c];};}})(typeof window=="object"?window:Y);});function ee(m){for(var u=1;u<arguments.length;u++){var I=arguments[u];for(var U in I)m[U]=I[U];}return m}var Ie={read:function(m){return m[0]==='"'&&(m=m.slice(1,-1)),m.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(m){return encodeURIComponent(m).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function le(m,u){function I(x,E,g){if(!(typeof document>"u")){g=ee({},u,g),typeof g.expires=="number"&&(g.expires=new Date(Date.now()+g.expires*864e5)),g.expires&&(g.expires=g.expires.toUTCString()),x=encodeURIComponent(x).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var C="";for(var O in g)g[O]&&(C+="; "+O,g[O]!==true&&(C+="="+g[O].split(";")[0]));return document.cookie=x+"="+m.write(E,x)+C}}function U(x){if(!(typeof document>"u"||arguments.length&&!x)){for(var E=document.cookie?document.cookie.split("; "):[],g={},C=0;C<E.length;C++){var O=E[C].split("="),y=O.slice(1).join("=");try{var e=decodeURIComponent(O[0]);if(g[e]=m.read(y,e),x===e)break}catch{}}return x?g[x]:g}}return Object.create({set:I,get:U,remove:function(x,E){I(x,"",ee({},E,{expires:-1}));},withAttributes:function(x){return le(this.converter,ee({},this.attributes,x))},withConverter:function(x){return le(ee({},this.converter,x),this.attributes)}},{attributes:{value:Object.freeze(u)},converter:{value:Object.freeze(m)}})}var Oe=le(Ie,{path:"/"});var Ce=b(Ae(),1);var Be=(x=>(x.Standalone="standalone",x.Fullscreen="fullscreen",x.MinimalUI="minimal-ui",x.Browser="browser",x))(Be||{}),Ee;(j=>{let m;function u(){return m==null&&(m=new Ce.default(navigator.userAgent)),m}j.getUserAgentInfo=u;function I(){var b;if("orientation"in window)return false;let a="(any-pointer: coarse)",t=(b=window.matchMedia)==null?void 0:b.call(window,a);return navigator.maxTouchPoints===0||(t==null?void 0:t.media)===a&&!(t!=null&&t.matches)}j.isDesktopDevice=I;function U(){return u().getDevice().model==="iPhone"}j.isIPhone=U;function x(){let a=u().getOS();return a.name==="iOS"&&a.version!=null&&a.version.localeCompare("16.3",void 0,{numeric:true})>=0}j.isIOSDeviceWithExtendedCameraAccess=x;function E(){return "document"in window?window.document.createElement("canvas"):null}j.getCanvas=E;function g(a){return a.name==="iOS"&&a.version!=null&&["11.2.2","11.2.5","11.2.6"].includes(a.version)}async function C(){return c()}j.hasSIMDSupport=C;async function O(){return d()}j.hasThreadsSupport=O;function y(a,t,b){let h=a[t[0]];return h==null?false:t.length===1?typeof h===b:(typeof h=="function"||typeof h=="object")&&y(h,t.slice(1),b)}function e$1(){var F;let a=true,t=null,b=null,h=null,k=null;try{if(t=j.getCanvas(),b=j.getCanvas(),h=t==null?void 0:t.getContext("webgl"),k=b==null?void 0:b.getContext("experimental-webgl"),!y(window,["WebGLRenderingContext"],"function")||h==null&&k==null)throw new Error("WebGLRenderingContext is not supported")}catch{a=false;}finally{for(let P of [h,k])typeof(P==null?void 0:P.getExtension)=="function"&&((F=P.getExtension("WEBGL_lose_context"))==null||F.loseContext());h=null,k=null,t=null,b=null;}return a}function n(){let a=true,t=true,b=new Set;location.protocol.startsWith("http")||b.add("httpProtocol"),y(window,["isSecureContext"],"boolean")&&!window.isSecureContext&&b.add("secureContext"),!y(navigator,["mediaDevices","getUserMedia"],"function")&&!y(navigator,["enumerateDevices"],"function")&&!y(window,["MediaStreamTrack","getSources"],"function")&&(b.add("mediaDevices"),a=false),y(window,["Worker"],"function")||(b.add("webWorkers"),a=false,t=false),y(window,["WebAssembly"],"object")||(b.add("webAssembly"),a=false,t=false),y(window,["Blob"],"function")||(b.add("blob"),a=false,t=false),y(window,["URL","createObjectURL"],"function")||(b.add("urlObject"),a=false,t=false),y(window,["OffscreenCanvas"],"function")||b.add("offscreenCanvas"),e$1()||b.add("webGL");let h=u().getOS();return g(h)&&(b.add("webAssemblyErrorFree"),a=false,t=false),b$1()||b.add("sharedArrayBuffer"),a$1()||b.add("crossOriginIsolated"),L()||b.add("animationApi"),{fullSupport:a,scannerSupport:t,missingFeatures:[...b]}}j.checkBrowserCompatibility=n;async function i(){return e()}j.checkMultithreadingSupport=i;function o(){let a="scandit-device-id",t=b$2.getItem(a);if(t!=null&&t!=="")return t;if(t=Oe.get(a),t!=null&&t!=="")return b$2.setItem(a,t),t;let b=new Uint8Array(20);return crypto.getRandomValues(b),t=[...b].map(h=>{let k=h.toString(16);return k.length===1?`0${k}`:k}).join(""),b$2.setItem(a,t),t}j.getDeviceId=o;function r(a){return a instanceof HTMLElement||a!=null&&typeof a=="object"&&typeof a.tagName=="string"}j.isValidHTMLElement=r;function T(){var h,k;let a=u().getOS();if(a.name!=="iOS")return true;let[t,b]=(k=(h=a.version)==null?void 0:h.split(".").map(Number))!=null?k:[];return t>14||t===14&&b>=6}j.isSupportedIOSVersion=T;function N(){var a,t;return (t=(a=u().getBrowser().name)==null?void 0:a.toLowerCase().includes("safari"))!=null?t:false}j.isSafari=N;function l(){var t,b;return /iphone|ipod|ipad/.test((b=(t=u().getDevice().model)==null?void 0:t.toLowerCase())!=null?b:"")&&!N()}j.isIosWebView=l;async function w(){var t;return ((t=u().getOS().name)==null?void 0:t.toLowerCase())!=="android"?false:u().getUA().includes("wv")?true:[...(await fetch(document.location.toString(),{method:"HEAD"})).headers].some(([b])=>b.toLowerCase()==="x-requested-with")}j.isAndroidWebView=w;function S(){return u().getOS().name==="Windows"}j.isWindows=S;function _(){return u().getBrowser().name==="Firefox"}j.isFirefox=_;function q(){if("navigator"in globalThis){for(let a of ["vibrate","webkitVibrate","msVibrate","mozVibrate"])if(typeof navigator[a]=="function")return navigator[a]}}j.getSupportedVibrationMethod=q;function X(){return q()!=null&&!I()&&!S()&&!_()}j.isVibrationAvailable=X;function W(){return u().getOS().name==="iOS"}j.isIOS=W;function L(){return typeof globalThis.Animation<"u"&&typeof globalThis.KeyframeEffect<"u"&&typeof globalThis.Element.prototype.animate<"u"}j.isAnimationApiSupported=L;function oe(a){var h;let t=`(display-mode: ${a})`,b=(h=globalThis.matchMedia)==null?void 0:h.call(globalThis,t);return (b==null?void 0:b.matches)===true?true:a==="standalone"&&typeof navigator=="object"&&"standalone"in navigator&&typeof navigator.standalone=="boolean"?navigator.standalone===true:false}j.isPwaDisplayMode=oe;})(Ee||(Ee={}));
2
- export{Be as a,Ee as b};
@@ -1 +0,0 @@
1
- import {a as a$1}from'./chunk-XR65N6EG.js';import {a}from'./chunk-QCZSSQAQ.js';var s=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 t=URL.createObjectURL(e),r=new Image;r.src=t;try{await r.decode();}catch{throw new a({name:"InvalidImageError",message:"Submitted file is not an image"})}finally{URL.revokeObjectURL(t);}return i.fromImage(r)}static async fromImage(e){let t=new i;try{await e.decode();}catch{throw new a({name:"InvalidImageError",message:"Submitted image cannot be decoded"})}let r=t.getCanvasAndContext(e.width,e.height);return r.drawImage(e,0,0),t._imageData=r.getImageData(0,0,e.width,e.height,{colorSpace:"srgb"}),t}static async fromImageData(e){let t=new i,r=t.getCanvasAndContext(e.width,e.height);try{r.putImageData(e,0,0);}catch(n){throw new a({name:"InvalidImageError",message:`Submitted image data does not seem valid (details: ${n})`})}return t._imageData=e,t}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,t){let r=document.createElement("canvas");r.width=e,r.height=t;let n=r.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){var t;await this.setCurrentState("on"),await((t=this._context)==null?void 0:t.sendFrameToProcessor(e)),await this.setCurrentState("off");}};export{s as a};
@@ -1 +0,0 @@
1
- var e;(o=>{function i(){let r="8.1.0";return r}o.sdkVersion=i;})(e||(e={}));export{e as a};
@@ -1 +0,0 @@
1
- import {a as a$3}from'./chunk-4GKVQAVF.js';import {a as a$2}from'./chunk-F2IJCZAS.js';import {e}from'./chunk-SOCEWYYO.js';import {a as a$7,b}from'./chunk-EQ6V4W5K.js';import {a as a$6}from'./chunk-3A4KLILV.js';import {a as a$4}from'./chunk-UWBNF47P.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$5}from'./chunk-LSZZVJ6B.js';var E=(e=>(e.DidShow="didshow",e.DidHide="didhide",e.WillShow="willshow",e))(E||{}),o="--text-size",s="--text-color",n="--text-alignment",r="--text-weight",a="--line-height",l="--background-color",c="--corner-radius",h="--max-lines",w="ease-in-out",i=class i extends a$1{constructor(){super();this.toast=null;this._hintStyle=null;this._customIcon=null;this.currentAnimation=null;this.animationDuration=250;this._currentAnimationDirection=null;let t=this.attachShadow({mode:"open"});this._exclamationIcon=a$2.create(),this._checkIcon=a$3.create(),this._exclamationIcon.size=24,this._checkIcon.size=24,t.innerHTML=a$4`<div class="toast"><slot name="first-child"></slot><div class="left"><slot name="icon"></slot></div><p class="middle"><slot></slot></p></div>`,t.append(i.createStyleElement().cloneNode(true)),this.toast=t.querySelector(".toast");}static createStyleElement(){return a$5`:host{display:inline-block;font-family:SF Pro Display,sans-serif}:host([hidden]){display:none}.toast{${o}:1rem;${s}:#000;${r}:400;${n}:${"center"};${a}:1.5rem;${l}:#fff;${c}:.25rem;${h}:2;align-items:flex-start;background-color:var(${l});border-radius:var(${c});color:var(${s});display:flex;flex-direction:row;font-size:var(${o});font-weight:var(${r});gap:.625rem;justify-content:var(${n});line-height:var(${a});padding:.75rem 1rem}:host([direction=column]) .toast{align-items:center;flex-direction:column}:host([direction=row]) .toast{align-items:center;flex-direction:row}.toast .left{align-self:flex-start;display:flex}.toast.icon-${"none"} .left{display:none}.toast p.middle{display:inline-block;display:-webkit-box;margin:0;padding:0;text-align:var(${n});-webkit-line-clamp:var(${h});-webkit-box-orient:vertical;align-self:center;overflow:hidden;text-shadow:0 1px 2px #${e.withAlpha(.3).toJSON()}}p.middle{text-align:var(${n})}`}get hintStyle(){return this._hintStyle}set hintStyle(t){this._hintStyle=t,this.render();}get customIcon(){return this._customIcon}set customIcon(t){this._customIcon=t,this.render();}get showAnimation(){return new Animation(new KeyframeEffect(this,[{opacity:0},{opacity:1}],{duration:this.animationDuration,fill:"both",easing:w}))}get hideAnimation(){return new Animation(new KeyframeEffect(this,[{opacity:1},{opacity:0}],{duration:this.animationDuration,fill:"both",easing:w}))}static create(){return i.register(),document.createElement(i.tag)}static register(){a$6({[i.tag]:i});}async show(){return this.toggle(true)}async hide(){return this.toggle(false)}connectedCallback(){this.render();}async toggle(t){var m,d;let e=t?"showing":"hiding";this.currentAnimation&&this._currentAnimationDirection===e&&this.currentAnimation.playState==="running"||(this.currentAnimation&&a$7(this.currentAnimation),this.animationDuration=(d=(m=this.hintStyle)==null?void 0:m.isAnimatedToView)==null||d?250:0,this._currentAnimationDirection=e,this.currentAnimation=t?this.showAnimation:this.hideAnimation,t&&this.dispatchEvent(new CustomEvent("willshow",{bubbles:true})),this.currentAnimation.play(),await b(this.currentAnimation),this.dispatchEvent(new CustomEvent(t?"didshow":"didhide",{bubbles:true,detail:{target:this}})),this.currentAnimation=null,this._currentAnimationDirection=null);}render(){var t;if(!(!this.toast||!this.hintStyle)){this.toast.className="toast",this.toast.style.setProperty(o,`${this.hintStyle.textSize}px`),this.toast.style.setProperty(s,`#${this.hintStyle.textColor}`),this.toast.style.setProperty(r,this.hintStyle.textWeight.toString()),this.toast.style.setProperty(n,this.hintStyle.textAlignment),this.toast.style.setProperty(a,`${this.hintStyle.lineHeight/14}`),this.toast.style.setProperty(l,`#${this.hintStyle.backgroundColor}`),this.toast.style.setProperty(c,`${this.hintStyle.cornerRadius/10}rem`),this.toast.style.setProperty(h,this.hintStyle.maxLines.toString());for(let e of this.querySelectorAll("[slot=icon]"))e.remove();this._customIcon?(this._customIcon.setAttribute("slot","icon"),this.append(this._customIcon),this.toast.classList.remove("icon-none")):(this.toast.classList.toggle("icon-none",this.hintStyle.hintIcon==="none"),this.hintStyle.hintIcon==="check"?(this._checkIcon.setAttribute("slot","icon"),this.append(this._checkIcon)):this.hintStyle.hintIcon==="exclamationMark"&&(this._exclamationIcon.setAttribute("slot","icon"),this.append(this._exclamationIcon)),this.hintStyle.iconColor&&((t=this.querySelector("[slot=icon]"))==null||t.setAttribute("fill",`#${this.hintStyle.iconColor}`)));}}};i.tag="scandit-toast-hint";var A=i;export{E as a,A as b};
@@ -1 +0,0 @@
1
- var t=class t{constructor(){this.hasApi=false;this.hasTouch=false;this.requiresPrefix=false;}detect(){var e;try{"PointerEvent"in window?this.hasApi=true:"msPointerEnabled"in navigator&&(this.hasApi=true,this.requiresPrefix=true);let o=(e=navigator.msMaxTouchPoints)!=null?e:navigator.maxTouchPoints;this.hasTouch=o>0;}catch{}}prefixIfNeeded(e){return this.requiresPrefix?t.prefixEventMap[e]:e}};t.prefixEventMap={pointerdown:"MSPointerDown",pointerup:"MSPointerUp",pointercancel:"MSPointerCancel",pointermove:"MSPointerMove",pointerover:"MSPointerOver",pointerout:"MSPointerOut",pointerenter:"MSPointerEnter",pointerleave:"MSPointerLeave",gotpointercapture:"MSGotPointerCapture",lostpointercapture:"MSLostPointerCapture"};var n=t,i=new n;export{i as a};
@@ -1 +0,0 @@
1
- import {a as a$2}from'./chunk-3A4KLILV.js';import {a as a$3}from'./chunk-UWBNF47P.js';import {a}from'./chunk-EV4OEANA.js';import {a as a$1}from'./chunk-LSZZVJ6B.js';var l="scandit-arrows-up",t=class t extends a{constructor(){super();let a=this.attachShadow({mode:"open"});a.innerHTML=this.render(),a.prepend(t.createStyleElement().cloneNode(true));}static createStyleElement(){return a$1`${t.tag}{display:flex}${t.tag}[hidden]{display:none}.arrow{animation:blink 1.5s infinite;animation-duration:2s}.arrow-1{animation-delay:0s}.arrow-2{animation-delay:.5s}.arrow-3{animation-delay:1s}@keyframes blink{0%,to{opacity:0}50%{opacity:1}}`}static create(){return document.createElement(t.tag)}static register(){a$2({[t.tag]:t});}render(){return a$3`<svg width="120" height="45" viewBox="0 0 120 45" fill="none"><path class="arrow arrow-1" opacity="0.8" d="M105.561 45C108.718 45 109.586 40.6607 106.672 39.4467L61.1539 20.4808C60.4154 20.1731 59.5846 20.1731 58.8462 20.4808L13.328 39.4467C10.4143 40.6607 11.2822 45 14.4387 45C14.8094 45 15.1767 44.9286 15.5205 44.7897L58.8762 27.2723C59.5971 26.981 60.4029 26.981 61.1239 27.2723L104.48 44.7897C104.823 44.9286 105.191 45 105.561 45Z" fill="white"></path><path class="arrow arrow-2" opacity="0.6" d="M94.6148 26C96.8169 26 97.4022 22.9609 95.3576 22.143L60.7428 8.29711C60.266 8.10638 59.734 8.10638 59.2572 8.29711L24.6424 22.143C22.5978 22.9609 23.1831 26 25.3852 26H25.6254C25.873 26 26.1184 25.954 26.3492 25.8644L59.2762 13.081C59.7418 12.9002 60.2582 12.9002 60.7238 13.081L93.6508 25.8644C93.8816 25.954 94.127 26 94.3746 26H94.6148Z" fill="white"></path><path class="arrow arrow-3" opacity="0.4" d="M81.2078 10C82.8264 10 83.1945 7.7315 81.659 7.21967L60.6325 0.210819C60.2219 0.073974 59.7781 0.0739735 59.3675 0.210818L38.341 7.21967C36.8055 7.73149 37.1736 10 38.7922 10C38.93 10 39.0671 9.98003 39.1992 9.94072L59.4295 3.91979C59.8018 3.809 60.1982 3.809 60.5705 3.91979L80.8008 9.94072C80.9329 9.98003 81.07 10 81.2078 10Z" fill="white"></path></svg>`}};t.tag=l;var e=t;e.register();export{e as a};