@scandit/web-datacapture-barcode
Version:
Scandit Data Capture SDK for the Web
1 lines • 996 B
JavaScript
import {a}from'./chunk-DCUKY2F4.js';import {b}from'./chunk-OLJXVUYE.js';var y=class{constructor(){this.properties={};this.symbologies={};this._arucoDictionary=null;}get enabledSymbologies(){return Object.keys(this.symbologies).filter(o=>this.symbologies[o].isEnabled)}settingsForSymbology(o){if(!this.symbologies[o]){let t=b.SymbologySettings[o];t._symbology=o,this.symbologies[o]=t;}return this.symbologies[o]}setProperty(o,t){this.properties[o]=t;}getProperty(o){return this.properties[o]}enableSymbologies(o){for(let t of o)this.enableSymbology(t,true);}enableSymbology(o,t){this.settingsForSymbology(o).isEnabled=t,o==="aruco"&&(this._arucoDictionary=a.fromPreset("5X5_50"));}setArucoDictionary(o){this._arucoDictionary=o;}toJSONObject(){var o,t;return {properties:this.properties,symbologies:Object.keys(this.symbologies).reduce((i,e)=>(i[e]=this.symbologies[e].toJSONObject(),i),{}),arucoDictionary:(t=(o=this._arucoDictionary)==null?void 0:o.toJSONObject())!=null?t:null}}};export{y as a};