useblocks 1.1.30 → 1.1.32
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/iframe/js/amp.fvKwVZZd.js +1 -0
- package/iframe/js/iframe-eblock.js +1 -1
- package/iframe/js/iframe.js +1 -1
- package/iframe/js/rules.B4dVzZIU.js +1 -1
- package/package.json +1 -1
- package/singlepage_headless_plugin.html +1 -1
- package/static/core/{84430610.js → 268fe2ad.js} +2 -2
- package/static/core/{9f597c4d.js → 2a7ad545.js} +2 -2
- package/static/core/{1424c612.js → 30475f0f.js} +2 -2
- package/static/core/4ea9fc77.js +78 -0
- package/static/core/{928d808b.js → 545b5c1c.js} +2 -2
- package/static/core/{d0e5aa97.js → 598aba6d.js} +3 -3
- package/static/core/{69518486.js → 8491aed0.js} +2 -2
- package/static/core/{f6dff18b.js → 84d85698.js} +1 -1
- package/static/core/{3d6d9ecd2.js → 971de80c2.js} +1 -1
- package/static/core/{b77ec308.js → 9bd41e07.js} +1 -1
- package/static/core/{eb1e40b4.js → a60b5c28.js} +49 -49
- package/static/core/b036c781.js +3 -0
- package/static/core/{3cec0f58.js → b07072e6.js} +1 -1
- package/static/core/{d85b4555.js → b28c3b81.js} +1 -1
- package/static/core/c2f9cd42.js +33 -0
- package/static/core/{beb4d9d1.js → c9c989ee.js} +1 -1
- package/static/core/d0554ae6.js +1 -0
- package/static/core/{43190ba4.js → dd805749.js} +1 -1
- package/static/esm/533d7587.js +1 -0
- package/two_step_headless_plugin.html +1 -1
- package/{useblocks-core.6be93158.js → useblocks-core.87bb8921.js} +1 -1
- package/useblocks-esm.js +5 -5
- package/useblocks.d.ts +7 -2
- package/useblocks.js +11 -11
- package/iframe/js/amp.A5wCvj7V.js +0 -1
- package/static/core/65add2fe.js +0 -33
- package/static/core/70acf01b.js +0 -3
- package/static/core/d2257218.js +0 -1
- package/static/core/e5e840f6.js +0 -78
- /package/iframe/{iframe-eblock.6be93158.html → iframe-eblock.87bb8921.html} +0 -0
- /package/iframe/{iframe.6be93158.html → iframe.87bb8921.html} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
__useblocks__.define(`static/core/
|
|
1
|
+
__useblocks__.define(`static/core/84d85698.js`,[`require`,`exports`,`module`,`static/core/4dc58c63.js`,`static/core/545b5c1c.js`,`react`,`react-dom`,`react/jsx-runtime`,`antd`,`react-dom/client`,`@ant-design/icons`,`@ant-design/cssinjs`],function(e,t,n){let r=e("./4dc58c63.js"),i=e("./545b5c1c.js"),a=e("react");a=r.l(a,1),e("react-dom");let o=e("react/jsx-runtime"),s=e("antd");e("react-dom/client"),e("@ant-design/icons"),e("@ant-design/cssinjs");var c=({size:e=24,color:t=`currentColor`,...n})=>a.createElement(`svg`,{viewBox:`0 0 24 24`,width:e,height:e,stroke:t,strokeWidth:`2`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,...n},a.createElement(`path`,{d:`m14 10 7-7m0 0h-6m6 0v6m-11 5-7 7m0 0h6m-6 0v-6`}));c.displayName=`Expand01`;var l={root:`root`,controls:`controls`,segmentedControl:`segmentedControl`,sizeRow:`sizeRow`,sizeRowLabel:`sizeRowLabel`,sizeInputNumber:`sizeInputNumber`,sizeSuffix:`sizeSuffix`,colorGrid:`colorGrid`,colorCell:`colorCell`,colorCellLabel:`colorCellLabel`,colorPickerFull:`colorPickerFull`,bgExtras:`bgExtras`,bgWarning:`bgWarning`,previewSection:`previewSection`,previewTitle:`previewTitle`,previewWrap:`previewWrap`,scanLine:`scanLine`,scanLineBarcode:`scanLineBarcode`,previewWrapBarcode:`previewWrapBarcode`,previewCanvas:`previewCanvas`,previewCanvasBarcode:`previewCanvasBarcode`,actions:`actions`};t.default=({customRequest:t,state:n,setState:r})=>{let{t:u}=i.v(),{options:d}=i.S(),f=d?.config?.iconStrokeWidth??1.75,p=(0,a.useRef)(null),{mode:m,rawText:h,foregroundHex:g,backgroundHex:_,transparentBackground:v,qrSidePx:y,barcodeBarHeightPx:b}=n,x=(0,a.useCallback)(e=>r(t=>Object.assign(Object.assign({},t),{mode:e})),[r]),S=(0,a.useCallback)(e=>r(t=>Object.assign(Object.assign({},t),{rawText:e})),[r]),C=(0,a.useCallback)(e=>r(t=>Object.assign(Object.assign({},t),{foregroundHex:e})),[r]),w=(0,a.useCallback)(e=>r(t=>Object.assign(Object.assign({},t),{backgroundHex:e})),[r]),T=(0,a.useCallback)(e=>r(t=>Object.assign(Object.assign({},t),{transparentBackground:e})),[r]),E=(0,a.useCallback)(e=>r(t=>Object.assign(Object.assign({},t),{qrSidePx:e})),[r]),D=(0,a.useCallback)(e=>r(t=>Object.assign(Object.assign({},t),{barcodeBarHeightPx:e})),[r]),[O,k]=(0,a.useState)(h),[A,j]=(0,a.useState)(null),[M,N]=(0,a.useState)(!1),P=(0,a.useMemo)(()=>i.u.debounce(e=>k(e),300),[]);(0,a.useEffect)(()=>(P(h),()=>{P.cancel()}),[h,P]);let F=v?`#00000000`:_,I=(0,a.useCallback)(async(t,n)=>{let r=(await Promise.resolve().then(()=>e("./c9c989ee.js")).then(function(e){return e.b})).default,i=n.trim(),a=Math.min(280,Math.max(80,y));if(!i){t.width=a,t.height=a;let e=t.getContext(`2d`);e&&e.clearRect(0,0,t.width,t.height);return}t.width=a,t.height=a,await r.toCanvas(t,i,{width:a,margin:2,color:{dark:g,light:F}})},[g,F,y]),L=(0,a.useCallback)(async(t,n)=>{let r=(await Promise.resolve().then(()=>e("./9bd41e07.js")).then(function(e){return e.J})).default,i=n.trim(),a=v?`rgba(0,0,0,0)`:_,o=Math.min(72,Math.max(24,b)),s=Math.max(1,Math.round(o/42)),c=Math.max(4,Math.round(.07*o)),l=Math.max(10,Math.round(.15*o));if(!i){t.width=Math.round(4*o),t.height=Math.round(1.65*o);let e=t.getContext(`2d`);e&&e.clearRect(0,0,t.width,t.height);return}t.width=Math.round(4.2*o),t.height=Math.round(1.65*o),r(t,i,{format:`CODE128`,displayValue:!0,background:a,lineColor:g,margin:c,width:s,height:o,fontSize:l})},[g,_,v,b]);(0,a.useEffect)(()=>{let e=p.current;if(!e)return;let t=!1;return(async()=>{try{m===`qr`?await I(e,O):await L(e,O),t||j(null)}catch(n){let r=n instanceof Error?n.message:String(n);if(!t){j(m===`barcode`?u(`Barcode generation failed`):r);let t=e.getContext(`2d`);t&&t.clearRect(0,0,e.width,e.height)}}})(),()=>{t=!0}},[m,O,L,I,u]);let R=(0,a.useCallback)(async()=>{P.flush();let t=h.trim();if(!t)throw Error(u(`Enter text or URL to preview`));let n=typeof window>`u`?2:Math.min(3,Math.max(2,window.devicePixelRatio||2));if(m===`qr`){let r=Math.round(Math.min(600,Math.max(80,y))*n),i=document.createElement(`canvas`);i.width=r,i.height=r,await(await Promise.resolve().then(()=>e("./c9c989ee.js")).then(function(e){return e.b})).default.toCanvas(i,t,{width:r,margin:2,color:{dark:g,light:F}});let a=await new Promise(e=>i.toBlob(e,`image/png`));if(!a)throw Error(`PNG export failed`);return a}let r=(await Promise.resolve().then(()=>e("./9bd41e07.js")).then(function(e){return e.J})).default,i=document.createElement(`canvas`),a=v?`rgba(0,0,0,0)`:_,o=Math.min(130,Math.max(24,b)),s=Math.max(6,Math.round(.1*o)),c=Math.max(2,Math.round(o/36)),l=Math.max(12,Math.round(.16*o));r(i,t,{format:`CODE128`,displayValue:!0,background:a,lineColor:g,margin:Math.round(s*n),width:Math.round(c*n),height:Math.round(o*n),fontSize:Math.round(l*n)});let d=await new Promise(e=>i.toBlob(e,`image/png`));if(!d)throw Error(`PNG export failed`);return d},[m,h,g,F,_,v,y,b,P,u]),z=(0,a.useCallback)(async()=>{if(!M&&h.trim()){N(!0);try{let e;try{e=await R()}catch(e){j(e instanceof Error?e.message:String(e));return}let n=new File([e],`${m===`qr`?`qr-code`:`barcode`}-${Date.now()}.png`,{type:`image/png`,lastModified:Date.now()});await Promise.resolve(t({file:n}))}finally{N(!1)}}},[t,R,m,h,M]),B=!!h.trim()&&!A;return(0,o.jsx)(`div`,{className:l.root,children:(0,o.jsxs)(`div`,{className:l.controls,children:[(0,o.jsx)(s.Segmented,{block:!0,className:l.segmentedControl,value:m,onChange:e=>{x(e),j(null)},options:[{label:u(`QR code`),value:`qr`},{label:u(`Barcode`),value:`barcode`}]}),A&&(0,o.jsx)(s.Alert,{type:`error`,title:u(`Validation error`),description:A,showIcon:!0,closable:!0,onClose:()=>j(null)}),(0,o.jsx)(s.Input.TextArea,{value:h,onChange:e=>{S(e.target.value),j(null)},placeholder:u(`Text or URL`),rows:3,spellCheck:!1,autoComplete:`off`}),(0,o.jsxs)(`div`,{className:l.sizeRow,children:[(0,o.jsx)(s.Typography.Text,{type:`secondary`,className:l.sizeRowLabel,children:u(m===`qr`?`QR image size px`:`Barcode bar height px`)}),(0,o.jsx)(s.InputNumber,m===`qr`?{className:l.sizeInputNumber,min:80,max:600,step:8,value:y,onChange:e=>E(typeof e!=`number`||Number.isNaN(e)?200:e),prefix:(0,o.jsx)(c,{size:18,strokeWidth:f}),suffix:(0,o.jsx)(`span`,{className:l.sizeSuffix,children:`px`}),"aria-label":u(`QR image size px`)}:{className:l.sizeInputNumber,min:24,max:130,step:4,value:b,onChange:e=>D(typeof e!=`number`||Number.isNaN(e)?60:e),prefix:(0,o.jsx)(c,{size:18,strokeWidth:f}),suffix:(0,o.jsx)(`span`,{className:l.sizeSuffix,children:`px`}),"aria-label":u(`Barcode bar height px`)})]}),(0,o.jsxs)(`div`,{className:l.colorGrid,children:[(0,o.jsxs)(`div`,{className:l.colorCell,children:[(0,o.jsx)(s.Typography.Text,{type:`secondary`,className:l.colorCellLabel,children:u(`Code color`,`Code color`)}),(0,o.jsx)(s.ColorPicker,{className:l.colorPickerFull,value:g,format:`hex`,disabledAlpha:!0,showText:!0,onChange:(e,t)=>{C(typeof e==`string`?e:e?.toHexString?e.toHexString():t)}})]}),(0,o.jsxs)(`div`,{className:l.colorCell,children:[(0,o.jsx)(s.Typography.Text,{type:`secondary`,className:l.colorCellLabel,children:u(`Background color`,`Background color`)}),(0,o.jsx)(s.ColorPicker,{className:l.colorPickerFull,value:_,format:`hex`,disabledAlpha:!0,showText:!0,disabled:v,onChange:(e,t)=>{w(typeof e==`string`?e:e?.toHexString?e.toHexString():t)}})]}),(0,o.jsxs)(`div`,{className:l.bgExtras,children:[(0,o.jsx)(s.Checkbox,{checked:v,onChange:e=>T(e.target.checked),children:u(`Transparent background`,`Transparent background`)}),v&&(0,o.jsx)(s.Alert,{type:`warning`,showIcon:!0,title:u(`QR transparent background hint`),className:l.bgWarning})]})]}),(0,o.jsxs)(`div`,{className:l.previewSection,children:[(0,o.jsx)(s.Typography.Text,{className:l.previewTitle,children:u(`Preview`,`Preview`)}),(0,o.jsxs)(`div`,{className:[l.previewWrap,m===`barcode`&&l.previewWrapBarcode].filter(Boolean).join(` `),children:[(0,o.jsx)(`div`,{className:[l.scanLine,m===`barcode`&&l.scanLineBarcode].filter(Boolean).join(` `)}),(0,o.jsx)(`canvas`,{ref:p,className:[l.previewCanvas,m===`barcode`&&l.previewCanvasBarcode].filter(Boolean).join(` `),"aria-label":u(`Preview`)})]})]}),(0,o.jsx)(`div`,{className:l.actions,children:(0,o.jsx)(s.Button,{type:`primary`,onClick:()=>{z()},loading:M,disabled:!B,children:u(`Add to My files`)})})]})})}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.setAttribute(`data-useblocks`,`true`),e.appendChild(document.createTextNode(`@import "https://fonts.googleapis.com/css2?family=Geologica:wght@300;600&display=swap";.blocks-app .ant-modal.premium-features-modal .ant-modal-container{border-radius:calc(var(--borderRadiusXL) * 2px);padding:20px 19px}.blocks-app .premium-features-modal .modal-title{text-align:center;margin-bottom:0;font-size:32px}.blocks-app .premium-features-modal .ant-carousel .slick-dots li button{opacity:.5;background:#fff}.blocks-app .premium-features-modal .ant-carousel .slick-dots li.slick-active button{opacity:1}.blocks-app .premium-features-modal .modal-subtitle{text-align:center;margin-bottom:20px;font-size:18px}.blocks-app .premium-features-modal .carousel-slider{margin-bottom:20px}.blocks-app .premium-features-modal .slick-list{border-radius:calc(var(--borderRadiusXL) * 1.5px)}.blocks-app .premium-features-modal .slick-slide{padding:0 5px}.blocks-app .premium-features-modal .carousel-slide{border-radius:calc(var(--borderRadiusXL) * 1.5px);justify-content:flex-end;align-items:center;height:480px;display:flex}.blocks-app .premium-features-modal .slide-item-image{width:50%;padding:24px 0 24px 32px}.blocks-app .premium-features-modal .slide-item-image img{border-radius:calc(var(--borderRadiusXL) * 1.3px);width:100%}.blocks-app .premium-features-modal .slide-item-content{width:50%;padding:48px}.blocks-app .premium-features-modal .slide-title{margin-bottom:48px;font-size:50px;font-weight:700;line-height:1}.blocks-app .premium-features-modal .slide-description{font-size:22px}.blocks-app .premium-features-modal .modal-buttons{justify-content:center;gap:10px;display:flex}.blocks-app .premium-features-modal .modal-buttons button{padding:0 30px}.blocks-app .limit-upgrade-modal.ant-modal{max-width:calc(100vw - 24px)}.blocks-app .limit-upgrade-modal .ant-modal-content{border-radius:16px;padding:0;overflow:hidden;box-shadow:0 12px 24px -4px #191d3a14}.blocks-app .limit-upgrade-modal .ant-modal-header{display:none}.blocks-app .limit-upgrade-modal .ant-modal-content .ant-modal-body{padding:0}.blocks-app .limit-upgrade-modal__wrap{background:var(--colorBgContainer);flex-direction:column;align-items:center;width:400px;max-width:100%;display:flex}.blocks-app .limit-upgrade-modal__header{box-sizing:border-box;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;min-height:34px;padding:8px 8px 0;display:flex}.blocks-app .limit-upgrade-modal__close{background:var(--colorBgContainer);width:34px;height:34px;color:var(--colorTextSecondary);cursor:pointer;border:none;border-radius:6px;justify-content:center;align-items:center;margin:0;padding:0;transition:background .15s,color .15s;display:flex}.blocks-app .limit-upgrade-modal__close:hover{background:var(--colorFillTertiary);color:var(--colorText)}.blocks-app .limit-upgrade-modal__close .anticon{font-size:16px}.blocks-app .limit-upgrade-modal__body{box-sizing:border-box;flex-direction:column;align-items:center;gap:16px;width:100%;padding:0 40px 24px;display:flex}.blocks-app .limit-upgrade-modal__title{text-align:center;max-width:320px;color:var(--colorText);margin:0;font-size:18px;font-weight:400;line-height:130%}.blocks-app .limit-upgrade-modal__subtitle{text-align:center;max-width:320px;color:var(--colorTextSecondary);margin:0;font-size:14px;font-weight:100;line-height:120%}.blocks-app .limit-upgrade-modal__limits-row{flex-flow:wrap;justify-content:center;align-items:center;gap:8px;width:100%;max-width:320px;display:flex}.blocks-app .limit-upgrade-modal__icon-circle{box-sizing:border-box;border:1px solid var(--colorText);width:34px;height:34px;color:var(--colorText);border-radius:32px;flex:none;justify-content:center;align-items:center;padding:8px;display:flex}.blocks-app .limit-upgrade-modal__icon-circle .anticon{font-size:18px}.blocks-app .limit-upgrade-modal__icon-circle svg{flex-shrink:0;width:18px;height:18px;display:block}.blocks-app .limit-upgrade-modal__limit-old{color:#f85243;flex-shrink:0;font-size:40px;font-weight:100;line-height:100%}.blocks-app .limit-upgrade-modal__arrow-btn{color:#fff;background:#8946fb;border-radius:38px;flex:none;justify-content:center;align-items:center;width:34px;height:34px;display:flex}.blocks-app .limit-upgrade-modal__arrow-icon{font-size:16px;transform:rotate(45deg)}.blocks-app .limit-upgrade-modal__limit-new{color:#7ed846;flex-shrink:0;font-size:40px;font-weight:400;line-height:100%}.blocks-app .limit-upgrade-modal__limit-new--infinity{font-size:36px;line-height:40px}.blocks-app .limit-upgrade-modal__divider{border:none;border-top:1px solid var(--colorBorderSecondary);width:100%;height:0;margin:0}.blocks-app .limit-upgrade-modal__footer{box-sizing:border-box;flex-direction:column;justify-content:center;align-items:center;width:100%;padding:16px 0;display:flex}.blocks-app .limit-upgrade-modal__footer--dual{flex-flow:wrap;justify-content:center;align-items:center;gap:8px;padding:16px}.blocks-app .limit-upgrade-modal__cta.ant-btn-primary{min-width:147px;height:32px;box-shadow:none;background:#2884ff;border-color:#2884ff;border-radius:6px;padding:8px 16px;font-size:14px;font-weight:400;line-height:19px}.blocks-app .limit-upgrade-modal__cta.ant-btn-primary:hover{background:#1a75f0;border-color:#1a75f0}.blocks-app .limit-upgrade-modal__cta-secondary.ant-btn-default{border-color:var(--colorBorder);min-width:147px;height:32px;color:var(--colorText);box-shadow:none;border-radius:6px;padding:8px 16px;font-size:14px;font-weight:400;line-height:19px}.blocks-app .limit-upgrade-modal__cta-secondary.ant-btn-default:hover{color:#2884ff;border-color:#2884ff}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();__useblocks__.define(`static/core/3d6d9ecd2.js`,[`require`,`exports`,`module`,`static/core/4dc58c63.js`,`static/core/65add2fe.js`,`static/core/928d808b.js`,`static/core/69518486.js`,`static/core/70acf01b.js`,`react`,`react-dom`,`react-router-dom`,`react/jsx-runtime`,`antd`,`react-dom/client`,`@ant-design/icons`,`@ant-design/cssinjs`],function(e,t,n){let r=e("./4dc58c63.js"),i=e("./65add2fe.js"),a=e("./70acf01b.js"),o=e("./69518486.js");e("./928d808b.js");let s=e("react");s=r.l(s),e("react-dom");let c=e("react-router-dom"),l=e("react/jsx-runtime");e("antd"),e("react-dom/client"),e("@ant-design/icons"),e("@ant-design/cssinjs");var u=({open:e,sideOnOk:t,onCancel:n,initialSlide:r=0})=>{let{__:a}=o.h(),u=(0,c.useNavigate)(),[d,f]=(0,s.useState)(r),p=(0,s.useRef)(null),m=i.wt(),h=()=>{t&&t(),u(`/billing`),n(!1)};(0,s.useEffect)(()=>{e&&p.current&&(p.current.goTo(r,!0),f(r))},[e,r]);let g=(0,s.useMemo)(()=>[{image:a(`https://cdn.useblocks.io/1351/241017_18_1sGjUaZ.png`),backgroundColor:`var(--blue-2)`,title:a(`More editing features`),description:a(`Use our visual editor to customize every element to your needs: change borders and their radius, box shadows, paddings, background, and much more.`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_J7QtvZ3.png`),backgroundColor:`var(--purple-2)`,title:a(`Work with the HTML code`),description:a(`Edit the HTML version of your email template in the Code mode and see the changes in real time. Builder has no code restrictions — you can create templates of any complexity!`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_2fjDRfL.png`),backgroundColor:`var(--cyan-2)`,title:a(`AI image generation`),description:a(`Generate stunning visuals for your emails with ease. We have trained our AI model to ensure the highest quality images.`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_D5C25Zp.png`),backgroundColor:`var(--green-2)`,title:a(`Stock photos and GIFs`),description:a(`Search the vast gallery of stock photos and GIFs to find visuals for any occasion. You can filter the results by image orientation, color scheme, and more.`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_NDYloAO.png`),backgroundColor:`var(--magenta-2)`,title:a(`Version history`),description:a(`Check who and when made changes to the email template and, if necessary, restore one of the previous versions.`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_g5mVlmh.png`),backgroundColor:`var(--red-2)`,title:a(`Image editor`),description:a(`Want to resize an image, add some text, or apply a filter? No need to leave builder! You can make all the basic changes in our image editor.`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_ur8Lh3W.png`),backgroundColor:`var(--orange-2)`,title:a(`Email optimization`),description:a(`Check your email against broken links, missing alt texts, large images, and other issues that might prevent your emails from hitting inboxes.`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_S5Pld9p.png`),backgroundColor:`var(--volcano-2)`,title:a(`Team collaboration`),description:a(`Share the project with your team and collaborate in real time. Add comments to individual email blocks and discuss necessary edits right in the builder.`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_tGbb2j9.png`),backgroundColor:`var(--geekblue-2)`,title:a(`Email testing`),description:a(`Check how your email appears across various devices and email clients.`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_gDXi4uM.png`),backgroundColor:`var(--geekblue-2)`,title:a(`AI assistant`),description:a(`Let our AI assistant enhance your email template! From creating subject lines and preheaders based on the email copy to generating the whole email with your website in mind!`)}],[a]);return(0,s.useEffect)(()=>{if(e&&p.current){p.current.goTo(r,!0),f(r);let e=g[r];m({event:`open_modal`,action:`open_premium-features_modal`,modal_id:`premium-features`,offer_id:e.title})}},[e,g,r,m]),(0,l.jsxs)(o.Y,{open:e,footer:null,onCancel:n,closable:!1,className:`premium-features-modal`,classNames:{mask:`premium-features-modal-mask`},styles:{mask:{background:`rgba(0, 0, 0, 0.65)`}},width:1100,style:{maxWidth:`80%`},children:[(0,l.jsx)(o.V,{dots:!0,slidesToShow:1,slidesToScroll:1,autoplay:!0,className:`carousel-slider`,draggable:!0,autoplaySpeed:5e3,initialSlide:d,ref:p,children:g.map((e,t)=>(0,l.jsx)(`div`,{children:(0,l.jsxs)(`div`,{className:`carousel-slide`,style:{background:`${e.backgroundColor}`},children:[(0,l.jsx)(`div`,{className:`slide-item-image`,children:(0,l.jsx)(`img`,{src:e.image,alt:`slide-${t}`})}),(0,l.jsxs)(`div`,{className:`slide-item-content`,children:[(0,l.jsx)(`h3`,{className:`slide-title`,children:e.title}),(0,l.jsx)(`p`,{className:`slide-description`,children:e.description})]})]})},t))}),(0,l.jsx)(`div`,{className:`modal-subtitle`,children:a(`This and other features are available for you on any paid plan.`)}),(0,l.jsxs)(`div`,{className:`modal-buttons`,children:[(0,l.jsx)(o.Rt,{size:`large`,onClick:()=>n(!1),children:a(`Cancel`)}),(0,l.jsx)(o.Rt,{type:`primary`,size:`large`,onClick:h,style:{padding:`0 30px`},children:a(`Select plan`)})]})]})};function d(e){return e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,``),e=e.replace(/<\/?(?:script|embed|object|frameset|frame|iframe|applet|meta)[^>]*>/gi,``),e=e.replace(/ on\w+="[^"]*"/g,``),e=e.replace(/ on\w+='[^']*'/g,``),e}var f=s.default.forwardRef(({icon:e,...t},n)=>{let r=i.on();return(0,l.jsx)(o.Lt,{ref:n,icon:e,configIcons:(0,s.useMemo)(()=>{if(!r?.icons)return;let e={};for(let[t,n]of Object.entries(r.icons))typeof n==`string`&&(e[t]=d(n));return Object.keys(e).length>0?e:void 0},[r?.icons]),strokeWidth:r?.iconStrokeWidth,...t})});f.displayName=`EmIcons`;var p={ai:`AIRequests`,email_generate:`EmailEnvelope`,image_generate:`Image`,optimization:`Optimization`,preview:`SendOutlined`,link_check:`Web`,image_check:`Image`,spam_check:`Block`,projects:`FolderOpen`,emails:`EmailEnvelope`,blocks:`Block`,users:`SliderGroup`};function m(e,t){if(e==null)return null;if(typeof e==`number`||typeof e==`string`){let n=e===`∞`||e===`∞`||e===`infinity`||typeof e==`string`&&e.toLowerCase()===`infinity`;return(0,l.jsx)(`span`,{className:t===`old`?`limit-upgrade-modal__limit-old`:`limit-upgrade-modal__limit-new${n?` limit-upgrade-modal__limit-new--infinity`:``}`,children:n?`∞`:e})}return e}var h=({open:e,onClose:t,title:n,subtitle:r,usageResource:i,icon:a,previousDisplay:s,nextDisplay:c,onChangePlan:u,secondaryAction:d,changePlanLabel:h})=>{let{__:g}=o.h(),_=h??g(`Change plan`),v=!!d,y=i==null?a??null:(0,l.jsx)(f,{icon:p[i]});return(0,l.jsx)(o.Y,{open:e,onCancel:t,footer:null,closable:!1,width:400,centered:!0,className:`limit-upgrade-modal`,destroyOnHidden:!0,mask:{closable:!0},children:(0,l.jsxs)(`div`,{className:`limit-upgrade-modal__wrap`,children:[(0,l.jsx)(`div`,{className:`limit-upgrade-modal__header`,children:(0,l.jsx)(`button`,{type:`button`,className:`limit-upgrade-modal__close`,onClick:t,"aria-label":g(`Close`),children:(0,l.jsx)(f,{icon:`CloseOutlined`})})}),(0,l.jsxs)(`div`,{className:`limit-upgrade-modal__body`,children:[(0,l.jsx)(`h1`,{className:`limit-upgrade-modal__title`,children:n}),(0,l.jsx)(`p`,{className:`limit-upgrade-modal__subtitle`,children:r}),(0,l.jsxs)(`div`,{className:`limit-upgrade-modal__limits-row`,children:[(0,l.jsx)(`div`,{className:`limit-upgrade-modal__icon-circle`,"aria-hidden":!0,children:y}),m(s,`old`),(0,l.jsx)(`div`,{className:`limit-upgrade-modal__arrow-btn`,"aria-hidden":!0,children:(0,l.jsx)(f,{icon:`ArrowUpOutlined`,className:`limit-upgrade-modal__arrow-icon`})}),m(c,`new`)]})]}),(0,l.jsx)(`hr`,{className:`limit-upgrade-modal__divider`}),(0,l.jsx)(`div`,{className:v?`limit-upgrade-modal__footer limit-upgrade-modal__footer--dual`:`limit-upgrade-modal__footer`,children:d?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.Rt,{className:`limit-upgrade-modal__cta-secondary`,onClick:d.onClick,children:d.label}),(0,l.jsx)(o.Rt,{type:`primary`,className:`limit-upgrade-modal__cta`,onClick:u,children:_})]}):(0,l.jsx)(o.Rt,{type:`primary`,className:`limit-upgrade-modal__cta`,onClick:u,children:_})})]})})},g={email_10_30:{id:`email_10_30`,titleKey:`You have used up the number of emails you can create on your current plan`,subtitleKey:`You can increase the number of emails right now.`,usageResource:`email_generate`,previous:10,next:30,showSecondaryBuy:!1,debugLabelKey:`Limit modal: emails 10→30`},email_30_300:{id:`email_30_300`,titleKey:`You have used up the number of emails you can create on your current plan`,subtitleKey:`You can increase the number of emails right now.`,usageResource:`email_generate`,previous:30,next:300,showSecondaryBuy:!1,debugLabelKey:`Limit modal: emails 30→300`},email_300_inf:{id:`email_300_inf`,titleKey:`You have used up the number of emails you can create on your current plan`,subtitleKey:`You can increase the number of emails right now.`,usageResource:`email_generate`,previous:300,next:`infinity`,showSecondaryBuy:!1,debugLabelKey:`Limit modal: emails 300→∞`},ai_10_50:{id:`ai_10_50`,titleKey:`You have used up your AI generations`,subtitleKey:`You can add more generations right now; they are billed separately from the generations included in your plan.`,usageResource:`ai`,previous:10,next:50,showSecondaryBuy:!1,debugLabelKey:`Limit modal: AI 10→50`},ai_30_150:{id:`ai_30_150`,titleKey:`You have used up your AI generations`,subtitleKey:`You can add more generations right now; they are billed separately from the generations included in your plan.`,usageResource:`ai`,previous:30,next:150,showSecondaryBuy:!1,debugLabelKey:`Limit modal: AI 30→150`},ai_150_inf:{id:`ai_150_inf`,titleKey:`You have used up your AI generations`,subtitleKey:`You can add more generations right now; they are billed separately from the generations included in your plan.`,usageResource:`ai`,previous:150,next:`infinity`,showSecondaryBuy:!1,debugLabelKey:`Limit modal: AI 150→∞`},optimization_exceeded:{id:`optimization_exceeded`,titleKey:`You have used up your optimisation limit`,subtitleKey:`You can increase the limit by changing your plan or buying an extra package.`,usageResource:`optimization`,previous:0,next:`infinity`,showSecondaryBuy:!1,debugLabelKey:`Limit modal: optimization exhausted`},image_generate_exceeded:{id:`image_generate_exceeded`,titleKey:`You have used up your image generation limit`,subtitleKey:`You can increase the limit by changing your plan or buying an extra package.`,usageResource:`image_generate`,previous:0,next:`infinity`,showSecondaryBuy:!1,debugLabelKey:`Limit modal: image_generate exhausted`},preview_exceeded:{id:`preview_exceeded`,titleKey:`You have used up your preview (test send) limit`,subtitleKey:`You can increase the limit by changing your plan or buying an extra package.`,usageResource:`preview`,previous:0,next:`infinity`,showSecondaryBuy:!1,debugLabelKey:`Limit modal: preview exhausted`},link_check_exceeded:{id:`link_check_exceeded`,titleKey:`You have used up your link check limit`,subtitleKey:`You can increase the limit by changing your plan or buying an extra package.`,usageResource:`link_check`,previous:0,next:`infinity`,showSecondaryBuy:!1,debugLabelKey:`Limit modal: link_check exhausted`},image_check_exceeded:{id:`image_check_exceeded`,titleKey:`You have used up your image check limit`,subtitleKey:`You can increase the limit by changing your plan or buying an extra package.`,usageResource:`image_check`,previous:0,next:`infinity`,showSecondaryBuy:!1,debugLabelKey:`Limit modal: image_check exhausted`},spam_check_exceeded:{id:`spam_check_exceeded`,titleKey:`You have used up your spam check limit`,subtitleKey:`You can increase the limit by changing your plan or buying an extra package.`,usageResource:`spam_check`,previous:0,next:`infinity`,showSecondaryBuy:!1,debugLabelKey:`Limit modal: spam_check exhausted`}};function _(e){return g[e]}function v(e){return e===`infinity`?`∞`:e}var y={ai:`ai_150_inf`,email_generate:`email_300_inf`,image_generate:`image_generate_exceeded`,preview:`preview_exceeded`,link_check:`link_check_exceeded`,image_check:`image_check_exceeded`,spam_check:`spam_check_exceeded`};function b(e){return!e||e.is_unlimited||e.total_limit<=0?!1:e.remaining<=0||e.used>=e.total_limit}function x(e,t){return b(t)?{presetId:y[e],previousLimit:t?.total_limit??0,nextLimit:`infinity`}:null}function S(e,t){return x(e,t)}function C(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(typeof n==`string`&&n)return n}}function w(e){for(let t=0;t<e.length;t++){let n=e[t];if(n instanceof Blob)return n}}function T(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];if(typeof r==`string`&&r&&r!==t)return r}}var E=(0,s.createContext)(null),D=e=>e.includes(`UPLOAD_IMAGE_`)||e.includes(`UPLOAD_BACKGROUND_`),O=({children:e})=>{let t=i.wi(),n=i.Ci(a.s),[r,o]=(0,s.useState)(null),c=(0,s.useRef)(null),u=(0,s.useCallback)(e=>{c.current?.(e),c.current=null},[]),d=(0,s.useCallback)(e=>(u(null),o(e),t(a.r(e.entryModal)),new Promise(e=>{c.current=e})),[t,u]);(0,s.useEffect)(()=>{D(n)||(o(null),c.current&&u(null))},[n,u]);let f=(0,s.useMemo)(()=>({request:r,openImagePicker:d,resolveImagePicker:u}),[r,d,u]);return(0,l.jsx)(E.Provider,{value:f,children:e})},k=()=>{let e=(0,s.useContext)(E);if(!e)throw Error(`useImagePicker must be used within ImagePickerProvider`);return e};function A(e){if(!e)return!1;try{return i.vi.getInstance(e,i.po)!==void 0}catch{return!1}}function j(){let e=i.Ti();return(0,s.useMemo)(()=>A(e),[e])}Object.defineProperty(t,"a",{enumerable:!0,get:function(){return T}}),Object.defineProperty(t,"c",{enumerable:!0,get:function(){return x}}),Object.defineProperty(t,"d",{enumerable:!0,get:function(){return v}}),Object.defineProperty(t,"f",{enumerable:!0,get:function(){return h}}),Object.defineProperty(t,"g",{enumerable:!0,get:function(){return u}}),Object.defineProperty(t,"h",{enumerable:!0,get:function(){return d}}),Object.defineProperty(t,"i",{enumerable:!0,get:function(){return w}}),Object.defineProperty(t,"l",{enumerable:!0,get:function(){return S}}),Object.defineProperty(t,"m",{enumerable:!0,get:function(){return f}}),Object.defineProperty(t,"n",{enumerable:!0,get:function(){return O}}),Object.defineProperty(t,"o",{enumerable:!0,get:function(){return C}}),Object.defineProperty(t,"p",{enumerable:!0,get:function(){return p}}),Object.defineProperty(t,"r",{enumerable:!0,get:function(){return k}}),Object.defineProperty(t,"s",{enumerable:!0,get:function(){return b}}),Object.defineProperty(t,"t",{enumerable:!0,get:function(){return j}}),Object.defineProperty(t,"u",{enumerable:!0,get:function(){return _}})});
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.setAttribute(`data-useblocks`,`true`),e.appendChild(document.createTextNode(`@import "https://fonts.googleapis.com/css2?family=Geologica:wght@300;600&display=swap";.blocks-app .ant-modal.premium-features-modal .ant-modal-container{border-radius:calc(var(--borderRadiusXL) * 2px);padding:20px 19px}.blocks-app .premium-features-modal .modal-title{text-align:center;margin-bottom:0;font-size:32px}.blocks-app .premium-features-modal .ant-carousel .slick-dots li button{opacity:.5;background:#fff}.blocks-app .premium-features-modal .ant-carousel .slick-dots li.slick-active button{opacity:1}.blocks-app .premium-features-modal .modal-subtitle{text-align:center;margin-bottom:20px;font-size:18px}.blocks-app .premium-features-modal .carousel-slider{margin-bottom:20px}.blocks-app .premium-features-modal .slick-list{border-radius:calc(var(--borderRadiusXL) * 1.5px)}.blocks-app .premium-features-modal .slick-slide{padding:0 5px}.blocks-app .premium-features-modal .carousel-slide{border-radius:calc(var(--borderRadiusXL) * 1.5px);justify-content:flex-end;align-items:center;height:480px;display:flex}.blocks-app .premium-features-modal .slide-item-image{width:50%;padding:24px 0 24px 32px}.blocks-app .premium-features-modal .slide-item-image img{border-radius:calc(var(--borderRadiusXL) * 1.3px);width:100%}.blocks-app .premium-features-modal .slide-item-content{width:50%;padding:48px}.blocks-app .premium-features-modal .slide-title{margin-bottom:48px;font-size:50px;font-weight:700;line-height:1}.blocks-app .premium-features-modal .slide-description{font-size:22px}.blocks-app .premium-features-modal .modal-buttons{justify-content:center;gap:10px;display:flex}.blocks-app .premium-features-modal .modal-buttons button{padding:0 30px}.blocks-app .limit-upgrade-modal.ant-modal{max-width:calc(100vw - 24px)}.blocks-app .limit-upgrade-modal .ant-modal-content{border-radius:16px;padding:0;overflow:hidden;box-shadow:0 12px 24px -4px #191d3a14}.blocks-app .limit-upgrade-modal .ant-modal-header{display:none}.blocks-app .limit-upgrade-modal .ant-modal-content .ant-modal-body{padding:0}.blocks-app .limit-upgrade-modal__wrap{background:var(--colorBgContainer);flex-direction:column;align-items:center;width:400px;max-width:100%;display:flex}.blocks-app .limit-upgrade-modal__header{box-sizing:border-box;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;min-height:34px;padding:8px 8px 0;display:flex}.blocks-app .limit-upgrade-modal__close{background:var(--colorBgContainer);width:34px;height:34px;color:var(--colorTextSecondary);cursor:pointer;border:none;border-radius:6px;justify-content:center;align-items:center;margin:0;padding:0;transition:background .15s,color .15s;display:flex}.blocks-app .limit-upgrade-modal__close:hover{background:var(--colorFillTertiary);color:var(--colorText)}.blocks-app .limit-upgrade-modal__close .anticon{font-size:16px}.blocks-app .limit-upgrade-modal__body{box-sizing:border-box;flex-direction:column;align-items:center;gap:16px;width:100%;padding:0 40px 24px;display:flex}.blocks-app .limit-upgrade-modal__title{text-align:center;max-width:320px;color:var(--colorText);margin:0;font-size:18px;font-weight:400;line-height:130%}.blocks-app .limit-upgrade-modal__subtitle{text-align:center;max-width:320px;color:var(--colorTextSecondary);margin:0;font-size:14px;font-weight:100;line-height:120%}.blocks-app .limit-upgrade-modal__limits-row{flex-flow:wrap;justify-content:center;align-items:center;gap:8px;width:100%;max-width:320px;display:flex}.blocks-app .limit-upgrade-modal__icon-circle{box-sizing:border-box;border:1px solid var(--colorText);width:34px;height:34px;color:var(--colorText);border-radius:32px;flex:none;justify-content:center;align-items:center;padding:8px;display:flex}.blocks-app .limit-upgrade-modal__icon-circle .anticon{font-size:18px}.blocks-app .limit-upgrade-modal__icon-circle svg{flex-shrink:0;width:18px;height:18px;display:block}.blocks-app .limit-upgrade-modal__limit-old{color:#f85243;flex-shrink:0;font-size:40px;font-weight:100;line-height:100%}.blocks-app .limit-upgrade-modal__arrow-btn{color:#fff;background:#8946fb;border-radius:38px;flex:none;justify-content:center;align-items:center;width:34px;height:34px;display:flex}.blocks-app .limit-upgrade-modal__arrow-icon{font-size:16px;transform:rotate(45deg)}.blocks-app .limit-upgrade-modal__limit-new{color:#7ed846;flex-shrink:0;font-size:40px;font-weight:400;line-height:100%}.blocks-app .limit-upgrade-modal__limit-new--infinity{font-size:36px;line-height:40px}.blocks-app .limit-upgrade-modal__divider{border:none;border-top:1px solid var(--colorBorderSecondary);width:100%;height:0;margin:0}.blocks-app .limit-upgrade-modal__footer{box-sizing:border-box;flex-direction:column;justify-content:center;align-items:center;width:100%;padding:16px 0;display:flex}.blocks-app .limit-upgrade-modal__footer--dual{flex-flow:wrap;justify-content:center;align-items:center;gap:8px;padding:16px}.blocks-app .limit-upgrade-modal__cta.ant-btn-primary{min-width:147px;height:32px;box-shadow:none;background:#2884ff;border-color:#2884ff;border-radius:6px;padding:8px 16px;font-size:14px;font-weight:400;line-height:19px}.blocks-app .limit-upgrade-modal__cta.ant-btn-primary:hover{background:#1a75f0;border-color:#1a75f0}.blocks-app .limit-upgrade-modal__cta-secondary.ant-btn-default{border-color:var(--colorBorder);min-width:147px;height:32px;color:var(--colorText);box-shadow:none;border-radius:6px;padding:8px 16px;font-size:14px;font-weight:400;line-height:19px}.blocks-app .limit-upgrade-modal__cta-secondary.ant-btn-default:hover{color:#2884ff;border-color:#2884ff}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();__useblocks__.define(`static/core/971de80c2.js`,[`require`,`exports`,`module`,`static/core/4dc58c63.js`,`static/core/c2f9cd42.js`,`static/core/545b5c1c.js`,`static/core/8491aed0.js`,`static/core/b036c781.js`,`react`,`react-dom`,`react-router-dom`,`react/jsx-runtime`,`antd`,`react-dom/client`,`@ant-design/icons`,`@ant-design/cssinjs`],function(e,t,n){let r=e("./4dc58c63.js"),i=e("./c2f9cd42.js"),a=e("./b036c781.js"),o=e("./8491aed0.js");e("./545b5c1c.js");let s=e("react");s=r.l(s),e("react-dom");let c=e("react-router-dom"),l=e("react/jsx-runtime");e("antd"),e("react-dom/client"),e("@ant-design/icons"),e("@ant-design/cssinjs");var u=({open:e,sideOnOk:t,onCancel:n,initialSlide:r=0})=>{let{__:a}=o.h(),u=(0,c.useNavigate)(),[d,f]=(0,s.useState)(r),p=(0,s.useRef)(null),m=i.wt(),h=()=>{t&&t(),u(`/billing`),n(!1)};(0,s.useEffect)(()=>{e&&p.current&&(p.current.goTo(r,!0),f(r))},[e,r]);let g=(0,s.useMemo)(()=>[{image:a(`https://cdn.useblocks.io/1351/241017_18_1sGjUaZ.png`),backgroundColor:`var(--blue-2)`,title:a(`More editing features`),description:a(`Use our visual editor to customize every element to your needs: change borders and their radius, box shadows, paddings, background, and much more.`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_J7QtvZ3.png`),backgroundColor:`var(--purple-2)`,title:a(`Work with the HTML code`),description:a(`Edit the HTML version of your email template in the Code mode and see the changes in real time. Builder has no code restrictions — you can create templates of any complexity!`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_2fjDRfL.png`),backgroundColor:`var(--cyan-2)`,title:a(`AI image generation`),description:a(`Generate stunning visuals for your emails with ease. We have trained our AI model to ensure the highest quality images.`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_D5C25Zp.png`),backgroundColor:`var(--green-2)`,title:a(`Stock photos and GIFs`),description:a(`Search the vast gallery of stock photos and GIFs to find visuals for any occasion. You can filter the results by image orientation, color scheme, and more.`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_NDYloAO.png`),backgroundColor:`var(--magenta-2)`,title:a(`Version history`),description:a(`Check who and when made changes to the email template and, if necessary, restore one of the previous versions.`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_g5mVlmh.png`),backgroundColor:`var(--red-2)`,title:a(`Image editor`),description:a(`Want to resize an image, add some text, or apply a filter? No need to leave builder! You can make all the basic changes in our image editor.`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_ur8Lh3W.png`),backgroundColor:`var(--orange-2)`,title:a(`Email optimization`),description:a(`Check your email against broken links, missing alt texts, large images, and other issues that might prevent your emails from hitting inboxes.`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_S5Pld9p.png`),backgroundColor:`var(--volcano-2)`,title:a(`Team collaboration`),description:a(`Share the project with your team and collaborate in real time. Add comments to individual email blocks and discuss necessary edits right in the builder.`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_tGbb2j9.png`),backgroundColor:`var(--geekblue-2)`,title:a(`Email testing`),description:a(`Check how your email appears across various devices and email clients.`)},{image:a(`https://cdn.useblocks.io/1351/241017_18_gDXi4uM.png`),backgroundColor:`var(--geekblue-2)`,title:a(`AI assistant`),description:a(`Let our AI assistant enhance your email template! From creating subject lines and preheaders based on the email copy to generating the whole email with your website in mind!`)}],[a]);return(0,s.useEffect)(()=>{if(e&&p.current){p.current.goTo(r,!0),f(r);let e=g[r];m({event:`open_modal`,action:`open_premium-features_modal`,modal_id:`premium-features`,offer_id:e.title})}},[e,g,r,m]),(0,l.jsxs)(o.Y,{open:e,footer:null,onCancel:n,closable:!1,className:`premium-features-modal`,classNames:{mask:`premium-features-modal-mask`},styles:{mask:{background:`rgba(0, 0, 0, 0.65)`}},width:1100,style:{maxWidth:`80%`},children:[(0,l.jsx)(o.V,{dots:!0,slidesToShow:1,slidesToScroll:1,autoplay:!0,className:`carousel-slider`,draggable:!0,autoplaySpeed:5e3,initialSlide:d,ref:p,children:g.map((e,t)=>(0,l.jsx)(`div`,{children:(0,l.jsxs)(`div`,{className:`carousel-slide`,style:{background:`${e.backgroundColor}`},children:[(0,l.jsx)(`div`,{className:`slide-item-image`,children:(0,l.jsx)(`img`,{src:e.image,alt:`slide-${t}`})}),(0,l.jsxs)(`div`,{className:`slide-item-content`,children:[(0,l.jsx)(`h3`,{className:`slide-title`,children:e.title}),(0,l.jsx)(`p`,{className:`slide-description`,children:e.description})]})]})},t))}),(0,l.jsx)(`div`,{className:`modal-subtitle`,children:a(`This and other features are available for you on any paid plan.`)}),(0,l.jsxs)(`div`,{className:`modal-buttons`,children:[(0,l.jsx)(o.Rt,{size:`large`,onClick:()=>n(!1),children:a(`Cancel`)}),(0,l.jsx)(o.Rt,{type:`primary`,size:`large`,onClick:h,style:{padding:`0 30px`},children:a(`Select plan`)})]})]})};function d(e){return e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,``),e=e.replace(/<\/?(?:script|embed|object|frameset|frame|iframe|applet|meta)[^>]*>/gi,``),e=e.replace(/ on\w+="[^"]*"/g,``),e=e.replace(/ on\w+='[^']*'/g,``),e}var f=s.default.forwardRef(({icon:e,...t},n)=>{let r=i.sn();return(0,l.jsx)(o.Lt,{ref:n,icon:e,configIcons:(0,s.useMemo)(()=>{if(!r?.icons)return;let e={};for(let[t,n]of Object.entries(r.icons))typeof n==`string`&&(e[t]=d(n));return Object.keys(e).length>0?e:void 0},[r?.icons]),strokeWidth:r?.iconStrokeWidth,...t})});f.displayName=`EmIcons`;var p={ai:`AIRequests`,email_generate:`EmailEnvelope`,image_generate:`Image`,optimization:`Optimization`,preview:`SendOutlined`,link_check:`Web`,image_check:`Image`,spam_check:`Block`,projects:`FolderOpen`,emails:`EmailEnvelope`,blocks:`Block`,users:`SliderGroup`};function m(e,t){if(e==null)return null;if(typeof e==`number`||typeof e==`string`){let n=e===`∞`||e===`∞`||e===`infinity`||typeof e==`string`&&e.toLowerCase()===`infinity`;return(0,l.jsx)(`span`,{className:t===`old`?`limit-upgrade-modal__limit-old`:`limit-upgrade-modal__limit-new${n?` limit-upgrade-modal__limit-new--infinity`:``}`,children:n?`∞`:e})}return e}var h=({open:e,onClose:t,title:n,subtitle:r,usageResource:i,icon:a,previousDisplay:s,nextDisplay:c,onChangePlan:u,secondaryAction:d,changePlanLabel:h})=>{let{__:g}=o.h(),_=h??g(`Change plan`),v=!!d,y=i==null?a??null:(0,l.jsx)(f,{icon:p[i]});return(0,l.jsx)(o.Y,{open:e,onCancel:t,footer:null,closable:!1,width:400,centered:!0,className:`limit-upgrade-modal`,destroyOnHidden:!0,mask:{closable:!0},children:(0,l.jsxs)(`div`,{className:`limit-upgrade-modal__wrap`,children:[(0,l.jsx)(`div`,{className:`limit-upgrade-modal__header`,children:(0,l.jsx)(`button`,{type:`button`,className:`limit-upgrade-modal__close`,onClick:t,"aria-label":g(`Close`),children:(0,l.jsx)(f,{icon:`CloseOutlined`})})}),(0,l.jsxs)(`div`,{className:`limit-upgrade-modal__body`,children:[(0,l.jsx)(`h1`,{className:`limit-upgrade-modal__title`,children:n}),(0,l.jsx)(`p`,{className:`limit-upgrade-modal__subtitle`,children:r}),(0,l.jsxs)(`div`,{className:`limit-upgrade-modal__limits-row`,children:[(0,l.jsx)(`div`,{className:`limit-upgrade-modal__icon-circle`,"aria-hidden":!0,children:y}),m(s,`old`),(0,l.jsx)(`div`,{className:`limit-upgrade-modal__arrow-btn`,"aria-hidden":!0,children:(0,l.jsx)(f,{icon:`ArrowUpOutlined`,className:`limit-upgrade-modal__arrow-icon`})}),m(c,`new`)]})]}),(0,l.jsx)(`hr`,{className:`limit-upgrade-modal__divider`}),(0,l.jsx)(`div`,{className:v?`limit-upgrade-modal__footer limit-upgrade-modal__footer--dual`:`limit-upgrade-modal__footer`,children:d?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.Rt,{className:`limit-upgrade-modal__cta-secondary`,onClick:d.onClick,children:d.label}),(0,l.jsx)(o.Rt,{type:`primary`,className:`limit-upgrade-modal__cta`,onClick:u,children:_})]}):(0,l.jsx)(o.Rt,{type:`primary`,className:`limit-upgrade-modal__cta`,onClick:u,children:_})})]})})},g={email_10_30:{id:`email_10_30`,titleKey:`You have used up the number of emails you can create on your current plan`,subtitleKey:`You can increase the number of emails right now.`,usageResource:`email_generate`,previous:10,next:30,showSecondaryBuy:!1,debugLabelKey:`Limit modal: emails 10→30`},email_30_300:{id:`email_30_300`,titleKey:`You have used up the number of emails you can create on your current plan`,subtitleKey:`You can increase the number of emails right now.`,usageResource:`email_generate`,previous:30,next:300,showSecondaryBuy:!1,debugLabelKey:`Limit modal: emails 30→300`},email_300_inf:{id:`email_300_inf`,titleKey:`You have used up the number of emails you can create on your current plan`,subtitleKey:`You can increase the number of emails right now.`,usageResource:`email_generate`,previous:300,next:`infinity`,showSecondaryBuy:!1,debugLabelKey:`Limit modal: emails 300→∞`},ai_10_50:{id:`ai_10_50`,titleKey:`You have used up your AI generations`,subtitleKey:`You can add more generations right now; they are billed separately from the generations included in your plan.`,usageResource:`ai`,previous:10,next:50,showSecondaryBuy:!1,debugLabelKey:`Limit modal: AI 10→50`},ai_30_150:{id:`ai_30_150`,titleKey:`You have used up your AI generations`,subtitleKey:`You can add more generations right now; they are billed separately from the generations included in your plan.`,usageResource:`ai`,previous:30,next:150,showSecondaryBuy:!1,debugLabelKey:`Limit modal: AI 30→150`},ai_150_inf:{id:`ai_150_inf`,titleKey:`You have used up your AI generations`,subtitleKey:`You can add more generations right now; they are billed separately from the generations included in your plan.`,usageResource:`ai`,previous:150,next:`infinity`,showSecondaryBuy:!1,debugLabelKey:`Limit modal: AI 150→∞`},optimization_exceeded:{id:`optimization_exceeded`,titleKey:`You have used up your optimisation limit`,subtitleKey:`You can increase the limit by changing your plan or buying an extra package.`,usageResource:`optimization`,previous:0,next:`infinity`,showSecondaryBuy:!1,debugLabelKey:`Limit modal: optimization exhausted`},image_generate_exceeded:{id:`image_generate_exceeded`,titleKey:`You have used up your image generation limit`,subtitleKey:`You can increase the limit by changing your plan or buying an extra package.`,usageResource:`image_generate`,previous:0,next:`infinity`,showSecondaryBuy:!1,debugLabelKey:`Limit modal: image_generate exhausted`},preview_exceeded:{id:`preview_exceeded`,titleKey:`You have used up your preview (test send) limit`,subtitleKey:`You can increase the limit by changing your plan or buying an extra package.`,usageResource:`preview`,previous:0,next:`infinity`,showSecondaryBuy:!1,debugLabelKey:`Limit modal: preview exhausted`},link_check_exceeded:{id:`link_check_exceeded`,titleKey:`You have used up your link check limit`,subtitleKey:`You can increase the limit by changing your plan or buying an extra package.`,usageResource:`link_check`,previous:0,next:`infinity`,showSecondaryBuy:!1,debugLabelKey:`Limit modal: link_check exhausted`},image_check_exceeded:{id:`image_check_exceeded`,titleKey:`You have used up your image check limit`,subtitleKey:`You can increase the limit by changing your plan or buying an extra package.`,usageResource:`image_check`,previous:0,next:`infinity`,showSecondaryBuy:!1,debugLabelKey:`Limit modal: image_check exhausted`},spam_check_exceeded:{id:`spam_check_exceeded`,titleKey:`You have used up your spam check limit`,subtitleKey:`You can increase the limit by changing your plan or buying an extra package.`,usageResource:`spam_check`,previous:0,next:`infinity`,showSecondaryBuy:!1,debugLabelKey:`Limit modal: spam_check exhausted`}};function _(e){return g[e]}function v(e){return e===`infinity`?`∞`:e}var y={ai:`ai_150_inf`,email_generate:`email_300_inf`,image_generate:`image_generate_exceeded`,preview:`preview_exceeded`,link_check:`link_check_exceeded`,image_check:`image_check_exceeded`,spam_check:`spam_check_exceeded`};function b(e){return!e||e.is_unlimited||e.total_limit<=0?!1:e.remaining<=0||e.used>=e.total_limit}function x(e,t){return b(t)?{presetId:y[e],previousLimit:t?.total_limit??0,nextLimit:`infinity`}:null}function S(e,t){return x(e,t)}function C(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(typeof n==`string`&&n)return n}}function w(e){for(let t=0;t<e.length;t++){let n=e[t];if(n instanceof Blob)return n}}function T(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];if(typeof r==`string`&&r&&r!==t)return r}}var E=(0,s.createContext)(null),D=e=>e.includes(`UPLOAD_IMAGE_`)||e.includes(`UPLOAD_BACKGROUND_`),O=({children:e})=>{let t=i.Oi(),n=i.Di(a.s),[r,o]=(0,s.useState)(null),c=(0,s.useRef)(null),u=(0,s.useCallback)(e=>{c.current?.(e),c.current=null},[]),d=(0,s.useCallback)(e=>(u(null),o(e),t(a.r(e.entryModal)),new Promise(e=>{c.current=e})),[t,u]);(0,s.useEffect)(()=>{D(n)||(o(null),c.current&&u(null))},[n,u]);let f=(0,s.useMemo)(()=>({request:r,openImagePicker:d,resolveImagePicker:u}),[r,d,u]);return(0,l.jsx)(E.Provider,{value:f,children:e})},k=()=>{let e=(0,s.useContext)(E);if(!e)throw Error(`useImagePicker must be used within ImagePickerProvider`);return e};function A(e){if(!e)return!1;try{return i.Si.getInstance(e,i._o)!==void 0}catch{return!1}}function j(){let e=i.ki();return(0,s.useMemo)(()=>A(e),[e])}Object.defineProperty(t,"a",{enumerable:!0,get:function(){return T}}),Object.defineProperty(t,"c",{enumerable:!0,get:function(){return x}}),Object.defineProperty(t,"d",{enumerable:!0,get:function(){return v}}),Object.defineProperty(t,"f",{enumerable:!0,get:function(){return h}}),Object.defineProperty(t,"g",{enumerable:!0,get:function(){return u}}),Object.defineProperty(t,"h",{enumerable:!0,get:function(){return d}}),Object.defineProperty(t,"i",{enumerable:!0,get:function(){return w}}),Object.defineProperty(t,"l",{enumerable:!0,get:function(){return S}}),Object.defineProperty(t,"m",{enumerable:!0,get:function(){return f}}),Object.defineProperty(t,"n",{enumerable:!0,get:function(){return O}}),Object.defineProperty(t,"o",{enumerable:!0,get:function(){return C}}),Object.defineProperty(t,"p",{enumerable:!0,get:function(){return p}}),Object.defineProperty(t,"r",{enumerable:!0,get:function(){return k}}),Object.defineProperty(t,"s",{enumerable:!0,get:function(){return b}}),Object.defineProperty(t,"t",{enumerable:!0,get:function(){return j}}),Object.defineProperty(t,"u",{enumerable:!0,get:function(){return _}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__useblocks__.define(`static/core/b77ec308.js`,[`require`,`exports`,`module`,`static/core/4dc58c63.js`,`static/core/928d808b.js`],function(e,t,n){e("./4dc58c63.js");let r=e("./928d808b.js");var i,a,o={},s={},c={};function l(){return i?c:(i=1,Object.defineProperty(c,"__esModule",{value:!0}),c.default=function e(t,n){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.data=t,this.text=n.text||t,this.options=n},c)}function u(){if(a)return s;a=1,Object.defineProperty(s,"__esModule",{value:!0}),s.CODE39=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),e=e.toUpperCase(),t.mod43&&(e+=function(e){return r[e]}(function(e){for(var t=0,n=0;n<e.length;n++)t+=c(e[n]);return t%=43}(e))),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=o(`*`),t=0;t<this.data.length;t++)e+=o(this.data[t])+`0`;return{data:e+=o(`*`),text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%*`.split(``),i=[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 o(e){return function(e){return i[e].toString(2)}(c(e))}function c(e){return r.indexOf(e)}return s.CODE39=n,s}var d,ee,f={},p={},m={},h={};function g(){if(d)return h;var e;function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}d=1,Object.defineProperty(h,"__esModule",{value:!0});var n=h.SET_A=0,r=h.SET_B=1,i=h.SET_C=2;h.SHIFT=98;var a=h.START_A=103,o=h.START_B=104,s=h.START_C=105;return h.MODULO=103,h.STOP=106,h.FNC1=207,h.SET_BY_CODE=(t(e={},a,n),t(e,o,r),t(e,s,i),e),h.SWAP={101:n,100:r,99:i},h.A_START_CHAR=`Ð`,h.B_START_CHAR=`Ñ`,h.C_START_CHAR=`Ò`,h.A_CHARS=`[\0-_È-Ï]`,h.B_CHARS=`[ -È-Ï]`,h.C_CHARS=`(Ï*[0-9]{2}Ï*)`,h.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],h}function _(){if(ee)return m;ee=1,Object.defineProperty(m,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=l())&&e.__esModule?e:{default:e},r=g();return m.default=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.substring(1),t));return r.bytes=e.split(``).map(function(e){return e.charCodeAt(0)}),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.bytes,t=e.shift()-105,i=r.SET_BY_CODE[t];if(i===void 0)throw RangeError(`The encoding does not start with a start character.`);!0===this.shouldEncodeAsEan128()&&e.unshift(r.FNC1);var a=n.next(e,1,i);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,``):this.text,data:n.getBar(t)+a.result+n.getBar((a.checksum+t)%r.MODULO)+n.getBar(r.STOP)}}},{key:`shouldEncodeAsEan128`,value:function(){var e=this.options.ean128||!1;return typeof e==`string`&&(e=e.toLowerCase()===`true`),e}}],[{key:`getBar`,value:function(e){return r.BARS[e]?r.BARS[e].toString():``}},{key:`correctIndex`,value:function(e,t){if(t===r.SET_A){var n=e.shift();return n<32?n+64:n-32}return t===r.SET_B?e.shift()-32:10*(e.shift()-48)+e.shift()-48}},{key:`next`,value:function(e,t,i){if(!e.length)return{result:``,checksum:0};var a=void 0,o=void 0;if(e[0]>=200){o=e.shift()-105;var s=r.SWAP[o];s===void 0?(i!==r.SET_A&&i!==r.SET_B||o!==r.SHIFT||(e[0]=i===r.SET_A?e[0]>95?e[0]-96:e[0]:e[0]<32?e[0]+96:e[0]),a=n.next(e,t+1,i)):a=n.next(e,t+1,s)}else o=n.correctIndex(e,i),a=n.next(e,t+1,i);var c=o*t;return{result:n.getBar(o)+a.result,checksum:c+a.checksum}}}]),n}(n.default),m}var te,ne,v={};function re(){if(ne)return p;ne=1,Object.defineProperty(p,"__esModule",{value:!0});var e=n(_()),t=n(function(){if(te)return v;te=1,Object.defineProperty(v,"__esModule",{value:!0});var e=g(),t=function(t){return t.match(RegExp(`^`+e.A_CHARS+`*`))[0].length},n=function(t){return t.match(RegExp(`^`+e.B_CHARS+`*`))[0].length},r=function(t){return t.match(RegExp(`^`+e.C_CHARS+`*`))[0]};function i(t,n){var r=n?e.A_CHARS:e.B_CHARS,o=t.match(RegExp(`^(`+r+`+?)(([0-9]{2}){2,})([^0-9]|$)`));if(o)return o[1]+`Ì`+a(t.substring(o[1].length));var s=t.match(RegExp(`^`+r+`+`))[0];return s.length===t.length?t:s+String.fromCharCode(n?205:206)+i(t.substring(s.length),!n)}function a(e){var a=r(e),o=a.length;if(o===e.length)return e;e=e.substring(o);var s=t(e)>=n(e);return a+String.fromCharCode(s?206:205)+i(e,s)}return v.default=function(o){var s=void 0;if(r(o).length>=2)s=e.C_START_CHAR+a(o);else{var c=t(o)>n(o);s=(c?e.A_START_CHAR:e.B_START_CHAR)+i(o,c)}return s.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(e,t){return`Ë`+t})},v}());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}return p.default=function(e){function n(e,i){if(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),/^[\x00-\x7F\xC8-\xD3]+$/.test(e))var a=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,(0,t.default)(e),i));else a=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,i));return r(a)}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n}(e.default),p}var ie,y={};function ae(){if(ie)return y;ie=1,Object.defineProperty(y,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return y.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.A_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.A_CHARS+`+$`).test(this.data)}}]),n}(n.default),y}var oe,b={};function se(){if(oe)return b;oe=1,Object.defineProperty(b,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return b.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.B_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.B_CHARS+`+$`).test(this.data)}}]),n}(n.default),b}var ce,le,ue={};function de(){if(ce)return ue;ce=1,Object.defineProperty(ue,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return ue.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.C_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.C_CHARS+`+$`).test(this.data)}}]),n}(n.default),ue}var fe,x={},pe={},S={};function C(){return fe||(fe=1,Object.defineProperty(S,"__esModule",{value:!0}),S.SIDE_BIN=`101`,S.MIDDLE_BIN=`01010`,S.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`]},S.EAN2_STRUCTURE=[`LL`,`LG`,`GL`,`GG`],S.EAN5_STRUCTURE=[`GGLLL`,`GLGLL`,`GLLGL`,`GLLLG`,`LGGLL`,`LLGGL`,`LLLGG`,`LGLGL`,`LGLLG`,`LLGLG`],S.EAN13_STRUCTURE=[`LLLLLL`,`LLGLGG`,`LLGGLG`,`LLGGGL`,`LGLLGG`,`LGGLLG`,`LGGGLL`,`LGLGLG`,`LGLGGL`,`LGGLGL`]),S}var me,he,ge,w={},T={};function E(){if(me)return T;me=1,Object.defineProperty(T,"__esModule",{value:!0});var e=C();return T.default=function(t,n,r){var i=t.split(``).map(function(t,r){return e.BINARIES[n[r]]}).map(function(e,n){return e?e[t[n]]:``});if(r){var a=t.length-1;i=i.map(function(e,t){return t<a?e+r:e})}return i.join(``)},T}function _e(){if(he)return w;he=1,Object.defineProperty(w,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=r(E());function r(e){return e&&e.__esModule?e:{default:e}}return w.default=function(r){function i(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,i);var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.fontSize=!t.flat&&t.fontSize>10*t.width?10*t.width:t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`encode`,value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:`leftText`,value:function(e,t){return this.text.substr(e,t)}},{key:`leftEncode`,value:function(e,t){return(0,n.default)(e,t)}},{key:`rightText`,value:function(e,t){return this.text.substr(e,t)}},{key:`rightEncode`,value:function(e,t){return(0,n.default)(e,t)}},{key:`encodeGuarded`,value:function(){var e={fontSize:this.fontSize},n={height:this.guardHeight};return[{data:t.SIDE_BIN,options:n},{data:this.leftEncode(),text:this.leftText(),options:e},{data:t.MIDDLE_BIN,options:n},{data:this.rightEncode(),text:this.rightText(),options:e},{data:t.SIDE_BIN,options:n}]}},{key:`encodeFlat`,value:function(){return{data:[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN].join(``),text:this.text}}}]),i}(r(l()).default),w}function ve(){if(ge)return pe;ge=1,Object.defineProperty(pe,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}if(`value`in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(r)},r=C(),i=(e=_e())&&e.__esModule?e:{default:e},a=function(e){return(10-e.substr(0,12).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+3*t:e+t},0)%10)%10};return pe.default=function(e){function i(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,i),e.search(/^[0-9]{12}$/)!==-1&&(e+=a(e));var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.lastChar=t.lastChar,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,e),t(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===a(this.data)}},{key:`leftText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftText`,this).call(this,1,6)}},{key:`leftEncode`,value:function(){var e=this.data.substr(1,6),t=r.EAN13_STRUCTURE[this.data[0]];return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftEncode`,this).call(this,e,t)}},{key:`rightText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightText`,this).call(this,7,6)}},{key:`rightEncode`,value:function(){var e=this.data.substr(7,6);return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightEncode`,this).call(this,e,`RRRRRR`)}},{key:`encodeGuarded`,value:function(){var e=n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`encodeGuarded`,this).call(this);return this.options.displayValue&&(e.unshift({data:`000000000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),this.options.lastChar&&(e.push({data:`00`}),e.push({data:`00000`,text:this.options.lastChar,options:{fontSize:this.fontSize}}))),e}}]),i}(i.default),pe}var ye,D={};function be(){if(ye)return D;ye=1,Object.defineProperty(D,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}if(`value`in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(r)},r=(e=_e())&&e.__esModule?e:{default:e},i=function(e){return(10-e.substr(0,7).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+t:e+3*t},0)%10)%10};return D.default=function(e){function r(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),e.search(/^[0-9]{7}$/)!==-1&&(e+=i(e)),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===i(this.data)}},{key:`leftText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftText`,this).call(this,0,4)}},{key:`leftEncode`,value:function(){var e=this.data.substr(0,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftEncode`,this).call(this,e,`LLLL`)}},{key:`rightText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightText`,this).call(this,4,4)}},{key:`rightEncode`,value:function(){var e=this.data.substr(4,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightEncode`,this).call(this,e,`RRRR`)}}]),r}(r.default),D}var xe,O={};function Se(){if(xe)return O;xe=1,Object.defineProperty(O,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=i(E()),r=i(l());function i(e){return e&&e.__esModule?e:{default:e}}return O.default=function(r){function i(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:`encode`,value:function(){var e,r=t.EAN5_STRUCTURE[e=this.data,e.split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+9*t:e+3*t},0)%10];return{data:`1011`+(0,n.default)(this.data,r,`01`),text:this.text}}}]),i}(r.default),O}var Ce,k={};function we(){if(Ce)return k;Ce=1,Object.defineProperty(k,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=r(E());function r(e){return e&&e.__esModule?e:{default:e}}return k.default=function(r){function i(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:`encode`,value:function(){var e=t.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:`1011`+(0,n.default)(this.data,e,`01`),text:this.text}}}]),i}(r(l()).default),k}var Te,A={};function Ee(){if(Te)return A;Te=1,Object.defineProperty(A,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();A.checksum=i;var t=n(E());function n(e){return e&&e.__esModule?e:{default:e}}var r=function(n){function r(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,r),e.search(/^[0-9]{11}$/)!==-1&&(e+=i(e));var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.displayValue=t.displayValue,t.fontSize>10*t.width?n.fontSize=10*t.width:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),e(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==i(this.data)}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=(0,t.default)(this.data.substr(0,6),`LLLLLL`),e+=`01010`,e+=(0,t.default)(this.data.substr(6,6),`RRRRRR`),{data:e+=`101`,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`+(0,t.default)(this.data[0],`L`),options:{height:this.guardHeight}}),e.push({data:(0,t.default)(this.data.substr(1,5),`LLLLL`),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:`01010`,options:{height:this.guardHeight}}),e.push({data:(0,t.default)(this.data.substr(6,5),`RRRRR`),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:(0,t.default)(this.data[11],`R`)+`101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text.substr(11,1),options:{textAlign:`right`,fontSize:this.fontSize}}),e}}]),r}(n(l()).default);function i(e){var t,n=0;for(t=1;t<11;t+=2)n+=parseInt(e[t]);for(t=0;t<11;t+=2)n+=3*parseInt(e[t]);return(10-n%10)%10}return A.default=r,A}var De,Oe,j={};function ke(){if(De)return j;De=1,Object.defineProperty(j,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=i(E()),n=i(l()),r=Ee();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}var o=[`XX00000XXX`,`XX10000XXX`,`XX20000XXX`,`XXX00000XX`,`XXXX00000X`,`XXXXX00005`,`XXXXX00006`,`XXXXX00007`,`XXXXX00008`,`XXXXX00009`],s=[[`EEEOOO`,`OOOEEE`],[`EEOEOO`,`OOEOEE`],[`EEOOEO`,`OOEEOE`],[`EEOOOE`,`OOEEEO`],[`EOEEOO`,`OEOOEE`],[`EOOEEO`,`OEEOOE`],[`EOOOEE`,`OEEEOO`],[`EOEOEO`,`OEOEOE`],[`EOEOOE`,`OEOEEO`],[`EOOEOE`,`OEEOEO`]],c=function(n){function r(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,r);var n=a(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));if(n.isValid=!1,e.search(/^[0-9]{6}$/)!==-1)n.middleDigits=e,n.upcA=u(e,`0`),n.text=t.text||``+n.upcA[0]+e+n.upcA[n.upcA.length-1],n.isValid=!0;else{if(e.search(/^[01][0-9]{7}$/)===-1||(n.middleDigits=e.substring(1,e.length-1),n.upcA=u(n.middleDigits,e[0]),n.upcA[n.upcA.length-1]!==e[e.length-1]))return a(n);n.isValid=!0}return n.displayValue=t.displayValue,t.fontSize>10*t.width?n.fontSize=10*t.width:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),e(r,[{key:`valid`,value:function(){return this.isValid}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=this.encodeMiddleDigits(),{data:e+=`010101`,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text[0],options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`,options:{height:this.guardHeight}}),e.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),e.push({data:`010101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text[7],options:{textAlign:`right`,fontSize:this.fontSize}}),e}},{key:`encodeMiddleDigits`,value:function(){var e=this.upcA[0],n=this.upcA[this.upcA.length-1],r=s[parseInt(n)][parseInt(e)];return(0,t.default)(this.middleDigits,r)}}]),r}(n.default);function u(e,t){for(var n=o[parseInt(e[e.length-1])],i=``,a=0,s=0;s<n.length;s++){var c=n[s];i+=c===`X`?e[a++]:c}return(i=``+t+i)+(0,r.checksum)(i)}return j.default=c,j}var Ae,je,M={},N={},P={};function Me(){if(je)return N;je=1,Object.defineProperty(N,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(Ae||(Ae=1,Object.defineProperty(P,"__esModule",{value:!0}),P.START_BIN=`1010`,P.END_BIN=`11101`,P.BINARIES=[`00110`,`10001`,`01001`,`11000`,`00101`,`10100`,`01100`,`00011`,`10010`,`01010`]),P);return N.default=function(e){function r(){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:`encode`,value:function(){var e=this,t=this.data.match(/.{2}/g).map(function(t){return e.encodePair(t)}).join(``);return{data:n.START_BIN+t+n.END_BIN,text:this.text}}},{key:`encodePair`,value:function(e){var t=n.BINARIES[e[1]];return n.BINARIES[e[0]].split(``).map(function(e,n){return(e===`1`?`111`:`1`)+(t[n]===`1`?`000`:`0`)}).join(``)}}]),r}(((e=l())&&e.__esModule?e:{default:e}).default),N}var Ne,Pe,F={};function Fe(){if(Ne)return F;Ne=1,Object.defineProperty(F,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=Me())&&e.__esModule?e:{default:e},r=function(e){var t=e.substr(0,13).split(``).map(function(e){return parseInt(e,10)}).reduce(function(e,t,n){return e+t*(3-n%2*2)},0);return 10*Math.ceil(t/10)-t};return F.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),e.search(/^[0-9]{13}$/)!==-1&&(e+=r(e)),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===r(this.data)}}]),n}(n.default),F}var Ie,I={},L={};function R(){if(Ie)return L;Ie=1,Object.defineProperty(L,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=`110`,t=0;t<this.data.length;t++){var n=parseInt(this.data[t]).toString(2);n=r(n,4-n.length);for(var i=0;i<n.length;i++)e+=n[i]==`0`?`100`:`110`}return{data:e+=`1001`,text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default);function r(e,t){for(var n=0;n<t;n++)e=`0`+e;return e}return L.default=n,L}var Le,Re,z={},B={};function V(){return Le?B:(Le=1,Object.defineProperty(B,"__esModule",{value:!0}),B.mod10=function(e){for(var t=0,n=0;n<e.length;n++){var r=parseInt(e[n]);(n+e.length)%2==0?t+=r:t+=2*r%10+Math.floor(2*r/10)}return(10-t%10)%10},B.mod11=function(e){for(var t=0,n=[2,3,4,5,6,7],r=0;r<e.length;r++){var i=parseInt(e[e.length-1-r]);t+=n[r%n.length]*i}return(11-t%11)%11},B)}function ze(){if(Re)return z;Re=1,Object.defineProperty(z,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return z.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod10)(e),r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),z}var Be,H={};function Ve(){if(Be)return H;Be=1,Object.defineProperty(H,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return H.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod11)(e),r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),H}var He,U={};function Ue(){if(He)return U;He=1,Object.defineProperty(U,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return U.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),e+=(0,n.mod10)(e),e+=(0,n.mod10)(e),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),U}var We,Ge,Ke={};function qe(){if(We)return Ke;We=1,Object.defineProperty(Ke,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return Ke.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),e+=(0,n.mod11)(e),e+=(0,n.mod10)(e),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),Ke}var Je,W={};function Ye(){if(Je)return W;Je=1,Object.defineProperty(W,"__esModule",{value:!0}),W.pharmacode=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return W.pharmacode=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.number=parseInt(e,10),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=this.number,t=``;!isNaN(e)&&e!=0;)e%2==0?(t=`11100`+t,e=(e-2)/2):(t=`100`+t,e=(e-1)/2);return{data:t=t.slice(0,-2),text:this.text}}},{key:`valid`,value:function(){return this.number>=3&&this.number<=131070}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),W}var Xe,G={};function Ze(){if(Xe)return G;Xe=1,Object.defineProperty(G,"__esModule",{value:!0}),G.codabar=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return G.codabar=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n),e.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(e=`A`+e+`A`);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.toUpperCase(),t));return r.text=r.options.text||r.text.replace(/[A-D]/g,``),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:`encode`,value:function(){for(var e=[],t=this.getEncodings(),n=0;n<this.data.length;n++)e.push(t[this.data.charAt(n)]),n!==this.data.length-1&&e.push(`0`);return{text:this.text,data:e.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`}}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),G}var Qe,$e,K={},q={},J={};function et(){if($e)return q;$e=1,Object.defineProperty(q,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(Qe||(Qe=1,Object.defineProperty(J,"__esModule",{value:!0}),J.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,-,., ,$,/,+,%,($),(%),(/),(+),ÿ`.split(`,`),J.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`.split(`.`),J.MULTI_SYMBOLS={"\0":[`(%)`,`U`],"":[`($)`,`A`],"":[`($)`,`B`],"":[`($)`,`C`],"":[`($)`,`D`],"":[`($)`,`E`],"":[`($)`,`F`],"\x07":[`($)`,`G`],"\b":[`($)`,`H`]," ":[`($)`,`I`],"\n":[`($)`,`J`],"\v":[`($)`,`K`],"\f":[`($)`,`L`],"\r":[`($)`,`M`],"":[`($)`,`N`],"":[`($)`,`O`],"":[`($)`,`P`],"":[`($)`,`Q`],"":[`($)`,`R`],"":[`($)`,`S`],"":[`($)`,`T`],"":[`($)`,`U`],"":[`($)`,`V`],"":[`($)`,`W`],"":[`($)`,`X`],"":[`($)`,`Y`],"":[`($)`,`Z`],"\x1B":[`(%)`,`A`],"":[`(%)`,`B`],"":[`(%)`,`C`],"":[`(%)`,`D`],"":[`(%)`,`E`],"!":[`(/)`,`A`],'"':[`(/)`,`B`],"#":[`(/)`,`C`],"&":[`(/)`,`F`],"'":[`(/)`,`G`],"(":[`(/)`,`H`],")":[`(/)`,`I`],"*":[`(/)`,`J`],",":[`(/)`,`L`],":":[`(/)`,`Z`],";":[`(%)`,`F`],"<":[`(%)`,`G`],"=":[`(%)`,`H`],">":[`(%)`,`I`],"?":[`(%)`,`J`],"@":[`(%)`,`V`],"[":[`(%)`,`K`],"\\":[`(%)`,`L`],"]":[`(%)`,`M`],"^":[`(%)`,`N`],_:[`(%)`,`O`],"`":[`(%)`,`W`],a:[`(+)`,`A`],b:[`(+)`,`B`],c:[`(+)`,`C`],d:[`(+)`,`D`],e:[`(+)`,`E`],f:[`(+)`,`F`],g:[`(+)`,`G`],h:[`(+)`,`H`],i:[`(+)`,`I`],j:[`(+)`,`J`],k:[`(+)`,`K`],l:[`(+)`,`L`],m:[`(+)`,`M`],n:[`(+)`,`N`],o:[`(+)`,`O`],p:[`(+)`,`P`],q:[`(+)`,`Q`],r:[`(+)`,`R`],s:[`(+)`,`S`],t:[`(+)`,`T`],u:[`(+)`,`U`],v:[`(+)`,`V`],w:[`(+)`,`W`],x:[`(+)`,`X`],y:[`(+)`,`Y`],z:[`(+)`,`Z`],"{":[`(%)`,`P`],"|":[`(%)`,`Q`],"}":[`(%)`,`R`],"~":[`(%)`,`S`],"":[`(%)`,`T`]}),J);return q.default=function(e){function r(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.data.split(``).flatMap(function(e){return n.MULTI_SYMBOLS[e]||e}),t=e.map(function(e){return r.getEncoding(e)}).join(``),i=r.checksum(e,20),a=r.checksum(e.concat(i),15);return{text:this.text,data:r.getEncoding(`ÿ`)+t+r.getEncoding(i)+r.getEncoding(a)+r.getEncoding(`ÿ`)+`1`}}}],[{key:`getEncoding`,value:function(e){return n.BINARIES[r.symbolValue(e)]}},{key:`getSymbol`,value:function(e){return n.SYMBOLS[e]}},{key:`symbolValue`,value:function(e){return n.SYMBOLS.indexOf(e)}},{key:`checksum`,value:function(e,t){var n=e.slice().reverse().reduce(function(e,n,i){var a=i%t+1;return e+r.symbolValue(n)*a},0);return r.getSymbol(n%47)}}]),r}(((e=l())&&e.__esModule?e:{default:e}).default),q}var tt,nt,Y={};function rt(){if(tt)return Y;tt=1,Object.defineProperty(Y,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Y.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),n}(((e=et())&&e.__esModule?e:{default:e}).default),Y}var it,at,X={};function ot(){if(it)return X;it=1,Object.defineProperty(X,"__esModule",{value:!0}),X.GenericBarcode=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return X.GenericBarcode=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){return{data:`10101010101010101010101010101010101010101`,text:this.text}}},{key:`valid`,value:function(){return!0}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),X}function st(){if(at)return o;at=1,Object.defineProperty(o,"__esModule",{value:!0});var e=u(),t=function(){if(le)return f;le=1,Object.defineProperty(f,"__esModule",{value:!0}),f.CODE128C=f.CODE128B=f.CODE128A=f.CODE128=void 0;var e=i(re()),t=i(ae()),n=i(se()),r=i(de());function i(e){return e&&e.__esModule?e:{default:e}}return f.CODE128=e.default,f.CODE128A=t.default,f.CODE128B=n.default,f.CODE128C=r.default,f}(),n=function(){if(Oe)return x;Oe=1,Object.defineProperty(x,"__esModule",{value:!0}),x.UPCE=x.UPC=x.EAN2=x.EAN5=x.EAN8=x.EAN13=void 0;var e=o(ve()),t=o(be()),n=o(Se()),r=o(we()),i=o(Ee()),a=o(ke());function o(e){return e&&e.__esModule?e:{default:e}}return x.EAN13=e.default,x.EAN8=t.default,x.EAN5=n.default,x.EAN2=r.default,x.UPC=i.default,x.UPCE=a.default,x}(),r=function(){if(Pe)return M;Pe=1,Object.defineProperty(M,"__esModule",{value:!0}),M.ITF14=M.ITF=void 0;var e=n(Me()),t=n(Fe());function n(e){return e&&e.__esModule?e:{default:e}}return M.ITF=e.default,M.ITF14=t.default,M}(),i=function(){if(Ge)return I;Ge=1,Object.defineProperty(I,"__esModule",{value:!0}),I.MSI1110=I.MSI1010=I.MSI11=I.MSI10=I.MSI=void 0;var e=a(R()),t=a(ze()),n=a(Ve()),r=a(Ue()),i=a(qe());function a(e){return e&&e.__esModule?e:{default:e}}return I.MSI=e.default,I.MSI10=t.default,I.MSI11=n.default,I.MSI1010=r.default,I.MSI1110=i.default,I}(),a=Ye(),s=Ze(),c=function(){if(nt)return K;nt=1,Object.defineProperty(K,"__esModule",{value:!0}),K.CODE93FullASCII=K.CODE93=void 0;var e=n(et()),t=n(rt());function n(e){return e&&e.__esModule?e:{default:e}}return K.CODE93=e.default,K.CODE93FullASCII=t.default,K}(),l=ot();return o.default={CODE39:e.CODE39,CODE128:t.CODE128,CODE128A:t.CODE128A,CODE128B:t.CODE128B,CODE128C:t.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:r.ITF14,ITF:r.ITF,MSI:i.MSI,MSI10:i.MSI10,MSI11:i.MSI11,MSI1010:i.MSI1010,MSI1110:i.MSI1110,pharmacode:a.pharmacode,codabar:s.codabar,CODE93:c.CODE93,CODE93FullASCII:c.CODE93FullASCII,GenericBarcode:l.GenericBarcode},o}var ct,lt={};function ut(){if(ct)return lt;ct=1,Object.defineProperty(lt,"__esModule",{value:!0});var e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};return lt.default=function(t,n){return e({},t,n)},lt}var dt,ft={},pt,mt={},ht,gt={},_t={},vt={};function yt(){return ht?vt:(ht=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.default=function(e){var t=[`width`,`height`,`textMargin`,`fontSize`,`margin`,`marginTop`,`marginBottom`,`marginLeft`,`marginRight`];for(var n in t)t.hasOwnProperty(n)&&typeof e[n=t[n]]==`string`&&(e[n]=parseInt(e[n],10));return typeof e.displayValue==`string`&&(e.displayValue=e.displayValue!=`false`),e},vt)}var bt,xt,St={};function Ct(){return bt?St:(bt=1,Object.defineProperty(St,"__esModule",{value:!0}),St.default={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(){}},St)}var wt,Tt,Et={},Dt={},Z={};function Ot(){if(wt)return Z;wt=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.getTotalWidthOfEncodings=Z.calculateEncodingAttributes=Z.getBarcodePadding=Z.getEncodingHeight=Z.getMaximumHeightOfEncodings=void 0;var e,t=(e=ut())&&e.__esModule?e:{default:e};function n(e,t){return t.height+(t.displayValue&&e.text.length>0?t.fontSize+t.textMargin:0)+t.marginTop+t.marginBottom}function r(e,t,n){if(n.displayValue&&t<e){if(n.textAlign==`center`)return Math.floor((e-t)/2);if(n.textAlign==`left`)return 0;if(n.textAlign==`right`)return Math.floor(e-t)}return 0}function i(e,t,n){var r;if(n)r=n;else{if(typeof document>`u`)return 0;r=document.createElement(`canvas`).getContext(`2d`)}r.font=t.fontOptions+` `+t.fontSize+`px `+t.font;var i=r.measureText(e);return i?i.width:0}return Z.getMaximumHeightOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)e[n].height>t&&(t=e[n].height);return t},Z.getEncodingHeight=n,Z.getBarcodePadding=r,Z.calculateEncodingAttributes=function(e,a,o){for(var s=0;s<e.length;s++){var c,l=e[s],u=(0,t.default)(a,l.options);c=u.displayValue?i(l.text,u,o):0;var d=l.data.length*u.width;l.width=Math.ceil(Math.max(c,d)),l.height=n(l,u),l.barcodePadding=r(c,d,u)}},Z.getTotalWidthOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n].width;return t},Z}function kt(){if(Tt)return Dt;Tt=1,Object.defineProperty(Dt,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=ut())&&e.__esModule?e:{default:e},r=Ot();return Dt.default=function(){function e(t,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.canvas=t,this.encodings=n,this.options=r}return t(e,[{key:`render`,value:function(){if(!this.canvas.getContext)throw Error(`The browser does not support canvas.`);this.prepareCanvas();for(var e=0;e<this.encodings.length;e++){var t=(0,n.default)(this.options,this.encodings[e].options);this.drawCanvasBarcode(t,this.encodings[e]),this.drawCanvasText(t,this.encodings[e]),this.moveCanvasDrawing(this.encodings[e])}this.restoreCanvas()}},{key:`prepareCanvas`,value:function(){var e=this.canvas.getContext(`2d`);e.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,e);var t=(0,r.getTotalWidthOfEncodings)(this.encodings),n=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=t+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,e.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(e.fillStyle=this.options.background,e.fillRect(0,0,this.canvas.width,this.canvas.height)),e.translate(this.options.marginLeft,0)}},{key:`drawCanvasBarcode`,value:function(e,t){var n,r=this.canvas.getContext(`2d`),i=t.data;n=e.textPosition==`top`?e.marginTop+e.fontSize+e.textMargin:e.marginTop,r.fillStyle=e.lineColor;for(var a=0;a<i.length;a++){var o=a*e.width+t.barcodePadding;i[a]===`1`?r.fillRect(o,n,e.width,e.height):i[a]&&r.fillRect(o,n,e.width,e.height*i[a])}}},{key:`drawCanvasText`,value:function(e,t){var n,r,i=this.canvas.getContext(`2d`),a=e.fontOptions+` `+e.fontSize+`px `+e.font;e.displayValue&&(r=e.textPosition==`top`?e.marginTop+e.fontSize-e.textMargin:e.height+e.textMargin+e.marginTop+e.fontSize,i.font=a,e.textAlign==`left`||t.barcodePadding>0?(n=0,i.textAlign=`left`):e.textAlign==`right`?(n=t.width-1,i.textAlign=`right`):(n=t.width/2,i.textAlign=`center`),i.fillText(t.text,n,r))}},{key:`moveCanvasDrawing`,value:function(e){this.canvas.getContext(`2d`).translate(e.width,0)}},{key:`restoreCanvas`,value:function(){this.canvas.getContext(`2d`).restore()}}]),e}(),Dt}var At,jt={};function Mt(){if(At)return jt;At=1,Object.defineProperty(jt,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=ut())&&e.__esModule?e:{default:e},r=Ot(),i=`http://www.w3.org/2000/svg`;return jt.default=function(){function e(t,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.svg=t,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return t(e,[{key:`render`,value:function(){var e=this.options.marginLeft;this.prepareSVG();for(var t=0;t<this.encodings.length;t++){var r=this.encodings[t],i=(0,n.default)(this.options,r.options),a=this.createGroup(e,i.marginTop,this.svg);this.setGroupOptions(a,i),this.drawSvgBarcode(a,i,r),this.drawSVGText(a,i,r),e+=r.width}}},{key:`prepareSVG`,value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var e=(0,r.getTotalWidthOfEncodings)(this.encodings),t=(0,r.getMaximumHeightOfEncodings)(this.encodings),n=e+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,t),this.options.background&&this.drawRect(0,0,n,t,this.svg).setAttribute(`fill`,this.options.background)}},{key:`drawSvgBarcode`,value:function(e,t,n){var r,i=n.data;r=t.textPosition==`top`?t.fontSize+t.textMargin:0;for(var a=0,o=0,s=0;s<i.length;s++)o=s*t.width+n.barcodePadding,i[s]===`1`?a++:a>0&&(this.drawRect(o-t.width*a,r,t.width*a,t.height,e),a=0);a>0&&this.drawRect(o-t.width*(a-1),r,t.width*a,t.height,e)}},{key:`drawSVGText`,value:function(e,t,n){var r,a,o=this.document.createElementNS(i,`text`);t.displayValue&&(o.setAttribute(`font-family`,t.font),o.setAttribute(`font-size`,t.fontSize),t.fontOptions.includes(`bold`)&&o.setAttribute(`font-weight`,`bold`),t.fontOptions.includes(`italic`)&&o.setAttribute(`font-style`,`italic`),a=t.textPosition==`top`?t.fontSize-t.textMargin:t.height+t.textMargin+t.fontSize,t.textAlign==`left`||n.barcodePadding>0?(r=0,o.setAttribute(`text-anchor`,`start`)):t.textAlign==`right`?(r=n.width-1,o.setAttribute(`text-anchor`,`end`)):(r=n.width/2,o.setAttribute(`text-anchor`,`middle`)),o.setAttribute(`x`,r),o.setAttribute(`y`,a),o.appendChild(this.document.createTextNode(n.text)),e.appendChild(o))}},{key:`setSvgAttributes`,value:function(e,t){var n=this.svg;n.setAttribute(`width`,e+`px`),n.setAttribute(`height`,t+`px`),n.setAttribute(`x`,`0px`),n.setAttribute(`y`,`0px`),n.setAttribute(`viewBox`,`0 0 `+e+` `+t),n.setAttribute(`xmlns`,i),n.setAttribute(`version`,`1.1`)}},{key:`createGroup`,value:function(e,t,n){var r=this.document.createElementNS(i,`g`);return r.setAttribute(`transform`,`translate(`+e+`, `+t+`)`),n.appendChild(r),r}},{key:`setGroupOptions`,value:function(e,t){e.setAttribute(`fill`,t.lineColor)}},{key:`drawRect`,value:function(e,t,n,r,a){var o=this.document.createElementNS(i,`rect`);return o.setAttribute(`x`,e),o.setAttribute(`y`,t),o.setAttribute(`width`,n),o.setAttribute(`height`,r),a.appendChild(o),o}}]),e}(),jt}var Nt,Pt,Q={};function Ft(){if(Nt)return Q;Nt=1,Object.defineProperty(Q,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Q.default=function(){function t(e,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,t),this.object=e,this.encodings=n,this.options=r}return e(t,[{key:`render`,value:function(){this.object.encodings=this.encodings}}]),t}(),Q}var It,Lt,$={};function Rt(){if(It)return $;function e(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function t(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}function n(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}It=1,Object.defineProperty($,"__esModule",{value:!0});var r=function(){function r(n,i){e(this,r);var a=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return a.name=`InvalidInputException`,a.symbology=n,a.input=i,a.message=`"`+a.input+`" is not a valid input for `+a.symbology,a}return n(r,Error),r}(),i=function(){function r(){e(this,r);var n=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.name=`InvalidElementException`,n.message=`Not supported type to render on`,n}return n(r,Error),r}(),a=function(){function r(){e(this,r);var n=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.name=`NoElementException`,n.message=`No element to render on.`,n}return n(r,Error),r}();return $.InvalidInputException=r,$.InvalidElementException=i,$.NoElementException=a,$}function zt(){if(Lt)return gt;Lt=1,Object.defineProperty(gt,"__esModule",{value:!0});var e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t=i(function(){if(xt)return _t;xt=1,Object.defineProperty(_t,"__esModule",{value:!0});var e=n(yt()),t=n(Ct());function n(e){return e&&e.__esModule?e:{default:e}}return _t.default=function(n){var r={};for(var i in t.default)t.default.hasOwnProperty(i)&&(n.hasAttribute(`jsbarcode-`+i.toLowerCase())&&(r[i]=n.getAttribute(`jsbarcode-`+i.toLowerCase())),n.hasAttribute(`data-`+i.toLowerCase())&&(r[i]=n.getAttribute(`data-`+i.toLowerCase())));return r.value=n.getAttribute(`jsbarcode-value`)||n.getAttribute(`data-value`),(0,e.default)(r)},_t}()),n=i(function(){if(Pt)return Et;Pt=1,Object.defineProperty(Et,"__esModule",{value:!0});var e=r(kt()),t=r(Mt()),n=r(Ft());function r(e){return e&&e.__esModule?e:{default:e}}return Et.default={CanvasRenderer:e.default,SVGRenderer:t.default,ObjectRenderer:n.default},Et}()),r=Rt();function i(e){return e&&e.__esModule?e:{default:e}}function a(i){if(typeof i==`string`)return function(e){var t=document.querySelectorAll(e);if(t.length!==0){for(var n=[],r=0;r<t.length;r++)n.push(a(t[r]));return n}}(i);if(Array.isArray(i)){for(var o=[],s=0;s<i.length;s++)o.push(a(i[s]));return o}if(typeof HTMLCanvasElement<`u`&&i instanceof HTMLImageElement)return function(e){var r=document.createElement(`canvas`);return{element:r,options:(0,t.default)(e),renderer:n.default.CanvasRenderer,afterRender:function(){e.setAttribute(`src`,r.toDataURL())}}}(i);if(i&&i.nodeName&&i.nodeName.toLowerCase()===`svg`||typeof SVGElement<`u`&&i instanceof SVGElement)return{element:i,options:(0,t.default)(i),renderer:n.default.SVGRenderer};if(typeof HTMLCanvasElement<`u`&&i instanceof HTMLCanvasElement)return{element:i,options:(0,t.default)(i),renderer:n.default.CanvasRenderer};if(i&&i.getContext)return{element:i,renderer:n.default.CanvasRenderer};if(i&&(i===void 0?`undefined`:e(i))===`object`&&!i.nodeName)return{element:i,renderer:n.default.ObjectRenderer};throw new r.InvalidElementException}return gt.default=a,gt}var Bt,Vt,Ht,Ut={};function Wt(){if(Bt)return Ut;Bt=1,Object.defineProperty(Ut,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Ut.default=function(){function t(e){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,t),this.api=e}return e(t,[{key:`handleCatch`,value:function(e){if(e.name!==`InvalidInputException`)throw e;if(this.api._options.valid===this.api._defaults.valid)throw e.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:`wrapBarcodeCall`,value:function(e){try{var t=e.apply(void 0,arguments);return this.api._options.valid(!0),t}catch(e){return this.handleCatch(e),this.api}}}]),t}(),Ut}var Gt=r.i(function(){if(Ht)return Vt;Ht=1;var e=l(st()),t=l(ut()),n=l((dt||(dt=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.default=function(e){var t=[];return function e(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)e(n[r]);else n.text=n.text||``,n.data=n.data||``,t.push(n)}(e),t}),ft)),r=l((pt||(pt=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.default=function(e){return e.marginTop=e.marginTop||e.margin,e.marginBottom=e.marginBottom||e.margin,e.marginRight=e.marginRight||e.margin,e.marginLeft=e.marginLeft||e.margin,e}),mt)),i=l(zt()),a=l(yt()),o=l(Wt()),s=Rt(),c=l(Ct());function l(e){return e&&e.__esModule?e:{default:e}}var u=function(){},d=function(e,t,n){var r=new u;if(e===void 0)throw Error(`No element to render on was provided.`);return r._renderProperties=(0,i.default)(e),r._encodings=[],r._options=c.default,r._errorHandler=new o.default(r),t!==void 0&&((n||={}).format||(n.format=m()),r.options(n)[n.format](t,n).render()),r};for(var ee in d.getModule=function(t){return e.default[t]},e.default)e.default.hasOwnProperty(ee)&&f(e.default,ee);function f(e,n){u.prototype[n]=u.prototype[n.toUpperCase()]=u.prototype[n.toLowerCase()]=function(r,i){var o=this;return o._errorHandler.wrapBarcodeCall(function(){i.text=i.text===void 0?void 0:``+i.text;var s=(0,t.default)(o._options,i);s=(0,a.default)(s);var c=e[n],l=p(r,c,s);return o._encodings.push(l),o})}}function p(e,r,i){var a=new r(e=``+e,i);if(!a.valid())throw new s.InvalidInputException(a.constructor.name,e);var o=a.encode();o=(0,n.default)(o);for(var c=0;c<o.length;c++)o[c].options=(0,t.default)(i,o[c].options);return o}function m(){return e.default.CODE128?`CODE128`:Object.keys(e.default)[0]}function h(e,i,a){i=(0,n.default)(i);for(var o=0;o<i.length;o++)i[o].options=(0,t.default)(a,i[o].options),(0,r.default)(i[o].options);(0,r.default)(a),new e.renderer(e.element,i,a).render(),e.afterRender&&e.afterRender()}return u.prototype.options=function(e){return this._options=(0,t.default)(this._options,e),this},u.prototype.blank=function(e){var t=Array(e+1).join(`0`);return this._encodings.push({data:t}),this},u.prototype.init=function(){var n;if(this._renderProperties)for(var r in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){n=this._renderProperties[r];var i=(0,t.default)(this._options,n.options);i.format==`auto`&&(i.format=m()),this._errorHandler.wrapBarcodeCall(function(){var t=p(i.value,e.default[i.format.toUpperCase()],i);h(n,t,i)})}},u.prototype.render=function(){if(!this._renderProperties)throw new s.NoElementException;if(Array.isArray(this._renderProperties))for(var e=0;e<this._renderProperties.length;e++)h(this._renderProperties[e],this._encodings,this._options);else h(this._renderProperties,this._encodings,this._options);return this},u.prototype._defaults=c.default,typeof window<`u`&&(window.JsBarcode=d),typeof jQuery<`u`&&(jQuery.fn.JsBarcode=function(e,t){var n=[];return jQuery(this).each(function(){n.push(this)}),d(n,e,t)}),Vt=d}());t.J=Object.freeze({__proto__:null,default:Gt})});
|
|
1
|
+
__useblocks__.define(`static/core/9bd41e07.js`,[`require`,`exports`,`module`,`static/core/4dc58c63.js`,`static/core/545b5c1c.js`],function(e,t,n){e("./4dc58c63.js");let r=e("./545b5c1c.js");var i,a,o={},s={},c={};function l(){return i?c:(i=1,Object.defineProperty(c,"__esModule",{value:!0}),c.default=function e(t,n){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.data=t,this.text=n.text||t,this.options=n},c)}function u(){if(a)return s;a=1,Object.defineProperty(s,"__esModule",{value:!0}),s.CODE39=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),e=e.toUpperCase(),t.mod43&&(e+=function(e){return r[e]}(function(e){for(var t=0,n=0;n<e.length;n++)t+=c(e[n]);return t%=43}(e))),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=o(`*`),t=0;t<this.data.length;t++)e+=o(this.data[t])+`0`;return{data:e+=o(`*`),text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)!==-1}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),r=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%*`.split(``),i=[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 o(e){return function(e){return i[e].toString(2)}(c(e))}function c(e){return r.indexOf(e)}return s.CODE39=n,s}var d,ee,f={},p={},m={},h={};function g(){if(d)return h;var e;function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}d=1,Object.defineProperty(h,"__esModule",{value:!0});var n=h.SET_A=0,r=h.SET_B=1,i=h.SET_C=2;h.SHIFT=98;var a=h.START_A=103,o=h.START_B=104,s=h.START_C=105;return h.MODULO=103,h.STOP=106,h.FNC1=207,h.SET_BY_CODE=(t(e={},a,n),t(e,o,r),t(e,s,i),e),h.SWAP={101:n,100:r,99:i},h.A_START_CHAR=`Ð`,h.B_START_CHAR=`Ñ`,h.C_START_CHAR=`Ò`,h.A_CHARS=`[\0-_È-Ï]`,h.B_CHARS=`[ -È-Ï]`,h.C_CHARS=`(Ï*[0-9]{2}Ï*)`,h.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],h}function _(){if(ee)return m;ee=1,Object.defineProperty(m,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=l())&&e.__esModule?e:{default:e},r=g();return m.default=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.substring(1),t));return r.bytes=e.split(``).map(function(e){return e.charCodeAt(0)}),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.bytes,t=e.shift()-105,i=r.SET_BY_CODE[t];if(i===void 0)throw RangeError(`The encoding does not start with a start character.`);!0===this.shouldEncodeAsEan128()&&e.unshift(r.FNC1);var a=n.next(e,1,i);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,``):this.text,data:n.getBar(t)+a.result+n.getBar((a.checksum+t)%r.MODULO)+n.getBar(r.STOP)}}},{key:`shouldEncodeAsEan128`,value:function(){var e=this.options.ean128||!1;return typeof e==`string`&&(e=e.toLowerCase()===`true`),e}}],[{key:`getBar`,value:function(e){return r.BARS[e]?r.BARS[e].toString():``}},{key:`correctIndex`,value:function(e,t){if(t===r.SET_A){var n=e.shift();return n<32?n+64:n-32}return t===r.SET_B?e.shift()-32:10*(e.shift()-48)+e.shift()-48}},{key:`next`,value:function(e,t,i){if(!e.length)return{result:``,checksum:0};var a=void 0,o=void 0;if(e[0]>=200){o=e.shift()-105;var s=r.SWAP[o];s===void 0?(i!==r.SET_A&&i!==r.SET_B||o!==r.SHIFT||(e[0]=i===r.SET_A?e[0]>95?e[0]-96:e[0]:e[0]<32?e[0]+96:e[0]),a=n.next(e,t+1,i)):a=n.next(e,t+1,s)}else o=n.correctIndex(e,i),a=n.next(e,t+1,i);var c=o*t;return{result:n.getBar(o)+a.result,checksum:c+a.checksum}}}]),n}(n.default),m}var te,ne,v={};function re(){if(ne)return p;ne=1,Object.defineProperty(p,"__esModule",{value:!0});var e=n(_()),t=n(function(){if(te)return v;te=1,Object.defineProperty(v,"__esModule",{value:!0});var e=g(),t=function(t){return t.match(RegExp(`^`+e.A_CHARS+`*`))[0].length},n=function(t){return t.match(RegExp(`^`+e.B_CHARS+`*`))[0].length},r=function(t){return t.match(RegExp(`^`+e.C_CHARS+`*`))[0]};function i(t,n){var r=n?e.A_CHARS:e.B_CHARS,o=t.match(RegExp(`^(`+r+`+?)(([0-9]{2}){2,})([^0-9]|$)`));if(o)return o[1]+`Ì`+a(t.substring(o[1].length));var s=t.match(RegExp(`^`+r+`+`))[0];return s.length===t.length?t:s+String.fromCharCode(n?205:206)+i(t.substring(s.length),!n)}function a(e){var a=r(e),o=a.length;if(o===e.length)return e;e=e.substring(o);var s=t(e)>=n(e);return a+String.fromCharCode(s?206:205)+i(e,s)}return v.default=function(o){var s=void 0;if(r(o).length>=2)s=e.C_START_CHAR+a(o);else{var c=t(o)>n(o);s=(c?e.A_START_CHAR:e.B_START_CHAR)+i(o,c)}return s.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(e,t){return`Ë`+t})},v}());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}return p.default=function(e){function n(e,i){if(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),/^[\x00-\x7F\xC8-\xD3]+$/.test(e))var a=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,(0,t.default)(e),i));else a=r(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,i));return r(a)}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),n}(e.default),p}var ie,y={};function ae(){if(ie)return y;ie=1,Object.defineProperty(y,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return y.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.A_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.A_CHARS+`+$`).test(this.data)}}]),n}(n.default),y}var oe,b={};function se(){if(oe)return b;oe=1,Object.defineProperty(b,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return b.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.B_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.B_CHARS+`+$`).test(this.data)}}]),n}(n.default),b}var ce,le,ue={};function de(){if(ce)return ue;ce=1,Object.defineProperty(ue,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=_())&&e.__esModule?e:{default:e},r=g();return ue.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,r.C_START_CHAR+e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return RegExp(`^`+r.C_CHARS+`+$`).test(this.data)}}]),n}(n.default),ue}var fe,x={},pe={},S={};function C(){return fe||(fe=1,Object.defineProperty(S,"__esModule",{value:!0}),S.SIDE_BIN=`101`,S.MIDDLE_BIN=`01010`,S.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`]},S.EAN2_STRUCTURE=[`LL`,`LG`,`GL`,`GG`],S.EAN5_STRUCTURE=[`GGLLL`,`GLGLL`,`GLLGL`,`GLLLG`,`LGGLL`,`LLGGL`,`LLLGG`,`LGLGL`,`LGLLG`,`LLGLG`],S.EAN13_STRUCTURE=[`LLLLLL`,`LLGLGG`,`LLGGLG`,`LLGGGL`,`LGLLGG`,`LGGLLG`,`LGGGLL`,`LGLGLG`,`LGLGGL`,`LGGLGL`]),S}var me,he,ge,w={},T={};function E(){if(me)return T;me=1,Object.defineProperty(T,"__esModule",{value:!0});var e=C();return T.default=function(t,n,r){var i=t.split(``).map(function(t,r){return e.BINARIES[n[r]]}).map(function(e,n){return e?e[t[n]]:``});if(r){var a=t.length-1;i=i.map(function(e,t){return t<a?e+r:e})}return i.join(``)},T}function _e(){if(he)return w;he=1,Object.defineProperty(w,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=r(E());function r(e){return e&&e.__esModule?e:{default:e}}return w.default=function(r){function i(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,i);var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.fontSize=!t.flat&&t.fontSize>10*t.width?10*t.width:t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`encode`,value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:`leftText`,value:function(e,t){return this.text.substr(e,t)}},{key:`leftEncode`,value:function(e,t){return(0,n.default)(e,t)}},{key:`rightText`,value:function(e,t){return this.text.substr(e,t)}},{key:`rightEncode`,value:function(e,t){return(0,n.default)(e,t)}},{key:`encodeGuarded`,value:function(){var e={fontSize:this.fontSize},n={height:this.guardHeight};return[{data:t.SIDE_BIN,options:n},{data:this.leftEncode(),text:this.leftText(),options:e},{data:t.MIDDLE_BIN,options:n},{data:this.rightEncode(),text:this.rightText(),options:e},{data:t.SIDE_BIN,options:n}]}},{key:`encodeFlat`,value:function(){return{data:[t.SIDE_BIN,this.leftEncode(),t.MIDDLE_BIN,this.rightEncode(),t.SIDE_BIN].join(``),text:this.text}}}]),i}(r(l()).default),w}function ve(){if(ge)return pe;ge=1,Object.defineProperty(pe,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}if(`value`in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(r)},r=C(),i=(e=_e())&&e.__esModule?e:{default:e},a=function(e){return(10-e.substr(0,12).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+3*t:e+t},0)%10)%10};return pe.default=function(e){function i(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,i),e.search(/^[0-9]{12}$/)!==-1&&(e+=a(e));var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t));return n.lastChar=t.lastChar,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,e),t(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{13}$/)!==-1&&+this.data[12]===a(this.data)}},{key:`leftText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftText`,this).call(this,1,6)}},{key:`leftEncode`,value:function(){var e=this.data.substr(1,6),t=r.EAN13_STRUCTURE[this.data[0]];return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`leftEncode`,this).call(this,e,t)}},{key:`rightText`,value:function(){return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightText`,this).call(this,7,6)}},{key:`rightEncode`,value:function(){var e=this.data.substr(7,6);return n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`rightEncode`,this).call(this,e,`RRRRRR`)}},{key:`encodeGuarded`,value:function(){var e=n(i.prototype.__proto__||Object.getPrototypeOf(i.prototype),`encodeGuarded`,this).call(this);return this.options.displayValue&&(e.unshift({data:`000000000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),this.options.lastChar&&(e.push({data:`00`}),e.push({data:`00000`,text:this.options.lastChar,options:{fontSize:this.fontSize}}))),e}}]),i}(i.default),pe}var ye,D={};function be(){if(ye)return D;ye=1,Object.defineProperty(D,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function e(t,n,r){t===null&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(i===void 0){var a=Object.getPrototypeOf(t);return a===null?void 0:e(a,n,r)}if(`value`in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(r)},r=(e=_e())&&e.__esModule?e:{default:e},i=function(e){return(10-e.substr(0,7).split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+t:e+3*t},0)%10)%10};return D.default=function(e){function r(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),e.search(/^[0-9]{7}$/)!==-1&&(e+=i(e)),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{8}$/)!==-1&&+this.data[7]===i(this.data)}},{key:`leftText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftText`,this).call(this,0,4)}},{key:`leftEncode`,value:function(){var e=this.data.substr(0,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`leftEncode`,this).call(this,e,`LLLL`)}},{key:`rightText`,value:function(){return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightText`,this).call(this,4,4)}},{key:`rightEncode`,value:function(){var e=this.data.substr(4,4);return n(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),`rightEncode`,this).call(this,e,`RRRR`)}}]),r}(r.default),D}var xe,O={};function Se(){if(xe)return O;xe=1,Object.defineProperty(O,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=i(E()),r=i(l());function i(e){return e&&e.__esModule?e:{default:e}}return O.default=function(r){function i(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{5}$/)!==-1}},{key:`encode`,value:function(){var e,r=t.EAN5_STRUCTURE[e=this.data,e.split(``).map(function(e){return+e}).reduce(function(e,t,n){return n%2?e+9*t:e+3*t},0)%10];return{data:`1011`+(0,n.default)(this.data,r,`01`),text:this.text}}}]),i}(r.default),O}var Ce,k={};function we(){if(Ce)return k;Ce=1,Object.defineProperty(k,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=C(),n=r(E());function r(e){return e&&e.__esModule?e:{default:e}}return k.default=function(r){function i(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,i),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(i.__proto__||Object.getPrototypeOf(i)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(i,r),e(i,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{2}$/)!==-1}},{key:`encode`,value:function(){var e=t.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:`1011`+(0,n.default)(this.data,e,`01`),text:this.text}}}]),i}(r(l()).default),k}var Te,A={};function Ee(){if(Te)return A;Te=1,Object.defineProperty(A,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();A.checksum=i;var t=n(E());function n(e){return e&&e.__esModule?e:{default:e}}var r=function(n){function r(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,r),e.search(/^[0-9]{11}$/)!==-1&&(e+=i(e));var n=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));return n.displayValue=t.displayValue,t.fontSize>10*t.width?n.fontSize=10*t.width:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),e(r,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{12}$/)!==-1&&this.data[11]==i(this.data)}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=(0,t.default)(this.data.substr(0,6),`LLLLLL`),e+=`01010`,e+=(0,t.default)(this.data.substr(6,6),`RRRRRR`),{data:e+=`101`,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text.substr(0,1),options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`+(0,t.default)(this.data[0],`L`),options:{height:this.guardHeight}}),e.push({data:(0,t.default)(this.data.substr(1,5),`LLLLL`),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:`01010`,options:{height:this.guardHeight}}),e.push({data:(0,t.default)(this.data.substr(6,5),`RRRRR`),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:(0,t.default)(this.data[11],`R`)+`101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text.substr(11,1),options:{textAlign:`right`,fontSize:this.fontSize}}),e}}]),r}(n(l()).default);function i(e){var t,n=0;for(t=1;t<11;t+=2)n+=parseInt(e[t]);for(t=0;t<11;t+=2)n+=3*parseInt(e[t]);return(10-n%10)%10}return A.default=r,A}var De,Oe,j={};function ke(){if(De)return j;De=1,Object.defineProperty(j,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),t=i(E()),n=i(l()),r=Ee();function i(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}var o=[`XX00000XXX`,`XX10000XXX`,`XX20000XXX`,`XXX00000XX`,`XXXX00000X`,`XXXXX00005`,`XXXXX00006`,`XXXXX00007`,`XXXXX00008`,`XXXXX00009`],s=[[`EEEOOO`,`OOOEEE`],[`EEOEOO`,`OOEOEE`],[`EEOOEO`,`OOEEOE`],[`EEOOOE`,`OOEEEO`],[`EOEEOO`,`OEOOEE`],[`EOOEEO`,`OEEOOE`],[`EOOOEE`,`OEEEOO`],[`EOEOEO`,`OEOEOE`],[`EOEOOE`,`OEOEEO`],[`EOOEOE`,`OEEOEO`]],c=function(n){function r(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,r);var n=a(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t));if(n.isValid=!1,e.search(/^[0-9]{6}$/)!==-1)n.middleDigits=e,n.upcA=u(e,`0`),n.text=t.text||``+n.upcA[0]+e+n.upcA[n.upcA.length-1],n.isValid=!0;else{if(e.search(/^[01][0-9]{7}$/)===-1||(n.middleDigits=e.substring(1,e.length-1),n.upcA=u(n.middleDigits,e[0]),n.upcA[n.upcA.length-1]!==e[e.length-1]))return a(n);n.isValid=!0}return n.displayValue=t.displayValue,t.fontSize>10*t.width?n.fontSize=10*t.width:n.fontSize=t.fontSize,n.guardHeight=t.height+n.fontSize/2+t.textMargin,n}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,n),e(r,[{key:`valid`,value:function(){return this.isValid}},{key:`encode`,value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:`flatEncoding`,value:function(){var e=``;return e+=`101`,e+=this.encodeMiddleDigits(),{data:e+=`010101`,text:this.text}}},{key:`guardedEncoding`,value:function(){var e=[];return this.displayValue&&e.push({data:`00000000`,text:this.text[0],options:{textAlign:`left`,fontSize:this.fontSize}}),e.push({data:`101`,options:{height:this.guardHeight}}),e.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),e.push({data:`010101`,options:{height:this.guardHeight}}),this.displayValue&&e.push({data:`00000000`,text:this.text[7],options:{textAlign:`right`,fontSize:this.fontSize}}),e}},{key:`encodeMiddleDigits`,value:function(){var e=this.upcA[0],n=this.upcA[this.upcA.length-1],r=s[parseInt(n)][parseInt(e)];return(0,t.default)(this.middleDigits,r)}}]),r}(n.default);function u(e,t){for(var n=o[parseInt(e[e.length-1])],i=``,a=0,s=0;s<n.length;s++){var c=n[s];i+=c===`X`?e[a++]:c}return(i=``+t+i)+(0,r.checksum)(i)}return j.default=c,j}var Ae,je,M={},N={},P={};function Me(){if(je)return N;je=1,Object.defineProperty(N,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(Ae||(Ae=1,Object.defineProperty(P,"__esModule",{value:!0}),P.START_BIN=`1010`,P.END_BIN=`11101`,P.BINARIES=[`00110`,`10001`,`01001`,`11000`,`00101`,`10100`,`01100`,`00011`,`10010`,`01010`]),P);return N.default=function(e){function r(){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return this.data.search(/^([0-9]{2})+$/)!==-1}},{key:`encode`,value:function(){var e=this,t=this.data.match(/.{2}/g).map(function(t){return e.encodePair(t)}).join(``);return{data:n.START_BIN+t+n.END_BIN,text:this.text}}},{key:`encodePair`,value:function(e){var t=n.BINARIES[e[1]];return n.BINARIES[e[0]].split(``).map(function(e,n){return(e===`1`?`111`:`1`)+(t[n]===`1`?`000`:`0`)}).join(``)}}]),r}(((e=l())&&e.__esModule?e:{default:e}).default),N}var Ne,Pe,F={};function Fe(){if(Ne)return F;Ne=1,Object.defineProperty(F,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=Me())&&e.__esModule?e:{default:e},r=function(e){var t=e.substr(0,13).split(``).map(function(e){return parseInt(e,10)}).reduce(function(e,t,n){return e+t*(3-n%2*2)},0);return 10*Math.ceil(t/10)-t};return F.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),e.search(/^[0-9]{13}$/)!==-1&&(e+=r(e)),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return this.data.search(/^[0-9]{14}$/)!==-1&&+this.data[13]===r(this.data)}}]),n}(n.default),F}var Ie,I={},L={};function R(){if(Ie)return L;Ie=1,Object.defineProperty(L,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=`110`,t=0;t<this.data.length;t++){var n=parseInt(this.data[t]).toString(2);n=r(n,4-n.length);for(var i=0;i<n.length;i++)e+=n[i]==`0`?`100`:`110`}return{data:e+=`1001`,text:this.text}}},{key:`valid`,value:function(){return this.data.search(/^[0-9]+$/)!==-1}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default);function r(e,t){for(var n=0;n<t;n++)e=`0`+e;return e}return L.default=n,L}var Le,Re,z={},B={};function V(){return Le?B:(Le=1,Object.defineProperty(B,"__esModule",{value:!0}),B.mod10=function(e){for(var t=0,n=0;n<e.length;n++){var r=parseInt(e[n]);(n+e.length)%2==0?t+=r:t+=2*r%10+Math.floor(2*r/10)}return(10-t%10)%10},B.mod11=function(e){for(var t=0,n=[2,3,4,5,6,7],r=0;r<e.length;r++){var i=parseInt(e[e.length-1-r]);t+=n[r%n.length]*i}return(11-t%11)%11},B)}function ze(){if(Re)return z;Re=1,Object.defineProperty(z,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return z.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod10)(e),r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),z}var Be,H={};function Ve(){if(Be)return H;Be=1,Object.defineProperty(H,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return H.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e+(0,n.mod11)(e),r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),H}var He,U={};function Ue(){if(He)return U;He=1,Object.defineProperty(U,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return U.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),e+=(0,n.mod10)(e),e+=(0,n.mod10)(e),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),U}var We,Ge,Ke={};function qe(){if(We)return Ke;We=1,Object.defineProperty(Ke,"__esModule",{value:!0});var e,t=(e=R())&&e.__esModule?e:{default:e},n=V();return Ke.default=function(e){function t(e,r){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,t),e+=(0,n.mod11)(e),e+=(0,n.mod10)(e),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(t.default),Ke}var Je,W={};function Ye(){if(Je)return W;Je=1,Object.defineProperty(W,"__esModule",{value:!0}),W.pharmacode=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return W.pharmacode=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));return r.number=parseInt(e,10),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){for(var e=this.number,t=``;!isNaN(e)&&e!=0;)e%2==0?(t=`11100`+t,e=(e-2)/2):(t=`100`+t,e=(e-1)/2);return{data:t=t.slice(0,-2),text:this.text}}},{key:`valid`,value:function(){return this.number>=3&&this.number<=131070}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),W}var Xe,G={};function Ze(){if(Xe)return G;Xe=1,Object.defineProperty(G,"__esModule",{value:!0}),G.codabar=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return G.codabar=function(e){function n(e,t){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,n),e.search(/^[0-9\-\$\:\.\+\/]+$/)===0&&(e=`A`+e+`A`);var r=function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.toUpperCase(),t));return r.text=r.options.text||r.text.replace(/[A-D]/g,``),r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)!==-1}},{key:`encode`,value:function(){for(var e=[],t=this.getEncodings(),n=0;n<this.data.length;n++)e.push(t[this.data.charAt(n)]),n!==this.data.length-1&&e.push(`0`);return{text:this.text,data:e.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`}}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),G}var Qe,$e,K={},q={},J={};function et(){if($e)return q;$e=1,Object.defineProperty(q,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(Qe||(Qe=1,Object.defineProperty(J,"__esModule",{value:!0}),J.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,-,., ,$,/,+,%,($),(%),(/),(+),ÿ`.split(`,`),J.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`.split(`.`),J.MULTI_SYMBOLS={"\0":[`(%)`,`U`],"":[`($)`,`A`],"":[`($)`,`B`],"":[`($)`,`C`],"":[`($)`,`D`],"":[`($)`,`E`],"":[`($)`,`F`],"\x07":[`($)`,`G`],"\b":[`($)`,`H`]," ":[`($)`,`I`],"\n":[`($)`,`J`],"\v":[`($)`,`K`],"\f":[`($)`,`L`],"\r":[`($)`,`M`],"":[`($)`,`N`],"":[`($)`,`O`],"":[`($)`,`P`],"":[`($)`,`Q`],"":[`($)`,`R`],"":[`($)`,`S`],"":[`($)`,`T`],"":[`($)`,`U`],"":[`($)`,`V`],"":[`($)`,`W`],"":[`($)`,`X`],"":[`($)`,`Y`],"":[`($)`,`Z`],"\x1B":[`(%)`,`A`],"":[`(%)`,`B`],"":[`(%)`,`C`],"":[`(%)`,`D`],"":[`(%)`,`E`],"!":[`(/)`,`A`],'"':[`(/)`,`B`],"#":[`(/)`,`C`],"&":[`(/)`,`F`],"'":[`(/)`,`G`],"(":[`(/)`,`H`],")":[`(/)`,`I`],"*":[`(/)`,`J`],",":[`(/)`,`L`],":":[`(/)`,`Z`],";":[`(%)`,`F`],"<":[`(%)`,`G`],"=":[`(%)`,`H`],">":[`(%)`,`I`],"?":[`(%)`,`J`],"@":[`(%)`,`V`],"[":[`(%)`,`K`],"\\":[`(%)`,`L`],"]":[`(%)`,`M`],"^":[`(%)`,`N`],_:[`(%)`,`O`],"`":[`(%)`,`W`],a:[`(+)`,`A`],b:[`(+)`,`B`],c:[`(+)`,`C`],d:[`(+)`,`D`],e:[`(+)`,`E`],f:[`(+)`,`F`],g:[`(+)`,`G`],h:[`(+)`,`H`],i:[`(+)`,`I`],j:[`(+)`,`J`],k:[`(+)`,`K`],l:[`(+)`,`L`],m:[`(+)`,`M`],n:[`(+)`,`N`],o:[`(+)`,`O`],p:[`(+)`,`P`],q:[`(+)`,`Q`],r:[`(+)`,`R`],s:[`(+)`,`S`],t:[`(+)`,`T`],u:[`(+)`,`U`],v:[`(+)`,`V`],w:[`(+)`,`W`],x:[`(+)`,`X`],y:[`(+)`,`Y`],z:[`(+)`,`Z`],"{":[`(%)`,`P`],"|":[`(%)`,`Q`],"}":[`(%)`,`R`],"~":[`(%)`,`S`],"":[`(%)`,`T`]}),J);return q.default=function(e){function r(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,r),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),t(r,[{key:`valid`,value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:`encode`,value:function(){var e=this.data.split(``).flatMap(function(e){return n.MULTI_SYMBOLS[e]||e}),t=e.map(function(e){return r.getEncoding(e)}).join(``),i=r.checksum(e,20),a=r.checksum(e.concat(i),15);return{text:this.text,data:r.getEncoding(`ÿ`)+t+r.getEncoding(i)+r.getEncoding(a)+r.getEncoding(`ÿ`)+`1`}}}],[{key:`getEncoding`,value:function(e){return n.BINARIES[r.symbolValue(e)]}},{key:`getSymbol`,value:function(e){return n.SYMBOLS[e]}},{key:`symbolValue`,value:function(e){return n.SYMBOLS.indexOf(e)}},{key:`checksum`,value:function(e,t){var n=e.slice().reverse().reduce(function(e,n,i){var a=i%t+1;return e+r.symbolValue(n)*a},0);return r.getSymbol(n%47)}}]),r}(((e=l())&&e.__esModule?e:{default:e}).default),q}var tt,nt,Y={};function rt(){if(tt)return Y;tt=1,Object.defineProperty(Y,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Y.default=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`valid`,value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),n}(((e=et())&&e.__esModule?e:{default:e}).default),Y}var it,at,X={};function ot(){if(it)return X;it=1,Object.defineProperty(X,"__esModule",{value:!0}),X.GenericBarcode=void 0;var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return X.GenericBarcode=function(e){function n(e,t){return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),function(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,e),t(n,[{key:`encode`,value:function(){return{data:`10101010101010101010101010101010101010101`,text:this.text}}},{key:`valid`,value:function(){return!0}}]),n}(((e=l())&&e.__esModule?e:{default:e}).default),X}function st(){if(at)return o;at=1,Object.defineProperty(o,"__esModule",{value:!0});var e=u(),t=function(){if(le)return f;le=1,Object.defineProperty(f,"__esModule",{value:!0}),f.CODE128C=f.CODE128B=f.CODE128A=f.CODE128=void 0;var e=i(re()),t=i(ae()),n=i(se()),r=i(de());function i(e){return e&&e.__esModule?e:{default:e}}return f.CODE128=e.default,f.CODE128A=t.default,f.CODE128B=n.default,f.CODE128C=r.default,f}(),n=function(){if(Oe)return x;Oe=1,Object.defineProperty(x,"__esModule",{value:!0}),x.UPCE=x.UPC=x.EAN2=x.EAN5=x.EAN8=x.EAN13=void 0;var e=o(ve()),t=o(be()),n=o(Se()),r=o(we()),i=o(Ee()),a=o(ke());function o(e){return e&&e.__esModule?e:{default:e}}return x.EAN13=e.default,x.EAN8=t.default,x.EAN5=n.default,x.EAN2=r.default,x.UPC=i.default,x.UPCE=a.default,x}(),r=function(){if(Pe)return M;Pe=1,Object.defineProperty(M,"__esModule",{value:!0}),M.ITF14=M.ITF=void 0;var e=n(Me()),t=n(Fe());function n(e){return e&&e.__esModule?e:{default:e}}return M.ITF=e.default,M.ITF14=t.default,M}(),i=function(){if(Ge)return I;Ge=1,Object.defineProperty(I,"__esModule",{value:!0}),I.MSI1110=I.MSI1010=I.MSI11=I.MSI10=I.MSI=void 0;var e=a(R()),t=a(ze()),n=a(Ve()),r=a(Ue()),i=a(qe());function a(e){return e&&e.__esModule?e:{default:e}}return I.MSI=e.default,I.MSI10=t.default,I.MSI11=n.default,I.MSI1010=r.default,I.MSI1110=i.default,I}(),a=Ye(),s=Ze(),c=function(){if(nt)return K;nt=1,Object.defineProperty(K,"__esModule",{value:!0}),K.CODE93FullASCII=K.CODE93=void 0;var e=n(et()),t=n(rt());function n(e){return e&&e.__esModule?e:{default:e}}return K.CODE93=e.default,K.CODE93FullASCII=t.default,K}(),l=ot();return o.default={CODE39:e.CODE39,CODE128:t.CODE128,CODE128A:t.CODE128A,CODE128B:t.CODE128B,CODE128C:t.CODE128C,EAN13:n.EAN13,EAN8:n.EAN8,EAN5:n.EAN5,EAN2:n.EAN2,UPC:n.UPC,UPCE:n.UPCE,ITF14:r.ITF14,ITF:r.ITF,MSI:i.MSI,MSI10:i.MSI10,MSI11:i.MSI11,MSI1010:i.MSI1010,MSI1110:i.MSI1110,pharmacode:a.pharmacode,codabar:s.codabar,CODE93:c.CODE93,CODE93FullASCII:c.CODE93FullASCII,GenericBarcode:l.GenericBarcode},o}var ct,lt={};function ut(){if(ct)return lt;ct=1,Object.defineProperty(lt,"__esModule",{value:!0});var e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};return lt.default=function(t,n){return e({},t,n)},lt}var dt,ft={},pt,mt={},ht,gt={},_t={},vt={};function yt(){return ht?vt:(ht=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.default=function(e){var t=[`width`,`height`,`textMargin`,`fontSize`,`margin`,`marginTop`,`marginBottom`,`marginLeft`,`marginRight`];for(var n in t)t.hasOwnProperty(n)&&typeof e[n=t[n]]==`string`&&(e[n]=parseInt(e[n],10));return typeof e.displayValue==`string`&&(e.displayValue=e.displayValue!=`false`),e},vt)}var bt,xt,St={};function Ct(){return bt?St:(bt=1,Object.defineProperty(St,"__esModule",{value:!0}),St.default={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(){}},St)}var wt,Tt,Et={},Dt={},Z={};function Ot(){if(wt)return Z;wt=1,Object.defineProperty(Z,"__esModule",{value:!0}),Z.getTotalWidthOfEncodings=Z.calculateEncodingAttributes=Z.getBarcodePadding=Z.getEncodingHeight=Z.getMaximumHeightOfEncodings=void 0;var e,t=(e=ut())&&e.__esModule?e:{default:e};function n(e,t){return t.height+(t.displayValue&&e.text.length>0?t.fontSize+t.textMargin:0)+t.marginTop+t.marginBottom}function r(e,t,n){if(n.displayValue&&t<e){if(n.textAlign==`center`)return Math.floor((e-t)/2);if(n.textAlign==`left`)return 0;if(n.textAlign==`right`)return Math.floor(e-t)}return 0}function i(e,t,n){var r;if(n)r=n;else{if(typeof document>`u`)return 0;r=document.createElement(`canvas`).getContext(`2d`)}r.font=t.fontOptions+` `+t.fontSize+`px `+t.font;var i=r.measureText(e);return i?i.width:0}return Z.getMaximumHeightOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)e[n].height>t&&(t=e[n].height);return t},Z.getEncodingHeight=n,Z.getBarcodePadding=r,Z.calculateEncodingAttributes=function(e,a,o){for(var s=0;s<e.length;s++){var c,l=e[s],u=(0,t.default)(a,l.options);c=u.displayValue?i(l.text,u,o):0;var d=l.data.length*u.width;l.width=Math.ceil(Math.max(c,d)),l.height=n(l,u),l.barcodePadding=r(c,d,u)}},Z.getTotalWidthOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n].width;return t},Z}function kt(){if(Tt)return Dt;Tt=1,Object.defineProperty(Dt,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=ut())&&e.__esModule?e:{default:e},r=Ot();return Dt.default=function(){function e(t,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.canvas=t,this.encodings=n,this.options=r}return t(e,[{key:`render`,value:function(){if(!this.canvas.getContext)throw Error(`The browser does not support canvas.`);this.prepareCanvas();for(var e=0;e<this.encodings.length;e++){var t=(0,n.default)(this.options,this.encodings[e].options);this.drawCanvasBarcode(t,this.encodings[e]),this.drawCanvasText(t,this.encodings[e]),this.moveCanvasDrawing(this.encodings[e])}this.restoreCanvas()}},{key:`prepareCanvas`,value:function(){var e=this.canvas.getContext(`2d`);e.save(),(0,r.calculateEncodingAttributes)(this.encodings,this.options,e);var t=(0,r.getTotalWidthOfEncodings)(this.encodings),n=(0,r.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=t+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,e.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(e.fillStyle=this.options.background,e.fillRect(0,0,this.canvas.width,this.canvas.height)),e.translate(this.options.marginLeft,0)}},{key:`drawCanvasBarcode`,value:function(e,t){var n,r=this.canvas.getContext(`2d`),i=t.data;n=e.textPosition==`top`?e.marginTop+e.fontSize+e.textMargin:e.marginTop,r.fillStyle=e.lineColor;for(var a=0;a<i.length;a++){var o=a*e.width+t.barcodePadding;i[a]===`1`?r.fillRect(o,n,e.width,e.height):i[a]&&r.fillRect(o,n,e.width,e.height*i[a])}}},{key:`drawCanvasText`,value:function(e,t){var n,r,i=this.canvas.getContext(`2d`),a=e.fontOptions+` `+e.fontSize+`px `+e.font;e.displayValue&&(r=e.textPosition==`top`?e.marginTop+e.fontSize-e.textMargin:e.height+e.textMargin+e.marginTop+e.fontSize,i.font=a,e.textAlign==`left`||t.barcodePadding>0?(n=0,i.textAlign=`left`):e.textAlign==`right`?(n=t.width-1,i.textAlign=`right`):(n=t.width/2,i.textAlign=`center`),i.fillText(t.text,n,r))}},{key:`moveCanvasDrawing`,value:function(e){this.canvas.getContext(`2d`).translate(e.width,0)}},{key:`restoreCanvas`,value:function(){this.canvas.getContext(`2d`).restore()}}]),e}(),Dt}var At,jt={};function Mt(){if(At)return jt;At=1,Object.defineProperty(jt,"__esModule",{value:!0});var e,t=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),n=(e=ut())&&e.__esModule?e:{default:e},r=Ot(),i=`http://www.w3.org/2000/svg`;return jt.default=function(){function e(t,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,e),this.svg=t,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return t(e,[{key:`render`,value:function(){var e=this.options.marginLeft;this.prepareSVG();for(var t=0;t<this.encodings.length;t++){var r=this.encodings[t],i=(0,n.default)(this.options,r.options),a=this.createGroup(e,i.marginTop,this.svg);this.setGroupOptions(a,i),this.drawSvgBarcode(a,i,r),this.drawSVGText(a,i,r),e+=r.width}}},{key:`prepareSVG`,value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,r.calculateEncodingAttributes)(this.encodings,this.options);var e=(0,r.getTotalWidthOfEncodings)(this.encodings),t=(0,r.getMaximumHeightOfEncodings)(this.encodings),n=e+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,t),this.options.background&&this.drawRect(0,0,n,t,this.svg).setAttribute(`fill`,this.options.background)}},{key:`drawSvgBarcode`,value:function(e,t,n){var r,i=n.data;r=t.textPosition==`top`?t.fontSize+t.textMargin:0;for(var a=0,o=0,s=0;s<i.length;s++)o=s*t.width+n.barcodePadding,i[s]===`1`?a++:a>0&&(this.drawRect(o-t.width*a,r,t.width*a,t.height,e),a=0);a>0&&this.drawRect(o-t.width*(a-1),r,t.width*a,t.height,e)}},{key:`drawSVGText`,value:function(e,t,n){var r,a,o=this.document.createElementNS(i,`text`);t.displayValue&&(o.setAttribute(`font-family`,t.font),o.setAttribute(`font-size`,t.fontSize),t.fontOptions.includes(`bold`)&&o.setAttribute(`font-weight`,`bold`),t.fontOptions.includes(`italic`)&&o.setAttribute(`font-style`,`italic`),a=t.textPosition==`top`?t.fontSize-t.textMargin:t.height+t.textMargin+t.fontSize,t.textAlign==`left`||n.barcodePadding>0?(r=0,o.setAttribute(`text-anchor`,`start`)):t.textAlign==`right`?(r=n.width-1,o.setAttribute(`text-anchor`,`end`)):(r=n.width/2,o.setAttribute(`text-anchor`,`middle`)),o.setAttribute(`x`,r),o.setAttribute(`y`,a),o.appendChild(this.document.createTextNode(n.text)),e.appendChild(o))}},{key:`setSvgAttributes`,value:function(e,t){var n=this.svg;n.setAttribute(`width`,e+`px`),n.setAttribute(`height`,t+`px`),n.setAttribute(`x`,`0px`),n.setAttribute(`y`,`0px`),n.setAttribute(`viewBox`,`0 0 `+e+` `+t),n.setAttribute(`xmlns`,i),n.setAttribute(`version`,`1.1`)}},{key:`createGroup`,value:function(e,t,n){var r=this.document.createElementNS(i,`g`);return r.setAttribute(`transform`,`translate(`+e+`, `+t+`)`),n.appendChild(r),r}},{key:`setGroupOptions`,value:function(e,t){e.setAttribute(`fill`,t.lineColor)}},{key:`drawRect`,value:function(e,t,n,r,a){var o=this.document.createElementNS(i,`rect`);return o.setAttribute(`x`,e),o.setAttribute(`y`,t),o.setAttribute(`width`,n),o.setAttribute(`height`,r),a.appendChild(o),o}}]),e}(),jt}var Nt,Pt,Q={};function Ft(){if(Nt)return Q;Nt=1,Object.defineProperty(Q,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Q.default=function(){function t(e,n,r){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,t),this.object=e,this.encodings=n,this.options=r}return e(t,[{key:`render`,value:function(){this.object.encodings=this.encodings}}]),t}(),Q}var It,Lt,$={};function Rt(){if(It)return $;function e(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function t(e,t){if(!e)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return!t||typeof t!=`object`&&typeof t!=`function`?e:t}function n(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function, not `+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}It=1,Object.defineProperty($,"__esModule",{value:!0});var r=function(){function r(n,i){e(this,r);var a=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return a.name=`InvalidInputException`,a.symbology=n,a.input=i,a.message=`"`+a.input+`" is not a valid input for `+a.symbology,a}return n(r,Error),r}(),i=function(){function r(){e(this,r);var n=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.name=`InvalidElementException`,n.message=`Not supported type to render on`,n}return n(r,Error),r}(),a=function(){function r(){e(this,r);var n=t(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.name=`NoElementException`,n.message=`No element to render on.`,n}return n(r,Error),r}();return $.InvalidInputException=r,$.InvalidElementException=i,$.NoElementException=a,$}function zt(){if(Lt)return gt;Lt=1,Object.defineProperty(gt,"__esModule",{value:!0});var e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t=i(function(){if(xt)return _t;xt=1,Object.defineProperty(_t,"__esModule",{value:!0});var e=n(yt()),t=n(Ct());function n(e){return e&&e.__esModule?e:{default:e}}return _t.default=function(n){var r={};for(var i in t.default)t.default.hasOwnProperty(i)&&(n.hasAttribute(`jsbarcode-`+i.toLowerCase())&&(r[i]=n.getAttribute(`jsbarcode-`+i.toLowerCase())),n.hasAttribute(`data-`+i.toLowerCase())&&(r[i]=n.getAttribute(`data-`+i.toLowerCase())));return r.value=n.getAttribute(`jsbarcode-value`)||n.getAttribute(`data-value`),(0,e.default)(r)},_t}()),n=i(function(){if(Pt)return Et;Pt=1,Object.defineProperty(Et,"__esModule",{value:!0});var e=r(kt()),t=r(Mt()),n=r(Ft());function r(e){return e&&e.__esModule?e:{default:e}}return Et.default={CanvasRenderer:e.default,SVGRenderer:t.default,ObjectRenderer:n.default},Et}()),r=Rt();function i(e){return e&&e.__esModule?e:{default:e}}function a(i){if(typeof i==`string`)return function(e){var t=document.querySelectorAll(e);if(t.length!==0){for(var n=[],r=0;r<t.length;r++)n.push(a(t[r]));return n}}(i);if(Array.isArray(i)){for(var o=[],s=0;s<i.length;s++)o.push(a(i[s]));return o}if(typeof HTMLCanvasElement<`u`&&i instanceof HTMLImageElement)return function(e){var r=document.createElement(`canvas`);return{element:r,options:(0,t.default)(e),renderer:n.default.CanvasRenderer,afterRender:function(){e.setAttribute(`src`,r.toDataURL())}}}(i);if(i&&i.nodeName&&i.nodeName.toLowerCase()===`svg`||typeof SVGElement<`u`&&i instanceof SVGElement)return{element:i,options:(0,t.default)(i),renderer:n.default.SVGRenderer};if(typeof HTMLCanvasElement<`u`&&i instanceof HTMLCanvasElement)return{element:i,options:(0,t.default)(i),renderer:n.default.CanvasRenderer};if(i&&i.getContext)return{element:i,renderer:n.default.CanvasRenderer};if(i&&(i===void 0?`undefined`:e(i))===`object`&&!i.nodeName)return{element:i,renderer:n.default.ObjectRenderer};throw new r.InvalidElementException}return gt.default=a,gt}var Bt,Vt,Ht,Ut={};function Wt(){if(Bt)return Ut;Bt=1,Object.defineProperty(Ut,"__esModule",{value:!0});var e=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();return Ut.default=function(){function t(e){(function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)})(this,t),this.api=e}return e(t,[{key:`handleCatch`,value:function(e){if(e.name!==`InvalidInputException`)throw e;if(this.api._options.valid===this.api._defaults.valid)throw e.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:`wrapBarcodeCall`,value:function(e){try{var t=e.apply(void 0,arguments);return this.api._options.valid(!0),t}catch(e){return this.handleCatch(e),this.api}}}]),t}(),Ut}var Gt=r.i(function(){if(Ht)return Vt;Ht=1;var e=l(st()),t=l(ut()),n=l((dt||(dt=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.default=function(e){var t=[];return function e(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)e(n[r]);else n.text=n.text||``,n.data=n.data||``,t.push(n)}(e),t}),ft)),r=l((pt||(pt=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.default=function(e){return e.marginTop=e.marginTop||e.margin,e.marginBottom=e.marginBottom||e.margin,e.marginRight=e.marginRight||e.margin,e.marginLeft=e.marginLeft||e.margin,e}),mt)),i=l(zt()),a=l(yt()),o=l(Wt()),s=Rt(),c=l(Ct());function l(e){return e&&e.__esModule?e:{default:e}}var u=function(){},d=function(e,t,n){var r=new u;if(e===void 0)throw Error(`No element to render on was provided.`);return r._renderProperties=(0,i.default)(e),r._encodings=[],r._options=c.default,r._errorHandler=new o.default(r),t!==void 0&&((n||={}).format||(n.format=m()),r.options(n)[n.format](t,n).render()),r};for(var ee in d.getModule=function(t){return e.default[t]},e.default)e.default.hasOwnProperty(ee)&&f(e.default,ee);function f(e,n){u.prototype[n]=u.prototype[n.toUpperCase()]=u.prototype[n.toLowerCase()]=function(r,i){var o=this;return o._errorHandler.wrapBarcodeCall(function(){i.text=i.text===void 0?void 0:``+i.text;var s=(0,t.default)(o._options,i);s=(0,a.default)(s);var c=e[n],l=p(r,c,s);return o._encodings.push(l),o})}}function p(e,r,i){var a=new r(e=``+e,i);if(!a.valid())throw new s.InvalidInputException(a.constructor.name,e);var o=a.encode();o=(0,n.default)(o);for(var c=0;c<o.length;c++)o[c].options=(0,t.default)(i,o[c].options);return o}function m(){return e.default.CODE128?`CODE128`:Object.keys(e.default)[0]}function h(e,i,a){i=(0,n.default)(i);for(var o=0;o<i.length;o++)i[o].options=(0,t.default)(a,i[o].options),(0,r.default)(i[o].options);(0,r.default)(a),new e.renderer(e.element,i,a).render(),e.afterRender&&e.afterRender()}return u.prototype.options=function(e){return this._options=(0,t.default)(this._options,e),this},u.prototype.blank=function(e){var t=Array(e+1).join(`0`);return this._encodings.push({data:t}),this},u.prototype.init=function(){var n;if(this._renderProperties)for(var r in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){n=this._renderProperties[r];var i=(0,t.default)(this._options,n.options);i.format==`auto`&&(i.format=m()),this._errorHandler.wrapBarcodeCall(function(){var t=p(i.value,e.default[i.format.toUpperCase()],i);h(n,t,i)})}},u.prototype.render=function(){if(!this._renderProperties)throw new s.NoElementException;if(Array.isArray(this._renderProperties))for(var e=0;e<this._renderProperties.length;e++)h(this._renderProperties[e],this._encodings,this._options);else h(this._renderProperties,this._encodings,this._options);return this},u.prototype._defaults=c.default,typeof window<`u`&&(window.JsBarcode=d),typeof jQuery<`u`&&(jQuery.fn.JsBarcode=function(e,t){var n=[];return jQuery(this).each(function(){n.push(this)}),d(n,e,t)}),Vt=d}());t.J=Object.freeze({__proto__:null,default:Gt})});
|