@scandit/web-datacapture-core 7.5.0 → 7.5.2

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 (183) hide show
  1. package/build/electron/main.cjs +1 -1
  2. package/build/electron/main.js +1 -1
  3. package/build/js/{Camera-BoUtNCzS.d.ts → Camera-bxDEtlUu.d.ts} +1 -1
  4. package/build/js/Camera.d.ts +1 -1
  5. package/build/js/Camera.js +1 -1
  6. package/build/js/CameraAccess.d.ts +1 -1
  7. package/build/js/CameraAccess.js +1 -1
  8. package/build/js/CameraRelated.d.ts +1 -1
  9. package/build/js/DataCaptureContext.d.ts +1 -1
  10. package/build/js/DataCaptureContext.js +1 -1
  11. package/build/js/DataCaptureContextRelated.d.ts +1 -1
  12. package/build/js/DataCaptureVersion.js +1 -1
  13. package/build/js/DataCaptureView.d.ts +1 -1
  14. package/build/js/DataCaptureView.js +1 -1
  15. package/build/js/Defaults.d.ts +1 -1
  16. package/build/js/Feedback.js +1 -1
  17. package/build/js/FrameData.d.ts +1 -1
  18. package/build/js/ImageFrameSource.d.ts +1 -1
  19. package/build/js/Localization.js +1 -1
  20. package/build/js/NotificationPresenter/index.d.ts +1 -1
  21. package/build/js/NotificationPresenter/private/ConcreteNotificationPresenter.d.ts +1 -1
  22. package/build/js/NotificationPresenter/private/presets.d.ts +1 -1
  23. package/build/js/ScanditIcon.js +1 -1
  24. package/build/js/ScanditIconBuilder.js +1 -1
  25. package/build/js/SingleImageUploader.d.ts +1 -1
  26. package/build/js/Sound.js +1 -1
  27. package/build/js/Vibration.js +1 -1
  28. package/build/js/browserCompatibility.d.ts +6 -1
  29. package/build/js/browserCompatibility.js +1 -1
  30. package/build/js/browserHelper.d.ts +6 -0
  31. package/build/js/browserHelper.js +1 -1
  32. package/build/js/chunks/{chunk-6X73W3EO.js → chunk-2AJGK77F.js} +1 -1
  33. package/build/js/chunks/chunk-2HYS7DMY.js +1 -0
  34. package/build/js/chunks/{chunk-FPCLZS52.js → chunk-2QT7PJFA.js} +1 -1
  35. package/build/js/chunks/{chunk-BH742UD7.js → chunk-3YBEMUXB.js} +1 -1
  36. package/build/js/chunks/{chunk-R6YWFAMT.js → chunk-4W2T3TLN.js} +1 -1
  37. package/build/js/chunks/chunk-6VWIJ62O.js +2 -0
  38. package/build/js/chunks/{chunk-TCJPGGHY.js → chunk-7B2VPGLP.js} +1 -1
  39. package/build/js/chunks/chunk-ACFJP5SR.js +1 -0
  40. package/build/js/chunks/chunk-BHIFOHFI.js +1 -0
  41. package/build/js/chunks/{chunk-UGUDXT2N.js → chunk-CXX2ZE7M.js} +1 -1
  42. package/build/js/chunks/{chunk-2XJKSSK4.js → chunk-DDYEOOSY.js} +1 -1
  43. package/build/js/chunks/{chunk-46WJFV3I.js → chunk-DUPLHZRJ.js} +1 -1
  44. package/build/js/chunks/{chunk-PFC2HW6V.js → chunk-F2YB7OLE.js} +2 -2
  45. package/build/js/chunks/{chunk-FRG4HXJT.js → chunk-G2BRTVN7.js} +1 -1
  46. package/build/js/chunks/chunk-GHTCNOQN.js +1 -0
  47. package/build/js/chunks/chunk-GSFBVAUZ.js +1 -0
  48. package/build/js/chunks/{chunk-RMKJUHZW.js → chunk-HHMOVH27.js} +1 -1
  49. package/build/js/chunks/chunk-KIIMZTRE.js +1 -0
  50. package/build/js/chunks/{chunk-L3SHJKNC.js → chunk-MDC2G4SQ.js} +1 -1
  51. package/build/js/chunks/chunk-MUJ7NKAY.js +1 -0
  52. package/build/js/chunks/{chunk-YZPUMXQ2.js → chunk-NFB6DO6C.js} +1 -1
  53. package/build/js/chunks/chunk-NVK73TNL.js +1 -0
  54. package/build/js/chunks/{chunk-J3PS3NRY.js → chunk-ODS7VODS.js} +1 -1
  55. package/build/js/chunks/{chunk-UUGROS73.js → chunk-QUHRBS4G.js} +1 -1
  56. package/build/js/chunks/chunk-RG272MAJ.js +1 -0
  57. package/build/js/chunks/{chunk-CMG3PSOW.js → chunk-RX2673AX.js} +1 -1
  58. package/build/js/chunks/{chunk-72A5262S.js → chunk-S24T6WS2.js} +1 -1
  59. package/build/js/chunks/chunk-SEAVQZN6.js +1 -0
  60. package/build/js/chunks/chunk-SM5S3DDC.js +1 -0
  61. package/build/js/chunks/{chunk-HNUWDILZ.js → chunk-SP777KFV.js} +1 -1
  62. package/build/js/chunks/chunk-T4MAXB6O.js +1 -0
  63. package/build/js/chunks/{chunk-NPIPIS7X.js → chunk-TTGWNLNK.js} +1 -1
  64. package/build/js/chunks/chunk-TVQ54DA3.js +11 -0
  65. package/build/js/chunks/{chunk-4D2BPF6X.js → chunk-UOEN3RFJ.js} +1 -1
  66. package/build/js/chunks/chunk-UWLAKRB2.js +2 -0
  67. package/build/js/chunks/{chunk-FFTRSHP6.js → chunk-VT73QNQB.js} +1 -1
  68. package/build/js/chunks/{chunk-EKY4M37S.js → chunk-WKTLU3L4.js} +1 -1
  69. package/build/js/chunks/chunk-Y6SLVHK3.js +1 -0
  70. package/build/js/chunks/{chunk-OFNRGDFQ.js → chunk-ZSQGP2YG.js} +1 -1
  71. package/build/js/chunks/{chunk-DFRROFGN.js → chunk-ZXA6VEK2.js} +1 -1
  72. package/build/js/global.d.d.ts +5 -2
  73. package/build/js/index.d.ts +2 -2
  74. package/build/js/index.js +3 -3
  75. package/build/js/private/CameraAccess.d.ts +1 -1
  76. package/build/js/private/CameraAccess.js +1 -1
  77. package/build/js/private/CameraManager.d.ts +1 -1
  78. package/build/js/private/CameraManager.js +1 -1
  79. package/build/js/private/CanvasDrawerWithMetrics.d.ts +1 -1
  80. package/build/js/private/CoreModuleLicenseTextProvider.d.ts +1 -1
  81. package/build/js/private/DataCaptureContextRelated.d.ts +1 -1
  82. package/build/js/private/FrameReaders/FrameReader.d.ts +1 -1
  83. package/build/js/private/FrameReaders/FrameReaderAbstract.d.ts +1 -1
  84. package/build/js/private/FrameReaders/GrayScaleFrameReader.d.ts +1 -1
  85. package/build/js/private/FrameReaders/GrayScaleFrameReader.js +1 -1
  86. package/build/js/private/FrameReaders/index.d.ts +1 -1
  87. package/build/js/private/FrameReaders/index.js +1 -1
  88. package/build/js/private/NormalizedConfigureOptions.d.ts +1 -1
  89. package/build/js/private/SingleImageUploaderView.js +1 -1
  90. package/build/js/private/ViewControls+related.js +1 -1
  91. package/build/js/private/ViewControls_related.d.ts +1 -1
  92. package/build/js/private/ViewStyles.js +1 -1
  93. package/build/js/private/ViewsRegistry.d.ts +1 -1
  94. package/build/js/private/hybridDesktopPlatformHelpers.js +1 -1
  95. package/build/js/private/ui/atoms/AimerSvgIcon.js +1 -1
  96. package/build/js/private/ui/atoms/ArrowDownSvgIcon.js +1 -1
  97. package/build/js/private/ui/atoms/ArrowLeftSvgIcon.js +1 -1
  98. package/build/js/private/ui/atoms/ArrowRightSvgIcon.js +1 -1
  99. package/build/js/private/ui/atoms/ArrowUpSvgIcon.js +1 -1
  100. package/build/js/private/ui/atoms/ArrowsUp.js +1 -1
  101. package/build/js/private/ui/atoms/Backdrop.js +1 -1
  102. package/build/js/private/ui/atoms/CalendarExclamationMarkSvgIcon.js +1 -1
  103. package/build/js/private/ui/atoms/CameraSwitchReverseSvgIcon.js +1 -1
  104. package/build/js/private/ui/atoms/CameraSwitchSvgIcon.js +1 -1
  105. package/build/js/private/ui/atoms/Card.js +1 -1
  106. package/build/js/private/ui/atoms/CardList.js +1 -1
  107. package/build/js/private/ui/atoms/CheckSvgIcon.js +1 -1
  108. package/build/js/private/ui/atoms/ChevronDownSvgIcon.js +1 -1
  109. package/build/js/private/ui/atoms/ChevronLeftSvgIcon.js +1 -1
  110. package/build/js/private/ui/atoms/ChevronRightSvgIcon.js +1 -1
  111. package/build/js/private/ui/atoms/ChevronUpSvgIcon.js +1 -1
  112. package/build/js/private/ui/atoms/CrossSvgIcon.js +1 -1
  113. package/build/js/private/ui/atoms/Dot5xSvgIcon.js +1 -1
  114. package/build/js/private/ui/atoms/ExclamationMarkSvgIcon.js +1 -1
  115. package/build/js/private/ui/atoms/GlassSvgIcon.js +1 -1
  116. package/build/js/private/ui/atoms/HandLensCheckSvgIcon.js +1 -1
  117. package/build/js/private/ui/atoms/KeyboardSvgIcon.js +1 -1
  118. package/build/js/private/ui/atoms/LowStockSvgIcon.js +1 -1
  119. package/build/js/private/ui/atoms/OnexSvgIcon.js +1 -1
  120. package/build/js/private/ui/atoms/PrinterSvgIcon.js +1 -1
  121. package/build/js/private/ui/atoms/ProgressBar.js +1 -1
  122. package/build/js/private/ui/atoms/QuestionMarkSvgIcon.js +1 -1
  123. package/build/js/private/ui/atoms/RestartSvgIcon.js +1 -1
  124. package/build/js/private/ui/atoms/RoundedCheckSvgIcon.js +1 -1
  125. package/build/js/private/ui/atoms/RoundedCrossSvgIcon.js +1 -1
  126. package/build/js/private/ui/atoms/RoundedExclamationMarkSvgIcon.js +1 -1
  127. package/build/js/private/ui/atoms/ShutterButton.js +2 -2
  128. package/build/js/private/ui/atoms/StarFilledSvgIcon.js +1 -1
  129. package/build/js/private/ui/atoms/StarHalfFilledSvgIcon.js +1 -1
  130. package/build/js/private/ui/atoms/StarOutlinedSvgIcon.js +1 -1
  131. package/build/js/private/ui/atoms/SvgIcon.js +1 -1
  132. package/build/js/private/ui/atoms/ToPickSvgIcon.js +1 -1
  133. package/build/js/private/ui/atoms/Toast.d.ts +1 -1
  134. package/build/js/private/ui/atoms/Toast.js +1 -1
  135. package/build/js/private/ui/atoms/TwoxSvgIcon.js +1 -1
  136. package/build/js/private/ui/atoms/WrongItemSvgIcon.js +1 -1
  137. package/build/js/private/ui/molecules/HintPresenter.d.ts +1 -1
  138. package/build/js/private/ui/molecules/HintPresenter.js +1 -1
  139. package/build/js/private/ui/molecules/LoadingOverlay.js +1 -1
  140. package/build/js/private/utils/AnimationSimplePolyfill.d.ts +59 -0
  141. package/build/js/private/utils/AnimationSimplePolyfill.js +1 -0
  142. package/build/js/private/utils/finalizationRegistryPolyfill.d.ts +13 -0
  143. package/build/js/private/utils/finalizationRegistryPolyfill.js +1 -0
  144. package/build/js/private/utils/fromEntries.d.ts +14 -0
  145. package/build/js/private/utils/fromEntries.js +1 -0
  146. package/build/js/private/utils/globalThisPolyfill.d.ts +15 -0
  147. package/build/js/private/utils/globalThisPolyfill.js +1 -0
  148. package/build/js/private/utils/index.d.ts +2 -0
  149. package/build/js/private/utils/index.js +1 -1
  150. package/build/js/private/utils/replaceImagesInViewUtils.d.ts +1 -1
  151. package/build/js/private/utils/safeCancelAnimation.d.ts +53 -0
  152. package/build/js/private/utils/safeCancelAnimation.js +1 -0
  153. package/build/js/private/utils/warnMultithreadingUnavailable.js +1 -1
  154. package/build/js/sdk.d.ts +1 -1
  155. package/build/js/worker/WorkerMain.d.ts +1 -1
  156. package/build/js/worker/WorkerMain.js +1 -1
  157. package/build/js/worker/coreCapture.inlineWorker.d.ts +1 -1
  158. package/build/js/worker/coreCapture.inlineWorker.js +1 -1
  159. package/build/js/worker/dataCaptureEngine.d.ts +1 -1
  160. package/build/js/worker/dataCaptureEngine.js +1 -1
  161. package/build/js/worker/dataCaptureLoader.d.ts +1 -1
  162. package/build/js/worker/dataCaptureWorkerRelated.d.ts +1 -1
  163. package/build/js/worker/finalizationRegistryPolyfill.test.d.ts +1 -0
  164. package/build/js/worker/finalizationRegistryPolyfill.test.js +1 -0
  165. package/build/js/worker/helper.js +1 -1
  166. package/build/js/worker/helperFetch.js +1 -1
  167. package/build/js/worker/importWasmScript.js +1 -1
  168. package/build/js/worker/index.d.ts +1 -1
  169. package/build/js/worker/index.js +1 -1
  170. package/package.json +1 -1
  171. package/build/js/chunks/chunk-2Q5FZVGV.js +0 -1
  172. package/build/js/chunks/chunk-3RIR7ALE.js +0 -1
  173. package/build/js/chunks/chunk-43NA46NY.js +0 -11
  174. package/build/js/chunks/chunk-5LIWL2C4.js +0 -1
  175. package/build/js/chunks/chunk-7CQVGY6N.js +0 -1
  176. package/build/js/chunks/chunk-7XQ3GHYH.js +0 -1
  177. package/build/js/chunks/chunk-B5JOQVFY.js +0 -2
  178. package/build/js/chunks/chunk-IDPD4BN6.js +0 -1
  179. package/build/js/chunks/chunk-IYYM2J7I.js +0 -2
  180. package/build/js/chunks/chunk-MFAA3FMX.js +0 -1
  181. package/build/js/chunks/chunk-TPU3JUZL.js +0 -1
  182. package/build/js/chunks/chunk-TTB5EF75.js +0 -1
  183. /package/build/js/chunks/{chunk-ZQFWULUQ.js → chunk-4OWLOWVE.js} +0 -0
@@ -1 +1 @@
1
- var e,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,p={};((e,n)=>{for(var a in n)t(e,a,{get:n[a],enumerable:!0})})(p,{register:()=>u,unregister:()=>f}),module.exports=(e=p,((e,p,s,o)=>{if(p&&"object"==typeof p||"function"==typeof p)for(let i of a(p))r.call(e,i)||i===s||t(e,i,{get:()=>p[i],enumerable:!(o=n(p,i))||o.enumerable});return e})(t({},"__esModule",{value:!0}),e));var s=String.fromCodePoint,o=(s.apply(String,[119,101,98,107,105,116,84,114,97,110,115,112,111,114,116,68,117,112,108,101,120,67,104,97,110,110,101,108]),s.apply(String,[53,65,41,124,75,47,108,120,50,48,115,62,66,60,107,57])),i=s.apply(String,[111,74,88,52,51,101,51,112,66,79,38,88,40,65,36,94]);function c(e,t){return async function(n,a){if(function(e,t){if(null==e)return!1;const n=new URL(e.url);return t.senderId===o&&"localhost"===n.hostname||""===n.hostname}(n.senderFrame,a))switch(a.type){case"get-license-key":if(null!=a.payload)try{const r=await async function(e,t){const{fs:n,crypto:a,path:r,app:p}=e,[s,o]=t.publicKey.split(":"),i=r.join(p.getAppPath(),t.licenseDataPath);return function(e,t,n){const r=a.createDecipheriv("aes-256-cbc",t,n);let p=r.update(e,"hex","utf8");return p+=r.final("utf8"),p}((await n.readFile(i)).toString("utf8"),Buffer.from(s,"base64"),Buffer.from(o,"base64"))}(e,{licenseDataPath:a.payload.licenseDataPath,publicKey:t});n.sender.send(i,{type:a.type,senderId:a.senderId,payload:{licenseKey:r??""}})}catch(e){n.sender.send(i,{type:a.type,senderId:a.senderId,payload:{error:e}})}break;case"get-app-info":try{const t=await async function(e){const{fs:t,path:n,app:a}=e;let r=process.cwd();a.isPackaged&&(r=a.getAppPath());const p=await t.readFile(n.join(r,"package.json"),"utf8"),s=JSON.parse(p);return{appId:s.build?.appId??s.appId,name:s.name,version:s.version}}(e);n.sender.send(i,{type:a.type,senderId:a.senderId,payload:{isPackaged:e.app.isPackaged,version:t.version??e.app.getVersion(),appName:t.name??e.app.getName(),appId:t.appId??""}})}catch(e){n.sender.send(i,{type:a.type,senderId:a.senderId,payload:{error:e}})}}}}var d=null,l=null;function u(e,t){l=e,d=c(e,t),l.ipcMain.on(i,d)}function f(){null!=d&&null!=l&&l.ipcMain.off(i,d)}
1
+ var e,n=Object.defineProperty,t=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,p={};((e,t)=>{for(var a in t)n(e,a,{get:t[a],enumerable:!0})})(p,{register:()=>u,unregister:()=>f}),module.exports=(e=p,((e,p,o,s)=>{if(p&&"object"==typeof p||"function"==typeof p)for(let i of a(p))r.call(e,i)||i===o||n(e,i,{get:()=>p[i],enumerable:!(s=t(p,i))||s.enumerable});return e})(n({},"__esModule",{value:!0}),e));var o=String.fromCodePoint,s=(o.apply(String,[119,101,98,107,105,116,84,114,97,110,115,112,111,114,116,68,117,112,108,101,120,67,104,97,110,110,101,108]),o.apply(String,[53,65,41,124,75,47,108,120,50,48,115,62,66,60,107,57])),i=o.apply(String,[111,74,88,52,51,101,51,112,66,79,38,88,40,65,36,94]);function l(e,n){return async function(t,a){var r,p,o;if(function(e,n){if(null==e)return!1;const t=new URL(e.url);return n.senderId===s&&"localhost"===t.hostname||""===t.hostname}(t.senderFrame,a))switch(a.type){case"get-license-key":if(null!=a.payload)try{const r=await async function(e,n){const{fs:t,crypto:a,path:r,app:p}=e,[o,s]=n.publicKey.split(":"),i=r.join(p.getAppPath(),n.licenseDataPath);return function(e,n,t){const r=a.createDecipheriv("aes-256-cbc",n,t);let p=r.update(e,"hex","utf8");return p+=r.final("utf8"),p}((await t.readFile(i)).toString("utf8"),Buffer.from(o,"base64"),Buffer.from(s,"base64"))}(e,{licenseDataPath:a.payload.licenseDataPath,publicKey:n});t.sender.send(i,{type:a.type,senderId:a.senderId,payload:{licenseKey:null!=r?r:""}})}catch(e){t.sender.send(i,{type:a.type,senderId:a.senderId,payload:{error:e}})}break;case"get-app-info":try{const n=await async function(e){var n,t;const{fs:a,path:r,app:p}=e;let o=process.cwd();p.isPackaged&&(o=p.getAppPath());const s=await a.readFile(r.join(o,"package.json"),"utf8"),i=JSON.parse(s);return{appId:null!=(t=null==(n=i.build)?void 0:n.appId)?t:i.appId,name:i.name,version:i.version}}(e);t.sender.send(i,{type:a.type,senderId:a.senderId,payload:{isPackaged:e.app.isPackaged,version:null!=(r=n.version)?r:e.app.getVersion(),appName:null!=(p=n.name)?p:e.app.getName(),appId:null!=(o=n.appId)?o:""}})}catch(e){t.sender.send(i,{type:a.type,senderId:a.senderId,payload:{error:e}})}}}}var c=null,d=null;function u(e,n){d=e,c=l(e,n),d.ipcMain.on(i,c)}function f(){null!=c&&null!=d&&d.ipcMain.off(i,c)}
@@ -1 +1 @@
1
- import{CHN as e,Id as a}from"./chunk-6RVAZ75N.js";function n(n,t){return async function(p,r){if(function(e,n){if(null==e)return!1;const t=new URL(e.url);return n.senderId===a&&"localhost"===t.hostname||""===t.hostname}(p.senderFrame,r))switch(r.type){case"get-license-key":if(null!=r.payload)try{const a=await async function(e,a){const{fs:n,crypto:t,path:p,app:r}=e,[s,c]=a.publicKey.split(":"),i=p.join(r.getAppPath(),a.licenseDataPath);return function(e,a,n){const p=t.createDecipheriv("aes-256-cbc",a,n);let r=p.update(e,"hex","utf8");return r+=p.final("utf8"),r}((await n.readFile(i)).toString("utf8"),Buffer.from(s,"base64"),Buffer.from(c,"base64"))}(n,{licenseDataPath:r.payload.licenseDataPath,publicKey:t});p.sender.send(e,{type:r.type,senderId:r.senderId,payload:{licenseKey:a??""}})}catch(a){p.sender.send(e,{type:r.type,senderId:r.senderId,payload:{error:a}})}break;case"get-app-info":try{const a=await async function(e){const{fs:a,path:n,app:t}=e;let p=process.cwd();t.isPackaged&&(p=t.getAppPath());const r=await a.readFile(n.join(p,"package.json"),"utf8"),s=JSON.parse(r);return{appId:s.build?.appId??s.appId,name:s.name,version:s.version}}(n);p.sender.send(e,{type:r.type,senderId:r.senderId,payload:{isPackaged:n.app.isPackaged,version:a.version??n.app.getVersion(),appName:a.name??n.app.getName(),appId:a.appId??""}})}catch(a){p.sender.send(e,{type:r.type,senderId:r.senderId,payload:{error:a}})}}}}var t=null,p=null;function r(a,r){p=a,t=n(a,r),p.ipcMain.on(e,t)}function s(){null!=t&&null!=p&&p.ipcMain.off(e,t)}export{r as register,s as unregister};
1
+ import{CHN as e,Id as n}from"./chunk-6RVAZ75N.js";function a(a,t){return async function(r,p){var s,i,c;if(function(e,a){if(null==e)return!1;const t=new URL(e.url);return a.senderId===n&&"localhost"===t.hostname||""===t.hostname}(r.senderFrame,p))switch(p.type){case"get-license-key":if(null!=p.payload)try{const n=await async function(e,n){const{fs:a,crypto:t,path:r,app:p}=e,[s,i]=n.publicKey.split(":"),c=r.join(p.getAppPath(),n.licenseDataPath);return function(e,n,a){const r=t.createDecipheriv("aes-256-cbc",n,a);let p=r.update(e,"hex","utf8");return p+=r.final("utf8"),p}((await a.readFile(c)).toString("utf8"),Buffer.from(s,"base64"),Buffer.from(i,"base64"))}(a,{licenseDataPath:p.payload.licenseDataPath,publicKey:t});r.sender.send(e,{type:p.type,senderId:p.senderId,payload:{licenseKey:null!=n?n:""}})}catch(n){r.sender.send(e,{type:p.type,senderId:p.senderId,payload:{error:n}})}break;case"get-app-info":try{const n=await async function(e){var n,a;const{fs:t,path:r,app:p}=e;let s=process.cwd();p.isPackaged&&(s=p.getAppPath());const i=await t.readFile(r.join(s,"package.json"),"utf8"),c=JSON.parse(i);return{appId:null!=(a=null==(n=c.build)?void 0:n.appId)?a:c.appId,name:c.name,version:c.version}}(a);r.sender.send(e,{type:p.type,senderId:p.senderId,payload:{isPackaged:a.app.isPackaged,version:null!=(s=n.version)?s:a.app.getVersion(),appName:null!=(i=n.name)?i:a.app.getName(),appId:null!=(c=n.appId)?c:""}})}catch(n){r.sender.send(e,{type:p.type,senderId:p.senderId,payload:{error:n}})}}}}var t=null,r=null;function p(n,p){r=n,t=a(n,p),r.ipcMain.on(e,t)}function s(){null!=t&&null!=r&&r.ipcMain.off(e,t)}export{p as register,s as unregister};
@@ -1834,4 +1834,4 @@ declare class Camera implements FrameSource, Serializable<CameraJSON> {
1834
1834
  private isZoomAvailable;
1835
1835
  }
1836
1836
 
1837
- export { type AugmentedWorker as $, type PrivateFrameHandler as A, DataCaptureContext$1 as B, CameraPosition as C, DataCaptureLoader as D, type DataCaptureContextListener as E, FocusGestureStrategy as F, type ContextStatusJSON as G, ContextStatus as H, PrivateMirrorAxis as I, type DataCaptureOverlay as J, type DataCaptureViewListener as K, type DataCaptureViewJSON as L, DataCaptureView$1 as M, type NativeDataCaptureMode as N, type FrameData as O, type PrivateChangeSet as P, type PrivateLoadableFrameData as Q, convertToPublicFrameData as R, type DataCaptureLoaderOptions as S, TorchState as T, HintPresenter as U, VideoResolution as V, type PerformanceMetrics as W, DataCaptureEngine as X, type Module as Y, type GenericHint as Z, type AnyDataCaptureActionMessage as _, type FrameSource as a, HintTextAlignment as a$, type ModuleHandler as a0, type DataCaptureCallbackMessage as a1, type DataCaptureActionMessageKey as a2, type EngineWorkerResponse as a3, type ExtractCentaurusLicenseResponse as a4, type RequestFrameDataResponse as a5, type IsFeatureSupportedResponse as a6, type GetViewfinderInfo as a7, type GetOpenSourceSoftwareLicenseInfoResponse as a8, type WorkerResponse as a9, type PerformanceMetricsReportMessage as aA, type DidTapTrackedBarcode as aB, type OnFrameProcessingStartedMessage as aC, type OnFrameProcessingFinishedMessage as aD, type OnFrameSkippedMessage as aE, type ShowToastMessage as aF, type HideToastMessage as aG, type ShowGuidanceMessage as aH, type HideGuidanceMessage as aI, type StartUpdateTimerMessage as aJ, type StopUpdateTimerMessage as aK, type PayloadForCommand as aL, type DataCaptureWorker as aM, type EmscriptenClassHandle as aN, type DataCaptureContext as aO, type DataCaptureImageBufferFrameSource as aP, type GestureListener as aQ, type GestureRecognizer as aR, type DataCaptureView as aS, type JSONParseable as aT, type DataCaptureContextDeserializerResult as aU, type DataCaptureContextDeserializer as aV, type CaptureModeDeserializerInstance as aW, type ModuleMirrorAxis as aX, type Vector as aY, type WasmFrameData as aZ, HintFont as a_, type LoadLibraryDataCaptureAction as aa, type CreateContextDataCaptureAction as ab, type SetFrameSourceDataCaptureAction as ac, type ProcessFrameDataCaptureAction as ad, type RequestFrameDataDataCaptureAction as ae, type DeleteFrameDataDataCaptureAction as af, type VisibilityChangeAction as ag, type IsFeatureSupportedAction as ah, type UpdateContextDataCaptureAction as ai, type DisposeDataCaptureAction as aj, type FlushAnalyticsDataCaptureAction as ak, type ReportCameraPropertiesDataCaptureAction as al, type SetLogLevelDataCaptureAction as am, type ExtractCentaurusLicenseDataCaptureAction as an, type OnTapAction as ao, type HintPresenterV2updateAction as ap, type GetViewfinderInfoAction as aq, type GetOpenSourceSoftwareLicenseInfoAction as ar, type AddNativeOverlayAction as as, type RemoveNativeOverlayAction as at, type DataCaptureCallbackMessageKeys as au, type SuccessFeedbackWorkerMessage as av, type ShowHintWorkerMessage as aw, type UpdateHintWorkerMessage as ax, type IsFeatureSupportedMessage as ay, type HideHintWorkerMessage as az, FrameSourceState as b, HintWidth as b0, HintHeight as b1, HintCornerStyle as b2, HintIcon as b3, HintAnchor as b4, type HintStyle as b5, GuidanceHintAnchor as b6, GuidanceHintStyle as b7, type GuidanceHint as b8, ToastHintStyle as b9, type GUI as bA, CameraManagerEvent as bB, type CameraManagerEventParameters as bC, CameraManager as bD, type ToastHint as ba, LicensedFeature as bb, type HintPresenterV2 as bc, type PlatformHintPresenter as bd, type LoadLibraryParameters as be, type CreateContextParameters as bf, type UpdateContextParameters as bg, type SetFrameSourceParameters as bh, type ProcessFrameParameters as bi, type ReportCameraPropertiesParameters as bj, type WorkerFunctions as bk, FrameReaderAbstract as bl, ColorType as bm, type PoolCapacityOptions as bn, type FrameCapture as bo, FrameReader as bp, CameraPosition$1 as bq, CameraResolutionConstraint$1 as br, AspectRatio as bs, type DeviceCamera$1 as bt, CameraAccess$1 as bu, HintPresenterEvents as bv, MeteringMode as bw, CameraResolutionConstraint as bx, type ExtendedMediaTrackCapabilities as by, type ExtendedMediaTrackConstraintSet as bz, type FrameSourceListener as c, type FrameSourceJSON as d, type CameraJSON as e, type VideoFrameResolution as f, Camera as g, CameraAccess as h, type DeviceCamera as i, type CameraSettingsJSONBase as j, type CameraSettingsFromJSON as k, type CameraSettingsJSON as l, isCameraFrameSource as m, CameraSettings as n, type Change as o, type PrivateDataCaptureMode as p, type DataCaptureMode as q, type DataCaptureModeJSON as r, type PrivateDataCaptureComponent as s, type DataCaptureComponentJSON as t, type DataCaptureComponent as u, type PrivateDataCaptureContextOptions as v, type PrivateDataCaptureContext as w, type DataCaptureContextCreationOptions as x, type DataCaptureContextJSON as y, type PrivateFrameHandlerResponse as z };
1837
+ export { type AugmentedWorker as $, type PrivateFrameHandler as A, DataCaptureContext$1 as B, CameraPosition as C, DataCaptureLoader as D, type DataCaptureContextListener as E, FocusGestureStrategy as F, type ContextStatusJSON as G, ContextStatus as H, PrivateMirrorAxis as I, type DataCaptureOverlay as J, type DataCaptureViewListener as K, type DataCaptureViewJSON as L, DataCaptureView$1 as M, type NativeDataCaptureMode as N, type FrameData as O, type PrivateChangeSet as P, type PrivateLoadableFrameData as Q, convertToPublicFrameData as R, type DataCaptureLoaderOptions as S, TorchState as T, HintPresenter as U, VideoResolution as V, DataCaptureEngine as W, type Module as X, type PerformanceMetrics as Y, type GenericHint as Z, type AnyDataCaptureActionMessage as _, type FrameSource as a, HintTextAlignment as a$, type ModuleHandler as a0, type DataCaptureCallbackMessage as a1, type DataCaptureActionMessageKey as a2, type EngineWorkerResponse as a3, type ExtractCentaurusLicenseResponse as a4, type RequestFrameDataResponse as a5, type IsFeatureSupportedResponse as a6, type GetViewfinderInfo as a7, type GetOpenSourceSoftwareLicenseInfoResponse as a8, type WorkerResponse as a9, type PerformanceMetricsReportMessage as aA, type DidTapTrackedBarcode as aB, type OnFrameProcessingStartedMessage as aC, type OnFrameProcessingFinishedMessage as aD, type OnFrameSkippedMessage as aE, type ShowToastMessage as aF, type HideToastMessage as aG, type ShowGuidanceMessage as aH, type HideGuidanceMessage as aI, type StartUpdateTimerMessage as aJ, type StopUpdateTimerMessage as aK, type PayloadForCommand as aL, type DataCaptureWorker as aM, type EmscriptenClassHandle as aN, type DataCaptureContext as aO, type DataCaptureImageBufferFrameSource as aP, type GestureListener as aQ, type GestureRecognizer as aR, type DataCaptureView as aS, type JSONParseable as aT, type DataCaptureContextDeserializerResult as aU, type DataCaptureContextDeserializer as aV, type CaptureModeDeserializerInstance as aW, type ModuleMirrorAxis as aX, type Vector as aY, type WasmFrameData as aZ, HintFont as a_, type LoadLibraryDataCaptureAction as aa, type CreateContextDataCaptureAction as ab, type SetFrameSourceDataCaptureAction as ac, type ProcessFrameDataCaptureAction as ad, type RequestFrameDataDataCaptureAction as ae, type DeleteFrameDataDataCaptureAction as af, type VisibilityChangeAction as ag, type IsFeatureSupportedAction as ah, type UpdateContextDataCaptureAction as ai, type DisposeDataCaptureAction as aj, type FlushAnalyticsDataCaptureAction as ak, type ReportCameraPropertiesDataCaptureAction as al, type SetLogLevelDataCaptureAction as am, type ExtractCentaurusLicenseDataCaptureAction as an, type OnTapAction as ao, type HintPresenterV2updateAction as ap, type GetViewfinderInfoAction as aq, type GetOpenSourceSoftwareLicenseInfoAction as ar, type AddNativeOverlayAction as as, type RemoveNativeOverlayAction as at, type DataCaptureCallbackMessageKeys as au, type SuccessFeedbackWorkerMessage as av, type ShowHintWorkerMessage as aw, type UpdateHintWorkerMessage as ax, type IsFeatureSupportedMessage as ay, type HideHintWorkerMessage as az, FrameSourceState as b, HintWidth as b0, HintHeight as b1, HintCornerStyle as b2, HintIcon as b3, HintAnchor as b4, type HintStyle as b5, GuidanceHintAnchor as b6, GuidanceHintStyle as b7, type GuidanceHint as b8, ToastHintStyle as b9, type GUI as bA, CameraManagerEvent as bB, type CameraManagerEventParameters as bC, CameraManager as bD, type ToastHint as ba, LicensedFeature as bb, type HintPresenterV2 as bc, type PlatformHintPresenter as bd, type LoadLibraryParameters as be, type CreateContextParameters as bf, type UpdateContextParameters as bg, type SetFrameSourceParameters as bh, type ProcessFrameParameters as bi, type ReportCameraPropertiesParameters as bj, type WorkerFunctions as bk, FrameReaderAbstract as bl, ColorType as bm, type PoolCapacityOptions as bn, type FrameCapture as bo, FrameReader as bp, CameraPosition$1 as bq, CameraResolutionConstraint$1 as br, AspectRatio as bs, type DeviceCamera$1 as bt, CameraAccess$1 as bu, HintPresenterEvents as bv, MeteringMode as bw, CameraResolutionConstraint as bx, type ExtendedMediaTrackCapabilities as by, type ExtendedMediaTrackConstraintSet as bz, type FrameSourceListener as c, type FrameSourceJSON as d, type CameraJSON as e, type VideoFrameResolution as f, Camera as g, CameraAccess as h, type DeviceCamera as i, type CameraSettingsJSONBase as j, type CameraSettingsFromJSON as k, type CameraSettingsJSON as l, isCameraFrameSource as m, CameraSettings as n, type Change as o, type PrivateDataCaptureMode as p, type DataCaptureMode as q, type DataCaptureModeJSON as r, type PrivateDataCaptureComponent as s, type DataCaptureComponentJSON as t, type DataCaptureComponent as u, type PrivateDataCaptureContextOptions as v, type PrivateDataCaptureContext as w, type DataCaptureContextCreationOptions as x, type DataCaptureContextJSON as y, type PrivateFrameHandlerResponse as z };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { g as Camera, e as CameraJSON, f as VideoFrameResolution } from './Camera-BoUtNCzS.js';
2
+ export { g as Camera, e as CameraJSON, f as VideoFrameResolution } from './Camera-bxDEtlUu.js';
3
3
  import './Common.js';
4
4
  import './private/Serializable.js';
5
5
  import './private/FrameReaders/WatermarkStack.js';
@@ -1 +1 @@
1
- export{a as Camera}from'./chunks/chunk-HNUWDILZ.js';
1
+ export{a as Camera}from'./chunks/chunk-SP777KFV.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { h as CameraAccess, i as DeviceCamera } from './Camera-BoUtNCzS.js';
2
+ export { h as CameraAccess, i as DeviceCamera } from './Camera-bxDEtlUu.js';
3
3
  import './private/Serializable.js';
4
4
  import './Common.js';
5
5
  import './private/FrameReaders/WatermarkStack.js';
@@ -1 +1 @@
1
- export{a as CameraAccess}from'./chunks/chunk-MFAA3FMX.js';
1
+ export{a as CameraAccess}from'./chunks/chunk-GSFBVAUZ.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { C as CameraPosition, n as CameraSettings, k as CameraSettingsFromJSON, l as CameraSettingsJSON, j as CameraSettingsJSONBase, F as FocusGestureStrategy, a as FrameSource, d as FrameSourceJSON, c as FrameSourceListener, b as FrameSourceState, T as TorchState, V as VideoResolution, m as isCameraFrameSource } from './Camera-BoUtNCzS.js';
2
+ export { C as CameraPosition, n as CameraSettings, k as CameraSettingsFromJSON, l as CameraSettingsJSON, j as CameraSettingsJSONBase, F as FocusGestureStrategy, a as FrameSource, d as FrameSourceJSON, c as FrameSourceListener, b as FrameSourceState, T as TorchState, V as VideoResolution, m as isCameraFrameSource } from './Camera-bxDEtlUu.js';
3
3
  import './private/Serializable.js';
4
4
  import './Common.js';
5
5
  import './private/FrameReaders/WatermarkStack.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { o as Change, u as DataCaptureComponent, t as DataCaptureComponentJSON, B as DataCaptureContext, x as DataCaptureContextCreationOptions, y as DataCaptureContextJSON, q as DataCaptureMode, r as DataCaptureModeJSON, N as NativeDataCaptureMode, P as PrivateChangeSet, s as PrivateDataCaptureComponent, w as PrivateDataCaptureContext, v as PrivateDataCaptureContextOptions, p as PrivateDataCaptureMode, A as PrivateFrameHandler, z as PrivateFrameHandlerResponse } from './Camera-BoUtNCzS.js';
2
+ export { o as Change, u as DataCaptureComponent, t as DataCaptureComponentJSON, B as DataCaptureContext, x as DataCaptureContextCreationOptions, y as DataCaptureContextJSON, q as DataCaptureMode, r as DataCaptureModeJSON, N as NativeDataCaptureMode, P as PrivateChangeSet, s as PrivateDataCaptureComponent, w as PrivateDataCaptureContext, v as PrivateDataCaptureContextOptions, p as PrivateDataCaptureMode, A as PrivateFrameHandler, z as PrivateFrameHandlerResponse } from './Camera-bxDEtlUu.js';
3
3
  import './Common.js';
4
4
  import './DataCaptureContextSettings.js';
5
5
  import './license/OpenSourceSoftwareLicenseInfo.js';
@@ -1 +1 @@
1
- export{a as DataCaptureContext}from'./chunks/chunk-OFNRGDFQ.js';
1
+ export{a as DataCaptureContext}from'./chunks/chunk-ZSQGP2YG.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { H as ContextStatus, G as ContextStatusJSON, E as DataCaptureContextListener, I as PrivateMirrorAxis } from './Camera-BoUtNCzS.js';
2
+ export { H as ContextStatus, G as ContextStatusJSON, E as DataCaptureContextListener, I as PrivateMirrorAxis } from './Camera-bxDEtlUu.js';
3
3
  import './ScanditIcon.js';
4
4
  import './private/Serializable.js';
5
5
  import './Common.js';
@@ -1 +1 @@
1
- export{a as DataCaptureVersion}from'./chunks/chunk-IDPD4BN6.js';
1
+ export{a as DataCaptureVersion}from'./chunks/chunk-T4MAXB6O.js';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="emscripten" />
2
2
  import './Common.js';
3
- export { J as DataCaptureOverlay, M as DataCaptureView, L as DataCaptureViewJSON, K as DataCaptureViewListener } from './Camera-BoUtNCzS.js';
3
+ export { J as DataCaptureOverlay, M as DataCaptureView, L as DataCaptureViewJSON, K as DataCaptureViewListener } from './Camera-bxDEtlUu.js';
4
4
  import './DataCaptureViewPlusRelated.js';
5
5
  import './NotificationPresenter/NotificationPresenter.js';
6
6
  import './ViewControls.js';
@@ -1 +1 @@
1
- export{a as DataCaptureView}from'./chunks/chunk-J3PS3NRY.js';
1
+ export{a as DataCaptureView}from'./chunks/chunk-ODS7VODS.js';
@@ -1,6 +1,6 @@
1
1
  /// <reference types="emscripten" />
2
2
  import * as CSS from 'csstype';
3
- import { V as VideoResolution, F as FocusGestureStrategy, C as CameraPosition } from './Camera-BoUtNCzS.js';
3
+ import { V as VideoResolution, F as FocusGestureStrategy, C as CameraPosition } from './Camera-bxDEtlUu.js';
4
4
  import { MarginsWithUnit, PointWithUnit, Anchor, Color } from './Common.js';
5
5
  import { FocusGestureJSON, FocusGesture, ZoomGestureJSON, ZoomGesture, LogoStyle } from './DataCaptureViewPlusRelated.js';
6
6
  import { PrivateLaserlineViewfinderDefault, RectangularViewfinderStyle, PrivateRectangularViewfinderDefault } from './ViewfinderPlusRelated.js';
@@ -1 +1 @@
1
- export{a as Feedback}from'./chunks/chunk-YZPUMXQ2.js';
1
+ export{a as Feedback}from'./chunks/chunk-NFB6DO6C.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- export { O as FrameData, Q as PrivateLoadableFrameData, R as convertToPublicFrameData } from './Camera-BoUtNCzS.js';
2
+ export { O as FrameData, Q as PrivateLoadableFrameData, R as convertToPublicFrameData } from './Camera-bxDEtlUu.js';
3
3
  import './ScanditIcon.js';
4
4
  import './private/Serializable.js';
5
5
  import './Common.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- import { a as FrameSource, b as FrameSourceState, c as FrameSourceListener } from './Camera-BoUtNCzS.js';
2
+ import { a as FrameSource, b as FrameSourceState, c as FrameSourceListener } from './Camera-bxDEtlUu.js';
3
3
  import { Serializable } from './private/Serializable.js';
4
4
  import './Common.js';
5
5
  import './private/FrameReaders/WatermarkStack.js';
@@ -1 +1 @@
1
- export{a as Localization}from'./chunks/chunk-7XQ3GHYH.js';
1
+ export{a as Localization}from'./chunks/chunk-GHTCNOQN.js';
@@ -8,7 +8,7 @@ import '../Common.js';
8
8
  import '../private/Serializable.js';
9
9
  import '../ScanditIcon.js';
10
10
  import '../private/utils/ScanditHTMLElement.js';
11
- import '../Camera-BoUtNCzS.js';
11
+ import '../Camera-bxDEtlUu.js';
12
12
  import '../private/FrameReaders/WatermarkStack.js';
13
13
  import '../tsHelper.js';
14
14
  import '../DataCaptureContextSettings.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- import { U as HintPresenter } from '../../Camera-BoUtNCzS.js';
2
+ import { U as HintPresenter } from '../../Camera-bxDEtlUu.js';
3
3
  import { NotificationConfiguration } from '../NotificationConfiguration.js';
4
4
  import { NotificationPresenter } from '../NotificationPresenter.js';
5
5
  import '../../private/Serializable.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- import { Z as GenericHint } from '../../Camera-BoUtNCzS.js';
2
+ import { Z as GenericHint } from '../../Camera-bxDEtlUu.js';
3
3
  import { NotificationConfiguration } from '../NotificationConfiguration.js';
4
4
  import '../../private/Serializable.js';
5
5
  import '../../Common.js';
@@ -1 +1 @@
1
- export{b as ScanditIcon,a as ScanditIconShape}from'./chunks/chunk-3RIR7ALE.js';
1
+ export{b as ScanditIcon,a as ScanditIconShape}from'./chunks/chunk-BHIFOHFI.js';
@@ -1 +1 @@
1
- export{c as ScanditIconBuilder,b as ScanditIconForIconType,a as ScanditIconType}from'./chunks/chunk-CMG3PSOW.js';export{a as ScanditIconShape}from'./chunks/chunk-3RIR7ALE.js';
1
+ export{c as ScanditIconBuilder,b as ScanditIconForIconType,a as ScanditIconType}from'./chunks/chunk-RX2673AX.js';export{a as ScanditIconShape}from'./chunks/chunk-BHIFOHFI.js';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="emscripten" />
2
- import { d as FrameSourceJSON, b as FrameSourceState, a as FrameSource, c as FrameSourceListener } from './Camera-BoUtNCzS.js';
2
+ import { d as FrameSourceJSON, b as FrameSourceState, a as FrameSource, c as FrameSourceListener } from './Camera-bxDEtlUu.js';
3
3
  import { SingleImageUploaderSettingsJSON, SingleImageUploaderSettings } from './SingleImageUploaderSettings.js';
4
4
  import { Serializable } from './private/Serializable.js';
5
5
  import './Common.js';
package/build/js/Sound.js CHANGED
@@ -1 +1 @@
1
- export{a as Sound}from'./chunks/chunk-6X73W3EO.js';
1
+ export{a as Sound}from'./chunks/chunk-2AJGK77F.js';
@@ -1 +1 @@
1
- export{a as Vibration}from'./chunks/chunk-2XJKSSK4.js';
1
+ export{a as Vibration}from'./chunks/chunk-DDYEOOSY.js';
@@ -77,7 +77,12 @@ declare enum Feature {
77
77
  * [CrossOriginIsolated](https://developer.mozilla.org/en-US/docs/Web/API/crossOriginIsolated) -
78
78
  * [current support?](https://caniuse.com/?search=crossoriginisolated)
79
79
  */
80
- CrossOriginIsolated = "crossOriginIsolated"
80
+ CrossOriginIsolated = "crossOriginIsolated",
81
+ /**
82
+ * [Web Animation API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API) -
83
+ * [current support?](https://caniuse.com/web-animation)
84
+ */
85
+ AnimationApi = "animationApi"
81
86
  }
82
87
 
83
88
  export { type BrowserCompatibility, Feature };
@@ -1 +1 @@
1
- export{a as Feature}from'./chunks/chunk-5LIWL2C4.js';
1
+ export{a as Feature}from'./chunks/chunk-NVK73TNL.js';
@@ -154,6 +154,12 @@ declare namespace BrowserHelper {
154
154
  * @hidden
155
155
  */
156
156
  export function isIOS(): boolean;
157
+ /**
158
+ * Check if the browser supports the Animation API.
159
+ * @returns Whether the browser supports the Animation API.
160
+ * @hidden
161
+ */
162
+ export function isAnimationApiSupported(): boolean;
157
163
  export { };
158
164
  }
159
165
 
@@ -1 +1 @@
1
- export{a as BrowserHelper}from'./chunks/chunk-IYYM2J7I.js';
1
+ export{a as BrowserHelper}from'./chunks/chunk-6VWIJ62O.js';
@@ -1,2 +1,2 @@
1
- import {a,b as b$1}from'./chunk-2Q5FZVGV.js';var B=a(k=>{(function(){var g=function(){this.init();};g.prototype={init:function(){var e=this||r;return e._counter=1e3,e._html5AudioPool=[],e.html5PoolSize=10,e._codecs={},e._howls=[],e._muted=false,e._volume=1,e._canPlayEvent="canplaythrough",e._navigator=typeof window<"u"&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=false,e.usingWebAudio=true,e.autoSuspend=true,e.ctx=null,e.autoUnlock=true,e._setup(),e},volume:function(e){var t=this||r;if(e=parseFloat(e),t.ctx||A(),typeof e<"u"&&e>=0&&e<=1){if(t._volume=e,t._muted)return t;t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e,r.ctx.currentTime);for(var n=0;n<t._howls.length;n++)if(!t._howls[n]._webAudio)for(var o=t._howls[n]._getSoundIds(),l=0;l<o.length;l++){var s=t._howls[n]._soundById(o[l]);s&&s._node&&(s._node.volume=s._volume*e);}return t}return t._volume},mute:function(e){var t=this||r;t.ctx||A(),t._muted=e,t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e?0:t._volume,r.ctx.currentTime);for(var n=0;n<t._howls.length;n++)if(!t._howls[n]._webAudio)for(var o=t._howls[n]._getSoundIds(),l=0;l<o.length;l++){var s=t._howls[n]._soundById(o[l]);s&&s._node&&(s._node.muted=e?true:s._muted);}return t},stop:function(){for(var e=this||r,t=0;t<e._howls.length;t++)e._howls[t].stop();return e},unload:function(){for(var e=this||r,t=e._howls.length-1;t>=0;t--)e._howls[t].unload();return e.usingWebAudio&&e.ctx&&typeof e.ctx.close<"u"&&(e.ctx.close(),e.ctx=null,A()),e},codecs:function(e){return (this||r)._codecs[e.replace(/^x-/,"")]},_setup:function(){var e=this||r;if(e.state=e.ctx&&e.ctx.state||"suspended",e._autoSuspend(),!e.usingWebAudio)if(typeof Audio<"u")try{var t=new Audio;typeof t.oncanplaythrough>"u"&&(e._canPlayEvent="canplay");}catch(n){e.noAudio=true;}else e.noAudio=true;try{var t=new Audio;t.muted&&(e.noAudio=true);}catch(n){}return e.noAudio||e._setupCodecs(),e},_setupCodecs:function(){var e=this||r,t=null;try{t=typeof Audio<"u"?new Audio:null;}catch(y){return e}if(!t||typeof t.canPlayType!="function")return e;var n=t.canPlayType("audio/mpeg;").replace(/^no$/,""),o=e._navigator?e._navigator.userAgent:"",l=o.match(/OPR\/(\d+)/g),s=l&&parseInt(l[0].split("/")[1],10)<33,a=o.indexOf("Safari")!==-1&&o.indexOf("Chrome")===-1,f=o.match(/Version\/(.*?) /),m=a&&f&&parseInt(f[1],10)<15;return e._codecs={mp3:!!(!s&&(n||t.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!n,opus:!!t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(t.canPlayType('audio/wav; codecs="1"')||t.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!t.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!t.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/m4a;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(t.canPlayType("audio/x-m4b;")||t.canPlayType("audio/m4b;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(t.canPlayType("audio/x-mp4;")||t.canPlayType("audio/mp4;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!m&&t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!m&&t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!t.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(t.canPlayType("audio/x-flac;")||t.canPlayType("audio/flac;")).replace(/^no$/,"")},e},_unlockAudio:function(){var e=this||r;if(!(e._audioUnlocked||!e.ctx)){e._audioUnlocked=false,e.autoUnlock=false,!e._mobileUnloaded&&e.ctx.sampleRate!==44100&&(e._mobileUnloaded=true,e.unload()),e._scratchBuffer=e.ctx.createBuffer(1,1,22050);var t=function(n){for(;e._html5AudioPool.length<e.html5PoolSize;)try{var o=new Audio;o._unlocked=true,e._releaseHtml5Audio(o);}catch(y){e.noAudio=true;break}for(var l=0;l<e._howls.length;l++)if(!e._howls[l]._webAudio)for(var s=e._howls[l]._getSoundIds(),a=0;a<s.length;a++){var f=e._howls[l]._soundById(s[a]);f&&f._node&&!f._node._unlocked&&(f._node._unlocked=true,f._node.load());}e._autoResume();var m=e.ctx.createBufferSource();m.buffer=e._scratchBuffer,m.connect(e.ctx.destination),typeof m.start>"u"?m.noteOn(0):m.start(0),typeof e.ctx.resume=="function"&&e.ctx.resume(),m.onended=function(){m.disconnect(0),e._audioUnlocked=true,document.removeEventListener("touchstart",t,true),document.removeEventListener("touchend",t,true),document.removeEventListener("click",t,true),document.removeEventListener("keydown",t,true);for(var y=0;y<e._howls.length;y++)e._howls[y]._emit("unlock");};};return document.addEventListener("touchstart",t,true),document.addEventListener("touchend",t,true),document.addEventListener("click",t,true),document.addEventListener("keydown",t,true),e}},_obtainHtml5Audio:function(){var e=this||r;if(e._html5AudioPool.length)return e._html5AudioPool.pop();var t=new Audio().play();return t&&typeof Promise<"u"&&(t instanceof Promise||typeof t.then=="function")&&t.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.");}),new Audio},_releaseHtml5Audio:function(e){var t=this||r;return e._unlocked&&t._html5AudioPool.push(e),t},_autoSuspend:function(){var e=this;if(!(!e.autoSuspend||!e.ctx||typeof e.ctx.suspend>"u"||!r.usingWebAudio)){for(var t=0;t<e._howls.length;t++)if(e._howls[t]._webAudio){for(var n=0;n<e._howls[t]._sounds.length;n++)if(!e._howls[t]._sounds[n]._paused)return e}return e._suspendTimer&&clearTimeout(e._suspendTimer),e._suspendTimer=setTimeout(function(){if(e.autoSuspend){e._suspendTimer=null,e.state="suspending";var o=function(){e.state="suspended",e._resumeAfterSuspend&&(delete e._resumeAfterSuspend,e._autoResume());};e.ctx.suspend().then(o,o);}},3e4),e}},_autoResume:function(){var e=this;if(!(!e.ctx||typeof e.ctx.resume>"u"||!r.usingWebAudio))return e.state==="running"&&e.ctx.state!=="interrupted"&&e._suspendTimer?(clearTimeout(e._suspendTimer),e._suspendTimer=null):e.state==="suspended"||e.state==="running"&&e.ctx.state==="interrupted"?(e.ctx.resume().then(function(){e.state="running";for(var t=0;t<e._howls.length;t++)e._howls[t]._emit("resume");}),e._suspendTimer&&(clearTimeout(e._suspendTimer),e._suspendTimer=null)):e.state==="suspending"&&(e._resumeAfterSuspend=true),e}};var r=new g,i=function(e){var t=this;if(!e.src||e.src.length===0){console.error("An array of source files must be passed with any new Howl.");return}t.init(e);};i.prototype={init:function(e){var t=this;return r.ctx||A(),t._autoplay=e.autoplay||false,t._format=typeof e.format!="string"?e.format:[e.format],t._html5=e.html5||false,t._muted=e.mute||false,t._loop=e.loop||false,t._pool=e.pool||5,t._preload=typeof e.preload=="boolean"||e.preload==="metadata"?e.preload:true,t._rate=e.rate||1,t._sprite=e.sprite||{},t._src=typeof e.src!="string"?e.src:[e.src],t._volume=e.volume!==void 0?e.volume:1,t._xhr={method:e.xhr&&e.xhr.method?e.xhr.method:"GET",headers:e.xhr&&e.xhr.headers?e.xhr.headers:null,withCredentials:e.xhr&&e.xhr.withCredentials?e.xhr.withCredentials:false},t._duration=0,t._state="unloaded",t._sounds=[],t._endTimers={},t._queue=[],t._playLock=false,t._onend=e.onend?[{fn:e.onend}]:[],t._onfade=e.onfade?[{fn:e.onfade}]:[],t._onload=e.onload?[{fn:e.onload}]:[],t._onloaderror=e.onloaderror?[{fn:e.onloaderror}]:[],t._onplayerror=e.onplayerror?[{fn:e.onplayerror}]:[],t._onpause=e.onpause?[{fn:e.onpause}]:[],t._onplay=e.onplay?[{fn:e.onplay}]:[],t._onstop=e.onstop?[{fn:e.onstop}]:[],t._onmute=e.onmute?[{fn:e.onmute}]:[],t._onvolume=e.onvolume?[{fn:e.onvolume}]:[],t._onrate=e.onrate?[{fn:e.onrate}]:[],t._onseek=e.onseek?[{fn:e.onseek}]:[],t._onunlock=e.onunlock?[{fn:e.onunlock}]:[],t._onresume=[],t._webAudio=r.usingWebAudio&&!t._html5,typeof r.ctx<"u"&&r.ctx&&r.autoUnlock&&r._unlockAudio(),r._howls.push(t),t._autoplay&&t._queue.push({event:"play",action:function(){t.play();}}),t._preload&&t._preload!=="none"&&t.load(),t},load:function(){var e=this,t=null;if(r.noAudio){e._emit("loaderror",null,"No audio support.");return}typeof e._src=="string"&&(e._src=[e._src]);for(var n=0;n<e._src.length;n++){var o,l;if(e._format&&e._format[n])o=e._format[n];else {if(l=e._src[n],typeof l!="string"){e._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}o=/^data:audio\/([^;,]+);/i.exec(l),o||(o=/\.([^.]+)$/.exec(l.split("?",1)[0])),o&&(o=o[1].toLowerCase());}if(o||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),o&&r.codecs(o)){t=e._src[n];break}}if(!t){e._emit("loaderror",null,"No codec support for selected audio sources.");return}return e._src=t,e._state="loading",window.location.protocol==="https:"&&t.slice(0,5)==="http:"&&(e._html5=true,e._webAudio=false),new u(e),e._webAudio&&d(e),e},play:function(e,t){var n=this,o=null;if(typeof e=="number")o=e,e=null;else {if(typeof e=="string"&&n._state==="loaded"&&!n._sprite[e])return null;if(typeof e>"u"&&(e="__default",!n._playLock)){for(var l=0,s=0;s<n._sounds.length;s++)n._sounds[s]._paused&&!n._sounds[s]._ended&&(l++,o=n._sounds[s]._id);l===1?e=null:o=null;}}var a=o?n._soundById(o):n._inactiveSound();if(!a)return null;if(o&&!e&&(e=a._sprite||"__default"),n._state!=="loaded"){a._sprite=e,a._ended=false;var f=a._id;return n._queue.push({event:"play",action:function(){n.play(f);}}),f}if(o&&!a._paused)return t||n._loadQueue("play"),a._id;n._webAudio&&r._autoResume();var m=Math.max(0,a._seek>0?a._seek:n._sprite[e][0]/1e3),y=Math.max(0,(n._sprite[e][0]+n._sprite[e][1])/1e3-m),w=y*1e3/Math.abs(a._rate),T=n._sprite[e][0]/1e3,S=(n._sprite[e][0]+n._sprite[e][1])/1e3;a._sprite=e,a._ended=false;var I=function(){a._paused=false,a._seek=m,a._start=T,a._stop=S,a._loop=!!(a._loop||n._sprite[e][2]);};if(m>=S){n._ended(a);return}var v=a._node;if(n._webAudio){var P=function(){n._playLock=false,I(),n._refreshBuffer(a);var x=a._muted||n._muted?0:a._volume;v.gain.setValueAtTime(x,r.ctx.currentTime),a._playStart=r.ctx.currentTime,typeof v.bufferSource.start>"u"?a._loop?v.bufferSource.noteGrainOn(0,m,86400):v.bufferSource.noteGrainOn(0,m,y):a._loop?v.bufferSource.start(0,m,86400):v.bufferSource.start(0,m,y),w!==1/0&&(n._endTimers[a._id]=setTimeout(n._ended.bind(n,a),w)),t||setTimeout(function(){n._emit("play",a._id),n._loadQueue();},0);};r.state==="running"&&r.ctx.state!=="interrupted"?P():(n._playLock=true,n.once("resume",P),n._clearTimer(a._id));}else {var M=function(){v.currentTime=m,v.muted=a._muted||n._muted||r._muted||v.muted,v.volume=a._volume*r.volume(),v.playbackRate=a._rate;try{var x=v.play();if(x&&typeof Promise<"u"&&(x instanceof Promise||typeof x.then=="function")?(n._playLock=true,I(),x.then(function(){n._playLock=false,v._unlocked=true,t?n._loadQueue():n._emit("play",a._id);}).catch(function(){n._playLock=false,n._emit("playerror",a._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),a._ended=true,a._paused=true;})):t||(n._playLock=false,I(),n._emit("play",a._id)),v.playbackRate=a._rate,v.paused){n._emit("playerror",a._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}e!=="__default"||a._loop?n._endTimers[a._id]=setTimeout(n._ended.bind(n,a),w):(n._endTimers[a._id]=function(){n._ended(a),v.removeEventListener("ended",n._endTimers[a._id],false);},v.addEventListener("ended",n._endTimers[a._id],false));}catch(D){n._emit("playerror",a._id,D);}};v.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(v.src=n._src,v.load());var G=window&&window.ejecta||!v.readyState&&r._navigator.isCocoonJS;if(v.readyState>=3||G)M();else {n._playLock=true,n._state="loading";var F=function(){n._state="loaded",M(),v.removeEventListener(r._canPlayEvent,F,false);};v.addEventListener(r._canPlayEvent,F,false),n._clearTimer(a._id);}}return a._id},pause:function(e){var t=this;if(t._state!=="loaded"||t._playLock)return t._queue.push({event:"pause",action:function(){t.pause(e);}}),t;for(var n=t._getSoundIds(e),o=0;o<n.length;o++){t._clearTimer(n[o]);var l=t._soundById(n[o]);if(l&&!l._paused&&(l._seek=t.seek(n[o]),l._rateSeek=0,l._paused=true,t._stopFade(n[o]),l._node))if(t._webAudio){if(!l._node.bufferSource)continue;typeof l._node.bufferSource.stop>"u"?l._node.bufferSource.noteOff(0):l._node.bufferSource.stop(0),t._cleanBuffer(l._node);}else (!isNaN(l._node.duration)||l._node.duration===1/0)&&l._node.pause();arguments[1]||t._emit("pause",l?l._id:null);}return t},stop:function(e,t){var n=this;if(n._state!=="loaded"||n._playLock)return n._queue.push({event:"stop",action:function(){n.stop(e);}}),n;for(var o=n._getSoundIds(e),l=0;l<o.length;l++){n._clearTimer(o[l]);var s=n._soundById(o[l]);s&&(s._seek=s._start||0,s._rateSeek=0,s._paused=true,s._ended=true,n._stopFade(o[l]),s._node&&(n._webAudio?s._node.bufferSource&&(typeof s._node.bufferSource.stop>"u"?s._node.bufferSource.noteOff(0):s._node.bufferSource.stop(0),n._cleanBuffer(s._node)):(!isNaN(s._node.duration)||s._node.duration===1/0)&&(s._node.currentTime=s._start||0,s._node.pause(),s._node.duration===1/0&&n._clearSound(s._node))),t||n._emit("stop",s._id));}return n},mute:function(e,t){var n=this;if(n._state!=="loaded"||n._playLock)return n._queue.push({event:"mute",action:function(){n.mute(e,t);}}),n;if(typeof t>"u")if(typeof e=="boolean")n._muted=e;else return n._muted;for(var o=n._getSoundIds(t),l=0;l<o.length;l++){var s=n._soundById(o[l]);s&&(s._muted=e,s._interval&&n._stopFade(s._id),n._webAudio&&s._node?s._node.gain.setValueAtTime(e?0:s._volume,r.ctx.currentTime):s._node&&(s._node.muted=r._muted?true:e),n._emit("mute",s._id));}return n},volume:function(){var e=this,t=arguments,n,o;if(t.length===0)return e._volume;if(t.length===1||t.length===2&&typeof t[1]>"u"){var l=e._getSoundIds(),s=l.indexOf(t[0]);s>=0?o=parseInt(t[0],10):n=parseFloat(t[0]);}else t.length>=2&&(n=parseFloat(t[0]),o=parseInt(t[1],10));var a;if(typeof n<"u"&&n>=0&&n<=1){if(e._state!=="loaded"||e._playLock)return e._queue.push({event:"volume",action:function(){e.volume.apply(e,t);}}),e;typeof o>"u"&&(e._volume=n),o=e._getSoundIds(o);for(var f=0;f<o.length;f++)a=e._soundById(o[f]),a&&(a._volume=n,t[2]||e._stopFade(o[f]),e._webAudio&&a._node&&!a._muted?a._node.gain.setValueAtTime(n,r.ctx.currentTime):a._node&&!a._muted&&(a._node.volume=n*r.volume()),e._emit("volume",a._id));}else return a=o?e._soundById(o):e._sounds[0],a?a._volume:0;return e},fade:function(e,t,n,o){var l=this;if(l._state!=="loaded"||l._playLock)return l._queue.push({event:"fade",action:function(){l.fade(e,t,n,o);}}),l;e=Math.min(Math.max(0,parseFloat(e)),1),t=Math.min(Math.max(0,parseFloat(t)),1),n=parseFloat(n),l.volume(e,o);for(var s=l._getSoundIds(o),a=0;a<s.length;a++){var f=l._soundById(s[a]);if(f){if(o||l._stopFade(s[a]),l._webAudio&&!f._muted){var m=r.ctx.currentTime,y=m+n/1e3;f._volume=e,f._node.gain.setValueAtTime(e,m),f._node.gain.linearRampToValueAtTime(t,y);}l._startFadeInterval(f,e,t,n,s[a],typeof o>"u");}}return l},_startFadeInterval:function(e,t,n,o,l,s){var a=this,f=t,m=n-t,y=Math.abs(m/.01),w=Math.max(4,y>0?o/y:o),T=Date.now();e._fadeTo=n,e._interval=setInterval(function(){var S=(Date.now()-T)/o;T=Date.now(),f+=m*S,f=Math.round(f*100)/100,m<0?f=Math.max(n,f):f=Math.min(n,f),a._webAudio?e._volume=f:a.volume(f,e._id,true),s&&(a._volume=f),(n<t&&f<=n||n>t&&f>=n)&&(clearInterval(e._interval),e._interval=null,e._fadeTo=null,a.volume(n,e._id),a._emit("fade",e._id));},w);},_stopFade:function(e){var t=this,n=t._soundById(e);return n&&n._interval&&(t._webAudio&&n._node.gain.cancelScheduledValues(r.ctx.currentTime),clearInterval(n._interval),n._interval=null,t.volume(n._fadeTo,e),n._fadeTo=null,t._emit("fade",e)),t},loop:function(){var e=this,t=arguments,n,o,l;if(t.length===0)return e._loop;if(t.length===1)if(typeof t[0]=="boolean")n=t[0],e._loop=n;else return l=e._soundById(parseInt(t[0],10)),l?l._loop:false;else t.length===2&&(n=t[0],o=parseInt(t[1],10));for(var s=e._getSoundIds(o),a=0;a<s.length;a++)l=e._soundById(s[a]),l&&(l._loop=n,e._webAudio&&l._node&&l._node.bufferSource&&(l._node.bufferSource.loop=n,n&&(l._node.bufferSource.loopStart=l._start||0,l._node.bufferSource.loopEnd=l._stop,e.playing(s[a])&&(e.pause(s[a],true),e.play(s[a],true)))));return e},rate:function(){var e=this,t=arguments,n,o;if(t.length===0)o=e._sounds[0]._id;else if(t.length===1){var l=e._getSoundIds(),s=l.indexOf(t[0]);s>=0?o=parseInt(t[0],10):n=parseFloat(t[0]);}else t.length===2&&(n=parseFloat(t[0]),o=parseInt(t[1],10));var a;if(typeof n=="number"){if(e._state!=="loaded"||e._playLock)return e._queue.push({event:"rate",action:function(){e.rate.apply(e,t);}}),e;typeof o>"u"&&(e._rate=n),o=e._getSoundIds(o);for(var f=0;f<o.length;f++)if(a=e._soundById(o[f]),a){e.playing(o[f])&&(a._rateSeek=e.seek(o[f]),a._playStart=e._webAudio?r.ctx.currentTime:a._playStart),a._rate=n,e._webAudio&&a._node&&a._node.bufferSource?a._node.bufferSource.playbackRate.setValueAtTime(n,r.ctx.currentTime):a._node&&(a._node.playbackRate=n);var m=e.seek(o[f]),y=(e._sprite[a._sprite][0]+e._sprite[a._sprite][1])/1e3-m,w=y*1e3/Math.abs(a._rate);(e._endTimers[o[f]]||!a._paused)&&(e._clearTimer(o[f]),e._endTimers[o[f]]=setTimeout(e._ended.bind(e,a),w)),e._emit("rate",a._id);}}else return a=e._soundById(o),a?a._rate:e._rate;return e},seek:function(){var e=this,t=arguments,n,o;if(t.length===0)e._sounds.length&&(o=e._sounds[0]._id);else if(t.length===1){var l=e._getSoundIds(),s=l.indexOf(t[0]);s>=0?o=parseInt(t[0],10):e._sounds.length&&(o=e._sounds[0]._id,n=parseFloat(t[0]));}else t.length===2&&(n=parseFloat(t[0]),o=parseInt(t[1],10));if(typeof o>"u")return 0;if(typeof n=="number"&&(e._state!=="loaded"||e._playLock))return e._queue.push({event:"seek",action:function(){e.seek.apply(e,t);}}),e;var a=e._soundById(o);if(a)if(typeof n=="number"&&n>=0){var f=e.playing(o);f&&e.pause(o,true),a._seek=n,a._ended=false,e._clearTimer(o),!e._webAudio&&a._node&&!isNaN(a._node.duration)&&(a._node.currentTime=n);var m=function(){f&&e.play(o,true),e._emit("seek",o);};if(f&&!e._webAudio){var y=function(){e._playLock?setTimeout(y,0):m();};setTimeout(y,0);}else m();}else if(e._webAudio){var w=e.playing(o)?r.ctx.currentTime-a._playStart:0,T=a._rateSeek?a._rateSeek-a._seek:0;return a._seek+(T+w*Math.abs(a._rate))}else return a._node.currentTime;return e},playing:function(e){var t=this;if(typeof e=="number"){var n=t._soundById(e);return n?!n._paused:false}for(var o=0;o<t._sounds.length;o++)if(!t._sounds[o]._paused)return true;return false},duration:function(e){var t=this,n=t._duration,o=t._soundById(e);return o&&(n=t._sprite[o._sprite][1]/1e3),n},state:function(){return this._state},unload:function(){for(var e=this,t=e._sounds,n=0;n<t.length;n++)t[n]._paused||e.stop(t[n]._id),e._webAudio||(e._clearSound(t[n]._node),t[n]._node.removeEventListener("error",t[n]._errorFn,false),t[n]._node.removeEventListener(r._canPlayEvent,t[n]._loadFn,false),t[n]._node.removeEventListener("ended",t[n]._endFn,false),r._releaseHtml5Audio(t[n]._node)),delete t[n]._node,e._clearTimer(t[n]._id);var o=r._howls.indexOf(e);o>=0&&r._howls.splice(o,1);var l=true;for(n=0;n<r._howls.length;n++)if(r._howls[n]._src===e._src||e._src.indexOf(r._howls[n]._src)>=0){l=false;break}return c&&l&&delete c[e._src],r.noAudio=false,e._state="unloaded",e._sounds=[],e=null,null},on:function(e,t,n,o){var l=this,s=l["_on"+e];return typeof t=="function"&&s.push(o?{id:n,fn:t,once:o}:{id:n,fn:t}),l},off:function(e,t,n){var o=this,l=o["_on"+e],s=0;if(typeof t=="number"&&(n=t,t=null),t||n)for(s=0;s<l.length;s++){var a=n===l[s].id;if(t===l[s].fn&&a||!t&&a){l.splice(s,1);break}}else if(e)o["_on"+e]=[];else {var f=Object.keys(o);for(s=0;s<f.length;s++)f[s].indexOf("_on")===0&&Array.isArray(o[f[s]])&&(o[f[s]]=[]);}return o},once:function(e,t,n){var o=this;return o.on(e,t,n,1),o},_emit:function(e,t,n){for(var o=this,l=o["_on"+e],s=l.length-1;s>=0;s--)(!l[s].id||l[s].id===t||e==="load")&&(setTimeout((function(a){a.call(this,t,n);}).bind(o,l[s].fn),0),l[s].once&&o.off(e,l[s].fn,l[s].id));return o._loadQueue(e),o},_loadQueue:function(e){var t=this;if(t._queue.length>0){var n=t._queue[0];n.event===e&&(t._queue.shift(),t._loadQueue()),e||n.action();}return t},_ended:function(e){var t=this,n=e._sprite;if(!t._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime<e._stop)return setTimeout(t._ended.bind(t,e),100),t;var o=!!(e._loop||t._sprite[n][2]);if(t._emit("end",e._id),!t._webAudio&&o&&t.stop(e._id,true).play(e._id),t._webAudio&&o){t._emit("play",e._id),e._seek=e._start||0,e._rateSeek=0,e._playStart=r.ctx.currentTime;var l=(e._stop-e._start)*1e3/Math.abs(e._rate);t._endTimers[e._id]=setTimeout(t._ended.bind(t,e),l);}return t._webAudio&&!o&&(e._paused=true,e._ended=true,e._seek=e._start||0,e._rateSeek=0,t._clearTimer(e._id),t._cleanBuffer(e._node),r._autoSuspend()),!t._webAudio&&!o&&t.stop(e._id,true),t},_clearTimer:function(e){var t=this;if(t._endTimers[e]){if(typeof t._endTimers[e]!="function")clearTimeout(t._endTimers[e]);else {var n=t._soundById(e);n&&n._node&&n._node.removeEventListener("ended",t._endTimers[e],false);}delete t._endTimers[e];}return t},_soundById:function(e){for(var t=this,n=0;n<t._sounds.length;n++)if(e===t._sounds[n]._id)return t._sounds[n];return null},_inactiveSound:function(){var e=this;e._drain();for(var t=0;t<e._sounds.length;t++)if(e._sounds[t]._ended)return e._sounds[t].reset();return new u(e)},_drain:function(){var e=this,t=e._pool,n=0,o=0;if(!(e._sounds.length<t)){for(o=0;o<e._sounds.length;o++)e._sounds[o]._ended&&n++;for(o=e._sounds.length-1;o>=0;o--){if(n<=t)return;e._sounds[o]._ended&&(e._webAudio&&e._sounds[o]._node&&e._sounds[o]._node.disconnect(0),e._sounds.splice(o,1),n--);}}},_getSoundIds:function(e){var t=this;if(typeof e>"u"){for(var n=[],o=0;o<t._sounds.length;o++)n.push(t._sounds[o]._id);return n}else return [e]},_refreshBuffer:function(e){var t=this;return e._node.bufferSource=r.ctx.createBufferSource(),e._node.bufferSource.buffer=c[t._src],e._panner?e._node.bufferSource.connect(e._panner):e._node.bufferSource.connect(e._node),e._node.bufferSource.loop=e._loop,e._loop&&(e._node.bufferSource.loopStart=e._start||0,e._node.bufferSource.loopEnd=e._stop||0),e._node.bufferSource.playbackRate.setValueAtTime(e._rate,r.ctx.currentTime),t},_cleanBuffer:function(e){var t=this,n=r._navigator&&r._navigator.vendor.indexOf("Apple")>=0;if(!e.bufferSource)return t;if(r._scratchBuffer&&e.bufferSource&&(e.bufferSource.onended=null,e.bufferSource.disconnect(0),n))try{e.bufferSource.buffer=r._scratchBuffer;}catch(o){}return e.bufferSource=null,t},_clearSound:function(e){var t=/MSIE |Trident\//.test(r._navigator&&r._navigator.userAgent);t||(e.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA");}};var u=function(e){this._parent=e,this.init();};u.prototype={init:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._paused=true,e._ended=true,e._sprite="__default",e._id=++r._counter,t._sounds.push(e),e.create(),e},create:function(){var e=this,t=e._parent,n=r._muted||e._muted||e._parent._muted?0:e._volume;return t._webAudio?(e._node=typeof r.ctx.createGain>"u"?r.ctx.createGainNode():r.ctx.createGain(),e._node.gain.setValueAtTime(n,r.ctx.currentTime),e._node.paused=true,e._node.connect(r.masterGain)):r.noAudio||(e._node=r._obtainHtml5Audio(),e._errorFn=e._errorListener.bind(e),e._node.addEventListener("error",e._errorFn,false),e._loadFn=e._loadListener.bind(e),e._node.addEventListener(r._canPlayEvent,e._loadFn,false),e._endFn=e._endListener.bind(e),e._node.addEventListener("ended",e._endFn,false),e._node.src=t._src,e._node.preload=t._preload===true?"auto":t._preload,e._node.volume=n*r.volume(),e._node.load()),e},reset:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._rateSeek=0,e._paused=true,e._ended=true,e._sprite="__default",e._id=++r._counter,e},_errorListener:function(){var e=this;e._parent._emit("loaderror",e._id,e._node.error?e._node.error.code:0),e._node.removeEventListener("error",e._errorFn,false);},_loadListener:function(){var e=this,t=e._parent;t._duration=Math.ceil(e._node.duration*10)/10,Object.keys(t._sprite).length===0&&(t._sprite={__default:[0,t._duration*1e3]}),t._state!=="loaded"&&(t._state="loaded",t._emit("load"),t._loadQueue()),e._node.removeEventListener(r._canPlayEvent,e._loadFn,false);},_endListener:function(){var e=this,t=e._parent;t._duration===1/0&&(t._duration=Math.ceil(e._node.duration*10)/10,t._sprite.__default[1]===1/0&&(t._sprite.__default[1]=t._duration*1e3),t._ended(e)),e._node.removeEventListener("ended",e._endFn,false);}};var c={},d=function(e){var t=e._src;if(c[t]){e._duration=c[t].duration,_(e);return}if(/^data:[^;]+;base64,/.test(t)){for(var n=atob(t.split(",")[1]),o=new Uint8Array(n.length),l=0;l<n.length;++l)o[l]=n.charCodeAt(l);p(o.buffer,e);}else {var s=new XMLHttpRequest;s.open(e._xhr.method,t,true),s.withCredentials=e._xhr.withCredentials,s.responseType="arraybuffer",e._xhr.headers&&Object.keys(e._xhr.headers).forEach(function(a){s.setRequestHeader(a,e._xhr.headers[a]);}),s.onload=function(){var a=(s.status+"")[0];if(a!=="0"&&a!=="2"&&a!=="3"){e._emit("loaderror",null,"Failed loading audio file with status: "+s.status+".");return}p(s.response,e);},s.onerror=function(){e._webAudio&&(e._html5=true,e._webAudio=false,e._sounds=[],delete c[t],e.load());},h(s);}},h=function(e){try{e.send();}catch(t){e.onerror();}},p=function(e,t){var n=function(){t._emit("loaderror",null,"Decoding audio data failed.");},o=function(l){l&&t._sounds.length>0?(c[t._src]=l,_(t,l)):n();};typeof Promise<"u"&&r.ctx.decodeAudioData.length===1?r.ctx.decodeAudioData(e).then(o).catch(n):r.ctx.decodeAudioData(e,o,n);},_=function(e,t){t&&!e._duration&&(e._duration=t.duration),Object.keys(e._sprite).length===0&&(e._sprite={__default:[0,e._duration*1e3]}),e._state!=="loaded"&&(e._state="loaded",e._emit("load"),e._loadQueue());},A=function(){if(r.usingWebAudio){try{typeof AudioContext<"u"?r.ctx=new AudioContext:typeof webkitAudioContext<"u"?r.ctx=new webkitAudioContext:r.usingWebAudio=false;}catch(l){r.usingWebAudio=false;}r.ctx||(r.usingWebAudio=false);var e=/iP(hone|od|ad)/.test(r._navigator&&r._navigator.platform),t=r._navigator&&r._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),n=t?parseInt(t[1],10):null;if(e&&n&&n<9){var o=/safari/.test(r._navigator&&r._navigator.userAgent.toLowerCase());r._navigator&&!o&&(r.usingWebAudio=false);}r.usingWebAudio&&(r.masterGain=typeof r.ctx.createGain>"u"?r.ctx.createGainNode():r.ctx.createGain(),r.masterGain.gain.setValueAtTime(r._muted?0:r._volume,r.ctx.currentTime),r.masterGain.connect(r.ctx.destination)),r._setup();}};typeof define=="function"&&define.amd&&define([],function(){return {Howler:r,Howl:i}}),typeof k<"u"&&(k.Howler=r,k.Howl=i),typeof global<"u"?(global.HowlerGlobal=g,global.Howler=r,global.Howl=i,global.Sound=u):typeof window<"u"&&(window.HowlerGlobal=g,window.Howler=r,window.Howl=i,window.Sound=u);})();(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(r){var i=this;if(!i.ctx||!i.ctx.listener)return i;for(var u=i._howls.length-1;u>=0;u--)i._howls[u].stereo(r);return i},HowlerGlobal.prototype.pos=function(r,i,u){var c=this;if(!c.ctx||!c.ctx.listener)return c;if(i=typeof i!="number"?c._pos[1]:i,u=typeof u!="number"?c._pos[2]:u,typeof r=="number")c._pos=[r,i,u],typeof c.ctx.listener.positionX<"u"?(c.ctx.listener.positionX.setTargetAtTime(c._pos[0],Howler.ctx.currentTime,.1),c.ctx.listener.positionY.setTargetAtTime(c._pos[1],Howler.ctx.currentTime,.1),c.ctx.listener.positionZ.setTargetAtTime(c._pos[2],Howler.ctx.currentTime,.1)):c.ctx.listener.setPosition(c._pos[0],c._pos[1],c._pos[2]);else return c._pos;return c},HowlerGlobal.prototype.orientation=function(r,i,u,c,d,h){var p=this;if(!p.ctx||!p.ctx.listener)return p;var _=p._orientation;if(i=typeof i!="number"?_[1]:i,u=typeof u!="number"?_[2]:u,c=typeof c!="number"?_[3]:c,d=typeof d!="number"?_[4]:d,h=typeof h!="number"?_[5]:h,typeof r=="number")p._orientation=[r,i,u,c,d,h],typeof p.ctx.listener.forwardX<"u"?(p.ctx.listener.forwardX.setTargetAtTime(r,Howler.ctx.currentTime,.1),p.ctx.listener.forwardY.setTargetAtTime(i,Howler.ctx.currentTime,.1),p.ctx.listener.forwardZ.setTargetAtTime(u,Howler.ctx.currentTime,.1),p.ctx.listener.upX.setTargetAtTime(c,Howler.ctx.currentTime,.1),p.ctx.listener.upY.setTargetAtTime(d,Howler.ctx.currentTime,.1),p.ctx.listener.upZ.setTargetAtTime(h,Howler.ctx.currentTime,.1)):p.ctx.listener.setOrientation(r,i,u,c,d,h);else return _;return p},Howl.prototype.init=function(r){return function(i){var u=this;return u._orientation=i.orientation||[1,0,0],u._stereo=i.stereo||null,u._pos=i.pos||null,u._pannerAttr={coneInnerAngle:typeof i.coneInnerAngle<"u"?i.coneInnerAngle:360,coneOuterAngle:typeof i.coneOuterAngle<"u"?i.coneOuterAngle:360,coneOuterGain:typeof i.coneOuterGain<"u"?i.coneOuterGain:0,distanceModel:typeof i.distanceModel<"u"?i.distanceModel:"inverse",maxDistance:typeof i.maxDistance<"u"?i.maxDistance:1e4,panningModel:typeof i.panningModel<"u"?i.panningModel:"HRTF",refDistance:typeof i.refDistance<"u"?i.refDistance:1,rolloffFactor:typeof i.rolloffFactor<"u"?i.rolloffFactor:1},u._onstereo=i.onstereo?[{fn:i.onstereo}]:[],u._onpos=i.onpos?[{fn:i.onpos}]:[],u._onorientation=i.onorientation?[{fn:i.onorientation}]:[],r.call(this,i)}}(Howl.prototype.init),Howl.prototype.stereo=function(r,i){var u=this;if(!u._webAudio)return u;if(u._state!=="loaded")return u._queue.push({event:"stereo",action:function(){u.stereo(r,i);}}),u;var c=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof i>"u")if(typeof r=="number")u._stereo=r,u._pos=[r,0,0];else return u._stereo;for(var d=u._getSoundIds(i),h=0;h<d.length;h++){var p=u._soundById(d[h]);if(p)if(typeof r=="number")p._stereo=r,p._pos=[r,0,0],p._node&&(p._pannerAttr.panningModel="equalpower",(!p._panner||!p._panner.pan)&&g(p,c),c==="spatial"?typeof p._panner.positionX<"u"?(p._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),p._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),p._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):p._panner.setPosition(r,0,0):p._panner.pan.setValueAtTime(r,Howler.ctx.currentTime)),u._emit("stereo",p._id);else return p._stereo}return u},Howl.prototype.pos=function(r,i,u,c){var d=this;if(!d._webAudio)return d;if(d._state!=="loaded")return d._queue.push({event:"pos",action:function(){d.pos(r,i,u,c);}}),d;if(i=typeof i!="number"?0:i,u=typeof u!="number"?-0.5:u,typeof c>"u")if(typeof r=="number")d._pos=[r,i,u];else return d._pos;for(var h=d._getSoundIds(c),p=0;p<h.length;p++){var _=d._soundById(h[p]);if(_)if(typeof r=="number")_._pos=[r,i,u],_._node&&((!_._panner||_._panner.pan)&&g(_,"spatial"),typeof _._panner.positionX<"u"?(_._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),_._panner.positionY.setValueAtTime(i,Howler.ctx.currentTime),_._panner.positionZ.setValueAtTime(u,Howler.ctx.currentTime)):_._panner.setPosition(r,i,u)),d._emit("pos",_._id);else return _._pos}return d},Howl.prototype.orientation=function(r,i,u,c){var d=this;if(!d._webAudio)return d;if(d._state!=="loaded")return d._queue.push({event:"orientation",action:function(){d.orientation(r,i,u,c);}}),d;if(i=typeof i!="number"?d._orientation[1]:i,u=typeof u!="number"?d._orientation[2]:u,typeof c>"u")if(typeof r=="number")d._orientation=[r,i,u];else return d._orientation;for(var h=d._getSoundIds(c),p=0;p<h.length;p++){var _=d._soundById(h[p]);if(_)if(typeof r=="number")_._orientation=[r,i,u],_._node&&(_._panner||(_._pos||(_._pos=d._pos||[0,0,-0.5]),g(_,"spatial")),typeof _._panner.orientationX<"u"?(_._panner.orientationX.setValueAtTime(r,Howler.ctx.currentTime),_._panner.orientationY.setValueAtTime(i,Howler.ctx.currentTime),_._panner.orientationZ.setValueAtTime(u,Howler.ctx.currentTime)):_._panner.setOrientation(r,i,u)),d._emit("orientation",_._id);else return _._orientation}return d},Howl.prototype.pannerAttr=function(){var r=this,i=arguments,u,c,d;if(!r._webAudio)return r;if(i.length===0)return r._pannerAttr;if(i.length===1)if(typeof i[0]=="object")u=i[0],typeof c>"u"&&(u.pannerAttr||(u.pannerAttr={coneInnerAngle:u.coneInnerAngle,coneOuterAngle:u.coneOuterAngle,coneOuterGain:u.coneOuterGain,distanceModel:u.distanceModel,maxDistance:u.maxDistance,refDistance:u.refDistance,rolloffFactor:u.rolloffFactor,panningModel:u.panningModel}),r._pannerAttr={coneInnerAngle:typeof u.pannerAttr.coneInnerAngle<"u"?u.pannerAttr.coneInnerAngle:r._coneInnerAngle,coneOuterAngle:typeof u.pannerAttr.coneOuterAngle<"u"?u.pannerAttr.coneOuterAngle:r._coneOuterAngle,coneOuterGain:typeof u.pannerAttr.coneOuterGain<"u"?u.pannerAttr.coneOuterGain:r._coneOuterGain,distanceModel:typeof u.pannerAttr.distanceModel<"u"?u.pannerAttr.distanceModel:r._distanceModel,maxDistance:typeof u.pannerAttr.maxDistance<"u"?u.pannerAttr.maxDistance:r._maxDistance,refDistance:typeof u.pannerAttr.refDistance<"u"?u.pannerAttr.refDistance:r._refDistance,rolloffFactor:typeof u.pannerAttr.rolloffFactor<"u"?u.pannerAttr.rolloffFactor:r._rolloffFactor,panningModel:typeof u.pannerAttr.panningModel<"u"?u.pannerAttr.panningModel:r._panningModel});else return d=r._soundById(parseInt(i[0],10)),d?d._pannerAttr:r._pannerAttr;else i.length===2&&(u=i[0],c=parseInt(i[1],10));for(var h=r._getSoundIds(c),p=0;p<h.length;p++)if(d=r._soundById(h[p]),d){var _=d._pannerAttr;_={coneInnerAngle:typeof u.coneInnerAngle<"u"?u.coneInnerAngle:_.coneInnerAngle,coneOuterAngle:typeof u.coneOuterAngle<"u"?u.coneOuterAngle:_.coneOuterAngle,coneOuterGain:typeof u.coneOuterGain<"u"?u.coneOuterGain:_.coneOuterGain,distanceModel:typeof u.distanceModel<"u"?u.distanceModel:_.distanceModel,maxDistance:typeof u.maxDistance<"u"?u.maxDistance:_.maxDistance,refDistance:typeof u.refDistance<"u"?u.refDistance:_.refDistance,rolloffFactor:typeof u.rolloffFactor<"u"?u.rolloffFactor:_.rolloffFactor,panningModel:typeof u.panningModel<"u"?u.panningModel:_.panningModel};var A=d._panner;A||(d._pos||(d._pos=r._pos||[0,0,-0.5]),g(d,"spatial"),A=d._panner),A.coneInnerAngle=_.coneInnerAngle,A.coneOuterAngle=_.coneOuterAngle,A.coneOuterGain=_.coneOuterGain,A.distanceModel=_.distanceModel,A.maxDistance=_.maxDistance,A.refDistance=_.refDistance,A.rolloffFactor=_.rolloffFactor,A.panningModel=_.panningModel;}return r},Sound.prototype.init=function(r){return function(){var i=this,u=i._parent;i._orientation=u._orientation,i._stereo=u._stereo,i._pos=u._pos,i._pannerAttr=u._pannerAttr,r.call(this),i._stereo?u.stereo(i._stereo):i._pos&&u.pos(i._pos[0],i._pos[1],i._pos[2],i._id);}}(Sound.prototype.init),Sound.prototype.reset=function(r){return function(){var i=this,u=i._parent;return i._orientation=u._orientation,i._stereo=u._stereo,i._pos=u._pos,i._pannerAttr=u._pannerAttr,i._stereo?u.stereo(i._stereo):i._pos?u.pos(i._pos[0],i._pos[1],i._pos[2],i._id):i._panner&&(i._panner.disconnect(0),i._panner=void 0,u._refreshBuffer(i)),r.call(this)}}(Sound.prototype.reset);var g=function(r,i){i=i||"spatial",i==="spatial"?(r._panner=Howler.ctx.createPanner(),r._panner.coneInnerAngle=r._pannerAttr.coneInnerAngle,r._panner.coneOuterAngle=r._pannerAttr.coneOuterAngle,r._panner.coneOuterGain=r._pannerAttr.coneOuterGain,r._panner.distanceModel=r._pannerAttr.distanceModel,r._panner.maxDistance=r._pannerAttr.maxDistance,r._panner.refDistance=r._pannerAttr.refDistance,r._panner.rolloffFactor=r._pannerAttr.rolloffFactor,r._panner.panningModel=r._pannerAttr.panningModel,typeof r._panner.positionX<"u"?(r._panner.positionX.setValueAtTime(r._pos[0],Howler.ctx.currentTime),r._panner.positionY.setValueAtTime(r._pos[1],Howler.ctx.currentTime),r._panner.positionZ.setValueAtTime(r._pos[2],Howler.ctx.currentTime)):r._panner.setPosition(r._pos[0],r._pos[1],r._pos[2]),typeof r._panner.orientationX<"u"?(r._panner.orientationX.setValueAtTime(r._orientation[0],Howler.ctx.currentTime),r._panner.orientationY.setValueAtTime(r._orientation[1],Howler.ctx.currentTime),r._panner.orientationZ.setValueAtTime(r._orientation[2],Howler.ctx.currentTime)):r._panner.setOrientation(r._orientation[0],r._orientation[1],r._orientation[2])):(r._panner=Howler.ctx.createStereoPanner(),r._panner.pan.setValueAtTime(r._stereo,Howler.ctx.currentTime)),r._panner.connect(r._node),r._paused||r._parent.pause(r._id,true).play(r._id,true);};})();});var O=b$1(B(),1),H=new Map;H.set("default",()=>import('../assets/beepSound.js'));var b=class b{constructor(r){this.resource=null;this.resource=r;}static get defaultSound(){return b._defaultSound instanceof b||(b._defaultSound=new b("default")),b._defaultSound}toJSONObject(){return this.resource!==null?{resource:this.resource}:{}}async play(){var r;if(this.audio==null&&this.resource!=null)if(H.has(this.resource)){let i=await((r=H.get(this.resource))==null?void 0:r());i!=null&&i.beepSound&&(this.audio=new O.Howl({src:i.beepSound,html5:true}));}else this.audio=new O.Howl({src:this.resource,html5:true});this.audio!=null&&this.audio.play();}};b._defaultSound=null;var L=b;
1
+ import {a,b as b$1}from'./chunk-Y6SLVHK3.js';var B=a(k=>{(function(){var g=function(){this.init();};g.prototype={init:function(){var e=this||r;return e._counter=1e3,e._html5AudioPool=[],e.html5PoolSize=10,e._codecs={},e._howls=[],e._muted=false,e._volume=1,e._canPlayEvent="canplaythrough",e._navigator=typeof window<"u"&&window.navigator?window.navigator:null,e.masterGain=null,e.noAudio=false,e.usingWebAudio=true,e.autoSuspend=true,e.ctx=null,e.autoUnlock=true,e._setup(),e},volume:function(e){var t=this||r;if(e=parseFloat(e),t.ctx||A(),typeof e<"u"&&e>=0&&e<=1){if(t._volume=e,t._muted)return t;t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e,r.ctx.currentTime);for(var n=0;n<t._howls.length;n++)if(!t._howls[n]._webAudio)for(var o=t._howls[n]._getSoundIds(),l=0;l<o.length;l++){var s=t._howls[n]._soundById(o[l]);s&&s._node&&(s._node.volume=s._volume*e);}return t}return t._volume},mute:function(e){var t=this||r;t.ctx||A(),t._muted=e,t.usingWebAudio&&t.masterGain.gain.setValueAtTime(e?0:t._volume,r.ctx.currentTime);for(var n=0;n<t._howls.length;n++)if(!t._howls[n]._webAudio)for(var o=t._howls[n]._getSoundIds(),l=0;l<o.length;l++){var s=t._howls[n]._soundById(o[l]);s&&s._node&&(s._node.muted=e?true:s._muted);}return t},stop:function(){for(var e=this||r,t=0;t<e._howls.length;t++)e._howls[t].stop();return e},unload:function(){for(var e=this||r,t=e._howls.length-1;t>=0;t--)e._howls[t].unload();return e.usingWebAudio&&e.ctx&&typeof e.ctx.close<"u"&&(e.ctx.close(),e.ctx=null,A()),e},codecs:function(e){return (this||r)._codecs[e.replace(/^x-/,"")]},_setup:function(){var e=this||r;if(e.state=e.ctx&&e.ctx.state||"suspended",e._autoSuspend(),!e.usingWebAudio)if(typeof Audio<"u")try{var t=new Audio;typeof t.oncanplaythrough>"u"&&(e._canPlayEvent="canplay");}catch(n){e.noAudio=true;}else e.noAudio=true;try{var t=new Audio;t.muted&&(e.noAudio=true);}catch(n){}return e.noAudio||e._setupCodecs(),e},_setupCodecs:function(){var e=this||r,t=null;try{t=typeof Audio<"u"?new Audio:null;}catch(y){return e}if(!t||typeof t.canPlayType!="function")return e;var n=t.canPlayType("audio/mpeg;").replace(/^no$/,""),o=e._navigator?e._navigator.userAgent:"",l=o.match(/OPR\/(\d+)/g),s=l&&parseInt(l[0].split("/")[1],10)<33,a=o.indexOf("Safari")!==-1&&o.indexOf("Chrome")===-1,f=o.match(/Version\/(.*?) /),m=a&&f&&parseInt(f[1],10)<15;return e._codecs={mp3:!!(!s&&(n||t.canPlayType("audio/mp3;").replace(/^no$/,""))),mpeg:!!n,opus:!!t.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),ogg:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),oga:!!t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),wav:!!(t.canPlayType('audio/wav; codecs="1"')||t.canPlayType("audio/wav")).replace(/^no$/,""),aac:!!t.canPlayType("audio/aac;").replace(/^no$/,""),caf:!!t.canPlayType("audio/x-caf;").replace(/^no$/,""),m4a:!!(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/m4a;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),m4b:!!(t.canPlayType("audio/x-m4b;")||t.canPlayType("audio/m4b;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),mp4:!!(t.canPlayType("audio/x-mp4;")||t.canPlayType("audio/mp4;")||t.canPlayType("audio/aac;")).replace(/^no$/,""),weba:!!(!m&&t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),webm:!!(!m&&t.canPlayType('audio/webm; codecs="vorbis"').replace(/^no$/,"")),dolby:!!t.canPlayType('audio/mp4; codecs="ec-3"').replace(/^no$/,""),flac:!!(t.canPlayType("audio/x-flac;")||t.canPlayType("audio/flac;")).replace(/^no$/,"")},e},_unlockAudio:function(){var e=this||r;if(!(e._audioUnlocked||!e.ctx)){e._audioUnlocked=false,e.autoUnlock=false,!e._mobileUnloaded&&e.ctx.sampleRate!==44100&&(e._mobileUnloaded=true,e.unload()),e._scratchBuffer=e.ctx.createBuffer(1,1,22050);var t=function(n){for(;e._html5AudioPool.length<e.html5PoolSize;)try{var o=new Audio;o._unlocked=true,e._releaseHtml5Audio(o);}catch(y){e.noAudio=true;break}for(var l=0;l<e._howls.length;l++)if(!e._howls[l]._webAudio)for(var s=e._howls[l]._getSoundIds(),a=0;a<s.length;a++){var f=e._howls[l]._soundById(s[a]);f&&f._node&&!f._node._unlocked&&(f._node._unlocked=true,f._node.load());}e._autoResume();var m=e.ctx.createBufferSource();m.buffer=e._scratchBuffer,m.connect(e.ctx.destination),typeof m.start>"u"?m.noteOn(0):m.start(0),typeof e.ctx.resume=="function"&&e.ctx.resume(),m.onended=function(){m.disconnect(0),e._audioUnlocked=true,document.removeEventListener("touchstart",t,true),document.removeEventListener("touchend",t,true),document.removeEventListener("click",t,true),document.removeEventListener("keydown",t,true);for(var y=0;y<e._howls.length;y++)e._howls[y]._emit("unlock");};};return document.addEventListener("touchstart",t,true),document.addEventListener("touchend",t,true),document.addEventListener("click",t,true),document.addEventListener("keydown",t,true),e}},_obtainHtml5Audio:function(){var e=this||r;if(e._html5AudioPool.length)return e._html5AudioPool.pop();var t=new Audio().play();return t&&typeof Promise<"u"&&(t instanceof Promise||typeof t.then=="function")&&t.catch(function(){console.warn("HTML5 Audio pool exhausted, returning potentially locked audio object.");}),new Audio},_releaseHtml5Audio:function(e){var t=this||r;return e._unlocked&&t._html5AudioPool.push(e),t},_autoSuspend:function(){var e=this;if(!(!e.autoSuspend||!e.ctx||typeof e.ctx.suspend>"u"||!r.usingWebAudio)){for(var t=0;t<e._howls.length;t++)if(e._howls[t]._webAudio){for(var n=0;n<e._howls[t]._sounds.length;n++)if(!e._howls[t]._sounds[n]._paused)return e}return e._suspendTimer&&clearTimeout(e._suspendTimer),e._suspendTimer=setTimeout(function(){if(e.autoSuspend){e._suspendTimer=null,e.state="suspending";var o=function(){e.state="suspended",e._resumeAfterSuspend&&(delete e._resumeAfterSuspend,e._autoResume());};e.ctx.suspend().then(o,o);}},3e4),e}},_autoResume:function(){var e=this;if(!(!e.ctx||typeof e.ctx.resume>"u"||!r.usingWebAudio))return e.state==="running"&&e.ctx.state!=="interrupted"&&e._suspendTimer?(clearTimeout(e._suspendTimer),e._suspendTimer=null):e.state==="suspended"||e.state==="running"&&e.ctx.state==="interrupted"?(e.ctx.resume().then(function(){e.state="running";for(var t=0;t<e._howls.length;t++)e._howls[t]._emit("resume");}),e._suspendTimer&&(clearTimeout(e._suspendTimer),e._suspendTimer=null)):e.state==="suspending"&&(e._resumeAfterSuspend=true),e}};var r=new g,i=function(e){var t=this;if(!e.src||e.src.length===0){console.error("An array of source files must be passed with any new Howl.");return}t.init(e);};i.prototype={init:function(e){var t=this;return r.ctx||A(),t._autoplay=e.autoplay||false,t._format=typeof e.format!="string"?e.format:[e.format],t._html5=e.html5||false,t._muted=e.mute||false,t._loop=e.loop||false,t._pool=e.pool||5,t._preload=typeof e.preload=="boolean"||e.preload==="metadata"?e.preload:true,t._rate=e.rate||1,t._sprite=e.sprite||{},t._src=typeof e.src!="string"?e.src:[e.src],t._volume=e.volume!==void 0?e.volume:1,t._xhr={method:e.xhr&&e.xhr.method?e.xhr.method:"GET",headers:e.xhr&&e.xhr.headers?e.xhr.headers:null,withCredentials:e.xhr&&e.xhr.withCredentials?e.xhr.withCredentials:false},t._duration=0,t._state="unloaded",t._sounds=[],t._endTimers={},t._queue=[],t._playLock=false,t._onend=e.onend?[{fn:e.onend}]:[],t._onfade=e.onfade?[{fn:e.onfade}]:[],t._onload=e.onload?[{fn:e.onload}]:[],t._onloaderror=e.onloaderror?[{fn:e.onloaderror}]:[],t._onplayerror=e.onplayerror?[{fn:e.onplayerror}]:[],t._onpause=e.onpause?[{fn:e.onpause}]:[],t._onplay=e.onplay?[{fn:e.onplay}]:[],t._onstop=e.onstop?[{fn:e.onstop}]:[],t._onmute=e.onmute?[{fn:e.onmute}]:[],t._onvolume=e.onvolume?[{fn:e.onvolume}]:[],t._onrate=e.onrate?[{fn:e.onrate}]:[],t._onseek=e.onseek?[{fn:e.onseek}]:[],t._onunlock=e.onunlock?[{fn:e.onunlock}]:[],t._onresume=[],t._webAudio=r.usingWebAudio&&!t._html5,typeof r.ctx<"u"&&r.ctx&&r.autoUnlock&&r._unlockAudio(),r._howls.push(t),t._autoplay&&t._queue.push({event:"play",action:function(){t.play();}}),t._preload&&t._preload!=="none"&&t.load(),t},load:function(){var e=this,t=null;if(r.noAudio){e._emit("loaderror",null,"No audio support.");return}typeof e._src=="string"&&(e._src=[e._src]);for(var n=0;n<e._src.length;n++){var o,l;if(e._format&&e._format[n])o=e._format[n];else {if(l=e._src[n],typeof l!="string"){e._emit("loaderror",null,"Non-string found in selected audio sources - ignoring.");continue}o=/^data:audio\/([^;,]+);/i.exec(l),o||(o=/\.([^.]+)$/.exec(l.split("?",1)[0])),o&&(o=o[1].toLowerCase());}if(o||console.warn('No file extension was found. Consider using the "format" property or specify an extension.'),o&&r.codecs(o)){t=e._src[n];break}}if(!t){e._emit("loaderror",null,"No codec support for selected audio sources.");return}return e._src=t,e._state="loading",window.location.protocol==="https:"&&t.slice(0,5)==="http:"&&(e._html5=true,e._webAudio=false),new u(e),e._webAudio&&d(e),e},play:function(e,t){var n=this,o=null;if(typeof e=="number")o=e,e=null;else {if(typeof e=="string"&&n._state==="loaded"&&!n._sprite[e])return null;if(typeof e>"u"&&(e="__default",!n._playLock)){for(var l=0,s=0;s<n._sounds.length;s++)n._sounds[s]._paused&&!n._sounds[s]._ended&&(l++,o=n._sounds[s]._id);l===1?e=null:o=null;}}var a=o?n._soundById(o):n._inactiveSound();if(!a)return null;if(o&&!e&&(e=a._sprite||"__default"),n._state!=="loaded"){a._sprite=e,a._ended=false;var f=a._id;return n._queue.push({event:"play",action:function(){n.play(f);}}),f}if(o&&!a._paused)return t||n._loadQueue("play"),a._id;n._webAudio&&r._autoResume();var m=Math.max(0,a._seek>0?a._seek:n._sprite[e][0]/1e3),y=Math.max(0,(n._sprite[e][0]+n._sprite[e][1])/1e3-m),w=y*1e3/Math.abs(a._rate),T=n._sprite[e][0]/1e3,S=(n._sprite[e][0]+n._sprite[e][1])/1e3;a._sprite=e,a._ended=false;var I=function(){a._paused=false,a._seek=m,a._start=T,a._stop=S,a._loop=!!(a._loop||n._sprite[e][2]);};if(m>=S){n._ended(a);return}var v=a._node;if(n._webAudio){var P=function(){n._playLock=false,I(),n._refreshBuffer(a);var x=a._muted||n._muted?0:a._volume;v.gain.setValueAtTime(x,r.ctx.currentTime),a._playStart=r.ctx.currentTime,typeof v.bufferSource.start>"u"?a._loop?v.bufferSource.noteGrainOn(0,m,86400):v.bufferSource.noteGrainOn(0,m,y):a._loop?v.bufferSource.start(0,m,86400):v.bufferSource.start(0,m,y),w!==1/0&&(n._endTimers[a._id]=setTimeout(n._ended.bind(n,a),w)),t||setTimeout(function(){n._emit("play",a._id),n._loadQueue();},0);};r.state==="running"&&r.ctx.state!=="interrupted"?P():(n._playLock=true,n.once("resume",P),n._clearTimer(a._id));}else {var M=function(){v.currentTime=m,v.muted=a._muted||n._muted||r._muted||v.muted,v.volume=a._volume*r.volume(),v.playbackRate=a._rate;try{var x=v.play();if(x&&typeof Promise<"u"&&(x instanceof Promise||typeof x.then=="function")?(n._playLock=true,I(),x.then(function(){n._playLock=false,v._unlocked=true,t?n._loadQueue():n._emit("play",a._id);}).catch(function(){n._playLock=false,n._emit("playerror",a._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."),a._ended=true,a._paused=true;})):t||(n._playLock=false,I(),n._emit("play",a._id)),v.playbackRate=a._rate,v.paused){n._emit("playerror",a._id,"Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");return}e!=="__default"||a._loop?n._endTimers[a._id]=setTimeout(n._ended.bind(n,a),w):(n._endTimers[a._id]=function(){n._ended(a),v.removeEventListener("ended",n._endTimers[a._id],false);},v.addEventListener("ended",n._endTimers[a._id],false));}catch(D){n._emit("playerror",a._id,D);}};v.src==="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"&&(v.src=n._src,v.load());var G=window&&window.ejecta||!v.readyState&&r._navigator.isCocoonJS;if(v.readyState>=3||G)M();else {n._playLock=true,n._state="loading";var F=function(){n._state="loaded",M(),v.removeEventListener(r._canPlayEvent,F,false);};v.addEventListener(r._canPlayEvent,F,false),n._clearTimer(a._id);}}return a._id},pause:function(e){var t=this;if(t._state!=="loaded"||t._playLock)return t._queue.push({event:"pause",action:function(){t.pause(e);}}),t;for(var n=t._getSoundIds(e),o=0;o<n.length;o++){t._clearTimer(n[o]);var l=t._soundById(n[o]);if(l&&!l._paused&&(l._seek=t.seek(n[o]),l._rateSeek=0,l._paused=true,t._stopFade(n[o]),l._node))if(t._webAudio){if(!l._node.bufferSource)continue;typeof l._node.bufferSource.stop>"u"?l._node.bufferSource.noteOff(0):l._node.bufferSource.stop(0),t._cleanBuffer(l._node);}else (!isNaN(l._node.duration)||l._node.duration===1/0)&&l._node.pause();arguments[1]||t._emit("pause",l?l._id:null);}return t},stop:function(e,t){var n=this;if(n._state!=="loaded"||n._playLock)return n._queue.push({event:"stop",action:function(){n.stop(e);}}),n;for(var o=n._getSoundIds(e),l=0;l<o.length;l++){n._clearTimer(o[l]);var s=n._soundById(o[l]);s&&(s._seek=s._start||0,s._rateSeek=0,s._paused=true,s._ended=true,n._stopFade(o[l]),s._node&&(n._webAudio?s._node.bufferSource&&(typeof s._node.bufferSource.stop>"u"?s._node.bufferSource.noteOff(0):s._node.bufferSource.stop(0),n._cleanBuffer(s._node)):(!isNaN(s._node.duration)||s._node.duration===1/0)&&(s._node.currentTime=s._start||0,s._node.pause(),s._node.duration===1/0&&n._clearSound(s._node))),t||n._emit("stop",s._id));}return n},mute:function(e,t){var n=this;if(n._state!=="loaded"||n._playLock)return n._queue.push({event:"mute",action:function(){n.mute(e,t);}}),n;if(typeof t>"u")if(typeof e=="boolean")n._muted=e;else return n._muted;for(var o=n._getSoundIds(t),l=0;l<o.length;l++){var s=n._soundById(o[l]);s&&(s._muted=e,s._interval&&n._stopFade(s._id),n._webAudio&&s._node?s._node.gain.setValueAtTime(e?0:s._volume,r.ctx.currentTime):s._node&&(s._node.muted=r._muted?true:e),n._emit("mute",s._id));}return n},volume:function(){var e=this,t=arguments,n,o;if(t.length===0)return e._volume;if(t.length===1||t.length===2&&typeof t[1]>"u"){var l=e._getSoundIds(),s=l.indexOf(t[0]);s>=0?o=parseInt(t[0],10):n=parseFloat(t[0]);}else t.length>=2&&(n=parseFloat(t[0]),o=parseInt(t[1],10));var a;if(typeof n<"u"&&n>=0&&n<=1){if(e._state!=="loaded"||e._playLock)return e._queue.push({event:"volume",action:function(){e.volume.apply(e,t);}}),e;typeof o>"u"&&(e._volume=n),o=e._getSoundIds(o);for(var f=0;f<o.length;f++)a=e._soundById(o[f]),a&&(a._volume=n,t[2]||e._stopFade(o[f]),e._webAudio&&a._node&&!a._muted?a._node.gain.setValueAtTime(n,r.ctx.currentTime):a._node&&!a._muted&&(a._node.volume=n*r.volume()),e._emit("volume",a._id));}else return a=o?e._soundById(o):e._sounds[0],a?a._volume:0;return e},fade:function(e,t,n,o){var l=this;if(l._state!=="loaded"||l._playLock)return l._queue.push({event:"fade",action:function(){l.fade(e,t,n,o);}}),l;e=Math.min(Math.max(0,parseFloat(e)),1),t=Math.min(Math.max(0,parseFloat(t)),1),n=parseFloat(n),l.volume(e,o);for(var s=l._getSoundIds(o),a=0;a<s.length;a++){var f=l._soundById(s[a]);if(f){if(o||l._stopFade(s[a]),l._webAudio&&!f._muted){var m=r.ctx.currentTime,y=m+n/1e3;f._volume=e,f._node.gain.setValueAtTime(e,m),f._node.gain.linearRampToValueAtTime(t,y);}l._startFadeInterval(f,e,t,n,s[a],typeof o>"u");}}return l},_startFadeInterval:function(e,t,n,o,l,s){var a=this,f=t,m=n-t,y=Math.abs(m/.01),w=Math.max(4,y>0?o/y:o),T=Date.now();e._fadeTo=n,e._interval=setInterval(function(){var S=(Date.now()-T)/o;T=Date.now(),f+=m*S,f=Math.round(f*100)/100,m<0?f=Math.max(n,f):f=Math.min(n,f),a._webAudio?e._volume=f:a.volume(f,e._id,true),s&&(a._volume=f),(n<t&&f<=n||n>t&&f>=n)&&(clearInterval(e._interval),e._interval=null,e._fadeTo=null,a.volume(n,e._id),a._emit("fade",e._id));},w);},_stopFade:function(e){var t=this,n=t._soundById(e);return n&&n._interval&&(t._webAudio&&n._node.gain.cancelScheduledValues(r.ctx.currentTime),clearInterval(n._interval),n._interval=null,t.volume(n._fadeTo,e),n._fadeTo=null,t._emit("fade",e)),t},loop:function(){var e=this,t=arguments,n,o,l;if(t.length===0)return e._loop;if(t.length===1)if(typeof t[0]=="boolean")n=t[0],e._loop=n;else return l=e._soundById(parseInt(t[0],10)),l?l._loop:false;else t.length===2&&(n=t[0],o=parseInt(t[1],10));for(var s=e._getSoundIds(o),a=0;a<s.length;a++)l=e._soundById(s[a]),l&&(l._loop=n,e._webAudio&&l._node&&l._node.bufferSource&&(l._node.bufferSource.loop=n,n&&(l._node.bufferSource.loopStart=l._start||0,l._node.bufferSource.loopEnd=l._stop,e.playing(s[a])&&(e.pause(s[a],true),e.play(s[a],true)))));return e},rate:function(){var e=this,t=arguments,n,o;if(t.length===0)o=e._sounds[0]._id;else if(t.length===1){var l=e._getSoundIds(),s=l.indexOf(t[0]);s>=0?o=parseInt(t[0],10):n=parseFloat(t[0]);}else t.length===2&&(n=parseFloat(t[0]),o=parseInt(t[1],10));var a;if(typeof n=="number"){if(e._state!=="loaded"||e._playLock)return e._queue.push({event:"rate",action:function(){e.rate.apply(e,t);}}),e;typeof o>"u"&&(e._rate=n),o=e._getSoundIds(o);for(var f=0;f<o.length;f++)if(a=e._soundById(o[f]),a){e.playing(o[f])&&(a._rateSeek=e.seek(o[f]),a._playStart=e._webAudio?r.ctx.currentTime:a._playStart),a._rate=n,e._webAudio&&a._node&&a._node.bufferSource?a._node.bufferSource.playbackRate.setValueAtTime(n,r.ctx.currentTime):a._node&&(a._node.playbackRate=n);var m=e.seek(o[f]),y=(e._sprite[a._sprite][0]+e._sprite[a._sprite][1])/1e3-m,w=y*1e3/Math.abs(a._rate);(e._endTimers[o[f]]||!a._paused)&&(e._clearTimer(o[f]),e._endTimers[o[f]]=setTimeout(e._ended.bind(e,a),w)),e._emit("rate",a._id);}}else return a=e._soundById(o),a?a._rate:e._rate;return e},seek:function(){var e=this,t=arguments,n,o;if(t.length===0)e._sounds.length&&(o=e._sounds[0]._id);else if(t.length===1){var l=e._getSoundIds(),s=l.indexOf(t[0]);s>=0?o=parseInt(t[0],10):e._sounds.length&&(o=e._sounds[0]._id,n=parseFloat(t[0]));}else t.length===2&&(n=parseFloat(t[0]),o=parseInt(t[1],10));if(typeof o>"u")return 0;if(typeof n=="number"&&(e._state!=="loaded"||e._playLock))return e._queue.push({event:"seek",action:function(){e.seek.apply(e,t);}}),e;var a=e._soundById(o);if(a)if(typeof n=="number"&&n>=0){var f=e.playing(o);f&&e.pause(o,true),a._seek=n,a._ended=false,e._clearTimer(o),!e._webAudio&&a._node&&!isNaN(a._node.duration)&&(a._node.currentTime=n);var m=function(){f&&e.play(o,true),e._emit("seek",o);};if(f&&!e._webAudio){var y=function(){e._playLock?setTimeout(y,0):m();};setTimeout(y,0);}else m();}else if(e._webAudio){var w=e.playing(o)?r.ctx.currentTime-a._playStart:0,T=a._rateSeek?a._rateSeek-a._seek:0;return a._seek+(T+w*Math.abs(a._rate))}else return a._node.currentTime;return e},playing:function(e){var t=this;if(typeof e=="number"){var n=t._soundById(e);return n?!n._paused:false}for(var o=0;o<t._sounds.length;o++)if(!t._sounds[o]._paused)return true;return false},duration:function(e){var t=this,n=t._duration,o=t._soundById(e);return o&&(n=t._sprite[o._sprite][1]/1e3),n},state:function(){return this._state},unload:function(){for(var e=this,t=e._sounds,n=0;n<t.length;n++)t[n]._paused||e.stop(t[n]._id),e._webAudio||(e._clearSound(t[n]._node),t[n]._node.removeEventListener("error",t[n]._errorFn,false),t[n]._node.removeEventListener(r._canPlayEvent,t[n]._loadFn,false),t[n]._node.removeEventListener("ended",t[n]._endFn,false),r._releaseHtml5Audio(t[n]._node)),delete t[n]._node,e._clearTimer(t[n]._id);var o=r._howls.indexOf(e);o>=0&&r._howls.splice(o,1);var l=true;for(n=0;n<r._howls.length;n++)if(r._howls[n]._src===e._src||e._src.indexOf(r._howls[n]._src)>=0){l=false;break}return c&&l&&delete c[e._src],r.noAudio=false,e._state="unloaded",e._sounds=[],e=null,null},on:function(e,t,n,o){var l=this,s=l["_on"+e];return typeof t=="function"&&s.push(o?{id:n,fn:t,once:o}:{id:n,fn:t}),l},off:function(e,t,n){var o=this,l=o["_on"+e],s=0;if(typeof t=="number"&&(n=t,t=null),t||n)for(s=0;s<l.length;s++){var a=n===l[s].id;if(t===l[s].fn&&a||!t&&a){l.splice(s,1);break}}else if(e)o["_on"+e]=[];else {var f=Object.keys(o);for(s=0;s<f.length;s++)f[s].indexOf("_on")===0&&Array.isArray(o[f[s]])&&(o[f[s]]=[]);}return o},once:function(e,t,n){var o=this;return o.on(e,t,n,1),o},_emit:function(e,t,n){for(var o=this,l=o["_on"+e],s=l.length-1;s>=0;s--)(!l[s].id||l[s].id===t||e==="load")&&(setTimeout((function(a){a.call(this,t,n);}).bind(o,l[s].fn),0),l[s].once&&o.off(e,l[s].fn,l[s].id));return o._loadQueue(e),o},_loadQueue:function(e){var t=this;if(t._queue.length>0){var n=t._queue[0];n.event===e&&(t._queue.shift(),t._loadQueue()),e||n.action();}return t},_ended:function(e){var t=this,n=e._sprite;if(!t._webAudio&&e._node&&!e._node.paused&&!e._node.ended&&e._node.currentTime<e._stop)return setTimeout(t._ended.bind(t,e),100),t;var o=!!(e._loop||t._sprite[n][2]);if(t._emit("end",e._id),!t._webAudio&&o&&t.stop(e._id,true).play(e._id),t._webAudio&&o){t._emit("play",e._id),e._seek=e._start||0,e._rateSeek=0,e._playStart=r.ctx.currentTime;var l=(e._stop-e._start)*1e3/Math.abs(e._rate);t._endTimers[e._id]=setTimeout(t._ended.bind(t,e),l);}return t._webAudio&&!o&&(e._paused=true,e._ended=true,e._seek=e._start||0,e._rateSeek=0,t._clearTimer(e._id),t._cleanBuffer(e._node),r._autoSuspend()),!t._webAudio&&!o&&t.stop(e._id,true),t},_clearTimer:function(e){var t=this;if(t._endTimers[e]){if(typeof t._endTimers[e]!="function")clearTimeout(t._endTimers[e]);else {var n=t._soundById(e);n&&n._node&&n._node.removeEventListener("ended",t._endTimers[e],false);}delete t._endTimers[e];}return t},_soundById:function(e){for(var t=this,n=0;n<t._sounds.length;n++)if(e===t._sounds[n]._id)return t._sounds[n];return null},_inactiveSound:function(){var e=this;e._drain();for(var t=0;t<e._sounds.length;t++)if(e._sounds[t]._ended)return e._sounds[t].reset();return new u(e)},_drain:function(){var e=this,t=e._pool,n=0,o=0;if(!(e._sounds.length<t)){for(o=0;o<e._sounds.length;o++)e._sounds[o]._ended&&n++;for(o=e._sounds.length-1;o>=0;o--){if(n<=t)return;e._sounds[o]._ended&&(e._webAudio&&e._sounds[o]._node&&e._sounds[o]._node.disconnect(0),e._sounds.splice(o,1),n--);}}},_getSoundIds:function(e){var t=this;if(typeof e>"u"){for(var n=[],o=0;o<t._sounds.length;o++)n.push(t._sounds[o]._id);return n}else return [e]},_refreshBuffer:function(e){var t=this;return e._node.bufferSource=r.ctx.createBufferSource(),e._node.bufferSource.buffer=c[t._src],e._panner?e._node.bufferSource.connect(e._panner):e._node.bufferSource.connect(e._node),e._node.bufferSource.loop=e._loop,e._loop&&(e._node.bufferSource.loopStart=e._start||0,e._node.bufferSource.loopEnd=e._stop||0),e._node.bufferSource.playbackRate.setValueAtTime(e._rate,r.ctx.currentTime),t},_cleanBuffer:function(e){var t=this,n=r._navigator&&r._navigator.vendor.indexOf("Apple")>=0;if(!e.bufferSource)return t;if(r._scratchBuffer&&e.bufferSource&&(e.bufferSource.onended=null,e.bufferSource.disconnect(0),n))try{e.bufferSource.buffer=r._scratchBuffer;}catch(o){}return e.bufferSource=null,t},_clearSound:function(e){var t=/MSIE |Trident\//.test(r._navigator&&r._navigator.userAgent);t||(e.src="data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA");}};var u=function(e){this._parent=e,this.init();};u.prototype={init:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._paused=true,e._ended=true,e._sprite="__default",e._id=++r._counter,t._sounds.push(e),e.create(),e},create:function(){var e=this,t=e._parent,n=r._muted||e._muted||e._parent._muted?0:e._volume;return t._webAudio?(e._node=typeof r.ctx.createGain>"u"?r.ctx.createGainNode():r.ctx.createGain(),e._node.gain.setValueAtTime(n,r.ctx.currentTime),e._node.paused=true,e._node.connect(r.masterGain)):r.noAudio||(e._node=r._obtainHtml5Audio(),e._errorFn=e._errorListener.bind(e),e._node.addEventListener("error",e._errorFn,false),e._loadFn=e._loadListener.bind(e),e._node.addEventListener(r._canPlayEvent,e._loadFn,false),e._endFn=e._endListener.bind(e),e._node.addEventListener("ended",e._endFn,false),e._node.src=t._src,e._node.preload=t._preload===true?"auto":t._preload,e._node.volume=n*r.volume(),e._node.load()),e},reset:function(){var e=this,t=e._parent;return e._muted=t._muted,e._loop=t._loop,e._volume=t._volume,e._rate=t._rate,e._seek=0,e._rateSeek=0,e._paused=true,e._ended=true,e._sprite="__default",e._id=++r._counter,e},_errorListener:function(){var e=this;e._parent._emit("loaderror",e._id,e._node.error?e._node.error.code:0),e._node.removeEventListener("error",e._errorFn,false);},_loadListener:function(){var e=this,t=e._parent;t._duration=Math.ceil(e._node.duration*10)/10,Object.keys(t._sprite).length===0&&(t._sprite={__default:[0,t._duration*1e3]}),t._state!=="loaded"&&(t._state="loaded",t._emit("load"),t._loadQueue()),e._node.removeEventListener(r._canPlayEvent,e._loadFn,false);},_endListener:function(){var e=this,t=e._parent;t._duration===1/0&&(t._duration=Math.ceil(e._node.duration*10)/10,t._sprite.__default[1]===1/0&&(t._sprite.__default[1]=t._duration*1e3),t._ended(e)),e._node.removeEventListener("ended",e._endFn,false);}};var c={},d=function(e){var t=e._src;if(c[t]){e._duration=c[t].duration,_(e);return}if(/^data:[^;]+;base64,/.test(t)){for(var n=atob(t.split(",")[1]),o=new Uint8Array(n.length),l=0;l<n.length;++l)o[l]=n.charCodeAt(l);p(o.buffer,e);}else {var s=new XMLHttpRequest;s.open(e._xhr.method,t,true),s.withCredentials=e._xhr.withCredentials,s.responseType="arraybuffer",e._xhr.headers&&Object.keys(e._xhr.headers).forEach(function(a){s.setRequestHeader(a,e._xhr.headers[a]);}),s.onload=function(){var a=(s.status+"")[0];if(a!=="0"&&a!=="2"&&a!=="3"){e._emit("loaderror",null,"Failed loading audio file with status: "+s.status+".");return}p(s.response,e);},s.onerror=function(){e._webAudio&&(e._html5=true,e._webAudio=false,e._sounds=[],delete c[t],e.load());},h(s);}},h=function(e){try{e.send();}catch(t){e.onerror();}},p=function(e,t){var n=function(){t._emit("loaderror",null,"Decoding audio data failed.");},o=function(l){l&&t._sounds.length>0?(c[t._src]=l,_(t,l)):n();};typeof Promise<"u"&&r.ctx.decodeAudioData.length===1?r.ctx.decodeAudioData(e).then(o).catch(n):r.ctx.decodeAudioData(e,o,n);},_=function(e,t){t&&!e._duration&&(e._duration=t.duration),Object.keys(e._sprite).length===0&&(e._sprite={__default:[0,e._duration*1e3]}),e._state!=="loaded"&&(e._state="loaded",e._emit("load"),e._loadQueue());},A=function(){if(r.usingWebAudio){try{typeof AudioContext<"u"?r.ctx=new AudioContext:typeof webkitAudioContext<"u"?r.ctx=new webkitAudioContext:r.usingWebAudio=false;}catch(l){r.usingWebAudio=false;}r.ctx||(r.usingWebAudio=false);var e=/iP(hone|od|ad)/.test(r._navigator&&r._navigator.platform),t=r._navigator&&r._navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),n=t?parseInt(t[1],10):null;if(e&&n&&n<9){var o=/safari/.test(r._navigator&&r._navigator.userAgent.toLowerCase());r._navigator&&!o&&(r.usingWebAudio=false);}r.usingWebAudio&&(r.masterGain=typeof r.ctx.createGain>"u"?r.ctx.createGainNode():r.ctx.createGain(),r.masterGain.gain.setValueAtTime(r._muted?0:r._volume,r.ctx.currentTime),r.masterGain.connect(r.ctx.destination)),r._setup();}};typeof define=="function"&&define.amd&&define([],function(){return {Howler:r,Howl:i}}),typeof k<"u"&&(k.Howler=r,k.Howl=i),typeof global<"u"?(global.HowlerGlobal=g,global.Howler=r,global.Howl=i,global.Sound=u):typeof window<"u"&&(window.HowlerGlobal=g,window.Howler=r,window.Howl=i,window.Sound=u);})();(function(){HowlerGlobal.prototype._pos=[0,0,0],HowlerGlobal.prototype._orientation=[0,0,-1,0,1,0],HowlerGlobal.prototype.stereo=function(r){var i=this;if(!i.ctx||!i.ctx.listener)return i;for(var u=i._howls.length-1;u>=0;u--)i._howls[u].stereo(r);return i},HowlerGlobal.prototype.pos=function(r,i,u){var c=this;if(!c.ctx||!c.ctx.listener)return c;if(i=typeof i!="number"?c._pos[1]:i,u=typeof u!="number"?c._pos[2]:u,typeof r=="number")c._pos=[r,i,u],typeof c.ctx.listener.positionX<"u"?(c.ctx.listener.positionX.setTargetAtTime(c._pos[0],Howler.ctx.currentTime,.1),c.ctx.listener.positionY.setTargetAtTime(c._pos[1],Howler.ctx.currentTime,.1),c.ctx.listener.positionZ.setTargetAtTime(c._pos[2],Howler.ctx.currentTime,.1)):c.ctx.listener.setPosition(c._pos[0],c._pos[1],c._pos[2]);else return c._pos;return c},HowlerGlobal.prototype.orientation=function(r,i,u,c,d,h){var p=this;if(!p.ctx||!p.ctx.listener)return p;var _=p._orientation;if(i=typeof i!="number"?_[1]:i,u=typeof u!="number"?_[2]:u,c=typeof c!="number"?_[3]:c,d=typeof d!="number"?_[4]:d,h=typeof h!="number"?_[5]:h,typeof r=="number")p._orientation=[r,i,u,c,d,h],typeof p.ctx.listener.forwardX<"u"?(p.ctx.listener.forwardX.setTargetAtTime(r,Howler.ctx.currentTime,.1),p.ctx.listener.forwardY.setTargetAtTime(i,Howler.ctx.currentTime,.1),p.ctx.listener.forwardZ.setTargetAtTime(u,Howler.ctx.currentTime,.1),p.ctx.listener.upX.setTargetAtTime(c,Howler.ctx.currentTime,.1),p.ctx.listener.upY.setTargetAtTime(d,Howler.ctx.currentTime,.1),p.ctx.listener.upZ.setTargetAtTime(h,Howler.ctx.currentTime,.1)):p.ctx.listener.setOrientation(r,i,u,c,d,h);else return _;return p},Howl.prototype.init=function(r){return function(i){var u=this;return u._orientation=i.orientation||[1,0,0],u._stereo=i.stereo||null,u._pos=i.pos||null,u._pannerAttr={coneInnerAngle:typeof i.coneInnerAngle<"u"?i.coneInnerAngle:360,coneOuterAngle:typeof i.coneOuterAngle<"u"?i.coneOuterAngle:360,coneOuterGain:typeof i.coneOuterGain<"u"?i.coneOuterGain:0,distanceModel:typeof i.distanceModel<"u"?i.distanceModel:"inverse",maxDistance:typeof i.maxDistance<"u"?i.maxDistance:1e4,panningModel:typeof i.panningModel<"u"?i.panningModel:"HRTF",refDistance:typeof i.refDistance<"u"?i.refDistance:1,rolloffFactor:typeof i.rolloffFactor<"u"?i.rolloffFactor:1},u._onstereo=i.onstereo?[{fn:i.onstereo}]:[],u._onpos=i.onpos?[{fn:i.onpos}]:[],u._onorientation=i.onorientation?[{fn:i.onorientation}]:[],r.call(this,i)}}(Howl.prototype.init),Howl.prototype.stereo=function(r,i){var u=this;if(!u._webAudio)return u;if(u._state!=="loaded")return u._queue.push({event:"stereo",action:function(){u.stereo(r,i);}}),u;var c=typeof Howler.ctx.createStereoPanner>"u"?"spatial":"stereo";if(typeof i>"u")if(typeof r=="number")u._stereo=r,u._pos=[r,0,0];else return u._stereo;for(var d=u._getSoundIds(i),h=0;h<d.length;h++){var p=u._soundById(d[h]);if(p)if(typeof r=="number")p._stereo=r,p._pos=[r,0,0],p._node&&(p._pannerAttr.panningModel="equalpower",(!p._panner||!p._panner.pan)&&g(p,c),c==="spatial"?typeof p._panner.positionX<"u"?(p._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),p._panner.positionY.setValueAtTime(0,Howler.ctx.currentTime),p._panner.positionZ.setValueAtTime(0,Howler.ctx.currentTime)):p._panner.setPosition(r,0,0):p._panner.pan.setValueAtTime(r,Howler.ctx.currentTime)),u._emit("stereo",p._id);else return p._stereo}return u},Howl.prototype.pos=function(r,i,u,c){var d=this;if(!d._webAudio)return d;if(d._state!=="loaded")return d._queue.push({event:"pos",action:function(){d.pos(r,i,u,c);}}),d;if(i=typeof i!="number"?0:i,u=typeof u!="number"?-0.5:u,typeof c>"u")if(typeof r=="number")d._pos=[r,i,u];else return d._pos;for(var h=d._getSoundIds(c),p=0;p<h.length;p++){var _=d._soundById(h[p]);if(_)if(typeof r=="number")_._pos=[r,i,u],_._node&&((!_._panner||_._panner.pan)&&g(_,"spatial"),typeof _._panner.positionX<"u"?(_._panner.positionX.setValueAtTime(r,Howler.ctx.currentTime),_._panner.positionY.setValueAtTime(i,Howler.ctx.currentTime),_._panner.positionZ.setValueAtTime(u,Howler.ctx.currentTime)):_._panner.setPosition(r,i,u)),d._emit("pos",_._id);else return _._pos}return d},Howl.prototype.orientation=function(r,i,u,c){var d=this;if(!d._webAudio)return d;if(d._state!=="loaded")return d._queue.push({event:"orientation",action:function(){d.orientation(r,i,u,c);}}),d;if(i=typeof i!="number"?d._orientation[1]:i,u=typeof u!="number"?d._orientation[2]:u,typeof c>"u")if(typeof r=="number")d._orientation=[r,i,u];else return d._orientation;for(var h=d._getSoundIds(c),p=0;p<h.length;p++){var _=d._soundById(h[p]);if(_)if(typeof r=="number")_._orientation=[r,i,u],_._node&&(_._panner||(_._pos||(_._pos=d._pos||[0,0,-0.5]),g(_,"spatial")),typeof _._panner.orientationX<"u"?(_._panner.orientationX.setValueAtTime(r,Howler.ctx.currentTime),_._panner.orientationY.setValueAtTime(i,Howler.ctx.currentTime),_._panner.orientationZ.setValueAtTime(u,Howler.ctx.currentTime)):_._panner.setOrientation(r,i,u)),d._emit("orientation",_._id);else return _._orientation}return d},Howl.prototype.pannerAttr=function(){var r=this,i=arguments,u,c,d;if(!r._webAudio)return r;if(i.length===0)return r._pannerAttr;if(i.length===1)if(typeof i[0]=="object")u=i[0],typeof c>"u"&&(u.pannerAttr||(u.pannerAttr={coneInnerAngle:u.coneInnerAngle,coneOuterAngle:u.coneOuterAngle,coneOuterGain:u.coneOuterGain,distanceModel:u.distanceModel,maxDistance:u.maxDistance,refDistance:u.refDistance,rolloffFactor:u.rolloffFactor,panningModel:u.panningModel}),r._pannerAttr={coneInnerAngle:typeof u.pannerAttr.coneInnerAngle<"u"?u.pannerAttr.coneInnerAngle:r._coneInnerAngle,coneOuterAngle:typeof u.pannerAttr.coneOuterAngle<"u"?u.pannerAttr.coneOuterAngle:r._coneOuterAngle,coneOuterGain:typeof u.pannerAttr.coneOuterGain<"u"?u.pannerAttr.coneOuterGain:r._coneOuterGain,distanceModel:typeof u.pannerAttr.distanceModel<"u"?u.pannerAttr.distanceModel:r._distanceModel,maxDistance:typeof u.pannerAttr.maxDistance<"u"?u.pannerAttr.maxDistance:r._maxDistance,refDistance:typeof u.pannerAttr.refDistance<"u"?u.pannerAttr.refDistance:r._refDistance,rolloffFactor:typeof u.pannerAttr.rolloffFactor<"u"?u.pannerAttr.rolloffFactor:r._rolloffFactor,panningModel:typeof u.pannerAttr.panningModel<"u"?u.pannerAttr.panningModel:r._panningModel});else return d=r._soundById(parseInt(i[0],10)),d?d._pannerAttr:r._pannerAttr;else i.length===2&&(u=i[0],c=parseInt(i[1],10));for(var h=r._getSoundIds(c),p=0;p<h.length;p++)if(d=r._soundById(h[p]),d){var _=d._pannerAttr;_={coneInnerAngle:typeof u.coneInnerAngle<"u"?u.coneInnerAngle:_.coneInnerAngle,coneOuterAngle:typeof u.coneOuterAngle<"u"?u.coneOuterAngle:_.coneOuterAngle,coneOuterGain:typeof u.coneOuterGain<"u"?u.coneOuterGain:_.coneOuterGain,distanceModel:typeof u.distanceModel<"u"?u.distanceModel:_.distanceModel,maxDistance:typeof u.maxDistance<"u"?u.maxDistance:_.maxDistance,refDistance:typeof u.refDistance<"u"?u.refDistance:_.refDistance,rolloffFactor:typeof u.rolloffFactor<"u"?u.rolloffFactor:_.rolloffFactor,panningModel:typeof u.panningModel<"u"?u.panningModel:_.panningModel};var A=d._panner;A||(d._pos||(d._pos=r._pos||[0,0,-0.5]),g(d,"spatial"),A=d._panner),A.coneInnerAngle=_.coneInnerAngle,A.coneOuterAngle=_.coneOuterAngle,A.coneOuterGain=_.coneOuterGain,A.distanceModel=_.distanceModel,A.maxDistance=_.maxDistance,A.refDistance=_.refDistance,A.rolloffFactor=_.rolloffFactor,A.panningModel=_.panningModel;}return r},Sound.prototype.init=function(r){return function(){var i=this,u=i._parent;i._orientation=u._orientation,i._stereo=u._stereo,i._pos=u._pos,i._pannerAttr=u._pannerAttr,r.call(this),i._stereo?u.stereo(i._stereo):i._pos&&u.pos(i._pos[0],i._pos[1],i._pos[2],i._id);}}(Sound.prototype.init),Sound.prototype.reset=function(r){return function(){var i=this,u=i._parent;return i._orientation=u._orientation,i._stereo=u._stereo,i._pos=u._pos,i._pannerAttr=u._pannerAttr,i._stereo?u.stereo(i._stereo):i._pos?u.pos(i._pos[0],i._pos[1],i._pos[2],i._id):i._panner&&(i._panner.disconnect(0),i._panner=void 0,u._refreshBuffer(i)),r.call(this)}}(Sound.prototype.reset);var g=function(r,i){i=i||"spatial",i==="spatial"?(r._panner=Howler.ctx.createPanner(),r._panner.coneInnerAngle=r._pannerAttr.coneInnerAngle,r._panner.coneOuterAngle=r._pannerAttr.coneOuterAngle,r._panner.coneOuterGain=r._pannerAttr.coneOuterGain,r._panner.distanceModel=r._pannerAttr.distanceModel,r._panner.maxDistance=r._pannerAttr.maxDistance,r._panner.refDistance=r._pannerAttr.refDistance,r._panner.rolloffFactor=r._pannerAttr.rolloffFactor,r._panner.panningModel=r._pannerAttr.panningModel,typeof r._panner.positionX<"u"?(r._panner.positionX.setValueAtTime(r._pos[0],Howler.ctx.currentTime),r._panner.positionY.setValueAtTime(r._pos[1],Howler.ctx.currentTime),r._panner.positionZ.setValueAtTime(r._pos[2],Howler.ctx.currentTime)):r._panner.setPosition(r._pos[0],r._pos[1],r._pos[2]),typeof r._panner.orientationX<"u"?(r._panner.orientationX.setValueAtTime(r._orientation[0],Howler.ctx.currentTime),r._panner.orientationY.setValueAtTime(r._orientation[1],Howler.ctx.currentTime),r._panner.orientationZ.setValueAtTime(r._orientation[2],Howler.ctx.currentTime)):r._panner.setOrientation(r._orientation[0],r._orientation[1],r._orientation[2])):(r._panner=Howler.ctx.createStereoPanner(),r._panner.pan.setValueAtTime(r._stereo,Howler.ctx.currentTime)),r._panner.connect(r._node),r._paused||r._parent.pause(r._id,true).play(r._id,true);};})();});var O=b$1(B(),1),H=new Map;H.set("default",()=>import('../assets/beepSound.js'));var b=class b{constructor(r){this.resource=null;this.resource=r;}static get defaultSound(){return b._defaultSound instanceof b||(b._defaultSound=new b("default")),b._defaultSound}toJSONObject(){return this.resource!==null?{resource:this.resource}:{}}async play(){var r;if(this.audio==null&&this.resource!=null)if(H.has(this.resource)){let i=await((r=H.get(this.resource))==null?void 0:r());i!=null&&i.beepSound&&(this.audio=new O.Howl({src:i.beepSound,html5:true}));}else this.audio=new O.Howl({src:this.resource,html5:true});this.audio!=null&&this.audio.play();}};b._defaultSound=null;var L=b;
2
2
  export{L as a};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-KIIMZTRE.js';var t=new a(globalThis,{get:()=>globalThis.Module,set:e=>{globalThis.Module=e;}});function l(e){}export{t as a,l as b};
@@ -1,4 +1,4 @@
1
- import {a}from'./chunk-72A5262S.js';import {a as a$1}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
1
+ import {a}from'./chunk-S24T6WS2.js';import {a as a$1}from'./chunk-3A4KLILV.js';import {a as a$2}from'./chunk-MU6SADSF.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
2
2
  <style>
3
3
  ${e.tag} {
4
4
  display: flex;
@@ -1 +1 @@
1
- import {a as a$4}from'./chunk-ZE2WH3AH.js';import {a as a$5}from'./chunk-FRG4HXJT.js';import {c as c$1,a as a$6}from'./chunk-R6YWFAMT.js';import {c}from'./chunk-B5JOQVFY.js';import {d}from'./chunk-AIC4H5KG.js';import {a as a$2}from'./chunk-IDPD4BN6.js';import {a as a$1}from'./chunk-O7TZTIHO.js';import {a as a$3}from'./chunk-QCZSSQAQ.js';import {c as c$2,e}from'./chunk-42THCP2K.js';import {a}from'./chunk-XR65N6EG.js';var D=class D{constructor(e,t){this.hintPresenterV2=null;this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL=10;this.redrawInterval=1e3/30;this.redrawRequests=[];this._isDrawLoopRunning=false;this.frameDataPool=new Map;this.lastFrameCounter=-1;this.poorMansBenchmarkLogs=false;this.writableDataPathStandard="/scandit_sync_folder";this.resourceFilesSubfolder="resources";this.performanceMetricsReporterTimer=void 0;this.performanceMetrics={frameDataPoolSize:0,processedFramesCount:0,redrawRequestsCount:0,actualRedrawsCount:0};this.gestureListener=null;this.webPlatformHintPresenter=null;this.moduleHandler=e,this.workerFunctions=t,this._loadProgressCallback=this._loadProgressCallback.bind(this),c(this.getWasmMetadata());}get Module(){return this.moduleHandler.get()}set isDrawLoopRunning(e){this._isDrawLoopRunning=e,!e&&typeof this.loopTimeoutId=="number"&&(clearTimeout(this.loopTimeoutId),this.loopTimeoutId=void 0);}get isDrawLoopRunning(){return this._isDrawLoopRunning}convertToLoadableFrameData(e){let t=this.getNextFrameId();this.frameDataPool.set(t,new Uint8ClampedArray(e.getFrameData()));let s=this.lastUsedModuleMirrorAxis==null?false:this.lastUsedModuleMirrorAxis!==this.Module.Axis.None;return {frameId:t,width:e.getWidth(),height:e.getHeight(),isFrameSourceMirrored:s}}createContext(e){var m,C,f,b,h;let t=this.getModeDeserializers(),s=c$1(location);(s==="localhost"||s==="127.0.0.1")&&navigator.userAgent.includes("Electron")&&e.appName!=null&&(s+=`-${e.appName}`),this.parentDomain=e.parentDomain,this.contextDeserializer=new this.Module.DataCaptureContextDeserializer(this.writableDataPath,e.deviceId,e.context.deviceModelName,s,this.parentDomain,t,e.delayedRegistration,e.highEndBlurryRecognition,this.resourcePath);let i=this.contextDeserializer.contextFromJson(JSON.stringify(e.context));if(i==null){let r=this.contextDeserializer.getLastError();throw new Error(`Could not create the context: ${r}`)}let a=i.getView();this.context=i.getContext(),i.delete();let d=this.Module.DataCaptureContextListener.extend("DataCaptureContextListener",{didChangeStatus:(r,o)=>{this.contextDidChangeStatus(JSON.parse(o.toJson())),r.delete();},didStartObservingContext:r=>{this.didStartObservingContext(),r.delete();},didStopObservingContext:r=>{r.delete();}}),p=this.Module.DataCaptureContextFrameListener.extend("DataCaptureContextFrameListener",{onObservationStarted:r=>{r.delete();},onObservationStopped:r=>{r.delete();},onFrameProcessingStarted:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingStarted"}),o.delete(),r.delete();},onFrameProcessingFinished:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingFinished"}),o.delete(),r.delete();},onFrameSkipped:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameSkipped"}),o.delete(),r.delete();}}),g=this.Module.GestureRecognizer.extend("GestureRecognizer",{setGestureListener:(r,o)=>{var w;(w=this.gestureListener)==null||w.delete(),this.gestureListener=r.clone(),r.delete();}});(m=this.gestureRecognizer)==null||m.delete(),this.gestureRecognizer=new g;let u=new d;this.context.addListener(u),u.delete();let c=new p;this.context.addFrameListener(c),c.delete(),this.setView(a),(C=this.view)==null||C.setGestureRecognizer(this.gestureRecognizer);let M=this.Module.PlatformHintPresenter.extend("PlatformHintPresenter",{setHintPresenter:r=>{r.delete();},showToast:r=>{this.workerFunctions.postMessage({type:"showToast",payload:JSON.parse(r)});},hideToast:r=>{this.workerFunctions.postMessage({type:"hideToast",payload:JSON.parse(r)});},showGuidance:r=>{this.workerFunctions.postMessage({type:"showGuidance",payload:JSON.parse(r)});},hideGuidance:r=>{this.workerFunctions.postMessage({type:"hideGuidance",payload:JSON.parse(r)});},startUpdateTimer:r=>{this.workerFunctions.postMessage({type:"startUpdateTimer",payload:{duration:{unit:"ms",value:r}}});},stopUpdateTimer:()=>{this.workerFunctions.postMessage({type:"stopUpdateTimer"});}});(f=this.hintPresenterV2)==null||f.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),(h=this.view)==null||h.setHintPresenterV2(this.hintPresenterV2));}onTap(e){var t;(t=this.gestureListener)==null||t.onTap(JSON.stringify(e));}hintPresenterV2Update(){var e;(e=this.hintPresenterV2)==null||e.update();}startReportingPerformanceMetrics(){this.performanceMetricsReporterTimer==null&&(this.performanceMetricsReporterTimer=setInterval(()=>{this.reportPerformanceMetrics();for(let e of Object.keys(this.performanceMetrics))this.performanceMetrics[e]=0;},1e3));}async reportPerformanceMetrics(){this.workerFunctions.postMessage({type:"performanceMetricsReport",payload:{...this.performanceMetrics}});}deleteFrameData(e){this.frameDataPool.delete(e);}dispose(){var e,t,s,i;this.context.dispose(),this.frameDataPool.clear(),this.isDrawLoopRunning=false,this.lastFrameCounter=-1,(e=this.gestureRecognizer)==null||e.delete(),this.gestureRecognizer=null,(t=this.gestureListener)==null||t.delete(),this.gestureListener=null,(s=this.hintPresenterV2)==null||s.delete(),this.hintPresenterV2=null,(i=this.webPlatformHintPresenter)==null||i.delete(),this.webPlatformHintPresenter=null;}flushAnalytics(){this.context.flushAnalytics();}extractCentaurusLicense(e){return {payload:{centaurus:{licenseKey:this.Module.LicenseUtils[D.get3dPartyLicenseKeyMethodName](e)}}}}getModeDeserializers(){return new this.Module.VectorDataCaptureModeDeserializer}loadLibrary(e){return this.libraryLoadingPromise!=null?this.libraryLoadingPromise:(this.libraryLoadingPromise=this.setup(e),this.libraryLoadingPromise)}processFrame(e){var a;if(this.context==null)return {payload:e,transferables:[e.data.buffer]};let t=e.data,s=e.colorType==="GRAYSCALE"?this.Module.ImageBufferFormat.Grayscale8:this.Module.ImageBufferFormat.Rgba8888,i=this.Module.allocateUint8Array(t.byteLength);return this.Module.HEAPU8.set(t,i),(a=this.imageFrameSource)==null||a.outputFrame(i,e.width,e.height,s),{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);return t==null?{payload:{data:null}}:{payload:{data:t},transferables:[t.buffer]}}scheduleRedraw(e,t){this.addRedrawRequest(t),this.isDrawLoopRunning||this.startDrawLoop(e);}sendViewRefreshCommands(e){this.workerFunctions.postMessage({type:"draw",payload:e},[e.buffer]);}setFrameSource(e,t){var s;this.lastUsedModuleMirrorAxis=this.mapMirrorAxisOnModule(e),(s=this.imageFrameSource)==null||s.delete(),this.imageFrameSource=new this.Module.ImageBufferFrameSource(this.lastUsedModuleMirrorAxis,t,0),this.context.setFrameSource(this.imageFrameSource);}startDrawLoop(e){this.isDrawLoopRunning=true;let t=a=>this.redrawRequests.length>0&&this.redrawRequests[0]<=a,s=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)){s(a),e.draw();let d=e.getDrawCommands();this.sendViewRefreshCommands(new Uint8Array(d));}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),s=this.contextDeserializer.updateContextFromJson(this.context,this.view,JSON.stringify(t.context));if(s==null){let a=this.contextDeserializer.getLastError();throw new Error(`Could not update the context: ${a}`)}this.context.delete(),this.context=s.getContext();let i=s.getView();s.delete(),i!=null&&t.view!=null&&i.setViewSize(t.view.width,t.view.height,t.view.orientation),!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),a.debug("context updated",t);}}onBeforeUpdateContextHook(e){return e}onDocumentVisibilityChange(e){e==="hidden"&&this.context.flushAnalytics();}isFeatureSupported(e){return {payload:{supported:this.context.isFeatureSupported(e)}}}getViewfinderInfo(){var e,t;return {payload:{isDisplayingViewfinder:(t=(e=this.view)==null?void 0:e.isDisplayingViewfinder())!=null?t:false,rect:JSON.parse(this.view.getViewfinderRect())}}}getOpenSourceSoftwareLicenseInfo(){return {payload:{licenseText:this.Module.OpenSourceSoftwareLicenseInfo.getLicenseText()}}}getNextFrameId(){return this.lastFrameCounter++,this.lastFrameCounter>=this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL&&(this.lastFrameCounter=0),this.lastFrameCounter}getWasmDynamicLibraries(e){return this.getWasmSideModuleFileName()==null?[]:[`${e.replace(/\/[^/]*$/,"/")}${this.getWasmSideModuleFileName()}`]}getWasmCoreExpectedHash(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_HASH:globalThis.SDC_WASM_CORE_MT_HASH:e?globalThis.SDC_WASM_CORE_SIMD_HASH:""}getWasmCoreFileName(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_FILE_NAME:globalThis.SDC_WASM_CORE_MT_FILE_NAME:e?globalThis.SDC_WASM_CORE_SIMD_FILE_NAME:""}getWasmMetadata(){return globalThis.WASM_METADATA}getWasmSideModuleFileName(){return ""}_loadProgressCallback(e){this.workerFunctions.postMessage({type:"loadLibraryProgress",payload:e});}addRedrawRequest(e){this.redrawRequests.push(Math.round(performance.now())+e),this.redrawRequests.sort((t,s)=>t-s);}contextDidChangeStatus(e){e.code===260?e.message=e.message.replace("domain name",`domain name (${c$1(location)})`):e.code===265&&(e.message=e.message.replace("domain name",`domain name (${this.parentDomain})`)),this.workerFunctions.postMessage({type:"contextDidChangeStatus",payload:e});}didStartObservingContext(){this.workerFunctions.postMessage({type:"didStartObservingContext"});}mapMirrorAxisOnModule(e){switch(e){case "None":return this.Module.Axis.None;case "X":return this.Module.Axis.X;case "Y":return this.Module.Axis.Y;default:return this.Module.Axis.None}}setView(e){this.view=e,this.setViewRefreshHandler(e),e==null&&(this.isDrawLoopRunning=false,this.sendViewRefreshCommands(new Uint8Array([])));}addNativeOverlay(e){a.warn("addNativeOverlay has not been implemented for this module",e);}removeNativeOverlay(e){a.warn("removeNativeOverlay has not been implemented for this module",e);}setViewRefreshHandler(e){if(e==null||e.isViewRefreshHandlerSet)return;let t=this.Module.NeedsRedrawDelegate.extend("NeedsRedrawDelegate",{setNeedsRedrawIn:this.scheduleRedraw.bind(this,e)}),s=new t;e.setNeedsRedrawDelegate(s),e.isViewRefreshHandlerSet=true;}setupDataDecoding(){let e=this.moduleHandler.get(),t=e.DataDecoding.extend("DataDecoding",{decode(s,i){try{let a=JSON.parse(i),d=[];for(let p of a){let g=new TextDecoder(p.ianaName,{fatal:true});d.push(g.decode(s.slice(p.startIndex,p.endIndex)));}return d.join("")}catch(a){return ""}}});e.setDataDecoding(new t);}start(e,t,s){e&&t&&(this.setupDataDecoding(),this.moduleHandler.get().callMain(),this.moduleHandler.get().__emscripten_proxy_main!==void 0||s());}getWritableDataPath(e){return e!=null?(a.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$1,locationPath:t,writableDataPathOverride:s,overrideThreadsSupport:i,overrideSimdSupport:a$7,verifyResponseHash:d$1,referredOrigin:p,fixedWasmMemory:g}){var x;let u=false,c=false;this.writableDataPath=this.getWritableDataPath(s),this.resourcePath=`${e$1}${this.resourceFilesSubfolder}/`,globalThis.path=t;let{resolve:M,reject:m,promise:C}=new a$1,f=a$2.sdkVersion();if(f==="")throw new a$3({name:"Invalid library version",message:"Library version is not defined or empty, cannot generate proper path to library files."});let[b,h]=await Promise.all([c$2(),e()]);i!=="auto"&&(h=i==="on"),a$7!=="auto"&&(b=a$7==="on");let r=this.getWasmCoreFileName(b,h),o=d(f,e$1,r),{jsURI:w,wasmURI:R}=o,H={instantiateWasm:(l,W)=>(a$6({importObject:l,wasmURI:R,expectedHash:this.getWasmCoreExpectedHash(b,h),verifyResponseHash:d$1,successCallback:W,progressCallback:this._loadProgressCallback,errorCallback:N=>{m(N);},referredOrigin:p}),{})},y=g===null?null:new WebAssembly.Memory({initial:this.numOfMBToPages(g),maximum:this.numOfMBToPages(300),shared:h});return y!==null&&a.log(a.Level.Debug,"Fixed wasmMemory set",y),this.moduleHandler.set({...y?{wasmMemory:y}:{},mainScriptUrlOrBlob:w,canvas:(x=this.workerFunctions.getOffscreenCanvas())!=null?x:{getContext:()=>null},...H,dynamicLibraries:this.getWasmDynamicLibraries(R),locateFile:l=>e$1+l,noInitialRun:true,preRun:[async()=>{try{await a$4({writableDataPath:this.writableDataPath});}catch(l){if(l.name==="BlockedIndexedDB"){m(l.toString());return}a.log(a.Level.Debug,"No IndexedDB support, some data will not be persisted:",l);}c=true,this.start(c,u,M);}],onMainComplete:()=>{if([u,c].includes(false)){a.log(a.Level.Warn,{runtimeLoaded:u,fileSystemSynced:c},"Both runtimeLoaded and fileSystemSynced should be true when calling onMainComplete"),m("onMainComplete has been called but runtime or file system was not ready.");return}M();},onRuntimeInitialized:()=>{u=true,this.start(c,u,M);},print:l=>{a.log(a.Level.Info,l);}}),await a$5(w,f)||m(`Couldn't retrieve Scandit Data Capture library at ${w}, did you configure the path for it correctly?`),C}};D.get3dPartyLicenseKeyMethodName=atob("Z2V0QmxpbmtJZExpY2Vuc2VLZXk=");var T=D;export{T as a};
1
+ import {d}from'./chunk-AIC4H5KG.js';import {a as a$4}from'./chunk-ZE2WH3AH.js';import {a as a$5}from'./chunk-G2BRTVN7.js';import {c as c$1,a as a$6}from'./chunk-4W2T3TLN.js';import {c}from'./chunk-UWLAKRB2.js';import {a as a$2}from'./chunk-T4MAXB6O.js';import {a as a$1}from'./chunk-O7TZTIHO.js';import {a as a$3}from'./chunk-QCZSSQAQ.js';import {c as c$2,e}from'./chunk-42THCP2K.js';import {a}from'./chunk-XR65N6EG.js';var D=class D{constructor(e,t){this.hintPresenterV2=null;this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL=10;this.redrawInterval=1e3/30;this.redrawRequests=[];this._isDrawLoopRunning=false;this.frameDataPool=new Map;this.lastFrameCounter=-1;this.poorMansBenchmarkLogs=false;this.writableDataPathStandard="/scandit_sync_folder";this.resourceFilesSubfolder="resources";this.performanceMetricsReporterTimer=void 0;this.performanceMetrics={frameDataPoolSize:0,processedFramesCount:0,redrawRequestsCount:0,actualRedrawsCount:0};this.gestureListener=null;this.webPlatformHintPresenter=null;this.moduleHandler=e,this.workerFunctions=t,this._loadProgressCallback=this._loadProgressCallback.bind(this),c(this.getWasmMetadata());}get Module(){return this.moduleHandler.get()}set isDrawLoopRunning(e){this._isDrawLoopRunning=e,!e&&typeof this.loopTimeoutId=="number"&&(clearTimeout(this.loopTimeoutId),this.loopTimeoutId=void 0);}get isDrawLoopRunning(){return this._isDrawLoopRunning}convertToLoadableFrameData(e){let t=this.getNextFrameId();this.frameDataPool.set(t,new Uint8ClampedArray(e.getFrameData()));let s=this.lastUsedModuleMirrorAxis==null?false:this.lastUsedModuleMirrorAxis!==this.Module.Axis.None;return {frameId:t,width:e.getWidth(),height:e.getHeight(),isFrameSourceMirrored:s}}createContext(e){var m,C,f,b,h;let t=this.getModeDeserializers(),s=c$1(location);(s==="localhost"||s==="127.0.0.1")&&navigator.userAgent.includes("Electron")&&e.appName!=null&&(s+=`-${e.appName}`),this.parentDomain=e.parentDomain,this.contextDeserializer=new this.Module.DataCaptureContextDeserializer(this.writableDataPath,e.deviceId,e.context.deviceModelName,s,this.parentDomain,t,e.delayedRegistration,e.highEndBlurryRecognition,this.resourcePath);let i=this.contextDeserializer.contextFromJson(JSON.stringify(e.context));if(i==null){let r=this.contextDeserializer.getLastError();throw new Error(`Could not create the context: ${r}`)}let a=i.getView();this.context=i.getContext(),i.delete();let d=this.Module.DataCaptureContextListener.extend("DataCaptureContextListener",{didChangeStatus:(r,o)=>{this.contextDidChangeStatus(JSON.parse(o.toJson())),r.delete();},didStartObservingContext:r=>{this.didStartObservingContext(),r.delete();},didStopObservingContext:r=>{r.delete();}}),p=this.Module.DataCaptureContextFrameListener.extend("DataCaptureContextFrameListener",{onObservationStarted:r=>{r.delete();},onObservationStopped:r=>{r.delete();},onFrameProcessingStarted:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingStarted"}),o.delete(),r.delete();},onFrameProcessingFinished:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingFinished"}),o.delete(),r.delete();},onFrameSkipped:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameSkipped"}),o.delete(),r.delete();}}),g=this.Module.GestureRecognizer.extend("GestureRecognizer",{setGestureListener:(r,o)=>{var w;(w=this.gestureListener)==null||w.delete(),this.gestureListener=r.clone(),r.delete();}});(m=this.gestureRecognizer)==null||m.delete(),this.gestureRecognizer=new g;let u=new d;this.context.addListener(u),u.delete();let c=new p;this.context.addFrameListener(c),c.delete(),this.setView(a),(C=this.view)==null||C.setGestureRecognizer(this.gestureRecognizer);let M=this.Module.PlatformHintPresenter.extend("PlatformHintPresenter",{setHintPresenter:r=>{r.delete();},showToast:r=>{this.workerFunctions.postMessage({type:"showToast",payload:JSON.parse(r)});},hideToast:r=>{this.workerFunctions.postMessage({type:"hideToast",payload:JSON.parse(r)});},showGuidance:r=>{this.workerFunctions.postMessage({type:"showGuidance",payload:JSON.parse(r)});},hideGuidance:r=>{this.workerFunctions.postMessage({type:"hideGuidance",payload:JSON.parse(r)});},startUpdateTimer:r=>{this.workerFunctions.postMessage({type:"startUpdateTimer",payload:{duration:{unit:"ms",value:r}}});},stopUpdateTimer:()=>{this.workerFunctions.postMessage({type:"stopUpdateTimer"});}});(f=this.hintPresenterV2)==null||f.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),(h=this.view)==null||h.setHintPresenterV2(this.hintPresenterV2));}onTap(e){var t;(t=this.gestureListener)==null||t.onTap(JSON.stringify(e));}hintPresenterV2Update(){var e;(e=this.hintPresenterV2)==null||e.update();}startReportingPerformanceMetrics(){this.performanceMetricsReporterTimer==null&&(this.performanceMetricsReporterTimer=setInterval(()=>{this.reportPerformanceMetrics();for(let e of Object.keys(this.performanceMetrics))this.performanceMetrics[e]=0;},1e3));}async reportPerformanceMetrics(){this.workerFunctions.postMessage({type:"performanceMetricsReport",payload:{...this.performanceMetrics}});}deleteFrameData(e){this.frameDataPool.delete(e);}dispose(){var e,t,s,i;this.context.dispose(),this.frameDataPool.clear(),this.isDrawLoopRunning=false,this.lastFrameCounter=-1,(e=this.gestureRecognizer)==null||e.delete(),this.gestureRecognizer=null,(t=this.gestureListener)==null||t.delete(),this.gestureListener=null,(s=this.hintPresenterV2)==null||s.delete(),this.hintPresenterV2=null,(i=this.webPlatformHintPresenter)==null||i.delete(),this.webPlatformHintPresenter=null;}flushAnalytics(){this.context.flushAnalytics();}extractCentaurusLicense(e){return {payload:{centaurus:{licenseKey:this.Module.LicenseUtils[D.get3dPartyLicenseKeyMethodName](e)}}}}getModeDeserializers(){return new this.Module.VectorDataCaptureModeDeserializer}loadLibrary(e){return this.libraryLoadingPromise!=null?this.libraryLoadingPromise:(this.libraryLoadingPromise=this.setup(e),this.libraryLoadingPromise)}processFrame(e){var a;if(this.context==null)return {payload:e,transferables:[e.data.buffer]};let t=e.data,s=e.colorType==="GRAYSCALE"?this.Module.ImageBufferFormat.Grayscale8:this.Module.ImageBufferFormat.Rgba8888,i=this.Module.allocateUint8Array(t.byteLength);return this.Module.HEAPU8.set(t,i),(a=this.imageFrameSource)==null||a.outputFrame(i,e.width,e.height,s),{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);return t==null?{payload:{data:null}}:{payload:{data:t},transferables:[t.buffer]}}scheduleRedraw(e,t){this.addRedrawRequest(t),this.isDrawLoopRunning||this.startDrawLoop(e);}sendViewRefreshCommands(e){this.workerFunctions.postMessage({type:"draw",payload:e},[e.buffer]);}setFrameSource(e,t){var s;this.lastUsedModuleMirrorAxis=this.mapMirrorAxisOnModule(e),(s=this.imageFrameSource)==null||s.delete(),this.imageFrameSource=new this.Module.ImageBufferFrameSource(this.lastUsedModuleMirrorAxis,t,0),this.context.setFrameSource(this.imageFrameSource);}startDrawLoop(e){this.isDrawLoopRunning=true;let t=a=>this.redrawRequests.length>0&&this.redrawRequests[0]<=a,s=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)){s(a),e.draw();let d=e.getDrawCommands();this.sendViewRefreshCommands(new Uint8Array(d));}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),s=this.contextDeserializer.updateContextFromJson(this.context,this.view,JSON.stringify(t.context));if(s==null){let a=this.contextDeserializer.getLastError();throw new Error(`Could not update the context: ${a}`)}this.context.delete(),this.context=s.getContext();let i=s.getView();s.delete(),i!=null&&t.view!=null&&i.setViewSize(t.view.width,t.view.height,t.view.orientation),!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),a.debug("context updated",t);}}onBeforeUpdateContextHook(e){return e}onDocumentVisibilityChange(e){e==="hidden"&&this.context.flushAnalytics();}isFeatureSupported(e){return {payload:{supported:this.context.isFeatureSupported(e)}}}getViewfinderInfo(){var e,t;return {payload:{isDisplayingViewfinder:(t=(e=this.view)==null?void 0:e.isDisplayingViewfinder())!=null?t:false,rect:JSON.parse(this.view.getViewfinderRect())}}}getOpenSourceSoftwareLicenseInfo(){return {payload:{licenseText:this.Module.OpenSourceSoftwareLicenseInfo.getLicenseText()}}}getNextFrameId(){return this.lastFrameCounter++,this.lastFrameCounter>=this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL&&(this.lastFrameCounter=0),this.lastFrameCounter}getWasmDynamicLibraries(e){return this.getWasmSideModuleFileName()==null?[]:[`${e.replace(/\/[^/]*$/,"/")}${this.getWasmSideModuleFileName()}`]}getWasmCoreExpectedHash(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_HASH:globalThis.SDC_WASM_CORE_MT_HASH:e?globalThis.SDC_WASM_CORE_SIMD_HASH:""}getWasmCoreFileName(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_FILE_NAME:globalThis.SDC_WASM_CORE_MT_FILE_NAME:e?globalThis.SDC_WASM_CORE_SIMD_FILE_NAME:""}getWasmMetadata(){return globalThis.WASM_METADATA}getWasmSideModuleFileName(){return ""}_loadProgressCallback(e){this.workerFunctions.postMessage({type:"loadLibraryProgress",payload:e});}addRedrawRequest(e){this.redrawRequests.push(Math.round(performance.now())+e),this.redrawRequests.sort((t,s)=>t-s);}contextDidChangeStatus(e){e.code===260?e.message=e.message.replace("domain name",`domain name (${c$1(location)})`):e.code===265&&(e.message=e.message.replace("domain name",`domain name (${this.parentDomain})`)),this.workerFunctions.postMessage({type:"contextDidChangeStatus",payload:e});}didStartObservingContext(){this.workerFunctions.postMessage({type:"didStartObservingContext"});}mapMirrorAxisOnModule(e){switch(e){case "None":return this.Module.Axis.None;case "X":return this.Module.Axis.X;case "Y":return this.Module.Axis.Y;default:return this.Module.Axis.None}}setView(e){this.view=e,this.setViewRefreshHandler(e),e==null&&(this.isDrawLoopRunning=false,this.sendViewRefreshCommands(new Uint8Array([])));}addNativeOverlay(e){a.warn("addNativeOverlay has not been implemented for this module",e);}removeNativeOverlay(e){a.warn("removeNativeOverlay has not been implemented for this module",e);}setViewRefreshHandler(e){if(e==null||e.isViewRefreshHandlerSet)return;let t=this.Module.NeedsRedrawDelegate.extend("NeedsRedrawDelegate",{setNeedsRedrawIn:this.scheduleRedraw.bind(this,e)}),s=new t;e.setNeedsRedrawDelegate(s),e.isViewRefreshHandlerSet=true;}setupDataDecoding(){let e=this.moduleHandler.get(),t=e.DataDecoding.extend("DataDecoding",{decode(s,i){try{let a=JSON.parse(i),d=[];for(let p of a){let g=new TextDecoder(p.ianaName,{fatal:true});d.push(g.decode(s.slice(p.startIndex,p.endIndex)));}return d.join("")}catch(a){return ""}}});e.setDataDecoding(new t);}start(e,t,s){e&&t&&(this.setupDataDecoding(),this.moduleHandler.get().callMain(),this.moduleHandler.get().__emscripten_proxy_main!==void 0||s());}getWritableDataPath(e){return e!=null?(a.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$1,locationPath:t,writableDataPathOverride:s,overrideThreadsSupport:i,overrideSimdSupport:a$7,verifyResponseHash:d$1,referredOrigin:p,fixedWasmMemory:g}){var x;let u=false,c=false;this.writableDataPath=this.getWritableDataPath(s),this.resourcePath=`${e$1}${this.resourceFilesSubfolder}/`,globalThis.path=t;let{resolve:M,reject:m,promise:C}=new a$1,f=a$2.sdkVersion();if(f==="")throw new a$3({name:"Invalid library version",message:"Library version is not defined or empty, cannot generate proper path to library files."});let[b,h]=await Promise.all([c$2(),e()]);i!=="auto"&&(h=i==="on"),a$7!=="auto"&&(b=a$7==="on");let r=this.getWasmCoreFileName(b,h),o=d(f,e$1,r),{jsURI:w,wasmURI:R}=o,H={instantiateWasm:(l,W)=>(a$6({importObject:l,wasmURI:R,expectedHash:this.getWasmCoreExpectedHash(b,h),verifyResponseHash:d$1,successCallback:W,progressCallback:this._loadProgressCallback,errorCallback:N=>{m(N);},referredOrigin:p}),{})},y=g===null?null:new WebAssembly.Memory({initial:this.numOfMBToPages(g),maximum:this.numOfMBToPages(300),shared:h});return y!==null&&a.log(a.Level.Debug,"Fixed wasmMemory set",y),this.moduleHandler.set({...y?{wasmMemory:y}:{},mainScriptUrlOrBlob:w,canvas:(x=this.workerFunctions.getOffscreenCanvas())!=null?x:{getContext:()=>null},...H,dynamicLibraries:this.getWasmDynamicLibraries(R),locateFile:l=>e$1+l,noInitialRun:true,preRun:[async()=>{try{await a$4({writableDataPath:this.writableDataPath});}catch(l){if(l.name==="BlockedIndexedDB"){m(l.toString());return}a.log(a.Level.Debug,"No IndexedDB support, some data will not be persisted:",l);}c=true,this.start(c,u,M);}],onMainComplete:()=>{if([u,c].includes(false)){a.log(a.Level.Warn,{runtimeLoaded:u,fileSystemSynced:c},"Both runtimeLoaded and fileSystemSynced should be true when calling onMainComplete"),m("onMainComplete has been called but runtime or file system was not ready.");return}M();},onRuntimeInitialized:()=>{u=true,this.start(c,u,M);},print:l=>{a.log(a.Level.Info,l);}}),await a$5(w,f)||m(`Couldn't retrieve Scandit Data Capture library at ${w}, did you configure the path for it correctly?`),C}};D.get3dPartyLicenseKeyMethodName=atob("Z2V0QmxpbmtJZExpY2Vuc2VLZXk=");var T=D;export{T as a};
@@ -1 +1 @@
1
- import {f}from'./chunk-B5JOQVFY.js';import {a}from'./chunk-XR65N6EG.js';function v({wasmURI:e,expectedHash:t,verifyResponseHash:l,progressCallback:o,successCallback:a$1,errorCallback:n,importObject:m,referredOrigin:u}){async function b(r){try{let i=await f({wasmURI:e,expectedHash:t,verifyResponseHash:l,onProgress:o,referredOrigin:u}),y=await(r!=null?r:i).arrayBuffer(),c=await globalThis.WebAssembly.instantiate(y,m);a$1(c.instance,c.module);}catch(i){a.log(a.Level.Error,i),a.log(a.Level.Error,`Couldn't instantiate Scandit SDK DataCapture library at ${e}, did you configure the path for it correctly?`),n==null||n(i);}}async function f$1(){let r;try{r=await f({wasmURI:e,expectedHash:t,verifyResponseHash:l,onProgress:o,referredOrigin:u});let i=await globalThis.WebAssembly.instantiateStreaming(r,m);a$1(i.instance,i.module);}catch(i){a.log(a.Level.Warn,i),a.log(a.Level.Warn,"WebAssembly streaming compile failed. Falling back to ArrayBuffer instantiation (this will make things slower)"),b((r==null?void 0:r.bodyUsed)===true?void 0:r);}}typeof globalThis.WebAssembly.instantiateStreaming=="function"?f$1():b();}async function d(e,t,l,o){return new Promise((a,n)=>{e().then(a).catch(m=>{let u=t*2;if(u>l){n(m);return}o(m),globalThis.setTimeout(()=>{d(e,u,l,o).then(a).catch(n);},t);});})}function w(e){var o,a;let t="unknown";if((o=e.href)!=null&&o.startsWith("blob:null/"))t="localhost";else {let n=((a=e.pathname)==null?void 0:a.length)>1&&!e.pathname.startsWith("/");t=new URL(n?e.pathname:e.origin).hostname;}return t.startsWith("[")&&t.endsWith("]")?(t=t.slice(1,-1),t):(/^(\d{1,3}\.){3}\d{1,3}$/.test(t)&&(t=t.split(".").map(n=>Number.parseInt(n,10).toString()).join(".")),t)}export{v as a,d as b,w as c};
1
+ import {f}from'./chunk-UWLAKRB2.js';import {a}from'./chunk-XR65N6EG.js';function v({wasmURI:e,expectedHash:t,verifyResponseHash:l,progressCallback:o,successCallback:a$1,errorCallback:n,importObject:m,referredOrigin:u}){async function b(r){try{let i=await f({wasmURI:e,expectedHash:t,verifyResponseHash:l,onProgress:o,referredOrigin:u}),y=await(r!=null?r:i).arrayBuffer(),c=await globalThis.WebAssembly.instantiate(y,m);a$1(c.instance,c.module);}catch(i){a.log(a.Level.Error,i),a.log(a.Level.Error,`Couldn't instantiate Scandit SDK DataCapture library at ${e}, did you configure the path for it correctly?`),n==null||n(i);}}async function f$1(){let r;try{r=await f({wasmURI:e,expectedHash:t,verifyResponseHash:l,onProgress:o,referredOrigin:u});let i=await globalThis.WebAssembly.instantiateStreaming(r,m);a$1(i.instance,i.module);}catch(i){a.log(a.Level.Warn,i),a.log(a.Level.Warn,"WebAssembly streaming compile failed. Falling back to ArrayBuffer instantiation (this will make things slower)"),b((r==null?void 0:r.bodyUsed)===true?void 0:r);}}typeof globalThis.WebAssembly.instantiateStreaming=="function"?f$1():b();}async function d(e,t,l,o){return new Promise((a,n)=>{e().then(a).catch(m=>{let u=t*2;if(u>l){n(m);return}o(m),globalThis.setTimeout(()=>{d(e,u,l,o).then(a).catch(n);},t);});})}function w(e){var o,a;let t="unknown";if((o=e.href)!=null&&o.startsWith("blob:null/"))t="localhost";else {let n=((a=e.pathname)==null?void 0:a.length)>1&&!e.pathname.startsWith("/");t=new URL(n?e.pathname:e.origin).hostname;}return t.startsWith("[")&&t.endsWith("]")?(t=t.slice(1,-1),t):(/^(\d{1,3}\.){3}\d{1,3}$/.test(t)&&(t=t.split(".").map(n=>Number.parseInt(n,10).toString()).join(".")),t)}export{v as a,d as b,w as c};