@worm-vue3-print/core 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +39 -7
- package/dist/browser/index.cjs +3686 -0
- package/dist/browser/index.d.cts +96 -0
- package/dist/browser/index.d.ts +96 -0
- package/dist/browser/index.js +325 -0
- package/dist/chunk-V4A5623C.js +31 -0
- package/dist/chunk-VFEURLAZ.js +3579 -0
- package/dist/designer/index.cjs +2641 -0
- package/dist/designer/index.d.cts +448 -0
- package/dist/designer/index.d.ts +448 -0
- package/dist/designer/index.js +1710 -0
- package/dist/dom-executor.iife.global.js +8 -0
- package/dist/driver-CsWkGK4a.d.cts +932 -0
- package/dist/driver-CsWkGK4a.d.ts +932 -0
- package/dist/index.cjs +1935 -120
- package/dist/index.d.cts +354 -185
- package/dist/index.d.ts +354 -185
- package/dist/index.js +197 -1765
- package/dist/node/index.cjs +41 -0
- package/dist/node/index.d.cts +6 -0
- package/dist/node/index.d.ts +6 -0
- package/dist/node/index.js +10 -0
- package/dist/ports-B63x7kCX.d.ts +102 -0
- package/dist/ports-q934kIC7.d.cts +102 -0
- package/package.json +26 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";var __wormDomBundle=(()=>{var wo=Object.create;var Lr=Object.defineProperty;var Oo=Object.getOwnPropertyDescriptor;var So=Object.getOwnPropertyNames;var xo=Object.getPrototypeOf,To=Object.prototype.hasOwnProperty;var c=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ao=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of So(e))!To.call(t,i)&&i!==r&&Lr(t,i,{get:()=>e[i],enumerable:!(n=Oo(e,i))||n.enumerable});return t};var Nr=(t,e,r)=>(r=t!=null?wo(xo(t)):{},Ao(e||!t||!t.__esModule?Lr(r,"default",{value:t,enumerable:!0}):r,t));var y=c(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});function Mo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Ro=function t(e,r){Mo(this,t),this.data=e,this.text=r.text||e,this.options=r};Ze.default=Ro});var qr=c(Te=>{"use strict";Object.defineProperty(Te,"__esModule",{value:!0});Te.CODE39=void 0;var Po=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),Io=y(),Bo=Co(Io);function Co(t){return t&&t.__esModule?t:{default:t}}function Lo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function No(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Do(t,e){if(typeof e!="function"&&e!==null)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)}var ko=(function(t){Do(e,t);function e(r,n){return Lo(this,e),r=r.toUpperCase(),n.mod43&&(r+=jo(Uo(r))),No(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return Po(e,[{key:"encode",value:function(){for(var n=et("*"),i=0;i<this.data.length;i++)n+=et(this.data[i])+"0";return n+=et("*"),{data:n,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),e})(Bo.default),Dr=["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","-","."," ","$","/","+","%","*"],qo=[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];function et(t){return Fo(kr(t))}function Fo(t){return qo[t].toString(2)}function jo(t){return Dr[t]}function kr(t){return Dr.indexOf(t)}function Uo(t){for(var e=0,r=0;r<t.length;r++)e+=kr(t[r]);return e=e%43,e}Te.CODE39=ko});var V=c(p=>{"use strict";Object.defineProperty(p,"__esModule",{value:!0});var ue;function tt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Fr=p.SET_A=0,jr=p.SET_B=1,Ur=p.SET_C=2,U1=p.SHIFT=98,Ho=p.START_A=103,zo=p.START_B=104,Go=p.START_C=105,H1=p.MODULO=103,z1=p.STOP=106,G1=p.FNC1=207,V1=p.SET_BY_CODE=(ue={},tt(ue,Ho,Fr),tt(ue,zo,jr),tt(ue,Go,Ur),ue),$1=p.SWAP={101:Fr,100:jr,99:Ur},X1=p.A_START_CHAR="\xD0",K1=p.B_START_CHAR="\xD1",Y1=p.C_START_CHAR="\xD2",W1=p.A_CHARS="[\0-_\xC8-\xCF]",J1=p.B_CHARS="[ -\x7F\xC8-\xCF]",Q1=p.C_CHARS="(\xCF*[0-9]{2}\xCF*)",Z1=p.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011]});var ae=c(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});var Vo=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),$o=y(),Xo=Ko($o),E=V();function Ko(t){return t&&t.__esModule?t:{default:t}}function Yo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wo(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Jo(t,e){if(typeof e!="function"&&e!==null)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)}var Qo=(function(t){Jo(e,t);function e(r,n){Yo(this,e);var i=Wo(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r.substring(1),n));return i.bytes=r.split("").map(function(o){return o.charCodeAt(0)}),i}return Vo(e,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var n=this.bytes,i=n.shift()-105,o=E.SET_BY_CODE[i];if(o===void 0)throw new RangeError("The encoding does not start with a start character.");this.shouldEncodeAsEan128()===!0&&n.unshift(E.FNC1);var u=e.next(n,1,o);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:e.getBar(i)+u.result+e.getBar((u.checksum+i)%E.MODULO)+e.getBar(E.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var n=this.options.ean128||!1;return typeof n=="string"&&(n=n.toLowerCase()==="true"),n}}],[{key:"getBar",value:function(n){return E.BARS[n]?E.BARS[n].toString():""}},{key:"correctIndex",value:function(n,i){if(i===E.SET_A){var o=n.shift();return o<32?o+64:o-32}else return i===E.SET_B?n.shift()-32:(n.shift()-48)*10+n.shift()-48}},{key:"next",value:function(n,i,o){if(!n.length)return{result:"",checksum:0};var u=void 0,a=void 0;if(n[0]>=200){a=n.shift()-105;var f=E.SWAP[a];f!==void 0?u=e.next(n,i+1,f):((o===E.SET_A||o===E.SET_B)&&a===E.SHIFT&&(n[0]=o===E.SET_A?n[0]>95?n[0]-96:n[0]:n[0]<32?n[0]+96:n[0]),u=e.next(n,i+1,o))}else a=e.correctIndex(n,o),u=e.next(n,i+1,o);var l=e.getBar(a),s=a*i;return{result:l+u.result,checksum:s+u.checksum}}}]),e})(Xo.default);rt.default=Qo});var $r=c(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});var B=V(),Hr=function(e){return e.match(new RegExp("^"+B.A_CHARS+"*"))[0].length},zr=function(e){return e.match(new RegExp("^"+B.B_CHARS+"*"))[0].length},Gr=function(e){return e.match(new RegExp("^"+B.C_CHARS+"*"))[0]};function nt(t,e){var r=e?B.A_CHARS:B.B_CHARS,n=t.match(new RegExp("^("+r+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(n)return n[1]+"\xCC"+Vr(t.substring(n[1].length));var i=t.match(new RegExp("^"+r+"+"))[0];return i.length===t.length?t:i+String.fromCharCode(e?205:206)+nt(t.substring(i.length),!e)}function Vr(t){var e=Gr(t),r=e.length;if(r===t.length)return t;t=t.substring(r);var n=Hr(t)>=zr(t);return e+String.fromCharCode(n?206:205)+nt(t,n)}it.default=function(t){var e=void 0,r=Gr(t).length;if(r>=2)e=B.C_START_CHAR+Vr(t);else{var n=Hr(t)>zr(t);e=(n?B.A_START_CHAR:B.B_START_CHAR)+nt(t,n)}return e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(i,o){return"\xCB"+o})}});var Kr=c(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});var Zo=ae(),eu=Xr(Zo),tu=$r(),ru=Xr(tu);function Xr(t){return t&&t.__esModule?t:{default:t}}function nu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ot(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function iu(t,e){if(typeof e!="function"&&e!==null)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)}var ou=(function(t){iu(e,t);function e(r,n){if(nu(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(r))var i=ot(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,ru.default)(r),n));else var i=ot(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n));return ot(i)}return e})(eu.default);ut.default=ou});var Wr=c(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});var uu=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),au=ae(),fu=cu(au),Yr=V();function cu(t){return t&&t.__esModule?t:{default:t}}function lu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function su(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function du(t,e){if(typeof e!="function"&&e!==null)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)}var hu=(function(t){du(e,t);function e(r,n){return lu(this,e),su(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,Yr.A_START_CHAR+r,n))}return uu(e,[{key:"valid",value:function(){return new RegExp("^"+Yr.A_CHARS+"+$").test(this.data)}}]),e})(fu.default);at.default=hu});var Qr=c(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});var gu=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),_u=ae(),pu=vu(_u),Jr=V();function vu(t){return t&&t.__esModule?t:{default:t}}function yu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mu(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Eu(t,e){if(typeof e!="function"&&e!==null)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)}var bu=(function(t){Eu(e,t);function e(r,n){return yu(this,e),mu(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,Jr.B_START_CHAR+r,n))}return gu(e,[{key:"valid",value:function(){return new RegExp("^"+Jr.B_CHARS+"+$").test(this.data)}}]),e})(pu.default);ft.default=bu});var en=c(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});var wu=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),Ou=ae(),Su=xu(Ou),Zr=V();function xu(t){return t&&t.__esModule?t:{default:t}}function Tu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Au(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Mu(t,e){if(typeof e!="function"&&e!==null)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)}var Ru=(function(t){Mu(e,t);function e(r,n){return Tu(this,e),Au(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,Zr.C_START_CHAR+r,n))}return wu(e,[{key:"valid",value:function(){return new RegExp("^"+Zr.C_CHARS+"+$").test(this.data)}}]),e})(Su.default);ct.default=Ru});var tn=c(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0});x.CODE128C=x.CODE128B=x.CODE128A=x.CODE128=void 0;var Pu=Kr(),Iu=Ae(Pu),Bu=Wr(),Cu=Ae(Bu),Lu=Qr(),Nu=Ae(Lu),Du=en(),ku=Ae(Du);function Ae(t){return t&&t.__esModule?t:{default:t}}x.CODE128=Iu.default;x.CODE128A=Cu.default;x.CODE128B=Nu.default;x.CODE128C=ku.default});var $=c(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});var fs=C.SIDE_BIN="101",cs=C.MIDDLE_BIN="01010",ls=C.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},ss=C.EAN2_STRUCTURE=["LL","LG","GL","GG"],ds=C.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],hs=C.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]});var X=c(lt=>{"use strict";Object.defineProperty(lt,"__esModule",{value:!0});var qu=$(),Fu=function(e,r,n){var i=e.split("").map(function(u,a){return qu.BINARIES[r[a]]}).map(function(u,a){return u?u[e[a]]:""});if(n){var o=e.length-1;i=i.map(function(u,a){return a<o?u+n:u})}return i.join("")};lt.default=Fu});var dt=c(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});var ju=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),K=$(),Uu=X(),rn=nn(Uu),Hu=y(),zu=nn(Hu);function nn(t){return t&&t.__esModule?t:{default:t}}function Gu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vu(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function $u(t,e){if(typeof e!="function"&&e!==null)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)}var Xu=(function(t){$u(e,t);function e(r,n){Gu(this,e);var i=Vu(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n));return i.fontSize=!n.flat&&n.fontSize>n.width*10?n.width*10:n.fontSize,i.guardHeight=n.height+i.fontSize/2+n.textMargin,i}return ju(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(n,i){return this.text.substr(n,i)}},{key:"leftEncode",value:function(n,i){return(0,rn.default)(n,i)}},{key:"rightText",value:function(n,i){return this.text.substr(n,i)}},{key:"rightEncode",value:function(n,i){return(0,rn.default)(n,i)}},{key:"encodeGuarded",value:function(){var n={fontSize:this.fontSize},i={height:this.guardHeight};return[{data:K.SIDE_BIN,options:i},{data:this.leftEncode(),text:this.leftText(),options:n},{data:K.MIDDLE_BIN,options:i},{data:this.rightEncode(),text:this.rightText(),options:n},{data:K.SIDE_BIN,options:i}]}},{key:"encodeFlat",value:function(){var n=[K.SIDE_BIN,this.leftEncode(),K.MIDDLE_BIN,this.rightEncode(),K.SIDE_BIN];return{data:n.join(""),text:this.text}}}]),e})(zu.default);st.default=Xu});var un=c(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});var Ku=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),fe=function t(e,r,n){e===null&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,r);if(i===void 0){var o=Object.getPrototypeOf(e);return o===null?void 0:t(o,r,n)}else{if("value"in i)return i.value;var u=i.get;return u===void 0?void 0:u.call(n)}},Yu=$(),Wu=dt(),Ju=Qu(Wu);function Qu(t){return t&&t.__esModule?t:{default:t}}function Zu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ea(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ta(t,e){if(typeof e!="function"&&e!==null)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)}var on=function(e){var r=e.substr(0,12).split("").map(function(n){return+n}).reduce(function(n,i,o){return o%2?n+i*3:n+i},0);return(10-r%10)%10},ra=(function(t){ta(e,t);function e(r,n){Zu(this,e),r.search(/^[0-9]{12}$/)!==-1&&(r+=on(r));var i=ea(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n));return i.lastChar=n.lastChar,i}return Ku(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===on(this.data)}},{key:"leftText",value:function(){return fe(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var n=this.data.substr(1,6),i=Yu.EAN13_STRUCTURE[this.data[0]];return fe(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,n,i)}},{key:"rightText",value:function(){return fe(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var n=this.data.substr(7,6);return fe(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,n,"RRRRRR")}},{key:"encodeGuarded",value:function(){var n=fe(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(n.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(n.push({data:"00"}),n.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),n}}]),e})(Ju.default);ht.default=ra});var fn=c(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});var na=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),Me=function t(e,r,n){e===null&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,r);if(i===void 0){var o=Object.getPrototypeOf(e);return o===null?void 0:t(o,r,n)}else{if("value"in i)return i.value;var u=i.get;return u===void 0?void 0:u.call(n)}},ia=dt(),oa=ua(ia);function ua(t){return t&&t.__esModule?t:{default:t}}function aa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fa(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ca(t,e){if(typeof e!="function"&&e!==null)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)}var an=function(e){var r=e.substr(0,7).split("").map(function(n){return+n}).reduce(function(n,i,o){return o%2?n+i:n+i*3},0);return(10-r%10)%10},la=(function(t){ca(e,t);function e(r,n){return aa(this,e),r.search(/^[0-9]{7}$/)!==-1&&(r+=an(r)),fa(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return na(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===an(this.data)}},{key:"leftText",value:function(){return Me(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var n=this.data.substr(0,4);return Me(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,n,"LLLL")}},{key:"rightText",value:function(){return Me(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var n=this.data.substr(4,4);return Me(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,n,"RRRR")}}]),e})(oa.default);gt.default=la});var ln=c(_t=>{"use strict";Object.defineProperty(_t,"__esModule",{value:!0});var sa=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),da=$(),ha=X(),ga=cn(ha),_a=y(),pa=cn(_a);function cn(t){return t&&t.__esModule?t:{default:t}}function va(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ya(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function ma(t,e){if(typeof e!="function"&&e!==null)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)}var Ea=function(e){var r=e.split("").map(function(n){return+n}).reduce(function(n,i,o){return o%2?n+i*9:n+i*3},0);return r%10},ba=(function(t){ma(e,t);function e(r,n){return va(this,e),ya(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return sa(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:"encode",value:function(){var n=da.EAN5_STRUCTURE[Ea(this.data)];return{data:"1011"+(0,ga.default)(this.data,n,"01"),text:this.text}}}]),e})(pa.default);_t.default=ba});var dn=c(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});var wa=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),Oa=$(),Sa=X(),xa=sn(Sa),Ta=y(),Aa=sn(Ta);function sn(t){return t&&t.__esModule?t:{default:t}}function Ma(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ra(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Pa(t,e){if(typeof e!="function"&&e!==null)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)}var Ia=(function(t){Pa(e,t);function e(r,n){return Ma(this,e),Ra(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return wa(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:"encode",value:function(){var n=Oa.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,xa.default)(this.data,n,"01"),text:this.text}}}]),e})(Aa.default);pt.default=Ia});var yt=c(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});var Ba=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})();Re.checksum=vt;var Ca=X(),Y=hn(Ca),La=y(),Na=hn(La);function hn(t){return t&&t.__esModule?t:{default:t}}function Da(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ka(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function qa(t,e){if(typeof e!="function"&&e!==null)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)}var Fa=(function(t){qa(e,t);function e(r,n){Da(this,e),r.search(/^[0-9]{11}$/)!==-1&&(r+=vt(r));var i=ka(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n));return i.displayValue=n.displayValue,n.fontSize>n.width*10?i.fontSize=n.width*10:i.fontSize=n.fontSize,i.guardHeight=n.height+i.fontSize/2+n.textMargin,i}return Ba(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==vt(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var n="";return n+="101",n+=(0,Y.default)(this.data.substr(0,6),"LLLLLL"),n+="01010",n+=(0,Y.default)(this.data.substr(6,6),"RRRRRR"),n+="101",{data:n,text:this.text}}},{key:"guardedEncoding",value:function(){var n=[];return this.displayValue&&n.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),n.push({data:"101"+(0,Y.default)(this.data[0],"L"),options:{height:this.guardHeight}}),n.push({data:(0,Y.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),n.push({data:"01010",options:{height:this.guardHeight}}),n.push({data:(0,Y.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),n.push({data:(0,Y.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&n.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),n}}]),e})(Na.default);function vt(t){var e=0,r;for(r=1;r<11;r+=2)e+=parseInt(t[r]);for(r=0;r<11;r+=2)e+=parseInt(t[r])*3;return(10-e%10)%10}Re.default=Fa});var pn=c(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});var ja=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),Ua=X(),Ha=_n(Ua),za=y(),Ga=_n(za),Va=yt();function _n(t){return t&&t.__esModule?t:{default:t}}function $a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Xa(t,e){if(typeof e!="function"&&e!==null)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)}var Ka=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],Ya=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],Wa=(function(t){Xa(e,t);function e(r,n){$a(this,e);var i=mt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n));if(i.isValid=!1,r.search(/^[0-9]{6}$/)!==-1)i.middleDigits=r,i.upcA=gn(r,"0"),i.text=n.text||""+i.upcA[0]+r+i.upcA[i.upcA.length-1],i.isValid=!0;else if(r.search(/^[01][0-9]{7}$/)!==-1)if(i.middleDigits=r.substring(1,r.length-1),i.upcA=gn(i.middleDigits,r[0]),i.upcA[i.upcA.length-1]===r[r.length-1])i.isValid=!0;else return mt(i);else return mt(i);return i.displayValue=n.displayValue,n.fontSize>n.width*10?i.fontSize=n.width*10:i.fontSize=n.fontSize,i.guardHeight=n.height+i.fontSize/2+n.textMargin,i}return ja(e,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var n="";return n+="101",n+=this.encodeMiddleDigits(),n+="010101",{data:n,text:this.text}}},{key:"guardedEncoding",value:function(){var n=[];return this.displayValue&&n.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),n.push({data:"101",options:{height:this.guardHeight}}),n.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),n.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&n.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),n}},{key:"encodeMiddleDigits",value:function(){var n=this.upcA[0],i=this.upcA[this.upcA.length-1],o=Ya[parseInt(i)][parseInt(n)];return(0,Ha.default)(this.middleDigits,o)}}]),e})(Ga.default);function gn(t,e){for(var r=parseInt(t[t.length-1]),n=Ka[r],i="",o=0,u=0;u<n.length;u++){var a=n[u];a==="X"?i+=t[o++]:i+=a}return i=""+e+i,""+i+(0,Va.checksum)(i)}Et.default=Wa});var vn=c(m=>{"use strict";Object.defineProperty(m,"__esModule",{value:!0});m.UPCE=m.UPC=m.EAN2=m.EAN5=m.EAN8=m.EAN13=void 0;var Ja=un(),Qa=W(Ja),Za=fn(),ef=W(Za),tf=ln(),rf=W(tf),nf=dn(),of=W(nf),uf=yt(),af=W(uf),ff=pn(),cf=W(ff);function W(t){return t&&t.__esModule?t:{default:t}}m.EAN13=Qa.default;m.EAN8=ef.default;m.EAN5=rf.default;m.EAN2=of.default;m.UPC=af.default;m.UPCE=cf.default});var yn=c(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});var Ss=ce.START_BIN="1010",xs=ce.END_BIN="11101",Ts=ce.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]});var wt=c(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});var lf=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),Pe=yn(),sf=y(),df=hf(sf);function hf(t){return t&&t.__esModule?t:{default:t}}function gf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _f(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function pf(t,e){if(typeof e!="function"&&e!==null)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)}var vf=(function(t){pf(e,t);function e(){return gf(this,e),_f(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return lf(e,[{key:"valid",value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:"encode",value:function(){var n=this,i=this.data.match(/.{2}/g).map(function(o){return n.encodePair(o)}).join("");return{data:Pe.START_BIN+i+Pe.END_BIN,text:this.text}}},{key:"encodePair",value:function(n){var i=Pe.BINARIES[n[1]];return Pe.BINARIES[n[0]].split("").map(function(o,u){return(o==="1"?"111":"1")+(i[u]==="1"?"000":"0")}).join("")}}]),e})(df.default);bt.default=vf});var En=c(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});var yf=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),mf=wt(),Ef=bf(mf);function bf(t){return t&&t.__esModule?t:{default:t}}function wf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Of(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Sf(t,e){if(typeof e!="function"&&e!==null)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)}var mn=function(e){var r=e.substr(0,13).split("").map(function(n){return parseInt(n,10)}).reduce(function(n,i,o){return n+i*(3-o%2*2)},0);return Math.ceil(r/10)*10-r},xf=(function(t){Sf(e,t);function e(r,n){return wf(this,e),r.search(/^[0-9]{13}$/)!==-1&&(r+=mn(r)),Of(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return yf(e,[{key:"valid",value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===mn(this.data)}}]),e})(Ef.default);Ot.default=xf});var wn=c(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.ITF14=J.ITF=void 0;var Tf=wt(),Af=bn(Tf),Mf=En(),Rf=bn(Mf);function bn(t){return t&&t.__esModule?t:{default:t}}J.ITF=Af.default;J.ITF14=Rf.default});var Q=c(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});var Pf=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),If=y(),Bf=Cf(If);function Cf(t){return t&&t.__esModule?t:{default:t}}function Lf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nf(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Df(t,e){if(typeof e!="function"&&e!==null)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)}var kf=(function(t){Df(e,t);function e(r,n){return Lf(this,e),Nf(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return Pf(e,[{key:"encode",value:function(){for(var n="110",i=0;i<this.data.length;i++){var o=parseInt(this.data[i]),u=o.toString(2);u=qf(u,4-u.length);for(var a=0;a<u.length;a++)n+=u[a]=="0"?"100":"110"}return n+="1001",{data:n,text:this.text}}},{key:"valid",value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),e})(Bf.default);function qf(t,e){for(var r=0;r<e;r++)t="0"+t;return t}St.default=kf});var le=c(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.mod10=Ff;Ie.mod11=jf;function Ff(t){for(var e=0,r=0;r<t.length;r++){var n=parseInt(t[r]);(r+t.length)%2===0?e+=n:e+=n*2%10+Math.floor(n*2/10)}return(10-e%10)%10}function jf(t){for(var e=0,r=[2,3,4,5,6,7],n=0;n<t.length;n++){var i=parseInt(t[t.length-1-n]);e+=r[n%r.length]*i}return(11-e%11)%11}});var On=c(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});var Uf=Q(),Hf=Gf(Uf),zf=le();function Gf(t){return t&&t.__esModule?t:{default:t}}function Vf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $f(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Xf(t,e){if(typeof e!="function"&&e!==null)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)}var Kf=(function(t){Xf(e,t);function e(r,n){return Vf(this,e),$f(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r+(0,zf.mod10)(r),n))}return e})(Hf.default);xt.default=Kf});var Sn=c(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});var Yf=Q(),Wf=Qf(Yf),Jf=le();function Qf(t){return t&&t.__esModule?t:{default:t}}function Zf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ec(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function tc(t,e){if(typeof e!="function"&&e!==null)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)}var rc=(function(t){tc(e,t);function e(r,n){return Zf(this,e),ec(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r+(0,Jf.mod11)(r),n))}return e})(Wf.default);Tt.default=rc});var Tn=c(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});var nc=Q(),ic=oc(nc),xn=le();function oc(t){return t&&t.__esModule?t:{default:t}}function uc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ac(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function fc(t,e){if(typeof e!="function"&&e!==null)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)}var cc=(function(t){fc(e,t);function e(r,n){return uc(this,e),r+=(0,xn.mod10)(r),r+=(0,xn.mod10)(r),ac(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return e})(ic.default);At.default=cc});var Mn=c(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});var lc=Q(),sc=dc(lc),An=le();function dc(t){return t&&t.__esModule?t:{default:t}}function hc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gc(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function _c(t,e){if(typeof e!="function"&&e!==null)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)}var pc=(function(t){_c(e,t);function e(r,n){return hc(this,e),r+=(0,An.mod11)(r),r+=(0,An.mod10)(r),gc(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return e})(sc.default);Mt.default=pc});var Rn=c(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.MSI1110=b.MSI1010=b.MSI11=b.MSI10=b.MSI=void 0;var vc=Q(),yc=se(vc),mc=On(),Ec=se(mc),bc=Sn(),wc=se(bc),Oc=Tn(),Sc=se(Oc),xc=Mn(),Tc=se(xc);function se(t){return t&&t.__esModule?t:{default:t}}b.MSI=yc.default;b.MSI10=Ec.default;b.MSI11=wc.default;b.MSI1010=Sc.default;b.MSI1110=Tc.default});var Pn=c(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.pharmacode=void 0;var Ac=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),Mc=y(),Rc=Pc(Mc);function Pc(t){return t&&t.__esModule?t:{default:t}}function Ic(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bc(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Cc(t,e){if(typeof e!="function"&&e!==null)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)}var Lc=(function(t){Cc(e,t);function e(r,n){Ic(this,e);var i=Bc(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n));return i.number=parseInt(r,10),i}return Ac(e,[{key:"encode",value:function(){for(var n=this.number,i="";!isNaN(n)&&n!=0;)n%2===0?(i="11100"+i,n=(n-2)/2):(i="100"+i,n=(n-1)/2);return i=i.slice(0,-2),{data:i,text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),e})(Rc.default);Be.pharmacode=Lc});var In=c(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.codabar=void 0;var Nc=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),Dc=y(),kc=qc(Dc);function qc(t){return t&&t.__esModule?t:{default:t}}function Fc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jc(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Uc(t,e){if(typeof e!="function"&&e!==null)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)}var Hc=(function(t){Uc(e,t);function e(r,n){Fc(this,e),r.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(r="A"+r+"A");var i=jc(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r.toUpperCase(),n));return i.text=i.options.text||i.text.replace(/[A-D]/g,""),i}return Nc(e,[{key:"valid",value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:"encode",value:function(){for(var n=[],i=this.getEncodings(),o=0;o<this.data.length;o++)n.push(i[this.data.charAt(o)]),o!==this.data.length-1&&n.push("0");return{text:this.text,data:n.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),e})(kc.default);Ce.codabar=Hc});var Bn=c(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});var js=de.SYMBOLS=["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","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","\xFF"],Us=de.BINARIES=["100010100","101001000","101000100","101000010","100101000","100100100","100100010","101010000","100010010","100001010","110101000","110100100","110100010","110010100","110010010","110001010","101101000","101100100","101100010","100110100","100011010","101011000","101001100","101000110","100101100","100010110","110110100","110110010","110101100","110100110","110010110","110011010","101101100","101100110","100110110","100111010","100101110","111010100","111010010","111001010","101101110","101110110","110101110","100100110","111011010","111010110","100110010","101011110"],Hs=de.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"\x07":["($)","G"],"\b":["($)","H"]," ":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"\x1B":["(%)","A"],"":["(%)","B"],"":["(%)","C"],"":["(%)","D"],"":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"\x7F":["(%)","T"]}});var Pt=c(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});var zc=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),Le=Bn(),Gc=y(),Vc=$c(Gc);function $c(t){return t&&t.__esModule?t:{default:t}}function Xc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kc(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Yc(t,e){if(typeof e!="function"&&e!==null)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)}var Wc=(function(t){Yc(e,t);function e(r,n){return Xc(this,e),Kc(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return zc(e,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var n=this.data.split("").flatMap(function(a){return Le.MULTI_SYMBOLS[a]||a}),i=n.map(function(a){return e.getEncoding(a)}).join(""),o=e.checksum(n,20),u=e.checksum(n.concat(o),15);return{text:this.text,data:e.getEncoding("\xFF")+i+e.getEncoding(o)+e.getEncoding(u)+e.getEncoding("\xFF")+"1"}}}],[{key:"getEncoding",value:function(n){return Le.BINARIES[e.symbolValue(n)]}},{key:"getSymbol",value:function(n){return Le.SYMBOLS[n]}},{key:"symbolValue",value:function(n){return Le.SYMBOLS.indexOf(n)}},{key:"checksum",value:function(n,i){var o=n.slice().reverse().reduce(function(u,a,f){var l=f%i+1;return u+e.symbolValue(a)*l},0);return e.getSymbol(o%47)}}]),e})(Vc.default);Rt.default=Wc});var Cn=c(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});var Jc=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),Qc=Pt(),Zc=e0(Qc);function e0(t){return t&&t.__esModule?t:{default:t}}function t0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r0(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function n0(t,e){if(typeof e!="function"&&e!==null)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)}var i0=(function(t){n0(e,t);function e(r,n){return t0(this,e),r0(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return Jc(e,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),e})(Zc.default);It.default=i0});var Nn=c(Z=>{"use strict";Object.defineProperty(Z,"__esModule",{value:!0});Z.CODE93FullASCII=Z.CODE93=void 0;var o0=Pt(),u0=Ln(o0),a0=Cn(),f0=Ln(a0);function Ln(t){return t&&t.__esModule?t:{default:t}}Z.CODE93=u0.default;Z.CODE93FullASCII=f0.default});var Dn=c(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.GenericBarcode=void 0;var c0=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),l0=y(),s0=d0(l0);function d0(t){return t&&t.__esModule?t:{default:t}}function h0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g0(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function _0(t,e){if(typeof e!="function"&&e!==null)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)}var p0=(function(t){_0(e,t);function e(r,n){return h0(this,e),g0(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,r,n))}return c0(e,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),e})(s0.default);Ne.GenericBarcode=p0});var Fn=c(Bt=>{"use strict";Object.defineProperty(Bt,"__esModule",{value:!0});var v0=qr(),De=tn(),ee=vn(),kn=wn(),he=Rn(),y0=Pn(),m0=In(),qn=Nn(),E0=Dn();Bt.default={CODE39:v0.CODE39,CODE128:De.CODE128,CODE128A:De.CODE128A,CODE128B:De.CODE128B,CODE128C:De.CODE128C,EAN13:ee.EAN13,EAN8:ee.EAN8,EAN5:ee.EAN5,EAN2:ee.EAN2,UPC:ee.UPC,UPCE:ee.UPCE,ITF14:kn.ITF14,ITF:kn.ITF,MSI:he.MSI,MSI10:he.MSI10,MSI11:he.MSI11,MSI1010:he.MSI1010,MSI1110:he.MSI1110,pharmacode:y0.pharmacode,codabar:m0.codabar,CODE93:qn.CODE93,CODE93FullASCII:qn.CODE93FullASCII,GenericBarcode:E0.GenericBarcode}});var ge=c(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});var b0=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t};Ct.default=function(t,e){return b0({},t,e)}});var jn=c(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.default=w0;function w0(t){var e=[];function r(n){if(Array.isArray(n))for(var i=0;i<n.length;i++)r(n[i]);else n.text=n.text||"",n.data=n.data||"",e.push(n)}return r(t),e}});var Un=c(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.default=O0;function O0(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}});var kt=c(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.default=S0;function S0(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var r in e)e.hasOwnProperty(r)&&(r=e[r],typeof t[r]=="string"&&(t[r]=parseInt(t[r],10)));return typeof t.displayValue=="string"&&(t.displayValue=t.displayValue!="false"),t}});var Ft=c(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});var x0={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,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(){}};qt.default=x0});var Gn=c(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});var T0=kt(),A0=zn(T0),M0=Ft(),Hn=zn(M0);function zn(t){return t&&t.__esModule?t:{default:t}}function R0(t){var e={};for(var r in Hn.default)Hn.default.hasOwnProperty(r)&&(t.hasAttribute("jsbarcode-"+r.toLowerCase())&&(e[r]=t.getAttribute("jsbarcode-"+r.toLowerCase())),t.hasAttribute("data-"+r.toLowerCase())&&(e[r]=t.getAttribute("data-"+r.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,A0.default)(e),e}jt.default=R0});var Ut=c(w=>{"use strict";Object.defineProperty(w,"__esModule",{value:!0});w.getTotalWidthOfEncodings=w.calculateEncodingAttributes=w.getBarcodePadding=w.getEncodingHeight=w.getMaximumHeightOfEncodings=void 0;var P0=ge(),I0=B0(P0);function B0(t){return t&&t.__esModule?t:{default:t}}function Vn(t,e){return e.height+(e.displayValue&&t.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function $n(t,e,r){if(r.displayValue&&e<t){if(r.textAlign=="center")return Math.floor((t-e)/2);if(r.textAlign=="left")return 0;if(r.textAlign=="right")return Math.floor(t-e)}return 0}function C0(t,e,r){for(var n=0;n<t.length;n++){var i=t[n],o=(0,I0.default)(e,i.options),u;o.displayValue?u=D0(i.text,o,r):u=0;var a=i.data.length*o.width;i.width=Math.ceil(Math.max(u,a)),i.height=Vn(i,o),i.barcodePadding=$n(u,a,o)}}function L0(t){for(var e=0,r=0;r<t.length;r++)e+=t[r].width;return e}function N0(t){for(var e=0,r=0;r<t.length;r++)t[r].height>e&&(e=t[r].height);return e}function D0(t,e,r){var n;if(r)n=r;else if(typeof document<"u")n=document.createElement("canvas").getContext("2d");else return 0;n.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var i=n.measureText(t);if(!i)return 0;var o=i.width;return o}w.getMaximumHeightOfEncodings=N0;w.getEncodingHeight=Vn;w.getBarcodePadding=$n;w.calculateEncodingAttributes=C0;w.getTotalWidthOfEncodings=L0});var Xn=c(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});var k0=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),q0=ge(),F0=j0(q0),Ht=Ut();function j0(t){return t&&t.__esModule?t:{default:t}}function U0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var H0=(function(){function t(e,r,n){U0(this,t),this.canvas=e,this.encodings=r,this.options=n}return k0(t,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var r=0;r<this.encodings.length;r++){var n=(0,F0.default)(this.options,this.encodings[r].options);this.drawCanvasBarcode(n,this.encodings[r]),this.drawCanvasText(n,this.encodings[r]),this.moveCanvasDrawing(this.encodings[r])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var r=this.canvas.getContext("2d");r.save(),(0,Ht.calculateEncodingAttributes)(this.encodings,this.options,r);var n=(0,Ht.getTotalWidthOfEncodings)(this.encodings),i=(0,Ht.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=n+this.options.marginLeft+this.options.marginRight,this.canvas.height=i,r.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(r.fillStyle=this.options.background,r.fillRect(0,0,this.canvas.width,this.canvas.height)),r.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(r,n){var i=this.canvas.getContext("2d"),o=n.data,u;r.textPosition=="top"?u=r.marginTop+r.fontSize+r.textMargin:u=r.marginTop,i.fillStyle=r.lineColor;for(var a=0;a<o.length;a++){var f=a*r.width+n.barcodePadding;o[a]==="1"?i.fillRect(f,u,r.width,r.height):o[a]&&i.fillRect(f,u,r.width,r.height*o[a])}}},{key:"drawCanvasText",value:function(r,n){var i=this.canvas.getContext("2d"),o=r.fontOptions+" "+r.fontSize+"px "+r.font;if(r.displayValue){var u,a;r.textPosition=="top"?a=r.marginTop+r.fontSize-r.textMargin:a=r.height+r.textMargin+r.marginTop+r.fontSize,i.font=o,r.textAlign=="left"||n.barcodePadding>0?(u=0,i.textAlign="left"):r.textAlign=="right"?(u=n.width-1,i.textAlign="right"):(u=n.width/2,i.textAlign="center"),i.fillText(n.text,u,a)}}},{key:"moveCanvasDrawing",value:function(r){var n=this.canvas.getContext("2d");n.translate(r.width,0)}},{key:"restoreCanvas",value:function(){var r=this.canvas.getContext("2d");r.restore()}}]),t})();zt.default=H0});var Kn=c(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});var z0=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})(),G0=ge(),V0=$0(G0),Gt=Ut();function $0(t){return t&&t.__esModule?t:{default:t}}function X0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ke="http://www.w3.org/2000/svg",K0=(function(){function t(e,r,n){X0(this,t),this.svg=e,this.encodings=r,this.options=n,this.document=n.xmlDocument||document}return z0(t,[{key:"render",value:function(){var r=this.options.marginLeft;this.prepareSVG();for(var n=0;n<this.encodings.length;n++){var i=this.encodings[n],o=(0,V0.default)(this.options,i.options),u=this.createGroup(r,o.marginTop,this.svg);this.setGroupOptions(u,o),this.drawSvgBarcode(u,o,i),this.drawSVGText(u,o,i),r+=i.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,Gt.calculateEncodingAttributes)(this.encodings,this.options);var r=(0,Gt.getTotalWidthOfEncodings)(this.encodings),n=(0,Gt.getMaximumHeightOfEncodings)(this.encodings),i=r+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(i,n),this.options.background&&this.drawRect(0,0,i,n,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(r,n,i){var o=i.data,u;n.textPosition=="top"?u=n.fontSize+n.textMargin:u=0;for(var a=0,f=0,l=0;l<o.length;l++)f=l*n.width+i.barcodePadding,o[l]==="1"?a++:a>0&&(this.drawRect(f-n.width*a,u,n.width*a,n.height,r),a=0);a>0&&this.drawRect(f-n.width*(a-1),u,n.width*a,n.height,r)}},{key:"drawSVGText",value:function(r,n,i){var o=this.document.createElementNS(ke,"text");if(n.displayValue){var u,a;o.setAttribute("font-family",n.font),o.setAttribute("font-size",n.fontSize),n.fontOptions.includes("bold")&&o.setAttribute("font-weight","bold"),n.fontOptions.includes("italic")&&o.setAttribute("font-style","italic"),n.textPosition=="top"?a=n.fontSize-n.textMargin:a=n.height+n.textMargin+n.fontSize,n.textAlign=="left"||i.barcodePadding>0?(u=0,o.setAttribute("text-anchor","start")):n.textAlign=="right"?(u=i.width-1,o.setAttribute("text-anchor","end")):(u=i.width/2,o.setAttribute("text-anchor","middle")),o.setAttribute("x",u),o.setAttribute("y",a),o.appendChild(this.document.createTextNode(i.text)),r.appendChild(o)}}},{key:"setSvgAttributes",value:function(r,n){var i=this.svg;i.setAttribute("width",r+"px"),i.setAttribute("height",n+"px"),i.setAttribute("x","0px"),i.setAttribute("y","0px"),i.setAttribute("viewBox","0 0 "+r+" "+n),i.setAttribute("xmlns",ke),i.setAttribute("version","1.1")}},{key:"createGroup",value:function(r,n,i){var o=this.document.createElementNS(ke,"g");return o.setAttribute("transform","translate("+r+", "+n+")"),i.appendChild(o),o}},{key:"setGroupOptions",value:function(r,n){r.setAttribute("fill",n.lineColor)}},{key:"drawRect",value:function(r,n,i,o,u){var a=this.document.createElementNS(ke,"rect");return a.setAttribute("x",r),a.setAttribute("y",n),a.setAttribute("width",i),a.setAttribute("height",o),u.appendChild(a),a}}]),t})();Vt.default=K0});var Yn=c($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});var Y0=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})();function W0(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var J0=(function(){function t(e,r,n){W0(this,t),this.object=e,this.encodings=r,this.options=n}return Y0(t,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),t})();$t.default=J0});var Wn=c(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});var Q0=Xn(),Z0=Xt(Q0),el=Kn(),tl=Xt(el),rl=Yn(),nl=Xt(rl);function Xt(t){return t&&t.__esModule?t:{default:t}}Kt.default={CanvasRenderer:Z0.default,SVGRenderer:tl.default,ObjectRenderer:nl.default}});var Qt=c(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});function Yt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:t}function Jt(t,e){if(typeof e!="function"&&e!==null)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)}var il=(function(t){Jt(e,t);function e(r,n){Yt(this,e);var i=Wt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return i.name="InvalidInputException",i.symbology=r,i.input=n,i.message='"'+i.input+'" is not a valid input for '+i.symbology,i}return e})(Error),ol=(function(t){Jt(e,t);function e(){Yt(this,e);var r=Wt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.name="InvalidElementException",r.message="Not supported type to render on",r}return e})(Error),ul=(function(t){Jt(e,t);function e(){Yt(this,e);var r=Wt(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.name="NoElementException",r.message="No element to render on.",r}return e})(Error);_e.InvalidInputException=il;_e.InvalidElementException=ol;_e.NoElementException=ul});var Qn=c(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});var al=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fl=Gn(),Zt=Jn(fl),cl=Wn(),pe=Jn(cl),ll=Qt();function Jn(t){return t&&t.__esModule?t:{default:t}}function er(t){if(typeof t=="string")return sl(t);if(Array.isArray(t)){for(var e=[],r=0;r<t.length;r++)e.push(er(t[r]));return e}else{if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLImageElement)return dl(t);if(t&&t.nodeName&&t.nodeName.toLowerCase()==="svg"||typeof SVGElement<"u"&&t instanceof SVGElement)return{element:t,options:(0,Zt.default)(t),renderer:pe.default.SVGRenderer};if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement)return{element:t,options:(0,Zt.default)(t),renderer:pe.default.CanvasRenderer};if(t&&t.getContext)return{element:t,renderer:pe.default.CanvasRenderer};if(t&&(typeof t>"u"?"undefined":al(t))==="object"&&!t.nodeName)return{element:t,renderer:pe.default.ObjectRenderer};throw new ll.InvalidElementException}}function sl(t){var e=document.querySelectorAll(t);if(e.length!==0){for(var r=[],n=0;n<e.length;n++)r.push(er(e[n]));return r}}function dl(t){var e=document.createElement("canvas");return{element:e,options:(0,Zt.default)(t),renderer:pe.default.CanvasRenderer,afterRender:function(){t.setAttribute("src",e.toDataURL())}}}tr.default=er});var Zn=c(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});var hl=(function(){function t(e,r){for(var n=0;n<r.length;n++){var i=r[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}})();function gl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var _l=(function(){function t(e){gl(this,t),this.api=e}return hl(t,[{key:"handleCatch",value:function(r){if(r.name==="InvalidInputException")if(this.api._options.valid!==this.api._defaults.valid)this.api._options.valid(!1);else throw r.message;else throw r;this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(r){try{var n=r.apply(void 0,arguments);return this.api._options.valid(!0),n}catch(i){return this.handleCatch(i),this.api}}}]),t})();rr.default=_l});var ai=c((cd,ui)=>{"use strict";var pl=Fn(),F=L(pl),vl=ge(),ve=L(vl),yl=jn(),ti=L(yl),ml=Un(),ei=L(ml),El=Qn(),bl=L(El),wl=kt(),Ol=L(wl),Sl=Zn(),xl=L(Sl),ri=Qt(),Tl=Ft(),ni=L(Tl);function L(t){return t&&t.__esModule?t:{default:t}}var M=function(){},qe=function(e,r,n){var i=new M;if(typeof e>"u")throw Error("No element to render on was provided.");return i._renderProperties=(0,bl.default)(e),i._encodings=[],i._options=ni.default,i._errorHandler=new xl.default(i),typeof r<"u"&&(n=n||{},n.format||(n.format=oi()),i.options(n)[n.format](r,n).render()),i};qe.getModule=function(t){return F.default[t]};for(nr in F.default)F.default.hasOwnProperty(nr)&&Al(F.default,nr);var nr;function Al(t,e){M.prototype[e]=M.prototype[e.toUpperCase()]=M.prototype[e.toLowerCase()]=function(r,n){var i=this;return i._errorHandler.wrapBarcodeCall(function(){n.text=typeof n.text>"u"?void 0:""+n.text;var o=(0,ve.default)(i._options,n);o=(0,Ol.default)(o);var u=t[e],a=ii(r,u,o);return i._encodings.push(a),i})}}function ii(t,e,r){t=""+t;var n=new e(t,r);if(!n.valid())throw new ri.InvalidInputException(n.constructor.name,t);var i=n.encode();i=(0,ti.default)(i);for(var o=0;o<i.length;o++)i[o].options=(0,ve.default)(r,i[o].options);return i}function oi(){return F.default.CODE128?"CODE128":Object.keys(F.default)[0]}M.prototype.options=function(t){return this._options=(0,ve.default)(this._options,t),this};M.prototype.blank=function(t){var e=new Array(t+1).join("0");return this._encodings.push({data:e}),this};M.prototype.init=function(){if(this._renderProperties){Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]);var t;for(var e in this._renderProperties){t=this._renderProperties[e];var r=(0,ve.default)(this._options,t.options);r.format=="auto"&&(r.format=oi()),this._errorHandler.wrapBarcodeCall(function(){var n=r.value,i=F.default[r.format.toUpperCase()],o=ii(n,i,r);ir(t,o,r)})}}};M.prototype.render=function(){if(!this._renderProperties)throw new ri.NoElementException;if(Array.isArray(this._renderProperties))for(var t=0;t<this._renderProperties.length;t++)ir(this._renderProperties[t],this._encodings,this._options);else ir(this._renderProperties,this._encodings,this._options);return this};M.prototype._defaults=ni.default;function ir(t,e,r){e=(0,ti.default)(e);for(var n=0;n<e.length;n++)e[n].options=(0,ve.default)(r,e[n].options),(0,ei.default)(e[n].options);(0,ei.default)(r);var i=t.renderer,o=new i(t.element,e,r);o.render(),t.afterRender&&t.afterRender()}typeof window<"u"&&(window.JsBarcode=qe);typeof jQuery<"u"&&(jQuery.fn.JsBarcode=function(t,e){var r=[];return jQuery(this).each(function(){r.push(this)}),qe(r,t,e)});ui.exports=qe});var ci=c((ld,fi)=>{"use strict";fi.exports=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}});var N=c(j=>{"use strict";var or,Ml=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];j.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};j.getSymbolTotalCodewords=function(e){return Ml[e]};j.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};j.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');or=e};j.isKanjiModeEnabled=function(){return typeof or<"u"};j.toSJIS=function(e){return or(e)}});var Fe=c(O=>{"use strict";O.L={bit:1};O.M={bit:0};O.Q={bit:3};O.H={bit:2};function Rl(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return O.L;case"m":case"medium":return O.M;case"q":case"quartile":return O.Q;case"h":case"high":return O.H;default:throw new Error("Unknown EC Level: "+t)}}O.isValid=function(e){return e&&typeof e.bit<"u"&&e.bit>=0&&e.bit<4};O.from=function(e,r){if(O.isValid(e))return e;try{return Rl(e)}catch{return r}}});var di=c((hd,si)=>{"use strict";function li(){this.buffer=[],this.length=0}li.prototype={get:function(t){let e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let r=0;r<e;r++)this.putBit((t>>>e-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){let e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}};si.exports=li});var gi=c((gd,hi)=>{"use strict";function ye(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}ye.prototype.set=function(t,e,r,n){let i=t*this.size+e;this.data[i]=r,n&&(this.reservedBit[i]=!0)};ye.prototype.get=function(t,e){return this.data[t*this.size+e]};ye.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r};ye.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};hi.exports=ye});var _i=c(je=>{"use strict";var Pl=N().getSymbolSize;je.getRowColCoords=function(e){if(e===1)return[];let r=Math.floor(e/7)+2,n=Pl(e),i=n===145?26:Math.ceil((n-13)/(2*r-2))*2,o=[n-7];for(let u=1;u<r-1;u++)o[u]=o[u-1]-i;return o.push(6),o.reverse()};je.getPositions=function(e){let r=[],n=je.getRowColCoords(e),i=n.length;for(let o=0;o<i;o++)for(let u=0;u<i;u++)o===0&&u===0||o===0&&u===i-1||o===i-1&&u===0||r.push([n[o],n[u]]);return r}});var yi=c(vi=>{"use strict";var Il=N().getSymbolSize,pi=7;vi.getPositions=function(e){let r=Il(e);return[[0,0],[r-pi,0],[0,r-pi]]}});var mi=c(h=>{"use strict";h.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};var U={N1:3,N2:3,N3:40,N4:10};h.isValid=function(e){return e!=null&&e!==""&&!isNaN(e)&&e>=0&&e<=7};h.from=function(e){return h.isValid(e)?parseInt(e,10):void 0};h.getPenaltyN1=function(e){let r=e.size,n=0,i=0,o=0,u=null,a=null;for(let f=0;f<r;f++){i=o=0,u=a=null;for(let l=0;l<r;l++){let s=e.get(f,l);s===u?i++:(i>=5&&(n+=U.N1+(i-5)),u=s,i=1),s=e.get(l,f),s===a?o++:(o>=5&&(n+=U.N1+(o-5)),a=s,o=1)}i>=5&&(n+=U.N1+(i-5)),o>=5&&(n+=U.N1+(o-5))}return n};h.getPenaltyN2=function(e){let r=e.size,n=0;for(let i=0;i<r-1;i++)for(let o=0;o<r-1;o++){let u=e.get(i,o)+e.get(i,o+1)+e.get(i+1,o)+e.get(i+1,o+1);(u===4||u===0)&&n++}return n*U.N2};h.getPenaltyN3=function(e){let r=e.size,n=0,i=0,o=0;for(let u=0;u<r;u++){i=o=0;for(let a=0;a<r;a++)i=i<<1&2047|e.get(u,a),a>=10&&(i===1488||i===93)&&n++,o=o<<1&2047|e.get(a,u),a>=10&&(o===1488||o===93)&&n++}return n*U.N3};h.getPenaltyN4=function(e){let r=0,n=e.data.length;for(let o=0;o<n;o++)r+=e.data[o];return Math.abs(Math.ceil(r*100/n/5)-10)*U.N4};function Bl(t,e,r){switch(t){case h.Patterns.PATTERN000:return(e+r)%2===0;case h.Patterns.PATTERN001:return e%2===0;case h.Patterns.PATTERN010:return r%3===0;case h.Patterns.PATTERN011:return(e+r)%3===0;case h.Patterns.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2===0;case h.Patterns.PATTERN101:return e*r%2+e*r%3===0;case h.Patterns.PATTERN110:return(e*r%2+e*r%3)%2===0;case h.Patterns.PATTERN111:return(e*r%3+(e+r)%2)%2===0;default:throw new Error("bad maskPattern:"+t)}}h.applyMask=function(e,r){let n=r.size;for(let i=0;i<n;i++)for(let o=0;o<n;o++)r.isReserved(o,i)||r.xor(o,i,Bl(e,o,i))};h.getBestMask=function(e,r){let n=Object.keys(h.Patterns).length,i=0,o=1/0;for(let u=0;u<n;u++){r(u),h.applyMask(u,e);let a=h.getPenaltyN1(e)+h.getPenaltyN2(e)+h.getPenaltyN3(e)+h.getPenaltyN4(e);h.applyMask(u,e),a<o&&(o=a,i=u)}return i}});var ar=c(ur=>{"use strict";var D=Fe(),Ue=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],He=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];ur.getBlocksCount=function(e,r){switch(r){case D.L:return Ue[(e-1)*4+0];case D.M:return Ue[(e-1)*4+1];case D.Q:return Ue[(e-1)*4+2];case D.H:return Ue[(e-1)*4+3];default:return}};ur.getTotalCodewordsCount=function(e,r){switch(r){case D.L:return He[(e-1)*4+0];case D.M:return He[(e-1)*4+1];case D.Q:return He[(e-1)*4+2];case D.H:return He[(e-1)*4+3];default:return}}});var Ei=c(Ge=>{"use strict";var me=new Uint8Array(512),ze=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)me[r]=e,ze[e]=r,e<<=1,e&256&&(e^=285);for(let r=255;r<512;r++)me[r]=me[r-255]})();Ge.log=function(e){if(e<1)throw new Error("log("+e+")");return ze[e]};Ge.exp=function(e){return me[e]};Ge.mul=function(e,r){return e===0||r===0?0:me[ze[e]+ze[r]]}});var bi=c(Ee=>{"use strict";var fr=Ei();Ee.mul=function(e,r){let n=new Uint8Array(e.length+r.length-1);for(let i=0;i<e.length;i++)for(let o=0;o<r.length;o++)n[i+o]^=fr.mul(e[i],r[o]);return n};Ee.mod=function(e,r){let n=new Uint8Array(e);for(;n.length-r.length>=0;){let i=n[0];for(let u=0;u<r.length;u++)n[u]^=fr.mul(r[u],i);let o=0;for(;o<n.length&&n[o]===0;)o++;n=n.slice(o)}return n};Ee.generateECPolynomial=function(e){let r=new Uint8Array([1]);for(let n=0;n<e;n++)r=Ee.mul(r,new Uint8Array([1,fr.exp(n)]));return r}});var Si=c((bd,Oi)=>{"use strict";var wi=bi();function cr(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}cr.prototype.initialize=function(e){this.degree=e,this.genPoly=wi.generateECPolynomial(this.degree)};cr.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");let r=new Uint8Array(e.length+this.degree);r.set(e);let n=wi.mod(r,this.genPoly),i=this.degree-n.length;if(i>0){let o=new Uint8Array(this.degree);return o.set(n,i),o}return n};Oi.exports=cr});var lr=c(xi=>{"use strict";xi.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}});var sr=c(R=>{"use strict";var Ti="[0-9]+",Cl="[A-Z $%*+\\-./:]+",be="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";be=be.replace(/u/g,"\\u");var Ll="(?:(?![A-Z0-9 $%*+\\-./:]|"+be+`)(?:.|[\r
|
|
2
|
+
]))+`;R.KANJI=new RegExp(be,"g");R.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");R.BYTE=new RegExp(Ll,"g");R.NUMERIC=new RegExp(Ti,"g");R.ALPHANUMERIC=new RegExp(Cl,"g");var Nl=new RegExp("^"+be+"$"),Dl=new RegExp("^"+Ti+"$"),kl=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");R.testKanji=function(e){return Nl.test(e)};R.testNumeric=function(e){return Dl.test(e)};R.testAlphanumeric=function(e){return kl.test(e)}});var k=c(v=>{"use strict";var ql=lr(),dr=sr();v.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]};v.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]};v.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]};v.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]};v.MIXED={bit:-1};v.getCharCountIndicator=function(e,r){if(!e.ccBits)throw new Error("Invalid mode: "+e);if(!ql.isValid(r))throw new Error("Invalid version: "+r);return r>=1&&r<10?e.ccBits[0]:r<27?e.ccBits[1]:e.ccBits[2]};v.getBestModeForData=function(e){return dr.testNumeric(e)?v.NUMERIC:dr.testAlphanumeric(e)?v.ALPHANUMERIC:dr.testKanji(e)?v.KANJI:v.BYTE};v.toString=function(e){if(e&&e.id)return e.id;throw new Error("Invalid mode")};v.isValid=function(e){return e&&e.bit&&e.ccBits};function Fl(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return v.NUMERIC;case"alphanumeric":return v.ALPHANUMERIC;case"kanji":return v.KANJI;case"byte":return v.BYTE;default:throw new Error("Unknown mode: "+t)}}v.from=function(e,r){if(v.isValid(e))return e;try{return Fl(e)}catch{return r}}});var Ii=c(H=>{"use strict";var Ve=N(),jl=ar(),Ai=Fe(),q=k(),hr=lr(),Ri=7973,Mi=Ve.getBCHDigit(Ri);function Ul(t,e,r){for(let n=1;n<=40;n++)if(e<=H.getCapacity(n,r,t))return n}function Pi(t,e){return q.getCharCountIndicator(t,e)+4}function Hl(t,e){let r=0;return t.forEach(function(n){let i=Pi(n.mode,e);r+=i+n.getBitsLength()}),r}function zl(t,e){for(let r=1;r<=40;r++)if(Hl(t,r)<=H.getCapacity(r,e,q.MIXED))return r}H.from=function(e,r){return hr.isValid(e)?parseInt(e,10):r};H.getCapacity=function(e,r,n){if(!hr.isValid(e))throw new Error("Invalid QR Code version");typeof n>"u"&&(n=q.BYTE);let i=Ve.getSymbolTotalCodewords(e),o=jl.getTotalCodewordsCount(e,r),u=(i-o)*8;if(n===q.MIXED)return u;let a=u-Pi(n,e);switch(n){case q.NUMERIC:return Math.floor(a/10*3);case q.ALPHANUMERIC:return Math.floor(a/11*2);case q.KANJI:return Math.floor(a/13);case q.BYTE:default:return Math.floor(a/8)}};H.getBestVersionForData=function(e,r){let n,i=Ai.from(r,Ai.M);if(Array.isArray(e)){if(e.length>1)return zl(e,i);if(e.length===0)return 1;n=e[0]}else n=e;return Ul(n.mode,n.getLength(),i)};H.getEncodedBits=function(e){if(!hr.isValid(e)||e<7)throw new Error("Invalid QR Code version");let r=e<<12;for(;Ve.getBCHDigit(r)-Mi>=0;)r^=Ri<<Ve.getBCHDigit(r)-Mi;return e<<12|r}});var Ni=c(Li=>{"use strict";var gr=N(),Ci=1335,Gl=21522,Bi=gr.getBCHDigit(Ci);Li.getEncodedBits=function(e,r){let n=e.bit<<3|r,i=n<<10;for(;gr.getBCHDigit(i)-Bi>=0;)i^=Ci<<gr.getBCHDigit(i)-Bi;return(n<<10|i)^Gl}});var ki=c((Ad,Di)=>{"use strict";var Vl=k();function te(t){this.mode=Vl.NUMERIC,this.data=t.toString()}te.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};te.prototype.getLength=function(){return this.data.length};te.prototype.getBitsLength=function(){return te.getBitsLength(this.data.length)};te.prototype.write=function(e){let r,n,i;for(r=0;r+3<=this.data.length;r+=3)n=this.data.substr(r,3),i=parseInt(n,10),e.put(i,10);let o=this.data.length-r;o>0&&(n=this.data.substr(r),i=parseInt(n,10),e.put(i,o*3+1))};Di.exports=te});var Fi=c((Md,qi)=>{"use strict";var $l=k(),_r=["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"," ","$","%","*","+","-",".","/",":"];function re(t){this.mode=$l.ALPHANUMERIC,this.data=t}re.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};re.prototype.getLength=function(){return this.data.length};re.prototype.getBitsLength=function(){return re.getBitsLength(this.data.length)};re.prototype.write=function(e){let r;for(r=0;r+2<=this.data.length;r+=2){let n=_r.indexOf(this.data[r])*45;n+=_r.indexOf(this.data[r+1]),e.put(n,11)}this.data.length%2&&e.put(_r.indexOf(this.data[r]),6)};qi.exports=re});var Ui=c((Rd,ji)=>{"use strict";var Xl=k();function ne(t){this.mode=Xl.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}ne.getBitsLength=function(e){return e*8};ne.prototype.getLength=function(){return this.data.length};ne.prototype.getBitsLength=function(){return ne.getBitsLength(this.data.length)};ne.prototype.write=function(t){for(let e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)};ji.exports=ne});var zi=c((Pd,Hi)=>{"use strict";var Kl=k(),Yl=N();function ie(t){this.mode=Kl.KANJI,this.data=t}ie.getBitsLength=function(e){return e*13};ie.prototype.getLength=function(){return this.data.length};ie.prototype.getBitsLength=function(){return ie.getBitsLength(this.data.length)};ie.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let r=Yl.toSJIS(this.data[e]);if(r>=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+`
|
|
3
|
+
Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),t.put(r,13)}};Hi.exports=ie});var Gi=c((Id,pr)=>{"use strict";var we={single_source_shortest_paths:function(t,e,r){var n={},i={};i[e]=0;var o=we.PriorityQueue.make();o.push(e,0);for(var u,a,f,l,s,g,_,S,P;!o.empty();){u=o.pop(),a=u.value,l=u.cost,s=t[a]||{};for(f in s)s.hasOwnProperty(f)&&(g=s[f],_=l+g,S=i[f],P=typeof i[f]>"u",(P||S>_)&&(i[f]=_,o.push(f,_),n[f]=a))}if(typeof r<"u"&&typeof i[r]>"u"){var I=["Could not find a path from ",e," to ",r,"."].join("");throw new Error(I)}return n},extract_shortest_path_from_predecessor_list:function(t,e){for(var r=[],n=e,i;n;)r.push(n),i=t[n],n=t[n];return r.reverse(),r},find_path:function(t,e,r){var n=we.single_source_shortest_paths(t,e,r);return we.extract_shortest_path_from_predecessor_list(n,r)},PriorityQueue:{make:function(t){var e=we.PriorityQueue,r={},n;t=t||{};for(n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return r.queue=[],r.sorter=t.sorter||e.default_sorter,r},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var r={value:t,cost:e};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};typeof pr<"u"&&(pr.exports=we)});var Qi=c(oe=>{"use strict";var d=k(),Xi=ki(),Ki=Fi(),Yi=Ui(),Wi=zi(),Oe=sr(),$e=N(),Wl=Gi();function Vi(t){return unescape(encodeURIComponent(t)).length}function Se(t,e,r){let n=[],i;for(;(i=t.exec(r))!==null;)n.push({data:i[0],index:i.index,mode:e,length:i[0].length});return n}function Ji(t){let e=Se(Oe.NUMERIC,d.NUMERIC,t),r=Se(Oe.ALPHANUMERIC,d.ALPHANUMERIC,t),n,i;return $e.isKanjiModeEnabled()?(n=Se(Oe.BYTE,d.BYTE,t),i=Se(Oe.KANJI,d.KANJI,t)):(n=Se(Oe.BYTE_KANJI,d.BYTE,t),i=[]),e.concat(r,n,i).sort(function(u,a){return u.index-a.index}).map(function(u){return{data:u.data,mode:u.mode,length:u.length}})}function vr(t,e){switch(e){case d.NUMERIC:return Xi.getBitsLength(t);case d.ALPHANUMERIC:return Ki.getBitsLength(t);case d.KANJI:return Wi.getBitsLength(t);case d.BYTE:return Yi.getBitsLength(t)}}function Jl(t){return t.reduce(function(e,r){let n=e.length-1>=0?e[e.length-1]:null;return n&&n.mode===r.mode?(e[e.length-1].data+=r.data,e):(e.push(r),e)},[])}function Ql(t){let e=[];for(let r=0;r<t.length;r++){let n=t[r];switch(n.mode){case d.NUMERIC:e.push([n,{data:n.data,mode:d.ALPHANUMERIC,length:n.length},{data:n.data,mode:d.BYTE,length:n.length}]);break;case d.ALPHANUMERIC:e.push([n,{data:n.data,mode:d.BYTE,length:n.length}]);break;case d.KANJI:e.push([n,{data:n.data,mode:d.BYTE,length:Vi(n.data)}]);break;case d.BYTE:e.push([{data:n.data,mode:d.BYTE,length:Vi(n.data)}])}}return e}function Zl(t,e){let r={},n={start:{}},i=["start"];for(let o=0;o<t.length;o++){let u=t[o],a=[];for(let f=0;f<u.length;f++){let l=u[f],s=""+o+f;a.push(s),r[s]={node:l,lastCount:0},n[s]={};for(let g=0;g<i.length;g++){let _=i[g];r[_]&&r[_].node.mode===l.mode?(n[_][s]=vr(r[_].lastCount+l.length,l.mode)-vr(r[_].lastCount,l.mode),r[_].lastCount+=l.length):(r[_]&&(r[_].lastCount=l.length),n[_][s]=vr(l.length,l.mode)+4+d.getCharCountIndicator(l.mode,e))}}i=a}for(let o=0;o<i.length;o++)n[i[o]].end=0;return{map:n,table:r}}function $i(t,e){let r,n=d.getBestModeForData(t);if(r=d.from(e,n),r!==d.BYTE&&r.bit<n.bit)throw new Error('"'+t+'" cannot be encoded with mode '+d.toString(r)+`.
|
|
4
|
+
Suggested mode is: `+d.toString(n));switch(r===d.KANJI&&!$e.isKanjiModeEnabled()&&(r=d.BYTE),r){case d.NUMERIC:return new Xi(t);case d.ALPHANUMERIC:return new Ki(t);case d.KANJI:return new Wi(t);case d.BYTE:return new Yi(t)}}oe.fromArray=function(e){return e.reduce(function(r,n){return typeof n=="string"?r.push($i(n,null)):n.data&&r.push($i(n.data,n.mode)),r},[])};oe.fromString=function(e,r){let n=Ji(e,$e.isKanjiModeEnabled()),i=Ql(n),o=Zl(i,r),u=Wl.find_path(o.map,"start","end"),a=[];for(let f=1;f<u.length-1;f++)a.push(o.table[u[f]].node);return oe.fromArray(Jl(a))};oe.rawSplit=function(e){return oe.fromArray(Ji(e,$e.isKanjiModeEnabled()))}});var eo=c(Zi=>{"use strict";var Ke=N(),yr=Fe(),e1=di(),t1=gi(),r1=_i(),n1=yi(),br=mi(),wr=ar(),i1=Si(),Xe=Ii(),o1=Ni(),u1=k(),mr=Qi();function a1(t,e){let r=t.size,n=n1.getPositions(e);for(let i=0;i<n.length;i++){let o=n[i][0],u=n[i][1];for(let a=-1;a<=7;a++)if(!(o+a<=-1||r<=o+a))for(let f=-1;f<=7;f++)u+f<=-1||r<=u+f||(a>=0&&a<=6&&(f===0||f===6)||f>=0&&f<=6&&(a===0||a===6)||a>=2&&a<=4&&f>=2&&f<=4?t.set(o+a,u+f,!0,!0):t.set(o+a,u+f,!1,!0))}}function f1(t){let e=t.size;for(let r=8;r<e-8;r++){let n=r%2===0;t.set(r,6,n,!0),t.set(6,r,n,!0)}}function c1(t,e){let r=r1.getPositions(e);for(let n=0;n<r.length;n++){let i=r[n][0],o=r[n][1];for(let u=-2;u<=2;u++)for(let a=-2;a<=2;a++)u===-2||u===2||a===-2||a===2||u===0&&a===0?t.set(i+u,o+a,!0,!0):t.set(i+u,o+a,!1,!0)}}function l1(t,e){let r=t.size,n=Xe.getEncodedBits(e),i,o,u;for(let a=0;a<18;a++)i=Math.floor(a/3),o=a%3+r-8-3,u=(n>>a&1)===1,t.set(i,o,u,!0),t.set(o,i,u,!0)}function Er(t,e,r){let n=t.size,i=o1.getEncodedBits(e,r),o,u;for(o=0;o<15;o++)u=(i>>o&1)===1,o<6?t.set(o,8,u,!0):o<8?t.set(o+1,8,u,!0):t.set(n-15+o,8,u,!0),o<8?t.set(8,n-o-1,u,!0):o<9?t.set(8,15-o-1+1,u,!0):t.set(8,15-o-1,u,!0);t.set(n-8,8,1,!0)}function s1(t,e){let r=t.size,n=-1,i=r-1,o=7,u=0;for(let a=r-1;a>0;a-=2)for(a===6&&a--;;){for(let f=0;f<2;f++)if(!t.isReserved(i,a-f)){let l=!1;u<e.length&&(l=(e[u]>>>o&1)===1),t.set(i,a-f,l),o--,o===-1&&(u++,o=7)}if(i+=n,i<0||r<=i){i-=n,n=-n;break}}}function d1(t,e,r){let n=new e1;r.forEach(function(f){n.put(f.mode.bit,4),n.put(f.getLength(),u1.getCharCountIndicator(f.mode,t)),f.write(n)});let i=Ke.getSymbolTotalCodewords(t),o=wr.getTotalCodewordsCount(t,e),u=(i-o)*8;for(n.getLengthInBits()+4<=u&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);let a=(u-n.getLengthInBits())/8;for(let f=0;f<a;f++)n.put(f%2?17:236,8);return h1(n,t,e)}function h1(t,e,r){let n=Ke.getSymbolTotalCodewords(e),i=wr.getTotalCodewordsCount(e,r),o=n-i,u=wr.getBlocksCount(e,r),a=n%u,f=u-a,l=Math.floor(n/u),s=Math.floor(o/u),g=s+1,_=l-s,S=new i1(_),P=0,I=new Array(u),Br=new Array(u),We=0,bo=new Uint8Array(t.buffer);for(let G=0;G<u;G++){let Qe=G<f?s:g;I[G]=bo.slice(P,P+Qe),Br[G]=S.encode(I[G]),P+=Qe,We=Math.max(We,Qe)}let Je=new Uint8Array(n),Cr=0,T,A;for(T=0;T<We;T++)for(A=0;A<u;A++)T<I[A].length&&(Je[Cr++]=I[A][T]);for(T=0;T<_;T++)for(A=0;A<u;A++)Je[Cr++]=Br[A][T];return Je}function g1(t,e,r,n){let i;if(Array.isArray(t))i=mr.fromArray(t);else if(typeof t=="string"){let l=e;if(!l){let s=mr.rawSplit(t);l=Xe.getBestVersionForData(s,r)}i=mr.fromString(t,l||40)}else throw new Error("Invalid data");let o=Xe.getBestVersionForData(i,r);if(!o)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=o;else if(e<o)throw new Error(`
|
|
5
|
+
The chosen QR Code version cannot contain this amount of data.
|
|
6
|
+
Minimum version required to store current data is: `+o+`.
|
|
7
|
+
`);let u=d1(e,r,i),a=Ke.getSymbolSize(e),f=new t1(a);return a1(f,e),f1(f),c1(f,e),Er(f,r,0),e>=7&&l1(f,e),s1(f,u),isNaN(n)&&(n=br.getBestMask(f,Er.bind(null,f,r))),br.applyMask(n,f),Er(f,r,n),{modules:f,version:e,errorCorrectionLevel:r,maskPattern:n,segments:i}}Zi.create=function(e,r){if(typeof e>"u"||e==="")throw new Error("No input text");let n=yr.M,i,o;return typeof r<"u"&&(n=yr.from(r.errorCorrectionLevel,yr.M),i=Xe.from(r.version),o=br.from(r.maskPattern),r.toSJISFunc&&Ke.setToSJISFunction(r.toSJISFunc)),g1(e,i,n,o)}});var Or=c(z=>{"use strict";function to(t){if(typeof t=="number"&&(t=t.toString()),typeof t!="string")throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||e.length===5||e.length>8)throw new Error("Invalid hex color: "+t);(e.length===3||e.length===4)&&(e=Array.prototype.concat.apply([],e.map(function(n){return[n,n]}))),e.length===6&&e.push("F","F");let r=parseInt(e.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+e.slice(0,6).join("")}}z.getOptions=function(e){e||(e={}),e.color||(e.color={});let r=typeof e.margin>"u"||e.margin===null||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,i=e.scale||4;return{width:n,scale:n?4:i,margin:r,color:{dark:to(e.color.dark||"#000000ff"),light:to(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}};z.getScale=function(e,r){return r.width&&r.width>=e+r.margin*2?r.width/(e+r.margin*2):r.scale};z.getImageWidth=function(e,r){let n=z.getScale(e,r);return Math.floor((e+r.margin*2)*n)};z.qrToImageData=function(e,r,n){let i=r.modules.size,o=r.modules.data,u=z.getScale(i,n),a=Math.floor((i+n.margin*2)*u),f=n.margin*u,l=[n.color.light,n.color.dark];for(let s=0;s<a;s++)for(let g=0;g<a;g++){let _=(s*a+g)*4,S=n.color.light;if(s>=f&&g>=f&&s<a-f&&g<a-f){let P=Math.floor((s-f)/u),I=Math.floor((g-f)/u);S=l[o[P*i+I]?1:0]}e[_++]=S.r,e[_++]=S.g,e[_++]=S.b,e[_]=S.a}}});var ro=c(Ye=>{"use strict";var Sr=Or();function _1(t,e,r){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=r,e.width=r,e.style.height=r+"px",e.style.width=r+"px"}function p1(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}Ye.render=function(e,r,n){let i=n,o=r;typeof i>"u"&&(!r||!r.getContext)&&(i=r,r=void 0),r||(o=p1()),i=Sr.getOptions(i);let u=Sr.getImageWidth(e.modules.size,i),a=o.getContext("2d"),f=a.createImageData(u,u);return Sr.qrToImageData(f.data,e,i),_1(a,o,u),a.putImageData(f,0,0),o};Ye.renderToDataURL=function(e,r,n){let i=n;typeof i>"u"&&(!r||!r.getContext)&&(i=r,r=void 0),i||(i={});let o=Ye.render(e,r,i),u=i.type||"image/png",a=i.rendererOpts||{};return o.toDataURL(u,a.quality)}});var oo=c(io=>{"use strict";var v1=Or();function no(t,e){let r=t.a/255,n=e+'="'+t.hex+'"';return r<1?n+" "+e+'-opacity="'+r.toFixed(2).slice(1)+'"':n}function xr(t,e,r){let n=t+e;return typeof r<"u"&&(n+=" "+r),n}function y1(t,e,r){let n="",i=0,o=!1,u=0;for(let a=0;a<t.length;a++){let f=Math.floor(a%e),l=Math.floor(a/e);!f&&!o&&(o=!0),t[a]?(u++,a>0&&f>0&&t[a-1]||(n+=o?xr("M",f+r,.5+l+r):xr("m",i,0),i=0,o=!1),f+1<e&&t[a+1]||(n+=xr("h",u),u=0)):i++}return n}io.render=function(e,r,n){let i=v1.getOptions(r),o=e.modules.size,u=e.modules.data,a=o+i.margin*2,f=i.color.light.a?"<path "+no(i.color.light,"fill")+' d="M0 0h'+a+"v"+a+'H0z"/>':"",l="<path "+no(i.color.dark,"stroke")+' d="'+y1(u,o,i.margin)+'"/>',s='viewBox="0 0 '+a+" "+a+'"',_='<svg xmlns="http://www.w3.org/2000/svg" '+(i.width?'width="'+i.width+'" height="'+i.width+'" ':"")+s+' shape-rendering="crispEdges">'+f+l+`</svg>
|
|
8
|
+
`;return typeof n=="function"&&n(null,_),_}});var ao=c(xe=>{"use strict";var m1=ci(),Tr=eo(),uo=ro(),E1=oo();function Ar(t,e,r,n,i){let o=[].slice.call(arguments,1),u=o.length,a=typeof o[u-1]=="function";if(!a&&!m1())throw new Error("Callback required as last argument");if(a){if(u<2)throw new Error("Too few arguments provided");u===2?(i=r,r=e,e=n=void 0):u===3&&(e.getContext&&typeof i>"u"?(i=n,n=void 0):(i=n,n=r,r=e,e=void 0))}else{if(u<1)throw new Error("Too few arguments provided");return u===1?(r=e,e=n=void 0):u===2&&!e.getContext&&(n=r,r=e,e=void 0),new Promise(function(f,l){try{let s=Tr.create(r,n);f(t(s,e,n))}catch(s){l(s)}})}try{let f=Tr.create(r,n);i(null,t(f,e,n))}catch(f){i(f)}}xe.create=Tr.create;xe.toCanvas=Ar.bind(null,uo.render);xe.toDataURL=Ar.bind(null,uo.renderToDataURL);xe.toString=Ar.bind(null,function(t,e,r){return E1.render(t,r)})});var lo=Nr(ai(),1),so=Nr(ao(),1);function Mr(t){let e=typeof t=="number"&&Number.isFinite(t)?t:2;return Math.max(1,e/2)}function b1(t){return Mr(t)*.25}function fo(t){let e=Math.max(1,Math.ceil(t.unitWidth)),r=Math.max(1,Math.ceil(t.unitHeight)),n=b1(t.barWidth),i=Math.min(t.boxWidthMm>0?t.boxWidthMm/e:Number.POSITIVE_INFINITY,t.boxHeightMm>0?t.boxHeightMm/r:Number.POSITIVE_INFINITY),o=t.dpi;if(typeof o=="number"&&Number.isFinite(o)&&o>0){let a=o/25.4,f=Math.max(1,Math.round(n*a)),l=Math.floor(i*a);if(l>=1){let s=Math.min(f,l),g=s/a;return{moduleWidthMm:g,widthMm:e*g,heightMm:r*g,dotsPerModule:s,scaledDown:s<f}}}let u=Math.min(n,i);return{moduleWidthMm:u,widthMm:e*u,heightMm:r*u,dotsPerModule:null,scaledDown:u<n}}var ho="http://www.w3.org/2000/svg";function x1(t){let e=t.getAttribute("viewBox");if(!e)return null;let r=e.trim().split(/[\s,]+/).map(Number);return r.length!==4||r.some(n=>!Number.isFinite(n))?null:{width:r[2],height:r[3]}}function T1(t,e){let r=document.createElementNS(ho,"svg"),n=Mr(e.barWidth);(0,lo.default)(r,t,{format:e.barcodeType||"CODE128",width:n,height:30*n,displayValue:e.showText!==!1,fontSize:(e.fontSize??10)*n,margin:0,marginLeft:10*n,marginRight:10*n,marginTop:0,marginBottom:2*n});let i=x1(r);if(i){let o=fo({unitWidth:i.width/n,unitHeight:i.height/n,boxWidthMm:e.targetWidthMm??0,boxHeightMm:e.targetHeightMm??0,dpi:e.printerDpi,barWidth:e.barWidth});r.setAttribute("width",`${o.widthMm}mm`),r.setAttribute("height",`${o.heightMm}mm`)}return r.setAttribute("shape-rendering","crispEdges"),r.outerHTML}function A1(t,e){let r=(e.qrCodeLevel??"M").toUpperCase(),i=so.default.create(t,{errorCorrectionLevel:["L","M","Q","H"].includes(r)?r:"M"}).modules,o=i.size,u=4,a=4*u,f=o*u+a*2,l="";for(let s=0;s<o;s++)for(let g=0;g<o;g++)i.get(g,s)&&(l+=`<rect x="${a+g*u}" y="${a+s*u}" width="${u}" height="${u}" fill="#000"/>`);return`<svg xmlns="${ho}" viewBox="0 0 ${f} ${f}" width="${f}" height="${f}" shape-rendering="crispEdges">${l}</svg>`}function go(t,e,r={}){if(!t)throw new Error("empty barcode value");return e==="qrcode"?A1(t,r):T1(t,r)}function _o(t){return t*(96/25.4)}var M1=6,R1=1;function po(t){return typeof t!="number"||!Number.isFinite(t)||t<=0?M1:Math.max(t,R1)}function vo(t){return Math.floor(t*100)/100}var Rr=.5,P1=12;function Pr(t,e){let r=t.getAttribute(e);if(r===null||r==="")return;let n=Number(r);return Number.isFinite(n)?n:void 0}function yo(t,e){if(t.scrollWidth>t.clientWidth+Rr)return!0;let r=t.scrollHeight;return e!==void 0?r>e+Rr:r>t.clientHeight+Rr}function mo(t){if(t.getAttribute("data-fit")!=="shrink")return;let e=po(Pr(t,"data-fit-min")),r=Math.max(Pr(t,"data-fit-base")??e,e),n=Pr(t,"data-fit-mm"),i=n!==void 0&&n>0?_o(n):void 0,o=l=>{let s=vo(l);return t.style.fontSize=`${s}pt`,t.setAttribute("data-fit-size",String(s)),s},u=o(r);if(!yo(t,i)||r<=e)return u;let a=e,f=r;for(let l=0;l<P1;l++){let s=(a+f)/2;o(s),yo(t,i)?f=s:a=s}return o(a)}function Ir(t){let e=[];return t.querySelectorAll('[data-fit="shrink"]').forEach(r=>{let n=mo(r),i=r.getAttribute("data-fit-key");n===void 0||!i||e.push({key:i,fontSizePt:n})}),e}var I1="2",B1=5e3;async function C1(t,e=B1){let r=t.document,n=o=>Promise.race([o,new Promise(u=>setTimeout(u,e))]),i=(async()=>{r.readyState!=="complete"&&await n(new Promise(u=>t.addEventListener("load",()=>u(),{once:!0})));let o=r.fonts;o&&(await n(Promise.all(L1(r).map(u=>o.load(`${u.style} ${u.weight} 16px "${u.family}"`).catch(()=>{})))),o.ready&&await n(o.ready)),await n(Promise.all(Array.from(r.images??[]).map(u=>u.complete?Promise.resolve():new Promise(a=>{u.addEventListener("load",()=>a(),{once:!0}),u.addEventListener("error",()=>a(),{once:!0})}))))})();await n(i)}function L1(t){let e=[];for(let n of Array.from(t.styleSheets??[])){let i;try{i=n.cssRules}catch{continue}for(let o of Array.from(i??[])){if(o.type!==5)continue;let u=o.style,a=(u.getPropertyValue("font-family")||"").replace(/^["']|["']$/g,"");a&&e.push({family:a,weight:u.getPropertyValue("font-weight")||"400",style:u.getPropertyValue("font-style")||"normal"})}}return e}function N1(t){let e=[];return t.querySelectorAll("[data-measure-id]").forEach(r=>{let n=r,i=n.getAttribute("data-measure-id");if(!i)return;let o=n.getBoundingClientRect().height,u=n.querySelector("table.print-table");if(!u){e.push({id:i,heightPx:o});return}let a=[];u.querySelectorAll("tbody > tr[data-row-index]").forEach(f=>{a.push(f.getBoundingClientRect().height)}),e.push({id:i,heightPx:o,rowHeightsPx:a})}),e}function D1(t){let e=t.querySelector(".print-page"),r=t.querySelector(".content-area");if(!e||!r)return 0;let n=e.getBoundingClientRect().top,i=0;r.querySelectorAll("*").forEach(u=>{let a=u.getBoundingClientRect();a.height>0&&(i=Math.max(i,a.bottom-n))});let o=r.getBoundingClientRect();return o.height>0&&(i=Math.max(i,o.bottom-n)),i}function k1(t){let e={};for(let r of t)try{e[r.key]=go(r.value,r.cellType,r.opts)}catch{}return e}var Eo={version:I1,waitReady:C1,readMeasurements:N1,readContentBottom:D1,renderCodes:k1,applyTextFit:Ir};globalThis.__wormDom=Eo;})();
|