@scandit/web-datacapture-core 8.4.0-beta.1 → 8.4.0
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/js/Camera.js +1 -1
- package/build/js/{DataCaptureContext-qacCkSOl.d.ts → DataCaptureContext-Qg40v7QA.d.ts} +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/FrameData.d.ts +1 -1
- package/build/js/ImageFrameSource.js +1 -1
- package/build/js/NotificationPresenter/index.d.ts +1 -1
- package/build/js/NotificationPresenter/index.js +1 -1
- package/build/js/NotificationPresenter/private/ConcreteNotificationPresenter.d.ts +1 -1
- package/build/js/NotificationPresenter/private/presets.d.ts +1 -1
- package/build/js/ScanditIconBuilder.js +1 -1
- package/build/js/chunks/{chunk-AD77NFCP.js → chunk-43GCMDYV.js} +1 -1
- package/build/js/chunks/{chunk-56OQ5EHO.js → chunk-6V2N4XHI.js} +1 -1
- package/build/js/chunks/{chunk-ZP3YIZEC.js → chunk-ALQOQOAM.js} +1 -1
- package/build/js/chunks/{chunk-CA6FHIF6.js → chunk-CZI3JAVS.js} +1 -1
- package/build/js/chunks/{chunk-2UHUEJA4.js → chunk-DGDPZ73X.js} +1 -1
- package/build/js/chunks/{chunk-H3J4TP2K.js → chunk-G7ORIX4S.js} +1 -1
- package/build/js/chunks/{chunk-GMOTHEWV.js → chunk-GHR3BSUQ.js} +1 -1
- package/build/js/chunks/{chunk-ZTKCGHYQ.js → chunk-GULNUBED.js} +1 -1
- package/build/js/chunks/chunk-HBPGHXF2.js +1 -0
- package/build/js/chunks/{chunk-XUIVDVLK.js → chunk-KZEBJGMU.js} +1 -1
- package/build/js/chunks/{chunk-P2R7FW6C.js → chunk-MBQZOWWF.js} +1 -1
- package/build/js/chunks/{chunk-JLTSTUKY.js → chunk-TMIZ6Z75.js} +1 -1
- package/build/js/chunks/{chunk-WOOPJWJS.js → chunk-XFQTFQYR.js} +1 -1
- package/build/js/chunks/{chunk-ACCTMSWC.js → chunk-Z5LRFYGI.js} +1 -1
- package/build/js/chunks/chunk-ZCF62ALL.js +1 -0
- package/build/js/controls/CameraFOVSwitchControl.d.ts +1 -1
- package/build/js/controls/CameraFOVSwitchControl.js +1 -1
- package/build/js/controls/CameraSwitchControl.d.ts +1 -1
- package/build/js/controls/CameraSwitchControl.js +1 -1
- package/build/js/controls/TorchSwitchControl.d.ts +1 -1
- package/build/js/controls/TorchSwitchControl.js +1 -1
- package/build/js/controls/ZoomSwitchControl.d.ts +1 -1
- package/build/js/controls/ZoomSwitchControl.js +1 -1
- package/build/js/controls/common.d.ts +1 -1
- package/build/js/controls/index.d.ts +1 -1
- package/build/js/controls/index.js +1 -1
- package/build/js/defaults/DefaultsCamera.d.ts +1 -1
- package/build/js/defaults/DefaultsDataCaptureView.js +1 -1
- package/build/js/index.d.ts +1 -1
- package/build/js/index.js +1 -1
- package/build/js/moduleLoader.d.ts +1 -1
- package/build/js/private/CameraManager.d.ts +1 -1
- package/build/js/private/CameraManager.js +1 -1
- package/build/js/private/CameraPool.d.ts +1 -1
- package/build/js/private/CanvasDrawerWithMetrics.d.ts +1 -1
- package/build/js/private/CoreModuleLicenseTextProvider.d.ts +1 -1
- package/build/js/private/CoreModuleLicenseTextProvider.js +1 -1
- package/build/js/private/CustomLocationsView.js +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/FrameReader.js +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/NormalizedModuleLoaderOptions.d.ts +1 -1
- package/build/js/private/SingleImageUploaderView.d.ts +1 -1
- package/build/js/private/SingleImageUploaderView.js +1 -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/ui/atoms/Toast.d.ts +1 -1
- package/build/js/private/ui/molecules/CameraFOVSwitchButton.js +1 -1
- package/build/js/private/ui/molecules/CameraSwitchButton.js +1 -1
- package/build/js/private/ui/molecules/HintPresenter.d.ts +1 -1
- package/build/js/private/utils/index.js +1 -1
- package/build/js/private/utils/replaceImagesInViewUtils.d.ts +1 -1
- package/build/js/worker/ImageConverterForwarder.d.ts +1 -1
- package/build/js/worker/ViewInfoHelper.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/dataCaptureWorkerRelated.d.ts +1 -1
- package/build/js/worker/index.d.ts +1 -1
- package/build/js/worker/index.js +1 -1
- package/package.json +1 -1
- package/build/js/chunks/chunk-LPFXHHWJ.js +0 -1
- package/build/js/chunks/chunk-P3NPNIWR.js +0 -1
- /package/build/js/chunks/{chunk-AC4QOIY7.js → chunk-J3HHOJE3.js} +0 -0
- /package/build/js/chunks/{chunk-WHRRC6V6.js → chunk-W7VB532D.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-GHR3BSUQ.js';import {a}from'./chunk-L2STPTEN.js';import {d}from'./chunk-YUZDO2PC.js';import {b}from'./chunk-YONR3EGV.js';import {f,g}from'./chunk-D222MT4V.js';var u=.5;function m(c){return Math.round(c*10)/10}var C=class{constructor(){this.type="zoom";this._zoomLevels=new Set;this._orientation="default";this._isAlwaysExpanded=false;this._selectedZoomLevel=1;this._accessibilityLabel="Zoom";this.isApplyingZoomLevel=false;this.handlerForZoomStrategy={setZoomForCurrentCamera:async e=>{await this.currentCamera.setZoomFactor(e);},switchToUltrawideCameraAndSetZoom:async e=>{await this.switchToUltraWideCamera(),await this.currentCamera.setZoomFactor(e/u);},setZoomForUltrawideCamera:async e=>{await this.currentCamera.setZoomFactor(e/u);},switchToWideCameraAndSetZoom:async e=>{await this.switchToWideCamera(),await this.currentCamera.setZoomFactor(e);},setZoomForWideCamera:async e=>{await this.currentCamera.setZoomFactor(e);}};this.onZoomLevelSelected=this.handleZoomLevelSelected.bind(this);}get currentCamera(){var i;let e=(i=this.view)==null?void 0:i.getContext(),t=e==null?void 0:e.frameSource;return f(t)?t:null}get orientation(){return this._orientation}set orientation(e){this._orientation=e,this.zoomSwitchPill&&(this.zoomSwitchPill.orientation=this.resolveOrientation());}get isAlwaysExpanded(){return this._isAlwaysExpanded}set isAlwaysExpanded(e){this._isAlwaysExpanded=e,this.zoomSwitchPill&&(this.zoomSwitchPill.isAlwaysExpanded=e);}get isExpanded(){var e,t;return (t=(e=this.zoomSwitchPill)==null?void 0:e.expanded)!=null?t:false}set isExpanded(e){!this._isAlwaysExpanded&&this.zoomSwitchPill&&(this.zoomSwitchPill.expanded=e);}get selectedZoomLevel(){return this._selectedZoomLevel}get accessibilityLabel(){return this._accessibilityLabel}set accessibilityLabel(e){var t;this._accessibilityLabel=e,(t=this.zoomSwitchPill)==null||t.setAttribute("aria-label",e);}async selectZoomLevel(e){var s,h,d;let t=await((s=this.currentCamera)==null?void 0:s.getZoomRange()),i=[...this._zoomLevels],o=(h=t==null?void 0:t.min)!=null?h:Math.min(...i),r=(d=t==null?void 0:t.max)!=null?d:Math.max(...i),a$1=m(t==null?e:a(e,o,r));return await this.applyZoomLevelToCamera(a$1),this.updateSelectedLevelInUI(a$1),a$1}toJSONObject(){return {type:this.type}}onZoomLevelChanged(e,t,i){this.zoomSwitchPill&&(this.zoomSwitchPill.expanded=false),this.updateSelectedLevelInUI(m(i));}onZoomLevelsChanged(e,t){this._zoomLevels=new Set(t),this.zoomSwitchPill&&(this.zoomSwitchPill.zoomLevels=[...this._zoomLevels]);}async install(e){var o,r;if(!this.ZoomSwitchPill){let{ZoomSwitchPill:a}=await import('../private/ui/molecules/ZoomSwitchPill.js');this.ZoomSwitchPill=a,(o=this.ZoomSwitchPill)==null||o.register();}this.view=e,this.zoomSwitchPill=this.ZoomSwitchPill.create(),this.zoomSwitchPill.slot="bottomRight",this.zoomSwitchPill.hidden=true,this.zoomSwitchPill.zoomLevels=[...this._zoomLevels],this.zoomSwitchPill.selectedLevel=this._selectedZoomLevel,this.zoomSwitchPill.orientation=this.resolveOrientation(),this.zoomSwitchPill.isAlwaysExpanded=this._isAlwaysExpanded,this.zoomSwitchPill.setAttribute("aria-label",this._accessibilityLabel),this.zoomSwitchPill.addEventListener("zoom-level-selected",this.onZoomLevelSelected);let t=await this.canShow();this.zoomSwitchPill.hidden=!t;let i=e.controlsElement;return i==null||i.append(this.zoomSwitchPill),(r=this.currentCamera)==null||r.addZoomListener(this),this.syncZoomLevelsFromCamera(),true}remove(){var e,t,i;(e=this.zoomSwitchPill)==null||e.removeEventListener("zoom-level-selected",this.onZoomLevelSelected),(t=this.currentCamera)==null||t.removeZoomListener(this),(i=this.zoomSwitchPill)==null||i.remove(),this.zoomSwitchPill=void 0,this.view=void 0;}async update(e){let t=this.currentCamera;this.view=e;let i=this.currentCamera;if(t!==i&&(t==null||t.removeZoomListener(this),i==null||i.addZoomListener(this),i!=null&&(this.syncZoomLevelsFromCamera(),this.updateSelectedLevelInUI(m(i.settings.zoomFactor)))),this.zoomSwitchPill&&(this.zoomSwitchPill.zoomLevels=[...this._zoomLevels],this.zoomSwitchPill.selectedLevel=this._selectedZoomLevel,!this.isApplyingZoomLevel)){let o=await this.canShow();this.zoomSwitchPill.hidden=!o;}}async canShow(){let e=this.currentCamera;return await(e==null?void 0:e.getZoomRange())!==null}async handleZoomLevelSelected({detail:{selectedLevel:e}}){this.zoomSwitchPill&&(this._selectedZoomLevel=e,this.zoomSwitchPill.temporaryLevel=null,this.zoomSwitchPill.selectedLevel=e,await this.applyZoomLevelToCamera(e));}updateSelectedLevelInUI(e){if(this.zoomSwitchPill){let t=m(e);this._selectedZoomLevel=t;let i=this._zoomLevels.has(t)?null:t;this.zoomSwitchPill.temporaryLevel=i,this.zoomSwitchPill.selectedLevel=t;}}zoomStrategyForLevel(e){if(!b.isIOSDeviceWithExtendedCameraAccess())return "setZoomForCurrentCamera";let t=d.isIOSUltraWideBackCameraLabel(this.currentCamera.label);return e<1?t?"setZoomForUltrawideCamera":"switchToUltrawideCameraAndSetZoom":t?"switchToWideCameraAndSetZoom":"setZoomForWideCamera"}isCameraSwitchingStrategy(e){return e==="switchToUltrawideCameraAndSetZoom"||e==="switchToWideCameraAndSetZoom"}async applyZoomLevelToCamera(e){if(!this.currentCamera||this.isApplyingZoomLevel)return;this.isApplyingZoomLevel=true;let t=this.zoomStrategyForLevel(e);this.isCameraSwitchingStrategy(t)&&this.zoomSwitchPill&&(this.zoomSwitchPill.loading=true);try{let i=this.handlerForZoomStrategy[t];await i(e);}finally{this.isApplyingZoomLevel=false,this.zoomSwitchPill&&(this.zoomSwitchPill.loading=false);}}async switchToUltraWideCamera(){let t=(await a$1.getAll()).find(i=>d.isIOSUltraWideBackCameraLabel(i.label));t&&await this.switchCameras(t);}async switchToWideCamera(){let t=(await a$1.getAll()).find(i=>d.isIOSBackCameraLabel(i.label));t&&await this.switchCameras(t);}async switchCameras(e){var a,s;let t,i;this.currentCamera!=null&&(t=new g(this.currentCamera.settings),i=this.currentCamera.desiredState),await((a=this.currentCamera)==null?void 0:a.switchToDesiredState("off")),t!=null&&await e.applySettings(t);let o=(s=this.view)==null?void 0:s.getContext();await(o==null?void 0:o.setFrameSource(e));let r=i!=null?i:"on";await e.switchToDesiredState(r);}resolveOrientation(){var t;if(this._orientation!=="default")return this._orientation;let e=(t=this.zoomSwitchPill)==null?void 0:t.slot;return e==="topCenter"||e==="bottomCenter"?"horizontal":"vertical"}syncZoomLevelsFromCamera(){var t,i;let e=(i=(t=this.currentCamera)==null?void 0:t.settings)==null?void 0:i.zoomLevels;e!=null&&e.length>0&&(this._zoomLevels=new Set(e),this.zoomSwitchPill&&(this.zoomSwitchPill.zoomLevels=[...this._zoomLevels]));}};export{C as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-SEAVQZN6.js';import {a}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-SEAVQZN6.js';import {a}from'./chunk-DGDPZ73X.js';import {a as a$5}from'./chunk-AIRWHLJH.js';import {a as a$4}from'./chunk-FGO2SSRS.js';import {a as a$1}from'./chunk-QCRFVRSS.js';import {b}from'./chunk-FTD535WI.js';import {a as a$3}from'./chunk-XR65N6EG.js';var h=class{constructor(a$3,e){this.onMessageListener=this.onMessage.bind(this);this.workerSelf=a$3,this.dataCaptureInstance=new a(e,{postMessage:this.postMessage.bind(this),getOffscreenCanvas:this.getOffscreenCanvas.bind(this)}),a$1(a$3)&&(a$2(a$3),this.listenToMessages());}listenToMessages(){this.workerSelf.addEventListener("message",this.onMessageListener),this.workerSelf.addEventListener("error",a=>{a$3.log(a$3.Level.Error,a);}),this.workerSelf.addEventListener("messageerror",a=>{a$3.log(a$3.Level.Error,a);});}postMessage(a,e){this.workerSelf.postMessage(a,e!=null?e:[]);}getOffscreenCanvas(){if(this.isOffscreenCanvasSupported())return new this.workerSelf.OffscreenCanvas(32,32)}isOffscreenCanvasSupported(){return typeof this.workerSelf.OffscreenCanvas=="function"}hasPayload(a){return a$4(a)&&"payload"in a}hasTransferables(a){return a$4(a)&&Array.isArray(a.transferables)}async respondWith(a,e,l){let r=null,t;try{t=l(),t instanceof Promise&&(t=await t);}catch(m){t=void 0,r=a$5(m);}let i={type:"workerTaskId",command:a,id:e,payload:this.hasPayload(t)?t.payload:void 0};r!=null&&(i.error=r),this.postMessage(i,this.hasTransferables(t)?t.transferables:[]);}onMessage(a){switch(a.data.command){case "loadLibrary":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.loadLibrary({libraryLocation:e.libraryLocation,locationPath:e.locationPath,referredOrigin:e.referredOrigin,writableDataPathOverride:e.writableDataPathOverride,threadsSupport:e.threadsSupport,simdSupport:e.simdSupport,verifyResponseHash:e.verifyResponseHash,fixedWasmMemory:e.fixedWasmMemory,indexedDBTimeoutMs:e.indexedDBTimeoutMs}));}break}case "onTap":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.onTap(e.point);});}break}case "hintPresenterV2update":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>{this.dataCaptureInstance.hintPresenterV2Update();});}break}case "createContext":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.createContext({context:e.context,deviceId:e.deviceId,delayedRegistration:e.delayedRegistration,highEndBlurryRecognition:e.highEndBlurryRecognition,appName:e.appName,parentDomain:e.parentDomain,isTablet:e.isTablet,batteryInfo:e.batteryInfo}));}break}case "setFrameSource":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.setFrameSource(e.mirrorAxis,e.isCameraFrameSource));}break}case "processFrame":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.processFrame({data:e.data,frameId:e.frameId,width:e.width,height:e.height,colorType:e.colorType}));}break}case "requestFrameData":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.requestFrameData(e.frameId));}break}case "deleteFrameData":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.deleteFrameData(e.frameId);});}break}case "updateContext":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.updateContext(e));}break}case "dispose":{this.respondWith(a.data.command,a.data.id,()=>this.dataCaptureInstance.dispose());break}case "flushAnalytics":{this.respondWith(a.data.command,a.data.id,()=>{this.dataCaptureInstance.flushAnalytics();});break}case "reportCameraProperties":{{let{data:e}=a;this.respondWith(e.command,e.id,async()=>this.dataCaptureInstance.reportCameraProperties(e));}break}case "setLogLevel":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{a$3.setLevel(e.level);});}break}case "updateBatteryInfo":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.updateBatteryInfo(e.batteryInfo);});}break}case "extractCentaurusLicense":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.extractCentaurusLicense(e.licenseKey));}break}case "documentVisibility":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>{this.dataCaptureInstance.onDocumentVisibilityChange(e.state);});}break}case "isFeatureSupported":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.isFeatureSupported(e.feature));}break}case "getViewfinderInfo":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getViewfinderInfo());}break}case "getOpenSourceSoftwareLicenseInfo":{{let{data:e}=a;this.respondWith(e.command,e.id,()=>this.dataCaptureInstance.getOpenSourceSoftwareLicenseInfo());}break}case "addNativeOverlay":this.dataCaptureInstance.addNativeOverlay(a);break;case "removeNativeOverlay":this.dataCaptureInstance.removeNativeOverlay(a);break;case "convertToJPEGResult":{{let{data:e}=a;this.dataCaptureInstance.convertToJPEGResult(e.imageId,e.result);}break}default:return b(a.data),false}return true}};export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-U4IMOTYL.js';import {b,a as a$2}from'./chunk-KYNYQBNF.js';import {a as a$
|
|
1
|
+
import {a as a$3}from'./chunk-U4IMOTYL.js';import {b,a as a$2}from'./chunk-KYNYQBNF.js';import {a as a$1}from'./chunk-QOCHMKNY.js';import {a as a$4}from'./chunk-KAFNKP6O.js';var z={bottomLeft:"bottomRight",bottomRight:"bottomLeft",topLeft:"topRight",topRight:"topLeft",centerLeft:"centerRight",centerRight:"centerLeft",center:"center",topCenter:"topCenter",bottomCenter:"bottomCenter"},a=class a{constructor(){this.listener=null;this._mounted=false;this._mirrored=false;this._cachedSize=new a$1(0,0);this.resizeObserver=null;this.mapViewAnchorPositionsForFramePoint=t=>t;}get size(){return this._cachedSize}setMirrored(t){this._mounted&&(this._mirrored=t);}mount(t){var n;if(this._mounted)return;if(!document.head.querySelector(`[data-component=${a.componentName}]`)){let i=document.createElement("style");i.dataset.component=a.componentName,i.append(document.createTextNode(b)),document.head.append(i);}let r=document.createElement("div");r.classList.add(a$2.CUSTOM_VIEW_CONTAINER),(n=t.parentNode)==null||n.replaceChild(r,t),this._htmlRoot=r,this.gestureRecognizer=new a$3(this._htmlRoot),this.gestureRecognizer.addListener({onTap:(i,o)=>{var s,e;let m=(s=o.target.dataset.identifier)!=null?s:"";m!==""&&((e=this.listener)==null||e.didTapView(Number.parseInt(m,10)));}}),this.resizeObserver=new ResizeObserver(([i])=>{this._cachedSize=new a$1(i.contentRect.width,i.contentRect.height);}),this.resizeObserver.observe(this._htmlRoot),this._cachedSize=new a$1(this._htmlRoot.clientWidth,this._htmlRoot.clientHeight),this._mounted=true;}unmount(){var t,r,n,i;this._mounted&&(this.removeChildren(),(t=this.gestureRecognizer)==null||t.removeAllListeners(),(r=this.resizeObserver)==null||r.disconnect(),(n=this._htmlRoot)==null||n.remove(),this._htmlRoot=null,this.gestureRecognizer=null,(i=document.head.querySelector(`[data-component=${a.componentName}]`))==null||i.remove(),this.listener=null,this._mounted=false);}render(t){var n,i,o,m,s;if(t.elements.length===0){this.removeChildren();return}for(let e of t.removedIds)(i=(n=this._htmlRoot)==null?void 0:n.querySelector(`#${a.elementSelectorPrefix}${e}`))==null||i.remove();let r=document.createDocumentFragment();for(let e of t.elements){let c=`${a.elementSelectorPrefix}${e.identifier}`,p=(o=this._htmlRoot)==null?void 0:o.querySelector(`#${c}`),l=p;if(p==null&&(l=new Image(e.view.options.size.width,e.view.options.size.height),l.id=c,l.dataset.identifier=String(e.identifier),r.append(l)),l){l.src=e.view.data;let h=this.mapViewAnchorPositionsForFramePoint(e.anchorPositions)[this._mirrored?z[e.anchor]:e.anchor];this._mirrored&&(h=a$4.mirrorX(h,this.size));let{x:u,y:P}=this.adjustCoordinatesWithOffset(h,{elementSize:e.view.options.size,offset:e.offset}),v=(m=e.view.options.scale)!=null?m:1;l.style.scale=`${v}`,l.style.transform=`translate3d(${u/v}px, ${P/v}px, 0px)`;}}(s=this._htmlRoot)==null||s.append(r);}renderDomView(t){var n,i;if(t.elements.length===0){this.removeChildren();return}let r=document.createDocumentFragment();for(let o of t.elements){let m=`${a.elementSelectorPrefix}${o.identifier}`,s=(n=this._htmlRoot)==null?void 0:n.querySelector(`#${m}`),{view:e}=o;if(e!=null){e.id=m,s&&s!==e&&s.replaceWith(e);let c=this.mapViewAnchorPositionsForFramePoint(o.anchorPositions)[this._mirrored?z[o.anchor]:o.anchor];this._mirrored&&(c=a$4.mirrorX(c,this.size));let{width:p,height:l}=e.getBoundingClientRect(),{x:h,y:u}=this.adjustCoordinatesWithOffset(c,{elementSize:{width:p,height:l},offset:o.offset});e.style.position="absolute",e.style.transform=`translate3d(calc(${h}px - 50%), calc(${u}px - 50%), 0px)`,r.append(e);}}(i=this._htmlRoot)==null||i.append(r);}removeChildren(){var t;for(;(t=this._htmlRoot)!=null&&t.firstChild;)this._htmlRoot.firstChild.remove();}adjustCoordinatesWithOffset(t,r){let n=t,{elementSize:i,offset:o}=r,m=t.x-i.width/2,s=t.y-i.height/2;return o.x.unit==="pixel"&&(n=new a$4(m+o.x.value,s+o.y.value)),o.x.unit==="fraction"&&(n=new a$4(m+i.width*o.x.value,s+i.height*o.y.value)),n}};a.componentName="CustomLocationsView",a.elementSelectorPrefix="scandit-view-";var S=a;export{S as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-EQRBQJYM.js';import {c,a as a$1,b}from'./chunk-JFRSUCMO.js';import {a as a$2}from'./chunk-GHTCNOQN.js';import {e}from'./chunk-
|
|
1
|
+
import {a as a$3}from'./chunk-EQRBQJYM.js';import {c,a as a$1,b}from'./chunk-JFRSUCMO.js';import {a as a$2}from'./chunk-GHTCNOQN.js';import {e}from'./chunk-CZI3JAVS.js';import {b as b$1}from'./chunk-YONR3EGV.js';import {a as a$4}from'./chunk-XR65N6EG.js';var a=class a{constructor(e){this.canUploadFile=false;this._mounted=false;this._loading=false;this._htmlRoot=void 0;this._canvas=void 0;this._onInputCheck=void 0;this._onBeforeFileRead=void 0;this._onImageLoadError=void 0;this._onFileReaderError=void 0;this._onCaptureReady=void 0;this._resizedImageSizeLimit=1440;this._inputElement=void 0;this._buttonElement=void 0;this._informationElement=void 0;this._chooseImageText="";this._localizationSubscription=void 0;this._onLocalizationUpdated=this.onLocalizationUpdated.bind(this);this._settings=e;}get canvas(){return this._canvas||(this._canvas=document.createElement("canvas")),this._canvas}get canvasContext(){return this._canvasContext||(this._canvasContext=this.canvas.getContext("2d",{willReadFrequently:true})),this._canvasContext}mount(e){var _,f;if(this._mounted)return;if(!document.head.querySelector(`[data-component=${a.componentName}]`)){let r=document.createElement("style");r.dataset.component=a.componentName,r.textContent=c,document.head.append(r);}let t=document.createElement("div");t.className=a$1.SINGLE_IMAGE_UPLOADER_CONTAINER,Object.assign(t.style,b.SINGLE_IMAGE_UPLOADER_CONTAINER_STYLE,this._settings.containerStyle),e.append(t);let{iconElement:n,iconStyle:s,informationElement:i,informationStyle:l,buttonElement:d,buttonStyle:h,onlyCameraCapture:p}=this._settings;Object.assign(n.style,b.SINGLE_IMAGE_UPLOADER_ICON_STYLE,s,{maxWidth:"100px",maxHeight:"100px"}),t.append(n),i.hasAttribute(a.DEFAULT_DOM_ATTRIBUTE)&&(Object.assign(i.style,b.SINGLE_IMAGE_UPLOADER_INFORMATION_STYLE,l),i.textContent=a$2.getInstance().get("core.singleImageUploader.title")),t.append(i);let o=document.createElement("input");o.type="file",p?(o.accept="image/*",o.capture="environment",o.dataset.onlyCaptureOnMobile="environment"):o.accept=b$1.isAndroid()&&((_=b$1.getUserAgentInfo().getBrowser().name)!=null&&_.toLowerCase().includes("chrome"))?"image/*;capture=camera":"image/*",o.addEventListener("change",r=>{this.onFileUpload(r);}),o.addEventListener("click",r=>{var m;(m=this._onInputCheck)==null||m.call(this,r);}),o.addEventListener("keydown",r=>{var m;(m=this._onInputCheck)==null||m.call(this,r);});let g=document.createElement("label");g.append(o),d.hasAttribute(a.DEFAULT_DOM_ATTRIBUTE)&&Object.assign(d.style,b.SINGLE_IMAGE_UPLOADER_BUTTON_STYLE,h),g.append(d),t.append(g);let E=document.createRange().createContextualFragment(atob(a$3)).firstElementChild;Object.assign(E.style,{position:"absolute",bottom:"1em",right:"1em",width:"10em"}),t.append(E),this._htmlRoot=t,this._mounted=true,this._inputElement=o,this._buttonElement=d,this._chooseImageText=(f=d.textContent)!=null?f:"",this._informationElement=i,this._localizationSubscription=a$2.getInstance().subscribe(this._onLocalizationUpdated);}unmount(){var e,t,n;this._mounted&&((e=this._htmlRoot)==null||e.remove(),(t=document.head.querySelector(`[data-component=${a.componentName}]`))==null||t.remove(),(n=this._localizationSubscription)==null||n.cancel(),this._mounted=false);}setButtonState(e){this._inputElement&&(this._inputElement.disabled=e==="disabled");}getButtonState(){return this._inputElement?this._inputElement.disabled?"disabled":"enabled":"disabled"}onInputCheck(e){this._onInputCheck=e;}onBeforeFileRead(e){this._onBeforeFileRead=e;}onImageLoadError(e){this._onImageLoadError=e;}onFileReaderError(e){this._onFileReaderError=e;}onCaptureReady(e){this._onCaptureReady=e;}onAfterImageProcessed(){this.setLoading(false);}onLocalizationUpdated(){var e,t;(e=this._buttonElement)!=null&&e.hasAttribute(a.DEFAULT_DOM_ATTRIBUTE)&&(this._buttonElement.textContent=a$2.getInstance().get("core.singleImageUploader.button")),(t=this._informationElement)!=null&&t.hasAttribute(a.DEFAULT_DOM_ATTRIBUTE)&&(this._informationElement.textContent=a$2.getInstance().get("core.singleImageUploader.title"));}setLoading(e){this._buttonElement&&(this.setButtonState(e?"disabled":"enabled"),this._buttonElement.textContent=e?"...":this._chooseImageText,this._loading=e);}getResizedImageDimensions(e,t){return e<=this._resizedImageSizeLimit&&t<=this._resizedImageSizeLimit?{width:e,height:t}:e>t?{width:this._resizedImageSizeLimit,height:Math.round(t/e*this._resizedImageSizeLimit)}:{width:Math.round(e/t*this._resizedImageSizeLimit),height:this._resizedImageSizeLimit}}onImageLoad(e$1){var i;let{height:t,width:n}=this.getResizedImageDimensions(e$1.naturalWidth,e$1.naturalHeight);this.canvasContext.canvas.width=n,this.canvasContext.canvas.height=t,this.canvasContext.drawImage(e$1,0,0,n,t);let s={data:this.canvasContext.getImageData(0,0,n,t).data,frameId:e(),width:n,height:t};(i=this._onCaptureReady)==null||i.call(this,s);}onFileReaderLoad(e,t,n){e.value="",t.result!=null&&(n.addEventListener("load",()=>{this.onImageLoad(n);},{once:true}),n.addEventListener("error",s=>{var i;(i=this._onImageLoadError)==null||i.call(this,s),this.setLoading(false);},{once:true}),n.src=t.result);}async onFileUpload(e){var d;this.setLoading(true);let t=e.currentTarget,{files:n}=t;if(n==null||n.length===0){this.setLoading(false);return}let s=(d=this._onBeforeFileRead)==null?void 0:d.call(this,e);if(s instanceof Promise&&await s,!this.canUploadFile){t.value="",a$4.warn("Can't upload file, no capture mode enabled."),this.setLoading(false);return}let i=new Image,l=new FileReader;l.addEventListener("load",()=>{this.onFileReaderLoad(t,l,i);}),l.addEventListener("error",h=>{var p;(p=this._onFileReaderError)==null||p.call(this,h),this.setLoading(false);}),l.readAsDataURL(n[0]);}};a.componentName="SingleImageUploaderView",a.DEFAULT_DOM_ATTRIBUTE="data-scandit-default";var T=a;export{T as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-TMIZ6Z75.js';var t=new a(globalThis,{get:()=>globalThis.Module,set:e=>{globalThis.Module=e;}});function l(e){}export{t as a,l as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { C as Control, a as ControlType } from '../DataCaptureContext-
|
|
2
|
+
import { C as Control, a as ControlType } from '../DataCaptureContext-Qg40v7QA.js';
|
|
3
3
|
import '../Camera-HgH6fwnW.js';
|
|
4
4
|
import '../commons/Rect.js';
|
|
5
5
|
import '../private/Serializable.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as CameraFOVSwitchControl}from'../chunks/chunk-
|
|
1
|
+
export{a as CameraFOVSwitchControl}from'../chunks/chunk-ALQOQOAM.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { C as Control, a as ControlType } from '../DataCaptureContext-
|
|
2
|
+
import { C as Control, a as ControlType } from '../DataCaptureContext-Qg40v7QA.js';
|
|
3
3
|
import '../Camera-HgH6fwnW.js';
|
|
4
4
|
import '../commons/Rect.js';
|
|
5
5
|
import '../private/Serializable.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as CameraSwitchControl}from'../chunks/chunk-
|
|
1
|
+
export{a as CameraSwitchControl}from'../chunks/chunk-GULNUBED.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { C as Control, a as ControlType } from '../DataCaptureContext-
|
|
2
|
+
import { C as Control, a as ControlType } from '../DataCaptureContext-Qg40v7QA.js';
|
|
3
3
|
import '../Camera-HgH6fwnW.js';
|
|
4
4
|
import '../commons/Rect.js';
|
|
5
5
|
import '../private/Serializable.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as TorchSwitchControl}from'../chunks/chunk-
|
|
1
|
+
export{a as TorchSwitchControl}from'../chunks/chunk-J3HHOJE3.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import { Z as ZoomListener, C as Camera } from '../Camera-HgH6fwnW.js';
|
|
3
3
|
import { ZoomSwitchOrientation } from '../ZoomSwitchOrientation.js';
|
|
4
|
-
import { C as Control, a as ControlType } from '../DataCaptureContext-
|
|
4
|
+
import { C as Control, a as ControlType } from '../DataCaptureContext-Qg40v7QA.js';
|
|
5
5
|
import '../commons/Rect.js';
|
|
6
6
|
import '../private/Serializable.js';
|
|
7
7
|
import '../commons/Point.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as ZoomSwitchControl}from'../chunks/chunk-
|
|
1
|
+
export{a as ZoomSwitchControl}from'../chunks/chunk-MBQZOWWF.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { C as Control, a as ControlType, bi as PrivateBaseControl, bj as PrivateControl } from '../DataCaptureContext-
|
|
2
|
+
export { C as Control, a as ControlType, bi as PrivateBaseControl, bj as PrivateControl } from '../DataCaptureContext-Qg40v7QA.js';
|
|
3
3
|
import '../private/Serializable.js';
|
|
4
4
|
import '../Camera-HgH6fwnW.js';
|
|
5
5
|
import '../commons/Rect.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
export { CameraFOVSwitchControl } from './CameraFOVSwitchControl.js';
|
|
3
3
|
export { CameraSwitchControl } from './CameraSwitchControl.js';
|
|
4
|
-
export { C as Control, a as ControlType } from '../DataCaptureContext-
|
|
4
|
+
export { C as Control, a as ControlType } from '../DataCaptureContext-Qg40v7QA.js';
|
|
5
5
|
export { TorchSwitchControl } from './TorchSwitchControl.js';
|
|
6
6
|
export { ZoomSwitchControl } from './ZoomSwitchControl.js';
|
|
7
7
|
import '../Camera-HgH6fwnW.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as
|
|
1
|
+
export{a as TorchSwitchControl}from'../chunks/chunk-J3HHOJE3.js';export{a as ZoomSwitchControl}from'../chunks/chunk-MBQZOWWF.js';export{a as CameraFOVSwitchControl}from'../chunks/chunk-ALQOQOAM.js';export{a as CameraSwitchControl}from'../chunks/chunk-GULNUBED.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import { k as VideoResolution, j as FocusGestureStrategy, e as CameraPosition } from '../Camera-HgH6fwnW.js';
|
|
3
3
|
import '../ScanditIcon.js';
|
|
4
|
-
import '../DataCaptureContext-
|
|
4
|
+
import '../DataCaptureContext-Qg40v7QA.js';
|
|
5
5
|
import '../commons/Rect.js';
|
|
6
6
|
import '../private/Serializable.js';
|
|
7
7
|
import '../commons/Point.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as defaultDataCaptureView}from'../chunks/chunk-
|
|
1
|
+
export{a as defaultDataCaptureView}from'../chunks/chunk-6V2N4XHI.js';
|
package/build/js/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export { SizeWithUnit, SizeWithUnitJSON } from './commons/SizeWithUnit.js';
|
|
|
26
26
|
export { SizeWithUnitAndAspect, SizeWithUnitAndAspectJSON } from './commons/SizeWithUnitAndAspect.js';
|
|
27
27
|
export { CameraFOVSwitchControl } from './controls/CameraFOVSwitchControl.js';
|
|
28
28
|
export { CameraSwitchControl } from './controls/CameraSwitchControl.js';
|
|
29
|
-
export { b as Change, c as ContextStatus, d as ContextStatusJSON, C as Control, a as ControlType, D as DataCaptureComponent, e as DataCaptureComponentJSON, f as DataCaptureContext, g as DataCaptureContextCreationOptions, h as DataCaptureContextJSON, i as DataCaptureContextListener, j as DataCaptureContextState, k as DataCaptureLoader, l as DataCaptureLoaderOptions, m as DataCaptureMode, n as DataCaptureModeJSON, o as DataCaptureOverlay, p as DataCaptureView, q as DataCaptureViewConnectOptions, r as DataCaptureViewJSON, s as DataCaptureViewListener, F as FrameData, M as ModuleLoader, t as ModuleLoaderOptions, P as PrivateCapabilityInfo, u as PrivateChangeSet, v as PrivateDataCaptureComponent, w as PrivateDataCaptureContext, x as PrivateDataCaptureContextOptions, y as PrivateDataCaptureMode, z as PrivateFrameHandler, A as PrivateFrameHandlerResponse, B as PrivateLoadableFrameData, E as PrivateMirrorAxis, G as convertToPublicFrameData } from './DataCaptureContext-
|
|
29
|
+
export { b as Change, c as ContextStatus, d as ContextStatusJSON, C as Control, a as ControlType, D as DataCaptureComponent, e as DataCaptureComponentJSON, f as DataCaptureContext, g as DataCaptureContextCreationOptions, h as DataCaptureContextJSON, i as DataCaptureContextListener, j as DataCaptureContextState, k as DataCaptureLoader, l as DataCaptureLoaderOptions, m as DataCaptureMode, n as DataCaptureModeJSON, o as DataCaptureOverlay, p as DataCaptureView, q as DataCaptureViewConnectOptions, r as DataCaptureViewJSON, s as DataCaptureViewListener, F as FrameData, M as ModuleLoader, t as ModuleLoaderOptions, P as PrivateCapabilityInfo, u as PrivateChangeSet, v as PrivateDataCaptureComponent, w as PrivateDataCaptureContext, x as PrivateDataCaptureContextOptions, y as PrivateDataCaptureMode, z as PrivateFrameHandler, A as PrivateFrameHandlerResponse, B as PrivateLoadableFrameData, E as PrivateMirrorAxis, G as convertToPublicFrameData } from './DataCaptureContext-Qg40v7QA.js';
|
|
30
30
|
export { TorchSwitchControl } from './controls/TorchSwitchControl.js';
|
|
31
31
|
export { ZoomSwitchControl } from './controls/ZoomSwitchControl.js';
|
|
32
32
|
export { F as FocusGesture, a as FocusGestureJSON, L as LogoStyle, P as PinchToZoom, S as SwipeToZoom, T as TapToFocus, Z as ZoomGesture, b as ZoomGestureJSON, c as ZoomGestureListener } from './DataCaptureViewPlusRelated-BOrDBPHq.js';
|
package/build/js/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as DataCaptureLoader}from'./chunks/chunk-YJNJGCAN.js';export{a as WorkerMain}from'./chunks/chunk-
|
|
1
|
+
export{a as DataCaptureLoader}from'./chunks/chunk-YJNJGCAN.js';export{a as WorkerMain}from'./chunks/chunk-TMIZ6Z75.js';export{a as TorchSwitchControl}from'./chunks/chunk-J3HHOJE3.js';export{a as ZoomSwitchControl}from'./chunks/chunk-MBQZOWWF.js';export{a as RectWithUnit}from'./chunks/chunk-TKO5JMMS.js';export{a as CameraFOVSwitchControl}from'./chunks/chunk-ALQOQOAM.js';export{a as CameraSwitchControl}from'./chunks/chunk-GULNUBED.js';export{a as Direction}from'./chunks/chunk-WARGMW7Z.js';export{a as NotificationBuilder}from'./chunks/chunk-5LXHD7FZ.js';export{a as NoViewfinder}from'./chunks/chunk-4ZMCJXZS.js';export{a as ZoomSwitchOrientation}from'./chunks/chunk-OLUNDJBC.js';export{a as PrivateNoneLocationSelection,b as RadiusLocationSelection,c as RectangularLocationSelection}from'./chunks/chunk-CAHJ3YOV.js';export{a as RectangularViewfinder}from'./chunks/chunk-GPUTPXQM.js';export{c as ScanditIconBuilder,b as ScanditIconForIconType,a as ScanditIconType}from'./chunks/chunk-W7VB532D.js';export{b as ScanditIcon,a as ScanditIconShape}from'./chunks/chunk-O4HDBWKK.js';export{a as SingleImageUploader}from'./chunks/chunk-4WA2PCJE.js';export{a as SingleImageUploaderSettings}from'./chunks/chunk-IMXMNDKM.js';export{a as DataCaptureVersion}from'./chunks/chunk-HBPGHXF2.js';export{a as DataCaptureView}from'./chunks/chunk-G7ORIX4S.js';export{a as AdditionalLayerPosition}from'./chunks/chunk-DZE2EYSZ.js';export{a as AnchorPositions}from'./chunks/chunk-RSQRPDVQ.js';export{a as MarginsWithUnit}from'./chunks/chunk-MA6UDVDJ.js';export{a as Orientation}from'./chunks/chunk-5RCWM6NI.js';export{a as PointWithUnit}from'./chunks/chunk-BDGRWHLY.js';export{a as Quadrilateral}from'./chunks/chunk-IJQG3OU6.js';export{a as Anchor}from'./chunks/chunk-Y7ZNLVR2.js';export{a as NotificationConfiguration}from'./chunks/chunk-CRUOVJHW.js';export{a as NotificationStyle}from'./chunks/chunk-RXT3JWWR.js';export{a as MeasureUnit}from'./chunks/chunk-QQEY536Q.js';export{a as LogoStyle,d as PinchToZoom,c as SwipeToZoom,b as TapToFocus}from'./chunks/chunk-4QJAB4PO.js';export{a as Feedback}from'./chunks/chunk-76IGNICM.js';export{a as Sound}from'./chunks/chunk-CGK5V6XZ.js';export{a as Vibration}from'./chunks/chunk-IASACVTH.js';export{a as convertToPublicFrameData}from'./chunks/chunk-W33RVR5M.js';export{a as ImageFrameSource}from'./chunks/chunk-43GCMDYV.js';export{a as LaserlineViewfinder}from'./chunks/chunk-RXPPTQAB.js';export{a as AimerViewfinder}from'./chunks/chunk-3KKUZY2T.js';export{c as RectangularViewfinderAnimation,b as RectangularViewfinderLineStyle,a as RectangularViewfinderStyle}from'./chunks/chunk-WGLHZXRT.js';export{a as SizeWithUnitAndAspect}from'./chunks/chunk-AZWFNBVA.js';export{a as SizingMode}from'./chunks/chunk-2JIATMSD.js';export{a as SizeWithAspect}from'./chunks/chunk-FR24G4R7.js';export{a as SizeWithUnit}from'./chunks/chunk-F2GMW4LP.js';export{a as NumberWithUnit}from'./chunks/chunk-ENYHCJGH.js';export{a as Brush}from'./chunks/chunk-YOTQPBO6.js';export{a as Color}from'./chunks/chunk-SGL5J2CI.js';export{a as Camera}from'./chunks/chunk-GHR3BSUQ.js';export{b as DataCaptureContext}from'./chunks/chunk-KZEBJGMU.js';export{a as OverrideState}from'./chunks/chunk-6W7FX6LD.js';export{b as loadingStatus}from'./chunks/chunk-6H6FKGVE.js';export{a as Localization}from'./chunks/chunk-GHTCNOQN.js';export{a as ScanditHTMLElement}from'./chunks/chunk-EV4OEANA.js';export{a as INTERNAL_ACCESS}from'./chunks/chunk-LFJUGRQV.js';export{a as Size}from'./chunks/chunk-QOCHMKNY.js';export{a as Point}from'./chunks/chunk-KAFNKP6O.js';export{a as Rect}from'./chunks/chunk-E4XJ4GKD.js';export{a as assert,b as assertUnreachable,c as assertUnreachableThrowException}from'./chunks/chunk-FTD535WI.js';export{b as BrowserHelper,a as DisplayMode}from'./chunks/chunk-YONR3EGV.js';export{a as Feature}from'./chunks/chunk-NVK73TNL.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-D222MT4V.js';export{a as ContextStatus,b as PrivateMirrorAxis}from'./chunks/chunk-WUHKODFA.js';export{a as DataCaptureContextSettings}from'./chunks/chunk-7SW2PEHB.js';export{a as DataCaptureError}from'./chunks/chunk-QCZSSQAQ.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
export { M as ModuleLoader } from './DataCaptureContext-
|
|
2
|
+
export { M as ModuleLoader } from './DataCaptureContext-Qg40v7QA.js';
|
|
3
3
|
import './Camera-HgH6fwnW.js';
|
|
4
4
|
import './commons/Rect.js';
|
|
5
5
|
import './private/Serializable.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import './FrameReaders/ColorType.js';
|
|
3
|
-
export { bk as CameraManager, bl as CameraManagerEvent, bm as CameraManagerEventParameters, bn as CameraResolutionConstraint, bo as ExtendedMediaTrackCapabilities, bp as ExtendedMediaTrackConstraintSet, O as FrameCapture,
|
|
3
|
+
export { bk as CameraManager, bl as CameraManagerEvent, bm as CameraManagerEventParameters, bn as CameraResolutionConstraint, bo as ExtendedMediaTrackCapabilities, bp as ExtendedMediaTrackConstraintSet, O as FrameCapture, L as FrameId, bq as GUI, br as MeteringMode, bs as createFrameId } from '../DataCaptureContext-Qg40v7QA.js';
|
|
4
4
|
import '../Camera-HgH6fwnW.js';
|
|
5
5
|
import '../commons/Rect.js';
|
|
6
6
|
import '../DataCaptureContextSettings.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{g as CameraManager,f as CameraManagerEvent,d as CameraResolutionConstraint,c as MeteringMode,e as createFrameId}from'../chunks/chunk-
|
|
1
|
+
export{g as CameraManager,f as CameraManagerEvent,d as CameraResolutionConstraint,c as MeteringMode,e as createFrameId}from'../chunks/chunk-CZI3JAVS.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { C as Camera } from '../Camera-HgH6fwnW.js';
|
|
3
3
|
import { INTERNAL_ACCESS } from './privateAccess.js';
|
|
4
4
|
import '../ScanditIcon.js';
|
|
5
|
-
import '../DataCaptureContext-
|
|
5
|
+
import '../DataCaptureContext-Qg40v7QA.js';
|
|
6
6
|
import '../commons/Rect.js';
|
|
7
7
|
import './Serializable.js';
|
|
8
8
|
import '../commons/Point.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import { PrivateCanvasDrawer } from './CanvasDrawer.js';
|
|
3
|
-
import {
|
|
3
|
+
import { K as PerformanceMetrics } from '../DataCaptureContext-Qg40v7QA.js';
|
|
4
4
|
import '../ScanditIcon.js';
|
|
5
5
|
import './CavansDrawerAbstract.js';
|
|
6
6
|
import './DrawCommandBuffer.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import { ModuleLicenseTextProvider } from './ModuleLicenseTextProvider.js';
|
|
3
|
-
import { f as DataCaptureContext } from '../DataCaptureContext-
|
|
3
|
+
import { f as DataCaptureContext } from '../DataCaptureContext-Qg40v7QA.js';
|
|
4
4
|
import { Logger } from '../logger.js';
|
|
5
5
|
import '../Camera-HgH6fwnW.js';
|
|
6
6
|
import '../commons/Rect.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as CoreModuleLicenseTextProvider}from'../chunks/chunk-
|
|
1
|
+
export{a as CoreModuleLicenseTextProvider}from'../chunks/chunk-KZEBJGMU.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as CustomLocationsView}from'../chunks/chunk-
|
|
1
|
+
export{a as CustomLocationsView}from'../chunks/chunk-XFQTFQYR.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { f as DataCaptureContext, F as FrameData } from '../DataCaptureContext-
|
|
2
|
+
import { f as DataCaptureContext, F as FrameData } from '../DataCaptureContext-Qg40v7QA.js';
|
|
3
3
|
import '../Camera-HgH6fwnW.js';
|
|
4
4
|
import '../commons/Rect.js';
|
|
5
5
|
import './Serializable.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { O as FrameCapture } from '../../DataCaptureContext-
|
|
2
|
+
import { O as FrameCapture } from '../../DataCaptureContext-Qg40v7QA.js';
|
|
3
3
|
import { FrameReaderAbstract } from './FrameReaderAbstract.js';
|
|
4
4
|
import { ColorType } from './ColorType.js';
|
|
5
5
|
import '../../Camera-HgH6fwnW.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as FrameReader}from'../../chunks/chunk-
|
|
1
|
+
export{a as FrameReader}from'../../chunks/chunk-CZI3JAVS.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { O as FrameCapture } from '../../DataCaptureContext-
|
|
2
|
+
import { O as FrameCapture } from '../../DataCaptureContext-Qg40v7QA.js';
|
|
3
3
|
import { ColorType } from './ColorType.js';
|
|
4
4
|
import { WatermarkStack } from './WatermarkStack.js';
|
|
5
5
|
import { Optional } from '../../tsHelper.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { O as FrameCapture } from '../../DataCaptureContext-
|
|
2
|
+
import { O as FrameCapture } from '../../DataCaptureContext-Qg40v7QA.js';
|
|
3
3
|
import { ColorType } from './ColorType.js';
|
|
4
4
|
import { FrameReaderAbstract, PoolCapacityOptions } from './FrameReaderAbstract.js';
|
|
5
5
|
import { WatermarkStack } from './WatermarkStack.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as GrayScaleFrameReader}from'../../chunks/chunk-
|
|
1
|
+
export{b as GrayScaleFrameReader}from'../../chunks/chunk-CZI3JAVS.js';
|
|
@@ -3,7 +3,7 @@ export { ColorType as FrameReaderType } from './ColorType.js';
|
|
|
3
3
|
export { FrameReader } from './FrameReader.js';
|
|
4
4
|
export { FrameReaderAbstract } from './FrameReaderAbstract.js';
|
|
5
5
|
export { GrayScaleFrameReader } from './GrayScaleFrameReader.js';
|
|
6
|
-
import '../../DataCaptureContext-
|
|
6
|
+
import '../../DataCaptureContext-Qg40v7QA.js';
|
|
7
7
|
import '../../Camera-HgH6fwnW.js';
|
|
8
8
|
import '../../commons/Rect.js';
|
|
9
9
|
import '../Serializable.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as FrameReader,b as GrayScaleFrameReader}from'../../chunks/chunk-
|
|
1
|
+
export{a as FrameReader,b as GrayScaleFrameReader}from'../../chunks/chunk-CZI3JAVS.js';export{a as FrameReaderType}from'../../chunks/chunk-ORP45GHJ.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { t as ModuleLoaderOptions } from '../DataCaptureContext-
|
|
2
|
+
import { t as ModuleLoaderOptions } from '../DataCaptureContext-Qg40v7QA.js';
|
|
3
3
|
import { LoadingStatusSubscriber } from '../LoadingStatus.js';
|
|
4
4
|
import '../Camera-HgH6fwnW.js';
|
|
5
5
|
import '../commons/Rect.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import { SingleImageUploaderSettings } from '../SingleImageUploaderSettings.js';
|
|
3
|
-
import {
|
|
3
|
+
import { L as FrameId } from '../DataCaptureContext-Qg40v7QA.js';
|
|
4
4
|
import { View } from './View.js';
|
|
5
5
|
import 'csstype';
|
|
6
6
|
import './Serializable.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as SingleImageUploaderView}from'../chunks/chunk-
|
|
1
|
+
export{a as SingleImageUploaderView}from'../chunks/chunk-Z5LRFYGI.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$1}from'../chunks/chunk-
|
|
1
|
+
import {a as a$1}from'../chunks/chunk-GHR3BSUQ.js';import {d as d$1}from'../chunks/chunk-YUZDO2PC.js';import {b}from'../chunks/chunk-YONR3EGV.js';import {a}from'../chunks/chunk-XR65N6EG.js';import {f as f$1,g}from'../chunks/chunk-D222MT4V.js';var S=(t=>(t.Idle="idle",t.Pressed="pressed",t))(S||{}),d=class{constructor(e,t){this.state="idle";this.isHover=false;this.controlTypeToAriaLabelMap={"camera-fov":"Switch camera field of view",camera:"Switch camera",torch:"Toggle torch"};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");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),b.isDesktopDevice()||e.addEventListener("touchstart",this.onTouchStartListener),e.addEventListener("click",this.onClickListener),e.setAttribute("aria-pressed",String(this.state==="pressed"));let t=this.control.type,i=this.controlTypeToAriaLabelMap[t];return e.setAttribute("aria-label",i),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)})`);}},v=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 extends d{constructor(e,t){super(e,t);}async canShow(){return (await a$1.getAll()).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 a;let e=await a$1.getAll(false,true),t=this.frameSource?this.frameSource:null,i=t==null?void 0:t.deviceId,r=e.findIndex(n=>n.deviceId===i);return r>-1?(a=e[r+1])!=null?a:e[0]:e.length>0?e[0]:null}async switchCameras(e){var a,n,l;this.isTransitioning=true;let t=(a=this.context)==null?void 0:a.frameSource,i,r;t!=null&&(i=new g(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off")),i!=null&&await e.applySettings(i),await((n=this.context)==null?void 0:n.setFrameSource(e)),await((l=this.context)==null?void 0:l.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=false;}},C=class extends d{constructor(e,t){super(e,t);}async install(){let e=await super.install();return e&&await this.setInitialCamera(),e}async canShow(){return !b.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.getAlternativeCamera();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 a$1.getAll()).find(a=>d$1.isIOSBackCameraLabel(a.label));r&&await this.switchCameras(r);}}isUltraWideBackCamera(){return f$1(this.frameSource)?d$1.isIOSUltraWideBackCameraLabel(this.frameSource.label):false}async getAlternativeCamera(){return (await a$1.getAll()).find(t=>this.isUltraWideBackCamera()?d$1.isIOSBackCameraLabel(t.label):d$1.isIOSUltraWideBackCameraLabel(t.label))}async switchCameras(e){var a,n,l;this.isTransitioning=true;let t=(a=this.context)==null?void 0:a.frameSource,i,r;t!=null&&(i=new g(t.settings),r=t.desiredState),await(t==null?void 0:t.switchToDesiredState("off")),i!=null&&await e.applySettings(i),await((n=this.context)==null?void 0:n.setFrameSource(e)),await((l=this.context)==null?void 0:l.frameSource).switchToDesiredState(r!=null?r:"on"),this.isTransitioning=false;}};export{S as ButtonState,f as CameraSwitchControlWidget,C as PrivateCameraFOVSwitchControlWidget,v as PrivateTorchControlWidget};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import { F as FrameSource } from '../Camera-HgH6fwnW.js';
|
|
3
|
-
import { C as Control, f as DataCaptureContext, p as DataCaptureView } from '../DataCaptureContext-
|
|
3
|
+
import { C as Control, f as DataCaptureContext, p as DataCaptureView } from '../DataCaptureContext-Qg40v7QA.js';
|
|
4
4
|
import { CameraFOVSwitchControl } from '../controls/CameraFOVSwitchControl.js';
|
|
5
5
|
import { CameraSwitchControl } from '../controls/CameraSwitchControl.js';
|
|
6
6
|
import { TorchSwitchControl } from '../controls/TorchSwitchControl.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { p as DataCaptureView } from '../DataCaptureContext-
|
|
2
|
+
import { p as DataCaptureView } from '../DataCaptureContext-Qg40v7QA.js';
|
|
3
3
|
import '../Camera-HgH6fwnW.js';
|
|
4
4
|
import '../commons/Rect.js';
|
|
5
5
|
import './Serializable.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { N as GenericHint } from '../../../DataCaptureContext-
|
|
2
|
+
import { N as GenericHint } from '../../../DataCaptureContext-Qg40v7QA.js';
|
|
3
3
|
import { ScanditIcon } from '../../../ScanditIcon.js';
|
|
4
4
|
import { ScanditHTMLElement } from '../../utils/ScanditHTMLElement.js';
|
|
5
5
|
import '../../../Camera-HgH6fwnW.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {a as a$
|
|
1
|
+
import {a as a$3}from'../../../chunks/chunk-SHM7SU3B.js';import {a as a$2}from'../../../chunks/chunk-UNO6YIIA.js';import {a as a$7}from'../../../chunks/chunk-NIKRAADM.js';import {a as a$6}from'../../../chunks/chunk-U4IMOTYL.js';import {a as a$1}from'../../../chunks/chunk-UWBNF47P.js';import {a as a$4}from'../../../chunks/chunk-3A4KLILV.js';import {a}from'../../../chunks/chunk-EV4OEANA.js';import {a as a$5}from'../../../chunks/chunk-LSZZVJ6B.js';var i=class i extends a{constructor(){super();this._currentMode="1.0x";this._ariaLabel="Switch between wide and ultra-wide field of view";this._useCustomImages=false;let e=this.attachShadow({mode:"open"});e.innerHTML=a$1`<div><slot></slot></div>`,e.append(i.createStyleElement().cloneNode(true));}get wideIcon(){var e;return (e=this.querySelector(a$2.tag))!=null?e:void 0}get ultraWideIcon(){var e;return (e=this.querySelector(a$3.tag))!=null?e:void 0}static create(){return document.createElement(i.tag)}static register(){a$4({[i.tag]:i});}static createStyleElement(){return a$5`:host{align-items:center;display:inline-flex;justify-content:center;--button-size:36px;--camera-fov-wide-idle:none;--camera-fov-wide-pressed:none;--camera-fov-ultrawide-idle:none;--camera-fov-ultrawide-pressed:none;border:none;cursor:pointer;height:var(--button-size);margin:0;outline:none;padding:0;width:var(--button-size);-webkit-tap-highlight-color:transparent;background-color:#4242428c;background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;transform-origin:center;transition:outline .2s ease-in-out,transform .1s ease-in-out}:host([hidden]){display:none!important}:host([data-pressed=true]){transform:scale(.95)}:host([data-pressed=false]){transform:scale(1)}:host(:focus-visible){outline:2px solid #06c;outline-offset:2px}:host([data-use-custom-images=true]) ::slotted(*){display:none!important}:host([data-use-custom-images=true]){background-image:var(--camera-fov-wide-idle)}:host([data-use-custom-images=true][data-pressed=true]){background-image:var(--camera-fov-wide-pressed)}:host([data-use-custom-images=true][data-current-mode="0.5x"]){background-image:var(--camera-fov-ultrawide-idle)}:host([data-use-custom-images=true][data-current-mode="0.5x"][data-pressed=true]){background-image:var(--camera-fov-ultrawide-pressed)}`}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.setupButtonWithSvgIcons(),this._gestureRecognizer||(this._gestureRecognizer=new a$6(this),this._gestureRecognizer.addListener(this)),this.mode=this._currentMode;}setupButtonWithSvgIcons(){if(a$2.register(),a$3.register(),!this.wideIcon){let e=a$2.create();e.size=24,e.style.display="flex",this.appendChild(e);}if(!this.ultraWideIcon){let e=a$3.create();e.size=24,e.style.display="none",this.appendChild(e);}}disconnectedCallback(){this._gestureRecognizer&&(this._gestureRecognizer.removeAllListeners(),this._gestureRecognizer=void 0);}set mode(e){if(e!=="0.5x"&&e!=="1.0x")return;this._currentMode=e,this.setAttribute("data-current-mode",e),this.setAttribute("aria-pressed",e==="0.5x"?"true":"false");let t=e==="0.5x"?"Switch to wide field of view":"Switch to ultra-wide field of view";this.setAttribute("aria-label",t),this.updateIconVisibility();}get mode(){return this._currentMode}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.setAttribute("aria-label",e);}set useCustomImages(e){this._useCustomImages=e,e?this.setAttribute("data-use-custom-images","true"):this.removeAttribute("data-use-custom-images");}setCustomImages(e){let t=this.style,p=e.wide.idle?`url(${JSON.stringify(e.wide.idle)})`:"none",m=e.wide.pressed?`url(${JSON.stringify(e.wide.pressed)})`:"none",g=e.ultraWide.idle?`url(${JSON.stringify(e.ultraWide.idle)})`:"none",h=e.ultraWide.pressed?`url(${JSON.stringify(e.ultraWide.pressed)})`:"none";t.setProperty("--camera-fov-wide-idle",p),t.setProperty("--camera-fov-wide-pressed",m),t.setProperty("--camera-fov-ultrawide-idle",g),t.setProperty("--camera-fov-ultrawide-pressed",h),this.useCustomImages=true;}updateIconVisibility(){let e=this.wideIcon,t=this.ultraWideIcon;!e||!t||(this._currentMode==="0.5x"?(e.style.display="none",t.style.display="flex"):(e.style.display="flex",t.style.display="none"));}onTap(){this.dispatchEvent(new a$7({currentMode:this._currentMode}));}onPress(){this.setAttribute("data-pressed","true");}onRelease(){this.setAttribute("data-pressed","false");}};i.tag="scandit-camera-fov-switch-button";var c=i;export{c as CameraFOVSwitchButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {a as a$2}from'../../../chunks/chunk-7HYFN4JO.js';import {a as a$3}from'../../../chunks/chunk-QUWP3ILW.js';import {b}from'../../../chunks/chunk-NIKRAADM.js';import {a as a$6}from'../../../chunks/chunk-U4IMOTYL.js';import {a as a$7}from'../../../chunks/chunk-SGL5J2CI.js';import {a as a$1}from'../../../chunks/chunk-UWBNF47P.js';import {a as a$4}from'../../../chunks/chunk-3A4KLILV.js';import {a}from'../../../chunks/chunk-EV4OEANA.js';import {a as a$5}from'../../../chunks/chunk-LSZZVJ6B.js';var i=class i extends a{constructor(){super();this._currentMode="back";this._ariaLabel="Cycle through available cameras";this._useCustomImages=false;let e=this.attachShadow({mode:"open"});e.innerHTML=a$1`<div><slot></slot></div>`,e.append(i.createStyleElement().cloneNode(true));}get frontIcon(){var e;return (e=this.querySelector(a$2.tag))!=null?e:void 0}get backIcon(){var e;return (e=this.querySelector(a$3.tag))!=null?e:void 0}static create(){return document.createElement(i.tag)}static register(){a$4({[i.tag]:i});}static createStyleElement(){return a$5`:host{align-items:center;display:inline-flex;justify-content:center;--button-size:36px;--camera-switch-idle:none;--camera-switch-pressed:none;border:none;cursor:pointer;height:var(--button-size);margin:0;outline:none;padding:0;width:var(--button-size);-webkit-tap-highlight-color:transparent;background-color:#4242428c;background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;opacity:1;transform-origin:center;transition:outline .2s ease-in-out,transform .1s ease-in-out}:host([hidden]){display:none!important}:host([data-pressed=true]){transform:scale(.95)}:host([data-pressed=false]){transform:scale(1)}:host(:focus-visible){outline:2px solid #06c;outline-offset:2px}:host([data-use-custom-images=true]) ::slotted(*){display:none!important}:host([data-use-custom-images=true]){background-image:var(--camera-switch-idle)}:host([data-use-custom-images=true][data-pressed=true]){background-image:var(--camera-switch-pressed)}`}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","button"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.setupButtonWithSvgIcons(),this._gestureRecognizer||(this._gestureRecognizer=new a$6(this),this._gestureRecognizer.addListener(this)),this.setAttribute("aria-label",this._ariaLabel);}setupButtonWithSvgIcons(){a$2.register(),a$3.register();let e=a$7.fromHex("#FFFFFF");if(!this.frontIcon){let t=a$2.create();t.fill=`#${e.toJSON()}`,t.size=24,t.style.display="flex",this.appendChild(t);}if(!this.backIcon){let t=a$3.create();t.fill=`#${e.toJSON()}`,t.size=24,t.style.display="none",this.appendChild(t);}}disconnectedCallback(){this._gestureRecognizer&&(this._gestureRecognizer.removeAllListeners(),this._gestureRecognizer=void 0);}set mode(e){e!=="front"&&e!=="back"||(this._currentMode=e,this.updateIconVisibility());}get mode(){return this._currentMode}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.setAttribute("aria-label",e);}set useCustomImages(e){this._useCustomImages=e,e?this.setAttribute("data-use-custom-images","true"):this.removeAttribute("data-use-custom-images");}setCustomImages(e){let t=this.style,h=e.idle?`url(${JSON.stringify(e.idle)})`:"none",m=e.pressed?`url(${JSON.stringify(e.pressed)})`:"none";t.setProperty("--camera-switch-idle",h),t.setProperty("--camera-switch-pressed",m),this.useCustomImages=true;}updateIconVisibility(){let e=this.frontIcon,t=this.backIcon;!e||!t||(this._currentMode==="back"?(e.style.display="none",t.style.display="flex"):(e.style.display="flex",t.style.display="none"));}onTap(){this.dispatchEvent(new b({currentMode:this._currentMode}));}onPress(){this.setAttribute("data-pressed","true");}onRelease(){this.setAttribute("data-pressed","false");}};i.tag="scandit-camera-switch-button";var p=i;export{p as CameraSwitchButton};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import '../../../ScanditIcon.js';
|
|
3
3
|
import '../../utils/ScanditHTMLElement.js';
|
|
4
4
|
import '../../../commons/Rect.js';
|
|
5
|
-
export { H as HintPresenter, bt as HintPresenterEvents } from '../../../DataCaptureContext-
|
|
5
|
+
export { H as HintPresenter, bt as HintPresenterEvents } from '../../../DataCaptureContext-Qg40v7QA.js';
|
|
6
6
|
import '../../../commons/Color.js';
|
|
7
7
|
import '../../Serializable.js';
|
|
8
8
|
import '../../../commons/Point.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as Timeout}from'../../chunks/chunk-Q7JWDX4U.js';export{a as wait}from'../../chunks/chunk-UZWBB65W.js';export{a as waitTransitionEndForElement}from'../../chunks/chunk-2HTI5D6Y.js';export{b as safeAwaitAnimation,a as safeCancelAnimation}from'../../chunks/chunk-EQ6V4W5K.js';export{a as throttle}from'../../chunks/chunk-T3AOBMAS.js';export{a as html,b as renderIf}from'../../chunks/chunk-UWBNF47P.js';export{a as defineCustomElements}from'../../chunks/chunk-3A4KLILV.js';export{a as domIdFromValues}from'../../chunks/chunk-2LSO6JEZ.js';export{a as AsyncStateMachine}from'../../chunks/chunk-LXOZUOZU.js';export{a as ScanditHTMLElement}from'../../chunks/chunk-EV4OEANA.js';export{a as clamp}from'../../chunks/chunk-L2STPTEN.js';export{a as
|
|
1
|
+
export{a as Timeout}from'../../chunks/chunk-Q7JWDX4U.js';export{a as wait}from'../../chunks/chunk-UZWBB65W.js';export{a as waitTransitionEndForElement}from'../../chunks/chunk-2HTI5D6Y.js';export{b as safeAwaitAnimation,a as safeCancelAnimation}from'../../chunks/chunk-EQ6V4W5K.js';export{a as throttle}from'../../chunks/chunk-T3AOBMAS.js';export{a as html,b as renderIf}from'../../chunks/chunk-UWBNF47P.js';export{a as defineCustomElements}from'../../chunks/chunk-3A4KLILV.js';export{a as domIdFromValues}from'../../chunks/chunk-2LSO6JEZ.js';export{a as AsyncStateMachine}from'../../chunks/chunk-LXOZUOZU.js';export{a as ScanditHTMLElement}from'../../chunks/chunk-EV4OEANA.js';export{a as clamp}from'../../chunks/chunk-L2STPTEN.js';export{a as css}from'../../chunks/chunk-LSZZVJ6B.js';export{a as unknownErrorToString}from'../../chunks/chunk-AIRWHLJH.js';export{a as isObject}from'../../chunks/chunk-FGO2SSRS.js';export{a as isWorkerScope}from'../../chunks/chunk-QCRFVRSS.js';export{a as Deferred}from'../../chunks/chunk-O7TZTIHO.js';export{a as fromEntries}from'../../chunks/chunk-RG272MAJ.js';export{a as areEqualArrays}from'../../chunks/chunk-4KLHTKGW.js';export{a as debounce}from'../../chunks/chunk-R6E4CT22.js';export{b as cancelSafeRequestAnimationFrame,a as safeRequestAnimationFrame}from'../../chunks/chunk-CX2R2XQK.js';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Size } from '../../commons/Size.js';
|
|
3
3
|
import { Optional } from '../../tsHelper.js';
|
|
4
4
|
import '../../ScanditIcon.js';
|
|
5
|
-
import '../../DataCaptureContext-
|
|
5
|
+
import '../../DataCaptureContext-Qg40v7QA.js';
|
|
6
6
|
import '../Serializable.js';
|
|
7
7
|
import '../../commons/Color.js';
|
|
8
8
|
import './ScanditHTMLElement.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
2
|
import { ImageConverterInstance, ImageBuffer, BitmapWithFormat } from '../private/djinni-types/index.js';
|
|
3
|
-
import { W as WorkerFunctions } from '../DataCaptureContext-
|
|
3
|
+
import { W as WorkerFunctions } from '../DataCaptureContext-Qg40v7QA.js';
|
|
4
4
|
import '../Camera-HgH6fwnW.js';
|
|
5
5
|
import '../commons/Rect.js';
|
|
6
6
|
import '../private/Serializable.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import { V as ViewInfo } from '../DataCaptureContext-
|
|
2
|
+
import { V as ViewInfo } from '../DataCaptureContext-Qg40v7QA.js';
|
|
3
3
|
import '../Camera-HgH6fwnW.js';
|
|
4
4
|
import '../commons/Rect.js';
|
|
5
5
|
import '../private/Serializable.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="emscripten" />
|
|
2
|
-
import {
|
|
2
|
+
import { I as DataCaptureEngine, J as Module, Q as AnyDataCaptureActionMessage, R as AugmentedWorker, S as ModuleHandler, T as DataCaptureCallbackMessage, U as DataCaptureActionMessageKey, X as EngineWorkerResponse } from '../DataCaptureContext-Qg40v7QA.js';
|
|
3
3
|
import '../Camera-HgH6fwnW.js';
|
|
4
4
|
import '../commons/Rect.js';
|
|
5
5
|
import '../private/Serializable.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as WorkerMain}from'../chunks/chunk-
|
|
1
|
+
export{a as WorkerMain}from'../chunks/chunk-TMIZ6Z75.js';
|