@scandit/web-datacapture-core 8.2.0 → 8.3.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 (210) hide show
  1. package/THIRD_PARTY.txt +0 -1
  2. package/build/electron/common.cjs +1 -1
  3. package/build/electron/constants.cjs +1 -1
  4. package/build/electron/main.cjs +1 -1
  5. package/build/electron/preload.cjs +1 -1
  6. package/build/js/{Camera-DhGjpcjv.d.ts → Camera-BnPnXqAt.d.ts} +1 -1
  7. package/build/js/Camera.d.ts +1 -1
  8. package/build/js/Camera.js +1 -1
  9. package/build/js/CameraRelated.d.ts +1 -1
  10. package/build/js/{DataCaptureContext-Dvdr7st4.d.ts → DataCaptureContext-LM_Re1B4.d.ts} +42 -4
  11. package/build/js/DataCaptureContext.d.ts +4 -2
  12. package/build/js/DataCaptureContext.js +1 -1
  13. package/build/js/DataCaptureContextRelated.d.ts +5 -3
  14. package/build/js/DataCaptureVersion.js +1 -1
  15. package/build/js/DataCaptureView.d.ts +5 -3
  16. package/build/js/DataCaptureView.js +1 -1
  17. package/build/js/Feedback.js +1 -1
  18. package/build/js/FrameData.d.ts +4 -2
  19. package/build/js/ImageFrameSource.d.ts +1 -1
  20. package/build/js/ImageFrameSource.js +1 -1
  21. package/build/js/NotificationPresenter/index.d.ts +4 -2
  22. package/build/js/NotificationPresenter/private/ConcreteNotificationPresenter.d.ts +4 -2
  23. package/build/js/NotificationPresenter/private/presets.d.ts +4 -2
  24. package/build/js/ScanditIcon.js +1 -1
  25. package/build/js/ScanditIconBuilder.js +1 -1
  26. package/build/js/SingleImageUploader.d.ts +1 -1
  27. package/build/js/Sound.js +1 -1
  28. package/build/js/Vibration.js +1 -1
  29. package/build/js/browserHelper.d.ts +10 -0
  30. package/build/js/browserHelper.js +1 -1
  31. package/build/js/chunks/{chunk-UQVVJP5Z.js → chunk-2OCDIZIS.js} +1 -1
  32. package/build/js/chunks/{chunk-QFSNPY5Y.js → chunk-2SGKGZ6F.js} +1 -1
  33. package/build/js/chunks/{chunk-O7EM4VIM.js → chunk-33ZWDLU7.js} +1 -1
  34. package/build/js/chunks/{chunk-3MKSI2DV.js → chunk-6IM6NGGI.js} +1 -1
  35. package/build/js/chunks/{chunk-WVVNJRUA.js → chunk-7EGT56UE.js} +1 -1
  36. package/build/js/chunks/chunk-7JVAQ2A3.js +1 -0
  37. package/build/js/chunks/{chunk-MX6NS4FA.js → chunk-7ZU6DPLL.js} +1 -1
  38. package/build/js/chunks/{chunk-7HYFN4JO.js → chunk-A3ZT7PJA.js} +1 -1
  39. package/build/js/chunks/chunk-A5G2NHT2.js +1 -0
  40. package/build/js/chunks/{chunk-DGIQ3GF7.js → chunk-ARODHCN7.js} +1 -1
  41. package/build/js/chunks/chunk-BQO4QYI6.js +1 -0
  42. package/build/js/chunks/{chunk-QUWP3ILW.js → chunk-BSX3V75N.js} +1 -1
  43. package/build/js/chunks/chunk-BV63CXZF.js +1 -0
  44. package/build/js/chunks/{chunk-SFS4ELLN.js → chunk-DQ5X7FNV.js} +1 -1
  45. package/build/js/chunks/chunk-DZE2EYSZ.js +1 -0
  46. package/build/js/chunks/{chunk-SYGWA3T6.js → chunk-E7IMQECS.js} +1 -1
  47. package/build/js/chunks/{chunk-VSROWPI6.js → chunk-FCXZZH3O.js} +1 -1
  48. package/build/js/chunks/{chunk-O4HDBWKK.js → chunk-FMOB7R2T.js} +1 -1
  49. package/build/js/chunks/{chunk-U7ETOWGJ.js → chunk-GS7VZDY5.js} +1 -1
  50. package/build/js/chunks/{chunk-NXW6JP4X.js → chunk-H7FKC2FI.js} +1 -1
  51. package/build/js/chunks/{chunk-NXAYIU7F.js → chunk-IASACVTH.js} +1 -1
  52. package/build/js/chunks/chunk-IVQL2BYY.js +1 -0
  53. package/build/js/chunks/chunk-KUAZYGPM.js +1 -0
  54. package/build/js/chunks/{chunk-DTREAYZQ.js → chunk-KVRNF3VA.js} +1 -1
  55. package/build/js/chunks/{chunk-UERKPMRV.js → chunk-L66S4DN2.js} +1 -1
  56. package/build/js/chunks/chunk-M2ZQCUEL.js +1 -0
  57. package/build/js/chunks/{chunk-YE2GYNRP.js → chunk-NMXQDQYI.js} +1 -1
  58. package/build/js/chunks/{chunk-BBOKPRKO.js → chunk-O5D4KVS5.js} +1 -1
  59. package/build/js/chunks/{chunk-GLSB4QTY.js → chunk-OCKYBUXO.js} +1 -1
  60. package/build/js/chunks/{chunk-XYZYNUX3.js → chunk-RXDVYEE5.js} +1 -1
  61. package/build/js/chunks/{chunk-QUBJJDLC.js → chunk-RYXKMXTY.js} +1 -1
  62. package/build/js/chunks/{chunk-RP4YFAF2.js → chunk-SSTFVERQ.js} +1 -1
  63. package/build/js/chunks/{chunk-7OFC24NE.js → chunk-SX5ZLP2O.js} +1 -1
  64. package/build/js/chunks/{chunk-V2OKMBZD.js → chunk-UJYGOVXB.js} +1 -1
  65. package/build/js/chunks/chunk-W3X3ZRQZ.js +1 -0
  66. package/build/js/chunks/chunk-WBYBTOBZ.js +1 -0
  67. package/build/js/chunks/{chunk-JCP7NQPV.js → chunk-WFKB322J.js} +1 -1
  68. package/build/js/chunks/{chunk-VJ7ZYB4V.js → chunk-WJOT37ST.js} +1 -1
  69. package/build/js/chunks/{chunk-I4F6XB6S.js → chunk-XVH5A2QH.js} +1 -1
  70. package/build/js/chunks/{chunk-4J3Y5IIL.js → chunk-XW3Z6KKS.js} +1 -1
  71. package/build/js/chunks/{chunk-QPR2YHD4.js → chunk-YJNJGCAN.js} +1 -1
  72. package/build/js/chunks/chunk-YMM2PV73.js +6 -0
  73. package/build/js/chunks/chunk-YONR3EGV.js +2 -0
  74. package/build/js/chunks/{chunk-6EEMWSEO.js → chunk-YP53ND2Q.js} +1 -1
  75. package/build/js/chunks/{chunk-NT5WI2PS.js → chunk-YUZDO2PC.js} +1 -1
  76. package/build/js/chunks/{chunk-ZWO2PAO7.js → chunk-YXXMWHFX.js} +1 -1
  77. package/build/js/controls/CameraFOVSwitchControl.d.ts +4 -2
  78. package/build/js/controls/CameraFOVSwitchControl.js +1 -1
  79. package/build/js/controls/CameraSwitchControl.d.ts +4 -2
  80. package/build/js/controls/CameraSwitchControl.js +1 -1
  81. package/build/js/controls/TorchSwitchControl.d.ts +4 -2
  82. package/build/js/controls/TorchSwitchControl.js +1 -1
  83. package/build/js/controls/common.d.ts +4 -2
  84. package/build/js/controls/index.d.ts +4 -2
  85. package/build/js/controls/index.js +1 -1
  86. package/build/js/defaults/DefaultsCamera.d.ts +4 -2
  87. package/build/js/defaults/DefaultsCameraSettings.d.ts +1 -1
  88. package/build/js/defaults/DefaultsDataCaptureView.js +1 -1
  89. package/build/js/index.d.ts +5 -3
  90. package/build/js/index.js +1 -1
  91. package/build/js/moduleLoader.d.ts +4 -2
  92. package/build/js/private/AdditionalLayerPosition.d.ts +6 -0
  93. package/build/js/private/AdditionalLayerPosition.js +1 -0
  94. package/build/js/private/BatteryInterface.d.ts +81 -0
  95. package/build/js/private/BatteryInterface.js +1 -0
  96. package/build/js/private/CameraAccess.d.ts +1 -1
  97. package/build/js/private/CameraAccess.js +1 -1
  98. package/build/js/private/CameraManager.d.ts +5 -3
  99. package/build/js/private/CameraManager.js +1 -1
  100. package/build/js/private/CameraPool.d.ts +4 -2
  101. package/build/js/private/CanvasDrawerWithMetrics.d.ts +4 -2
  102. package/build/js/private/CoreModuleLicenseTextProvider.d.ts +4 -2
  103. package/build/js/private/CoreModuleLicenseTextProvider.js +1 -1
  104. package/build/js/private/CustomLocationsView.js +1 -1
  105. package/build/js/private/DataCaptureContextRelated.d.ts +4 -2
  106. package/build/js/private/FrameReaders/FrameReader.d.ts +4 -2
  107. package/build/js/private/FrameReaders/FrameReader.js +1 -1
  108. package/build/js/private/FrameReaders/FrameReaderAbstract.d.ts +4 -2
  109. package/build/js/private/FrameReaders/GrayScaleFrameReader.d.ts +4 -2
  110. package/build/js/private/FrameReaders/GrayScaleFrameReader.js +1 -1
  111. package/build/js/private/FrameReaders/index.d.ts +4 -2
  112. package/build/js/private/FrameReaders/index.js +1 -1
  113. package/build/js/private/NormalizedModuleLoaderOptions.d.ts +4 -2
  114. package/build/js/private/OrientationObserver.js +1 -1
  115. package/build/js/private/SingleImageUploaderView.d.ts +4 -2
  116. package/build/js/private/SingleImageUploaderView.js +1 -1
  117. package/build/js/private/ViewControls+related.js +1 -1
  118. package/build/js/private/ViewControls_related.d.ts +4 -2
  119. package/build/js/private/ViewStyles.js +1 -1
  120. package/build/js/private/ViewsRegistry.d.ts +4 -2
  121. package/build/js/private/customHowler.d.ts +27 -0
  122. package/build/js/private/customHowler.js +1 -0
  123. package/build/js/private/hybridDesktopPlatformHelpers.js +1 -1
  124. package/build/js/private/ui/atoms/AimerSvgIcon.js +1 -1
  125. package/build/js/private/ui/atoms/ArrowDownSvgIcon.js +1 -1
  126. package/build/js/private/ui/atoms/ArrowLeftSvgIcon.js +1 -1
  127. package/build/js/private/ui/atoms/ArrowRightSvgIcon.js +1 -1
  128. package/build/js/private/ui/atoms/ArrowUpSvgIcon.js +1 -1
  129. package/build/js/private/ui/atoms/ArrowsUp.js +1 -1
  130. package/build/js/private/ui/atoms/Backdrop.js +1 -1
  131. package/build/js/private/ui/atoms/CalendarExclamationMarkSvgIcon.js +1 -1
  132. package/build/js/private/ui/atoms/CameraFOVUltrawideSvgIcon.js +1 -1
  133. package/build/js/private/ui/atoms/CameraFOVWideSvgIcon.js +1 -1
  134. package/build/js/private/ui/atoms/CameraSwitchReverseSvgIcon.js +1 -1
  135. package/build/js/private/ui/atoms/CameraSwitchSvgIcon.js +1 -1
  136. package/build/js/private/ui/atoms/Card.js +1 -1
  137. package/build/js/private/ui/atoms/CardList.js +1 -1
  138. package/build/js/private/ui/atoms/CheckSvgIcon.js +1 -1
  139. package/build/js/private/ui/atoms/ChevronDownSvgIcon.js +1 -1
  140. package/build/js/private/ui/atoms/ChevronLeftSvgIcon.js +1 -1
  141. package/build/js/private/ui/atoms/ChevronRightSvgIcon.js +1 -1
  142. package/build/js/private/ui/atoms/ChevronUpSvgIcon.js +1 -1
  143. package/build/js/private/ui/atoms/CrossSvgIcon.js +1 -1
  144. package/build/js/private/ui/atoms/DeleteSvgIcon.js +1 -1
  145. package/build/js/private/ui/atoms/Dot5xSvgIcon.js +1 -1
  146. package/build/js/private/ui/atoms/ExclamationMarkSvgIcon.js +1 -1
  147. package/build/js/private/ui/atoms/GlassSvgIcon.js +1 -1
  148. package/build/js/private/ui/atoms/HandLensCheckSvgIcon.js +1 -1
  149. package/build/js/private/ui/atoms/KeyboardSvgIcon.js +1 -1
  150. package/build/js/private/ui/atoms/LowStockSvgIcon.js +1 -1
  151. package/build/js/private/ui/atoms/OnexSvgIcon.js +1 -1
  152. package/build/js/private/ui/atoms/PauseSvgIcon.js +1 -1
  153. package/build/js/private/ui/atoms/PrinterSvgIcon.js +1 -1
  154. package/build/js/private/ui/atoms/ProgressBar.js +1 -1
  155. package/build/js/private/ui/atoms/QuestionMarkSvgIcon.js +1 -1
  156. package/build/js/private/ui/atoms/RestartSvgIcon.js +1 -1
  157. package/build/js/private/ui/atoms/RoundedCheckSvgIcon.js +1 -1
  158. package/build/js/private/ui/atoms/RoundedCrossSvgIcon.js +1 -1
  159. package/build/js/private/ui/atoms/RoundedExclamationMarkSvgIcon.js +1 -1
  160. package/build/js/private/ui/atoms/ScanSvgIcon.js +1 -1
  161. package/build/js/private/ui/atoms/ShutterButton.js +1 -1
  162. package/build/js/private/ui/atoms/SlashSvgIcon.js +1 -1
  163. package/build/js/private/ui/atoms/StarFilledSvgIcon.js +1 -1
  164. package/build/js/private/ui/atoms/StarHalfFilledSvgIcon.js +1 -1
  165. package/build/js/private/ui/atoms/StarOutlinedSvgIcon.js +1 -1
  166. package/build/js/private/ui/atoms/SvgIcon.js +1 -1
  167. package/build/js/private/ui/atoms/ToPickSvgIcon.js +1 -1
  168. package/build/js/private/ui/atoms/Toast.d.ts +4 -2
  169. package/build/js/private/ui/atoms/Toast.js +1 -1
  170. package/build/js/private/ui/atoms/TorchOffSvgIcon.js +1 -1
  171. package/build/js/private/ui/atoms/TorchOnSvgIcon.js +1 -1
  172. package/build/js/private/ui/atoms/TwoxSvgIcon.js +1 -1
  173. package/build/js/private/ui/atoms/WrongItemSvgIcon.js +1 -1
  174. package/build/js/private/ui/molecules/CameraFOVSwitchButton.js +1 -1
  175. package/build/js/private/ui/molecules/CameraSwitchButton.js +1 -1
  176. package/build/js/private/ui/molecules/ControlsLayout.js +1 -1
  177. package/build/js/private/ui/molecules/HintPresenter.d.ts +4 -2
  178. package/build/js/private/ui/molecules/HintPresenter.js +1 -1
  179. package/build/js/private/ui/molecules/LoadingOverlay.js +1 -1
  180. package/build/js/private/ui/molecules/TorchSwitchIconButton.d.ts +1 -1
  181. package/build/js/private/ui/molecules/TorchSwitchIconButton.js +1 -1
  182. package/build/js/private/utils/index.js +1 -1
  183. package/build/js/private/utils/polyfillLoader.js +1 -1
  184. package/build/js/private/utils/replaceImagesInViewUtils.d.ts +4 -2
  185. package/build/js/private/utils/warnMultithreadingUnavailable.js +1 -1
  186. package/build/js/worker/ImageConverterForwarder.d.ts +4 -2
  187. package/build/js/worker/ViewInfoHelper.d.ts +4 -2
  188. package/build/js/worker/WorkerMain.d.ts +4 -2
  189. package/build/js/worker/WorkerMain.js +1 -1
  190. package/build/js/worker/coreCapture.inlineWorker.d.ts +4 -2
  191. package/build/js/worker/coreCapture.inlineWorker.js +1 -1
  192. package/build/js/worker/dataCaptureEngine.d.ts +4 -2
  193. package/build/js/worker/dataCaptureEngine.js +1 -1
  194. package/build/js/worker/dataCaptureLoader.d.ts +4 -2
  195. package/build/js/worker/dataCaptureLoader.js +1 -1
  196. package/build/js/worker/dataCaptureWorkerRelated.d.ts +4 -2
  197. package/build/js/worker/dataCaptureWorkerRelated.js +1 -1
  198. package/build/js/worker/index.d.ts +4 -2
  199. package/build/js/worker/index.js +1 -1
  200. package/package.json +6 -6
  201. package/build/js/chunks/chunk-A225YZFY.js +0 -2
  202. package/build/js/chunks/chunk-ACF5LYP7.js +0 -1
  203. package/build/js/chunks/chunk-DSFN65OM.js +0 -1
  204. package/build/js/chunks/chunk-ECPEKYII.js +0 -1
  205. package/build/js/chunks/chunk-FQYVZGCE.js +0 -1
  206. package/build/js/chunks/chunk-LH2NI5UL.js +0 -2
  207. package/build/js/chunks/chunk-OFNPZ4HM.js +0 -6
  208. package/build/js/chunks/chunk-UOQFOEG6.js +0 -1
  209. package/build/js/chunks/chunk-XG6VNDVQ.js +0 -1
  210. /package/build/js/chunks/{chunk-TU2LKPHV.js → chunk-FHNMZZV2.js} +0 -0
@@ -1 +1 @@
1
- export{a as LoadingOverlay}from'../../../chunks/chunk-DGIQ3GF7.js';
1
+ export{a as LoadingOverlay}from'../../../chunks/chunk-ARODHCN7.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- import { T as TorchState } from '../../../Camera-DhGjpcjv.js';
2
+ import { T as TorchState } from '../../../Camera-BnPnXqAt.js';
3
3
  import { GestureRecognizerListener } from '../../GestureRecognizer/GestureRecognizer.js';
4
4
  import { ScanditHTMLElement } from '../../utils/ScanditHTMLElement.js';
5
5
  import '../../../commons/Rect.js';
@@ -1 +1 @@
1
- import {a as a$3}from'../../../chunks/chunk-YE2GYNRP.js';import {a as a$2}from'../../../chunks/chunk-7OFC24NE.js';import {c}from'../../../chunks/chunk-74GO72VC.js';import {a as a$7}from'../../../chunks/chunk-XIAF6V7E.js';import {a as a$6}from'../../../chunks/chunk-SGL5J2CI.js';import {a as a$1}from'../../../chunks/chunk-UWBNF47P.js';import {a as a$4}from'../../../chunks/chunk-3A4KLILV.js';import {a}from'../../../chunks/chunk-EV4OEANA.js';import {a as a$5}from'../../../chunks/chunk-LSZZVJ6B.js';var s=class s extends a{constructor(){super();this._size=32;this._shadow=false;this._ariaLabel="Toggle torch";this._useCustomImages=false;let t=this.attachShadow({mode:"open"});t.innerHTML=a$1`<button><slot></slot></button>`,t.append(s.createStyleElement().cloneNode(true));}get button(){var t,e;return (e=(t=this.shadowRoot)==null?void 0:t.querySelector("button"))!=null?e:void 0}get onIcon(){var t;return (t=this.querySelector(a$2.tag))!=null?t:void 0}get offIcon(){var t;return (t=this.querySelector(a$3.tag))!=null?t:void 0}set size(t){this._size=t;let e=this.onIcon,o=this.offIcon;e&&(e.size=this._size),o&&(o.size=this._size);}get size(){return this._size}set shadow(t){this._shadow=t;let e=this.onIcon,o=this.offIcon;e&&e.toggleAttribute("shadow",this._shadow),o&&o.toggleAttribute("shadow",this._shadow);}get shadow(){return this._shadow}get state(){var t;return (t=this.getAttribute("state"))!=null?t:"off"}set state(t){this.setAttribute("state",t),this.setAttribute("aria-pressed",t==="on"?"true":"false");}get ariaLabel(){return this._ariaLabel}set ariaLabel(t){this._ariaLabel=t,this.setAttribute("aria-label",t);}set useCustomImages(t){this._useCustomImages=t,t?this.setAttribute("data-use-custom-images","true"):this.removeAttribute("data-use-custom-images");}setCustomImages(t){let e=this.style,o=t.on.idle?`url(${JSON.stringify(t.on.idle)})`:"none",i=t.on.pressed?`url(${JSON.stringify(t.on.pressed)})`:"none",n=t.off.idle?`url(${JSON.stringify(t.off.idle)})`:"none",b=t.off.pressed?`url(${JSON.stringify(t.off.pressed)})`:"none";e.setProperty("--torch-on-idle",o),e.setProperty("--torch-on-pressed",i),e.setProperty("--torch-off-idle",n),e.setProperty("--torch-off-pressed",b),this.useCustomImages=true;}static create(){return document.createElement(s.tag)}static register(){a$4({[s.tag]:s});}static createStyleElement(){return a$5`:host{display:inline-block;--button-size:32px;--torch-on-idle:none;--torch-on-pressed:none;--torch-off-idle:none;--torch-off-pressed:none}:host[hidden]{display:none}:host button{align-items:center;background:none;background-position:50%;background-repeat:no-repeat;background-size:contain;border:none;cursor:pointer;display:flex;height:var(--button-size);justify-content:center;margin:0;opacity:1;outline:none;padding:0;width:var(--button-size);-webkit-tap-highlight-color:transparent;transform-origin:center;transition:outline .2s ease-in-out,opacity .2s ease-in-out,transform .1s ease-in-out}:host([state=off]) button{opacity:.5}button[data-pressed=true]{transform:scale(.95)}button[data-pressed=false]{transform:scale(1)}:host button:focus-visible{outline:2px solid #06c;outline-offset:2px}:host([data-use-custom-images=true]) ::slotted(*){display:none!important}:host([data-use-custom-images=true][state=on]) button{background-image:var(--torch-on-idle)}:host([data-use-custom-images=true][state=on]) button[data-pressed=true]{background-image:var(--torch-on-pressed)}:host([data-use-custom-images=true][state=off]) button{background-image:var(--torch-off-idle)}:host([data-use-custom-images=true][state=off]) button[data-pressed=true]{background-image:var(--torch-off-pressed)}`}connectedCallback(){if(!this.button)return;if(a$2.register(),a$3.register(),!this.onIcon||!this.offIcon){let o=a$6.fromHex("#FFFFFF"),i=a$2.create(),n=a$3.create();i.toggleAttribute("shadow",this._shadow),n.toggleAttribute("shadow",this._shadow),i.size=this._size,n.size=this._size,n.fill=`#${o.toJSON()}`,i.fill=`#${o.toJSON()}`,this.appendChild(i),this.appendChild(n);}let t="off";(this.getAttribute("state")==="on"||this.getAttribute("state")==="off")&&(t=this.getAttribute("state")),this.state=t;let e=this.button;!this._gestureRecognizer&&e&&(this._gestureRecognizer=new a$7(e),this._gestureRecognizer.addListener(this)),this.setAttribute("aria-label",this._ariaLabel),this.setAttribute("aria-pressed",t==="on"?"true":"false");}attributeChangedCallback(t,e,o){t==="state"&&this.render(o);}render(t){let e=this.onIcon,o=this.offIcon;t==="on"?(o!=null&&(o.style.display="none"),e!=null&&(e.style.display="flex")):(e!=null&&(e.style.display="none"),o!=null&&(o.style.display="flex"));}disconnectedCallback(){this._gestureRecognizer&&(this._gestureRecognizer.removeAllListeners(),this._gestureRecognizer=void 0);}onTap(){this.dispatchEvent(new c({currentState:this.state}));}onPress(){let t=this.button;t&&t.setAttribute("data-pressed","true");}onRelease(){let t=this.button;t&&t.setAttribute("data-pressed","false");}};s.tag="scandit-torch-switch-icon-button",s.observedAttributes=["state"];var g=s;export{g as TorchSwitchIconButton};
1
+ import {c}from'../../../chunks/chunk-74GO72VC.js';import {a as a$3}from'../../../chunks/chunk-NMXQDQYI.js';import {a as a$2}from'../../../chunks/chunk-SX5ZLP2O.js';import {a as a$7}from'../../../chunks/chunk-XIAF6V7E.js';import {a as a$6}from'../../../chunks/chunk-SGL5J2CI.js';import {a as a$1}from'../../../chunks/chunk-UWBNF47P.js';import {a}from'../../../chunks/chunk-EV4OEANA.js';import {a as a$4}from'../../../chunks/chunk-3A4KLILV.js';import {a as a$5}from'../../../chunks/chunk-LSZZVJ6B.js';var s=class s extends a{constructor(){super();this._size=32;this._shadow=false;this._ariaLabel="Toggle torch";this._useCustomImages=false;let t=this.attachShadow({mode:"open"});t.innerHTML=a$1`<button><slot></slot></button>`,t.append(s.createStyleElement().cloneNode(true));}get button(){var t,e;return (e=(t=this.shadowRoot)==null?void 0:t.querySelector("button"))!=null?e:void 0}get onIcon(){var t;return (t=this.querySelector(a$2.tag))!=null?t:void 0}get offIcon(){var t;return (t=this.querySelector(a$3.tag))!=null?t:void 0}set size(t){this._size=t;let e=this.onIcon,o=this.offIcon;e&&(e.size=this._size),o&&(o.size=this._size);}get size(){return this._size}set shadow(t){this._shadow=t;let e=this.onIcon,o=this.offIcon;e&&e.toggleAttribute("shadow",this._shadow),o&&o.toggleAttribute("shadow",this._shadow);}get shadow(){return this._shadow}get state(){var t;return (t=this.getAttribute("state"))!=null?t:"off"}set state(t){this.setAttribute("state",t),this.setAttribute("aria-pressed",t==="on"?"true":"false");}get ariaLabel(){return this._ariaLabel}set ariaLabel(t){this._ariaLabel=t,this.setAttribute("aria-label",t);}set useCustomImages(t){this._useCustomImages=t,t?this.setAttribute("data-use-custom-images","true"):this.removeAttribute("data-use-custom-images");}setCustomImages(t){let e=this.style,o=t.on.idle?`url(${JSON.stringify(t.on.idle)})`:"none",i=t.on.pressed?`url(${JSON.stringify(t.on.pressed)})`:"none",n=t.off.idle?`url(${JSON.stringify(t.off.idle)})`:"none",b=t.off.pressed?`url(${JSON.stringify(t.off.pressed)})`:"none";e.setProperty("--torch-on-idle",o),e.setProperty("--torch-on-pressed",i),e.setProperty("--torch-off-idle",n),e.setProperty("--torch-off-pressed",b),this.useCustomImages=true;}static create(){return document.createElement(s.tag)}static register(){a$4({[s.tag]:s});}static createStyleElement(){return a$5`:host{display:inline-block;--button-size:32px;--torch-on-idle:none;--torch-on-pressed:none;--torch-off-idle:none;--torch-off-pressed:none}:host[hidden]{display:none}:host button{align-items:center;background:none;background-position:50%;background-repeat:no-repeat;background-size:contain;border:none;cursor:pointer;display:flex;height:var(--button-size);justify-content:center;margin:0;opacity:1;outline:none;padding:0;width:var(--button-size);-webkit-tap-highlight-color:transparent;transform-origin:center;transition:outline .2s ease-in-out,opacity .2s ease-in-out,transform .1s ease-in-out}:host([state=off]) button{opacity:.5}button[data-pressed=true]{transform:scale(.95)}button[data-pressed=false]{transform:scale(1)}:host button:focus-visible{outline:2px solid #06c;outline-offset:2px}:host([data-use-custom-images=true]) ::slotted(*){display:none!important}:host([data-use-custom-images=true][state=on]) button{background-image:var(--torch-on-idle)}:host([data-use-custom-images=true][state=on]) button[data-pressed=true]{background-image:var(--torch-on-pressed)}:host([data-use-custom-images=true][state=off]) button{background-image:var(--torch-off-idle)}:host([data-use-custom-images=true][state=off]) button[data-pressed=true]{background-image:var(--torch-off-pressed)}`}connectedCallback(){if(!this.button)return;if(a$2.register(),a$3.register(),!this.onIcon||!this.offIcon){let o=a$6.fromHex("#FFFFFF"),i=a$2.create(),n=a$3.create();i.toggleAttribute("shadow",this._shadow),n.toggleAttribute("shadow",this._shadow),i.size=this._size,n.size=this._size,n.fill=`#${o.toJSON()}`,i.fill=`#${o.toJSON()}`,this.appendChild(i),this.appendChild(n);}let t="off";(this.getAttribute("state")==="on"||this.getAttribute("state")==="off")&&(t=this.getAttribute("state")),this.state=t;let e=this.button;!this._gestureRecognizer&&e&&(this._gestureRecognizer=new a$7(e),this._gestureRecognizer.addListener(this)),this.setAttribute("aria-label",this._ariaLabel),this.setAttribute("aria-pressed",t==="on"?"true":"false");}attributeChangedCallback(t,e,o){t==="state"&&this.render(o);}render(t){let e=this.onIcon,o=this.offIcon;t==="on"?(o!=null&&(o.style.display="none"),e!=null&&(e.style.display="flex")):(e!=null&&(e.style.display="none"),o!=null&&(o.style.display="flex"));}disconnectedCallback(){this._gestureRecognizer&&(this._gestureRecognizer.removeAllListeners(),this._gestureRecognizer=void 0);}onTap(){this.dispatchEvent(new c({currentState:this.state}));}onPress(){let t=this.button;t&&t.setAttribute("data-pressed","true");}onRelease(){let t=this.button;t&&t.setAttribute("data-pressed","false");}};s.tag="scandit-torch-switch-icon-button",s.observedAttributes=["state"];var g=s;export{g as TorchSwitchIconButton};
@@ -1 +1 @@
1
- export{a as wait}from'../../chunks/chunk-UZWBB65W.js';export{a as waitTransitionEndForElement}from'../../chunks/chunk-2HTI5D6Y.js';export{b as safeAwaitAnimation,a as safeCancelAnimation}from'../../chunks/chunk-EQ6V4W5K.js';export{a as throttle}from'../../chunks/chunk-T3AOBMAS.js';export{a as Timeout}from'../../chunks/chunk-Q7JWDX4U.js';export{a as html,b as renderIf}from'../../chunks/chunk-UWBNF47P.js';export{a as defineCustomElements}from'../../chunks/chunk-3A4KLILV.js';export{a as domIdFromValues}from'../../chunks/chunk-2LSO6JEZ.js';export{a as AsyncStateMachine}from'../../chunks/chunk-LXOZUOZU.js';export{a as ScanditHTMLElement}from'../../chunks/chunk-EV4OEANA.js';export{a as clamp}from'../../chunks/chunk-L2STPTEN.js';export{a as unknownErrorToString}from'../../chunks/chunk-AIRWHLJH.js';export{a as isObject}from'../../chunks/chunk-FGO2SSRS.js';export{a as isWorkerScope}from'../../chunks/chunk-QCRFVRSS.js';export{a as Deferred}from'../../chunks/chunk-O7TZTIHO.js';export{a as css}from'../../chunks/chunk-LSZZVJ6B.js';export{a as fromEntries}from'../../chunks/chunk-RG272MAJ.js';export{a as debounce}from'../../chunks/chunk-R6E4CT22.js';export{b as cancelSafeRequestAnimationFrame,a as safeRequestAnimationFrame}from'../../chunks/chunk-CX2R2XQK.js';
1
+ export{a as throttle}from'../../chunks/chunk-T3AOBMAS.js';export{a as Timeout}from'../../chunks/chunk-Q7JWDX4U.js';export{a as wait}from'../../chunks/chunk-UZWBB65W.js';export{a as waitTransitionEndForElement}from'../../chunks/chunk-2HTI5D6Y.js';export{b as safeAwaitAnimation,a as safeCancelAnimation}from'../../chunks/chunk-EQ6V4W5K.js';export{a as domIdFromValues}from'../../chunks/chunk-2LSO6JEZ.js';export{a as html,b as renderIf}from'../../chunks/chunk-UWBNF47P.js';export{a as ScanditHTMLElement}from'../../chunks/chunk-EV4OEANA.js';export{a as clamp}from'../../chunks/chunk-L2STPTEN.js';export{a as defineCustomElements}from'../../chunks/chunk-3A4KLILV.js';export{a as AsyncStateMachine}from'../../chunks/chunk-LXOZUOZU.js';export{a as unknownErrorToString}from'../../chunks/chunk-AIRWHLJH.js';export{a as isObject}from'../../chunks/chunk-FGO2SSRS.js';export{a as isWorkerScope}from'../../chunks/chunk-QCRFVRSS.js';export{a as Deferred}from'../../chunks/chunk-O7TZTIHO.js';export{a as css}from'../../chunks/chunk-LSZZVJ6B.js';export{a as fromEntries}from'../../chunks/chunk-RG272MAJ.js';export{a as debounce}from'../../chunks/chunk-R6E4CT22.js';export{b as cancelSafeRequestAnimationFrame,a as safeRequestAnimationFrame}from'../../chunks/chunk-CX2R2XQK.js';
@@ -1 +1 @@
1
- export{a as loadPolyfills}from'../../chunks/chunk-BBOKPRKO.js';
1
+ export{a as loadPolyfills}from'../../chunks/chunk-O5D4KVS5.js';
@@ -2,11 +2,11 @@
2
2
  import { Size } from '../../commons/Size.js';
3
3
  import { Optional } from '../../tsHelper.js';
4
4
  import '../../ScanditIcon.js';
5
- import '../../DataCaptureContext-Dvdr7st4.js';
5
+ import '../../DataCaptureContext-LM_Re1B4.js';
6
6
  import '../Serializable.js';
7
7
  import '../../commons/Color.js';
8
8
  import './ScanditHTMLElement.js';
9
- import '../../Camera-DhGjpcjv.js';
9
+ import '../../Camera-BnPnXqAt.js';
10
10
  import '../../commons/Rect.js';
11
11
  import '../../commons/Point.js';
12
12
  import '../privateAccess.js';
@@ -27,9 +27,11 @@ import '../CustomLocationsView.js';
27
27
  import '../View.js';
28
28
  import '../AnchorPositions.js';
29
29
  import '../nativeHandle.js';
30
+ import '../AdditionalLayerPosition.js';
30
31
  import '../../license/OpenSourceSoftwareLicenseInfo.js';
31
32
  import '../../logger.js';
32
33
  import '../FrameReaders/ColorType.js';
34
+ import '../BatteryInterface.js';
33
35
  import '../../LoadingStatus.js';
34
36
  import '../djinni-types/index.js';
35
37
  import '../HtmlElementState.js';
@@ -1,2 +1,2 @@
1
- import {b}from'../../chunks/chunk-A225YZFY.js';import {a as a$1}from'../../chunks/chunk-XR65N6EG.js';async function a(){let[{missingFeatures:t},i]=await Promise.all([b.checkBrowserCompatibility(),b.checkMultithreadingSupport()]);i||(a$1.warn("Multithreading is not supported."),t.includes("crossOriginIsolated")&&a$1.warn("Headers for Multithreading are absent or misconfigured: please check how to configure them properly: https://docs.scandit.com/sdks/web/matrixscan/get-started#enable-browser-multithreading"),t.includes("sharedArrayBuffer")&&a$1.warn("SharedArrayBuffer not supported. Check the requirements here: https://docs.scandit.com/system-requirements#web-sdk"));}
1
+ import {b}from'../../chunks/chunk-YONR3EGV.js';import {a as a$1}from'../../chunks/chunk-XR65N6EG.js';async function a(){let[{missingFeatures:t},i]=await Promise.all([b.checkBrowserCompatibility(),b.checkMultithreadingSupport()]);i||(a$1.warn("Multithreading is not supported."),t.includes("crossOriginIsolated")&&a$1.warn("Headers for Multithreading are absent or misconfigured: please check how to configure them properly: https://docs.scandit.com/sdks/web/matrixscan/get-started#enable-browser-multithreading"),t.includes("sharedArrayBuffer")&&a$1.warn("SharedArrayBuffer not supported. Check the requirements here: https://docs.scandit.com/system-requirements#web-sdk"));}
2
2
  export{a as warnMultithreadingUnavailable};
@@ -1,7 +1,7 @@
1
1
  /// <reference types="emscripten" />
2
2
  import { ImageConverterInstance, ImageBuffer, BitmapWithFormat } from '../private/djinni-types/index.js';
3
- import { W as WorkerFunctions } from '../DataCaptureContext-Dvdr7st4.js';
4
- import '../Camera-DhGjpcjv.js';
3
+ import { W as WorkerFunctions } from '../DataCaptureContext-LM_Re1B4.js';
4
+ import '../Camera-BnPnXqAt.js';
5
5
  import '../commons/Rect.js';
6
6
  import '../private/Serializable.js';
7
7
  import '../commons/Point.js';
@@ -27,9 +27,11 @@ import '../private/CustomLocationsView.js';
27
27
  import '../private/View.js';
28
28
  import '../private/AnchorPositions.js';
29
29
  import '../private/nativeHandle.js';
30
+ import '../private/AdditionalLayerPosition.js';
30
31
  import '../license/OpenSourceSoftwareLicenseInfo.js';
31
32
  import '../logger.js';
32
33
  import '../private/FrameReaders/ColorType.js';
34
+ import '../private/BatteryInterface.js';
33
35
  import '../LoadingStatus.js';
34
36
  import '../private/HtmlElementState.js';
35
37
  import '../commons/SizeWithUnit.js';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="emscripten" />
2
- import { V as ViewInfo } from '../DataCaptureContext-Dvdr7st4.js';
3
- import '../Camera-DhGjpcjv.js';
2
+ import { V as ViewInfo } from '../DataCaptureContext-LM_Re1B4.js';
3
+ import '../Camera-BnPnXqAt.js';
4
4
  import '../commons/Rect.js';
5
5
  import '../private/Serializable.js';
6
6
  import '../commons/Point.js';
@@ -26,9 +26,11 @@ import '../private/CustomLocationsView.js';
26
26
  import '../private/View.js';
27
27
  import '../private/AnchorPositions.js';
28
28
  import '../private/nativeHandle.js';
29
+ import '../private/AdditionalLayerPosition.js';
29
30
  import '../license/OpenSourceSoftwareLicenseInfo.js';
30
31
  import '../logger.js';
31
32
  import '../private/FrameReaders/ColorType.js';
33
+ import '../private/BatteryInterface.js';
32
34
  import '../LoadingStatus.js';
33
35
  import '../private/djinni-types/index.js';
34
36
  import '../private/HtmlElementState.js';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="emscripten" />
2
- import { K as DataCaptureEngine, L as Module, Q as AnyDataCaptureActionMessage, R as AugmentedWorker, S as ModuleHandler, T as DataCaptureCallbackMessage, U as DataCaptureActionMessageKey, X as EngineWorkerResponse } from '../DataCaptureContext-Dvdr7st4.js';
3
- import '../Camera-DhGjpcjv.js';
2
+ import { K as DataCaptureEngine, L as Module, Q as AnyDataCaptureActionMessage, R as AugmentedWorker, S as ModuleHandler, T as DataCaptureCallbackMessage, U as DataCaptureActionMessageKey, X as EngineWorkerResponse } from '../DataCaptureContext-LM_Re1B4.js';
3
+ import '../Camera-BnPnXqAt.js';
4
4
  import '../commons/Rect.js';
5
5
  import '../private/Serializable.js';
6
6
  import '../commons/Point.js';
@@ -26,9 +26,11 @@ import '../private/CustomLocationsView.js';
26
26
  import '../private/View.js';
27
27
  import '../private/AnchorPositions.js';
28
28
  import '../private/nativeHandle.js';
29
+ import '../private/AdditionalLayerPosition.js';
29
30
  import '../license/OpenSourceSoftwareLicenseInfo.js';
30
31
  import '../logger.js';
31
32
  import '../private/FrameReaders/ColorType.js';
33
+ import '../private/BatteryInterface.js';
32
34
  import '../LoadingStatus.js';
33
35
  import '../private/djinni-types/index.js';
34
36
  import '../private/HtmlElementState.js';
@@ -1 +1 @@
1
- export{a as WorkerMain}from'../chunks/chunk-ZWO2PAO7.js';
1
+ export{a as WorkerMain}from'../chunks/chunk-YXXMWHFX.js';
@@ -1,7 +1,7 @@
1
1
  /// <reference types="emscripten" />
2
- import { K as DataCaptureEngine, L as Module } from '../DataCaptureContext-Dvdr7st4.js';
2
+ import { K as DataCaptureEngine, L as Module } from '../DataCaptureContext-LM_Re1B4.js';
3
3
  import { WorkerMain } from './WorkerMain.js';
4
- import '../Camera-DhGjpcjv.js';
4
+ import '../Camera-BnPnXqAt.js';
5
5
  import '../commons/Rect.js';
6
6
  import '../private/Serializable.js';
7
7
  import '../commons/Point.js';
@@ -27,9 +27,11 @@ import '../private/CustomLocationsView.js';
27
27
  import '../private/View.js';
28
28
  import '../private/AnchorPositions.js';
29
29
  import '../private/nativeHandle.js';
30
+ import '../private/AdditionalLayerPosition.js';
30
31
  import '../license/OpenSourceSoftwareLicenseInfo.js';
31
32
  import '../logger.js';
32
33
  import '../private/FrameReaders/ColorType.js';
34
+ import '../private/BatteryInterface.js';
33
35
  import '../LoadingStatus.js';
34
36
  import '../private/djinni-types/index.js';
35
37
  import '../private/HtmlElementState.js';
@@ -1 +1 @@
1
- export{b as InlineWorker,a as workerInstance}from'../chunks/chunk-ECPEKYII.js';
1
+ export{b as InlineWorker,a as workerInstance}from'../chunks/chunk-WBYBTOBZ.js';
@@ -1,13 +1,14 @@
1
1
  /// <reference types="emscripten" />
2
+ import '../private/BatteryInterface.js';
2
3
  import '../LoadingStatus.js';
3
4
  import '../commons/Point.js';
4
5
  import '../commons/Orientation.js';
5
- export { b9 as CreateContextParameters, K as DataCaptureEngine, b8 as LoadLibraryParameters, bc as ProcessFrameParameters, bd as ReportCameraPropertiesParameters, bb as SetFrameSourceParameters, ba as UpdateContextParameters, W as WorkerFunctions } from '../DataCaptureContext-Dvdr7st4.js';
6
+ export { a1 as CreateContextParameters, K as DataCaptureEngine, aJ as LoadLibraryParameters, aT as ProcessFrameParameters, aW as ReportCameraPropertiesParameters, a_ as SetFrameSourceParameters, ba as UpdateContextParameters, W as WorkerFunctions } from '../DataCaptureContext-LM_Re1B4.js';
6
7
  import '../ScanditIcon.js';
7
8
  import '../private/FrameReaders/ColorType.js';
8
9
  import '../private/djinni-types/index.js';
9
10
  import '../private/Serializable.js';
10
- import '../Camera-DhGjpcjv.js';
11
+ import '../Camera-BnPnXqAt.js';
11
12
  import '../commons/Rect.js';
12
13
  import '../commons/Size.js';
13
14
  import '../private/privateAccess.js';
@@ -29,6 +30,7 @@ import '../private/CustomLocationsView.js';
29
30
  import '../private/View.js';
30
31
  import '../private/AnchorPositions.js';
31
32
  import '../private/nativeHandle.js';
33
+ import '../private/AdditionalLayerPosition.js';
32
34
  import '../license/OpenSourceSoftwareLicenseInfo.js';
33
35
  import '../logger.js';
34
36
  import '../private/HtmlElementState.js';
@@ -1 +1 @@
1
- export{a as DataCaptureEngine}from'../chunks/chunk-FQYVZGCE.js';
1
+ export{a as DataCaptureEngine}from'../chunks/chunk-M2ZQCUEL.js';
@@ -1,9 +1,9 @@
1
1
  /// <reference types="emscripten" />
2
- export { G as DataCaptureLoader, E as DataCaptureLoaderOptions } from '../DataCaptureContext-Dvdr7st4.js';
2
+ export { k as DataCaptureLoader, l as DataCaptureLoaderOptions } from '../DataCaptureContext-LM_Re1B4.js';
3
3
  import '../LoadingStatus.js';
4
4
  import '../logger.js';
5
5
  import '../ScanditIcon.js';
6
- import '../Camera-DhGjpcjv.js';
6
+ import '../Camera-BnPnXqAt.js';
7
7
  import '../commons/Rect.js';
8
8
  import '../private/Serializable.js';
9
9
  import '../commons/Point.js';
@@ -28,8 +28,10 @@ import '../private/CustomLocationsView.js';
28
28
  import '../private/View.js';
29
29
  import '../private/AnchorPositions.js';
30
30
  import '../private/nativeHandle.js';
31
+ import '../private/AdditionalLayerPosition.js';
31
32
  import '../license/OpenSourceSoftwareLicenseInfo.js';
32
33
  import '../private/FrameReaders/ColorType.js';
34
+ import '../private/BatteryInterface.js';
33
35
  import '../private/djinni-types/index.js';
34
36
  import '../private/HtmlElementState.js';
35
37
  import '../commons/SizeWithUnit.js';
@@ -1 +1 @@
1
- export{a as DataCaptureLoader}from'../chunks/chunk-QPR2YHD4.js';
1
+ export{a as DataCaptureLoader}from'../chunks/chunk-YJNJGCAN.js';
@@ -2,14 +2,15 @@
2
2
  import '../commons/Orientation.js';
3
3
  import '../commons/Point.js';
4
4
  import '../commons/Rect.js';
5
- export { al as AddNativeOverlayAction, Q as AnyDataCaptureActionMessage, R as AugmentedWorker, aQ as CaptureModeDeserializerInstance, a3 as ConvertToJPEGResultDataCaptureAction, a4 as CreateContextDataCaptureAction, U as DataCaptureActionMessageKey, T as DataCaptureCallbackMessage, an as DataCaptureCallbackMessageKeys, aI as DataCaptureContext, aP as DataCaptureContextDeserializer, aO as DataCaptureContextDeserializerResult, aJ as DataCaptureImageBufferFrameSource, aM as DataCaptureView, aG as DataCaptureWorker, a8 as DeleteFrameDataDataCaptureAction, au as DidTapTrackedBarcode, ac as DisposeDataCaptureAction, aH as EmscriptenClassHandle, X as EngineWorkerResponse, ag as ExtractCentaurusLicenseDataCaptureAction, Y as ExtractCentaurusLicenseResponse, ad as FlushAnalyticsDataCaptureAction, N as GenericHint, aK as GestureListener, aL as GestureRecognizer, ak as GetOpenSourceSoftwareLicenseInfoAction, a0 as GetOpenSourceSoftwareLicenseInfoResponse, aj as GetViewfinderInfoAction, $ as GetViewfinderInfoResponse, b2 as GuidanceHint, b0 as GuidanceHintAnchor, b1 as GuidanceHintStyle, aB as HideGuidanceMessage, as as HideHintWorkerMessage, az as HideToastMessage, a_ as HintAnchor, aY as HintCornerStyle, aU as HintFont, aX as HintHeight, aZ as HintIcon, b6 as HintPresenterV2, ai as HintPresenterV2updateAction, a$ as HintStyle, aV as HintTextAlignment, aW as HintWidth, aa as IsFeatureSupportedAction, ar as IsFeatureSupportedMessage, _ as IsFeatureSupportedResponse, aN as JSONParseable, b5 as LicensedFeature, a2 as LoadLibraryDataCaptureAction, L as Module, S as ModuleHandler, aR as ModuleMirrorAxis, aw as OnFrameProcessingFinishedMessage, av as OnFrameProcessingStartedMessage, ax as OnFrameSkippedMessage, ah as OnTapAction, aF as PayloadForCommand, I as PerformanceMetrics, at as PerformanceMetricsReportMessage, b7 as PlatformHintPresenter, a6 as ProcessFrameDataCaptureAction, am as RemoveNativeOverlayAction, ae as ReportCameraPropertiesDataCaptureAction, a7 as RequestFrameDataDataCaptureAction, Z as RequestFrameDataResponse, a5 as SetFrameSourceDataCaptureAction, af as SetLogLevelDataCaptureAction, aA as ShowGuidanceMessage, ap as ShowHintWorkerMessage, ay as ShowToastMessage, aC as StartUpdateTimerMessage, aD as StopUpdateTimerMessage, ao as SuccessFeedbackWorkerMessage, b4 as ToastHint, b3 as ToastHintStyle, ab as UpdateContextDataCaptureAction, aq as UpdateHintWorkerMessage, aS as Vector, V as ViewInfo, aE as ViewSizeChangedMessage, a9 as VisibilityChangeAction, aT as WasmFrameData, a1 as WorkerResponse } from '../DataCaptureContext-Dvdr7st4.js';
5
+ export { Y as AddNativeOverlayAction, Q as AnyDataCaptureActionMessage, R as AugmentedWorker, Z as BatteryData, _ as CaptureModeDeserializerInstance, $ as ConvertToJPEGResultDataCaptureAction, a0 as CreateContextDataCaptureAction, U as DataCaptureActionMessageKey, T as DataCaptureCallbackMessage, a2 as DataCaptureCallbackMessageKeys, a3 as DataCaptureContext, a4 as DataCaptureContextDeserializer, a5 as DataCaptureContextDeserializerResult, a6 as DataCaptureImageBufferFrameSource, a7 as DataCaptureView, a8 as DataCaptureWorker, a9 as DeleteFrameDataDataCaptureAction, aa as DeviceInterfaceInstance, ab as DidTapTrackedBarcode, ac as DisposeDataCaptureAction, ad as EmscriptenClassHandle, X as EngineWorkerResponse, ae as ExtractCentaurusLicenseDataCaptureAction, af as ExtractCentaurusLicenseResponse, ag as FlushAnalyticsDataCaptureAction, N as GenericHint, ah as GestureListener, ai as GestureRecognizer, aj as GetOpenSourceSoftwareLicenseInfoAction, ak as GetOpenSourceSoftwareLicenseInfoResponse, al as GetViewfinderInfoAction, am as GetViewfinderInfoResponse, an as GuidanceHint, ao as GuidanceHintAnchor, ap as GuidanceHintStyle, aq as HideGuidanceMessage, ar as HideHintWorkerMessage, as as HideToastMessage, at as HintAnchor, au as HintCornerStyle, av as HintFont, aw as HintHeight, ax as HintIcon, ay as HintPresenterV2, az as HintPresenterV2updateAction, aA as HintStyle, aB as HintTextAlignment, aC as HintWidth, aD as IsFeatureSupportedAction, aE as IsFeatureSupportedMessage, aF as IsFeatureSupportedResponse, aG as JSONParseable, aH as LicensedFeature, aI as LoadLibraryDataCaptureAction, L as Module, S as ModuleHandler, aK as ModuleMirrorAxis, aL as OnFrameProcessingFinishedMessage, aM as OnFrameProcessingStartedMessage, aN as OnFrameSkippedMessage, aO as OnTapAction, aP as PayloadForCommand, I as PerformanceMetrics, aQ as PerformanceMetricsReportMessage, aR as PlatformHintPresenter, aS as ProcessFrameDataCaptureAction, aU as RemoveNativeOverlayAction, aV as ReportCameraPropertiesDataCaptureAction, aX as RequestFrameDataDataCaptureAction, aY as RequestFrameDataResponse, aZ as SetFrameSourceDataCaptureAction, a$ as SetLogLevelDataCaptureAction, b0 as ShowGuidanceMessage, b1 as ShowHintWorkerMessage, b2 as ShowToastMessage, b3 as StartUpdateTimerMessage, b4 as StopUpdateTimerMessage, b5 as SuccessFeedbackWorkerMessage, b6 as ToastHint, b7 as ToastHintStyle, b8 as UpdateBatteryInfoDataCaptureAction, b9 as UpdateContextDataCaptureAction, bb as UpdateHintWorkerMessage, bc as Vector, V as ViewInfo, bd as ViewSizeChangedMessage, be as VisibilityChangeAction, bf as WasmFrameData, bg as WorkerResponse } from '../DataCaptureContext-LM_Re1B4.js';
6
6
  import '../LoadingStatus.js';
7
7
  import '../logger.js';
8
+ import '../private/BatteryInterface.js';
8
9
  import '../private/FrameReaders/ColorType.js';
9
10
  import '../private/djinni-types/index.js';
10
11
  import '../private/Serializable.js';
11
12
  import '../commons/Size.js';
12
- import '../Camera-DhGjpcjv.js';
13
+ import '../Camera-BnPnXqAt.js';
13
14
  import '../private/privateAccess.js';
14
15
  import '../DataCaptureContextSettings.js';
15
16
  import '../commons/JSONType.js';
@@ -30,6 +31,7 @@ import '../private/CustomLocationsView.js';
30
31
  import '../private/View.js';
31
32
  import '../private/AnchorPositions.js';
32
33
  import '../private/nativeHandle.js';
34
+ import '../private/AdditionalLayerPosition.js';
33
35
  import '../license/OpenSourceSoftwareLicenseInfo.js';
34
36
  import '../private/HtmlElementState.js';
35
37
  import '../commons/SizeWithUnit.js';
@@ -1 +1 @@
1
- export{h as GuidanceHintAnchor,i as GuidanceHintStyle,g as HintAnchor,e as HintCornerStyle,a as HintFont,d as HintHeight,f as HintIcon,b as HintTextAlignment,c as HintWidth,k as LicensedFeature,j as ToastHintStyle}from'../chunks/chunk-JCP7NQPV.js';
1
+ export{h as GuidanceHintAnchor,i as GuidanceHintStyle,g as HintAnchor,e as HintCornerStyle,a as HintFont,d as HintHeight,f as HintIcon,b as HintTextAlignment,c as HintWidth,k as LicensedFeature,j as ToastHintStyle}from'../chunks/chunk-WFKB322J.js';
@@ -1,7 +1,7 @@
1
1
  /// <reference types="emscripten" />
2
2
  export { WorkerMain } from './WorkerMain.js';
3
- export { al as AddNativeOverlayAction, Q as AnyDataCaptureActionMessage, R as AugmentedWorker, aQ as CaptureModeDeserializerInstance, a3 as ConvertToJPEGResultDataCaptureAction, a4 as CreateContextDataCaptureAction, b9 as CreateContextParameters, U as DataCaptureActionMessageKey, T as DataCaptureCallbackMessage, an as DataCaptureCallbackMessageKeys, aI as DataCaptureContext, aP as DataCaptureContextDeserializer, aO as DataCaptureContextDeserializerResult, K as DataCaptureEngine, aJ as DataCaptureImageBufferFrameSource, G as DataCaptureLoader, E as DataCaptureLoaderOptions, aM as DataCaptureView, aG as DataCaptureWorker, a8 as DeleteFrameDataDataCaptureAction, au as DidTapTrackedBarcode, ac as DisposeDataCaptureAction, aH as EmscriptenClassHandle, X as EngineWorkerResponse, ag as ExtractCentaurusLicenseDataCaptureAction, Y as ExtractCentaurusLicenseResponse, ad as FlushAnalyticsDataCaptureAction, N as GenericHint, aK as GestureListener, aL as GestureRecognizer, ak as GetOpenSourceSoftwareLicenseInfoAction, a0 as GetOpenSourceSoftwareLicenseInfoResponse, aj as GetViewfinderInfoAction, $ as GetViewfinderInfoResponse, b2 as GuidanceHint, b0 as GuidanceHintAnchor, b1 as GuidanceHintStyle, aB as HideGuidanceMessage, as as HideHintWorkerMessage, az as HideToastMessage, a_ as HintAnchor, aY as HintCornerStyle, aU as HintFont, aX as HintHeight, aZ as HintIcon, b6 as HintPresenterV2, ai as HintPresenterV2updateAction, a$ as HintStyle, aV as HintTextAlignment, aW as HintWidth, aa as IsFeatureSupportedAction, ar as IsFeatureSupportedMessage, _ as IsFeatureSupportedResponse, aN as JSONParseable, b5 as LicensedFeature, a2 as LoadLibraryDataCaptureAction, b8 as LoadLibraryParameters, L as Module, S as ModuleHandler, aR as ModuleMirrorAxis, aw as OnFrameProcessingFinishedMessage, av as OnFrameProcessingStartedMessage, ax as OnFrameSkippedMessage, ah as OnTapAction, aF as PayloadForCommand, I as PerformanceMetrics, at as PerformanceMetricsReportMessage, b7 as PlatformHintPresenter, a6 as ProcessFrameDataCaptureAction, bc as ProcessFrameParameters, am as RemoveNativeOverlayAction, ae as ReportCameraPropertiesDataCaptureAction, bd as ReportCameraPropertiesParameters, a7 as RequestFrameDataDataCaptureAction, Z as RequestFrameDataResponse, a5 as SetFrameSourceDataCaptureAction, bb as SetFrameSourceParameters, af as SetLogLevelDataCaptureAction, aA as ShowGuidanceMessage, ap as ShowHintWorkerMessage, ay as ShowToastMessage, aC as StartUpdateTimerMessage, aD as StopUpdateTimerMessage, ao as SuccessFeedbackWorkerMessage, b4 as ToastHint, b3 as ToastHintStyle, ab as UpdateContextDataCaptureAction, ba as UpdateContextParameters, aq as UpdateHintWorkerMessage, aS as Vector, V as ViewInfo, aE as ViewSizeChangedMessage, a9 as VisibilityChangeAction, aT as WasmFrameData, W as WorkerFunctions, a1 as WorkerResponse } from '../DataCaptureContext-Dvdr7st4.js';
4
- import '../Camera-DhGjpcjv.js';
3
+ export { Y as AddNativeOverlayAction, Q as AnyDataCaptureActionMessage, R as AugmentedWorker, Z as BatteryData, _ as CaptureModeDeserializerInstance, $ as ConvertToJPEGResultDataCaptureAction, a0 as CreateContextDataCaptureAction, a1 as CreateContextParameters, U as DataCaptureActionMessageKey, T as DataCaptureCallbackMessage, a2 as DataCaptureCallbackMessageKeys, a3 as DataCaptureContext, a4 as DataCaptureContextDeserializer, a5 as DataCaptureContextDeserializerResult, K as DataCaptureEngine, a6 as DataCaptureImageBufferFrameSource, k as DataCaptureLoader, l as DataCaptureLoaderOptions, a7 as DataCaptureView, a8 as DataCaptureWorker, a9 as DeleteFrameDataDataCaptureAction, aa as DeviceInterfaceInstance, ab as DidTapTrackedBarcode, ac as DisposeDataCaptureAction, ad as EmscriptenClassHandle, X as EngineWorkerResponse, ae as ExtractCentaurusLicenseDataCaptureAction, af as ExtractCentaurusLicenseResponse, ag as FlushAnalyticsDataCaptureAction, N as GenericHint, ah as GestureListener, ai as GestureRecognizer, aj as GetOpenSourceSoftwareLicenseInfoAction, ak as GetOpenSourceSoftwareLicenseInfoResponse, al as GetViewfinderInfoAction, am as GetViewfinderInfoResponse, an as GuidanceHint, ao as GuidanceHintAnchor, ap as GuidanceHintStyle, aq as HideGuidanceMessage, ar as HideHintWorkerMessage, as as HideToastMessage, at as HintAnchor, au as HintCornerStyle, av as HintFont, aw as HintHeight, ax as HintIcon, ay as HintPresenterV2, az as HintPresenterV2updateAction, aA as HintStyle, aB as HintTextAlignment, aC as HintWidth, aD as IsFeatureSupportedAction, aE as IsFeatureSupportedMessage, aF as IsFeatureSupportedResponse, aG as JSONParseable, aH as LicensedFeature, aI as LoadLibraryDataCaptureAction, aJ as LoadLibraryParameters, L as Module, S as ModuleHandler, aK as ModuleMirrorAxis, aL as OnFrameProcessingFinishedMessage, aM as OnFrameProcessingStartedMessage, aN as OnFrameSkippedMessage, aO as OnTapAction, aP as PayloadForCommand, I as PerformanceMetrics, aQ as PerformanceMetricsReportMessage, aR as PlatformHintPresenter, aS as ProcessFrameDataCaptureAction, aT as ProcessFrameParameters, aU as RemoveNativeOverlayAction, aV as ReportCameraPropertiesDataCaptureAction, aW as ReportCameraPropertiesParameters, aX as RequestFrameDataDataCaptureAction, aY as RequestFrameDataResponse, aZ as SetFrameSourceDataCaptureAction, a_ as SetFrameSourceParameters, a$ as SetLogLevelDataCaptureAction, b0 as ShowGuidanceMessage, b1 as ShowHintWorkerMessage, b2 as ShowToastMessage, b3 as StartUpdateTimerMessage, b4 as StopUpdateTimerMessage, b5 as SuccessFeedbackWorkerMessage, b6 as ToastHint, b7 as ToastHintStyle, b8 as UpdateBatteryInfoDataCaptureAction, b9 as UpdateContextDataCaptureAction, ba as UpdateContextParameters, bb as UpdateHintWorkerMessage, bc as Vector, V as ViewInfo, bd as ViewSizeChangedMessage, be as VisibilityChangeAction, bf as WasmFrameData, W as WorkerFunctions, bg as WorkerResponse } from '../DataCaptureContext-LM_Re1B4.js';
4
+ import '../Camera-BnPnXqAt.js';
5
5
  import '../commons/Rect.js';
6
6
  import '../private/Serializable.js';
7
7
  import '../commons/Point.js';
@@ -27,9 +27,11 @@ import '../private/CustomLocationsView.js';
27
27
  import '../private/View.js';
28
28
  import '../private/AnchorPositions.js';
29
29
  import '../private/nativeHandle.js';
30
+ import '../private/AdditionalLayerPosition.js';
30
31
  import '../license/OpenSourceSoftwareLicenseInfo.js';
31
32
  import '../logger.js';
32
33
  import '../private/FrameReaders/ColorType.js';
34
+ import '../private/BatteryInterface.js';
33
35
  import '../LoadingStatus.js';
34
36
  import '../private/djinni-types/index.js';
35
37
  import '../private/HtmlElementState.js';
@@ -1 +1 @@
1
- export{a as DataCaptureLoader}from'../chunks/chunk-QPR2YHD4.js';export{a as WorkerMain}from'../chunks/chunk-ZWO2PAO7.js';export{a as DataCaptureEngine}from'../chunks/chunk-FQYVZGCE.js';export{h as GuidanceHintAnchor,i as GuidanceHintStyle,g as HintAnchor,e as HintCornerStyle,a as HintFont,d as HintHeight,f as HintIcon,b as HintTextAlignment,c as HintWidth,k as LicensedFeature,j as ToastHintStyle}from'../chunks/chunk-JCP7NQPV.js';
1
+ export{a as DataCaptureLoader}from'../chunks/chunk-YJNJGCAN.js';export{a as WorkerMain}from'../chunks/chunk-YXXMWHFX.js';export{a as DataCaptureEngine}from'../chunks/chunk-M2ZQCUEL.js';export{h as GuidanceHintAnchor,i as GuidanceHintStyle,g as HintAnchor,e as HintCornerStyle,a as HintFont,d as HintHeight,f as HintIcon,b as HintTextAlignment,c as HintWidth,k as LicensedFeature,j as ToastHintStyle}from'../chunks/chunk-WFKB322J.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scandit/web-datacapture-core",
3
- "version": "8.2.0",
3
+ "version": "8.3.0-beta.1",
4
4
  "description": "Scandit Data Capture SDK for the Web",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "sideEffects": false,
@@ -117,9 +117,11 @@
117
117
  "postbuild-coverage": "tsx --tsconfig tsconfig.node.json postbuild.ts",
118
118
  "postbuild-dev": "tsx --tsconfig tsconfig.node.json postbuild.ts",
119
119
  "clean": "rm -rf build/* coverage/* .nyc_output/*",
120
- "test": "jest",
121
- "test-ci": "jest --ci",
122
- "test-ci-coverage": "jest --ci --coverage --silent"
120
+ "test": "vitest run",
121
+ "test-ci": "vitest run",
122
+ "test-ci-coverage": "vitest run --coverage",
123
+ "check": "biome check .",
124
+ "check-ci": "biome ci --diagnostic-level=error ."
123
125
  },
124
126
  "peerDependencies": {
125
127
  "electron": ">= 28"
@@ -133,11 +135,9 @@
133
135
  },
134
136
  "dependencies": {
135
137
  "@types/emscripten": "1.40.1",
136
- "@types/howler": "2.2.12",
137
138
  "@types/offscreencanvas": "2019.7.3",
138
139
  "@types/ua-parser-js": "0.7.39",
139
140
  "csstype": "3.1.3",
140
- "howler": "2.2.4",
141
141
  "ua-parser-js": "1.0.40",
142
142
  "wasm-feature-detect": "1.8.0"
143
143
  }
@@ -1,2 +0,0 @@
1
- import {a as a$2}from'./chunk-KXAJHLEO.js';import {a as a$3}from'./chunk-AAEQZ45T.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((J,le)=>{(function(O,w){var be="1.0.40",V="",_="?",q="function",M="undefined",Q="object",K="string",ee="major",i="model",t="name",e="type",o="vendor",n="version",A="architecture",W="console",b="mobile",u="tablet",k="smarttv",E="wearable",ie="embedded",Y=500,z="Amazon",I="Apple",ce="ASUS",ue="BlackBerry",F="Browser",X="Chrome",pe="Edge",G="Firefox",j="Google",$="Huawei",a="LG",s="Microsoft",r="Motorola",d="Opera",g="Samsung",h="Sharp",x="Sony",y="Xiaomi",B="Zebra",oe="Facebook",P="Chromium OS",L="Mac OS",te=" Browser",ne=function(p,m){var c={};for(var v in p)m[v]&&m[v].length%2===0?c[v]=m[v].concat(p[v]):c[v]=p[v];return c},N=function(p){for(var m={},c=0;c<p.length;c++)m[p[c].toUpperCase()]=p[c];return m},D=function(p,m){return typeof p===K?R(m).indexOf(R(p))!==-1:false},R=function(p){return p.toLowerCase()},re=function(p){return typeof p===K?p.replace(/[^\d\.]/g,V).split(".")[0]:w},we=function(p,m){if(typeof p===K)return p=p.replace(/^\s\s*/,V),typeof m===M?p:p.substring(0,Y)},Z=function(p,m){for(var c=0,v,U,C,f,l,T;c<m.length&&!l;){var de=m[c],ge=m[c+1];for(v=U=0;v<de.length&&!l&&de[v];)if(l=de[v++].exec(p),l)for(C=0;C<ge.length;C++)T=l[++U],f=ge[C],typeof f===Q&&f.length>0?f.length===2?typeof f[1]==q?this[f[0]]=f[1].call(this,T):this[f[0]]=f[1]:f.length===3?typeof f[1]===q&&!(f[1].exec&&f[1].test)?this[f[0]]=T?f[1].call(this,T,f[2]):w:this[f[0]]=T?T.replace(f[1],f[2]):w:f.length===4&&(this[f[0]]=T?f[3].call(this,T.replace(f[1],f[2])):w):this[f]=T||w;c+=2;}},ae=function(p,m){for(var c in m)if(typeof m[c]===Q&&m[c].length>0){for(var v=0;v<m[c].length;v++)if(D(m[c][v],p))return c===_?w:c}else if(D(m[c],p))return c===_?w:c;return m.hasOwnProperty("*")?m["*"]:p},Te={"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"},fe={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[n,[t,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[n,[t,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[t,n],[/opios[\/ ]+([\w\.]+)/i],[n,[t,d+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[n,[t,d+" GX"]],[/\bopr\/([\w\.]+)/i],[n,[t,d]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[n,[t,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[n,[t,"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],[t,n],[/quark(?:pc)?\/([-\w\.]+)/i],[n,[t,"Quark"]],[/\bddg\/([\w\.]+)/i],[n,[t,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[n,[t,"UC"+F]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[n,[t,"WeChat"]],[/konqueror\/([\w\.]+)/i],[n,[t,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[n,[t,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[n,[t,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[n,[t,"Smart Lenovo "+F]],[/(avast|avg)\/([\w\.]+)/i],[[t,/(.+)/,"$1 Secure "+F],n],[/\bfocus\/([\w\.]+)/i],[n,[t,G+" Focus"]],[/\bopt\/([\w\.]+)/i],[n,[t,d+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[n,[t,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[n,[t,"Dolphin"]],[/coast\/([\w\.]+)/i],[n,[t,d+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[n,[t,"MIUI"+te]],[/fxios\/([\w\.-]+)/i],[n,[t,G]],[/\bqihoobrowser\/?([\w\.]*)/i],[n,[t,"360"]],[/\b(qq)\/([\w\.]+)/i],[[t,/(.+)/,"$1Browser"],n],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[t,/(.+)/,"$1"+te],n],[/samsungbrowser\/([\w\.]+)/i],[n,[t,g+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[n,[t,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[t,"Sogou Mobile"],n],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[t,n],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[t],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[n,t],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[t,oe],n],[/(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],[t,n],[/\bgsa\/([\w\.]+) .*safari\//i],[n,[t,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[n,[t,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[n,[t,X+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[t,X+" WebView"],n],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[n,[t,"Android "+F]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[t,n],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[n,[t,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[n,t],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[t,[n,ae,Te]],[/(webkit|khtml)\/([\w\.]+)/i],[t,n],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[t,"Netscape"],n],[/(wolvic|librewolf)\/([\w\.]+)/i],[t,n],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[n,[t,G+" 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],[t,[n,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[t,[n,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[A,"amd64"]],[/(ia32(?=;))/i],[[A,R]],[/((?:i[346]|x)86)[;\)]/i],[[A,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/windows (ce|mobile); ppc;/i],[[A,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[A,/ower/,V,R]],[/(sun4\w)[;\)]/i],[[A,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[A,R]]],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],[i,[o,g],[e,u]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[i,[o,g],[e,b]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[i,[o,I],[e,b]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[i,[o,I],[e,u]],[/(macintosh);/i],[i,[o,I]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[i,[o,h],[e,b]],[/(?:honor)([-\w ]+)[;\)]/i],[i,[o,"Honor"],[e,b]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[i,[o,$],[e,u]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[i,[o,$],[e,b]],[/\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],[[i,/_/g," "],[o,y],[e,b]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[i,/_/g," "],[o,y],[e,u]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[i,[o,"OPPO"],[e,b]],[/\b(opd2\d{3}a?) bui/i],[i,[o,"OPPO"],[e,u]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[i,[o,"Vivo"],[e,b]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[i,[o,"Realme"],[e,b]],[/\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],[i,[o,r],[e,b]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[i,[o,r],[e,u]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[i,[o,a],[e,u]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[i,[o,a],[e,b]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[i,[o,"Lenovo"],[e,u]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[i,/_/g," "],[o,"Nokia"],[e,b]],[/(pixel c)\b/i],[i,[o,j],[e,u]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[i,[o,j],[e,b]],[/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],[i,[o,x],[e,b]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[i,"Xperia Tablet"],[o,x],[e,u]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[i,[o,"OnePlus"],[e,b]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[i,[o,z],[e,u]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[i,/(.+)/g,"Fire Phone $1"],[o,z],[e,b]],[/(playbook);[-\w\),; ]+(rim)/i],[i,o,[e,u]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[i,[o,ue],[e,b]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[i,[o,ce],[e,u]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[i,[o,ce],[e,b]],[/(nexus 9)/i],[i,[o,"HTC"],[e,u]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[o,[i,/_/g," "],[e,b]],[/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],[i,[o,"TCL"],[e,u]],[/(itel) ((\w+))/i],[[o,R],i,[e,ae,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[i,[o,"Acer"],[e,u]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[i,[o,"Meizu"],[e,b]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[i,[o,"Ulefone"],[e,b]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[i,[o,"Energizer"],[e,b]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[i,[o,"Cat"],[e,b]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[i,[o,"Smartfren"],[e,b]],[/droid.+; (a(?:015|06[35]|142p?))/i],[i,[o,"Nothing"],[e,b]],[/(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,i,[e,b]],[/(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,i,[e,u]],[/(surface duo)/i],[i,[o,s],[e,u]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[i,[o,"Fairphone"],[e,b]],[/(u304aa)/i],[i,[o,"AT&T"],[e,b]],[/\bsie-(\w*)/i],[i,[o,"Siemens"],[e,b]],[/\b(rct\w+) b/i],[i,[o,"RCA"],[e,u]],[/\b(venue[\d ]{2,7}) b/i],[i,[o,"Dell"],[e,u]],[/\b(q(?:mv|ta)\w+) b/i],[i,[o,"Verizon"],[e,u]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[i,[o,"Barnes & Noble"],[e,u]],[/\b(tm\d{3}\w+) b/i],[i,[o,"NuVision"],[e,u]],[/\b(k88) b/i],[i,[o,"ZTE"],[e,u]],[/\b(nx\d{3}j) b/i],[i,[o,"ZTE"],[e,b]],[/\b(gen\d{3}) b.+49h/i],[i,[o,"Swiss"],[e,b]],[/\b(zur\d{3}) b/i],[i,[o,"Swiss"],[e,u]],[/\b((zeki)?tb.*\b) b/i],[i,[o,"Zeki"],[e,u]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[o,"Dragon Touch"],i,[e,u]],[/\b(ns-?\w{0,9}) b/i],[i,[o,"Insignia"],[e,u]],[/\b((nxa|next)-?\w{0,9}) b/i],[i,[o,"NextBook"],[e,u]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[o,"Voice"],i,[e,b]],[/\b(lvtel\-)?(v1[12]) b/i],[[o,"LvTel"],i,[e,b]],[/\b(ph-1) /i],[i,[o,"Essential"],[e,b]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[i,[o,"Envizen"],[e,u]],[/\b(trio[-\w\. ]+) b/i],[i,[o,"MachSpeed"],[e,u]],[/\btu_(1491) b/i],[i,[o,"Rotor"],[e,u]],[/(shield[\w ]+) b/i],[i,[o,"Nvidia"],[e,u]],[/(sprint) (\w+)/i],[o,i,[e,b]],[/(kin\.[onetw]{3})/i],[[i,/\./g," "],[o,s],[e,b]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[i,[o,B],[e,u]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[i,[o,B],[e,b]],[/smart-tv.+(samsung)/i],[o,[e,k]],[/hbbtv.+maple;(\d+)/i],[[i,/^/,"SmartTV"],[o,g],[e,k]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[o,a],[e,k]],[/(apple) ?tv/i],[o,[i,I+" TV"],[e,k]],[/crkey/i],[[i,X+"cast"],[o,j],[e,k]],[/droid.+aft(\w+)( bui|\))/i],[i,[o,z],[e,k]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[i,[o,h],[e,k]],[/(bravia[\w ]+)( bui|\))/i],[i,[o,x],[e,k]],[/(mitv-\w{5}) bui/i],[i,[o,y],[e,k]],[/Hbbtv.*(technisat) (.*);/i],[o,i,[e,k]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[o,we],[i,we],[e,k]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[e,k]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[o,i,[e,W]],[/droid.+; (shield) bui/i],[i,[o,"Nvidia"],[e,W]],[/(playstation [345portablevi]+)/i],[i,[o,x],[e,W]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[i,[o,s],[e,W]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[i,[o,g],[e,E]],[/((pebble))app/i],[o,i,[e,E]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[i,[o,I],[e,E]],[/droid.+; (glass) \d/i],[i,[o,j],[e,E]],[/droid.+; (wt63?0{2,3})\)/i],[i,[o,B],[e,E]],[/droid.+; (glass) \d/i],[i,[o,j],[e,E]],[/(pico) (4|neo3(?: link|pro)?)/i],[o,i,[e,E]],[/; (quest( \d| pro)?)/i],[i,[o,oe],[e,E]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[o,[e,ie]],[/(aeobc)\b/i],[i,[o,z],[e,ie]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[i,[e,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[i,[e,u]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[e,u]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[e,b]],[/(android[-\w\. ]{0,9});.+buil/i],[i,[o,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[n,[t,pe+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[t,n],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[n,[t,"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],[t,n],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[n,t]],os:[[/microsoft (windows) (vista|xp)/i],[t,n],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[t,[n,ae,me]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[n,ae,me],[t,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[n,/_/g,"."],[t,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[t,L],[n,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[n,t],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[t,n],[/\(bb(10);/i],[n,[t,ue]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[n,[t,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[n,[t,G+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[n,[t,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[n,[t,"watchOS"]],[/crkey\/([\d\.]+)/i],[n,[t,X+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[t,P],n],[/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],[t,n],[/(sunos) ?([\w\.\d]*)/i],[[t,"Solaris"],n],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[t,n]]},S=function(p,m){if(typeof p===Q&&(m=p,p=w),!(this instanceof S))return new S(p,m).getResult();var c=typeof O!==M&&O.navigator?O.navigator:w,v=p||(c&&c.userAgent?c.userAgent:V),U=c&&c.userAgentData?c.userAgentData:w,C=m?ne(fe,m):fe,f=c&&c.userAgent==v;return this.getBrowser=function(){var l={};return l[t]=w,l[n]=w,Z.call(l,v,C.browser),l[ee]=re(l[n]),f&&c&&c.brave&&typeof c.brave.isBrave==q&&(l[t]="Brave"),l},this.getCPU=function(){var l={};return l[A]=w,Z.call(l,v,C.cpu),l},this.getDevice=function(){var l={};return l[o]=w,l[i]=w,l[e]=w,Z.call(l,v,C.device),f&&!l[e]&&U&&U.mobile&&(l[e]=b),f&&l[i]=="Macintosh"&&c&&typeof c.standalone!==M&&c.maxTouchPoints&&c.maxTouchPoints>2&&(l[i]="iPad",l[e]=u),l},this.getEngine=function(){var l={};return l[t]=w,l[n]=w,Z.call(l,v,C.engine),l},this.getOS=function(){var l={};return l[t]=w,l[n]=w,Z.call(l,v,C.os),f&&!l[t]&&U&&U.platform&&U.platform!="Unknown"&&(l[t]=U.platform.replace(/chrome os/i,P).replace(/macos/i,L)),l},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(l){return v=typeof l===K&&l.length>Y?we(l,Y):l,this},this.setUA(v),this};S.VERSION=be,S.BROWSER=N([t,n,ee]),S.CPU=N([A]),S.DEVICE=N([i,o,e,W,b,k,u,E,ie]),S.ENGINE=S.OS=N([t,n]),typeof J!==M?(typeof le!==M&&le.exports&&(J=le.exports=S),J.UAParser=S):typeof define===q&&define.amd?define(function(){return S}):typeof O!==M&&(O.UAParser=S);var H=typeof O!==M&&(O.jQuery||O.Zepto);if(H&&!H.ua){var se=new S;H.ua=se.getResult(),H.ua.get=function(){return se.getUA()},H.ua.set=function(p){se.setUA(p);var m=se.getResult();for(var c in m)H.ua[c]=m[c];};}})(typeof window=="object"?window:J);});var Ce=b(Ae(),1);var Re=(_=>(_.Standalone="standalone",_.Fullscreen="fullscreen",_.MinimalUI="minimal-ui",_.Browser="browser",_))(Re||{}),Ee;($=>{let O;function w(){return O==null&&(O=new Ce.default(navigator.userAgent)),O}$.getUserAgentInfo=w;function be(){var r;if("orientation"in window)return false;let a="(any-pointer: coarse)",s=(r=window.matchMedia)==null?void 0:r.call(window,a);return navigator.maxTouchPoints===0||(s==null?void 0:s.media)===a&&!(s!=null&&s.matches)}$.isDesktopDevice=be;function V(){return w().getDevice().model==="iPhone"}$.isIPhone=V;function _(){var h,x,y,B;let a=w(),s=(x=(h=a.getOS().name)==null?void 0:h.toLowerCase())!=null?x:"",r=a.getDevice(),d=(B=(y=r.model)==null?void 0:y.toLowerCase())!=null?B:"",g=r.type;return s.includes("ios")&&(g==="tablet"||d.includes("ipad"))}$.isIPad=_;function q(){var g,h,x,y;let a=(h=(g=w().getOS().name)==null?void 0:g.toLowerCase())!=null?h:"",s=w().getDevice(),r=s.type,d=(y=(x=s.model)==null?void 0:x.toLowerCase())!=null?y:"";return a.includes("mac")&&(r==="laptop"||d.includes("macintosh"))}$.isMacBook=q;function M(){return V()||_()||q()}$.isAppleDevice=M;function Q(){let a=w().getOS();return a.name==="iOS"&&a.version!=null&&a.version.localeCompare("16.3",void 0,{numeric:true})>=0}$.isIOSDeviceWithExtendedCameraAccess=Q;function K(){return "document"in window?window.document.createElement("canvas"):null}$.getCanvas=K;function ee(a){return a.name==="iOS"&&a.version!=null&&["11.2.2","11.2.5","11.2.6"].includes(a.version)}async function i(){return c()}$.hasSIMDSupport=i;async function t(){return d()}$.hasThreadsSupport=t;function e$1(a,s,r){let d=a[s[0]];return d==null?false:s.length===1?typeof d===r:(typeof d=="function"||typeof d=="object")&&e$1(d,s.slice(1),r)}function o(){var h;let a=true,s=null,r=null,d=null,g=null;try{if(s=$.getCanvas(),r=$.getCanvas(),d=s==null?void 0:s.getContext("webgl"),g=r==null?void 0:r.getContext("experimental-webgl"),!e$1(window,["WebGLRenderingContext"],"function")||d==null&&g==null)throw new Error("WebGLRenderingContext is not supported")}catch{a=false;}finally{for(let x of [d,g])typeof(x==null?void 0:x.getExtension)=="function"&&((h=x.getExtension("WEBGL_lose_context"))==null||h.loseContext());d=null,g=null,s=null,r=null;}return a}function n(){let a=true,s=true,r=new Set;location.protocol.startsWith("http")||r.add("httpProtocol"),e$1(window,["isSecureContext"],"boolean")&&!window.isSecureContext&&r.add("secureContext"),!e$1(navigator,["mediaDevices","getUserMedia"],"function")&&!e$1(navigator,["enumerateDevices"],"function")&&!e$1(window,["MediaStreamTrack","getSources"],"function")&&(r.add("mediaDevices"),a=false),e$1(window,["Worker"],"function")||(r.add("webWorkers"),a=false,s=false),e$1(window,["WebAssembly"],"object")||(r.add("webAssembly"),a=false,s=false),e$1(window,["Blob"],"function")||(r.add("blob"),a=false,s=false),e$1(window,["URL","createObjectURL"],"function")||(r.add("urlObject"),a=false,s=false),e$1(window,["OffscreenCanvas"],"function")||r.add("offscreenCanvas"),o()||r.add("webGL");let d=w().getOS();return ee(d)&&(r.add("webAssemblyErrorFree"),a=false,s=false),b$1()||r.add("sharedArrayBuffer"),a$1()||r.add("crossOriginIsolated"),F()||r.add("animationApi"),{fullSupport:a,scannerSupport:s,missingFeatures:[...r]}}$.checkBrowserCompatibility=n;async function A(){return e()}$.checkMultithreadingSupport=A;async function W(){let a="scandit-device-id",s=a$2.getInstanceFor("localStorage"),r=s.getItem(a);if(r!=null&&r!=="")return r;let g=await a$3().get(a);if(r=g==null?void 0:g.value,r!=null&&r!=="")return s.setItem(a,r),r;let h=new Uint8Array(20);return crypto.getRandomValues(h),r=[...h].map(x=>{let y=x.toString(16);return y.length===1?`0${y}`:y}).join(""),s.setItem(a,r),r}$.getDeviceId=W;function b(a){return a instanceof HTMLElement||a!=null&&typeof a=="object"&&typeof a.tagName=="string"}$.isValidHTMLElement=b;function u(){var d,g;let a=w().getOS();if(a.name!=="iOS")return true;let[s,r]=(g=(d=a.version)==null?void 0:d.split(".").map(Number))!=null?g:[];return s>14||s===14&&r>=6}$.isSupportedIOSVersion=u;function k(){var a,s;return (s=(a=w().getBrowser().name)==null?void 0:a.toLowerCase().includes("safari"))!=null?s:false}$.isSafari=k;function E(){var s,r;return /iphone|ipod|ipad/.test((r=(s=w().getDevice().model)==null?void 0:s.toLowerCase())!=null?r:"")&&!k()}$.isIosWebView=E;async function ie(){var s;return ((s=w().getOS().name)==null?void 0:s.toLowerCase())!=="android"?false:w().getUA().includes("wv")?true:[...(await fetch(document.location.toString(),{method:"HEAD"})).headers].some(([r])=>r.toLowerCase()==="x-requested-with")}$.isAndroidWebView=ie;function Y(){return w().getOS().name==="Windows"}$.isWindows=Y;function z(){return w().getBrowser().name==="Firefox"}$.isFirefox=z;function I(){if("navigator"in globalThis){for(let a of ["vibrate","webkitVibrate","msVibrate","mozVibrate"])if(typeof navigator[a]=="function")return navigator[a]}}$.getSupportedVibrationMethod=I;function ce(){return I()!=null&&!be()&&!Y()&&!z()}$.isVibrationAvailable=ce;function ue(){return w().getOS().name==="iOS"}$.isIOS=ue;function F(){return typeof globalThis.Animation<"u"&&typeof globalThis.KeyframeEffect<"u"&&typeof globalThis.Element.prototype.animate<"u"}$.isAnimationApiSupported=F;function X(){return "virtualKeyboard"in navigator}$.hasVirtualKeyboardSupport=X;function pe(a){var d;let s=`(display-mode: ${a})`,r=(d=globalThis.matchMedia)==null?void 0:d.call(globalThis,s);return (r==null?void 0:r.matches)===true?true:a==="standalone"&&typeof navigator=="object"&&"standalone"in navigator&&typeof navigator.standalone=="boolean"?navigator.standalone===true:false}$.isPwaDisplayMode=pe;function G(a,s,r){let d=P=>P.split(".").map(L=>Number.parseInt(L,10)||0),g=d(a),h=d(s),x=d(r),y=(P,L)=>{var ne,N;let te=Math.max(P.length,L.length);for(let D=0;D<te;D++){let R=(ne=P[D])!=null?ne:0,re=(N=L[D])!=null?N:0;if(R>re)return 1;if(R<re)return -1}return 0},B=y(g,h)>=0,oe=y(g,x)<0;return B&&oe}function j(){let s="26.3";if(M()){let r=w(),d=r.getOS(),g=r.getBrowser(),h=k()?g.version:d.version;return h?G(h,"26",s):false}return false}$.isFixedMemoryRequired=j;})(Ee||(Ee={}));
2
- export{Re as a,Ee as b};
@@ -1 +0,0 @@
1
- import {a as a$3}from'./chunk-EQRBQJYM.js';import {c,a as a$1,b}from'./chunk-JFRSUCMO.js';import {a as a$2}from'./chunk-GHTCNOQN.js';import {e}from'./chunk-SYGWA3T6.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$1){var i;let{height:t,width:n}=this.getResizedImageDimensions(e$1.naturalWidth,e$1.naturalHeight);this.canvasContext.canvas.width=n,this.canvasContext.canvas.height=t,this.canvasContext.drawImage(e$1,0,0,n,t);let r={data:this.canvasContext.getImageData(0,0,n,t).data,frameId:e(),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 C=a;export{C as a};
@@ -1 +0,0 @@
1
- import {a as a$9}from'./chunk-U7ETOWGJ.js';import {b as b$2}from'./chunk-QUBJJDLC.js';import {a as a$a}from'./chunk-DGIQ3GF7.js';import {a as a$j}from'./chunk-UOQFOEG6.js';import {a as a$b}from'./chunk-TPHGDMKG.js';import {b,a as a$4}from'./chunk-XYZYNUX3.js';import {a as a$h}from'./chunk-ACF5LYP7.js';import {a as a$e}from'./chunk-DTREAYZQ.js';import {a as a$g}from'./chunk-XIAF6V7E.js';import {a as a$c}from'./chunk-KYNYQBNF.js';import {a as a$f}from'./chunk-GPPCTFZF.js';import {a as a$7}from'./chunk-RSQRPDVQ.js';import {a as a$l}from'./chunk-Y7V35LNT.js';import {b as b$1}from'./chunk-24MGHMOY.js';import {a}from'./chunk-UQVVJP5Z.js';import {a as a$6}from'./chunk-IJQG3OU6.js';import {a as a$8}from'./chunk-I6SWF3FQ.js';import {a as a$3}from'./chunk-N5YZEC56.js';import {a as a$2}from'./chunk-VJB527QZ.js';import {a as a$1}from'./chunk-GHTCNOQN.js';import {a as a$d}from'./chunk-UWBNF47P.js';import {g}from'./chunk-SYGWA3T6.js';import {a as a$n}from'./chunk-E4XJ4GKD.js';import {a as a$k}from'./chunk-QOCHMKNY.js';import {a as a$5}from'./chunk-KAFNKP6O.js';import {a as a$i}from'./chunk-XR65N6EG.js';import {a as a$m}from'./chunk-WUHKODFA.js';var P="core.camera.recovery",q=class ${constructor(){this.focusGesture=a.focusGesture;this.zoomGesture=a.zoomGesture;this._scanAreaMargins=a.scanAreaMargins;this._pointOfInterest=a.pointOfInterest;this._logoStyle=a.logoStyle;this._logoAnchor=a.logoAnchor;this._logoOffset=a.logoOffset;this._context=null;this.overlays=new Set;this.controls=new Set;this.frameSourceListener={didChangeState:this.onFrameSourceChange.bind(this)};this._previewCamera=null;this.isConnected=false;this.controlsElement=void 0;this.frozenFrameCanvas=document.createElement("canvas");this.listeners=[];this.isVideoElementDetached=false;this.orientation="portrait";this.hiddenProperties={stopVideoTracksOnVisibilityChange:true,freezeFrameWhenStoppingFrameSource:true};this.orientationObserver=new b;this.onOrientationChangeListener=this.onOrientationChange.bind(this);this.onHintPresenterUpdateHandler=this.onHintPresenterUpdate.bind(this);this.onViewFinderUpdateRequestedHandler=this.onViewFinderUpdateRequested.bind(this);this.onWorkerMessageHandler=this.onWorkerMessage.bind(this);this.htmlElementDidChangeHandler=this.htmlElementDidChange.bind(this);this.htmlElementDisconnectedHandler=this.htmlElementDisconnected.bind(this);this.notificationPresenter=null;this.visibilityListener=this.onVisibilityChange.bind(this),this.cameraRecoveryListener=this.cameraRecovery.bind(this),a$1.getInstance().updateIfMissing(a$2);}get videoElement(){return g.instance().getVideoElement()}get scanAreaMargins(){return this._scanAreaMargins}set scanAreaMargins(e){var t;this._scanAreaMargins=e,(t=this.privateContext)==null||t.update();}get pointOfInterest(){return this._pointOfInterest}set pointOfInterest(e){var t;this._pointOfInterest=e,(t=this.privateContext)==null||t.update();}get logoStyle(){return this._logoStyle}set logoStyle(e){var t;this._logoStyle=e,(t=this.privateContext)==null||t.update();}get logoAnchor(){return this._logoAnchor}set logoAnchor(e){var t;this._logoAnchor=e,(t=this.privateContext)==null||t.update();}get logoOffset(){return this._logoOffset}set logoOffset(e){var t;this._logoOffset=e,(t=this.privateContext)==null||t.update();}get cameraRecoveryText(){return a$1.getInstance().get(P)}get width(){var e,t;return Math.round((t=(e=this.htmlElementState)==null?void 0:e.width)!=null?t:0)}get height(){var e,t;return Math.round((t=(e=this.htmlElementState)==null?void 0:e.height)!=null?t:0)}get canvasDrawer(){return !this._canvasDrawer&&this.canvasElement!=null&&(this._canvasDrawer=new b$1(this.canvasElement),this._canvasDrawer.startObservingCanvasResize()),this._canvasDrawer}get privateContext(){return this._context}static async forContext(e){let t=new $;return await t.setContext(e),t}showProgressBar(){var e;(e=this.loadingOverlay)==null||e.show();}hideProgressBar(){var e;(e=this.loadingOverlay)==null||e.hide();}setProgressBarPercentage(e){this.loadingOverlay&&(this.loadingOverlay.progress=e);}setProgressBarMessage(e){this.loadingOverlay&&(this.loadingOverlay.message=e);}getContext(){return this._context}async setContext(e){var t,i,n;if(this._context=e,e){if(this.overlays.size>0&&!((t=this.privateContext)!=null&&t.hasModes()))throw new Error(["Cannot assign this view to this context. This view has overlays but the context does not have any mode attached matching these overlays.","Remove the overlays first before attaching the view to the context, or add the corresponding mode to the context before attaching this view."].join(" "));await e.setView(this),(i=this.privateContext)==null||i.subscribeToWorkerMessages(this.onWorkerMessageHandler),(n=this._context)!=null&&n.frameSource&&await this.onFrameSourceChange(this._context.frameSource);}}connectToElement(e,t){var i,n,r,a;this.isConnected||(this.orientationObserver.register(),this.setupHtmlElement(e),(i=this.canvasDrawer)==null||i.startObservingCanvasResize(),this.htmlElementDidChange(),a$3.add(this),this.orientation=this.orientationObserver.orientation.value,this.orientationObserver.addEventListener(a$4,this.onOrientationChangeListener),(n=this.hintPresenter)==null||n.addEventListener("hintpresenterupdate",this.onHintPresenterUpdateHandler),(r=this.hintPresenter)==null||r.addEventListener("hintpresenterviewfinderupdaterequested",this.onViewFinderUpdateRequestedHandler),this.localizationSubscription=a$1.getInstance().subscribe(s=>{s[P]!=null&&(this.cameraRecoveryElement.textContent=s[P]);}),this._previewCamera=(a=t==null?void 0:t.camera)!=null?a:null,this._previewCamera&&(this._previewCamera.addListener(this.frameSourceListener),this.onFrameSourceChange(this._previewCamera)),this.updateControls(),this.isConnected=true);}detachFromElement(){var e,t,i,n,r,a,s,h;if(this.isConnected){(e=this.htmlElementState)==null||e.removeListeners(),this.removeStyles(),(t=this.canvasDrawer)==null||t.endObservingCanvasResize(),document.removeEventListener("visibilitychange",this.visibilityListener);for(let m of ["touchend","mousedown"])this.cameraRecoveryElement.removeEventListener(m,this.cameraRecoveryListener);(i=this.loadingOverlay)==null||i.remove(),(n=this.customLocationsView)==null||n.unmount(),this.notificationPresenter=null,this.htmlElementDidChange(),(r=this.gestureRecognizer)==null||r.removeAllListeners(),this.clearHtmlElementContent(),a$3.delete(this),this.orientationObserver.unregister(),this.orientationObserver.removeEventListener(a$4,this.onOrientationChangeListener),(a=this.hintPresenter)==null||a.removeEventListener("hintpresenterupdate",this.onHintPresenterUpdateHandler),(s=this.hintPresenter)==null||s.removeEventListener("hintpresenterviewfinderupdaterequested",this.onViewFinderUpdateRequestedHandler),(h=this.localizationSubscription)==null||h.cancel(),g.instance().disconnectedCallback(),this._previewCamera&&(this._previewCamera.removeListener(this.frameSourceListener),this._previewCamera=null);for(let m of this.controls)this.removeControl(m);this.isConnected=false;}}async addOverlay(e){var t;this.overlays.has(e)||(this.overlays.add(e),await((t=this.privateContext)==null?void 0:t.update([{type:"addOverlay",newValue:e,view:this}])));}async removeOverlay(e){var t;this.overlays.has(e)&&(await((t=this.privateContext)==null?void 0:t.update([{type:"removeOverlay",newValue:e,view:this}])),this.overlays.delete(e));}addListener(e){this.listeners.includes(e)||this.listeners.push(e);}removeListener(e){this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}viewPointForFramePoint(e){var u,L,V,D,F,R,M,A;let t={width:(L=(u=this.htmlElementState)==null?void 0:u.width)!=null?L:0,height:(D=(V=this.htmlElementState)==null?void 0:V.height)!=null?D:0},i={width:(R=(F=this.videoElement)==null?void 0:F.videoWidth)!=null?R:0,height:(A=(M=this.videoElement)==null?void 0:M.videoHeight)!=null?A:0},n=t.width/t.height,r=i.width/i.height,a=n>r?t.width/i.width:t.height/i.height,s={x:e.x*a,y:e.y*a},h=(i.width*a-t.width)/2,m=(i.height*a-t.height)/2;return new a$5(s.x-h,s.y-m)}viewQuadrilateralForFrameQuadrilateral(e){let t=this.viewPointForFramePoint(e.topLeft),i=this.viewPointForFramePoint(e.topRight),n=this.viewPointForFramePoint(e.bottomLeft),r=this.viewPointForFramePoint(e.bottomRight);return new a$6(t,i,r,n)}addControl(e){this.controls.has(e)||(this.controls.add(e),e.install(this).then(t=>{var i;t&&((i=this.privateContext)==null||i.update([{type:"addControl",newValue:e}]));}));}removeControl(e){var t;this.controls.has(e)&&(e.remove(true),this.controls.delete(e),(t=this.privateContext)==null||t.update([{type:"removeControl",newValue:e}]));}toJSONObject(){var e;return {scanAreaMargins:this.scanAreaMargins.toJSONObject(),pointOfInterest:this.pointOfInterest.toJSONObject(),logoAnchor:this.logoAnchor,logoOffset:this.logoOffset.toJSONObject(),logoHidden:(e=this.logoHidden)!=null?e:false,logoStyle:this.logoStyle,overlays:[...this.overlays].map(t=>t.toJSONObject()),controls:[...this.controls].map(t=>t.toJSONObject()),focusGesture:this.focusGesture?this.focusGesture.toJSONObject():null,zoomGesture:this.zoomGesture?this.zoomGesture.toJSONObject():null}}isCameraRecoveryVisible(){return !this.cameraRecoveryElement.hidden}setCameraRecoveryVisible(e){this.cameraRecoveryElement.hidden=!e;}async allowPictureInPicture(e){await g.instance().allowPictureInPicture(e);}viewAnchorPositionsForFrameAnchorPositions(e){let t=this.viewPointForFramePoint(e.topLeft),i=this.viewPointForFramePoint(e.topRight),n=this.viewPointForFramePoint(e.bottomLeft),r=this.viewPointForFramePoint(e.bottomRight),a=this.viewPointForFramePoint(e.centerLeft),s=this.viewPointForFramePoint(e.centerRight),h=this.viewPointForFramePoint(e.topCenter),m=this.viewPointForFramePoint(e.bottomCenter),u=this.viewPointForFramePoint(e.center);return new a$7(t,i,r,n,a,h,s,m,u)}setDidTapCustomLocationsViewListener(e){this.customLocationsView&&this.customLocationsView.listener===null&&(this.customLocationsView.listener=e);}renderCustomLocationsView(e){this.customLocationsView!=null&&(this.customLocationsView.setMirrored(g.instance().isMirrorImageEnabled()),Object.keys(e).includes("removedIds")?this.customLocationsView.render(e):this.customLocationsView.renderDomView(e));}getNotificationPresenter(){var e;if(!this.notificationPresenter){let t=(e=this.htmlElement)==null?void 0:e.querySelector(b$2.tag);if(!t)throw new Error("Notification presenter cannot be found. Please ensure the DataCaptureView is connected.");this.notificationPresenter=new a$8(t);}return this.notificationPresenter}removeStyles(){for(let e of document.querySelectorAll("style[scandit]"))e.remove();}onHintPresenterUpdate(e){var t;(t=this.privateContext)==null||t.workerCommand("hintPresenterV2update",{});}async onViewFinderUpdateRequested(e){var i;let t=await((i=this.privateContext)==null?void 0:i.workerCommand("getViewfinderInfo",{}));t!=null&&this.updateHintPresenterViewFinderRect(t.rect);}clearHtmlElementContent(){var e;this.htmlElement&&((e=this.canvasDrawer)==null||e.endObservingCanvasResize(),this.htmlElement.innerHTML="",this.cameraPaintboardElement=void 0,this.singleImageUploaderPaintboardElement=void 0,this.htmlElement=void 0);}setupHtmlElement(e){var r,a,s;this.createStyles(),this.htmlElement=e,b$2.register(),a$9.register(),a$a.register();let t=a$d`<div class="${a$b.CONTAINER_CLASS_NAME}"><div class="${a$b.PAINTBOARDS_CONTAINER_CLASS_NAME}"><div data-js-id="loading-overlay"></div><div class="${a$b.PAINTBOARD_CLASS_NAME}" data-js-id="camera-paintboard"><div data-js-id="video-container"></div><img class="${a$b.FROZEN_FRAME}" data-js-id="frozen-frame" alt="frozen-frame" hidden /><canvas></canvas><div data-js-id="${a$c.CUSTOM_VIEW_CONTAINER}"></div><${b$2.tag}></${b$2.tag}><${a$9.tag}></${a$9.tag}><div class="${a$b.CAMERA_RECOVERY_CLASS_NAME}" hidden>${this.cameraRecoveryText}</div><div class="${a$b.ERROR_CLASS_NAME}" hidden></div></div><div class="${a$b.PAINTBOARD_CLASS_NAME}" data-js-id="singleimage-paintboard"></div></div></div>`;this.htmlElement.innerHTML=t,g.instance().connectedCallback(this.htmlElement.querySelector('[data-js-id="video-container"]')),this.isVideoElementDetached=false,this.hintPresenter=this.htmlElement.querySelector(b$2.tag),this.notificationPresenter=this.hintPresenter?new a$8(this.hintPresenter):null,this.loadingOverlay&&this.loadingOverlay.remove(),this.loadingOverlay=a$a.create(),this.loadingOverlay.hide(),(r=this.htmlElement.querySelector('[data-js-id="loading-overlay"]'))==null||r.replaceWith(this.loadingOverlay),this.customLocationsView&&this.customLocationsView.unmount(),this.customLocationsView=new a$e,this.customLocationsView.mount(this.htmlElement.querySelector(`[data-js-id="${a$c.CUSTOM_VIEW_CONTAINER}"]`)),this.customLocationsView.mapViewAnchorPositionsForFramePoint=h=>this.viewAnchorPositionsForFrameAnchorPositions(h),this.containerElement=this.htmlElement.querySelector(`.${a$b.CONTAINER_CLASS_NAME}`),this.cameraPaintboardElement=this.containerElement.querySelector('[data-js-id="camera-paintboard"]'),this.singleImageUploaderPaintboardElement=this.containerElement.querySelector('[data-js-id="singleimage-paintboard"]');let i=this.cameraPaintboardElement.querySelector("canvas");this.canvasElement==null?this.canvasElement=i:i.replaceWith(this.canvasElement);let n=this.cameraPaintboardElement.querySelector('[data-js-id="frozen-frame"]');this.frozenFrame==null?this.frozenFrame=n:n.replaceWith(this.frozenFrame),this.controlsElement=this.cameraPaintboardElement.querySelector(a$9.tag),this.cameraRecoveryElement=this.cameraPaintboardElement.querySelector(`.${a$b.CAMERA_RECOVERY_CLASS_NAME}`),this.errorElement=this.cameraPaintboardElement.querySelector(`.${a$b.ERROR_CLASS_NAME}`),this.lastFrameSourceState!=null&&((s=(a=this._context)==null?void 0:a.frameSource)==null||s.switchToDesiredState(this.lastFrameSourceState)),document.addEventListener("visibilitychange",this.visibilityListener);for(let h of ["touchend","mousedown"])this.cameraRecoveryElement.addEventListener(h,this.cameraRecoveryListener);this.htmlElementState&&this.htmlElementState.removeListeners(),this.htmlElementState=new a$f(this.htmlElement),this.htmlElementState.onStateChanged(this.htmlElementDidChangeHandler),this.htmlElementState.onDisconnected(this.htmlElementDisconnectedHandler),this.gestureRecognizer=new a$g(this.htmlElement),this.gestureRecognizer.addListener({onTap:async h=>{var m;(m=this.privateContext)==null||m.workerCommand("onTap",{point:h.toJSONObject()});}});}setupHtmlElementSingleImageUploader(e){var i;if(this.singleImageUploaderPaintboardElement==null)return;this.singleImageUploaderView&&this.singleImageUploaderView.unmount(),this.singleImageUploaderView=new a$h(e),this.singleImageUploaderView.mount(this.containerElement.querySelector('[data-js-id="singleimage-paintboard"]'));let t=(i=this._context)==null?void 0:i.frameSource;this.singleImageUploaderView.onInputCheck(n=>{t.getCurrentState()!=="starting"&&n.preventDefault();}),this.singleImageUploaderView.onBeforeFileRead(()=>{t._context&&this.singleImageUploaderView&&(this.singleImageUploaderView.canUploadFile=t._context.hasEnabledMode());}),this.singleImageUploaderView.onImageLoadError(()=>{t.currentState="starting",a$i.log(a$i.Level.Error,"Could not load image from selected file");}),this.singleImageUploaderView.onFileReaderError(n=>{var a,s;let r=n.target;t.currentState="starting",a$i.log(a$i.Level.Error,`Error while reading the file: ${(s=(a=r.error)==null?void 0:a.toString())!=null?s:""}`);}),this.singleImageUploaderView.onCaptureReady(async n=>{await t.processUploadedFileCapture(n);}),this.singleImageUploaderView.setButtonState(t.getCurrentState()==="starting"?"enabled":"disabled"),t.addView(this.singleImageUploaderView);}setupHtmlElementVisibility(e){this.cameraPaintboardElement!=null&&(this.cameraPaintboardElement.hidden=e!=="camera"),this.singleImageUploaderPaintboardElement!=null&&(this.singleImageUploaderPaintboardElement.hidden=e!=="singleImageUploader");}createStyles(){if(document.querySelector("style[scandit]")===null){let e=a$j();for(let[t,i]of Object.entries(e))i.setAttribute("scandit",`data-capture-sdk-${t}`),document.head.append(i);}}async onOrientationChange(e){var t,i;this.orientation=e.detail.value,await((i=this.privateContext)==null?void 0:i.update([{type:"viewChange",newValue:{...(t=this.htmlElementState)==null?void 0:t.toJSONObject(),orientation:this.orientation}}]));}htmlElementDidChange(){var i,n;if(!this.htmlElementState)return;let e=this.htmlElementState,t=e.toJSONObject();if(!a$f.areEquivalentJSONStates(this.lastHtmlElementState,t)){this.orientation=this.orientationObserver.orientation.value,(i=this.privateContext)==null||i.update([{type:"viewChange",newValue:{...e.toJSONObject(),orientation:this.orientation}}]),this.lastHtmlElementState=t,(n=this.canvasDrawer)==null||n.updateCanvasSizeAttributes(this.width,this.height),this.handleVideoDisplay(t.visible);for(let r of this.listeners)typeof r.didChangeSize=="function"&&r.didChangeSize(this,new a$k(t.size.width.value,t.size.height.value),this.orientation);}}async htmlElementDisconnected(){var e,t,i,n,r,a;g.instance().disconnectedCallback(),this.lastFrameSourceState=(t=(e=this._context)==null?void 0:e.frameSource)==null?void 0:t.getCurrentState(),await((n=(i=this._context)==null?void 0:i.frameSource)==null?void 0:n.switchToDesiredState("off")),await((a=this.privateContext)==null?void 0:a.update([{type:"viewChange",newValue:{...(r=this.htmlElementState)==null?void 0:r.toJSONObject(),orientation:this.orientation}}])),this.isConnected=false;}handleVideoDisplay(e){this.videoElement==null||this.cameraPaintboardElement==null||(!e&&!this.isVideoElementDetached?(this.videoElement.width=0,this.videoElement.height=0,this.videoElement.style.opacity="0",this.videoElement.style.visibility="hidden",document.body.append(this.videoElement),this.isVideoElementDetached=true):e&&this.isVideoElementDetached&&(this.cameraPaintboardElement.insertAdjacentElement("afterbegin",this.videoElement),this.isVideoElementDetached=false,this.videoElement.style.removeProperty("visibility"),this.videoElement.removeAttribute("width"),this.videoElement.removeAttribute("height"),this.videoElement.style.removeProperty("opacity")));}isCanvasDrawerWithMetrics(e){return e instanceof a$l}onWorkerMessage(e){var t,i;switch(e.type){case "draw":{this.drawEngineCommands(e.payload);break}case "performanceMetricsReport":{let n=this._canvasDrawer;n!=null&&this.isCanvasDrawerWithMetrics(n)&&n.setPerformanceMetrics(e.payload);break}case "contextDidChangeStatus":{let n=a$m.fromJSON(e.payload);(t=this.loadingOverlay)==null||t.hide(),n.isValid?(this.clearError(),this.setVideoElementOpacity("1")):this.displayError(n);break}case "viewSizeChanged":{let n=e.payload;if(n==null)return;this.onSDCViewSizeChangedCallback(n);break}default:{(i=this.hintPresenter)==null||i.handleMessage(e);break}}}onSDCViewSizeChangedCallback(e){this.updateHintPresenterViewFinderRect(e.viewFinderRect);}updateHintPresenterViewFinderRect(e){var t;(t=this.hintPresenter)==null||t.setViewFinderRect(new a$n(new a$5(e.origin.x,e.origin.y),new a$k(e.size.width,e.size.height)));}drawEngineCommands(e){var t;(t=this.canvasDrawer)==null||t.draw(e);}displayError(e){this.errorElement.textContent=`Error ${e.code}: ${e.message}`,this.errorElement.hidden=false;}clearError(){this.errorElement.textContent="",this.errorElement.hidden=true;}updateControls(){var e;for(let t of this.controls)(e=t.update)==null||e.call(t,this);}async onFrameSourceChange(e){let t=e==null?void 0:e.type;if(this.setupHtmlElementVisibility(t),t==="camera"){let i=e==null?void 0:e.getCurrentState();i!=null&&await this.onCameraStateChanged(i);}else t==="singleImageUploader"&&this.setupHtmlElementSingleImageUploader(e.settings);}async onCameraStateChanged(e){var t;switch((t=this.cameraPaintboardElement)==null||t.classList.toggle(a$b.PAINTBOARD_CLASS_NAME_STATE_ON,e==="on"),e){case "stopping":{this.hiddenProperties.freezeFrameWhenStoppingFrameSource&&this.freezeFrame(),this.setVideoElementOpacity("0");return}case "starting":case "bootingUp":case "wakingUp":{if(!this.htmlElement){a$i.error("cannot set frame source stream before connecting view to an HTML element");return}this.videoElement&&(g.instance().gui.isCameraRecoveryVisible=this.isCameraRecoveryVisible.bind(this),g.instance().gui.setCameraRecoveryVisible=this.setCameraRecoveryVisible.bind(this),this.setVideoElementOpacity("0"));return}case "off":{this.setVideoElementOpacity("0"),this.updateControls();return}case "on":{await g.instance().waitForCapabilities(),this.updateControls(),this.unfreezeFrame(),this.setVideoElementOpacity("1");break}case "goingToSleep":{this.freezeFrame();break}}}setVideoElementOpacity(e){this.videoElement&&(this.videoElement.style.opacity=e),this.canvasElement&&(this.canvasElement.style.opacity=e);}onSingleImageUploaderSettingsChange(e){this.setupHtmlElementSingleImageUploader(e);}setHiddenProperty(e,t){this.hiddenProperties[e]=t;}async onVisibilityChange(){var t,i;let e=(t=this.videoElement)==null?void 0:t.srcObject;if(this.hiddenProperties.stopVideoTracksOnVisibilityChange&&(document.visibilityState==="hidden"&&g.instance().stopVideoTracks(),document.visibilityState==="visible"&&g.instance().activeCamera!=null&&e!=null))if(!e.active||(i=e.getVideoTracks()[0])!=null&&i.muted)try{a$i.debug('Detected visibility change ("visible") event with inactive video source, try to reinitialize camera'),await g.instance().reinitializeCamera();}catch{}else a$i.debug('Detected visibility change ("visible") event with active video source, replay video'),g.instance().playVideo();}async cameraRecovery(e){e.preventDefault(),g.instance().activeCamera=g.instance().selectedCamera,await g.instance().reinitializeCamera();}freezeFrame(){var i;if(!this.frozenFrame)return;let e=g.instance().getCurrentFrame();if(!e)return;let t=new ImageData(e.data,e.width,e.height);this.frozenFrameCanvas.width=t.width,this.frozenFrameCanvas.height=t.height,this.frozenFrame.width=t.width,this.frozenFrame.height=t.height,(i=this.frozenFrameCanvas.getContext("2d"))==null||i.putImageData(t,0,0),this.frozenFrame.src=this.frozenFrameCanvas.toDataURL("image/jpeg",.4),this.frozenFrame.classList.toggle(a$b.MIRRORED_CLASS_NAME,g.instance().isMirrorImageEnabled()),this.frozenFrame.hidden=false;}unfreezeFrame(){this.frozenFrame&&(this.frozenFrame.src="",this.frozenFrame.hidden=true);}};export{q as a};
@@ -1 +0,0 @@
1
- import {a}from'./chunk-ZWO2PAO7.js';var t=new a(globalThis,{get:()=>globalThis.Module,set:e=>{globalThis.Module=e;}});function l(e){}export{t as a,l as b};
@@ -1 +0,0 @@
1
- import {a as a$4}from'./chunk-DN32UPQC.js';import {a as a$8}from'./chunk-DZKTI5AJ.js';import {a as a$9}from'./chunk-G2BRTVN7.js';import {a}from'./chunk-GQ7A6533.js';import {c as c$1,a as a$a}from'./chunk-4W2T3TLN.js';import {c}from'./chunk-UWLAKRB2.js';import {a as a$1}from'./chunk-CAUB35PV.js';import {a as a$2}from'./chunk-QIWPWOQG.js';import {a as a$6}from'./chunk-XG6VNDVQ.js';import {d}from'./chunk-AIC4H5KG.js';import {a as a$5}from'./chunk-O7TZTIHO.js';import {a as a$3}from'./chunk-XR65N6EG.js';import {a as a$7}from'./chunk-QCZSSQAQ.js';var P=class P{constructor(e,t){this.hintPresenterV2=null;this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL=5;this.redrawInterval=1e3/30;this.redrawRequests=[];this._isDrawLoopRunning=false;this.frameDataPool=new Map;this.lastFrameColorType="RGBA";this.lastFrameId=null;this.poorMansBenchmarkLogs=false;this.writableDataPathStandard="/scandit_sync_folder";this.resourceFilesSubfolder="resources";this.performanceMetricsReporterTimer=void 0;this.lastMetricsReportTime=0;this.metricsReportInterval=1e3;this.performanceMetrics={frameDataPoolSize:0,cameraOutputFrames:0,redrawRequestsCount:0,actualRedrawsCount:0,frameProcessingStartedCount:0,frameProcessedCount:0,frameSkippedCount:0};this.frameProcessingStartedCount=0;this.frameProcessingFinishedCount=0;this.gestureListener=null;this.webPlatformHintPresenter=null;this.lastViewInfo=new a(null);this.lastFrameProcessingStartedCount=0;this.lastFrameProcessingFinishedCount=0;this.moduleHandler=e,this.workerFunctions=t,this._loadProgressCallback=this._loadProgressCallback.bind(this),c(this.getWasmMetadata());}get Module(){return this.moduleHandler.get()}set isDrawLoopRunning(e){this._isDrawLoopRunning=e,!e&&typeof this.loopTimeoutId=="number"&&(clearTimeout(this.loopTimeoutId),this.loopTimeoutId=void 0);}get isDrawLoopRunning(){return this._isDrawLoopRunning}prepareFrameForListener(e){let t=this.lastFrameId;if(this.frameDataPool.size>=this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL){let l=this.frameDataPool.keys().next().value;l!=null&&this.frameDataPool.delete(l);}let r=e.getFrameData(),i=new Uint8ClampedArray(r);this.frameDataPool.set(t,{data:i,colorType:this.lastFrameColorType,frameId:t,width:e.getWidth(),height:e.getHeight()});let a=this.lastUsedModuleMirrorAxis==null?false:this.lastUsedModuleMirrorAxis!==this.Module.Axis.None;return {frameId:t,width:e.getWidth(),height:e.getHeight(),isFrameSourceMirrored:a,colorType:this.lastFrameColorType}}createContext(e){var f,p,C,b,M;let t=this.getModeDeserializers(),r=c$1(location);(r==="localhost"||r==="127.0.0.1")&&navigator.userAgent.includes("Electron")&&e.appName!=null&&(r+=`-${e.appName}`),this.parentDomain=e.parentDomain,this.contextDeserializer=new this.Module.DataCaptureContextDeserializer(this.writableDataPath,e.deviceId,e.context.deviceModelName,r,this.parentDomain,t,e.delayedRegistration,e.highEndBlurryRecognition,this.resourcePath);let i=this.contextDeserializer.contextFromJson(JSON.stringify(e.context));if(i==null){let s=this.contextDeserializer.getLastError();throw new Error(`Could not create the context: ${s}`)}let a=i.getView();this.context=i.getContext(),i.delete();let l=this.Module.DataCaptureContextListener.extend("DataCaptureContextListener",{didChangeStatus:(s,o)=>{this.contextDidChangeStatus(JSON.parse(o.toJson())),s.delete();},didStartObservingContext:s=>{this.didStartObservingContext(),s.delete();},didStopObservingContext:s=>{s.delete();}}),u=this.Module.DataCaptureContextFrameListener.extend("DataCaptureContextFrameListener",{onObservationStarted:s=>{s.delete();},onObservationStopped:s=>{s.delete();},onFrameProcessingStarted:(s,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingStarted"}),o.delete(),s.delete();},onFrameProcessingFinished:(s,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingFinished"}),o.delete(),s.delete();},onFrameSkipped:(s,o)=>{this.workerFunctions.postMessage({type:"onFrameSkipped"}),o.delete(),s.delete();}}),h=this.Module.GestureRecognizer.extend("GestureRecognizer",{setGestureListener:(s,o)=>{var w;(w=this.gestureListener)==null||w.delete(),this.gestureListener=s.clone(),s.delete();}});(f=this.gestureRecognizer)==null||f.delete(),this.gestureRecognizer=new h;let g=new l;this.context.addListener(g),g.delete();let c=new u;this.context.addFrameListener(c),c.delete(),this.setView(a),(p=this.view)==null||p.setGestureRecognizer(this.gestureRecognizer);let m=this.Module.PlatformHintPresenter.extend("PlatformHintPresenter",{setHintPresenter:s=>{s.delete();},showToast:s=>{this.workerFunctions.postMessage({type:"showToast",payload:JSON.parse(s)});},hideToast:s=>{this.workerFunctions.postMessage({type:"hideToast",payload:JSON.parse(s)});},showGuidance:s=>{this.workerFunctions.postMessage({type:"showGuidance",payload:JSON.parse(s)});},hideGuidance:s=>{this.workerFunctions.postMessage({type:"hideGuidance",payload:JSON.parse(s)});},startUpdateTimer:s=>{this.workerFunctions.postMessage({type:"startUpdateTimer",payload:{duration:{unit:"ms",value:s}}});},stopUpdateTimer:()=>{this.workerFunctions.postMessage({type:"stopUpdateTimer"});}});(C=this.hintPresenterV2)==null||C.delete(),this.hintPresenterV2=null,(b=this.webPlatformHintPresenter)==null||b.delete(),this.webPlatformHintPresenter=null,this.webPlatformHintPresenter=new m,this.view&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter),(M=this.view)==null||M.setHintPresenterV2(this.hintPresenterV2)),this.webImageConverterInstance=this.getImageConverterInstance({quality:1}),this.Module.ImageConverter.setInstance(this.webImageConverterInstance);}convertToJPEGResult(e,t){this.webImageConverterInstance instanceof a$1&&this.webImageConverterInstance.onConvertToJPEGResult(e,t);}getImageConverterInstance(e){return this.workerFunctions.getOffscreenCanvas()!=null?new a$2(e):new a$1(this.workerFunctions,e)}onTap(e){var t;(t=this.gestureListener)==null||t.onTap(JSON.stringify(e));}hintPresenterV2Update(){var e;(e=this.hintPresenterV2)==null||e.update();}startReportingPerformanceMetrics(){this.performanceMetricsReporterTimer==null&&(this.lastMetricsReportTime=performance.now(),this.scheduleMetricsReporting());}scheduleMetricsReporting(){this.performanceMetricsReporterTimer=setTimeout(()=>{this.checkAndReportMetrics();},100);}checkAndReportMetrics(){let e=performance.now();e-this.lastMetricsReportTime>=this.metricsReportInterval&&(this.reportPerformanceMetrics(),this.performanceMetrics.cameraOutputFrames=0,this.performanceMetrics.redrawRequestsCount=0,this.performanceMetrics.actualRedrawsCount=0,this.lastMetricsReportTime=e),this._isDrawLoopRunning&&this.scheduleMetricsReporting();}async reportPerformanceMetrics(){let e=this.frameProcessingStartedCount-this.lastFrameProcessingStartedCount,r=this.frameProcessingFinishedCount-this.lastFrameProcessingFinishedCount;this.lastFrameProcessingStartedCount=this.frameProcessingStartedCount,this.lastFrameProcessingFinishedCount=this.frameProcessingFinishedCount;let i={cameraOutputFrames:this.performanceMetrics.cameraOutputFrames,redrawRequestsCount:this.performanceMetrics.redrawRequestsCount,actualRedrawsCount:this.performanceMetrics.actualRedrawsCount,frameDataPoolSize:this.performanceMetrics.frameDataPoolSize,frameProcessingStartedCount:e,frameProcessedCount:r,frameSkippedCount:this.performanceMetrics.frameSkippedCount};this.workerFunctions.postMessage({type:"performanceMetricsReport",payload:i});}deleteFrameData(e){this.frameDataPool.delete(e);}dispose(){var e,t,r,i;this.context.dispose(),this.frameDataPool.clear(),this.isDrawLoopRunning=false,this.cleanupMetricsReporting(),(e=this.gestureRecognizer)==null||e.delete(),this.gestureRecognizer=null,(t=this.gestureListener)==null||t.delete(),this.gestureListener=null,(r=this.hintPresenterV2)==null||r.delete(),this.hintPresenterV2=null,(i=this.webPlatformHintPresenter)==null||i.delete(),this.webPlatformHintPresenter=null;}cleanupMetricsReporting(){this.performanceMetricsReporterTimer!=null&&(typeof this.performanceMetricsReporterTimer=="number"?cancelAnimationFrame(this.performanceMetricsReporterTimer):clearTimeout(this.performanceMetricsReporterTimer),this.performanceMetricsReporterTimer=void 0);}flushAnalytics(){this.context.flushAnalytics();}extractCentaurusLicense(e){return {payload:{centaurus:{licenseKey:this.Module.LicenseUtils[P.get3dPartyLicenseKeyMethodName](e)}}}}getModeDeserializers(){return new this.Module.VectorDataCaptureModeDeserializer}loadLibrary(e){return this.libraryLoadingPromise!=null?this.libraryLoadingPromise:(this.libraryLoadingPromise=this.setup(e),this.libraryLoadingPromise)}processFrame(e){var a;if(this.context==null)return a$3.debug("[processFrame] Context is null, returning frame without processing"),{payload:e,transferables:[e.data.buffer]};this.lastFrameId=e.frameId;let t=e.data,r=e.colorType==="GRAYSCALE"?this.Module.ImageBufferFormat.Grayscale8:this.Module.ImageBufferFormat.Rgba8888;this.lastFrameColorType=e.colorType==="GRAYSCALE"?"GRAYSCALE":"RGBA";let i=this.Module.allocateUint8Array(t.byteLength);return this.Module.HEAPU8.set(t,i),(a=this.imageFrameSource)==null||a.outputFrame(i,e.width,e.height,r),{payload:e,transferables:[e.data.buffer]}}reportCameraProperties(e){this.context.setCameraProperties(e.deviceId,e.isFrontFacing,e.hasAutofocus);}requestFrameData(e){let t=this.frameDataPool.get(e);if(t==null)return {payload:{data:null,frameId:null,colorType:null}};if(t.data.buffer.byteLength===0)return this.frameDataPool.delete(e),{payload:{data:null,frameId:null,colorType:null}};let r=t.data;t.colorType==="GRAYSCALE"&&(r=a$4(t.data,t.width,t.height));let i={payload:{data:r,frameId:t.frameId,colorType:t.colorType},transferables:[r.buffer]};return this.frameDataPool.delete(e),i}scheduleRedraw(e,t){this.addRedrawRequest(t),this.isDrawLoopRunning||this.startDrawLoop(e);}sendViewRefreshCommands(e){this.workerFunctions.postMessage({type:"draw",payload:e},[e.buffer]);}setFrameSource(e,t){var r;this.lastUsedModuleMirrorAxis=this.mapMirrorAxisOnModule(e),(r=this.imageFrameSource)==null||r.delete(),this.imageFrameSource=new this.Module.ImageBufferFrameSource(this.lastUsedModuleMirrorAxis,t,0),this.context.setFrameSource(this.imageFrameSource);}startDrawLoop(e){this.isDrawLoopRunning=true;let t=a=>this.redrawRequests.length>0&&this.redrawRequests[0]<=a,r=a=>{for(;this.redrawRequests.length>0&&this.redrawRequests[0]<=a;)this.redrawRequests.shift();},i=()=>{this.loopTimeoutId=setTimeout(()=>{if(!this.isDrawLoopRunning)return;let a=performance.now();if(t(a)){r(a),e.draw();let l=e.getDrawCommands();this.sendViewRefreshCommands(new Uint8Array(l));}i();},this.redrawInterval);};i();}updateContext(e){if(this.context!=null&&this.contextDeserializer!=null){e.view!=null&&!e.view.visible&&this.context.flushAnalytics();let t=this.onBeforeUpdateContextHook(e),r=this.contextDeserializer.updateContextFromJson(this.context,this.view,JSON.stringify(t.context));if(r==null){let a=this.contextDeserializer.getLastError();throw new Error(`Could not update the context: ${a}`)}this.context.delete(),this.context=r.getContext();let i=r.getView();r.delete(),i!=null&&t.view!=null&&(i.setViewSize(t.view.width,t.view.height,t.view.orientation),i.draw()),!this.hintPresenterV2&&this.webPlatformHintPresenter&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter)),i!=null&&this.hintPresenterV2&&i.setHintPresenterV2(this.hintPresenterV2),this.gestureRecognizer!=null&&(i==null||i.setGestureRecognizer(this.gestureRecognizer)),this.setView(i),this.notifyMainThreadOnViewInfoChanged(i),a$3.debug("context updated",t);}}notifyMainThreadOnViewInfoChanged(e){let t=this.getViewInfo(e);this.lastViewInfo.isSame(t)||(this.lastViewInfo.update(t),this.workerFunctions.postMessage({type:"viewSizeChanged",payload:t}));}getViewInfo(e){if(e!=null)try{let t=JSON.parse(e.getViewInfo());if(t!=null){let r=this.getOrientationFromNumber(t.orientation);return {...t,orientation:r}}}catch(t){a$3.error("Failed to get view size",t);}return null}getOrientationFromNumber(e){switch(e){case 90:return "landscapeRight";case 180:return "portraitUpsideDown";case 270:return "landscapeLeft";default:return "portrait"}}onBeforeUpdateContextHook(e){return e}onDocumentVisibilityChange(e){e==="hidden"&&this.context.flushAnalytics();}isFeatureSupported(e){return {payload:{supported:this.context.isFeatureSupported(e)}}}getViewfinderInfo(){var e,t;return {payload:{isDisplayingViewfinder:(t=(e=this.view)==null?void 0:e.isDisplayingViewfinder())!=null?t:false,rect:JSON.parse(this.view.getViewfinderRect())}}}getOpenSourceSoftwareLicenseInfo(){return {payload:{licenseText:this.Module.OpenSourceSoftwareLicenseInfo.getLicenseText()}}}getWasmDynamicLibraries(e){return this.getWasmSideModuleFileName()==null?[]:[`${e.replace(/\/[^/]*$/,"/")}${this.getWasmSideModuleFileName()}`]}getWasmCoreExpectedHash(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_HASH:globalThis.SDC_WASM_CORE_MT_HASH:e?globalThis.SDC_WASM_CORE_SIMD_HASH:""}getWasmCoreFileName(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_FILE_NAME:globalThis.SDC_WASM_CORE_MT_FILE_NAME:e?globalThis.SDC_WASM_CORE_SIMD_FILE_NAME:""}getWasmMetadata(){return globalThis.WASM_METADATA}getWasmSideModuleFileName(){return ""}_loadProgressCallback(e){this.workerFunctions.postMessage({type:"loadLibraryProgress",payload:e});}addRedrawRequest(e){this.redrawRequests.push(Math.round(performance.now())+e),this.redrawRequests.sort((t,r)=>t-r);}contextDidChangeStatus(e){e.code===260?e.message=e.message.replace("domain name",`domain name (${c$1(location)})`):e.code===265&&(e.message=e.message.replace("domain name",`domain name (${this.parentDomain})`)),this.workerFunctions.postMessage({type:"contextDidChangeStatus",payload:e});}didStartObservingContext(){this.workerFunctions.postMessage({type:"didStartObservingContext"});}mapMirrorAxisOnModule(e){switch(e){case "None":return this.Module.Axis.None;case "X":return this.Module.Axis.X;case "Y":return this.Module.Axis.Y;default:return this.Module.Axis.None}}setView(e){this.view=e,this.setViewRefreshHandler(e),e==null&&(this.isDrawLoopRunning=false,this.sendViewRefreshCommands(new Uint8Array([])));}addNativeOverlay(e){a$3.warn("addNativeOverlay has not been implemented for this module",e);}removeNativeOverlay(e){a$3.warn("removeNativeOverlay has not been implemented for this module",e);}setViewRefreshHandler(e){if(e==null||e.isViewRefreshHandlerSet)return;let t=this.Module.NeedsRedrawDelegate.extend("NeedsRedrawDelegate",{setNeedsRedrawIn:this.scheduleRedraw.bind(this,e)}),r=new t;e.setNeedsRedrawDelegate(r),e.isViewRefreshHandlerSet=true;}setupDataDecoding(){let e=this.moduleHandler.get(),t=e.DataDecoding.extend("DataDecoding",{decode(r,i){try{let a=JSON.parse(i),l=[];for(let u of a){let h=new TextDecoder(u.ianaName,{fatal:true});l.push(h.decode(r.slice(u.startIndex,u.endIndex)));}return l.join("")}catch{return ""}}});e.setDataDecoding(new t);}start(e,t,r){e&&t&&(this.setupDataDecoding(),this.moduleHandler.get().callMain(),this.moduleHandler.get().__emscripten_proxy_main!==void 0||r());}getWritableDataPath(e){return e!=null?(a$3.debug(`IndexedDB database name override in use to recover from blocked standard database: ${e}`),e):this.writableDataPathStandard}numOfMBToPages(e){return Math.ceil(1024*e*1024/64/1024)}async setup({libraryLocation:e,locationPath:t,writableDataPathOverride:r,indexedDBTimeoutMs:i,verifyResponseHash:a,referredOrigin:l,fixedWasmMemory:u,simdSupport:h,threadsSupport:g}){var F;let c=false,m=false;this.writableDataPath=this.getWritableDataPath(r),this.resourcePath=`${e}${this.resourceFilesSubfolder}/`,globalThis.path=t;let{resolve:f,reject:p,promise:C}=new a$5,b=a$6.sdkVersion();if(b==="")throw new a$7({name:"Invalid library version",message:"Library version is not defined or empty, cannot generate proper path to library files."});let M=this.getWasmCoreFileName(h,g),s=d(b,e,M),{jsURI:o,wasmURI:w}=s,W={instantiateWasm:(d,N)=>(a$a({importObject:d,wasmURI:w,expectedHash:this.getWasmCoreExpectedHash(h,g),verifyResponseHash:a,successCallback:N,progressCallback:this._loadProgressCallback,errorCallback:H=>{p(H);},referredOrigin:l}),{})},y=u===null?null:new WebAssembly.Memory({initial:this.numOfMBToPages(u),maximum:this.numOfMBToPages(300),shared:g});return y!==null&&a$3.log(a$3.Level.Debug,"Fixed wasmMemory set",y),this.moduleHandler.set({...y?{wasmMemory:y}:{},mainScriptUrlOrBlob:o,canvas:(F=this.workerFunctions.getOffscreenCanvas())!=null?F:{getContext:()=>null},...W,dynamicLibraries:this.getWasmDynamicLibraries(w),locateFile:d=>e+d,noInitialRun:true,preRun:[async()=>{try{await a$8({writableDataPath:this.writableDataPath,indexedDBTimeoutMs:i});}catch(d){if(d.name==="BlockedIndexedDB"){p(d.toString());return}a$3.log(a$3.Level.Debug,"No IndexedDB support, some data will not be persisted:",d);}m=true,this.start(m,c,f);}],onMainComplete:()=>{if([c,m].includes(false)){a$3.log(a$3.Level.Warn,{runtimeLoaded:c,fileSystemSynced:m},"Both runtimeLoaded and fileSystemSynced should be true when calling onMainComplete"),p("onMainComplete has been called but runtime or file system was not ready.");return}f();},onRuntimeInitialized:()=>{c=true,this.start(m,c,f);},print:d=>{a$3.info(d);}}),await a$9(o,b)||p(`Couldn't retrieve Scandit Data Capture library at ${o}, did you configure the path for it correctly?`),C}};P.get3dPartyLicenseKeyMethodName=atob("Z2V0QmxpbmtJZExpY2Vuc2VLZXk=");var V=P;export{V as a};