From 9300662949b30fcd5cbb9d59f57465e932c12dcc Mon Sep 17 00:00:00 2001 From: Johan Lindell Date: Sat, 3 Sep 2016 16:27:00 +0200 Subject: [PATCH] Release v3.3.23 --- bin/JsBarcode.js | 2 +- bin/barcodes/CODE39/index.js | 18 +++++++++++------- bower.json | 2 +- dist/JsBarcode.all.js | 20 ++++++++++++-------- dist/JsBarcode.all.min.js | 4 ++-- dist/barcodes/JsBarcode.code128.min.js | 2 +- dist/barcodes/JsBarcode.code39.min.js | 2 +- dist/barcodes/JsBarcode.ean-upc.min.js | 2 +- dist/barcodes/JsBarcode.itf-14.min.js | 2 +- dist/barcodes/JsBarcode.itf.min.js | 2 +- dist/barcodes/JsBarcode.msi.min.js | 2 +- dist/barcodes/JsBarcode.pharmacode.min.js | 2 +- package.json | 2 +- 13 files changed, 35 insertions(+), 27 deletions(-) diff --git a/bin/JsBarcode.js b/bin/JsBarcode.js index b60e0670..acf9ec29 100644 --- a/bin/JsBarcode.js +++ b/bin/JsBarcode.js @@ -182,7 +182,7 @@ API.prototype.init = function () { // The render API call. Calls the real render function. API.prototype.render = function () { if (Array.isArray(this._renderProperties)) { - for (var i in this._renderProperties) { + for (var i = 0; i < this._renderProperties.length; i++) { render(this._renderProperties[i], this._encodings, this._options); } } else { diff --git a/bin/barcodes/CODE39/index.js b/bin/barcodes/CODE39/index.js index b93bea38..2bd1c54d 100644 --- a/bin/barcodes/CODE39/index.js +++ b/bin/barcodes/CODE39/index.js @@ -59,13 +59,7 @@ var CODE39 = function () { // Calculate mod43 checksum if enabled if (this.mod43Enabled) { - var checksum = 0; - for (var _i = 0; _i < this.string.length; _i++) { - checksum += this.characterValue(this.string[_i]); - } - - checksum = checksum % 43; - + var checksum = this.mod43checksum(); result += this.getBinary(checksum) + "0"; string += this.getCharacter(checksum); } @@ -83,6 +77,16 @@ var CODE39 = function () { return this.string.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/) !== -1; }; + CODE39.prototype.mod43checksum = function mod43checksum() { + var checksum = 0; + for (var i = 0; i < this.string.length; i++) { + checksum += this.characterValue(this.string[i]); + } + + checksum = checksum % 43; + return checksum; + }; + return CODE39; }(); diff --git a/bower.json b/bower.json index 0e951680..024fb5b9 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "JsBarcode", "main": "dist/JsBarcode.all.min.js", - "version": "3.3.20", + "version": "3.3.23", "homepage": "https://github.com/lindell/JsBarcode", "authors": [ "Johan Lindell " diff --git a/dist/JsBarcode.all.js b/dist/JsBarcode.all.js index c860f17a..c851b563 100644 --- a/dist/JsBarcode.all.js +++ b/dist/JsBarcode.all.js @@ -1278,13 +1278,7 @@ var CODE39 = function () { // Calculate mod43 checksum if enabled if (this.mod43Enabled) { - var checksum = 0; - for (var _i = 0; _i < this.string.length; _i++) { - checksum += this.characterValue(this.string[_i]); - } - - checksum = checksum % 43; - + var checksum = this.mod43checksum(); result += this.getBinary(checksum) + "0"; string += this.getCharacter(checksum); } @@ -1302,6 +1296,16 @@ var CODE39 = function () { return this.string.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/) !== -1; }; + CODE39.prototype.mod43checksum = function mod43checksum() { + var checksum = 0; + for (var i = 0; i < this.string.length; i++) { + checksum += this.characterValue(this.string[i]); + } + + checksum = checksum % 43; + return checksum; + }; + return CODE39; }(); @@ -2956,7 +2960,7 @@ API.prototype.init = function () { // The render API call. Calls the real render function. API.prototype.render = function () { if (Array.isArray(this._renderProperties)) { - for (var i in this._renderProperties) { + for (var i = 0; i < this._renderProperties.length; i++) { render(this._renderProperties[i], this._encodings, this._options); } } else { diff --git a/dist/JsBarcode.all.min.js b/dist/JsBarcode.all.min.js index 0f75a278..7bc7081b 100644 --- a/dist/JsBarcode.all.min.js +++ b/dist/JsBarcode.all.min.js @@ -1,2 +1,2 @@ -!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,e,n){Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var n=t&&t.__esModule?function(){return t["default"]}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=39)}([function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){n(this,t),this.startBin="101",this.endBin="101",this.middleBin="01010",this.Lbinary=["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],this.Gbinary=["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],this.Rbinary=["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"]}return t.prototype.encode=function(t,e,n){var r="";n=n||"";for(var i=0;i=200)r=t[0]-105,t.shift(),99===r?n=this.nextC(t,e+1):100===r?n=this.nextB(t,e+1):98===r?(t[0]=t[0]>95?t[0]-96:t[0],n=this.nextA(t,e+1)):n=this.nextA(t,e+1);else{var i=t[0];r=i<32?i+64:i-32,t.shift(),n=this.nextA(t,e+1)}var o=this.getEncoding(r),s=r*e;return{result:o+n.result,checksum:s+n.checksum}},t.prototype.nextB=function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,r;t[0]>=200?(r=t[0]-105,t.shift(),99===r?n=this.nextC(t,e+1):101===r?n=this.nextA(t,e+1):98===r?(t[0]=t[0]<32?t[0]+96:t[0],n=this.nextB(t,e+1)):n=this.nextB(t,e+1)):(r=t[0]-32,t.shift(),n=this.nextB(t,e+1));var i=this.getEncoding(r),o=r*e;return{result:i+n.result,checksum:o+n.checksum}},t.prototype.nextC=function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,r;t[0]>=200?(r=t[0]-105,t.shift(),n=100===r?this.nextB(t,e+1):101===r?this.nextA(t,e+1):this.nextC(t,e+1)):(r=10*(t[0]-48)+t[1]-48,t.shift(),t.shift(),n=this.nextC(t,e+1));var i=this.getEncoding(r),o=r*e;return{result:i+n.result,checksum:o+n.checksum}},t}();e["default"]=r},function(t,e){"use strict";function n(t){for(var e=0,n=0;n0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&ee&&(e=t[n].height);return e}function c(t,e,n){var r;r="undefined"==typeof n?document.createElement("canvas").getContext("2d"):n,r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var i=r.measureText(t).width;return i}Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var f=n(2),h=r(f);e.getMaximumHeightOfEncodings=u,e.getEncodingHeight=i,e.getBarcodePadding=o,e.calculateEncodingAttributes=s,e.getTotalWidthOfEncodings=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(18),i=n(17),o=n(24),s=n(27),a=n(26),u=n(32),c=n(33),f=n(25);e["default"]={CODE39:r.CODE39,CODE128:i.CODE128,CODE128A:i.CODE128A,CODE128B:i.CODE128B,CODE128C:i.CODE128C,EAN13:o.EAN13,EAN8:o.EAN8,EAN5:o.EAN5,EAN2:o.EAN2,UPC:o.UPC,ITF14:s.ITF14,ITF:a.ITF,MSI:u.MSI,MSI10:u.MSI10,MSI11:u.MSI11,MSI1010:u.MSI1010,MSI1110:u.MSI1110,pharmacode:c.pharmacode,GenericBarcode:f.GenericBarcode}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.api=e}return t.prototype.handleCatch=function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}},t.prototype.wrapBarcodeCall=function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}},t}();e["default"]=r},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if("string"==typeof t)return o(t);if(Array.isArray(t)){for(var e=[],n=0;n=2?String.fromCharCode(210)+f(t):n>r?String.fromCharCode(208)+u(t):String.fromCharCode(209)+c(t),e=e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})}function u(t){var e=t.match(/^([\x00-\x5F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+f(t.substring(e[1].length));var n=t.match(/^[\x00-\x5F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(205)+c(t.substring(n[0].length))}function c(t){var e=t.match(/^([\x20-\x7F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+f(t.substring(e[1].length));var n=t.match(/^[\x20-\x7F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(206)+u(t.substring(n[0].length))}function f(t){var e=t.match(/^(\xCF*[0-9]{2}\xCF*)+/)[0],n=e.length;if(n===t.length)return t;t=t.substring(n);var r=t.match(/^[\x00-\x5F\xC8-\xCF]*/)[0].length,i=t.match(/^[\x20-\x7F\xC8-\xCF]*/)[0].length;return r>=i?e+String.fromCharCode(206)+u(t):e+String.fromCharCode(205)+c(t)}Object.defineProperty(e,"__esModule",{value:!0});var h=n(3),l=r(h),d=function(t){function e(n){if(i(this,e),n.search(/^[\x00-\x7F\xC8-\xD3]+$/)!==-1)var r=o(this,t.call(this,a(n)));else var r=o(this,t.call(this,n));return o(r)}return s(e,t),e}(l["default"]);e["default"]=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var i=n(16),o=r(i),s=n(13),a=r(s),u=n(14),c=r(u),f=n(15),h=r(f);e.CODE128=o["default"],e.CODE128A=a["default"],e.CODE128B=c["default"],e.CODE128C=h["default"]},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e,r){n(this,t),this.string=e.toUpperCase(),this.mod43Enabled=r.mod43||!1,this.characters=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],this.encodings=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770]}return t.prototype.getEncoding=function(t){return this.getBinary(this.characterValue(t))},t.prototype.getBinary=function(t){return this.encodings[t].toString(2)},t.prototype.getCharacter=function(t){return this.characters[t]},t.prototype.characterValue=function(t){return this.characters.indexOf(t)},t.prototype.encode=function(){for(var t=this.string,e=this.getEncoding("*"),n=0;n10*n.width?this.fontSize=10*n.width:this.fontSize=n.fontSize,this.guardHeight=n.height+this.fontSize/2+n.textMargin,this.lastChar=n.lastChar}return t.prototype.valid=function(){return this.string.search(/^[0-9]{13}$/)!==-1&&this.string[12]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e=[],n=this.structure[this.string[0]],r=this.string.substr(1,6),i=this.string.substr(7,6);return this.displayValue&&e.push({data:"000000000000",text:this.string[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),e.push({data:t.encode(r,n),text:r,options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(i,"RRRRRR"),text:i,options:{fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),this.lastChar&&this.displayValue&&(e.push({data:"00"}),e.push({data:"00000",text:this.lastChar,options:{fontSize:this.fontSize}})),e},t.prototype.checksum=function(t){var e,n=0;for(e=0;e<12;e+=2)n+=parseInt(t[e]);for(e=1;e<12;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=r(o),a=function(){function t(e){i(this,t),this.string=e,this.structure=["LL","LG","GL","GG"]}return t.prototype.valid=function(){return this.string.search(/^[0-9]{2}$/)!==-1},t.prototype.encode=function(){var t=new s["default"],e=this.structure[parseInt(this.string)%4],n="1011";return n+=t.encode(this.string,e,"01"),{data:n,text:this.string}},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=r(o),a=function(){function t(e){i(this,t),this.string=e,this.structure=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"]}return t.prototype.valid=function(){return this.string.search(/^[0-9]{5}$/)!==-1},t.prototype.encode=function(){var t=new s["default"],e=this.checksum(),n="1011";return n+=t.encode(this.string,this.structure[e],"01"),{data:n,text:this.string}},t.prototype.checksum=function(){var t=0;return t+=3*parseInt(this.string[0]),t+=9*parseInt(this.string[1]),t+=3*parseInt(this.string[2]),t+=9*parseInt(this.string[3]),t+=3*parseInt(this.string[4]),t%10},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=r(o),a=function(){function t(e){i(this,t),e.search(/^[0-9]{7}$/)!==-1?this.string=e+this.checksum(e):this.string=e}return t.prototype.valid=function(){return this.string.search(/^[0-9]{8}$/)!==-1&&this.string[7]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e="",n=this.string.substr(0,4),r=this.string.substr(4,4);return e+=t.startBin,e+=t.encode(n,"LLLL"),e+=t.middleBin,e+=t.encode(r,"RRRR"),e+=t.endBin,{data:e,text:this.string}},t.prototype.checksum=function(t){var e,n=0;for(e=0;e<7;e+=2)n+=3*parseInt(t[e]);for(e=1;e<7;e+=2)n+=parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=r(o),a=function(){function t(e,n){i(this,t),e.search(/^[0-9]{11}$/)!==-1?this.string=e+this.checksum(e):this.string=e,this.displayValue=n.displayValue,n.fontSize>10*n.width?this.fontSize=10*n.width:this.fontSize=n.fontSize,this.guardHeight=n.height+this.fontSize/2+n.textMargin}return t.prototype.valid=function(){return this.string.search(/^[0-9]{12}$/)!==-1&&this.string[11]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e=[];return this.displayValue&&e.push({data:"00000000",text:this.string[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101"+t.encode(this.string[0],"L"),options:{height:this.guardHeight}}),e.push({data:t.encode(this.string.substr(1,5),"LLLLL"),text:this.string.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(this.string.substr(6,5),"RRRRR"),text:this.string.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:t.encode(this.string[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&e.push({data:"00000000",text:this.string[11],options:{textAlign:"right",fontSize:this.fontSize}}),e},t.prototype.checksum=function(t){var e,n=0;for(e=1;e<11;e+=2)n+=parseInt(t[e]);for(e=0;e<11;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.UPC=e.EAN2=e.EAN5=e.EAN8=e.EAN13=void 0;var i=n(19),o=r(i),s=n(22),a=r(s),u=n(21),c=r(u),f=n(20),h=r(f),l=n(23),d=r(l);e.EAN13=o["default"],e.EAN8=a["default"],e.EAN5=c["default"],e.EAN2=h["default"],e.UPC=d["default"]},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.string=e}return t.prototype.encode=function(){return{data:"10101010101010101010101010101010101010101",text:this.string}},t.prototype.valid=function(){return!0},t}();e.GenericBarcode=r},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.string=e,this.binaryRepresentation={0:"00110",1:"10001",2:"01001",3:"11000",4:"00101",5:"10100",6:"01100",7:"00011",8:"10010",9:"01010"}}return t.prototype.valid=function(){return this.string.search(/^([0-9]{2})+$/)!==-1},t.prototype.encode=function(){for(var t="1010",e=0;e=3&&this.number<=131070},t}();e.pharmacode=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){var e={};for(var n in u["default"])u["default"].hasOwnProperty(n)&&(t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(e[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(e[n]=t.getAttribute("data-"+n.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,s["default"])(e)}Object.defineProperty(e,"__esModule",{value:!0});var o=n(35),s=r(o),a=n(5),u=r(a);e["default"]=i},function(t,e){"use strict";function n(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&(n=e[n],"string"==typeof t[n]&&(t[n]=parseInt(t[n],10)));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),s=r(o),a=n(7),u=function(){function t(e,n,r){i(this,t),this.canvas=e,this.encodings=n,this.options=r}return t.prototype.render=function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t0?(i=0,n.textAlign="left"):"right"==t.textAlign?(i=e.width-1,n.textAlign="right"):(i=e.width/2,n.textAlign="center"),n.fillText(e.text,i,o)}},t.prototype.moveCanvasDrawing=function(t){var e=this.canvas.getContext("2d");e.translate(t.width,0)},t.prototype.restoreCanvas=function(){var t=this.canvas.getContext("2d");t.restore()},t}();e["default"]=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){switch(t){case"canvas":return s["default"];case"svg":return u["default"];default:throw new Error("Invalid rederer")}}Object.defineProperty(e,"__esModule",{value:!0}),e.getRendererClass=void 0;var o=n(36),s=r(o),a=n(38),u=r(a);e.getRendererClass=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){var r=document.createElementNS(h,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function s(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}function a(t,e,n,r,i){var o=document.createElementNS(h,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(2),c=r(u),f=n(7),h="http://www.w3.org/2000/svg",l=function(){function t(e,n,r){i(this,t),this.svg=e,this.encodings=n,this.options=r}return t.prototype.render=function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e0&&(a(s-e.width*o,r,e.width*o,e.height,t),o=0);o>0&&a(s-e.width*(o-1),r,e.width*o,e.height,t)},t.prototype.drawSVGText=function(t,e,n){var r=document.createElementNS(h,"text");if(e.displayValue){var i,o;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(i=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=n.width-1,r.setAttribute("text-anchor","end")):(i=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",i),r.setAttribute("y",o),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}},t.prototype.setSvgAttributes=function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",h),n.setAttribute("version","1.1"),n.style.transform="translate(0,0)",this.options.background&&(n.style.background=this.options.background)},t}();e["default"]=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){C.prototype[e]=C.prototype[e.toUpperCase()]=C.prototype[e.toLowerCase()]=function(n,r){var i=this;return i._errorHandler.wrapBarcodeCall(function(){var s=(0,h["default"])(i._options,r),a=t[e],u=o(n,a,s);return i._encodings.push(u),i})}}function o(t,e,n){t=""+t;var r=new e(t,n);if(!r.valid())throw new x.InvalidInputException(r.constructor.name,t);var i=r.encode();i=(0,d["default"])(i);for(var o=0;o=200)r=t[0]-105,t.shift(),99===r?n=this.nextC(t,e+1):100===r?n=this.nextB(t,e+1):98===r?(t[0]=t[0]>95?t[0]-96:t[0],n=this.nextA(t,e+1)):n=this.nextA(t,e+1);else{var i=t[0];r=i<32?i+64:i-32,t.shift(),n=this.nextA(t,e+1)}var o=this.getEncoding(r),s=r*e;return{result:o+n.result,checksum:s+n.checksum}},t.prototype.nextB=function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,r;t[0]>=200?(r=t[0]-105,t.shift(),99===r?n=this.nextC(t,e+1):101===r?n=this.nextA(t,e+1):98===r?(t[0]=t[0]<32?t[0]+96:t[0],n=this.nextB(t,e+1)):n=this.nextB(t,e+1)):(r=t[0]-32,t.shift(),n=this.nextB(t,e+1));var i=this.getEncoding(r),o=r*e;return{result:i+n.result,checksum:o+n.checksum}},t.prototype.nextC=function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,r;t[0]>=200?(r=t[0]-105,t.shift(),n=100===r?this.nextB(t,e+1):101===r?this.nextA(t,e+1):this.nextC(t,e+1)):(r=10*(t[0]-48)+t[1]-48,t.shift(),t.shift(),n=this.nextC(t,e+1));var i=this.getEncoding(r),o=r*e;return{result:i+n.result,checksum:o+n.checksum}},t}();e["default"]=r},function(t,e){"use strict";function n(t){for(var e=0,n=0;n0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&ee&&(e=t[n].height);return e}function c(t,e,n){var r;r="undefined"==typeof n?document.createElement("canvas").getContext("2d"):n,r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var i=r.measureText(t).width;return i}Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var f=n(2),h=r(f);e.getMaximumHeightOfEncodings=u,e.getEncodingHeight=i,e.getBarcodePadding=o,e.calculateEncodingAttributes=s,e.getTotalWidthOfEncodings=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(18),i=n(17),o=n(24),s=n(27),a=n(26),u=n(32),c=n(33),f=n(25);e["default"]={CODE39:r.CODE39,CODE128:i.CODE128,CODE128A:i.CODE128A,CODE128B:i.CODE128B,CODE128C:i.CODE128C,EAN13:o.EAN13,EAN8:o.EAN8,EAN5:o.EAN5,EAN2:o.EAN2,UPC:o.UPC,ITF14:s.ITF14,ITF:a.ITF,MSI:u.MSI,MSI10:u.MSI10,MSI11:u.MSI11,MSI1010:u.MSI1010,MSI1110:u.MSI1110,pharmacode:c.pharmacode,GenericBarcode:f.GenericBarcode}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.api=e}return t.prototype.handleCatch=function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}},t.prototype.wrapBarcodeCall=function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}},t}();e["default"]=r},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if("string"==typeof t)return o(t);if(Array.isArray(t)){for(var e=[],n=0;n=2?String.fromCharCode(210)+f(t):n>r?String.fromCharCode(208)+u(t):String.fromCharCode(209)+c(t),e=e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})}function u(t){var e=t.match(/^([\x00-\x5F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+f(t.substring(e[1].length));var n=t.match(/^[\x00-\x5F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(205)+c(t.substring(n[0].length))}function c(t){var e=t.match(/^([\x20-\x7F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+f(t.substring(e[1].length));var n=t.match(/^[\x20-\x7F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(206)+u(t.substring(n[0].length))}function f(t){var e=t.match(/^(\xCF*[0-9]{2}\xCF*)+/)[0],n=e.length;if(n===t.length)return t;t=t.substring(n);var r=t.match(/^[\x00-\x5F\xC8-\xCF]*/)[0].length,i=t.match(/^[\x20-\x7F\xC8-\xCF]*/)[0].length;return r>=i?e+String.fromCharCode(206)+u(t):e+String.fromCharCode(205)+c(t)}Object.defineProperty(e,"__esModule",{value:!0});var h=n(3),l=r(h),d=function(t){function e(n){if(i(this,e),n.search(/^[\x00-\x7F\xC8-\xD3]+$/)!==-1)var r=o(this,t.call(this,a(n)));else var r=o(this,t.call(this,n));return o(r)}return s(e,t),e}(l["default"]);e["default"]=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var i=n(16),o=r(i),s=n(13),a=r(s),u=n(14),c=r(u),f=n(15),h=r(f);e.CODE128=o["default"],e.CODE128A=a["default"],e.CODE128B=c["default"],e.CODE128C=h["default"]},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e,r){n(this,t),this.string=e.toUpperCase(),this.mod43Enabled=r.mod43||!1,this.characters=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],this.encodings=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770]}return t.prototype.getEncoding=function(t){return this.getBinary(this.characterValue(t))},t.prototype.getBinary=function(t){return this.encodings[t].toString(2)},t.prototype.getCharacter=function(t){return this.characters[t]},t.prototype.characterValue=function(t){return this.characters.indexOf(t)},t.prototype.encode=function(){for(var t=this.string,e=this.getEncoding("*"),n=0;n10*n.width?this.fontSize=10*n.width:this.fontSize=n.fontSize,this.guardHeight=n.height+this.fontSize/2+n.textMargin,this.lastChar=n.lastChar}return t.prototype.valid=function(){return this.string.search(/^[0-9]{13}$/)!==-1&&this.string[12]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e=[],n=this.structure[this.string[0]],r=this.string.substr(1,6),i=this.string.substr(7,6);return this.displayValue&&e.push({data:"000000000000",text:this.string[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),e.push({data:t.encode(r,n),text:r,options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(i,"RRRRRR"),text:i,options:{fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),this.lastChar&&this.displayValue&&(e.push({data:"00"}),e.push({data:"00000",text:this.lastChar,options:{fontSize:this.fontSize}})),e},t.prototype.checksum=function(t){var e,n=0;for(e=0;e<12;e+=2)n+=parseInt(t[e]);for(e=1;e<12;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=r(o),a=function(){function t(e){i(this,t),this.string=e,this.structure=["LL","LG","GL","GG"]}return t.prototype.valid=function(){return this.string.search(/^[0-9]{2}$/)!==-1},t.prototype.encode=function(){var t=new s["default"],e=this.structure[parseInt(this.string)%4],n="1011";return n+=t.encode(this.string,e,"01"),{data:n,text:this.string}},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=r(o),a=function(){function t(e){i(this,t),this.string=e,this.structure=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"]}return t.prototype.valid=function(){return this.string.search(/^[0-9]{5}$/)!==-1},t.prototype.encode=function(){var t=new s["default"],e=this.checksum(),n="1011";return n+=t.encode(this.string,this.structure[e],"01"),{data:n,text:this.string}},t.prototype.checksum=function(){var t=0;return t+=3*parseInt(this.string[0]),t+=9*parseInt(this.string[1]),t+=3*parseInt(this.string[2]),t+=9*parseInt(this.string[3]),t+=3*parseInt(this.string[4]),t%10},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=r(o),a=function(){function t(e){i(this,t),e.search(/^[0-9]{7}$/)!==-1?this.string=e+this.checksum(e):this.string=e}return t.prototype.valid=function(){return this.string.search(/^[0-9]{8}$/)!==-1&&this.string[7]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e="",n=this.string.substr(0,4),r=this.string.substr(4,4);return e+=t.startBin,e+=t.encode(n,"LLLL"),e+=t.middleBin,e+=t.encode(r,"RRRR"),e+=t.endBin,{data:e,text:this.string}},t.prototype.checksum=function(t){var e,n=0;for(e=0;e<7;e+=2)n+=3*parseInt(t[e]);for(e=1;e<7;e+=2)n+=parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=r(o),a=function(){function t(e,n){i(this,t),e.search(/^[0-9]{11}$/)!==-1?this.string=e+this.checksum(e):this.string=e,this.displayValue=n.displayValue,n.fontSize>10*n.width?this.fontSize=10*n.width:this.fontSize=n.fontSize,this.guardHeight=n.height+this.fontSize/2+n.textMargin}return t.prototype.valid=function(){return this.string.search(/^[0-9]{12}$/)!==-1&&this.string[11]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e=[];return this.displayValue&&e.push({data:"00000000",text:this.string[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101"+t.encode(this.string[0],"L"),options:{height:this.guardHeight}}),e.push({data:t.encode(this.string.substr(1,5),"LLLLL"),text:this.string.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(this.string.substr(6,5),"RRRRR"),text:this.string.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:t.encode(this.string[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&e.push({data:"00000000",text:this.string[11],options:{textAlign:"right",fontSize:this.fontSize}}),e},t.prototype.checksum=function(t){var e,n=0;for(e=1;e<11;e+=2)n+=parseInt(t[e]);for(e=0;e<11;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.UPC=e.EAN2=e.EAN5=e.EAN8=e.EAN13=void 0;var i=n(19),o=r(i),s=n(22),a=r(s),u=n(21),c=r(u),f=n(20),h=r(f),l=n(23),d=r(l);e.EAN13=o["default"],e.EAN8=a["default"],e.EAN5=c["default"],e.EAN2=h["default"],e.UPC=d["default"]},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.string=e}return t.prototype.encode=function(){return{data:"10101010101010101010101010101010101010101",text:this.string}},t.prototype.valid=function(){return!0},t}();e.GenericBarcode=r},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.string=e,this.binaryRepresentation={0:"00110",1:"10001",2:"01001",3:"11000",4:"00101",5:"10100",6:"01100",7:"00011",8:"10010",9:"01010"}}return t.prototype.valid=function(){return this.string.search(/^([0-9]{2})+$/)!==-1},t.prototype.encode=function(){for(var t="1010",e=0;e=3&&this.number<=131070},t}();e.pharmacode=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){var e={};for(var n in u["default"])u["default"].hasOwnProperty(n)&&(t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(e[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(e[n]=t.getAttribute("data-"+n.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,s["default"])(e)}Object.defineProperty(e,"__esModule",{value:!0});var o=n(35),s=r(o),a=n(5),u=r(a);e["default"]=i},function(t,e){"use strict";function n(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&(n=e[n],"string"==typeof t[n]&&(t[n]=parseInt(t[n],10)));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(2),s=r(o),a=n(7),u=function(){function t(e,n,r){i(this,t),this.canvas=e,this.encodings=n,this.options=r}return t.prototype.render=function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t0?(i=0,n.textAlign="left"):"right"==t.textAlign?(i=e.width-1,n.textAlign="right"):(i=e.width/2,n.textAlign="center"),n.fillText(e.text,i,o)}},t.prototype.moveCanvasDrawing=function(t){var e=this.canvas.getContext("2d");e.translate(t.width,0)},t.prototype.restoreCanvas=function(){var t=this.canvas.getContext("2d");t.restore()},t}();e["default"]=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){switch(t){case"canvas":return s["default"];case"svg":return u["default"];default:throw new Error("Invalid rederer")}}Object.defineProperty(e,"__esModule",{value:!0}),e.getRendererClass=void 0;var o=n(36),s=r(o),a=n(38),u=r(a);e.getRendererClass=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){var r=document.createElementNS(h,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function s(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}function a(t,e,n,r,i){var o=document.createElementNS(h,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(2),c=r(u),f=n(7),h="http://www.w3.org/2000/svg",l=function(){function t(e,n,r){i(this,t),this.svg=e,this.encodings=n,this.options=r}return t.prototype.render=function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e0&&(a(s-e.width*o,r,e.width*o,e.height,t),o=0);o>0&&a(s-e.width*(o-1),r,e.width*o,e.height,t)},t.prototype.drawSVGText=function(t,e,n){var r=document.createElementNS(h,"text");if(e.displayValue){var i,o;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(i=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=n.width-1,r.setAttribute("text-anchor","end")):(i=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",i),r.setAttribute("y",o),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}},t.prototype.setSvgAttributes=function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",h),n.setAttribute("version","1.1"),n.style.transform="translate(0,0)",this.options.background&&(n.style.background=this.options.background)},t}();e["default"]=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){C.prototype[e]=C.prototype[e.toUpperCase()]=C.prototype[e.toLowerCase()]=function(n,r){var i=this;return i._errorHandler.wrapBarcodeCall(function(){var s=(0,h["default"])(i._options,r),a=t[e],u=o(n,a,s);return i._encodings.push(u),i})}}function o(t,e,n){t=""+t;var r=new e(t,n);if(!r.valid())throw new x.InvalidInputException(r.constructor.name,t);var i=r.encode();i=(0,d["default"])(i);for(var o=0;o=200)r=t[0]-105,t.shift(),99===r?n=this.nextC(t,e+1):100===r?n=this.nextB(t,e+1):98===r?(t[0]=t[0]>95?t[0]-96:t[0],n=this.nextA(t,e+1)):n=this.nextA(t,e+1);else{var i=t[0];r=i<32?i+64:i-32,t.shift(),n=this.nextA(t,e+1)}var o=this.getEncoding(r),a=r*e;return{result:o+n.result,checksum:a+n.checksum}},t.prototype.nextB=function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,r;t[0]>=200?(r=t[0]-105,t.shift(),99===r?n=this.nextC(t,e+1):101===r?n=this.nextA(t,e+1):98===r?(t[0]=t[0]<32?t[0]+96:t[0],n=this.nextB(t,e+1)):n=this.nextB(t,e+1)):(r=t[0]-32,t.shift(),n=this.nextB(t,e+1));var i=this.getEncoding(r),o=r*e;return{result:i+n.result,checksum:o+n.checksum}},t.prototype.nextC=function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,r;t[0]>=200?(r=t[0]-105,t.shift(),n=100===r?this.nextB(t,e+1):101===r?this.nextA(t,e+1):this.nextC(t,e+1)):(r=10*(t[0]-48)+t[1]-48,t.shift(),t.shift(),n=this.nextC(t,e+1));var i=this.getEncoding(r),o=r*e;return{result:i+n.result,checksum:o+n.checksum}},t}();e["default"]=r},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};e["default"]=n},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(i,o){n(this,e);var a=r(this,t.call(this));return a.name="InvalidInputException",a.symbology=i,a.input=o,a.message='"'+a.input+'" is not a valid input for '+a.symbology,a}return i(e,t),e}(Error),a=function(t){function e(){n(this,e);var i=r(this,t.call(this));return i.name="InvalidElementException",i.message="Not supported type to render on",i}return i(e,t),e}(Error),s=function(t){function e(){n(this,e);var i=r(this,t.call(this));return i.name="NoElementException",i.message="No element to render on.",i}return i(e,t),e}(Error);e.InvalidInputException=o,e.InvalidElementException=a,e.NoElementException=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){return e.height+(e.displayValue&&t.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&ee&&(e=t[n].height);return e}function f(t,e,n){var r;r="undefined"==typeof n?document.createElement("canvas").getContext("2d"):n,r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var i=r.measureText(t).width;return i}Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var c=n(0),l=r(c);e.getMaximumHeightOfEncodings=u,e.getEncodingHeight=i,e.getBarcodePadding=o,e.calculateEncodingAttributes=a,e.getTotalWidthOfEncodings=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(14);e["default"]={CODE128:r.CODE128,CODE128A:r.CODE128A,CODE128B:r.CODE128B,CODE128C:r.CODE128C}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.api=e}return t.prototype.handleCatch=function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}},t.prototype.wrapBarcodeCall=function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}},t}();e["default"]=r},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if("string"==typeof t)return o(t);if(Array.isArray(t)){for(var e=[],n=0;n=2?String.fromCharCode(210)+c(t):n>r?String.fromCharCode(208)+u(t):String.fromCharCode(209)+f(t),e=e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})}function u(t){var e=t.match(/^([\x00-\x5F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+c(t.substring(e[1].length));var n=t.match(/^[\x00-\x5F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(205)+f(t.substring(n[0].length))}function f(t){var e=t.match(/^([\x20-\x7F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+c(t.substring(e[1].length));var n=t.match(/^[\x20-\x7F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(206)+u(t.substring(n[0].length))}function c(t){var e=t.match(/^(\xCF*[0-9]{2}\xCF*)+/)[0],n=e.length;if(n===t.length)return t;t=t.substring(n);var r=t.match(/^[\x00-\x5F\xC8-\xCF]*/)[0].length,i=t.match(/^[\x20-\x7F\xC8-\xCF]*/)[0].length;return r>=i?e+String.fromCharCode(206)+u(t):e+String.fromCharCode(205)+f(t)}Object.defineProperty(e,"__esModule",{value:!0});var l=n(1),d=r(l),h=function(t){function e(n){if(i(this,e),n.search(/^[\x00-\x7F\xC8-\xD3]+$/)!==-1)var r=o(this,t.call(this,s(n)));else var r=o(this,t.call(this,n));return o(r)}return a(e,t),e}(d["default"]);e["default"]=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var i=n(13),o=r(i),a=n(10),s=r(a),u=n(11),f=r(u),c=n(12),l=r(c);e.CODE128=o["default"],e.CODE128A=s["default"],e.CODE128B=f["default"],e.CODE128C=l["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){var e={};for(var n in u["default"])u["default"].hasOwnProperty(n)&&(t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(e[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(e[n]=t.getAttribute("data-"+n.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,a["default"])(e)}Object.defineProperty(e,"__esModule",{value:!0});var o=n(16),a=r(o),s=n(2),u=r(s);e["default"]=i},function(t,e){"use strict";function n(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&(n=e[n],"string"==typeof t[n]&&(t[n]=parseInt(t[n],10)));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=r(o),s=n(4),u=function(){function t(e,n,r){i(this,t),this.canvas=e,this.encodings=n,this.options=r}return t.prototype.render=function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t0?(i=0,n.textAlign="left"):"right"==t.textAlign?(i=e.width-1,n.textAlign="right"):(i=e.width/2,n.textAlign="center"),n.fillText(e.text,i,o)}},t.prototype.moveCanvasDrawing=function(t){var e=this.canvas.getContext("2d");e.translate(t.width,0)},t.prototype.restoreCanvas=function(){var t=this.canvas.getContext("2d");t.restore()},t}();e["default"]=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){switch(t){case"canvas":return a["default"];case"svg":return u["default"];default:throw new Error("Invalid rederer")}}Object.defineProperty(e,"__esModule",{value:!0}),e.getRendererClass=void 0;var o=n(17),a=r(o),s=n(19),u=r(s);e.getRendererClass=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){var r=document.createElementNS(l,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function a(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}function s(t,e,n,r,i){var o=document.createElementNS(l,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(0),f=r(u),c=n(4),l="http://www.w3.org/2000/svg",d=function(){function t(e,n,r){i(this,t),this.svg=e,this.encodings=n,this.options=r}return t.prototype.render=function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e0&&(s(a-e.width*o,r,e.width*o,e.height,t),o=0);o>0&&s(a-e.width*(o-1),r,e.width*o,e.height,t)},t.prototype.drawSVGText=function(t,e,n){var r=document.createElementNS(l,"text");if(e.displayValue){var i,o;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(i=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=n.width-1,r.setAttribute("text-anchor","end")):(i=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",i),r.setAttribute("y",o),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}},t.prototype.setSvgAttributes=function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",l),n.setAttribute("version","1.1"),n.style.transform="translate(0,0)",this.options.background&&(n.style.background=this.options.background)},t}();e["default"]=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){_.prototype[e]=_.prototype[e.toUpperCase()]=_.prototype[e.toLowerCase()]=function(n,r){var i=this;return i._errorHandler.wrapBarcodeCall(function(){var a=(0,l["default"])(i._options,r),s=t[e],u=o(n,s,a);return i._encodings.push(u),i})}}function o(t,e,n){t=""+t;var r=new e(t,n);if(!r.valid())throw new C.InvalidInputException(r.constructor.name,t);var i=r.encode();i=(0,h["default"])(i);for(var o=0;o=200)r=t[0]-105,t.shift(),99===r?n=this.nextC(t,e+1):100===r?n=this.nextB(t,e+1):98===r?(t[0]=t[0]>95?t[0]-96:t[0],n=this.nextA(t,e+1)):n=this.nextA(t,e+1);else{var i=t[0];r=i<32?i+64:i-32,t.shift(),n=this.nextA(t,e+1)}var o=this.getEncoding(r),a=r*e;return{result:o+n.result,checksum:a+n.checksum}},t.prototype.nextB=function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,r;t[0]>=200?(r=t[0]-105,t.shift(),99===r?n=this.nextC(t,e+1):101===r?n=this.nextA(t,e+1):98===r?(t[0]=t[0]<32?t[0]+96:t[0],n=this.nextB(t,e+1)):n=this.nextB(t,e+1)):(r=t[0]-32,t.shift(),n=this.nextB(t,e+1));var i=this.getEncoding(r),o=r*e;return{result:i+n.result,checksum:o+n.checksum}},t.prototype.nextC=function(t,e){if(t.length<=0)return{result:"",checksum:0};var n,r;t[0]>=200?(r=t[0]-105,t.shift(),n=100===r?this.nextB(t,e+1):101===r?this.nextA(t,e+1):this.nextC(t,e+1)):(r=10*(t[0]-48)+t[1]-48,t.shift(),t.shift(),n=this.nextC(t,e+1));var i=this.getEncoding(r),o=r*e;return{result:i+n.result,checksum:o+n.checksum}},t}();e["default"]=r},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}};e["default"]=n},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var o=function(t){function e(i,o){n(this,e);var a=r(this,t.call(this));return a.name="InvalidInputException",a.symbology=i,a.input=o,a.message='"'+a.input+'" is not a valid input for '+a.symbology,a}return i(e,t),e}(Error),a=function(t){function e(){n(this,e);var i=r(this,t.call(this));return i.name="InvalidElementException",i.message="Not supported type to render on",i}return i(e,t),e}(Error),s=function(t){function e(){n(this,e);var i=r(this,t.call(this));return i.name="NoElementException",i.message="No element to render on.",i}return i(e,t),e}(Error);e.InvalidInputException=o,e.InvalidElementException=a,e.NoElementException=s},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){return e.height+(e.displayValue&&t.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&ee&&(e=t[n].height);return e}function f(t,e,n){var r;r="undefined"==typeof n?document.createElement("canvas").getContext("2d"):n,r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var i=r.measureText(t).width;return i}Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var c=n(0),l=r(c);e.getMaximumHeightOfEncodings=u,e.getEncodingHeight=i,e.getBarcodePadding=o,e.calculateEncodingAttributes=a,e.getTotalWidthOfEncodings=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(14);e["default"]={CODE128:r.CODE128,CODE128A:r.CODE128A,CODE128B:r.CODE128B,CODE128C:r.CODE128C}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.api=e}return t.prototype.handleCatch=function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}},t.prototype.wrapBarcodeCall=function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}},t}();e["default"]=r},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if("string"==typeof t)return o(t);if(Array.isArray(t)){for(var e=[],n=0;n=2?String.fromCharCode(210)+c(t):n>r?String.fromCharCode(208)+u(t):String.fromCharCode(209)+f(t),e=e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})}function u(t){var e=t.match(/^([\x00-\x5F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+c(t.substring(e[1].length));var n=t.match(/^[\x00-\x5F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(205)+f(t.substring(n[0].length))}function f(t){var e=t.match(/^([\x20-\x7F\xC8-\xCF]+?)(([0-9]{2}){2,})([^0-9]|$)/);if(e)return e[1]+String.fromCharCode(204)+c(t.substring(e[1].length));var n=t.match(/^[\x20-\x7F\xC8-\xCF]+/);return n[0].length===t.length?t:n[0]+String.fromCharCode(206)+u(t.substring(n[0].length))}function c(t){var e=t.match(/^(\xCF*[0-9]{2}\xCF*)+/)[0],n=e.length;if(n===t.length)return t;t=t.substring(n);var r=t.match(/^[\x00-\x5F\xC8-\xCF]*/)[0].length,i=t.match(/^[\x20-\x7F\xC8-\xCF]*/)[0].length;return r>=i?e+String.fromCharCode(206)+u(t):e+String.fromCharCode(205)+f(t)}Object.defineProperty(e,"__esModule",{value:!0});var l=n(1),d=r(l),h=function(t){function e(n){if(i(this,e),n.search(/^[\x00-\x7F\xC8-\xD3]+$/)!==-1)var r=o(this,t.call(this,s(n)));else var r=o(this,t.call(this,n));return o(r)}return a(e,t),e}(d["default"]);e["default"]=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var i=n(13),o=r(i),a=n(10),s=r(a),u=n(11),f=r(u),c=n(12),l=r(c);e.CODE128=o["default"],e.CODE128A=s["default"],e.CODE128B=f["default"],e.CODE128C=l["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){var e={};for(var n in u["default"])u["default"].hasOwnProperty(n)&&(t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(e[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(e[n]=t.getAttribute("data-"+n.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,a["default"])(e)}Object.defineProperty(e,"__esModule",{value:!0});var o=n(16),a=r(o),s=n(2),u=r(s);e["default"]=i},function(t,e){"use strict";function n(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&(n=e[n],"string"==typeof t[n]&&(t[n]=parseInt(t[n],10)));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=r(o),s=n(4),u=function(){function t(e,n,r){i(this,t),this.canvas=e,this.encodings=n,this.options=r}return t.prototype.render=function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t0?(i=0,n.textAlign="left"):"right"==t.textAlign?(i=e.width-1,n.textAlign="right"):(i=e.width/2,n.textAlign="center"),n.fillText(e.text,i,o)}},t.prototype.moveCanvasDrawing=function(t){var e=this.canvas.getContext("2d");e.translate(t.width,0)},t.prototype.restoreCanvas=function(){var t=this.canvas.getContext("2d");t.restore()},t}();e["default"]=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){switch(t){case"canvas":return a["default"];case"svg":return u["default"];default:throw new Error("Invalid rederer")}}Object.defineProperty(e,"__esModule",{value:!0}),e.getRendererClass=void 0;var o=n(17),a=r(o),s=n(19),u=r(s);e.getRendererClass=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){var r=document.createElementNS(l,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function a(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}function s(t,e,n,r,i){var o=document.createElementNS(l,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(0),f=r(u),c=n(4),l="http://www.w3.org/2000/svg",d=function(){function t(e,n,r){i(this,t),this.svg=e,this.encodings=n,this.options=r}return t.prototype.render=function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e0&&(s(a-e.width*o,r,e.width*o,e.height,t),o=0);o>0&&s(a-e.width*(o-1),r,e.width*o,e.height,t)},t.prototype.drawSVGText=function(t,e,n){var r=document.createElementNS(l,"text");if(e.displayValue){var i,o;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(i=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=n.width-1,r.setAttribute("text-anchor","end")):(i=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",i),r.setAttribute("y",o),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}},t.prototype.setSvgAttributes=function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",l),n.setAttribute("version","1.1"),n.style.transform="translate(0,0)",this.options.background&&(n.style.background=this.options.background)},t}();e["default"]=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){_.prototype[e]=_.prototype[e.toUpperCase()]=_.prototype[e.toLowerCase()]=function(n,r){var i=this;return i._errorHandler.wrapBarcodeCall(function(){var a=(0,l["default"])(i._options,r),s=t[e],u=o(n,s,a);return i._encodings.push(u),i})}}function o(t,e,n){t=""+t;var r=new e(t,n);if(!r.valid())throw new C.InvalidInputException(r.constructor.name,t);var i=r.encode();i=(0,h["default"])(i);for(var o=0;o0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&ee&&(e=t[n].height);return e}function d(t,e,n){var r;r="undefined"==typeof n?document.createElement("canvas").getContext("2d"):n,r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var i=r.measureText(t).width;return i}Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var f=n(0),c=r(f);e.getMaximumHeightOfEncodings=u,e.getEncodingHeight=i,e.getBarcodePadding=o,e.calculateEncodingAttributes=a,e.getTotalWidthOfEncodings=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9);e["default"]={CODE39:r.CODE39}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.api=e}return t.prototype.handleCatch=function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}},t.prototype.wrapBarcodeCall=function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}},t}();e["default"]=r},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if("string"==typeof t)return o(t);if(Array.isArray(t)){for(var e=[],n=0;n0?(i=0,n.textAlign="left"):"right"==t.textAlign?(i=e.width-1,n.textAlign="right"):(i=e.width/2,n.textAlign="center"),n.fillText(e.text,i,o)}},t.prototype.moveCanvasDrawing=function(t){var e=this.canvas.getContext("2d");e.translate(t.width,0)},t.prototype.restoreCanvas=function(){var t=this.canvas.getContext("2d");t.restore()},t}();e["default"]=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){switch(t){case"canvas":return a["default"];case"svg":return u["default"];default:throw new Error("Invalid rederer")}}Object.defineProperty(e,"__esModule",{value:!0}),e.getRendererClass=void 0;var o=n(12),a=r(o),s=n(14),u=r(s);e.getRendererClass=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){var r=document.createElementNS(c,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function a(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}function s(t,e,n,r,i){var o=document.createElementNS(c,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(0),d=r(u),f=n(3),c="http://www.w3.org/2000/svg",l=function(){function t(e,n,r){i(this,t),this.svg=e,this.encodings=n,this.options=r}return t.prototype.render=function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e0&&(s(a-e.width*o,r,e.width*o,e.height,t),o=0);o>0&&s(a-e.width*(o-1),r,e.width*o,e.height,t)},t.prototype.drawSVGText=function(t,e,n){var r=document.createElementNS(c,"text");if(e.displayValue){var i,o;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(i=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=n.width-1,r.setAttribute("text-anchor","end")):(i=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",i),r.setAttribute("y",o),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}},t.prototype.setSvgAttributes=function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",c),n.setAttribute("version","1.1"),n.style.transform="translate(0,0)",this.options.background&&(n.style.background=this.options.background)},t}();e["default"]=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){E.prototype[e]=E.prototype[e.toUpperCase()]=E.prototype[e.toLowerCase()]=function(n,r){var i=this;return i._errorHandler.wrapBarcodeCall(function(){var a=(0,c["default"])(i._options,r),s=t[e],u=o(n,s,a);return i._encodings.push(u),i})}}function o(t,e,n){t=""+t;var r=new e(t,n);if(!r.valid())throw new x.InvalidInputException(r.constructor.name,t);var i=r.encode();i=(0,h["default"])(i);for(var o=0;o0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&ee&&(e=t[n].height);return e}function d(t,e,n){var r;r="undefined"==typeof n?document.createElement("canvas").getContext("2d"):n,r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var i=r.measureText(t).width;return i}Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var f=n(0),c=r(f);e.getMaximumHeightOfEncodings=u,e.getEncodingHeight=i,e.getBarcodePadding=o,e.calculateEncodingAttributes=a,e.getTotalWidthOfEncodings=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9);e["default"]={CODE39:r.CODE39}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.api=e}return t.prototype.handleCatch=function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}},t.prototype.wrapBarcodeCall=function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}},t}();e["default"]=r},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if("string"==typeof t)return o(t);if(Array.isArray(t)){for(var e=[],n=0;n0?(i=0,n.textAlign="left"):"right"==t.textAlign?(i=e.width-1,n.textAlign="right"):(i=e.width/2,n.textAlign="center"),n.fillText(e.text,i,o)}},t.prototype.moveCanvasDrawing=function(t){var e=this.canvas.getContext("2d");e.translate(t.width,0)},t.prototype.restoreCanvas=function(){var t=this.canvas.getContext("2d");t.restore()},t}();e["default"]=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){switch(t){case"canvas":return a["default"];case"svg":return u["default"];default:throw new Error("Invalid rederer")}}Object.defineProperty(e,"__esModule",{value:!0}),e.getRendererClass=void 0;var o=n(12),a=r(o),s=n(14),u=r(s);e.getRendererClass=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){var r=document.createElementNS(c,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function a(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}function s(t,e,n,r,i){var o=document.createElementNS(c,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(0),d=r(u),f=n(3),c="http://www.w3.org/2000/svg",l=function(){function t(e,n,r){i(this,t),this.svg=e,this.encodings=n,this.options=r}return t.prototype.render=function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e0&&(s(a-e.width*o,r,e.width*o,e.height,t),o=0);o>0&&s(a-e.width*(o-1),r,e.width*o,e.height,t)},t.prototype.drawSVGText=function(t,e,n){var r=document.createElementNS(c,"text");if(e.displayValue){var i,o;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(i=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=n.width-1,r.setAttribute("text-anchor","end")):(i=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",i),r.setAttribute("y",o),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}},t.prototype.setSvgAttributes=function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",c),n.setAttribute("version","1.1"),n.style.transform="translate(0,0)",this.options.background&&(n.style.background=this.options.background)},t}();e["default"]=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){E.prototype[e]=E.prototype[e.toUpperCase()]=E.prototype[e.toLowerCase()]=function(n,r){var i=this;return i._errorHandler.wrapBarcodeCall(function(){var a=(0,c["default"])(i._options,r),s=t[e],u=o(n,s,a);return i._encodings.push(u),i})}}function o(t,e,n){t=""+t;var r=new e(t,n);if(!r.valid())throw new x.InvalidInputException(r.constructor.name,t);var i=r.encode();i=(0,h["default"])(i);for(var o=0;o0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&ee&&(e=t[n].height);return e}function f(t,e,n){var i;i="undefined"==typeof n?document.createElement("canvas").getContext("2d"):n,i.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var r=i.measureText(t).width;return r}Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var d=n(1),c=i(d);e.getMaximumHeightOfEncodings=u,e.getEncodingHeight=r,e.getBarcodePadding=o,e.calculateEncodingAttributes=s,e.getTotalWidthOfEncodings=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(15);e["default"]={EAN13:i.EAN13,EAN8:i.EAN8,EAN5:i.EAN5,EAN2:i.EAN2,UPC:i.UPC}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(e){n(this,t),this.api=e}return t.prototype.handleCatch=function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}},t.prototype.wrapBarcodeCall=function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}},t}();e["default"]=i},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t){if("string"==typeof t)return o(t);if(Array.isArray(t)){for(var e=[],n=0;n10*n.width?this.fontSize=10*n.width:this.fontSize=n.fontSize,this.guardHeight=n.height+this.fontSize/2+n.textMargin,this.lastChar=n.lastChar}return t.prototype.valid=function(){return this.string.search(/^[0-9]{13}$/)!==-1&&this.string[12]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e=[],n=this.structure[this.string[0]],i=this.string.substr(1,6),r=this.string.substr(7,6);return this.displayValue&&e.push({data:"000000000000",text:this.string[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),e.push({data:t.encode(i,n),text:i,options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(r,"RRRRRR"),text:r,options:{fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),this.lastChar&&this.displayValue&&(e.push({data:"00"}),e.push({data:"00000",text:this.lastChar,options:{fontSize:this.fontSize}})),e},t.prototype.checksum=function(t){var e,n=0;for(e=0;e<12;e+=2)n+=parseInt(t[e]);for(e=1;e<12;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(o),a=function(){function t(e){r(this,t),this.string=e,this.structure=["LL","LG","GL","GG"]}return t.prototype.valid=function(){return this.string.search(/^[0-9]{2}$/)!==-1},t.prototype.encode=function(){var t=new s["default"],e=this.structure[parseInt(this.string)%4],n="1011";return n+=t.encode(this.string,e,"01"),{data:n,text:this.string}},t}();e["default"]=a},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(o),a=function(){function t(e){r(this,t),this.string=e,this.structure=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"]}return t.prototype.valid=function(){return this.string.search(/^[0-9]{5}$/)!==-1},t.prototype.encode=function(){var t=new s["default"],e=this.checksum(),n="1011";return n+=t.encode(this.string,this.structure[e],"01"),{data:n,text:this.string}},t.prototype.checksum=function(){var t=0;return t+=3*parseInt(this.string[0]),t+=9*parseInt(this.string[1]),t+=3*parseInt(this.string[2]),t+=9*parseInt(this.string[3]),t+=3*parseInt(this.string[4]),t%10},t}();e["default"]=a},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(o),a=function(){function t(e){r(this,t),e.search(/^[0-9]{7}$/)!==-1?this.string=e+this.checksum(e):this.string=e}return t.prototype.valid=function(){return this.string.search(/^[0-9]{8}$/)!==-1&&this.string[7]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e="",n=this.string.substr(0,4),i=this.string.substr(4,4);return e+=t.startBin,e+=t.encode(n,"LLLL"),e+=t.middleBin,e+=t.encode(i,"RRRR"),e+=t.endBin,{data:e,text:this.string}},t.prototype.checksum=function(t){var e,n=0;for(e=0;e<7;e+=2)n+=3*parseInt(t[e]);for(e=1;e<7;e+=2)n+=parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(o),a=function(){function t(e,n){r(this,t),e.search(/^[0-9]{11}$/)!==-1?this.string=e+this.checksum(e):this.string=e,this.displayValue=n.displayValue,n.fontSize>10*n.width?this.fontSize=10*n.width:this.fontSize=n.fontSize,this.guardHeight=n.height+this.fontSize/2+n.textMargin}return t.prototype.valid=function(){return this.string.search(/^[0-9]{12}$/)!==-1&&this.string[11]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e=[];return this.displayValue&&e.push({data:"00000000",text:this.string[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101"+t.encode(this.string[0],"L"),options:{height:this.guardHeight}}),e.push({data:t.encode(this.string.substr(1,5),"LLLLL"),text:this.string.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(this.string.substr(6,5),"RRRRR"),text:this.string.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:t.encode(this.string[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&e.push({data:"00000000",text:this.string[11],options:{textAlign:"right",fontSize:this.fontSize}}),e},t.prototype.checksum=function(t){var e,n=0;for(e=1;e<11;e+=2)n+=parseInt(t[e]);for(e=0;e<11;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.UPC=e.EAN2=e.EAN5=e.EAN8=e.EAN13=void 0;var r=n(10),o=i(r),s=n(13),a=i(s),u=n(12),f=i(u),d=n(11),c=i(d),h=n(14),l=i(h);e.EAN13=o["default"],e.EAN8=a["default"],e.EAN5=f["default"],e.EAN2=c["default"],e.UPC=l["default"]},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t){var e={};for(var n in u["default"])u["default"].hasOwnProperty(n)&&(t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(e[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(e[n]=t.getAttribute("data-"+n.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,s["default"])(e)}Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),s=i(o),a=n(2),u=i(a);e["default"]=r},function(t,e){"use strict";function n(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&(n=e[n],"string"==typeof t[n]&&(t[n]=parseInt(t[n],10)));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),s=i(o),a=n(4),u=function(){function t(e,n,i){r(this,t),this.canvas=e,this.encodings=n,this.options=i}return t.prototype.render=function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t0?(r=0,n.textAlign="left"):"right"==t.textAlign?(r=e.width-1,n.textAlign="right"):(r=e.width/2,n.textAlign="center"),n.fillText(e.text,r,o)}},t.prototype.moveCanvasDrawing=function(t){var e=this.canvas.getContext("2d");e.translate(t.width,0)},t.prototype.restoreCanvas=function(){var t=this.canvas.getContext("2d");t.restore()},t}();e["default"]=u},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t){switch(t){case"canvas":return s["default"];case"svg":return u["default"];default:throw new Error("Invalid rederer")}}Object.defineProperty(e,"__esModule",{value:!0}),e.getRendererClass=void 0;var o=n(18),s=i(o),a=n(20),u=i(a);e.getRendererClass=r},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){var i=document.createElementNS(c,"g");return i.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(i),i}function s(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}function a(t,e,n,i,r){var o=document.createElementNS(c,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",i),r.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(1),f=i(u),d=n(4),c="http://www.w3.org/2000/svg",h=function(){function t(e,n,i){r(this,t),this.svg=e,this.encodings=n,this.options=i}return t.prototype.render=function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e0&&(a(s-e.width*o,i,e.width*o,e.height,t),o=0);o>0&&a(s-e.width*(o-1),i,e.width*o,e.height,t)},t.prototype.drawSVGText=function(t,e,n){var i=document.createElementNS(c,"text");if(e.displayValue){var r,o;i.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(r=0,i.setAttribute("text-anchor","start")):"right"==e.textAlign?(r=n.width-1,i.setAttribute("text-anchor","end")):(r=n.width/2,i.setAttribute("text-anchor","middle")),i.setAttribute("x",r),i.setAttribute("y",o),i.appendChild(document.createTextNode(n.text)),t.appendChild(i)}},t.prototype.setSvgAttributes=function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",c),n.setAttribute("version","1.1"),n.style.transform="translate(0,0)",this.options.background&&(n.style.background=this.options.background)},t}();e["default"]=h},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){L.prototype[e]=L.prototype[e.toUpperCase()]=L.prototype[e.toLowerCase()]=function(n,i){var r=this;return r._errorHandler.wrapBarcodeCall(function(){var s=(0,c["default"])(r._options,i),a=t[e],u=o(n,a,s);return r._encodings.push(u),r})}}function o(t,e,n){t=""+t;var i=new e(t,n);if(!i.valid())throw new _.InvalidInputException(i.constructor.name,t);var r=i.encode();r=(0,l["default"])(r);for(var o=0;o0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&ee&&(e=t[n].height);return e}function f(t,e,n){var i;i="undefined"==typeof n?document.createElement("canvas").getContext("2d"):n,i.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var r=i.measureText(t).width;return r}Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var d=n(1),c=i(d);e.getMaximumHeightOfEncodings=u,e.getEncodingHeight=r,e.getBarcodePadding=o,e.calculateEncodingAttributes=s,e.getTotalWidthOfEncodings=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(15);e["default"]={EAN13:i.EAN13,EAN8:i.EAN8,EAN5:i.EAN5,EAN2:i.EAN2,UPC:i.UPC}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(e){n(this,t),this.api=e}return t.prototype.handleCatch=function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}},t.prototype.wrapBarcodeCall=function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}},t}();e["default"]=i},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t){if("string"==typeof t)return o(t);if(Array.isArray(t)){for(var e=[],n=0;n10*n.width?this.fontSize=10*n.width:this.fontSize=n.fontSize,this.guardHeight=n.height+this.fontSize/2+n.textMargin,this.lastChar=n.lastChar}return t.prototype.valid=function(){return this.string.search(/^[0-9]{13}$/)!==-1&&this.string[12]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e=[],n=this.structure[this.string[0]],i=this.string.substr(1,6),r=this.string.substr(7,6);return this.displayValue&&e.push({data:"000000000000",text:this.string[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),e.push({data:t.encode(i,n),text:i,options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(r,"RRRRRR"),text:r,options:{fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),this.lastChar&&this.displayValue&&(e.push({data:"00"}),e.push({data:"00000",text:this.lastChar,options:{fontSize:this.fontSize}})),e},t.prototype.checksum=function(t){var e,n=0;for(e=0;e<12;e+=2)n+=parseInt(t[e]);for(e=1;e<12;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(o),a=function(){function t(e){r(this,t),this.string=e,this.structure=["LL","LG","GL","GG"]}return t.prototype.valid=function(){return this.string.search(/^[0-9]{2}$/)!==-1},t.prototype.encode=function(){var t=new s["default"],e=this.structure[parseInt(this.string)%4],n="1011";return n+=t.encode(this.string,e,"01"),{data:n,text:this.string}},t}();e["default"]=a},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(o),a=function(){function t(e){r(this,t),this.string=e,this.structure=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"]}return t.prototype.valid=function(){return this.string.search(/^[0-9]{5}$/)!==-1},t.prototype.encode=function(){var t=new s["default"],e=this.checksum(),n="1011";return n+=t.encode(this.string,this.structure[e],"01"),{data:n,text:this.string}},t.prototype.checksum=function(){var t=0;return t+=3*parseInt(this.string[0]),t+=9*parseInt(this.string[1]),t+=3*parseInt(this.string[2]),t+=9*parseInt(this.string[3]),t+=3*parseInt(this.string[4]),t%10},t}();e["default"]=a},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(o),a=function(){function t(e){r(this,t),e.search(/^[0-9]{7}$/)!==-1?this.string=e+this.checksum(e):this.string=e}return t.prototype.valid=function(){return this.string.search(/^[0-9]{8}$/)!==-1&&this.string[7]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e="",n=this.string.substr(0,4),i=this.string.substr(4,4);return e+=t.startBin,e+=t.encode(n,"LLLL"),e+=t.middleBin,e+=t.encode(i,"RRRR"),e+=t.endBin,{data:e,text:this.string}},t.prototype.checksum=function(t){var e,n=0;for(e=0;e<7;e+=2)n+=3*parseInt(t[e]);for(e=1;e<7;e+=2)n+=parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),s=i(o),a=function(){function t(e,n){r(this,t),e.search(/^[0-9]{11}$/)!==-1?this.string=e+this.checksum(e):this.string=e,this.displayValue=n.displayValue,n.fontSize>10*n.width?this.fontSize=10*n.width:this.fontSize=n.fontSize,this.guardHeight=n.height+this.fontSize/2+n.textMargin}return t.prototype.valid=function(){return this.string.search(/^[0-9]{12}$/)!==-1&&this.string[11]==this.checksum(this.string)},t.prototype.encode=function(){var t=new s["default"],e=[];return this.displayValue&&e.push({data:"00000000",text:this.string[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101"+t.encode(this.string[0],"L"),options:{height:this.guardHeight}}),e.push({data:t.encode(this.string.substr(1,5),"LLLLL"),text:this.string.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:t.encode(this.string.substr(6,5),"RRRRR"),text:this.string.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:t.encode(this.string[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&e.push({data:"00000000",text:this.string[11],options:{textAlign:"right",fontSize:this.fontSize}}),e},t.prototype.checksum=function(t){var e,n=0;for(e=1;e<11;e+=2)n+=parseInt(t[e]);for(e=0;e<11;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10},t}();e["default"]=a},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0}),e.UPC=e.EAN2=e.EAN5=e.EAN8=e.EAN13=void 0;var r=n(10),o=i(r),s=n(13),a=i(s),u=n(12),f=i(u),d=n(11),c=i(d),h=n(14),l=i(h);e.EAN13=o["default"],e.EAN8=a["default"],e.EAN5=f["default"],e.EAN2=c["default"],e.UPC=l["default"]},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t){var e={};for(var n in u["default"])u["default"].hasOwnProperty(n)&&(t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(e[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(e[n]=t.getAttribute("data-"+n.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,s["default"])(e)}Object.defineProperty(e,"__esModule",{value:!0});var o=n(17),s=i(o),a=n(2),u=i(a);e["default"]=r},function(t,e){"use strict";function n(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&(n=e[n],"string"==typeof t[n]&&(t[n]=parseInt(t[n],10)));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),s=i(o),a=n(4),u=function(){function t(e,n,i){r(this,t),this.canvas=e,this.encodings=n,this.options=i}return t.prototype.render=function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t0?(r=0,n.textAlign="left"):"right"==t.textAlign?(r=e.width-1,n.textAlign="right"):(r=e.width/2,n.textAlign="center"),n.fillText(e.text,r,o)}},t.prototype.moveCanvasDrawing=function(t){var e=this.canvas.getContext("2d");e.translate(t.width,0)},t.prototype.restoreCanvas=function(){var t=this.canvas.getContext("2d");t.restore()},t}();e["default"]=u},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t){switch(t){case"canvas":return s["default"];case"svg":return u["default"];default:throw new Error("Invalid rederer")}}Object.defineProperty(e,"__esModule",{value:!0}),e.getRendererClass=void 0;var o=n(18),s=i(o),a=n(20),u=i(a);e.getRendererClass=r},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){var i=document.createElementNS(c,"g");return i.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(i),i}function s(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}function a(t,e,n,i,r){var o=document.createElementNS(c,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",i),r.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(1),f=i(u),d=n(4),c="http://www.w3.org/2000/svg",h=function(){function t(e,n,i){r(this,t),this.svg=e,this.encodings=n,this.options=i}return t.prototype.render=function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e0&&(a(s-e.width*o,i,e.width*o,e.height,t),o=0);o>0&&a(s-e.width*(o-1),i,e.width*o,e.height,t)},t.prototype.drawSVGText=function(t,e,n){var i=document.createElementNS(c,"text");if(e.displayValue){var r,o;i.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(r=0,i.setAttribute("text-anchor","start")):"right"==e.textAlign?(r=n.width-1,i.setAttribute("text-anchor","end")):(r=n.width/2,i.setAttribute("text-anchor","middle")),i.setAttribute("x",r),i.setAttribute("y",o),i.appendChild(document.createTextNode(n.text)),t.appendChild(i)}},t.prototype.setSvgAttributes=function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",c),n.setAttribute("version","1.1"),n.style.transform="translate(0,0)",this.options.background&&(n.style.background=this.options.background)},t}();e["default"]=h},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){L.prototype[e]=L.prototype[e.toUpperCase()]=L.prototype[e.toLowerCase()]=function(n,i){var r=this;return r._errorHandler.wrapBarcodeCall(function(){var s=(0,c["default"])(r._options,i),a=t[e],u=o(n,a,s);return r._encodings.push(u),r})}}function o(t,e,n){t=""+t;var i=new e(t,n);if(!i.valid())throw new _.InvalidInputException(i.constructor.name,t);var r=i.encode();r=(0,l["default"])(r);for(var o=0;o0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&ee&&(e=t[n].height);return e}function f(t,e,n){var r;r="undefined"==typeof n?document.createElement("canvas").getContext("2d"):n,r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var i=r.measureText(t).width;return i}Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var d=n(0),c=r(d);e.getMaximumHeightOfEncodings=u,e.getEncodingHeight=i,e.getBarcodePadding=o,e.calculateEncodingAttributes=a,e.getTotalWidthOfEncodings=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9);e["default"]={ITF14:r.ITF14}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.api=e}return t.prototype.handleCatch=function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}},t.prototype.wrapBarcodeCall=function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}},t}();e["default"]=r},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if("string"==typeof t)return o(t);if(Array.isArray(t)){for(var e=[],n=0;n0?(i=0,n.textAlign="left"):"right"==t.textAlign?(i=e.width-1,n.textAlign="right"):(i=e.width/2,n.textAlign="center"),n.fillText(e.text,i,o)}},t.prototype.moveCanvasDrawing=function(t){var e=this.canvas.getContext("2d");e.translate(t.width,0)},t.prototype.restoreCanvas=function(){var t=this.canvas.getContext("2d");t.restore()},t}();e["default"]=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){switch(t){case"canvas":return a["default"];case"svg":return u["default"];default:throw new Error("Invalid rederer")}}Object.defineProperty(e,"__esModule",{value:!0}),e.getRendererClass=void 0;var o=n(12),a=r(o),s=n(14),u=r(s);e.getRendererClass=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){var r=document.createElementNS(c,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function a(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}function s(t,e,n,r,i){var o=document.createElementNS(c,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(0),f=r(u),d=n(3),c="http://www.w3.org/2000/svg",l=function(){function t(e,n,r){i(this,t),this.svg=e,this.encodings=n,this.options=r}return t.prototype.render=function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e0&&(s(a-e.width*o,r,e.width*o,e.height,t),o=0);o>0&&s(a-e.width*(o-1),r,e.width*o,e.height,t)},t.prototype.drawSVGText=function(t,e,n){var r=document.createElementNS(c,"text");if(e.displayValue){var i,o;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(i=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=n.width-1,r.setAttribute("text-anchor","end")):(i=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",i),r.setAttribute("y",o),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}},t.prototype.setSvgAttributes=function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",c),n.setAttribute("version","1.1"),n.style.transform="translate(0,0)",this.options.background&&(n.style.background=this.options.background)},t}();e["default"]=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){E.prototype[e]=E.prototype[e.toUpperCase()]=E.prototype[e.toLowerCase()]=function(n,r){var i=this;return i._errorHandler.wrapBarcodeCall(function(){var a=(0,c["default"])(i._options,r),s=t[e],u=o(n,s,a);return i._encodings.push(u),i})}}function o(t,e,n){t=""+t;var r=new e(t,n);if(!r.valid())throw new b.InvalidInputException(r.constructor.name,t);var i=r.encode();i=(0,h["default"])(i);for(var o=0;o0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&ee&&(e=t[n].height);return e}function f(t,e,n){var r;r="undefined"==typeof n?document.createElement("canvas").getContext("2d"):n,r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var i=r.measureText(t).width;return i}Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var d=n(0),c=r(d);e.getMaximumHeightOfEncodings=u,e.getEncodingHeight=i,e.getBarcodePadding=o,e.calculateEncodingAttributes=a,e.getTotalWidthOfEncodings=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9);e["default"]={ITF14:r.ITF14}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.api=e}return t.prototype.handleCatch=function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}},t.prototype.wrapBarcodeCall=function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}},t}();e["default"]=r},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if("string"==typeof t)return o(t);if(Array.isArray(t)){for(var e=[],n=0;n0?(i=0,n.textAlign="left"):"right"==t.textAlign?(i=e.width-1,n.textAlign="right"):(i=e.width/2,n.textAlign="center"),n.fillText(e.text,i,o)}},t.prototype.moveCanvasDrawing=function(t){var e=this.canvas.getContext("2d");e.translate(t.width,0)},t.prototype.restoreCanvas=function(){var t=this.canvas.getContext("2d");t.restore()},t}();e["default"]=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){switch(t){case"canvas":return a["default"];case"svg":return u["default"];default:throw new Error("Invalid rederer")}}Object.defineProperty(e,"__esModule",{value:!0}),e.getRendererClass=void 0;var o=n(12),a=r(o),s=n(14),u=r(s);e.getRendererClass=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){var r=document.createElementNS(c,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function a(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}function s(t,e,n,r,i){var o=document.createElementNS(c,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(0),f=r(u),d=n(3),c="http://www.w3.org/2000/svg",l=function(){function t(e,n,r){i(this,t),this.svg=e,this.encodings=n,this.options=r}return t.prototype.render=function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e0&&(s(a-e.width*o,r,e.width*o,e.height,t),o=0);o>0&&s(a-e.width*(o-1),r,e.width*o,e.height,t)},t.prototype.drawSVGText=function(t,e,n){var r=document.createElementNS(c,"text");if(e.displayValue){var i,o;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(i=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=n.width-1,r.setAttribute("text-anchor","end")):(i=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",i),r.setAttribute("y",o),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}},t.prototype.setSvgAttributes=function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",c),n.setAttribute("version","1.1"),n.style.transform="translate(0,0)",this.options.background&&(n.style.background=this.options.background)},t}();e["default"]=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){E.prototype[e]=E.prototype[e.toUpperCase()]=E.prototype[e.toLowerCase()]=function(n,r){var i=this;return i._errorHandler.wrapBarcodeCall(function(){var a=(0,c["default"])(i._options,r),s=t[e],u=o(n,s,a);return i._encodings.push(u),i})}}function o(t,e,n){t=""+t;var r=new e(t,n);if(!r.valid())throw new b.InvalidInputException(r.constructor.name,t);var i=r.encode();i=(0,h["default"])(i);for(var o=0;o0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&ee&&(e=t[n].height);return e}function f(t,e,n){var r;r="undefined"==typeof n?document.createElement("canvas").getContext("2d"):n,r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var i=r.measureText(t).width;return i}Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var d=n(0),c=r(d);e.getMaximumHeightOfEncodings=u,e.getEncodingHeight=i,e.getBarcodePadding=o,e.calculateEncodingAttributes=a,e.getTotalWidthOfEncodings=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9);e["default"]={ITF:r.ITF}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.api=e}return t.prototype.handleCatch=function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}},t.prototype.wrapBarcodeCall=function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}},t}();e["default"]=r},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if("string"==typeof t)return o(t);if(Array.isArray(t)){for(var e=[],n=0;n0?(i=0,n.textAlign="left"):"right"==t.textAlign?(i=e.width-1,n.textAlign="right"):(i=e.width/2,n.textAlign="center"),n.fillText(e.text,i,o)}},t.prototype.moveCanvasDrawing=function(t){var e=this.canvas.getContext("2d");e.translate(t.width,0)},t.prototype.restoreCanvas=function(){var t=this.canvas.getContext("2d");t.restore()},t}();e["default"]=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){switch(t){case"canvas":return a["default"];case"svg":return u["default"];default:throw new Error("Invalid rederer")}}Object.defineProperty(e,"__esModule",{value:!0}),e.getRendererClass=void 0;var o=n(12),a=r(o),s=n(14),u=r(s);e.getRendererClass=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){var r=document.createElementNS(c,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function a(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}function s(t,e,n,r,i){var o=document.createElementNS(c,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(0),f=r(u),d=n(3),c="http://www.w3.org/2000/svg",l=function(){function t(e,n,r){i(this,t),this.svg=e,this.encodings=n,this.options=r}return t.prototype.render=function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e0&&(s(a-e.width*o,r,e.width*o,e.height,t),o=0);o>0&&s(a-e.width*(o-1),r,e.width*o,e.height,t)},t.prototype.drawSVGText=function(t,e,n){var r=document.createElementNS(c,"text");if(e.displayValue){var i,o;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(i=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=n.width-1,r.setAttribute("text-anchor","end")):(i=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",i),r.setAttribute("y",o),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}},t.prototype.setSvgAttributes=function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",c),n.setAttribute("version","1.1"),n.style.transform="translate(0,0)",this.options.background&&(n.style.background=this.options.background)},t}();e["default"]=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){E.prototype[e]=E.prototype[e.toUpperCase()]=E.prototype[e.toLowerCase()]=function(n,r){var i=this;return i._errorHandler.wrapBarcodeCall(function(){var a=(0,c["default"])(i._options,r),s=t[e],u=o(n,s,a);return i._encodings.push(u),i})}}function o(t,e,n){t=""+t;var r=new e(t,n);if(!r.valid())throw new b.InvalidInputException(r.constructor.name,t);var i=r.encode();i=(0,h["default"])(i);for(var o=0;o0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&ee&&(e=t[n].height);return e}function f(t,e,n){var r;r="undefined"==typeof n?document.createElement("canvas").getContext("2d"):n,r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var i=r.measureText(t).width;return i}Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var d=n(0),c=r(d);e.getMaximumHeightOfEncodings=u,e.getEncodingHeight=i,e.getBarcodePadding=o,e.calculateEncodingAttributes=a,e.getTotalWidthOfEncodings=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9);e["default"]={ITF:r.ITF}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.api=e}return t.prototype.handleCatch=function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}},t.prototype.wrapBarcodeCall=function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}},t}();e["default"]=r},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if("string"==typeof t)return o(t);if(Array.isArray(t)){for(var e=[],n=0;n0?(i=0,n.textAlign="left"):"right"==t.textAlign?(i=e.width-1,n.textAlign="right"):(i=e.width/2,n.textAlign="center"),n.fillText(e.text,i,o)}},t.prototype.moveCanvasDrawing=function(t){var e=this.canvas.getContext("2d");e.translate(t.width,0)},t.prototype.restoreCanvas=function(){var t=this.canvas.getContext("2d");t.restore()},t}();e["default"]=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){switch(t){case"canvas":return a["default"];case"svg":return u["default"];default:throw new Error("Invalid rederer")}}Object.defineProperty(e,"__esModule",{value:!0}),e.getRendererClass=void 0;var o=n(12),a=r(o),s=n(14),u=r(s);e.getRendererClass=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){var r=document.createElementNS(c,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function a(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}function s(t,e,n,r,i){var o=document.createElementNS(c,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(0),f=r(u),d=n(3),c="http://www.w3.org/2000/svg",l=function(){function t(e,n,r){i(this,t),this.svg=e,this.encodings=n,this.options=r}return t.prototype.render=function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e0&&(s(a-e.width*o,r,e.width*o,e.height,t),o=0);o>0&&s(a-e.width*(o-1),r,e.width*o,e.height,t)},t.prototype.drawSVGText=function(t,e,n){var r=document.createElementNS(c,"text");if(e.displayValue){var i,o;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(i=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=n.width-1,r.setAttribute("text-anchor","end")):(i=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",i),r.setAttribute("y",o),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}},t.prototype.setSvgAttributes=function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",c),n.setAttribute("version","1.1"),n.style.transform="translate(0,0)",this.options.background&&(n.style.background=this.options.background)},t}();e["default"]=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){E.prototype[e]=E.prototype[e.toUpperCase()]=E.prototype[e.toLowerCase()]=function(n,r){var i=this;return i._errorHandler.wrapBarcodeCall(function(){var a=(0,c["default"])(i._options,r),s=t[e],u=o(n,s,a);return i._encodings.push(u),i})}}function o(t,e,n){t=""+t;var r=new e(t,n);if(!r.valid())throw new b.InvalidInputException(r.constructor.name,t);var i=r.encode();i=(0,h["default"])(i);for(var o=0;o0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function i(t,e,n){if(n.displayValue&&ee&&(e=t[n].height);return e}function f(t,e,n){var r;r="undefined"==typeof n?document.createElement("canvas").getContext("2d"):n,r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var o=r.measureText(t).width;return o}Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var c=n(1),l=r(c);e.getMaximumHeightOfEncodings=u,e.getEncodingHeight=o,e.getBarcodePadding=i,e.calculateEncodingAttributes=a,e.getTotalWidthOfEncodings=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(15);e["default"]={MSI:r.MSI,MSI10:r.MSI10,MSI11:r.MSI11,MSI1010:r.MSI1010,MSI1110:r.MSI1110}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.api=e}return t.prototype.handleCatch=function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}},t.prototype.wrapBarcodeCall=function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}},t}();e["default"]=r},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){if("string"==typeof t)return i(t);if(Array.isArray(t)){for(var e=[],n=0;n0?(o=0,n.textAlign="left"):"right"==t.textAlign?(o=e.width-1,n.textAlign="right"):(o=e.width/2,n.textAlign="center"),n.fillText(e.text,o,i)}},t.prototype.moveCanvasDrawing=function(t){var e=this.canvas.getContext("2d");e.translate(t.width,0)},t.prototype.restoreCanvas=function(){var t=this.canvas.getContext("2d");t.restore()},t}();e["default"]=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){switch(t){case"canvas":return a["default"];case"svg":return u["default"];default:throw new Error("Invalid rederer")}}Object.defineProperty(e,"__esModule",{value:!0}),e.getRendererClass=void 0;var i=n(18),a=r(i),s=n(20),u=r(s);e.getRendererClass=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e,n){var r=document.createElementNS(l,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function a(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}function s(t,e,n,r,o){var i=document.createElementNS(l,"rect");i.setAttribute("x",t),i.setAttribute("y",e),i.setAttribute("width",n),i.setAttribute("height",r),o.appendChild(i)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(1),f=r(u),c=n(5),l="http://www.w3.org/2000/svg",d=function(){function t(e,n,r){o(this,t),this.svg=e,this.encodings=n,this.options=r}return t.prototype.render=function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e0&&(s(a-e.width*i,r,e.width*i,e.height,t),i=0);i>0&&s(a-e.width*(i-1),r,e.width*i,e.height,t)},t.prototype.drawSVGText=function(t,e,n){var r=document.createElementNS(l,"text");if(e.displayValue){var o,i;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),i="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(o=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(o=n.width-1,r.setAttribute("text-anchor","end")):(o=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",o),r.setAttribute("y",i),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}},t.prototype.setSvgAttributes=function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",l),n.setAttribute("version","1.1"),n.style.transform="translate(0,0)",this.options.background&&(n.style.background=this.options.background)},t}();e["default"]=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){M.prototype[e]=M.prototype[e.toUpperCase()]=M.prototype[e.toLowerCase()]=function(n,r){var o=this;return o._errorHandler.wrapBarcodeCall(function(){var a=(0,l["default"])(o._options,r),s=t[e],u=i(n,s,a);return o._encodings.push(u),o})}}function i(t,e,n){t=""+t;var r=new e(t,n);if(!r.valid())throw new w.InvalidInputException(r.constructor.name,t);var o=r.encode();o=(0,p["default"])(o);for(var i=0;i0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function i(t,e,n){if(n.displayValue&&ee&&(e=t[n].height);return e}function f(t,e,n){var r;r="undefined"==typeof n?document.createElement("canvas").getContext("2d"):n,r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var o=r.measureText(t).width;return o}Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var c=n(1),l=r(c);e.getMaximumHeightOfEncodings=u,e.getEncodingHeight=o,e.getBarcodePadding=i,e.calculateEncodingAttributes=a,e.getTotalWidthOfEncodings=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(15);e["default"]={MSI:r.MSI,MSI10:r.MSI10,MSI11:r.MSI11,MSI1010:r.MSI1010,MSI1110:r.MSI1110}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.api=e}return t.prototype.handleCatch=function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}},t.prototype.wrapBarcodeCall=function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}},t}();e["default"]=r},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){if("string"==typeof t)return i(t);if(Array.isArray(t)){for(var e=[],n=0;n0?(o=0,n.textAlign="left"):"right"==t.textAlign?(o=e.width-1,n.textAlign="right"):(o=e.width/2,n.textAlign="center"),n.fillText(e.text,o,i)}},t.prototype.moveCanvasDrawing=function(t){var e=this.canvas.getContext("2d");e.translate(t.width,0)},t.prototype.restoreCanvas=function(){var t=this.canvas.getContext("2d");t.restore()},t}();e["default"]=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){switch(t){case"canvas":return a["default"];case"svg":return u["default"];default:throw new Error("Invalid rederer")}}Object.defineProperty(e,"__esModule",{value:!0}),e.getRendererClass=void 0;var i=n(18),a=r(i),s=n(20),u=r(s);e.getRendererClass=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e,n){var r=document.createElementNS(l,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function a(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}function s(t,e,n,r,o){var i=document.createElementNS(l,"rect");i.setAttribute("x",t),i.setAttribute("y",e),i.setAttribute("width",n),i.setAttribute("height",r),o.appendChild(i)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(1),f=r(u),c=n(5),l="http://www.w3.org/2000/svg",d=function(){function t(e,n,r){o(this,t),this.svg=e,this.encodings=n,this.options=r}return t.prototype.render=function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e0&&(s(a-e.width*i,r,e.width*i,e.height,t),i=0);i>0&&s(a-e.width*(i-1),r,e.width*i,e.height,t)},t.prototype.drawSVGText=function(t,e,n){var r=document.createElementNS(l,"text");if(e.displayValue){var o,i;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),i="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(o=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(o=n.width-1,r.setAttribute("text-anchor","end")):(o=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",o),r.setAttribute("y",i),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}},t.prototype.setSvgAttributes=function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",l),n.setAttribute("version","1.1"),n.style.transform="translate(0,0)",this.options.background&&(n.style.background=this.options.background)},t}();e["default"]=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){M.prototype[e]=M.prototype[e.toUpperCase()]=M.prototype[e.toLowerCase()]=function(n,r){var o=this;return o._errorHandler.wrapBarcodeCall(function(){var a=(0,l["default"])(o._options,r),s=t[e],u=i(n,s,a);return o._encodings.push(u),o})}}function i(t,e,n){t=""+t;var r=new e(t,n);if(!r.valid())throw new w.InvalidInputException(r.constructor.name,t);var o=r.encode();o=(0,p["default"])(o);for(var i=0;i0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&ee&&(e=t[n].height);return e}function f(t,e,n){var r;r="undefined"==typeof n?document.createElement("canvas").getContext("2d"):n,r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var i=r.measureText(t).width;return i}Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var d=n(0),c=r(d);e.getMaximumHeightOfEncodings=u,e.getEncodingHeight=i,e.getBarcodePadding=o,e.calculateEncodingAttributes=a,e.getTotalWidthOfEncodings=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9);e["default"]={pharmacode:r.pharmacode}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.api=e}return t.prototype.handleCatch=function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}},t.prototype.wrapBarcodeCall=function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}},t}();e["default"]=r},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if("string"==typeof t)return o(t);if(Array.isArray(t)){for(var e=[],n=0;n=3&&this.number<=131070},t}();e.pharmacode=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){var e={};for(var n in u["default"])u["default"].hasOwnProperty(n)&&(t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(e[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(e[n]=t.getAttribute("data-"+n.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,a["default"])(e)}Object.defineProperty(e,"__esModule",{value:!0});var o=n(11),a=r(o),s=n(1),u=r(s);e["default"]=i},function(t,e){"use strict";function n(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&(n=e[n],"string"==typeof t[n]&&(t[n]=parseInt(t[n],10)));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=r(o),s=n(3),u=function(){function t(e,n,r){i(this,t),this.canvas=e,this.encodings=n,this.options=r}return t.prototype.render=function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t0?(i=0,n.textAlign="left"):"right"==t.textAlign?(i=e.width-1,n.textAlign="right"):(i=e.width/2,n.textAlign="center"),n.fillText(e.text,i,o)}},t.prototype.moveCanvasDrawing=function(t){var e=this.canvas.getContext("2d");e.translate(t.width,0)},t.prototype.restoreCanvas=function(){var t=this.canvas.getContext("2d");t.restore()},t}();e["default"]=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){switch(t){case"canvas":return a["default"];case"svg":return u["default"];default:throw new Error("Invalid rederer")}}Object.defineProperty(e,"__esModule",{value:!0}),e.getRendererClass=void 0;var o=n(12),a=r(o),s=n(14),u=r(s);e.getRendererClass=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){var r=document.createElementNS(c,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function a(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}function s(t,e,n,r,i){var o=document.createElementNS(c,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(0),f=r(u),d=n(3),c="http://www.w3.org/2000/svg",l=function(){function t(e,n,r){i(this,t),this.svg=e,this.encodings=n,this.options=r}return t.prototype.render=function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e0&&(s(a-e.width*o,r,e.width*o,e.height,t),o=0);o>0&&s(a-e.width*(o-1),r,e.width*o,e.height,t)},t.prototype.drawSVGText=function(t,e,n){var r=document.createElementNS(c,"text");if(e.displayValue){var i,o;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(i=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=n.width-1,r.setAttribute("text-anchor","end")):(i=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",i),r.setAttribute("y",o),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}},t.prototype.setSvgAttributes=function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",c),n.setAttribute("version","1.1"),n.style.transform="translate(0,0)",this.options.background&&(n.style.background=this.options.background)},t}();e["default"]=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){E.prototype[e]=E.prototype[e.toUpperCase()]=E.prototype[e.toLowerCase()]=function(n,r){var i=this;return i._errorHandler.wrapBarcodeCall(function(){var a=(0,c["default"])(i._options,r),s=t[e],u=o(n,s,a);return i._encodings.push(u),i})}}function o(t,e,n){t=""+t;var r=new e(t,n);if(!r.valid())throw new b.InvalidInputException(r.constructor.name,t);var i=r.encode();i=(0,h["default"])(i);for(var o=0;o0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&ee&&(e=t[n].height);return e}function f(t,e,n){var r;r="undefined"==typeof n?document.createElement("canvas").getContext("2d"):n,r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var i=r.measureText(t).width;return i}Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var d=n(0),c=r(d);e.getMaximumHeightOfEncodings=u,e.getEncodingHeight=i,e.getBarcodePadding=o,e.calculateEncodingAttributes=a,e.getTotalWidthOfEncodings=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9);e["default"]={pharmacode:r.pharmacode}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(e){n(this,t),this.api=e}return t.prototype.handleCatch=function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}},t.prototype.wrapBarcodeCall=function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}},t}();e["default"]=r},function(t,e){"use strict";function n(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if("string"==typeof t)return o(t);if(Array.isArray(t)){for(var e=[],n=0;n=3&&this.number<=131070},t}();e.pharmacode=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){var e={};for(var n in u["default"])u["default"].hasOwnProperty(n)&&(t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(e[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(e[n]=t.getAttribute("data-"+n.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,a["default"])(e)}Object.defineProperty(e,"__esModule",{value:!0});var o=n(11),a=r(o),s=n(1),u=r(s);e["default"]=i},function(t,e){"use strict";function n(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&(n=e[n],"string"==typeof t[n]&&(t[n]=parseInt(t[n],10)));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),a=r(o),s=n(3),u=function(){function t(e,n,r){i(this,t),this.canvas=e,this.encodings=n,this.options=r}return t.prototype.render=function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t0?(i=0,n.textAlign="left"):"right"==t.textAlign?(i=e.width-1,n.textAlign="right"):(i=e.width/2,n.textAlign="center"),n.fillText(e.text,i,o)}},t.prototype.moveCanvasDrawing=function(t){var e=this.canvas.getContext("2d");e.translate(t.width,0)},t.prototype.restoreCanvas=function(){var t=this.canvas.getContext("2d");t.restore()},t}();e["default"]=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){switch(t){case"canvas":return a["default"];case"svg":return u["default"];default:throw new Error("Invalid rederer")}}Object.defineProperty(e,"__esModule",{value:!0}),e.getRendererClass=void 0;var o=n(12),a=r(o),s=n(14),u=r(s);e.getRendererClass=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e,n){var r=document.createElementNS(c,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}function a(t,e){t.setAttribute("style","fill:"+e.lineColor+";")}function s(t,e,n,r,i){var o=document.createElementNS(c,"rect");o.setAttribute("x",t),o.setAttribute("y",e),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o)}Object.defineProperty(e,"__esModule",{value:!0});var u=n(0),f=r(u),d=n(3),c="http://www.w3.org/2000/svg",l=function(){function t(e,n,r){i(this,t),this.svg=e,this.encodings=n,this.options=r}return t.prototype.render=function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e0&&(s(a-e.width*o,r,e.width*o,e.height,t),o=0);o>0&&s(a-e.width*(o-1),r,e.width*o,e.height,t)},t.prototype.drawSVGText=function(t,e,n){var r=document.createElementNS(c,"text");if(e.displayValue){var i,o;r.setAttribute("style","font:"+e.fontOptions+" "+e.fontSize+"px "+e.font),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(i=0,r.setAttribute("text-anchor","start")):"right"==e.textAlign?(i=n.width-1,r.setAttribute("text-anchor","end")):(i=n.width/2,r.setAttribute("text-anchor","middle")),r.setAttribute("x",i),r.setAttribute("y",o),r.appendChild(document.createTextNode(n.text)),t.appendChild(r)}},t.prototype.setSvgAttributes=function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",c),n.setAttribute("version","1.1"),n.style.transform="translate(0,0)",this.options.background&&(n.style.background=this.options.background)},t}();e["default"]=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){E.prototype[e]=E.prototype[e.toUpperCase()]=E.prototype[e.toLowerCase()]=function(n,r){var i=this;return i._errorHandler.wrapBarcodeCall(function(){var a=(0,c["default"])(i._options,r),s=t[e],u=o(n,s,a);return i._encodings.push(u),i})}}function o(t,e,n){t=""+t;var r=new e(t,n);if(!r.valid())throw new b.InvalidInputException(r.constructor.name,t);var i=r.encode();i=(0,h["default"])(i);for(var o=0;o