@devraghu/electron-printer 1.0.0 → 1.1.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 CHANGED
@@ -2,9 +2,9 @@
2
2
  ![Version](https://img.shields.io/npm/v/@devraghu/electron-printer?label=version)
3
3
  ![downloads](https://img.shields.io/npm/dm/@devraghu/electron-printer)
4
4
 
5
- # Electron-printer
5
+ # Electron Printer
6
6
 
7
- An Electron.js plugin for thermal receipt printers. Supports 80mm, 78mm, 76mm, 58mm, 57mm, and 44mm printers.
7
+ An Electron.js plugin for thermal receipt printers and cash drawers. Supports 80mm, 78mm, 76mm, 58mm, 57mm, and 44mm printers with cash drawer integration.
8
8
 
9
9
  **Requirements:** Electron >= 30.x.x
10
10
 
@@ -66,7 +66,7 @@ posPrinter
66
66
  ## TypeScript Usage
67
67
 
68
68
  ```typescript
69
- import { posPrinter, type PosPrintData, type PosPrintOptions } from '@devraghu/electron-printer';
69
+ import { posPrinter, type PosPrintData, type PosPrintOptions, type PrintResult } from '@devraghu/electron-printer';
70
70
 
71
71
  const options: PosPrintOptions = {
72
72
  preview: false,
@@ -225,6 +225,36 @@ Tables can contain text and images in cells:
225
225
  | `tableBodyStyle` | `object` | Body styling |
226
226
  | `tableFooterStyle` | `object` | Footer styling |
227
227
 
228
+ ## Additional Features
229
+
230
+ ### Get Available Printers
231
+
232
+ Retrieve a list of all available printers on the system:
233
+
234
+ ```typescript
235
+ import { posPrinter } from '@devraghu/electron-printer';
236
+
237
+ const printers = posPrinter.getPrinters();
238
+ console.log(printers);
239
+ // [{ name: 'XP-80C', isDefault: true, ... }, ...]
240
+ ```
241
+
242
+ ### Cash Drawer
243
+
244
+ Open a cash drawer connected to a thermal printer:
245
+
246
+ ```typescript
247
+ import { posPrinter } from '@devraghu/electron-printer';
248
+
249
+ // Open cash drawer on specific printer
250
+ posPrinter
251
+ .openCashDrawer('XP-80C')
252
+ .then(() => console.log('Cash drawer opened'))
253
+ .catch((error) => console.error('Failed to open cash drawer:', error));
254
+ ```
255
+
256
+ ---
257
+
228
258
  ## Project Structure
229
259
 
230
260
  ```
@@ -240,8 +270,7 @@ electron-printer/
240
270
  │ │ ├── utils.ts # HTML generation
241
271
  │ │ └── index.html # Print template
242
272
  │ └── preload/
243
- ├── preload.ts # Preload script
244
- │ └── types.ts # Preload API types
273
+ └── preload.ts # Preload script with API types
245
274
  ├── demo/ # Demo application
246
275
  ├── test/ # Playwright E2E tests
247
276
  └── dist/ # Compiled output
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{fileURLToPath as e}from"node:url";var r=e(import.meta.url.replace(/\/(?:[^\/]*)$/,""));import{BrowserWindow as t,ipcMain as o}from"electron";import{join as n}from"path";import{PrinterErrorCodes as a,PrinterStatus as i,PrinterType as s,getAvailablePrinters as p,openCashDrawer as c}from"@devraghu/cashdrawer";var l={};function d(e,r,t){return new Promise((n,a)=>{o.once(`${e}-reply`,(e,r)=>{r.status?n(r):a(r.error)}),r.send(e,t)})}function h(e){let r=1200,t=219;if("string"==typeof e)switch(e){case"44mm":t=166;break;case"57mm":t=215;break;case"58mm":t=219;break;case"76mm":t=287;break;case"78mm":t=295;break;case"80mm":t=302}else"object"==typeof e&&(t=e.width,r=e.height);return{width:t,height:r}}function m(e){return Math.ceil(264.5833*e)}if(l.d=(e,r)=>{for(var t in r)l.o(r,t)&&!l.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},l.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),"renderer"===process.type)throw new Error("electron-pos-printer: this module must be used in the main process only");const w={print:(e,o)=>new Promise((a,i)=>{o.preview||o.printerName||o.silent||i(new Error("A printer name is required, if you don't want to specify a printer name, set silent to true")),"object"!=typeof o.pageSize||o.pageSize.height&&o.pageSize.width||i(new Error("height and width properties are required for options.pageSize"));let s=!1,p=null;const c=o.timeOutPerLine?o.timeOutPerLine*e.length+200:400*e.length+200;o.preview||o.silent||setTimeout(()=>{if(!s){const e=p||new Error("[TimedOutError] Make sure your printer is connected");i(e),s=!0}},c);let l=new t({...h(o.pageSize),show:!!o.preview,webPreferences:{nodeIntegration:!1,contextIsolation:!0,sandbox:!1,preload:n(r,"preload/preload.cjs")}});l.on("closed",()=>{l=null}),l.loadFile(o.pathTemplate||n(r,"renderer/index.html")),l.webContents.on("did-finish-load",async()=>{if(l)return await d("body-init",l.webContents,o),(async(e,r)=>{for(const[t,o]of r.entries()){if("image"===o.type&&!o.path&&!o.url)throw e.close(),new Error("An Image url/path is required for type image");if(o.style&&"object"!=typeof o.style)throw e.close(),new Error('`options.styles` at "'+o.style+'" should be an object. Example: {style: {fontSize: 12}}');const r=await d("render-line",e.webContents,{line:o,lineIndex:t});if(!r.status)throw e.close(),new Error(`Failed to render line ${t} (type: ${o.type}): ${r.error||"Unknown error"}`)}return{message:"page-rendered"}})(l,e).then(async()=>{if(!l)return void i(new Error("Window was closed during rendering"));let{width:r,height:t}=function(e){let r=1e4,t=58e3;if("string"==typeof e)switch(e){case"44mm":t=Math.ceil(44e3);break;case"57mm":t=Math.ceil(57e3);break;case"58mm":t=Math.ceil(58e3);break;case"76mm":t=Math.ceil(76e3);break;case"78mm":t=Math.ceil(78e3);break;case"80mm":t=Math.ceil(8e4)}else"object"==typeof e&&(t=m(e.width),r=m(e.height));return{width:t,height:r}}(o.pageSize);if("string"==typeof o.pageSize){t=m(await l.webContents.executeJavaScript("document.body.clientHeight"))}o.preview?a({complete:!0,data:e,options:o}):l.webContents.print({silent:!!o.silent,printBackground:!!o.printBackground,deviceName:o.printerName,copies:o?.copies||1,pageSize:{width:r,height:t},...o.header&&{header:o.header},...o.footer&&{footer:o.footer},...o.color&&{color:o.color},...o.printBackground&&{printBackground:o.printBackground},...o.margins&&{margins:o.margins},...o.landscape&&{landscape:o.landscape},...o.scaleFactor&&{scaleFactor:o.scaleFactor},...o.pagesPerSheet&&{pagesPerSheet:o.pagesPerSheet},...o.collate&&{collate:o.collate},...o.pageRanges&&{pageRanges:o.pageRanges},...o.duplexMode&&{duplexMode:o.duplexMode},...o.dpi&&{dpi:o.dpi}},(e,r)=>{r&&(p=new Error(r),i(p)),s||(a({complete:e,options:o}),s=!0),l?.close()})}).catch(e=>i(e));i(new Error("Window was closed before loading completed"))})}),openCashDrawer:c,getPrinters:p};export{a as PrinterErrorCodes,i as PrinterStatus,s as PrinterType,w as posPrinter};
1
+ import{fileURLToPath as e}from"node:url";var r=e(import.meta.url.replace(/\/(?:[^\/]*)$/,""));import{BrowserWindow as t,ipcMain as o}from"electron";import{join as n}from"node:path";import{PrinterErrorCodes as a,PrinterStatus as i,PrinterType as s,getAvailablePrinters as p,openCashDrawer as c}from"@devraghu/cashdrawer";var l={};function d(e,r,t){return new Promise((n,a)=>{o.once(`${e}-reply`,(e,r)=>{r.status?n(r):a(r.error)}),r.send(e,t)})}function h(e){let r=1200,t=219;if("string"==typeof e)switch(e){case"44mm":t=166;break;case"57mm":t=215;break;case"58mm":t=219;break;case"76mm":t=287;break;case"78mm":t=295;break;case"80mm":t=302}else"object"==typeof e&&(t=e.width,r=e.height);return{width:t,height:r}}function m(e){return Math.ceil(264.5833*e)}if(l.d=(e,r)=>{for(var t in r)l.o(r,t)&&!l.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},l.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),"renderer"===process.type)throw new Error("electron-pos-printer: this module must be used in the main process only");const w={print:(e,o)=>new Promise((a,i)=>{o.preview||o.printerName||o.silent||i(new Error("A printer name is required, if you don't want to specify a printer name, set silent to true")),"object"!=typeof o.pageSize||o.pageSize.height&&o.pageSize.width||i(new Error("height and width properties are required for options.pageSize"));let s=!1,p=null;const c=o.timeOutPerLine?o.timeOutPerLine*e.length+200:400*e.length+200;o.preview||o.silent||setTimeout(()=>{if(!s){const e=p||new Error("[TimedOutError] Make sure your printer is connected");i(e),s=!0}},c);let l=new t({...h(o.pageSize),show:!!o.preview,webPreferences:{nodeIntegration:!1,contextIsolation:!0,sandbox:!1,preload:n(r,"preload/preload.cjs")}});l.on("closed",()=>{l=null}),l.loadFile(o.pathTemplate||n(r,"renderer/index.html")),l.webContents.on("did-finish-load",async()=>{if(l)return await d("body-init",l.webContents,o),(async(e,r)=>{for(const[t,o]of r.entries()){if("image"===o.type&&!o.path&&!o.url)throw e.close(),new Error("An Image url/path is required for type image");if(o.style&&"object"!=typeof o.style)throw e.close(),new Error('`options.styles` at "'+o.style+'" should be an object. Example: {style: {fontSize: 12}}');const r=await d("render-line",e.webContents,{line:o,lineIndex:t});if(!r.status)throw e.close(),new Error(`Failed to render line ${t} (type: ${o.type}): ${r.error||"Unknown error"}`)}return{message:"page-rendered"}})(l,e).then(async()=>{if(!l)return void i(new Error("Window was closed during rendering"));let{width:r,height:t}=function(e){let r=1e4,t=58e3;if("string"==typeof e)switch(e){case"44mm":t=Math.ceil(44e3);break;case"57mm":t=Math.ceil(57e3);break;case"58mm":t=Math.ceil(58e3);break;case"76mm":t=Math.ceil(76e3);break;case"78mm":t=Math.ceil(78e3);break;case"80mm":t=Math.ceil(8e4)}else"object"==typeof e&&(t=m(e.width),r=m(e.height));return{width:t,height:r}}(o.pageSize);if("string"==typeof o.pageSize){t=m(await l.webContents.executeJavaScript("document.body.clientHeight"))}o.preview?a({complete:!0,data:e,options:o}):l.webContents.print({silent:!!o.silent,printBackground:!!o.printBackground,deviceName:o.printerName,copies:o?.copies||1,pageSize:{width:r,height:t},...o.header&&{header:o.header},...o.footer&&{footer:o.footer},...o.color&&{color:o.color},...o.printBackground&&{printBackground:o.printBackground},...o.margins&&{margins:o.margins},...o.landscape&&{landscape:o.landscape},...o.scaleFactor&&{scaleFactor:o.scaleFactor},...o.pagesPerSheet&&{pagesPerSheet:o.pagesPerSheet},...o.collate&&{collate:o.collate},...o.pageRanges&&{pageRanges:o.pageRanges},...o.duplexMode&&{duplexMode:o.duplexMode},...o.dpi&&{dpi:o.dpi}},(e,r)=>{r&&(p=new Error(r),i(p)),s||(a({complete:e,options:o}),s=!0),l?.close()})}).catch(e=>i(e));i(new Error("Window was closed before loading completed"))})}),openCashDrawer:c,getPrinters:p};export{a as PrinterErrorCodes,i as PrinterStatus,s as PrinterType,w as posPrinter};
@@ -1 +1 @@
1
- (()=>{"use strict";const e=require("electron"),r=require("fs"),n=require("path"),s={onBodyInit:r=>{e.ipcRenderer.on("body-init",(e,n)=>{r(n)})},onRenderLine:r=>{e.ipcRenderer.on("render-line",(e,n)=>{r(n)})},sendBodyInitReply:r=>{e.ipcRenderer.send("body-init-reply",r)},sendRenderLineReply:r=>{e.ipcRenderer.send("render-line-reply",r)},readFileAsBase64:e=>{try{const s=n.resolve(e),i=process.cwd();if(!s.startsWith(i+n.sep)&&s!==i)return{success:!1,error:"Access denied: Path outside allowed directory"};if(!r.existsSync(s))return{success:!1,error:"File not found"};return{success:!0,data:r.readFileSync(s).toString("base64")}}catch(e){return{success:!1,error:e.message}}},getFileExtension:e=>n.extname(e).slice(1)};e.contextBridge.exposeInMainWorld("electronAPI",s)})();
1
+ (()=>{"use strict";const e=require("electron"),r=require("node:fs"),n=require("node:path"),s={onBodyInit:r=>{e.ipcRenderer.on("body-init",(e,n)=>{r(n)})},onRenderLine:r=>{e.ipcRenderer.on("render-line",(e,n)=>{r(n)})},sendBodyInitReply:r=>{e.ipcRenderer.send("body-init-reply",r)},sendRenderLineReply:r=>{e.ipcRenderer.send("render-line-reply",r)},readFileAsBase64:e=>{try{const s=n.resolve(e),i=process.cwd();if(!s.startsWith(i+n.sep)&&s!==i)return{success:!1,error:"Access denied: Path outside allowed directory"};if(!r.existsSync(s))return{success:!1,error:"File not found"};return{success:!0,data:r.readFileSync(s).toString("base64")}}catch(e){return{success:!1,error:e.message}}},getFileExtension:e=>n.extname(e).slice(1)};e.contextBridge.exposeInMainWorld("electronAPI",s)})();
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see renderer.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.renderer=e():t.renderer=e()}(self,()=>(()=>{var t={6320(t){"use strict";var e={single_source_shortest_paths:function(t,n,r){var o={},i={};i[n]=0;var a,u,s,l,c,f,d,p=e.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(s in u=(a=p.pop()).value,l=a.cost,c=t[u]||{})c.hasOwnProperty(s)&&(f=l+c[s],d=i[s],(void 0===i[s]||d>f)&&(i[s]=f,p.push(s,f),o[s]=u));if(void 0!==r&&void 0===i[r]){var h=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(h)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var o=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,o={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e},6129(t,e,n){"use strict";var r=d(n(9368)),o=d(n(1490)),i=d(n(8165)),a=d(n(3623)),u=d(n(8179)),s=d(n(9796)),l=d(n(4205)),c=n(8157),f=d(n(5099));function d(t){return t&&t.__esModule?t:{default:t}}var p=function(){},h=function(t,e,n){var r=new p;if(void 0===t)throw Error("No element to render on was provided.");return r._renderProperties=(0,u.default)(t),r._encodings=[],r._options=f.default,r._errorHandler=new l.default(r),void 0!==e&&((n=n||{}).format||(n.format=b()),r.options(n)[n.format](e,n).render()),r};for(var g in h.getModule=function(t){return r.default[t]},r.default)r.default.hasOwnProperty(g)&&y(r.default,g);function y(t,e){p.prototype[e]=p.prototype[e.toUpperCase()]=p.prototype[e.toLowerCase()]=function(n,r){var i=this;return i._errorHandler.wrapBarcodeCall(function(){r.text=void 0===r.text?void 0:""+r.text;var a=(0,o.default)(i._options,r);a=(0,s.default)(a);var u=t[e],l=m(n,u,a);return i._encodings.push(l),i})}}function m(t,e,n){var r=new e(t=""+t,n);if(!r.valid())throw new c.InvalidInputException(r.constructor.name,t);var a=r.encode();a=(0,i.default)(a);for(var u=0;u<a.length;u++)a[u].options=(0,o.default)(n,a[u].options);return a}function b(){return r.default.CODE128?"CODE128":Object.keys(r.default)[0]}function v(t,e,n){e=(0,i.default)(e);for(var r=0;r<e.length;r++)e[r].options=(0,o.default)(n,e[r].options),(0,a.default)(e[r].options);(0,a.default)(n),new(0,t.renderer)(t.element,e,n).render(),t.afterRender&&t.afterRender()}p.prototype.options=function(t){return this._options=(0,o.default)(this._options,t),this},p.prototype.blank=function(t){var e=new Array(t+1).join("0");return this._encodings.push({data:e}),this},p.prototype.init=function(){var t;if(this._renderProperties)for(var e in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){t=this._renderProperties[e];var n=(0,o.default)(this._options,t.options);"auto"==n.format&&(n.format=b()),this._errorHandler.wrapBarcodeCall(function(){var e=m(n.value,r.default[n.format.toUpperCase()],n);v(t,e,n)})}},p.prototype.render=function(){if(!this._renderProperties)throw new c.NoElementException;if(Array.isArray(this._renderProperties))for(var t=0;t<this._renderProperties.length;t++)v(this._renderProperties[t],this._encodings,this._options);else v(this._renderProperties,this._encodings,this._options);return this},p.prototype._defaults=f.default,"undefined"!=typeof window&&(window.JsBarcode=h),"undefined"!=typeof jQuery&&(jQuery.fn.JsBarcode=function(t,e){var n=[];return jQuery(this).each(function(){n.push(this)}),h(n,t,e)}),t.exports=h},2444(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e,this.text=n.text||e,this.options=n}},3651(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(2444),a=(r=i)&&r.__esModule?r:{default:r},u=n(2700);var s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.substring(1),n));return r.bytes=t.split("").map(function(t){return t.charCodeAt(0)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.bytes,n=t.shift()-105,r=u.SET_BY_CODE[n];if(void 0===r)throw new RangeError("The encoding does not start with a start character.");!0===this.shouldEncodeAsEan128()&&t.unshift(u.FNC1);var o=e.next(t,1,r);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:e.getBar(n)+o.result+e.getBar((o.checksum+n)%u.MODULO)+e.getBar(u.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var t=this.options.ean128||!1;return"string"==typeof t&&(t="true"===t.toLowerCase()),t}}],[{key:"getBar",value:function(t){return u.BARS[t]?u.BARS[t].toString():""}},{key:"correctIndex",value:function(t,e){if(e===u.SET_A){var n=t.shift();return n<32?n+64:n-32}return e===u.SET_B?t.shift()-32:10*(t.shift()-48)+t.shift()-48}},{key:"next",value:function(t,n,r){if(!t.length)return{result:"",checksum:0};var o=void 0,i=void 0;if(t[0]>=200){i=t.shift()-105;var a=u.SWAP[i];void 0!==a?o=e.next(t,n+1,a):(r!==u.SET_A&&r!==u.SET_B||i!==u.SHIFT||(t[0]=r===u.SET_A?t[0]>95?t[0]-96:t[0]:t[0]<32?t[0]+96:t[0]),o=e.next(t,n+1,r))}else i=e.correctIndex(t,r),o=e.next(t,n+1,r);var s=i*n;return{result:e.getBar(i)+o.result,checksum:s+o.checksum}}}]),e}(a.default);e.default=s},3804(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(3651),a=(r=i)&&r.__esModule?r:{default:r},u=n(2700);var s=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u.A_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return new RegExp("^"+u.A_CHARS+"+$").test(this.data)}}]),e}(a.default);e.default=s},3541(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(3651),a=(r=i)&&r.__esModule?r:{default:r},u=n(2700);var s=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u.B_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return new RegExp("^"+u.B_CHARS+"+$").test(this.data)}}]),e}(a.default);e.default=s},5798(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(3651),a=(r=i)&&r.__esModule?r:{default:r},u=n(2700);var s=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u.C_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return new RegExp("^"+u.C_CHARS+"+$").test(this.data)}}]),e}(a.default);e.default=s},4845(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(3651)),o=i(n(4802));function i(t){return t&&t.__esModule?t:{default:t}}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var u=function(t){function e(t,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(t))var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,o.default)(t),n));else r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return a(r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(r.default);e.default=u},4802(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2700),o=function(t){return t.match(new RegExp("^"+r.A_CHARS+"*"))[0].length},i=function(t){return t.match(new RegExp("^"+r.B_CHARS+"*"))[0].length},a=function(t){return t.match(new RegExp("^"+r.C_CHARS+"*"))[0]};function u(t,e){var n=e?r.A_CHARS:r.B_CHARS,o=t.match(new RegExp("^("+n+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(o)return o[1]+String.fromCharCode(204)+s(t.substring(o[1].length));var i=t.match(new RegExp("^"+n+"+"))[0];return i.length===t.length?t:i+String.fromCharCode(e?205:206)+u(t.substring(i.length),!e)}function s(t){var e=a(t),n=e.length;if(n===t.length)return t;t=t.substring(n);var r=o(t)>=i(t);return e+String.fromCharCode(r?206:205)+u(t,r)}e.default=function(t){var e=void 0;if(a(t).length>=2)e=r.C_START_CHAR+s(t);else{var n=o(t)>i(t);e=(n?r.A_START_CHAR:r.B_START_CHAR)+u(t,n)}return e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})}},2700(t,e){"use strict";var n;function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0});var o=e.SET_A=0,i=e.SET_B=1,a=e.SET_C=2,u=(e.SHIFT=98,e.START_A=103),s=e.START_B=104,l=e.START_C=105;e.MODULO=103,e.STOP=106,e.FNC1=207,e.SET_BY_CODE=(r(n={},u,o),r(n,s,i),r(n,l,a),n),e.SWAP={101:o,100:i,99:a},e.A_START_CHAR=String.fromCharCode(208),e.B_START_CHAR=String.fromCharCode(209),e.C_START_CHAR=String.fromCharCode(210),e.A_CHARS="[\0-_È-Ï]",e.B_CHARS="[ -È-Ï]",e.C_CHARS="(Ï*[0-9]{2}Ï*)",e.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]},1509(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var r=u(n(4845)),o=u(n(3804)),i=u(n(3541)),a=u(n(5798));function u(t){return t&&t.__esModule?t:{default:t}}e.CODE128=r.default,e.CODE128A=o.default,e.CODE128B=i.default,e.CODE128C=a.default},1428(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CODE39=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(2444);var a=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=t.toUpperCase(),n.mod43&&(t+=function(t){return u[t]}(function(t){for(var e=0,n=0;n<t.length;n++)e+=c(t[n]);return e%=43}(t))),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"encode",value:function(){for(var t=l("*"),e=0;e<this.data.length;e++)t+=l(this.data[e])+"0";return{data:t+=l("*"),text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),e}(((r=i)&&r.__esModule?r:{default:r}).default),u=["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","-","."," ","$","/","+","%","*"],s=[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 l(t){return function(t){return s[t].toString(2)}(c(t))}function c(t){return u.indexOf(t)}e.CODE39=a},1087(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(6929),a=n(2444);var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.data.split("").flatMap(function(t){return i.MULTI_SYMBOLS[t]||t}),n=t.map(function(t){return e.getEncoding(t)}).join(""),r=e.checksum(t,20),o=e.checksum(t.concat(r),15);return{text:this.text,data:e.getEncoding("ÿ")+n+e.getEncoding(r)+e.getEncoding(o)+e.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(t){return i.BINARIES[e.symbolValue(t)]}},{key:"getSymbol",value:function(t){return i.SYMBOLS[t]}},{key:"symbolValue",value:function(t){return i.SYMBOLS.indexOf(t)}},{key:"checksum",value:function(t,n){var r=t.slice().reverse().reduce(function(t,r,o){var i=o%n+1;return t+e.symbolValue(r)*i},0);return e.getSymbol(r%47)}}]),e}(((r=a)&&r.__esModule?r:{default:r}).default);e.default=u},1271(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(1087);var a=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),e}(((r=i)&&r.__esModule?r:{default:r}).default);e.default=a},6929(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.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","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],e.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"],e.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"":["($)","G"],"\b":["($)","H"],"\t":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"":["(%)","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"],"":["(%)","T"]}},9852(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CODE93FullASCII=e.CODE93=void 0;var r=i(n(1087)),o=i(n(1271));function i(t){return t&&t.__esModule?t:{default:t}}e.CODE93=r.default,e.CODE93FullASCII=o.default},4754(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(6575),i=a(n(6350));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.fontSize=!n.flat&&n.fontSize>10*n.width?10*n.width:n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(t,e){return this.text.substr(t,e)}},{key:"leftEncode",value:function(t,e){return(0,i.default)(t,e)}},{key:"rightText",value:function(t,e){return this.text.substr(t,e)}},{key:"rightEncode",value:function(t,e){return(0,i.default)(t,e)}},{key:"encodeGuarded",value:function(){var t={fontSize:this.fontSize},e={height:this.guardHeight};return[{data:o.SIDE_BIN,options:e},{data:this.leftEncode(),text:this.leftText(),options:t},{data:o.MIDDLE_BIN,options:e},{data:this.rightEncode(),text:this.rightText(),options:t},{data:o.SIDE_BIN,options:e}]}},{key:"encodeFlat",value:function(){return{data:[o.SIDE_BIN,this.leftEncode(),o.MIDDLE_BIN,this.rightEncode(),o.SIDE_BIN].join(""),text:this.text}}}]),e}(a(n(2444)).default);e.default=u},4250(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n(6575),u=n(4754),s=(r=u)&&r.__esModule?r:{default:r};var l=function(t){return(10-t.substr(0,12).split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+3*e:t+e},0)%10)%10},c=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{12}$/)&&(t+=l(t));var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.lastChar=n.lastChar,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===l(this.data)}},{key:"leftText",value:function(){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var t=this.data.substr(1,6),n=a.EAN13_STRUCTURE[this.data[0]];return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,t,n)}},{key:"rightText",value:function(){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var t=this.data.substr(7,6);return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,t,"RRRRRR")}},{key:"encodeGuarded",value:function(){var t=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(t.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(t.push({data:"00"}),t.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),t}}]),e}(s.default);e.default=c},7570(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(6575),i=a(n(6350));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var t=o.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,i.default)(this.data,t,"01"),text:this.text}}}]),e}(a(n(2444)).default);e.default=u},8075(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(6575),i=u(n(6350)),a=u(n(2444));function u(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var t,e=o.EAN5_STRUCTURE[(t=this.data,t.split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+9*e:t+3*e},0)%10)];return{data:"1011"+(0,i.default)(this.data,e,"01"),text:this.text}}}]),e}(a.default);e.default=s},8784(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n(4754),u=(r=a)&&r.__esModule?r:{default:r};var s=function(t){return(10-t.substr(0,7).split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+e:t+3*e},0)%10)%10},l=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{7}$/)&&(t+=s(t)),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&+this.data[7]===s(this.data)}},{key:"leftText",value:function(){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var t=this.data.substr(0,4);return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,t,"LLLL")}},{key:"rightText",value:function(){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var t=this.data.substr(4,4);return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,t,"RRRR")}}]),e}(u.default);e.default=l},7960(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();e.checksum=u;var o=i(n(6350));function i(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{11}$/)&&(t+=u(t));var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.displayValue=n.displayValue,n.fontSize>10*n.width?r.fontSize=10*n.width:r.fontSize=n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==u(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t="";return t+="101",t+=(0,o.default)(this.data.substr(0,6),"LLLLLL"),t+="01010",t+=(0,o.default)(this.data.substr(6,6),"RRRRRR"),{data:t+="101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101"+(0,o.default)(this.data[0],"L"),options:{height:this.guardHeight}}),t.push({data:(0,o.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),t.push({data:"01010",options:{height:this.guardHeight}}),t.push({data:(0,o.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),t.push({data:(0,o.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),t}}]),e}(i(n(2444)).default);function u(t){var e,n=0;for(e=1;e<11;e+=2)n+=parseInt(t[e]);for(e=0;e<11;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10}e.default=a},3781(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=u(n(6350)),i=u(n(2444)),a=n(7960);function u(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var l=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],c=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],f=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=s(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(r.isValid=!1,-1!==t.search(/^[0-9]{6}$/))r.middleDigits=t,r.upcA=d(t,"0"),r.text=n.text||""+r.upcA[0]+t+r.upcA[r.upcA.length-1],r.isValid=!0;else{if(-1===t.search(/^[01][0-9]{7}$/))return s(r);if(r.middleDigits=t.substring(1,t.length-1),r.upcA=d(r.middleDigits,t[0]),r.upcA[r.upcA.length-1]!==t[t.length-1])return s(r);r.isValid=!0}return r.displayValue=n.displayValue,n.fontSize>10*n.width?r.fontSize=10*n.width:r.fontSize=n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(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 t="";return t+="101",t+=this.encodeMiddleDigits(),{data:t+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101",options:{height:this.guardHeight}}),t.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),t.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),t}},{key:"encodeMiddleDigits",value:function(){var t=this.upcA[0],e=this.upcA[this.upcA.length-1],n=c[parseInt(e)][parseInt(t)];return(0,o.default)(this.middleDigits,n)}}]),e}(i.default);function d(t,e){for(var n=parseInt(t[t.length-1]),r=l[n],o="",i=0,u=0;u<r.length;u++){var s=r[u];o+="X"===s?t[i++]:s}return""+(o=""+e+o)+(0,a.checksum)(o)}e.default=f},6575(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.SIDE_BIN="101",e.MIDDLE_BIN="01010",e.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"]},e.EAN2_STRUCTURE=["LL","LG","GL","GG"],e.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],e.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]},6350(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6575);e.default=function(t,e,n){var o=t.split("").map(function(t,n){return r.BINARIES[e[n]]}).map(function(e,n){return e?e[t[n]]:""});if(n){var i=t.length-1;o=o.map(function(t,e){return e<i?t+n:t})}return o.join("")}},5726(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UPCE=e.UPC=e.EAN2=e.EAN5=e.EAN8=e.EAN13=void 0;var r=l(n(4250)),o=l(n(8784)),i=l(n(8075)),a=l(n(7570)),u=l(n(7960)),s=l(n(3781));function l(t){return t&&t.__esModule?t:{default:t}}e.EAN13=r.default,e.EAN8=o.default,e.EAN5=i.default,e.EAN2=a.default,e.UPC=u.default,e.UPCE=s.default},1886(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GenericBarcode=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(2444);var a=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),e}(((r=i)&&r.__esModule?r:{default:r}).default);e.GenericBarcode=a},739(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(1135),a=n(2444);var u=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return-1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var t=this,e=this.data.match(/.{2}/g).map(function(e){return t.encodePair(e)}).join("");return{data:i.START_BIN+e+i.END_BIN,text:this.text}}},{key:"encodePair",value:function(t){var e=i.BINARIES[t[1]];return i.BINARIES[t[0]].split("").map(function(t,n){return("1"===t?"111":"1")+("1"===e[n]?"000":"0")}).join("")}}]),e}(((r=a)&&r.__esModule?r:{default:r}).default);e.default=u},8122(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(739),a=(r=i)&&r.__esModule?r:{default:r};var u=function(t){var e=t.substr(0,13).split("").map(function(t){return parseInt(t,10)}).reduce(function(t,e,n){return t+e*(3-n%2*2)},0);return 10*Math.ceil(e/10)-e},s=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{13}$/)&&(t+=u(t)),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{14}$/)&&+this.data[13]===u(this.data)}}]),e}(a.default);e.default=s},1135(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.START_BIN="1010",e.END_BIN="11101",e.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]},5070(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITF14=e.ITF=void 0;var r=i(n(739)),o=i(n(8122));function i(t){return t&&t.__esModule?t:{default:t}}e.ITF=r.default,e.ITF14=o.default},3551(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(2444);var a=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"encode",value:function(){for(var t="110",e=0;e<this.data.length;e++){var n=parseInt(this.data[e]).toString(2);n=u(n,4-n.length);for(var r=0;r<n.length;r++)t+="0"==n[r]?"100":"110"}return{data:t+="1001",text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]+$/)}}]),e}(((r=i)&&r.__esModule?r:{default:r}).default);function u(t,e){for(var n=0;n<e;n++)t="0"+t;return t}e.default=a},6338(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(3551),i=(r=o)&&r.__esModule?r:{default:r},a=n(291);var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+(0,a.mod10)(t),n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i.default);e.default=u},23(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(3551),i=(r=o)&&r.__esModule?r:{default:r},a=n(291);var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=(0,a.mod10)(t),t+=(0,a.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i.default);e.default=u},6065(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(3551),i=(r=o)&&r.__esModule?r:{default:r},a=n(291);var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+(0,a.mod11)(t),n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i.default);e.default=u},7052(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(3551),i=(r=o)&&r.__esModule?r:{default:r},a=n(291);var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=(0,a.mod11)(t),t+=(0,a.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i.default);e.default=u},291(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mod10=function(t){for(var e=0,n=0;n<t.length;n++){var r=parseInt(t[n]);(n+t.length)%2==0?e+=r:e+=2*r%10+Math.floor(2*r/10)}return(10-e%10)%10},e.mod11=function(t){for(var e=0,n=[2,3,4,5,6,7],r=0;r<t.length;r++){var o=parseInt(t[t.length-1-r]);e+=n[r%n.length]*o}return(11-e%11)%11}},8248(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MSI1110=e.MSI1010=e.MSI11=e.MSI10=e.MSI=void 0;var r=s(n(3551)),o=s(n(6338)),i=s(n(6065)),a=s(n(23)),u=s(n(7052));function s(t){return t&&t.__esModule?t:{default:t}}e.MSI=r.default,e.MSI10=o.default,e.MSI11=i.default,e.MSI1010=a.default,e.MSI1110=u.default},1133(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.codabar=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(2444);var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),0===t.search(/^[0-9\-\$\:\.\+\/]+$/)&&(t="A"+t+"A");var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.toUpperCase(),n));return r.text=r.options.text||r.text.replace(/[A-D]/g,""),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var t=[],e=this.getEncodings(),n=0;n<this.data.length;n++)t.push(e[this.data.charAt(n)]),n!==this.data.length-1&&t.push("0");return{text:this.text,data:t.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}(((r=i)&&r.__esModule?r:{default:r}).default);e.codabar=a},9368(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1428),o=n(1509),i=n(5726),a=n(5070),u=n(8248),s=n(2889),l=n(1133),c=n(9852),f=n(1886);e.default={CODE39:r.CODE39,CODE128:o.CODE128,CODE128A:o.CODE128A,CODE128B:o.CODE128B,CODE128C:o.CODE128C,EAN13:i.EAN13,EAN8:i.EAN8,EAN5:i.EAN5,EAN2:i.EAN2,UPC:i.UPC,UPCE:i.UPCE,ITF14:a.ITF14,ITF:a.ITF,MSI:u.MSI,MSI10:u.MSI10,MSI11:u.MSI11,MSI1010:u.MSI1010,MSI1110:u.MSI1110,pharmacode:s.pharmacode,codabar:l.codabar,CODE93:c.CODE93,CODE93FullASCII:c.CODE93FullASCII,GenericBarcode:f.GenericBarcode}},2889(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pharmacode=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(2444);var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.number=parseInt(t,10),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"encode",value:function(){for(var t=this.number,e="";!isNaN(t)&&0!=t;)t%2==0?(e="11100"+e,t=(t-2)/2):(e="100"+e,t=(t-1)/2);return{data:e=e.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),e}(((r=i)&&r.__esModule?r:{default:r}).default);e.pharmacode=a},4205(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var r=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.api=e}return n(t,[{key:"handleCatch",value:function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(t){return this.handleCatch(t),this.api}}}]),t}();e.default=r},8157(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(e,o){n(this,t);var i=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.name="InvalidInputException",i.symbology=e,i.input=o,i.message='"'+i.input+'" is not a valid input for '+i.symbology,i}return o(t,Error),t}(),a=function(){function t(){n(this,t);var e=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="InvalidElementException",e.message="Not supported type to render on",e}return o(t,Error),t}(),u=function(){function t(){n(this,t);var e=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="NoElementException",e.message="No element to render on.",e}return o(t,Error),t}();e.InvalidInputException=i,e.InvalidElementException=a,e.NoElementException=u},3623(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(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}},892(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(9796)),o=i(n(5099));function i(t){return t&&t.__esModule?t:{default:t}}e.default=function(t){var e={};for(var n in o.default)o.default.hasOwnProperty(n)&&(t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(e[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(e[n]=t.getAttribute("data-"+n.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,r.default)(e)}},8179(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=u(n(892)),i=u(n(2727)),a=n(8157);function u(t){return t&&t.__esModule?t:{default:t}}function s(t){if("string"==typeof t)return function(t){var e=document.querySelectorAll(t);if(0===e.length)return;for(var n=[],r=0;r<e.length;r++)n.push(s(e[r]));return n}(t);if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++)e.push(s(t[n]));return e}if("undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLImageElement)return u=t,{element:l=document.createElement("canvas"),options:(0,o.default)(u),renderer:i.default.CanvasRenderer,afterRender:function(){u.setAttribute("src",l.toDataURL())}};if(t&&t.nodeName&&"svg"===t.nodeName.toLowerCase()||"undefined"!=typeof SVGElement&&t instanceof SVGElement)return{element:t,options:(0,o.default)(t),renderer:i.default.SVGRenderer};if("undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)return{element:t,options:(0,o.default)(t),renderer:i.default.CanvasRenderer};if(t&&t.getContext)return{element:t,renderer:i.default.CanvasRenderer};if(t&&"object"===(void 0===t?"undefined":r(t))&&!t.nodeName)return{element:t,renderer:i.default.ObjectRenderer};throw new a.InvalidElementException;var u,l}e.default=s},8165(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=[];return function t(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)t(n[r]);else n.text=n.text||"",n.data=n.data||"",e.push(n)}(t),e}},1490(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.default=function(t,e){return n({},t,e)}},9796(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&"string"==typeof t[n=e[n]]&&(t[n]=parseInt(t[n],10));"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue);return t}},5099(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={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(){}};e.default=n},1687(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(1490),a=(r=i)&&r.__esModule?r:{default:r},u=n(6258);var s=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=e,this.encodings=n,this.options=r}return o(t,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t<this.encodings.length;t++){var e=(0,a.default)(this.options,this.encodings[t].options);this.drawCanvasBarcode(e,this.encodings[t]),this.drawCanvasText(e,this.encodings[t]),this.moveCanvasDrawing(this.encodings[t])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var t=this.canvas.getContext("2d");t.save(),(0,u.calculateEncodingAttributes)(this.encodings,this.options,t);var e=(0,u.getTotalWidthOfEncodings)(this.encodings),n=(0,u.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=e+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,t.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(t.fillStyle=this.options.background,t.fillRect(0,0,this.canvas.width,this.canvas.height)),t.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(t,e){var n,r=this.canvas.getContext("2d"),o=e.data;n="top"==t.textPosition?t.marginTop+t.fontSize+t.textMargin:t.marginTop,r.fillStyle=t.lineColor;for(var i=0;i<o.length;i++){var a=i*t.width+e.barcodePadding;"1"===o[i]?r.fillRect(a,n,t.width,t.height):o[i]&&r.fillRect(a,n,t.width,t.height*o[i])}}},{key:"drawCanvasText",value:function(t,e){var n,r,o=this.canvas.getContext("2d"),i=t.fontOptions+" "+t.fontSize+"px "+t.font;t.displayValue&&(r="top"==t.textPosition?t.marginTop+t.fontSize-t.textMargin:t.height+t.textMargin+t.marginTop+t.fontSize,o.font=i,"left"==t.textAlign||e.barcodePadding>0?(n=0,o.textAlign="left"):"right"==t.textAlign?(n=e.width-1,o.textAlign="right"):(n=e.width/2,o.textAlign="center"),o.fillText(e.text,n,r))}},{key:"moveCanvasDrawing",value:function(t){this.canvas.getContext("2d").translate(t.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),t}();e.default=s},2727(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(1687)),o=a(n(5965)),i=a(n(3528));function a(t){return t&&t.__esModule?t:{default:t}}e.default={CanvasRenderer:r.default,SVGRenderer:o.default,ObjectRenderer:i.default}},3528(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var r=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.object=e,this.encodings=n,this.options=r}return n(t,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),t}();e.default=r},6258(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var r,o=n(1490),i=(r=o)&&r.__esModule?r:{default:r};function a(t,e){return e.height+(e.displayValue&&t.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function u(t,e,n){if(n.displayValue&&e<t){if("center"==n.textAlign)return Math.floor((t-e)/2);if("left"==n.textAlign)return 0;if("right"==n.textAlign)return Math.floor(t-e)}return 0}function s(t,e,n){var r;if(n)r=n;else{if("undefined"==typeof document)return 0;r=document.createElement("canvas").getContext("2d")}r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var o=r.measureText(t);return o?o.width:0}e.getMaximumHeightOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)t[n].height>e&&(e=t[n].height);return e},e.getEncodingHeight=a,e.getBarcodePadding=u,e.calculateEncodingAttributes=function(t,e,n){for(var r=0;r<t.length;r++){var o,l=t[r],c=(0,i.default)(e,l.options);o=c.displayValue?s(l.text,c,n):0;var f=l.data.length*c.width;l.width=Math.ceil(Math.max(o,f)),l.height=a(l,c),l.barcodePadding=u(o,f,c)}},e.getTotalWidthOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n].width;return e}},5965(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(1490),a=(r=i)&&r.__esModule?r:{default:r},u=n(6258);var s="http://www.w3.org/2000/svg",l=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.svg=e,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return o(t,[{key:"render",value:function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e<this.encodings.length;e++){var n=this.encodings[e],r=(0,a.default)(this.options,n.options),o=this.createGroup(t,r.marginTop,this.svg);this.setGroupOptions(o,r),this.drawSvgBarcode(o,r,n),this.drawSVGText(o,r,n),t+=n.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,u.calculateEncodingAttributes)(this.encodings,this.options);var t=(0,u.getTotalWidthOfEncodings)(this.encodings),e=(0,u.getMaximumHeightOfEncodings)(this.encodings),n=t+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,e),this.options.background&&this.drawRect(0,0,n,e,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(t,e,n){var r,o=n.data;r="top"==e.textPosition?e.fontSize+e.textMargin:0;for(var i=0,a=0,u=0;u<o.length;u++)a=u*e.width+n.barcodePadding,"1"===o[u]?i++:i>0&&(this.drawRect(a-e.width*i,r,e.width*i,e.height,t),i=0);i>0&&this.drawRect(a-e.width*(i-1),r,e.width*i,e.height,t)}},{key:"drawSVGText",value:function(t,e,n){var r,o,i=this.document.createElementNS(s,"text");e.displayValue&&(i.setAttribute("font-family",e.font),i.setAttribute("font-size",e.fontSize),e.fontOptions.includes("bold")&&i.setAttribute("font-weight","bold"),e.fontOptions.includes("italic")&&i.setAttribute("font-style","italic"),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(r=0,i.setAttribute("text-anchor","start")):"right"==e.textAlign?(r=n.width-1,i.setAttribute("text-anchor","end")):(r=n.width/2,i.setAttribute("text-anchor","middle")),i.setAttribute("x",r),i.setAttribute("y",o),i.appendChild(this.document.createTextNode(n.text)),t.appendChild(i))}},{key:"setSvgAttributes",value:function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",s),n.setAttribute("version","1.1")}},{key:"createGroup",value:function(t,e,n){var r=this.document.createElementNS(s,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}},{key:"setGroupOptions",value:function(t,e){t.setAttribute("fill",e.lineColor)}},{key:"drawRect",value:function(t,e,n,r,o){var i=this.document.createElementNS(s,"rect");return i.setAttribute("x",t),i.setAttribute("y",e),i.setAttribute("width",n),i.setAttribute("height",r),o.appendChild(i),i}}]),t}();e.default=l},7583(t,e,n){const r=n(1333),o=n(157),i=n(7899),a=n(6756);function u(t,e,n,i,a){const u=[].slice.call(arguments,1),s=u.length,l="function"==typeof u[s-1];if(!l&&!r())throw new Error("Callback required as last argument");if(!l){if(s<1)throw new Error("Too few arguments provided");return 1===s?(n=e,e=i=void 0):2!==s||e.getContext||(i=n,n=e,e=void 0),new Promise(function(r,a){try{const a=o.create(n,i);r(t(a,e,i))}catch(t){a(t)}})}if(s<2)throw new Error("Too few arguments provided");2===s?(a=n,n=e,e=i=void 0):3===s&&(e.getContext&&void 0===a?(a=i,i=void 0):(a=i,i=n,n=e,e=void 0));try{const r=o.create(n,i);a(null,t(r,e,i))}catch(t){a(t)}}e.create=o.create,e.toCanvas=u.bind(null,i.render),e.toDataURL=u.bind(null,i.renderToDataURL),e.toString=u.bind(null,function(t,e,n){return a.render(t,n)})},1333(t){t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},6421(t,e,n){const r=n(6886).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];const e=Math.floor(t/7)+2,n=r(t),o=145===n?26:2*Math.ceil((n-13)/(2*e-2)),i=[n-7];for(let t=1;t<e-1;t++)i[t]=i[t-1]-o;return i.push(6),i.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}},1433(t,e,n){const r=n(208),o=["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 i(t){this.mode=r.ALPHANUMERIC,this.data=t}i.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let n=45*o.indexOf(this.data[e]);n+=o.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},t.exports=i},9899(t){function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},8820(t){function e(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)}e.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,e){return this.data[t*this.size+e]},e.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},e.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=e},5822(t,e,n){const r=n(208);function o(t){this.mode=r.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}o.getBitsLength=function(t){return 8*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},t.exports=o},7518(t,e,n){const r=n(9953),o=[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],i=[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];e.getBlocksCount=function(t,e){switch(e){case r.L:return o[4*(t-1)+0];case r.M:return o[4*(t-1)+1];case r.Q:return o[4*(t-1)+2];case r.H:return o[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}}},9953(t,e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return n}}},7756(t,e,n){const r=n(6886).getSymbolSize;e.getPositions=function(t){const e=r(t);return[[0,0],[e-7,0],[0,e-7]]}},4565(t,e,n){const r=n(6886),o=r.getBCHDigit(1335);e.getEncodedBits=function(t,e){const n=t.bit<<3|e;let i=n<<10;for(;r.getBCHDigit(i)-o>=0;)i^=1335<<r.getBCHDigit(i)-o;return 21522^(n<<10|i)}},2731(t,e){const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let t=1;for(let e=0;e<255;e++)n[e]=t,r[t]=e,t<<=1,256&t&&(t^=285);for(let t=255;t<512;t++)n[t]=n[t-255]}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return r[t]},e.exp=function(t){return n[t]},e.mul=function(t,e){return 0===t||0===e?0:n[r[t]+r[e]]}},4861(t,e,n){const r=n(208),o=n(6886);function i(t){this.mode=r.KANJI,this.data=t}i.getBitsLength=function(t){return 13*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=o.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},t.exports=i},1332(t,e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n=3,r=3,o=40,i=10;function a(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const e=t.size;let r=0,o=0,i=0,a=null,u=null;for(let s=0;s<e;s++){o=i=0,a=u=null;for(let l=0;l<e;l++){let e=t.get(s,l);e===a?o++:(o>=5&&(r+=n+(o-5)),a=e,o=1),e=t.get(l,s),e===u?i++:(i>=5&&(r+=n+(i-5)),u=e,i=1)}o>=5&&(r+=n+(o-5)),i>=5&&(r+=n+(i-5))}return r},e.getPenaltyN2=function(t){const e=t.size;let n=0;for(let r=0;r<e-1;r++)for(let o=0;o<e-1;o++){const e=t.get(r,o)+t.get(r,o+1)+t.get(r+1,o)+t.get(r+1,o+1);4!==e&&0!==e||n++}return n*r},e.getPenaltyN3=function(t){const e=t.size;let n=0,r=0,i=0;for(let o=0;o<e;o++){r=i=0;for(let a=0;a<e;a++)r=r<<1&2047|t.get(o,a),a>=10&&(1488===r||93===r)&&n++,i=i<<1&2047|t.get(a,o),a>=10&&(1488===i||93===i)&&n++}return n*o},e.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return Math.abs(Math.ceil(100*e/n/5)-10)*i},e.applyMask=function(t,e){const n=e.size;for(let r=0;r<n;r++)for(let o=0;o<n;o++)e.isReserved(o,r)||e.xor(o,r,a(t,o,r))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let o=0,i=1/0;for(let a=0;a<r;a++){n(a),e.applyMask(a,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(a,t),r<i&&(i=r,o=a)}return o}},208(t,e,n){const r=n(1878),o=n(7044);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return o.testNumeric(t)?e.NUMERIC:o.testAlphanumeric(t)?e.ALPHANUMERIC:o.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return n}}},4357(t,e,n){const r=n(208);function o(t){this.mode=r.NUMERIC,this.data=t.toString()}o.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))},t.exports=o},4713(t,e,n){const r=n(2731);e.mul=function(t,e){const n=new Uint8Array(t.length+e.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<e.length;i++)n[o+i]^=r.mul(t[o],e[i]);return n},e.mod=function(t,e){let n=new Uint8Array(t);for(;n.length-e.length>=0;){const t=n[0];for(let o=0;o<e.length;o++)n[o]^=r.mul(e[o],t);let o=0;for(;o<n.length&&0===n[o];)o++;n=n.slice(o)}return n},e.generateECPolynomial=function(t){let n=new Uint8Array([1]);for(let o=0;o<t;o++)n=e.mul(n,new Uint8Array([1,r.exp(o)]));return n}},157(t,e,n){const r=n(6886),o=n(9953),i=n(9899),a=n(8820),u=n(6421),s=n(7756),l=n(1332),c=n(7518),f=n(4764),d=n(1427),p=n(4565),h=n(208),g=n(9801);function y(t,e,n){const r=t.size,o=p.getEncodedBits(e,n);let i,a;for(i=0;i<15;i++)a=1==(o>>i&1),i<6?t.set(i,8,a,!0):i<8?t.set(i+1,8,a,!0):t.set(r-15+i,8,a,!0),i<8?t.set(8,r-i-1,a,!0):i<9?t.set(8,15-i-1+1,a,!0):t.set(8,15-i-1,a,!0);t.set(r-8,8,1,!0)}function m(t,e,n){const o=new i;n.forEach(function(e){o.put(e.mode.bit,4),o.put(e.getLength(),h.getCharCountIndicator(e.mode,t)),e.write(o)});const a=8*(r.getSymbolTotalCodewords(t)-c.getTotalCodewordsCount(t,e));for(o.getLengthInBits()+4<=a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);const u=(a-o.getLengthInBits())/8;for(let t=0;t<u;t++)o.put(t%2?17:236,8);return function(t,e,n){const o=r.getSymbolTotalCodewords(e),i=c.getTotalCodewordsCount(e,n),a=o-i,u=c.getBlocksCount(e,n),s=o%u,l=u-s,d=Math.floor(o/u),p=Math.floor(a/u),h=p+1,g=d-p,y=new f(g);let m=0;const b=new Array(u),v=new Array(u);let _=0;const E=new Uint8Array(t.buffer);for(let t=0;t<u;t++){const e=t<l?p:h;b[t]=E.slice(m,m+e),v[t]=y.encode(b[t]),m+=e,_=Math.max(_,e)}const w=new Uint8Array(o);let O,A,T=0;for(O=0;O<_;O++)for(A=0;A<u;A++)O<b[A].length&&(w[T++]=b[A][O]);for(O=0;O<g;O++)for(A=0;A<u;A++)w[T++]=v[A][O];return w}(o,t,e)}function b(t,e,n,o){let i;if(Array.isArray(t))i=g.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let r=e;if(!r){const e=g.rawSplit(t);r=d.getBestVersionForData(e,n)}i=g.fromString(t,r||40)}}const c=d.getBestVersionForData(i,n);if(!c)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<c)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+c+".\n")}else e=c;const f=m(e,n,i),p=r.getSymbolSize(e),h=new a(p);return function(t,e){const n=t.size,r=s.getPositions(e);for(let e=0;e<r.length;e++){const o=r[e][0],i=r[e][1];for(let e=-1;e<=7;e++)if(!(o+e<=-1||n<=o+e))for(let r=-1;r<=7;r++)i+r<=-1||n<=i+r||(e>=0&&e<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===e||6===e)||e>=2&&e<=4&&r>=2&&r<=4?t.set(o+e,i+r,!0,!0):t.set(o+e,i+r,!1,!0))}}(h,e),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(h),function(t,e){const n=u.getPositions(e);for(let e=0;e<n.length;e++){const r=n[e][0],o=n[e][1];for(let e=-2;e<=2;e++)for(let n=-2;n<=2;n++)-2===e||2===e||-2===n||2===n||0===e&&0===n?t.set(r+e,o+n,!0,!0):t.set(r+e,o+n,!1,!0)}}(h,e),y(h,n,0),e>=7&&function(t,e){const n=t.size,r=d.getEncodedBits(e);let o,i,a;for(let e=0;e<18;e++)o=Math.floor(e/3),i=e%3+n-8-3,a=1==(r>>e&1),t.set(o,i,a,!0),t.set(i,o,a,!0)}(h,e),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,a=0;for(let u=n-1;u>0;u-=2)for(6===u&&u--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,u-n)){let r=!1;a<e.length&&(r=1==(e[a]>>>i&1)),t.set(o,u-n,r),i--,-1===i&&(a++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(h,f),isNaN(o)&&(o=l.getBestMask(h,y.bind(null,h,n))),l.applyMask(o,h),y(h,n,o),{modules:h,version:e,errorCorrectionLevel:n,maskPattern:o,segments:i}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");let n,i,a=o.M;return void 0!==e&&(a=o.from(e.errorCorrectionLevel,o.M),n=d.from(e.version),i=l.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),b(t,n,a,i)}},4764(t,e,n){const r=n(4713);function o(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(t){this.degree=t,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const n=r.mod(e,this.genPoly),o=this.degree-n.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(n,o),t}return n},t.exports=o},7044(t,e){const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";e.KANJI=new RegExp(r,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(o,"g"),e.NUMERIC=new RegExp(n,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+r+"$"),a=new RegExp("^"+n+"$"),u=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return i.test(t)},e.testNumeric=function(t){return a.test(t)},e.testAlphanumeric=function(t){return u.test(t)}},9801(t,e,n){const r=n(208),o=n(4357),i=n(1433),a=n(5822),u=n(4861),s=n(7044),l=n(6886),c=n(6320);function f(t){return unescape(encodeURIComponent(t)).length}function d(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function p(t){const e=d(s.NUMERIC,r.NUMERIC,t),n=d(s.ALPHANUMERIC,r.ALPHANUMERIC,t);let o,i;l.isKanjiModeEnabled()?(o=d(s.BYTE,r.BYTE,t),i=d(s.KANJI,r.KANJI,t)):(o=d(s.BYTE_KANJI,r.BYTE,t),i=[]);return e.concat(n,o,i).sort(function(t,e){return t.index-e.index}).map(function(t){return{data:t.data,mode:t.mode,length:t.length}})}function h(t,e){switch(e){case r.NUMERIC:return o.getBitsLength(t);case r.ALPHANUMERIC:return i.getBitsLength(t);case r.KANJI:return u.getBitsLength(t);case r.BYTE:return a.getBitsLength(t)}}function g(t,e){let n;const s=r.getBestModeForData(t);if(n=r.from(e,s),n!==r.BYTE&&n.bit<s.bit)throw new Error('"'+t+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(s));switch(n!==r.KANJI||l.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new o(t);case r.ALPHANUMERIC:return new i(t);case r.KANJI:return new u(t);case r.BYTE:return new a(t)}}e.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(g(e,null)):e.data&&t.push(g(e.data,e.mode)),t},[])},e.fromString=function(t,n){const o=function(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n];switch(o.mode){case r.NUMERIC:e.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:e.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:e.push([o,{data:o.data,mode:r.BYTE,length:f(o.data)}]);break;case r.BYTE:e.push([{data:o.data,mode:r.BYTE,length:f(o.data)}])}}return e}(p(t,l.isKanjiModeEnabled())),i=function(t,e){const n={},o={start:{}};let i=["start"];for(let a=0;a<t.length;a++){const u=t[a],s=[];for(let t=0;t<u.length;t++){const l=u[t],c=""+a+t;s.push(c),n[c]={node:l,lastCount:0},o[c]={};for(let t=0;t<i.length;t++){const a=i[t];n[a]&&n[a].node.mode===l.mode?(o[a][c]=h(n[a].lastCount+l.length,l.mode)-h(n[a].lastCount,l.mode),n[a].lastCount+=l.length):(n[a]&&(n[a].lastCount=l.length),o[a][c]=h(l.length,l.mode)+4+r.getCharCountIndicator(l.mode,e))}}i=s}for(let t=0;t<i.length;t++)o[i[t]].end=0;return{map:o,table:n}}(o,n),a=c.find_path(i.map,"start","end"),u=[];for(let t=1;t<a.length-1;t++)u.push(i.table[a[t]].node);return e.fromArray(function(t){return t.reduce(function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[])}(u))},e.rawSplit=function(t){return e.fromArray(p(t,l.isKanjiModeEnabled()))}},6886(t,e){let n;const r=[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];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return r[t]},e.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},e.isKanjiModeEnabled=function(){return void 0!==n},e.toSJIS=function(t){return n(t)}},1878(t,e){e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},1427(t,e,n){const r=n(6886),o=n(7518),i=n(9953),a=n(208),u=n(1878),s=r.getBCHDigit(7973);function l(t,e){return a.getCharCountIndicator(t,e)+4}function c(t,e){let n=0;return t.forEach(function(t){const r=l(t.mode,e);n+=r+t.getBitsLength()}),n}e.from=function(t,e){return u.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!u.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);const i=8*(r.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,e));if(n===a.MIXED)return i;const s=i-l(n,t);switch(n){case a.NUMERIC:return Math.floor(s/10*3);case a.ALPHANUMERIC:return Math.floor(s/11*2);case a.KANJI:return Math.floor(s/13);case a.BYTE:default:return Math.floor(s/8)}},e.getBestVersionForData=function(t,n){let r;const o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(c(t,r)<=e.getCapacity(r,n,a.MIXED))return r}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,r){for(let o=1;o<=40;o++)if(n<=e.getCapacity(o,r,t))return o}(r.mode,r.getLength(),o)},e.getEncodedBits=function(t){if(!u.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;r.getBCHDigit(e)-s>=0;)e^=7973<<r.getBCHDigit(e)-s;return t<<12|e}},7899(t,e,n){const r=n(2726);e.render=function(t,e,n){let o=n,i=e;void 0!==o||e&&e.getContext||(o=e,e=void 0),e||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=r.getOptions(o);const a=r.getImageWidth(t.modules.size,o),u=i.getContext("2d"),s=u.createImageData(a,a);return r.qrToImageData(s.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(u,i,a),u.putImageData(s,0,0),i},e.renderToDataURL=function(t,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=e.render(t,n,o),a=o.type||"image/png",u=o.rendererOpts||{};return i.toDataURL(a,u.quality)}},6756(t,e,n){const r=n(2726);function o(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}e.render=function(t,e,n){const a=r.getOptions(e),u=t.modules.size,s=t.modules.data,l=u+2*a.margin,c=a.color.light.a?"<path "+o(a.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",f="<path "+o(a.color.dark,"stroke")+' d="'+function(t,e,n){let r="",o=0,a=!1,u=0;for(let s=0;s<t.length;s++){const l=Math.floor(s%e),c=Math.floor(s/e);l||a||(a=!0),t[s]?(u++,s>0&&l>0&&t[s-1]||(r+=a?i("M",l+n,.5+c+n):i("m",o,0),o=0,a=!1),l+1<e&&t[s+1]||(r+=i("h",u),u=0)):o++}return r}(s,u,a.margin)+'"/>',d='viewBox="0 0 '+l+" "+l+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+d+' shape-rendering="crispEdges">'+c+f+"</svg>\n";return"function"==typeof n&&n(null,p),p}},2726(t,e){function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map(function(t){return[t,t]}))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){const r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){const o=n.modules.size,i=n.modules.data,a=e.getScale(o,r),u=Math.floor((o+2*r.margin)*a),s=r.margin*a,l=[r.color.light,r.color.dark];for(let e=0;e<u;e++)for(let n=0;n<u;n++){let c=4*(e*u+n),f=r.color.light;if(e>=s&&n>=s&&e<u-s&&n<u-s){f=l[i[Math.floor((e-s)/a)*o+Math.floor((n-s)/a)]?1:0]}t[c++]=f.r,t[c++]=f.g,t[c++]=f.b,t[c]=f.a}}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);return(()=>{"use strict";var t=n(7583);const{entries:e,setPrototypeOf:r,isFrozen:o,getPrototypeOf:i,getOwnPropertyDescriptor:a}=Object;let{freeze:u,seal:s,create:l}=Object,{apply:c,construct:f}="undefined"!=typeof Reflect&&Reflect;u||(u=function(t){return t}),s||(s=function(t){return t}),c||(c=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return t.apply(e,r)}),f||(f=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new t(...n)});const d=C(Array.prototype.forEach),p=C(Array.prototype.lastIndexOf),h=C(Array.prototype.pop),g=C(Array.prototype.push),y=C(Array.prototype.splice),m=C(String.prototype.toLowerCase),b=C(String.prototype.toString),v=C(String.prototype.match),_=C(String.prototype.replace),E=C(String.prototype.indexOf),w=C(String.prototype.trim),O=C(Object.prototype.hasOwnProperty),A=C(RegExp.prototype.test),T=(S=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return f(S,e)});var S;function C(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return c(t,e,r)}}function x(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m;r&&r(t,null);let i=e.length;for(;i--;){let r=e[i];if("string"==typeof r){const t=n(r);t!==r&&(o(e)||(e[i]=t),r=t)}t[r]=!0}return t}function P(t){for(let e=0;e<t.length;e++){O(t,e)||(t[e]=null)}return t}function R(t){const n=l(null);for(const[r,o]of e(t)){O(t,r)&&(Array.isArray(o)?n[r]=P(o):o&&"object"==typeof o&&o.constructor===Object?n[r]=R(o):n[r]=o)}return n}function M(t,e){for(;null!==t;){const n=a(t,e);if(n){if(n.get)return C(n.get);if("function"==typeof n.value)return C(n.value)}t=i(t)}return function(){return null}}const I=u(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),L=u(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),j=u(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),N=u(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),k=u(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),D=u(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),B=u(["#text"]),U=u(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),z=u(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=u(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=u(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),G=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$=s(/<%[\w\W]*|[\w\W]*%>/gm),X=s(/\$\{[\w\W]*/gm),V=s(/^data-[\-\w.\u00B7-\uFFFF]+$/),Y=s(/^aria-[\-\w]+$/),W=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=s(/^(?:\w+script|data):/i),J=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=s(/^html$/i),Q=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:Y,ATTR_WHITESPACE:J,CUSTOM_ELEMENT:Q,DATA_ATTR:V,DOCTYPE_NAME:q,ERB_EXPR:$,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:K,MUSTACHE_EXPR:G,TMPLIT_EXPR:X});const tt=1,et=3,nt=7,rt=8,ot=9,it=function(){return"undefined"==typeof window?null:window};var at=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:it();const r=e=>t(e);if(r.version="3.3.1",r.removed=[],!n||!n.document||n.document.nodeType!==ot||!n.Element)return r.isSupported=!1,r;let{document:o}=n;const i=o,a=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:c,Node:f,Element:S,NodeFilter:C,NamedNodeMap:P=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:$,trustedTypes:X}=n,V=S.prototype,Y=M(V,"cloneNode"),K=M(V,"remove"),J=M(V,"nextSibling"),Q=M(V,"childNodes"),at=M(V,"parentNode");if("function"==typeof c){const t=o.createElement("template");t.content&&t.content.ownerDocument&&(o=t.content.ownerDocument)}let ut,st="";const{implementation:lt,createNodeIterator:ct,createDocumentFragment:ft,getElementsByTagName:dt}=o,{importNode:pt}=i;let ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof e&&"function"==typeof at&&lt&&void 0!==lt.createHTMLDocument;const{MUSTACHE_EXPR:gt,ERB_EXPR:yt,TMPLIT_EXPR:mt,DATA_ATTR:bt,ARIA_ATTR:vt,IS_SCRIPT_OR_DATA:_t,ATTR_WHITESPACE:Et,CUSTOM_ELEMENT:wt}=Z;let{IS_ALLOWED_URI:Ot}=Z,At=null;const Tt=x({},[...I,...L,...j,...k,...B]);let St=null;const Ct=x({},[...U,...z,...H,...F]);let xt=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Pt=null,Rt=null;const Mt=Object.seal(l(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let It=!0,Lt=!0,jt=!1,Nt=!0,kt=!1,Dt=!0,Bt=!1,Ut=!1,zt=!1,Ht=!1,Ft=!1,Gt=!1,$t=!0,Xt=!1,Vt=!0,Yt=!1,Wt={},Kt=null;const Jt=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let qt=null;const Qt=x({},["audio","video","img","source","image","track"]);let Zt=null;const te=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ee="http://www.w3.org/1998/Math/MathML",ne="http://www.w3.org/2000/svg",re="http://www.w3.org/1999/xhtml";let oe=re,ie=!1,ae=null;const ue=x({},[ee,ne,re],b);let se=x({},["mi","mo","mn","ms","mtext"]),le=x({},["annotation-xml"]);const ce=x({},["title","style","font","a","script"]);let fe=null;const de=["application/xhtml+xml","text/html"];let pe=null,he=null;const ge=o.createElement("form"),ye=function(t){return t instanceof RegExp||t instanceof Function},me=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!he||he!==t){if(t&&"object"==typeof t||(t={}),t=R(t),fe=-1===de.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,pe="application/xhtml+xml"===fe?b:m,At=O(t,"ALLOWED_TAGS")?x({},t.ALLOWED_TAGS,pe):Tt,St=O(t,"ALLOWED_ATTR")?x({},t.ALLOWED_ATTR,pe):Ct,ae=O(t,"ALLOWED_NAMESPACES")?x({},t.ALLOWED_NAMESPACES,b):ue,Zt=O(t,"ADD_URI_SAFE_ATTR")?x(R(te),t.ADD_URI_SAFE_ATTR,pe):te,qt=O(t,"ADD_DATA_URI_TAGS")?x(R(Qt),t.ADD_DATA_URI_TAGS,pe):Qt,Kt=O(t,"FORBID_CONTENTS")?x({},t.FORBID_CONTENTS,pe):Jt,Pt=O(t,"FORBID_TAGS")?x({},t.FORBID_TAGS,pe):R({}),Rt=O(t,"FORBID_ATTR")?x({},t.FORBID_ATTR,pe):R({}),Wt=!!O(t,"USE_PROFILES")&&t.USE_PROFILES,It=!1!==t.ALLOW_ARIA_ATTR,Lt=!1!==t.ALLOW_DATA_ATTR,jt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Nt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,kt=t.SAFE_FOR_TEMPLATES||!1,Dt=!1!==t.SAFE_FOR_XML,Bt=t.WHOLE_DOCUMENT||!1,Ht=t.RETURN_DOM||!1,Ft=t.RETURN_DOM_FRAGMENT||!1,Gt=t.RETURN_TRUSTED_TYPE||!1,zt=t.FORCE_BODY||!1,$t=!1!==t.SANITIZE_DOM,Xt=t.SANITIZE_NAMED_PROPS||!1,Vt=!1!==t.KEEP_CONTENT,Yt=t.IN_PLACE||!1,Ot=t.ALLOWED_URI_REGEXP||W,oe=t.NAMESPACE||re,se=t.MATHML_TEXT_INTEGRATION_POINTS||se,le=t.HTML_INTEGRATION_POINTS||le,xt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ye(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(xt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ye(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(xt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(xt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),kt&&(Lt=!1),Ft&&(Ht=!0),Wt&&(At=x({},B),St=[],!0===Wt.html&&(x(At,I),x(St,U)),!0===Wt.svg&&(x(At,L),x(St,z),x(St,F)),!0===Wt.svgFilters&&(x(At,j),x(St,z),x(St,F)),!0===Wt.mathMl&&(x(At,k),x(St,H),x(St,F))),t.ADD_TAGS&&("function"==typeof t.ADD_TAGS?Mt.tagCheck=t.ADD_TAGS:(At===Tt&&(At=R(At)),x(At,t.ADD_TAGS,pe))),t.ADD_ATTR&&("function"==typeof t.ADD_ATTR?Mt.attributeCheck=t.ADD_ATTR:(St===Ct&&(St=R(St)),x(St,t.ADD_ATTR,pe))),t.ADD_URI_SAFE_ATTR&&x(Zt,t.ADD_URI_SAFE_ATTR,pe),t.FORBID_CONTENTS&&(Kt===Jt&&(Kt=R(Kt)),x(Kt,t.FORBID_CONTENTS,pe)),t.ADD_FORBID_CONTENTS&&(Kt===Jt&&(Kt=R(Kt)),x(Kt,t.ADD_FORBID_CONTENTS,pe)),Vt&&(At["#text"]=!0),Bt&&x(At,["html","head","body"]),At.table&&(x(At,["tbody"]),delete Pt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ut=t.TRUSTED_TYPES_POLICY,st=ut.createHTML("")}else void 0===ut&&(ut=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(X,a)),null!==ut&&"string"==typeof st&&(st=ut.createHTML(""));u&&u(t),he=t}},be=x({},[...L,...j,...N]),ve=x({},[...k,...D]),_e=function(t){g(r.removed,{element:t});try{at(t).removeChild(t)}catch(e){K(t)}},Ee=function(t,e){try{g(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){g(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(Ht||Ft)try{_e(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},we=function(t){let e=null,n=null;if(zt)t="<remove></remove>"+t;else{const e=v(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===fe&&oe===re&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const r=ut?ut.createHTML(t):t;if(oe===re)try{e=(new $).parseFromString(r,fe)}catch(t){}if(!e||!e.documentElement){e=lt.createDocument(oe,"template",null);try{e.documentElement.innerHTML=ie?st:r}catch(t){}}const i=e.body||e.documentElement;return t&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),oe===re?dt.call(e,Bt?"html":"body")[0]:Bt?e.documentElement:i},Oe=function(t){return ct.call(t.ownerDocument||t,t,C.SHOW_ELEMENT|C.SHOW_COMMENT|C.SHOW_TEXT|C.SHOW_PROCESSING_INSTRUCTION|C.SHOW_CDATA_SECTION,null)},Ae=function(t){return t instanceof G&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof P)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Te=function(t){return"function"==typeof f&&t instanceof f};function Se(t,e,n){d(t,t=>{t.call(r,e,n,he)})}const Ce=function(t){let e=null;if(Se(ht.beforeSanitizeElements,t,null),Ae(t))return _e(t),!0;const n=pe(t.nodeName);if(Se(ht.uponSanitizeElement,t,{tagName:n,allowedTags:At}),Dt&&t.hasChildNodes()&&!Te(t.firstElementChild)&&A(/<[/\w!]/g,t.innerHTML)&&A(/<[/\w!]/g,t.textContent))return _e(t),!0;if(t.nodeType===nt)return _e(t),!0;if(Dt&&t.nodeType===rt&&A(/<[/\w]/g,t.data))return _e(t),!0;if(!(Mt.tagCheck instanceof Function&&Mt.tagCheck(n))&&(!At[n]||Pt[n])){if(!Pt[n]&&Pe(n)){if(xt.tagNameCheck instanceof RegExp&&A(xt.tagNameCheck,n))return!1;if(xt.tagNameCheck instanceof Function&&xt.tagNameCheck(n))return!1}if(Vt&&!Kt[n]){const e=at(t)||t.parentNode,n=Q(t)||t.childNodes;if(n&&e){for(let r=n.length-1;r>=0;--r){const o=Y(n[r],!0);o.__removalCount=(t.__removalCount||0)+1,e.insertBefore(o,J(t))}}}return _e(t),!0}return t instanceof S&&!function(t){let e=at(t);e&&e.tagName||(e={namespaceURI:oe,tagName:"template"});const n=m(t.tagName),r=m(e.tagName);return!!ae[t.namespaceURI]&&(t.namespaceURI===ne?e.namespaceURI===re?"svg"===n:e.namespaceURI===ee?"svg"===n&&("annotation-xml"===r||se[r]):Boolean(be[n]):t.namespaceURI===ee?e.namespaceURI===re?"math"===n:e.namespaceURI===ne?"math"===n&&le[r]:Boolean(ve[n]):t.namespaceURI===re?!(e.namespaceURI===ne&&!le[r])&&!(e.namespaceURI===ee&&!se[r])&&!ve[n]&&(ce[n]||!be[n]):!("application/xhtml+xml"!==fe||!ae[t.namespaceURI]))}(t)?(_e(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!A(/<\/no(script|embed|frames)/i,t.innerHTML)?(kt&&t.nodeType===et&&(e=t.textContent,d([gt,yt,mt],t=>{e=_(e,t," ")}),t.textContent!==e&&(g(r.removed,{element:t.cloneNode()}),t.textContent=e)),Se(ht.afterSanitizeElements,t,null),!1):(_e(t),!0)},xe=function(t,e,n){if($t&&("id"===e||"name"===e)&&(n in o||n in ge))return!1;if(Lt&&!Rt[e]&&A(bt,e));else if(It&&A(vt,e));else if(Mt.attributeCheck instanceof Function&&Mt.attributeCheck(e,t));else if(!St[e]||Rt[e]){if(!(Pe(t)&&(xt.tagNameCheck instanceof RegExp&&A(xt.tagNameCheck,t)||xt.tagNameCheck instanceof Function&&xt.tagNameCheck(t))&&(xt.attributeNameCheck instanceof RegExp&&A(xt.attributeNameCheck,e)||xt.attributeNameCheck instanceof Function&&xt.attributeNameCheck(e,t))||"is"===e&&xt.allowCustomizedBuiltInElements&&(xt.tagNameCheck instanceof RegExp&&A(xt.tagNameCheck,n)||xt.tagNameCheck instanceof Function&&xt.tagNameCheck(n))))return!1}else if(Zt[e]);else if(A(Ot,_(n,Et,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==E(n,"data:")||!qt[t]){if(jt&&!A(_t,_(n,Et,"")));else if(n)return!1}else;return!0},Pe=function(t){return"annotation-xml"!==t&&v(t,wt)},Re=function(t){Se(ht.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||Ae(t))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:St,forceKeepAttr:void 0};let o=e.length;for(;o--;){const i=e[o],{name:a,namespaceURI:u,value:s}=i,l=pe(a),c=s;let f="value"===a?c:w(c);if(n.attrName=l,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,Se(ht.uponSanitizeAttribute,t,n),f=n.attrValue,!Xt||"id"!==l&&"name"!==l||(Ee(a,t),f="user-content-"+f),Dt&&A(/((--!?|])>)|<\/(style|title|textarea)/i,f)){Ee(a,t);continue}if("attributename"===l&&v(f,"href")){Ee(a,t);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){Ee(a,t);continue}if(!Nt&&A(/\/>/i,f)){Ee(a,t);continue}kt&&d([gt,yt,mt],t=>{f=_(f,t," ")});const p=pe(t.nodeName);if(xe(p,l,f)){if(ut&&"object"==typeof X&&"function"==typeof X.getAttributeType)if(u);else switch(X.getAttributeType(p,l)){case"TrustedHTML":f=ut.createHTML(f);break;case"TrustedScriptURL":f=ut.createScriptURL(f)}if(f!==c)try{u?t.setAttributeNS(u,a,f):t.setAttribute(a,f),Ae(t)?_e(t):h(r.removed)}catch(e){Ee(a,t)}}else Ee(a,t)}Se(ht.afterSanitizeAttributes,t,null)},Me=function t(e){let n=null;const r=Oe(e);for(Se(ht.beforeSanitizeShadowDOM,e,null);n=r.nextNode();)Se(ht.uponSanitizeShadowNode,n,null),Ce(n),Re(n),n.content instanceof s&&t(n.content);Se(ht.afterSanitizeShadowDOM,e,null)};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,a=null,u=null;if(ie=!t,ie&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Te(t)){if("function"!=typeof t.toString)throw T("toString is not a function");if("string"!=typeof(t=t.toString()))throw T("dirty is not a string, aborting")}if(!r.isSupported)return t;if(Ut||me(e),r.removed=[],"string"==typeof t&&(Yt=!1),Yt){if(t.nodeName){const e=pe(t.nodeName);if(!At[e]||Pt[e])throw T("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof f)n=we("\x3c!----\x3e"),o=n.ownerDocument.importNode(t,!0),o.nodeType===tt&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Ht&&!kt&&!Bt&&-1===t.indexOf("<"))return ut&&Gt?ut.createHTML(t):t;if(n=we(t),!n)return Ht?null:Gt?st:""}n&&zt&&_e(n.firstChild);const l=Oe(Yt?t:n);for(;a=l.nextNode();)Ce(a),Re(a),a.content instanceof s&&Me(a.content);if(Yt)return t;if(Ht){if(Ft)for(u=ft.call(n.ownerDocument);n.firstChild;)u.appendChild(n.firstChild);else u=n;return(St.shadowroot||St.shadowrootmode)&&(u=pt.call(i,u,!0)),u}let c=Bt?n.outerHTML:n.innerHTML;return Bt&&At["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&A(q,n.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+c),kt&&d([gt,yt,mt],t=>{c=_(c,t," ")}),ut&&Gt?ut.createHTML(c):c},r.setConfig=function(){me(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ut=!0},r.clearConfig=function(){he=null,Ut=!1},r.isValidAttribute=function(t,e,n){he||me({});const r=pe(t),o=pe(e);return xe(r,o,n)},r.addHook=function(t,e){"function"==typeof e&&g(ht[t],e)},r.removeHook=function(t,e){if(void 0!==e){const n=p(ht[t],e);return-1===n?void 0:y(ht[t],n,1)[0]}return h(ht[t])},r.removeHooks=function(t){ht[t]=[]},r.removeAllHooks=function(){ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}();function ut(t){return at.sanitize(t,{ALLOWED_TAGS:["b","i","u","strong","em","br","span","p","div"],ALLOWED_ATTR:["style","class"]})}function st(t,e="td"){const n=ct(document.createElement(e),{padding:"7px 2px",...t.style});return n.innerHTML=ut(t.value||""),n}function lt(t){const e=["apng","bmp","gif","ico","cur","jpeg","jpg","jpeg","jfif","pjpeg","pjp","png","svg","tif","tiff","webp"],n=ct(document.createElement("div"),{width:"100%",display:"flex",justifyContent:t?.position||"left"});let r;if(t.url){const e=function(t){if(!t||"string"!=typeof t)return!1;try{return btoa(atob(t))===t}catch(t){return!1}}(t.url);if(!function(t){let e;try{e=new URL(t)}catch(t){return!1}return"http:"===e.protocol||"https:"===e.protocol}(t.url)&&!e)throw new Error(`Invalid url: ${t.url}`);r=e?"data:image/png;base64,"+t.url:t.url}else{if(!t.path)throw new Error("Image requires either a valid url or path property");{const n=window.electronAPI.readFileAsBase64(t.path);if(!n.success)throw new Error(n.error);let o=window.electronAPI.getFileExtension(t.path);if(-1===e.indexOf(o))throw new Error(o+" file type not supported, consider the types: "+e.join());"svg"===o&&(o="svg+xml"),r="data:image/"+o+";base64,"+n.data}}if(!r)throw new Error("Failed to generate image URI");const o=ct(document.createElement("img"),{height:t.height,width:t.width,...t.style});return o.src=r,n.prepend(o),n}function ct(t,e={}){return e&&"object"==typeof e?(Object.assign(t.style,e),t):t}var ft=n(6129),dt=n.n(ft);const pt=document.querySelector("#main");if(!pt)throw new Error("Main element (#main) not found in document");const ht=pt;window.electronAPI.onBodyInit(function(t){ht.style.width=t?.width||"100%",ht.style.margin=t?.margin||"0",window.electronAPI.sendBodyInitReply({status:!0,error:null})}),window.electronAPI.onRenderLine(async function(e){switch(e.line.type){case"text":try{ht.append(function(t){const e=ct(document.createElement("div"),t.style);return e.innerHTML=ut(t.value||""),e}(e.line)),window.electronAPI.sendRenderLineReply({status:!0,error:null})}catch(t){window.electronAPI.sendRenderLineReply({status:!1,error:t.toString()})}return;case"image":try{const t=lt(e.line);ht.append(t),window.electronAPI.sendRenderLineReply({status:!0,error:null})}catch(t){window.electronAPI.sendRenderLineReply({status:!1,error:t.toString()})}return;case"qrCode":try{const n=document.createElement("div");n.style.display="flex",n.style.justifyContent=e.line?.position||"left",e.line?.style?ct(n,e.line.style):(n.style.display="flex",n.style.justifyContent=e.line?.position||"left");const r=document.createElement("canvas");r.setAttribute("id",`qrCode${e.lineIndex}`),ct(r,{textAlign:e.line.position?"-webkit-"+e.line.position:"-webkit-left"}),n.append(r),ht.append(n),await function(e,n){const{value:r,width:o=1}=n,i=document.querySelector(`#${e}`),a={width:o,errorCorrectionLevel:"H",color:{dark:"#000",light:"#fff"}};return t.toCanvas(i,r,a)}(`qrCode${e.lineIndex}`,{value:e.line.value||"",width:e.line.width?parseInt(e.line.width,10):void 0}),window.electronAPI.sendRenderLineReply({status:!0,error:null})}catch(t){window.electronAPI.sendRenderLineReply({status:!1,error:t.toString()})}return;case"barCode":try{const t=document.createElement("div"),n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttributeNS(null,"id",`barCode-${e.lineIndex}`),t.append(n),ht.append(t),e.line?.style?ct(t,e.line.style):(t.style.display="flex",t.style.justifyContent=e.line?.position||"left"),dt()(`#barCode-${e.lineIndex}`,e.line.value||"",{lineColor:"#000",textMargin:0,fontOptions:"bold",fontSize:e.line.fontsize||12,width:e.line.width?parseInt(e.line.width,10):4,height:e.line.height?parseInt(e.line.height,10):40,displayValue:!!e.line.displayValue}),window.electronAPI.sendRenderLineReply({status:!0,error:null})}catch(t){window.electronAPI.sendRenderLineReply({status:!1,error:t.toString()})}return;case"table":let n=document.createElement("div");n.setAttribute("id",`table-container-${e.lineIndex}`);let r=document.createElement("table");r.setAttribute("id",`table${e.lineIndex}`),r=ct(r,{...e.line.style});let o=document.createElement("thead");o=ct(o,e.line.tableHeaderStyle);let i=document.createElement("tbody");i=ct(i,e.line.tableBodyStyle);let a=document.createElement("tfoot");if(a=ct(a,e.line.tableFooterStyle),e.line.tableHeader)for(const t of e.line.tableHeader)if("object"==typeof t)switch(t.type){case"image":try{const e=lt(t),n=document.createElement("th");n.append(e),o.append(n)}catch(t){window.electronAPI.sendRenderLineReply({status:!1,error:t.toString()})}break;case"text":o.append(st(t,"th"))}else{const e=document.createElement("th");e.innerHTML=ut(String(t)),o.append(e)}if(e.line.tableBody)for(const t of e.line.tableBody){const e=document.createElement("tr");for(const n of t)if("object"==typeof n)switch(n.type){case"image":try{const t=lt(n),r=document.createElement("td");r.append(t),e.append(r)}catch(t){window.electronAPI.sendRenderLineReply({status:!1,error:t.toString()})}break;case"text":e.append(st(n))}else{const t=document.createElement("td");t.innerHTML=ut(String(n)),e.append(t)}i.append(e)}if(e.line.tableFooter)for(const t of e.line.tableFooter)if("object"==typeof t)switch(t.type){case"image":try{const e=lt(t),n=document.createElement("th");n.append(e),a.append(n)}catch(t){window.electronAPI.sendRenderLineReply({status:!1,error:t.toString()})}break;case"text":a.append(st(t,"th"))}else{const e=document.createElement("th");e.innerHTML=ut(String(t)),a.append(e)}r.append(o),r.append(i),r.append(a),n.append(r),ht.append(n),window.electronAPI.sendRenderLineReply({status:!0,error:null})}})})(),{}})());
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.renderer=e():t.renderer=e()}(self,()=>(()=>{var t={6320(t){"use strict";var e={single_source_shortest_paths:function(t,n,r){var o={},i={};i[n]=0;var a,u,s,l,c,f,d,p=e.PriorityQueue.make();for(p.push(n,0);!p.empty();)for(s in u=(a=p.pop()).value,l=a.cost,c=t[u]||{})c.hasOwnProperty(s)&&(f=l+c[s],d=i[s],(void 0===i[s]||d>f)&&(i[s]=f,p.push(s,f),o[s]=u));if(void 0!==r&&void 0===i[r]){var h=["Could not find a path from ",n," to ",r,"."].join("");throw new Error(h)}return o},extract_shortest_path_from_predecessor_list:function(t,e){for(var n=[],r=e;r;)n.push(r),t[r],r=t[r];return n.reverse(),n},find_path:function(t,n,r){var o=e.single_source_shortest_paths(t,n,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(t){var n,r=e.PriorityQueue,o={};for(n in t=t||{},r)r.hasOwnProperty(n)&&(o[n]=r[n]);return o.queue=[],o.sorter=t.sorter||r.default_sorter,o},default_sorter:function(t,e){return t.cost-e.cost},push:function(t,e){var n={value:t,cost:e};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};t.exports=e},6129(t,e,n){"use strict";var r=d(n(9368)),o=d(n(1490)),i=d(n(8165)),a=d(n(3623)),u=d(n(8179)),s=d(n(9796)),l=d(n(4205)),c=n(8157),f=d(n(5099));function d(t){return t&&t.__esModule?t:{default:t}}var p=function(){},h=function(t,e,n){var r=new p;if(void 0===t)throw Error("No element to render on was provided.");return r._renderProperties=(0,u.default)(t),r._encodings=[],r._options=f.default,r._errorHandler=new l.default(r),void 0!==e&&((n=n||{}).format||(n.format=b()),r.options(n)[n.format](e,n).render()),r};for(var g in h.getModule=function(t){return r.default[t]},r.default)r.default.hasOwnProperty(g)&&y(r.default,g);function y(t,e){p.prototype[e]=p.prototype[e.toUpperCase()]=p.prototype[e.toLowerCase()]=function(n,r){var i=this;return i._errorHandler.wrapBarcodeCall(function(){r.text=void 0===r.text?void 0:""+r.text;var a=(0,o.default)(i._options,r);a=(0,s.default)(a);var u=t[e],l=m(n,u,a);return i._encodings.push(l),i})}}function m(t,e,n){var r=new e(t=""+t,n);if(!r.valid())throw new c.InvalidInputException(r.constructor.name,t);var a=r.encode();a=(0,i.default)(a);for(var u=0;u<a.length;u++)a[u].options=(0,o.default)(n,a[u].options);return a}function b(){return r.default.CODE128?"CODE128":Object.keys(r.default)[0]}function v(t,e,n){e=(0,i.default)(e);for(var r=0;r<e.length;r++)e[r].options=(0,o.default)(n,e[r].options),(0,a.default)(e[r].options);(0,a.default)(n),new(0,t.renderer)(t.element,e,n).render(),t.afterRender&&t.afterRender()}p.prototype.options=function(t){return this._options=(0,o.default)(this._options,t),this},p.prototype.blank=function(t){var e=new Array(t+1).join("0");return this._encodings.push({data:e}),this},p.prototype.init=function(){var t;if(this._renderProperties)for(var e in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){t=this._renderProperties[e];var n=(0,o.default)(this._options,t.options);"auto"==n.format&&(n.format=b()),this._errorHandler.wrapBarcodeCall(function(){var e=m(n.value,r.default[n.format.toUpperCase()],n);v(t,e,n)})}},p.prototype.render=function(){if(!this._renderProperties)throw new c.NoElementException;if(Array.isArray(this._renderProperties))for(var t=0;t<this._renderProperties.length;t++)v(this._renderProperties[t],this._encodings,this._options);else v(this._renderProperties,this._encodings,this._options);return this},p.prototype._defaults=f.default,"undefined"!=typeof window&&(window.JsBarcode=h),"undefined"!=typeof jQuery&&(jQuery.fn.JsBarcode=function(t,e){var n=[];return jQuery(this).each(function(){n.push(this)}),h(n,t,e)}),t.exports=h},2444(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.default=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e,this.text=n.text||e,this.options=n}},3651(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(2444),a=(r=i)&&r.__esModule?r:{default:r},u=n(2700);var s=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.substring(1),n));return r.bytes=t.split("").map(function(t){return t.charCodeAt(0)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.bytes,n=t.shift()-105,r=u.SET_BY_CODE[n];if(void 0===r)throw new RangeError("The encoding does not start with a start character.");!0===this.shouldEncodeAsEan128()&&t.unshift(u.FNC1);var o=e.next(t,1,r);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:e.getBar(n)+o.result+e.getBar((o.checksum+n)%u.MODULO)+e.getBar(u.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var t=this.options.ean128||!1;return"string"==typeof t&&(t="true"===t.toLowerCase()),t}}],[{key:"getBar",value:function(t){return u.BARS[t]?u.BARS[t].toString():""}},{key:"correctIndex",value:function(t,e){if(e===u.SET_A){var n=t.shift();return n<32?n+64:n-32}return e===u.SET_B?t.shift()-32:10*(t.shift()-48)+t.shift()-48}},{key:"next",value:function(t,n,r){if(!t.length)return{result:"",checksum:0};var o=void 0,i=void 0;if(t[0]>=200){i=t.shift()-105;var a=u.SWAP[i];void 0!==a?o=e.next(t,n+1,a):(r!==u.SET_A&&r!==u.SET_B||i!==u.SHIFT||(t[0]=r===u.SET_A?t[0]>95?t[0]-96:t[0]:t[0]<32?t[0]+96:t[0]),o=e.next(t,n+1,r))}else i=e.correctIndex(t,r),o=e.next(t,n+1,r);var s=i*n;return{result:e.getBar(i)+o.result,checksum:s+o.checksum}}}]),e}(a.default);e.default=s},3804(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(3651),a=(r=i)&&r.__esModule?r:{default:r},u=n(2700);var s=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u.A_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return new RegExp("^"+u.A_CHARS+"+$").test(this.data)}}]),e}(a.default);e.default=s},3541(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(3651),a=(r=i)&&r.__esModule?r:{default:r},u=n(2700);var s=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u.B_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return new RegExp("^"+u.B_CHARS+"+$").test(this.data)}}]),e}(a.default);e.default=s},5798(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(3651),a=(r=i)&&r.__esModule?r:{default:r},u=n(2700);var s=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,u.C_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return new RegExp("^"+u.C_CHARS+"+$").test(this.data)}}]),e}(a.default);e.default=s},4845(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(3651)),o=i(n(4802));function i(t){return t&&t.__esModule?t:{default:t}}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var u=function(t){function e(t,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(t))var r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,o.default)(t),n));else r=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return a(r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(r.default);e.default=u},4802(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2700),o=function(t){return t.match(new RegExp("^"+r.A_CHARS+"*"))[0].length},i=function(t){return t.match(new RegExp("^"+r.B_CHARS+"*"))[0].length},a=function(t){return t.match(new RegExp("^"+r.C_CHARS+"*"))[0]};function u(t,e){var n=e?r.A_CHARS:r.B_CHARS,o=t.match(new RegExp("^("+n+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(o)return o[1]+String.fromCharCode(204)+s(t.substring(o[1].length));var i=t.match(new RegExp("^"+n+"+"))[0];return i.length===t.length?t:i+String.fromCharCode(e?205:206)+u(t.substring(i.length),!e)}function s(t){var e=a(t),n=e.length;if(n===t.length)return t;t=t.substring(n);var r=o(t)>=i(t);return e+String.fromCharCode(r?206:205)+u(t,r)}e.default=function(t){var e=void 0;if(a(t).length>=2)e=r.C_START_CHAR+s(t);else{var n=o(t)>i(t);e=(n?r.A_START_CHAR:r.B_START_CHAR)+u(t,n)}return e.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})}},2700(t,e){"use strict";var n;function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(e,"__esModule",{value:!0});var o=e.SET_A=0,i=e.SET_B=1,a=e.SET_C=2,u=(e.SHIFT=98,e.START_A=103),s=e.START_B=104,l=e.START_C=105;e.MODULO=103,e.STOP=106,e.FNC1=207,e.SET_BY_CODE=(r(n={},u,o),r(n,s,i),r(n,l,a),n),e.SWAP={101:o,100:i,99:a},e.A_START_CHAR=String.fromCharCode(208),e.B_START_CHAR=String.fromCharCode(209),e.C_START_CHAR=String.fromCharCode(210),e.A_CHARS="[\0-_È-Ï]",e.B_CHARS="[ -È-Ï]",e.C_CHARS="(Ï*[0-9]{2}Ï*)",e.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]},1509(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CODE128C=e.CODE128B=e.CODE128A=e.CODE128=void 0;var r=u(n(4845)),o=u(n(3804)),i=u(n(3541)),a=u(n(5798));function u(t){return t&&t.__esModule?t:{default:t}}e.CODE128=r.default,e.CODE128A=o.default,e.CODE128B=i.default,e.CODE128C=a.default},1428(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CODE39=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(2444);var a=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=t.toUpperCase(),n.mod43&&(t+=function(t){return u[t]}(function(t){for(var e=0,n=0;n<t.length;n++)e+=c(t[n]);return e%=43}(t))),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"encode",value:function(){for(var t=l("*"),e=0;e<this.data.length;e++)t+=l(this.data[e])+"0";return{data:t+=l("*"),text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),e}(((r=i)&&r.__esModule?r:{default:r}).default),u=["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","-","."," ","$","/","+","%","*"],s=[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 l(t){return function(t){return s[t].toString(2)}(c(t))}function c(t){return u.indexOf(t)}e.CODE39=a},1087(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(6929),a=n(2444);var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.data.split("").flatMap(function(t){return i.MULTI_SYMBOLS[t]||t}),n=t.map(function(t){return e.getEncoding(t)}).join(""),r=e.checksum(t,20),o=e.checksum(t.concat(r),15);return{text:this.text,data:e.getEncoding("ÿ")+n+e.getEncoding(r)+e.getEncoding(o)+e.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(t){return i.BINARIES[e.symbolValue(t)]}},{key:"getSymbol",value:function(t){return i.SYMBOLS[t]}},{key:"symbolValue",value:function(t){return i.SYMBOLS.indexOf(t)}},{key:"checksum",value:function(t,n){var r=t.slice().reverse().reduce(function(t,r,o){var i=o%n+1;return t+e.symbolValue(r)*i},0);return e.getSymbol(r%47)}}]),e}(((r=a)&&r.__esModule?r:{default:r}).default);e.default=u},1271(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(1087);var a=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),e}(((r=i)&&r.__esModule?r:{default:r}).default);e.default=a},6929(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.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","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],e.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"],e.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"":["($)","G"],"\b":["($)","H"],"\t":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"":["(%)","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"],"":["(%)","T"]}},9852(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CODE93FullASCII=e.CODE93=void 0;var r=i(n(1087)),o=i(n(1271));function i(t){return t&&t.__esModule?t:{default:t}}e.CODE93=r.default,e.CODE93FullASCII=o.default},4754(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(6575),i=a(n(6350));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.fontSize=!n.flat&&n.fontSize>10*n.width?10*n.width:n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(t,e){return this.text.substr(t,e)}},{key:"leftEncode",value:function(t,e){return(0,i.default)(t,e)}},{key:"rightText",value:function(t,e){return this.text.substr(t,e)}},{key:"rightEncode",value:function(t,e){return(0,i.default)(t,e)}},{key:"encodeGuarded",value:function(){var t={fontSize:this.fontSize},e={height:this.guardHeight};return[{data:o.SIDE_BIN,options:e},{data:this.leftEncode(),text:this.leftText(),options:t},{data:o.MIDDLE_BIN,options:e},{data:this.rightEncode(),text:this.rightText(),options:t},{data:o.SIDE_BIN,options:e}]}},{key:"encodeFlat",value:function(){return{data:[o.SIDE_BIN,this.leftEncode(),o.MIDDLE_BIN,this.rightEncode(),o.SIDE_BIN].join(""),text:this.text}}}]),e}(a(n(2444)).default);e.default=u},4250(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n(6575),u=n(4754),s=(r=u)&&r.__esModule?r:{default:r};var l=function(t){return(10-t.substr(0,12).split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+3*e:t+e},0)%10)%10},c=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{12}$/)&&(t+=l(t));var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.lastChar=n.lastChar,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===l(this.data)}},{key:"leftText",value:function(){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var t=this.data.substr(1,6),n=a.EAN13_STRUCTURE[this.data[0]];return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,t,n)}},{key:"rightText",value:function(){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var t=this.data.substr(7,6);return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,t,"RRRRRR")}},{key:"encodeGuarded",value:function(){var t=i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(t.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(t.push({data:"00"}),t.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),t}}]),e}(s.default);e.default=c},7570(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(6575),i=a(n(6350));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var t=o.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,i.default)(this.data,t,"01"),text:this.text}}}]),e}(a(n(2444)).default);e.default=u},8075(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=n(6575),i=u(n(6350)),a=u(n(2444));function u(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var t,e=o.EAN5_STRUCTURE[(t=this.data,t.split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+9*e:t+3*e},0)%10)];return{data:"1011"+(0,i.default)(this.data,e,"01"),text:this.text}}}]),e}(a.default);e.default=s},8784(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},a=n(4754),u=(r=a)&&r.__esModule?r:{default:r};var s=function(t){return(10-t.substr(0,7).split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+e:t+3*e},0)%10)%10},l=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{7}$/)&&(t+=s(t)),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&+this.data[7]===s(this.data)}},{key:"leftText",value:function(){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var t=this.data.substr(0,4);return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,t,"LLLL")}},{key:"rightText",value:function(){return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var t=this.data.substr(4,4);return i(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,t,"RRRR")}}]),e}(u.default);e.default=l},7960(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();e.checksum=u;var o=i(n(6350));function i(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{11}$/)&&(t+=u(t));var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.displayValue=n.displayValue,n.fontSize>10*n.width?r.fontSize=10*n.width:r.fontSize=n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==u(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t="";return t+="101",t+=(0,o.default)(this.data.substr(0,6),"LLLLLL"),t+="01010",t+=(0,o.default)(this.data.substr(6,6),"RRRRRR"),{data:t+="101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101"+(0,o.default)(this.data[0],"L"),options:{height:this.guardHeight}}),t.push({data:(0,o.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),t.push({data:"01010",options:{height:this.guardHeight}}),t.push({data:(0,o.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),t.push({data:(0,o.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),t}}]),e}(i(n(2444)).default);function u(t){var e,n=0;for(e=1;e<11;e+=2)n+=parseInt(t[e]);for(e=0;e<11;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10}e.default=a},3781(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=u(n(6350)),i=u(n(2444)),a=n(7960);function u(t){return t&&t.__esModule?t:{default:t}}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var l=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],c=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],f=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=s(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(r.isValid=!1,-1!==t.search(/^[0-9]{6}$/))r.middleDigits=t,r.upcA=d(t,"0"),r.text=n.text||""+r.upcA[0]+t+r.upcA[r.upcA.length-1],r.isValid=!0;else{if(-1===t.search(/^[01][0-9]{7}$/))return s(r);if(r.middleDigits=t.substring(1,t.length-1),r.upcA=d(r.middleDigits,t[0]),r.upcA[r.upcA.length-1]!==t[t.length-1])return s(r);r.isValid=!0}return r.displayValue=n.displayValue,n.fontSize>10*n.width?r.fontSize=10*n.width:r.fontSize=n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(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 t="";return t+="101",t+=this.encodeMiddleDigits(),{data:t+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101",options:{height:this.guardHeight}}),t.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),t.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),t}},{key:"encodeMiddleDigits",value:function(){var t=this.upcA[0],e=this.upcA[this.upcA.length-1],n=c[parseInt(e)][parseInt(t)];return(0,o.default)(this.middleDigits,n)}}]),e}(i.default);function d(t,e){for(var n=parseInt(t[t.length-1]),r=l[n],o="",i=0,u=0;u<r.length;u++){var s=r[u];o+="X"===s?t[i++]:s}return""+(o=""+e+o)+(0,a.checksum)(o)}e.default=f},6575(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.SIDE_BIN="101",e.MIDDLE_BIN="01010",e.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"]},e.EAN2_STRUCTURE=["LL","LG","GL","GG"],e.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],e.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]},6350(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(6575);e.default=function(t,e,n){var o=t.split("").map(function(t,n){return r.BINARIES[e[n]]}).map(function(e,n){return e?e[t[n]]:""});if(n){var i=t.length-1;o=o.map(function(t,e){return e<i?t+n:t})}return o.join("")}},5726(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UPCE=e.UPC=e.EAN2=e.EAN5=e.EAN8=e.EAN13=void 0;var r=l(n(4250)),o=l(n(8784)),i=l(n(8075)),a=l(n(7570)),u=l(n(7960)),s=l(n(3781));function l(t){return t&&t.__esModule?t:{default:t}}e.EAN13=r.default,e.EAN8=o.default,e.EAN5=i.default,e.EAN2=a.default,e.UPC=u.default,e.UPCE=s.default},1886(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GenericBarcode=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(2444);var a=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),e}(((r=i)&&r.__esModule?r:{default:r}).default);e.GenericBarcode=a},739(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(1135),a=n(2444);var u=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return-1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var t=this,e=this.data.match(/.{2}/g).map(function(e){return t.encodePair(e)}).join("");return{data:i.START_BIN+e+i.END_BIN,text:this.text}}},{key:"encodePair",value:function(t){var e=i.BINARIES[t[1]];return i.BINARIES[t[0]].split("").map(function(t,n){return("1"===t?"111":"1")+("1"===e[n]?"000":"0")}).join("")}}]),e}(((r=a)&&r.__esModule?r:{default:r}).default);e.default=u},8122(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(739),a=(r=i)&&r.__esModule?r:{default:r};var u=function(t){var e=t.substr(0,13).split("").map(function(t){return parseInt(t,10)}).reduce(function(t,e,n){return t+e*(3-n%2*2)},0);return 10*Math.ceil(e/10)-e},s=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{13}$/)&&(t+=u(t)),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{14}$/)&&+this.data[13]===u(this.data)}}]),e}(a.default);e.default=s},1135(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.START_BIN="1010",e.END_BIN="11101",e.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]},5070(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITF14=e.ITF=void 0;var r=i(n(739)),o=i(n(8122));function i(t){return t&&t.__esModule?t:{default:t}}e.ITF=r.default,e.ITF14=o.default},3551(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(2444);var a=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"encode",value:function(){for(var t="110",e=0;e<this.data.length;e++){var n=parseInt(this.data[e]).toString(2);n=u(n,4-n.length);for(var r=0;r<n.length;r++)t+="0"==n[r]?"100":"110"}return{data:t+="1001",text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]+$/)}}]),e}(((r=i)&&r.__esModule?r:{default:r}).default);function u(t,e){for(var n=0;n<e;n++)t="0"+t;return t}e.default=a},6338(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(3551),i=(r=o)&&r.__esModule?r:{default:r},a=n(291);var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+(0,a.mod10)(t),n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i.default);e.default=u},23(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(3551),i=(r=o)&&r.__esModule?r:{default:r},a=n(291);var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=(0,a.mod10)(t),t+=(0,a.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i.default);e.default=u},6065(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(3551),i=(r=o)&&r.__esModule?r:{default:r},a=n(291);var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+(0,a.mod11)(t),n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i.default);e.default=u},7052(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=n(3551),i=(r=o)&&r.__esModule?r:{default:r},a=n(291);var u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=(0,a.mod11)(t),t+=(0,a.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(i.default);e.default=u},291(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mod10=function(t){for(var e=0,n=0;n<t.length;n++){var r=parseInt(t[n]);(n+t.length)%2==0?e+=r:e+=2*r%10+Math.floor(2*r/10)}return(10-e%10)%10},e.mod11=function(t){for(var e=0,n=[2,3,4,5,6,7],r=0;r<t.length;r++){var o=parseInt(t[t.length-1-r]);e+=n[r%n.length]*o}return(11-e%11)%11}},8248(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MSI1110=e.MSI1010=e.MSI11=e.MSI10=e.MSI=void 0;var r=s(n(3551)),o=s(n(6338)),i=s(n(6065)),a=s(n(23)),u=s(n(7052));function s(t){return t&&t.__esModule?t:{default:t}}e.MSI=r.default,e.MSI10=o.default,e.MSI11=i.default,e.MSI1010=a.default,e.MSI1110=u.default},1133(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.codabar=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(2444);var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),0===t.search(/^[0-9\-\$\:\.\+\/]+$/)&&(t="A"+t+"A");var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.toUpperCase(),n));return r.text=r.options.text||r.text.replace(/[A-D]/g,""),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var t=[],e=this.getEncodings(),n=0;n<this.data.length;n++)t.push(e[this.data.charAt(n)]),n!==this.data.length-1&&t.push("0");return{text:this.text,data:t.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}(((r=i)&&r.__esModule?r:{default:r}).default);e.codabar=a},9368(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(1428),o=n(1509),i=n(5726),a=n(5070),u=n(8248),s=n(2889),l=n(1133),c=n(9852),f=n(1886);e.default={CODE39:r.CODE39,CODE128:o.CODE128,CODE128A:o.CODE128A,CODE128B:o.CODE128B,CODE128C:o.CODE128C,EAN13:i.EAN13,EAN8:i.EAN8,EAN5:i.EAN5,EAN2:i.EAN2,UPC:i.UPC,UPCE:i.UPCE,ITF14:a.ITF14,ITF:a.ITF,MSI:u.MSI,MSI10:u.MSI10,MSI11:u.MSI11,MSI1010:u.MSI1010,MSI1110:u.MSI1110,pharmacode:s.pharmacode,codabar:l.codabar,CODE93:c.CODE93,CODE93FullASCII:c.CODE93FullASCII,GenericBarcode:f.GenericBarcode}},2889(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pharmacode=void 0;var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(2444);var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.number=parseInt(t,10),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"encode",value:function(){for(var t=this.number,e="";!isNaN(t)&&0!=t;)t%2==0?(e="11100"+e,t=(t-2)/2):(e="100"+e,t=(t-1)/2);return{data:e=e.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),e}(((r=i)&&r.__esModule?r:{default:r}).default);e.pharmacode=a},4205(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var r=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.api=e}return n(t,[{key:"handleCatch",value:function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(t){return this.handleCatch(t),this.api}}}]),t}();e.default=r},8157(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(e,o){n(this,t);var i=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.name="InvalidInputException",i.symbology=e,i.input=o,i.message='"'+i.input+'" is not a valid input for '+i.symbology,i}return o(t,Error),t}(),a=function(){function t(){n(this,t);var e=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="InvalidElementException",e.message="Not supported type to render on",e}return o(t,Error),t}(),u=function(){function t(){n(this,t);var e=r(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.name="NoElementException",e.message="No element to render on.",e}return o(t,Error),t}();e.InvalidInputException=i,e.InvalidElementException=a,e.NoElementException=u},3623(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(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}},892(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(9796)),o=i(n(5099));function i(t){return t&&t.__esModule?t:{default:t}}e.default=function(t){var e={};for(var n in o.default)o.default.hasOwnProperty(n)&&(t.hasAttribute("jsbarcode-"+n.toLowerCase())&&(e[n]=t.getAttribute("jsbarcode-"+n.toLowerCase())),t.hasAttribute("data-"+n.toLowerCase())&&(e[n]=t.getAttribute("data-"+n.toLowerCase())));return e.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),e=(0,r.default)(e)}},8179(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=u(n(892)),i=u(n(2727)),a=n(8157);function u(t){return t&&t.__esModule?t:{default:t}}function s(t){if("string"==typeof t)return function(t){var e=document.querySelectorAll(t);if(0===e.length)return;for(var n=[],r=0;r<e.length;r++)n.push(s(e[r]));return n}(t);if(Array.isArray(t)){for(var e=[],n=0;n<t.length;n++)e.push(s(t[n]));return e}if("undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLImageElement)return u=t,{element:l=document.createElement("canvas"),options:(0,o.default)(u),renderer:i.default.CanvasRenderer,afterRender:function(){u.setAttribute("src",l.toDataURL())}};if(t&&t.nodeName&&"svg"===t.nodeName.toLowerCase()||"undefined"!=typeof SVGElement&&t instanceof SVGElement)return{element:t,options:(0,o.default)(t),renderer:i.default.SVGRenderer};if("undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)return{element:t,options:(0,o.default)(t),renderer:i.default.CanvasRenderer};if(t&&t.getContext)return{element:t,renderer:i.default.CanvasRenderer};if(t&&"object"===(void 0===t?"undefined":r(t))&&!t.nodeName)return{element:t,renderer:i.default.ObjectRenderer};throw new a.InvalidElementException;var u,l}e.default=s},8165(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=[];return function t(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)t(n[r]);else n.text=n.text||"",n.data=n.data||"",e.push(n)}(t),e}},1490(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.default=function(t,e){return n({},t,e)}},9796(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&"string"==typeof t[n=e[n]]&&(t[n]=parseInt(t[n],10));"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue);return t}},5099(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={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(){}};e.default=n},1687(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(1490),a=(r=i)&&r.__esModule?r:{default:r},u=n(6258);var s=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=e,this.encodings=n,this.options=r}return o(t,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t<this.encodings.length;t++){var e=(0,a.default)(this.options,this.encodings[t].options);this.drawCanvasBarcode(e,this.encodings[t]),this.drawCanvasText(e,this.encodings[t]),this.moveCanvasDrawing(this.encodings[t])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var t=this.canvas.getContext("2d");t.save(),(0,u.calculateEncodingAttributes)(this.encodings,this.options,t);var e=(0,u.getTotalWidthOfEncodings)(this.encodings),n=(0,u.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=e+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,t.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(t.fillStyle=this.options.background,t.fillRect(0,0,this.canvas.width,this.canvas.height)),t.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(t,e){var n,r=this.canvas.getContext("2d"),o=e.data;n="top"==t.textPosition?t.marginTop+t.fontSize+t.textMargin:t.marginTop,r.fillStyle=t.lineColor;for(var i=0;i<o.length;i++){var a=i*t.width+e.barcodePadding;"1"===o[i]?r.fillRect(a,n,t.width,t.height):o[i]&&r.fillRect(a,n,t.width,t.height*o[i])}}},{key:"drawCanvasText",value:function(t,e){var n,r,o=this.canvas.getContext("2d"),i=t.fontOptions+" "+t.fontSize+"px "+t.font;t.displayValue&&(r="top"==t.textPosition?t.marginTop+t.fontSize-t.textMargin:t.height+t.textMargin+t.marginTop+t.fontSize,o.font=i,"left"==t.textAlign||e.barcodePadding>0?(n=0,o.textAlign="left"):"right"==t.textAlign?(n=e.width-1,o.textAlign="right"):(n=e.width/2,o.textAlign="center"),o.fillText(e.text,n,r))}},{key:"moveCanvasDrawing",value:function(t){this.canvas.getContext("2d").translate(t.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),t}();e.default=s},2727(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=a(n(1687)),o=a(n(5965)),i=a(n(3528));function a(t){return t&&t.__esModule?t:{default:t}}e.default={CanvasRenderer:r.default,SVGRenderer:o.default,ObjectRenderer:i.default}},3528(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();var r=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.object=e,this.encodings=n,this.options=r}return n(t,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),t}();e.default=r},6258(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalWidthOfEncodings=e.calculateEncodingAttributes=e.getBarcodePadding=e.getEncodingHeight=e.getMaximumHeightOfEncodings=void 0;var r,o=n(1490),i=(r=o)&&r.__esModule?r:{default:r};function a(t,e){return e.height+(e.displayValue&&t.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function u(t,e,n){if(n.displayValue&&e<t){if("center"==n.textAlign)return Math.floor((t-e)/2);if("left"==n.textAlign)return 0;if("right"==n.textAlign)return Math.floor(t-e)}return 0}function s(t,e,n){var r;if(n)r=n;else{if("undefined"==typeof document)return 0;r=document.createElement("canvas").getContext("2d")}r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var o=r.measureText(t);return o?o.width:0}e.getMaximumHeightOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)t[n].height>e&&(e=t[n].height);return e},e.getEncodingHeight=a,e.getBarcodePadding=u,e.calculateEncodingAttributes=function(t,e,n){for(var r=0;r<t.length;r++){var o,l=t[r],c=(0,i.default)(e,l.options);o=c.displayValue?s(l.text,c,n):0;var f=l.data.length*c.width;l.width=Math.ceil(Math.max(o,f)),l.height=a(l,c),l.barcodePadding=u(o,f,c)}},e.getTotalWidthOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n].width;return e}},5965(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=n(1490),a=(r=i)&&r.__esModule?r:{default:r},u=n(6258);var s="http://www.w3.org/2000/svg",l=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.svg=e,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return o(t,[{key:"render",value:function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e<this.encodings.length;e++){var n=this.encodings[e],r=(0,a.default)(this.options,n.options),o=this.createGroup(t,r.marginTop,this.svg);this.setGroupOptions(o,r),this.drawSvgBarcode(o,r,n),this.drawSVGText(o,r,n),t+=n.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,u.calculateEncodingAttributes)(this.encodings,this.options);var t=(0,u.getTotalWidthOfEncodings)(this.encodings),e=(0,u.getMaximumHeightOfEncodings)(this.encodings),n=t+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,e),this.options.background&&this.drawRect(0,0,n,e,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(t,e,n){var r,o=n.data;r="top"==e.textPosition?e.fontSize+e.textMargin:0;for(var i=0,a=0,u=0;u<o.length;u++)a=u*e.width+n.barcodePadding,"1"===o[u]?i++:i>0&&(this.drawRect(a-e.width*i,r,e.width*i,e.height,t),i=0);i>0&&this.drawRect(a-e.width*(i-1),r,e.width*i,e.height,t)}},{key:"drawSVGText",value:function(t,e,n){var r,o,i=this.document.createElementNS(s,"text");e.displayValue&&(i.setAttribute("font-family",e.font),i.setAttribute("font-size",e.fontSize),e.fontOptions.includes("bold")&&i.setAttribute("font-weight","bold"),e.fontOptions.includes("italic")&&i.setAttribute("font-style","italic"),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(r=0,i.setAttribute("text-anchor","start")):"right"==e.textAlign?(r=n.width-1,i.setAttribute("text-anchor","end")):(r=n.width/2,i.setAttribute("text-anchor","middle")),i.setAttribute("x",r),i.setAttribute("y",o),i.appendChild(this.document.createTextNode(n.text)),t.appendChild(i))}},{key:"setSvgAttributes",value:function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",s),n.setAttribute("version","1.1")}},{key:"createGroup",value:function(t,e,n){var r=this.document.createElementNS(s,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}},{key:"setGroupOptions",value:function(t,e){t.setAttribute("fill",e.lineColor)}},{key:"drawRect",value:function(t,e,n,r,o){var i=this.document.createElementNS(s,"rect");return i.setAttribute("x",t),i.setAttribute("y",e),i.setAttribute("width",n),i.setAttribute("height",r),o.appendChild(i),i}}]),t}();e.default=l},7583(t,e,n){const r=n(1333),o=n(157),i=n(7899),a=n(6756);function u(t,e,n,i,a){const u=[].slice.call(arguments,1),s=u.length,l="function"==typeof u[s-1];if(!l&&!r())throw new Error("Callback required as last argument");if(!l){if(s<1)throw new Error("Too few arguments provided");return 1===s?(n=e,e=i=void 0):2!==s||e.getContext||(i=n,n=e,e=void 0),new Promise(function(r,a){try{const a=o.create(n,i);r(t(a,e,i))}catch(t){a(t)}})}if(s<2)throw new Error("Too few arguments provided");2===s?(a=n,n=e,e=i=void 0):3===s&&(e.getContext&&void 0===a?(a=i,i=void 0):(a=i,i=n,n=e,e=void 0));try{const r=o.create(n,i);a(null,t(r,e,i))}catch(t){a(t)}}e.create=o.create,e.toCanvas=u.bind(null,i.render),e.toDataURL=u.bind(null,i.renderToDataURL),e.toString=u.bind(null,function(t,e,n){return a.render(t,n)})},1333(t){t.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},6421(t,e,n){const r=n(6886).getSymbolSize;e.getRowColCoords=function(t){if(1===t)return[];const e=Math.floor(t/7)+2,n=r(t),o=145===n?26:2*Math.ceil((n-13)/(2*e-2)),i=[n-7];for(let t=1;t<e-1;t++)i[t]=i[t-1]-o;return i.push(6),i.reverse()},e.getPositions=function(t){const n=[],r=e.getRowColCoords(t),o=r.length;for(let t=0;t<o;t++)for(let e=0;e<o;e++)0===t&&0===e||0===t&&e===o-1||t===o-1&&0===e||n.push([r[t],r[e]]);return n}},1433(t,e,n){const r=n(208),o=["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 i(t){this.mode=r.ALPHANUMERIC,this.data=t}i.getBitsLength=function(t){return 11*Math.floor(t/2)+t%2*6},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e+2<=this.data.length;e+=2){let n=45*o.indexOf(this.data[e]);n+=o.indexOf(this.data[e+1]),t.put(n,11)}this.data.length%2&&t.put(o.indexOf(this.data[e]),6)},t.exports=i},9899(t){function e(){this.buffer=[],this.length=0}e.prototype={get:function(t){const e=Math.floor(t/8);return 1==(this.buffer[e]>>>7-t%8&1)},put:function(t,e){for(let n=0;n<e;n++)this.putBit(1==(t>>>e-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}},t.exports=e},8820(t){function e(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)}e.prototype.set=function(t,e,n,r){const o=t*this.size+e;this.data[o]=n,r&&(this.reservedBit[o]=!0)},e.prototype.get=function(t,e){return this.data[t*this.size+e]},e.prototype.xor=function(t,e,n){this.data[t*this.size+e]^=n},e.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]},t.exports=e},5822(t,e,n){const r=n(208);function o(t){this.mode=r.BYTE,this.data="string"==typeof t?(new TextEncoder).encode(t):new Uint8Array(t)}o.getBitsLength=function(t){return 8*t},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){for(let e=0,n=this.data.length;e<n;e++)t.put(this.data[e],8)},t.exports=o},7518(t,e,n){const r=n(9953),o=[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],i=[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];e.getBlocksCount=function(t,e){switch(e){case r.L:return o[4*(t-1)+0];case r.M:return o[4*(t-1)+1];case r.Q:return o[4*(t-1)+2];case r.H:return o[4*(t-1)+3];default:return}},e.getTotalCodewordsCount=function(t,e){switch(e){case r.L:return i[4*(t-1)+0];case r.M:return i[4*(t-1)+1];case r.Q:return i[4*(t-1)+2];case r.H:return i[4*(t-1)+3];default:return}}},9953(t,e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2},e.isValid=function(t){return t&&void 0!==t.bit&&t.bit>=0&&t.bit<4},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+t)}}(t)}catch(t){return n}}},7756(t,e,n){const r=n(6886).getSymbolSize;e.getPositions=function(t){const e=r(t);return[[0,0],[e-7,0],[0,e-7]]}},4565(t,e,n){const r=n(6886),o=r.getBCHDigit(1335);e.getEncodedBits=function(t,e){const n=t.bit<<3|e;let i=n<<10;for(;r.getBCHDigit(i)-o>=0;)i^=1335<<r.getBCHDigit(i)-o;return 21522^(n<<10|i)}},2731(t,e){const n=new Uint8Array(512),r=new Uint8Array(256);!function(){let t=1;for(let e=0;e<255;e++)n[e]=t,r[t]=e,t<<=1,256&t&&(t^=285);for(let t=255;t<512;t++)n[t]=n[t-255]}(),e.log=function(t){if(t<1)throw new Error("log("+t+")");return r[t]},e.exp=function(t){return n[t]},e.mul=function(t,e){return 0===t||0===e?0:n[r[t]+r[e]]}},4861(t,e,n){const r=n(208),o=n(6886);function i(t){this.mode=r.KANJI,this.data=t}i.getBitsLength=function(t){return 13*t},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let n=o.toSJIS(this.data[e]);if(n>=33088&&n<=40956)n-=33088;else{if(!(n>=57408&&n<=60351))throw new Error("Invalid SJIS character: "+this.data[e]+"\nMake sure your charset is UTF-8");n-=49472}n=192*(n>>>8&255)+(255&n),t.put(n,13)}},t.exports=i},1332(t,e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const n=3,r=3,o=40,i=10;function a(t,n,r){switch(t){case e.Patterns.PATTERN000:return(n+r)%2==0;case e.Patterns.PATTERN001:return n%2==0;case e.Patterns.PATTERN010:return r%3==0;case e.Patterns.PATTERN011:return(n+r)%3==0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(r/3))%2==0;case e.Patterns.PATTERN101:return n*r%2+n*r%3==0;case e.Patterns.PATTERN110:return(n*r%2+n*r%3)%2==0;case e.Patterns.PATTERN111:return(n*r%3+(n+r)%2)%2==0;default:throw new Error("bad maskPattern:"+t)}}e.isValid=function(t){return null!=t&&""!==t&&!isNaN(t)&&t>=0&&t<=7},e.from=function(t){return e.isValid(t)?parseInt(t,10):void 0},e.getPenaltyN1=function(t){const e=t.size;let r=0,o=0,i=0,a=null,u=null;for(let s=0;s<e;s++){o=i=0,a=u=null;for(let l=0;l<e;l++){let e=t.get(s,l);e===a?o++:(o>=5&&(r+=n+(o-5)),a=e,o=1),e=t.get(l,s),e===u?i++:(i>=5&&(r+=n+(i-5)),u=e,i=1)}o>=5&&(r+=n+(o-5)),i>=5&&(r+=n+(i-5))}return r},e.getPenaltyN2=function(t){const e=t.size;let n=0;for(let r=0;r<e-1;r++)for(let o=0;o<e-1;o++){const e=t.get(r,o)+t.get(r,o+1)+t.get(r+1,o)+t.get(r+1,o+1);4!==e&&0!==e||n++}return n*r},e.getPenaltyN3=function(t){const e=t.size;let n=0,r=0,i=0;for(let o=0;o<e;o++){r=i=0;for(let a=0;a<e;a++)r=r<<1&2047|t.get(o,a),a>=10&&(1488===r||93===r)&&n++,i=i<<1&2047|t.get(a,o),a>=10&&(1488===i||93===i)&&n++}return n*o},e.getPenaltyN4=function(t){let e=0;const n=t.data.length;for(let r=0;r<n;r++)e+=t.data[r];return Math.abs(Math.ceil(100*e/n/5)-10)*i},e.applyMask=function(t,e){const n=e.size;for(let r=0;r<n;r++)for(let o=0;o<n;o++)e.isReserved(o,r)||e.xor(o,r,a(t,o,r))},e.getBestMask=function(t,n){const r=Object.keys(e.Patterns).length;let o=0,i=1/0;for(let a=0;a<r;a++){n(a),e.applyMask(a,t);const r=e.getPenaltyN1(t)+e.getPenaltyN2(t)+e.getPenaltyN3(t)+e.getPenaltyN4(t);e.applyMask(a,t),r<i&&(i=r,o=a)}return o}},208(t,e,n){const r=n(1878),o=n(7044);e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(t,e){if(!t.ccBits)throw new Error("Invalid mode: "+t);if(!r.isValid(e))throw new Error("Invalid version: "+e);return e>=1&&e<10?t.ccBits[0]:e<27?t.ccBits[1]:t.ccBits[2]},e.getBestModeForData=function(t){return o.testNumeric(t)?e.NUMERIC:o.testAlphanumeric(t)?e.ALPHANUMERIC:o.testKanji(t)?e.KANJI:e.BYTE},e.toString=function(t){if(t&&t.id)return t.id;throw new Error("Invalid mode")},e.isValid=function(t){return t&&t.bit&&t.ccBits},e.from=function(t,n){if(e.isValid(t))return t;try{return function(t){if("string"!=typeof t)throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+t)}}(t)}catch(t){return n}}},4357(t,e,n){const r=n(208);function o(t){this.mode=r.NUMERIC,this.data=t.toString()}o.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(t){let e,n,r;for(e=0;e+3<=this.data.length;e+=3)n=this.data.substr(e,3),r=parseInt(n,10),t.put(r,10);const o=this.data.length-e;o>0&&(n=this.data.substr(e),r=parseInt(n,10),t.put(r,3*o+1))},t.exports=o},4713(t,e,n){const r=n(2731);e.mul=function(t,e){const n=new Uint8Array(t.length+e.length-1);for(let o=0;o<t.length;o++)for(let i=0;i<e.length;i++)n[o+i]^=r.mul(t[o],e[i]);return n},e.mod=function(t,e){let n=new Uint8Array(t);for(;n.length-e.length>=0;){const t=n[0];for(let o=0;o<e.length;o++)n[o]^=r.mul(e[o],t);let o=0;for(;o<n.length&&0===n[o];)o++;n=n.slice(o)}return n},e.generateECPolynomial=function(t){let n=new Uint8Array([1]);for(let o=0;o<t;o++)n=e.mul(n,new Uint8Array([1,r.exp(o)]));return n}},157(t,e,n){const r=n(6886),o=n(9953),i=n(9899),a=n(8820),u=n(6421),s=n(7756),l=n(1332),c=n(7518),f=n(4764),d=n(1427),p=n(4565),h=n(208),g=n(9801);function y(t,e,n){const r=t.size,o=p.getEncodedBits(e,n);let i,a;for(i=0;i<15;i++)a=1==(o>>i&1),i<6?t.set(i,8,a,!0):i<8?t.set(i+1,8,a,!0):t.set(r-15+i,8,a,!0),i<8?t.set(8,r-i-1,a,!0):i<9?t.set(8,15-i-1+1,a,!0):t.set(8,15-i-1,a,!0);t.set(r-8,8,1,!0)}function m(t,e,n){const o=new i;n.forEach(function(e){o.put(e.mode.bit,4),o.put(e.getLength(),h.getCharCountIndicator(e.mode,t)),e.write(o)});const a=8*(r.getSymbolTotalCodewords(t)-c.getTotalCodewordsCount(t,e));for(o.getLengthInBits()+4<=a&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(0);const u=(a-o.getLengthInBits())/8;for(let t=0;t<u;t++)o.put(t%2?17:236,8);return function(t,e,n){const o=r.getSymbolTotalCodewords(e),i=c.getTotalCodewordsCount(e,n),a=o-i,u=c.getBlocksCount(e,n),s=o%u,l=u-s,d=Math.floor(o/u),p=Math.floor(a/u),h=p+1,g=d-p,y=new f(g);let m=0;const b=new Array(u),v=new Array(u);let _=0;const E=new Uint8Array(t.buffer);for(let t=0;t<u;t++){const e=t<l?p:h;b[t]=E.slice(m,m+e),v[t]=y.encode(b[t]),m+=e,_=Math.max(_,e)}const w=new Uint8Array(o);let O,A,T=0;for(O=0;O<_;O++)for(A=0;A<u;A++)O<b[A].length&&(w[T++]=b[A][O]);for(O=0;O<g;O++)for(A=0;A<u;A++)w[T++]=v[A][O];return w}(o,t,e)}function b(t,e,n,o){let i;if(Array.isArray(t))i=g.fromArray(t);else{if("string"!=typeof t)throw new Error("Invalid data");{let r=e;if(!r){const e=g.rawSplit(t);r=d.getBestVersionForData(e,n)}i=g.fromString(t,r||40)}}const c=d.getBestVersionForData(i,n);if(!c)throw new Error("The amount of data is too big to be stored in a QR Code");if(e){if(e<c)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+c+".\n")}else e=c;const f=m(e,n,i),p=r.getSymbolSize(e),h=new a(p);return function(t,e){const n=t.size,r=s.getPositions(e);for(let e=0;e<r.length;e++){const o=r[e][0],i=r[e][1];for(let e=-1;e<=7;e++)if(!(o+e<=-1||n<=o+e))for(let r=-1;r<=7;r++)i+r<=-1||n<=i+r||(e>=0&&e<=6&&(0===r||6===r)||r>=0&&r<=6&&(0===e||6===e)||e>=2&&e<=4&&r>=2&&r<=4?t.set(o+e,i+r,!0,!0):t.set(o+e,i+r,!1,!0))}}(h,e),function(t){const e=t.size;for(let n=8;n<e-8;n++){const e=n%2==0;t.set(n,6,e,!0),t.set(6,n,e,!0)}}(h),function(t,e){const n=u.getPositions(e);for(let e=0;e<n.length;e++){const r=n[e][0],o=n[e][1];for(let e=-2;e<=2;e++)for(let n=-2;n<=2;n++)-2===e||2===e||-2===n||2===n||0===e&&0===n?t.set(r+e,o+n,!0,!0):t.set(r+e,o+n,!1,!0)}}(h,e),y(h,n,0),e>=7&&function(t,e){const n=t.size,r=d.getEncodedBits(e);let o,i,a;for(let e=0;e<18;e++)o=Math.floor(e/3),i=e%3+n-8-3,a=1==(r>>e&1),t.set(o,i,a,!0),t.set(i,o,a,!0)}(h,e),function(t,e){const n=t.size;let r=-1,o=n-1,i=7,a=0;for(let u=n-1;u>0;u-=2)for(6===u&&u--;;){for(let n=0;n<2;n++)if(!t.isReserved(o,u-n)){let r=!1;a<e.length&&(r=1==(e[a]>>>i&1)),t.set(o,u-n,r),i--,-1===i&&(a++,i=7)}if(o+=r,o<0||n<=o){o-=r,r=-r;break}}}(h,f),isNaN(o)&&(o=l.getBestMask(h,y.bind(null,h,n))),l.applyMask(o,h),y(h,n,o),{modules:h,version:e,errorCorrectionLevel:n,maskPattern:o,segments:i}}e.create=function(t,e){if(void 0===t||""===t)throw new Error("No input text");let n,i,a=o.M;return void 0!==e&&(a=o.from(e.errorCorrectionLevel,o.M),n=d.from(e.version),i=l.from(e.maskPattern),e.toSJISFunc&&r.setToSJISFunction(e.toSJISFunc)),b(t,n,a,i)}},4764(t,e,n){const r=n(4713);function o(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}o.prototype.initialize=function(t){this.degree=t,this.genPoly=r.generateECPolynomial(this.degree)},o.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const e=new Uint8Array(t.length+this.degree);e.set(t);const n=r.mod(e,this.genPoly),o=this.degree-n.length;if(o>0){const t=new Uint8Array(this.degree);return t.set(n,o),t}return n},t.exports=o},7044(t,e){const n="[0-9]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const o="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+")(?:.|[\r\n]))+";e.KANJI=new RegExp(r,"g"),e.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),e.BYTE=new RegExp(o,"g"),e.NUMERIC=new RegExp(n,"g"),e.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const i=new RegExp("^"+r+"$"),a=new RegExp("^"+n+"$"),u=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");e.testKanji=function(t){return i.test(t)},e.testNumeric=function(t){return a.test(t)},e.testAlphanumeric=function(t){return u.test(t)}},9801(t,e,n){const r=n(208),o=n(4357),i=n(1433),a=n(5822),u=n(4861),s=n(7044),l=n(6886),c=n(6320);function f(t){return unescape(encodeURIComponent(t)).length}function d(t,e,n){const r=[];let o;for(;null!==(o=t.exec(n));)r.push({data:o[0],index:o.index,mode:e,length:o[0].length});return r}function p(t){const e=d(s.NUMERIC,r.NUMERIC,t),n=d(s.ALPHANUMERIC,r.ALPHANUMERIC,t);let o,i;l.isKanjiModeEnabled()?(o=d(s.BYTE,r.BYTE,t),i=d(s.KANJI,r.KANJI,t)):(o=d(s.BYTE_KANJI,r.BYTE,t),i=[]);return e.concat(n,o,i).sort(function(t,e){return t.index-e.index}).map(function(t){return{data:t.data,mode:t.mode,length:t.length}})}function h(t,e){switch(e){case r.NUMERIC:return o.getBitsLength(t);case r.ALPHANUMERIC:return i.getBitsLength(t);case r.KANJI:return u.getBitsLength(t);case r.BYTE:return a.getBitsLength(t)}}function g(t,e){let n;const s=r.getBestModeForData(t);if(n=r.from(e,s),n!==r.BYTE&&n.bit<s.bit)throw new Error('"'+t+'" cannot be encoded with mode '+r.toString(n)+".\n Suggested mode is: "+r.toString(s));switch(n!==r.KANJI||l.isKanjiModeEnabled()||(n=r.BYTE),n){case r.NUMERIC:return new o(t);case r.ALPHANUMERIC:return new i(t);case r.KANJI:return new u(t);case r.BYTE:return new a(t)}}e.fromArray=function(t){return t.reduce(function(t,e){return"string"==typeof e?t.push(g(e,null)):e.data&&t.push(g(e.data,e.mode)),t},[])},e.fromString=function(t,n){const o=function(t){const e=[];for(let n=0;n<t.length;n++){const o=t[n];switch(o.mode){case r.NUMERIC:e.push([o,{data:o.data,mode:r.ALPHANUMERIC,length:o.length},{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.ALPHANUMERIC:e.push([o,{data:o.data,mode:r.BYTE,length:o.length}]);break;case r.KANJI:e.push([o,{data:o.data,mode:r.BYTE,length:f(o.data)}]);break;case r.BYTE:e.push([{data:o.data,mode:r.BYTE,length:f(o.data)}])}}return e}(p(t,l.isKanjiModeEnabled())),i=function(t,e){const n={},o={start:{}};let i=["start"];for(let a=0;a<t.length;a++){const u=t[a],s=[];for(let t=0;t<u.length;t++){const l=u[t],c=""+a+t;s.push(c),n[c]={node:l,lastCount:0},o[c]={};for(let t=0;t<i.length;t++){const a=i[t];n[a]&&n[a].node.mode===l.mode?(o[a][c]=h(n[a].lastCount+l.length,l.mode)-h(n[a].lastCount,l.mode),n[a].lastCount+=l.length):(n[a]&&(n[a].lastCount=l.length),o[a][c]=h(l.length,l.mode)+4+r.getCharCountIndicator(l.mode,e))}}i=s}for(let t=0;t<i.length;t++)o[i[t]].end=0;return{map:o,table:n}}(o,n),a=c.find_path(i.map,"start","end"),u=[];for(let t=1;t<a.length-1;t++)u.push(i.table[a[t]].node);return e.fromArray(function(t){return t.reduce(function(t,e){const n=t.length-1>=0?t[t.length-1]:null;return n&&n.mode===e.mode?(t[t.length-1].data+=e.data,t):(t.push(e),t)},[])}(u))},e.rawSplit=function(t){return e.fromArray(p(t,l.isKanjiModeEnabled()))}},6886(t,e){let n;const r=[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];e.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return 4*t+17},e.getSymbolTotalCodewords=function(t){return r[t]},e.getBCHDigit=function(t){let e=0;for(;0!==t;)e++,t>>>=1;return e},e.setToSJISFunction=function(t){if("function"!=typeof t)throw new Error('"toSJISFunc" is not a valid function.');n=t},e.isKanjiModeEnabled=function(){return void 0!==n},e.toSJIS=function(t){return n(t)}},1878(t,e){e.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}},1427(t,e,n){const r=n(6886),o=n(7518),i=n(9953),a=n(208),u=n(1878),s=r.getBCHDigit(7973);function l(t,e){return a.getCharCountIndicator(t,e)+4}function c(t,e){let n=0;return t.forEach(function(t){const r=l(t.mode,e);n+=r+t.getBitsLength()}),n}e.from=function(t,e){return u.isValid(t)?parseInt(t,10):e},e.getCapacity=function(t,e,n){if(!u.isValid(t))throw new Error("Invalid QR Code version");void 0===n&&(n=a.BYTE);const i=8*(r.getSymbolTotalCodewords(t)-o.getTotalCodewordsCount(t,e));if(n===a.MIXED)return i;const s=i-l(n,t);switch(n){case a.NUMERIC:return Math.floor(s/10*3);case a.ALPHANUMERIC:return Math.floor(s/11*2);case a.KANJI:return Math.floor(s/13);case a.BYTE:default:return Math.floor(s/8)}},e.getBestVersionForData=function(t,n){let r;const o=i.from(n,i.M);if(Array.isArray(t)){if(t.length>1)return function(t,n){for(let r=1;r<=40;r++)if(c(t,r)<=e.getCapacity(r,n,a.MIXED))return r}(t,o);if(0===t.length)return 1;r=t[0]}else r=t;return function(t,n,r){for(let o=1;o<=40;o++)if(n<=e.getCapacity(o,r,t))return o}(r.mode,r.getLength(),o)},e.getEncodedBits=function(t){if(!u.isValid(t)||t<7)throw new Error("Invalid QR Code version");let e=t<<12;for(;r.getBCHDigit(e)-s>=0;)e^=7973<<r.getBCHDigit(e)-s;return t<<12|e}},7899(t,e,n){const r=n(2726);e.render=function(t,e,n){let o=n,i=e;void 0!==o||e&&e.getContext||(o=e,e=void 0),e||(i=function(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}()),o=r.getOptions(o);const a=r.getImageWidth(t.modules.size,o),u=i.getContext("2d"),s=u.createImageData(a,a);return r.qrToImageData(s.data,t,o),function(t,e,n){t.clearRect(0,0,e.width,e.height),e.style||(e.style={}),e.height=n,e.width=n,e.style.height=n+"px",e.style.width=n+"px"}(u,i,a),u.putImageData(s,0,0),i},e.renderToDataURL=function(t,n,r){let o=r;void 0!==o||n&&n.getContext||(o=n,n=void 0),o||(o={});const i=e.render(t,n,o),a=o.type||"image/png",u=o.rendererOpts||{};return i.toDataURL(a,u.quality)}},6756(t,e,n){const r=n(2726);function o(t,e){const n=t.a/255,r=e+'="'+t.hex+'"';return n<1?r+" "+e+'-opacity="'+n.toFixed(2).slice(1)+'"':r}function i(t,e,n){let r=t+e;return void 0!==n&&(r+=" "+n),r}e.render=function(t,e,n){const a=r.getOptions(e),u=t.modules.size,s=t.modules.data,l=u+2*a.margin,c=a.color.light.a?"<path "+o(a.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",f="<path "+o(a.color.dark,"stroke")+' d="'+function(t,e,n){let r="",o=0,a=!1,u=0;for(let s=0;s<t.length;s++){const l=Math.floor(s%e),c=Math.floor(s/e);l||a||(a=!0),t[s]?(u++,s>0&&l>0&&t[s-1]||(r+=a?i("M",l+n,.5+c+n):i("m",o,0),o=0,a=!1),l+1<e&&t[s+1]||(r+=i("h",u),u=0)):o++}return r}(s,u,a.margin)+'"/>',d='viewBox="0 0 '+l+" "+l+'"',p='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+d+' shape-rendering="crispEdges">'+c+f+"</svg>\n";return"function"==typeof n&&n(null,p),p}},2726(t,e){function n(t){if("number"==typeof t&&(t=t.toString()),"string"!=typeof t)throw new Error("Color should be defined as hex string");let e=t.slice().replace("#","").split("");if(e.length<3||5===e.length||e.length>8)throw new Error("Invalid hex color: "+t);3!==e.length&&4!==e.length||(e=Array.prototype.concat.apply([],e.map(function(t){return[t,t]}))),6===e.length&&e.push("F","F");const n=parseInt(e.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:255&n,hex:"#"+e.slice(0,6).join("")}}e.getOptions=function(t){t||(t={}),t.color||(t.color={});const e=void 0===t.margin||null===t.margin||t.margin<0?4:t.margin,r=t.width&&t.width>=21?t.width:void 0,o=t.scale||4;return{width:r,scale:r?4:o,margin:e,color:{dark:n(t.color.dark||"#000000ff"),light:n(t.color.light||"#ffffffff")},type:t.type,rendererOpts:t.rendererOpts||{}}},e.getScale=function(t,e){return e.width&&e.width>=t+2*e.margin?e.width/(t+2*e.margin):e.scale},e.getImageWidth=function(t,n){const r=e.getScale(t,n);return Math.floor((t+2*n.margin)*r)},e.qrToImageData=function(t,n,r){const o=n.modules.size,i=n.modules.data,a=e.getScale(o,r),u=Math.floor((o+2*r.margin)*a),s=r.margin*a,l=[r.color.light,r.color.dark];for(let e=0;e<u;e++)for(let n=0;n<u;n++){let c=4*(e*u+n),f=r.color.light;if(e>=s&&n>=s&&e<u-s&&n<u-s){f=l[i[Math.floor((e-s)/a)*o+Math.floor((n-s)/a)]?1:0]}t[c++]=f.r,t[c++]=f.g,t[c++]=f.b,t[c]=f.a}}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);return(()=>{"use strict";var t=n(7583);const{entries:e,setPrototypeOf:r,isFrozen:o,getPrototypeOf:i,getOwnPropertyDescriptor:a}=Object;let{freeze:u,seal:s,create:l}=Object,{apply:c,construct:f}="undefined"!=typeof Reflect&&Reflect;u||(u=function(t){return t}),s||(s=function(t){return t}),c||(c=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return t.apply(e,r)}),f||(f=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new t(...n)});const d=C(Array.prototype.forEach),p=C(Array.prototype.lastIndexOf),h=C(Array.prototype.pop),g=C(Array.prototype.push),y=C(Array.prototype.splice),m=C(String.prototype.toLowerCase),b=C(String.prototype.toString),v=C(String.prototype.match),_=C(String.prototype.replace),E=C(String.prototype.indexOf),w=C(String.prototype.trim),O=C(Object.prototype.hasOwnProperty),A=C(RegExp.prototype.test),T=(S=TypeError,function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return f(S,e)});var S;function C(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return c(t,e,r)}}function x(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:m;r&&r(t,null);let i=e.length;for(;i--;){let r=e[i];if("string"==typeof r){const t=n(r);t!==r&&(o(e)||(e[i]=t),r=t)}t[r]=!0}return t}function P(t){for(let e=0;e<t.length;e++){O(t,e)||(t[e]=null)}return t}function R(t){const n=l(null);for(const[r,o]of e(t)){O(t,r)&&(Array.isArray(o)?n[r]=P(o):o&&"object"==typeof o&&o.constructor===Object?n[r]=R(o):n[r]=o)}return n}function M(t,e){for(;null!==t;){const n=a(t,e);if(n){if(n.get)return C(n.get);if("function"==typeof n.value)return C(n.value)}t=i(t)}return function(){return null}}const I=u(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),L=u(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),j=u(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),N=u(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),k=u(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),D=u(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),B=u(["#text"]),U=u(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),z=u(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=u(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=u(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),G=s(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$=s(/<%[\w\W]*|[\w\W]*%>/gm),X=s(/\$\{[\w\W]*/gm),V=s(/^data-[\-\w.\u00B7-\uFFFF]+$/),Y=s(/^aria-[\-\w]+$/),W=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=s(/^(?:\w+script|data):/i),J=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=s(/^html$/i),Q=s(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:Y,ATTR_WHITESPACE:J,CUSTOM_ELEMENT:Q,DATA_ATTR:V,DOCTYPE_NAME:q,ERB_EXPR:$,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:K,MUSTACHE_EXPR:G,TMPLIT_EXPR:X});const tt=1,et=3,nt=7,rt=8,ot=9,it=function(){return"undefined"==typeof window?null:window};var at=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:it();const r=e=>t(e);if(r.version="3.3.1",r.removed=[],!n||!n.document||n.document.nodeType!==ot||!n.Element)return r.isSupported=!1,r;let{document:o}=n;const i=o,a=i.currentScript,{DocumentFragment:s,HTMLTemplateElement:c,Node:f,Element:S,NodeFilter:C,NamedNodeMap:P=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:$,trustedTypes:X}=n,V=S.prototype,Y=M(V,"cloneNode"),K=M(V,"remove"),J=M(V,"nextSibling"),Q=M(V,"childNodes"),at=M(V,"parentNode");if("function"==typeof c){const t=o.createElement("template");t.content&&t.content.ownerDocument&&(o=t.content.ownerDocument)}let ut,st="";const{implementation:lt,createNodeIterator:ct,createDocumentFragment:ft,getElementsByTagName:dt}=o,{importNode:pt}=i;let ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof e&&"function"==typeof at&&lt&&void 0!==lt.createHTMLDocument;const{MUSTACHE_EXPR:gt,ERB_EXPR:yt,TMPLIT_EXPR:mt,DATA_ATTR:bt,ARIA_ATTR:vt,IS_SCRIPT_OR_DATA:_t,ATTR_WHITESPACE:Et,CUSTOM_ELEMENT:wt}=Z;let{IS_ALLOWED_URI:Ot}=Z,At=null;const Tt=x({},[...I,...L,...j,...k,...B]);let St=null;const Ct=x({},[...U,...z,...H,...F]);let xt=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Pt=null,Rt=null;const Mt=Object.seal(l(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let It=!0,Lt=!0,jt=!1,Nt=!0,kt=!1,Dt=!0,Bt=!1,Ut=!1,zt=!1,Ht=!1,Ft=!1,Gt=!1,$t=!0,Xt=!1,Vt=!0,Yt=!1,Wt={},Kt=null;const Jt=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let qt=null;const Qt=x({},["audio","video","img","source","image","track"]);let Zt=null;const te=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ee="http://www.w3.org/1998/Math/MathML",ne="http://www.w3.org/2000/svg",re="http://www.w3.org/1999/xhtml";let oe=re,ie=!1,ae=null;const ue=x({},[ee,ne,re],b);let se=x({},["mi","mo","mn","ms","mtext"]),le=x({},["annotation-xml"]);const ce=x({},["title","style","font","a","script"]);let fe=null;const de=["application/xhtml+xml","text/html"];let pe=null,he=null;const ge=o.createElement("form"),ye=function(t){return t instanceof RegExp||t instanceof Function},me=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!he||he!==t){if(t&&"object"==typeof t||(t={}),t=R(t),fe=-1===de.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,pe="application/xhtml+xml"===fe?b:m,At=O(t,"ALLOWED_TAGS")?x({},t.ALLOWED_TAGS,pe):Tt,St=O(t,"ALLOWED_ATTR")?x({},t.ALLOWED_ATTR,pe):Ct,ae=O(t,"ALLOWED_NAMESPACES")?x({},t.ALLOWED_NAMESPACES,b):ue,Zt=O(t,"ADD_URI_SAFE_ATTR")?x(R(te),t.ADD_URI_SAFE_ATTR,pe):te,qt=O(t,"ADD_DATA_URI_TAGS")?x(R(Qt),t.ADD_DATA_URI_TAGS,pe):Qt,Kt=O(t,"FORBID_CONTENTS")?x({},t.FORBID_CONTENTS,pe):Jt,Pt=O(t,"FORBID_TAGS")?x({},t.FORBID_TAGS,pe):R({}),Rt=O(t,"FORBID_ATTR")?x({},t.FORBID_ATTR,pe):R({}),Wt=!!O(t,"USE_PROFILES")&&t.USE_PROFILES,It=!1!==t.ALLOW_ARIA_ATTR,Lt=!1!==t.ALLOW_DATA_ATTR,jt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Nt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,kt=t.SAFE_FOR_TEMPLATES||!1,Dt=!1!==t.SAFE_FOR_XML,Bt=t.WHOLE_DOCUMENT||!1,Ht=t.RETURN_DOM||!1,Ft=t.RETURN_DOM_FRAGMENT||!1,Gt=t.RETURN_TRUSTED_TYPE||!1,zt=t.FORCE_BODY||!1,$t=!1!==t.SANITIZE_DOM,Xt=t.SANITIZE_NAMED_PROPS||!1,Vt=!1!==t.KEEP_CONTENT,Yt=t.IN_PLACE||!1,Ot=t.ALLOWED_URI_REGEXP||W,oe=t.NAMESPACE||re,se=t.MATHML_TEXT_INTEGRATION_POINTS||se,le=t.HTML_INTEGRATION_POINTS||le,xt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ye(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(xt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ye(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(xt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(xt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),kt&&(Lt=!1),Ft&&(Ht=!0),Wt&&(At=x({},B),St=[],!0===Wt.html&&(x(At,I),x(St,U)),!0===Wt.svg&&(x(At,L),x(St,z),x(St,F)),!0===Wt.svgFilters&&(x(At,j),x(St,z),x(St,F)),!0===Wt.mathMl&&(x(At,k),x(St,H),x(St,F))),t.ADD_TAGS&&("function"==typeof t.ADD_TAGS?Mt.tagCheck=t.ADD_TAGS:(At===Tt&&(At=R(At)),x(At,t.ADD_TAGS,pe))),t.ADD_ATTR&&("function"==typeof t.ADD_ATTR?Mt.attributeCheck=t.ADD_ATTR:(St===Ct&&(St=R(St)),x(St,t.ADD_ATTR,pe))),t.ADD_URI_SAFE_ATTR&&x(Zt,t.ADD_URI_SAFE_ATTR,pe),t.FORBID_CONTENTS&&(Kt===Jt&&(Kt=R(Kt)),x(Kt,t.FORBID_CONTENTS,pe)),t.ADD_FORBID_CONTENTS&&(Kt===Jt&&(Kt=R(Kt)),x(Kt,t.ADD_FORBID_CONTENTS,pe)),Vt&&(At["#text"]=!0),Bt&&x(At,["html","head","body"]),At.table&&(x(At,["tbody"]),delete Pt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ut=t.TRUSTED_TYPES_POLICY,st=ut.createHTML("")}else void 0===ut&&(ut=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(X,a)),null!==ut&&"string"==typeof st&&(st=ut.createHTML(""));u&&u(t),he=t}},be=x({},[...L,...j,...N]),ve=x({},[...k,...D]),_e=function(t){g(r.removed,{element:t});try{at(t).removeChild(t)}catch(e){K(t)}},Ee=function(t,e){try{g(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){g(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(Ht||Ft)try{_e(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},we=function(t){let e=null,n=null;if(zt)t="<remove></remove>"+t;else{const e=v(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===fe&&oe===re&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const r=ut?ut.createHTML(t):t;if(oe===re)try{e=(new $).parseFromString(r,fe)}catch(t){}if(!e||!e.documentElement){e=lt.createDocument(oe,"template",null);try{e.documentElement.innerHTML=ie?st:r}catch(t){}}const i=e.body||e.documentElement;return t&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),oe===re?dt.call(e,Bt?"html":"body")[0]:Bt?e.documentElement:i},Oe=function(t){return ct.call(t.ownerDocument||t,t,C.SHOW_ELEMENT|C.SHOW_COMMENT|C.SHOW_TEXT|C.SHOW_PROCESSING_INSTRUCTION|C.SHOW_CDATA_SECTION,null)},Ae=function(t){return t instanceof G&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof P)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Te=function(t){return"function"==typeof f&&t instanceof f};function Se(t,e,n){d(t,t=>{t.call(r,e,n,he)})}const Ce=function(t){let e=null;if(Se(ht.beforeSanitizeElements,t,null),Ae(t))return _e(t),!0;const n=pe(t.nodeName);if(Se(ht.uponSanitizeElement,t,{tagName:n,allowedTags:At}),Dt&&t.hasChildNodes()&&!Te(t.firstElementChild)&&A(/<[/\w!]/g,t.innerHTML)&&A(/<[/\w!]/g,t.textContent))return _e(t),!0;if(t.nodeType===nt)return _e(t),!0;if(Dt&&t.nodeType===rt&&A(/<[/\w]/g,t.data))return _e(t),!0;if(!(Mt.tagCheck instanceof Function&&Mt.tagCheck(n))&&(!At[n]||Pt[n])){if(!Pt[n]&&Pe(n)){if(xt.tagNameCheck instanceof RegExp&&A(xt.tagNameCheck,n))return!1;if(xt.tagNameCheck instanceof Function&&xt.tagNameCheck(n))return!1}if(Vt&&!Kt[n]){const e=at(t)||t.parentNode,n=Q(t)||t.childNodes;if(n&&e){for(let r=n.length-1;r>=0;--r){const o=Y(n[r],!0);o.__removalCount=(t.__removalCount||0)+1,e.insertBefore(o,J(t))}}}return _e(t),!0}return t instanceof S&&!function(t){let e=at(t);e&&e.tagName||(e={namespaceURI:oe,tagName:"template"});const n=m(t.tagName),r=m(e.tagName);return!!ae[t.namespaceURI]&&(t.namespaceURI===ne?e.namespaceURI===re?"svg"===n:e.namespaceURI===ee?"svg"===n&&("annotation-xml"===r||se[r]):Boolean(be[n]):t.namespaceURI===ee?e.namespaceURI===re?"math"===n:e.namespaceURI===ne?"math"===n&&le[r]:Boolean(ve[n]):t.namespaceURI===re?!(e.namespaceURI===ne&&!le[r])&&!(e.namespaceURI===ee&&!se[r])&&!ve[n]&&(ce[n]||!be[n]):!("application/xhtml+xml"!==fe||!ae[t.namespaceURI]))}(t)?(_e(t),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!A(/<\/no(script|embed|frames)/i,t.innerHTML)?(kt&&t.nodeType===et&&(e=t.textContent,d([gt,yt,mt],t=>{e=_(e,t," ")}),t.textContent!==e&&(g(r.removed,{element:t.cloneNode()}),t.textContent=e)),Se(ht.afterSanitizeElements,t,null),!1):(_e(t),!0)},xe=function(t,e,n){if($t&&("id"===e||"name"===e)&&(n in o||n in ge))return!1;if(Lt&&!Rt[e]&&A(bt,e));else if(It&&A(vt,e));else if(Mt.attributeCheck instanceof Function&&Mt.attributeCheck(e,t));else if(!St[e]||Rt[e]){if(!(Pe(t)&&(xt.tagNameCheck instanceof RegExp&&A(xt.tagNameCheck,t)||xt.tagNameCheck instanceof Function&&xt.tagNameCheck(t))&&(xt.attributeNameCheck instanceof RegExp&&A(xt.attributeNameCheck,e)||xt.attributeNameCheck instanceof Function&&xt.attributeNameCheck(e,t))||"is"===e&&xt.allowCustomizedBuiltInElements&&(xt.tagNameCheck instanceof RegExp&&A(xt.tagNameCheck,n)||xt.tagNameCheck instanceof Function&&xt.tagNameCheck(n))))return!1}else if(Zt[e]);else if(A(Ot,_(n,Et,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==E(n,"data:")||!qt[t]){if(jt&&!A(_t,_(n,Et,"")));else if(n)return!1}else;return!0},Pe=function(t){return"annotation-xml"!==t&&v(t,wt)},Re=function(t){Se(ht.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||Ae(t))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:St,forceKeepAttr:void 0};let o=e.length;for(;o--;){const i=e[o],{name:a,namespaceURI:u,value:s}=i,l=pe(a),c=s;let f="value"===a?c:w(c);if(n.attrName=l,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,Se(ht.uponSanitizeAttribute,t,n),f=n.attrValue,!Xt||"id"!==l&&"name"!==l||(Ee(a,t),f="user-content-"+f),Dt&&A(/((--!?|])>)|<\/(style|title|textarea)/i,f)){Ee(a,t);continue}if("attributename"===l&&v(f,"href")){Ee(a,t);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){Ee(a,t);continue}if(!Nt&&A(/\/>/i,f)){Ee(a,t);continue}kt&&d([gt,yt,mt],t=>{f=_(f,t," ")});const p=pe(t.nodeName);if(xe(p,l,f)){if(ut&&"object"==typeof X&&"function"==typeof X.getAttributeType)if(u);else switch(X.getAttributeType(p,l)){case"TrustedHTML":f=ut.createHTML(f);break;case"TrustedScriptURL":f=ut.createScriptURL(f)}if(f!==c)try{u?t.setAttributeNS(u,a,f):t.setAttribute(a,f),Ae(t)?_e(t):h(r.removed)}catch(e){Ee(a,t)}}else Ee(a,t)}Se(ht.afterSanitizeAttributes,t,null)},Me=function t(e){let n=null;const r=Oe(e);for(Se(ht.beforeSanitizeShadowDOM,e,null);n=r.nextNode();)Se(ht.uponSanitizeShadowNode,n,null),Ce(n),Re(n),n.content instanceof s&&t(n.content);Se(ht.afterSanitizeShadowDOM,e,null)};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,o=null,a=null,u=null;if(ie=!t,ie&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Te(t)){if("function"!=typeof t.toString)throw T("toString is not a function");if("string"!=typeof(t=t.toString()))throw T("dirty is not a string, aborting")}if(!r.isSupported)return t;if(Ut||me(e),r.removed=[],"string"==typeof t&&(Yt=!1),Yt){if(t.nodeName){const e=pe(t.nodeName);if(!At[e]||Pt[e])throw T("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof f)n=we("\x3c!----\x3e"),o=n.ownerDocument.importNode(t,!0),o.nodeType===tt&&"BODY"===o.nodeName||"HTML"===o.nodeName?n=o:n.appendChild(o);else{if(!Ht&&!kt&&!Bt&&-1===t.indexOf("<"))return ut&&Gt?ut.createHTML(t):t;if(n=we(t),!n)return Ht?null:Gt?st:""}n&&zt&&_e(n.firstChild);const l=Oe(Yt?t:n);for(;a=l.nextNode();)Ce(a),Re(a),a.content instanceof s&&Me(a.content);if(Yt)return t;if(Ht){if(Ft)for(u=ft.call(n.ownerDocument);n.firstChild;)u.appendChild(n.firstChild);else u=n;return(St.shadowroot||St.shadowrootmode)&&(u=pt.call(i,u,!0)),u}let c=Bt?n.outerHTML:n.innerHTML;return Bt&&At["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&A(q,n.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+c),kt&&d([gt,yt,mt],t=>{c=_(c,t," ")}),ut&&Gt?ut.createHTML(c):c},r.setConfig=function(){me(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ut=!0},r.clearConfig=function(){he=null,Ut=!1},r.isValidAttribute=function(t,e,n){he||me({});const r=pe(t),o=pe(e);return xe(r,o,n)},r.addHook=function(t,e){"function"==typeof e&&g(ht[t],e)},r.removeHook=function(t,e){if(void 0!==e){const n=p(ht[t],e);return-1===n?void 0:y(ht[t],n,1)[0]}return h(ht[t])},r.removeHooks=function(t){ht[t]=[]},r.removeAllHooks=function(){ht={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}();function ut(t,e={}){return e&&"object"==typeof e?(Object.assign(t.style,e),t):t}function st(t){return at.sanitize(t,{ALLOWED_TAGS:["b","i","u","strong","em","br","span","p","div"],ALLOWED_ATTR:["style","class"]})}function lt(t,e="td"){const n=ut(document.createElement(e),{padding:"7px 2px",...t.style});return n.innerHTML=st(t.value||""),n}function ct(t){const e=["apng","bmp","gif","ico","cur","jpeg","jpg","jpeg","jfif","pjpeg","pjp","png","svg","tif","tiff","webp"],n=ut(document.createElement("div"),{width:"100%",display:"flex",justifyContent:t?.position||"left"});let r;if(t.url){const e=function(t){if(!t||"string"!=typeof t)return!1;try{return btoa(atob(t))===t}catch(t){return!1}}(t.url);if(!function(t){let e;try{e=new URL(t)}catch(t){return!1}return"http:"===e.protocol||"https:"===e.protocol}(t.url)&&!e)throw new Error(`Invalid url: ${t.url}`);r=e?"data:image/png;base64,"+t.url:t.url}else{if(!t.path)throw new Error("Image requires either a valid url or path property");{const n=window.electronAPI.readFileAsBase64(t.path);if(!n.success)throw new Error(n.error);let o=window.electronAPI.getFileExtension(t.path);if(!e.includes(o))throw new Error(o+" file type not supported, consider the types: "+e.join());"svg"===o&&(o="svg+xml"),r="data:image/"+o+";base64,"+n.data}}if(!r)throw new Error("Failed to generate image URI");const o=ut(document.createElement("img"),{height:t.height,width:t.width,...t.style});return o.src=r,n.prepend(o),n}var ft=n(6129),dt=n.n(ft);const pt=document.querySelector("#main");if(!pt)throw new Error("Main element (#main) not found in document");const ht=pt;window.electronAPI.onBodyInit(function(t){ht.style.width=t?.width||"100%",ht.style.margin=t?.margin||"0",window.electronAPI.sendBodyInitReply({status:!0,error:null})}),window.electronAPI.onRenderLine(async function(e){switch(e.line.type){case"text":try{ht.append(function(t){const e=ut(document.createElement("div"),t.style);return e.innerHTML=st(t.value||""),e}(e.line)),window.electronAPI.sendRenderLineReply({status:!0,error:null})}catch(t){window.electronAPI.sendRenderLineReply({status:!1,error:t.toString()})}return;case"image":try{const t=ct(e.line);ht.append(t),window.electronAPI.sendRenderLineReply({status:!0,error:null})}catch(t){window.electronAPI.sendRenderLineReply({status:!1,error:t.toString()})}return;case"qrCode":try{const n=document.createElement("div");n.style.display="flex",n.style.justifyContent=e.line?.position||"left",e.line?.style?ut(n,e.line.style):(n.style.display="flex",n.style.justifyContent=e.line?.position||"left");const r=document.createElement("canvas");r.setAttribute("id",`qrCode${e.lineIndex}`),ut(r,{textAlign:e.line.position?"-webkit-"+e.line.position:"-webkit-left"}),n.append(r),ht.append(n),await function(e,n){const{value:r,width:o}=n,i=document.querySelector(`#${e}`),a={width:o,errorCorrectionLevel:"H",color:{dark:"#000",light:"#fff"}};return t.toCanvas(i,r,a)}(`qrCode${e.lineIndex}`,{value:e.line.value||"",width:e.line.width?Number.parseInt(e.line.width,10):55}),window.electronAPI.sendRenderLineReply({status:!0,error:null})}catch(t){window.electronAPI.sendRenderLineReply({status:!1,error:t.toString()})}return;case"barCode":try{const t=function(t,e){const n=document.createElement("div"),r=document.createElementNS("http://www.w3.org/2000/svg","svg");return r.setAttributeNS(null,"id",`barCode-${e}`),n.append(r),t?.style?ut(n,t.style):(n.style.display="flex",n.style.justifyContent=t?.position??"left"),t.value?(dt()(r,t.value,{lineColor:"#000",textMargin:0,fontOptions:"bold",fontSize:t.fontsize??12,width:t.width?Number.parseInt(t.width,10):4,height:t.height?Number.parseInt(t.height,10):40,displayValue:t.displayValue}),n):n}(e.line,e.lineIndex);ht.append(t),window.electronAPI.sendRenderLineReply({status:!0,error:null})}catch(t){window.electronAPI.sendRenderLineReply({status:!1,error:t.toString()})}return;case"table":try{const t=function(t,e){const n=document.createElement("div");n.setAttribute("id",`table-container-${e}`);let r=document.createElement("table");r.setAttribute("id",`table${e}`),r=ut(r,{...t.style});let o=document.createElement("thead");o=ut(o,t.tableHeaderStyle);let i=document.createElement("tbody");i=ut(i,t.tableBodyStyle);let a=document.createElement("tfoot");if(a=ut(a,t.tableFooterStyle),t.tableHeader)for(const e of t.tableHeader)if("object"==typeof e)switch(e.type){case"image":{const t=ct(e),n=document.createElement("th");n.append(t),o.append(n);break}case"text":o.append(lt(e,"th"))}else{const t=document.createElement("th");t.innerHTML=st(String(e)),o.append(t)}if(t.tableBody)for(const e of t.tableBody){const t=document.createElement("tr");for(const n of e)if("object"==typeof n)switch(n.type){case"image":{const e=ct(n),r=document.createElement("td");r.append(e),t.append(r);break}case"text":t.append(lt(n))}else{const e=document.createElement("td");e.innerHTML=st(String(n)),t.append(e)}i.append(t)}if(t.tableFooter)for(const e of t.tableFooter)if("object"==typeof e)switch(e.type){case"image":{const t=ct(e),n=document.createElement("th");n.append(t),a.append(n);break}case"text":a.append(lt(e,"th"))}else{const t=document.createElement("th");t.innerHTML=st(String(e)),a.append(t)}return r.append(o),r.append(i),r.append(a),n.append(r),n}(e.line,e.lineIndex);ht.append(t),window.electronAPI.sendRenderLineReply({status:!0,error:null})}catch(t){window.electronAPI.sendRenderLineReply({status:!1,error:t.toString()})}break;default:window.electronAPI.sendRenderLineReply({status:!1,error:`Unknown line type: ${e.line.type}`})}})})(),{}})());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devraghu/electron-printer",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "private": false,
5
5
  "description": "Electron printer plugin for 80mm, 78mm, 76mm, 58mm, 57mm, 44mm printers",
6
6
  "keywords": [
@@ -55,23 +55,23 @@
55
55
  },
56
56
  "devDependencies": {
57
57
  "@playwright/test": "^1.58.2",
58
- "@types/node": "^25.2.3",
58
+ "@types/node": "^25.3.2",
59
59
  "@types/qrcode": "^1.5.6",
60
60
  "bundle-declarations-webpack-plugin": "^6.0.0",
61
61
  "css-loader": "^7.1.4",
62
62
  "css-minimizer-webpack-plugin": "^7.0.4",
63
- "electron": "^40.4.1",
63
+ "electron": "^40.6.1",
64
64
  "html-webpack-plugin": "^5.6.6",
65
65
  "husky": "^9.1.7",
66
66
  "lint-staged": "^16.2.7",
67
67
  "mini-css-extract-plugin": "^2.10.0",
68
- "oxfmt": "^0.34.0",
69
- "oxlint": "^1.49.0",
68
+ "oxfmt": "^0.35.0",
69
+ "oxlint": "^1.50.0",
70
70
  "playwright": "^1.58.2",
71
71
  "terser-webpack-plugin": "^5.3.16",
72
72
  "ts-loader": "^9.5.4",
73
73
  "typescript": "^5.9.3",
74
- "webpack": "^5.105.2",
74
+ "webpack": "^5.105.3",
75
75
  "webpack-cli": "^6.0.1",
76
76
  "webpack-node-externals": "^3.0.0"
77
77
  },