{"version":3,"sources":["jsdelivr-header.js","/npm/motorola-datawedge@1.0.1/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,IAAI,QAAU,QAAQ,WAClB,KAAO,QAAQ,gBAOnB,SAAS,YAET,CASA,UAAU,UAAU,MAAQ,SAAU,GAClC,IAAI,EAAO,GACP,IACA,EAAK,GAAK,GAEd,KAAK,KAAM,KAAM,oBAAqB,QAAS,EACnD,EAIA,UAAU,UAAU,KAAO,WAEvB,KAAK,KAAM,KAAM,oBAAqB,OAAQ,GAClD,EAKA,UAAU,UAAU,cAAgB,SAAU,GACrC,EAIL,KAAK,KAAM,KAAM,oBAAqB,gBAAiB,CAAC,IAHpD,QAAQ,IAAI,kFAIpB,EAMA,UAAU,UAAU,mBAAqB,SAAU,GAE/C,KAAK,EAAU,KAAM,oBAAqB,mBAAoB,GAClE,EAKA,UAAU,UAAU,kBAAoB,WAEpC,KAAK,KAAM,KAAM,oBAAqB,qBAAsB,GAChE,EAKA,UAAU,UAAU,qBAAuB,SAAU,GAEjD,KAAK,EAAU,KAAM,oBAAqB,qBAAsB,GACpE,EAKA,UAAU,UAAU,oBAAsB,WAEtC,KAAK,KAAM,KAAM,oBAAqB,uBAAwB,GAClE,EAKA,UAAU,UAAU,aAAe,WAE/B,KAAK,KAAM,KAAM,oBAAqB,qBAAsB,GAChE,EAKA,UAAU,UAAU,YAAc,WAC9B,KAAK,KAAM,KAAM,oBAAqB,sBAAuB,GACjE,EAMA,IAAI,UAAY,IAAI,UAEpB,OAAO,QAAU","file":"/npm/motorola-datawedge@1.0.1/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/motorola-datawedge@1.0.1/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","var cordova = require('cordova');\r\nvar exec = require('cordova/exec');\r\n\r\n /**\r\n         * Constructor.\r\n *\r\n * @returns {DataWedge}\r\n */\r\nfunction DataWedge() {\r\n\r\n};\r\n\r\n/**\r\n * Turn on DataWedge (default profile) and listen for event.  Listens for hardward button events.\r\n * \r\n * @param successCallback - Success function should expect a barcode to be passed in\r\n * @param intentAction - action to listen for.  This is what you configured in the DataWedge app.  \r\n *       Defaults to: \"com.bluefletch.motorola.datawedge.ACTION\";\r\n */\r\nDataWedge.prototype.start = function (intentAction) {\r\n    var args = [];\r\n    if (intentAction) {\r\n        args[0] = intentAction;\r\n    }\r\n    exec(null, null, 'MotorolaDataWedge', 'start', args);\r\n};\r\n/**\r\n * Turn off DataWedge plugin\r\n */\r\nDataWedge.prototype.stop = function () {\r\n  \r\n    exec(null, null, 'MotorolaDataWedge', 'stop', []);\r\n};\r\n\r\n/**\r\n * Activate a different profile for the data wedge.  For instance, to enable data processing rules\r\n */\r\nDataWedge.prototype.switchProfile = function (profileName) {\r\n    if (!profileName)  {\r\n        console.log(\"DataWedge.switchProfile did not include a profile.  A profile name is required.\");\r\n        return;\r\n    }\r\n    exec(null, null, 'MotorolaDataWedge', 'switchProfile', [profileName]);\r\n};\r\n\r\n\r\n/**\r\n * Register a callback for scan events.  This function will be called when barcdoes are read\r\n */\r\nDataWedge.prototype.registerForBarcode = function (callback) {\r\n    \r\n    exec(callback, null, 'MotorolaDataWedge', 'scanner.register', []);\r\n};\r\n\r\n/**\r\n * De-register a callback for scan events.  \r\n */\r\nDataWedge.prototype.unregisterBarcode = function () {\r\n    \r\n    exec(null, null, 'MotorolaDataWedge', 'scanner.unregister', []);\r\n};\r\n\r\n/**\r\n * Register a callback for magstripe reads\r\n */\r\nDataWedge.prototype.registerForMagstripe = function (callback) {\r\n    \r\n    exec(callback, null, 'MotorolaDataWedge', 'magstripe.register', []);\r\n};\r\n\r\n/**\r\n * De-register a callback for magstripe events.  \r\n */\r\nDataWedge.prototype.unregisterMagstripe = function () {\r\n    \r\n    exec(null, null, 'MotorolaDataWedge', 'magstripe.unregister', []);\r\n};\r\n\r\n/**\r\n * Manually turn on barcode scanner\r\n */\r\nDataWedge.prototype.startScanner = function () {\r\n    \r\n    exec(null, null, 'MotorolaDataWedge', 'scanner.softScanOn', []);\r\n};\r\n\r\n/**\r\n * Manually turn off barcode scanner\r\n */\r\nDataWedge.prototype.stopScanner = function () {\r\n    exec(null, null, 'MotorolaDataWedge', 'scanner.softScanOff', []);\r\n};\r\n\r\n\r\n\r\n\r\n//create instance\r\nvar DataWedge = new DataWedge();\r\n\r\nmodule.exports = DataWedge;"]}