@scandit/web-datacapture-core 8.4.0-beta.1 → 8.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/electron/common.cjs +1 -1
- package/build/electron/constants.cjs +1 -1
- package/build/electron/main.cjs +1 -1
- package/build/electron/preload.cjs +1 -1
- package/build/js/Camera.js +1 -1
- package/build/js/DataCaptureContext.js +1 -1
- package/build/js/DataCaptureVersion.js +1 -1
- package/build/js/DataCaptureView.js +1 -1
- package/build/js/Feedback.js +1 -1
- package/build/js/ImageFrameSource.js +1 -1
- package/build/js/NotificationPresenter/index.js +1 -1
- package/build/js/Sound.js +1 -1
- package/build/js/Vibration.js +1 -1
- package/build/js/browserHelper.d.ts +1 -0
- package/build/js/browserHelper.js +1 -1
- package/build/js/chunks/{chunk-CERFU73N.js → chunk-3WNU5X5L.js} +1 -1
- package/build/js/chunks/{chunk-CGK5V6XZ.js → chunk-56S3BFJ6.js} +1 -1
- package/build/js/chunks/{chunk-YUZDO2PC.js → chunk-5GUWY76Q.js} +1 -1
- package/build/js/chunks/{chunk-RXDVYEE5.js → chunk-7GQFJDH6.js} +1 -1
- package/build/js/chunks/{chunk-L66S4DN2.js → chunk-ASAV77S2.js} +1 -1
- package/build/js/chunks/{chunk-P2R7FW6C.js → chunk-ASJCS2FB.js} +1 -1
- package/build/js/chunks/{chunk-Y7BTRVB4.js → chunk-AYQTB54E.js} +1 -1
- package/build/js/chunks/chunk-AYYKQ7YB.js +2 -0
- package/build/js/chunks/{chunk-Y3TODCJD.js → chunk-EPIUNYWM.js} +1 -1
- package/build/js/chunks/{chunk-ZP3YIZEC.js → chunk-HLVYMWIK.js} +1 -1
- package/build/js/chunks/{chunk-ACCTMSWC.js → chunk-I52JX2MQ.js} +1 -1
- package/build/js/chunks/chunk-IGTW3KDT.js +1 -0
- package/build/js/chunks/{chunk-2UHUEJA4.js → chunk-JAY44NXK.js} +1 -1
- package/build/js/chunks/{chunk-H3J4TP2K.js → chunk-KJXBZMMB.js} +1 -1
- package/build/js/chunks/{chunk-AD77NFCP.js → chunk-KW2WZUE3.js} +1 -1
- package/build/js/chunks/{chunk-JLTSTUKY.js → chunk-NOEX6HP5.js} +1 -1
- package/build/js/chunks/{chunk-76IGNICM.js → chunk-QJZW4BFG.js} +1 -1
- package/build/js/chunks/{chunk-GMOTHEWV.js → chunk-QRMHTQBG.js} +1 -1
- package/build/js/chunks/{chunk-ZTKCGHYQ.js → chunk-RVJQOD3H.js} +1 -1
- package/build/js/chunks/{chunk-YJNJGCAN.js → chunk-RXFEUGTT.js} +1 -1
- package/build/js/chunks/{chunk-IASACVTH.js → chunk-SIMTA4TK.js} +1 -1
- package/build/js/chunks/chunk-T2JW7GJH.js +1 -0
- package/build/js/chunks/{chunk-CA6FHIF6.js → chunk-T6EVGEHJ.js} +1 -1
- package/build/js/chunks/{chunk-4F2Q2P2O.js → chunk-TDNR2OSD.js} +1 -1
- package/build/js/chunks/{chunk-XUIVDVLK.js → chunk-VUPEBHJF.js} +3 -3
- package/build/js/chunks/chunk-WMI56GO3.js +1 -0
- package/build/js/controls/CameraFOVSwitchControl.js +1 -1
- package/build/js/controls/CameraSwitchControl.js +1 -1
- package/build/js/controls/ZoomSwitchControl.js +1 -1
- package/build/js/controls/index.js +1 -1
- package/build/js/index.js +1 -1
- package/build/js/private/CameraAccess.js +1 -1
- package/build/js/private/CameraManager.js +1 -1
- package/build/js/private/CoreModuleLicenseTextProvider.js +1 -1
- package/build/js/private/FrameReaders/FrameReader.js +1 -1
- package/build/js/private/FrameReaders/GrayScaleFrameReader.js +1 -1
- package/build/js/private/FrameReaders/index.js +1 -1
- package/build/js/private/OrientationObserver.js +1 -1
- package/build/js/private/SingleImageUploaderView.js +1 -1
- package/build/js/private/ViewControls+related.js +1 -1
- package/build/js/private/customHowler/Howl.js +1 -1
- package/build/js/private/customHowler/WebAudioContextManager.js +1 -1
- package/build/js/private/customHowler/index.js +1 -1
- package/build/js/private/customHowler/setup.js +1 -1
- package/build/js/private/hybridDesktopPlatformHelpers.js +1 -1
- package/build/js/private/ui/molecules/CameraFOVSwitchButton.js +1 -1
- package/build/js/private/ui/molecules/CameraSwitchButton.js +1 -1
- package/build/js/private/utils/polyfillLoader.js +1 -1
- package/build/js/private/utils/warnMultithreadingUnavailable.js +1 -1
- package/build/js/worker/WorkerMain.js +1 -1
- package/build/js/worker/coreCapture.inlineWorker.js +1 -1
- package/build/js/worker/dataCaptureEngine.js +1 -1
- package/build/js/worker/dataCaptureLoader.js +1 -1
- package/build/js/worker/index.js +1 -1
- package/package.json +1 -1
- package/build/js/chunks/chunk-4LGQ66HW.js +0 -1
- package/build/js/chunks/chunk-LPFXHHWJ.js +0 -1
- package/build/js/chunks/chunk-P3NPNIWR.js +0 -1
- package/build/js/chunks/chunk-YONR3EGV.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,p=Object.prototype.hasOwnProperty;module.exports=(e={},((e,n,
|
|
1
|
+
"use strict";var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,p=Object.prototype.hasOwnProperty;module.exports=(e={},((e,c,n,l)=>{if(c&&"object"==typeof c||"function"==typeof c)for(let u of o(c))p.call(e,u)||u===n||t(e,u,{get:()=>c[u],enumerable:!(l=r(c,u))||l.enumerable});return e})(t({},"__esModule",{value:!0}),e));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,
|
|
1
|
+
"use strict";var e,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,p={};((e,r)=>{for(var o in r)t(e,o,{get:r[o],enumerable:!0})})(p,{CHN:()=>y,Id:()=>i,K:()=>l}),module.exports=(e=p,((e,p,a,l)=>{if(p&&"object"==typeof p||"function"==typeof p)for(let i of o(p))n.call(e,i)||i===a||t(e,i,{get:()=>p[i],enumerable:!(l=r(p,i))||l.enumerable});return e})(t({},"__esModule",{value:!0}),e));var a=String.fromCodePoint,l=a.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]),i=a.apply(String,[53,65,41,124,75,47,108,120,50,48,115,62,66,60,107,57]),y=a.apply(String,[111,74,88,52,51,101,51,112,66,79,38,88,40,65,36,94]);
|
package/build/electron/main.cjs
CHANGED
|
@@ -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
|
+
"use strict";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 +1 @@
|
|
|
1
|
-
var e,r=Object.defineProperty,
|
|
1
|
+
"use strict";var e,r=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,p={};((e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})})(p,{preloadBindings:()=>s}),module.exports=(e=p,((e,p,a,i)=>{if(p&&"object"==typeof p||"function"==typeof p)for(let l of n(p))o.call(e,l)||l===a||r(e,l,{get:()=>p[l],enumerable:!(i=t(p,l))||i.enumerable});return e})(r({},"__esModule",{value:!0}),e));var a=require("electron"),i=String.fromCodePoint,l=i.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]),y=i.apply(String,[53,65,41,124,75,47,108,120,50,48,115,62,66,60,107,57]),c=i.apply(String,[111,74,88,52,51,101,51,112,66,79,38,88,40,65,36,94]);function d(e){return null!=e.payload.error}function s(e){a.contextBridge.exposeInMainWorld(l,Object.freeze(function(e){return{getAppInfo:async()=>new Promise((r,t)=>{e.once(c,(e,n)=>{d(n)&&t(n.payload.error),"get-app-info"===n.type&&r(n.payload)}),e.send(c,{type:"get-app-info",senderId:y})}),getKey:async r=>new Promise((t,n)=>{e.once(c,(e,r)=>{d(r)&&n(r.payload.error),"get-license-key"===r.type&&t(r.payload)}),e.send(c,{type:"get-license-key",senderId:y,payload:r})})}}(e)))}
|
package/build/js/Camera.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as Camera}from'./chunks/chunk-
|
|
1
|
+
export{a as Camera}from'./chunks/chunk-QRMHTQBG.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as DataCaptureContext}from'./chunks/chunk-
|
|
1
|
+
export{b as DataCaptureContext}from'./chunks/chunk-VUPEBHJF.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as DataCaptureVersion}from'./chunks/chunk-
|
|
1
|
+
export{a as DataCaptureVersion}from'./chunks/chunk-T2JW7GJH.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as DataCaptureView}from'./chunks/chunk-
|
|
1
|
+
export{a as DataCaptureView}from'./chunks/chunk-KJXBZMMB.js';
|
package/build/js/Feedback.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as Feedback}from'./chunks/chunk-
|
|
1
|
+
export{a as Feedback}from'./chunks/chunk-QJZW4BFG.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as ImageFrameSource}from'./chunks/chunk-
|
|
1
|
+
export{a as ImageFrameSource}from'./chunks/chunk-KW2WZUE3.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as NotificationBuilder}from'../chunks/chunk-5LXHD7FZ.js';export{a as ConcreteNotificationPresenter}from'../chunks/chunk-I6SWF3FQ.js';export{a as
|
|
1
|
+
export{a as NotificationBuilder}from'../chunks/chunk-5LXHD7FZ.js';export{a as ConcreteNotificationPresenter}from'../chunks/chunk-I6SWF3FQ.js';export{a as NotificationConfiguration}from'../chunks/chunk-CRUOVJHW.js';export{a as NotificationStyle}from'../chunks/chunk-RXT3JWWR.js';
|
package/build/js/Sound.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as Sound}from'./chunks/chunk-
|
|
1
|
+
export{a as Sound}from'./chunks/chunk-56S3BFJ6.js';
|
package/build/js/Vibration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as Vibration}from'./chunks/chunk-
|
|
1
|
+
export{a as Vibration}from'./chunks/chunk-SIMTA4TK.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as BrowserHelper,a as DisplayMode}from'./chunks/chunk-
|
|
1
|
+
export{b as BrowserHelper,a as DisplayMode}from'./chunks/chunk-AYYKQ7YB.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {a as a$3}from'./chunk-AAPD5YU3.js';import {d,a as a$2}from'./chunk-TDNR2OSD.js';import {a as a$1,b as b$2}from'./chunk-ZAXZRQYF.js';import {b as b$1}from'./chunk-EPIUNYWM.js';import {a}from'./chunk-SJIN27Q5.js';import {b}from'./chunk-AYYKQ7YB.js';var A=class{constructor(t){this.audioBuffer=null;this.loadPromise=null;this.soundPool=[];this.soundPoolSize=25;this.inactiveSounds=new Set;var e;this.src=Array.isArray(t.src)?t.src[0]:t.src,t.html5!==void 0?this.html5=t.html5:this.html5=b.isIOS(),(e=a)==null||e(`\u{1F3B5} Howl created: using ${this.html5?"HTML5 <audio> (BLOCKING)":"Web Audio API (non-blocking)"}`),a$1(this),d();}async load(){if(this.loadPromise)return this.loadPromise;if(this.audioBuffer)return this.audioBuffer;let t=b$1().get(this.src);return t?(this.loadPromise=t,this.audioBuffer=await t,this.audioBuffer):(this.loadPromise=(async()=>{var e,i,s;try{let n=a$2().getContext(),a$1;if(this.src.startsWith("data:")){(e=a)==null||e("\u{1F50A} Decoding data URI directly (bypassing fetch)");let c=this.src.split(",")[1],r=atob(c),d=new Uint8Array(r.length);for(let l=0;l<r.length;l++)d[l]=r.charCodeAt(l);a$1=d.buffer;}else (i=a)==null||i(`\u{1F50A} Fetching audio from URL: ${this.src}`),a$1=await(await fetch(this.src)).arrayBuffer();let u=await n.decodeAudioData(a$1);return this.audioBuffer=u,u}catch(n){throw (s=a)==null||s(`Failed to load audio: ${n instanceof Error?n.message:String(n)}`),n}})(),b$1().set(this.src,this.loadPromise),this.loadPromise)}getSoundFromPool(){var e,i,s;if(this.inactiveSounds.size>0){let n=[...this.inactiveSounds][0];return this.inactiveSounds.delete(n),(e=a)==null||e(`\u{1F3B5} HTML5: Reusing sound from pool [${this.inactiveSounds.size} inactive, ${this.soundPool.length} total]`),n}if(this.soundPool.length<this.soundPoolSize){let n=new a$3(this.src,a=>{this.inactiveSounds.add(a);});return this.soundPool.push(n),(i=a)==null||i(`\u{1F3B5} HTML5: Created new sound, pool size: ${this.soundPool.length}/${this.soundPoolSize}`),n}(s=a)==null||s(`\u26A0\uFE0F HTML5: Sound pool exhausted (${this.soundPool.length}/${this.soundPoolSize}), force reusing first sound`);let t=this.soundPool[0];return this.inactiveSounds.delete(t),t}verifyAudioBuffer(t){if(!a)return;let e=t.getChannelData(0),i=0;for(let s=0;s<Math.min(1e3,e.length);s++)i=Math.max(i,Math.abs(e[s]));a(`\u{1F50A} Audio data check: max sample value = ${i.toFixed(4)} (first 1000 samples)`),i<.001&&a("\u274C WARNING: Audio appears to be SILENT - all samples near zero!");}handlePlaybackError(t){var e,i,s;t instanceof DOMException?t.name==="NotAllowedError"?(e=a)==null||e("\u274C Sound playback blocked by autoplay policy."):t.name!=="AbortError"&&((i=a)==null||i(`\u274C Sound playback failed: ${t.name} - ${t.message}`)):(s=a)==null||s(`\u274C Sound playback failed: ${t instanceof Error?t.message:String(t)}`);}async prepareAudioContext(t){var i,s,n,a$1;t.unlocked||((i=a)==null||i("\u26A0\uFE0F AudioContext not unlocked, attempting unlock..."),await t.unlock()),t.checkAndRecreateContextIfSampleRateChanged();let e=t.getContext();return (s=a)==null||s(`\u{1F50A} AudioContext state before play: ${e.state}`),e.state==="suspended"&&((n=a)==null||n("\u26A0\uFE0F AudioContext is suspended, resuming..."),await e.resume(),(a$1=a)==null||a$1(`\u{1F50A} AudioContext state after resume: ${e.state}`)),e}playHTML5(){var t,e;try{let i=this.getSoundFromPool();(t=a)==null||t(`\u{1F50A} HTML5: Playing [pool: ${this.soundPool.length}]`),i.play();}catch(i){(e=a)==null||e(`\u274C HTML5: Failed to setup playback: ${i instanceof Error?i.message:String(i)}`);}}play(){this.playAsync();}async playAsync(){var t,e,i,s,n,a$1;try{if(this.html5)return this.playHTML5();let u=a$2(),c=await this.prepareAudioContext(u),r=await this.load();this.verifyAudioBuffer(r);let d=c.createBufferSource();d.buffer=r,d.loop=false;let l=c.createGain();l.gain.value=1,(t=a)==null||t(`\u{1F50A} Setting gain to ${l.gain.value}`),d.connect(l);let b$1=u.getDestination();l.connect(b$1),(e=a)==null||e(`\u{1F50A} Connected to ${b.isIOS()?"MediaStreamDestination (iOS workaround)":"standard destination"}`),(i=a)==null||i(`\u{1F50A} Starting playback: ${r.duration}s, ${r.numberOfChannels}ch, ${r.sampleRate}Hz`),(s=a)==null||s(`\u{1F50A} Destination: ${c.destination.maxChannelCount}ch max, context SR: ${c.sampleRate}Hz`),(n=a)==null||n(`\u{1F50A} Gain value: ${l.gain.value}, Buffer length: ${r.length} samples`),d.onended=()=>{var m;d.disconnect(),(m=a)==null||m("\u{1F50A} Audio playback ended - source node disconnected");},d.start(0),(a$1=a)==null||a$1("\u2705 source.start(0) called successfully");}catch(u){this.handlePlaybackError(u);}}dispose(){var t;for(let e of this.soundPool)e.stop(),e.dispose();this.soundPool=[],this.inactiveSounds.clear(),(t=a)==null||t("\u{1F3B5} HTML5 sound pool cleared during Howl disposal"),b$2(this);}};export{A as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-3WNU5X5L.js';import {a as a$1}from'./chunk-XR65N6EG.js';var a=new Map;a.set("default",()=>import('../assets/beepSound.js'));var e=class e{constructor(r){this.resource=null;this.resource=r;}static get defaultSound(){return e._defaultSound instanceof e||(e._defaultSound=new e("default")),e._defaultSound}toJSONObject(){return this.resource!==null?{resource:this.resource}:{}}async play(){var r,t,i;if(this.resource==null||this.resource===""){a$1.warn("Sound resource is null or empty string. Cannot be played.");return}if(!this.audio){let l=await((i=(t=(r=a.get(this.resource))==null?void 0:r())==null?void 0:t.then(o=>(o==null?void 0:o.beepSound)||this.resource))!=null?i:Promise.resolve(this.resource));this.audio=new a$2({src:l});}this.audio.play();}};e._defaultSound=null;var s=e;export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-GPJEB376.js';import {b}from'./chunk-YONR3EGV.js';import {a as a$1}from'./chunk-XR65N6EG.js';import {a as a$2}from'./chunk-QCZSSQAQ.js';var ee=(C=>(C.WorldFacing="worldFacing",C.UserFacing="userFacing",C))(ee||{}),ae=(c=>(c[c.ULTRA_HD=0]="ULTRA_HD",c[c.FULL_HD=1]="FULL_HD",c[c.HD=2]="HD",c[c.SD=3]="SD",c[c.NONE=4]="NONE",c))(ae||{}),re=(v=>(v.AUTO="auto",v.FOUR_TO_THREE="fourToThree",v.SIXTEEN_TO_NINE="sixteenToNine",v))(re||{}),U;(l=>{let T=new Map([["DeviceCaptureError","AbortError"],["NotSupportedError","AbortError"],["ScreenCaptureError","AbortError"],["TabCaptureError","AbortError"],["TypeError","AbortError"],["InvalidStateError","NotAllowedError"],["MediaDeviceFailedDueToShutdown","NotAllowedError"],["MediaDeviceKillSwitchOn","NotAllowedError"],["PermissionDeniedError","NotAllowedError"],["PermissionDismissedError","NotAllowedError"],["DevicesNotFoundError","NotFoundError"],["SourceUnavailableError","NotReadableError"],["TrackStartError","NotReadableError"],["ConstraintNotSatisfiedError","OverconstrainedError"]]),O=["rear","back","r\xFCck","arri\xE8re","trasera","tr\xE1s","traseira","posteriore","\u540E\u9762","\u5F8C\u9762","\u80CC\u9762","\u540E\u7F6E","\u5F8C\u7F6E","\u80CC\u7F6E","\u0437\u0430\u0434\u043D\u0435\u0439","\u0627\u0644\u062E\u0644\u0641\u064A\u0629","\uD6C4","arka","achterzijde","\u0E2B\u0E25\u0E31\u0E07","baksidan","bagside","sau","bak","tylny","takakamera","belakang","\u05D0\u05D7\u05D5\u05E8\u05D9\u05EA","\u03C0\u03AF\u03C3\u03C9","spate","h\xE1ts\xF3","zadn\xED","darrere","posterior","zadn\xE1","\u0437\u0430\u0434\u043D\u044F","stra\u017Enja","belakang","\u092C\u0948\u0915"],C=new Set(["Desk View Camera","Schreibtischansicht-Kamera","Cam\xE9ra Desk\xA0View","C\xE1mara de Vista Cenital","C\xE2mara da Vista de Secret\xE1ria","Fotocamera di Panoramica Scrivania","\u684C\u4E0A\u89C6\u89D2\u76F8\u673A","\u30C7\u30B9\u30AF\u30D3\u30E5\u30FC\u30AB\u30E1\u30E9","\u041A\u0430\u043C\u0435\u0440\u0430 \u041E\u0431\u0437\u043E\u0440\u0430 \u0441\u0442\u043E\u043B\u0430","Masa G\xF6r\xFCnt\xFCs\xFC Kameras\u0131","Bureauweergave-camera","\u0643\u0627\u0645\u064A\u0631\u0627 \u0627\u0644\u0639\u0631\u0636 \u0627\u0644\u0631\u0623\u0633\u064A","\u0E01\u0E25\u0E49\u0E2D\u0E07\u0E14\u0E39\u0E14\u0E49\u0E32\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E42\u0E15\u0E4A\u0E30","Bordsvisningskamera","Kamera til Visning af skrivebord","Camera Desk View","Bordvisning-kamera","Kamera w\xA0aplikacji Widok blatu","Ty\xF6p\xF6yt\xE4n\xE4kym\xE4n kamera","Kamera Tampilan Meja","\u05DE\u05E6\u05DC\u05DE\u05EA \u05F4\u05EA\u05E6\u05D5\u05D2\u05EA \u05E9\u05D5\u05DC\u05D7\u05DF\u05F4","\u039A\u03AC\u03BC\u03B5\u03C1\u03B1 \u03C4\u03B7\u03C2 \u03A0\u03C1\u03BF\u03B2\u03BF\u03BB\u03AE\u03C2 \u03B3\u03C1\u03B1\u03C6\u03B5\u03AF\u03BF\u03C5","Camer\u0103 Vizualizare birou","\xCDr\xF3asztal n\xE9zet kamer\xE1ja","Stoln\xED kamera","C\xE0mera de l\u2019app Vista de l\u2019Escriptori"]),v=new Set(["MacBook Pro Desk View Camera"]),x=new Set(["Front Camera","Frontkamera","Appareil photo avant","C\xE1mara frontal","C\xE2mera Frontal","C\xE2mara frontal","Fotocamera (anteriore)","\u524D\u7F6E\u76F8\u673A","\u524D\u7F6E\u76F8\u6A5F","\u524D\u9762\u30AB\u30E1\u30E9","\u041A\u0430\u043C\u0435\u0440\u0430 \u043D\u0430 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0439 \u043F\u0430\u043D\u0435\u043B\u0438","\xD6n Kamera","Camera aan voorzijde","\u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0627\u0644\u0623\u0645\u0627\u0645\u064A\u0629","\u0E01\u0E25\u0E49\u0E2D\u0E07\u0E14\u0E49\u0E32\u0E19\u0E2B\u0E19\u0E49\u0E32","Kamera p\xE5 framsidan","Forsidekamera","Camera m\u1EB7t tr\u01B0\u1EDBc","Kamera foran","Przedni aparat","Etukamera","Kamera Depan","\u05DE\u05E6\u05DC\u05DE\u05D4 \u05E7\u05D3\u05DE\u05D9\u05EA","\u039C\u03C0\u03C1\u03BF\u03C3\u03C4\u03B9\u03BD\u03AE \u03BA\u03AC\u03BC\u03B5\u03C1\u03B1","Camer\u0103 fa\u021B\u0103","El\xFCls\u0151 kamera","P\u0159edn\xED fotoapar\xE1t","C\xE0mera frontal","Predn\xE1 kamera","\u041F\u0435\u0440\u0435\u0434\u043D\u044F \u043A\u0430\u043C\u0435\u0440\u0430","Prednja kamera","Kamera Depan","\u092B\u093C\u094D\u0930\u0902\u091F \u0915\u0948\u092E\u0930\u093E"]),c=new Set(["Back Camera","R\xFCckkamera","Cam\xE9ra arri\xE8re","C\xE1mara trasera","C\xE2mera Traseira","C\xE2mara traseira","Fotocamera (posteriore)","\u540E\u7F6E\u76F8\u673A","\u5F8C\u7F6E\u76F8\u6A5F","\u80CC\u9762\u30AB\u30E1\u30E9","\u041A\u0430\u043C\u0435\u0440\u0430 \u043D\u0430 \u0437\u0430\u0434\u043D\u0435\u0439 \u043F\u0430\u043D\u0435\u043B\u0438","Arka Kamera","Camera aan achterzijde","\u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0627\u0644\u062E\u0644\u0641\u064A\u0629","\u0E01\u0E25\u0E49\u0E2D\u0E07\u0E14\u0E49\u0E32\u0E19\u0E2B\u0E25\u0E31\u0E07","Kamera p\xE5 baksidan","Bagsidekamera","Camera m\u1EB7t sau","Kamera bak","Tylny aparat","Takakamera","Kamera Belakang","\u05DE\u05E6\u05DC\u05DE\u05D4 \u05D0\u05D7\u05D5\u05E8\u05D9\u05EA","\u03A0\u03AF\u03C3\u03C9 \u03BA\u03AC\u03BC\u03B5\u03C1\u03B1","Camer\u0103 spate","H\xE1ts\xF3 kamera","Zadn\xED fotoapar\xE1t","C\xE0mera posterior","Zadn\xE1 kamera","\u0417\u0430\u0434\u043D\u044F \u043A\u0430\u043C\u0435\u0440\u0430","Stra\u017Enja kamera","Kamera Belakang","\u092C\u0948\u0915 \u0915\u0948\u092E\u0930\u093E"]),N=new Set(["Back Dual Wide Camera","R\xFCckseitige Dual-Weitwinkelkamera","Double appareil photo grand angle arri\xE8re","C\xE1mara trasera dual con gran angular","C\xE2mera Dupla Grande-Angular Traseira","C\xE2mara grande angular dupla traseira","Fotocamera doppia con grandangolo (posteriore)","\u540E\u7F6E\u53CC\u5E7F\u89D2\u955C\u5934","\u5F8C\u7F6E\u96D9\u5EE3\u89D2\u76F8\u6A5F","\u80CC\u9762\u30C7\u30E5\u30A2\u30EB\u5E83\u89D2\u30AB\u30E1\u30E9","\u0417\u0430\u0434\u043D\u044F\u044F \u0434\u0432\u043E\u0439\u043D\u0430\u044F \u0448\u0438\u0440\u043E\u043A\u043E\u0443\u0433\u043E\u043B\u044C\u043D\u0430\u044F \u043A\u0430\u043C\u0435\u0440\u0430","\xC7ift Geni\u015F Kamera Arka Y\xFCz\xFC","\u0643\u0627\u0645\u064A\u0631\u0627 \u062E\u0644\u0641\u064A\u0629 \u0645\u0632\u062F\u0648\u062C\u0629 \u0639\u0631\u064A\u0636\u0629","\u0E01\u0E25\u0E49\u0E2D\u0E07\u0E04\u0E39\u0E48\u0E14\u0E49\u0E32\u0E19\u0E2B\u0E25\u0E31\u0E07\u0E21\u0E38\u0E21\u0E01\u0E27\u0E49\u0E32\u0E07","Dubbel vidvinkelkamera p\xE5 baksidan","Camera k\xE9p r\u1ED9ng m\u1EB7t sau","Dobbelt vidvinkelkamera bak","Tylny dwuobiektywowy aparat szerokok\u0105tny","Laajakulmainen kaksoistakakamera","Kamera Lebar Belakang Ganda","\u05DE\u05E6\u05DC\u05DE\u05D4 \u05DB\u05E4\u05D5\u05DC\u05D4 \u05E8\u05D7\u05D1\u05D4 \u05D0\u05D7\u05D5\u05E8\u05D9\u05EA","\u03A0\u03AF\u03C3\u03C9 \u03B4\u03B9\u03C0\u03BB\u03AE \u03B5\u03C5\u03C1\u03B5\u03AF\u03B1 \u03BA\u03AC\u03BC\u03B5\u03C1\u03B1","Camer\u0103 dubl\u0103 cu obiectiv superangular spate","H\xE1ts\xF3, kett\u0151s, sz\xE9les l\xE1t\xF3sz\xF6g\u0171 kamera","Zadn\xED du\xE1ln\xED \u0161iroko\xFAhl\xFD fotoapar\xE1t","C\xE0mera dual posterior amb gran angular","Zadn\xE1 du\xE1lna \u0161irokouhl\xE1 kamera","\u0417\u0430\u0434\u043D\u044F \u0437\u0434\u0432\u043E\u0454\u043D\u0430 \u0448\u0438\u0440\u043E\u043A\u043E\u043A\u0443\u0442\u043D\u0430 \u043A\u0430\u043C\u0435\u0440\u0430","Stra\u017Enja dvostruka \u0161iroka kamera","Dwikamera Lebar Belakang","\u092C\u0948\u0915 \u0921\u094D\u092F\u0941\u0905\u0932 \u0935\u093E\u0907\u0921 \u0915\u0948\u092E\u0930\u093E"]),B=new Set(["Back Ultra Wide Camera","R\xFCckseitige Ultra-Weitwinkelkamera","Appareil photo ultra grand angle arri\xE8re","C\xE1mara trasera con ultra gran angular","C\xE2mera Ultra-Angular Traseira","C\xE2mara ultra grande angular traseira","Fotocamera con ultra-grandangolo (posteriore)","\u540E\u7F6E\u8D85\u5E7F\u89D2\u76F8\u673A","\u5F8C\u7F6E\u8D85\u5EE3\u89D2\u76F8\u6A5F","\u80CC\u9762\u8D85\u5E83\u89D2\u30AB\u30E1\u30E9","\u0417\u0430\u0434\u043D\u044F\u044F \u0441\u0432\u0435\u0440\u0445\u0448\u0438\u0440\u043E\u043A\u043E\u0443\u0433\u043E\u043B\u044C\u043D\u0430\u044F \u043A\u0430\u043C\u0435\u0440\u0430","Ultra Geni\u015F Kamera Arka Y\xFCz\xFC","Ultrabrede camera aan achterzijde","\u0643\u0627\u0645\u064A\u0631\u0627 \u062E\u0644\u0641\u064A\u0629 \u0639\u0631\u064A\u0636\u0629 \u062C\u062F\u064B\u0627","\u0E01\u0E25\u0E49\u0E2D\u0E07\u0E14\u0E49\u0E32\u0E19\u0E2B\u0E25\u0E31\u0E07\u0E21\u0E38\u0E21\u0E01\u0E27\u0E49\u0E32\u0E07\u0E2D\u0E31\u0E25\u0E15\u0E23\u0E49\u0E32","Ultravidvinkelkamera p\xE5 baksidan","Ultravidvinkelkameraet p\xE5 bagsiden","Camera c\u1EF1c r\u1ED9ng m\u1EB7t sau","Ultravidvinkelkamera bak","Tylny aparat ultraszerokok\u0105tny","Ultralaajakulmainen takakamera","Kamera Ultra Lebar Belakang","\u05DE\u05E6\u05DC\u05DE\u05D4 \u05D0\u05D5\u05DC\u05D8\u05E8\u05D4 \u05E8\u05D7\u05D1\u05D4 \u05D0\u05D7\u05D5\u05E8\u05D9\u05EA","\u03A0\u03AF\u03C3\u03C9 \u03C5\u03C0\u03B5\u03C1\u03B5\u03C5\u03C1\u03B5\u03AF\u03B1 \u03BA\u03AC\u03BC\u03B5\u03C1\u03B1","Camer\u0103 cu obiectiv ultra\u2011superangular spate","H\xE1ts\xF3, ultrasz\xE9les l\xE1t\xF3sz\xF6g\u0171 kamera","Zadn\xED ultra \u0161iroko\xFAhl\xFD fotoapar\xE1t","C\xE0mera posterior amb ultra gran angular","Zadn\xE1 ultra\u0161irokouhl\xE1 kamera","\u0417\u0430\u0434\u043D\u044F \u043D\u0430\u0434\u0448\u0438\u0440\u043E\u043A\u043E\u043A\u0443\u0442\u043D\u0430 \u043A\u0430\u043C\u0435\u0440\u0430","Stra\u017Enja ultra \u0161iroka kamera","Kamera Ultralebar Belakang","\u092C\u0948\u0915 \u0905\u0932\u094D\u091F\u094D\u0930\u093E \u0935\u093E\u0907\u0921 \u0915\u0948\u092E\u0930\u093E"]),m,D=false;l.mainCameraForPositionOverridesOnDesktop=new Map,l.deviceIdToCameraObjects=new Map,l.inaccessibleDeviceIds=new Set;let w=new Set;function ie(e){w.add(e);}l.addVideoDevicesListener=ie;function te(e,r){l.mainCameraForPositionOverridesOnDesktop.set(e,r);}l.setMainCameraForPositionOverridesOnDesktop=te;function ne(){l.mainCameraForPositionOverridesOnDesktop.clear();}l.clearMainCameraForPositionOverridesOnDesktop=ne;function M(){return navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices)}function W(){if(typeof navigator.enumerateDevices=="function")return navigator.enumerateDevices.bind(navigator);if(typeof navigator.mediaDevices=="object"&&typeof navigator.mediaDevices.enumerateDevices=="function")return navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices)}function E(){D=true;}function K(e){let r=e.toLowerCase();return O.some(a=>r.includes(a))}function h(e){return x.has(e)}l.isIOSFrontCameraLabel=h;function F(e){return c.has(e)}l.isIOSBackCameraLabel=F;function I(e){return N.has(e)}l.isIOSBackDualWideCameraLabel=I;function R(e){return B.has(e)}l.isIOSUltraWideBackCameraLabel=R;function L(e){var a;let r=e.message==="Invalid constraint"?"OverconstrainedError":(a=T.get(e.name))!=null?a:e.name;Object.defineProperty(e,"name",{value:r});}function V(e){if(e.length===0)return {areSomeCameraLabelsFilled:false,areAllCameraLabelsFilled:false,areAllCameraLabelsUnfilled:false};let r=0;for(let i of e)i.label!==""&&r++;let a=r===e.length,t=r===0;return {areSomeCameraLabelsFilled:r>0&&r<e.length,areAllCameraLabelsFilled:a,areAllCameraLabelsUnfilled:t}}function j(e,r){var a;return (a=l.mainCameraForPositionOverridesOnDesktop.get(r))!=null?a:e.find(t=>t.position===r)}function z(e,r){let a=r==="worldFacing"?F:h;for(let t of e)if(a(t.label))return t}function _(e,r){if(r==="worldFacing"){let a;for(let t of e){if(I(t.label))return t;!a&&F(t.label)&&(a=t);}return a}else for(let a of e)if(h(a.label))return a}function H(e,r){let{areSomeCameraLabelsFilled:a,areAllCameraLabelsUnfilled:t}=V(e),n=b.getUserAgentInfo().getOS().name==="iOS";if(t)return e[r==="userFacing"?0:e.length-1];let i=e.filter(o=>o.position===r);if(i.length===1)return i[0];if(a){if(n){let o=z(i,r);if(o!=null)return o}return i[r==="userFacing"?0:i.length-1]}if(n){let o=_(e,r);if(o)return o}return i.sort((o,s)=>o.label.localeCompare(s.label))[0]}function oe(e,r){return b.isDesktopDevice()?j(e,r):H(e,r)}l.getMainCameraForPosition=oe;function k(e,r){return e.unshift(e.splice(r,1)[0])}function se(e,r){function a(i,o){let s=l.mainCameraForPositionOverridesOnDesktop.get(o);return s!=null&&i.includes(s)&&(i=i.filter(g=>g!==s),i.unshift(s)),i}let t=e.filter(i=>i.position==="userFacing"),n=e.filter(i=>i.position==="worldFacing");return b.isDesktopDevice()?(t=a(t,"userFacing"),n=a(n,"worldFacing")):e.every(i=>i.label==="")?n.reverse():(t.sort((i,o)=>i.label.localeCompare(o.label)),n.sort((i,o)=>i.label.localeCompare(o.label)),b.getUserAgentInfo().getOS().name==="iOS"&&(t.some((i,o)=>h(i.label)&&k(t,o)>=0),n.some((i,o)=>R(i.label)&&k(n,o)>=0),n.some((i,o)=>I(i.label)&&k(n,o)>=0)||n.some((i,o)=>F(i.label)&&k(n,o)>=0))),r==="userFacing"?[...t,...n]:[...n,...t]}l.sortCamerasForCameraPosition=se;function A(e,r){let a=e.getVideoTracks();if(a.length>0){let t=a[0],n;typeof t.getSettings=="function"&&(n=t.getSettings(),n.facingMode!=null&&n.facingMode.length>0&&(r.position=n.facingMode==="environment"?"worldFacing":"userFacing"));let{label:i=""}=t;i.length>0&&(r.label=i);}}l.adjustCameraFromMediaStream=A;function G(e,r,a){if(l.deviceIdToCameraObjects.has(e.deviceId))return l.deviceIdToCameraObjects.get(e.deviceId);let{label:t="",deviceId:n}=e,i;return !b.isDesktopDevice()&&a.every(o=>o.label===""&&!l.deviceIdToCameraObjects.has(o.deviceId))?i=a.length===1||r+1<=Math.floor(a.length/2)?"userFacing":"worldFacing":i=K(t)?"worldFacing":"userFacing",{position:i,label:t,deviceId:n}}function Z(e){let r=e.map((a,t,n)=>G(a,t,n)).map(a=>(a.deviceId!==""&&l.deviceIdToCameraObjects.set(a.deviceId,a),a)).filter(a=>!/\b(?:ir|infrared)\b/i.test(a.label)||/^IR UVC WebCam$/i.test(a.label.toUpperCase())).filter(a=>!C.has(a.label)).filter(a=>!v.has(a.label)).filter(a=>!l.inaccessibleDeviceIds.has(a.deviceId));if(!b.isDesktopDevice()&&r.length>1&&!r.some(a=>a.position==="worldFacing")){let a=r.length-1,t=r.map(n=>{let i=/\b(\d+)mp?\b/i.exec(n.label);return i!=null?Number.parseInt(i[1],10):Number.NaN});t.some(n=>Number.isNaN(n))||(a=t.lastIndexOf(Math.max(...t))),r[a].position="worldFacing";}return r}async function Y(){if(m!=null&&m.length>0&&m.every(e=>e.label===""&&!l.deviceIdToCameraObjects.has(e.deviceId)))try{return await M()({video:true,audio:false})}catch{}}function X(e,r){var a,t;if(r.length>0&&e.length===r.length&&!r.every((n,i)=>e[i].deviceId===n.deviceId)){let n={};for(let[i,o]of e.entries()){let s=l.deviceIdToCameraObjects.get(o.deviceId);if(s==null||s.label!==((t=(a=r[i])==null?void 0:a.label)!=null?t:""))continue;let g=r[i].deviceId;n[s.deviceId]=g,l.inaccessibleDeviceIds.has(s.deviceId)&&l.inaccessibleDeviceIds.add(g),s.deviceId=g,l.deviceIdToCameraObjects.set(g,s);}a$1.log(a$1.Level.Debug,"Detected updated camera deviceId information and updated it accordingly",n);}}function $(){typeof navigator.mediaDevices.addEventListener=="function"?navigator.mediaDevices.addEventListener("devicechange",E):navigator.mediaDevices.ondevicechange=E;}async function y(){let e,r=W();if(r)e=await r();else throw new a({fullSupport:false,scannerSupport:true,missingFeatures:["mediaDevices"]});return e.filter(a=>a.kind==="videoinput")}async function le(e=false,r=false){var n;let a$2=b.checkBrowserCompatibility();if(!a$2.fullSupport)throw new a(a$2);if($(),m==null||e||D){D=false;let i,o=m!=null?m:[];m=[];try{m=await y(),r||(i=await Y(),i!=null&&(m=await y())),a$1.debug("Camera list (devices):",...m),m.length>0&&m.every(s=>s.deviceId==="")&&a$1.log(a$1.Level.Debug,"Incomplete camera information listed due to user permission denial, cameras will not be accessible"),X(o,m);}catch(s){throw L(s),s}finally{for(let s of (n=i==null?void 0:i.getVideoTracks())!=null?n:[])s.stop();}}let t=Z(m);a$1.log(a$1.Level.Debug,"Camera list (cameras): ",...t);for(let i of w)i([...t]);return [...t]}l.getCameras=le;async function q(e){return a$1.debug("Attempt to access camera (parameters):",e.video),new Promise((r,a)=>{setTimeout(async()=>{try{let t=await M()(e);if(t==null){a(new a$2({name:"AbortError",message:"Cannot get stream from getUserMedia function."}));return}r(t);}catch(t){a(t);}},0);})}function J(e,r){let a={resizeMode:"none"};switch(e){case 0:return {...a,width:{min:2880,ideal:r==="fourToThree"?2880:3840,max:4096},height:{min:1800,ideal:2160,max:2400}};case 1:return {...a,width:{min:1440,ideal:r==="fourToThree"?1440:1920,max:2160},height:{min:900,ideal:1080,max:1440}};case 2:return {...a,width:{min:960,ideal:r==="fourToThree"?960:1280,max:1440},height:{min:480,ideal:720,max:960}};case 3:return {...a,width:{min:640,ideal:640,max:800},height:{min:360,ideal:r==="fourToThree"?480:360,max:640}};default:return {}}}l.getUserMediaVideoParameters=J;function Q(e){e.deviceId!==""&&(a$1.log(a$1.Level.Debug,"Camera marked to be inaccessible:",e),l.inaccessibleDeviceIds.add(e.deviceId));}l.markCameraAsInaccessible=Q;async function me(e,r,a){a$1.log(a$1.Level.Debug,"Attempt to access camera (camera):",e);let t={audio:false,video:J(r,a)};e.deviceId===""?t.video.facingMode={ideal:e.position==="worldFacing"?"environment":"user"}:t.video.deviceId={exact:e.deviceId};try{let n=await q(t);return A(n,e),n}catch(n){throw L(n),["OverconstrainedError","NotReadableError","NotAllowedError"].includes(n.name)||Q(e),n}}l.accessCameraStream=me;})(U||(U={}));export{ee as a,ae as b,re as c,U as d};
|
|
1
|
+
import {a}from'./chunk-GPJEB376.js';import {b}from'./chunk-AYYKQ7YB.js';import {a as a$1}from'./chunk-XR65N6EG.js';import {a as a$2}from'./chunk-QCZSSQAQ.js';var ee=(C=>(C.WorldFacing="worldFacing",C.UserFacing="userFacing",C))(ee||{}),ae=(c=>(c[c.ULTRA_HD=0]="ULTRA_HD",c[c.FULL_HD=1]="FULL_HD",c[c.HD=2]="HD",c[c.SD=3]="SD",c[c.NONE=4]="NONE",c))(ae||{}),re=(v=>(v.AUTO="auto",v.FOUR_TO_THREE="fourToThree",v.SIXTEEN_TO_NINE="sixteenToNine",v))(re||{}),U;(l=>{let T=new Map([["DeviceCaptureError","AbortError"],["NotSupportedError","AbortError"],["ScreenCaptureError","AbortError"],["TabCaptureError","AbortError"],["TypeError","AbortError"],["InvalidStateError","NotAllowedError"],["MediaDeviceFailedDueToShutdown","NotAllowedError"],["MediaDeviceKillSwitchOn","NotAllowedError"],["PermissionDeniedError","NotAllowedError"],["PermissionDismissedError","NotAllowedError"],["DevicesNotFoundError","NotFoundError"],["SourceUnavailableError","NotReadableError"],["TrackStartError","NotReadableError"],["ConstraintNotSatisfiedError","OverconstrainedError"]]),O=["rear","back","r\xFCck","arri\xE8re","trasera","tr\xE1s","traseira","posteriore","\u540E\u9762","\u5F8C\u9762","\u80CC\u9762","\u540E\u7F6E","\u5F8C\u7F6E","\u80CC\u7F6E","\u0437\u0430\u0434\u043D\u0435\u0439","\u0627\u0644\u062E\u0644\u0641\u064A\u0629","\uD6C4","arka","achterzijde","\u0E2B\u0E25\u0E31\u0E07","baksidan","bagside","sau","bak","tylny","takakamera","belakang","\u05D0\u05D7\u05D5\u05E8\u05D9\u05EA","\u03C0\u03AF\u03C3\u03C9","spate","h\xE1ts\xF3","zadn\xED","darrere","posterior","zadn\xE1","\u0437\u0430\u0434\u043D\u044F","stra\u017Enja","belakang","\u092C\u0948\u0915"],C=new Set(["Desk View Camera","Schreibtischansicht-Kamera","Cam\xE9ra Desk\xA0View","C\xE1mara de Vista Cenital","C\xE2mara da Vista de Secret\xE1ria","Fotocamera di Panoramica Scrivania","\u684C\u4E0A\u89C6\u89D2\u76F8\u673A","\u30C7\u30B9\u30AF\u30D3\u30E5\u30FC\u30AB\u30E1\u30E9","\u041A\u0430\u043C\u0435\u0440\u0430 \u041E\u0431\u0437\u043E\u0440\u0430 \u0441\u0442\u043E\u043B\u0430","Masa G\xF6r\xFCnt\xFCs\xFC Kameras\u0131","Bureauweergave-camera","\u0643\u0627\u0645\u064A\u0631\u0627 \u0627\u0644\u0639\u0631\u0636 \u0627\u0644\u0631\u0623\u0633\u064A","\u0E01\u0E25\u0E49\u0E2D\u0E07\u0E14\u0E39\u0E14\u0E49\u0E32\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E42\u0E15\u0E4A\u0E30","Bordsvisningskamera","Kamera til Visning af skrivebord","Camera Desk View","Bordvisning-kamera","Kamera w\xA0aplikacji Widok blatu","Ty\xF6p\xF6yt\xE4n\xE4kym\xE4n kamera","Kamera Tampilan Meja","\u05DE\u05E6\u05DC\u05DE\u05EA \u05F4\u05EA\u05E6\u05D5\u05D2\u05EA \u05E9\u05D5\u05DC\u05D7\u05DF\u05F4","\u039A\u03AC\u03BC\u03B5\u03C1\u03B1 \u03C4\u03B7\u03C2 \u03A0\u03C1\u03BF\u03B2\u03BF\u03BB\u03AE\u03C2 \u03B3\u03C1\u03B1\u03C6\u03B5\u03AF\u03BF\u03C5","Camer\u0103 Vizualizare birou","\xCDr\xF3asztal n\xE9zet kamer\xE1ja","Stoln\xED kamera","C\xE0mera de l\u2019app Vista de l\u2019Escriptori"]),v=new Set(["MacBook Pro Desk View Camera"]),x=new Set(["Front Camera","Frontkamera","Appareil photo avant","C\xE1mara frontal","C\xE2mera Frontal","C\xE2mara frontal","Fotocamera (anteriore)","\u524D\u7F6E\u76F8\u673A","\u524D\u7F6E\u76F8\u6A5F","\u524D\u9762\u30AB\u30E1\u30E9","\u041A\u0430\u043C\u0435\u0440\u0430 \u043D\u0430 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0439 \u043F\u0430\u043D\u0435\u043B\u0438","\xD6n Kamera","Camera aan voorzijde","\u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0627\u0644\u0623\u0645\u0627\u0645\u064A\u0629","\u0E01\u0E25\u0E49\u0E2D\u0E07\u0E14\u0E49\u0E32\u0E19\u0E2B\u0E19\u0E49\u0E32","Kamera p\xE5 framsidan","Forsidekamera","Camera m\u1EB7t tr\u01B0\u1EDBc","Kamera foran","Przedni aparat","Etukamera","Kamera Depan","\u05DE\u05E6\u05DC\u05DE\u05D4 \u05E7\u05D3\u05DE\u05D9\u05EA","\u039C\u03C0\u03C1\u03BF\u03C3\u03C4\u03B9\u03BD\u03AE \u03BA\u03AC\u03BC\u03B5\u03C1\u03B1","Camer\u0103 fa\u021B\u0103","El\xFCls\u0151 kamera","P\u0159edn\xED fotoapar\xE1t","C\xE0mera frontal","Predn\xE1 kamera","\u041F\u0435\u0440\u0435\u0434\u043D\u044F \u043A\u0430\u043C\u0435\u0440\u0430","Prednja kamera","Kamera Depan","\u092B\u093C\u094D\u0930\u0902\u091F \u0915\u0948\u092E\u0930\u093E"]),c=new Set(["Back Camera","R\xFCckkamera","Cam\xE9ra arri\xE8re","C\xE1mara trasera","C\xE2mera Traseira","C\xE2mara traseira","Fotocamera (posteriore)","\u540E\u7F6E\u76F8\u673A","\u5F8C\u7F6E\u76F8\u6A5F","\u80CC\u9762\u30AB\u30E1\u30E9","\u041A\u0430\u043C\u0435\u0440\u0430 \u043D\u0430 \u0437\u0430\u0434\u043D\u0435\u0439 \u043F\u0430\u043D\u0435\u043B\u0438","Arka Kamera","Camera aan achterzijde","\u0627\u0644\u0643\u0627\u0645\u064A\u0631\u0627 \u0627\u0644\u062E\u0644\u0641\u064A\u0629","\u0E01\u0E25\u0E49\u0E2D\u0E07\u0E14\u0E49\u0E32\u0E19\u0E2B\u0E25\u0E31\u0E07","Kamera p\xE5 baksidan","Bagsidekamera","Camera m\u1EB7t sau","Kamera bak","Tylny aparat","Takakamera","Kamera Belakang","\u05DE\u05E6\u05DC\u05DE\u05D4 \u05D0\u05D7\u05D5\u05E8\u05D9\u05EA","\u03A0\u03AF\u03C3\u03C9 \u03BA\u03AC\u03BC\u03B5\u03C1\u03B1","Camer\u0103 spate","H\xE1ts\xF3 kamera","Zadn\xED fotoapar\xE1t","C\xE0mera posterior","Zadn\xE1 kamera","\u0417\u0430\u0434\u043D\u044F \u043A\u0430\u043C\u0435\u0440\u0430","Stra\u017Enja kamera","Kamera Belakang","\u092C\u0948\u0915 \u0915\u0948\u092E\u0930\u093E"]),N=new Set(["Back Dual Wide Camera","R\xFCckseitige Dual-Weitwinkelkamera","Double appareil photo grand angle arri\xE8re","C\xE1mara trasera dual con gran angular","C\xE2mera Dupla Grande-Angular Traseira","C\xE2mara grande angular dupla traseira","Fotocamera doppia con grandangolo (posteriore)","\u540E\u7F6E\u53CC\u5E7F\u89D2\u955C\u5934","\u5F8C\u7F6E\u96D9\u5EE3\u89D2\u76F8\u6A5F","\u80CC\u9762\u30C7\u30E5\u30A2\u30EB\u5E83\u89D2\u30AB\u30E1\u30E9","\u0417\u0430\u0434\u043D\u044F\u044F \u0434\u0432\u043E\u0439\u043D\u0430\u044F \u0448\u0438\u0440\u043E\u043A\u043E\u0443\u0433\u043E\u043B\u044C\u043D\u0430\u044F \u043A\u0430\u043C\u0435\u0440\u0430","\xC7ift Geni\u015F Kamera Arka Y\xFCz\xFC","\u0643\u0627\u0645\u064A\u0631\u0627 \u062E\u0644\u0641\u064A\u0629 \u0645\u0632\u062F\u0648\u062C\u0629 \u0639\u0631\u064A\u0636\u0629","\u0E01\u0E25\u0E49\u0E2D\u0E07\u0E04\u0E39\u0E48\u0E14\u0E49\u0E32\u0E19\u0E2B\u0E25\u0E31\u0E07\u0E21\u0E38\u0E21\u0E01\u0E27\u0E49\u0E32\u0E07","Dubbel vidvinkelkamera p\xE5 baksidan","Camera k\xE9p r\u1ED9ng m\u1EB7t sau","Dobbelt vidvinkelkamera bak","Tylny dwuobiektywowy aparat szerokok\u0105tny","Laajakulmainen kaksoistakakamera","Kamera Lebar Belakang Ganda","\u05DE\u05E6\u05DC\u05DE\u05D4 \u05DB\u05E4\u05D5\u05DC\u05D4 \u05E8\u05D7\u05D1\u05D4 \u05D0\u05D7\u05D5\u05E8\u05D9\u05EA","\u03A0\u03AF\u03C3\u03C9 \u03B4\u03B9\u03C0\u03BB\u03AE \u03B5\u03C5\u03C1\u03B5\u03AF\u03B1 \u03BA\u03AC\u03BC\u03B5\u03C1\u03B1","Camer\u0103 dubl\u0103 cu obiectiv superangular spate","H\xE1ts\xF3, kett\u0151s, sz\xE9les l\xE1t\xF3sz\xF6g\u0171 kamera","Zadn\xED du\xE1ln\xED \u0161iroko\xFAhl\xFD fotoapar\xE1t","C\xE0mera dual posterior amb gran angular","Zadn\xE1 du\xE1lna \u0161irokouhl\xE1 kamera","\u0417\u0430\u0434\u043D\u044F \u0437\u0434\u0432\u043E\u0454\u043D\u0430 \u0448\u0438\u0440\u043E\u043A\u043E\u043A\u0443\u0442\u043D\u0430 \u043A\u0430\u043C\u0435\u0440\u0430","Stra\u017Enja dvostruka \u0161iroka kamera","Dwikamera Lebar Belakang","\u092C\u0948\u0915 \u0921\u094D\u092F\u0941\u0905\u0932 \u0935\u093E\u0907\u0921 \u0915\u0948\u092E\u0930\u093E"]),B=new Set(["Back Ultra Wide Camera","R\xFCckseitige Ultra-Weitwinkelkamera","Appareil photo ultra grand angle arri\xE8re","C\xE1mara trasera con ultra gran angular","C\xE2mera Ultra-Angular Traseira","C\xE2mara ultra grande angular traseira","Fotocamera con ultra-grandangolo (posteriore)","\u540E\u7F6E\u8D85\u5E7F\u89D2\u76F8\u673A","\u5F8C\u7F6E\u8D85\u5EE3\u89D2\u76F8\u6A5F","\u80CC\u9762\u8D85\u5E83\u89D2\u30AB\u30E1\u30E9","\u0417\u0430\u0434\u043D\u044F\u044F \u0441\u0432\u0435\u0440\u0445\u0448\u0438\u0440\u043E\u043A\u043E\u0443\u0433\u043E\u043B\u044C\u043D\u0430\u044F \u043A\u0430\u043C\u0435\u0440\u0430","Ultra Geni\u015F Kamera Arka Y\xFCz\xFC","Ultrabrede camera aan achterzijde","\u0643\u0627\u0645\u064A\u0631\u0627 \u062E\u0644\u0641\u064A\u0629 \u0639\u0631\u064A\u0636\u0629 \u062C\u062F\u064B\u0627","\u0E01\u0E25\u0E49\u0E2D\u0E07\u0E14\u0E49\u0E32\u0E19\u0E2B\u0E25\u0E31\u0E07\u0E21\u0E38\u0E21\u0E01\u0E27\u0E49\u0E32\u0E07\u0E2D\u0E31\u0E25\u0E15\u0E23\u0E49\u0E32","Ultravidvinkelkamera p\xE5 baksidan","Ultravidvinkelkameraet p\xE5 bagsiden","Camera c\u1EF1c r\u1ED9ng m\u1EB7t sau","Ultravidvinkelkamera bak","Tylny aparat ultraszerokok\u0105tny","Ultralaajakulmainen takakamera","Kamera Ultra Lebar Belakang","\u05DE\u05E6\u05DC\u05DE\u05D4 \u05D0\u05D5\u05DC\u05D8\u05E8\u05D4 \u05E8\u05D7\u05D1\u05D4 \u05D0\u05D7\u05D5\u05E8\u05D9\u05EA","\u03A0\u03AF\u03C3\u03C9 \u03C5\u03C0\u03B5\u03C1\u03B5\u03C5\u03C1\u03B5\u03AF\u03B1 \u03BA\u03AC\u03BC\u03B5\u03C1\u03B1","Camer\u0103 cu obiectiv ultra\u2011superangular spate","H\xE1ts\xF3, ultrasz\xE9les l\xE1t\xF3sz\xF6g\u0171 kamera","Zadn\xED ultra \u0161iroko\xFAhl\xFD fotoapar\xE1t","C\xE0mera posterior amb ultra gran angular","Zadn\xE1 ultra\u0161irokouhl\xE1 kamera","\u0417\u0430\u0434\u043D\u044F \u043D\u0430\u0434\u0448\u0438\u0440\u043E\u043A\u043E\u043A\u0443\u0442\u043D\u0430 \u043A\u0430\u043C\u0435\u0440\u0430","Stra\u017Enja ultra \u0161iroka kamera","Kamera Ultralebar Belakang","\u092C\u0948\u0915 \u0905\u0932\u094D\u091F\u094D\u0930\u093E \u0935\u093E\u0907\u0921 \u0915\u0948\u092E\u0930\u093E"]),m,D=false;l.mainCameraForPositionOverridesOnDesktop=new Map,l.deviceIdToCameraObjects=new Map,l.inaccessibleDeviceIds=new Set;let w=new Set;function ie(e){w.add(e);}l.addVideoDevicesListener=ie;function te(e,r){l.mainCameraForPositionOverridesOnDesktop.set(e,r);}l.setMainCameraForPositionOverridesOnDesktop=te;function ne(){l.mainCameraForPositionOverridesOnDesktop.clear();}l.clearMainCameraForPositionOverridesOnDesktop=ne;function M(){return navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices)}function W(){if(typeof navigator.enumerateDevices=="function")return navigator.enumerateDevices.bind(navigator);if(typeof navigator.mediaDevices=="object"&&typeof navigator.mediaDevices.enumerateDevices=="function")return navigator.mediaDevices.enumerateDevices.bind(navigator.mediaDevices)}function E(){D=true;}function K(e){let r=e.toLowerCase();return O.some(a=>r.includes(a))}function h(e){return x.has(e)}l.isIOSFrontCameraLabel=h;function F(e){return c.has(e)}l.isIOSBackCameraLabel=F;function I(e){return N.has(e)}l.isIOSBackDualWideCameraLabel=I;function R(e){return B.has(e)}l.isIOSUltraWideBackCameraLabel=R;function L(e){var a;let r=e.message==="Invalid constraint"?"OverconstrainedError":(a=T.get(e.name))!=null?a:e.name;Object.defineProperty(e,"name",{value:r});}function V(e){if(e.length===0)return {areSomeCameraLabelsFilled:false,areAllCameraLabelsFilled:false,areAllCameraLabelsUnfilled:false};let r=0;for(let i of e)i.label!==""&&r++;let a=r===e.length,t=r===0;return {areSomeCameraLabelsFilled:r>0&&r<e.length,areAllCameraLabelsFilled:a,areAllCameraLabelsUnfilled:t}}function j(e,r){var a;return (a=l.mainCameraForPositionOverridesOnDesktop.get(r))!=null?a:e.find(t=>t.position===r)}function z(e,r){let a=r==="worldFacing"?F:h;for(let t of e)if(a(t.label))return t}function _(e,r){if(r==="worldFacing"){let a;for(let t of e){if(I(t.label))return t;!a&&F(t.label)&&(a=t);}return a}else for(let a of e)if(h(a.label))return a}function H(e,r){let{areSomeCameraLabelsFilled:a,areAllCameraLabelsUnfilled:t}=V(e),n=b.getUserAgentInfo().getOS().name==="iOS";if(t)return e[r==="userFacing"?0:e.length-1];let i=e.filter(o=>o.position===r);if(i.length===1)return i[0];if(a){if(n){let o=z(i,r);if(o!=null)return o}return i[r==="userFacing"?0:i.length-1]}if(n){let o=_(e,r);if(o)return o}return i.sort((o,s)=>o.label.localeCompare(s.label))[0]}function oe(e,r){return b.isDesktopDevice()?j(e,r):H(e,r)}l.getMainCameraForPosition=oe;function k(e,r){return e.unshift(e.splice(r,1)[0])}function se(e,r){function a(i,o){let s=l.mainCameraForPositionOverridesOnDesktop.get(o);return s!=null&&i.includes(s)&&(i=i.filter(g=>g!==s),i.unshift(s)),i}let t=e.filter(i=>i.position==="userFacing"),n=e.filter(i=>i.position==="worldFacing");return b.isDesktopDevice()?(t=a(t,"userFacing"),n=a(n,"worldFacing")):e.every(i=>i.label==="")?n.reverse():(t.sort((i,o)=>i.label.localeCompare(o.label)),n.sort((i,o)=>i.label.localeCompare(o.label)),b.getUserAgentInfo().getOS().name==="iOS"&&(t.some((i,o)=>h(i.label)&&k(t,o)>=0),n.some((i,o)=>R(i.label)&&k(n,o)>=0),n.some((i,o)=>I(i.label)&&k(n,o)>=0)||n.some((i,o)=>F(i.label)&&k(n,o)>=0))),r==="userFacing"?[...t,...n]:[...n,...t]}l.sortCamerasForCameraPosition=se;function A(e,r){let a=e.getVideoTracks();if(a.length>0){let t=a[0],n;typeof t.getSettings=="function"&&(n=t.getSettings(),n.facingMode!=null&&n.facingMode.length>0&&(r.position=n.facingMode==="environment"?"worldFacing":"userFacing"));let{label:i=""}=t;i.length>0&&(r.label=i);}}l.adjustCameraFromMediaStream=A;function G(e,r,a){if(l.deviceIdToCameraObjects.has(e.deviceId))return l.deviceIdToCameraObjects.get(e.deviceId);let{label:t="",deviceId:n}=e,i;return !b.isDesktopDevice()&&a.every(o=>o.label===""&&!l.deviceIdToCameraObjects.has(o.deviceId))?i=a.length===1||r+1<=Math.floor(a.length/2)?"userFacing":"worldFacing":i=K(t)?"worldFacing":"userFacing",{position:i,label:t,deviceId:n}}function Z(e){let r=e.map((a,t,n)=>G(a,t,n)).map(a=>(a.deviceId!==""&&l.deviceIdToCameraObjects.set(a.deviceId,a),a)).filter(a=>!/\b(?:ir|infrared)\b/i.test(a.label)||/^IR UVC WebCam$/i.test(a.label.toUpperCase())).filter(a=>!C.has(a.label)).filter(a=>!v.has(a.label)).filter(a=>!l.inaccessibleDeviceIds.has(a.deviceId));if(!b.isDesktopDevice()&&r.length>1&&!r.some(a=>a.position==="worldFacing")){let a=r.length-1,t=r.map(n=>{let i=/\b(\d+)mp?\b/i.exec(n.label);return i!=null?Number.parseInt(i[1],10):Number.NaN});t.some(n=>Number.isNaN(n))||(a=t.lastIndexOf(Math.max(...t))),r[a].position="worldFacing";}return r}async function Y(){if(m!=null&&m.length>0&&m.every(e=>e.label===""&&!l.deviceIdToCameraObjects.has(e.deviceId)))try{return await M()({video:true,audio:false})}catch{}}function X(e,r){var a,t;if(r.length>0&&e.length===r.length&&!r.every((n,i)=>e[i].deviceId===n.deviceId)){let n={};for(let[i,o]of e.entries()){let s=l.deviceIdToCameraObjects.get(o.deviceId);if(s==null||s.label!==((t=(a=r[i])==null?void 0:a.label)!=null?t:""))continue;let g=r[i].deviceId;n[s.deviceId]=g,l.inaccessibleDeviceIds.has(s.deviceId)&&l.inaccessibleDeviceIds.add(g),s.deviceId=g,l.deviceIdToCameraObjects.set(g,s);}a$1.log(a$1.Level.Debug,"Detected updated camera deviceId information and updated it accordingly",n);}}function $(){typeof navigator.mediaDevices.addEventListener=="function"?navigator.mediaDevices.addEventListener("devicechange",E):navigator.mediaDevices.ondevicechange=E;}async function y(){let e,r=W();if(r)e=await r();else throw new a({fullSupport:false,scannerSupport:true,missingFeatures:["mediaDevices"]});return e.filter(a=>a.kind==="videoinput")}async function le(e=false,r=false){var n;let a$2=b.checkBrowserCompatibility();if(!a$2.fullSupport)throw new a(a$2);if($(),m==null||e||D){D=false;let i,o=m!=null?m:[];m=[];try{m=await y(),r||(i=await Y(),i!=null&&(m=await y())),a$1.debug("Camera list (devices):",...m),m.length>0&&m.every(s=>s.deviceId==="")&&a$1.log(a$1.Level.Debug,"Incomplete camera information listed due to user permission denial, cameras will not be accessible"),X(o,m);}catch(s){throw L(s),s}finally{for(let s of (n=i==null?void 0:i.getVideoTracks())!=null?n:[])s.stop();}}let t=Z(m);a$1.log(a$1.Level.Debug,"Camera list (cameras): ",...t);for(let i of w)i([...t]);return [...t]}l.getCameras=le;async function q(e){return a$1.debug("Attempt to access camera (parameters):",e.video),new Promise((r,a)=>{setTimeout(async()=>{try{let t=await M()(e);if(t==null){a(new a$2({name:"AbortError",message:"Cannot get stream from getUserMedia function."}));return}r(t);}catch(t){a(t);}},0);})}function J(e,r){let a={resizeMode:"none"};switch(e){case 0:return {...a,width:{min:2880,ideal:r==="fourToThree"?2880:3840,max:4096},height:{min:1800,ideal:2160,max:2400}};case 1:return {...a,width:{min:1440,ideal:r==="fourToThree"?1440:1920,max:2160},height:{min:900,ideal:1080,max:1440}};case 2:return {...a,width:{min:960,ideal:r==="fourToThree"?960:1280,max:1440},height:{min:480,ideal:720,max:960}};case 3:return {...a,width:{min:640,ideal:640,max:800},height:{min:360,ideal:r==="fourToThree"?480:360,max:640}};default:return {}}}l.getUserMediaVideoParameters=J;function Q(e){e.deviceId!==""&&(a$1.log(a$1.Level.Debug,"Camera marked to be inaccessible:",e),l.inaccessibleDeviceIds.add(e.deviceId));}l.markCameraAsInaccessible=Q;async function me(e,r,a){a$1.log(a$1.Level.Debug,"Attempt to access camera (camera):",e);let t={audio:false,video:J(r,a)};e.deviceId===""?t.video.facingMode={ideal:e.position==="worldFacing"?"environment":"user"}:t.video.deviceId={exact:e.deviceId};try{let n=await q(t);return A(n,e),n}catch(n){throw L(n),["OverconstrainedError","NotReadableError","NotAllowedError"].includes(n.name)||Q(e),n}}l.accessCameraStream=me;})(U||(U={}));export{ee as a,ae as b,re as c,U as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-R6E4CT22.js';import {b}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-R6E4CT22.js';import {b}from'./chunk-AYYKQ7YB.js';import {a as a$1}from'./chunk-XR65N6EG.js';var d="orientationchange",n={"portrait-primary":{type:"portrait-primary",angle:0,value:"portrait"},"portrait-secondary":{type:"portrait-secondary",angle:180,value:"portraitUpsideDown"},"landscape-primary":{type:"landscape-primary",angle:90,value:"landscapeLeft"},"landscape-secondary":{type:"landscape-secondary",angle:270,value:"landscapeRight"}},l=class extends EventTarget{constructor(){super(...arguments);this.orientation={value:"portrait",type:"portrait-primary",angle:0};this._landscapeOrientationMediaQuery=null;this.screenOrientationChangeListener=this.onScreenOrientationChange.bind(this);this.landscapeOrientationMediaQueryChangeListener=this.onLandscapeOrientationMediaQueryChange.bind(this);this.windowResizeListener=a(this.handleWindowResize.bind(this),700);this.lastWidth=null;this.lastHeight=null;}get landscapeOrientationMediaQuery(){return this._landscapeOrientationMediaQuery===null&&(this._landscapeOrientationMediaQuery=globalThis.matchMedia("(orientation: landscape)")),this._landscapeOrientationMediaQuery}get isIosPwaMode(){return b.isIOS()&&(b.isPwaDisplayMode("standalone")||b.isPwaDisplayMode("fullscreen")||b.isPwaDisplayMode("minimal-ui"))}register(){var e,i;this.isScreenOrientationApiSupported()&&!this.isIosPwaMode?(screen.orientation.addEventListener("change",this.screenOrientationChangeListener),this.onScreenOrientationChange()):this.isIosPwaMode?((e=globalThis.addEventListener)==null||e.call(globalThis,"resize",this.windowResizeListener),this.handleWindowResize()):((i=this.landscapeOrientationMediaQuery)==null||i.addEventListener("change",this.landscapeOrientationMediaQueryChangeListener),this.onLandscapeOrientationMediaQueryChange(new MediaQueryListEvent("change",{matches:this.landscapeOrientationMediaQuery.matches})));}unregister(){globalThis.removeEventListener("resize",this.windowResizeListener),this.isScreenOrientationApiSupported()&&screen.orientation.removeEventListener("change",this.screenOrientationChangeListener),this.landscapeOrientationMediaQuery.removeEventListener("change",this.landscapeOrientationMediaQueryChangeListener);}isScreenOrientationApiSupported(){return "screen"in globalThis&&"orientation"in screen&&typeof screen.orientation.addEventListener=="function"}dispatchOrientationChangeEvent(e){this.dispatchEvent(new CustomEvent(d,{detail:e}));}onScreenOrientationChange(){this.orientation=n[screen.orientation.type],this.dispatchOrientationChangeEvent(this.orientation);}onLandscapeOrientationMediaQueryChange(e){let i=e;this.orientation=i.matches?n["landscape-primary"]:n["portrait-primary"],this.dispatchOrientationChangeEvent(this.orientation);}handleWindowResize(){let e=globalThis.innerWidth,i=globalThis.innerHeight,r=this.lastWidth===null||this.lastHeight===null;if(!r&&e===this.lastWidth&&i===this.lastHeight)return;let a=e>i?n["landscape-primary"]:n["portrait-primary"];(r||this.orientation.value!==a.value)&&(a$1.debug("OrientationObserver: dispatching orientation change event",{newOrientation:a,currentOrientation:this.orientation}),this.orientation=a,this.dispatchOrientationChangeEvent(this.orientation)),this.lastWidth=e,this.lastHeight=i;}};export{d as a,l as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-AYYKQ7YB.js';var p=[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=[53,65,41,124,75,47,108,120,50,48,115,62,66,60,107,57],c=[111,74,88,52,51,101,51,112,66,79,38,88,40,65,36,94],t=String.fromCodePoint,n=t.apply(String,p);t.apply(String,s);t.apply(String,c);function l(){return globalThis.location.hostname==="localhost"||globalThis.location.hostname==="127.0.0.1"||globalThis.location.hostname===""}function r(o){let e=o;if(e!=null&&typeof e.getAppInfo=="function"&&typeof e.getKey=="function")return e}function m(){let{name:o=""}=b.getUserAgentInfo().getBrowser();return o==="Electron"&&typeof r(window[n])=="object"&&l()}async function y(){var o;return (o=r(window[n]))==null?void 0:o.getAppInfo()}async function A(o){var e;return (e=r(window[n]))==null?void 0:e.getKey(o)}export{m as a,y as b,A as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-QRMHTQBG.js';import {a}from'./chunk-L2STPTEN.js';import {d}from'./chunk-5GUWY76Q.js';import {b}from'./chunk-AYYKQ7YB.js';import {f,g}from'./chunk-D222MT4V.js';var u=.5;function m(c){return Math.round(c*10)/10}var C=class{constructor(){this.type="zoom";this._zoomLevels=new Set;this._orientation="default";this._isAlwaysExpanded=false;this._selectedZoomLevel=1;this._accessibilityLabel="Zoom";this.isApplyingZoomLevel=false;this.handlerForZoomStrategy={setZoomForCurrentCamera:async e=>{await this.currentCamera.setZoomFactor(e);},switchToUltrawideCameraAndSetZoom:async e=>{await this.switchToUltraWideCamera(),await this.currentCamera.setZoomFactor(e/u);},setZoomForUltrawideCamera:async e=>{await this.currentCamera.setZoomFactor(e/u);},switchToWideCameraAndSetZoom:async e=>{await this.switchToWideCamera(),await this.currentCamera.setZoomFactor(e);},setZoomForWideCamera:async e=>{await this.currentCamera.setZoomFactor(e);}};this.onZoomLevelSelected=this.handleZoomLevelSelected.bind(this);}get currentCamera(){var i;let e=(i=this.view)==null?void 0:i.getContext(),t=e==null?void 0:e.frameSource;return f(t)?t:null}get orientation(){return this._orientation}set orientation(e){this._orientation=e,this.zoomSwitchPill&&(this.zoomSwitchPill.orientation=this.resolveOrientation());}get isAlwaysExpanded(){return this._isAlwaysExpanded}set isAlwaysExpanded(e){this._isAlwaysExpanded=e,this.zoomSwitchPill&&(this.zoomSwitchPill.isAlwaysExpanded=e);}get isExpanded(){var e,t;return (t=(e=this.zoomSwitchPill)==null?void 0:e.expanded)!=null?t:false}set isExpanded(e){!this._isAlwaysExpanded&&this.zoomSwitchPill&&(this.zoomSwitchPill.expanded=e);}get selectedZoomLevel(){return this._selectedZoomLevel}get accessibilityLabel(){return this._accessibilityLabel}set accessibilityLabel(e){var t;this._accessibilityLabel=e,(t=this.zoomSwitchPill)==null||t.setAttribute("aria-label",e);}async selectZoomLevel(e){var s,h,d;let t=await((s=this.currentCamera)==null?void 0:s.getZoomRange()),i=[...this._zoomLevels],o=(h=t==null?void 0:t.min)!=null?h:Math.min(...i),r=(d=t==null?void 0:t.max)!=null?d:Math.max(...i),a$1=m(t==null?e:a(e,o,r));return await this.applyZoomLevelToCamera(a$1),this.updateSelectedLevelInUI(a$1),a$1}toJSONObject(){return {type:this.type}}onZoomLevelChanged(e,t,i){this.zoomSwitchPill&&(this.zoomSwitchPill.expanded=false),this.updateSelectedLevelInUI(m(i));}onZoomLevelsChanged(e,t){this._zoomLevels=new Set(t),this.zoomSwitchPill&&(this.zoomSwitchPill.zoomLevels=[...this._zoomLevels]);}async install(e){var o,r;if(!this.ZoomSwitchPill){let{ZoomSwitchPill:a}=await import('../private/ui/molecules/ZoomSwitchPill.js');this.ZoomSwitchPill=a,(o=this.ZoomSwitchPill)==null||o.register();}this.view=e,this.zoomSwitchPill=this.ZoomSwitchPill.create(),this.zoomSwitchPill.slot="bottomRight",this.zoomSwitchPill.hidden=true,this.zoomSwitchPill.zoomLevels=[...this._zoomLevels],this.zoomSwitchPill.selectedLevel=this._selectedZoomLevel,this.zoomSwitchPill.orientation=this.resolveOrientation(),this.zoomSwitchPill.isAlwaysExpanded=this._isAlwaysExpanded,this.zoomSwitchPill.setAttribute("aria-label",this._accessibilityLabel),this.zoomSwitchPill.addEventListener("zoom-level-selected",this.onZoomLevelSelected);let t=await this.canShow();this.zoomSwitchPill.hidden=!t;let i=e.controlsElement;return i==null||i.append(this.zoomSwitchPill),(r=this.currentCamera)==null||r.addZoomListener(this),this.syncZoomLevelsFromCamera(),true}remove(){var e,t,i;(e=this.zoomSwitchPill)==null||e.removeEventListener("zoom-level-selected",this.onZoomLevelSelected),(t=this.currentCamera)==null||t.removeZoomListener(this),(i=this.zoomSwitchPill)==null||i.remove(),this.zoomSwitchPill=void 0,this.view=void 0;}async update(e){let t=this.currentCamera;this.view=e;let i=this.currentCamera;if(t!==i&&(t==null||t.removeZoomListener(this),i==null||i.addZoomListener(this),i!=null&&(this.syncZoomLevelsFromCamera(),this.updateSelectedLevelInUI(m(i.settings.zoomFactor)))),this.zoomSwitchPill&&(this.zoomSwitchPill.zoomLevels=[...this._zoomLevels],this.zoomSwitchPill.selectedLevel=this._selectedZoomLevel,!this.isApplyingZoomLevel)){let o=await this.canShow();this.zoomSwitchPill.hidden=!o;}}async canShow(){let e=this.currentCamera;return await(e==null?void 0:e.getZoomRange())!==null}async handleZoomLevelSelected({detail:{selectedLevel:e}}){this.zoomSwitchPill&&(this._selectedZoomLevel=e,this.zoomSwitchPill.temporaryLevel=null,this.zoomSwitchPill.selectedLevel=e,await this.applyZoomLevelToCamera(e));}updateSelectedLevelInUI(e){if(this.zoomSwitchPill){let t=m(e);this._selectedZoomLevel=t;let i=this._zoomLevels.has(t)?null:t;this.zoomSwitchPill.temporaryLevel=i,this.zoomSwitchPill.selectedLevel=t;}}zoomStrategyForLevel(e){if(!b.isIOSDeviceWithExtendedCameraAccess())return "setZoomForCurrentCamera";let t=d.isIOSUltraWideBackCameraLabel(this.currentCamera.label);return e<1?t?"setZoomForUltrawideCamera":"switchToUltrawideCameraAndSetZoom":t?"switchToWideCameraAndSetZoom":"setZoomForWideCamera"}isCameraSwitchingStrategy(e){return e==="switchToUltrawideCameraAndSetZoom"||e==="switchToWideCameraAndSetZoom"}async applyZoomLevelToCamera(e){if(!this.currentCamera||this.isApplyingZoomLevel)return;this.isApplyingZoomLevel=true;let t=this.zoomStrategyForLevel(e);this.isCameraSwitchingStrategy(t)&&this.zoomSwitchPill&&(this.zoomSwitchPill.loading=true);try{let i=this.handlerForZoomStrategy[t];await i(e);}finally{this.isApplyingZoomLevel=false,this.zoomSwitchPill&&(this.zoomSwitchPill.loading=false);}}async switchToUltraWideCamera(){let t=(await a$1.getAll()).find(i=>d.isIOSUltraWideBackCameraLabel(i.label));t&&await this.switchCameras(t);}async switchToWideCamera(){let t=(await a$1.getAll()).find(i=>d.isIOSBackCameraLabel(i.label));t&&await this.switchCameras(t);}async switchCameras(e){var a,s;let t,i;this.currentCamera!=null&&(t=new g(this.currentCamera.settings),i=this.currentCamera.desiredState),await((a=this.currentCamera)==null?void 0:a.switchToDesiredState("off")),t!=null&&await e.applySettings(t);let o=(s=this.view)==null?void 0:s.getContext();await(o==null?void 0:o.setFrameSource(e));let r=i!=null?i:"on";await e.switchToDesiredState(r);}resolveOrientation(){var t;if(this._orientation!=="default")return this._orientation;let e=(t=this.zoomSwitchPill)==null?void 0:t.slot;return e==="topCenter"||e==="bottomCenter"?"horizontal":"vertical"}syncZoomLevelsFromCamera(){var t,i;let e=(i=(t=this.currentCamera)==null?void 0:t.settings)==null?void 0:i.zoomLevels;e!=null&&e.length>0&&(this._zoomLevels=new Set(e),this.zoomSwitchPill&&(this.zoomSwitchPill.zoomLevels=[...this._zoomLevels]));}};export{C as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-AYYKQ7YB.js';import {a}from'./chunk-XR65N6EG.js';async function c(l){if(!b.isAnimationApiSupported()||l)try{l?a.debug("Force loading animation polyfill as requested."):a.debug("Web Animation API not fully supported, you might need to add https://www.npmjs.com/package/web-animations-js polyfill to see some animations.");let{polyfill:o}=await import('../private/utils/AnimationSimplePolyfill.js');o();}catch(o){a.warn("Error importing AnimationSimplePolyfill.js, the Animation API will not be polyfilled. This is not a problem for most browsers, but it might be a problem for older browsers like Chrome 75<",o);}}async function d(l){if(typeof globalThis.structuredClone!="function"||l)try{l?a.debug("Force loading structuredClone polyfill as requested."):a.debug("structuredClone API not supported, loading polyfill for older browsers.");let{structuredClonePolyfill:o}=await import('../private/utils/structuredClonePolyfill.js');o();}catch(o){a.warn("Error importing structuredClonePolyfill.js, the structuredClone API will not be polyfilled. This might cause issues in older browsers.",o);}}async function u(l){if(!(typeof globalThis<"u"&&"cookieStore"in globalThis&&globalThis.cookieStore!=null&&!l))try{l?a.debug("Force loading CookieStore polyfill as requested."):a.debug("CookieStore API not supported, loading polyfill for older browsers.");let{installCookieStorePolyfill:o}=await import('../private/utils/cookieStorePolyfill.js');o();}catch(o){a.warn("Error importing cookieStorePolyfill.js, the CookieStore API will not be polyfilled. This might cause issues with cookie management in older browsers.",o);}}async function y(l={}){let{forceAnimationPolyfill:o=false,forceStructuredClonePolyfill:t=false,forceCookieStorePolyfill:n=false,forceAllPolyfills:i=false}=l,s=i||o,a=i||t,f=i||n;await Promise.all([c(s),d(a),u(f)]);}
|
|
2
2
|
export{y as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$2}from'./chunk-KXAJHLEO.js';import {a as a$3}from'./chunk-AAEQZ45T.js';import {c,d,b as b$1,a as a$1,e}from'./chunk-SBC5K7IT.js';import {a,b}from'./chunk-TR3NGINC.js';var Ae=a((J,we)=>{(function(O,u){var Q="1.0.40",P="",M="?",q="function",E="undefined",ee="object",j="string",ie="major",i="model",t="name",e="type",o="vendor",n="version",A="architecture",W="console",b="mobile",w="tablet",x="smarttv",C="wearable",oe="embedded",te=500,H="Amazon",N="Apple",ne="ASUS",re="BlackBerry",K="Browser",Y="Chrome",de="Edge",X="Firefox",z="Google",$="Huawei",ae="LG",se="Microsoft",Z="Motorola",r="Opera",s="Samsung",a="Sharp",d="Sony",g="Xiaomi",h="Zebra",k="Facebook",y="Chromium OS",V="Mac OS",le=" Browser",F=function(p,f){var c={};for(var v in p)f[v]&&f[v].length%2===0?c[v]=f[v].concat(p[v]):c[v]=p[v];return c},R=function(p){for(var f={},c=0;c<p.length;c++)f[p[c].toUpperCase()]=p[c];return f},be=function(p,f){return typeof p===j?B(f).indexOf(B(p))!==-1:false},B=function(p){return p.toLowerCase()},ce=function(p){return typeof p===j?p.replace(/[^\d\.]/g,P).split(".")[0]:u},I=function(p,f){if(typeof p===j)return p=p.replace(/^\s\s*/,P),typeof f===E?p:p.substring(0,te)},L=function(p,f){for(var c=0,v,U,T,m,l,_;c<f.length&&!l;){var pe=f[c],ge=f[c+1];for(v=U=0;v<pe.length&&!l&&pe[v];)if(l=pe[v++].exec(p),l)for(T=0;T<ge.length;T++)_=l[++U],m=ge[T],typeof m===ee&&m.length>0?m.length===2?typeof m[1]==q?this[m[0]]=m[1].call(this,_):this[m[0]]=m[1]:m.length===3?typeof m[1]===q&&!(m[1].exec&&m[1].test)?this[m[0]]=_?m[1].call(this,_,m[2]):u:this[m[0]]=_?_.replace(m[1],m[2]):u:m.length===4&&(this[m[0]]=_?m[3].call(this,_.replace(m[1],m[2])):u):this[m]=_||u;c+=2;}},D=function(p,f){for(var c in f)if(typeof f[c]===ee&&f[c].length>0){for(var v=0;v<f[c].length;v++)if(be(f[c][v],p))return c===M?u:c}else if(be(f[c],p))return c===M?u:c;return f.hasOwnProperty("*")?f["*"]:p},Te={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},fe={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},me={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[n,[t,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[n,[t,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[t,n],[/opios[\/ ]+([\w\.]+)/i],[n,[t,r+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[n,[t,r+" GX"]],[/\bopr\/([\w\.]+)/i],[n,[t,r]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[n,[t,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[n,[t,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[t,n],[/quark(?:pc)?\/([-\w\.]+)/i],[n,[t,"Quark"]],[/\bddg\/([\w\.]+)/i],[n,[t,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[n,[t,"UC"+K]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[n,[t,"WeChat"]],[/konqueror\/([\w\.]+)/i],[n,[t,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[n,[t,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[n,[t,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[n,[t,"Smart Lenovo "+K]],[/(avast|avg)\/([\w\.]+)/i],[[t,/(.+)/,"$1 Secure "+K],n],[/\bfocus\/([\w\.]+)/i],[n,[t,X+" Focus"]],[/\bopt\/([\w\.]+)/i],[n,[t,r+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[n,[t,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[n,[t,"Dolphin"]],[/coast\/([\w\.]+)/i],[n,[t,r+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[n,[t,"MIUI"+le]],[/fxios\/([\w\.-]+)/i],[n,[t,X]],[/\bqihoobrowser\/?([\w\.]*)/i],[n,[t,"360"]],[/\b(qq)\/([\w\.]+)/i],[[t,/(.+)/,"$1Browser"],n],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[t,/(.+)/,"$1"+le],n],[/samsungbrowser\/([\w\.]+)/i],[n,[t,s+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[n,[t,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[t,"Sogou Mobile"],n],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[t,n],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[t],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[n,t],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[t,k],n],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[t,n],[/\bgsa\/([\w\.]+) .*safari\//i],[n,[t,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[n,[t,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[n,[t,Y+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[t,Y+" WebView"],n],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[n,[t,"Android "+K]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[t,n],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[n,[t,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[n,t],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[t,[n,D,Te]],[/(webkit|khtml)\/([\w\.]+)/i],[t,n],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[t,"Netscape"],n],[/(wolvic|librewolf)\/([\w\.]+)/i],[t,n],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[n,[t,X+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[t,[n,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[t,[n,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[A,"amd64"]],[/(ia32(?=;))/i],[[A,B]],[/((?:i[346]|x)86)[;\)]/i],[[A,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[A,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[A,"armhf"]],[/windows (ce|mobile); ppc;/i],[[A,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[A,/ower/,P,B]],[/(sun4\w)[;\)]/i],[[A,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[A,B]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[i,[o,s],[e,w]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[i,[o,s],[e,b]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[i,[o,N],[e,b]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[i,[o,N],[e,w]],[/(macintosh);/i],[i,[o,N]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[i,[o,a],[e,b]],[/(?:honor)([-\w ]+)[;\)]/i],[i,[o,"Honor"],[e,b]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[i,[o,$],[e,w]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[i,[o,$],[e,b]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[i,/_/g," "],[o,g],[e,b]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[i,/_/g," "],[o,g],[e,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[i,[o,"OPPO"],[e,b]],[/\b(opd2\d{3}a?) bui/i],[i,[o,"OPPO"],[e,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[i,[o,"Vivo"],[e,b]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[i,[o,"Realme"],[e,b]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[i,[o,Z],[e,b]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[i,[o,Z],[e,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[i,[o,ae],[e,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[i,[o,ae],[e,b]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[i,[o,"Lenovo"],[e,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[i,/_/g," "],[o,"Nokia"],[e,b]],[/(pixel c)\b/i],[i,[o,z],[e,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[i,[o,z],[e,b]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[i,[o,d],[e,b]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[i,"Xperia Tablet"],[o,d],[e,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[i,[o,"OnePlus"],[e,b]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[i,[o,H],[e,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[i,/(.+)/g,"Fire Phone $1"],[o,H],[e,b]],[/(playbook);[-\w\),; ]+(rim)/i],[i,o,[e,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[i,[o,re],[e,b]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[i,[o,ne],[e,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[i,[o,ne],[e,b]],[/(nexus 9)/i],[i,[o,"HTC"],[e,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[o,[i,/_/g," "],[e,b]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[i,[o,"TCL"],[e,w]],[/(itel) ((\w+))/i],[[o,B],i,[e,D,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[i,[o,"Acer"],[e,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[i,[o,"Meizu"],[e,b]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[i,[o,"Ulefone"],[e,b]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[i,[o,"Energizer"],[e,b]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[i,[o,"Cat"],[e,b]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[i,[o,"Smartfren"],[e,b]],[/droid.+; (a(?:015|06[35]|142p?))/i],[i,[o,"Nothing"],[e,b]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[o,i,[e,b]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[o,i,[e,w]],[/(surface duo)/i],[i,[o,se],[e,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[i,[o,"Fairphone"],[e,b]],[/(u304aa)/i],[i,[o,"AT&T"],[e,b]],[/\bsie-(\w*)/i],[i,[o,"Siemens"],[e,b]],[/\b(rct\w+) b/i],[i,[o,"RCA"],[e,w]],[/\b(venue[\d ]{2,7}) b/i],[i,[o,"Dell"],[e,w]],[/\b(q(?:mv|ta)\w+) b/i],[i,[o,"Verizon"],[e,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[i,[o,"Barnes & Noble"],[e,w]],[/\b(tm\d{3}\w+) b/i],[i,[o,"NuVision"],[e,w]],[/\b(k88) b/i],[i,[o,"ZTE"],[e,w]],[/\b(nx\d{3}j) b/i],[i,[o,"ZTE"],[e,b]],[/\b(gen\d{3}) b.+49h/i],[i,[o,"Swiss"],[e,b]],[/\b(zur\d{3}) b/i],[i,[o,"Swiss"],[e,w]],[/\b((zeki)?tb.*\b) b/i],[i,[o,"Zeki"],[e,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[o,"Dragon Touch"],i,[e,w]],[/\b(ns-?\w{0,9}) b/i],[i,[o,"Insignia"],[e,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[i,[o,"NextBook"],[e,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[o,"Voice"],i,[e,b]],[/\b(lvtel\-)?(v1[12]) b/i],[[o,"LvTel"],i,[e,b]],[/\b(ph-1) /i],[i,[o,"Essential"],[e,b]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[i,[o,"Envizen"],[e,w]],[/\b(trio[-\w\. ]+) b/i],[i,[o,"MachSpeed"],[e,w]],[/\btu_(1491) b/i],[i,[o,"Rotor"],[e,w]],[/(shield[\w ]+) b/i],[i,[o,"Nvidia"],[e,w]],[/(sprint) (\w+)/i],[o,i,[e,b]],[/(kin\.[onetw]{3})/i],[[i,/\./g," "],[o,se],[e,b]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[i,[o,h],[e,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[i,[o,h],[e,b]],[/smart-tv.+(samsung)/i],[o,[e,x]],[/hbbtv.+maple;(\d+)/i],[[i,/^/,"SmartTV"],[o,s],[e,x]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[o,ae],[e,x]],[/(apple) ?tv/i],[o,[i,N+" TV"],[e,x]],[/crkey/i],[[i,Y+"cast"],[o,z],[e,x]],[/droid.+aft(\w+)( bui|\))/i],[i,[o,H],[e,x]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[i,[o,a],[e,x]],[/(bravia[\w ]+)( bui|\))/i],[i,[o,d],[e,x]],[/(mitv-\w{5}) bui/i],[i,[o,g],[e,x]],[/Hbbtv.*(technisat) (.*);/i],[o,i,[e,x]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[o,I],[i,I],[e,x]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[e,x]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[o,i,[e,W]],[/droid.+; (shield) bui/i],[i,[o,"Nvidia"],[e,W]],[/(playstation [345portablevi]+)/i],[i,[o,d],[e,W]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[i,[o,se],[e,W]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[i,[o,s],[e,C]],[/((pebble))app/i],[o,i,[e,C]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[i,[o,N],[e,C]],[/droid.+; (glass) \d/i],[i,[o,z],[e,C]],[/droid.+; (wt63?0{2,3})\)/i],[i,[o,h],[e,C]],[/droid.+; (glass) \d/i],[i,[o,z],[e,C]],[/(pico) (4|neo3(?: link|pro)?)/i],[o,i,[e,C]],[/; (quest( \d| pro)?)/i],[i,[o,k],[e,C]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[o,[e,oe]],[/(aeobc)\b/i],[i,[o,H],[e,oe]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[i,[e,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[i,[e,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[e,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[e,b]],[/(android[-\w\. ]{0,9});.+buil/i],[i,[o,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[n,[t,de+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[t,n],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[n,[t,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[t,n],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[n,t]],os:[[/microsoft (windows) (vista|xp)/i],[t,n],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[t,[n,D,fe]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[n,D,fe],[t,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[n,/_/g,"."],[t,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[t,V],[n,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[n,t],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[t,n],[/\(bb(10);/i],[n,[t,re]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[n,[t,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[n,[t,X+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[n,[t,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[n,[t,"watchOS"]],[/crkey\/([\d\.]+)/i],[n,[t,Y+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[t,y],n],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[t,n],[/(sunos) ?([\w\.\d]*)/i],[[t,"Solaris"],n],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[t,n]]},S=function(p,f){if(typeof p===ee&&(f=p,p=u),!(this instanceof S))return new S(p,f).getResult();var c=typeof O!==E&&O.navigator?O.navigator:u,v=p||(c&&c.userAgent?c.userAgent:P),U=c&&c.userAgentData?c.userAgentData:u,T=f?F(me,f):me,m=c&&c.userAgent==v;return this.getBrowser=function(){var l={};return l[t]=u,l[n]=u,L.call(l,v,T.browser),l[ie]=ce(l[n]),m&&c&&c.brave&&typeof c.brave.isBrave==q&&(l[t]="Brave"),l},this.getCPU=function(){var l={};return l[A]=u,L.call(l,v,T.cpu),l},this.getDevice=function(){var l={};return l[o]=u,l[i]=u,l[e]=u,L.call(l,v,T.device),m&&!l[e]&&U&&U.mobile&&(l[e]=b),m&&l[i]=="Macintosh"&&c&&typeof c.standalone!==E&&c.maxTouchPoints&&c.maxTouchPoints>2&&(l[i]="iPad",l[e]=w),l},this.getEngine=function(){var l={};return l[t]=u,l[n]=u,L.call(l,v,T.engine),l},this.getOS=function(){var l={};return l[t]=u,l[n]=u,L.call(l,v,T.os),m&&!l[t]&&U&&U.platform&&U.platform!="Unknown"&&(l[t]=U.platform.replace(/chrome os/i,y).replace(/macos/i,V)),l},this.getResult=function(){return {ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return v},this.setUA=function(l){return v=typeof l===j&&l.length>te?I(l,te):l,this},this.setUA(v),this};S.VERSION=Q,S.BROWSER=R([t,n,ie]),S.CPU=R([A]),S.DEVICE=R([i,o,e,W,b,x,w,C,oe]),S.ENGINE=S.OS=R([t,n]),typeof J!==E?(typeof we!==E&&we.exports&&(J=we.exports=S),J.UAParser=S):typeof define===q&&define.amd?define(function(){return S}):typeof O!==E&&(O.UAParser=S);var G=typeof O!==E&&(O.jQuery||O.Zepto);if(G&&!G.ua){var ue=new S;G.ua=ue.getResult(),G.ua.get=function(){return ue.getUA()},G.ua.set=function(p){ue.setUA(p);var f=ue.getResult();for(var c in f)G.ua[c]=f[c];};}})(typeof window=="object"?window:J);});var Ce=b(Ae(),1);var Re=(M=>(M.Standalone="standalone",M.Fullscreen="fullscreen",M.MinimalUI="minimal-ui",M.Browser="browser",M))(Re||{}),Ee;(Z=>{let O;function u(){return O==null&&(O=new Ce.default(navigator.userAgent)),O}Z.getUserAgentInfo=u;function Q(){var a;if("orientation"in window)return false;let r="(any-pointer: coarse)",s=(a=window.matchMedia)==null?void 0:a.call(window,r);return navigator.maxTouchPoints===0||(s==null?void 0:s.media)===r&&!(s!=null&&s.matches)}Z.isDesktopDevice=Q;function P(){return u().getDevice().model==="iPhone"}Z.isIPhone=P;function M(){var h,k,y,V;let r=u(),s=(k=(h=r.getOS().name)==null?void 0:h.toLowerCase())!=null?k:"",a=r.getDevice(),d=(V=(y=a.model)==null?void 0:y.toLowerCase())!=null?V:"",g=a.type;return s.includes("ios")&&(g==="tablet"||d.includes("ipad"))}Z.isIPad=M;function q(){var g,h,k,y;let r=(h=(g=u().getOS().name)==null?void 0:g.toLowerCase())!=null?h:"",s=u().getDevice(),a=s.type,d=(y=(k=s.model)==null?void 0:k.toLowerCase())!=null?y:"";return r.includes("mac")&&(a==="laptop"||d.includes("macintosh"))}Z.isMacBook=q;function E(){return P()||M()||q()}Z.isAppleDevice=E;function ee(){let r=u().getOS();return r.name==="iOS"&&r.version!=null&&r.version.localeCompare("16.3",void 0,{numeric:true})>=0}Z.isIOSDeviceWithExtendedCameraAccess=ee;function j(){return "document"in window?window.document.createElement("canvas"):null}Z.getCanvas=j;function ie(r){return r.name==="iOS"&&r.version!=null&&["11.2.2","11.2.5","11.2.6"].includes(r.version)}async function i(){return c()}Z.hasSIMDSupport=i;async function t(){return d()}Z.hasThreadsSupport=t;function e$1(r,s,a){let d=r[s[0]];return d==null?false:s.length===1?typeof d===a:(typeof d=="function"||typeof d=="object")&&e$1(d,s.slice(1),a)}function o(){var h;let r=true,s=null,a=null,d=null,g=null;try{if(s=Z.getCanvas(),a=Z.getCanvas(),d=s==null?void 0:s.getContext("webgl"),g=a==null?void 0:a.getContext("experimental-webgl"),!e$1(window,["WebGLRenderingContext"],"function")||d==null&&g==null)throw new Error("WebGLRenderingContext is not supported")}catch{r=false;}finally{for(let k of [d,g])typeof(k==null?void 0:k.getExtension)=="function"&&((h=k.getExtension("WEBGL_lose_context"))==null||h.loseContext());d=null,g=null,s=null,a=null;}return r}function n(){let r=true,s=true,a=new Set;location.protocol.startsWith("http")||a.add("httpProtocol"),e$1(window,["isSecureContext"],"boolean")&&!window.isSecureContext&&a.add("secureContext"),!e$1(navigator,["mediaDevices","getUserMedia"],"function")&&!e$1(navigator,["enumerateDevices"],"function")&&!e$1(window,["MediaStreamTrack","getSources"],"function")&&(a.add("mediaDevices"),r=false),e$1(window,["Worker"],"function")||(a.add("webWorkers"),r=false,s=false),e$1(window,["WebAssembly"],"object")||(a.add("webAssembly"),r=false,s=false),e$1(window,["Blob"],"function")||(a.add("blob"),r=false,s=false),e$1(window,["URL","createObjectURL"],"function")||(a.add("urlObject"),r=false,s=false),e$1(window,["OffscreenCanvas"],"function")||a.add("offscreenCanvas"),o()||a.add("webGL");let d=u().getOS();return ie(d)&&(a.add("webAssemblyErrorFree"),r=false,s=false),b$1()||a.add("sharedArrayBuffer"),a$1()||a.add("crossOriginIsolated"),de()||a.add("animationApi"),{fullSupport:r,scannerSupport:s,missingFeatures:[...a]}}Z.checkBrowserCompatibility=n;async function A(){return e()}Z.checkMultithreadingSupport=A;async function W(){let r="scandit-device-id",s=a$2.getInstanceFor("localStorage"),a=s.getItem(r);if(a!=null&&a!=="")return a;let g=await a$3().get(r);if(a=g==null?void 0:g.value,a!=null&&a!=="")return s.setItem(r,a),a;let h=new Uint8Array(20);return crypto.getRandomValues(h),a=[...h].map(k=>{let y=k.toString(16);return y.length===1?`0${y}`:y}).join(""),s.setItem(r,a),a}Z.getDeviceId=W;function b(r){return r instanceof HTMLElement||r!=null&&typeof r=="object"&&typeof r.tagName=="string"}Z.isValidHTMLElement=b;function w(){var d,g;let r=u().getOS();if(r.name!=="iOS")return true;let[s,a]=(g=(d=r.version)==null?void 0:d.split(".").map(Number))!=null?g:[];return s>14||s===14&&a>=6}Z.isSupportedIOSVersion=w;function x(){var r,s;return (s=(r=u().getBrowser().name)==null?void 0:r.toLowerCase().includes("safari"))!=null?s:false}Z.isSafari=x;function C(){var s,a;return /iphone|ipod|ipad/.test((a=(s=u().getDevice().model)==null?void 0:s.toLowerCase())!=null?a:"")&&!x()}Z.isIosWebView=C;function oe(){var r;return ((r=u().getOS().name)==null?void 0:r.toLowerCase())==="android"}Z.isAndroid=oe;function te(){return Q()||P()?false:u().getDevice().type==="tablet"}Z.isTablet=te;async function H(){var s;return ((s=u().getOS().name)==null?void 0:s.toLowerCase())!=="android"?false:u().getUA().includes("wv")?true:[...(await fetch(document.location.toString(),{method:"HEAD"})).headers].some(([a])=>a.toLowerCase()==="x-requested-with")}Z.isAndroidWebView=H;function N(){return u().getOS().name==="Windows"}Z.isWindows=N;function ne(){return u().getBrowser().name==="Firefox"}Z.isFirefox=ne;function re(){if("navigator"in globalThis){for(let r of ["vibrate","webkitVibrate","msVibrate","mozVibrate"])if(typeof navigator[r]=="function")return navigator[r]}}Z.getSupportedVibrationMethod=re;function K(){return re()!=null&&!Q()&&!N()&&!ne()}Z.isVibrationAvailable=K;function Y(){return u().getOS().name==="iOS"}Z.isIOS=Y;function de(){return typeof globalThis.Animation<"u"&&typeof globalThis.KeyframeEffect<"u"&&typeof globalThis.Element.prototype.animate<"u"}Z.isAnimationApiSupported=de;function X(){return "virtualKeyboard"in navigator}Z.hasVirtualKeyboardSupport=X;function z(r){var d;let s=`(display-mode: ${r})`,a=(d=globalThis.matchMedia)==null?void 0:d.call(globalThis,s);return (a==null?void 0:a.matches)===true?true:r==="standalone"&&typeof navigator=="object"&&"standalone"in navigator&&typeof navigator.standalone=="boolean"?navigator.standalone===true:false}Z.isPwaDisplayMode=z;function $(r,s,a){let d=F=>F.split(".").map(R=>Number.parseInt(R,10)||0),g=d(r),h=d(s),k=d(a),y=(F,R)=>{var B,ce;let be=Math.max(F.length,R.length);for(let I=0;I<be;I++){let L=(B=F[I])!=null?B:0,D=(ce=R[I])!=null?ce:0;if(L>D)return 1;if(L<D)return -1}return 0},V=y(g,h)>=0,le=y(g,k)<0;return V&&le}function ae(){if(E()){let a=u(),d=a.getOS(),g=a.getBrowser(),h=x()?g.version:d.version;return h?$(h,"26","27"):false}return false}Z.isFixedMemoryRequired=ae;function se(){if(E()){let a=u(),d=a.getOS(),g=a.getBrowser(),h=x()?g.version:d.version;return h?$(h,"26","27"):false}return false}Z.isSIMDBroken=se;})(Ee||(Ee={}));
|
|
2
|
+
export{Re as a,Ee as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-NYYGU4ZV.js';import {a}from'./chunk-SJIN27Q5.js';import {b}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-NYYGU4ZV.js';import {a}from'./chunk-SJIN27Q5.js';import {b}from'./chunk-AYYKQ7YB.js';function R(){return document.visibilityState==="visible"}function p(l=44100){var i,a$1;let e=new AudioContext;if(b.isIOS()&&e.sampleRate!==l){(i=a)==null||i(`\u26A0\uFE0F iOS sample rate mismatch: got ${e.sampleRate}Hz, expected ${l}Hz \u2014 applying fix`);let n=e.createBuffer(1,1,l),o=e.createBufferSource();o.buffer=n,o.connect(e.destination),o.start(0),o.disconnect(),e.close();let s=new AudioContext;return (a$1=a)==null||a$1(`\u2705 iOS sample rate corrected: ${s.sampleRate}Hz`),s}return e}var f=null;function M(){return f||(f=new a$1),f}var P=class{constructor(){this.audioContext=null;this.isUnlocked=false;this.unlockPromise=null;this.unlockAttempts=0;this.MAX_UNLOCK_ATTEMPTS=3;this.lastKnownSampleRate=-1;this.mediaStreamDestination=null;this.streamAudioElement=null;this.handlerStreamAudioElementError=this.onStreamAudioElementError.bind(this);this.handlerStreamAudioElementPause=this.onStreamAudioElementPause.bind(this);}getContext(){var e,i;return this.audioContext||((e=a)==null||e("\u{1F3B5} Creating new AudioContext (outside unlock - may not work on iOS)..."),this.audioContext=p(),this.lastKnownSampleRate=this.audioContext.sampleRate,(i=a)==null||i(`\u{1F3B5} AudioContext created. Initial state: ${this.audioContext.state}, sampleRate: ${this.audioContext.sampleRate}Hz (native hardware rate)`)),this.audioContext}getDestination(){var i,a$1,n;let e=this.getContext();return b.isIOS()?((i=a)==null||i("\u{1F3B5} iOS detected - using MediaStreamDestination workaround"),this.mediaStreamDestination||((a$1=a)==null||a$1("\u{1F3B5} Creating MediaStreamDestination for iOS workaround..."),this.mediaStreamDestination=e.createMediaStreamDestination(),this.streamAudioElement=new Audio,this.streamAudioElement.srcObject=this.mediaStreamDestination.stream,this.streamAudioElement.addEventListener("error",this.handlerStreamAudioElementError),this.streamAudioElement.addEventListener("pause",this.handlerStreamAudioElementPause),this.streamAudioElement.play().catch(o=>{var s;(s=a)==null||s(`Failed to start stream audio element: ${o}`);}),(n=a)==null||n("\u{1F3B5} MediaStreamDestination connected to HTML5 Audio element (stream playing continuously)")),this.mediaStreamDestination):e.destination}onStreamAudioElementError(){var e,i,a$1;if(!R()){(e=a)==null||e("\u26A0\uFE0F Document is not visible - skipping attempt to restart stream audio element");return}(i=a)==null||i("\u26A0\uFE0F Stream audio element error - attempting to restart..."),(a$1=this.streamAudioElement)==null||a$1.play().catch(n=>{var o;(o=a)==null||o(`Failed to restart stream audio element: ${n}`);});}onStreamAudioElementPause(){var e,i,a$1;if(!R()){(e=a)==null||e("\u26A0\uFE0F Document is not visible - skipping attempt to restart stream audio element");return}(i=a)==null||i("\u26A0\uFE0F Stream audio element paused unexpectedly - restarting..."),(a$1=this.streamAudioElement)==null||a$1.play().catch(n=>{var o;(o=a)==null||o(`Failed to restart stream audio element after pause: ${n}`);});}checkAndRecreateContextIfSampleRateChanged(){var i,a$1;if(!this.audioContext)return;let e=this.audioContext.sampleRate;this.lastKnownSampleRate!==-1&&e!==this.lastKnownSampleRate&&((i=a)==null||i(`\u26A0\uFE0F Hardware sample rate changed: was ${this.lastKnownSampleRate}Hz, now ${e}Hz`),(a$1=a)==null||a$1("\u{1F504} Sample rate change detected. Recreating AudioContext to match new hardware rate..."),this.recreateContext());}recreateContext(){var e,i,a$1;try{this.audioContext&&this.audioContext.state!=="closed"&&typeof this.audioContext.close=="function"&&this.audioContext.close(),this.audioContext=null,this.mediaStreamDestination=null,this.streamAudioElement&&(this.streamAudioElement.pause(),this.streamAudioElement.srcObject=null),M().clear(),(e=a)==null||e("\u{1F3A7} Audio buffer cache cleared after context recreation"),this.audioContext=p(),this.lastKnownSampleRate=this.audioContext.sampleRate,this.isUnlocked=false,(i=a)==null||i(`\u2705 AudioContext recreated: using native hardware rate of ${this.audioContext.sampleRate}Hz (state: ${this.audioContext.state})`);}catch(n){(a$1=a)==null||a$1(`\u274C Failed to recreate AudioContext: ${n instanceof Error?n.message:String(n)}`);}}createContext(){var e,i;this.audioContext||((e=a)==null||e("\u{1F3B5} Creating AudioContext during user gesture..."),this.audioContext=p(),this.lastKnownSampleRate=this.audioContext.sampleRate,(i=a)==null||i(`\u{1F3B5} AudioContext created with state: ${this.audioContext.state}, sampleRate: ${this.audioContext.sampleRate}Hz`));}async unlock(){var e,i,a$1,n;if(this.isUnlocked){(e=a)==null||e("\u{1F513} Audio already unlocked");return}if(this.unlockPromise){(i=a)==null||i("\u23F3 Unlock already in progress, waiting..."),await this.unlockPromise;return}if(this.unlockAttempts>=this.MAX_UNLOCK_ATTEMPTS){(a$1=a)==null||a$1(`\u274C Max unlock attempts (${this.MAX_UNLOCK_ATTEMPTS}) exceeded. Audio will not work this session.`);return}this.unlockAttempts++,(n=a)==null||n(`\u{1F513} Unlock attempt ${this.unlockAttempts}/${this.MAX_UNLOCK_ATTEMPTS}`),this.unlockPromise=(async()=>{var s,A,C,x,S,g,k,E,v,w,b$1;(s=a)==null||s("\u{1F513} Unlocking audio context during user gesture..."),this.createContext();let o=this.audioContext;(A=a)==null||A(`\u{1F513} AudioContext state during unlock: ${o.state}`),o.state==="suspended"&&((C=a)==null||C("\u{1F513} Calling context.resume() synchronously during user gesture..."),o.resume());try{if(o.state==="suspended"){(x=a)==null||x("\u{1F513} Waiting for context.resume() to complete...");for(let u=0;u<10;u++)if(await new Promise(d=>setTimeout(d,10)),o.state==="running"){(S=a)==null||S(`\u{1F513} AudioContext resumed successfully after ${(u+1)*10}ms`);break}}(g=a)==null||g(`\u{1F513} AudioContext state before test tone: ${o.state}`),(k=a)==null||k("\u{1F513} Creating and playing silent scratch buffer for unlock...");let m=o.createBuffer(2,1,o.sampleRate);(E=a)==null||E("\u{1F513} Created silent scratch buffer to unlock iOS");let r=o.createBufferSource();r.buffer=m,r.loop=false;let h=o.createGain();h.gain.value=1,r.connect(h);let D=this.getDestination();h.connect(D),(v=a)==null||v(`\u{1F513} Audio graph connected to ${b.isIOS()?"MediaStreamDestination":"standard destination"} during user gesture`),await new Promise(u=>{var d;r.onended=()=>{var y;(y=a)==null||y("\u{1F513} Silent scratch buffer playback completed"),u();},(d=a)==null||d("\u{1F513} Starting silent scratch buffer playback..."),r.start(0);}),this.isUnlocked=true,(w=a)==null||w("\u2705 Audio successfully unlocked");}catch(m){(b$1=a)==null||b$1(`\u274C Failed to unlock audio (attempt ${this.unlockAttempts}/${this.MAX_UNLOCK_ATTEMPTS}): ${m}`);}finally{this.unlockPromise=null;}})(),await this.unlockPromise;}get unlocked(){return this.isUnlocked}dispose(){this.streamAudioElement&&(this.streamAudioElement.removeEventListener("error",this.handlerStreamAudioElementError),this.streamAudioElement.removeEventListener("pause",this.handlerStreamAudioElementPause),this.streamAudioElement.pause(),this.streamAudioElement.srcObject=null,this.streamAudioElement=null),this.audioContext&&this.audioContext.state!=="closed"&&typeof this.audioContext.close=="function"&&this.audioContext.close(),this.audioContext=null,this.isUnlocked=false,this.unlockPromise=null,this.unlockAttempts=0,this.mediaStreamDestination=null;}};export{p as a,M as b,P as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-QRMHTQBG.js';import {d}from'./chunk-5GUWY76Q.js';import {b}from'./chunk-AYYKQ7YB.js';import {f,g}from'./chunk-D222MT4V.js';var c=class{constructor(){this.type="camera-fov";this.customIcons={wide:{idle:"",pressed:""},ultraWide:{idle:"",pressed:""}};this.fovSwitchButton=void 0;this.CameraFOVSwitchButtonClass=void 0;this.currentFrameSource=null;this.view=void 0;this.onCameraFOVChanged=this.handleCameraFOVChanged.bind(this);this.isTransitioning=false;}get cameraFOVWideImage(){return this.customIcons.wide.idle}set cameraFOVWideImage(e){this.customIcons.wide.idle=e,this.applyCustomImagesToButton();}get cameraFOVWidePressedImage(){return this.customIcons.wide.pressed}set cameraFOVWidePressedImage(e){this.customIcons.wide.pressed=e,this.applyCustomImagesToButton();}get cameraFOVUltraWideImage(){return this.customIcons.ultraWide.idle}set cameraFOVUltraWideImage(e){this.customIcons.ultraWide.idle=e,this.applyCustomImagesToButton();}get cameraFOVUltraWidePressedImage(){return this.customIcons.ultraWide.pressed}set cameraFOVUltraWidePressedImage(e){this.customIcons.ultraWide.pressed=e,this.applyCustomImagesToButton();}toJSONObject(){return {type:this.type}}async install(e){var a,r,n;this.CameraFOVSwitchButtonClass||(this.CameraFOVSwitchButtonClass=await import('../private/ui/molecules/CameraFOVSwitchButton.js').then(d=>d.CameraFOVSwitchButton),(a=this.CameraFOVSwitchButtonClass)==null||a.register()),this.view=e,this.currentFrameSource=(n=(r=e.getContext())==null?void 0:r.frameSource)!=null?n:null,this.fovSwitchButton=this.CameraFOVSwitchButtonClass.create(),this.fovSwitchButton.slot="bottomRight",this.fovSwitchButton.hidden=true,this.updateButtonMode(),this.fovSwitchButton.addEventListener("camera-fov-changed",this.onCameraFOVChanged);let t=e.controlsElement;return t&&t.append(this.fovSwitchButton),this.applyCustomImagesToButton(),await this.canShow()&&(await this.setInitialWideCamera(),this.updateButtonVisibility(true)),true}remove(e){e&&this.fovSwitchButton&&(this.fovSwitchButton.removeEventListener("camera-fov-changed",this.onCameraFOVChanged),this.fovSwitchButton.remove(),this.fovSwitchButton=null,this.currentFrameSource=null,this.view=void 0);}async update(e){var i,a;this.currentFrameSource=(a=(i=e.getContext())==null?void 0:i.frameSource)!=null?a:null,this.view=e,this.updateButtonMode();let t=await this.canShow();this.updateButtonVisibility(t);}updateButtonMode(){if(!this.fovSwitchButton)return;let t=this.isUltraWideBackCamera()?"0.5x":"1.0x";this.fovSwitchButton.mode=t;}applyCustomImagesToButton(){if(!this.fovSwitchButton)return;this.customIcons.wide.idle||this.customIcons.wide.pressed||this.customIcons.ultraWide.idle||this.customIcons.ultraWide.pressed?this.fovSwitchButton.setCustomImages(this.customIcons):this.fovSwitchButton.useCustomImages=false;}updateButtonVisibility(e){this.fovSwitchButton&&(this.fovSwitchButton.hidden=!e);}async canShow(){if(!b.isIOSDeviceWithExtendedCameraAccess())return false;let e=this.currentFrameSource;return e===null||!f(e)?false:d.isIOSBackDualWideCameraLabel(e.label)||d.isIOSBackCameraLabel(e.label)||d.isIOSUltraWideBackCameraLabel(e.label)}isUltraWideBackCamera(){let e=this.currentFrameSource;return f(e)?d.isIOSUltraWideBackCameraLabel(e.label):false}async handleCameraFOVChanged(e){await this.handleCameraFOVSwitch(),this.updateButtonMode();}async setInitialWideCamera(){var e,t;if(!this.isTransitioning&&!d.isIOSBackCameraLabel((t=(e=this.currentFrameSource)==null?void 0:e.label)!=null?t:"")){let a$1=(await a.getAll()).find(r=>d.isIOSBackCameraLabel(r.label));a$1&&await this.switchCameras(a$1);}}async handleCameraFOVSwitch(){if(this.isTransitioning)return false;let e=await this.getAlternativeCamera();return e?(await this.switchCameras(e),true):false}async getAlternativeCamera(){return (await a.getAll()).find(t=>this.isUltraWideBackCamera()?d.isIOSBackCameraLabel(t.label):d.isIOSUltraWideBackCameraLabel(t.label))}async switchCameras(e){var n;this.isTransitioning=true;let t=(n=this.view)==null?void 0:n.getContext(),i=t==null?void 0:t.frameSource,a,r;i!=null&&(a=new g(i.settings),r=i.desiredState),await(i==null?void 0:i.switchToDesiredState("off")),a!=null&&await e.applySettings(a),await(t==null?void 0:t.setFrameSource(e)),await(t==null?void 0:t.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=false;}};export{c as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$
|
|
1
|
+
import {c,a as a$1,b}from'./chunk-JFRSUCMO.js';import {a as a$3}from'./chunk-EQRBQJYM.js';import {a as a$2}from'./chunk-GHTCNOQN.js';import {e}from'./chunk-T6EVGEHJ.js';import {b as b$1}from'./chunk-AYYKQ7YB.js';import {a as a$4}from'./chunk-XR65N6EG.js';var a=class a{constructor(e){this.canUploadFile=false;this._mounted=false;this._loading=false;this._htmlRoot=void 0;this._canvas=void 0;this._onInputCheck=void 0;this._onBeforeFileRead=void 0;this._onImageLoadError=void 0;this._onFileReaderError=void 0;this._onCaptureReady=void 0;this._resizedImageSizeLimit=1440;this._inputElement=void 0;this._buttonElement=void 0;this._informationElement=void 0;this._chooseImageText="";this._localizationSubscription=void 0;this._onLocalizationUpdated=this.onLocalizationUpdated.bind(this);this._settings=e;}get canvas(){return this._canvas||(this._canvas=document.createElement("canvas")),this._canvas}get canvasContext(){return this._canvasContext||(this._canvasContext=this.canvas.getContext("2d",{willReadFrequently:true})),this._canvasContext}mount(e){var _,f;if(this._mounted)return;if(!document.head.querySelector(`[data-component=${a.componentName}]`)){let r=document.createElement("style");r.dataset.component=a.componentName,r.textContent=c,document.head.append(r);}let t=document.createElement("div");t.className=a$1.SINGLE_IMAGE_UPLOADER_CONTAINER,Object.assign(t.style,b.SINGLE_IMAGE_UPLOADER_CONTAINER_STYLE,this._settings.containerStyle),e.append(t);let{iconElement:n,iconStyle:s,informationElement:i,informationStyle:l,buttonElement:d,buttonStyle:h,onlyCameraCapture:p}=this._settings;Object.assign(n.style,b.SINGLE_IMAGE_UPLOADER_ICON_STYLE,s,{maxWidth:"100px",maxHeight:"100px"}),t.append(n),i.hasAttribute(a.DEFAULT_DOM_ATTRIBUTE)&&(Object.assign(i.style,b.SINGLE_IMAGE_UPLOADER_INFORMATION_STYLE,l),i.textContent=a$2.getInstance().get("core.singleImageUploader.title")),t.append(i);let o=document.createElement("input");o.type="file",p?(o.accept="image/*",o.capture="environment",o.dataset.onlyCaptureOnMobile="environment"):o.accept=b$1.isAndroid()&&((_=b$1.getUserAgentInfo().getBrowser().name)!=null&&_.toLowerCase().includes("chrome"))?"image/*;capture=camera":"image/*",o.addEventListener("change",r=>{this.onFileUpload(r);}),o.addEventListener("click",r=>{var m;(m=this._onInputCheck)==null||m.call(this,r);}),o.addEventListener("keydown",r=>{var m;(m=this._onInputCheck)==null||m.call(this,r);});let g=document.createElement("label");g.append(o),d.hasAttribute(a.DEFAULT_DOM_ATTRIBUTE)&&Object.assign(d.style,b.SINGLE_IMAGE_UPLOADER_BUTTON_STYLE,h),g.append(d),t.append(g);let E=document.createRange().createContextualFragment(atob(a$3)).firstElementChild;Object.assign(E.style,{position:"absolute",bottom:"1em",right:"1em",width:"10em"}),t.append(E),this._htmlRoot=t,this._mounted=true,this._inputElement=o,this._buttonElement=d,this._chooseImageText=(f=d.textContent)!=null?f:"",this._informationElement=i,this._localizationSubscription=a$2.getInstance().subscribe(this._onLocalizationUpdated);}unmount(){var e,t,n;this._mounted&&((e=this._htmlRoot)==null||e.remove(),(t=document.head.querySelector(`[data-component=${a.componentName}]`))==null||t.remove(),(n=this._localizationSubscription)==null||n.cancel(),this._mounted=false);}setButtonState(e){this._inputElement&&(this._inputElement.disabled=e==="disabled");}getButtonState(){return this._inputElement?this._inputElement.disabled?"disabled":"enabled":"disabled"}onInputCheck(e){this._onInputCheck=e;}onBeforeFileRead(e){this._onBeforeFileRead=e;}onImageLoadError(e){this._onImageLoadError=e;}onFileReaderError(e){this._onFileReaderError=e;}onCaptureReady(e){this._onCaptureReady=e;}onAfterImageProcessed(){this.setLoading(false);}onLocalizationUpdated(){var e,t;(e=this._buttonElement)!=null&&e.hasAttribute(a.DEFAULT_DOM_ATTRIBUTE)&&(this._buttonElement.textContent=a$2.getInstance().get("core.singleImageUploader.button")),(t=this._informationElement)!=null&&t.hasAttribute(a.DEFAULT_DOM_ATTRIBUTE)&&(this._informationElement.textContent=a$2.getInstance().get("core.singleImageUploader.title"));}setLoading(e){this._buttonElement&&(this.setButtonState(e?"disabled":"enabled"),this._buttonElement.textContent=e?"...":this._chooseImageText,this._loading=e);}getResizedImageDimensions(e,t){return e<=this._resizedImageSizeLimit&&t<=this._resizedImageSizeLimit?{width:e,height:t}:e>t?{width:this._resizedImageSizeLimit,height:Math.round(t/e*this._resizedImageSizeLimit)}:{width:Math.round(e/t*this._resizedImageSizeLimit),height:this._resizedImageSizeLimit}}onImageLoad(e$1){var i;let{height:t,width:n}=this.getResizedImageDimensions(e$1.naturalWidth,e$1.naturalHeight);this.canvasContext.canvas.width=n,this.canvasContext.canvas.height=t,this.canvasContext.drawImage(e$1,0,0,n,t);let s={data:this.canvasContext.getImageData(0,0,n,t).data,frameId:e(),width:n,height:t};(i=this._onCaptureReady)==null||i.call(this,s);}onFileReaderLoad(e,t,n){e.value="",t.result!=null&&(n.addEventListener("load",()=>{this.onImageLoad(n);},{once:true}),n.addEventListener("error",s=>{var i;(i=this._onImageLoadError)==null||i.call(this,s),this.setLoading(false);},{once:true}),n.src=t.result);}async onFileUpload(e){var d;this.setLoading(true);let t=e.currentTarget,{files:n}=t;if(n==null||n.length===0){this.setLoading(false);return}let s=(d=this._onBeforeFileRead)==null?void 0:d.call(this,e);if(s instanceof Promise&&await s,!this.canUploadFile){t.value="",a$4.warn("Can't upload file, no capture mode enabled."),this.setLoading(false);return}let i=new Image,l=new FileReader;l.addEventListener("load",()=>{this.onFileReaderLoad(t,l,i);}),l.addEventListener("error",h=>{var p;(p=this._onFileReaderError)==null||p.call(this,h),this.setLoading(false);}),l.readAsDataURL(n[0]);}};a.componentName="SingleImageUploaderView",a.DEFAULT_DOM_ATTRIBUTE="data-scandit-default";var T=a;export{T as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {b,c,d}from'./chunk-TDNR2OSD.js';function n(){b();}function p(){c();}function i(){d();}export{n as a,p as b,i as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-DN32UPQC.js';import {a as a$8}from'./chunk-GVHXM75D.js';import {a as a$9}from'./chunk-G2BRTVN7.js';import {c as c$1,a as a$a}from'./chunk-4W2T3TLN.js';import {c}from'./chunk-UWLAKRB2.js';import {a as a$1}from'./chunk-CAUB35PV.js';import {a as a$2}from'./chunk-QIWPWOQG.js';import {a}from'./chunk-GQ7A6533.js';import {a as a$6}from'./chunk-P3NPNIWR.js';import {d}from'./chunk-AIC4H5KG.js';import {a as a$5}from'./chunk-O7TZTIHO.js';import {a as a$3}from'./chunk-XR65N6EG.js';import {a as a$7}from'./chunk-QCZSSQAQ.js';var P=class P{constructor(e,t){this.hintPresenterV2=null;this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL=5;this.redrawInterval=1e3/30;this.redrawRequests=[];this._isDrawLoopRunning=false;this.frameDataPool=new Map;this.lastFrameColorType="RGBA";this.lastFrameId=null;this.poorMansBenchmarkLogs=false;this.writableDataPathStandard="/scandit_sync_folder";this.resourceFilesSubfolder="resources";this.performanceMetricsReporterTimer=void 0;this.lastMetricsReportTime=0;this.metricsReportInterval=1e3;this.performanceMetrics={frameDataPoolSize:0,cameraOutputFrames:0,redrawRequestsCount:0,actualRedrawsCount:0,frameProcessingStartedCount:0,frameProcessedCount:0,frameSkippedCount:0};this.frameProcessingStartedCount=0;this.frameProcessingFinishedCount=0;this.gestureListener=null;this.webPlatformHintPresenter=null;this.deviceInstance=null;this.deviceInfo=null;this.lastViewInfo=new a(null);this.lastFrameProcessingStartedCount=0;this.lastFrameProcessingFinishedCount=0;this.moduleHandler=e,this.workerFunctions=t,this._loadProgressCallback=this._loadProgressCallback.bind(this),c(this.getWasmMetadata());}get Module(){return this.moduleHandler.get()}set isDrawLoopRunning(e){this._isDrawLoopRunning=e,!e&&typeof this.loopTimeoutId=="number"&&(clearTimeout(this.loopTimeoutId),this.loopTimeoutId=void 0);}get isDrawLoopRunning(){return this._isDrawLoopRunning}prepareFrameForListener(e){let t=this.lastFrameId;if(this.frameDataPool.size>=this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL){let l=this.frameDataPool.keys().next().value;l!=null&&this.frameDataPool.delete(l);}let r=e.getFrameData(),i=new Uint8ClampedArray(r);this.frameDataPool.set(t,{data:i,colorType:this.lastFrameColorType,frameId:t,width:e.getWidth(),height:e.getHeight()});let n=this.lastUsedModuleMirrorAxis==null?false:this.lastUsedModuleMirrorAxis!==this.Module.Axis.None;return {frameId:t,width:e.getWidth(),height:e.getHeight(),isFrameSourceMirrored:n,colorType:this.lastFrameColorType}}createContext(e){var f,m,C,b,y;let t=this.getModeDeserializers(),r=c$1(location);(r==="localhost"||r==="127.0.0.1")&&navigator.userAgent.includes("Electron")&&e.appName!=null&&(r+=`-${e.appName}`),this.parentDomain=e.parentDomain,this.contextDeserializer=new this.Module.DataCaptureContextDeserializer(this.writableDataPath,e.deviceId,e.context.deviceModelName,r,this.parentDomain,t,e.delayedRegistration,e.highEndBlurryRecognition,this.resourcePath);let i=this.contextDeserializer.contextFromJson(JSON.stringify(e.context));if(i==null){let a=this.contextDeserializer.getLastError();throw new Error(`Could not create the context: ${a}`)}let n=i.getView();this.context=i.getContext(),i.delete(),this.setupDeviceInterface(e.isTablet,e.batteryInfo);let l=this.Module.DataCaptureContextListener.extend("DataCaptureContextListener",{didChangeStatus:(a,o)=>{this.contextDidChangeStatus(JSON.parse(o.toJson())),a.delete();},didStartObservingContext:a=>{this.didStartObservingContext(),a.delete();},didStopObservingContext:a=>{a.delete();}}),c=this.Module.DataCaptureContextFrameListener.extend("DataCaptureContextFrameListener",{onObservationStarted:a=>{a.delete();},onObservationStopped:a=>{a.delete();},onFrameProcessingStarted:(a,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingStarted"}),o.delete(),a.delete();},onFrameProcessingFinished:(a,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingFinished"}),o.delete(),a.delete();},onFrameSkipped:(a,o)=>{this.workerFunctions.postMessage({type:"onFrameSkipped"}),o.delete(),a.delete();}}),h=this.Module.GestureRecognizer.extend("GestureRecognizer",{setGestureListener:(a,o)=>{var w;(w=this.gestureListener)==null||w.delete(),this.gestureListener=a.clone(),a.delete();}});(f=this.gestureRecognizer)==null||f.delete(),this.gestureRecognizer=new h;let g=new l;this.context.addListener(g),g.delete();let u=new c;this.context.addFrameListener(u),u.delete(),this.setView(n),(m=this.view)==null||m.setGestureRecognizer(this.gestureRecognizer);let p=this.Module.PlatformHintPresenter.extend("PlatformHintPresenter",{setHintPresenter:a=>{a.delete();},showToast:a=>{this.workerFunctions.postMessage({type:"showToast",payload:JSON.parse(a)});},hideToast:a=>{this.workerFunctions.postMessage({type:"hideToast",payload:JSON.parse(a)});},showGuidance:a=>{this.workerFunctions.postMessage({type:"showGuidance",payload:JSON.parse(a)});},hideGuidance:a=>{this.workerFunctions.postMessage({type:"hideGuidance",payload:JSON.parse(a)});},startUpdateTimer:a=>{this.workerFunctions.postMessage({type:"startUpdateTimer",payload:{duration:{unit:"ms",value:a}}});},stopUpdateTimer:()=>{this.workerFunctions.postMessage({type:"stopUpdateTimer"});}});(C=this.hintPresenterV2)==null||C.delete(),this.hintPresenterV2=null,(b=this.webPlatformHintPresenter)==null||b.delete(),this.webPlatformHintPresenter=null,this.webPlatformHintPresenter=new p,this.view&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter),(y=this.view)==null||y.setHintPresenterV2(this.hintPresenterV2)),this.webImageConverterInstance=this.getImageConverterInstance({quality:1}),this.Module.ImageConverter.setInstance(this.webImageConverterInstance);}convertToJPEGResult(e,t){this.webImageConverterInstance instanceof a$1&&this.webImageConverterInstance.onConvertToJPEGResult(e,t);}getImageConverterInstance(e){return this.workerFunctions.getOffscreenCanvas()!=null?new a$2(e):new a$1(this.workerFunctions,e)}onTap(e){var t;(t=this.gestureListener)==null||t.onTap(JSON.stringify(e));}hintPresenterV2Update(){var e;(e=this.hintPresenterV2)==null||e.update();}startReportingPerformanceMetrics(){this.performanceMetricsReporterTimer==null&&(this.lastMetricsReportTime=performance.now(),this.scheduleMetricsReporting());}scheduleMetricsReporting(){this.performanceMetricsReporterTimer=setTimeout(()=>{this.checkAndReportMetrics();},100);}checkAndReportMetrics(){let e=performance.now();e-this.lastMetricsReportTime>=this.metricsReportInterval&&(this.reportPerformanceMetrics(),this.performanceMetrics.cameraOutputFrames=0,this.performanceMetrics.redrawRequestsCount=0,this.performanceMetrics.actualRedrawsCount=0,this.lastMetricsReportTime=e),this._isDrawLoopRunning&&this.scheduleMetricsReporting();}async reportPerformanceMetrics(){let e=this.frameProcessingStartedCount-this.lastFrameProcessingStartedCount,r=this.frameProcessingFinishedCount-this.lastFrameProcessingFinishedCount;this.lastFrameProcessingStartedCount=this.frameProcessingStartedCount,this.lastFrameProcessingFinishedCount=this.frameProcessingFinishedCount;let i={cameraOutputFrames:this.performanceMetrics.cameraOutputFrames,redrawRequestsCount:this.performanceMetrics.redrawRequestsCount,actualRedrawsCount:this.performanceMetrics.actualRedrawsCount,frameDataPoolSize:this.performanceMetrics.frameDataPoolSize,frameProcessingStartedCount:e,frameProcessedCount:r,frameSkippedCount:this.performanceMetrics.frameSkippedCount};this.workerFunctions.postMessage({type:"performanceMetricsReport",payload:i});}deleteFrameData(e){this.frameDataPool.delete(e);}dispose(){var e,t,r,i,n;this.context.dispose(),this.frameDataPool.clear(),this.isDrawLoopRunning=false,this.cleanupMetricsReporting(),(e=this.gestureRecognizer)==null||e.delete(),this.gestureRecognizer=null,(t=this.gestureListener)==null||t.delete(),this.gestureListener=null,(r=this.hintPresenterV2)==null||r.delete(),this.hintPresenterV2=null,(i=this.webPlatformHintPresenter)==null||i.delete(),this.webPlatformHintPresenter=null,(n=this.deviceInstance)==null||n.delete(),this.deviceInstance=null,this.deviceInfo=null;}cleanupMetricsReporting(){this.performanceMetricsReporterTimer!=null&&(typeof this.performanceMetricsReporterTimer=="number"?cancelAnimationFrame(this.performanceMetricsReporterTimer):clearTimeout(this.performanceMetricsReporterTimer),this.performanceMetricsReporterTimer=void 0);}flushAnalytics(){this.context.flushAnalytics();}extractCentaurusLicense(e){return {payload:{centaurus:{licenseKey:this.Module.LicenseUtils[P.get3dPartyLicenseKeyMethodName](e)}}}}getModeDeserializers(){return new this.Module.VectorDataCaptureModeDeserializer}loadLibrary(e){return this.libraryLoadingPromise!=null?this.libraryLoadingPromise:(this.libraryLoadingPromise=this.setup(e),this.libraryLoadingPromise)}processFrame(e){var n;if(this.context==null)return a$3.debug("[processFrame] Context is null, returning frame without processing"),{payload:e,transferables:[e.data.buffer]};this.lastFrameId=e.frameId;let t=e.data,r=e.colorType==="GRAYSCALE"?this.Module.ImageBufferFormat.Grayscale8:this.Module.ImageBufferFormat.Rgba8888;this.lastFrameColorType=e.colorType==="GRAYSCALE"?"GRAYSCALE":"RGBA";let i=this.Module.allocateUint8Array(t.byteLength);return this.Module.HEAPU8.set(t,i),(n=this.imageFrameSource)==null||n.outputFrame(i,e.width,e.height,r),{payload:e,transferables:[e.data.buffer]}}reportCameraProperties(e){this.context.setCameraProperties(e.deviceId,e.isFrontFacing,e.hasAutofocus);}requestFrameData(e){let t=this.frameDataPool.get(e);if(t==null)return {payload:{data:null,frameId:null,colorType:null}};if(t.data.buffer.byteLength===0)return this.frameDataPool.delete(e),{payload:{data:null,frameId:null,colorType:null}};let r=t.data;t.colorType==="GRAYSCALE"&&(r=a$4(t.data,t.width,t.height));let i={payload:{data:r,frameId:t.frameId,colorType:t.colorType},transferables:[r.buffer]};return this.frameDataPool.delete(e),i}scheduleRedraw(e,t){this.addRedrawRequest(t),this.isDrawLoopRunning||this.startDrawLoop(e);}sendViewRefreshCommands(e){this.workerFunctions.postMessage({type:"draw",payload:e},[e.buffer]);}setFrameSource(e,t){var r;this.lastUsedModuleMirrorAxis=this.mapMirrorAxisOnModule(e),(r=this.imageFrameSource)==null||r.delete(),this.imageFrameSource=new this.Module.ImageBufferFrameSource(this.lastUsedModuleMirrorAxis,t,0),this.context.setFrameSource(this.imageFrameSource);}startDrawLoop(e){this.isDrawLoopRunning=true;let t=n=>this.redrawRequests.length>0&&this.redrawRequests[0]<=n,r=n=>{for(;this.redrawRequests.length>0&&this.redrawRequests[0]<=n;)this.redrawRequests.shift();},i=()=>{this.loopTimeoutId=setTimeout(()=>{if(!this.isDrawLoopRunning)return;let n=performance.now();if(t(n)){r(n),e.draw();let l=e.getDrawCommands();this.sendViewRefreshCommands(new Uint8Array(l));}i();},this.redrawInterval);};i();}updateContext(e){if(this.context!=null&&this.contextDeserializer!=null){e.view!=null&&!e.view.visible&&this.context.flushAnalytics();let t=this.onBeforeUpdateContextHook(e),r=this.contextDeserializer.updateContextFromJson(this.context,this.view,JSON.stringify(t.context));if(r==null){let n=this.contextDeserializer.getLastError();throw new Error(`Could not update the context: ${n}`)}this.context.delete(),this.context=r.getContext();let i=r.getView();r.delete(),i!=null&&t.view!=null&&(i.setViewSize(t.view.width,t.view.height,t.view.orientation),i.draw()),!this.hintPresenterV2&&this.webPlatformHintPresenter&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter)),i!=null&&this.hintPresenterV2&&i.setHintPresenterV2(this.hintPresenterV2),this.gestureRecognizer!=null&&(i==null||i.setGestureRecognizer(this.gestureRecognizer)),this.setView(i),this.notifyMainThreadOnViewInfoChanged(i),a$3.debug("context updated",t);}}notifyMainThreadOnViewInfoChanged(e){let t=this.getViewInfo(e);this.lastViewInfo.isSame(t)||(this.lastViewInfo.update(t),this.workerFunctions.postMessage({type:"viewSizeChanged",payload:t}));}getViewInfo(e){if(e!=null)try{let t=JSON.parse(e.getViewInfo());if(t!=null){let r=this.getOrientationFromNumber(t.orientation);return {...t,orientation:r}}}catch(t){a$3.error("Failed to get view size",t);}return null}getOrientationFromNumber(e){switch(e){case 90:return "landscapeRight";case 180:return "portraitUpsideDown";case 270:return "landscapeLeft";default:return "portrait"}}onBeforeUpdateContextHook(e){return e}onDocumentVisibilityChange(e){e==="hidden"&&this.context.flushAnalytics();}isFeatureSupported(e){return {payload:{supported:this.context.isFeatureSupported(e)}}}getViewfinderInfo(){var e,t;return {payload:{isDisplayingViewfinder:(t=(e=this.view)==null?void 0:e.isDisplayingViewfinder())!=null?t:false,rect:JSON.parse(this.view.getViewfinderRect())}}}getOpenSourceSoftwareLicenseInfo(){return {payload:{licenseText:this.Module.OpenSourceSoftwareLicenseInfo.getLicenseText()}}}getWasmDynamicLibraries(e){return this.getWasmSideModuleFileName()==null?[]:[`${e.replace(/\/[^/]*$/,"/")}${this.getWasmSideModuleFileName()}`]}getWasmCoreExpectedHash(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_HASH:globalThis.SDC_WASM_CORE_MT_HASH:e?globalThis.SDC_WASM_CORE_SIMD_HASH:""}getWasmCoreFileName(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_FILE_NAME:globalThis.SDC_WASM_CORE_MT_FILE_NAME:e?globalThis.SDC_WASM_CORE_SIMD_FILE_NAME:""}getWasmMetadata(){return globalThis.WASM_METADATA}getWasmSideModuleFileName(){return ""}_loadProgressCallback(e){this.workerFunctions.postMessage({type:"loadLibraryProgress",payload:e});}addRedrawRequest(e){this.redrawRequests.push(Math.round(performance.now())+e),this.redrawRequests.sort((t,r)=>t-r);}contextDidChangeStatus(e){e.code===260?e.message=e.message.replace("domain name",`domain name (${c$1(location)})`):e.code===265&&(e.message=e.message.replace("domain name",`domain name (${this.parentDomain})`)),this.workerFunctions.postMessage({type:"contextDidChangeStatus",payload:e});}didStartObservingContext(){this.workerFunctions.postMessage({type:"didStartObservingContext"});}mapMirrorAxisOnModule(e){switch(e){case "None":return this.Module.Axis.None;case "X":return this.Module.Axis.X;case "Y":return this.Module.Axis.Y;default:return this.Module.Axis.None}}setView(e){this.view=e,this.setViewRefreshHandler(e),e==null&&(this.isDrawLoopRunning=false,this.sendViewRefreshCommands(new Uint8Array([])));}addNativeOverlay(e){a$3.warn("addNativeOverlay has not been implemented for this module",e);}removeNativeOverlay(e){a$3.warn("removeNativeOverlay has not been implemented for this module",e);}setViewRefreshHandler(e){if(e==null||e.isViewRefreshHandlerSet)return;let t=this.Module.NeedsRedrawDelegate.extend("NeedsRedrawDelegate",{setNeedsRedrawIn:this.scheduleRedraw.bind(this,e)}),r=new t;e.setNeedsRedrawDelegate(r),e.isViewRefreshHandlerSet=true;}setupDataDecoding(){let e=this.moduleHandler.get(),t=e.DataDecoding.extend("DataDecoding",{decode(r,i){try{let n=JSON.parse(i),l=[];for(let c of n){let h=new TextDecoder(c.ianaName,{fatal:true});l.push(h.decode(r.slice(c.startIndex,c.endIndex)));}return l.join("")}catch{return ""}}});e.setDataDecoding(new t);}getBatteryData(){var t,r;let e=(r=(t=this.deviceInfo)==null?void 0:t.batteryInfo)==null?void 0:r.percentage;if(e!=null)return {percentage:e}}isTablet(){var e,t;return (t=(e=this.deviceInfo)==null?void 0:e.isTablet)!=null?t:false}setupDeviceInterface(e,t){this.deviceInfo={isTablet:e,batteryInfo:t};let r=this.moduleHandler.get(),i=r.DeviceInterface.extend("DeviceInterface",{getBatteryData:this.getBatteryData.bind(this),isTablet:this.isTablet.bind(this)});this.deviceInstance=new i,r.DeviceHolder.setCurrentDevice(this.deviceInstance);}updateBatteryInfo(e){this.deviceInfo&&(this.deviceInfo.batteryInfo=e);}start(e,t,r){e&&t&&(this.setupDataDecoding(),this.moduleHandler.get().callMain(),this.moduleHandler.get().__emscripten_proxy_main!==void 0||r());}getWritableDataPath(e){return e!=null?(a$3.debug(`IndexedDB database name override in use to recover from blocked standard database: ${e}`),e):this.writableDataPathStandard}numOfMBToPages(e){return Math.ceil(1024*e*1024/64/1024)}async setup({libraryLocation:e,locationPath:t,writableDataPathOverride:r,indexedDBTimeoutMs:i,verifyResponseHash:n,referredOrigin:l,fixedWasmMemory:c,simdSupport:h,threadsSupport:g}){var v;let u=false,p=false;this.writableDataPath=this.getWritableDataPath(r),this.resourcePath=`${e}${this.resourceFilesSubfolder}/`,globalThis.path=t;let{resolve:f,reject:m,promise:C}=new a$5,b=a$6.sdkVersion();if(b==="")throw new a$7({name:"Invalid library version",message:"Library version is not defined or empty, cannot generate proper path to library files."});let y=this.getWasmCoreFileName(h,g),a=d(b,e,y),{jsURI:o,wasmURI:w}=a,W={instantiateWasm:(d,H)=>(a$a({importObject:d,wasmURI:w,expectedHash:this.getWasmCoreExpectedHash(h,g),verifyResponseHash:n,successCallback:H,progressCallback:this._loadProgressCallback,errorCallback:N=>{m(N);},referredOrigin:l}),{})},M=c===null?null:new WebAssembly.Memory({initial:this.numOfMBToPages(c),maximum:this.numOfMBToPages(300),shared:g});return M!==null&&a$3.log(a$3.Level.Debug,"Fixed wasmMemory set",M),this.moduleHandler.set({...M?{wasmMemory:M}:{},mainScriptUrlOrBlob:o,canvas:(v=this.workerFunctions.getOffscreenCanvas())!=null?v:{getContext:()=>null},...W,dynamicLibraries:this.getWasmDynamicLibraries(w),locateFile:d=>e+d,noInitialRun:true,preRun:[async()=>{try{await a$8({writableDataPath:this.writableDataPath,indexedDBTimeoutMs:i});}catch(d){if(d.name==="BlockedIndexedDB"){m(d.toString());return}a$3.log(a$3.Level.Debug,"No IndexedDB support, some data will not be persisted:",d);}p=true,this.start(p,u,f);}],onMainComplete:()=>{if([u,p].includes(false)){a$3.log(a$3.Level.Warn,{runtimeLoaded:u,fileSystemSynced:p},"Both runtimeLoaded and fileSystemSynced should be true when calling onMainComplete"),m("onMainComplete has been called but runtime or file system was not ready.");return}f();},onRuntimeInitialized:()=>{u=true,this.start(p,u,f);},print:d=>{a$3.info(d);}}),await a$9(o,b)||m(`Couldn't retrieve Scandit Data Capture library at ${o}, did you configure the path for it correctly?`),C}};P.get3dPartyLicenseKeyMethodName=atob("Z2V0QmxpbmtJZExpY2Vuc2VLZXk=");var V=P;export{V as a};
|
|
1
|
+
import {a as a$4}from'./chunk-DN32UPQC.js';import {a as a$9}from'./chunk-G2BRTVN7.js';import {c as c$1,a as a$a}from'./chunk-4W2T3TLN.js';import {c}from'./chunk-UWLAKRB2.js';import {a as a$8}from'./chunk-GVHXM75D.js';import {a as a$1}from'./chunk-CAUB35PV.js';import {a as a$2}from'./chunk-QIWPWOQG.js';import {a}from'./chunk-GQ7A6533.js';import {a as a$6}from'./chunk-T2JW7GJH.js';import {d}from'./chunk-AIC4H5KG.js';import {a as a$5}from'./chunk-O7TZTIHO.js';import {a as a$3}from'./chunk-XR65N6EG.js';import {a as a$7}from'./chunk-QCZSSQAQ.js';var P=class P{constructor(e,t){this.hintPresenterV2=null;this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL=5;this.redrawInterval=1e3/30;this.redrawRequests=[];this._isDrawLoopRunning=false;this.frameDataPool=new Map;this.lastFrameColorType="RGBA";this.lastFrameId=null;this.poorMansBenchmarkLogs=false;this.writableDataPathStandard="/scandit_sync_folder";this.resourceFilesSubfolder="resources";this.performanceMetricsReporterTimer=void 0;this.lastMetricsReportTime=0;this.metricsReportInterval=1e3;this.performanceMetrics={frameDataPoolSize:0,cameraOutputFrames:0,redrawRequestsCount:0,actualRedrawsCount:0,frameProcessingStartedCount:0,frameProcessedCount:0,frameSkippedCount:0};this.frameProcessingStartedCount=0;this.frameProcessingFinishedCount=0;this.gestureListener=null;this.webPlatformHintPresenter=null;this.deviceInstance=null;this.deviceInfo=null;this.lastViewInfo=new a(null);this.lastFrameProcessingStartedCount=0;this.lastFrameProcessingFinishedCount=0;this.moduleHandler=e,this.workerFunctions=t,this._loadProgressCallback=this._loadProgressCallback.bind(this),c(this.getWasmMetadata());}get Module(){return this.moduleHandler.get()}set isDrawLoopRunning(e){this._isDrawLoopRunning=e,!e&&typeof this.loopTimeoutId=="number"&&(clearTimeout(this.loopTimeoutId),this.loopTimeoutId=void 0);}get isDrawLoopRunning(){return this._isDrawLoopRunning}prepareFrameForListener(e){let t=this.lastFrameId;if(this.frameDataPool.size>=this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL){let l=this.frameDataPool.keys().next().value;l!=null&&this.frameDataPool.delete(l);}let r=e.getFrameData(),i=new Uint8ClampedArray(r);this.frameDataPool.set(t,{data:i,colorType:this.lastFrameColorType,frameId:t,width:e.getWidth(),height:e.getHeight()});let n=this.lastUsedModuleMirrorAxis==null?false:this.lastUsedModuleMirrorAxis!==this.Module.Axis.None;return {frameId:t,width:e.getWidth(),height:e.getHeight(),isFrameSourceMirrored:n,colorType:this.lastFrameColorType}}createContext(e){var f,m,C,b,y;let t=this.getModeDeserializers(),r=c$1(location);(r==="localhost"||r==="127.0.0.1")&&navigator.userAgent.includes("Electron")&&e.appName!=null&&(r+=`-${e.appName}`),this.parentDomain=e.parentDomain,this.contextDeserializer=new this.Module.DataCaptureContextDeserializer(this.writableDataPath,e.deviceId,e.context.deviceModelName,r,this.parentDomain,t,e.delayedRegistration,e.highEndBlurryRecognition,this.resourcePath);let i=this.contextDeserializer.contextFromJson(JSON.stringify(e.context));if(i==null){let a=this.contextDeserializer.getLastError();throw new Error(`Could not create the context: ${a}`)}let n=i.getView();this.context=i.getContext(),i.delete(),this.setupDeviceInterface(e.isTablet,e.batteryInfo);let l=this.Module.DataCaptureContextListener.extend("DataCaptureContextListener",{didChangeStatus:(a,o)=>{this.contextDidChangeStatus(JSON.parse(o.toJson())),a.delete();},didStartObservingContext:a=>{this.didStartObservingContext(),a.delete();},didStopObservingContext:a=>{a.delete();}}),c=this.Module.DataCaptureContextFrameListener.extend("DataCaptureContextFrameListener",{onObservationStarted:a=>{a.delete();},onObservationStopped:a=>{a.delete();},onFrameProcessingStarted:(a,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingStarted"}),o.delete(),a.delete();},onFrameProcessingFinished:(a,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingFinished"}),o.delete(),a.delete();},onFrameSkipped:(a,o)=>{this.workerFunctions.postMessage({type:"onFrameSkipped"}),o.delete(),a.delete();}}),h=this.Module.GestureRecognizer.extend("GestureRecognizer",{setGestureListener:(a,o)=>{var w;(w=this.gestureListener)==null||w.delete(),this.gestureListener=a.clone(),a.delete();}});(f=this.gestureRecognizer)==null||f.delete(),this.gestureRecognizer=new h;let g=new l;this.context.addListener(g),g.delete();let u=new c;this.context.addFrameListener(u),u.delete(),this.setView(n),(m=this.view)==null||m.setGestureRecognizer(this.gestureRecognizer);let p=this.Module.PlatformHintPresenter.extend("PlatformHintPresenter",{setHintPresenter:a=>{a.delete();},showToast:a=>{this.workerFunctions.postMessage({type:"showToast",payload:JSON.parse(a)});},hideToast:a=>{this.workerFunctions.postMessage({type:"hideToast",payload:JSON.parse(a)});},showGuidance:a=>{this.workerFunctions.postMessage({type:"showGuidance",payload:JSON.parse(a)});},hideGuidance:a=>{this.workerFunctions.postMessage({type:"hideGuidance",payload:JSON.parse(a)});},startUpdateTimer:a=>{this.workerFunctions.postMessage({type:"startUpdateTimer",payload:{duration:{unit:"ms",value:a}}});},stopUpdateTimer:()=>{this.workerFunctions.postMessage({type:"stopUpdateTimer"});}});(C=this.hintPresenterV2)==null||C.delete(),this.hintPresenterV2=null,(b=this.webPlatformHintPresenter)==null||b.delete(),this.webPlatformHintPresenter=null,this.webPlatformHintPresenter=new p,this.view&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter),(y=this.view)==null||y.setHintPresenterV2(this.hintPresenterV2)),this.webImageConverterInstance=this.getImageConverterInstance({quality:1}),this.Module.ImageConverter.setInstance(this.webImageConverterInstance);}convertToJPEGResult(e,t){this.webImageConverterInstance instanceof a$1&&this.webImageConverterInstance.onConvertToJPEGResult(e,t);}getImageConverterInstance(e){return this.workerFunctions.getOffscreenCanvas()!=null?new a$2(e):new a$1(this.workerFunctions,e)}onTap(e){var t;(t=this.gestureListener)==null||t.onTap(JSON.stringify(e));}hintPresenterV2Update(){var e;(e=this.hintPresenterV2)==null||e.update();}startReportingPerformanceMetrics(){this.performanceMetricsReporterTimer==null&&(this.lastMetricsReportTime=performance.now(),this.scheduleMetricsReporting());}scheduleMetricsReporting(){this.performanceMetricsReporterTimer=setTimeout(()=>{this.checkAndReportMetrics();},100);}checkAndReportMetrics(){let e=performance.now();e-this.lastMetricsReportTime>=this.metricsReportInterval&&(this.reportPerformanceMetrics(),this.performanceMetrics.cameraOutputFrames=0,this.performanceMetrics.redrawRequestsCount=0,this.performanceMetrics.actualRedrawsCount=0,this.lastMetricsReportTime=e),this._isDrawLoopRunning&&this.scheduleMetricsReporting();}async reportPerformanceMetrics(){let e=this.frameProcessingStartedCount-this.lastFrameProcessingStartedCount,r=this.frameProcessingFinishedCount-this.lastFrameProcessingFinishedCount;this.lastFrameProcessingStartedCount=this.frameProcessingStartedCount,this.lastFrameProcessingFinishedCount=this.frameProcessingFinishedCount;let i={cameraOutputFrames:this.performanceMetrics.cameraOutputFrames,redrawRequestsCount:this.performanceMetrics.redrawRequestsCount,actualRedrawsCount:this.performanceMetrics.actualRedrawsCount,frameDataPoolSize:this.performanceMetrics.frameDataPoolSize,frameProcessingStartedCount:e,frameProcessedCount:r,frameSkippedCount:this.performanceMetrics.frameSkippedCount};this.workerFunctions.postMessage({type:"performanceMetricsReport",payload:i});}deleteFrameData(e){this.frameDataPool.delete(e);}dispose(){var e,t,r,i,n;this.context.dispose(),this.frameDataPool.clear(),this.isDrawLoopRunning=false,this.cleanupMetricsReporting(),(e=this.gestureRecognizer)==null||e.delete(),this.gestureRecognizer=null,(t=this.gestureListener)==null||t.delete(),this.gestureListener=null,(r=this.hintPresenterV2)==null||r.delete(),this.hintPresenterV2=null,(i=this.webPlatformHintPresenter)==null||i.delete(),this.webPlatformHintPresenter=null,(n=this.deviceInstance)==null||n.delete(),this.deviceInstance=null,this.deviceInfo=null;}cleanupMetricsReporting(){this.performanceMetricsReporterTimer!=null&&(typeof this.performanceMetricsReporterTimer=="number"?cancelAnimationFrame(this.performanceMetricsReporterTimer):clearTimeout(this.performanceMetricsReporterTimer),this.performanceMetricsReporterTimer=void 0);}flushAnalytics(){this.context.flushAnalytics();}extractCentaurusLicense(e){return {payload:{centaurus:{licenseKey:this.Module.LicenseUtils[P.get3dPartyLicenseKeyMethodName](e)}}}}getModeDeserializers(){return new this.Module.VectorDataCaptureModeDeserializer}loadLibrary(e){return this.libraryLoadingPromise!=null?this.libraryLoadingPromise:(this.libraryLoadingPromise=this.setup(e),this.libraryLoadingPromise)}processFrame(e){var n;if(this.context==null)return a$3.debug("[processFrame] Context is null, returning frame without processing"),{payload:e,transferables:[e.data.buffer]};this.lastFrameId=e.frameId;let t=e.data,r=e.colorType==="GRAYSCALE"?this.Module.ImageBufferFormat.Grayscale8:this.Module.ImageBufferFormat.Rgba8888;this.lastFrameColorType=e.colorType==="GRAYSCALE"?"GRAYSCALE":"RGBA";let i=this.Module.allocateUint8Array(t.byteLength);return this.Module.HEAPU8.set(t,i),(n=this.imageFrameSource)==null||n.outputFrame(i,e.width,e.height,r),{payload:e,transferables:[e.data.buffer]}}reportCameraProperties(e){this.context.setCameraProperties(e.deviceId,e.isFrontFacing,e.hasAutofocus);}requestFrameData(e){let t=this.frameDataPool.get(e);if(t==null)return {payload:{data:null,frameId:null,colorType:null}};if(t.data.buffer.byteLength===0)return this.frameDataPool.delete(e),{payload:{data:null,frameId:null,colorType:null}};let r=t.data;t.colorType==="GRAYSCALE"&&(r=a$4(t.data,t.width,t.height));let i={payload:{data:r,frameId:t.frameId,colorType:t.colorType},transferables:[r.buffer]};return this.frameDataPool.delete(e),i}scheduleRedraw(e,t){this.addRedrawRequest(t),this.isDrawLoopRunning||this.startDrawLoop(e);}sendViewRefreshCommands(e){this.workerFunctions.postMessage({type:"draw",payload:e},[e.buffer]);}setFrameSource(e,t){var r;this.lastUsedModuleMirrorAxis=this.mapMirrorAxisOnModule(e),(r=this.imageFrameSource)==null||r.delete(),this.imageFrameSource=new this.Module.ImageBufferFrameSource(this.lastUsedModuleMirrorAxis,t,0),this.context.setFrameSource(this.imageFrameSource);}startDrawLoop(e){this.isDrawLoopRunning=true;let t=n=>this.redrawRequests.length>0&&this.redrawRequests[0]<=n,r=n=>{for(;this.redrawRequests.length>0&&this.redrawRequests[0]<=n;)this.redrawRequests.shift();},i=()=>{this.loopTimeoutId=setTimeout(()=>{if(!this.isDrawLoopRunning)return;let n=performance.now();if(t(n)){r(n),e.draw();let l=e.getDrawCommands();this.sendViewRefreshCommands(new Uint8Array(l));}i();},this.redrawInterval);};i();}updateContext(e){if(this.context!=null&&this.contextDeserializer!=null){e.view!=null&&!e.view.visible&&this.context.flushAnalytics();let t=this.onBeforeUpdateContextHook(e),r=this.contextDeserializer.updateContextFromJson(this.context,this.view,JSON.stringify(t.context));if(r==null){let n=this.contextDeserializer.getLastError();throw new Error(`Could not update the context: ${n}`)}this.context.delete(),this.context=r.getContext();let i=r.getView();r.delete(),i!=null&&t.view!=null&&(i.setViewSize(t.view.width,t.view.height,t.view.orientation),i.draw()),!this.hintPresenterV2&&this.webPlatformHintPresenter&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter)),i!=null&&this.hintPresenterV2&&i.setHintPresenterV2(this.hintPresenterV2),this.gestureRecognizer!=null&&(i==null||i.setGestureRecognizer(this.gestureRecognizer)),this.setView(i),this.notifyMainThreadOnViewInfoChanged(i),a$3.debug("context updated",t);}}notifyMainThreadOnViewInfoChanged(e){let t=this.getViewInfo(e);this.lastViewInfo.isSame(t)||(this.lastViewInfo.update(t),this.workerFunctions.postMessage({type:"viewSizeChanged",payload:t}));}getViewInfo(e){if(e!=null)try{let t=JSON.parse(e.getViewInfo());if(t!=null){let r=this.getOrientationFromNumber(t.orientation);return {...t,orientation:r}}}catch(t){a$3.error("Failed to get view size",t);}return null}getOrientationFromNumber(e){switch(e){case 90:return "landscapeRight";case 180:return "portraitUpsideDown";case 270:return "landscapeLeft";default:return "portrait"}}onBeforeUpdateContextHook(e){return e}onDocumentVisibilityChange(e){e==="hidden"&&this.context.flushAnalytics();}isFeatureSupported(e){return {payload:{supported:this.context.isFeatureSupported(e)}}}getViewfinderInfo(){var e,t;return {payload:{isDisplayingViewfinder:(t=(e=this.view)==null?void 0:e.isDisplayingViewfinder())!=null?t:false,rect:JSON.parse(this.view.getViewfinderRect())}}}getOpenSourceSoftwareLicenseInfo(){return {payload:{licenseText:this.Module.OpenSourceSoftwareLicenseInfo.getLicenseText()}}}getWasmDynamicLibraries(e){return this.getWasmSideModuleFileName()==null?[]:[`${e.replace(/\/[^/]*$/,"/")}${this.getWasmSideModuleFileName()}`]}getWasmCoreExpectedHash(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_HASH:globalThis.SDC_WASM_CORE_MT_HASH:e?globalThis.SDC_WASM_CORE_SIMD_HASH:""}getWasmCoreFileName(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_FILE_NAME:globalThis.SDC_WASM_CORE_MT_FILE_NAME:e?globalThis.SDC_WASM_CORE_SIMD_FILE_NAME:""}getWasmMetadata(){return globalThis.WASM_METADATA}getWasmSideModuleFileName(){return ""}_loadProgressCallback(e){this.workerFunctions.postMessage({type:"loadLibraryProgress",payload:e});}addRedrawRequest(e){this.redrawRequests.push(Math.round(performance.now())+e),this.redrawRequests.sort((t,r)=>t-r);}contextDidChangeStatus(e){e.code===260?e.message=e.message.replace("domain name",`domain name (${c$1(location)})`):e.code===265&&(e.message=e.message.replace("domain name",`domain name (${this.parentDomain})`)),this.workerFunctions.postMessage({type:"contextDidChangeStatus",payload:e});}didStartObservingContext(){this.workerFunctions.postMessage({type:"didStartObservingContext"});}mapMirrorAxisOnModule(e){switch(e){case "None":return this.Module.Axis.None;case "X":return this.Module.Axis.X;case "Y":return this.Module.Axis.Y;default:return this.Module.Axis.None}}setView(e){this.view=e,this.setViewRefreshHandler(e),e==null&&(this.isDrawLoopRunning=false,this.sendViewRefreshCommands(new Uint8Array([])));}addNativeOverlay(e){a$3.warn("addNativeOverlay has not been implemented for this module",e);}removeNativeOverlay(e){a$3.warn("removeNativeOverlay has not been implemented for this module",e);}setViewRefreshHandler(e){if(e==null||e.isViewRefreshHandlerSet)return;let t=this.Module.NeedsRedrawDelegate.extend("NeedsRedrawDelegate",{setNeedsRedrawIn:this.scheduleRedraw.bind(this,e)}),r=new t;e.setNeedsRedrawDelegate(r),e.isViewRefreshHandlerSet=true;}setupDataDecoding(){let e=this.moduleHandler.get(),t=e.DataDecoding.extend("DataDecoding",{decode(r,i){try{let n=JSON.parse(i),l=[];for(let c of n){let h=new TextDecoder(c.ianaName,{fatal:true});l.push(h.decode(r.slice(c.startIndex,c.endIndex)));}return l.join("")}catch{return ""}}});e.setDataDecoding(new t);}getBatteryData(){var t,r;let e=(r=(t=this.deviceInfo)==null?void 0:t.batteryInfo)==null?void 0:r.percentage;if(e!=null)return {percentage:e}}isTablet(){var e,t;return (t=(e=this.deviceInfo)==null?void 0:e.isTablet)!=null?t:false}setupDeviceInterface(e,t){this.deviceInfo={isTablet:e,batteryInfo:t};let r=this.moduleHandler.get(),i=r.DeviceInterface.extend("DeviceInterface",{getBatteryData:this.getBatteryData.bind(this),isTablet:this.isTablet.bind(this)});this.deviceInstance=new i,r.DeviceHolder.setCurrentDevice(this.deviceInstance);}updateBatteryInfo(e){this.deviceInfo&&(this.deviceInfo.batteryInfo=e);}start(e,t,r){e&&t&&(this.setupDataDecoding(),this.moduleHandler.get().callMain(),this.moduleHandler.get().__emscripten_proxy_main!==void 0||r());}getWritableDataPath(e){return e!=null?(a$3.debug(`IndexedDB database name override in use to recover from blocked standard database: ${e}`),e):this.writableDataPathStandard}numOfMBToPages(e){return Math.ceil(1024*e*1024/64/1024)}async setup({libraryLocation:e,locationPath:t,writableDataPathOverride:r,indexedDBTimeoutMs:i,verifyResponseHash:n,referredOrigin:l,fixedWasmMemory:c,simdSupport:h,threadsSupport:g}){var v;let u=false,p=false;this.writableDataPath=this.getWritableDataPath(r),this.resourcePath=`${e}${this.resourceFilesSubfolder}/`,globalThis.path=t;let{resolve:f,reject:m,promise:C}=new a$5,b=a$6.sdkVersion();if(b==="")throw new a$7({name:"Invalid library version",message:"Library version is not defined or empty, cannot generate proper path to library files."});let y=this.getWasmCoreFileName(h,g),a=d(b,e,y),{jsURI:o,wasmURI:w}=a,W={instantiateWasm:(d,H)=>(a$a({importObject:d,wasmURI:w,expectedHash:this.getWasmCoreExpectedHash(h,g),verifyResponseHash:n,successCallback:H,progressCallback:this._loadProgressCallback,errorCallback:N=>{m(N);},referredOrigin:l}),{})},M=c===null?null:new WebAssembly.Memory({initial:this.numOfMBToPages(c),maximum:this.numOfMBToPages(300),shared:g});return M!==null&&a$3.log(a$3.Level.Debug,"Fixed wasmMemory set",M),this.moduleHandler.set({...M?{wasmMemory:M}:{},mainScriptUrlOrBlob:o,canvas:(v=this.workerFunctions.getOffscreenCanvas())!=null?v:{getContext:()=>null},...W,dynamicLibraries:this.getWasmDynamicLibraries(w),locateFile:d=>e+d,noInitialRun:true,preRun:[async()=>{try{await a$8({writableDataPath:this.writableDataPath,indexedDBTimeoutMs:i});}catch(d){if(d.name==="BlockedIndexedDB"){m(d.toString());return}a$3.log(a$3.Level.Debug,"No IndexedDB support, some data will not be persisted:",d);}p=true,this.start(p,u,f);}],onMainComplete:()=>{if([u,p].includes(false)){a$3.log(a$3.Level.Warn,{runtimeLoaded:u,fileSystemSynced:p},"Both runtimeLoaded and fileSystemSynced should be true when calling onMainComplete"),m("onMainComplete has been called but runtime or file system was not ready.");return}f();},onRuntimeInitialized:()=>{u=true,this.start(p,u,f);},print:d=>{a$3.info(d);}}),await a$9(o,b)||m(`Couldn't retrieve Scandit Data Capture library at ${o}, did you configure the path for it correctly?`),C}};P.get3dPartyLicenseKeyMethodName=atob("Z2V0QmxpbmtJZExpY2Vuc2VLZXk=");var V=P;export{V as a};
|