@gct-paas/core-web 0.1.6-dev.14 → 0.1.6-dev.16
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/ColorPicker-D_YhW6KI.js +2 -0
- package/dist/{JsBarcode-BfBOW5vm.js → JsBarcode-DAYpP8-F.js} +2 -2
- package/dist/_plugin-vue_export-helper-BQU8xCzQ.js +2 -0
- package/dist/{chunk-CeX__g8u.js → chunk-CH9A7dlZ.js} +1 -1
- package/dist/components-lzdV4jsd.js +2 -0
- package/dist/{cropper-DszZbwY0.js → cropper-CVLHkp07.js} +2 -2
- package/dist/{de_DE-Cdk5SWSW.js → de_DE-DXY_MBpZ.js} +2 -2
- package/dist/{defineProperty-DDBtkzz5.js → defineProperty-dfGP_BWZ.js} +1 -1
- package/dist/{diagram-config-item-Cbh_tiOl.js → diagram-config-item-DK9U0X3D.js} +2 -2
- package/dist/{diagram-config-item-reverse-DWH-lRVD.js → diagram-config-item-reverse-DuhxK75W.js} +2 -2
- package/dist/{diagram-config-item-virtual-qW8Ufx3F.js → diagram-config-item-virtual-BDkAi_sY.js} +2 -2
- package/dist/{en_US-B0wIY6a-.js → en_US-B60297aE.js} +2 -2
- package/dist/{es_ES-CFTf_KZi.js → es_ES-BsEPbujH.js} +2 -2
- package/dist/event-8H8kNezf.js +2 -0
- package/dist/event-DXj07y2x.js +2 -0
- package/dist/event-DrAlag2g.js +2 -0
- package/dist/event-config-BYm-jQQ9.js +2 -0
- package/dist/field-permission-OYTC7N-F.js +2 -0
- package/dist/{fr_FR-CSfCfW5D.js → fr_FR-CLxJ5w_x.js} +2 -2
- package/dist/global-modal-D6huXKix.js +2 -0
- package/dist/hook-2yPS_tBM.js +2 -0
- package/dist/{hooks-DXW0t29_.js → hooks-C_lZMyr4.js} +2 -2
- package/dist/{icon-next-picker-DP56qrkn.js → icon-next-picker-CWLMAGdN.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/{ja_JP-DXSy7dHj.js → ja_JP-5FNqXz5U.js} +2 -2
- package/dist/loader.esm.min.js +2 -2
- package/dist/monaco-editor-B3oyWnvP.js +2 -0
- package/dist/node-basic-info-D2u-k1_f.js +2 -0
- package/dist/node-binding-page-A1-kjZKB.js +2 -0
- package/dist/node-btns-efVCZJYK.js +2 -0
- package/dist/{objectSpread2-C8eu0aH8.js → objectSpread2-BV1lwEwB.js} +1 -1
- package/dist/{overlayscrollbars-vue-DiDUuAUa.js → overlayscrollbars-vue-DiQitz9V.js} +1 -1
- package/dist/paas-bpmn-runtime-Dgt6HlXb.js +2 -0
- package/dist/perm-NbolTHX_.js +2 -0
- package/dist/perm-n1u9sxns.js +2 -0
- package/dist/process-designer-CoQJ5rtK.js +2 -0
- package/dist/prop-72inYfIT.js +2 -0
- package/dist/prop-Bo4E97rG.js +2 -0
- package/dist/prop-BoFyW0Ra.js +2 -0
- package/dist/prop-By1NogLy.js +2 -0
- package/dist/prop-C4CHJ2Fh.js +2 -0
- package/dist/prop-CQQEZ_-i.js +2 -0
- package/dist/prop-CfOgV9Cz.js +2 -0
- package/dist/{pt_PT-CnUcrrHa.js → pt_PT-BBpzdjBt.js} +2 -2
- package/dist/{relationship-diagram-config-DJB7Hcrl.js → relationship-diagram-config-DcJA222B.js} +2 -2
- package/dist/{rich-editor-Zg0Nr7zv.js → rich-editor-D0DdDp6m.js} +2 -2
- package/dist/{ru_RU-BziGAVj5.js → ru_RU-CLdyecfV.js} +2 -2
- package/dist/select-script-C8g8BaRF.js +2 -0
- package/dist/simple-collapse-DlD8p22o.js +2 -0
- package/dist/template-B86xuMSD.js +2 -0
- package/dist/{tr_TR-y8uLkPdL.js → tr_TR-4Cn_msHz.js} +2 -2
- package/dist/{useMonacoEditor-2RvV9zPk.js → useMonacoEditor-D3FJiex1.js} +2 -2
- package/dist/utils-BbeZSSeJ.js +2 -0
- package/dist/{vi_VN-CXvZpo3W.js → vi_VN-DlIrp-yN.js} +2 -2
- package/dist/{zh_CN-CO133RFG.js → zh_CN-iflonF5E.js} +2 -2
- package/dist/{zh_TW-DaOg9meQ.js → zh_TW-NDaibQ8_.js} +2 -2
- package/es/components/BpmnRuntime/paas/paas-bpmn-runtime.vue_vue_type_script_setup_true_lang.mjs +3 -3
- package/es/components/UserPick/src/user-pick.vue.mjs +2 -2
- package/es/components/UserPick/src/user-pick.vue_vue_type_script_setup_true_lang.mjs +16 -18
- package/es/components/UserPick/src/user-pick.vue_vue_type_style_index_0_scoped_9902632a_lang.css +62 -0
- package/es/components/field-tree-select/field-tree-select.vue.mjs +2 -2
- package/es/components/field-tree-select/field-tree-select.vue_vue_type_script_setup_true_lang.mjs +2 -2
- package/es/components/field-tree-select/{field-tree-select.vue_vue_type_style_index_0_scoped_898030d3_lang.css → field-tree-select.vue_vue_type_style_index_0_scoped_24efd443_lang.css} +20 -20
- package/es/components/overlay-scrollbars/gct-overlay-scrollbars.d.ts +2 -3
- package/es/components/paas-bpmn-log/paas-bpmn-log.vue.mjs +2 -2
- package/es/components/paas-bpmn-log/paas-bpmn-log.vue_vue_type_script_setup_true_lang.mjs +13 -13
- package/es/components/paas-bpmn-log/{paas-bpmn-log.vue_vue_type_style_index_0_scoped_eb574523_lang.css → paas-bpmn-log.vue_vue_type_style_index_0_scoped_3882c856_lang.css} +9 -9
- package/es/components/select-user-modal/select-user-modal.vue.mjs +2 -2
- package/es/components/select-user-modal/select-user-modal.vue_vue_type_style_index_0_scoped_8316b821_lang.css +14 -0
- package/es/create-app-vue.mjs +1 -1
- package/es/hooks/index.d.ts +1 -0
- package/es/hooks/index.mjs +1 -0
- package/es/hooks/useTreeList.d.ts +23 -0
- package/es/hooks/useTreeList.mjs +160 -0
- package/es/index.d.ts +1 -0
- package/es/index.mjs +5 -1
- package/es/locale/sys/appDesigner.d.ts +20 -0
- package/es/locale/sys/component.d.ts +7 -1
- package/es/locale/sys/edhr.d.ts +5 -0
- package/es/locale/sys/expression.d.ts +4 -0
- package/es/locale/sys/i18n.d.ts +1 -1
- package/es/locale/sys/model.d.ts +2 -1
- package/es/locale/sys/onlineForm.d.ts +5 -0
- package/es/locale/sys/org.d.ts +2 -2
- package/es/locale/sys/pageDesigner.d.ts +41 -0
- package/es/locale/sys/printDesigner.d.ts +9 -0
- package/es/locale/sys/webRender.d.ts +25 -0
- package/es/locale/sys.d.ts +32 -5
- package/es/modules/category/category-sider.vue.d.ts +2 -2
- package/es/modules/category/category-sider.vue.mjs +2 -2
- package/es/modules/category/{category-sider.vue_vue_type_style_index_0_scoped_5af8c1ba_lang.css → category-sider.vue_vue_type_style_index_0_scoped_5b8c3a8d_lang.css} +33 -33
- package/es/modules/data-rules-container/index.d.ts +2 -0
- package/es/modules/data-rules-container/index.mjs +2 -0
- package/es/modules/data-rules-container/src/components/perm-action-node.vue.d.ts +1 -1
- package/es/modules/data-rules-container/src/components/perm-action-node.vue.mjs +2 -2
- package/es/modules/data-rules-container/src/components/{perm-action-node.vue_vue_type_style_index_0_scoped_417c660f_lang.css → perm-action-node.vue_vue_type_style_index_0_scoped_a053095c_lang.css} +17 -17
- package/es/modules/data-rules-container/src/components/tree-action-node.vue.d.ts +1 -1
- package/es/modules/data-rules-container/src/components/tree-action-node.vue.mjs +2 -2
- package/es/modules/data-rules-container/src/components/{tree-action-node.vue_vue_type_style_index_0_scoped_46368089_lang.css → tree-action-node.vue_vue_type_style_index_0_scoped_f37ec578_lang.css} +16 -16
- package/es/modules/data-rules-container/src/components/tree-root-node.vue.mjs +2 -2
- package/es/modules/data-rules-container/src/components/tree-root-node.vue_vue_type_script_setup_true_name_tree-root-node_lang.mjs +5 -2
- package/es/modules/data-rules-container/src/components/{tree-root-node.vue_vue_type_style_index_0_scoped_37e323fb_lang.css → tree-root-node.vue_vue_type_style_index_0_scoped_74e5fbf3_lang.css} +8 -8
- package/es/modules/data-rules-container/src/constant/config.mjs +1 -1
- package/es/modules/data-rules-container/src/constant/interface.mjs +115 -2
- package/es/modules/data-rules-container/src/typing.d.ts +1 -1
- package/es/modules/global-modal/src/BasicModal.vue.d.ts +56 -2
- package/es/modules/global-modal/src/BasicModal.vue_vue_type_script_setup_true_name_BasicModal_lang.mjs +55 -70
- package/es/modules/global-modal/src/components/ModalWrapper.vue.d.ts +28 -1
- package/es/modules/global-modal/src/components/ModalWrapper.vue_vue_type_script_lang.mjs +2 -0
- package/es/modules/process-designer/components/event-config.vue.d.ts +7 -0
- package/es/modules/process-designer/components/event-config.vue.mjs +7 -0
- package/es/modules/process-designer/components/event-config.vue_vue_type_script_setup_true_lang.mjs +129 -0
- package/es/modules/process-designer/components/event-config.vue_vue_type_style_index_0_scoped_160c18a9_lang.css +15 -0
- package/es/modules/process-designer/components/field-permission.vue.d.ts +6 -0
- package/es/modules/process-designer/components/field-permission.vue.mjs +7 -0
- package/es/modules/process-designer/components/field-permission.vue_vue_type_script_setup_true_lang.mjs +206 -0
- package/es/modules/process-designer/components/field-permission.vue_vue_type_style_index_0_scoped_b8e5c15f_lang.css +46 -0
- package/es/modules/process-designer/components/form-item.vue.d.ts +32 -0
- package/es/modules/process-designer/components/form-item.vue.mjs +7 -0
- package/es/modules/process-designer/components/form-item.vue_vue_type_script_setup_true_name_form-item_lang.mjs +61 -0
- package/es/modules/process-designer/components/form-item.vue_vue_type_style_index_0_scoped_7fbde61b_lang.css +37 -0
- package/es/modules/process-designer/components/node-basic-info.vue.d.ts +6 -0
- package/es/modules/process-designer/components/node-basic-info.vue.mjs +5 -0
- package/es/modules/process-designer/components/node-basic-info.vue_vue_type_script_setup_true_lang.mjs +87 -0
- package/es/modules/process-designer/components/node-binding-page.vue.d.ts +5 -0
- package/es/modules/process-designer/components/node-binding-page.vue.mjs +7 -0
- package/es/modules/process-designer/components/node-binding-page.vue_vue_type_script_setup_true_lang.mjs +348 -0
- package/es/modules/process-designer/components/node-binding-page.vue_vue_type_style_index_0_scoped_2010f0e2_lang.css +4 -0
- package/es/modules/process-designer/components/node-btns.vue.d.ts +6 -0
- package/es/modules/process-designer/components/node-btns.vue.mjs +7 -0
- package/es/modules/process-designer/components/node-btns.vue_vue_type_script_setup_true_lang.mjs +171 -0
- package/es/modules/process-designer/components/node-btns.vue_vue_type_style_index_0_scoped_5951a254_lang.css +8 -0
- package/es/modules/process-designer/components/select-script.vue.d.ts +10 -0
- package/es/modules/process-designer/components/select-script.vue.mjs +5 -0
- package/es/modules/process-designer/components/select-script.vue_vue_type_script_setup_true_lang.mjs +143 -0
- package/es/modules/process-designer/components/simple-collapse.vue.d.ts +24 -0
- package/es/modules/process-designer/components/simple-collapse.vue.mjs +7 -0
- package/es/modules/process-designer/components/simple-collapse.vue_vue_type_script_setup_true_lang.mjs +36 -0
- package/es/modules/process-designer/components/simple-collapse.vue_vue_type_style_index_0_scoped_27ea34cc_lang.css +28 -0
- package/es/modules/process-designer/constants/index.d.ts +12 -0
- package/es/modules/process-designer/constants/index.mjs +88 -0
- package/es/modules/process-designer/design/bmpn-panel.vue.d.ts +10 -0
- package/es/modules/process-designer/design/bmpn-panel.vue.mjs +7 -0
- package/es/modules/process-designer/design/bmpn-panel.vue_vue_type_script_setup_true_lang.mjs +100 -0
- package/es/modules/process-designer/design/bmpn-panel.vue_vue_type_style_index_0_scoped_e7f6ce74_lang.css +140 -0
- package/es/modules/process-designer/design/bpmn-global.vue.d.ts +2 -0
- package/es/modules/process-designer/design/bpmn-global.vue.mjs +7 -0
- package/es/modules/process-designer/design/bpmn-global.vue_vue_type_script_setup_true_lang.mjs +17 -0
- package/es/modules/process-designer/design/bpmn-global.vue_vue_type_style_index_0_scoped_bc3e00ee_lang.css +7 -0
- package/es/modules/process-designer/design/bpmn-header.vue.d.ts +2 -0
- package/es/modules/process-designer/design/bpmn-header.vue.mjs +7 -0
- package/es/modules/process-designer/design/bpmn-header.vue_vue_type_script_setup_true_lang.mjs +40 -0
- package/es/modules/process-designer/design/bpmn-header.vue_vue_type_style_index_0_scoped_e9436d99_lang.css +37 -0
- package/es/modules/process-designer/design/bpmn-versions.vue.d.ts +2 -0
- package/es/modules/process-designer/design/bpmn-versions.vue.mjs +7 -0
- package/es/modules/process-designer/design/bpmn-versions.vue_vue_type_script_setup_true_lang.mjs +99 -0
- package/es/modules/process-designer/design/bpmn-versions.vue_vue_type_style_index_0_scoped_8a62d94b_lang.css +96 -0
- package/es/modules/process-designer/hook/index.d.ts +5 -0
- package/es/modules/process-designer/hook/index.mjs +18 -0
- package/es/modules/process-designer/hook/useProcess.d.ts +826 -0
- package/es/modules/process-designer/hook/useProcess.mjs +344 -0
- package/es/modules/process-designer/index.d.ts +12 -0
- package/es/modules/process-designer/index.mjs +5 -0
- package/es/modules/process-designer/panels/bpmnApproval/event.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnApproval/event.vue.mjs +5 -0
- package/es/modules/process-designer/panels/bpmnApproval/event.vue_vue_type_script_setup_true_lang.mjs +14 -0
- package/es/modules/process-designer/panels/bpmnApproval/perm.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnApproval/perm.vue.mjs +5 -0
- package/es/modules/process-designer/panels/bpmnApproval/perm.vue_vue_type_script_setup_true_lang.mjs +18 -0
- package/es/modules/process-designer/panels/bpmnApproval/prop.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnApproval/prop.vue.mjs +5 -0
- package/es/modules/process-designer/panels/bpmnApproval/prop.vue_vue_type_script_setup_true_lang.mjs +167 -0
- package/es/modules/process-designer/panels/bpmnEnd/prop.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnEnd/prop.vue.mjs +5 -0
- package/es/modules/process-designer/panels/bpmnEnd/prop.vue_vue_type_script_setup_true_lang.mjs +32 -0
- package/es/modules/process-designer/panels/bpmnJoin/prop.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnJoin/prop.vue.mjs +5 -0
- package/es/modules/process-designer/panels/bpmnJoin/prop.vue_vue_type_script_setup_true_lang.mjs +32 -0
- package/es/modules/process-designer/panels/bpmnJs/prop.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnJs/prop.vue.mjs +5 -0
- package/es/modules/process-designer/panels/bpmnJs/prop.vue_vue_type_script_setup_true_lang.mjs +73 -0
- package/es/modules/process-designer/panels/bpmnMessage/prop.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnMessage/prop.vue.mjs +5 -0
- package/es/modules/process-designer/panels/bpmnMessage/prop.vue_vue_type_script_setup_true_lang.mjs +92 -0
- package/es/modules/process-designer/panels/bpmnSubmit/event.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnSubmit/event.vue.mjs +5 -0
- package/es/modules/process-designer/panels/bpmnSubmit/event.vue_vue_type_script_setup_true_lang.mjs +14 -0
- package/es/modules/process-designer/panels/bpmnSubmit/perm.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnSubmit/perm.vue.mjs +5 -0
- package/es/modules/process-designer/panels/bpmnSubmit/perm.vue_vue_type_script_setup_true_lang.mjs +18 -0
- package/es/modules/process-designer/panels/bpmnSubmit/prop.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/bpmnSubmit/prop.vue.mjs +5 -0
- package/es/modules/process-designer/panels/bpmnSubmit/prop.vue_vue_type_script_setup_true_lang.mjs +47 -0
- package/es/modules/process-designer/panels/global/event.vue.d.ts +6 -0
- package/es/modules/process-designer/panels/global/event.vue.mjs +5 -0
- package/es/modules/process-designer/panels/global/event.vue_vue_type_script_setup_true_lang.mjs +14 -0
- package/es/modules/process-designer/panels/global/prop.vue.d.ts +4 -0
- package/es/modules/process-designer/panels/global/prop.vue.mjs +5 -0
- package/es/modules/process-designer/panels/global/prop.vue_vue_type_script_setup_true_lang.mjs +193 -0
- package/es/modules/process-designer/panels/index.d.ts +8 -0
- package/es/modules/process-designer/panels/index.mjs +44 -0
- package/es/modules/process-designer/panels/interfaces/i-panel-extension.d.ts +21 -0
- package/es/modules/process-designer/panels/interfaces/i-panel-extension.mjs +7 -0
- package/es/modules/process-designer/process-designer.vue.d.ts +11 -0
- package/es/modules/process-designer/process-designer.vue.mjs +6 -0
- package/es/modules/process-designer/process-designer.vue_vue_type_script_setup_true_lang.mjs +81 -0
- package/es/modules/process-designer/process-designer.vue_vue_type_style_index_0_lang.css +98 -0
- package/es/modules/process-designer/types/index.d.ts +105 -0
- package/package.json +9 -8
- package/dist/ColorPicker-DHZwCGHF.js +0 -2
- package/dist/_plugin-vue_export-helper-B3iGtQVD.js +0 -2
- package/dist/monaco-editor-Bj7q97sW.js +0 -2
- package/dist/paas-bpmn-runtime-B0yNr5W2.js +0 -2
- package/dist/template-Bq8pI82J.js +0 -2
- package/es/components/UserPick/src/user-pick.vue_vue_type_style_index_0_scoped_a49a84da_lang.css +0 -39
- package/es/components/select-user-modal/select-user-modal.vue_vue_type_style_index_0_scoped_2c0f184c_lang.css +0 -14
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! @gct-paas/core-web v0.1.6-dev.16 */
|
|
2
|
+
import{h as e}from"./utils-BbeZSSeJ.js";import{t}from"./_plugin-vue_export-helper-BQU8xCzQ.js";import{Fragment as n,computed as r,createApp as o,createBlock as a,createCommentVNode as l,createElementBlock as i,createElementVNode as u,defineComponent as s,h as c,nextTick as f,normalizeStyle as v,onMounted as p,openBlock as d,ref as h,renderList as g,renderSlot as y,resolveComponent as m,shallowRef as b,unref as w,watch as E,withCtx as x}from"vue";import{cloneDeep as F,isEmpty as _}from"lodash-es";import{bus as $,destroyApp as A,preloadApp as L,setupApp as j,startApp as O}from"wujie";import{WuJieContainer as S}from"@gct-paas/core-components";var I={CONFIRM:"wujie-formula___confirm",CANCEL:"wujie-formula___cancel"};function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach(function(t){B(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function U(){U=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,l=Object.create(a.prototype);return o(l,"_invoke",{value:A(e,n,new S(r||[]))}),l}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var v="suspendedStart",p="suspendedYield",d="executing",h="completed",g={};function y(){}function m(){}function b(){}var w={};s(w,l,function(){return this});var E=Object.getPrototypeOf,x=E&&E(E(I([])));x&&x!==n&&r.call(x,l)&&(w=x);var F=b.prototype=y.prototype=Object.create(w);function _(e){["next","throw","return"].forEach(function(t){s(e,t,function(e){return this._invoke(t,e)})})}function $(e,t){function n(o,a,l,i){var u=f(e[o],e,a);if("throw"!==u.type){var s=u.arg,c=s.value;return c&&"object"==k(c)&&r.call(c,"__await")?t.resolve(c.__await).then(function(e){n("next",e,l,i)},function(e){n("throw",e,l,i)}):t.resolve(c).then(function(e){s.value=e,l(s)},function(e){return n("throw",e,l,i)})}i(u.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t(function(t,o){n(e,r,t,o)})}return a=a?a.then(o,o):o()}})}function A(t,n,r){var o=v;return function(a,l){if(o===d)throw Error("Generator is already running");if(o===h){if("throw"===a)throw l;return{value:e,done:!0}}for(r.method=a,r.arg=l;;){var i=r.delegate;if(i){var u=L(i,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===v)throw o=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=d;var s=f(t,n,r);if("normal"===s.type){if(o=r.done?h:p,s.arg===g)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=h,r.method="throw",r.arg=s.arg)}}}function L(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,L(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=/* @__PURE__ */new TypeError("The iterator does not provide a '"+r+"' method")),g;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,g;var l=a.arg;return l?l.done?(n[t.resultName]=l.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):l:(n.method="throw",n.arg=/* @__PURE__ */new TypeError("iterator result is not an object"),n.delegate=null,g)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[l];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(k(t)+" is not iterable")}return m.prototype=b,o(F,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:m,configurable:!0}),m.displayName=s(b,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,s(e,u,"GeneratorFunction")),e.prototype=Object.create(F),e},t.awrap=function(e){return{__await:e}},_($.prototype),s($.prototype,i,function(){return this}),t.AsyncIterator=$,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var l=new $(c(e,n,r,o),a);return t.isGeneratorFunction(n)?l:l.next().then(function(e){return e.done?e.value:l.next()})},_(F),s(F,u,"Generator"),s(F,l,function(){return this}),s(F,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return i.type="throw",i.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var l=this.tryEntries[a],i=l.completion;if("root"===l.tryLoc)return o("end");if(l.tryLoc<=this.prev){var u=r.call(l,"catchLoc"),s=r.call(l,"finallyLoc");if(u&&s){if(this.prev<l.catchLoc)return o(l.catchLoc,!0);if(this.prev<l.finallyLoc)return o(l.finallyLoc)}else if(u){if(this.prev<l.catchLoc)return o(l.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return o(l.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var l=a?a.completion:{};return l.type=e,l.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(l)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function C(e,t,n,r,o,a,l){try{var i=e[a](l),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function B(e,t,n){return(t=function(e){var t=function(e){if("object"!=k(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==k(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var N=s({name:"WujieVue",props:{width:{type:String,default:""},height:{type:String,default:""},name:{type:String,default:""},loading:{type:HTMLElement,default:void 0},url:{type:String,default:""},sync:{type:Boolean,default:void 0},prefix:{type:Object,default:void 0},alive:{type:Boolean,default:void 0},props:{type:Object,default:void 0},attrs:{type:Object,default:void 0},replace:{type:Function,default:void 0},fetch:{type:Function,default:void 0},fiber:{type:Boolean,default:void 0},degrade:{type:Boolean,default:void 0},plugins:{type:Array,default:null},beforeLoad:{type:Function,default:null},beforeMount:{type:Function,default:null},afterMount:{type:Function,default:null},beforeUnmount:{type:Function,default:null},afterUnmount:{type:Function,default:null},activated:{type:Function,default:null},deactivated:{type:Function,default:null},loadError:{type:Function,default:null},style:{type:Object,default:void 0},iframeAddEventListeners:{type:Array,default:null},iframeOnEvents:{type:Array,default:null}},data:function(){return{startAppQueue:Promise.resolve()}},mounted:function(){var e=this;this.name&&(window.__WUJIE_QUEUE?window.__WUJIE_QUEUE[this.name]?this.startAppQueue=window.__WUJIE_QUEUE[this.name]:window.__WUJIE_QUEUE[this.name]=this.startAppQueue:window.__WUJIE_QUEUE=B({},this.name,this.startAppQueue)),$.$onAll(this.handleEmit),this.execStartApp(),this.$watch(function(){return e.name+e.url},function(){return e.execStartApp()})},methods:{handleEmit:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.$emit.apply(this,[e].concat(n))},startApp:function(){var e,t=this;return(e=/* @__PURE__ */U().mark(function e(){return U().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,O({name:t.name,url:t.url,el:t.$refs.wujie,loading:t.loading,alive:t.alive,fetch:t.fetch,props:t.props,attrs:t.attrs,replace:t.replace,sync:t.sync,prefix:t.prefix,fiber:t.fiber,degrade:t.degrade,plugins:t.plugins,beforeLoad:t.beforeLoad,beforeMount:t.beforeMount,afterMount:t.afterMount,beforeUnmount:t.beforeUnmount,afterUnmount:t.afterUnmount,activated:t.activated,deactivated:t.deactivated,loadError:t.loadError,iframeAddEventListeners:t.iframeAddEventListeners,iframeOnEvents:t.iframeOnEvents});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.log(e.t0);case 8:case"end":return e.stop()}},e,null,[[0,5]])}),function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function l(e){C(a,r,o,l,i,"next",e)}function i(e){C(a,r,o,l,i,"throw",e)}l(void 0)})})()},execStartApp:function(){this.startAppQueue=this.startAppQueue.then(this.startApp),window.__WUJIE_QUEUE[this.name]=this.startAppQueue},destroy:function(){A(this.name)}},beforeDestroy:function(){$.$offAll(this.handleEmit)},render:function(){return c("div",{style:P({width:this.width,height:this.height},this.style),ref:"wujie"})}});function R(e){return new Promise(t=>{const n=document.createElement("div");document.body.appendChild(n);const r=o({setup(){function o(){r.unmount(),document.body.removeChild(n)}return()=>c("div",{},c(S,{wuJieName:"gct-formula-editor",url:"/extras/@gct-paas/formula-editor/index.html",props:e,onWujieFormula___confirm:e=>{t(e),o()},onWujieFormula___cancel:()=>{t(void 0),o()}}))}});r.use(N),r.mount(n)})}N.setupApp=j,N.preloadApp=L,N.bus=$,N.destroyApp=A,N.install=function(e){e.component("WujieVue",N)};var Q=b(null),W=h({visible:!1,defaultInput:"",tabActiveKey:""}),J=h({output:"",error:"",logs:[]});function T(t){return E(()=>t,()=>{t&&Object.keys(t).forEach(e=>{W.value[e]=w(t[e])})},{immediate:!0}),E(()=>w(W).visible,async n=>{await f(),n&&!w(Q)&&(Q.value=(await e.loadMonaco()).editor.create(document.querySelector(".editor-console__input"),{value:null==t?void 0:t.defaultInput,language:"json",automaticLayout:!0,minimap:{enabled:!1}}))}),{editorConsoleState:W,consoleValueState:J,toggleVisible:function(){W.value.visible=!w(W).visible},changeTabActiveKey:function(e){W.value.tabActiveKey=e}}}function G(){const t=()=>{const e=w(Q);return e||console.warn("useEditorConsoleInner instance is undefined!"),e};function n(e,t){if(_(e))return e;let n=F(e);if("string"!=typeof e)try{n=decodeURIComponent(JSON.stringify(n))}catch(s){console.error(s),n=JSON.stringify(n)}else{try{n=decodeURIComponent(n)}catch(s){console.warn(s)}try{n=JSON.parse(n)}catch(c){console.warn(c)}n=JSON.stringify(n)}const{newline:r=!1,spaceAfterColon:o=!0}=t||{};let a=n,l=/([{}])/g;a=a.replace(l,"\r\n$1\r\n"),l=/([[\]])/g,a=a.replace(l,"\r\n$1\r\n"),l=/(,)/g,a=a.replace(l,"$1\r\n"),l=/(\r\n\r\n)/g,a=a.replace(l,"\r\n"),l=/\r\n,/g,a=a.replace(l,","),r||(l=/:\r\n\{/g,a=a.replace(l,":{"),l=/:\r\n\[/g,a=a.replace(l,":[")),o&&(l=/:/g,a=a.replace(l,": "));let i="",u=0;return a.split("\r\n").forEach(function(e){let t=0,n=0,r="";for(e.match(/\{$/)||e.match(/\[$/)?n=1:e.match(/\}/)||e.match(/\]/)?0!==u&&(u-=1):n=0,t=0;t<u;t++)r+=" ";i+=r+e+"\r\n",u+=n}),i}return{getInstance:t,showConsolePanel:function(){W.value.visible=!0},hideConsolePanel:function(){W.value.visible=!1},getInputValue:async function({showError:n=!0,ignoreError:r=!1}={}){var o;return(await e.loadMonaco()).editor.getModelMarkers({owner:"json"}).length>0&&(n&&_gct.message.error("参数语法错误"),!r)?Promise.reject():(null===(o=t())||void 0===o?void 0:o.getValue())??w(W).defaultInput},setConsoleResult:function(e){const{code:t,message:r,data:o}=e;if(200===t){const{logs:e,data:t}=o;J.value.output=n(t),J.value.logs=e,J.value.error="",W.value.tabActiveKey="2"}else J.value.output="",J.value.logs=[],J.value.error=r,W.value.tabActiveKey="3"},formatJson2Notes:n}}var D={key:1,class:"component"},V={class:"box"},K={style:{borderRadius:"4px"}},H={class:"color-picker-middle"},X={style:{flex:"auto"}},Y={class:"color-picker-diamond"},q={class:"color-picker-value"},z={class:"hex"},Z=["value"],ee={class:"rgba-r"},te=["value"],ne={class:"rgba-g"},re=["value"],oe={class:"rgba-b"},ae=["value"],le={class:"rgba-a"},ie=["value"],ue={class:"presetColor"},se={class:"preset"},ce=["onClick"],fe=/* @__PURE__ */s({name:"ColorPicker",__name:"ColorPicker",props:{color:{default:()=>"#FFFFFF00"},preset:{default:()=>["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]},width:{default:240},useTrigger:{type:Boolean,default:!1},placement:{default:"bottomLeft"}},emits:["update:color"],setup(e,{emit:t}){const o=e,l=t,s=h(),c=h(),f=h(),b=h(""),w=h("left: 0;"),F=h("left: calc(100% - 6px);"),_=h(0),$=h(1),A=h(1),L=h(255),j=h(0),O=h(0),S=h(1);E(()=>o.color,()=>{const{r:e,g:t,b:n,a:r}=ge(o.color||"#FFFFFF00");L.value=e,j.value=t,O.value=n,S.value=r});const{r:I,g:k,b:M,a:P}=ge(o.color||"#FFFFFF00");L.value=I,j.value=k,O.value=M,S.value=P,p(()=>{const{h:e,s:t,v:n}=me(L.value,j.value,O.value);_.value=e,$.value=t,A.value=n,b.value=`top: ${100-100*n}%;left: ${100*t}%;`,w.value=`left: ${_.value/360*100}%;`,F.value=`left: ${S.value>=1?"calc(100% - 6px)":100*S.value+"%"};`});const U=r(()=>{const e=L.value,t=j.value,n=O.value,r=S.value,o=_.value,a=$.value,l=A.value;return{rgb:`rgba(${e},${t},${n})`,rgba:`rgba(${e},${t},${n},${r})`,hex6:be(e,t,n),hex8:be(e,t,n,r),hsv:`hsv(${o},${a},${l})`,hsl:""}});function C(e){const t=e.target.value;if(/^#?([0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t)){let{r:e,g:n,b:r,a:o}=we(t);L.value=e,j.value=n,O.value=r,S.value=o}}function B(e){const t=e.target.value;if(""!==t){const e=parseInt(t);e>255&&(L.value=255),e<0&&(L.value=0),e>=0&&e<=255&&(L.value=e)}}function N(e){const t=e.target.value;if(""!==t){const e=parseInt(t);e>255&&(j.value=255),e<0&&(j.value=0),e>=0&&e<=255&&(j.value=e)}}function R(e){const t=e.target.value;if(""!==t){const e=parseInt(t);e>255&&(O.value=255),e<0&&(O.value=0),e>=0&&e<=255&&(O.value=e)}}function Q(e){const t=e.target.value;if(""!==t){const e=parseFloat(t);S.value=e,e>1&&(S.value=1),e<0&&(S.value=0),e>=0&&e<=1&&(S.value=e)}}function W(e){if(!s.value)return;const t=s.value.clientWidth,n=s.value.clientHeight;let r=e.pageX-s.value.getBoundingClientRect().left,o=e.pageY-s.value.getBoundingClientRect().top;r=r<t&&r>0?r:r>t?t:0,o=o<n&&o>0?o:o>n?n:0,$.value=Math.floor(r/t*100+.5)/100,A.value=Math.floor(100*(1-o/n)+.5)/100;const{r:a,g:l,b:i}=ye(_.value,$.value,A.value);L.value=a,j.value=l,O.value=i,b.value=`top: ${o}px;left: ${r}px;`}function J(e){W(e),window.addEventListener("mousemove",W),window.addEventListener("mouseup",T),F.value="left: calc(100% - 6px);",S.value=1}function T(){window.removeEventListener("mousemove",W),window.removeEventListener("mouseup",T)}function G(e){let t=c.value.clientWidth,n=e.pageX-s.value.getBoundingClientRect().left;n=n<t&&n>0?n:n>t?t:0,_.value=Math.floor(n/t*360+.5);let{r:r,g:o,b:a}=ye(_.value,$.value,A.value);L.value=r,j.value=o,O.value=a,w.value=`left: ${n>=t-6?t-6:n}px;`}function fe(e){G(e),window.addEventListener("mousemove",G),window.addEventListener("mouseup",ve)}function ve(){window.removeEventListener("mousemove",G),window.removeEventListener("mouseup",ve)}function pe(e){let t=f.value.clientWidth,n=e.pageX-s.value.getBoundingClientRect().left;n=n<t&&n>0?n:n>t?t:0,S.value=Math.floor(n/t*100+.5)/100,F.value=`left: ${n>=t-6?t-6:n}px;`}function de(e){pe(e),window.addEventListener("mousemove",pe),window.addEventListener("mouseup",he)}function he(){window.removeEventListener("mousemove",pe),window.removeEventListener("mouseup",he)}function ge(e){if(e){let t,n,r,o;return"string"==typeof e?/^#?([0-9a-fA-F]{6}|[0-9a-fA-F]{8}|[0-9a-fA-F]{3}|[0-9a-fA-F]{4})$/.test(e)?we(e):function(e){const t=e.match(/^rgba?\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})(?:,\s*([\d.]+))?\)$/);if(t){const e=t[4]?parseFloat(t[4]):1;return{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10),a:e}}throw new Error("Invalid RGBA string")}(e):(t=e.r>255?255:e.r<0?0:e.r,n=e.g>255?255:e.g<0?0:e.g,r=e.b>255?255:e.b<0?0:e.b,o=e.a>1?1:e.a<0?0:e.a,{r:t,g:n,b:r,a:o})}return{r:0,g:0,b:0,a:1}}function ye(e,t,n){360===e&&(e=0);let r=Math.floor(e/60)%6,o=e/60-r,a=n*(1-t),l=n*(1-t*o),i=n*(1-t*(1-o)),u=0,s=0,c=0;return 0===r?(u=n,s=i,c=a):1===r?(u=l,s=n,c=a):2===r?(u=a,s=n,c=i):3===r?(u=a,s=l,c=n):4===r?(u=i,s=a,c=n):5===r&&(u=n,s=a,c=l),u=Math.floor(255*u+.5),s=Math.floor(255*s+.5),c=Math.floor(255*c+.5),{r:u,g:s,b:c}}function me(e,t,n){let r,o,a=e/255,l=t/255,i=n/255,u=Math.max(a,l,i),s=u-Math.min(a,l,i),c=0;return 0===s?c=0:u===a?c=(60*(l-i)/s+360)%360:u===l?c=60*((i-a)/s+2):u===i&&(c=60*((a-l)/s+4)),r=0===u?0:s/u,o=u,c=Math.floor(c+.5),r=Math.floor(100*r+.5)/100,o=Math.floor(100*o+.5)/100,{h:c,s:r,v:o}}function be(e,t,n,r=1){let o=2!==(e=parseInt(e)).toString(16).length?"0"+e.toString(16):e.toString(16),a=2!==(t=parseInt(t)).toString(16).length?"0"+t.toString(16):t.toString(16),l=2!==(n=parseInt(n)).toString(16).length?"0"+n.toString(16):n.toString(16),i="";if(1!==(r=parseFloat(r))){let e=Math.floor(256*r);i=2!==e.toString(16).length?"0"+e.toString(16):e.toString(16)}return`#${o}${a}${l}${i}`.toUpperCase()}function we(e){if(/^#?[0-9a-fA-F]{3}$/.test(e)){let t=e.substring(e.length-1,e.length),n=e.substring(e.length-2,e.length-1),r=e.substring(e.length-3,e.length-2);return we(`${r+r}${n+n}${t+t}`)}if(/^#?[0-9a-fA-F]{4}$/.test(e)){let t=e.substring(e.length-1,e.length),n=e.substring(e.length-2,e.length-1),r=e.substring(e.length-3,e.length-2),o=e.substring(e.length-4,e.length-3);return we(`${o+o}${r+r}${n+n}${t+t}`)}if(/^#?[0-9a-fA-F]{6}$/.test(e)){let t=parseInt("0x"+e.substring(e.length-2,e.length)),n=parseInt("0x"+e.substring(e.length-4,e.length-2));return{r:parseInt("0x"+e.substring(e.length-6,e.length-4)),g:n,b:t,a:1}}if(/^#?[0-9a-fA-F]{8}$/.test(e)){let t=parseInt("0x"+e.substring(e.length-2,e.length));t/=255;let n=parseInt("0x"+e.substring(e.length-4,e.length-2)),r=parseInt("0x"+e.substring(e.length-6,e.length-4));return{r:parseInt("0x"+e.substring(e.length-8,e.length-6)),g:r,b:n,a:t}}}return E(()=>U.value.hex8,()=>{l("update:color",{r:L.value,g:j.value,b:O.value,a:S.value},U.value.hex8);const{h:e,s:t,v:n}=me(L.value,j.value,O.value);_.value=e,$.value=t,A.value=n,b.value=`top: ${100-100*n}%;left: ${100*t}%;`,w.value=`left: ${_.value/360*100}%;`}),(t,r)=>{const o=m("a-popover");return d(),a(o,{placement:e.placement,trigger:"click","overlay-class-name":"color-picker__popover"},{content:x(()=>[u("div",{class:"color-picker",style:v({"--w":e.width+"px"})},[u("div",{ref_key:"saturationRef",ref:s,class:"color-picker-saturation",onMousedown:J},[u("div",{style:v(`background-color: hsl(${_.value}, 100%, 50%);`)},[u("div",{class:"point",style:v(b.value)},null,4)],4),r[0]||(r[0]=u("div",{class:"color-picker-saturation-t"},null,-1)),r[1]||(r[1]=u("div",{class:"color-picker-saturation-h"},null,-1))],544),u("div",H,[u("div",X,[u("div",{ref_key:"hueSliderRef",ref:c,class:"hue-slider",onMousedown:fe},[u("div",{class:"slider",style:v(w.value)},null,4)],544),u("div",{ref_key:"alphaSliderRef",ref:f,class:"alpha-slider",onMousedown:de},[u("div",{class:"slider",style:v(F.value)},null,4),u("div",{style:v(`background: linear-gradient(to right, rgba(0,0,0,0), ${U.value.rgb});width: 100%;height: 100%`)},null,4)],544)]),u("div",Y,[u("div",{style:v(`background-color: ${U.value.rgba};width: 100%;height: 100%;box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15), inset 0 0 4px rgba(0, 0, 0, .25);`)},null,4)])]),u("div",q,[u("div",z,[u("label",null,[u("input",{value:U.value.hex8,spellcheck:"false",onInput:C},null,40,Z)]),r[2]||(r[2]=u("p",null,"Hex",-1))]),u("div",ee,[u("label",null,[u("input",{value:L.value,onInput:B},null,40,te)]),r[3]||(r[3]=u("p",null,"R",-1))]),u("div",ne,[u("label",null,[u("input",{value:j.value,onInput:N},null,40,re)]),r[4]||(r[4]=u("p",null,"G",-1))]),u("div",oe,[u("label",null,[u("input",{value:O.value,onInput:R},null,40,ae)]),r[5]||(r[5]=u("p",null,"B",-1))]),u("div",le,[u("label",null,[u("input",{value:S.value,onInput:Q},null,40,ie)]),r[6]||(r[6]=u("p",null,"A",-1))])]),u("div",ue,[r[7]||(r[7]=u("div",{class:"title"},"推荐颜色",-1)),u("ul",se,[(d(!0),i(n,null,g(e.preset,e=>(d(),i("li",{key:e,style:v(`background-color: ${e}`),onClick:t=>function(e){if(/^#?([0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(e)){let{r:t,g:n,b:r,a:o}=we(e);L.value=t,j.value=n,O.value=r,S.value=o,F.value="left: calc(100% - 6px);",S.value=1}}(e)},null,12,ce))),128))])])],4)]),default:x(()=>[e.useTrigger?y(t.$slots,"trigger",{key:0},void 0,!0):(d(),i("div",D,[u("div",V,[u("div",K,[y(t.$slots,"icon",{},void 0,!0)])])]))]),_:3},8,["placement"])}}}),ve=/* @__PURE__ */t(fe,[["__scopeId","data-v-7bfd9ca3"]]);export{I as a,R as i,T as n,G as r,ve as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @gct-paas/core-web v0.1.6-dev.
|
|
2
|
-
import{t}from"./chunk-CeX__g8u.js";var e=/* @__PURE__ */t(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}}),n=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CODE39=void 0;var n,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=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 i[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),r(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}(((n=e())&&n.__esModule?n:{default:n}).default),i=["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 i.indexOf(t)}t.CODE39=o}),r=/* @__PURE__ */t(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]}),o=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=(n=e())&&n.__esModule?n:{default:n},a=r(),u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.substring(1),n));return r.bytes=t.split("").map(function(t){return t.charCodeAt(0)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.bytes,n=t.shift()-105,r=a.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(a.FNC1);var o=e.next(t,1,r);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:e.getBar(n)+o.result+e.getBar((o.checksum+n)%a.MODULO)+e.getBar(a.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 a.BARS[t]?a.BARS[t].toString():""}},{key:"correctIndex",value:function(t,e){if(e===a.SET_A){var n=t.shift();return n<32?n+64:n-32}return e===a.SET_B?t.shift()-32:10*(t.shift()-48)+t.shift()-48}},{key:"next",value:function(t,n,r){if(!t.length)return{result:"",checksum:0};var o=void 0,i=void 0;if(t[0]>=200){i=t.shift()-105;var u=a.SWAP[i];void 0!==u?o=e.next(t,n+1,u):(r!==a.SET_A&&r!==a.SET_B||i!==a.SHIFT||(t[0]=r===a.SET_A?t[0]>95?t[0]-96:t[0]:t[0]<32?t[0]+96:t[0]),o=e.next(t,n+1,r))}else i=e.correctIndex(t,r),o=e.next(t,n+1,r);var f=i*n;return{result:e.getBar(i)+o.result,checksum:f+o.checksum}}}]),e}(i.default);t.default=u}),i=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=r(),n=function(t){return t.match(new RegExp("^"+e.A_CHARS+"*"))[0].length},o=function(t){return t.match(new RegExp("^"+e.B_CHARS+"*"))[0].length},i=function(t){return t.match(new RegExp("^"+e.C_CHARS+"*"))[0]};function a(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)+u(t.substring(o[1].length));var i=t.match(new RegExp("^"+r+"+"))[0];return i.length===t.length?t:i+String.fromCharCode(n?205:206)+a(t.substring(i.length),!n)}function u(t){var e=i(t),r=e.length;if(r===t.length)return t;t=t.substring(r);var u=n(t)>=o(t);return e+String.fromCharCode(u?206:205)+a(t,u)}t.default=function(t){var r=void 0;if(i(t).length>=2)r=e.C_START_CHAR+u(t);else{var f=n(t)>o(t);r=(f?e.A_START_CHAR:e.B_START_CHAR)+a(t,f)}return r.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})}}),a=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=r(o()),n=r(i());function r(t){return t&&t.__esModule?t:{default:t}}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var u=function(t){function e(t,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 o=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,n.default)(t),r));else o=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,r));return a(o)}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=u}),u=/* @__PURE__ */t(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}}(),i=(e=o())&&e.__esModule?e:{default:e},a=r(),u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,a.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("^"+a.A_CHARS+"+$").test(this.data)}}]),e}(i.default);t.default=u}),f=/* @__PURE__ */t(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}}(),i=(e=o())&&e.__esModule?e:{default:e},a=r(),u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,a.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("^"+a.B_CHARS+"+$").test(this.data)}}]),e}(i.default);t.default=u}),l=/* @__PURE__ */t(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}}(),i=(e=o())&&e.__esModule?e:{default:e},a=r(),u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,a.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("^"+a.C_CHARS+"+$").test(this.data)}}]),e}(i.default);t.default=u}),c=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CODE128C=t.CODE128B=t.CODE128A=t.CODE128=void 0;var e=i(a()),n=i(u()),r=i(f()),o=i(l());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}),s=/* @__PURE__ */t(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"]}),p=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=s();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("")}}),d=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=s(),o=i(p());function i(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.fontSize=!n.flat&&n.fontSize>10*n.width?10*n.width:n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(t,e){return this.text.substr(t,e)}},{key:"leftEncode",value:function(t,e){return(0,o.default)(t,e)}},{key:"rightText",value:function(t,e){return this.text.substr(t,e)}},{key:"rightEncode",value:function(t,e){return(0,o.default)(t,e)}},{key:"encodeGuarded",value:function(){var t={fontSize:this.fontSize},e={height:this.guardHeight};return[{data:r.SIDE_BIN,options:e},{data:this.leftEncode(),text:this.leftText(),options:t},{data:r.MIDDLE_BIN,options:e},{data:this.rightEncode(),text:this.rightText(),options:t},{data:r.SIDE_BIN,options:e}]}},{key:"encodeFlat",value:function(){return{data:[r.SIDE_BIN,this.leftEncode(),r.MIDDLE_BIN,this.rightEncode(),r.SIDE_BIN].join(""),text:this.text}}}]),e}(i(e()).default);t.default=a}),h=/* @__PURE__ */t(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=s(),i=(e=d())&&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}),y=/* @__PURE__ */t(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=d())&&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}),b=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=s(),o=i(p());function i(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var t,e=r.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,o.default)(this.data,e,"01"),text:this.text}}}]),e}(i(e()).default);t.default=a}),v=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=s(),o=i(p());function i(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var t=r.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,o.default)(this.data,t,"01"),text:this.text}}}]),e}(i(e()).default);t.default=a}),_=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();t.checksum=a;var r=o(p());function o(t){return t&&t.__esModule?t:{default:t}}var i=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{11}$/)&&(t+=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.displayValue=n.displayValue,n.fontSize>10*n.width?r.fontSize=10*n.width:r.fontSize=n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{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,r.default)(this.data.substr(0,6),"LLLLLL"),t+="01010",t+=(0,r.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,r.default)(this.data[0],"L"),options:{height:this.guardHeight}}),t.push({data:(0,r.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,r.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),t.push({data:(0,r.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),t}}]),e}(o(e()).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=i}),g=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=a(p()),o=a(e()),i=_();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"],l=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],c=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(r.isValid=!1,-1!==t.search(/^[0-9]{6}$/))r.middleDigits=t,r.upcA=s(t,"0"),r.text=n.text||""+r.upcA[0]+t+r.upcA[r.upcA.length-1],r.isValid=!0;else{if(-1===t.search(/^[01][0-9]{7}$/))return u(r);if(r.middleDigits=t.substring(1,t.length-1),r.upcA=s(r.middleDigits,t[0]),r.upcA[r.upcA.length-1]!==t[t.length-1])return u(r);r.isValid=!0}return r.displayValue=n.displayValue,n.fontSize>10*n.width?r.fontSize=10*n.width:r.fontSize=n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t="";return t+="101",t+=this.encodeMiddleDigits(),{data:t+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101",options:{height:this.guardHeight}}),t.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),t.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),t}},{key:"encodeMiddleDigits",value:function(){var t=this.upcA[0],e=this.upcA[this.upcA.length-1],n=l[parseInt(e)][parseInt(t)];return(0,r.default)(this.middleDigits,n)}}]),e}(o.default);function s(t,e){for(var n=f[parseInt(t[t.length-1])],r="",o=0,a=0;a<n.length;a++){var u=n[a];r+="X"===u?t[o++]:u}return(r=""+e+r)+(0,i.checksum)(r)}t.default=c}),O=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UPCE=t.UPC=t.EAN2=t.EAN5=t.EAN8=t.EAN13=void 0;var e=u(h()),n=u(y()),r=u(b()),o=u(v()),i=u(_()),a=u(g());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}),E=/* @__PURE__ */t(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"]}),w=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=E(),i=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),r(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:o.START_BIN+e+o.END_BIN,text:this.text}}},{key:"encodePair",value:function(t){var e=o.BINARIES[t[1]];return o.BINARIES[t[0]].split("").map(function(t,n){return("1"===t?"111":"1")+("1"===e[n]?"000":"0")}).join("")}}]),e}(((n=e())&&n.__esModule?n:{default:n}).default);t.default=i}),m=/* @__PURE__ */t(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=w())&&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}),j=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ITF14=t.ITF=void 0;var e=r(w()),n=r(m());function r(t){return t&&t.__esModule?t:{default:t}}t.ITF=e.default,t.ITF14=n.default}),x=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"encode",value:function(){for(var t="110",e=0;e<this.data.length;e++){var n=parseInt(this.data[e]).toString(2);n=i(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}(((n=e())&&n.__esModule?n:{default:n}).default);function i(t,e){for(var n=0;n<e;n++)t="0"+t;return t}t.default=o}),P=/* @__PURE__ */t(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}}),S=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=(e=x())&&e.__esModule?e:{default:e},r=P(),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}),C=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=(e=x())&&e.__esModule?e:{default:e},r=P(),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}),A=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=(e=x())&&e.__esModule?e:{default:e},r=P(),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}),T=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=(e=x())&&e.__esModule?e:{default:e},r=P(),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}),M=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MSI1110=t.MSI1010=t.MSI11=t.MSI10=t.MSI=void 0;var e=a(x()),n=a(S()),r=a(C()),o=a(A()),i=a(T());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}),R=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pharmacode=void 0;var n,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=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),r(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}(((n=e())&&n.__esModule?n:{default:n}).default);t.pharmacode=o}),L=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.codabar=void 0;var n,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=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),r(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}(((n=e())&&n.__esModule?n:{default:n}).default);t.codabar=o}),k=/* @__PURE__ */t(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"]}}),I=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=k(),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,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.data.split("").flatMap(function(t){return o.MULTI_SYMBOLS[t]||t}),n=t.map(function(t){return e.getEncoding(t)}).join(""),r=e.checksum(t,20),i=e.checksum(t.concat(r),15);return{text:this.text,data:e.getEncoding("ÿ")+n+e.getEncoding(r)+e.getEncoding(i)+e.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(t){return o.BINARIES[e.symbolValue(t)]}},{key:"getSymbol",value:function(t){return o.SYMBOLS[t]}},{key:"symbolValue",value:function(t){return o.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}(((n=e())&&n.__esModule?n:{default:n}).default);t.default=i}),G=/* @__PURE__ */t(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=I())&&e.__esModule?e:{default:e}).default);t.default=r}),B=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CODE93FullASCII=t.CODE93=void 0;var e=r(I()),n=r(G());function r(t){return t&&t.__esModule?t:{default:t}}t.CODE93=e.default,t.CODE93FullASCII=n.default}),D=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GenericBarcode=void 0;var n,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),e}(((n=e())&&n.__esModule?n:{default:n}).default);t.GenericBarcode=o}),N=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=n(),r=c(),o=O(),i=j(),a=M(),u=R(),f=L(),l=B(),s=D();t.default={CODE39:e.CODE39,CODE128:r.CODE128,CODE128A:r.CODE128A,CODE128B:r.CODE128B,CODE128C:r.CODE128C,EAN13:o.EAN13,EAN8:o.EAN8,EAN5:o.EAN5,EAN2:o.EAN2,UPC:o.UPC,UPCE:o.UPCE,ITF14:i.ITF14,ITF:i.ITF,MSI:a.MSI,MSI10:a.MSI10,MSI11:a.MSI11,MSI1010:a.MSI1010,MSI1110:a.MSI1110,pharmacode:u.pharmacode,codabar:f.codabar,CODE93:l.CODE93,CODE93FullASCII:l.CODE93FullASCII,GenericBarcode:s.GenericBarcode}}),$=/* @__PURE__ */t(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)}}),X=/* @__PURE__ */t(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}}),H=/* @__PURE__ */t(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}}),z=/* @__PURE__ */t(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}}),V=/* @__PURE__ */t(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(){}}}),U=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=r(z()),n=r(V());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)}}),F=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getTotalWidthOfEncodings=t.calculateEncodingAttributes=t.getBarcodePadding=t.getEncodingHeight=t.getMaximumHeightOfEncodings=void 0;var e,n=(e=$())&&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,l=t[u],c=(0,n.default)(e,l.options);f=c.displayValue?i(l.text,c,a):0;var s=l.data.length*c.width;l.width=Math.ceil(Math.max(f,s)),l.height=r(l,c),l.barcodePadding=o(f,s,c)}},t.getTotalWidthOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n].width;return e}}),W=/* @__PURE__ */t(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=$())&&e.__esModule?e:{default:e},o=F(),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}),Y=/* @__PURE__ */t(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=$())&&e.__esModule?e:{default:e},o=F(),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}),J=/* @__PURE__ */t(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}),Q=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=o(W()),n=o(Y()),r=o(J());function o(t){return t&&t.__esModule?t:{default:t}}t.default={CanvasRenderer:e.default,SVGRenderer:n.default,ObjectRenderer:r.default}}),Z=/* @__PURE__ */t(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}),K=/* @__PURE__ */t(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(U()),r=i(Q()),o=Z();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:l=document.createElement("canvas"),options:(0,n.default)(f),renderer:r.default.CanvasRenderer,afterRender:function(){f.setAttribute("src",l.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,l}}),q=/* @__PURE__ */t(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}),tt=/* @__PURE__ */t((t,e)=>{var n=s(N()),r=s($()),o=s(X()),i=s(H()),a=s(K()),u=s(z()),f=s(q()),l=Z(),c=s(V());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=c.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],l=b(n,f,a);return i._encodings.push(l),i})}}function b(t,e,n){var i=new e(t=""+t,n);if(!i.valid())throw new l.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 l.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=c.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});export default tt();
|
|
1
|
+
/*! @gct-paas/core-web v0.1.6-dev.16 */
|
|
2
|
+
import{t}from"./chunk-CH9A7dlZ.js";var e=/* @__PURE__ */t(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}}),n=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CODE39=void 0;var n,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=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 i[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),r(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}(((n=e())&&n.__esModule?n:{default:n}).default),i=["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 i.indexOf(t)}t.CODE39=o}),r=/* @__PURE__ */t(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]}),o=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n,o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=(n=e())&&n.__esModule?n:{default:n},a=r(),u=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.substring(1),n));return r.bytes=t.split("").map(function(t){return t.charCodeAt(0)}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),o(e,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.bytes,n=t.shift()-105,r=a.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(a.FNC1);var o=e.next(t,1,r);return{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:e.getBar(n)+o.result+e.getBar((o.checksum+n)%a.MODULO)+e.getBar(a.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 a.BARS[t]?a.BARS[t].toString():""}},{key:"correctIndex",value:function(t,e){if(e===a.SET_A){var n=t.shift();return n<32?n+64:n-32}return e===a.SET_B?t.shift()-32:10*(t.shift()-48)+t.shift()-48}},{key:"next",value:function(t,n,r){if(!t.length)return{result:"",checksum:0};var o=void 0,i=void 0;if(t[0]>=200){i=t.shift()-105;var u=a.SWAP[i];void 0!==u?o=e.next(t,n+1,u):(r!==a.SET_A&&r!==a.SET_B||i!==a.SHIFT||(t[0]=r===a.SET_A?t[0]>95?t[0]-96:t[0]:t[0]<32?t[0]+96:t[0]),o=e.next(t,n+1,r))}else i=e.correctIndex(t,r),o=e.next(t,n+1,r);var f=i*n;return{result:e.getBar(i)+o.result,checksum:f+o.checksum}}}]),e}(i.default);t.default=u}),i=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=r(),n=function(t){return t.match(new RegExp("^"+e.A_CHARS+"*"))[0].length},o=function(t){return t.match(new RegExp("^"+e.B_CHARS+"*"))[0].length},i=function(t){return t.match(new RegExp("^"+e.C_CHARS+"*"))[0]};function a(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)+u(t.substring(o[1].length));var i=t.match(new RegExp("^"+r+"+"))[0];return i.length===t.length?t:i+String.fromCharCode(n?205:206)+a(t.substring(i.length),!n)}function u(t){var e=i(t),r=e.length;if(r===t.length)return t;t=t.substring(r);var u=n(t)>=o(t);return e+String.fromCharCode(u?206:205)+a(t,u)}t.default=function(t){var r=void 0;if(i(t).length>=2)r=e.C_START_CHAR+u(t);else{var f=n(t)>o(t);r=(f?e.A_START_CHAR:e.B_START_CHAR)+a(t,f)}return r.replace(/[\xCD\xCE]([^])[\xCD\xCE]/,function(t,e){return String.fromCharCode(203)+e})}}),a=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=r(o()),n=r(i());function r(t){return t&&t.__esModule?t:{default:t}}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var u=function(t){function e(t,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 o=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,(0,n.default)(t),r));else o=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,r));return a(o)}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=u}),u=/* @__PURE__ */t(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}}(),i=(e=o())&&e.__esModule?e:{default:e},a=r(),u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,a.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("^"+a.A_CHARS+"+$").test(this.data)}}]),e}(i.default);t.default=u}),f=/* @__PURE__ */t(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}}(),i=(e=o())&&e.__esModule?e:{default:e},a=r(),u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,a.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("^"+a.B_CHARS+"+$").test(this.data)}}]),e}(i.default);t.default=u}),l=/* @__PURE__ */t(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}}(),i=(e=o())&&e.__esModule?e:{default:e},a=r(),u=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,a.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("^"+a.C_CHARS+"+$").test(this.data)}}]),e}(i.default);t.default=u}),c=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CODE128C=t.CODE128B=t.CODE128A=t.CODE128=void 0;var e=i(a()),n=i(u()),r=i(f()),o=i(l());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}),s=/* @__PURE__ */t(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"]}),p=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=s();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("")}}),d=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=s(),o=i(p());function i(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));return r.fontSize=!n.flat&&n.fontSize>10*n.width?10*n.width:n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(t,e){return this.text.substr(t,e)}},{key:"leftEncode",value:function(t,e){return(0,o.default)(t,e)}},{key:"rightText",value:function(t,e){return this.text.substr(t,e)}},{key:"rightEncode",value:function(t,e){return(0,o.default)(t,e)}},{key:"encodeGuarded",value:function(){var t={fontSize:this.fontSize},e={height:this.guardHeight};return[{data:r.SIDE_BIN,options:e},{data:this.leftEncode(),text:this.leftText(),options:t},{data:r.MIDDLE_BIN,options:e},{data:this.rightEncode(),text:this.rightText(),options:t},{data:r.SIDE_BIN,options:e}]}},{key:"encodeFlat",value:function(){return{data:[r.SIDE_BIN,this.leftEncode(),r.MIDDLE_BIN,this.rightEncode(),r.SIDE_BIN].join(""),text:this.text}}}]),e}(i(e()).default);t.default=a}),h=/* @__PURE__ */t(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=s(),i=(e=d())&&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}),y=/* @__PURE__ */t(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=d())&&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}),b=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=s(),o=i(p());function i(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var t,e=r.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,o.default)(this.data,e,"01"),text:this.text}}}]),e}(i(e()).default);t.default=a}),v=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=s(),o=i(p());function i(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var t=r.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,o.default)(this.data,t,"01"),text:this.text}}}]),e}(i(e()).default);t.default=a}),_=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();t.checksum=a;var r=o(p());function o(t){return t&&t.__esModule?t:{default:t}}var i=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),-1!==t.search(/^[0-9]{11}$/)&&(t+=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.displayValue=n.displayValue,n.fontSize>10*n.width?r.fontSize=10*n.width:r.fontSize=n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{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,r.default)(this.data.substr(0,6),"LLLLLL"),t+="01010",t+=(0,r.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,r.default)(this.data[0],"L"),options:{height:this.guardHeight}}),t.push({data:(0,r.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,r.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),t.push({data:(0,r.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),t}}]),e}(o(e()).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=i}),g=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),r=a(p()),o=a(e()),i=_();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"],l=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]],c=function(t){function e(t,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=u(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n));if(r.isValid=!1,-1!==t.search(/^[0-9]{6}$/))r.middleDigits=t,r.upcA=s(t,"0"),r.text=n.text||""+r.upcA[0]+t+r.upcA[r.upcA.length-1],r.isValid=!0;else{if(-1===t.search(/^[01][0-9]{7}$/))return u(r);if(r.middleDigits=t.substring(1,t.length-1),r.upcA=s(r.middleDigits,t[0]),r.upcA[r.upcA.length-1]!==t[t.length-1])return u(r);r.isValid=!0}return r.displayValue=n.displayValue,n.fontSize>10*n.width?r.fontSize=10*n.width:r.fontSize=n.fontSize,r.guardHeight=n.height+r.fontSize/2+n.textMargin,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),n(e,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var t="";return t+="101",t+=this.encodeMiddleDigits(),{data:t+="010101",text:this.text}}},{key:"guardedEncoding",value:function(){var t=[];return this.displayValue&&t.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),t.push({data:"101",options:{height:this.guardHeight}}),t.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),t.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&t.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),t}},{key:"encodeMiddleDigits",value:function(){var t=this.upcA[0],e=this.upcA[this.upcA.length-1],n=l[parseInt(e)][parseInt(t)];return(0,r.default)(this.middleDigits,n)}}]),e}(o.default);function s(t,e){for(var n=f[parseInt(t[t.length-1])],r="",o=0,a=0;a<n.length;a++){var u=n[a];r+="X"===u?t[o++]:u}return(r=""+e+r)+(0,i.checksum)(r)}t.default=c}),O=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UPCE=t.UPC=t.EAN2=t.EAN5=t.EAN8=t.EAN13=void 0;var e=u(h()),n=u(y()),r=u(b()),o=u(v()),i=u(_()),a=u(g());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}),E=/* @__PURE__ */t(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"]}),w=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=E(),i=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),r(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:o.START_BIN+e+o.END_BIN,text:this.text}}},{key:"encodePair",value:function(t){var e=o.BINARIES[t[1]];return o.BINARIES[t[0]].split("").map(function(t,n){return("1"===t?"111":"1")+("1"===e[n]?"000":"0")}).join("")}}]),e}(((n=e())&&n.__esModule?n:{default:n}).default);t.default=i}),m=/* @__PURE__ */t(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=w())&&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}),j=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ITF14=t.ITF=void 0;var e=r(w()),n=r(m());function r(t){return t&&t.__esModule?t:{default:t}}t.ITF=e.default,t.ITF14=n.default}),x=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"encode",value:function(){for(var t="110",e=0;e<this.data.length;e++){var n=parseInt(this.data[e]).toString(2);n=i(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}(((n=e())&&n.__esModule?n:{default:n}).default);function i(t,e){for(var n=0;n<e;n++)t="0"+t;return t}t.default=o}),P=/* @__PURE__ */t(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}}),S=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=(e=x())&&e.__esModule?e:{default:e},r=P(),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}),C=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=(e=x())&&e.__esModule?e:{default:e},r=P(),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}),A=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=(e=x())&&e.__esModule?e:{default:e},r=P(),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}),T=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e,n=(e=x())&&e.__esModule?e:{default:e},r=P(),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}),M=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MSI1110=t.MSI1010=t.MSI11=t.MSI10=t.MSI=void 0;var e=a(x()),n=a(S()),r=a(C()),o=a(A()),i=a(T());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}),R=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.pharmacode=void 0;var n,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=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),r(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}(((n=e())&&n.__esModule?n:{default:n}).default);t.pharmacode=o}),L=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.codabar=void 0;var n,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=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),r(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}(((n=e())&&n.__esModule?n:{default:n}).default);t.codabar=o}),k=/* @__PURE__ */t(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"]}}),I=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var n,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=k(),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,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"valid",value:function(){return/^[0-9A-Z\-. $/+%]+$/.test(this.data)}},{key:"encode",value:function(){var t=this.data.split("").flatMap(function(t){return o.MULTI_SYMBOLS[t]||t}),n=t.map(function(t){return e.getEncoding(t)}).join(""),r=e.checksum(t,20),i=e.checksum(t.concat(r),15);return{text:this.text,data:e.getEncoding("ÿ")+n+e.getEncoding(r)+e.getEncoding(i)+e.getEncoding("ÿ")+"1"}}}],[{key:"getEncoding",value:function(t){return o.BINARIES[e.symbolValue(t)]}},{key:"getSymbol",value:function(t){return o.SYMBOLS[t]}},{key:"symbolValue",value:function(t){return o.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}(((n=e())&&n.__esModule?n:{default:n}).default);t.default=i}),G=/* @__PURE__ */t(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=I())&&e.__esModule?e:{default:e}).default);t.default=r}),B=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CODE93FullASCII=t.CODE93=void 0;var e=r(I()),n=r(G());function r(t){return t&&t.__esModule?t:{default:t}}t.CODE93=e.default,t.CODE93FullASCII=n.default}),D=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GenericBarcode=void 0;var n,r=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=function(t){function e(t,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),r(e,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),e}(((n=e())&&n.__esModule?n:{default:n}).default);t.GenericBarcode=o}),N=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=n(),r=c(),o=O(),i=j(),a=M(),u=R(),f=L(),l=B(),s=D();t.default={CODE39:e.CODE39,CODE128:r.CODE128,CODE128A:r.CODE128A,CODE128B:r.CODE128B,CODE128C:r.CODE128C,EAN13:o.EAN13,EAN8:o.EAN8,EAN5:o.EAN5,EAN2:o.EAN2,UPC:o.UPC,UPCE:o.UPCE,ITF14:i.ITF14,ITF:i.ITF,MSI:a.MSI,MSI10:a.MSI10,MSI11:a.MSI11,MSI1010:a.MSI1010,MSI1110:a.MSI1110,pharmacode:u.pharmacode,codabar:f.codabar,CODE93:l.CODE93,CODE93FullASCII:l.CODE93FullASCII,GenericBarcode:s.GenericBarcode}}),$=/* @__PURE__ */t(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)}}),X=/* @__PURE__ */t(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}}),H=/* @__PURE__ */t(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}}),z=/* @__PURE__ */t(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}}),V=/* @__PURE__ */t(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(){}}}),U=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=r(z()),n=r(V());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)}}),F=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getTotalWidthOfEncodings=t.calculateEncodingAttributes=t.getBarcodePadding=t.getEncodingHeight=t.getMaximumHeightOfEncodings=void 0;var e,n=(e=$())&&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,l=t[u],c=(0,n.default)(e,l.options);f=c.displayValue?i(l.text,c,a):0;var s=l.data.length*c.width;l.width=Math.ceil(Math.max(f,s)),l.height=r(l,c),l.barcodePadding=o(f,s,c)}},t.getTotalWidthOfEncodings=function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n].width;return e}}),W=/* @__PURE__ */t(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=$())&&e.__esModule?e:{default:e},o=F(),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}),Y=/* @__PURE__ */t(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=$())&&e.__esModule?e:{default:e},o=F(),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}),J=/* @__PURE__ */t(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}),Q=/* @__PURE__ */t(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=o(W()),n=o(Y()),r=o(J());function o(t){return t&&t.__esModule?t:{default:t}}t.default={CanvasRenderer:e.default,SVGRenderer:n.default,ObjectRenderer:r.default}}),Z=/* @__PURE__ */t(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}),K=/* @__PURE__ */t(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(U()),r=i(Q()),o=Z();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:l=document.createElement("canvas"),options:(0,n.default)(f),renderer:r.default.CanvasRenderer,afterRender:function(){f.setAttribute("src",l.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,l}}),q=/* @__PURE__ */t(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}),tt=/* @__PURE__ */t((t,e)=>{var n=s(N()),r=s($()),o=s(X()),i=s(H()),a=s(K()),u=s(z()),f=s(q()),l=Z(),c=s(V());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=c.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],l=b(n,f,a);return i._encodings.push(l),i})}}function b(t,e,n){var i=new e(t=""+t,n);if(!i.valid())throw new l.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 l.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=c.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});export default tt();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @gct-paas/core-web v0.1.6-dev.
|
|
1
|
+
/*! @gct-paas/core-web v0.1.6-dev.16 */
|
|
2
2
|
var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,l=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,n=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),u=(e,r)=>{let o={};for(var l in e)t(o,l,{get:e[l],enumerable:!0});return r||t(o,Symbol.toStringTag,{value:"Module"}),o},p=(e,l,n,u)=>{if(l&&"object"==typeof l||"function"==typeof l)for(var p,b=o(l),c=0,f=b.length;c<f;c++)p=b[c],a.call(e,p)||p===n||t(e,p,{get:(e=>l[e]).bind(null,p),enumerable:!(u=r(l,p))||u.enumerable});return e},b=(e,t,r)=>(p(e,t,"default"),r&&p(r,t,"default")),c=(r,o,a)=>(a=null!=r?e(l(r)):{},p(!o&&r&&r.__esModule?a:t(a,"default",{value:r,enumerable:!0}),r));export{c as i,u as n,b as r,n as t};
|