UNPKG

@scandit/web-datacapture-core

Version:

Scandit Data Capture SDK for the Web

4 lines 7.45 kB
import {a as a$5}from'./chunks/chunk-GC2ECHKL.js';import {a as a$1}from'./chunks/chunk-ACFJP5SR.js';export{a as DataCaptureLoader}from'./chunks/chunk-VGSPU525.js';export{a as WorkerMain}from'./chunks/chunk-IBY4B2Y2.js';export{a as OverrideState}from'./chunks/chunk-6W7FX6LD.js';import {a as a$6}from'./chunks/chunk-AIC4H5KG.js';export{a as NotificationBuilder}from'./chunks/chunk-VBRTZG3W.js';export{c as ScanditIconBuilder,b as ScanditIconForIconType,a as ScanditIconType}from'./chunks/chunk-W2FVIH2I.js';export{a as SingleImageUploader}from'./chunks/chunk-4TDWWHP2.js';export{a as SingleImageUploaderSettings}from'./chunks/chunk-5S5BT5PK.js';export{c as CameraFOVSwitchControl,b as CameraSwitchControl,a as TorchSwitchControl}from'./chunks/chunk-FS52JIW4.js';export{a as NoViewfinder}from'./chunks/chunk-4ZMCJXZS.js';export{a as convertToPublicFrameData}from'./chunks/chunk-UHFABUTI.js';export{a as ImageFrameSource}from'./chunks/chunk-BS7MAI4E.js';export{a as LaserlineViewfinder}from'./chunks/chunk-H75G3H4R.js';export{a as PrivateNoneLocationSelection,b as RadiusLocationSelection,c as RectangularLocationSelection}from'./chunks/chunk-AKDTQZ73.js';export{a as RectangularViewfinder}from'./chunks/chunk-6NVWG2LP.js';export{b as ScanditIcon,a as ScanditIconShape}from'./chunks/chunk-27Z5CYJL.js';export{a as DataCaptureVersion}from'./chunks/chunk-RWVF7AF7.js';export{a as DataCaptureView}from'./chunks/chunk-OMJQ7GOF.js';import {a as a$a}from'./chunks/chunk-N5YZEC56.js';export{a as AnchorPositions}from'./chunks/chunk-EKOWJS3E.js';export{a as NotificationConfiguration}from'./chunks/chunk-KUVVZN66.js';export{a as NotificationStyle}from'./chunks/chunk-RXT3JWWR.js';import {a as a$4}from'./chunks/chunk-VJB527QZ.js';import {a as a$3}from'./chunks/chunk-GHTCNOQN.js';export{a as Localization}from'./chunks/chunk-GHTCNOQN.js';export{a as Feedback}from'./chunks/chunk-N2GWO3EX.js';export{a as Sound}from'./chunks/chunk-AUWF33RB.js';export{a as Vibration}from'./chunks/chunk-SJJGHQ52.js';export{a as AimerViewfinder}from'./chunks/chunk-26DQPDMK.js';export{a as Brush}from'./chunks/chunk-PUP3NNKU.js';export{a as Camera}from'./chunks/chunk-GK6JPJTE.js';export{a as CameraAccess}from'./chunks/chunk-DFFYK2ZZ.js';export{a as DataCaptureContext}from'./chunks/chunk-D767RWTQ.js';import {a as a$b,c}from'./chunks/chunk-LISC6VSM.js';import {a as a$2}from'./chunks/chunk-NKCR7VPO.js';import {b}from'./chunks/chunk-6H6FKGVE.js';export{b as loadingStatus}from'./chunks/chunk-6H6FKGVE.js';export{a as DataCaptureContextSettings}from'./chunks/chunk-7SW2PEHB.js';export{a as ScanditHTMLElement}from'./chunks/chunk-EV4OEANA.js';export{a as assert,b as assertUnreachable,c as assertUnreachableThrowException}from'./chunks/chunk-FTD535WI.js';import {a as a$9}from'./chunks/chunk-GPJEB376.js';import {a as a$c}from'./chunks/chunk-QCZSSQAQ.js';export{a as DataCaptureError}from'./chunks/chunk-QCZSSQAQ.js';import {a as a$8}from'./chunks/chunk-UCD6YLP3.js';export{a as BrowserHelper}from'./chunks/chunk-UCD6YLP3.js';export{a as Feature}from'./chunks/chunk-NVK73TNL.js';import {a as a$7}from'./chunks/chunk-XR65N6EG.js';export{a as Logger}from'./chunks/chunk-XR65N6EG.js';export{c as CameraPosition,g as CameraSettings,e as FocusGestureStrategy,a as FrameSourceState,b as TorchState,d as VideoResolution,f as isCameraFrameSource}from'./chunks/chunk-7ELPJFJV.js';export{c as RectangularViewfinderAnimation,b as RectangularViewfinderLineStyle,a as RectangularViewfinderStyle}from'./chunks/chunk-WGLHZXRT.js';export{a as LogoStyle,c as SwipeToZoom,b as TapToFocus}from'./chunks/chunk-GX4YCYCH.js';export{q as Anchor,n as Color,p as Direction,m as MarginsWithUnit,c as MeasureUnit,d as NumberWithUnit,o as Orientation,a as Point,e as PointWithUnit,b as Quadrilateral,f as Rect,g as RectWithUnit,i as Size,j as SizeWithAspect,h as SizeWithUnit,l as SizeWithUnitAndAspect,k as SizingMode}from'./chunks/chunk-TPQTY3KB.js';export{a as ContextStatus,b as PrivateMirrorAxis}from'./chunks/chunk-WUHKODFA.js';a$1();var a=a$2;async function A(){var e;a.configurePhase="unconfigured",a.configurePromise=null,(e=a.mainDataCaptureLoader)!=null&&e.terminateDataCaptureWorker&&await a.mainDataCaptureLoader.terminateDataCaptureWorker(true);}function g({percentage:e}){for(let r of a$a.values())r.setProgressBarPercentage(e);}function B(){var i,u,f;function e(b){return ["auto","off","on"].includes(b)}let r=new URLSearchParams(window.location.search),[o="auto",s="auto",n=false]=[(i=r.get("pthreads"))==null?void 0:i.toLowerCase(),(u=r.get("simd"))==null?void 0:u.toLowerCase(),((f=r.get("forceAllPolyfills"))==null?void 0:f.toLowerCase())==="true"];return {overrideThreadsSupport:e(o)?o:"auto",overrideSimdSupport:e(s)?s:"auto",forceAllPolyfills:n}}async function I(e){if(a$b()&&typeof e.licenseDataPath!="string")throw new a$c({name:"MisconfigurationError",message:'"licenseDataPath" string is missing or not valid'});if(a$b()&&typeof e.licenseDataPath=="string"){let o=await c({licenseDataPath:e.licenseDataPath});if(o==null)throw new Error("Cannot retrieve license key for Electron");e.licenseKey=o.licenseKey;}if(e.licenseKey==null||e.licenseKey.trim().length<64)throw new a$c({name:"NoLicenseKeyError",message:"No license key provided"});if(typeof e.libraryLocation!="string")throw new a$c({name:"MisconfigurationError",message:'Option "libraryLocation" was not provided'});if(!Array.isArray(e.moduleLoaders)||e.moduleLoaders.length===0)throw new a$c({name:"MisconfigurationError",message:'Option "moduleLoaders" is missing or empty'});let r=e.moduleLoaders.map(o=>o.moduleName);if(!["BarcodeCapture","IdCapture","LabelCapture"].includes(r[0]))throw new a$c({name:"MisconfigurationError",message:'Main modules must be loaded before side modules. For example "BarcodeCapture" must be loaded before "Parser".'})}async function z(e,r){let o=new Map,s=new Map;for(let n of e)s.set(n.moduleName,n.load(r));await Promise.all(s.values());for(let[n,i]of s)o.set(n,await i);return o}async function nr(e){if(a.configurePhase!=="unconfigured"&&a.configurePromise!=null)return a.configurePromise;a$3.getInstance().updateIfMissing(a$4);async function r(){var f;a$2.configurePhase="started";let{forceAllPolyfills:o,overrideThreadsSupport:s,overrideSimdSupport:n}=B();await a$5({forceAllPolyfills:o}),await I(e);let i={overrideThreadsSupport:s,overrideSimdSupport:n,...e,libraryLocation:a$6(e.libraryLocation),logLevel:(f=e.logLevel)!=null?f:a$7.Level.Debug,verifyResponseHash:true,loadProgressNotifier:b.notify.bind(b)};a$7.setLevel(i.logLevel),a$2.userLicenseKey=i.licenseKey,a$2.libraryLocation=i.libraryLocation,b.subscribe(g);let u=a$8.checkBrowserCompatibility();if(!u.fullSupport&&!u.scannerSupport)throw new a$9(u);a$8.isSupportedIOSVersion()||a$7.log(a$7.Level.Warn,`Warning: Minimum supported iOS version is 14.6. Please check the minimum system requirements here: https://docs.scandit.com/system-requirements#web-sdk`),a$2.dataCaptureLoaders=await z(i.moduleLoaders,i),a$2.mainDataCaptureLoader=[...a$2.dataCaptureLoaders.entries()][0][1],a$2.configurePhase="done",b.unsubscribe(g);}return a$2.configurePromise=r().catch(o=>{throw A(),b.unsubscribe(g),o}),a$2.configurePromise}function mr(e,r){switch(a.configurePhase=e,e){case "done":r&&(a.mainDataCaptureLoader=r),a.configurePromise=Promise.resolve();break;case "unconfigured":a.configurePromise=null;break;default:throw new Error(`Invalid configure phase: ${e}`)}} export{mr as __setConfigurePhase,nr as configure,A as resetConfigure};