@txgw/payout-components 1.1.4 → 1.2.1
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/dist/{AMIS-Bq2mkXpj.js → AMIS-yQ-qSYx6.js} +1 -1
- package/dist/Action-O_zoRC90.js +1 -0
- package/dist/{Alert-D7dRg-Pn.js → Alert-M2uguZ2-.js} +1 -1
- package/dist/{AnchorNav-BkHVvty5.js → AnchorNav-CLxVBebc.js} +1 -1
- package/dist/App-DCX5cbgG.js +1 -0
- package/dist/Audio-DHE_mJFM.js +1 -0
- package/dist/{Avatar-DJxuYka5.js → Avatar-BcduLEa3.js} +1 -1
- package/dist/BarCode-CGrg59dd.js +1 -0
- package/dist/{BarCode-DhOaTHVR.js → BarCode-uhJMrOnK.js} +1 -1
- package/dist/{Breadcrumb-Wrkvuo-D.js → Breadcrumb-Bu2GK1JP.js} +1 -1
- package/dist/ButtonGroup-DlC6ck_w.js +1 -0
- package/dist/{ButtonGroupSelect-BUdkI9ab.js → ButtonGroupSelect-e98karBC.js} +1 -1
- package/dist/{ButtonToolbar-D2UKzr3I.js → ButtonToolbar-CVU9Sl3O.js} +1 -1
- package/dist/CRUD-BC-reZZf.js +1 -0
- package/dist/CRUD2-FL2Lf3lg.js +1 -0
- package/dist/{Calendar-Cw4oMOLN.js → Calendar-nMyeGsYx.js} +1 -1
- package/dist/Card-CXEqDE1b.js +1 -0
- package/dist/{Card2-nWNx9EJj.js → Card2-Clwjsydz.js} +1 -1
- package/dist/Cards-Bjesu3b3.js +1 -0
- package/dist/Carousel-BX16BlEp.js +1 -0
- package/dist/ChainedSelect-HNkJ3-dh.js +1 -0
- package/dist/{Chart-DeifHM3G.js → Chart-agJkN0ZL.js} +1 -1
- package/dist/{ChartRadios-BX0XgRaT.js → ChartRadios-Bzxejcn5.js} +1 -1
- package/dist/Checkbox-CFbZWn6W.js +1 -0
- package/dist/Checkboxes-Dai8FX75.js +1 -0
- package/dist/{Code-DcvQoe7q.js → Code-CssmXCo1.js} +1 -1
- package/dist/Collapse-CxdrbTCt.js +1 -0
- package/dist/{CollapseGroup-BjOLc7gy.js → CollapseGroup-DSVqVNzd.js} +1 -1
- package/dist/{Color-VTVRP0Yh.js → Color-D_IajbVk.js} +1 -1
- package/dist/ColorPicker-D7vbsyrO.js +1 -0
- package/dist/{ColumnToggler-C3nJ3a2L.js → ColumnToggler-CHKOkn5W.js} +1 -1
- package/dist/ColumnToggler-CNtsoshN.js +1 -0
- package/dist/Combo-BY-auuRw.js +1 -0
- package/dist/{ConditionBuilder-DgrT7foX.js → ConditionBuilder-CcARxcMo.js} +1 -1
- package/dist/{Container-Dxat5bhD.js → Container-DJSLtDAJ.js} +1 -1
- package/dist/{Control-Bf-oCotG.js → Control-DSGWLqqF.js} +1 -1
- package/dist/{Custom-D6c7XWuG.js → Custom-BYHmBkth.js} +1 -1
- package/dist/{Date-bwXIQ1E2.js → Date-B63AkW7Z.js} +1 -1
- package/dist/{DateRange-Dziuubwl.js → DateRange-DJOatHqc.js} +1 -1
- package/dist/Dialog-kgjY-B2R.js +1 -0
- package/dist/{DiffEditor-DmsB7iU5.js → DiffEditor-DVtcPH19.js} +1 -1
- package/dist/{Divider-DXKjgHnu.js → Divider-Bhz9wUzQ.js} +1 -1
- package/dist/Drawer-Chy6lJ0Z.js +1 -0
- package/dist/DropDownButton-BWs-Bt8i.js +1 -0
- package/dist/{Each-BN_RdIk9.js → Each-BOfQOLuK.js} +1 -1
- package/dist/FieldSet-DN_G2H2G.js +1 -0
- package/dist/{Flex-CEOKLccw.js → Flex-CPhW10VO.js} +1 -1
- package/dist/{Formula-wHZcZdZe.js → Formula-DcsJiszb.js} +1 -1
- package/dist/{Grid2D-CjhMs7os.js → Grid2D-CdxZo60p.js} +1 -1
- package/dist/{GridNav-CMdtm2Xn.js → GridNav-Ygo_GK3C.js} +1 -1
- package/dist/{Group-CeX70BQM.js → Group-DDAf-7uz.js} +1 -1
- package/dist/HBox-CtV7AD0w.js +1 -0
- package/dist/{Hidden-BQlhmMF1.js → Hidden-BR6IyG0j.js} +1 -1
- package/dist/{IFrame-BBlU5j3H.js → IFrame-BxqJ3U9V.js} +1 -1
- package/dist/Icon-CRwFwe54.js +1 -0
- package/dist/IconPicker-BaSn0ir6.js +1 -0
- package/dist/IconSelect-B06M_oDf.js +1 -0
- package/dist/{IconSelectStore-Dejwl7K4.js → IconSelectStore-CR8CK_X5.js} +1 -1
- package/dist/Image-CTRm12Jc.js +1 -0
- package/dist/{Images-Dw6RjBRF.js → Images-D46XKnM8.js} +1 -1
- package/dist/{InputArray-BM8mytP0.js → InputArray-VGWKyEK3.js} +1 -1
- package/dist/InputCity-D2F8LhKN.js +1 -0
- package/dist/{InputColor-ieTmygEi.js → InputColor-DnQoK0vq.js} +1 -1
- package/dist/{InputDate-DClJE5ZQ.js → InputDate-Dh59pmr9.js} +1 -1
- package/dist/{InputDateRange-ey_IQBMw.js → InputDateRange-CEYcs3US.js} +1 -1
- package/dist/InputExcel-44jxNcRm.js +1 -0
- package/dist/InputFile-BXCmkHsj.js +1 -0
- package/dist/{InputFormula-kEcGojYn.js → InputFormula-BbBUGVDB.js} +1 -1
- package/dist/{InputGroup-Cl5NFohz.js → InputGroup-DC6UhjCD.js} +1 -1
- package/dist/InputImage-CIEPx3a3.js +1 -0
- package/dist/{InputMonthRange-DRsF3bwK.js → InputMonthRange-vWfEBcgt.js} +1 -1
- package/dist/{InputNumber-12oPLkKS.js → InputNumber-BroZeI3k.js} +1 -1
- package/dist/{InputQuarterRange-CGI7hpgD.js → InputQuarterRange-B-RgvEyL.js} +1 -1
- package/dist/InputRange-Bs7KposT.js +1 -0
- package/dist/{InputRating-CrC43lys.js → InputRating-Cu5964Ql.js} +1 -1
- package/dist/{InputRepeat-CfrcyVVp.js → InputRepeat-Cv2fEcrY.js} +1 -1
- package/dist/InputRichText-DIt7U8rX.js +1 -0
- package/dist/{InputSignature-Dblmb8fX.js → InputSignature-DIuwKNcw.js} +1 -1
- package/dist/InputSubForm-Bj00jcae.js +1 -0
- package/dist/InputTable-ByM68rOw.js +1 -0
- package/dist/InputTag-idylaKEe.js +1 -0
- package/dist/InputText-Cj2wp6S0.js +1 -0
- package/dist/InputTree-B0aSRjss.js +1 -0
- package/dist/{InputVerificationCode-BVS_27Ln.js → InputVerificationCode-DWmHV08K.js} +1 -1
- package/dist/{InputYearRange-B2O3_F1X.js → InputYearRange-D0V1t9TC.js} +1 -1
- package/dist/{JSONSchema-DqDhWtIJ.js → JSONSchema-BNYO4lHp.js} +1 -1
- package/dist/{JSONSchemaEditor-C9T3PzZJ.js → JSONSchemaEditor-DOUw4cjR.js} +1 -1
- package/dist/{Json-Ce0DNfyT.js → Json-ChJFz16a.js} +1 -1
- package/dist/{Link-C3aOVbZG.js → Link-Bu3ve8g0.js} +1 -1
- package/dist/List-CCqYTW3K.js +1 -0
- package/dist/{ListSelect-Bs6wj_-J.js → ListSelect-CbUhVvRd.js} +1 -1
- package/dist/{LocationPicker-B2cA5WeW.js → LocationPicker-CVmG_PU4.js} +1 -1
- package/dist/Log-CFLunOAF.js +1 -0
- package/dist/{Mapping-BHBXty4A.js → Mapping-C6YMHlDX.js} +1 -1
- package/dist/{Markdown-C7RRd4iB.js → Markdown-j5efZcgS.js} +1 -1
- package/dist/MatrixCheckboxes-CUi1N0RM.js +1 -0
- package/dist/{MultilineText-Cn_RvX_X.js → MultilineText-CjvXXqrp.js} +1 -1
- package/dist/Nav-CwSHGiwE.js +1 -0
- package/dist/NestedSelect-BfkZhH1O.js +1 -0
- package/dist/{Number-DFfcvMo-.js → Number-1fqsX9DH.js} +1 -1
- package/dist/OfficeViewer-DwIQUl66.js +1 -0
- package/dist/{Operation-B0qHBEGz.js → Operation-B1HwrneV.js} +1 -1
- package/dist/Page-Ed_OjLiq.js +1 -0
- package/dist/{Pagination-BML_Z29r.js → Pagination-6lMmNWPI.js} +1 -1
- package/dist/{PaginationWrapper-CsSgFHB2.js → PaginationWrapper-BkSRXIPs.js} +1 -1
- package/dist/Panel-DdwXHCry.js +1 -0
- package/dist/Password-D7hJHKSJ.js +1 -0
- package/dist/Picker-BZNqS92p.js +1 -0
- package/dist/{Plain-DIFjFdFl.js → Plain-D7nwMMVt.js} +1 -1
- package/dist/{Portlet-CxahIPp7.js → Portlet-BNPvph0w.js} +1 -1
- package/dist/{Progress-CzaZlXpm.js → Progress-CATKwBwk.js} +1 -1
- package/dist/{Property-CUyXCXOn.js → Property-Bbw6J0EJ.js} +1 -1
- package/dist/{QRCode-DfpZebSC.js → QRCode-C1Sz2px4.js} +1 -1
- package/dist/{Radio-BAbBp9SW.js → Radio-Bp4A9ifj.js} +1 -1
- package/dist/{Radios-CXuxJrci.js → Radios-BiON9miU.js} +1 -1
- package/dist/Remark-Dsxb2TwD.js +1 -0
- package/dist/{RichText-BDj_oSTQ.js → RichText-Ck_YZ4kC.js} +1 -1
- package/dist/{SearchBox-bMIN06lN.js → SearchBox-M-dkIVTh.js} +1 -1
- package/dist/Select-BGyJvCHF.js +1 -0
- package/dist/Service-7EfZof-E.js +1 -0
- package/dist/{Shape-DkrB4gFu.js → Shape-DGo5yg6n.js} +1 -1
- package/dist/{Slider-DLqHOqM9.js → Slider-CZP8_8w7.js} +1 -1
- package/dist/{SparkLine-Cffa7llr.js → SparkLine-BMxbCqBr.js} +1 -1
- package/dist/Spinner-D8gjgMqi.js +1 -0
- package/dist/{StaticHoc-DlQH6vI9.js → StaticHoc-D0pM2bgC.js} +1 -1
- package/dist/Status-CVO4FFCM.js +1 -0
- package/dist/{Steps-q0yTv3Pd.js → Steps-D7IGq2Hh.js} +1 -1
- package/dist/Switch-DamAp7Z0.js +1 -0
- package/dist/{SwitchContainer-F88HOPkR.js → SwitchContainer-CMXoJ9rv.js} +1 -1
- package/dist/Table-DaePlnJ2.js +1 -0
- package/dist/Table2-DZv7wQuy.js +1 -0
- package/dist/{TableView-CZBY7L3L.js → TableView-DoAcciT3.js} +1 -1
- package/dist/{Tabs-DhwrMAk5.js → Tabs-9QLYiuKd.js} +1 -1
- package/dist/TabsTransfer-CYt2Ydo2.js +1 -0
- package/dist/TabsTransferPicker-DbFyy-8j.js +1 -0
- package/dist/{Tag-NFonQSEh.js → Tag-mYOYI2_I.js} +1 -1
- package/dist/Tasks-BLnNJBWx.js +1 -0
- package/dist/{Textarea-D8LZxjAF.js → Textarea-sYiziBNB.js} +1 -1
- package/dist/{Timeline-BWCeXNwW.js → Timeline-BAxKRm5L.js} +1 -1
- package/dist/TooltipWrapper-C09x-Vn9.js +1 -0
- package/dist/{Tpl-DhQfxvVG.js → Tpl-ByPycBij.js} +1 -1
- package/dist/Transfer-B0VVG1X5.js +1 -0
- package/dist/TransferPicker-D2BR3RwX.js +1 -0
- package/dist/TreeSelect-V8WAsBlR.js +1 -0
- package/dist/{UUID-LOMmDPbG.js → UUID-9JqGMHov.js} +1 -1
- package/dist/{UserSelect-Bj3qwZOx.js → UserSelect-DU-DqXMl.js} +1 -1
- package/dist/{VBox-CO4uhaIu.js → VBox-DObThecs.js} +1 -1
- package/dist/{Video-Bg6Yw-M5.js → Video-C8IgYvL_.js} +1 -1
- package/dist/{WebComponent-Dz9rLydw.js → WebComponent-qhqdvgNC.js} +1 -1
- package/dist/Wizard-OfhcHrBG.js +1 -0
- package/dist/{Words-0Dy7botA.js → Words-BIdMoCe8.js} +1 -1
- package/dist/{Wrapper-CMoRa1D9.js → Wrapper-DJrZT8db.js} +1 -1
- package/dist/{PopUp-COPmnePV.js → _castFunction-CQMNP8A1.js} +104 -104
- package/dist/beneficiary-form-BRRcLnIQ.js +10 -0
- package/dist/{doc-ghaRvxaL.js → doc-C6E4JfQ4.js} +1 -1
- package/dist/{es-B3cNxma7.js → es-DoSNZEgs.js} +1 -1
- package/dist/esm-DMJQA23h.js +4 -0
- package/dist/esm-Dgr2t9Jm.js +27 -0
- package/dist/function-AxX-od3p.js +3 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +1 -1
- package/dist/isEqual-CABQKVnq.js +1 -0
- package/dist/{objectSpread2-GwfkYN9X.js → objectSpread2-EZn5iNnc.js} +1 -1
- package/dist/{omitBy-ZPSwrvva.js → omitBy-DzRksfoy.js} +1 -1
- package/dist/request-CLLl5Hjd.js +1 -0
- package/dist/xor-D3F4ghdw.js +1 -0
- package/package.json +1 -1
- package/dist/Action-C3QtDUqy.js +0 -1
- package/dist/App-CP2DIt1G.js +0 -1
- package/dist/Audio-BppDXVEA.js +0 -1
- package/dist/BarCode-D4gon2p5.js +0 -1
- package/dist/ButtonGroup-Do35UTdV.js +0 -1
- package/dist/CRUD-4seSk6Da.js +0 -1
- package/dist/CRUD2-DT_SKjjr.js +0 -1
- package/dist/Card-C3k1tiC5.js +0 -1
- package/dist/Cards-BXvnwLq5.js +0 -1
- package/dist/Carousel-OpryFVUv.js +0 -1
- package/dist/ChainedSelect-BSMLjswV.js +0 -1
- package/dist/Checkbox-C8m4jCbq.js +0 -1
- package/dist/Checkboxes-DacWLHrb.js +0 -1
- package/dist/Collapse-BNe1BLza.js +0 -1
- package/dist/ColorPicker-Bu-Gc0dG.js +0 -1
- package/dist/ColumnToggler-Dt0txpR3.js +0 -1
- package/dist/Combo-BvTYUYUH.js +0 -1
- package/dist/Dialog-DIPV4_aZ.js +0 -1
- package/dist/Drawer-DoMG_38Z.js +0 -1
- package/dist/DropDownButton-Deczvc9l.js +0 -1
- package/dist/FieldSet-U4D0FvFM.js +0 -1
- package/dist/HBox-BN0oN-VJ.js +0 -1
- package/dist/Icon-DAUsPZQ-.js +0 -1
- package/dist/IconPicker-Cj7Km8sP.js +0 -1
- package/dist/IconSelect-B6VM6qir.js +0 -1
- package/dist/Image-CD2BqrS9.js +0 -1
- package/dist/InputCity-DmKLlwz1.js +0 -1
- package/dist/InputExcel-CUuKCckv.js +0 -1
- package/dist/InputFile-CmZchi4z.js +0 -1
- package/dist/InputImage-DVnobwUC.js +0 -1
- package/dist/InputRange-khQWegkI.js +0 -1
- package/dist/InputRichText-B2iCFHNT.js +0 -1
- package/dist/InputSubForm--4RoaGbH.js +0 -1
- package/dist/InputTable-D-tev-dW.js +0 -1
- package/dist/InputTag-DEsaQpfD.js +0 -1
- package/dist/InputText-BRZS9DVw.js +0 -1
- package/dist/InputTree-DwmE5ZVX.js +0 -1
- package/dist/List-B0DvFWZA.js +0 -1
- package/dist/Log-FYJPSSrf.js +0 -1
- package/dist/MatrixCheckboxes-CtcnDPnK.js +0 -1
- package/dist/Nav-5cFyq-Sc.js +0 -1
- package/dist/NestedSelect-jtpny6lv.js +0 -1
- package/dist/OfficeViewer-BfUW6wzL.js +0 -1
- package/dist/Page-wkG_9v7N.js +0 -1
- package/dist/Panel-BEYSCFb0.js +0 -1
- package/dist/Password-ofzGhp3p.js +0 -1
- package/dist/Picker-r4DoCAVP.js +0 -1
- package/dist/Remark-ja0r3wT8.js +0 -1
- package/dist/Select-Dk0Q_TsK.js +0 -1
- package/dist/Service-BJ8d1o0H.js +0 -1
- package/dist/Spinner-WSMpYbNE.js +0 -1
- package/dist/Status-BmsTJAq3.js +0 -1
- package/dist/Switch-DHZIMer8.js +0 -1
- package/dist/Table-BNyuGw_o.js +0 -1
- package/dist/Table2-Bg42KkGP.js +0 -1
- package/dist/TabsTransfer-BJf4Hvvx.js +0 -1
- package/dist/TabsTransferPicker-Q-MyTe1j.js +0 -1
- package/dist/Tasks-DKbiwma8.js +0 -1
- package/dist/TooltipWrapper-CeftJOeF.js +0 -1
- package/dist/Transfer-BlN0Xkyp.js +0 -1
- package/dist/TransferPicker-CWBn7A9e.js +0 -1
- package/dist/TreeSelect-BNT6Juqj.js +0 -1
- package/dist/Wizard-Bf40EE0f.js +0 -1
- package/dist/beneficiary-form-DEQbj_Ph.js +0 -10
- package/dist/esm-Bwz-vxIU.js +0 -27
- package/dist/esm-WMdHSo6z.js +0 -4
- package/dist/function-DgD667sG.js +0 -3
- package/dist/isEqual-BS2RhB6Q.js +0 -1
- package/dist/mi18n-react.esm-DB-6dM6A.js +0 -1
- package/dist/xor-D-wxOg18.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as r}from"./rolldown-runtime-DXzHzmmG.js";import{t as s}from"./react-CWkhIp2c.js";import{i as t,r as o}from"./tslib.es6-TRdqp4ac.js";import{$n as n,it as e}from"./esm-
|
|
1
|
+
import{o as r}from"./rolldown-runtime-DXzHzmmG.js";import{t as s}from"./react-CWkhIp2c.js";import{i as t,r as o}from"./tslib.es6-TRdqp4ac.js";import{$n as n,it as e}from"./esm-DMJQA23h.js";var i=function(r){function s(){return null!==r&&r.apply(this,arguments)||this}return t(s,r),s.prototype.render=function(){var r=this.props,s=r.render,t=r.props,o=r.schema,e=n(this.props)||o;if("string"==typeof e)try{e=JSON.parse(e)}catch(i){console.warn("amis value must be json string",i),e=null}return s("amis",e,t)},o([e({type:"amis"})],s)}(/* @__PURE__ */r(s()).Component);export{i as AMISRenderer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e,r as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as n}from"./react-CWkhIp2c.js";import{a as o,c as i,i as s,n as r,o as a,r as l,t as c}from"./tslib.es6-TRdqp4ac.js";import{J as p,Nn as d,Vr as u,Xr as f,Z as y,dn as m,dt as h,it as v,kt as g,ln as b,oi as w,tt as k,ui as C,yn as E}from"./esm-DMJQA23h.js";import{R as O}from"./esm-Dgr2t9Jm.js";import{c as D,o as j,r as A}from"./_castFunction-CQMNP8A1.js";import{n as x}from"./Remark-Dsxb2TwD.js";var L=/* @__PURE__ */e(n()),P="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function S(e,t,n,o){e.addEventListener?e.addEventListener(t,n,o):e.attachEvent&&e.attachEvent("on".concat(t),n)}function T(e,t,n,o){e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent&&e.detachEvent("on".concat(t),n)}function K(e,t){const n=t.slice(0,t.length-1);for(let o=0;o<n.length;o++)n[o]=e[n[o].toLowerCase()];return n}function N(e){"string"!=typeof e&&(e="");const t=(e=e.replace(/\s/g,"")).split(",");let n=t.lastIndexOf("");for(;n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}var M={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":P?173:189,"=":P?61:187,";":P?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},_={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,meta:91,command:91},I={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},F={16:!1,18:!1,17:!1,91:!1},U={};for(let ce=1;ce<20;ce++)M["f".concat(ce)]=111+ce;var B=[],R=null,z="all",W=/* @__PURE__ */new Map,q=e=>M[e.toLowerCase()]||_[e.toLowerCase()]||e.toUpperCase().charCodeAt(0);function V(e){z=e||"all"}function X(){return z||"all"}function $(e){if(void 0===e)Object.keys(U).forEach(e=>{Array.isArray(U[e])&&U[e].forEach(e=>G(e)),delete U[e]}),Q(null);else if(Array.isArray(e))e.forEach(e=>{e.key&&G(e)});else if("object"==typeof e)e.key&&G(e);else if("string"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];let[i,s]=n;"function"==typeof i&&(s=i,i=""),G({key:e,scope:i,method:s,splitKey:"+"})}}var G=e=>{let{key:t,scope:n,method:o,splitKey:i="+"}=e;N(t).forEach(e=>{const t=e.split(i),s=t.length,r=t[s-1],a="*"===r?"*":q(r);if(!U[a])return;n||(n=X());const l=s>1?K(_,t):[],c=[];U[a]=U[a].filter(e=>{const t=(!o||e.method===o)&&e.scope===n&&function(e,t){const n=e.length>=t.length?e:t,o=e.length>=t.length?t:e;let i=!0;for(let s=0;s<n.length;s++)-1===o.indexOf(n[s])&&(i=!1);return i}(e.mods,l);return t&&c.push(e.element),!t}),c.forEach(e=>Q(e))})};function J(e,t,n,o){if(t.element!==o)return;let i;if(t.scope===n||"all"===t.scope){i=t.mods.length>0;for(const e in F)Object.prototype.hasOwnProperty.call(F,e)&&(!F[e]&&t.mods.indexOf(+e)>-1||F[e]&&-1===t.mods.indexOf(+e))&&(i=!1);(0!==t.mods.length||F[16]||F[18]||F[17]||F[91])&&!i&&"*"!==t.shortcut||(t.keys=[],t.keys=t.keys.concat(B),!1===t.method(e,t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function Z(e,t){const n=U["*"];let o=e.keyCode||e.which||e.charCode;if(e.key&&"capslock"===e.key.toLowerCase())return;if(!H.filter.call(this,e))return;if(93!==o&&224!==o||(o=91),-1===B.indexOf(o)&&229!==o&&B.push(o),["metaKey","ctrlKey","altKey","shiftKey"].forEach(t=>{const n=I[t];e[t]&&-1===B.indexOf(n)?B.push(n):!e[t]&&B.indexOf(n)>-1?B.splice(B.indexOf(n),1):"metaKey"===t&&e[t]&&(B=B.filter(e=>e in I||e===o))}),o in F){F[o]=!0;for(const t in _)Object.prototype.hasOwnProperty.call(_,t)&&(H[t]=e[I[_[t]]]);if(!n)return}for(const a in F)Object.prototype.hasOwnProperty.call(F,a)&&(F[a]=e[I[a]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(-1===B.indexOf(17)&&B.push(17),-1===B.indexOf(18)&&B.push(18),F[17]=!0,F[18]=!0);const i=X();if(n)for(let a=0;a<n.length;a++)n[a].scope===i&&("keydown"===e.type&&n[a].keydown||"keyup"===e.type&&n[a].keyup)&&J(e,n[a],i,t);if(!(o in U))return;const s=U[o],r=s.length;for(let a=0;a<r;a++)if(("keydown"===e.type&&s[a].keydown||"keyup"===e.type&&s[a].keyup)&&s[a].key){const n=s[a],{splitKey:o}=n,r=n.key.split(o),l=[];for(let e=0;e<r.length;e++)l.push(q(r[e]));l.sort().join("")===B.sort().join("")&&J(e,n,i,t)}}function H(e,t,n){B=[];const o=N(e);let i=[],s="all",r=document,a=0,l=!1,c=!0,p="+",d=!1,u=!1;for(void 0===n&&"function"==typeof t&&(n=t),"[object Object]"===Object.prototype.toString.call(t)&&(t.scope&&(s=t.scope),t.element&&(r=t.element),t.keyup&&(l=t.keyup),void 0!==t.keydown&&(c=t.keydown),void 0!==t.capture&&(d=t.capture),"string"==typeof t.splitKey&&(p=t.splitKey),!0===t.single&&(u=!0)),"string"==typeof t&&(s=t),u&&$(e,s);a<o.length;a++)i=[],(e=o[a].split(p)).length>1&&(i=K(_,e)),(e="*"===(e=e[e.length-1])?"*":q(e))in U||(U[e]=[]),U[e].push({keyup:l,keydown:c,scope:s,mods:i,shortcut:o[a],method:n,key:o[a],splitKey:p,element:r});if(void 0!==r&&window){if(!W.has(r)){const e=function(){return Z(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event,r)},t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;Z(e,r),function(e){let t=e.keyCode||e.which||e.charCode;e.key&&"capslock"===e.key.toLowerCase()&&(t=q(e.key));const n=B.indexOf(t);if(n>=0&&B.splice(n,1),e.key&&"meta"===e.key.toLowerCase()&&B.splice(0,B.length),93!==t&&224!==t||(t=91),t in F){F[t]=!1;for(const e in _)_[e]===t&&(H[e]=!1)}}(e)};W.set(r,{keydownListener:e,keyupListenr:t,capture:d}),S(r,"keydown",e,d),S(r,"keyup",t,d)}if(!R){const e=()=>{B=[]};R={listener:e,capture:d},S(window,"focus",e,d)}}}function Q(e){const t=Object.values(U).flat();if(t.findIndex(t=>{let{element:n}=t;return n===e})<0){const{keydownListener:t,keyupListenr:n,capture:o}=W.get(e)||{};t&&n&&(T(e,"keyup",n,o),T(e,"keydown",t,o),W.delete(e))}if((t.length<=0||W.size<=0)&&(Object.keys(W).forEach(e=>{const{keydownListener:t,keyupListenr:n,capture:o}=W.get(e)||{};t&&n&&(T(e,"keyup",n,o),T(e,"keydown",t,o),W.delete(e))}),W.clear(),Object.keys(U).forEach(e=>delete U[e]),R)){const{listener:e,capture:t}=R;T(window,"focus",e,t),R=null}}var Y={getPressedKeyString:function(){return B.map(e=>{return t=e,Object.keys(M).find(e=>M[e]===t)||(e=>Object.keys(_).find(t=>_[t]===e))(e)||String.fromCharCode(e);var t})},setScope:V,getScope:X,deleteScope:function(e,t){let n,o;e||(e=X());for(const i in U)if(Object.prototype.hasOwnProperty.call(U,i))for(n=U[i],o=0;o<n.length;)n[o].scope===e?n.splice(o,1).forEach(e=>{let{element:t}=e;return Q(t)}):o++;X()===e&&V(t||"all")},getPressedKeyCodes:function(){return B.slice(0)},getAllKeyCodes:function(){const e=[];return Object.keys(U).forEach(t=>{U[t].forEach(t=>{let{key:n,scope:o,mods:i,shortcut:s}=t;e.push({scope:o,shortcut:s,mods:i,keys:n.split("+").map(e=>q(e))})})}),e},isPressed:function(e){return"string"==typeof e&&(e=q(e)),-1!==B.indexOf(e)},filter:function(e){const t=e.target||e.srcElement,{tagName:n}=t;let o=!0;const i="INPUT"===n&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(t.type);return(t.isContentEditable||(i||"TEXTAREA"===n||"SELECT"===n)&&!t.readOnly)&&(o=!1),o},trigger:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(U).forEach(n=>{U[n].filter(n=>n.scope===t&&n.shortcut===e).forEach(e=>{e&&e.method&&e.method()})})},unbind:$,keyMap:M,modifier:_,modifierMap:I};for(const ce in Y)Object.prototype.hasOwnProperty.call(Y,ce)&&(H[ce]=Y[ce]);if("undefined"!=typeof window){const e=window.hotkeys;H.noConflict=t=>(t&&window.hotkeys===H&&(window.hotkeys=e),H),window.hotkeys=H}var ee=/* @__PURE__ */t({Action:()=>re,ActionRenderer:()=>le,createSyntheticEvent:()=>ie,default:()=>ae}),te=/* @__PURE__ */e(g()),ne=/* @__PURE__ */e(E()),oe=["id","dialog","drawer","toast","url","link","confirmText","confirmTitle","tooltip","disabledTip","className","asyncApi","redirect","size","level","primary","feedback","api","blank","tooltipPlacement","to","cc","bcc","subject","body","content","required","type","actionType","label","icon","rightIcon","reload","target","close","messages","mergeData","index","copy","copyFormat","payload","requireSelected","countDown","fileName","isolateScope","downloadFileName"],ie=function(e){var t=!1,n=!1;return{nativeEvent:e,currentTarget:e.currentTarget,target:e.target,bubbles:e.bubbles,cancelable:e.cancelable,defaultPrevented:e.defaultPrevented,eventPhase:e.eventPhase,isTrusted:e.isTrusted,preventDefault:function(){t=!0,e.preventDefault()},isDefaultPrevented:function(){return t},stopPropagation:function(){n=!0,e.stopPropagation()},isPropagationStopped:function(){return n},persist:function(){},timeStamp:e.timeStamp,type:e.type}},se=["button","submit","reset"],re=function(e){function t(t){var n,o,i=this;(i=e.call(this,t)||this).state={inCountDown:!1,countDownEnd:0,timeLeft:0},i.localStorageKey="amis-countdownend-"+(i.props.name||"")+((null===(o=null===(n=i.props)||void 0===n?void 0:n.$schema)||void 0===o?void 0:o.id)||u());var s=parseInt(localStorage.getItem(i.localStorageKey)||"0");return s&&i.props.countDown&&Date.now()<s&&(i.state={inCountDown:!0,countDownEnd:s,timeLeft:Math.floor((s-Date.now())/1e3)},i.handleCountDown()),i}return s(t,e),t.prototype.handleAction=function(e){return r(this,void 0,void 0,function(){var t,n,i,s,r,a,l,c,p,d,u,f,y,h,v=this;return o(this,function(o){switch(o.label){case 0:return t=this.props,n=t.onAction,i=t.onActionSensor,s=t.disabled,r=t.countDown,a=t.env,e.persist(),"string"==typeof(l=this.props.onClick)&&(l=m(l,"event","props")),(p=l)?[4,l(e,this.props)]:[3,2];case 1:p=o.sent(),o.label=2;case 2:return c=p,s||e.isDefaultPrevented()||!1===c||!n||this.state.inCountDown?[2]:(e.preventDefault(),d=(0,te.default)(this.props,oe),"ajax"!==(u=d.actionType)&&"download"!==u&&"add"!==u&&(null==a||a.tracker({eventType:u||this.props.type||"click",eventData:(0,ne.default)(d,["type","actionType","tooltipPlacement"])},this.props)),"download"===u&&(d.actionType="ajax",(f=b(d.api)).responseType="blob",f.downloadFileName=d.downloadFileName,d.api=f),(null==(y=n(e,d))?void 0:y.then)?(null==i||i(y),[4,y]):[3,4]);case 3:o.sent(),o.label=4;case 4:return r&&(h=Date.now()+1e3*r,this.setState({countDownEnd:h,inCountDown:!0,timeLeft:r}),localStorage.setItem(this.localStorageKey,String(h)),setTimeout(function(){v.handleCountDown()},1e3)),[2]}})})},t.prototype.handleCountDown=function(){var e=this,t=Math.floor((this.state.countDownEnd-Date.now())/1e3);t<=0?this.setState({inCountDown:!1,timeLeft:t}):(this.setState({timeLeft:t}),setTimeout(function(){e.handleCountDown()},1e3))},t.prototype.componentDidMount=function(){var e=this,t=this.props.hotKey;t&&H(t,function(t){t.preventDefault();var n=new MouseEvent("click",{bubbles:!0,cancelable:!0});e.handleAction(ie(n))})},t.prototype.componentWillUnmount=function(){var e=this.props.hotKey;e&&H.unbind(e)},t.prototype.render=function(){var e,t=this.props,n=t.type,o=t.iconClassName,i=t.rightIconClassName,s=t.loadingClassName,r=t.primary,a=t.size,l=t.level,d=t.countDownTpl,u=t.block,m=t.className,h=t.style,v=t.componentClass,g=t.tooltip,b=t.disabledTip,w=t.tooltipPlacement,k=t.actionType,C=t.link,E=t.data,O=t.translate,P=t.activeClassName,S=t.isCurrentUrl,T=t.isMenuItem,K=t.active,N=t.activeLevel,M=t.tooltipTrigger,_=t.tooltipContainer,I=t.tooltipRootClose,F=t.loading,U=t.body,B=t.render,R=t.onMouseEnter,z=t.onMouseLeave,W=t.classnames,q=t.classPrefix,V=t.loadingConfig,X=t.themeCss,$=t.wrapperCustomStyle,G=t.css,J=t.id,Z=t.testIdBuilder,H=t.env,Q=t.tabIndex;if("email"!==k&&U)return L.createElement(j,{classPrefix:q,classnames:W,placement:w,tooltip:g,container:_,trigger:M,rootClose:I},L.createElement("div",{className:W("Action",m),style:h,onClick:this.handleAction,onMouseEnter:R,onMouseLeave:z},B("body",U)));var Y=this.props.label,ee=this.props.disabled,te=!!K;"link"===k&&!te&&C&&S&&(te=S(C)),this.state.inCountDown&&(Y=x(O(d),c(c({},E),{timeLeft:this.state.timeLeft})),ee=!0);var ne=this.props.icon,oe=this.props.rightIcon;"string"==typeof ne&&(ne=f(this.props.icon,E)),"string"==typeof oe&&(oe=f(this.props.rightIcon,E));var ie=L.createElement(D,{cx:W,icon:ne,className:"Button-icon",classNameProp:W(o,y(c(c({},this.props),{name:"iconClassName",id:J,themeCss:X||G})))}),re=L.createElement(D,{cx:W,icon:oe,className:"Button-icon",classNameProp:W(i,y(c(c({},this.props),{name:"iconClassName",id:J,themeCss:X||G})))});return L.createElement(L.Fragment,null,L.createElement(A,{loadingConfig:V,className:W(m,y(c(c({},this.props),{name:"wrapperCustomStyle",id:J,themeCss:$})),y(c(c({},this.props),{name:"className",id:J,themeCss:X||G})),(e={},e[P||"is-active"]=te,e)),testIdBuilder:Z,style:h,size:a,level:N&&te?N:f(l,E)||(r?"primary":void 0),loadingClassName:s,loading:F,onClick:this.handleAction,onMouseEnter:R,onMouseLeave:z,type:n&&~se.indexOf(n)?n:"button",disabled:ee,componentClass:T?"a":v,overrideClassName:T,tooltip:x(g,E),disabledTip:x(b,E),tooltipPlacement:w,tooltipContainer:_,tooltipTrigger:M,tooltipRootClose:I,block:u,iconOnly:!(!ne||Y||"link"===l),tabIndex:Q},F?"":ie,Y?L.createElement("span",null,f(String(Y),E)):null,re),L.createElement(p,c({},this.props,{config:{themeCss:X||G,classNames:[{key:"className",weights:{hover:{suf:":not(:disabled):not(.is-disabled)"},active:{suf:":not(:disabled):not(.is-disabled)"}}},{key:"iconClassName",weights:{default:{important:!0},hover:{important:!0,suf:":not(:disabled):not(.is-disabled)"},active:{important:!0,suf:":not(:disabled):not(.is-disabled)"}}}],wrapperCustomStyle:$,id:J},env:H})))},t.defaultProps={type:"button",componentClass:"button",tooltipPlacement:"bottom",activeClassName:"is-active",countDownTpl:"Action.countDown",countDown:0},l([d,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",Promise)],t.prototype,"handleAction",null),l([d,a("design:type",Function),a("design:paramtypes",[]),a("design:returntype",void 0)],t.prototype,"handleCountDown",null),l([d,a("design:type",Function),a("design:paramtypes",[]),a("design:returntype",void 0)],t.prototype,"componentDidMount",null),l([d,a("design:type",Function),a("design:paramtypes",[]),a("design:returntype",void 0)],t.prototype,"componentWillUnmount",null),t}(L.Component),ae=k(re),le=function(e){function t(t,n){var o=e.call(this,t)||this;return o.state={actionDisabled:!1},n.registerComponent(o),o}return s(t,e),t.prototype.componentWillUnmount=function(){this.context.unRegisterComponent(this)},t.prototype.doAction=function(e,t){var n=null==e?void 0:e.actionType;"click"===n&&this.handleAction(n,e)},t.prototype.handleAction=function(e,t){return r(this,void 0,void 0,function(){var n,i,s,r,a,l,p,d,u,y,m;return o(this,function(o){switch(o.label){case 0:return o.trys.push([0,,10,11]),n=this.props,i=n.env,s=n.onAction,r=n.data,a=n.ignoreConfirm,l=n.dispatchEvent,p=n.$schema,d=r,this.setState({actionDisabled:!0}),"click"===(null==t?void 0:t.actionType)&&C(null==t?void 0:t.args)&&(d=w(r,t.args)),u=p.onEvent&&Object.keys(p.onEvent).length,y="",!1!==this.props.showConfirmBox&&(!a||u)&&t.confirmText&&i.confirm&&(y=f(t.confirmText,d))?[4,i.confirm(y,f(t.confirmTitle,d)||void 0)]:[3,6];case 1:return o.sent()?[4,l(e,d,this)]:[3,4];case 2:return(null==(m=o.sent())?void 0:m.prevented)?[2]:[4,s(e,c(c({},t),{ignoreConfirm:!!u}),d,void 0,void 0,m)];case 3:return o.sent(),[3,5];case 4:if(t.countDown)throw new Error("cancel");o.label=5;case 5:return[3,9];case 6:return[4,l(e,d)];case 7:return(null==(m=o.sent())?void 0:m.prevented)?[2]:[4,s(e,t,d,void 0,void 0,m)];case 8:o.sent(),o.label=9;case 9:return[3,11];case 10:return this.setState({actionDisabled:!1}),[7];case 11:return[2]}})})},t.prototype.handleMouseEnter=function(e){var t=this.props,n=t.dispatchEvent,o=t.data;n(e,w(o,{nativeEvent:e}))},t.prototype.handleMouseLeave=function(e){var t=this.props,n=t.dispatchEvent,o=t.data;n(e,w(o,{nativeEvent:e}))},t.prototype.isCurrentAction=function(e){var t=this.props,n=t.env,o=t.data;return n.isCurrentUrl(f(e,o))},t.prototype.render=function(){var e=this.props,t=e.env,n=e.disabled,o=e.btnDisabled,s=e.disabledOnAction,r=e.loading,a=i(e,["env","disabled","btnDisabled","disabledOnAction","loading"]),l=this.state.actionDisabled;return L.createElement(re,c({},a,{env:t,disabled:n||o||!!s&&l,onAction:this.handleAction,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,loading:r,isCurrentUrl:this.isCurrentAction,tooltipContainer:a.popOverContainer||t.getModalContainer}))},t.contextType=h,l([d,a("design:type",Function),a("design:paramtypes",[Object,Object]),a("design:returntype",Promise)],t.prototype,"handleAction",null),l([d,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),l([d,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"handleMouseLeave",null),l([d,a("design:type",Function),a("design:paramtypes",[String]),a("design:returntype",void 0)],t.prototype,"isCurrentAction",null),l([v({type:"action",alias:["button","submit","reset"]}),O,a("design:paramtypes",[Object,Object])],t)}(L.Component);export{ee as n,re as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{c as r,i as s,r as e,t as n}from"./tslib.es6-TRdqp4ac.js";import{Ii as a,Zr as i,it as p}from"./esm-
|
|
1
|
+
import{o}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{c as r,i as s,r as e,t as n}from"./tslib.es6-TRdqp4ac.js";import{Ii as a,Zr as i,it as p}from"./esm-DMJQA23h.js";import{nt as l}from"./esm-Dgr2t9Jm.js";var c=/* @__PURE__ */o(t()),m=function(o){function t(){return null!==o&&o.apply(this,arguments)||this}return s(t,o),t.prototype.render=function(){var o=this.props,t=o.render,s=o.body,e=o.level,p=o.icon,m=o.showIcon,d=o.actions,h=r(o,["render","body","level","icon","showIcon","actions"]);i(e)&&(e=a(e,this.props.data)),i(p)&&(p=a(p,this.props.data)),i(m)&&(m=a(m,this.props.data));var u=d?c.isValidElement(d)?d:t("alert-actions",d):null;return c.createElement(l,n({},h,{level:e,icon:p,showIcon:m,actions:u}),t("body",s))},e([p({type:"alert"})],t)}(c.Component);export{m as AlertRenderer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{i as r,o as s,r as n,s as a,t as i,u as o}from"./tslib.es6-TRdqp4ac.js";import{Nn as c,Xr as l,it as p,xr as u}from"./esm-
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{i as r,o as s,r as n,s as a,t as i,u as o}from"./tslib.es6-TRdqp4ac.js";import{Nn as c,Xr as l,it as p,xr as u}from"./esm-DMJQA23h.js";import{U as d,W as f}from"./esm-Dgr2t9Jm.js";var h=/* @__PURE__ */e(t()),m=function(e){function t(t){var r=e.call(this,t)||this,s=t.links,n=0;if(void 0!==t.active)n=t.active;else{var a=r.getActiveSection(s,t.active,null);n=a&&a.href?a.href:s[0]&&s[0].href||0}return r.state={active:n},r}return r(t,e),t.prototype.getActiveSection=function(e,t,r){var s=this;return r||(e.forEach(function(e){e.href===t?r=e:e.children&&s.getActiveSection(e.children,t,r)}),r)},t.prototype.handleSelect=function(e){this.setState({active:e})},t.prototype.locateTo=function(e){var t=this.props.links;Array.isArray(t)&&t[e]&&this.setState({active:t[e].href||e})},t.prototype.renderSections=function(e,t){var r=this,s=this.props;s.classnames,s.classPrefix;var n=s.sectionRender,c=s.render,p=s.data;e=Array.isArray(e)?e:[e];var f=[];return e.forEach(function(e,s){if(u(e,p)){var m=(t?t+"-":"")+s;f.push(h.createElement(d,i({},e,{title:l(e.title,p),key:m,name:e.href||m}),r.renderSection?r.renderSection(e,r.props,m):n?n(e,r.props,m):c("section/".concat(m),e.body||""))),e.children&&f.push.apply(f,o([],a(r.renderSections(e.children,m)),!1))}}),f.filter(function(e){return!!e})},t.prototype.render=function(){var e=this.props,t=e.classnames,r=e.classPrefix,s=e.className,n=e.style,a=e.linkClassName,i=e.sectionClassName,o=e.direction;e.sectionRender,e.render,e.data;var c=this.props.links;if(!c)return null;var l=this.renderSections(c);return h.createElement(f,{classPrefix:r,classnames:t,className:s,style:n,linkClassName:a,sectionClassName:i,onSelect:this.handleSelect,active:this.state.active,direction:o},l)},t.defaultProps={className:"",linkClassName:"",sectionClassName:""},n([c,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],t.prototype,"handleSelect",null),n([c,s("design:type",Function),s("design:paramtypes",[Number]),s("design:returntype",void 0)],t.prototype,"locateTo",null),t}(h.Component),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),n([p({type:"anchor-nav"})],t)}(m);export{v as AnchorNavRenderer,m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{a,i as n,n as r,o,r as s}from"./tslib.es6-TRdqp4ac.js";import{Ft as i,Nn as l,Pt as c,Xr as d,_t as u,an as p,dt as m,it as h,sn as v}from"./esm-DMJQA23h.js";import{It as f,Ut as g,vt as b}from"./esm-Dgr2t9Jm.js";import{a as y,c as E,s as N}from"./_castFunction-CQMNP8A1.js";var P=/* @__PURE__ */e(t()),B=function(e){function t(t){var a,n,r,o=this;o=e.call(this,t)||this;var s=t.store;return s.syncProps(t,void 0,["pages"]),s.updateActivePage(Object.assign({},null!==(a=t.env)&&void 0!==a?a:{},{showFullBreadcrumbPath:null!==(n=t.showFullBreadcrumbPath)&&void 0!==n&&n,showBreadcrumbHomePath:null===(r=t.showBreadcrumbHomePath)||void 0===r||r})),t.env.watchRouteChange&&(o.unWatchRouteChange=t.env.watchRouteChange(function(){var e,a,n;return s.updateActivePage(Object.assign({},null!==(e=t.env)&&void 0!==e?e:{},{showFullBreadcrumbPath:null!==(a=t.showFullBreadcrumbPath)&&void 0!==a&&a,showBreadcrumbHomePath:null===(n=t.showBreadcrumbHomePath)||void 0===n||n}))})),o}return n(t,e),t.prototype.componentDidMount=function(){return r(this,void 0,void 0,function(){var e,t,n;return a(this,function(a){switch(a.label){case 0:return e=this.props,t=e.data,[4,(0,e.dispatchEvent)("init",t,this)];case 1:return(null==(n=a.sent())?void 0:n.prevented)||this.reload(),[2]}})})},t.prototype.componentDidUpdate=function(e){var t,n,o;return r(this,void 0,void 0,function(){var r,s;return a(this,function(a){return r=this.props,(s=r.store).syncProps(r,e,["pages"]),p(e.api,r.api,e.data,r.data)?this.reload():r.location&&r.location!==e.location&&s.updateActivePage(Object.assign({},null!==(t=r.env)&&void 0!==t?t:{},{showFullBreadcrumbPath:null!==(n=r.showFullBreadcrumbPath)&&void 0!==n&&n,showBreadcrumbHomePath:null===(o=r.showBreadcrumbHomePath)||void 0===o||o})),[2]})})},t.prototype.componentWillUnmount=function(){var e;null===(e=this.unWatchRouteChange)||void 0===e||e.call(this)},t.prototype.reload=function(e,t,n,o,s){return r(this,void 0,void 0,function(){var e,n,r,o,l,d,u,p,m,h;return a(this,function(a){switch(a.label){case 0:return t?[2,this.receive(t,void 0,s)]:(e=this.props,n=e.api,r=e.store,o=e.env,l=e.showFullBreadcrumbPath,d=void 0!==l&&l,u=e.showBreadcrumbHomePath,p=void 0===u||u,m=e.locale,v(n,r.data)?[4,r.fetchInitData(n,r.data,{})]:[3,2]);case 1:h=a.sent(),o.replaceText&&(h.data=i(h.data,o.replaceText,o.replaceTextIgnoreKeys)),(null==h?void 0:h.data.pages)&&(h.data=c(h.data,m),r.setPages(h.data.pages),r.updateActivePage(Object.assign({},null!=o?o:{},{showFullBreadcrumbPath:d,showBreadcrumbHomePath:p}))),a.label=2;case 2:return[2,r.data]}})})},t.prototype.receive=function(e,t,n){return r(this,void 0,void 0,function(){return a(this,function(t){return this.props.store.updateData(e,void 0,n),[2,this.reload()]})})},t.prototype.resolveDefinitions=function(e){var t,a=this.props,n=a.resolveDefinitions,r=null===(t=a.store.schema)||void 0===t?void 0:t.definitions;return(null==r?void 0:r[e])||n(e)},t.prototype.handleNavClick=function(e){e.preventDefault();var t=this.props.store,a=this.props.env,n=e.currentTarget.getAttribute("href");t.updateOffScreen(!1),a.jumpTo(n,void 0,this.props.data)},t.prototype.renderHeader=function(){var e=this.props,t=e.classnames,a=e.brandName,n=e.header,r=e.render,o=e.store,s=e.logo,i=e.env;return n||s||a?P.createElement(P.Fragment,null,P.createElement("div",{className:t("Layout-brandBar")},P.createElement("div",{onClick:o.toggleOffScreen,className:t("Layout-offScreenBtn")},P.createElement("i",{className:"bui-icon iconfont icon-collapse"})),P.createElement("div",{className:t("Layout-brand")},s&&~s.indexOf("<svg")?P.createElement(N,{className:t("AppLogo-html"),html:s,filterHtml:i.filterHtml}):s?P.createElement("img",{className:t("AppLogo"),src:s}):P.createElement("span",{className:"visible-folded "},null==a?void 0:a.substring(0,1)),P.createElement("span",{className:"hidden-folded m-l-sm"},a))),P.createElement("div",{className:t("Layout-headerBar")},P.createElement("a",{onClick:o.toggleFolded,type:"button",className:t("AppFoldBtn")},P.createElement("i",{className:"fa fa-".concat(o.folded?"indent":"dedent"," fa-fw")})),n?r("header",n):null)):null},t.prototype.renderAside=function(){var e=this,t=this.props,a=t.store,n=t.env,r=t.asideBefore,o=t.asideAfter,s=t.render,i=t.data;return P.createElement(P.Fragment,null,r?s("aside-before",r):null,P.createElement(f,{navigations:a.navigations,renderLink:function(t,n){var r=t.link;t.active;var o=t.toggleExpand,s=t.classnames,l=t.depth,c=t.subHeader,u=[];if(!1===r.visible)return null;!c&&r.children&&r.children.some(function(e){return null==e?void 0:e.visible})&&u.push(P.createElement("span",{key:"expand-toggle",className:s("AsideNav-itemArrow"),onClick:function(e){return o(r,e)}}));var p="string"==typeof r.badge?d(r.badge,i):r.badge;return null!=p&&u.push(P.createElement("b",{key:"badge",className:s("AsideNav-itemBadge",r.badgeClassName||"bg-info")},p)),!c&&r.icon?u.push(P.createElement(E,{key:"icon",cx:s,icon:r.icon,className:"AsideNav-itemIcon"})):a.folded&&1===l&&!c&&u.push(P.createElement("i",{key:"icon",className:s("AsideNav-itemIcon",r.children?"fa fa-folder":"fa fa-info")})),u.push(P.createElement("span",{className:s("AsideNav-itemLabel"),key:"label"},"string"==typeof r.label?d(r.label,i):r.label)),r.path?/^https?\:/.test(r.path)?P.createElement("a",{target:"_blank",key:"link",href:r.path,rel:"noopener"},u):P.createElement("a",{key:"link",onClick:e.handleNavClick,href:r.path||r.children&&r.children[0].path},u):P.createElement("a",{key:"link",onClick:r.children?function(){return o(r)}:void 0},u)},isActive:function(e){return!!n.isCurrentUrl(null==e?void 0:e.path,e)}}),o?s("aside-before",o):null)},t.prototype.renderFooter=function(){var e=this.props,t=e.render,a=e.footer;return a?t("footer",a):null},t.prototype.render=function(){var e,t=this,a=this.props,n=a.classnames,r=a.store,o=a.render,s=a.showBreadcrumb,i=void 0===s||s,l=a.loadingConfig;return P.createElement(b,{header:this.renderHeader(),aside:this.renderAside(),footer:this.renderFooter(),folded:r.folded,offScreen:r.offScreen,contentClassName:n("AppContent")},r.activePage&&r.schema?P.createElement(P.Fragment,null,i&&r.bcn.length?P.createElement("ul",{className:n("AppBcn")},r.bcn.map(function(e,a){return P.createElement("li",{key:a,className:n("AppBcn-item")},e.path?P.createElement("a",{href:e.path,onClick:t.handleNavClick},e.label):a!==r.bcn.length-1?P.createElement("a",null,e.label):e.label)})):null,P.createElement("div",{className:n("AppBody")},o("page",r.schema,{key:"".concat(null===(e=r.activePage)||void 0===e?void 0:e.id,"-").concat(r.schemaKey),data:r.pageData,resolveDefinitions:this.resolveDefinitions}))):r.pages&&!r.activePage?P.createElement(g,null,P.createElement("div",{className:"text-center"},"页面不存在")):null,P.createElement(y,{loadingConfig:l,overlay:!0,show:r.loading||!r.pages,size:"lg"}))},t.propsList=["brandName","logo","header","asideBefore","asideAfter","pages","footer"],t.defaultProps={},s([l,o("design:type",Function),o("design:paramtypes",[String]),o("design:returntype",void 0)],t.prototype,"resolveDefinitions",null),s([l,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"handleNavClick",null),t}(P.Component),k=function(e){function t(t,a){var n=e.call(this,t)||this;return a.registerComponent(n),n}return n(t,e),t.prototype.componentWillUnmount=function(){this.context.unRegisterComponent(this),e.prototype.componentWillUnmount.call(this)},t.prototype.setData=function(e,t){return this.props.store.updateData(e,void 0,t)},t.prototype.getData=function(){return this.props.store.data},t.contextType=m,s([h({type:"app",storeType:u.name}),o("design:paramtypes",[Object,Object])],t)}(B);export{B as App,k as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{i as n,o,r as a}from"./tslib.es6-TRdqp4ac.js";import{$n as s,Nn as i,Xr as r,it as u,zn as p}from"./esm-DMJQA23h.js";import{C as l}from"./function-AxX-od3p.js";import"./esm-Dgr2t9Jm.js";import{c}from"./_castFunction-CQMNP8A1.js";var d=/* @__PURE__ */e(t()),m=/* @__PURE__ */e(l()),y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={src:s(t.props,function(e){return e.src?r(e.src,e.data,"| raw"):void 0})||"",isReady:!1,muted:!1,playing:!1,played:0,seeking:!1,volume:.8,prevVolume:.8,loaded:0,playbackRate:1,showHandlePlaybackRate:!1,showHandleVolume:!1},t}return n(t,e),t.prototype.componentWillUnmount=function(){clearTimeout(this.progressTimeout),clearTimeout(this.durationTimeout)},t.prototype.componentDidMount=function(){var e=!!this.props.autoPlay;this.setState({playing:e},this.progress)},t.prototype.componentDidUpdate=function(e){var t=this,n=this.props;p(n,e,function(e){return t.setState({src:e,playing:!1},function(){t.audio.load(),t.progress()})},function(e){return e.src?r(e.src,e.data,"| raw"):void 0})},t.prototype.progress=function(){if(clearTimeout(this.progressTimeout),this.state.src&&this.audio){var e=(this.audio.currentTime||0)/this.audio.duration,t=this.state.playing;t=!(1==e||!t),this.setState({played:e,playing:t}),this.progressTimeout=setTimeout(this.progress,this.props.progressInterval/this.state.playbackRate)}},t.prototype.audioRef=function(e){this.audio=e},t.prototype.load=function(){this.setState({isReady:!0})},t.prototype.handlePlaybackRate=function(e){this.audio.playbackRate=e,this.setState({playbackRate:e,showHandlePlaybackRate:!1})},t.prototype.handleMute=function(){if(this.state.src){var e=this.state,t=e.muted,n=e.prevVolume,o=t?n:0;this.audio.muted=!t,this.setState({muted:!t,volume:o})}},t.prototype.handlePlaying=function(){if(this.state.src){var e=this.state.playing;e?this.audio.pause():this.audio.play(),this.setState({playing:!e})}},t.prototype.getCurrentTime=function(){if(!this.audio||!this.state.src||!this.state.isReady)return"0:00";var e=this.audio.duration,t=this.state.played;return this.formatTime(e*(t||0))},t.prototype.getDuration=function(){if(!this.audio||!this.state.src)return"0:00";if(!this.state.isReady)return this.onDurationCheck(),"0:00";var e=this.audio,t=e.duration,n=e.seekable;return t===1/0&&n.length>0?n.end(n.length-1):this.formatTime(t)},t.prototype.onDurationCheck=function(){clearTimeout(this.durationTimeout),this.audio&&this.audio.duration||(this.durationTimeout=setTimeout(this.onDurationCheck,500))},t.prototype.onSeekChange=function(e){if(this.state.src){var t=e.target.value;this.setState({played:t})}},t.prototype.onSeekMouseDown=function(){this.setState({seeking:!0})},t.prototype.onSeekMouseUp=function(e){if(this.state.src&&this.state.seeking){var t=e.target.value,n=this.audio.duration;this.audio.currentTime=n*t;var o=this.props.loop,a=this.state.playing;a=!!(t<1||o)&&a,this.setState({playing:a,seeking:!1})}},t.prototype.setVolume=function(e){if(this.state.src){var t=e.target.value;this.audio.volume=t,this.setState({volume:t,prevVolume:t})}},t.prototype.formatTime=function(e){var t=/* @__PURE__ */new Date(1e3*e),n=t.getUTCHours(),o=isNaN(t.getUTCMinutes())?0:t.getUTCMinutes(),a=isNaN(t.getUTCSeconds())?"00":this.pad(t.getUTCSeconds());return n?"".concat(n,":").concat(this.pad(o),":").concat(a):"".concat(o,":").concat(a)},t.prototype.pad=function(e){return("0"+e).slice(-2)},t.prototype.toggleHandlePlaybackRate=function(){this.state.src&&this.setState({showHandlePlaybackRate:!this.state.showHandlePlaybackRate})},t.prototype.toggleHandleVolume=function(e){this.state.src&&this.setState({showHandleVolume:e})},t.prototype.renderRates=function(){var e=this,t=this.props,n=t.rates,o=t.classnames,a=this.state,s=a.showHandlePlaybackRate,i=a.playbackRate;return n&&n.length?s?d.createElement("div",{className:o("Audio-rateControl")},n.map(function(t,n){return d.createElement("div",{key:n,className:o("Audio-rateControlItem"),onClick:function(){return e.handlePlaybackRate(t)}},"x",t.toFixed(1))})):d.createElement("div",{className:o("Audio-rates"),onClick:this.toggleHandlePlaybackRate},"x",i.toFixed(1)):null},t.prototype.renderPlay=function(){var e=this.props.classnames,t=this.state.playing;return d.createElement("div",{className:e("Audio-play"),onClick:this.handlePlaying},t?d.createElement(c,{icon:"pause",className:"icon"}):d.createElement(c,{icon:"play",className:"icon"}))},t.prototype.renderTime=function(){var e=this.props.classnames;return d.createElement("div",{className:e("Audio-times")},this.getCurrentTime()," / ",this.getDuration())},t.prototype.renderProcess=function(){var e=this.props.classnames,t=this.state.played;return d.createElement("div",{className:e("Audio-process")},d.createElement("input",{type:"range",min:0,max:1,step:"any",value:t||0,onMouseDown:this.onSeekMouseDown,onChange:this.onSeekChange,onMouseUp:this.onSeekMouseUp}))},t.prototype.renderVolume=function(){var e=this,t=this.props.classnames,n=this.state,o=n.volume;return n.showHandleVolume?d.createElement("div",{className:t("Audio-volumeControl"),onMouseLeave:function(){return e.toggleHandleVolume(!1)}},d.createElement("div",{className:t("Audio-volumeControlIcon"),onClick:this.handleMute},o>0?d.createElement(c,{icon:"volume",className:"icon"}):d.createElement(c,{icon:"mute",className:"icon"})),d.createElement("input",{type:"range",min:0,max:1,step:"any",value:o,onChange:this.setVolume})):d.createElement("div",{className:t("Audio-volume"),onMouseEnter:function(){return e.toggleHandleVolume(!0)}},o>0?d.createElement(c,{icon:"volume",className:"icon"}):d.createElement(c,{icon:"mute",className:"icon"}))},t.prototype.render=function(){var e=this,t=this.props,n=t.className,o=t.style,a=t.inline,s=t.autoPlay,i=t.loop,r=t.controls,u=t.classnames,p=this.state,l=p.muted,c=p.src;return d.createElement("div",{className:u("Audio",n,a?"Audio--inline":""),style:o},d.createElement("audio",{className:u("Audio-original"),ref:this.audioRef,onCanPlay:this.load,autoPlay:s,controls:!0,muted:l,loop:i},d.createElement("source",{src:c})),d.createElement("div",{className:u("Audio-controls")},r&&r.map(function(t,n){var o=t="render"+(0,m.default)(t);return d.createElement(d.Fragment,{key:n},e[o]())})))},t.defaultProps={inline:!0,autoPlay:!1,playbackRate:1,loop:!1,rates:[],progressInterval:1e3,controls:["rates","play","time","process","volume"]},a([i,o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],t.prototype,"progress",null),a([i,o("design:type",Function),o("design:paramtypes",[HTMLMediaElement]),o("design:returntype",void 0)],t.prototype,"audioRef",null),a([i,o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],t.prototype,"load",null),a([i,o("design:type",Function),o("design:paramtypes",[Number]),o("design:returntype",void 0)],t.prototype,"handlePlaybackRate",null),a([i,o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],t.prototype,"handleMute",null),a([i,o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],t.prototype,"handlePlaying",null),a([i,o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],t.prototype,"getCurrentTime",null),a([i,o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],t.prototype,"getDuration",null),a([i,o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],t.prototype,"onDurationCheck",null),a([i,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"onSeekChange",null),a([i,o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],t.prototype,"onSeekMouseDown",null),a([i,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"onSeekMouseUp",null),a([i,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"setVolume",null),a([i,o("design:type",Function),o("design:paramtypes",[Number]),o("design:returntype",void 0)],t.prototype,"formatTime",null),a([i,o("design:type",Function),o("design:paramtypes",[Number]),o("design:returntype",void 0)],t.prototype,"pad",null),a([i,o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],t.prototype,"toggleHandlePlaybackRate",null),a([i,o("design:type",Function),o("design:paramtypes",[Boolean]),o("design:returntype",void 0)],t.prototype,"toggleHandleVolume",null),t}(d.Component),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([u({type:"audio"})],t)}(y);export{y as Audio,h as AudioRenderer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as e}from"./react-CWkhIp2c.js";import{i as n,o as s,r}from"./tslib.es6-TRdqp4ac.js";import{Ii as a,Nn as o,Zr as i,it as p}from"./esm-
|
|
1
|
+
import{o as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as e}from"./react-CWkhIp2c.js";import{i as n,o as s,r}from"./tslib.es6-TRdqp4ac.js";import{Ii as a,Nn as o,Zr as i,it as p}from"./esm-DMJQA23h.js";import{Ft as l,R as c}from"./esm-Dgr2t9Jm.js";var u=/* @__PURE__ */t(e()),d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.handleClick=function(t){var e=this.props;(0,e.dispatchEvent)(t,e.data)},e.prototype.handleMouseEnter=function(t){var e=this.props;(0,e.dispatchEvent)(t,e.data)},e.prototype.handleMouseLeave=function(t){var e=this.props;(0,e.dispatchEvent)(t,e.data)},e.prototype.render=function(){var t=this.props,e=t.style,n=void 0===e?{}:e,s=t.className,r=t.classnames,o=t.src,p=t.defaultAvatar,c=t.icon,d=void 0===c?"fa fa-user":c,h=t.fit,y=t.shape,m=t.size,f=t.text,v=t.gap,g=t.alt,E=t.draggable,j=t.crossOrigin,M=t.onError,b=t.data,C=function(){return!1};if("string"==typeof M)try{C=new Function("event",M)}catch(F){console.warn(M,F)}return i(o)&&(o=a(o,b,"| raw")),i(f)&&(f=a(f,b)),i(d)&&(d=a(d,b)),u.createElement(l,{style:n,className:s,classnames:r,src:o||p,icon:d,fit:h,shape:y,size:m,text:f,gap:v,alt:g,draggable:E,crossOrigin:j,onError:C,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave})},r([o,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],e.prototype,"handleClick",null),r([o,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],e.prototype,"handleMouseEnter",null),r([o,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],e.prototype,"handleMouseLeave",null),e}(u.Component),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),r([p({type:"avatar"}),c],e)}(d);export{d as AvatarField,h as AvatarFieldRenderer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as e}from"./react-CWkhIp2c.js";import{i as r,r as s}from"./tslib.es6-TRdqp4ac.js";import{$n as n,it as o}from"./esm-DMJQA23h.js";var a=/* @__PURE__ */t(e()),i=a.lazy(function(){return import("./BarCode-uhJMrOnK.js")}),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.render=function(){var t=this.props,e=t.className,r=t.style;t.width,t.height;var s=t.classnames,o=t.options,l=n(this.props);return a.createElement(a.Suspense,{fallback:a.createElement("div",null,"...")},a.createElement("div",{"data-testid":"barcode",className:s("BarCode",e),style:r},a.createElement(i,{value:l,options:o})))},e}(a.Component),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),s([o({type:"barcode"})],e)}(l);export{l as BarCodeField,p as BarCodeFieldRenderer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as t,t as e}from"./rolldown-runtime-DXzHzmmG.js";import{t as n}from"./react-CWkhIp2c.js";import{i as r}from"./tslib.es6-TRdqp4ac.js";import{tt as o}from"./esm-WMdHSo6z.js";var i=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e,this.text=n.text||e,this.options=n}}),a=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CODE39=void 0;var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=t.toUpperCase(),n.mod43&&(t+=function(t){return o[t]}(function(t){for(var e=0,n=0;n<t.length;n++)e+=f(t[n]);return e%43}(t))),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"encode",value:function(){for(var t=u("*"),e=0;e<this.data.length;e++)t+=u(this.data[e])+"0";return{data:t+=u("*"),text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),e}(((e=i())&&e.__esModule?e:{default:e}).default),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],a=[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 u(t){return function(t){return a[t].toString(2)}(f(t))}function f(t){return o.indexOf(t)}t.CODE39=r}),u=/* @__PURE__ */e(t=>{var e;function n(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(t,"__esModule",{value:!0});var r=t.SET_A=0,o=t.SET_B=1,i=t.SET_C=2;t.SHIFT=98;var a=t.START_A=103,u=t.START_B=104,f=t.START_C=105;t.MODULO=103,t.STOP=106,t.FNC1=207,t.SET_BY_CODE=(n(e={},a,r),n(e,u,o),n(e,f,i),e),t.SWAP={101:r,100:o,99:i},t.A_START_CHAR=String.fromCharCode(208),t.B_START_CHAR=String.fromCharCode(209),t.C_START_CHAR=String.fromCharCode(210),t.A_CHARS="[\0-_È-Ï]",t.B_CHARS="[ -È-Ï]",t.C_CHARS="(Ï*[0-9]{2}Ï*)",t.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]}),f=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=(e=i())&&e.__esModule?e:{default:e},o=u(),a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.substring(1),n));return r.bytes=t.split("").map(function(t){return t.charCodeAt(0)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.bytes,n=t.shift()-105,r=o.SET_BY_CODE[n];if(void 0===r)throw new RangeError("The encoding does not start with a start character.");!0===this.shouldEncodeAsEan128()&&t.unshift(o.FNC1);var i=e.next(t,1,r);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:e.getBar(n)+i.result+e.getBar((i.checksum+n)%o.MODULO)+e.getBar(o.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var t=this.options.ean128||!1;return"string"==typeof t&&(t="true"===t.toLowerCase()),t}}],[{key:"getBar",value:function(t){return o.BARS[t]?o.BARS[t].toString():""}},{key:"correctIndex",value:function(t,e){if(e===o.SET_A){var n=t.shift();return n<32?n+64:n-32}return e===o.SET_B?t.shift()-32:10*(t.shift()-48)+t.shift()-48}},{key:"next",value:function(t,n,r){if(!t.length)return{result:"",checksum:0};var i=void 0,a=void 0;if(t[0]>=200){a=t.shift()-105;var u=o.SWAP[a];void 0!==u?i=e.next(t,n+1,u):(r!==o.SET_A&&r!==o.SET_B||a!==o.SHIFT||(t[0]=r===o.SET_A?t[0]>95?t[0]-96:t[0]:t[0]<32?t[0]+96:t[0]),i=e.next(t,n+1,r))}else a=e.correctIndex(t,r),i=e.next(t,n+1,r);var f=a*n;return{result:e.getBar(a)+i.result,checksum:f+i.checksum}}}]),e}(r.default);t.default=a}),c=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=u(),n=function(t){return t.match(new RegExp("^"+e.A_CHARS+"*"))[0].length},r=function(t){return t.match(new RegExp("^"+e.B_CHARS+"*"))[0].length},o=function(t){return t.match(new RegExp("^"+e.C_CHARS+"*"))[0]};function i(t,n){var r=n?e.A_CHARS:e.B_CHARS,o=t.match(new RegExp("^("+r+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(o)return o[1]+String.fromCharCode(204)+a(t.substring(o[1].length));var u=t.match(new RegExp("^"+r+"+"))[0];return u.length===t.length?t:u+String.fromCharCode(n?205:206)+i(t.substring(u.length),!n)}function a(t){var e=o(t),a=e.length;if(a===t.length)return t;t=t.substring(a);var u=n(t)>=r(t);return e+String.fromCharCode(u?206:205)+i(t,u)}t.default=function(t){var u=void 0;if(o(t).length>=2)u=e.C_START_CHAR+a(t);else{var f=n(t)>r(t);u=(f?e.A_START_CHAR:e.B_START_CHAR)+i(t,f)}return u.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})}}),l=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=r(f()),n=r(c());function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var i=function(t){function e(t,r){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(t))var i=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,n.default)(t),r));else i=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,r));return o(i)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(e.default);t.default=i}),s=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=(e=f())&&e.__esModule?e:{default:e},o=u(),i=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,o.A_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return new RegExp("^"+o.A_CHARS+"+$").test(this.data)}}]),e}(r.default);t.default=i}),p=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=(e=f())&&e.__esModule?e:{default:e},o=u(),i=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,o.B_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return new RegExp("^"+o.B_CHARS+"+$").test(this.data)}}]),e}(r.default);t.default=i}),d=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=(e=f())&&e.__esModule?e:{default:e},o=u(),i=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,o.C_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return new RegExp("^"+o.C_CHARS+"+$").test(this.data)}}]),e}(r.default);t.default=i}),h=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CODE128C=t.CODE128B=t.CODE128A=t.CODE128=void 0;var e=i(l()),n=i(s()),r=i(p()),o=i(d());function i(t){return t&&t.__esModule?t:{default:t}}t.CODE128=e.default,t.CODE128A=n.default,t.CODE128B=r.default,t.CODE128C=o.default}),y=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SIDE_BIN="101",t.MIDDLE_BIN="01010",t.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"]},t.EAN2_STRUCTURE=["LL","LG","GL","GG"],t.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],t.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]}),b=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=y();t.default=function(t,n,r){var o=t.split("").map(function(t,r){return e.BINARIES[n[r]]}).map(function(e,n){return e?e[t[n]]:""});if(r){var i=t.length-1;o=o.map(function(t,e){return e<i?t+r:t})}return o.join("")}}),v=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=y(),r=o(b());function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function o(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e));return n.fontSize=!e.flat&&e.fontSize>10*e.width?10*e.width:e.fontSize,n.guardHeight=e.height+n.fontSize/2+e.textMargin,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),e(o,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(t,e){return this.text.substr(t,e)}},{key:"leftEncode",value:function(t,e){return(0,r.default)(t,e)}},{key:"rightText",value:function(t,e){return this.text.substr(t,e)}},{key:"rightEncode",value:function(t,e){return(0,r.default)(t,e)}},{key:"encodeGuarded",value:function(){var t={fontSize:this.fontSize},e={height:this.guardHeight};return[{data:n.SIDE_BIN,options:e},{data:this.leftEncode(),text:this.leftText(),options:t},{data:n.MIDDLE_BIN,options:e},{data:this.rightEncode(),text:this.rightText(),options:t},{data:n.SIDE_BIN,options:e}]}},{key:"encodeFlat",value:function(){return{data:[n.SIDE_BIN,this.leftEncode(),n.MIDDLE_BIN,this.rightEncode(),n.SIDE_BIN].join(""),text:this.text}}}]),o}(o(i()).default);t.default=a}),_=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},o=y(),i=(e=v())&&e.__esModule?e:{default:e},a=function(t){return(10-t.substr(0,12).split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+3*e:t+e},0)%10)%10},u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{12}$/)&&(t+=a(t));var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.lastChar=n.lastChar,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===a(this.data)}},{key:"leftText",value:function(){return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var t=this.data.substr(1,6),n=o.EAN13_STRUCTURE[this.data[0]];return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,t,n)}},{key:"rightText",value:function(){return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var t=this.data.substr(7,6);return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,t,"RRRRRR")}},{key:"encodeGuarded",value:function(){var t=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(t.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(t.push({data:"00"}),t.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),t}}]),e}(i.default);t.default=u}),g=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},o=(e=v())&&e.__esModule?e:{default:e},i=function(t){return(10-t.substr(0,7).split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+e:t+3*e},0)%10)%10},a=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{7}$/)&&(t+=i(t)),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&+this.data[7]===i(this.data)}},{key:"leftText",value:function(){return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var t=this.data.substr(0,4);return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,t,"LLLL")}},{key:"rightText",value:function(){return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var t=this.data.substr(4,4);return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,t,"RRRR")}}]),e}(o.default);t.default=a}),O=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=y(),r=o(b());function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function o(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),e(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var t,e=n.EAN5_STRUCTURE[t=this.data,t.split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+9*e:t+3*e},0)%10];return{data:"1011"+(0,r.default)(this.data,e,"01"),text:this.text}}}]),o}(o(i()).default);t.default=a}),E=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=y(),r=o(b());function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function o(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),e(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var t=n.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,r.default)(this.data,t,"01"),text:this.text}}}]),o}(o(i()).default);t.default=a}),w=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();t.checksum=a;var n=r(b());function r(t){return t&&t.__esModule?t:{default:t}}var o=function(t){function r(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),-1!==t.search(/^[0-9]{11}$/)&&(t+=a(t));var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e));return n.displayValue=e.displayValue,e.fontSize>10*e.width?n.fontSize=10*e.width:n.fontSize=e.fontSize,n.guardHeight=e.height+n.fontSize/2+e.textMargin,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),e(r,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==a(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t="";return t+="101",t+=(0,n.default)(this.data.substr(0,6),"LLLLLL"),t+="01010",t+=(0,n.default)(this.data.substr(6,6),"RRRRRR"),{data:t+="101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101"+(0,n.default)(this.data[0],"L"),options:{height:this.guardHeight}}),t.push({data:(0,n.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),t.push({data:"01010",options:{height:this.guardHeight}}),t.push({data:(0,n.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),t.push({data:(0,n.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),t}}]),r}(r(i()).default);function a(t){var e,n=0;for(e=1;e<11;e+=2)n+=parseInt(t[e]);for(e=0;e<11;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10}t.default=o}),m=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=a(b()),r=a(i()),o=w();function a(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var f=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],c=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],l=function(t){function r(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r);var n=u(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e));if(n.isValid=!1,-1!==t.search(/^[0-9]{6}$/))n.middleDigits=t,n.upcA=s(t,"0"),n.text=e.text||""+n.upcA[0]+t+n.upcA[n.upcA.length-1],n.isValid=!0;else{if(-1===t.search(/^[01][0-9]{7}$/))return u(n);if(n.middleDigits=t.substring(1,t.length-1),n.upcA=s(n.middleDigits,t[0]),n.upcA[n.upcA.length-1]!==t[t.length-1])return u(n);n.isValid=!0}return n.displayValue=e.displayValue,e.fontSize>10*e.width?n.fontSize=10*e.width:n.fontSize=e.fontSize,n.guardHeight=e.height+n.fontSize/2+e.textMargin,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),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 t="";return t+="101",t+=this.encodeMiddleDigits(),{data:t+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101",options:{height:this.guardHeight}}),t.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),t.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),t}},{key:"encodeMiddleDigits",value:function(){var t=this.upcA[0],e=this.upcA[this.upcA.length-1],r=c[parseInt(e)][parseInt(t)];return(0,n.default)(this.middleDigits,r)}}]),r}(r.default);function s(t,e){for(var n=f[parseInt(t[t.length-1])],r="",i=0,a=0;a<n.length;a++){var u=n[a];r+="X"===u?t[i++]:u}return(r=""+e+r)+(0,o.checksum)(r)}t.default=l}),j=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UPCE=t.UPC=t.EAN2=t.EAN5=t.EAN8=t.EAN13=void 0;var e=u(_()),n=u(g()),r=u(O()),o=u(E()),i=u(w()),a=u(m());function u(t){return t&&t.__esModule?t:{default:t}}t.EAN13=e.default,t.EAN8=n.default,t.EAN5=r.default,t.EAN2=o.default,t.UPC=i.default,t.UPCE=a.default}),x=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.START_BIN="1010",t.END_BIN="11101",t.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]}),P=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=x(),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return-1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var t=this,e=this.data.match(/.{2}/g).map(function(e){return t.encodePair(e)}).join("");return{data:r.START_BIN+e+r.END_BIN,text:this.text}}},{key:"encodePair",value:function(t){var e=r.BINARIES[t[1]];return r.BINARIES[t[0]].split("").map(function(t,n){return("1"===t?"111":"1")+("1"===e[n]?"000":"0")}).join("")}}]),e}(((e=i())&&e.__esModule?e:{default:e}).default);t.default=o}),S=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=(e=P())&&e.__esModule?e:{default:e},o=function(t){var e=t.substr(0,13).split("").map(function(t){return parseInt(t,10)}).reduce(function(t,e,n){return t+e*(3-n%2*2)},0);return 10*Math.ceil(e/10)-e},i=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{13}$/)&&(t+=o(t)),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{14}$/)&&+this.data[13]===o(this.data)}}]),e}(r.default);t.default=i}),C=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ITF14=t.ITF=void 0;var e=r(P()),n=r(S());function r(t){return t&&t.__esModule?t:{default:t}}t.ITF=e.default,t.ITF14=n.default}),A=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"encode",value:function(){for(var t="110",e=0;e<this.data.length;e++){var n=parseInt(this.data[e]).toString(2);n=o(n,4-n.length);for(var r=0;r<n.length;r++)t+="0"==n[r]?"100":"110"}return{data:t+="1001",text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]+$/)}}]),e}(((e=i())&&e.__esModule?e:{default:e}).default);function o(t,e){for(var n=0;n<e;n++)t="0"+t;return t}t.default=r}),T=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mod10=function(t){for(var e=0,n=0;n<t.length;n++){var r=parseInt(t[n]);(n+t.length)%2==0?e+=r:e+=2*r%10+Math.floor(2*r/10)}return(10-e%10)%10},t.mod11=function(t){for(var e=0,n=[2,3,4,5,6,7],r=0;r<t.length;r++){var o=parseInt(t[t.length-1-r]);e+=n[r%n.length]*o}return(11-e%11)%11}}),M=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=(e=A())&&e.__esModule?e:{default:e},r=T(),o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+(0,r.mod10)(t),n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.default);t.default=o}),R=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=(e=A())&&e.__esModule?e:{default:e},r=T(),o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+(0,r.mod11)(t),n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.default);t.default=o}),L=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=(e=A())&&e.__esModule?e:{default:e},r=T(),o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=(0,r.mod10)(t),t+=(0,r.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.default);t.default=o}),k=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=(e=A())&&e.__esModule?e:{default:e},r=T(),o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=(0,r.mod11)(t),t+=(0,r.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.default);t.default=o}),I=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MSI1110=t.MSI1010=t.MSI11=t.MSI10=t.MSI=void 0;var e=a(A()),n=a(M()),r=a(R()),o=a(L()),i=a(k());function a(t){return t&&t.__esModule?t:{default:t}}t.MSI=e.default,t.MSI10=n.default,t.MSI11=r.default,t.MSI1010=o.default,t.MSI1110=i.default}),B=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pharmacode=void 0;var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.number=parseInt(t,10),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"encode",value:function(){for(var t=this.number,e="";!isNaN(t)&&0!=t;)t%2==0?(e="11100"+e,t=(t-2)/2):(e="100"+e,t=(t-1)/2);return{data:e=e.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),e}(((e=i())&&e.__esModule?e:{default:e}).default);t.pharmacode=r}),G=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.codabar=void 0;var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),0===t.search(/^[0-9\-\$\:\.\+\/]+$/)&&(t="A"+t+"A");var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.toUpperCase(),n));return r.text=r.options.text||r.text.replace(/[A-D]/g,""),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var t=[],e=this.getEncodings(),n=0;n<this.data.length;n++)t.push(e[this.data.charAt(n)]),n!==this.data.length-1&&t.push("0");return{text:this.text,data:t.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),e}(((e=i())&&e.__esModule?e:{default:e}).default);t.codabar=r}),D=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.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","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],t.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"],t.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"":["($)","G"],"\b":["($)","H"],"\t":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"":["(%)","A"],"":["(%)","B"],"":["(%)","C"],"":["(%)","D"],"":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"":["(%)","T"]}}),N=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=D(),o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.data.split("").flatMap(function(t){return r.MULTI_SYMBOLS[t]||t}),n=t.map(function(t){return e.getEncoding(t)}).join(""),o=e.checksum(t,20),i=e.checksum(t.concat(o),15);return{text:this.text,data:e.getEncoding("ÿ")+n+e.getEncoding(o)+e.getEncoding(i)+e.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(t){return r.BINARIES[e.symbolValue(t)]}},{key:"getSymbol",value:function(t){return r.SYMBOLS[t]}},{key:"symbolValue",value:function(t){return r.SYMBOLS.indexOf(t)}},{key:"checksum",value:function(t,n){var r=t.slice().reverse().reduce(function(t,r,o){var i=o%n+1;return t+e.symbolValue(r)*i},0);return e.getSymbol(r%47)}}]),e}(((e=i())&&e.__esModule?e:{default:e}).default);t.default=o}),$=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),e}(((e=N())&&e.__esModule?e:{default:e}).default);t.default=r}),X=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CODE93FullASCII=t.CODE93=void 0;var e=r(N()),n=r($());function r(t){return t&&t.__esModule?t:{default:t}}t.CODE93=e.default,t.CODE93FullASCII=n.default}),H=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GenericBarcode=void 0;var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),e}(((e=i())&&e.__esModule?e:{default:e}).default);t.GenericBarcode=r}),z=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=a(),n=h(),r=j(),o=C(),i=I(),u=B(),f=G(),c=X(),l=H();t.default={CODE39:e.CODE39,CODE128:n.CODE128,CODE128A:n.CODE128A,CODE128B:n.CODE128B,CODE128C:n.CODE128C,EAN13:r.EAN13,EAN8:r.EAN8,EAN5:r.EAN5,EAN2:r.EAN2,UPC:r.UPC,UPCE:r.UPCE,ITF14:o.ITF14,ITF:o.ITF,MSI:i.MSI,MSI10:i.MSI10,MSI11:i.MSI11,MSI1010:i.MSI1010,MSI1110:i.MSI1110,pharmacode:u.pharmacode,codabar:f.codabar,CODE93:c.CODE93,CODE93FullASCII:c.CODE93FullASCII,GenericBarcode:l.GenericBarcode}}),V=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};t.default=function(t,n){return e({},t,n)}}),U=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){var e=[];return function t(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)t(n[r]);else n.text=n.text||"",n.data=n.data||"",e.push(n)}(t),e}}),F=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}}),W=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&"string"==typeof t[n=e[n]]&&(t[n]=parseInt(t[n],10));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}}),Y=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.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(){}}}),J=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=r(W()),n=r(Y());function r(t){return t&&t.__esModule?t:{default:t}}t.default=function(t){var r={};for(var o in n.default)n.default.hasOwnProperty(o)&&(t.hasAttribute("jsbarcode-"+o.toLowerCase())&&(r[o]=t.getAttribute("jsbarcode-"+o.toLowerCase())),t.hasAttribute("data-"+o.toLowerCase())&&(r[o]=t.getAttribute("data-"+o.toLowerCase())));return r.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),(0,e.default)(r)}}),Q=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getTotalWidthOfEncodings=t.calculateEncodingAttributes=t.getBarcodePadding=t.getEncodingHeight=t.getMaximumHeightOfEncodings=void 0;var e,n=(e=V())&&e.__esModule?e:{default:e};function r(t,e){return e.height+(e.displayValue&&t.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&e<t){if("center"==n.textAlign)return Math.floor((t-e)/2);if("left"==n.textAlign)return 0;if("right"==n.textAlign)return Math.floor(t-e)}return 0}function i(t,e,n){var r;if(n)r=n;else{if("undefined"==typeof document)return 0;r=document.createElement("canvas").getContext("2d")}r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var o=r.measureText(t);return o?o.width:0}t.getMaximumHeightOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)t[n].height>e&&(e=t[n].height);return e},t.getEncodingHeight=r,t.getBarcodePadding=o,t.calculateEncodingAttributes=function(t,e,a){for(var u=0;u<t.length;u++){var f,c=t[u],l=(0,n.default)(e,c.options);f=l.displayValue?i(c.text,l,a):0;var s=c.data.length*l.width;c.width=Math.ceil(Math.max(f,s)),c.height=r(c,l),c.barcodePadding=o(f,s,l)}},t.getTotalWidthOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n].width;return e}}),Z=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=(e=V())&&e.__esModule?e:{default:e},o=Q(),i=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=e,this.encodings=n,this.options=r}return n(t,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t<this.encodings.length;t++){var e=(0,r.default)(this.options,this.encodings[t].options);this.drawCanvasBarcode(e,this.encodings[t]),this.drawCanvasText(e,this.encodings[t]),this.moveCanvasDrawing(this.encodings[t])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var t=this.canvas.getContext("2d");t.save(),(0,o.calculateEncodingAttributes)(this.encodings,this.options,t);var e=(0,o.getTotalWidthOfEncodings)(this.encodings),n=(0,o.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=e+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,t.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(t.fillStyle=this.options.background,t.fillRect(0,0,this.canvas.width,this.canvas.height)),t.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(t,e){var n,r=this.canvas.getContext("2d"),o=e.data;n="top"==t.textPosition?t.marginTop+t.fontSize+t.textMargin:t.marginTop,r.fillStyle=t.lineColor;for(var i=0;i<o.length;i++){var a=i*t.width+e.barcodePadding;"1"===o[i]?r.fillRect(a,n,t.width,t.height):o[i]&&r.fillRect(a,n,t.width,t.height*o[i])}}},{key:"drawCanvasText",value:function(t,e){var n,r,o=this.canvas.getContext("2d"),i=t.fontOptions+" "+t.fontSize+"px "+t.font;t.displayValue&&(r="top"==t.textPosition?t.marginTop+t.fontSize-t.textMargin:t.height+t.textMargin+t.marginTop+t.fontSize,o.font=i,"left"==t.textAlign||e.barcodePadding>0?(n=0,o.textAlign="left"):"right"==t.textAlign?(n=e.width-1,o.textAlign="right"):(n=e.width/2,o.textAlign="center"),o.fillText(e.text,n,r))}},{key:"moveCanvasDrawing",value:function(t){this.canvas.getContext("2d").translate(t.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),t}();t.default=i}),K=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=(e=V())&&e.__esModule?e:{default:e},o=Q(),i="http://www.w3.org/2000/svg",a=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.svg=e,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return n(t,[{key:"render",value:function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e<this.encodings.length;e++){var n=this.encodings[e],o=(0,r.default)(this.options,n.options),i=this.createGroup(t,o.marginTop,this.svg);this.setGroupOptions(i,o),this.drawSvgBarcode(i,o,n),this.drawSVGText(i,o,n),t+=n.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,o.calculateEncodingAttributes)(this.encodings,this.options);var t=(0,o.getTotalWidthOfEncodings)(this.encodings),e=(0,o.getMaximumHeightOfEncodings)(this.encodings),n=t+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,e),this.options.background&&this.drawRect(0,0,n,e,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(t,e,n){var r,o=n.data;r="top"==e.textPosition?e.fontSize+e.textMargin:0;for(var i=0,a=0,u=0;u<o.length;u++)a=u*e.width+n.barcodePadding,"1"===o[u]?i++:i>0&&(this.drawRect(a-e.width*i,r,e.width*i,e.height,t),i=0);i>0&&this.drawRect(a-e.width*(i-1),r,e.width*i,e.height,t)}},{key:"drawSVGText",value:function(t,e,n){var r,o,a=this.document.createElementNS(i,"text");e.displayValue&&(a.setAttribute("font-family",e.font),a.setAttribute("font-size",e.fontSize),e.fontOptions.includes("bold")&&a.setAttribute("font-weight","bold"),e.fontOptions.includes("italic")&&a.setAttribute("font-style","italic"),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(r=0,a.setAttribute("text-anchor","start")):"right"==e.textAlign?(r=n.width-1,a.setAttribute("text-anchor","end")):(r=n.width/2,a.setAttribute("text-anchor","middle")),a.setAttribute("x",r),a.setAttribute("y",o),a.appendChild(this.document.createTextNode(n.text)),t.appendChild(a))}},{key:"setSvgAttributes",value:function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",i),n.setAttribute("version","1.1")}},{key:"createGroup",value:function(t,e,n){var r=this.document.createElementNS(i,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}},{key:"setGroupOptions",value:function(t,e){t.setAttribute("fill",e.lineColor)}},{key:"drawRect",value:function(t,e,n,r,o){var a=this.document.createElementNS(i,"rect");return a.setAttribute("x",t),a.setAttribute("y",e),a.setAttribute("width",n),a.setAttribute("height",r),o.appendChild(a),a}}]),t}();t.default=a}),q=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.object=e,this.encodings=n,this.options=r}return e(t,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),t}();t.default=n}),tt=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=o(Z()),n=o(K()),r=o(q());function o(t){return t&&t.__esModule?t:{default:t}}t.default={CanvasRenderer:e.default,SVGRenderer:n.default,ObjectRenderer:r.default}}),et=/* @__PURE__ */e(t=>{function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function t(r,o){e(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.name="InvalidInputException",i.symbology=r,i.input=o,i.message='"'+i.input+'" is not a valid input for '+i.symbology,i}return r(t,Error),t}(),i=function(){function t(){e(this,t);var r=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.name="InvalidElementException",r.message="Not supported type to render on",r}return r(t,Error),t}(),a=function(){function t(){e(this,t);var r=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.name="NoElementException",r.message="No element to render on.",r}return r(t,Error),t}();t.InvalidInputException=o,t.InvalidElementException=i,t.NoElementException=a}),nt=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=i(J()),r=i(tt()),o=et();function i(t){return t&&t.__esModule?t:{default:t}}t.default=function t(i){if("string"==typeof i)return function(e){var n=document.querySelectorAll(e);if(0!==n.length){for(var r=[],o=0;o<n.length;o++)r.push(t(n[o]));return r}}(i);if(Array.isArray(i)){for(var a=[],u=0;u<i.length;u++)a.push(t(i[u]));return a}if("undefined"!=typeof HTMLCanvasElement&&i instanceof HTMLImageElement)return f=i,{element:c=document.createElement("canvas"),options:(0,n.default)(f),renderer:r.default.CanvasRenderer,afterRender:function(){f.setAttribute("src",c.toDataURL())}};if(i&&i.nodeName&&"svg"===i.nodeName.toLowerCase()||"undefined"!=typeof SVGElement&&i instanceof SVGElement)return{element:i,options:(0,n.default)(i),renderer:r.default.SVGRenderer};if("undefined"!=typeof HTMLCanvasElement&&i instanceof HTMLCanvasElement)return{element:i,options:(0,n.default)(i),renderer:r.default.CanvasRenderer};if(i&&i.getContext)return{element:i,renderer:r.default.CanvasRenderer};if(i&&"object"===(void 0===i?"undefined":e(i))&&!i.nodeName)return{element:i,renderer:r.default.ObjectRenderer};throw new o.InvalidElementException;var f,c}}),rt=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.api=e}return e(t,[{key:"handleCatch",value:function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}}}]),t}();t.default=n}),ot=/* @__PURE__ */e((t,e)=>{var n=s(z()),r=s(V()),o=s(U()),i=s(F()),a=s(nt()),u=s(W()),f=s(rt()),c=et(),l=s(Y());function s(t){return t&&t.__esModule?t:{default:t}}var p=function(){},d=function(t,e,n){var r=new p;if(void 0===t)throw Error("No element to render on was provided.");return r._renderProperties=(0,a.default)(t),r._encodings=[],r._options=l.default,r._errorHandler=new f.default(r),void 0!==e&&((n=n||{}).format||(n.format=v()),r.options(n)[n.format](e,n).render()),r};for(var h in d.getModule=function(t){return n.default[t]},n.default)n.default.hasOwnProperty(h)&&y(n.default,h);function y(t,e){p.prototype[e]=p.prototype[e.toUpperCase()]=p.prototype[e.toLowerCase()]=function(n,o){var i=this;return i._errorHandler.wrapBarcodeCall(function(){o.text=void 0===o.text?void 0:""+o.text;var a=(0,r.default)(i._options,o);a=(0,u.default)(a);var f=t[e],c=b(n,f,a);return i._encodings.push(c),i})}}function b(t,e,n){var i=new e(t=""+t,n);if(!i.valid())throw new c.InvalidInputException(i.constructor.name,t);var a=i.encode();a=(0,o.default)(a);for(var u=0;u<a.length;u++)a[u].options=(0,r.default)(n,a[u].options);return a}function v(){return n.default.CODE128?"CODE128":Object.keys(n.default)[0]}function _(t,e,n){e=(0,o.default)(e);for(var a=0;a<e.length;a++)e[a].options=(0,r.default)(n,e[a].options),(0,i.default)(e[a].options);(0,i.default)(n),new(0,t.renderer)(t.element,e,n).render(),t.afterRender&&t.afterRender()}p.prototype.options=function(t){return this._options=(0,r.default)(this._options,t),this},p.prototype.blank=function(t){var e=new Array(t+1).join("0");return this._encodings.push({data:e}),this},p.prototype.init=function(){var t;if(this._renderProperties)for(var e in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){t=this._renderProperties[e];var o=(0,r.default)(this._options,t.options);"auto"==o.format&&(o.format=v()),this._errorHandler.wrapBarcodeCall(function(){var e=b(o.value,n.default[o.format.toUpperCase()],o);_(t,e,o)})}},p.prototype.render=function(){if(!this._renderProperties)throw new c.NoElementException;if(Array.isArray(this._renderProperties))for(var t=0;t<this._renderProperties.length;t++)_(this._renderProperties[t],this._encodings,this._options);else _(this._renderProperties,this._encodings,this._options);return this},p.prototype._defaults=l.default,"undefined"!=typeof window&&(window.JsBarcode=d),"undefined"!=typeof jQuery&&(jQuery.fn.JsBarcode=function(t,e){var n=[];return jQuery(this).each(function(){n.push(this)}),d(n,t,e)}),e.exports=d}),it=/* @__PURE__ */t(n()),at=/* @__PURE__ */t(ot()),ut=function(t){function e(e){var n=t.call(this,e)||this;return n.dom=it.createRef(),n}return r(e,t),e.prototype.componentDidUpdate=function(t){this.props.value===t.value&&JSON.stringify(this.props.options)===JSON.stringify(t.options)||this.renderBarCode()},e.prototype.renderBarCode=function(){this.dom.current&&(0,at.default)(this.dom.current,this.props.value,this.props.options)},e.prototype.componentDidMount=function(){this.renderBarCode()},e.prototype.render=function(){return it.createElement("img",{ref:this.dom})},e}(it.Component),ft=o(ut);export{ut as BarCode,ft as default};
|
|
1
|
+
import{o as t,t as e}from"./rolldown-runtime-DXzHzmmG.js";import{t as n}from"./react-CWkhIp2c.js";import{i as r}from"./tslib.es6-TRdqp4ac.js";import{tt as o}from"./esm-DMJQA23h.js";var i=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e,this.text=n.text||e,this.options=n}}),a=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CODE39=void 0;var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t=t.toUpperCase(),n.mod43&&(t+=function(t){return o[t]}(function(t){for(var e=0,n=0;n<t.length;n++)e+=f(t[n]);return e%43}(t))),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"encode",value:function(){for(var t=u("*"),e=0;e<this.data.length;e++)t+=u(this.data[e])+"0";return{data:t+=u("*"),text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),e}(((e=i())&&e.__esModule?e:{default:e}).default),o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],a=[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 u(t){return function(t){return a[t].toString(2)}(f(t))}function f(t){return o.indexOf(t)}t.CODE39=r}),u=/* @__PURE__ */e(t=>{var e;function n(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Object.defineProperty(t,"__esModule",{value:!0});var r=t.SET_A=0,o=t.SET_B=1,i=t.SET_C=2;t.SHIFT=98;var a=t.START_A=103,u=t.START_B=104,f=t.START_C=105;t.MODULO=103,t.STOP=106,t.FNC1=207,t.SET_BY_CODE=(n(e={},a,r),n(e,u,o),n(e,f,i),e),t.SWAP={101:r,100:o,99:i},t.A_START_CHAR=String.fromCharCode(208),t.B_START_CHAR=String.fromCharCode(209),t.C_START_CHAR=String.fromCharCode(210),t.A_CHARS="[\0-_È-Ï]",t.B_CHARS="[ -È-Ï]",t.C_CHARS="(Ï*[0-9]{2}Ï*)",t.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]}),f=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=(e=i())&&e.__esModule?e:{default:e},o=u(),a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.substring(1),n));return r.bytes=t.split("").map(function(t){return t.charCodeAt(0)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.bytes,n=t.shift()-105,r=o.SET_BY_CODE[n];if(void 0===r)throw new RangeError("The encoding does not start with a start character.");!0===this.shouldEncodeAsEan128()&&t.unshift(o.FNC1);var i=e.next(t,1,r);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:e.getBar(n)+i.result+e.getBar((i.checksum+n)%o.MODULO)+e.getBar(o.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var t=this.options.ean128||!1;return"string"==typeof t&&(t="true"===t.toLowerCase()),t}}],[{key:"getBar",value:function(t){return o.BARS[t]?o.BARS[t].toString():""}},{key:"correctIndex",value:function(t,e){if(e===o.SET_A){var n=t.shift();return n<32?n+64:n-32}return e===o.SET_B?t.shift()-32:10*(t.shift()-48)+t.shift()-48}},{key:"next",value:function(t,n,r){if(!t.length)return{result:"",checksum:0};var i=void 0,a=void 0;if(t[0]>=200){a=t.shift()-105;var u=o.SWAP[a];void 0!==u?i=e.next(t,n+1,u):(r!==o.SET_A&&r!==o.SET_B||a!==o.SHIFT||(t[0]=r===o.SET_A?t[0]>95?t[0]-96:t[0]:t[0]<32?t[0]+96:t[0]),i=e.next(t,n+1,r))}else a=e.correctIndex(t,r),i=e.next(t,n+1,r);var f=a*n;return{result:e.getBar(a)+i.result,checksum:f+i.checksum}}}]),e}(r.default);t.default=a}),c=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=u(),n=function(t){return t.match(new RegExp("^"+e.A_CHARS+"*"))[0].length},r=function(t){return t.match(new RegExp("^"+e.B_CHARS+"*"))[0].length},o=function(t){return t.match(new RegExp("^"+e.C_CHARS+"*"))[0]};function i(t,n){var r=n?e.A_CHARS:e.B_CHARS,o=t.match(new RegExp("^("+r+"+?)(([0-9]{2}){2,})([^0-9]|$)"));if(o)return o[1]+String.fromCharCode(204)+a(t.substring(o[1].length));var u=t.match(new RegExp("^"+r+"+"))[0];return u.length===t.length?t:u+String.fromCharCode(n?205:206)+i(t.substring(u.length),!n)}function a(t){var e=o(t),a=e.length;if(a===t.length)return t;t=t.substring(a);var u=n(t)>=r(t);return e+String.fromCharCode(u?206:205)+i(t,u)}t.default=function(t){var u=void 0;if(o(t).length>=2)u=e.C_START_CHAR+a(t);else{var f=n(t)>r(t);u=(f?e.A_START_CHAR:e.B_START_CHAR)+i(t,f)}return u.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})}}),l=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=r(f()),n=r(c());function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var i=function(t){function e(t,r){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),/^[\x00-\x7F\xC8-\xD3]+$/.test(t))var i=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,n.default)(t),r));else i=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,r));return o(i)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(e.default);t.default=i}),s=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=(e=f())&&e.__esModule?e:{default:e},o=u(),i=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,o.A_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return new RegExp("^"+o.A_CHARS+"+$").test(this.data)}}]),e}(r.default);t.default=i}),p=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=(e=f())&&e.__esModule?e:{default:e},o=u(),i=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,o.B_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return new RegExp("^"+o.B_CHARS+"+$").test(this.data)}}]),e}(r.default);t.default=i}),d=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=(e=f())&&e.__esModule?e:{default:e},o=u(),i=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,o.C_START_CHAR+t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return new RegExp("^"+o.C_CHARS+"+$").test(this.data)}}]),e}(r.default);t.default=i}),h=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CODE128C=t.CODE128B=t.CODE128A=t.CODE128=void 0;var e=i(l()),n=i(s()),r=i(p()),o=i(d());function i(t){return t&&t.__esModule?t:{default:t}}t.CODE128=e.default,t.CODE128A=n.default,t.CODE128B=r.default,t.CODE128C=o.default}),y=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SIDE_BIN="101",t.MIDDLE_BIN="01010",t.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"]},t.EAN2_STRUCTURE=["LL","LG","GL","GG"],t.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],t.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]}),b=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=y();t.default=function(t,n,r){var o=t.split("").map(function(t,r){return e.BINARIES[n[r]]}).map(function(e,n){return e?e[t[n]]:""});if(r){var i=t.length-1;o=o.map(function(t,e){return e<i?t+r:t})}return o.join("")}}),v=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=y(),r=o(b());function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function o(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e));return n.fontSize=!e.flat&&e.fontSize>10*e.width?10*e.width:e.fontSize,n.guardHeight=e.height+n.fontSize/2+e.textMargin,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),e(o,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(t,e){return this.text.substr(t,e)}},{key:"leftEncode",value:function(t,e){return(0,r.default)(t,e)}},{key:"rightText",value:function(t,e){return this.text.substr(t,e)}},{key:"rightEncode",value:function(t,e){return(0,r.default)(t,e)}},{key:"encodeGuarded",value:function(){var t={fontSize:this.fontSize},e={height:this.guardHeight};return[{data:n.SIDE_BIN,options:e},{data:this.leftEncode(),text:this.leftText(),options:t},{data:n.MIDDLE_BIN,options:e},{data:this.rightEncode(),text:this.rightText(),options:t},{data:n.SIDE_BIN,options:e}]}},{key:"encodeFlat",value:function(){return{data:[n.SIDE_BIN,this.leftEncode(),n.MIDDLE_BIN,this.rightEncode(),n.SIDE_BIN].join(""),text:this.text}}}]),o}(o(i()).default);t.default=a}),_=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},o=y(),i=(e=v())&&e.__esModule?e:{default:e},a=function(t){return(10-t.substr(0,12).split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+3*e:t+e},0)%10)%10},u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{12}$/)&&(t+=a(t));var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.lastChar=n.lastChar,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===a(this.data)}},{key:"leftText",value:function(){return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var t=this.data.substr(1,6),n=o.EAN13_STRUCTURE[this.data[0]];return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,t,n)}},{key:"rightText",value:function(){return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var t=this.data.substr(7,6);return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,t,"RRRRRR")}},{key:"encodeGuarded",value:function(){var t=r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(t.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(t.push({data:"00"}),t.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),t}}]),e}(i.default);t.default=u}),g=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},o=(e=v())&&e.__esModule?e:{default:e},i=function(t){return(10-t.substr(0,7).split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+e:t+3*e},0)%10)%10},a=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{7}$/)&&(t+=i(t)),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&+this.data[7]===i(this.data)}},{key:"leftText",value:function(){return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var t=this.data.substr(0,4);return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"leftEncode",this).call(this,t,"LLLL")}},{key:"rightText",value:function(){return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var t=this.data.substr(4,4);return r(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"rightEncode",this).call(this,t,"RRRR")}}]),e}(o.default);t.default=a}),O=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=y(),r=o(b());function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function o(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),e(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var t,e=n.EAN5_STRUCTURE[t=this.data,t.split("").map(function(t){return+t}).reduce(function(t,e,n){return n%2?t+9*e:t+3*e},0)%10];return{data:"1011"+(0,r.default)(this.data,e,"01"),text:this.text}}}]),o}(o(i()).default);t.default=a}),E=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=y(),r=o(b());function o(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function o(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,t,e))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),e(o,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var t=n.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,r.default)(this.data,t,"01"),text:this.text}}}]),o}(o(i()).default);t.default=a}),w=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();t.checksum=a;var n=r(b());function r(t){return t&&t.__esModule?t:{default:t}}var o=function(t){function r(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),-1!==t.search(/^[0-9]{11}$/)&&(t+=a(t));var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e));return n.displayValue=e.displayValue,e.fontSize>10*e.width?n.fontSize=10*e.width:n.fontSize=e.fontSize,n.guardHeight=e.height+n.fontSize/2+e.textMargin,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),e(r,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==a(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t="";return t+="101",t+=(0,n.default)(this.data.substr(0,6),"LLLLLL"),t+="01010",t+=(0,n.default)(this.data.substr(6,6),"RRRRRR"),{data:t+="101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101"+(0,n.default)(this.data[0],"L"),options:{height:this.guardHeight}}),t.push({data:(0,n.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),t.push({data:"01010",options:{height:this.guardHeight}}),t.push({data:(0,n.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),t.push({data:(0,n.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),t}}]),r}(r(i()).default);function a(t){var e,n=0;for(e=1;e<11;e+=2)n+=parseInt(t[e]);for(e=0;e<11;e+=2)n+=3*parseInt(t[e]);return(10-n%10)%10}t.default=o}),m=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=a(b()),r=a(i()),o=w();function a(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var f=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],c=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],l=function(t){function r(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r);var n=u(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t,e));if(n.isValid=!1,-1!==t.search(/^[0-9]{6}$/))n.middleDigits=t,n.upcA=s(t,"0"),n.text=e.text||""+n.upcA[0]+t+n.upcA[n.upcA.length-1],n.isValid=!0;else{if(-1===t.search(/^[01][0-9]{7}$/))return u(n);if(n.middleDigits=t.substring(1,t.length-1),n.upcA=s(n.middleDigits,t[0]),n.upcA[n.upcA.length-1]!==t[t.length-1])return u(n);n.isValid=!0}return n.displayValue=e.displayValue,e.fontSize>10*e.width?n.fontSize=10*e.width:n.fontSize=e.fontSize,n.guardHeight=e.height+n.fontSize/2+e.textMargin,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(r,t),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 t="";return t+="101",t+=this.encodeMiddleDigits(),{data:t+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101",options:{height:this.guardHeight}}),t.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),t.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),t}},{key:"encodeMiddleDigits",value:function(){var t=this.upcA[0],e=this.upcA[this.upcA.length-1],r=c[parseInt(e)][parseInt(t)];return(0,n.default)(this.middleDigits,r)}}]),r}(r.default);function s(t,e){for(var n=f[parseInt(t[t.length-1])],r="",i=0,a=0;a<n.length;a++){var u=n[a];r+="X"===u?t[i++]:u}return(r=""+e+r)+(0,o.checksum)(r)}t.default=l}),j=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UPCE=t.UPC=t.EAN2=t.EAN5=t.EAN8=t.EAN13=void 0;var e=u(_()),n=u(g()),r=u(O()),o=u(E()),i=u(w()),a=u(m());function u(t){return t&&t.__esModule?t:{default:t}}t.EAN13=e.default,t.EAN8=n.default,t.EAN5=r.default,t.EAN2=o.default,t.UPC=i.default,t.UPCE=a.default}),x=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.START_BIN="1010",t.END_BIN="11101",t.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]}),P=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=x(),o=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return-1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var t=this,e=this.data.match(/.{2}/g).map(function(e){return t.encodePair(e)}).join("");return{data:r.START_BIN+e+r.END_BIN,text:this.text}}},{key:"encodePair",value:function(t){var e=r.BINARIES[t[1]];return r.BINARIES[t[0]].split("").map(function(t,n){return("1"===t?"111":"1")+("1"===e[n]?"000":"0")}).join("")}}]),e}(((e=i())&&e.__esModule?e:{default:e}).default);t.default=o}),S=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=(e=P())&&e.__esModule?e:{default:e},o=function(t){var e=t.substr(0,13).split("").map(function(t){return parseInt(t,10)}).reduce(function(t,e,n){return t+e*(3-n%2*2)},0);return 10*Math.ceil(e/10)-e},i=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{13}$/)&&(t+=o(t)),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{14}$/)&&+this.data[13]===o(this.data)}}]),e}(r.default);t.default=i}),C=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ITF14=t.ITF=void 0;var e=r(P()),n=r(S());function r(t){return t&&t.__esModule?t:{default:t}}t.ITF=e.default,t.ITF14=n.default}),A=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"encode",value:function(){for(var t="110",e=0;e<this.data.length;e++){var n=parseInt(this.data[e]).toString(2);n=o(n,4-n.length);for(var r=0;r<n.length;r++)t+="0"==n[r]?"100":"110"}return{data:t+="1001",text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]+$/)}}]),e}(((e=i())&&e.__esModule?e:{default:e}).default);function o(t,e){for(var n=0;n<e;n++)t="0"+t;return t}t.default=r}),T=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mod10=function(t){for(var e=0,n=0;n<t.length;n++){var r=parseInt(t[n]);(n+t.length)%2==0?e+=r:e+=2*r%10+Math.floor(2*r/10)}return(10-e%10)%10},t.mod11=function(t){for(var e=0,n=[2,3,4,5,6,7],r=0;r<t.length;r++){var o=parseInt(t[t.length-1-r]);e+=n[r%n.length]*o}return(11-e%11)%11}}),M=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=(e=A())&&e.__esModule?e:{default:e},r=T(),o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+(0,r.mod10)(t),n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.default);t.default=o}),R=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=(e=A())&&e.__esModule?e:{default:e},r=T(),o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t+(0,r.mod11)(t),n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.default);t.default=o}),L=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=(e=A())&&e.__esModule?e:{default:e},r=T(),o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=(0,r.mod10)(t),t+=(0,r.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.default);t.default=o}),k=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=(e=A())&&e.__esModule?e:{default:e},r=T(),o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),t+=(0,r.mod11)(t),t+=(0,r.mod10)(t),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e}(n.default);t.default=o}),I=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MSI1110=t.MSI1010=t.MSI11=t.MSI10=t.MSI=void 0;var e=a(A()),n=a(M()),r=a(R()),o=a(L()),i=a(k());function a(t){return t&&t.__esModule?t:{default:t}}t.MSI=e.default,t.MSI10=n.default,t.MSI11=r.default,t.MSI1010=o.default,t.MSI1110=i.default}),B=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pharmacode=void 0;var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.number=parseInt(t,10),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"encode",value:function(){for(var t=this.number,e="";!isNaN(t)&&0!=t;)t%2==0?(e="11100"+e,t=(t-2)/2):(e="100"+e,t=(t-1)/2);return{data:e=e.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return this.number>=3&&this.number<=131070}}]),e}(((e=i())&&e.__esModule?e:{default:e}).default);t.pharmacode=r}),G=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.codabar=void 0;var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),0===t.search(/^[0-9\-\$\:\.\+\/]+$/)&&(t="A"+t+"A");var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.toUpperCase(),n));return r.text=r.options.text||r.text.replace(/[A-D]/g,""),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var t=[],e=this.getEncodings(),n=0;n<this.data.length;n++)t.push(e[this.data.charAt(n)]),n!==this.data.length-1&&t.push("0");return{text:this.text,data:t.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),e}(((e=i())&&e.__esModule?e:{default:e}).default);t.codabar=r}),D=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.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","-","."," ","$","/","+","%","($)","(%)","(/)","(+)","ÿ"],t.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"],t.MULTI_SYMBOLS={"\0":["(%)","U"],"":["($)","A"],"":["($)","B"],"":["($)","C"],"":["($)","D"],"":["($)","E"],"":["($)","F"],"":["($)","G"],"\b":["($)","H"],"\t":["($)","I"],"\n":["($)","J"],"\v":["($)","K"],"\f":["($)","L"],"\r":["($)","M"],"":["($)","N"],"":["($)","O"],"":["($)","P"],"":["($)","Q"],"":["($)","R"],"":["($)","S"],"":["($)","T"],"":["($)","U"],"":["($)","V"],"":["($)","W"],"":["($)","X"],"":["($)","Y"],"":["($)","Z"],"":["(%)","A"],"":["(%)","B"],"":["(%)","C"],"":["(%)","D"],"":["(%)","E"],"!":["(/)","A"],'"':["(/)","B"],"#":["(/)","C"],"&":["(/)","F"],"'":["(/)","G"],"(":["(/)","H"],")":["(/)","I"],"*":["(/)","J"],",":["(/)","L"],":":["(/)","Z"],";":["(%)","F"],"<":["(%)","G"],"=":["(%)","H"],">":["(%)","I"],"?":["(%)","J"],"@":["(%)","V"],"[":["(%)","K"],"\\":["(%)","L"],"]":["(%)","M"],"^":["(%)","N"],_:["(%)","O"],"`":["(%)","W"],a:["(+)","A"],b:["(+)","B"],c:["(+)","C"],d:["(+)","D"],e:["(+)","E"],f:["(+)","F"],g:["(+)","G"],h:["(+)","H"],i:["(+)","I"],j:["(+)","J"],k:["(+)","K"],l:["(+)","L"],m:["(+)","M"],n:["(+)","N"],o:["(+)","O"],p:["(+)","P"],q:["(+)","Q"],r:["(+)","R"],s:["(+)","S"],t:["(+)","T"],u:["(+)","U"],v:["(+)","V"],w:["(+)","W"],x:["(+)","X"],y:["(+)","Y"],z:["(+)","Z"],"{":["(%)","P"],"|":["(%)","Q"],"}":["(%)","R"],"~":["(%)","S"],"":["(%)","T"]}}),N=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=D(),o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.data.split("").flatMap(function(t){return r.MULTI_SYMBOLS[t]||t}),n=t.map(function(t){return e.getEncoding(t)}).join(""),o=e.checksum(t,20),i=e.checksum(t.concat(o),15);return{text:this.text,data:e.getEncoding("ÿ")+n+e.getEncoding(o)+e.getEncoding(i)+e.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(t){return r.BINARIES[e.symbolValue(t)]}},{key:"getSymbol",value:function(t){return r.SYMBOLS[t]}},{key:"symbolValue",value:function(t){return r.SYMBOLS.indexOf(t)}},{key:"checksum",value:function(t,n){var r=t.slice().reverse().reduce(function(t,r,o){var i=o%n+1;return t+e.symbolValue(r)*i},0);return e.getSymbol(r%47)}}]),e}(((e=i())&&e.__esModule?e:{default:e}).default);t.default=o}),$=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return/^[\x00-\x7f]+$/.test(this.data)}}]),e}(((e=N())&&e.__esModule?e:{default:e}).default);t.default=r}),X=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CODE93FullASCII=t.CODE93=void 0;var e=r(N()),n=r($());function r(t){return t&&t.__esModule?t:{default:t}}t.CODE93=e.default,t.CODE93FullASCII=n.default}),H=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GenericBarcode=void 0;var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),e}(((e=i())&&e.__esModule?e:{default:e}).default);t.GenericBarcode=r}),z=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=a(),n=h(),r=j(),o=C(),i=I(),u=B(),f=G(),c=X(),l=H();t.default={CODE39:e.CODE39,CODE128:n.CODE128,CODE128A:n.CODE128A,CODE128B:n.CODE128B,CODE128C:n.CODE128C,EAN13:r.EAN13,EAN8:r.EAN8,EAN5:r.EAN5,EAN2:r.EAN2,UPC:r.UPC,UPCE:r.UPCE,ITF14:o.ITF14,ITF:o.ITF,MSI:i.MSI,MSI10:i.MSI10,MSI11:i.MSI11,MSI1010:i.MSI1010,MSI1110:i.MSI1110,pharmacode:u.pharmacode,codabar:f.codabar,CODE93:c.CODE93,CODE93FullASCII:c.CODE93FullASCII,GenericBarcode:l.GenericBarcode}}),V=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};t.default=function(t,n){return e({},t,n)}}),U=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){var e=[];return function t(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)t(n[r]);else n.text=n.text||"",n.data=n.data||"",e.push(n)}(t),e}}),F=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){return t.marginTop=t.marginTop||t.margin,t.marginBottom=t.marginBottom||t.margin,t.marginRight=t.marginRight||t.margin,t.marginLeft=t.marginLeft||t.margin,t}}),W=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){var e=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(var n in e)e.hasOwnProperty(n)&&"string"==typeof t[n=e[n]]&&(t[n]=parseInt(t[n],10));return"string"==typeof t.displayValue&&(t.displayValue="false"!=t.displayValue),t}}),Y=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.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(){}}}),J=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=r(W()),n=r(Y());function r(t){return t&&t.__esModule?t:{default:t}}t.default=function(t){var r={};for(var o in n.default)n.default.hasOwnProperty(o)&&(t.hasAttribute("jsbarcode-"+o.toLowerCase())&&(r[o]=t.getAttribute("jsbarcode-"+o.toLowerCase())),t.hasAttribute("data-"+o.toLowerCase())&&(r[o]=t.getAttribute("data-"+o.toLowerCase())));return r.value=t.getAttribute("jsbarcode-value")||t.getAttribute("data-value"),(0,e.default)(r)}}),Q=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getTotalWidthOfEncodings=t.calculateEncodingAttributes=t.getBarcodePadding=t.getEncodingHeight=t.getMaximumHeightOfEncodings=void 0;var e,n=(e=V())&&e.__esModule?e:{default:e};function r(t,e){return e.height+(e.displayValue&&t.text.length>0?e.fontSize+e.textMargin:0)+e.marginTop+e.marginBottom}function o(t,e,n){if(n.displayValue&&e<t){if("center"==n.textAlign)return Math.floor((t-e)/2);if("left"==n.textAlign)return 0;if("right"==n.textAlign)return Math.floor(t-e)}return 0}function i(t,e,n){var r;if(n)r=n;else{if("undefined"==typeof document)return 0;r=document.createElement("canvas").getContext("2d")}r.font=e.fontOptions+" "+e.fontSize+"px "+e.font;var o=r.measureText(t);return o?o.width:0}t.getMaximumHeightOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)t[n].height>e&&(e=t[n].height);return e},t.getEncodingHeight=r,t.getBarcodePadding=o,t.calculateEncodingAttributes=function(t,e,a){for(var u=0;u<t.length;u++){var f,c=t[u],l=(0,n.default)(e,c.options);f=l.displayValue?i(c.text,l,a):0;var s=c.data.length*l.width;c.width=Math.ceil(Math.max(f,s)),c.height=r(c,l),c.barcodePadding=o(f,s,l)}},t.getTotalWidthOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n].width;return e}}),Z=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=(e=V())&&e.__esModule?e:{default:e},o=Q(),i=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.canvas=e,this.encodings=n,this.options=r}return n(t,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var t=0;t<this.encodings.length;t++){var e=(0,r.default)(this.options,this.encodings[t].options);this.drawCanvasBarcode(e,this.encodings[t]),this.drawCanvasText(e,this.encodings[t]),this.moveCanvasDrawing(this.encodings[t])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var t=this.canvas.getContext("2d");t.save(),(0,o.calculateEncodingAttributes)(this.encodings,this.options,t);var e=(0,o.getTotalWidthOfEncodings)(this.encodings),n=(0,o.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=e+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,t.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(t.fillStyle=this.options.background,t.fillRect(0,0,this.canvas.width,this.canvas.height)),t.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(t,e){var n,r=this.canvas.getContext("2d"),o=e.data;n="top"==t.textPosition?t.marginTop+t.fontSize+t.textMargin:t.marginTop,r.fillStyle=t.lineColor;for(var i=0;i<o.length;i++){var a=i*t.width+e.barcodePadding;"1"===o[i]?r.fillRect(a,n,t.width,t.height):o[i]&&r.fillRect(a,n,t.width,t.height*o[i])}}},{key:"drawCanvasText",value:function(t,e){var n,r,o=this.canvas.getContext("2d"),i=t.fontOptions+" "+t.fontSize+"px "+t.font;t.displayValue&&(r="top"==t.textPosition?t.marginTop+t.fontSize-t.textMargin:t.height+t.textMargin+t.marginTop+t.fontSize,o.font=i,"left"==t.textAlign||e.barcodePadding>0?(n=0,o.textAlign="left"):"right"==t.textAlign?(n=e.width-1,o.textAlign="right"):(n=e.width/2,o.textAlign="center"),o.fillText(e.text,n,r))}},{key:"moveCanvasDrawing",value:function(t){this.canvas.getContext("2d").translate(t.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),t}();t.default=i}),K=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=(e=V())&&e.__esModule?e:{default:e},o=Q(),i="http://www.w3.org/2000/svg",a=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.svg=e,this.encodings=n,this.options=r,this.document=r.xmlDocument||document}return n(t,[{key:"render",value:function(){var t=this.options.marginLeft;this.prepareSVG();for(var e=0;e<this.encodings.length;e++){var n=this.encodings[e],o=(0,r.default)(this.options,n.options),i=this.createGroup(t,o.marginTop,this.svg);this.setGroupOptions(i,o),this.drawSvgBarcode(i,o,n),this.drawSVGText(i,o,n),t+=n.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,o.calculateEncodingAttributes)(this.encodings,this.options);var t=(0,o.getTotalWidthOfEncodings)(this.encodings),e=(0,o.getMaximumHeightOfEncodings)(this.encodings),n=t+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(n,e),this.options.background&&this.drawRect(0,0,n,e,this.svg).setAttribute("fill",this.options.background)}},{key:"drawSvgBarcode",value:function(t,e,n){var r,o=n.data;r="top"==e.textPosition?e.fontSize+e.textMargin:0;for(var i=0,a=0,u=0;u<o.length;u++)a=u*e.width+n.barcodePadding,"1"===o[u]?i++:i>0&&(this.drawRect(a-e.width*i,r,e.width*i,e.height,t),i=0);i>0&&this.drawRect(a-e.width*(i-1),r,e.width*i,e.height,t)}},{key:"drawSVGText",value:function(t,e,n){var r,o,a=this.document.createElementNS(i,"text");e.displayValue&&(a.setAttribute("font-family",e.font),a.setAttribute("font-size",e.fontSize),e.fontOptions.includes("bold")&&a.setAttribute("font-weight","bold"),e.fontOptions.includes("italic")&&a.setAttribute("font-style","italic"),o="top"==e.textPosition?e.fontSize-e.textMargin:e.height+e.textMargin+e.fontSize,"left"==e.textAlign||n.barcodePadding>0?(r=0,a.setAttribute("text-anchor","start")):"right"==e.textAlign?(r=n.width-1,a.setAttribute("text-anchor","end")):(r=n.width/2,a.setAttribute("text-anchor","middle")),a.setAttribute("x",r),a.setAttribute("y",o),a.appendChild(this.document.createTextNode(n.text)),t.appendChild(a))}},{key:"setSvgAttributes",value:function(t,e){var n=this.svg;n.setAttribute("width",t+"px"),n.setAttribute("height",e+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+t+" "+e),n.setAttribute("xmlns",i),n.setAttribute("version","1.1")}},{key:"createGroup",value:function(t,e,n){var r=this.document.createElementNS(i,"g");return r.setAttribute("transform","translate("+t+", "+e+")"),n.appendChild(r),r}},{key:"setGroupOptions",value:function(t,e){t.setAttribute("fill",e.lineColor)}},{key:"drawRect",value:function(t,e,n,r,o){var a=this.document.createElementNS(i,"rect");return a.setAttribute("x",t),a.setAttribute("y",e),a.setAttribute("width",n),a.setAttribute("height",r),o.appendChild(a),a}}]),t}();t.default=a}),q=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.object=e,this.encodings=n,this.options=r}return e(t,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),t}();t.default=n}),tt=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=o(Z()),n=o(K()),r=o(q());function o(t){return t&&t.__esModule?t:{default:t}}t.default={CanvasRenderer:e.default,SVGRenderer:n.default,ObjectRenderer:r.default}}),et=/* @__PURE__ */e(t=>{function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function t(r,o){e(this,t);var i=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.name="InvalidInputException",i.symbology=r,i.input=o,i.message='"'+i.input+'" is not a valid input for '+i.symbology,i}return r(t,Error),t}(),i=function(){function t(){e(this,t);var r=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.name="InvalidElementException",r.message="Not supported type to render on",r}return r(t,Error),t}(),a=function(){function t(){e(this,t);var r=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.name="NoElementException",r.message="No element to render on.",r}return r(t,Error),t}();t.InvalidInputException=o,t.InvalidElementException=i,t.NoElementException=a}),nt=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=i(J()),r=i(tt()),o=et();function i(t){return t&&t.__esModule?t:{default:t}}t.default=function t(i){if("string"==typeof i)return function(e){var n=document.querySelectorAll(e);if(0!==n.length){for(var r=[],o=0;o<n.length;o++)r.push(t(n[o]));return r}}(i);if(Array.isArray(i)){for(var a=[],u=0;u<i.length;u++)a.push(t(i[u]));return a}if("undefined"!=typeof HTMLCanvasElement&&i instanceof HTMLImageElement)return f=i,{element:c=document.createElement("canvas"),options:(0,n.default)(f),renderer:r.default.CanvasRenderer,afterRender:function(){f.setAttribute("src",c.toDataURL())}};if(i&&i.nodeName&&"svg"===i.nodeName.toLowerCase()||"undefined"!=typeof SVGElement&&i instanceof SVGElement)return{element:i,options:(0,n.default)(i),renderer:r.default.SVGRenderer};if("undefined"!=typeof HTMLCanvasElement&&i instanceof HTMLCanvasElement)return{element:i,options:(0,n.default)(i),renderer:r.default.CanvasRenderer};if(i&&i.getContext)return{element:i,renderer:r.default.CanvasRenderer};if(i&&"object"===(void 0===i?"undefined":e(i))&&!i.nodeName)return{element:i,renderer:r.default.ObjectRenderer};throw new o.InvalidElementException;var f,c}}),rt=/* @__PURE__ */e(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),n=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.api=e}return e(t,[{key:"handleCatch",value:function(t){if("InvalidInputException"!==t.name)throw t;if(this.api._options.valid===this.api._defaults.valid)throw t.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(t){try{var e=t.apply(void 0,arguments);return this.api._options.valid(!0),e}catch(n){return this.handleCatch(n),this.api}}}]),t}();t.default=n}),ot=/* @__PURE__ */e((t,e)=>{var n=s(z()),r=s(V()),o=s(U()),i=s(F()),a=s(nt()),u=s(W()),f=s(rt()),c=et(),l=s(Y());function s(t){return t&&t.__esModule?t:{default:t}}var p=function(){},d=function(t,e,n){var r=new p;if(void 0===t)throw Error("No element to render on was provided.");return r._renderProperties=(0,a.default)(t),r._encodings=[],r._options=l.default,r._errorHandler=new f.default(r),void 0!==e&&((n=n||{}).format||(n.format=v()),r.options(n)[n.format](e,n).render()),r};for(var h in d.getModule=function(t){return n.default[t]},n.default)n.default.hasOwnProperty(h)&&y(n.default,h);function y(t,e){p.prototype[e]=p.prototype[e.toUpperCase()]=p.prototype[e.toLowerCase()]=function(n,o){var i=this;return i._errorHandler.wrapBarcodeCall(function(){o.text=void 0===o.text?void 0:""+o.text;var a=(0,r.default)(i._options,o);a=(0,u.default)(a);var f=t[e],c=b(n,f,a);return i._encodings.push(c),i})}}function b(t,e,n){var i=new e(t=""+t,n);if(!i.valid())throw new c.InvalidInputException(i.constructor.name,t);var a=i.encode();a=(0,o.default)(a);for(var u=0;u<a.length;u++)a[u].options=(0,r.default)(n,a[u].options);return a}function v(){return n.default.CODE128?"CODE128":Object.keys(n.default)[0]}function _(t,e,n){e=(0,o.default)(e);for(var a=0;a<e.length;a++)e[a].options=(0,r.default)(n,e[a].options),(0,i.default)(e[a].options);(0,i.default)(n),new(0,t.renderer)(t.element,e,n).render(),t.afterRender&&t.afterRender()}p.prototype.options=function(t){return this._options=(0,r.default)(this._options,t),this},p.prototype.blank=function(t){var e=new Array(t+1).join("0");return this._encodings.push({data:e}),this},p.prototype.init=function(){var t;if(this._renderProperties)for(var e in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){t=this._renderProperties[e];var o=(0,r.default)(this._options,t.options);"auto"==o.format&&(o.format=v()),this._errorHandler.wrapBarcodeCall(function(){var e=b(o.value,n.default[o.format.toUpperCase()],o);_(t,e,o)})}},p.prototype.render=function(){if(!this._renderProperties)throw new c.NoElementException;if(Array.isArray(this._renderProperties))for(var t=0;t<this._renderProperties.length;t++)_(this._renderProperties[t],this._encodings,this._options);else _(this._renderProperties,this._encodings,this._options);return this},p.prototype._defaults=l.default,"undefined"!=typeof window&&(window.JsBarcode=d),"undefined"!=typeof jQuery&&(jQuery.fn.JsBarcode=function(t,e){var n=[];return jQuery(this).each(function(){n.push(this)}),d(n,t,e)}),e.exports=d}),it=/* @__PURE__ */t(n()),at=/* @__PURE__ */t(ot()),ut=function(t){function e(e){var n=t.call(this,e)||this;return n.dom=it.createRef(),n}return r(e,t),e.prototype.componentDidUpdate=function(t){this.props.value===t.value&&JSON.stringify(this.props.options)===JSON.stringify(t.options)||this.renderBarCode()},e.prototype.renderBarCode=function(){this.dom.current&&(0,at.default)(this.dom.current,this.props.value,this.props.options)},e.prototype.componentDidMount=function(){this.renderBarCode()},e.prototype.render=function(){return it.createElement("img",{ref:this.dom})},e}(it.Component),ft=o(ut);export{ut as BarCode,ft as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as r}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{c as e,i as o,r as n,t as a}from"./tslib.es6-TRdqp4ac.js";import{Ii as s,Xr as i,it as l}from"./esm-
|
|
1
|
+
import{o as r}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{c as e,i as o,r as n,t as a}from"./tslib.es6-TRdqp4ac.js";import{Ii as s,Xr as i,it as l}from"./esm-DMJQA23h.js";import{Pt as p}from"./esm-Dgr2t9Jm.js";var m=/* @__PURE__ */r(t()),u=function(r){function t(){return null!==r&&r.apply(this,arguments)||this}return o(t,r),t.prototype.render=function(){var r=this.props,t=r.items,o=r.source,n=r.data,l=r.env,u=e(r,["items","source","data","env"]),f=t||s(o,n,"| raw");return f&&(f=f.map(function(r){return r.label&&(r.label=i(r.label,n)),r.href&&(r.href=s(r.href,n,"| raw")),r.dropdown&&(r.dropdown=r.dropdown.map(function(r){return r.label&&(r.label=i(r.label,n)),r.href&&(r.href=s(r.href,n,"| raw")),r})),r})),m.createElement(p,a({items:f,tooltipContainer:null==l?void 0:l.getModalContainer},u))},t}(m.Component),f=function(r){function t(){return null!==r&&r.apply(this,arguments)||this}return o(t,r),n([l({type:"breadcrumb"})],t)}(u);export{u as BreadcrumbField,f as BreadcrumbFieldRenderer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as t,r}from"./tslib.es6-TRdqp4ac.js";import{it as s}from"./esm-DMJQA23h.js";import{t as o}from"./ButtonGroupSelect-e98karBC.js";var i=function(o){function i(){return null!==o&&o.apply(this,arguments)||this}return t(i,o),r([s({type:"button-group"})],i)}(o);export{i as ButtonGroupRenderer,o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e,r as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as n}from"./react-CWkhIp2c.js";import{i as o,o as a,r as l,t as r}from"./tslib.es6-TRdqp4ac.js";import{Nn as i,P as s,Qn as u,ui as p,vi as d}from"./esm-
|
|
1
|
+
import{o as e,r as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as n}from"./react-CWkhIp2c.js";import{i as o,o as a,r as l,t as r}from"./tslib.es6-TRdqp4ac.js";import{Nn as i,P as s,Qn as u,ui as p,vi as d}from"./esm-DMJQA23h.js";import{t as c}from"./StaticHoc-D0pM2bgC.js";var v=/* @__PURE__ */t({ButtonGroupControlRenderer:()=>m,default:()=>b}),g=/* @__PURE__ */e(n()),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.doAction=function(e,t,n){var o,a,l=this.props,r=l.resetValue,i=l.onChange,s=l.formStore,u=l.store,p=l.name,c=null==e?void 0:e.actionType;if("clear"===c)i("");else if("reset"===c){var v=null!==(a=d(null!==(o=null==s?void 0:s.pristine)&&void 0!==o?o:null==u?void 0:u.pristine,p))&&void 0!==a?a:r;i(null!=v?v:"")}},t.prototype.handleToggle=function(e){var t=this.props,n=t.onToggle;t.multiple,t.autoFill,t.onBulkChange,n(e)},t.prototype.reload=function(e,t){var n=this.props.reloadOptions;n&&n(e,t)},t.prototype.getBadgeConfig=function(e,t){return e?!(null==t?void 0:t.badge)||"string"!=typeof t.badge&&"number"!=typeof t.badge?(null==t?void 0:t.badge)&&p(t.badge)?r(r({},e),t.badge):null:r(r({},e),{text:t.badge}):t.badge},t.prototype.render=function(e){var t,n=this;void 0===e&&(e=this.props);var o=e.render,a=e.classPrefix,l=e.classnames,i=e.className;e.style;var s=e.disabled,p=e.options;e.value;var d=e.labelField,c=e.placeholder,v=e.btnClassName,b=e.btnActiveClassName,m=e.selectedOptions,f=e.buttons,y=e.size,h=e.block,B=e.vertical,C=e.tiled,N=e.badge,k=e.testIdBuilder,G=e.translate,j=[],A=e.btnLevel,z=e.btnActiveLevel;return v&&(A=u(v)),b&&(z=u(b)),p&&p.length?j=p.map(function(e,t){var a=!!~m.indexOf(e),r=n.getBadgeConfig(N,e);return o("option/".concat(t),{label:e[d||"label"],icon:e.icon,size:e.size||y,badge:r,type:"button",block:h},{key:t,level:(a?z:"")||e.level||A,className:l(e.className,v,a&&"ButtonGroup-button--active"),disabled:e.disabled||s,testIdBuilder:null==k?void 0:k.getChild("item-".concat(e[d||"label"]||t)),onClick:function(t){s||(n.handleToggle(e),t.preventDefault())}})}):Array.isArray(f)&&(j=f.map(function(e,t){var a=n.getBadgeConfig(N,e);return o("button/".concat(t),r(r({size:y,block:h,activeLevel:z,level:A,disabled:s},e),{badge:a}),{key:t,className:l(e.className,v)})})),g.createElement("div",{className:l("ButtonGroup",(t={"ButtonGroup--block":h,"ButtonGroup--vertical":B,"ButtonGroup--tiled":C},t["ButtonGroup--".concat(y)]=y,t),i)},j.length?j:g.createElement("span",{className:"".concat(a,"ButtonGroup-placeholder")},G(c)))},t.defaultProps={btnLevel:"default",btnActiveLevel:"primary",clearable:!1,vertical:!1},l([i,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"handleToggle",null),l([c(),a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"render",null),t}(g.Component),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),l([s({type:"button-group-select",sizeMutable:!1,strictMode:!1})],t)}(b);export{m as n,v as r,b as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as r}from"./react-CWkhIp2c.js";import{i as n,r as s}from"./tslib.es6-TRdqp4ac.js";import{F as o}from"./esm-
|
|
1
|
+
import{o as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as r}from"./react-CWkhIp2c.js";import{i as n,r as s}from"./tslib.es6-TRdqp4ac.js";import{F as o}from"./esm-DMJQA23h.js";var e=/* @__PURE__ */t(r()),a=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.renderButtons=function(){var t=this.props,r=t.render;t.classPrefix;var n=t.buttons;return Array.isArray(n)?n.map(function(t,n){return r("button/".concat(n),t,{key:n})}):null},r.prototype.render=function(){var t=this.props;t.buttons;var r=t.className,n=t.classnames;return t.render,t.style,e.createElement("div",{className:n("ButtonToolbar",r)},this.renderButtons())},r.propsList=["buttons","className"],r}(e.Component),u=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),s([o({type:"button-toolbar",strictMode:!1})],r)}(a);export{u as ButtonToolbarRenderer,a as default};
|