@scandit/web-datacapture-core 7.3.0 → 7.4.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/electron/common.cjs +1 -1
- package/build/electron/constants.cjs +1 -1
- package/build/electron/main.cjs +1 -1
- package/build/electron/main.js +1 -1
- package/build/electron/preload.cjs +1 -1
- package/build/js/AimerViewfinder.js +1 -1
- package/build/js/Brush.js +1 -1
- package/build/js/{Camera-Cq6F5pJF.d.ts → Camera-wG9iakev.d.ts} +7 -2
- package/build/js/Camera.d.ts +1 -1
- package/build/js/Camera.js +1 -1
- package/build/js/CameraAccess.d.ts +1 -1
- package/build/js/CameraAccess.js +1 -1
- package/build/js/CameraRelated.d.ts +1 -1
- package/build/js/CameraRelated.js +1 -1
- package/build/js/DataCaptureContext.d.ts +1 -1
- package/build/js/DataCaptureContext.js +1 -1
- package/build/js/DataCaptureContextRelated.d.ts +1 -1
- package/build/js/DataCaptureVersion.js +1 -1
- package/build/js/DataCaptureView.d.ts +1 -1
- package/build/js/DataCaptureView.js +1 -1
- package/build/js/Defaults.d.ts +9 -2
- package/build/js/Defaults.js +1 -1
- package/build/js/Feedback.js +1 -1
- package/build/js/FrameData.d.ts +1 -1
- package/build/js/ImageFrameSource.d.ts +1 -1
- package/build/js/ImageFrameSource.js +1 -1
- package/build/js/LaserlineViewfinder.d.ts +17 -0
- package/build/js/LaserlineViewfinder.js +1 -0
- package/build/js/RectangularViewfinder.js +1 -1
- package/build/js/ScanditIcon.js +1 -1
- package/build/js/ScanditIconBuilder.js +1 -1
- package/build/js/SingleImageUploader.d.ts +1 -1
- package/build/js/SingleImageUploader.js +1 -1
- package/build/js/SingleImageUploaderSettings.js +1 -1
- package/build/js/Vibration.js +1 -1
- package/build/js/ViewfinderPlusRelated.d.ts +15 -3
- package/build/js/ViewfinderPlusRelated.js +1 -1
- package/build/js/browserHelper.js +1 -1
- package/build/js/chunks/chunk-2HTI5D6Y.js +1 -0
- package/build/js/chunks/{chunk-2WFRFPNN.js → chunk-2T36DQ52.js} +1 -1
- package/build/js/chunks/{chunk-DCVQRKUG.js → chunk-2XJKSSK4.js} +1 -1
- package/build/js/chunks/{chunk-H4TH4342.js → chunk-42THCP2K.js} +1 -1
- package/build/js/chunks/{chunk-HY2GIAZH.js → chunk-4D2BPF6X.js} +1 -1
- package/build/js/chunks/{chunk-TCJPGGHY.js → chunk-7B2VPGLP.js} +1 -1
- package/build/js/chunks/{chunk-ZG2DNH5P.js → chunk-7WQXUZB4.js} +1 -1
- package/build/js/chunks/chunk-BQDUZ37O.js +1 -0
- package/build/js/chunks/{chunk-Q7NDC6TJ.js → chunk-BS7MAI4E.js} +1 -1
- package/build/js/chunks/{chunk-IQNYV5T2.js → chunk-D3IOY5H6.js} +2 -2
- package/build/js/chunks/{chunk-Y6NN3VBO.js → chunk-DAFXSVRW.js} +1 -1
- package/build/js/chunks/{chunk-EHMSDFH7.js → chunk-DFRROFGN.js} +1 -1
- package/build/js/chunks/{chunk-ACXIZNMK.js → chunk-EUZWZFRQ.js} +1 -1
- package/build/js/chunks/{chunk-SCB3YPEP.js → chunk-FRG4HXJT.js} +1 -1
- package/build/js/chunks/{chunk-BL6D2W34.js → chunk-GDUWHYYI.js} +1 -1
- package/build/js/chunks/{chunk-UUGROS73.js → chunk-I2LMKSHH.js} +1 -1
- package/build/js/chunks/{chunk-OZQL57EF.js → chunk-IVDD7PCI.js} +1 -1
- package/build/js/chunks/chunk-IYYM2J7I.js +2 -0
- package/build/js/chunks/{chunk-LU4WMIH5.js → chunk-LEE5JACK.js} +1 -1
- package/build/js/chunks/chunk-MDSBSLWV.js +5 -0
- package/build/js/chunks/chunk-MFAA3FMX.js +1 -0
- package/build/js/chunks/{chunk-72A5262S.js → chunk-NA6AZIR5.js} +1 -1
- package/build/js/chunks/{chunk-CCL6CJ7C.js → chunk-NBFWXBYG.js} +1 -1
- package/build/js/chunks/{chunk-4QDKNW3V.js → chunk-O4TEQJ6H.js} +1 -1
- package/build/js/chunks/{chunk-TXNSQTT7.js → chunk-OH5WXZBN.js} +1 -1
- package/build/js/chunks/{chunk-UD3Z45BT.js → chunk-OPX62GWU.js} +1 -1
- package/build/js/chunks/{chunk-DGHKL762.js → chunk-P3OK36HL.js} +1 -1
- package/build/js/chunks/chunk-QLENSTBK.js +1 -0
- package/build/js/chunks/chunk-QM37NXPY.js +1 -0
- package/build/js/chunks/{chunk-FSXBNEVH.js → chunk-QQXPUJCE.js} +1 -1
- package/build/js/chunks/{chunk-BWKNTXLA.js → chunk-QYACFUV3.js} +1 -1
- package/build/js/chunks/chunk-R2JHQXH7.js +1 -0
- package/build/js/chunks/chunk-R6YWFAMT.js +1 -0
- package/build/js/chunks/{chunk-FPCLZS52.js → chunk-RWDRTV7B.js} +1 -1
- package/build/js/chunks/{chunk-K33QZEXB.js → chunk-THEE4TYK.js} +1 -1
- package/build/js/chunks/chunk-TSOWSKE3.js +1 -0
- package/build/js/chunks/{chunk-YOAZ4K7N.js → chunk-TUQETICB.js} +1 -1
- package/build/js/chunks/chunk-VGSPU525.js +1 -0
- package/build/js/chunks/{chunk-J2UL6U3I.js → chunk-WGLHZXRT.js} +1 -1
- package/build/js/chunks/chunk-XEBHIXET.js +1 -0
- package/build/js/chunks/{chunk-S6RRLBEL.js → chunk-XLFQMCQP.js} +1 -1
- package/build/js/chunks/{chunk-U2OJFO7J.js → chunk-YZPUMXQ2.js} +1 -1
- package/build/js/chunks/{chunk-FFTRSHP6.js → chunk-ZF7CDMAC.js} +1 -1
- package/build/js/chunks/{chunk-6RBX45IS.js → chunk-ZITGIXFX.js} +1 -1
- package/build/js/index.d.ts +4 -3
- package/build/js/index.js +3 -3
- package/build/js/private/CameraAccess.d.ts +1 -1
- package/build/js/private/CameraAccess.js +1 -1
- package/build/js/private/CameraManager.d.ts +1 -1
- package/build/js/private/CameraManager.js +1 -1
- package/build/js/private/CanvasDrawerWithMetrics.d.ts +1 -1
- package/build/js/private/CoreModuleLicenseTextProvider.d.ts +1 -1
- package/build/js/private/DataCaptureContextRelated.d.ts +1 -1
- package/build/js/private/FrameReaders/FrameReader.d.ts +1 -1
- package/build/js/private/FrameReaders/FrameReaderAbstract.d.ts +1 -1
- package/build/js/private/FrameReaders/GrayScaleFrameReader.d.ts +1 -1
- package/build/js/private/FrameReaders/GrayScaleFrameReader.js +1 -1
- package/build/js/private/FrameReaders/index.d.ts +1 -1
- package/build/js/private/FrameReaders/index.js +1 -1
- package/build/js/private/NormalizedConfigureOptions.d.ts +2 -1
- package/build/js/private/ViewControls+related.js +1 -1
- package/build/js/private/ViewControls_related.d.ts +1 -1
- package/build/js/private/ViewsRegistry.d.ts +1 -1
- package/build/js/private/hybridDesktopPlatformHelpers.js +1 -1
- package/build/js/private/multithreadSimdHelper.js +1 -1
- package/build/js/private/ui/atoms/AimerSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ArrowDownSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ArrowLeftSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ArrowRightSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ArrowUpSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ArrowsUp.js +1 -1
- package/build/js/private/ui/atoms/Backdrop.d.ts +28 -0
- package/build/js/private/ui/atoms/Backdrop.js +1 -0
- package/build/js/private/ui/atoms/CalendarExclamationMarkSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/CameraSwitchReverseSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/CameraSwitchSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/Card.d.ts +2 -0
- package/build/js/private/ui/atoms/Card.js +1 -1
- package/build/js/private/ui/atoms/CardList.d.ts +4 -6
- package/build/js/private/ui/atoms/CardList.js +1 -1
- package/build/js/private/ui/atoms/CheckSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ChevronDownSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ChevronLeftSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ChevronRightSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ChevronUpSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/CrossSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/Dot5xSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ExclamationMarkSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/GlassSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/HandLensCheckSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/KeyboardSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/LowStockSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/OnexSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/PrinterSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ProgressBar.js +1 -1
- package/build/js/private/ui/atoms/QuestionMarkSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/RestartSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/RoundedCheckSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/RoundedCrossSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/RoundedExclamationMarkSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ShutterButton.js +1 -1
- package/build/js/private/ui/atoms/StarFilledSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/StarHalfFilledSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/StarOutlinedSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/SvgIcon.js +1 -1
- package/build/js/private/ui/atoms/ToPickSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/Toast.d.ts +1 -1
- package/build/js/private/ui/atoms/Toast.js +1 -1
- package/build/js/private/ui/atoms/TwoxSvgIcon.js +1 -1
- package/build/js/private/ui/atoms/WrongItemSvgIcon.js +1 -1
- package/build/js/private/ui/colors.d.ts +2 -1
- package/build/js/private/ui/colors.js +1 -1
- package/build/js/private/ui/molecules/HintPresenter.d.ts +1 -1
- package/build/js/private/ui/molecules/HintPresenter.js +1 -1
- package/build/js/private/ui/molecules/LoadingOverlay.js +1 -1
- package/build/js/private/utils/index.d.ts +0 -1
- package/build/js/private/utils/index.js +1 -1
- package/build/js/private/utils/safeStorage.d.ts +18 -0
- package/build/js/private/utils/safeStorage.js +1 -0
- package/build/js/private/utils/waitTransitionEndForElement.d.ts +1 -1
- package/build/js/private/utils/waitTransitionEndForElement.js +1 -1
- package/build/js/private/utils/warnMultithreadingUnavailable.js +1 -1
- package/build/js/sdk.d.ts +1 -1
- package/build/js/worker/WorkerMain.d.ts +1 -1
- package/build/js/worker/WorkerMain.js +1 -1
- package/build/js/worker/coreCapture.inlineWorker.d.ts +1 -1
- package/build/js/worker/coreCapture.inlineWorker.js +1 -1
- package/build/js/worker/dataCaptureEngine.d.ts +1 -1
- package/build/js/worker/dataCaptureEngine.js +1 -1
- package/build/js/worker/dataCaptureLoader.d.ts +1 -1
- package/build/js/worker/dataCaptureLoader.js +1 -1
- package/build/js/worker/dataCaptureWorkerRelated.d.ts +1 -1
- package/build/js/worker/helper.js +1 -1
- package/build/js/worker/importWasmScript.js +1 -1
- package/build/js/worker/index.d.ts +1 -1
- package/build/js/worker/index.js +1 -1
- package/package.json +4 -4
- package/build/js/chunks/chunk-72DAONJI.js +0 -1
- package/build/js/chunks/chunk-7HWKBORK.js +0 -5
- package/build/js/chunks/chunk-CXBLYHGE.js +0 -1
- package/build/js/chunks/chunk-E3TDSWVQ.js +0 -1
- package/build/js/chunks/chunk-EP6NHJSG.js +0 -1
- package/build/js/chunks/chunk-MU4VAJIM.js +0 -2
- package/build/js/chunks/chunk-O5RQCBX3.js +0 -1
- package/build/js/chunks/chunk-QTV62ZV2.js +0 -1
- package/build/js/chunks/chunk-V2ZMK4M5.js +0 -1
- package/build/js/chunks/chunk-VN424TJI.js +0 -1
- package/build/js/chunks/chunk-ZVBD3EW5.js +0 -1
- package/build/js/private/utils/match.d.ts +0 -11
- package/build/js/private/utils/match.js +0 -1
- /package/build/js/chunks/{chunk-2DXPVHBJ.js → chunk-ZQFWULUQ.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$
|
|
1
|
+
import {a as a$9}from'./chunk-BA3RP6L2.js';import {a as a$4}from'./chunk-JS3T7K2Z.js';import {a as a$5,b as b$1}from'./chunk-DFRROFGN.js';import {a as a$1}from'./chunk-KCNXUTBL.js';import {a as a$3}from'./chunk-NMROJLGQ.js';import {a as a$2}from'./chunk-7SW2PEHB.js';import {a as a$6}from'./chunk-FGO2SSRS.js';import {d}from'./chunk-QQXPUJCE.js';import {a}from'./chunk-IYYM2J7I.js';import {a as a$7}from'./chunk-XR65N6EG.js';import {f}from'./chunk-OPX62GWU.js';import {a as a$8}from'./chunk-WUHKODFA.js';function b(M){return M[a$9]!=null}var O,x,P,i=class i{constructor(e,t){this.framework="web";this.runtimeEnvironment={deviceOS:(O=a.getUserAgentInfo().getOS().name)!=null?O:"",browser:(x=a.getUserAgentInfo().getBrowser().name)!=null?x:"",browserVersion:(P=a.getUserAgentInfo().getBrowser().version)!=null?P:"",get deviceModelName(){let{model:e,vendor:t}=a.getUserAgentInfo().getDevice();return (t==null||t==="")&&(t="Unknown"),(e==null||e==="")&&(e="Unknown"),[t,e].join(" ")}};this.settings=new a$2;this._frameSource=null;this._view=null;this.modes=new Set;this.nativeModes=new Set;this.components=[];this.listeners=[];this.updateListeners=new Set;this.cameraPropertiesReportListener=this.reportCameraProperties.bind(this);this.cameraAccessErrorListener=this.onCameraAccessError.bind(this);this.onWorkerMessageListener=this.onWorkerMessage.bind(this);this.onVisibilityChangeListener=this.onVisibilityChange.bind(this);this._frameHandlers=[];this._useSynchronousFrameFlow=false;var a$1,n,r,p,v,C;this.licenseKey=e,this.deviceName=(a$1=t.deviceName)!=null?a$1:"",this.dataCaptureInstance=(n=t.dataCaptureInstance)!=null?n:a$3.mainDataCaptureLoader,this.delayedRegistration=(r=t.delayedRegistration)!=null?r:false,this.highEndBlurryRecognition=(C=(v=(p=t.dataCaptureInstance)==null?void 0:p.highEndBlurryRecognition)!=null?v:a$3.mainDataCaptureLoader.highEndBlurryRecognition)!=null?C:false;}get frameSource(){return this._frameSource}get workerCommand(){return this.dataCaptureInstance.workerCommand.bind(this.dataCaptureInstance)}static async create(){return i.createWithOptions({})}static async createWithOptions(e){var a;let t=new i((a=e.licenseKey)!=null?a:a$3.userLicenseKey,{deviceName:e.deviceName});return e.settings!=null&&await t.applySettings(e.settings),await t.initialize(),t}static async getOpenSourceSoftwareLicenseInfo(){let e=[];for(let a of i.moduleLicenseTextProviders){let n=await a.getLicenseText();e.push(n);}let t=e.join(`
|
|
2
2
|
|
|
3
|
-
`);return new a$4(t)}async setFrameSource(e){let t=e!==this._frameSource;if(this._frameSource!==null&&(this._frameSource.context=null),this._frameSource=e!=null?e:null,e&&(e.context=this,await this.workerCommand("setFrameSource",{mirrorAxis:this.getMirrorAxisForFrameSource(e),isCameraFrameSource:f(e)})),await this.update([{type:"frameSourceState",newValue:this.frameSource}]),t)for(let a of this.listeners)a.didChangeFrameSource&&a.didChangeFrameSource(this,this._frameSource);}addListener(e){this.listeners.includes(e)||this.listeners.push(e);}async flushAnalytics(){await this.workerCommand("flushAnalytics",{});}removeListener(e){this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}async addMode(e){this.modes.add(e),await e.attachedToContext(this),this.updateCameraFrameFlow(),await this.update();}async removeMode(e){this.modes.delete(e),await e.detachedFromContext(),this.updateCameraFrameFlow(),await this.update();}async removeAllModes(){for(let e of this.modes)await this.removeMode(e);}async dispose(){d.instance().removeListener("cameraProperties",this.cameraPropertiesReportListener),d.instance().removeListener("cameraAccessError",this.cameraAccessErrorListener),this.unsubscribeToVisibilityChange(this.onVisibilityChangeListener),await this.workerCommand("dispose",{});}async applySettings(e){this.settings=e,await this.update();}toJSONObject(){var e,t;return {licenseKey:this.licenseKey,framework:this.framework,deviceName:this.deviceName,...this.runtimeEnvironment,modes:[...this.modes].filter(a=>!a.skipSerialization).map(a=>a.toJSONObject()),components:this.components.map(a=>a.toJSONObject()),frameSource:this.frameSource?this.frameSource.toJSONObject():null,settings:this.settings.toJSONObject(),view:(t=(e=this._view)==null?void 0:e.toJSONObject())!=null?t:null}}getView(){return this._view}async setView(e){return this._view=e,this.update([{type:"viewSet",newValue:e}])}async getAppName(){let e=null;if(a$5()){let t=await b$1();if((t==null?void 0:t.appName)==null||t.appName==="")throw new Error("Cannot retrieve electron appName. Did you set it up in package.json? https://www.electronjs.org/docs/latest/api/app#appgetname");e=t.appName;}return e}urlToHostname(e){try{return new URL(e!=null?e:"").hostname}catch(t){return ""}}getParentDomain(){var t;let e="";return parent!==window&&(e||(e=this.urlToHostname((t=location.ancestorOrigins)==null?void 0:t[0])),e||(e=this.urlToHostname(document.referrer)),e||(e="")),e.startsWith("[")&&e.endsWith("]")&&(e=e.slice(1,-1)),e}async initialize(e=true){await this.workerCommand("createContext",{context:this.toJSONObject(),deviceId:i.deviceID,delayedRegistration:this.delayedRegistration,highEndBlurryRecognition:this.highEndBlurryRecognition,appName:await this.getAppName(),parentDomain:this.getParentDomain()}),this.subscribeToWorkerMessages(this.onWorkerMessageListener),e&&(this.subscribeToCameraManagerEvents(),this.subscribeToVisibilityChange(this.onVisibilityChangeListener));}subscribeToVisibilityChange(e){document.addEventListener("visibilitychange",e);}unsubscribeToVisibilityChange(e){document.removeEventListener("visibilitychange",e);}async requestFrameData(e){return this.workerCommand("requestFrameData",{frameId:e})}performanceMark(e){a$6(globalThis.performance)&&typeof globalThis.performance.mark=="function"&&performance.mark(e);}async sendFrameToProcessor(e){let t=e instanceof ImageData?{data:e.data,width:e.width,height:e.height}:e
|
|
3
|
+
`);return new a$4(t)}async setFrameSource(e){let t=e!==this._frameSource;if(this._frameSource!==null&&(this._frameSource.context=null),this._frameSource=e!=null?e:null,e&&(e.context=this,await this.workerCommand("setFrameSource",{mirrorAxis:this.getMirrorAxisForFrameSource(e),isCameraFrameSource:f(e)})),await this.update([{type:"frameSourceState",newValue:this.frameSource}]),t)for(let a of this.listeners)a.didChangeFrameSource&&a.didChangeFrameSource(this,this._frameSource);}addListener(e){this.listeners.includes(e)||this.listeners.push(e);}async flushAnalytics(){await this.workerCommand("flushAnalytics",{});}removeListener(e){this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}async addMode(e){this.modes.add(e),await e.attachedToContext(this),this.updateCameraFrameFlow(),await this.update();}async removeMode(e){this.modes.delete(e),await e.detachedFromContext(),this.updateCameraFrameFlow(),await this.update();}async removeAllModes(){for(let e of this.modes)await this.removeMode(e);}async dispose(){d.instance().removeListener("cameraProperties",this.cameraPropertiesReportListener),d.instance().removeListener("cameraAccessError",this.cameraAccessErrorListener),this.unsubscribeToVisibilityChange(this.onVisibilityChangeListener),await this.workerCommand("dispose",{});}async applySettings(e){this.settings=e,await this.update();}toJSONObject(){var e,t;return {licenseKey:this.licenseKey,framework:this.framework,deviceName:this.deviceName,...this.runtimeEnvironment,modes:[...this.modes].filter(a=>!a.skipSerialization).map(a=>a.toJSONObject()),components:this.components.map(a=>a.toJSONObject()),frameSource:this.frameSource?this.frameSource.toJSONObject():null,settings:this.settings.toJSONObject(),view:(t=(e=this._view)==null?void 0:e.toJSONObject())!=null?t:null}}getView(){return this._view}async setView(e){return this._view=e,this.update([{type:"viewSet",newValue:e}])}async getAppName(){let e=null;if(a$5()){let t=await b$1();if((t==null?void 0:t.appName)==null||t.appName==="")throw new Error("Cannot retrieve electron appName. Did you set it up in package.json? https://www.electronjs.org/docs/latest/api/app#appgetname");e=t.appName;}return e}urlToHostname(e){try{return new URL(e!=null?e:"").hostname}catch(t){return ""}}getParentDomain(){var t;let e="";return parent!==window&&(e||(e=this.urlToHostname((t=location.ancestorOrigins)==null?void 0:t[0])),e||(e=this.urlToHostname(document.referrer)),e||(e="")),e.startsWith("[")&&e.endsWith("]")&&(e=e.slice(1,-1)),e}async initialize(e=true){await this.workerCommand("createContext",{context:this.toJSONObject(),deviceId:i.deviceID,delayedRegistration:this.delayedRegistration,highEndBlurryRecognition:this.highEndBlurryRecognition,appName:await this.getAppName(),parentDomain:this.getParentDomain()}),this.subscribeToWorkerMessages(this.onWorkerMessageListener),e&&(this.subscribeToCameraManagerEvents(),this.subscribeToVisibilityChange(this.onVisibilityChangeListener));}subscribeToVisibilityChange(e){document.addEventListener("visibilitychange",e);}unsubscribeToVisibilityChange(e){document.removeEventListener("visibilitychange",e);}async requestFrameData(e){return this.workerCommand("requestFrameData",{frameId:e})}performanceMark(e){a$6(globalThis.performance)&&typeof globalThis.performance.mark=="function"&&performance.mark(e);}async sendFrameToProcessor(e){let t=e instanceof ImageData?{data:e.data,width:e.width,height:e.height}:e,a=await this.sendFrameToHandlers(t);return t.data=a.capture.data,a.skip?a.capture:(this.performanceMark("processFrameBeforeSDC"),this.sendFrameToSDC(t))}async sendFrameToHandlers(e){for(let t of this._frameHandlers)if((await t(e)).action==="skip")return {skip:true,capture:e};return {skip:false,capture:e}}async sendFrameToSDC(e){return this.workerCommand("processFrame",e,[e.data.buffer])}registerFrameHandler(e){this._frameHandlers.includes(e)||this._frameHandlers.push(e);}unregisterFrameHandler(e){this._frameHandlers.includes(e)&&this._frameHandlers.splice(this._frameHandlers.indexOf(e),1);}onVisibilityChange(){this.workerCommand("documentVisibility",{state:document.visibilityState});}onWorkerMessage(e){if(e.type==="contextDidChangeStatus"){e.payload.isValid||a$7.error(e.payload);for(let t of this.listeners)t.didChangeStatus&&t.didChangeStatus(this,a$8.fromJSON(e.payload));}if(e.type==="didStartObservingContext")for(let t of this.listeners)t.didStartObservingContext&&t.didStartObservingContext(this);e.type==="onFrameProcessingFinished"&&this.performanceMark("processFrameAfterSDC");}subscribeToCameraManagerEvents(){d.instance().addListener("cameraProperties",this.cameraPropertiesReportListener),d.instance().addListener("cameraAccessError",this.cameraAccessErrorListener);}async reportCameraProperties(e){return this.workerCommand("reportCameraProperties",e)}onCameraAccessError(e){for(let t of this.listeners)t.didChangeStatus&&t.didChangeStatus(this,a$8.fromJSON({code:33794,isValid:true,message:e.toString()}));}async update(e=[],{updateContext:t=true}={}){var a,n;t&&await this.updateContext();for(let r of e){switch(r.type){case "frameSourceState":{await((a=this._view)==null?void 0:a.onFrameSourceChange(this.frameSource));break}case "singleImageModeUploaderSettings":{(n=this._view)==null||n.onSingleImageUploaderSettingsChange(r.newValue);break}case "addOverlay":{this.addNativeOverlay(r.newValue);break}case "removeOverlay":{this.removeNativeOverlay(r.newValue);break}}for(let p of this.updateListeners)p(r);}}async updateContext(){await this.workerCommand("updateContext",{context:this.toJSONObject(),...this.getViewInfo()}).catch(e=>{a$7.warn("Error while updating context:",e);});}getViewInfo(){return this._view!=null?{view:{width:this._view.width,height:this._view.height,visible:this._view.width>0&&this._view.height>0,orientation:this._view.orientation}}:{view:null}}getMirrorAxisForFrameSource(e){let t="None";return f(e)&&e.getMirrorImageEnabled()&&(t="Y"),t}async addComponent(e){if(!this.components.includes(e))return this.components.push(e),e._context=this,this.update()}addNativeMode(e){this.nativeModes.add(e);}removeNativeMode(e){this.nativeModes.delete(e);}addNativeOverlay(e){b(e)&&this.workerCommand("addNativeOverlay",{overlayHandle:e[a$9]});}removeNativeOverlay(e){b(e)&&this.workerCommand("removeNativeOverlay",{overlayHandle:e[a$9]});}subscribeToWorkerMessages(e){this.dataCaptureInstance.addWorkerListener(e);}unsubscribeToWorkerMessages(e){this.dataCaptureInstance.removeWorkerListener(e);}hasEnabledMode(){return [...this.modes].some(e=>e.isEnabled())}async hasEnabledNativeMode(){return (await Promise.all([...this.nativeModes].map(e=>e.isEnabled()))).some(e=>e)}updateCameraFrameFlow(){let e=[...this.modes].some(t=>t._synchronousFrameFlow===true);d.instance().setFrameHandling(e);}async isFeatureSupported(e){return (await this.workerCommand("isFeatureSupported",{feature:e})).supported}};i.deviceID=a.getDeviceId(),i.moduleLicenseTextProviders=[new a$1];var D=i;
|
|
4
4
|
export{D as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d}from'./chunk-
|
|
1
|
+
import {d}from'./chunk-QM37NXPY.js';var l=class i{constructor(e){this.iconElement=d.SingleImageUploader.Settings.iconElement;this.informationElement=d.SingleImageUploader.Settings.informationElement;this.buttonElement=d.SingleImageUploader.Settings.buttonElement;this.containerStyle=d.SingleImageUploader.Settings.containerStyle;this.iconStyle=d.SingleImageUploader.Settings.iconStyle;this.informationStyle=d.SingleImageUploader.Settings.informationStyle;this.buttonStyle=d.SingleImageUploader.Settings.buttonStyle;this.onlyCameraCapture=d.SingleImageUploader.Settings.onlyCameraCapture;e!=null&&(this.iconElement=e.iconElement,this.informationElement=e.informationElement,this.buttonElement=e.buttonElement,this.containerStyle=e.containerStyle,this.iconStyle=e.iconStyle,this.informationStyle=e.informationStyle,this.buttonStyle=e.buttonStyle,this.onlyCameraCapture=e.onlyCameraCapture);}static fromJSON(e){let t=new i(null);return t.iconElement=document.createRange().createContextualFragment(e.iconElement).firstElementChild,t.informationElement=document.createRange().createContextualFragment(e.informationElement).firstElementChild,t.buttonElement=document.createRange().createContextualFragment(e.buttonElement).firstElementChild,t.containerStyle=e.containerStyle,t.iconStyle=e.iconStyle,t.informationStyle=e.informationStyle,t.buttonStyle=e.buttonStyle,t.onlyCameraCapture=e.onlyCameraCapture,t}toJSONObject(){return {iconElement:this.iconElement.outerHTML,informationElement:this.informationElement.outerHTML,buttonElement:this.buttonElement.outerHTML,containerStyle:{...this.containerStyle},iconStyle:{...this.iconStyle},informationStyle:{...this.informationStyle},buttonStyle:{...this.buttonStyle},onlyCameraCapture:this.onlyCameraCapture}}};export{l as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-IYYM2J7I.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=""}=a.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 {d}from'./chunk-
|
|
1
|
+
import {d}from'./chunk-QM37NXPY.js';import {n}from'./chunk-77BBIAZE.js';var i=class e{constructor(r=d.Brush.fillColor,o=d.Brush.strokeColor,s=d.Brush.strokeWidth){this.fill={color:r},this.stroke={color:o,width:s};}static get transparent(){let r=n.fromRGBA(255,255,255,0);return new e(r,r,0)}get fillColor(){return this.fill.color}get strokeColor(){return this.stroke.color}get strokeWidth(){return this.stroke.width}static areEquals(r,o){return r==null||o==null?false:n.areEquals(r.fill.color,o.fill.color)&&n.areEquals(r.stroke.color,o.stroke.color)&&r.stroke.width===o.stroke.width}toJSONObject(){return {fill:{color:this.fillColor.toJSON()},stroke:{width:this.strokeWidth,color:this.strokeColor.toJSON()}}}static fromJSONObject(r){return new e(n.fromJSON(r.fill.color),n.fromJSON(r.stroke.color),r.stroke.width)}};export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-R6YWFAMT.js';import {a}from'./chunk-XR65N6EG.js';async function s(e,o){async function a$1(){return importScripts(e)}try{await b(a$1,250,4e3,n=>{a.log(a.Level.Warn,n),a.log(a.Level.Warn,`Couldn't retrieve Scandit Data Capture library at ${e}, retrying...`);}),self.Module.mainScriptUrlOrBlob=e;let t=globalThis.SDC_WASM_JS_VERSION;return t!==o&&a.log(a.Level.Warn,`The Scandit Data Capture library JS file found at ${e} seems invalid: expected version doesn't match (received: ${t}, expected: ${o}). Please ensure the correct Scandit Data Capture file (with correct version) is retrieved.`),true}catch(t){return a.log(a.Level.Error,t),false}}export{s as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {e}from'./chunk-
|
|
1
|
+
import {e}from'./chunk-IVDD7PCI.js';import {a as a$1}from'./chunk-MU6SADSF.js';import {a}from'./chunk-EV4OEANA.js';import {a as a$2}from'./chunk-3A4KLILV.js';import {a as a$3}from'./chunk-LSZZVJ6B.js';import {n as n$1}from'./chunk-77BBIAZE.js';var v=(e=>(e.Circle="circle",e.Square="square",e))(v||{}),c="--width",l="--height",h="--background-color",d="--stroke-color",p="--stroke-width",n=class n extends a{constructor(){super();this.onSlotChangeListener=this.onSlotChange.bind(this);let e=this.attachShadow({mode:"open"});e.innerHTML=a$1`<div class="container shape-none"><slot /></div>`,this.containerElement=e.querySelector(".container"),this.setStylePropertyValue(c,"32px"),this.setStylePropertyValue(l,"32px"),this.setStylePropertyValue(h,"transparent"),this.setStylePropertyValue(d,"#fff"),this.setStylePropertyValue(p,"0px"),e.append(n.createStyleElement().cloneNode(true));}get iconColor(){var o,r;let e=(o=this.shadowRoot)==null?void 0:o.querySelector("slot"),t=(r=e==null?void 0:e.assignedElements())!=null?r:[];return n$1.fromHex(t[0].fill)}set iconColor(e){this.render({propChanged:"iconcolor",value:`#${e.toJSON()}`});}get backgroundColor(){return n$1.fromHex(this.getStylePropertyValue(h))}set backgroundColor(e){this.render({propChanged:"backgroundcolor",value:`#${e.toJSON()}`});}get backgroundStrokeColor(){return n$1.fromHex(this.getStylePropertyValue(d))}set backgroundStrokeColor(e){this.render({propChanged:"backgroundstrokecolor",value:`#${e.toJSON()}`});}get backgroundStrokeWidth(){let e=this.getStylePropertyValue(p);return Number.parseInt(e,10)}set backgroundStrokeWidth(e){this.render({propChanged:"backgroundstrokewidth",value:String(e)});}get backgroundShape(){var t;let e=(t=/shape-(.*)/.exec(this.containerElement.classList.value))==null?void 0:t[1];return e!=null&&e!=="none"?e:null}set backgroundShape(e){this.render({propChanged:"backgroundshape",value:e!=null?e:"none"});}set width(e){this.render({propChanged:"width",value:String(e)}),this.updateIconSizeProperty(e,this.height);}get width(){let e=this.getStylePropertyValue(c).replace("px","");return Number.parseInt(e,10)}set height(e){this.render({propChanged:"height",value:String(e)}),this.updateIconSizeProperty(this.width,e);}get height(){let e=this.getStylePropertyValue(l).replace("px","");return Number.parseInt(e,10)}static create(){return n.register(),document.createElement(n.tag)}static register(){a$2({[n.tag]:n});}static createStyleElement(){return a$3`:host{display:inline-block;--width:32px;--height:32px;--background-color:transparent;--stroke-color:#fff;--stroke-width:0px}:host([hidden]){display:none}.container{background-color:var(--background-color);box-shadow:0 1px 2px 0 #${e.withAlpha(.3).toJSON()};height:calc(var(--height) - var(--stroke-width));outline:var(--stroke-width) solid var(--stroke-color);position:relative;width:calc(var(--width) - var(--stroke-width))}.container.shape-${"circle"}{border-radius:50%}.container.shape-${"square"}{border-radius:0}.container.shape-none{box-shadow:unset}::slotted(*){left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}`}onSlotChange(){this.updateIconSizeProperty(this.width,this.height);}connectedCallback(){var t;let e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");e==null||e.addEventListener("slotchange",this.onSlotChangeListener);}disconnectedCallback(){var t;let e=(t=this.shadowRoot)==null?void 0:t.querySelector("slot");e==null||e.removeEventListener("slotchange",this.onSlotChangeListener);}render({propChanged:e,value:t}){switch(e){case "width":{this.setStylePropertyValue(c,`${t}px`);break}case "height":{this.setStylePropertyValue(l,`${t}px`);break}case "backgroundstrokewidth":{this.setStylePropertyValue(p,`${t}px`);break}case "backgroundstrokecolor":{this.setStylePropertyValue(d,t);break}case "backgroundcolor":{this.setStylePropertyValue(h,t);break}case "iconcolor":{this.updateFillIconColor(n$1.fromHex(t));break}case "backgroundshape":{let o=t;this.containerElement.classList.toggle("shape-circle",o==="circle"),this.containerElement.classList.toggle("shape-square",o==="square"),this.containerElement.classList.toggle("shape-none",o==="none");break}}}attributeChangedCallback(e,t,o){this.render({propChanged:e,value:o});}getStylePropertyValue(e){return this.containerElement.style.getPropertyValue(e)}setStylePropertyValue(e,t){this.containerElement.style.setProperty(e,t);}updateIconSizeProperty(e,t){var s,u;let o=(s=this.shadowRoot)==null?void 0:s.querySelector("slot"),r=(u=o==null?void 0:o.assignedElements())!=null?u:[],a=Math.min(e,t);for(let C of r)C.size=a/2;}setIconSize(e){var r,a;let t=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),o=(a=t==null?void 0:t.assignedElements())!=null?a:[];for(let s of o)s.size=e;}updateFillIconColor(e){var r,a;let t=(r=this.shadowRoot)==null?void 0:r.querySelector("slot"),o=(a=t==null?void 0:t.assignedElements())!=null?a:[];for(let s of o)s.fill=`#${e.toJSON()}`;}};n.tag="scandit-barcode-icon-container",n.observedAttributes=["width","height","backgroundstrokecolor","backgroundcolor","backgroundstrokewidth","iconcolor","backgroundshape"];var y=n;export{v as a,y as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-NA6AZIR5.js';import {a as a$2}from'./chunk-MU6SADSF.js';import {a as a$1}from'./chunk-3A4KLILV.js';var e=class e extends a{static create(){return document.createElement(e.tag)}static register(){a$1({[e.tag]:e});}render(){return a$2`
|
|
2
2
|
<style>
|
|
3
3
|
${e.tag} {
|
|
4
4
|
display: flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {n as n$1}from'./chunk-77BBIAZE.js';var e=n$1.fromRGBA(46,193,206,1),n=n$1.fromRGBA(98,209,218,1),t=n$1.fromRGBA(151,224,230,1),c=n$1.fromRGBA(203,240,243,1),a=n$1.fromRGBA(18,22,25,1),m=n$1.fromRGBA(218,225,231,1),p=n$1.fromRGBA(40,211,128,1),G=n$1.fromRGBA(83,220,153,1),R=n$1.fromRGBA(126,229,179,1),B=n$1.fromRGBA(169,237,204,1),f=n$1.fromRGBA(212,246,230,1),s=n$1.fromRGBA(251,192,44,1),x=n$1.fromRGBA(252,205,86,1),y=n$1.fromRGBA(253,217,128,1),A=n$1.fromRGBA(254,230,171,1),d=n$1.fromRGBA(254,242,213,1),S=n$1.fromRGBA(250,68,70,1),
|
|
1
|
+
import {n as n$1}from'./chunk-77BBIAZE.js';var e=n$1.fromRGBA(46,193,206,1),n=n$1.fromRGBA(98,209,218,1),t=n$1.fromRGBA(151,224,230,1),c=n$1.fromRGBA(203,240,243,1),a=n$1.fromRGBA(18,22,25,1),m=n$1.fromRGBA(218,225,231,1),p=n$1.fromRGBA(40,211,128,1),G=n$1.fromRGBA(83,220,153,1),R=n$1.fromRGBA(126,229,179,1),B=n$1.fromRGBA(169,237,204,1),f=n$1.fromRGBA(212,246,230,1),s=n$1.fromRGBA(251,192,44,1),x=n$1.fromRGBA(252,205,86,1),y=n$1.fromRGBA(253,217,128,1),A=n$1.fromRGBA(254,230,171,1),d=n$1.fromRGBA(254,242,213,1),S=n$1.fromRGBA(250,68,70,1),l=n$1.fromRGBA(251,105,107,1),g=n$1.fromRGBA(252,143,144,1),i=n$1.fromRGBA(253,180,181,1),O=n$1.fromRGBA(254,218,218,1),T=n$1.fromRGBA(10,51,144,1),u=n$1.fromRGBA(22,96,217,1),C=n$1.fromRGBA(217,231,255,1);export{e as a,n as b,t as c,c as d,a as e,m as f,p as g,G as h,R as i,B as j,f as k,s as l,x as m,y as n,A as o,d as p,S as q,l as r,g as s,i as t,O as u,T as v,u as w,C as x};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b as b$2}from'./chunk-XEBHIXET.js';import {c,d,b as b$1,a as a$1,e}from'./chunk-42THCP2K.js';import {a,b}from'./chunk-2Q5FZVGV.js';var Ce=a((H,ee)=>{(function(m,w){var B="1.0.40",U="",x="?",E="function",g="undefined",A="object",S="string",k="major",e="model",r="name",i="type",o="vendor",n="version",T="architecture",L="console",l="mobile",u="tablet",y="smarttv",_="wearable",W="embedded",Y=500,j="Amazon",D="Apple",a="ASUS",t="BlackBerry",c="Browser",h="Chrome",O="Edge",N="Firefox",R="Google",le="Huawei",ie="LG",oe="Microsoft",be="Motorola",V="Opera",F="Samsung",ce="Sharp",X="Sony",re="Xiaomi",ne="Zebra",we="Facebook",ue="Chromium OS",de="Mac OS",pe=" Browser",Te=function(d,p){var b={};for(var v in d)p[v]&&p[v].length%2===0?b[v]=p[v].concat(d[v]):b[v]=d[v];return b},Z=function(d){for(var p={},b=0;b<d.length;b++)p[d[b].toUpperCase()]=d[b];return p},fe=function(d,p){return typeof d===S?z(p).indexOf(z(d))!==-1:false},z=function(d){return d.toLowerCase()},_e=function(d){return typeof d===S?d.replace(/[^\d\.]/g,U).split(".")[0]:w},te=function(d,p){if(typeof d===S)return d=d.replace(/^\s\s*/,U),typeof p===g?d:d.substring(0,Y)},G=function(d,p){for(var b=0,v,P,M,f,s,I;b<p.length&&!s;){var ae=p[b],ve=p[b+1];for(v=P=0;v<ae.length&&!s&&ae[v];)if(s=ae[v++].exec(d),s)for(M=0;M<ve.length;M++)I=s[++P],f=ve[M],typeof f===A&&f.length>0?f.length===2?typeof f[1]==E?this[f[0]]=f[1].call(this,I):this[f[0]]=f[1]:f.length===3?typeof f[1]===E&&!(f[1].exec&&f[1].test)?this[f[0]]=I?f[1].call(this,I,f[2]):w:this[f[0]]=I?I.replace(f[1],f[2]):w:f.length===4&&(this[f[0]]=I?f[3].call(this,I.replace(f[1],f[2])):w):this[f]=I||w;b+=2;}},$=function(d,p){for(var b in p)if(typeof p[b]===A&&p[b].length>0){for(var v=0;v<p[b].length;v++)if(fe(p[b][v],d))return b===x?w:b}else if(fe(p[b],d))return b===x?w:b;return p.hasOwnProperty("*")?p["*"]:d},Re={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},me={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ge={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[n,[r,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[n,[r,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[r,n],[/opios[\/ ]+([\w\.]+)/i],[n,[r,V+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[n,[r,V+" GX"]],[/\bopr\/([\w\.]+)/i],[n,[r,V]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[n,[r,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[n,[r,"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],[r,n],[/quark(?:pc)?\/([-\w\.]+)/i],[n,[r,"Quark"]],[/\bddg\/([\w\.]+)/i],[n,[r,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[n,[r,"UC"+c]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[n,[r,"WeChat"]],[/konqueror\/([\w\.]+)/i],[n,[r,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[n,[r,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[n,[r,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[n,[r,"Smart Lenovo "+c]],[/(avast|avg)\/([\w\.]+)/i],[[r,/(.+)/,"$1 Secure "+c],n],[/\bfocus\/([\w\.]+)/i],[n,[r,N+" Focus"]],[/\bopt\/([\w\.]+)/i],[n,[r,V+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[n,[r,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[n,[r,"Dolphin"]],[/coast\/([\w\.]+)/i],[n,[r,V+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[n,[r,"MIUI"+pe]],[/fxios\/([\w\.-]+)/i],[n,[r,N]],[/\bqihoobrowser\/?([\w\.]*)/i],[n,[r,"360"]],[/\b(qq)\/([\w\.]+)/i],[[r,/(.+)/,"$1Browser"],n],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[r,/(.+)/,"$1"+pe],n],[/samsungbrowser\/([\w\.]+)/i],[n,[r,F+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[n,[r,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[r,"Sogou Mobile"],n],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[r,n],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[r],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[n,r],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[r,we],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],[r,n],[/\bgsa\/([\w\.]+) .*safari\//i],[n,[r,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[n,[r,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[n,[r,h+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[r,h+" WebView"],n],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[n,[r,"Android "+c]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[r,n],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[n,[r,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[n,r],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[r,[n,$,Re]],[/(webkit|khtml)\/([\w\.]+)/i],[r,n],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[r,"Netscape"],n],[/(wolvic|librewolf)\/([\w\.]+)/i],[r,n],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[n,[r,N+" 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],[r,[n,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[r,[n,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[T,"amd64"]],[/(ia32(?=;))/i],[[T,z]],[/((?:i[346]|x)86)[;\)]/i],[[T,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[T,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[T,"armhf"]],[/windows (ce|mobile); ppc;/i],[[T,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[T,/ower/,U,z]],[/(sun4\w)[;\)]/i],[[T,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[T,z]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[e,[o,F],[i,u]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[e,[o,F],[i,l]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[e,[o,D],[i,l]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[e,[o,D],[i,u]],[/(macintosh);/i],[e,[o,D]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[e,[o,ce],[i,l]],[/(?:honor)([-\w ]+)[;\)]/i],[e,[o,"Honor"],[i,l]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[e,[o,le],[i,u]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[e,[o,le],[i,l]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[e,/_/g," "],[o,re],[i,l]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[e,/_/g," "],[o,re],[i,u]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[e,[o,"OPPO"],[i,l]],[/\b(opd2\d{3}a?) bui/i],[e,[o,"OPPO"],[i,u]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[e,[o,"Vivo"],[i,l]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[e,[o,"Realme"],[i,l]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[e,[o,be],[i,l]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[e,[o,be],[i,u]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[e,[o,ie],[i,u]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[e,[o,ie],[i,l]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[e,[o,"Lenovo"],[i,u]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[e,/_/g," "],[o,"Nokia"],[i,l]],[/(pixel c)\b/i],[e,[o,R],[i,u]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[e,[o,R],[i,l]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[e,[o,X],[i,l]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[e,"Xperia Tablet"],[o,X],[i,u]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[e,[o,"OnePlus"],[i,l]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[e,[o,j],[i,u]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[e,/(.+)/g,"Fire Phone $1"],[o,j],[i,l]],[/(playbook);[-\w\),; ]+(rim)/i],[e,o,[i,u]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[e,[o,t],[i,l]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[e,[o,a],[i,u]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[e,[o,a],[i,l]],[/(nexus 9)/i],[e,[o,"HTC"],[i,u]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[o,[e,/_/g," "],[i,l]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[e,[o,"TCL"],[i,u]],[/(itel) ((\w+))/i],[[o,z],e,[i,$,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[e,[o,"Acer"],[i,u]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[e,[o,"Meizu"],[i,l]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[e,[o,"Ulefone"],[i,l]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[e,[o,"Energizer"],[i,l]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[e,[o,"Cat"],[i,l]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[e,[o,"Smartfren"],[i,l]],[/droid.+; (a(?:015|06[35]|142p?))/i],[e,[o,"Nothing"],[i,l]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[o,e,[i,l]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[o,e,[i,u]],[/(surface duo)/i],[e,[o,oe],[i,u]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[e,[o,"Fairphone"],[i,l]],[/(u304aa)/i],[e,[o,"AT&T"],[i,l]],[/\bsie-(\w*)/i],[e,[o,"Siemens"],[i,l]],[/\b(rct\w+) b/i],[e,[o,"RCA"],[i,u]],[/\b(venue[\d ]{2,7}) b/i],[e,[o,"Dell"],[i,u]],[/\b(q(?:mv|ta)\w+) b/i],[e,[o,"Verizon"],[i,u]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[e,[o,"Barnes & Noble"],[i,u]],[/\b(tm\d{3}\w+) b/i],[e,[o,"NuVision"],[i,u]],[/\b(k88) b/i],[e,[o,"ZTE"],[i,u]],[/\b(nx\d{3}j) b/i],[e,[o,"ZTE"],[i,l]],[/\b(gen\d{3}) b.+49h/i],[e,[o,"Swiss"],[i,l]],[/\b(zur\d{3}) b/i],[e,[o,"Swiss"],[i,u]],[/\b((zeki)?tb.*\b) b/i],[e,[o,"Zeki"],[i,u]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[o,"Dragon Touch"],e,[i,u]],[/\b(ns-?\w{0,9}) b/i],[e,[o,"Insignia"],[i,u]],[/\b((nxa|next)-?\w{0,9}) b/i],[e,[o,"NextBook"],[i,u]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[o,"Voice"],e,[i,l]],[/\b(lvtel\-)?(v1[12]) b/i],[[o,"LvTel"],e,[i,l]],[/\b(ph-1) /i],[e,[o,"Essential"],[i,l]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[e,[o,"Envizen"],[i,u]],[/\b(trio[-\w\. ]+) b/i],[e,[o,"MachSpeed"],[i,u]],[/\btu_(1491) b/i],[e,[o,"Rotor"],[i,u]],[/(shield[\w ]+) b/i],[e,[o,"Nvidia"],[i,u]],[/(sprint) (\w+)/i],[o,e,[i,l]],[/(kin\.[onetw]{3})/i],[[e,/\./g," "],[o,oe],[i,l]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[e,[o,ne],[i,u]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[e,[o,ne],[i,l]],[/smart-tv.+(samsung)/i],[o,[i,y]],[/hbbtv.+maple;(\d+)/i],[[e,/^/,"SmartTV"],[o,F],[i,y]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[o,ie],[i,y]],[/(apple) ?tv/i],[o,[e,D+" TV"],[i,y]],[/crkey/i],[[e,h+"cast"],[o,R],[i,y]],[/droid.+aft(\w+)( bui|\))/i],[e,[o,j],[i,y]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[e,[o,ce],[i,y]],[/(bravia[\w ]+)( bui|\))/i],[e,[o,X],[i,y]],[/(mitv-\w{5}) bui/i],[e,[o,re],[i,y]],[/Hbbtv.*(technisat) (.*);/i],[o,e,[i,y]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[o,te],[e,te],[i,y]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[i,y]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[o,e,[i,L]],[/droid.+; (shield) bui/i],[e,[o,"Nvidia"],[i,L]],[/(playstation [345portablevi]+)/i],[e,[o,X],[i,L]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[e,[o,oe],[i,L]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[e,[o,F],[i,_]],[/((pebble))app/i],[o,e,[i,_]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[e,[o,D],[i,_]],[/droid.+; (glass) \d/i],[e,[o,R],[i,_]],[/droid.+; (wt63?0{2,3})\)/i],[e,[o,ne],[i,_]],[/droid.+; (glass) \d/i],[e,[o,R],[i,_]],[/(pico) (4|neo3(?: link|pro)?)/i],[o,e,[i,_]],[/; (quest( \d| pro)?)/i],[e,[o,we],[i,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[o,[i,W]],[/(aeobc)\b/i],[e,[o,j],[i,W]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[e,[i,l]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[e,[i,u]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[i,u]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[i,l]],[/(android[-\w\. ]{0,9});.+buil/i],[e,[o,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[n,[r,O+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[r,n],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[n,[r,"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],[r,n],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[n,r]],os:[[/microsoft (windows) (vista|xp)/i],[r,n],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[r,[n,$,me]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[n,$,me],[r,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[n,/_/g,"."],[r,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[r,de],[n,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[n,r],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[r,n],[/\(bb(10);/i],[n,[r,t]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[n,[r,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[n,[r,N+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[n,[r,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[n,[r,"watchOS"]],[/crkey\/([\d\.]+)/i],[n,[r,h+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[r,ue],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],[r,n],[/(sunos) ?([\w\.\d]*)/i],[[r,"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],[r,n]]},C=function(d,p){if(typeof d===A&&(p=d,d=w),!(this instanceof C))return new C(d,p).getResult();var b=typeof m!==g&&m.navigator?m.navigator:w,v=d||(b&&b.userAgent?b.userAgent:U),P=b&&b.userAgentData?b.userAgentData:w,M=p?Te(ge,p):ge,f=b&&b.userAgent==v;return this.getBrowser=function(){var s={};return s[r]=w,s[n]=w,G.call(s,v,M.browser),s[k]=_e(s[n]),f&&b&&b.brave&&typeof b.brave.isBrave==E&&(s[r]="Brave"),s},this.getCPU=function(){var s={};return s[T]=w,G.call(s,v,M.cpu),s},this.getDevice=function(){var s={};return s[o]=w,s[e]=w,s[i]=w,G.call(s,v,M.device),f&&!s[i]&&P&&P.mobile&&(s[i]=l),f&&s[e]=="Macintosh"&&b&&typeof b.standalone!==g&&b.maxTouchPoints&&b.maxTouchPoints>2&&(s[e]="iPad",s[i]=u),s},this.getEngine=function(){var s={};return s[r]=w,s[n]=w,G.call(s,v,M.engine),s},this.getOS=function(){var s={};return s[r]=w,s[n]=w,G.call(s,v,M.os),f&&!s[r]&&P&&P.platform&&P.platform!="Unknown"&&(s[r]=P.platform.replace(/chrome os/i,ue).replace(/macos/i,de)),s},this.getResult=function(){return {ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return v},this.setUA=function(s){return v=typeof s===S&&s.length>Y?te(s,Y):s,this},this.setUA(v),this};C.VERSION=B,C.BROWSER=Z([r,n,k]),C.CPU=Z([T]),C.DEVICE=Z([e,o,i,L,l,y,u,_,W]),C.ENGINE=C.OS=Z([r,n]),typeof H!==g?(typeof ee!==g&&ee.exports&&(H=ee.exports=C),H.UAParser=C):typeof define===E&&define.amd?define(function(){return C}):typeof m!==g&&(m.UAParser=C);var q=typeof m!==g&&(m.jQuery||m.Zepto);if(q&&!q.ua){var K=new C;q.ua=K.getResult(),q.ua.get=function(){return K.getUA()},q.ua.set=function(d){K.setUA(d);var p=K.getResult();for(var b in p)q.ua[b]=p[b];};}})(typeof window=="object"?window:H);});function Q(m){for(var w=1;w<arguments.length;w++){var B=arguments[w];for(var U in B)m[U]=B[U];}return m}var Ie={read:function(m){return m[0]==='"'&&(m=m.slice(1,-1)),m.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(m){return encodeURIComponent(m).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function se(m,w){function B(x,E,g){if(!(typeof document>"u")){g=Q({},w,g),typeof g.expires=="number"&&(g.expires=new Date(Date.now()+g.expires*864e5)),g.expires&&(g.expires=g.expires.toUTCString()),x=encodeURIComponent(x).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var A="";for(var S in g)g[S]&&(A+="; "+S,g[S]!==true&&(A+="="+g[S].split(";")[0]));return document.cookie=x+"="+m.write(E,x)+A}}function U(x){if(!(typeof document>"u"||arguments.length&&!x)){for(var E=document.cookie?document.cookie.split("; "):[],g={},A=0;A<E.length;A++){var S=E[A].split("="),k=S.slice(1).join("=");try{var e=decodeURIComponent(S[0]);if(g[e]=m.read(k,e),x===e)break}catch(r){}}return x?g[x]:g}}return Object.create({set:B,get:U,remove:function(x,E){B(x,"",Q({},E,{expires:-1}));},withAttributes:function(x){return se(this.converter,Q({},this.attributes,x))},withConverter:function(x){return se(Q({},this.converter,x),this.attributes)}},{attributes:{value:Object.freeze(w)},converter:{value:Object.freeze(m)}})}var Oe=se(Ie,{path:"/"});var Ae=b(Ce(),1);var Ee;(D=>{let m;function w(){return m==null&&(m=new Ae.default(navigator.userAgent)),m}D.getUserAgentInfo=w;function B(){var c;if("orientation"in window)return false;let a="(any-pointer: coarse)",t=(c=window.matchMedia)==null?void 0:c.call(window,a);return navigator.maxTouchPoints===0||(t==null?void 0:t.media)===a&&!(t!=null&&t.matches)}D.isDesktopDevice=B;function U(){return w().getDevice().model==="iPhone"}D.isIPhone=U;function x(){let a=w().getOS();return a.name==="iOS"&&a.version!=null&&a.version.localeCompare("16.3",void 0,{numeric:true})>=0}D.isIOSDeviceWithExtendedCameraAccess=x;function E(){return "document"in window?window.document.createElement("canvas"):null}D.getCanvas=E;function g(a){return a.name==="iOS"&&a.version!=null&&["11.2.2","11.2.5","11.2.6"].includes(a.version)}async function A(){return c()}D.hasSIMDSupport=A;async function S(){return d()}D.hasThreadsSupport=S;function k(a,t,c){let h=a[t[0]];return h==null?false:t.length===1?typeof h===c:(typeof h=="function"||typeof h=="object")&&k(h,t.slice(1),c)}function e$1(){var N;let a=true,t=null,c=null,h=null,O=null;try{if(t=D.getCanvas(),c=D.getCanvas(),h=t==null?void 0:t.getContext("webgl"),O=c==null?void 0:c.getContext("experimental-webgl"),!k(window,["WebGLRenderingContext"],"function")||h==null&&O==null)throw new Error("WebGLRenderingContext is not supported")}catch(R){a=false;}finally{for(let R of [h,O])typeof(R==null?void 0:R.getExtension)=="function"&&((N=R.getExtension("WEBGL_lose_context"))==null||N.loseContext());h=null,O=null,t=null,c=null;}return a}function r(){let a=true,t=true,c=new Set;location.protocol.startsWith("http")||c.add("httpProtocol"),k(window,["isSecureContext"],"boolean")&&!window.isSecureContext&&c.add("secureContext"),!k(navigator,["mediaDevices","getUserMedia"],"function")&&!k(navigator,["enumerateDevices"],"function")&&!k(window,["MediaStreamTrack","getSources"],"function")&&(c.add("mediaDevices"),a=false),k(window,["Worker"],"function")||(c.add("webWorkers"),a=false,t=false),k(window,["WebAssembly"],"object")||(c.add("webAssembly"),a=false,t=false),k(window,["Blob"],"function")||(c.add("blob"),a=false,t=false),k(window,["URL","createObjectURL"],"function")||(c.add("urlObject"),a=false,t=false),k(window,["OffscreenCanvas"],"function")||c.add("offscreenCanvas"),e$1()||c.add("webGL");let h=w().getOS();return g(h)&&(c.add("webAssemblyErrorFree"),a=false,t=false),b$1()||c.add("sharedArrayBuffer"),a$1()||c.add("crossOriginIsolated"),{fullSupport:a,scannerSupport:t,missingFeatures:[...c]}}D.checkBrowserCompatibility=r;async function i(){return e()}D.checkMultithreadingSupport=i;function o(){let a="scandit-device-id",t=b$2.getItem(a);if(t!=null&&t!=="")return t;if(t=Oe.get(a),t!=null&&t!=="")return b$2.setItem(a,t),t;let c=new Uint8Array(20);return crypto.getRandomValues(c),t=[...c].map(h=>{let O=h.toString(16);return O.length===1?`0${O}`:O}).join(""),b$2.setItem(a,t),t}D.getDeviceId=o;function n(a){return a instanceof HTMLElement||a!=null&&typeof a=="object"&&typeof a.tagName=="string"}D.isValidHTMLElement=n;function T(){var h,O;let a=w().getOS();if(a.name!=="iOS")return true;let[t,c]=(O=(h=a.version)==null?void 0:h.split(".").map(Number))!=null?O:[];return t>14||t===14&&c>=6}D.isSupportedIOSVersion=T;function L(){var a,t;return (t=(a=w().getBrowser().name)==null?void 0:a.toLowerCase().includes("safari"))!=null?t:false}D.isSafari=L;function l(){var t,c;return /iphone|ipod|ipad/.test((c=(t=w().getDevice().model)==null?void 0:t.toLowerCase())!=null?c:"")&&!L()}D.isIosWebView=l;async function u(){var t;return ((t=w().getOS().name)==null?void 0:t.toLowerCase())!=="android"?false:w().getUA().includes("wv")?true:[...(await fetch(document.location.toString(),{method:"HEAD"})).headers].some(([c])=>c.toLowerCase()==="x-requested-with")}D.isAndroidWebView=u;function y(){return w().getOS().name==="Windows"}D.isWindows=y;function _(){return w().getBrowser().name==="Firefox"}D.isFirefox=_;function W(){if("navigator"in globalThis){for(let a of ["vibrate","webkitVibrate","msVibrate","mozVibrate"])if(typeof navigator[a]=="function")return navigator[a]}}D.getSupportedVibrationMethod=W;function Y(){return W()!=null&&!B()&&!y()&&!_()}D.isVibrationAvailable=Y;function j(){return w().getOS().name==="iOS"}D.isIOS=j;})(Ee||(Ee={}));
|
|
2
|
+
export{Ee as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d}from'./chunk-
|
|
1
|
+
import {d}from'./chunk-QM37NXPY.js';import {n,l,d as d$1}from'./chunk-77BBIAZE.js';var s=class{constructor(i,e){this.type="rectangular";this._disabledColor=n.fromRGBA(0,0,0,0);let n$1=i!=null?i:d.RectangularViewfinder.defaultStyle;this._style=d.RectangularViewfinder.styles[n$1].style,this._lineStyle=d.RectangularViewfinder.styles[n$1].lineStyle,this._dimming=d.RectangularViewfinder.styles[n$1].dimming,this._animation=d.RectangularViewfinder.styles[n$1].animation,this.color=d.RectangularViewfinder.styles[n$1].color,this._sizeWithUnitAndAspect=d.RectangularViewfinder.styles[n$1].size,e!==void 0&&(this._lineStyle=e);}get animation(){return this._animation}set animation(i){this._animation=i;}get dimming(){return this._dimming}set dimming(i){this._dimming=i;}get lineStyle(){return this._lineStyle}get sizeWithUnitAndAspect(){return this._sizeWithUnitAndAspect}get style(){return this._style}get disabledColor(){return this._disabledColor}set disabledColor(i){this._disabledColor=i;}setHeightAndAspectRatio(i,e){this._sizeWithUnitAndAspect=l.sizeWithHeightAndAspectRatio(i,e);}setShorterDimensionAndAspectRatio(i,e){this._sizeWithUnitAndAspect=l.sizeWithShorterDimensionAndAspectRatio(new d$1(i,"fraction"),e);}setSize(i){this._sizeWithUnitAndAspect=l.sizeWithWidthAndHeight(i);}setWidthAndAspectRatio(i,e){this._sizeWithUnitAndAspect=l.sizeWithWidthAndAspectRatio(i,e);}toJSONObject(){return {type:this.type,color:this.color.toJSON(),style:this.style,lineStyle:this.lineStyle,dimming:this.dimming,animation:this.animation?this.animation.toJSONObject():null,size:this.sizeWithUnitAndAspect.toJSONObject(),disabledColor:this._disabledColor.toJSON()}}};export{s as a};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import {a}from'./chunk-MU6SADSF.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$2}from'./chunk-3A4KLILV.js';import {a as a$3}from'./chunk-LSZZVJ6B.js';import {n}from'./chunk-77BBIAZE.js';var i=a`
|
|
2
|
+
<div role="listitem">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
`,r=class r extends a$1{constructor(){super();let o=this.attachShadow({mode:"open"});o.innerHTML=i,o.append(r.createStyleElement().cloneNode(true));}set backgroundColor(o){this.style.setProperty("--background-color",`#${o.toJSON()}`);}get backgroundColor(){return n.fromHex(this.style.getPropertyValue("--background-color"))}set borderColor(o){this.style.setProperty("--border-color",`#${o.toJSON()}`);}get borderColor(){return n.fromHex(this.style.getPropertyValue("--border-color"))}static create(){return document.createElement(r.tag)}static register(){a$2({[r.tag]:r});}static createStyleElement(){return a$3`:host{--corner-radius:0.75rem;--background-color:#ffffffe6;--border-color:transparent;backdrop-filter:saturate(180%) blur(20px);background-color:var(--background-color);border:1px solid var(--border-color);border-radius:var(--corner-radius);box-shadow:0 2px 6px 0 rgba(18,22,25,.15);box-sizing:border-box;display:block;font-family:SF Pro Text,sans-serif;max-height:100px;min-height:5rem;min-width:200px}:host([with-border]){--border-color:#d92121}`}};r.tag="scandit-basic-card";var t=r;t.register();export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {d}from'./chunk-4D2BPF6X.js';var i;(m=>{async function n(o,t){return d.getCameras(o!=null?o:false,t!=null?t:false)}m.getCameras=n;})(i||(i={}));export{i as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-MU6SADSF.js';import {a}from'./chunk-EV4OEANA.js';import {a as a$1}from'./chunk-3A4KLILV.js';var r="inline-style",e=class e extends a{get fill(){var t;return (t=this.getAttribute("fill"))!=null?t:"black"}set fill(t){this.setAttribute("fill",t);}get size(){var t;return Number((t=this.getAttribute("size"))!=null?t:"32")}set size(t){this.setAttribute("size",t.toString());}get[r](){return this.getAttribute(r)}set[r](t){t==null?this.removeAttribute(r):this.setAttribute(r,t);}static create(){return a$1({[e.tag]:e}),document.createElement(e.tag)}render(){return a$2`<div></div>`}heightForViewbox(t,i){return this.size*this.aspectRatioForViewbox(t,i)}aspectRatioForViewbox(t,i){return i/t}connectedCallback(){this.innerHTML=this.render();}attributeChangedCallback(t,i,b){b!==i&&(this.innerHTML=this.render());}};e.tag="scandit-svg-icon",e.observedAttributes=["fill","size"];var u=e;export{u as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-XLFQMCQP.js';import {d as d$1}from'./chunk-4D2BPF6X.js';import {a as a$2}from'./chunk-IYYM2J7I.js';import {a}from'./chunk-XR65N6EG.js';import {f as f$1,g as g$1}from'./chunk-OPX62GWU.js';var S=(t=>(t.Idle="idle",t.Pressed="pressed",t))(S||{}),d=class{constructor(e,t){this.state="idle";this.isHover=false;this.control=e,this.domHost=t,this.onTouchStartListener=this.onTouchStart.bind(this),this.onMouseEnterListener=this.onMouseEnter.bind(this),this.onMouseLeaveListener=this.onMouseLeave.bind(this),this.onClickListener=this.onClick.bind(this),this.setup();}get frameSource(){var e,t;return (t=(e=this.control.view)==null?void 0:e.getContext())==null?void 0:t.frameSource}get context(){var e;return (e=this.control.view)==null?void 0:e.getContext()}async install(){this.button||this.setup();let e=await this.canShow();return e?(this.updateButtonBackground(this.button,this.getImageFromState()),this.show()):this.hide(),e}remove(e=false){e&&this.button?(this.button.removeEventListener("mouseenter",this.onMouseEnterListener),this.button.removeEventListener("mouseleave",this.onMouseLeaveListener),this.button.removeEventListener("touchstart",this.onTouchStartListener),this.button.removeEventListener("click",this.onClickListener),this.button.remove(),this.isHover=false,this.button=void 0):this.hide();}hide(){this.button&&(this.button.style.display="none");}show(){this.button&&(this.button.style.display="block");}setupButton(){let e=document.createElement("button");return e.type="button",e.style.display="none",e.className=`scandit-control-widget scandit-control-widget-${this.control.type}`,this.updateButtonBackground(e,this.getImageFromState()),this.domHost.append(e),e.addEventListener("mouseenter",this.onMouseEnterListener),e.addEventListener("mouseleave",this.onMouseLeaveListener),a$2.isDesktopDevice()||e.addEventListener("touchstart",this.onTouchStartListener),e.addEventListener("click",this.onClickListener),e.setAttribute("aria-pressed",String(this.state==="pressed")),this.button=e,this.button}setup(){this.setupButton();}onTouchStart(){var e,t;(e=this.button)==null||e.removeEventListener("mouseenter",this.onMouseEnterListener),(t=this.button)==null||t.removeEventListener("mouseleave",this.onMouseLeaveListener);}onMouseEnter(){this.isHover=true,this.updateButtonBackground(this.button,this.getImageFromState());}onMouseLeave(){this.isHover=false,this.updateButtonBackground(this.button,this.getImageFromState());}onClick(){var e;this.state=this.state==="pressed"?"idle":"pressed",this.buttonClicked(),this.updateButtonBackground(this.button,this.getImageFromState()),(e=this.button)==null||e.setAttribute("aria-pressed",String(this.state==="pressed"));}updateButtonBackground(e,t){t!=null&&e!=null&&(e.style.backgroundImage=`url(${JSON.stringify(t)})`);}},C=class extends d{constructor(e,t){super(e,t);}async buttonClicked(){await this.frameSource.setDesiredTorchState(this.retrieveTorchState()==="on"?"off":"on");}async canShow(){return this.isTorchAvailable()}getImageFromState(){return this.retrieveTorchState()==="on"?this.isHover?this.control.torchOnPressedImage:this.control.torchOnImage:this.isHover?this.control.torchOffPressedImage:this.control.torchOffImage}setup(){if(this.control.torchOffImage==null||this.control.torchOnImage==null){a.log(a.Level.Warn,"TorchSwitchControl icon is not set or is empty, the control will not be rendered.");return}super.setup();}async isTorchAvailable(){return f$1(this.frameSource)?this.frameSource.isTorchAvailable():false}retrieveTorchState(){return f$1(this.frameSource)?this.frameSource.getDesiredTorchState():"off"}},f=class o extends d{constructor(e,t){super(e,t);}static get CameraAccess(){return d$1}static get Camera(){return a$1}async canShow(){return (await o.CameraAccess.getCameras()).length>1}getImageFromState(){return this.isHover?this.control.pressedImage:this.control.idleImage}async buttonClicked(){if(this.isTransitioning)return;let e=await this.getNextDeviceCamera();e&&await this.switchCameras(e);}setup(){if(this.control.idleImage==null){a.log(a.Level.Warn,"CameraSwitchControl idle icon is not set or is empty, the control will not be rendered.");return}super.setup();}async getNextDeviceCamera(){var s,n;let e=await o.CameraAccess.getCameras(),t=this.frameSource?this.frameSource:null,i=(s=t==null?void 0:t.cameraManager.activeCamera)==null?void 0:s.deviceId,r=e.findIndex(c=>c.deviceId===i);return r>-1?(n=e[r+1])!=null?n:e[0]:e.length>0?e[0]:null}async switchCameras(e){var n,c,u;this.isTransitioning=true;let t=(n=this.context)==null?void 0:n.frameSource,i,r;t!=null&&(i=new g$1(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off"));let s=o.Camera.fromDeviceCamera(e);i!=null&&await s.applySettings(i),await((c=this.context)==null?void 0:c.setFrameSource(s)),await((u=this.context)==null?void 0:u.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=false;}},g=class o extends d{constructor(e,t){super(e,t);}static get Camera(){return a$1}static get CameraAccess(){return d$1}async install(){let e=await super.install();return e&&await this.setInitialCamera(),e}async canShow(){return !a$2.isIOSDeviceWithExtendedCameraAccess()||!f$1(this.frameSource)?false:d$1.isIOSBackDualWideCameraLabel(this.frameSource.label)||d$1.isIOSBackCameraLabel(this.frameSource.label)||d$1.isIOSUltraWideBackCameraLabel(this.frameSource.label)}getImageFromState(){return this.isUltraWideBackCamera()?this.isHover?this.control.cameraFOVUltraWidePressedImage:this.control.cameraFOVUltraWideImage:this.isHover?this.control.cameraFOVWidePressedImage:this.control.cameraFOVWideImage}async buttonClicked(){if(this.isTransitioning)return;let e=await this.getAlternativeDeviceCamera();e&&await this.switchCameras(e);}setup(){if(this.control.cameraFOVUltraWideImage==null||this.control.cameraFOVWideImage==null){a.log(a.Level.Warn,"CameraFOVSwitchControl icon is not set or is empty, the control will not be rendered.");return}super.setup();}async setInitialCamera(){var e,t;if(!this.isTransitioning&&!d$1.isIOSBackCameraLabel((t=(e=this.frameSource)==null?void 0:e.label)!=null?t:"")){let r=(await o.CameraAccess.getCameras()).find(s=>d$1.isIOSBackCameraLabel(s.label));r&&await this.switchCameras(r);}}isUltraWideBackCamera(){return f$1(this.frameSource)?d$1.isIOSUltraWideBackCameraLabel(this.frameSource.label):false}async getAlternativeDeviceCamera(){return (await o.CameraAccess.getCameras()).find(t=>this.isUltraWideBackCamera()?d$1.isIOSBackCameraLabel(t.label):d$1.isIOSUltraWideBackCameraLabel(t.label))}async switchCameras(e){var n,c,u;this.isTransitioning=true;let t=(n=this.context)==null?void 0:n.frameSource,i,r;t!=null&&(i=new g$1(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off"));let s=o.Camera.fromDeviceCamera(e);i!=null&&await s.applySettings(i),await((c=this.context)==null?void 0:c.setFrameSource(s)),await((u=this.context)==null?void 0:u.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=false;}};export{S as a,C as b,f as c,g as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d}from'./chunk-
|
|
1
|
+
import {d}from'./chunk-QM37NXPY.js';var r=class{constructor(){this.frameColor=d.AimerViewfinder.frameColor;this.dotColor=d.AimerViewfinder.dotColor;this.type="aimer";}toJSONObject(){return {type:this.type,frameColor:this.frameColor.toJSON(),dotColor:this.dotColor.toJSON()}}};export{r as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-
|
|
1
|
+
import {a as a$4}from'./chunk-2T36DQ52.js';import {a as a$6}from'./chunk-7XQ3GHYH.js';import {a as a$2}from'./chunk-MU6SADSF.js';import {a as a$1}from'./chunk-EV4OEANA.js';import {a as a$3}from'./chunk-3A4KLILV.js';import {a as a$5}from'./chunk-LSZZVJ6B.js';var d="scandit-loading-overlay",t=class t extends a$1{constructor(){super();this._progressBar=null;this._label=null;let e=this.attachShadow({mode:"open"});e.innerHTML=a$2`
|
|
2
2
|
<div class="loading-overlay">
|
|
3
3
|
<label for="scandit-progress" class="message">Loading...</label>
|
|
4
4
|
<scandit-progress-bar id="scandit-progress" min="0" max="100"></scandit-progress-bar>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {d}from'./chunk-
|
|
1
|
+
import {d}from'./chunk-QM37NXPY.js';var u=(o=>(o.On="on",o.Off="off",o.Standby="standby",o.Starting="starting",o.Stopping="stopping",o.BootingUp="bootingUp",o.WakingUp="wakingUp",o.GoingToSleep="goingToSleep",o.ShuttingDown="shuttingDown",o))(u||{}),c=(t=>(t.On="on",t.Off="off",t))(c||{}),m=(t=>(t.WorldFacing="worldFacing",t.UserFacing="userFacing",t))(m||{}),p=(r=>(r.Auto="auto",r.HD="hd",r.FullHD="fullHd",r.UHD4K="uhd4k",r))(p||{}),g=(r=>(r.None="none",r.Manual="manual",r.ManualUntilCapture="manualUntilCapture",r.AutoOnLocation="autoOnLocation",r))(g||{});function f(a){var e;return ((e=a==null?void 0:a.toJSONObject())==null?void 0:e.type)==="camera"}var i=class a{constructor(e){this.preferredResolution=d.Camera.Settings.preferredResolution;this.zoomFactor=d.Camera.Settings.zoomFactor;this.zoomGestureZoomFactor=d.Camera.Settings.zoomGestureZoomFactor;this.focus={focusGestureStrategy:d.Camera.Settings.focusGestureStrategy};if(e!=null)for(let t of Object.getOwnPropertyNames(e))this[t]=e[t];}get focusGestureStrategy(){return this.focus.focusGestureStrategy}set focusGestureStrategy(e){this.focus.focusGestureStrategy=e;}static fromJSON(e){let t=new a;return t.preferredResolution=e.preferredResolution,t.zoomFactor=e.zoomFactor,t.zoomGestureZoomFactor=e.zoomGestureZoomFactor,t.focusGestureStrategy=e.focusGestureStrategy,t}setProperty(e,t){this[e]=t;}getProperty(e){return this[e]}toJSONObject(){let e={preferredResolution:this.preferredResolution,zoomFactor:this.zoomFactor,zoomGestureZoomFactor:this.zoomGestureZoomFactor,focus:{focusGestureStrategy:this.focus.focusGestureStrategy}},t={};for(let n of Object.keys(this))[...Object.keys(e),"focusGestureStrategy"].includes(n)||(t[n]=this[n]);return {...e,...t}}};export{u as a,c as b,m as c,p as d,g as e,f,i as g};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b as b$3}from'./chunk-
|
|
1
|
+
import {b as b$3}from'./chunk-QYACFUV3.js';import {a as a$9}from'./chunk-OH5WXZBN.js';import {a as a$d}from'./chunk-46WJFV3I.js';import {d as d$2,c,b as b$4}from'./chunk-NBFWXBYG.js';import {a as a$f}from'./chunk-7CQVGY6N.js';import {a as a$2}from'./chunk-N5YZEC56.js';import {a as a$b}from'./chunk-FSWALUUO.js';import {b,a as a$3}from'./chunk-5S537AFM.js';import {a as a$g}from'./chunk-DMOXDUF6.js';import {b as b$1}from'./chunk-457L5N2F.js';import {a as a$a}from'./chunk-JVZYXEYO.js';import {a as a$c}from'./chunk-3BBG6EVS.js';import {a as a$8}from'./chunk-KYNYQBNF.js';import {a as a$7}from'./chunk-ZKROZLQ4.js';import {a as a$5}from'./chunk-5FUZURCZ.js';import {a as a$1}from'./chunk-VJB527QZ.js';import {a as a$6}from'./chunk-NMX4VHW2.js';import {a}from'./chunk-7XQ3GHYH.js';import {d as d$1}from'./chunk-QQXPUJCE.js';import {a as a$e}from'./chunk-XR65N6EG.js';import {d}from'./chunk-QM37NXPY.js';import {a as a$4,b as b$2,i,f}from'./chunk-77BBIAZE.js';import {a as a$h}from'./chunk-WUHKODFA.js';var y="core.camera.recovery",B=class q{constructor(){this.focusGesture=d.DataCaptureView.focusGesture;this.zoomGesture=d.DataCaptureView.zoomGesture;this._scanAreaMargins=d.DataCaptureView.scanAreaMargins;this._pointOfInterest=d.DataCaptureView.pointOfInterest;this._logoStyle=d.DataCaptureView.logoStyle;this._logoAnchor=d.DataCaptureView.logoAnchor;this._logoOffset=d.DataCaptureView.logoOffset;this._context=null;this.overlays=new Set;this.controls=[];this.controlWidgets=new WeakMap;this.frozenFrameCanvas=document.createElement("canvas");this.listeners=[];this.isVideoElementDetached=false;this.orientation="portrait";this.hiddenProperties={stopVideoTracksOnVisibilityChange:true,freezeFrameWhenStoppingFrameSource:true};this.orientationObserver=new b;this.onOrientationChangeListener=this.onOrientationChange.bind(this);this.onHintPresenterUpdateHandler=this.onHintPresenterUpdate.bind(this);this.onBeforeShowToastsHandler=this.onBeforeShowToasts.bind(this);this.onWorkerMessageHandler=this.onWorkerMessage.bind(this);this.visibilityListener=this.onVisibilityChange.bind(this),this.cameraRecoveryListener=this.cameraRecovery.bind(this),a.getInstance().updateIfMissing(a$1);}get scanAreaMargins(){return this._scanAreaMargins}set scanAreaMargins(e){var t;this._scanAreaMargins=e,(t=this.privateContext)==null||t.update();}get pointOfInterest(){return this._pointOfInterest}set pointOfInterest(e){var t;this._pointOfInterest=e,(t=this.privateContext)==null||t.update();}get logoStyle(){return this._logoStyle}set logoStyle(e){var t;this._logoStyle=e,(t=this.privateContext)==null||t.update();}get logoAnchor(){return this._logoAnchor}set logoAnchor(e){var t;this._logoAnchor=e,(t=this.privateContext)==null||t.update();}get logoOffset(){return this._logoOffset}set logoOffset(e){var t;this._logoOffset=e,(t=this.privateContext)==null||t.update();}get cameraRecoveryText(){return a.getInstance().get(y)}get width(){var e,t;return Math.round((t=(e=this.htmlElementState)==null?void 0:e.width)!=null?t:0)}get height(){var e,t;return Math.round((t=(e=this.htmlElementState)==null?void 0:e.height)!=null?t:0)}get canvasDrawer(){return !this._canvasDrawer&&this.canvasElement!=null&&(this._canvasDrawer=new b$1(this.canvasElement),this._canvasDrawer.startObservingCanvasResize()),this._canvasDrawer}get privateContext(){return this._context}static async forContext(e){let t=new q;return await t.setContext(e),t}showProgressBar(){var e;(e=this.loadingOverlay)==null||e.show();}hideProgressBar(){var e;(e=this.loadingOverlay)==null||e.hide();}setProgressBarPercentage(e){this.loadingOverlay&&(this.loadingOverlay.progress=e);}setProgressBarMessage(e){this.loadingOverlay&&(this.loadingOverlay.message=e);}getContext(){return this._context}async setContext(e){var t,i,n;if(this._context=e,e){if(this.overlays.size>0&&((t=this.privateContext)==null?void 0:t.modes.size)===0)throw new Error(["Cannot assign this view to this context. This view has overlays but the context does not have any mode attached matching these overlays.","Remove the overlays first before attaching the view to the context, or add the corresponding mode to the context before attaching this view."].join(" "));await e.setView(this),(i=this.privateContext)==null||i.subscribeToWorkerMessages(this.onWorkerMessageHandler),(n=this._context)!=null&&n.frameSource&&await this.onFrameSourceChange(this._context.frameSource);}}connectToElement(e){var t,i,n;this.orientationObserver.register(),this.setupHtmlElement(e),(t=this.canvasDrawer)==null||t.startObservingCanvasResize(),this.htmlElementDidChange(),a$2.add(this),this.orientation=this.orientationObserver.orientation.value,this.orientationObserver.addEventListener(a$3,this.onOrientationChangeListener),(i=this.hintPresenter)==null||i.addEventListener("hintpresenterupdate",this.onHintPresenterUpdateHandler),(n=this.hintPresenter)==null||n.addEventListener("willshow",this.onBeforeShowToastsHandler),this.localizationSubscription=a.getInstance().subscribe(a=>{a[y]!=null&&(this.cameraRecoveryElement.textContent=a[y]);});}detachFromElement(){var e,t,i,n,a,o,l,d;(e=this.htmlElementState)==null||e.removeListeners(),this.removeStyles(),(t=this.canvasDrawer)==null||t.endObservingCanvasResize(),document.removeEventListener("visibilitychange",this.visibilityListener);for(let h of ["touchend","mousedown"])this.cameraRecoveryElement.removeEventListener(h,this.cameraRecoveryListener);(i=this.loadingOverlay)==null||i.remove(),(n=this.customLocationsView)==null||n.unmount(),this.htmlElementDidChange(),(a=this.gestureRecognizer)==null||a.removeAllListeners(),this.clearHtmlElementContent(),a$2.delete(this),this.orientationObserver.unregister(),this.orientationObserver.removeEventListener(a$3,this.onOrientationChangeListener),(o=this.hintPresenter)==null||o.removeEventListener("hintpresenterupdate",this.onHintPresenterUpdateHandler),(l=this.hintPresenter)==null||l.removeEventListener("willshow",this.onBeforeShowToastsHandler),(d=this.localizationSubscription)==null||d.cancel();}async addOverlay(e){var t;this.overlays.has(e)||(this.overlays.add(e),await((t=this.privateContext)==null?void 0:t.update([{type:"addOverlay",newValue:e}])));}async removeOverlay(e){var t;this.overlays.has(e)&&(await((t=this.privateContext)==null?void 0:t.update([{type:"removeOverlay",newValue:e}])),this.overlays.delete(e));}addListener(e){this.listeners.includes(e)||this.listeners.push(e);}removeListener(e){this.listeners.includes(e)&&this.listeners.splice(this.listeners.indexOf(e),1);}viewPointForFramePoint(e){var v,b,O,P,L,V,D,R;let t={width:(b=(v=this.htmlElementState)==null?void 0:v.width)!=null?b:0,height:(P=(O=this.htmlElementState)==null?void 0:O.height)!=null?P:0},i={width:(V=(L=this.videoElement)==null?void 0:L.videoWidth)!=null?V:0,height:(R=(D=this.videoElement)==null?void 0:D.videoHeight)!=null?R:0},n=t.width/t.height,a=i.width/i.height,o=n>a?t.width/i.width:t.height/i.height,l={x:e.x*o,y:e.y*o},d=(i.width*o-t.width)/2,h=(i.height*o-t.height)/2;return new a$4(l.x-d,l.y-h)}viewQuadrilateralForFrameQuadrilateral(e){let t=this.viewPointForFramePoint(e.topLeft),i=this.viewPointForFramePoint(e.topRight),n=this.viewPointForFramePoint(e.bottomLeft),a=this.viewPointForFramePoint(e.bottomRight);return new b$2(t,i,a,n)}addControl(e){var t;this.controls.includes(e)||(e.view=this,this.controls.push(e),this.controlsUpdated(),(t=this.privateContext)==null||t.update([{type:"addControl",newValue:e}]));}removeControl(e){var t;if(this.controls.includes(e)){e.view=null;let i=this.controls.splice(this.controls.indexOf(e),1);this.getControlWidget(i[0]).remove(true),this.controlsUpdated(),(t=this.privateContext)==null||t.update([{type:"removeControl",newValue:e}]);}}toJSONObject(){var e;return {scanAreaMargins:this.scanAreaMargins.toJSONObject(),pointOfInterest:this.pointOfInterest.toJSONObject(),logoAnchor:this.logoAnchor,logoOffset:this.logoOffset.toJSONObject(),logoHidden:(e=this.logoHidden)!=null?e:false,logoStyle:this.logoStyle,overlays:[...this.overlays].map(t=>t.toJSONObject()),controls:this.controls.map(t=>t.toJSONObject()),focusGesture:this.focusGesture?this.focusGesture.toJSONObject():null,zoomGesture:this.zoomGesture?this.zoomGesture.toJSONObject():null}}isCameraRecoveryVisible(){return !this.cameraRecoveryElement.hidden}setCameraRecoveryVisible(e){this.cameraRecoveryElement.hidden=!e;}async allowPictureInPicture(e){await d$1.instance().allowPictureInPicture(e);}viewAnchorPositionsForFrameAnchorPositions(e){let t=this.viewPointForFramePoint(e.topLeft),i=this.viewPointForFramePoint(e.topRight),n=this.viewPointForFramePoint(e.bottomLeft),a=this.viewPointForFramePoint(e.bottomRight),o=this.viewPointForFramePoint(e.centerLeft),l=this.viewPointForFramePoint(e.centerRight),d=this.viewPointForFramePoint(e.topCenter),h=this.viewPointForFramePoint(e.bottomCenter),v=this.viewPointForFramePoint(e.center);return new a$5(t,i,a,n,o,d,l,h,v)}setDidTapCustomLocationsViewListener(e){this.customLocationsView&&this.customLocationsView.listener===null&&(this.customLocationsView.listener=e);}renderCustomLocationsView(e){this.customLocationsView!=null&&(this.customLocationsView.setMirrored(d$1.instance().isMirrorImageEnabled()),Object.keys(e).includes("removedIds")?this.customLocationsView.render(e):this.customLocationsView.renderDomView(e));}removeStyles(){for(let e of document.querySelectorAll("style[scandit]"))e.remove();}onHintPresenterUpdate(e){var t;(t=this.privateContext)==null||t.workerCommand("hintPresenterV2update",{});}clearHtmlElementContent(){var e;this.htmlElement&&((e=this.canvasDrawer)==null||e.endObservingCanvasResize(),this.htmlElement.innerHTML="",this.cameraPaintboardElement=void 0,this.singleImageUploaderPaintboardElement=void 0,this.htmlElement=void 0);}setupHtmlElement(e){var o,l,d;this.createStyles(),this.htmlElement=e,b$3.register();let t=`
|
|
2
2
|
<div class="${a$6.CONTAINER_CLASS_NAME}">
|
|
3
3
|
<div class="${a$6.PAINTBOARDS_CONTAINER_CLASS_NAME}">
|
|
4
4
|
<div data-js-id="loading-overlay"></div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a as a$4}from'./chunk-ZE2WH3AH.js';import {a as a$5}from'./chunk-FRG4HXJT.js';import {c as c$1,a as a$6}from'./chunk-R6YWFAMT.js';import {c}from'./chunk-B5JOQVFY.js';import {d}from'./chunk-AIC4H5KG.js';import {a as a$2}from'./chunk-BQDUZ37O.js';import {a as a$1}from'./chunk-O7TZTIHO.js';import {a as a$3}from'./chunk-QCZSSQAQ.js';import {c as c$2,e}from'./chunk-42THCP2K.js';import {a}from'./chunk-XR65N6EG.js';var D=class D{constructor(e,t){this.hintPresenterV2=null;this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL=10;this.redrawInterval=1e3/30;this.redrawRequests=[];this._isDrawLoopRunning=false;this.frameDataPool=new Map;this.lastFrameCounter=-1;this.poorMansBenchmarkLogs=false;this.writableDataPathStandard="/scandit_sync_folder";this.resourceFilesSubfolder="resources";this.performanceMetricsReporterTimer=void 0;this.performanceMetrics={frameDataPoolSize:0,processedFramesCount:0,redrawRequestsCount:0,actualRedrawsCount:0};this.gestureListener=null;this.webPlatformHintPresenter=null;this.moduleHandler=e,this.workerFunctions=t,this._loadProgressCallback=this._loadProgressCallback.bind(this),c(this.getWasmMetadata());}get Module(){return this.moduleHandler.get()}set isDrawLoopRunning(e){this._isDrawLoopRunning=e,!e&&typeof this.loopTimeoutId=="number"&&(clearTimeout(this.loopTimeoutId),this.loopTimeoutId=void 0);}get isDrawLoopRunning(){return this._isDrawLoopRunning}convertToLoadableFrameData(e){let t=this.getNextFrameId();this.frameDataPool.set(t,new Uint8ClampedArray(e.getFrameData()));let s=this.lastUsedModuleMirrorAxis==null?false:this.lastUsedModuleMirrorAxis!==this.Module.Axis.None;return {frameId:t,width:e.getWidth(),height:e.getHeight(),isFrameSourceMirrored:s}}createContext(e){var m,C,f,b,h;let t=this.getModeDeserializers(),s=c$1(location);(s==="localhost"||s==="127.0.0.1")&&navigator.userAgent.includes("Electron")&&e.appName!=null&&(s+=`-${e.appName}`),this.parentDomain=e.parentDomain,this.contextDeserializer=new this.Module.DataCaptureContextDeserializer(this.writableDataPath,e.deviceId,e.context.deviceModelName,s,this.parentDomain,t,e.delayedRegistration,e.highEndBlurryRecognition,this.resourcePath);let i=this.contextDeserializer.contextFromJson(JSON.stringify(e.context));if(i==null){let r=this.contextDeserializer.getLastError();throw new Error(`Could not create the context: ${r}`)}let a=i.getView();this.context=i.getContext(),i.delete();let d=this.Module.DataCaptureContextListener.extend("DataCaptureContextListener",{didChangeStatus:(r,o)=>{this.contextDidChangeStatus(JSON.parse(o.toJson())),r.delete();},didStartObservingContext:r=>{this.didStartObservingContext(),r.delete();},didStopObservingContext:r=>{r.delete();}}),p=this.Module.DataCaptureContextFrameListener.extend("DataCaptureContextFrameListener",{onObservationStarted:r=>{r.delete();},onObservationStopped:r=>{r.delete();},onFrameProcessingStarted:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingStarted"}),o.delete(),r.delete();},onFrameProcessingFinished:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameProcessingFinished"}),o.delete(),r.delete();},onFrameSkipped:(r,o)=>{this.workerFunctions.postMessage({type:"onFrameSkipped"}),o.delete(),r.delete();}}),g=this.Module.GestureRecognizer.extend("GestureRecognizer",{setGestureListener:(r,o)=>{var M;(M=this.gestureListener)==null||M.delete(),this.gestureListener=r.clone(),r.delete();}});(m=this.gestureRecognizer)==null||m.delete(),this.gestureRecognizer=new g;let u=new d;this.context.addListener(u),u.delete();let c=new p;this.context.addFrameListener(c),c.delete(),this.setView(a),(C=this.view)==null||C.setGestureRecognizer(this.gestureRecognizer);let w=this.Module.PlatformHintPresenter.extend("PlatformHintPresenter",{setHintPresenter:r=>{r.delete();},showToast:r=>{this.workerFunctions.postMessage({type:"showToast",payload:JSON.parse(r)});},hideToast:r=>{this.workerFunctions.postMessage({type:"hideToast",payload:JSON.parse(r)});},showGuidance:r=>{this.workerFunctions.postMessage({type:"showGuidance",payload:JSON.parse(r)});},hideGuidance:r=>{this.workerFunctions.postMessage({type:"hideGuidance",payload:JSON.parse(r)});},startUpdateTimer:r=>{this.workerFunctions.postMessage({type:"startUpdateTimer",payload:{duration:{unit:"ms",value:r}}});},stopUpdateTimer:()=>{this.workerFunctions.postMessage({type:"stopUpdateTimer"});}});(f=this.hintPresenterV2)==null||f.delete(),(b=this.webPlatformHintPresenter)==null||b.delete(),this.webPlatformHintPresenter=new w,this.view&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter),(h=this.view)==null||h.setHintPresenterV2(this.hintPresenterV2));}onTap(e){var t;(t=this.gestureListener)==null||t.onTap(JSON.stringify(e));}hintPresenterV2Update(){var e;(e=this.hintPresenterV2)==null||e.update();}startReportingPerformanceMetrics(){this.performanceMetricsReporterTimer==null&&(this.performanceMetricsReporterTimer=setInterval(()=>{this.reportPerformanceMetrics();for(let e of Object.keys(this.performanceMetrics))this.performanceMetrics[e]=0;},1e3));}async reportPerformanceMetrics(){this.workerFunctions.postMessage({type:"performanceMetricsReport",payload:{...this.performanceMetrics}});}deleteFrameData(e){this.frameDataPool.delete(e);}dispose(){var e,t;this.context.dispose(),this.frameDataPool.clear(),this.isDrawLoopRunning=false,this.lastFrameCounter=-1,(e=this.gestureRecognizer)==null||e.delete(),this.gestureRecognizer=null,(t=this.gestureListener)==null||t.delete(),this.gestureListener=null;}flushAnalytics(){this.context.flushAnalytics();}extractCentaurusLicense(e){return {payload:{centaurus:{licenseKey:this.Module.LicenseUtils[D.get3dPartyLicenseKeyMethodName](e)}}}}getModeDeserializers(){return new this.Module.VectorDataCaptureModeDeserializer}loadLibrary(e){return this.libraryLoadingPromise!=null?this.libraryLoadingPromise:(this.libraryLoadingPromise=this.setup(e),this.libraryLoadingPromise)}processFrame(e){var a;if(this.context==null)return {payload:e,transferables:[e.data.buffer]};let t=e.data,s=e.colorType==="GRAYSCALE"?this.Module.ImageBufferFormat.Grayscale8:this.Module.ImageBufferFormat.Rgba8888,i=this.Module.allocateUint8Array(t.byteLength);return this.Module.HEAPU8.set(t,i),(a=this.imageFrameSource)==null||a.outputFrame(i,e.width,e.height,s),{payload:e,transferables:[e.data.buffer]}}reportCameraProperties(e){this.context.setCameraProperties(e.deviceId,e.isFrontFacing,e.hasAutofocus);}requestFrameData(e){let t=this.frameDataPool.get(e);return t==null?{payload:{data:null}}:{payload:{data:t},transferables:[t.buffer]}}scheduleRedraw(e,t){this.addRedrawRequest(t),this.isDrawLoopRunning||this.startDrawLoop(e);}sendViewRefreshCommands(e){this.workerFunctions.postMessage({type:"draw",payload:e},[e.buffer]);}setFrameSource(e,t){var s;this.lastUsedModuleMirrorAxis=this.mapMirrorAxisOnModule(e),(s=this.imageFrameSource)==null||s.delete(),this.imageFrameSource=new this.Module.ImageBufferFrameSource(this.lastUsedModuleMirrorAxis,t,0),this.context.setFrameSource(this.imageFrameSource);}startDrawLoop(e){this.isDrawLoopRunning=true;let t=a=>this.redrawRequests.length>0&&this.redrawRequests[0]<=a,s=a=>{for(;this.redrawRequests.length>0&&this.redrawRequests[0]<=a;)this.redrawRequests.shift();},i=()=>{this.loopTimeoutId=setTimeout(()=>{if(!this.isDrawLoopRunning)return;let a=performance.now();if(t(a)){s(a),e.draw();let d=e.getDrawCommands();this.sendViewRefreshCommands(new Uint8Array(d));}i();},this.redrawInterval);};i();}updateContext(e){if(this.context!=null&&this.contextDeserializer!=null){e.view!=null&&!e.view.visible&&this.context.flushAnalytics();let t=this.onBeforeUpdateContextHook(e),s=this.contextDeserializer.updateContextFromJson(this.context,this.view,JSON.stringify(t.context));if(s==null){let a=this.contextDeserializer.getLastError();throw new Error(`Could not update the context: ${a}`)}this.context.delete(),this.context=s.getContext();let i=s.getView();s.delete(),i!=null&&t.view!=null&&i.setViewSize(t.view.width,t.view.height,t.view.orientation),!this.hintPresenterV2&&this.webPlatformHintPresenter&&(this.hintPresenterV2=new this.Module.HintPresenterV2(this.webPlatformHintPresenter)),i!=null&&this.hintPresenterV2&&i.setHintPresenterV2(this.hintPresenterV2),this.gestureRecognizer!=null&&(i==null||i.setGestureRecognizer(this.gestureRecognizer)),this.setView(i),a.debug("context updated",t);}}onBeforeUpdateContextHook(e){return e}onDocumentVisibilityChange(e){e==="hidden"&&this.context.flushAnalytics();}isFeatureSupported(e){return {payload:{supported:this.context.isFeatureSupported(e)}}}getViewfinderInfo(){var e,t;return {payload:{isDisplayingViewfinder:(t=(e=this.view)==null?void 0:e.isDisplayingViewfinder())!=null?t:false,rect:JSON.parse(this.view.getViewfinderRect())}}}getOpenSourceSoftwareLicenseInfo(){return {payload:{licenseText:this.Module.OpenSourceSoftwareLicenseInfo.getLicenseText()}}}getNextFrameId(){return this.lastFrameCounter++,this.lastFrameCounter>=this.MAX_NUMBER_OF_IMAGES_IN_FRAME_DATA_POOL&&(this.lastFrameCounter=0),this.lastFrameCounter}getWasmDynamicLibraries(e){return this.getWasmSideModuleFileName()==null?[]:[`${e.replace(/\/[^/]*$/,"/")}${this.getWasmSideModuleFileName()}`]}getWasmCoreExpectedHash(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_HASH:globalThis.SDC_WASM_CORE_MT_HASH:e?globalThis.SDC_WASM_CORE_SIMD_HASH:""}getWasmCoreFileName(e,t){return t?e?globalThis.SDC_WASM_CORE_MT_SIMD_FILE_NAME:globalThis.SDC_WASM_CORE_MT_FILE_NAME:e?globalThis.SDC_WASM_CORE_SIMD_FILE_NAME:""}getWasmMetadata(){return globalThis.WASM_METADATA}getWasmSideModuleFileName(){return ""}_loadProgressCallback(e){this.workerFunctions.postMessage({type:"loadLibraryProgress",payload:e});}addRedrawRequest(e){this.redrawRequests.push(Math.round(performance.now())+e),this.redrawRequests.sort((t,s)=>t-s);}contextDidChangeStatus(e){e.code===260?e.message=e.message.replace("domain name",`domain name (${c$1(location)})`):e.code===265&&(e.message=e.message.replace("domain name",`domain name (${this.parentDomain})`)),this.workerFunctions.postMessage({type:"contextDidChangeStatus",payload:e});}didStartObservingContext(){this.workerFunctions.postMessage({type:"didStartObservingContext"});}mapMirrorAxisOnModule(e){switch(e){case "None":return this.Module.Axis.None;case "X":return this.Module.Axis.X;case "Y":return this.Module.Axis.Y;default:return this.Module.Axis.None}}setView(e){this.view=e,this.setViewRefreshHandler(e),e==null&&(this.isDrawLoopRunning=false,this.sendViewRefreshCommands(new Uint8Array([])));}addNativeOverlay(e){a.warn("addNativeOverlay has not been implemented for this module",e);}removeNativeOverlay(e){a.warn("removeNativeOverlay has not been implemented for this module",e);}setViewRefreshHandler(e){if(e==null||e.isViewRefreshHandlerSet)return;let t=this.Module.NeedsRedrawDelegate.extend("NeedsRedrawDelegate",{setNeedsRedrawIn:this.scheduleRedraw.bind(this,e)}),s=new t;e.setNeedsRedrawDelegate(s),e.isViewRefreshHandlerSet=true;}setupDataDecoding(){let e=this.moduleHandler.get(),t=e.DataDecoding.extend("DataDecoding",{decode(s,i){try{let a=JSON.parse(i),d=[];for(let p of a){let g=new TextDecoder(p.ianaName,{fatal:true});d.push(g.decode(s.slice(p.startIndex,p.endIndex)));}return d.join("")}catch(a){return ""}}});e.setDataDecoding(new t);}start(e,t,s){e&&t&&(this.setupDataDecoding(),this.moduleHandler.get().callMain(),this.moduleHandler.get().__emscripten_proxy_main!==void 0||s());}getWritableDataPath(e){return e!=null?(a.debug(`IndexedDB database name override in use to recover from blocked standard database: ${e}`),e):this.writableDataPathStandard}numOfMBToPages(e){return Math.ceil(1024*e*1024/64/1024)}async setup({libraryLocation:e$1,locationPath:t,writableDataPathOverride:s,overrideThreadsSupport:i,overrideSimdSupport:a$7,verifyResponseHash:d$1,referredOrigin:p,fixedWasmMemory:g}){var x;let u=false,c=false;this.writableDataPath=this.getWritableDataPath(s),this.resourcePath=`${e$1}${this.resourceFilesSubfolder}/`,globalThis.path=t;let{resolve:w,reject:m,promise:C}=new a$1,f=a$2.sdkVersion();if(f==="")throw new a$3({name:"Invalid library version",message:"Library version is not defined or empty, cannot generate proper path to library files."});let[b,h]=await Promise.all([c$2(),e()]);i!=="auto"&&(h=i==="on"),a$7!=="auto"&&(b=a$7==="on");let r=this.getWasmCoreFileName(b,h),o=d(f,e$1,r),{jsURI:M,wasmURI:R}=o,W={instantiateWasm:(l,N)=>(a$6({importObject:l,wasmURI:R,expectedHash:this.getWasmCoreExpectedHash(b,h),verifyResponseHash:d$1,successCallback:N,progressCallback:this._loadProgressCallback,errorCallback:H=>{m(H);},referredOrigin:p}),{})},y=g===null?null:new WebAssembly.Memory({initial:this.numOfMBToPages(g),maximum:this.numOfMBToPages(300),shared:h});return y!==null&&a.log(a.Level.Debug,"Fixed wasmMemory set",y),this.moduleHandler.set({...y?{wasmMemory:y}:{},mainScriptUrlOrBlob:M,canvas:(x=this.workerFunctions.getOffscreenCanvas())!=null?x:{getContext:()=>null},...W,dynamicLibraries:this.getWasmDynamicLibraries(R),locateFile:l=>e$1+l,noInitialRun:true,preRun:[async()=>{try{await a$4({writableDataPath:this.writableDataPath});}catch(l){if(l.name==="BlockedIndexedDB"){m(l.toString());return}a.log(a.Level.Debug,"No IndexedDB support, some data will not be persisted:",l);}c=true,this.start(c,u,w);}],onMainComplete:()=>{if([u,c].includes(false)){a.log(a.Level.Warn,{runtimeLoaded:u,fileSystemSynced:c},"Both runtimeLoaded and fileSystemSynced should be true when calling onMainComplete"),m("onMainComplete has been called but runtime or file system was not ready.");return}w();},onRuntimeInitialized:()=>{u=true,this.start(c,u,w);},print:l=>{a.log(a.Level.Info,l);}}),await a$5(M,f)||m(`Couldn't retrieve Scandit Data Capture library at ${M}, did you configure the path for it correctly?`),C}};D.get3dPartyLicenseKeyMethodName=atob("Z2V0QmxpbmtJZExpY2Vuc2VLZXk=");var T=D;export{T as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-BDLLVGRH.js';import {c}from'./chunk-WGLHZXRT.js';import {c as c$1,b}from'./chunk-GX4YCYCH.js';import {n as n$1,d,e,m,l as l$1}from'./chunk-77BBIAZE.js';var l=class{static fromJSON(t){return (t==null?void 0:t.type)==="tapToFocus"?new b:null}},s=class{static fromJSON(t){return (t==null?void 0:t.type)==="swipeToZoom"?new c$1:null}};function n(e){let t="document"in globalThis?globalThis.document:void 0,o=t==null?void 0:t.createRange().createContextualFragment(e);if(o)return o.firstElementChild}function y(e$1){var t;return {Camera:{Settings:{preferredResolution:e$1.Camera.Settings.preferredResolution,zoomFactor:e$1.Camera.Settings.zoomFactor,zoomGestureZoomFactor:e$1.Camera.Settings.zoomGestureZoomFactor,focusGestureStrategy:e$1.Camera.Settings.focusGestureStrategy},defaultPosition:(t=e$1.Camera.defaultPosition)!=null?t:null,availablePositions:e$1.Camera.availablePositions},SingleImageUploader:{Settings:{iconElement:n(e$1.SingleImageUploader.Settings.iconElement),informationElement:n(e$1.SingleImageUploader.Settings.informationElement),buttonElement:n(e$1.SingleImageUploader.Settings.buttonElement),containerStyle:e$1.SingleImageUploader.Settings.containerStyle,iconStyle:e$1.SingleImageUploader.Settings.iconStyle,informationStyle:e$1.SingleImageUploader.Settings.informationStyle,buttonStyle:e$1.SingleImageUploader.Settings.buttonStyle,onlyCameraCapture:e$1.SingleImageUploader.Settings.onlyCameraCapture}},DataCaptureView:{scanAreaMargins:m.fromJSON(JSON.parse(e$1.DataCaptureView.scanAreaMargins)),pointOfInterest:e.fromJSON(JSON.parse(e$1.DataCaptureView.pointOfInterest)),logoStyle:e$1.DataCaptureView.logoStyle,logoAnchor:e$1.DataCaptureView.logoAnchor,logoOffset:e.fromJSON(JSON.parse(e$1.DataCaptureView.logoOffset)),focusGesture:l.fromJSON(JSON.parse(e$1.DataCaptureView.focusGesture)),zoomGesture:s.fromJSON(JSON.parse(e$1.DataCaptureView.zoomGesture)),cameraRecoveryText:e$1.DataCaptureView.cameraRecoveryText},LaserlineViewfinder:{width:d.fromJSON(JSON.parse(e$1.LaserlineViewfinder.width)),enabledColor:n$1.fromJSON(e$1.LaserlineViewfinder.enabledColor),disabledColor:n$1.fromJSON(e$1.LaserlineViewfinder.disabledColor)},RectangularViewfinder:Object.keys(e$1.RectangularViewfinder.styles).reduce((o,u)=>{let i=e$1.RectangularViewfinder.styles[u];return o.styles[u]={size:l$1.fromJSON(JSON.parse(i.size)),color:n$1.fromJSON(i.color),style:i.style,lineStyle:i.lineStyle,dimming:Number.parseFloat(i.dimming.toString()),animation:c.fromJSON(JSON.parse(i.animation))},o},{defaultStyle:e$1.RectangularViewfinder.defaultStyle,styles:{}}),AimerViewfinder:{frameColor:n$1.fromJSON(e$1.AimerViewfinder.frameColor),dotColor:n$1.fromJSON(e$1.AimerViewfinder.dotColor)},Brush:{fillColor:n$1.fromJSON(e$1.Brush.fillColor),strokeColor:n$1.fromJSON(e$1.Brush.strokeColor),strokeWidth:e$1.Brush.strokeWidth},Feedback:{defaultVibrationPattern:e$1.Feedback.defaultVibrationPattern}}}var C=y({DataCaptureView:{focusGesture:"null",zoomGesture:"null",logoAnchor:"bottomRight",logoStyle:"extended",logoOffset:JSON.stringify({x:{value:0,unit:"fraction"},y:{value:0,unit:"fraction"}}),pointOfInterest:JSON.stringify({x:{value:.5,unit:"fraction"},y:{value:.5,unit:"fraction"}}),scanAreaMargins:JSON.stringify({left:{value:0,unit:"fraction"},right:{value:0,unit:"fraction"},top:{value:0,unit:"fraction"},bottom:{value:0,unit:"fraction"}}),cameraRecoveryText:"(This text is updated from translations)"},Camera:{Settings:{preferredResolution:"auto",zoomFactor:1,focusGestureStrategy:"manualUntilCapture",zoomGestureZoomFactor:2},defaultPosition:"worldFacing",availablePositions:["worldFacing","userFacing"]},SingleImageUploader:{Settings:{iconElement:atob(a),informationElement:"<p data-scandit-default>(This text is updated from translations)</p>",buttonElement:"<div data-scandit-default>(This text is updated from translations)</div>",containerStyle:{backgroundColor:"#FFFFFF"},iconStyle:{fill:"#121619"},informationStyle:{color:"#121619",marginBottom:"2em"},buttonStyle:{color:"#FFFFFF",backgroundColor:"#121619",fontWeight:"bold",padding:"1.25em",width:"12em",textAlign:"center",textTransform:"uppercase"},onlyCameraCapture:false}},LaserlineViewfinder:{width:JSON.stringify({unit:"fraction",value:.8}),enabledColor:"#FFFFFFFF",disabledColor:"#00000000"},AimerViewfinder:{frameColor:"#FFFFFFFF",dotColor:"#FFFFFFCC"},RectangularViewfinder:{defaultStyle:"rounded",styles:{rounded:{size:JSON.stringify({aspect:1,shorterDimension:{unit:"fraction",value:.75}}),color:"#FFFFFFFF",style:"rounded",lineStyle:"light",dimming:0,animation:JSON.stringify({looping:true})},square:{size:JSON.stringify({aspect:1,shorterDimension:{unit:"fraction",value:.75}}),color:"#FFFFFFFF",style:"square",lineStyle:"light",dimming:0,animation:JSON.stringify({looping:true})}}},Brush:{fillColor:"#00000000",strokeColor:"#00000000",strokeWidth:0},Feedback:{defaultVibrationPattern:[300]}});function O(e){C=e;}export{l as a,s as b,y as c,C as d,O as e};
|