@dcodegroup-au/dsg-vue 0.1.11 → 0.1.13

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/dsg-vue.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const M=require("./DsgTablePerPage.vue_vue_type_style_index_0_lang-B3GtWMET.cjs"),u=require("vue"),qa=require("./DsgColoursConfig-D7UiFGB5.cjs"),zi=require("./DsgLabel.vue_vue_type_style_index_0_lang-gCBicmCZ.cjs"),Za=u.defineComponent({__name:"DsgMiscIcon",props:{theme:{default:"brand"},type:{default:"light-outline"},size:{default:"lg"},icon:{},classes:{default:""}},setup(t){const e=["dsg-misc-icon",`dsg-misc-icon--${t.theme}`,`dsg-misc-icon--${t.type}`,`dsg-misc-icon--${t.size}`,t.classes].join(" ").replace(/\s+/g," ").trim();return(r,n)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(u.unref(e))},[u.createVNode(M._sfc_main,u.normalizeProps(u.guardReactiveProps(r.icon)),null,16)],2))}}),Mt=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r},Ct=Mt(Za,[["__scopeId","data-v-6f50208c"]]),Qa={key:0,class:"dsg-accordion--header"},Ja={class:"dsg-accordion--row-content"},eo={key:0,class:"dsg-accordion--expanded"},to=u.defineComponent({__name:"DsgAccordion",props:{rows:{},class:{},rowKey:{type:Function}},setup(t){const e=t,r=u.ref(null),n=a=>{r.value=r.value===a?null:a},i=e.rowKey??((a,o)=>o);return(a,o)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-accordion",a.class])},[a.$slots.header?(u.openBlock(),u.createElementBlock("div",Qa,[u.renderSlot(a.$slots,"header",{},void 0,!0)])):u.createCommentVNode("",!0),u.createElementVNode("div",null,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.rows,(s,l)=>(u.openBlock(),u.createElementBlock("div",{key:u.unref(i)(s,l),class:"dsg-accordion--row"},[u.createElementVNode("div",Ja,[u.renderSlot(a.$slots,"row",{row:s,index:l,isExpanded:r.value===l,toggle:()=>n(l)},void 0,!0)]),u.createVNode(u.Transition,{name:"accordion"},{default:u.withCtx(()=>[r.value===l?(u.openBlock(),u.createElementBlock("div",eo,[u.renderSlot(a.$slots,"expanded",{row:s,index:l},void 0,!0)])):u.createCommentVNode("",!0)]),_:2},1024)]))),128))])],2))}}),ro=Mt(to,[["__scopeId","data-v-30562d06"]]),no=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const M=require("./DsgTablePerPage.vue_vue_type_style_index_0_lang-OVnCsiAi.cjs"),u=require("vue"),Za=require("./DsgColoursConfig-D7UiFGB5.cjs"),zi=require("./DsgLabel.vue_vue_type_style_index_0_lang-DAM6oT0f.cjs"),qa=u.defineComponent({__name:"DsgMiscIcon",props:{theme:{default:"brand"},type:{default:"light-outline"},size:{default:"lg"},icon:{},classes:{default:""}},setup(t){const e=["dsg-misc-icon",`dsg-misc-icon--${t.theme}`,`dsg-misc-icon--${t.type}`,`dsg-misc-icon--${t.size}`,t.classes].join(" ").replace(/\s+/g," ").trim();return(r,n)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(u.unref(e))},[u.createVNode(M._sfc_main,u.normalizeProps(u.guardReactiveProps(t.icon)),null,16)],2))}}),Lt=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r},bt=Lt(qa,[["__scopeId","data-v-6f50208c"]]),Qa={key:0,class:"dsg-accordion--header"},Ja={class:"dsg-accordion--row-content"},eo={key:0,class:"dsg-accordion--expanded"},to=u.defineComponent({__name:"DsgAccordion",props:{rows:{},class:{},rowKey:{type:Function}},setup(t){const e=t,r=u.ref(null),n=a=>{r.value=r.value===a?null:a},i=e.rowKey??((a,o)=>o);return(a,o)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-accordion",t.class])},[a.$slots.header?(u.openBlock(),u.createElementBlock("div",Qa,[u.renderSlot(a.$slots,"header",{},void 0,!0)])):u.createCommentVNode("",!0),u.createElementVNode("div",null,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(t.rows,(s,l)=>(u.openBlock(),u.createElementBlock("div",{key:u.unref(i)(s,l),class:"dsg-accordion--row"},[u.createElementVNode("div",Ja,[u.renderSlot(a.$slots,"row",{row:s,index:l,isExpanded:r.value===l,toggle:()=>n(l)},void 0,!0)]),u.createVNode(u.Transition,{name:"accordion"},{default:u.withCtx(()=>[r.value===l?(u.openBlock(),u.createElementBlock("div",eo,[u.renderSlot(a.$slots,"expanded",{row:s,index:l},void 0,!0)])):u.createCommentVNode("",!0)]),_:2},1024)]))),128))])],2))}}),ro=Lt(to,[["__scopeId","data-v-d17346aa"]]),no=`<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <g id="Size=4xl" clip-path="url(#clip0_3302_422487)">
3
3
  <path id="Vector" d="M24.711 5.66721C25.0149 6.40224 25.5983 6.98649 26.3328 7.29151L28.9086 8.35843C29.6437 8.66292 30.2277 9.24694 30.5322 9.98202C30.8367 10.7171 30.8367 11.543 30.5322 12.2781L29.466 14.8521C29.1614 15.5875 29.161 16.4142 29.467 17.1493L30.5313 19.7224C30.6822 20.0865 30.76 20.4768 30.76 20.8709C30.7601 21.265 30.6825 21.6553 30.5317 22.0194C30.3808 22.3836 30.1597 22.7144 29.881 22.993C29.6023 23.2717 29.2714 23.4927 28.9072 23.6434L26.3333 24.7096C25.5982 25.0135 25.014 25.5968 24.709 26.3314L23.642 28.9072C23.3376 29.6423 22.7535 30.2263 22.0185 30.5308C21.2834 30.8353 20.4574 30.8353 19.7224 30.5308L17.1484 29.4646C16.4133 29.1609 15.5877 29.1615 14.853 29.4663L12.2773 30.5317C11.5426 30.8355 10.7174 30.8353 9.98289 30.531C9.2484 30.2268 8.6647 29.6435 8.36001 28.9092L7.29277 26.3326C6.98885 25.5976 6.40548 25.0133 5.67091 24.7083L3.09514 23.6414C2.36037 23.337 1.77652 22.7534 1.47193 22.0187C1.16734 21.2841 1.16692 20.4585 1.47078 19.7236L2.53694 17.1496C2.84067 16.4145 2.84005 15.5889 2.53521 14.8542L1.47059 12.2766C1.31964 11.9125 1.24192 11.5223 1.24186 11.1282C1.24179 10.734 1.31939 10.3438 1.47022 9.97962C1.62104 9.6155 1.84214 9.28466 2.12088 9.00601C2.39961 8.72737 2.73052 8.50638 3.09469 8.35567L5.66862 7.28951C6.40301 6.98586 6.98691 6.40322 7.29216 5.6695L8.35908 3.09372C8.66357 2.35864 9.24759 1.77461 9.98267 1.47013C10.7178 1.16565 11.5437 1.16565 12.2788 1.47013L14.8527 2.53629C15.5878 2.84002 16.4134 2.8394 17.1481 2.53456L19.7249 1.47178C20.4599 1.16747 21.2857 1.16754 22.0206 1.47196C22.7556 1.77638 23.3395 2.36023 23.644 3.09513L24.7113 5.67167L24.711 5.66721Z" fill="#0788F5"/>
4
4
  <path id="Vector_2" fill-rule="evenodd" clip-rule="evenodd" d="M22.2665 11.8058C22.4803 11.4701 22.5519 11.0631 22.4656 10.6746C22.3794 10.286 22.1423 9.94759 21.8065 9.73383C21.4708 9.52006 21.0638 9.44843 20.6753 9.5347C20.2867 9.62097 19.9483 9.85806 19.7345 10.1938L13.8605 19.4238L11.1725 16.0638C10.924 15.753 10.5622 15.5536 10.1667 15.5095C9.77118 15.4655 9.37436 15.5803 9.06352 15.8288C8.75269 16.0773 8.55331 16.4391 8.50923 16.8347C8.46516 17.2302 8.58001 17.627 8.82852 17.9378L12.8285 22.9378C12.9776 23.1244 13.1691 23.2727 13.387 23.3703C13.6049 23.468 13.843 23.5122 14.0815 23.4993C14.32 23.4864 14.5519 23.4167 14.758 23.2961C14.9641 23.1755 15.1385 23.0074 15.2665 22.8058L22.2665 11.8058Z" fill="white"/>
@@ -9,14 +9,14 @@
9
9
  </clipPath>
10
10
  </defs>
11
11
  </svg>
12
- `,io=["href","title"],ao={class:"dsg-avatar--image-wrapper",tabindex:"0",ref:"avatarImageWrapperEl"},oo=["src","alt"],so={key:1,class:"dsg-avatar--initials"},lo={class:"dsg-avatar--status"},uo={key:0,class:"dsg-avatar--activity"},co=["innerHTML"],fo={key:2,class:"dsg-avatar--logo"},ho=["src","alt"],po={key:0,class:"dsg-avatar--info"},vo={class:"dsg-avatar--title"},go={class:"dsg-avatar--subtext"},sr=u.defineComponent({__name:"DsgAvatar",props:{profileUri:{default:""},fullName:{default:""},size:{default:"md"},theme:{default:"activity"},isOnline:{type:Boolean,default:!1},uri:{default:()=>{}},classes:{default:""},companyLogoUri:{default:()=>{}},preventDefault:{type:Boolean,default:!1},title:{default:""},subText:{default:""},noFocus:{type:Boolean,default:!1}},emits:["avatar-clicked","before-change-status","after-change-status"],setup(t,{expose:e,emit:r}){const n=["dsg-avatar",`dsg-avatar--${t.size}`,`dsg-avatar--${t.theme}`,`dsg-avatar--${t.isOnline?"online":"offline"}`,`dsg-avatar--${t.title?.length?"has-info":"no-info"}`,`dsg-avatar--${t.uri?"has-link":"no-link"}`,`dsg-avatar--${t.noFocus?"no-focus":"focus"}`,`dsg-avatar--${["profile-photo","profile-photo-verified"].indexOf(t.theme)!==-1?"profile-photo":"non-profile-photo"}`,t.classes].join(" ");["profile-photo","profile-photo-verified"].indexOf(t.theme)!==-1&&(["sm","md","lg"].indexOf(t.size)===-1&&new M.DsgPropSyntaxWarning("DsgAvatar: The 'profile-photo' theme only supports the 'sm', 'md', and 'lg' sizes."),(t.fullName||t.title||t.subText)&&new M.DsgWarning("DsgAvatar: The 'profile-photo' theme will not display the 'title' or 'subText' props.")),t.theme==="logo"&&!t.companyLogoUri&&new M.DsgPropSyntaxWarning("DsgAvatar: The 'logo' theme requires a 'companyLogoUri' prop."),["activity","verified","logo"].indexOf(t.theme)!==-1&&t.title?.length&&t.subText?.length&&["xs","sm","md","lg","xl","2xl"].indexOf(t.size)===-1&&new M.DsgPropSyntaxWarning("DsgAvatar: The 'activity', 'verified', and 'logo' themes only support the 'xs', 'sm', 'md', 'lg', and 'xl' sizes when 'title' and 'subText' are provided."),t.theme==="tile"&&!t.title?.length&&!t.fullName&&new M.DsgPropSyntaxWarning("DsgAvatar: The 'tile' theme requires either 'title' or 'fullName' prop."),t.size==="xxs"&&(t.title?.length||t.subText?.length)&&new M.DsgPropSyntaxWarning("DsgAvatar: The 'xxs' size does not support the 'title' or 'subText' props.");const i=p=>{const h=p.split(" ");return(h[0].charAt(0)+h[h.length-1].charAt(0)).toUpperCase()},a=()=>t.fullName?"Avatar of "+t.fullName:"Avatar",o=r,s=u.ref(!1),l=p=>{o("before-change-status",s.value,p),s.value=p,o("after-change-status",s.value)},c=u.useTemplateRef("avatarImageWrapperEl"),f=p=>{t.preventDefault||(o("avatar-clicked",p),c.value&&!t.uri&&c.value.focus())};return e({setUserActiveStatus:l,toggleFocus:p=>{c.value&&(p?c.value.focus():c.value.blur())}}),(p,h)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(u.unref(n))},[u.createElementVNode("a",{class:"dsg-avatar--link",href:p.uri,title:a(),target:"_blank",ref:"avatarLink",onClick:f},[u.createElementVNode("div",ao,[u.renderSlot(p.$slots,"dsg-avatar--background",{},()=>[p.profileUri?(u.openBlock(),u.createElementBlock("img",{key:0,class:"dsg-avatar--profile-image",src:p.profileUri,alt:a()},null,8,oo)):u.createCommentVNode("",!0),!p.profileUri&&p.fullName?(u.openBlock(),u.createElementBlock("span",so,u.toDisplayString(i(p.fullName)),1)):u.createCommentVNode("",!0),!p.profileUri&&!p.fullName?(u.openBlock(),u.createBlock(M._sfc_main,{key:2,class:"dsg-avatar--user-icon",icon:"user-01",color:u.unref(qa.ColoursConfig).gray[600],size:p.size},null,8,["color","size"])):u.createCommentVNode("",!0)]),["tile"].indexOf(p.theme)===-1?u.renderSlot(p.$slots,"dsg-avatar--status",{key:0},()=>[u.createElementVNode("div",lo,[p.theme==="activity"&&p.isOnline?(u.openBlock(),u.createElementBlock("span",uo)):u.createCommentVNode("",!0),["verified","profile-photo-verified"].indexOf(p.theme)!==-1?(u.openBlock(),u.createElementBlock("span",{key:1,class:"dsg-avatar--verified",innerHTML:u.unref(no)},null,8,co)):u.createCommentVNode("",!0),p.theme==="logo"?(u.openBlock(),u.createElementBlock("span",fo,[u.createElementVNode("img",{src:p.companyLogoUri,alt:a(),class:"dsg-avatar--company-logo"},null,8,ho)])):u.createCommentVNode("",!0)])]):u.createCommentVNode("",!0)],512),p.title?.length||p.theme==="tile"&&(p.title?.length||p.fullName)?(u.openBlock(),u.createElementBlock("div",po,[p.title?.length||p.theme==="tile"&&(p.title?.length||p.fullName)?u.renderSlot(p.$slots,"dsg-avatar--title",{key:0},()=>[u.createElementVNode("h3",vo,u.toDisplayString(p.title?.length?p.title:p.fullName),1)]):u.createCommentVNode("",!0),p.subText?.length?u.renderSlot(p.$slots,"dsg-avatar--subtext",{key:1},()=>[u.createElementVNode("p",go,u.toDisplayString(p.subText),1)]):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)],8,io)],2))}}),dr={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},Nt={LIGHT:"light",DARK:"dark",COLORED:"colored",AUTO:"auto"},Ce={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},xo={BOUNCE:"bounce",SLIDE:"slide",FLIP:"flip",ZOOM:"zoom",NONE:"none"},yo={dangerouslyHTMLString:!1,multiple:!0,position:dr.TOP_RIGHT,autoClose:5e3,transition:"bounce",hideProgressBar:!1,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,className:"",bodyClassName:"",style:{},progressClassName:"",progressStyle:{},role:"alert",theme:"light"},mo={rtl:!1,newestOnTop:!1,toastClassName:""},Wi={...yo,...mo};Ce.DEFAULT;var Y=(t=>(t[t.COLLAPSE_DURATION=300]="COLLAPSE_DURATION",t[t.DEBOUNCE_DURATION=50]="DEBOUNCE_DURATION",t.CSS_NAMESPACE="Toastify",t))(Y||{}),xn=(t=>(t.ENTRANCE_ANIMATION_END="d",t))(xn||{});const wo={enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0},_o={enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0},Eo={enter:"Toastify--animate Toastify__zoom-enter",exit:"Toastify--animate Toastify__zoom-exit"},Ao={enter:"Toastify--animate Toastify__flip-enter",exit:"Toastify--animate Toastify__flip-exit"},Qn="Toastify--animate Toastify__none-enter";function Xi(t,e=!1){var r;let n=wo;if(!t||typeof t=="string")switch(t){case"flip":n=Ao;break;case"zoom":n=Eo;break;case"slide":n=_o;break}else n=t;if(e)n.enter=Qn;else if(n.enter===Qn){const i=(r=n.exit.split("__")[1])==null?void 0:r.split("-")[0];n.enter=`Toastify--animate Toastify__${i}-enter`}return n}function Co(t){return t.containerId||String(t.position)}const Vr="will-unmount";function bo(t=dr.TOP_RIGHT){return!!document.querySelector(`.${Y.CSS_NAMESPACE}__toast-container--${t}`)}function So(t=dr.TOP_RIGHT){return`${Y.CSS_NAMESPACE}__toast-container--${t}`}function Io(t,e,r=!1){const n=[`${Y.CSS_NAMESPACE}__toast-container`,`${Y.CSS_NAMESPACE}__toast-container--${t}`,r?`${Y.CSS_NAMESPACE}__toast-container--rtl`:null].filter(Boolean).join(" ");return It(e)?e({position:t,rtl:r,defaultClassName:n}):`${n} ${e||""}`}function Oo(t){var e;const{position:r,containerClassName:n,rtl:i=!1,style:a={}}=t,o=Y.CSS_NAMESPACE,s=So(r),l=document.querySelector(`.${o}`),c=document.querySelector(`.${s}`),f=!!c&&!((e=c.className)!=null&&e.includes(Vr)),d=l||document.createElement("div"),p=document.createElement("div");p.className=Io(r,n,i),p.dataset.testid=`${Y.CSS_NAMESPACE}__toast-container--${r}`,p.id=Co(t);for(const h in a)if(Object.prototype.hasOwnProperty.call(a,h)){const v=a[h];p.style[h]=v}return l||(d.className=Y.CSS_NAMESPACE,document.body.appendChild(d)),f||d.appendChild(p),p}function yn(t){var e,r,n;const i=typeof t=="string"?t:((e=t.currentTarget)==null?void 0:e.id)||((r=t.target)==null?void 0:r.id),a=document.getElementById(i);a&&a.removeEventListener("animationend",yn,!1);try{lr[i].unmount(),(n=document.getElementById(i))==null||n.remove(),delete lr[i],delete xe[i]}catch{}}const lr=u.reactive({});function To(t,e){const r=document.getElementById(String(e));r&&(lr[r.id]=t)}function mn(t,e=!0){const r=String(t);if(!lr[r])return;const n=document.getElementById(r);n&&n.classList.add(Vr),e?(Do(t),n&&n.addEventListener("animationend",yn,!1)):yn(r),Ye.items=Ye.items.filter(i=>i.containerId!==t)}function No(t){for(const e in lr)mn(e,t);Ye.items=[]}function Ki(t,e){const r=document.getElementById(t.toastId);if(r){let n=t;n={...n,...Xi(n.transition)};const i=n.appendPosition?`${n.exit}--${n.position}`:n.exit;r.className+=` ${i}`,e&&e(r)}}function Do(t){for(const e in xe)if(e===t)for(const r of xe[e]||[])Ki(r)}function Bo(t){const e=Dt().find(r=>r.toastId===t);return e?.containerId}function Vn(t){return document.getElementById(t)}function Ro(t){const e=Vn(t.containerId);return e&&e.classList.contains(Vr)}function Jn(t){var e;const r=u.isVNode(t.content)?u.toRaw(t.content.props):null;return r??u.toRaw((e=t.data)!=null?e:{})}function Po(t){return t?Ye.items.filter(e=>e.containerId===t).length>0:Ye.items.length>0}function ko(){if(Ye.items.length>0){const t=Ye.items.shift();br(t?.toastContent,t?.toastProps)}}const xe=u.reactive({}),Ye=u.reactive({items:[]});function Dt(){const t=u.toRaw(xe);return Object.values(t).reduce((e,r)=>[...e,...r],[])}function Mo(t){return Dt().find(e=>e.toastId===t)}function br(t,e={}){if(Ro(e)){const r=Vn(e.containerId);r&&r.addEventListener("animationend",wn.bind(null,t,e),!1)}else wn(t,e)}function wn(t,e={}){const r=Vn(e.containerId);r&&r.removeEventListener("animationend",wn.bind(null,t,e),!1);const n=xe[e.containerId]||[],i=n.length>0;if(!i&&!bo(e.position)){const a=Oo(e),o=u.createApp(rs,e);e.useHandler&&e.useHandler(o),o.mount(a),To(o,a.id)}i&&!e.updateId&&(e.position=n[0].position),u.nextTick(()=>{e.updateId?Re.update(e):Re.add(t,e)})}const Re={add(t,e){const{containerId:r=""}=e;r&&(xe[r]=xe[r]||[],xe[r].find(n=>n.toastId===e.toastId)||setTimeout(()=>{var n,i;e.newestOnTop?(n=xe[r])==null||n.unshift(e):(i=xe[r])==null||i.push(e),e.onOpen&&e.onOpen(Jn(e))},e.delay||0))},remove(t){if(t){const e=Bo(t);if(e){const r=xe[e];let n=r.find(i=>i.toastId===t);xe[e]=r.filter(i=>i.toastId!==t),!xe[e].length&&!Po(e)&&mn(e,!1),ko(),u.nextTick(()=>{n!=null&&n.onClose&&(n.onClose(Jn(n)),n=void 0)})}}},update(t={}){const{containerId:e=""}=t;if(e&&t.updateId){xe[e]=xe[e]||[];const r=xe[e].find(a=>a.toastId===t.toastId),n=r?.position!==t.position||r?.transition!==t.transition,i={...t,disabledEnterTransition:!n,updateId:void 0};Re.dismissForce(t?.toastId),setTimeout(()=>{ee(i.content,i)},t.delay||0)}},clear(t,e=!0){t?mn(t,e):No(e)},dismissCallback(t){var e;const r=(e=t.currentTarget)==null?void 0:e.id,n=document.getElementById(r);n&&(n.removeEventListener("animationend",Re.dismissCallback,!1),setTimeout(()=>{Re.remove(r)}))},dismiss(t){if(t){const e=Dt();for(const r of e)if(r.toastId===t){Ki(r,n=>{n.addEventListener("animationend",Re.dismissCallback,!1)});break}}},dismissForce(t){if(t){const e=Dt();for(const r of e)if(r.toastId===t){const n=document.getElementById(t);n&&(n.remove(),n.removeEventListener("animationend",Re.dismissCallback,!1),Re.remove(t));break}}}},Lo=u.reactive({useHandler:void 0}),ji=u.reactive({}),Rr=u.reactive({});function Yi(){return Math.random().toString(36).substring(2,9)}function Fo(t){return typeof t=="number"&&!isNaN(t)}function _n(t){return typeof t=="string"}function It(t){return typeof t=="function"}function Ur(...t){return u.mergeProps(...t)}function Sr(t){return typeof t=="object"&&(!!(t!=null&&t.render)||!!(t!=null&&t.setup)||typeof t?.type=="object")}function Vo(t={}){ji[`${Y.CSS_NAMESPACE}-default-options`]=t}function Uo(){return ji[`${Y.CSS_NAMESPACE}-default-options`]||Wi}function $o(){const t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;return document.documentElement.classList.contains("dark")||t?"dark":"light"}var Ir=(t=>(t[t.Enter=0]="Enter",t[t.Exit=1]="Exit",t))(Ir||{});const qi={containerId:{type:[String,Number],required:!1,default:""},clearOnUrlChange:{type:Boolean,required:!1,default:!0},disabledEnterTransition:{type:Boolean,required:!1,default:!1},dangerouslyHTMLString:{type:Boolean,required:!1,default:!1},multiple:{type:Boolean,required:!1,default:!0},limit:{type:Number,required:!1,default:void 0},position:{type:String,required:!1,default:dr.TOP_LEFT},bodyClassName:{type:String,required:!1,default:""},autoClose:{type:[Number,Boolean],required:!1,default:!1},closeButton:{type:[Boolean,Function,Object],required:!1,default:void 0},transition:{type:[String,Object],required:!1,default:"bounce"},hideProgressBar:{type:Boolean,required:!1,default:!1},pauseOnHover:{type:Boolean,required:!1,default:!0},pauseOnFocusLoss:{type:Boolean,required:!1,default:!0},closeOnClick:{type:Boolean,required:!1,default:!0},progress:{type:Number,required:!1,default:void 0},progressClassName:{type:String,required:!1,default:""},toastStyle:{type:Object,required:!1,default(){return{}}},progressStyle:{type:Object,required:!1,default(){return{}}},role:{type:String,required:!1,default:"alert"},theme:{type:String,required:!1,default:Nt.AUTO},content:{type:[String,Object,Function],required:!1,default:""},toastId:{type:[String,Number],required:!1,default:""},data:{type:[Object,String],required:!1,default(){return{}}},type:{type:String,required:!1,default:Ce.DEFAULT},icon:{type:[Boolean,String,Number,Object,Function],required:!1,default:void 0},delay:{type:Number,required:!1,default:void 0},onOpen:{type:Function,required:!1,default:void 0},onClose:{type:Function,required:!1,default:void 0},onClick:{type:Function,required:!1,default:void 0},isLoading:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},toastClassName:{type:String,required:!1,default:""},updateId:{type:[String,Number],required:!1,default:""},contentProps:{type:Object,required:!1,default:null},expandCustomProps:{type:Boolean,required:!1,default:!1}},Ho={autoClose:{type:[Number,Boolean],required:!0},isRunning:{type:Boolean,required:!1,default:void 0},type:{type:String,required:!1,default:Ce.DEFAULT},theme:{type:String,required:!1,default:Nt.AUTO},hide:{type:Boolean,required:!1,default:void 0},className:{type:[String,Function],required:!1,default:""},controlledProgress:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:void 0},isIn:{type:Boolean,required:!1,default:void 0},progress:{type:Number,required:!1,default:void 0},closeToast:{type:Function,required:!1,default:void 0}},Go=u.defineComponent({name:"ProgressBar",props:Ho,setup(t,{attrs:e}){const r=u.ref(),n=u.computed(()=>t.hide?"true":"false"),i=u.computed(()=>({...e.style||{},animationDuration:`${t.autoClose===!0?5e3:t.autoClose}ms`,animationPlayState:t.isRunning?"running":"paused",opacity:t.hide||t.autoClose===!1?0:1,transform:t.controlledProgress?`scaleX(${t.progress})`:"none"})),a=u.computed(()=>[`${Y.CSS_NAMESPACE}__progress-bar`,t.controlledProgress?`${Y.CSS_NAMESPACE}__progress-bar--controlled`:`${Y.CSS_NAMESPACE}__progress-bar--animated`,`${Y.CSS_NAMESPACE}__progress-bar-theme--${t.theme}`,`${Y.CSS_NAMESPACE}__progress-bar--${t.type}`,t.rtl?`${Y.CSS_NAMESPACE}__progress-bar--rtl`:null].filter(Boolean).join(" ")),o=u.computed(()=>`${a.value} ${e?.class||""}`),s=()=>{r.value&&(r.value.onanimationend=null,r.value.ontransitionend=null)},l=()=>{t.isIn&&t.closeToast&&t.autoClose!==!1&&(t.closeToast(),s())},c=u.computed(()=>t.controlledProgress?null:l),f=u.computed(()=>t.controlledProgress?l:null);return u.watchEffect(()=>{r.value&&(s(),r.value.onanimationend=c.value,r.value.ontransitionend=f.value)}),()=>u.createVNode("div",{ref:r,role:"progressbar","aria-hidden":n.value,"aria-label":"notification timer",class:o.value,style:i.value},null)}}),zo=u.defineComponent({name:"CloseButton",inheritAttrs:!1,props:{theme:{type:String,required:!1,default:Nt.AUTO},type:{type:String,required:!1,default:Nt.LIGHT},ariaLabel:{type:String,required:!1,default:"close"},closeToast:{type:Function,required:!1,default:void 0}},setup(t){return()=>u.createVNode("button",{class:`${Y.CSS_NAMESPACE}__close-button ${Y.CSS_NAMESPACE}__close-button--${t.theme}`,type:"button",onClick:e=>{e.stopPropagation(),t.closeToast&&t.closeToast(e)},"aria-label":t.ariaLabel},[u.createVNode("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},[u.createVNode("path",{"fill-rule":"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"},null)])])}}),$r=({theme:t,type:e,path:r,...n})=>u.createVNode("svg",u.mergeProps({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${e})`},n),[u.createVNode("path",{d:r},null)]);function Wo(t){return u.createVNode($r,u.mergeProps(t,{path:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}),null)}function Xo(t){return u.createVNode($r,u.mergeProps(t,{path:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}),null)}function Ko(t){return u.createVNode($r,u.mergeProps(t,{path:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}),null)}function jo(t){return u.createVNode($r,u.mergeProps(t,{path:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}),null)}function Yo(){return u.createVNode("div",{class:`${Y.CSS_NAMESPACE}__spinner`},null)}const Or={info:Xo,warning:Wo,success:Ko,error:jo,spinner:Yo},qo=t=>t in Or;function Zo({theme:t,type:e,isLoading:r,icon:n}){let i;const a=!!r||e==="loading",o={theme:t,type:e};if(a&&(n===void 0||typeof n=="boolean"))return Or.spinner();if(n!==!1){if(Sr(n))i=u.toRaw(n);else if(It(n)){const s=n;o.type=a?"loading":e,i=s(o),i=!i&&a?Or.spinner():i}else u.isVNode(n)?i=u.cloneVNode(n,o):_n(n)||Fo(n)?i=n:qo(e)&&(i=Or[e](o));return i}}const Qo=()=>{};function Jo(t,e,r=Y.COLLAPSE_DURATION){const{scrollHeight:n,style:i}=t,a=r;requestAnimationFrame(()=>{i.minHeight="initial",i.height=n+"px",i.transition=`all ${a}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(e,a)})})}function es(t){const e=u.ref(!1),r=u.ref(!1),n=u.ref(!1),i=u.ref(Ir.Enter),a=u.reactive({...t,appendPosition:t.appendPosition||!1,collapse:typeof t.collapse>"u"?!0:t.collapse,collapseDuration:t.collapseDuration||Y.COLLAPSE_DURATION}),o=a.done||Qo,s=u.computed(()=>a.appendPosition?`${a.enter}--${a.position}`:a.enter),l=u.computed(()=>a.appendPosition?`${a.exit}--${a.position}`:a.exit),c=u.computed(()=>t.pauseOnHover?{onMouseenter:y,onMouseleave:g}:{});function f(){const m=s.value.split(" ");p().addEventListener(xn.ENTRANCE_ANIMATION_END,g,{once:!0});const E=C=>{const b=p();C.target===b&&(b.dispatchEvent(new Event(xn.ENTRANCE_ANIMATION_END)),b.removeEventListener("animationend",E),b.removeEventListener("animationcancel",E),i.value===Ir.Enter&&C.type!=="animationcancel"&&b.classList.remove(...m))},w=()=>{const C=p();C.classList.add(...m),C.addEventListener("animationend",E),C.addEventListener("animationcancel",E)};t.pauseOnFocusLoss&&h(),w()}function d(){if(!p())return;const m=()=>{const w=p();w.removeEventListener("animationend",m),a.collapse?Jo(w,o,a.collapseDuration):o()},E=()=>{const w=p();i.value=Ir.Exit,w&&(w.className+=` ${l.value}`,w.addEventListener("animationend",m))};r.value||(n.value?m():setTimeout(E))}function p(){return t.toastRef.value}function h(){document.hasFocus()||y(),window.addEventListener("focus",g),window.addEventListener("blur",y)}function v(){window.removeEventListener("focus",g),window.removeEventListener("blur",y)}function g(){(!t.loading.value||t.isLoading===void 0)&&(e.value=!0)}function y(){e.value=!1}function _(m){m&&(m.stopPropagation(),m.preventDefault()),r.value=!1}return u.watchEffect(d),u.watchEffect(()=>{const m=Dt();r.value=m.findIndex(E=>E.toastId===a.toastId)>-1}),u.watchEffect(()=>{t.isLoading!==void 0&&(t.loading.value?y():g())}),u.onMounted(f),u.onUnmounted(()=>{t.pauseOnFocusLoss&&v()}),{isIn:r,isRunning:e,hideToast:_,eventHandlers:c}}const ts=u.defineComponent({name:"ToastItem",inheritAttrs:!1,props:qi,setup(t){const e=u.ref(),r=u.computed(()=>!!t.isLoading),n=u.computed(()=>t.progress!==void 0&&t.progress!==null),i=u.computed(()=>Zo(t)),a=u.computed(()=>[`${Y.CSS_NAMESPACE}__toast`,`${Y.CSS_NAMESPACE}__toast-theme--${t.theme}`,`${Y.CSS_NAMESPACE}__toast--${t.type}`,t.rtl?`${Y.CSS_NAMESPACE}__toast--rtl`:void 0,t.toastClassName||""].filter(Boolean).join(" ")),{isRunning:o,isIn:s,hideToast:l,eventHandlers:c}=es({toastRef:e,loading:r,done:()=>{Re.remove(t.toastId)},...Xi(t.transition,t.disabledEnterTransition),...t});return()=>u.createVNode("div",u.mergeProps({id:t.toastId,class:a.value,style:t.toastStyle||{},ref:e,"data-testid":`toast-item-${t.toastId}`,onClick:f=>{t.closeOnClick&&l(),t.onClick&&t.onClick(f)}},c.value),[u.createVNode("div",{role:t.role,"data-testid":"toast-body",class:`${Y.CSS_NAMESPACE}__toast-body ${t.bodyClassName||""}`},[i.value!=null&&u.createVNode("div",{"data-testid":`toast-icon-${t.type}`,class:[`${Y.CSS_NAMESPACE}__toast-icon`,t.isLoading?"":`${Y.CSS_NAMESPACE}--animate-icon ${Y.CSS_NAMESPACE}__zoom-enter`].join(" ")},[Sr(i.value)?u.h(u.toRaw(i.value),{theme:t.theme,type:t.type}):It(i.value)?i.value({theme:t.theme,type:t.type}):i.value]),u.createVNode("div",{"data-testid":"toast-content"},[Sr(t.content)?u.h(u.toRaw(t.content),{toastProps:u.toRaw(t),closeToast:l,data:t.data,...t.expandCustomProps?t.contentProps:{contentProps:t.contentProps||{}}}):It(t.content)?t.content({toastProps:u.toRaw(t),closeToast:l,data:t.data}):t.dangerouslyHTMLString?u.h("div",{innerHTML:t.content}):t.content])]),(t.closeButton===void 0||t.closeButton===!0)&&u.createVNode(zo,{theme:t.theme,closeToast:f=>{f.stopPropagation(),f.preventDefault(),l()}},null),Sr(t.closeButton)?u.h(u.toRaw(t.closeButton),{closeToast:l,type:t.type,theme:t.theme}):It(t.closeButton)?t.closeButton({closeToast:l,type:t.type,theme:t.theme}):null,u.createVNode(Go,{className:t.progressClassName,style:t.progressStyle,rtl:t.rtl,theme:t.theme,isIn:s.value,type:t.type,hide:t.hideProgressBar,isRunning:o.value,autoClose:t.autoClose,controlledProgress:n.value,progress:t.progress,closeToast:t.isLoading?void 0:l},null)])}});let ar=0;function Zi(){typeof window>"u"||(ar&&window.cancelAnimationFrame(ar),ar=window.requestAnimationFrame(Zi),Rr.lastUrl!==window.location.href&&(Rr.lastUrl=window.location.href,Re.clear()))}const rs=u.defineComponent({name:"ToastifyContainer",inheritAttrs:!1,props:qi,setup(t){const e=u.computed(()=>t.containerId),r=u.computed(()=>xe[e.value]||[]),n=u.computed(()=>r.value.filter(i=>i.position===t.position));return u.onMounted(()=>{typeof window<"u"&&t.clearOnUrlChange&&window.requestAnimationFrame(Zi)}),u.onUnmounted(()=>{typeof window<"u"&&ar&&(window.cancelAnimationFrame(ar),Rr.lastUrl="")}),()=>u.createVNode(u.Fragment,null,[n.value.map(i=>{const{toastId:a=""}=i;return u.createVNode(ts,u.mergeProps({key:a},i),null)})])}});let Kr=!1;const Qi={isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1};function Ji(){const t=[];return Dt().forEach(e=>{const r=document.getElementById(e.containerId);r&&!r.classList.contains(Vr)&&t.push(e)}),t}function ns(t){const e=Ji().length,r=t??0;return r>0&&e+Ye.items.length>=r}function is(t){ns(t.limit)&&!t.updateId&&Ye.items.push({toastId:t.toastId,containerId:t.containerId,toastContent:t.content,toastProps:t})}function dt(t,e,r={}){if(Kr)return;r=Ur(Uo(),{type:e},u.toRaw(r)),(!r.toastId||typeof r.toastId!="string"&&typeof r.toastId!="number")&&(r.toastId=Yi()),r={...r,...r.type==="loading"?Qi:{},content:t,containerId:r.containerId||String(r.position)};const n=Number(r?.progress);return!isNaN(n)&&n<0&&(r.progress=0),n>1&&(r.progress=1),r.theme==="auto"&&(r.theme=$o()),is(r),Rr.lastUrl=window.location.href,r.multiple?Ye.items.length?r.updateId&&br(t,r):br(t,r):(Kr=!0,ee.clearAll(void 0,!1),setTimeout(()=>{br(t,r)},0),setTimeout(()=>{Kr=!1},390)),r.toastId}const ee=(t,e)=>dt(t,Ce.DEFAULT,e);ee.info=(t,e)=>dt(t,Ce.DEFAULT,{...e,type:Ce.INFO});ee.error=(t,e)=>dt(t,Ce.DEFAULT,{...e,type:Ce.ERROR});ee.warning=(t,e)=>dt(t,Ce.DEFAULT,{...e,type:Ce.WARNING});ee.warn=ee.warning;ee.success=(t,e)=>dt(t,Ce.DEFAULT,{...e,type:Ce.SUCCESS});ee.loading=(t,e)=>dt(t,Ce.DEFAULT,Ur(e,Qi));ee.dark=(t,e)=>dt(t,Ce.DEFAULT,Ur(e,{theme:Nt.DARK}));ee.remove=t=>{t?Re.dismiss(t):Re.clear()};ee.clearAll=(t,e)=>{u.nextTick(()=>{Re.clear(t,e)})};ee.isActive=t=>{let e=!1;return e=Ji().findIndex(r=>r.toastId===t)>-1,e};ee.update=(t,e={})=>{setTimeout(()=>{const r=Mo(t);if(r){const n=u.toRaw(r),{content:i}=n,a={...n,...e,toastId:e.toastId||t,updateId:Yi()},o=a.render||i;delete a.render,dt(o,a.type,a)}},0)};ee.done=t=>{ee.update(t,{isLoading:!1,progress:1})};ee.promise=as;function as(t,{pending:e,error:r,success:n},i){var a,o,s;let l;const c={...i||{},autoClose:!1};e&&(l=_n(e)?ee.loading(e,c):ee.loading(e.render,{...c,...e}));const f={autoClose:(a=i?.autoClose)!=null?a:!0,closeOnClick:(o=i?.closeOnClick)!=null?o:!0,closeButton:(s=i?.autoClose)!=null?s:null,isLoading:void 0,draggable:null,delay:100},d=(h,v,g)=>{if(v==null){ee.remove(l);return}const y={type:h,...f,...i,data:g},_=_n(v)?{render:v}:v;return l?ee.update(l,{...y,..._,isLoading:!1}):ee(_.render,{...y,..._,isLoading:!1}),g},p=It(t)?t():t;return p.then(h=>{d("success",n,h)}).catch(h=>{d("error",r,h)}),p}ee.POSITION=dr;ee.THEME=Nt;ee.TYPE=Ce;ee.TRANSITIONS=xo;const os={install(t,e={}){Lo.useHandler=e.useHandler||(()=>{}),ss(e)}};typeof window<"u"&&(window.Vue3Toastify=os);function ss(t={}){const e=Ur(Wi,t);Vo(e)}const ls={class:"dsg-alert__wrapper"},us=["innerHTML"],ea=u.defineComponent({__name:"DsgAlertComponent",props:{contentProps:{default:()=>({title:"",message:"",type:"gray",hasCloseButton:!0,useToast:!0})}},setup(t){const e=["dsg-alert","dsg-alert--"+t.contentProps.type,t.contentProps.hasCloseButton?"dsg-alert--has-close":"dsg-alert--no-close"],n=u.useAttrs().closeToast,i=u.ref(!1),a=()=>{t.contentProps.useToast?n():i.value=!0};return(o,s)=>i.value?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("div",{key:0,class:u.normalizeClass(e)},[o.contentProps.type==="gray"?(u.openBlock(),u.createBlock(Ct,{key:0,icon:{icon:"info-circle"},type:"outline",theme:"gray",size:"lg"})):u.createCommentVNode("",!0),o.contentProps.type==="error"?(u.openBlock(),u.createBlock(Ct,{key:1,icon:{icon:"alert-circle"},type:"outline",theme:"error",size:"lg"})):u.createCommentVNode("",!0),o.contentProps.type==="warning"?(u.openBlock(),u.createBlock(Ct,{key:2,icon:{icon:"alert-circle"},type:"outline",theme:"warning",size:"lg"})):u.createCommentVNode("",!0),o.contentProps.type==="success"?(u.openBlock(),u.createBlock(Ct,{key:3,icon:{icon:"check-circle"},type:"outline",theme:"success",size:"lg"})):u.createCommentVNode("",!0),u.createElementVNode("div",ls,[u.createElementVNode("p",{class:u.normalizeClass(["dsg-alert__title",{"dsg-alert__title--with-close-button":o.contentProps.hasCloseButton}])},u.toDisplayString(o.contentProps.title),3),o.contentProps.message?(u.openBlock(),u.createElementBlock("p",{key:0,innerHTML:o.contentProps.message,class:"dsg-alert__message"},null,8,us)):u.createCommentVNode("",!0)]),o.contentProps.hasCloseButton?(u.openBlock(),u.createElementBlock("button",{key:4,onClick:a,class:"dsg-alert__close-button"},[u.createVNode(M._sfc_main,{icon:"x-close",size:"sm"})])):u.createCommentVNode("",!0)]))}}),cs=new class Zt{info(e="",r="",n={}){Zt.showToast("gray",e,r,n)}error(e="",r="",n={}){Zt.showToast("error",e,r,n)}warning(e="",r="",n={}){Zt.showToast("warning",e,r,n)}success(e="",r="",n={}){Zt.showToast("success",e,r,n)}static showToast(e,r,n,i){const a={hasCloseButton:!1,position:"top-right",maxWidthClass:"",...i};ee(ea,{autoClose:!a.hasCloseButton,closeButton:!1,hideProgressBar:!0,closeOnClick:!a.hasCloseButton,position:a.position,containerClassName:`dsg-alert-container ${a.maxWidthClass}`,toastClassName:"dsg-alert",bodyClassName:"dsg-alert--body",contentProps:{title:r,message:n,type:e,hasCloseButton:a.hasCloseButton},onClick:()=>{}})}};function jr(t){return t===0?!1:Array.isArray(t)&&t.length===0?!0:!t}function fs(t){return(...e)=>!t(...e)}function ds(t,e){return t===void 0&&(t="undefined"),t===null&&(t="null"),t===!1&&(t="false"),t.toString().toLowerCase().indexOf(e.trim())!==-1}function hs(t){return t.filter(e=>!e.$isLabel)}function Yr(t,e){return r=>r.reduce((n,i)=>i[t]&&i[t].length?(n.push({$groupLabel:i[e],$isLabel:!0}),n.concat(i[t])):n,[])}const ei=(...t)=>e=>t.reduce((r,n)=>n(r),e);var ps={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(t,e){return jr(t)?"":e?t[e]:t}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1},filteringSortFunc:{type:Function,default:null}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const t=this.search||"",e=t.toLowerCase().trim();let r=this.options.concat();return this.internalSearch?r=this.groupValues?this.filterAndFlat(r,e,this.label):this.filterOptions(r,e,this.label,this.customLabel):r=this.groupValues?Yr(this.groupValues,this.groupLabel)(r):r,r=this.hideSelected?r.filter(fs(this.isSelected)):r,this.taggable&&e.length&&!this.isExistingOption(e)&&(this.tagPosition==="bottom"?r.push({isTag:!0,label:t}):r.unshift({isTag:!0,label:t})),r.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(t=>t[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(e=>this.customLabel(e,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(t,e,r){return ei(this.filterGroups(e,r,this.groupValues,this.groupLabel,this.customLabel),Yr(this.groupValues,this.groupLabel))(t)},flatAndStrip(t){return ei(Yr(this.groupValues,this.groupLabel),hs)(t)},updateSearch(t){this.search=t},isExistingOption(t){return this.options?this.optionKeys.indexOf(t)>-1:!1},isSelected(t){const e=this.trackBy?t[this.trackBy]:t;return this.valueKeys.indexOf(e)>-1},isOptionDisabled(t){return!!t.$isDisabled},getOptionLabel(t){if(jr(t))return"";if(t.isTag)return t.label;if(t.$isLabel)return t.$groupLabel;const e=this.customLabel(t,this.label);return jr(e)?"":e},select(t,e){if(t.$isLabel&&this.groupSelect){this.selectGroup(t);return}if(!(this.blockKeys.indexOf(e)!==-1||this.disabled||t.$isDisabled||t.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(e==="Tab"&&!this.pointerDirty)){if(t.isTag)this.$emit("tag",t.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(t)){e!=="Tab"&&this.removeElement(t);return}this.multiple?this.$emit("update:modelValue",this.internalValue.concat([t])):this.$emit("update:modelValue",t),this.$emit("select",t,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(t){const e=this.options.find(r=>r[this.groupLabel]===t.$groupLabel);if(e){if(this.wholeGroupSelected(e)){this.$emit("remove",e[this.groupValues],this.id);const r=this.trackBy?e[this.groupValues].map(i=>i[this.trackBy]):e[this.groupValues],n=this.internalValue.filter(i=>r.indexOf(this.trackBy?i[this.trackBy]:i)===-1);this.$emit("update:modelValue",n)}else{const r=e[this.groupValues].filter(n=>!(this.isOptionDisabled(n)||this.isSelected(n)));this.max&&r.splice(this.max-this.internalValue.length),this.$emit("select",r,this.id),this.$emit("update:modelValue",this.internalValue.concat(r))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(t){return t[this.groupValues].every(e=>this.isSelected(e)||this.isOptionDisabled(e))},wholeGroupDisabled(t){return t[this.groupValues].every(this.isOptionDisabled)},removeElement(t,e=!0){if(this.disabled||t.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const r=typeof t=="object"?this.valueKeys.indexOf(t[this.trackBy]):this.valueKeys.indexOf(t);if(this.multiple){const n=this.internalValue.slice(0,r).concat(this.internalValue.slice(r+1));this.$emit("update:modelValue",n)}else this.$emit("update:modelValue",null);this.$emit("remove",t,this.id),this.closeOnSelect&&e&&this.deactivate()},removeLastElement(){this.blockKeys.indexOf("Delete")===-1&&this.search.length===0&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&this.pointer===0&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||typeof this.$el<"u"&&this.$el.focus(),this.$emit("open",this.id))},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search!==null&&typeof this.$refs.search<"u"&&this.$refs.search.blur():typeof this.$el<"u"&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window>"u")return;const t=this.$el.getBoundingClientRect().top,e=window.innerHeight-this.$el.getBoundingClientRect().bottom;e>this.maxHeight||e>t||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(e-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(t-40,this.maxHeight))},filterOptions(t,e,r,n){return e?t.filter(i=>ds(n(i,r),e)).sort((i,a)=>typeof this.filteringSortFunc=="function"?this.filteringSortFunc(i,a):n(i,r).length-n(a,r).length):t},filterGroups(t,e,r,n,i){return a=>a.map(o=>{if(!o[r])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const s=this.filterOptions(o[r],t,e,i);return s.length?{[n]:o[n],[r]:s}:[]})}}},vs={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(t,e){return{"multiselect__option--highlight":t===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(e)}},groupHighlight(t,e){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":e.$isLabel}];const r=this.options.find(n=>n[this.groupLabel]===e.$groupLabel);return r&&!this.wholeGroupDisabled(r)?["multiselect__option--group",{"multiselect__option--highlight":t===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(r)}]:"multiselect__option--disabled"},addPointerElement({key:t}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],t),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list?.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list?.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(t){this.pointer=t,this.pointerDirty=!0}}},Un={name:"vue-multiselect",mixins:[ps,vs],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:t=>`and ${t} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},spellcheck:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0},required:{type:Boolean,default:!1},useTeleport:{type:Boolean,default:!1}},data(){return{dropdownStyles:{},ready:!1}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)},isRequired(){return this.required===!1?!1:this.internalValue.length<=0}},watch:{isOpen(t){t&&(this.useTeleport?(this.ready=!1,this.$nextTick(()=>{const e=this.$el.getBoundingClientRect();this.dropdownStyles={position:"absolute",top:`${e.bottom+window.scrollY}px`,left:`${e.left+window.scrollX}px`,width:`${e.width}px`,zIndex:9999},this.ready=!0})):this.ready=!0)}}};const gs=["tabindex","aria-expanded","aria-owns","aria-activedescendant"],xs={ref:"tags",class:"multiselect__tags"},ys={class:"multiselect__tags-wrap"},ms=["textContent"],ws=["onKeypress","onMousedown"],_s=["textContent"],Es={class:"multiselect__spinner"},As=["name","id","spellcheck","placeholder","required","value","disabled","tabindex","aria-label","aria-controls"],Cs=["id","aria-multiselectable"],bs={key:0},Ss={class:"multiselect__option"},Is=["aria-selected","id","role"],Os=["onClick","onMouseenter","data-select","data-selected","data-deselect"],Ts=["data-select","data-deselect","onMouseenter","onMousedown"],Ns={class:"multiselect__option"},Ds={class:"multiselect__option"};function Bs(t,e,r,n,i,a){return u.openBlock(),u.createElementBlock("div",{tabindex:t.searchable?-1:r.tabindex,class:u.normalizeClass([{"multiselect--active":t.isOpen,"multiselect--disabled":r.disabled,"multiselect--above":a.isAbove,"multiselect--has-options-group":a.hasOptionGroup},"multiselect"]),onFocus:e[14]||(e[14]=o=>t.activate()),onBlur:e[15]||(e[15]=o=>t.searchable?!1:t.deactivate()),onKeydown:[e[16]||(e[16]=u.withKeys(u.withModifiers(o=>t.pointerForward(),["self","prevent"]),["down"])),e[17]||(e[17]=u.withKeys(u.withModifiers(o=>t.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:e[18]||(e[18]=u.withKeys(u.withModifiers(o=>t.addPointerElement(o),["stop","self"]),["enter","tab"])),onKeyup:e[19]||(e[19]=u.withKeys(o=>t.deactivate(),["esc"])),role:"combobox","aria-expanded":t.isOpen,"aria-owns":"listbox-"+t.id,"aria-activedescendant":t.isOpen&&t.pointer!==null?t.id+"-"+t.pointer:null},[u.renderSlot(t.$slots,"caret",{toggle:t.toggle},()=>[u.createElementVNode("div",{onMousedown:e[0]||(e[0]=u.withModifiers(o=>t.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),u.renderSlot(t.$slots,"clear",{search:t.search}),u.createElementVNode("div",xs,[u.renderSlot(t.$slots,"selection",{search:t.search,remove:t.removeElement,values:a.visibleValues,isOpen:t.isOpen},()=>[u.withDirectives(u.createElementVNode("div",ys,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.visibleValues,(o,s)=>u.renderSlot(t.$slots,"tag",{option:o,search:t.search,remove:t.removeElement},()=>[(u.openBlock(),u.createElementBlock("span",{class:"multiselect__tag",key:s,onMousedown:e[1]||(e[1]=u.withModifiers(()=>{},["prevent"]))},[u.createElementVNode("span",{textContent:u.toDisplayString(t.getOptionLabel(o))},null,8,ms),u.createElementVNode("i",{tabindex:"1",onKeypress:u.withKeys(u.withModifiers(l=>t.removeElement(o),["prevent"]),["enter"]),onMousedown:u.withModifiers(l=>t.removeElement(o),["prevent"]),class:"multiselect__tag-icon"},null,40,ws)],32))])),256))],512),[[u.vShow,a.visibleValues.length>0]]),t.internalValue&&t.internalValue.length>r.limit?u.renderSlot(t.$slots,"limit",{key:0},()=>[u.createElementVNode("strong",{class:"multiselect__strong",textContent:u.toDisplayString(r.limitText(t.internalValue.length-r.limit))},null,8,_s)]):u.createCommentVNode("v-if",!0)]),u.createVNode(u.Transition,{name:"multiselect__loading"},{default:u.withCtx(()=>[u.renderSlot(t.$slots,"loading",{},()=>[u.withDirectives(u.createElementVNode("div",Es,null,512),[[u.vShow,r.loading]])])]),_:3}),t.searchable?(u.openBlock(),u.createElementBlock("input",{key:0,ref:"search",name:r.name,id:t.id,type:"text",autocomplete:"off",spellcheck:r.spellcheck,placeholder:t.placeholder,required:a.isRequired,style:u.normalizeStyle(a.inputStyle),value:t.search,disabled:r.disabled,tabindex:r.tabindex,"aria-label":r.name+"-searchbox",onInput:e[2]||(e[2]=o=>t.updateSearch(o.target.value)),onFocus:e[3]||(e[3]=u.withModifiers(o=>t.activate(),["prevent"])),onBlur:e[4]||(e[4]=u.withModifiers(o=>t.deactivate(),["prevent"])),onKeyup:e[5]||(e[5]=u.withKeys(o=>t.deactivate(),["esc"])),onKeydown:[e[6]||(e[6]=u.withKeys(u.withModifiers(o=>t.pointerForward(),["prevent"]),["down"])),e[7]||(e[7]=u.withKeys(u.withModifiers(o=>t.pointerBackward(),["prevent"]),["up"])),e[9]||(e[9]=u.withKeys(u.withModifiers(o=>t.removeLastElement(),["stop"]),["delete"]))],onKeypress:e[8]||(e[8]=u.withKeys(u.withModifiers(o=>t.addPointerElement(o),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+t.id},null,44,As)):u.createCommentVNode("v-if",!0),a.isSingleLabelVisible?(u.openBlock(),u.createElementBlock("span",{key:1,class:"multiselect__single",onMousedown:e[10]||(e[10]=u.withModifiers((...o)=>t.toggle&&t.toggle(...o),["prevent"]))},[u.renderSlot(t.$slots,"singleLabel",{option:a.singleValue},()=>[u.createTextVNode(u.toDisplayString(t.currentOptionLabel),1)])],32)):u.createCommentVNode("v-if",!0),a.isPlaceholderVisible?(u.openBlock(),u.createElementBlock("span",{key:2,class:"multiselect__placeholder",onMousedown:e[11]||(e[11]=u.withModifiers((...o)=>t.toggle&&t.toggle(...o),["prevent"]))},[u.renderSlot(t.$slots,"placeholder",{},()=>[u.createTextVNode(u.toDisplayString(t.placeholder),1)])],32)):u.createCommentVNode("v-if",!0)],512),(u.openBlock(),u.createBlock(u.Teleport,{to:"body",disabled:!r.useTeleport},[u.createVNode(u.Transition,{name:"multiselect"},{default:u.withCtx(()=>[t.isOpen&&i.ready?(u.openBlock(),u.createElementBlock("div",{key:0,class:"multiselect__content-wrapper",onFocus:e[12]||(e[12]=(...o)=>t.activate&&t.activate(...o)),tabindex:"-1",onMousedown:e[13]||(e[13]=u.withModifiers(()=>{},["prevent"])),style:u.normalizeStyle([i.dropdownStyles,{maxHeight:t.optimizedHeight+"px"}]),ref:"list"},[u.createElementVNode("ul",{class:"multiselect__content",style:u.normalizeStyle(a.contentStyle),role:"listbox",id:"listbox-"+t.id,"aria-multiselectable":t.multiple},[u.renderSlot(t.$slots,"beforeList"),t.multiple&&t.max===t.internalValue.length?(u.openBlock(),u.createElementBlock("li",bs,[u.createElementVNode("span",Ss,[u.renderSlot(t.$slots,"maxElements",{},()=>[u.createTextVNode("Maximum of "+u.toDisplayString(t.max)+" options selected. First remove a selected option to select another.",1)])])])):u.createCommentVNode("v-if",!0),!t.max||t.internalValue.length<t.max?(u.openBlock(!0),u.createElementBlock(u.Fragment,{key:1},u.renderList(t.filteredOptions,(o,s)=>(u.openBlock(),u.createElementBlock("li",{class:"multiselect__element",key:s,"aria-selected":t.isSelected(o),id:t.id+"-"+s,role:o&&(o.$isLabel||o.$isDisabled)?null:"option"},[o&&(o.$isLabel||o.$isDisabled)?u.createCommentVNode("v-if",!0):(u.openBlock(),u.createElementBlock("span",{key:0,class:u.normalizeClass([t.optionHighlight(s,o),"multiselect__option"]),onClick:u.withModifiers(l=>t.select(o),["stop"]),onMouseenter:u.withModifiers(l=>t.pointerSet(s),["self"]),"data-select":o&&o.isTag?t.tagPlaceholder:a.selectLabelText,"data-selected":a.selectedLabelText,"data-deselect":a.deselectLabelText},[u.renderSlot(t.$slots,"option",{option:o,search:t.search,index:s},()=>[u.createElementVNode("span",null,u.toDisplayString(t.getOptionLabel(o)),1)])],42,Os)),o&&(o.$isLabel||o.$isDisabled)?(u.openBlock(),u.createElementBlock("span",{key:1,"data-select":t.groupSelect&&a.selectGroupLabelText,"data-deselect":t.groupSelect&&a.deselectGroupLabelText,class:u.normalizeClass([t.groupHighlight(s,o),"multiselect__option"]),onMouseenter:u.withModifiers(l=>t.groupSelect&&t.pointerSet(s),["self"]),onMousedown:u.withModifiers(l=>t.selectGroup(o),["prevent"])},[u.renderSlot(t.$slots,"option",{option:o,search:t.search,index:s},()=>[u.createElementVNode("span",null,u.toDisplayString(t.getOptionLabel(o)),1)])],42,Ts)):u.createCommentVNode("v-if",!0)],8,Is))),128)):u.createCommentVNode("v-if",!0),u.withDirectives(u.createElementVNode("li",null,[u.createElementVNode("span",Ns,[u.renderSlot(t.$slots,"noResult",{search:t.search},()=>[e[20]||(e[20]=u.createTextVNode("No elements found. Consider changing the search query."))])])],512),[[u.vShow,r.showNoResults&&t.filteredOptions.length===0&&t.search&&!r.loading]]),u.withDirectives(u.createElementVNode("li",null,[u.createElementVNode("span",Ds,[u.renderSlot(t.$slots,"noOptions",{},()=>[e[21]||(e[21]=u.createTextVNode("List is empty."))])])],512),[[u.vShow,r.showNoOptions&&(t.options.length===0||a.hasOptionGroup===!0&&t.filteredOptions.length===0)&&!t.search&&!r.loading]]),u.renderSlot(t.$slots,"afterList")],12,Cs)],36)):u.createCommentVNode("v-if",!0)]),_:3})],8,["disabled"]))],42,gs)}Un.render=Bs;const Rs={class:"user-picker"},Ps={class:"user-option"},ks=["data-initials"],Ms=["src"],Ls={class:"meta"},Fs={class:"name"},Vs={key:0,class:"email"},Us={class:"tags"},$s=["data-initials"],Hs=["src"],Gs={key:0,class:"inline-block relative"},zs={class:"placeholder"},Ws={key:0,class:"single-display"},Xs=["data-initials"],Ks=["src"],js={key:0,class:"name"},Ys={class:"placeholder"},qs=u.defineComponent({__name:"DsgIconSelect",props:{modelValue:{},options:{},endpoint:{},queryParam:{default:"q"},extraParams:{},method:{default:"GET"},minChars:{default:1},delay:{default:300},multiple:{type:Boolean,default:!1},trackBy:{default:"id"},labelKey:{default:"primaryText"},secondaryTextKey:{default:"secondaryText"},iconKey:{default:"iconUrl"},placeholder:{default:"Search..."},clearOnSelect:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},selectLabel:{default:""},selectedLabel:{default:""},hideSelectedLabel:{type:Boolean,default:!1}},emits:["update:modelValue","change","search","loaded","error"],setup(t,{emit:e}){const r=t,n=e,i=u.ref(r.options??[]),a=u.ref(!1),o=u.ref("");let s,l=null;u.watch(()=>r.options,g=>{g&&(i.value=[...g])});const c=(g,y)=>{if(g)return g[y]},f=g=>{if(!g)return"";const y=g.trim().split(/\s+/),_=y[0]?.[0]??"",m=y.length>1?y[y.length-1][0]??"":"";return(_+m).toUpperCase()};u.computed(()=>r.multiple?r.modelValue??[]:r.modelValue?[r.modelValue]:[]);const d=u.computed(()=>!!r.endpoint),p=async g=>{if(d.value&&!((g?.length??0)<r.minChars)){a.value=!0,l?.abort(),l=new AbortController;try{const y=new URL(r.endpoint);if(r.method==="GET"){y.searchParams.set(r.queryParam,g),r.extraParams&&Object.entries(r.extraParams).forEach(([E,w])=>y.searchParams.set(E,String(w)));const _=await fetch(y.toString(),{signal:l.signal});if(!_.ok)throw new Error(`Request failed: ${_.status}`);const m=await _.json();i.value=Array.isArray(m)?m:m?.items??[],n("loaded",i.value)}else{const _={[r.queryParam]:g,...r.extraParams??{}},m=await fetch(y.toString(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(_),signal:l.signal});if(!m.ok)throw new Error(`Request failed: ${m.status}`);const E=await m.json();i.value=Array.isArray(E)?E:E?.items??[],n("loaded",i.value)}}catch(y){y?.name!=="AbortError"&&(console.error(y),n("error",y))}finally{a.value=!1}}},h=g=>{o.value=g,n("search",g),d.value&&(window.clearTimeout(s),s=window.setTimeout(()=>p(g),r.delay))},v=g=>{n("update:modelValue",g),n("change",g)};return(g,y)=>(u.openBlock(),u.createElementBlock("div",Rs,[u.createVNode(u.unref(Un),{"model-value":g.modelValue,"onUpdate:modelValue":v,options:i.value,multiple:g.multiple,"track-by":g.trackBy,searchable:!0,"internal-search":!d.value,loading:a.value,"clear-on-select":!1,"close-on-select":!g.multiple,deselectLabel:"",placeholder:g.placeholder,disabled:g.disabled,label:"name","allow-empty":!0,onSearchChange:h,"select-label":g.selectLabel,"selected-label":g.selectedLabel,class:"user-picker__multiselect"},{option:u.withCtx(({option:_})=>[u.createElementVNode("div",Ps,[u.createElementVNode("div",{class:"avatar","data-initials":f(c(_,g.labelKey))},[c(_,g.iconKey)?(u.openBlock(),u.createElementBlock("img",{key:0,src:c(_,g.iconKey),alt:""},null,8,Ms)):u.createCommentVNode("",!0)],8,ks),u.createElementVNode("div",Ls,[u.createElementVNode("div",Fs,u.toDisplayString(c(_,g.labelKey)),1),_.secondaryText?(u.openBlock(),u.createElementBlock("div",Vs,u.toDisplayString(_.secondaryText),1)):u.createCommentVNode("",!0)])])]),selection:u.withCtx(({values:_,isOpen:m})=>[u.createElementVNode("div",Us,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(_,E=>(u.openBlock(),u.createElementBlock("div",{class:"avatar","data-initials":f(c(E,g.labelKey))},[c(E,g.iconKey)?(u.openBlock(),u.createElementBlock("img",{key:0,src:c(E,g.iconKey),alt:""},null,8,Hs)):u.createCommentVNode("",!0)],8,$s))),256)),g.multiple&&_.length>0?(u.openBlock(),u.createElementBlock("div",Gs,[u.createElementVNode("div",zs,[u.createVNode(M._sfc_main,{icon:"plus",size:"xs"})])])):u.createCommentVNode("",!0)])]),singleLabel:u.withCtx(({option:_})=>[_?(u.openBlock(),u.createElementBlock("div",Ws,[u.createElementVNode("div",{class:"avatar","data-initials":f(c(_,g.labelKey))},[c(_,g.iconKey)?(u.openBlock(),u.createElementBlock("img",{key:0,src:c(_,g.iconKey),alt:""},null,8,Ks)):u.createCommentVNode("",!0)],8,Xs),g.hideSelectedLabel?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("span",js,u.toDisplayString(c(_,g.labelKey)),1))])):u.createCommentVNode("",!0)]),placeholder:u.withCtx(()=>[u.createElementVNode("div",Ys,[u.createVNode(M._sfc_main,{icon:"plus",size:"xs"})])]),noResult:u.withCtx(()=>[...y[0]||(y[0]=[u.createElementVNode("div",{class:"empty"},"No results found.",-1)])]),_:1},8,["model-value","options","multiple","track-by","internal-search","loading","close-on-select","placeholder","disabled","select-label","selected-label"])]))}}),Zs=Mt(qs,[["__scopeId","data-v-3ede6fde"]]),Qs={class:"dsg-badge--before"},Js={key:2,class:"dsg-badge--dot"},el={key:1,class:"dsg-badge--label"},tl={class:"dsg-badge--after"},rl={key:1,class:"dsg-badge--close-wrapper"},ta=u.defineComponent({__name:"DsgBadge",props:{label:{default:""},classes:{default:""},type:{default:"standard"},size:{default:"md"},hasClose:{type:Boolean,default:!1},avatarUri:{default:""},iconBefore:{default:""},icon:{default:""},iconAfter:{default:""},iconOnly:{type:Boolean,default:!1},hasDot:{type:Boolean,default:!1},theme:{default:"badge-modern"},themeColor:{default:"gray"},destroyOnClose:{type:Boolean,default:!1}},emits:["before-hide","after-hide","before-destroy","after-destroy","on-click"],setup(t,{expose:e,emit:r}){const n=t.iconBefore||t.iconAfter||t.type==="add"||t.type==="icon-only",i=["dsg-badge",`dsg-badge--${t.size}`,`dsg-badge--${t.type}`,`dsg-badge--${t.theme}`,`dsg-badge--${t.themeColor}`,`dsg-badge--${t.iconOnly?"icon-only":"label"}`,`${t.hasClose?"dsg-badge--has-close":""}`,`${t.avatarUri?"dsg-badge--has-avatar":""}`,`${t.hasDot?"dsg-badge--has-dot":""}`,`${n?"dsg-badge--has-icon":""}`,`${t.iconBefore?"dsg-badge--has-icon-before":""}`,`${t.iconAfter?"dsg-badge--has-icon-after":""}`,t.classes].join(" ").replaceAll(/\s+/g," ").trim();(t.type==="add"||t.type==="icon-only")&&(t.label||t.avatarUri||t.hasDot||t.iconBefore||t.iconAfter||t.hasClose)&&t.theme!=="badge-modern"&&t.themeColor&&new M.DsgPropSyntaxWarning("DsgBadge: 'add'/'icon-only' type badges should only be called with 'size', 'theme' and 'themeColor' props. Note that 'themeColor' prop is discarded for theme 'badge-modern'."),[t.avatarUri,t.iconBefore,t.hasDot].filter(Boolean).length>1&&new M.DsgPropSyntaxWarning("DsgBadge: 'avatarUri', 'iconBefore' and 'hasDot' props are mutually exclusive. Please use only one of them."),[t.iconAfter,t.hasClose].filter(Boolean).length>1&&new M.DsgPropSyntaxWarning("DsgBadge: 'iconAfter' and 'hasClose' props are mutually exclusive. Please use only one of them.");const s=r,l=u.useTemplateRef("dsgBadge"),c=d=>{t.destroyOnClose?(s("before-destroy",l.value),l.value?.remove(),s("after-destroy")):(s("before-hide",l.value),l.value&&(l.value.style.display="none"),s("after-hide",l.value))},f=d=>{s("on-click",l.value)};return e({hideOrDestroy:c,clickEvent:f}),(d,p)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(u.unref(i)),ref:"dsgBadge",onClick:f},[d.type==="standard"?u.renderSlot(d.$slots,"dsg-badge--before",{key:0},()=>[u.createElementVNode("div",Qs,[d.avatarUri?(u.openBlock(),u.createBlock(sr,{key:0,"profile-uri":d.avatarUri,class:"dsg-badge--avatar",size:"xxs"},null,8,["profile-uri"])):u.createCommentVNode("",!0),d.iconBefore?(u.openBlock(),u.createBlock(M._sfc_main,{key:1,icon:d.iconBefore,size:"xxs",class:"dsg-badge--icon-before dsg-badge--icon"},null,8,["icon"])):u.createCommentVNode("",!0),d.hasDot?(u.openBlock(),u.createElementBlock("span",Js)):u.createCommentVNode("",!0)])]):u.createCommentVNode("",!0),d.type==="standard"?(u.openBlock(),u.createElementBlock("label",el,u.toDisplayString(d.label),1)):u.createCommentVNode("",!0),d.type==="add"?(u.openBlock(),u.createBlock(M._sfc_main,{key:2,icon:"plus",size:"xxs",class:"dsg-badge--icon-add dsg-badge--icon"})):u.createCommentVNode("",!0),d.type==="icon-only"?(u.openBlock(),u.createBlock(M._sfc_main,{key:3,icon:d.icon,size:"xxs",class:"dsg-badge--icon-only dsg-badge--icon"},null,8,["icon"])):u.createCommentVNode("",!0),d.type==="standard"?u.renderSlot(d.$slots,"dsg-badge--after",{key:4},()=>[u.createElementVNode("div",tl,[d.iconAfter?(u.openBlock(),u.createBlock(M._sfc_main,{key:0,icon:d.iconAfter,size:"xxs",class:"dsg-badge--icon-after dsg-badge--icon"},null,8,["icon"])):u.createCommentVNode("",!0),d.hasClose?(u.openBlock(),u.createElementBlock("span",rl,[d.hasClose?(u.openBlock(),u.createBlock(M._sfc_main,{key:0,icon:"x-close",class:"dsg-badge--close",size:"xxs",onClick:c})):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)])]):u.createCommentVNode("",!0)],2))}}),nl={class:"dsg-input-number--control"},il=["disabled"],al=["value","disabled"],ol=["disabled"],sl={key:0,class:"dsg-input-number--label"},ll=u.defineComponent({__name:"DsgInputNumber",props:{modelValue:{},disabled:{type:Boolean},label:{},step:{}},emits:["update:modelValue"],setup(t,{emit:e}){const r=t,n=e,i=()=>{r.disabled||n("update:modelValue",r.modelValue+(r.step??1))},a=()=>{r.disabled||n("update:modelValue",r.modelValue-(r.step??1))},o=s=>{if(r.disabled)return;const l=s.target;n("update:modelValue",Number(l.value))};return(s,l)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-input-number",{"dsg-input-number--disabled":r.disabled}])},[u.createElementVNode("div",nl,[u.createElementVNode("button",{type:"button",onClick:a,disabled:r.disabled,class:"dsg-input-number--btn dsg-input-number--decrement"},[r.disabled?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(M._sfc_main,{key:0,icon:"minus",size:"sm"}))],8,il),u.createElementVNode("input",{type:"number",value:s.modelValue,onInput:o,disabled:r.disabled,class:"dsg-input-number--input flex-1"},null,40,al),u.createElementVNode("button",{type:"button",disabled:r.disabled,onClick:i,class:"dsg-input-number--btn dsg-input-number--increment"},[r.disabled?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(M._sfc_main,{key:0,icon:"plus",size:"sm"}))],8,ol)]),s.label!==void 0||s.$slots.label?(u.openBlock(),u.createElementBlock("div",sl,[u.renderSlot(s.$slots,"label",{},()=>[u.createTextVNode(u.toDisplayString(s.label),1)])])):u.createCommentVNode("",!0)],2))}}),ul={key:0,class:"dsg-checkbox-group--form-wrapper"},cl={class:"dsg-checkbox-group--header"},fl={class:"dsg-checkbox-group--header-title-wrapper"},dl={class:"dsg-checkbox-group--title"},hl=["innerHTML"],pl={class:"dsg-checkbox-group--options"},vl=["onClick"],gl=["textContent"],xl=["innerHTML","data"],yl=u.defineComponent({__name:"DsgCheckboxGroup",props:u.mergeModels({size:{default:"md"},theme:{default:"form"},title:{default:""},subtext:{default:""},options:{default:()=>[]},tooltip:{default:null},defaultValue:{type:[String,Number,Boolean,Array,null],default:()=>[]}},{modelValue:{type:[String,Number,Boolean,Array,null],default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=u.useModel(t,"modelValue"),r=["dsg-checkbox-group",`dsg-checkbox-group--${t.size}`,`dsg-checkbox-group--theme-${t.theme}`],n=(i,a)=>{i.target instanceof HTMLAnchorElement||(e.value=a.value)};return(i,a)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(r)},[["form","form-radio"].includes(i.theme)?(u.openBlock(),u.createElementBlock("div",ul,[u.createElementVNode("div",cl,[u.renderSlot(i.$slots,"dsg-checkbox-group--header",{},()=>[u.createElementVNode("div",fl,[u.createElementVNode("h3",dl,u.toDisplayString(i.title),1),i.tooltip?(u.openBlock(),u.createBlock(M._sfc_main$1,{key:0,label:i.tooltip,position:"top",triggers:["hover"],"auto-hide":!0,theme:"dark",class:"dsg-checkbox-group--tooltip"},null,8,["label"])):u.createCommentVNode("",!0)]),i.subtext?(u.openBlock(),u.createElementBlock("p",{key:0,class:"dsg-checkbox-group--subtext",innerHTML:i.subtext},null,8,hl)):u.createCommentVNode("",!0)])]),u.createElementVNode("div",pl,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(i.options,(o,s)=>(u.openBlock(),u.createElementBlock("div",{key:s,class:"dsg-checkbox-group--option"},[u.createVNode(M._sfc_main$2,{label:o.label,value:o.value,disabled:o.disabled,size:"sm",type:["form","panel"].includes(i.theme)?"checkbox":"radio",modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=l=>e.value=l)},null,8,["label","value","disabled","type","modelValue"])]))),128))])])):u.createCommentVNode("",!0),["panel","panel-content"].includes(i.theme)?(u.openBlock(!0),u.createElementBlock(u.Fragment,{key:1},u.renderList(i.options,(o,s)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-checkbox-group--panel",`dsg-checkbox-group--panel-${e.value===o.value?"selected":"unselected"}`]),onClick:l=>n(l,o)},[(u.openBlock(),u.createElementBlock("div",{class:"dsg-checkbox-group--panel-left",key:s},[u.renderSlot(i.$slots,`dsg-checkbox-group--panel-title--${String(o.value).trim().toLowerCase().replace(/[^0-9a-zA-Z]/g,"-").replace(/-+/g,"-")}`,{data:o},()=>[o.icon?(u.openBlock(),u.createBlock(M._sfc_main,{key:0,icon:o.icon,size:"xl"},null,8,["icon"])):u.createCommentVNode("",!0),u.createElementVNode("h3",{class:"dsg-checkbox-group--panel-title",textContent:u.toDisplayString(o.label)},null,8,gl)]),u.renderSlot(i.$slots,`dsg-checkbox-group--panel-subtext--${String(o.value).trim().toLowerCase().replace(/[^0-9a-zA-Z]/g,"-").replace(/-+/g,"-")}`,{},()=>[o.subtext?(u.openBlock(),u.createElementBlock("p",{key:0,class:"dsg-checkbox-group--panel-subtext",innerHTML:o.subtext,data:o},null,8,xl)):u.createCommentVNode("",!0)])])),(u.openBlock(),u.createElementBlock("div",{key:s,class:"dsg-checkbox-group--panel-right"},[u.createVNode(M._sfc_main$2,{value:o.value,disabled:o.disabled,type:"radio",modelValue:e.value,"onUpdate:modelValue":a[1]||(a[1]=l=>e.value=l)},null,8,["value","disabled","modelValue"])]))],10,vl))),256)):u.createCommentVNode("",!0)]))}});var ml="2.0.4",En=500,ti="user-agent",Bt="",ri="?",Pr="function",ut="undefined",Rt="object",An="string",Ie="browser",Qe="cpu",We="device",Ve="engine",ke="os",Ot="result",D="name",S="type",N="vendor",B="version",Oe="architecture",ur="major",T="model",Qt="console",$="mobile",Z="tablet",ue="smarttv",Ge="wearable",vr="xr",Jt="embedded",Ut="inapp",$n="brands",yt="formFactors",Hn="fullVersionList",Tt="platform",Gn="platformVersion",Hr="bitness",ht="sec-ch-ua",wl=ht+"-full-version-list",_l=ht+"-arch",El=ht+"-"+Hr,Al=ht+"-form-factors",Cl=ht+"-"+$,bl=ht+"-"+T,ra=ht+"-"+Tt,Sl=ra+"-version",na=[$n,Hn,$,T,Tt,Gn,Oe,yt,Hr],gr="Amazon",_t="Apple",ni="ASUS",ii="BlackBerry",pt="Google",ai="Huawei",qr="Lenovo",oi="Honor",xr="LG",Zr="Microsoft",Qr="Motorola",Jr="Nvidia",si="OnePlus",en="OPPO",$t="Samsung",li="Sharp",Ht="Sony",tn="Xiaomi",rn="Zebra",ui="Chrome",ci="Chromium",it="Chromecast",Tr="Edge",Gt="Firefox",zt="Opera",nn="Facebook",fi="Sogou",Et="Mobile ",Wt=" Browser",Cn="Windows",Il=typeof window!==ut,Te=Il&&window.navigator?window.navigator:void 0,lt=Te&&Te.userAgentData?Te.userAgentData:void 0,Ol=function(t,e){var r={},n=e;if(!kr(e)){n={};for(var i in e)for(var a in e[i])n[a]=e[i][a].concat(n[a]?n[a]:[])}for(var o in t)r[o]=n[o]&&n[o].length%2===0?n[o].concat(t[o]):t[o];return r},Gr=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},bn=function(t,e){if(typeof t===Rt&&t.length>0){for(var r in t)if(Je(e)==Je(t[r]))return!0;return!1}return Lt(t)?Je(e)==Je(t):!1},kr=function(t,e){for(var r in t)return/^(browser|cpu|device|engine|os)$/.test(r)||(e?kr(t[r]):!1)},Lt=function(t){return typeof t===An},an=function(t){if(t){for(var e=[],r=Pt(/\\?\"/g,t).split(","),n=0;n<r.length;n++)if(r[n].indexOf(";")>-1){var i=Mr(r[n]).split(";v=");e[n]={brand:i[0],version:i[1]}}else e[n]=Mr(r[n]);return e}},Je=function(t){return Lt(t)?t.toLowerCase():t},on=function(t){return Lt(t)?Pt(/[^\d\.]/g,t).split(".")[0]:void 0},et=function(t){for(var e in t){var r=t[e];typeof r==Rt&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this},Pt=function(t,e){return Lt(e)?e.replace(t,Bt):e},Xt=function(t){return Pt(/\\?\"/g,t)},Mr=function(t,e){if(Lt(t))return t=Pt(/^\s\s*/,t),typeof e===ut?t:t.substring(0,En)},sn=function(t,e){if(!(!t||!e))for(var r=0,n,i,a,o,s,l;r<e.length&&!s;){var c=e[r],f=e[r+1];for(n=i=0;n<c.length&&!s&&c[n];)if(s=c[n++].exec(t),s)for(a=0;a<f.length;a++)l=s[++i],o=f[a],typeof o===Rt&&o.length>0?o.length===2?typeof o[1]==Pr?this[o[0]]=o[1].call(this,l):this[o[0]]=o[1]:o.length>=3&&(typeof o[1]===Pr&&!(o[1].exec&&o[1].test)?o.length>3?this[o[0]]=l?o[1].apply(this,o.slice(2)):void 0:this[o[0]]=l?o[1].call(this,l,o[2]):void 0:o.length==3?this[o[0]]=l?l.replace(o[1],o[2]):void 0:o.length==4?this[o[0]]=l?o[3].call(this,l.replace(o[1],o[2])):void 0:o.length>4&&(this[o[0]]=l?o[3].apply(this,[l.replace(o[1],o[2])].concat(o.slice(4))):void 0)):this[o]=l||void 0;r+=2}},ze=function(t,e){for(var r in e)if(typeof e[r]===Rt&&e[r].length>0){for(var n=0;n<e[r].length;n++)if(bn(e[r][n],t))return r===ri?void 0:r}else if(bn(e[r],t))return r===ri?void 0:r;return e.hasOwnProperty("*")?e["*"]:t},di={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},hi={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Tl={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},pi={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[B,[D,Et+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[B,[D,Tr+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[B,[D,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[D,B],[/opios[\/ ]+([\w\.]+)/i],[B,[D,zt+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[B,[D,zt+" GX"]],[/\bopr\/([\w\.]+)/i],[B,[D,zt]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[B,[D,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[B,[D,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[D,B],[/quark(?:pc)?\/([-\w\.]+)/i],[B,[D,"Quark"]],[/\bddg\/([\w\.]+)/i],[B,[D,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[B,[D,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[B,[D,"WeChat"]],[/konqueror\/([\w\.]+)/i],[B,[D,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[B,[D,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[B,[D,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[B,[D,"Smart "+qr+Wt]],[/(avast|avg)\/([\w\.]+)/i],[[D,/(.+)/,"$1 Secure"+Wt],B],[/\bfocus\/([\w\.]+)/i],[B,[D,Gt+" Focus"]],[/\bopt\/([\w\.]+)/i],[B,[D,zt+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[B,[D,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[B,[D,"Dolphin"]],[/coast\/([\w\.]+)/i],[B,[D,zt+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[B,[D,"MIUI"+Wt]],[/fxios\/([\w\.-]+)/i],[B,[D,Et+Gt]],[/\bqihoobrowser\/?([\w\.]*)/i],[B,[D,"360"]],[/\b(qq)\/([\w\.]+)/i],[[D,/(.+)/,"$1Browser"],B],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[D,/(.+)/,"$1"+Wt],B],[/samsungbrowser\/([\w\.]+)/i],[B,[D,$t+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[B,[D,fi+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[D,fi+" Mobile"],B],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[D,B],[/(lbbrowser|rekonq)/i],[D],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[B,D],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[D,nn],B,[S,Ut]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[D,B,[S,Ut]],[/\bgsa\/([\w\.]+) .*safari\//i],[B,[D,"GSA"],[S,Ut]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[B,[D,"TikTok"],[S,Ut]],[/\[(linkedin)app\]/i],[D,[S,Ut]],[/(chromium)[\/ ]([-\w\.]+)/i],[D,B],[/headlesschrome(?:\/([\w\.]+)| )/i],[B,[D,ui+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[B,[D,Tr+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[D,ui+" WebView"],B],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[B,[D,"Android"+Wt]],[/chrome\/([\w\.]+) mobile/i],[B,[D,Et+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[D,B],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[B,[D,Et+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[D,Et+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[B,D],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[D,[B,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[D,B],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[D,Et+Gt],B],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[D,"Netscape"],B],[/(wolvic|librewolf)\/([\w\.]+)/i],[D,B],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[B,[D,Gt+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[D,[B,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[D,[B,/[^\d\.]+./,Bt]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Oe,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Oe,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Oe,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Oe,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Oe,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[Oe,/ower/,Bt,Je]],[/ sun4\w[;\)]/i],[[Oe,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[Oe,Je]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[T,[N,$t],[S,Z]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[T,[N,$t],[S,$]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[T,[N,_t],[S,$]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[T,[N,_t],[S,Z]],[/(macintosh);/i],[T,[N,_t]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[T,[N,li],[S,$]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[T,[N,oi],[S,Z]],[/honor([-\w ]+)[;\)]/i],[T,[N,oi],[S,$]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[T,[N,ai],[S,Z]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[T,[N,ai],[S,$]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[T,/_/g," "],[N,tn],[S,Z]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[T,/_/g," "],[N,tn],[S,$]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[T,[N,si],[S,$]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[T,[N,en],[S,$]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[T,[N,ze,{OnePlus:["203","304","403","404","413","415"],"*":en}],[S,Z]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[T,[N,"BLU"],[S,$]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[T,[N,"Vivo"],[S,$]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[T,[N,"Realme"],[S,$]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[T,[N,qr],[S,Z]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[T,[N,qr],[S,$]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[T,[N,Qr],[S,$]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[T,[N,Qr],[S,Z]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[T,[N,xr],[S,Z]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[T,[N,xr],[S,$]],[/(nokia) (t[12][01])/i],[N,T,[S,Z]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[T,/_/g," "],[S,$],[N,"Nokia"]],[/(pixel (c|tablet))\b/i],[T,[N,pt],[S,Z]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[T,[N,pt],[S,$]],[/(google) (pixelbook( go)?)/i],[N,T],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[T,[N,Ht],[S,$]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[T,"Xperia Tablet"],[N,Ht],[S,Z]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[T,[N,gr],[S,Z]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[T,/(.+)/g,"Fire Phone $1"],[N,gr],[S,$]],[/(playbook);[-\w\),; ]+(rim)/i],[T,N,[S,Z]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[T,[N,ii],[S,$]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[T,[N,ni],[S,Z]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[T,[N,ni],[S,$]],[/(nexus 9)/i],[T,[N,"HTC"],[S,Z]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[N,[T,/_/g," "],[S,$]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[T,[N,"TCL"],[S,Z]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[T,[N,"TCL"],[S,$]],[/(itel) ((\w+))/i],[[N,Je],T,[S,ze,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[T,[N,"Acer"],[S,Z]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[T,[N,"Meizu"],[S,$]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[T,[N,"Ulefone"],[S,$]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[T,[N,"Energizer"],[S,$]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[T,[N,"Cat"],[S,$]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[T,[N,"Smartfren"],[S,$]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[T,[N,"Nothing"],[S,$]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[T,[N,"Archos"],[S,Z]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[T,[N,"Archos"],[S,$]],[/; (n159v)/i],[T,[N,"HMD"],[S,$]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[N,T,[S,Z]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i],[N,T,[S,$]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[N,T,[S,Z]],[/(surface duo)/i],[T,[N,Zr],[S,Z]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[T,[N,"Fairphone"],[S,$]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[T,[N,Jr],[S,Z]],[/(sprint) (\w+)/i],[N,T,[S,$]],[/(kin\.[onetw]{3})/i],[[T,/\./g," "],[N,Zr],[S,$]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[T,[N,rn],[S,Z]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[T,[N,rn],[S,$]],[/smart-tv.+(samsung)/i],[N,[S,ue]],[/hbbtv.+maple;(\d+)/i],[[T,/^/,"SmartTV"],[N,$t],[S,ue]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[N,T,[S,ue]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[N,xr],[S,ue]],[/(apple) ?tv/i],[N,[T,_t+" TV"],[S,ue]],[/crkey.*devicetype\/chromecast/i],[[T,it+" Third Generation"],[N,pt],[S,ue]],[/crkey.*devicetype\/([^/]*)/i],[[T,/^/,"Chromecast "],[N,pt],[S,ue]],[/fuchsia.*crkey/i],[[T,it+" Nest Hub"],[N,pt],[S,ue]],[/crkey/i],[[T,it],[N,pt],[S,ue]],[/(portaltv)/i],[T,[N,nn],[S,ue]],[/droid.+aft(\w+)( bui|\))/i],[T,[N,gr],[S,ue]],[/(shield \w+ tv)/i],[T,[N,Jr],[S,ue]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[T,[N,li],[S,ue]],[/(bravia[\w ]+)( bui|\))/i],[T,[N,Ht],[S,ue]],[/(mi(tv|box)-?\w+) bui/i],[T,[N,tn],[S,ue]],[/Hbbtv.*(technisat) (.*);/i],[N,T,[S,ue]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[N,/.+\/(\w+)/,"$1",ze,{LG:"lge"}],[T,Mr],[S,ue]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[T,[S,ue]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:|large screen[\w ]+safari)\b/i],[[S,ue]],[/(playstation \w+)/i],[T,[N,Ht],[S,Qt]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[T,[N,Zr],[S,Qt]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[N,T,[S,Qt]],[/droid.+; (shield)( bui|\))/i],[T,[N,Jr],[S,Qt]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[T,[N,$t],[S,Ge]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[N,T,[S,Ge]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[T,[N,en],[S,Ge]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[T,[N,_t],[S,Ge]],[/(opwwe\d{3})/i],[T,[N,si],[S,Ge]],[/(moto 360)/i],[T,[N,Qr],[S,Ge]],[/(smartwatch 3)/i],[T,[N,Ht],[S,Ge]],[/(g watch r)/i],[T,[N,xr],[S,Ge]],[/droid.+; (wt63?0{2,3})\)/i],[T,[N,rn],[S,Ge]],[/droid.+; (glass) \d/i],[T,[N,pt],[S,vr]],[/(pico) (4|neo3(?: link|pro)?)/i],[N,T,[S,vr]],[/(quest( \d| pro)?s?).+vr/i],[T,[N,nn],[S,vr]],[/mobile vr; rv.+firefox/i],[[S,vr]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[N,[S,Jt]],[/(aeobc)\b/i],[T,[N,gr],[S,Jt]],[/(homepod).+mac os/i],[T,[N,_t],[S,Jt]],[/windows iot/i],[[S,Jt]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[T,[S,ze,{mobile:"Mobile",xr:"VR","*":Z}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[S,Z]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[S,$]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[T,[N,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[B,[D,Tr+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[D,B],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[B,[D,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[D,B],[/ladybird\//i],[[D,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[B,D]],os:[[/(windows nt) (6\.[23]); arm/i],[[D,/N/,"R"],[B,ze,di]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[D,B],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[B,/(;|\))/g,"",ze,di],[D,Cn]],[/(windows ce)\/?([\d\.]*)/i],[D,B],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[B,/_/g,"."],[D,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[D,"macOS"],[B,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[B,[D,it+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[B,[D,it+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[B,[D,it+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[B,[D,it+" Linux"]],[/crkey\/([\d\.]+)/i],[B,[D,it]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[B,D],[/(ubuntu) ([\w\.]+) like android/i],[[D,/(.+)/,"$1 Touch"],B],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[D,B],[/\(bb(10);/i],[B,[D,ii]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[B,[D,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[B,[D,Gt+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[B,[D,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[B,ze,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[D,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[B,[D,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[D,"Chrome OS"],B],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[D,B],[/(sunos) ?([\d\.]*)/i],[[D,"Solaris"],B],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[D,B]]},yr=(function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return et.call(t.init,[[Ie,[D,B,ur,S]],[Qe,[Oe]],[We,[S,T,N]],[Ve,[D,B]],[ke,[D,B]]]),et.call(t.isIgnore,[[Ie,[B,ur]],[Ve,[B]],[ke,[B]]]),et.call(t.isIgnoreRgx,[[Ie,/ ?browser$/i],[ke,/ ?os$/i]]),et.call(t.toString,[[Ie,[D,B]],[Qe,[Oe]],[We,[N,T]],[Ve,[D,B]],[ke,[D,B]]]),t})(),Nl=function(t,e){var r=yr.init[e],n=yr.isIgnore[e]||0,i=yr.isIgnoreRgx[e]||0,a=yr.toString[e]||0;function o(){et.call(this,r)}return o.prototype.getItem=function(){return t},o.prototype.withClientHints=function(){return lt?lt.getHighEntropyValues(na).then(function(s){return t.setCH(new ia(s,!1)).parseCH().get()}):t.parseCH().get()},o.prototype.withFeatureCheck=function(){return t.detectFeature().get()},e!=Ot&&(o.prototype.is=function(s){var l=!1;for(var c in this)if(this.hasOwnProperty(c)&&!bn(n,c)&&Je(i?Pt(i,this[c]):this[c])==Je(i?Pt(i,s):s)){if(l=!0,s!=ut)break}else if(s==ut&&l){l=!l;break}return l},o.prototype.toString=function(){var s=Bt;for(var l in a)typeof this[a[l]]!==ut&&(s+=(s?" ":Bt)+this[a[l]]);return s||ut}),lt||(o.prototype.then=function(s){var l=this,c=function(){for(var d in l)l.hasOwnProperty(d)&&(this[d]=l[d])};c.prototype={is:o.prototype.is,toString:o.prototype.toString};var f=new c;return s(f),f}),new o};function ia(t,e){if(t=t||{},et.call(this,na),e)et.call(this,[[$n,an(t[ht])],[Hn,an(t[wl])],[$,/\?1/.test(t[Cl])],[T,Xt(t[bl])],[Tt,Xt(t[ra])],[Gn,Xt(t[Sl])],[Oe,Xt(t[_l])],[yt,an(t[Al])],[Hr,Xt(t[El])]]);else for(var r in t)this.hasOwnProperty(r)&&typeof t[r]!==ut&&(this[r]=t[r])}function vi(t,e,r,n){return this.get=function(i){return i?this.data.hasOwnProperty(i)?this.data[i]:void 0:this.data},this.set=function(i,a){return this.data[i]=a,this},this.setCH=function(i){return this.uaCH=i,this},this.detectFeature=function(){if(Te&&Te.userAgent==this.ua)switch(this.itemType){case Ie:Te.brave&&typeof Te.brave.isBrave==Pr&&this.set(D,"Brave");break;case We:!this.get(S)&&lt&&lt[$]&&this.set(S,$),this.get(T)=="Macintosh"&&Te&&typeof Te.standalone!==ut&&Te.maxTouchPoints&&Te.maxTouchPoints>2&&this.set(T,"iPad").set(S,Z);break;case ke:!this.get(D)&&lt&&lt[Tt]&&this.set(D,lt[Tt]);break;case Ot:var i=this.data,a=function(o){return i[o].getItem().detectFeature().get()};this.set(Ie,a(Ie)).set(Qe,a(Qe)).set(We,a(We)).set(Ve,a(Ve)).set(ke,a(ke))}return this},this.parseUA=function(){return this.itemType!=Ot&&sn.call(this.data,this.ua,this.rgxMap),this.itemType==Ie&&this.set(ur,on(this.get(B))),this},this.parseCH=function(){var i=this.uaCH,a=this.rgxMap;switch(this.itemType){case Ie:case Ve:var o=i[Hn]||i[$n],s;if(o)for(var l in o){var c=o[l].brand||o[l],f=o[l].version;this.itemType==Ie&&!/not.a.brand/i.test(c)&&(!s||/Chrom/.test(s)&&c!=ci||s==Tr&&/WebView2/.test(c))&&(c=ze(c,Tl),s=this.get(D),s&&!/Chrom/.test(s)&&/Chrom/.test(c)||this.set(D,c).set(B,f).set(ur,on(f)),s=c),this.itemType==Ve&&c==ci&&this.set(B,f)}break;case Qe:var d=i[Oe];d&&(d&&i[Hr]=="64"&&(d+="64"),sn.call(this.data,d+";",a));break;case We:if(i[$]&&this.set(S,$),i[T]&&(this.set(T,i[T]),!this.get(S)||!this.get(N))){var p={};sn.call(p,"droid 9; "+i[T]+")",a),!this.get(S)&&p.type&&this.set(S,p.type),!this.get(N)&&p.vendor&&this.set(N,p.vendor)}if(i[yt]){var h;if(typeof i[yt]!="string")for(var v=0;!h&&v<i[yt].length;)h=ze(i[yt][v++],hi);else h=ze(i[yt],hi);this.set(S,h)}break;case ke:var g=i[Tt];if(g){var y=i[Gn];g==Cn&&(y=parseInt(on(y),10)>=13?"11":"10"),this.set(D,g).set(B,y)}this.get(D)==Cn&&i[T]=="Xbox"&&this.set(D,"Xbox").set(B,void 0);break;case Ot:var _=this.data,m=function(E){return _[E].getItem().setCH(i).parseCH().get()};this.set(Ie,m(Ie)).set(Qe,m(Qe)).set(We,m(We)).set(Ve,m(Ve)).set(ke,m(ke))}return this},et.call(this,[["itemType",t],["ua",e],["uaCH",n],["rgxMap",r],["data",Nl(this,t)]]),this}function tt(t,e,r){if(typeof t===Rt?(kr(t,!0)?(typeof e===Rt&&(r=e),e=t):(r=t,e=void 0),t=void 0):typeof t===An&&!kr(e,!0)&&(r=e,e=void 0),r&&typeof r.append===Pr){var n={};r.forEach(function(l,c){n[c]=l}),r=n}if(!(this instanceof tt))return new tt(t,e,r).getResult();var i=typeof t===An?t:r&&r[ti]?r[ti]:Te&&Te.userAgent?Te.userAgent:Bt,a=new ia(r,!0),o=e?Ol(pi,e):pi,s=function(l){return l==Ot?function(){return new vi(l,i,o,a).set("ua",i).set(Ie,this.getBrowser()).set(Qe,this.getCPU()).set(We,this.getDevice()).set(Ve,this.getEngine()).set(ke,this.getOS()).get()}:function(){return new vi(l,i,o[l],a).parseUA().get()}};return et.call(this,[["getBrowser",s(Ie)],["getCPU",s(Qe)],["getDevice",s(We)],["getEngine",s(Ve)],["getOS",s(ke)],["getResult",s(Ot)],["getUA",function(){return i}],["setUA",function(l){return Lt(l)&&(i=l.length>En?Mr(l,En):l),this}]]).setUA(i),this}tt.VERSION=ml;tt.BROWSER=Gr([D,B,ur,S]);tt.CPU=Gr([Oe]);tt.DEVICE=Gr([T,N,S,Qt,$,ue,Z,Ge,Jt]);tt.ENGINE=tt.OS=Gr([D,B]);const ln=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function un(t,e,r,n){t.addEventListener?t.addEventListener(e,r,n):t.attachEvent&&t.attachEvent("on".concat(e),r)}function Kt(t,e,r,n){t.removeEventListener?t.removeEventListener(e,r,n):t.detachEvent&&t.detachEvent("on".concat(e),r)}function aa(t,e){const r=e.slice(0,e.length-1);for(let n=0;n<r.length;n++)r[n]=t[r[n].toLowerCase()];return r}function oa(t){typeof t!="string"&&(t=""),t=t.replace(/\s/g,"");const e=t.split(",");let r=e.lastIndexOf("");for(;r>=0;)e[r-1]+=",",e.splice(r,1),r=e.lastIndexOf("");return e}function Dl(t,e){const r=t.length>=e.length?t:e,n=t.length>=e.length?e:t;let i=!0;for(let a=0;a<r.length;a++)n.indexOf(r[a])===-1&&(i=!1);return i}const cr={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":ln?173:189,"=":ln?61:187,";":ln?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},$e={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,meta:91,command:91},er={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},ye={16:!1,18:!1,17:!1,91:!1},se={};for(let t=1;t<20;t++)cr["f".concat(t)]=111+t;let oe=[],or=null,sa="all";const Ze=new Map,Ft=t=>cr[t.toLowerCase()]||$e[t.toLowerCase()]||t.toUpperCase().charCodeAt(0),Bl=t=>Object.keys(cr).find(e=>cr[e]===t),Rl=t=>Object.keys($e).find(e=>$e[e]===t);function la(t){sa=t||"all"}function fr(){return sa||"all"}function Pl(){return oe.slice(0)}function kl(){return oe.map(t=>Bl(t)||Rl(t)||String.fromCharCode(t))}function Ml(){const t=[];return Object.keys(se).forEach(e=>{se[e].forEach(r=>{let{key:n,scope:i,mods:a,shortcut:o}=r;t.push({scope:i,shortcut:o,mods:a,keys:n.split("+").map(s=>Ft(s))})})}),t}function Ll(t){const e=t.target||t.srcElement,{tagName:r}=e;let n=!0;const i=r==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||r==="TEXTAREA"||r==="SELECT")&&!e.readOnly)&&(n=!1),n}function Fl(t){return typeof t=="string"&&(t=Ft(t)),oe.indexOf(t)!==-1}function Vl(t,e){let r,n;t||(t=fr());for(const i in se)if(Object.prototype.hasOwnProperty.call(se,i))for(r=se[i],n=0;n<r.length;)r[n].scope===t?r.splice(n,1).forEach(o=>{let{element:s}=o;return zn(s)}):n++;fr()===t&&la(e||"all")}function Ul(t){let e=t.keyCode||t.which||t.charCode;t.key&&t.key.toLowerCase()==="capslock"&&(e=Ft(t.key));const r=oe.indexOf(e);if(r>=0&&oe.splice(r,1),t.key&&t.key.toLowerCase()==="meta"&&oe.splice(0,oe.length),(e===93||e===224)&&(e=91),e in ye){ye[e]=!1;for(const n in $e)$e[n]===e&&(Xe[n]=!1)}}function ua(t){if(typeof t>"u")Object.keys(se).forEach(i=>{Array.isArray(se[i])&&se[i].forEach(a=>mr(a)),delete se[i]}),zn(null);else if(Array.isArray(t))t.forEach(i=>{i.key&&mr(i)});else if(typeof t=="object")t.key&&mr(t);else if(typeof t=="string"){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];let[i,a]=r;typeof i=="function"&&(a=i,i=""),mr({key:t,scope:i,method:a,splitKey:"+"})}}const mr=t=>{let{key:e,scope:r,method:n,splitKey:i="+"}=t;oa(e).forEach(o=>{const s=o.split(i),l=s.length,c=s[l-1],f=c==="*"?"*":Ft(c);if(!se[f])return;r||(r=fr());const d=l>1?aa($e,s):[],p=[];se[f]=se[f].filter(h=>{const g=(n?h.method===n:!0)&&h.scope===r&&Dl(h.mods,d);return g&&p.push(h.element),!g}),p.forEach(h=>zn(h))})};function gi(t,e,r,n){if(e.element!==n)return;let i;if(e.scope===r||e.scope==="all"){i=e.mods.length>0;for(const a in ye)Object.prototype.hasOwnProperty.call(ye,a)&&(!ye[a]&&e.mods.indexOf(+a)>-1||ye[a]&&e.mods.indexOf(+a)===-1)&&(i=!1);(e.mods.length===0&&!ye[16]&&!ye[18]&&!ye[17]&&!ye[91]||i||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(oe),e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function xi(t,e){const r=se["*"];let n=t.keyCode||t.which||t.charCode;if(t.key&&t.key.toLowerCase()==="capslock"||!Xe.filter.call(this,t))return;if((n===93||n===224)&&(n=91),oe.indexOf(n)===-1&&n!==229&&oe.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach(s=>{const l=er[s];t[s]&&oe.indexOf(l)===-1?oe.push(l):!t[s]&&oe.indexOf(l)>-1?oe.splice(oe.indexOf(l),1):s==="metaKey"&&t[s]&&(oe=oe.filter(c=>c in er||c===n))}),n in ye){ye[n]=!0;for(const s in $e)if(Object.prototype.hasOwnProperty.call($e,s)){const l=er[$e[s]];Xe[s]=t[l]}if(!r)return}for(const s in ye)Object.prototype.hasOwnProperty.call(ye,s)&&(ye[s]=t[er[s]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(oe.indexOf(17)===-1&&oe.push(17),oe.indexOf(18)===-1&&oe.push(18),ye[17]=!0,ye[18]=!0);const i=fr();if(r)for(let s=0;s<r.length;s++)r[s].scope===i&&(t.type==="keydown"&&r[s].keydown||t.type==="keyup"&&r[s].keyup)&&gi(t,r[s],i,e);if(!(n in se))return;const a=se[n],o=a.length;for(let s=0;s<o;s++)if((t.type==="keydown"&&a[s].keydown||t.type==="keyup"&&a[s].keyup)&&a[s].key){const l=a[s],{splitKey:c}=l,f=l.key.split(c),d=[];for(let p=0;p<f.length;p++)d.push(Ft(f[p]));d.sort().join("")===oe.sort().join("")&&gi(t,l,i,e)}}function Xe(t,e,r){oe=[];const n=oa(t);let i=[],a="all",o=document,s=0,l=!1,c=!0,f="+",d=!1,p=!1;for(r===void 0&&typeof e=="function"&&(r=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(a=e.scope),e.element&&(o=e.element),e.keyup&&(l=e.keyup),e.keydown!==void 0&&(c=e.keydown),e.capture!==void 0&&(d=e.capture),typeof e.splitKey=="string"&&(f=e.splitKey),e.single===!0&&(p=!0)),typeof e=="string"&&(a=e),p&&ua(t,a);s<n.length;s++)t=n[s].split(f),i=[],t.length>1&&(i=aa($e,t)),t=t[t.length-1],t=t==="*"?"*":Ft(t),t in se||(se[t]=[]),se[t].push({keyup:l,keydown:c,scope:a,mods:i,shortcut:n[s],method:r,key:n[s],splitKey:f,element:o});if(typeof o<"u"&&window){if(!Ze.has(o)){const h=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return xi(g,o)},v=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;xi(g,o),Ul(g)};Ze.set(o,{keydownListener:h,keyupListenr:v,capture:d}),un(o,"keydown",h,d),un(o,"keyup",v,d)}if(!or){const h=()=>{oe=[]};or={listener:h,capture:d},un(window,"focus",h,d)}}}function $l(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(se).forEach(r=>{se[r].filter(i=>i.scope===e&&i.shortcut===t).forEach(i=>{i&&i.method&&i.method()})})}function zn(t){const e=Object.values(se).flat();if(e.findIndex(n=>{let{element:i}=n;return i===t})<0){const{keydownListener:n,keyupListenr:i,capture:a}=Ze.get(t)||{};n&&i&&(Kt(t,"keyup",i,a),Kt(t,"keydown",n,a),Ze.delete(t))}if((e.length<=0||Ze.size<=0)&&(Object.keys(Ze).forEach(i=>{const{keydownListener:a,keyupListenr:o,capture:s}=Ze.get(i)||{};a&&o&&(Kt(i,"keyup",o,s),Kt(i,"keydown",a,s),Ze.delete(i))}),Ze.clear(),Object.keys(se).forEach(i=>delete se[i]),or)){const{listener:i,capture:a}=or;Kt(window,"focus",i,a),or=null}}const cn={getPressedKeyString:kl,setScope:la,getScope:fr,deleteScope:Vl,getPressedKeyCodes:Pl,getAllKeyCodes:Ml,isPressed:Fl,filter:Ll,trigger:$l,unbind:ua,keyMap:cr,modifier:$e,modifierMap:er};for(const t in cn)Object.prototype.hasOwnProperty.call(cn,t)&&(Xe[t]=cn[t]);if(typeof window<"u"){const t=window.hotkeys;Xe.noConflict=e=>(e&&window.hotkeys===Xe&&(window.hotkeys=t),Xe),window.hotkeys=Xe}const Hl={class:"dsg-dropdown--trigger",tabindex:"0"},Gl={class:"dsg-dropdown--menu"},zl={key:0,class:"dsg-dropdown--menu-header"},Wl={key:1,class:"dsg-dropdown--menu-header"},Xl={class:"dsg-dropdown--menu-title"},Kl={key:2,class:"dsg-dropdown--menu-header subsection"},jl={class:"dsg-dropdown--menu-subtitle"},Yl=["href","target","tabindex","title","onClick"],ql={key:0,class:"dsg-dropdown--menu-item--content"},Zl={key:0,class:"dsg-dropdown--menu-item--icon"},Ql={class:"dsg-dropdown--menu-item--label"},Jl={class:"dsg-dropdown--menu-item--hotkey"},eu={key:0},tu={key:1,class:"dsg-dropdown--menu-item--content"},ru=u.defineComponent({__name:"DsgDropdown",props:{label:{default:""},type:{default:"button"},icon:{default:"dots-vertical"},iconBefore:{default:()=>{}},buttonTheme:{default:"gray"},menuItems:{default:()=>[]},avatarInfo:{default:null},isOpen:{type:Boolean,default:!1},placement:{default:"bottom-end"},headerType:{default:"none"},headerTitle:{default:""},classes:{default:""},strategy:{default:"absolute"},skidding:{default:0},distance:{default:0},size:{default:"md"}},setup(t,{expose:e}){const r=u.ref(t.isOpen),n=new tt().getOS().name;t.menuItems.forEach(h=>{});const i=u.useTemplateRef("floatingVueDropdownEl"),a=u.useTemplateRef("dsgDropdownAvatarTriggerEl"),o=u.useTemplateRef("dsgDropdownButtonTriggerEl"),s=h=>{c(),a.value&&setTimeout(()=>{a?.value?.toggleFocus(r.value)},100)},l=h=>{c(),o.value&&setTimeout(()=>{o?.value?.focusButton(r.value)},100)},c=()=>{r.value=!r.value,r.value?i.value?.show():i.value?.hide()},f=(h,v)=>{v.uri||h.preventDefault(),v.action&&(v.action(),i.value?.hide())},d=u.useTemplateRef("dsgDropdown"),p=h=>(h=h.toLowerCase(),h.replace("ctrl","⌃").replace("shift","⇧").replace("alt","⌥").replace("cmd",n==="macOS"?"⌘":"⊞").replace("++","+").replace("+","").toUpperCase());return u.onMounted(()=>{t.menuItems.forEach(h=>{h.hotkey&&Xe(h.hotkey,v=>{h.hotkeyPreventDefault&&h.hotkeyPreventDefault===!0&&v.preventDefault(),h.uri&&window.open(h.uri,h.uriTarget??"_blank"),typeof h.action=="function"&&(h.action(),i.value?.hide())})})}),u.onBeforeUnmount(()=>{Xe.deleteScope("dsgDropdown")}),e({handleTriggerClick:c}),(h,v)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-dropdown",`dsg-dropdown--${h.size}`+h.classes]),ref:"dsgDropdown"},[u.createVNode(u.unref(M.kt),u.mergeProps({triggers:[],placement:h.placement,"handle-resize":!1,strategy:h.strategy,shown:r.value,flip:!1,shift:!1,boundary:d.value,container:d.value,skidding:h.skidding,distance:h.distance,class:"dsg-dropdown--popper",onHide:v[0]||(v[0]=g=>r.value=!1),ref:"floatingVueDropdownEl"},h.$attrs),{popper:u.withCtx(()=>[u.createElementVNode("div",Gl,[u.renderSlot(h.$slots,"dsg-dropdown-menu--header",{},()=>[h.headerType==="avatar"?(u.openBlock(),u.createElementBlock("div",zl,[h.avatarInfo?(u.openBlock(),u.createBlock(sr,{key:0,size:"md",profileUri:h.avatarInfo.profileUri,fullName:h.avatarInfo.fullName,isOnline:h.avatarInfo.isOnline,title:h.avatarInfo.title,"sub-text":h.avatarInfo.subText},null,8,["profileUri","fullName","isOnline","title","sub-text"])):u.createCommentVNode("",!0)])):h.headerType==="title"?(u.openBlock(),u.createElementBlock("div",Wl,[u.createElementVNode("h3",Xl,u.toDisplayString(h.headerTitle),1)])):h.headerType==="subsection"?(u.openBlock(),u.createElementBlock("div",Kl,[u.createElementVNode("h4",jl,u.toDisplayString(h.headerTitle),1)])):u.createCommentVNode("",!0)]),u.renderSlot(h.$slots,"dsg-dropdown-menu-content",{},()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(h.menuItems,(g,y)=>(u.openBlock(),u.createElementBlock("a",{class:u.normalizeClass(["dsg-dropdown--menu-item",{"is-divider":g.type==="divider"}]),href:g.uri,target:g.uriTarget??"_blank",tabindex:!g.uri&&g.type!=="divider"?0:void 0,title:g.label,key:y,onClick:_=>f(_,g)},[g.type==="item"||g.type===void 0?(u.openBlock(),u.createElementBlock("div",ql,[g.icon?(u.openBlock(),u.createElementBlock("div",Zl,[u.createVNode(M._sfc_main,{icon:g.icon,size:"xs"},null,8,["icon"])])):u.createCommentVNode("",!0),u.createElementVNode("span",Ql,u.toDisplayString(g.label),1),u.createElementVNode("div",Jl,[g.hotkey?(u.openBlock(),u.createElementBlock("span",eu,u.toDisplayString(p(g.hotkey)),1)):u.createCommentVNode("",!0)])])):g.type==="divider"?(u.openBlock(),u.createElementBlock("div",tu,[...v[1]||(v[1]=[u.createElementVNode("hr",null,null,-1)])])):u.createCommentVNode("",!0)],10,Yl))),128))])])]),default:u.withCtx(()=>[u.createElementVNode("div",Hl,[u.renderSlot(h.$slots,"dsg-dropdown--trigger",{},()=>[h.type==="avatar"?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[h.avatarInfo?(u.openBlock(),u.createBlock(sr,{key:0,size:"lg",profileUri:h.avatarInfo.profileUri,fullName:h.avatarInfo.fullName,ref:"dsgDropdownAvatarTriggerEl",onClick:s,"prevent-default":!0},null,8,["profileUri","fullName"])):u.createCommentVNode("",!0)],64)):h.type==="button"?(u.openBlock(),u.createBlock(M._sfc_main$3,{key:1,theme:h.buttonTheme,label:h.label,onClick:l,ref:"dsgDropdownButtonTriggerEl","icon-before":h.iconBefore,size:h.size,"icon-after":"chevron-down",class:u.normalizeClass({"dropdown-active":r.value})},null,8,["theme","label","icon-before","size","class"])):h.type==="icon"?(u.openBlock(),u.createBlock(M._sfc_main$3,{key:2,"icon-before":h.icon,size:"sm",theme:h.buttonTheme,class:u.normalizeClass(["dsg-dropdown--trigger-button",{"dropdown-active":r.value}]),onClick:c},null,8,["icon-before","theme","class"])):u.createCommentVNode("",!0)])])]),_:3},16,["placement","strategy","shown","boundary","container","skidding","distance"])],2))}}),nu={class:"dsg-input--label-wrapper block"},iu=["onMousedown"],au={class:"option-label"},ou={key:0,class:"dsg-input-select--error-wrapper"},su=u.defineComponent({__name:"DsgInputSelect",props:u.mergeModels({options:{default:()=>[]},multiple:{type:Boolean,default:!1},fetchOnLoad:{type:Boolean,default:!1},getUrl:{},extraParams:{default:()=>({})},strategy:{default:"absolute"},placeholder:{},icon:{default:null},label:{default:"label"},showLabels:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},trackBy:{default:"id"},contentMaxWidth:{default:"24rem"},itemLabel:{default:"label"},allowEmpty:{type:Boolean,default:!1},validateOnLoad:{type:Boolean,default:!0},selectLabel:{default:""},selectedLabel:{default:""},errors:{default:()=>[]},scrollBind:{default:()=>document.body},size:{default:"md"}},{modelValue:{},modelModifiers:{},single:{},singleModifiers:{}}),emits:u.mergeModels(["update:modelValue","update:model-value","search-change","select","open","close","remove","tag"],["update:modelValue","update:single"]),setup(t,{emit:e}){const r=u.useModel(t,"modelValue"),n=u.useModel(t,"single"),i=u.ref(t.options),a=u.useTemplateRef("multiselectEl"),o=u.ref(!1),s=u.ref([]);u.computed(()=>s.value.length>0);const l=u.computed(()=>[...Array.isArray(t.errors)?t.errors:[t.errors],...s.value].filter((C,b,O)=>b===O.indexOf(C))),c=u.computed(()=>["dsg-input-select",`dsg-input-select--${t.size}`,`dsg-input-select--${t.strategy}`,`dsg-input-select--${l.value.length>0?"has-errors":"no-errors"}`].join(" ").replace(/\s+/g," ").trim()),f=()=>{v()},d=w=>{v()};u.watchEffect(()=>{}),u.watch(()=>t.options,w=>{Array.isArray(w)?i.value=w:console.warn("Options should be an array.")});const p=u.ref(null);u.watch(()=>t.scrollBind,async w=>{await u.nextTick(),p.value&&typeof p.value.removeEventListener=="function"&&p.value.removeEventListener("scroll",d);const C=O=>{const P=window.getComputedStyle(O),H=["auto","scroll","overlay"].includes(P.overflow)||["auto","scroll","overlay"].includes(P.overflowY)||["auto","scroll","overlay"].includes(P.overflowX),L=O.scrollHeight>O.clientHeight||O.scrollWidth>O.clientWidth;return H&&L};let b=null;w?b=C(w)?w:window:b=window,b&&typeof b.addEventListener=="function"?(b.addEventListener("scroll",d),p.value=b):p.value=null},{immediate:!0});const h=e,v=()=>{if(a.value)if(o.value===!0){const w=a.value.$el.getBoundingClientRect(),C=a.value.$el.offsetHeight,b=window.innerHeight;u.nextTick(()=>{const O=a.value.$el.querySelector(".multiselect__content-wrapper");O.style.display="block";const P=O.offsetHeight;if(t.strategy==="fixed"){O.style.left=w.left+"px",O.style.right="auto",O.style.top="auto",O.style.bottom="auto";const H=w.width,L=window.innerWidth-w.left,V=H>L?Math.min(300,L-16):H;O.style.width=`${V}px`;const z=b-w.bottom,he=w.top,He=P+8;(z<He&&he>z?"top":"bottom")==="top"?O.style.bottom=`${b-w.top+4}px`:O.style.top=`${w.bottom+4}px`;let rt=!1;if(p.value===window)rt=w.top<b&&w.bottom>0&&w.left<window.innerWidth&&w.right>0;else if(p.value){const nt=p.value.getBoundingClientRect();rt=w.top<nt.bottom&&w.bottom>nt.top&&w.left<nt.right&&w.right>nt.left}else rt=w.top<b&&w.bottom>0&&w.left<window.innerWidth&&w.right>0;if(!rt){O.style.display="none";return}O.style.display="block"}else O.style.left="0",O.style.right="auto",O.style.width="auto",O.style.maxWidth=t.contentMaxWidth,(w.bottom+P+C+2>b?"top":"bottom")==="top"?O.style.bottom=`${C+4}px`:O.style.top=`${C+4}px`})}else{const w=a.value.$refs.list;w&&(w.style.display="none",w.style.top="auto",w.style.bottom="auto",w.style.left="auto",w.style.right="auto")}},g=w=>{o.value=!0,v(),h("open",w)},y=(w,C)=>{o.value=!1,v(),h("close",w,C)},_=M.useDebounceFn(w=>{t.getUrl&&w.length>=2&&M.axios.get(t.getUrl,{params:{term:w,...t.extraParams}}).then(C=>{i.value=C.data}),h("search-change",w)},300),m=(w,C=!0)=>{if(s.value=[],t.allowEmpty===!1&&(w==null||Array.isArray(w)&&w.length===0)&&s.value.push(`${t.label} is required.`),C===!0)try{E(w),h("update:modelValue",w),h("update:model-value",w)}catch(b){console.log(b)}},E=w=>{w?n.value=w[t.trackBy]||w:n.value=null};return u.onMounted(()=>{window.addEventListener("resize",f),t.getUrl&&t.options.length===0&&t.fetchOnLoad&&M.axios.get(t.getUrl).then(w=>{i.value=w.data}).catch(w=>{console.error("Error fetching options:",w)}),t.validateOnLoad&&m(r.value,!1)}),u.onUnmounted(()=>{window.removeEventListener("resize",f),p.value&&typeof p.value.removeEventListener=="function"&&p.value.removeEventListener("scroll",d)}),(w,C)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(c.value),ref:"dsgInputSelectEl"},[u.createElementVNode("div",nu,[w.label?(u.openBlock(),u.createBlock(zi._sfc_main,{key:0,label:w.label,size:"sm"},null,8,["label"])):u.createCommentVNode("",!0)]),u.createVNode(u.unref(Un),u.mergeProps({ref:"multiselectEl",modelValue:r.value,"onUpdate:modelValue":[C[0]||(C[0]=b=>r.value=b),C[3]||(C[3]=b=>m(b,!0))],options:i.value,multiple:w.multiple,onSearchChange:u.unref(_),onOpen:C[1]||(C[1]=b=>g(b)),onClose:C[2]||(C[2]=(b,O)=>y(b,O)),onRemove:C[4]||(C[4]=(b,O)=>h("remove",b,O)),onTag:C[5]||(C[5]=(b,O)=>h("tag",b,O)),placeholder:w.placeholder,label:w.itemLabel,"track-by":w.trackBy,"close-on-select":w.closeOnSelect,"show-labels":w.showLabels,disabled:w.disabled,"allow-empty":w.allowEmpty,"select-label":w.selectLabel,"preserve-search":!0,"selected-label":w.selectedLabel,class:["dsg-input--multiselect",{"dsg-input--multiselect--has-errors":w.errors&&w.errors.length,"dsg-input--multiselect--disabled":w.disabled}]},w.$attrs),{selection:u.withCtx(()=>[w.icon?(u.openBlock(),u.createBlock(M._sfc_main,{key:0,icon:w.icon,size:"md",class:"dsg-untitled-icon text-gray-500 transition-all duration-200 ease-in-out inline-block mr-2"},null,8,["icon"])):u.createCommentVNode("",!0)]),caret:u.withCtx(({toggle:b})=>[u.createElementVNode("div",{onMousedown:u.withModifiers(O=>b(),["prevent","stop"]),class:"multiselect__select"},[u.createVNode(M._sfc_main,{icon:"chevron-down"})],40,iu)]),option:u.withCtx(({option:b})=>[u.createElementVNode("span",au,u.toDisplayString(b[w.itemLabel]),1),u.createVNode(M._sfc_main,{icon:"check",size:"sm",class:"option-icon text-brand-600"})]),_:1},16,["modelValue","options","multiple","onSearchChange","placeholder","label","track-by","close-on-select","show-labels","disabled","allow-empty","select-label","selected-label","class"]),l.value&&l.value.length?(u.openBlock(),u.createElementBlock("div",ou,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(l.value,(b,O)=>(u.openBlock(),u.createElementBlock("span",{class:"dsg-input--error",key:O},u.toDisplayString(b),1))),128))])):u.createCommentVNode("",!0)],2))}}),lu=["name"],uu=["selected"],cu=["value","selected"],fu=u.defineComponent({__name:"DsgInputDropdown",props:u.mergeModels({name:{default:""},placeholder:{default:""},classes:{default:""},options:{default:()=>[]}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=u.useModel(t,"modelValue");return(r,n)=>u.withDirectives((u.openBlock(),u.createElementBlock("select",{class:u.normalizeClass(["dsg-input-dropdown",r.classes]),name:r.name,"onUpdate:modelValue":n[0]||(n[0]=i=>e.value=i)},[r.placeholder?(u.openBlock(),u.createElementBlock("option",{key:0,value:"",disabled:"",selected:e.value===""},u.toDisplayString(r.placeholder),9,uu)):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(r.options,(i,a)=>(u.openBlock(),u.createElementBlock("option",{key:a,value:i.value,selected:e.value===i.value},u.toDisplayString(i.label),9,cu))),128))],10,lu)),[[u.vModelSelect,e.value]])}}),du=["href","title","target"],hu={key:0,class:"dsg-link--label"},pu=u.defineComponent({__name:"DsgLink",props:{label:{default:"Link"},href:{default:""},uriTarget:{default:"_self"},size:{default:"md"},classes:{default:""},preventDefault:{type:Boolean,default:!1}},emits:["link-clicked"],setup(t,{emit:e}){const r=["dsg-link","dsg-link--"+t.size,t.classes].join(" "),n=e,i=a=>{t.preventDefault&&a.preventDefault(),n("link-clicked",a)};return(a,o)=>(u.openBlock(),u.createElementBlock("a",{href:a.href,title:"Link: "+a.label,target:a.uriTarget,class:u.normalizeClass(u.unref(r)),onClick:i},[u.renderSlot(a.$slots,"dsg-link-content",{},()=>[a.label?(u.openBlock(),u.createElementBlock("span",hu,u.toDisplayString(a.label),1)):u.createCommentVNode("",!0)])],10,du))}}),vu={key:1,class:"dsg-modal__header-text"},gu={key:0,class:"dsg-modal__header-title"},xu={key:1,class:"dsg-modal__header-description"},yu={key:1,class:"dsg-modal__body"},ca=u.defineComponent({__name:"DsgModal",props:{title:{default:""},description:{default:""},miscIcon:{default:null},hasClosedButton:{type:Boolean,default:!0},initialOpen:{type:Boolean,default:!1},closeClickBackground:{type:Boolean,default:!1},wrapperClasses:{default:""},width:{default:400},type:{default:"left"},footerType:{default:"horizontal-even"},primaryButton:{type:[Object,Boolean],default:!1},secondaryButton:{type:[Object,Boolean],default:!1},hasBackground:{type:Boolean,default:!0}},emits:["before-open","after-open","before-close","after-close","secondary-button-clicked","primary-button-clicked"],setup(t,{expose:e,emit:r}){const n=r,i=u.ref(t.initialOpen),a=()=>{n("before-open"),i.value=!0,n("after-open")},o=()=>{n("before-close"),i.value=!1,n("after-close")},s=()=>{i.value&&t.closeClickBackground&&o()},l=()=>{n("secondary-button-clicked")},c=()=>{n("primary-button-clicked")};return e({open:a,close:o,secondaryButtonClicked:l,primaryButtonClicked:c}),(f,d)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-modal",`dsg-modal--${i.value?"open":"closed"}`])},[f.hasBackground?(u.openBlock(),u.createElementBlock("div",{key:0,class:"dsg-modal__background",onDblclick:s},null,32)):u.createCommentVNode("",!0),u.createElementVNode("div",{class:u.normalizeClass(["dsg-modal__wrapper",f.wrapperClasses]),style:u.normalizeStyle({width:f.width})},[f.hasClosedButton?(u.openBlock(),u.createBlock(M._sfc_main$3,{key:0,theme:"gray-tertiary",iconBefore:"x",size:"lg",class:u.normalizeClass(["dsg-modal__close-button",`dsg-modal__close-button--${f.type}`]),onClick:o},null,8,["class"])):u.createCommentVNode("",!0),u.renderSlot(f.$slots,"dsg-modal__header",{},()=>[u.createElementVNode("div",{class:u.normalizeClass(["dsg-modal__header",[`dsg-modal__header--${f.type}`,`${f.$slots.default?"dsg-modal__header--with-body":""}`].join(" ")])},[f.miscIcon?(u.openBlock(),u.createBlock(Ct,u.normalizeProps(u.mergeProps({key:0},f.miscIcon)),null,16)):u.createCommentVNode("",!0),f.title||f.description?(u.openBlock(),u.createElementBlock("div",vu,[f.title?(u.openBlock(),u.createElementBlock("h3",gu,u.toDisplayString(f.title),1)):u.createCommentVNode("",!0),f.description?(u.openBlock(),u.createElementBlock("p",xu,u.toDisplayString(f.description),1)):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)],2)]),f.$slots.default?(u.openBlock(),u.createElementBlock("div",yu,[u.renderSlot(f.$slots,"default")])):u.createCommentVNode("",!0),u.renderSlot(f.$slots,"dsg-modal__footer",{},()=>[u.createElementVNode("div",{class:u.normalizeClass(["dsg-modal__footer",`dsg-modal__footer--${f.footerType}`])},[f.secondaryButton?(u.openBlock(),u.createBlock(M._sfc_main$3,u.mergeProps({key:0},f.secondaryButton,{onButtonClicked:l,classes:"dsg-modal__secondary-button"}),null,16)):u.createCommentVNode("",!0),f.primaryButton?(u.openBlock(),u.createBlock(M._sfc_main$3,u.mergeProps({key:1},f.primaryButton,{onButtonClicked:c,classes:"dsg-dsg-modal__primary-button"}),null,16)):u.createCommentVNode("",!0)],2)])],6)],2))}}),mu={class:"dsg-tag--before"},wu={class:"dsg-tag--label"},_u={class:"dsg-tag--after"},Eu={key:0,class:"dsg-tag--count"},Au=u.defineComponent({__name:"DsgTag",props:{label:{default:""},size:{default:"md"},hasClose:{type:Boolean,default:!1},tagCount:{default:null},avatarUri:{default:""},hasCheckbox:{type:Boolean,default:!1},dotHex:{default:null},destroyOnClose:{type:Boolean,default:!1},value:{default:null},classes:{default:""}},emits:["before-checked","after-checked","before-hide","after-hide","before-destroy","after-destroy"],setup(t,{expose:e,emit:r}){const n=["dsg-tag",`dsg-tag--${t.size}`,`dsg-tag--${t.hasClose?"has-close":"no-close"}`,`dsg-tag--${t.tagCount?"has-count":"no-count"}`,`dsg-tag--${t.avatarUri?"has-avatar":"no-avatar"}`,`dsg-tag--${t.hasCheckbox?"has-checkbox":"no-checkbox"}`,t.classes].join(" "),i=()=>`tag-${t.size}`;t.hasClose&&t.tagCount!==null&&new M.DsgPropSyntaxWarning("DsgTag: 'hasClose' and 'tagCount' props are mutually exclusive. Please use only one of them."),t.avatarUri&&t.dotHex&&new M.DsgPropSyntaxWarning("DsgTag: 'avatarUri' and 'dotHex' props are mutually exclusive. Please use only one of them.");const a=r,o=u.useTemplateRef("dsgTag"),s=g=>{t.destroyOnClose?(a("before-destroy",o.value),o.value?.remove(),a("after-destroy")):(a("before-hide",o.value),o.value&&(o.value.style.display="none"),a("after-hide",o.value))},l=(g,y)=>{a("before-checked",g,y)},c=g=>{a("after-checked",g)},f=u.ref(t.tagCount),d=g=>{f.value=g},p=u.ref(t.value);return e({setTagCount:d,setValue:g=>{p.value=g},getValue:()=>p.value}),(g,y)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(u.unref(n)),ref:"dsgTag"},[u.createElementVNode("div",mu,[g.hasCheckbox?(u.openBlock(),u.createBlock(M._sfc_main$2,{key:0,class:"dsg-tag--checkbox",size:i(),"no-focus":!0,onBeforeChecked:l,onAfterChecked:c},null,8,["size"])):u.createCommentVNode("",!0),g.avatarUri?(u.openBlock(),u.createBlock(sr,{key:1,"profile-uri":g.avatarUri,size:"xxs","no-focus":!0,class:"dsg-tag--avatar"},null,8,["profile-uri"])):u.createCommentVNode("",!0),g.dotHex?(u.openBlock(),u.createElementBlock("span",{key:2,class:"dsg-tag--dot",style:u.normalizeStyle({backgroundColor:g.dotHex})},null,4)):u.createCommentVNode("",!0)]),u.renderSlot(g.$slots,"dsg-tag--label",{},()=>[u.createElementVNode("span",wu,u.toDisplayString(g.label),1)]),u.createElementVNode("div",_u,[f.value&&f.value>0?(u.openBlock(),u.createElementBlock("div",Eu,u.toDisplayString(f.value),1)):u.createCommentVNode("",!0),g.hasClose?(u.openBlock(),u.createBlock(M._sfc_main,{key:1,icon:"x-close",class:"dsg-tag--close",onClick:s})):u.createCommentVNode("",!0)])],2))}}),Cu={class:"dsg-toggle--element"},bu=["checked","disabled"],Su={key:0,class:"dsg-toggle--label-wrapper"},Iu=["innerHTML"],Ou=["innerHTML"],Tu=u.defineComponent({__name:"DsgToggle",props:{modelValue:{type:Boolean,default:!1},size:{default:"md"},label:{default:""},subText:{default:""},disabled:{type:Boolean,default:!1},classes:{default:""}},emits:["before-toggle","after-toggle","update:modelValue"],setup(t,{expose:e,emit:r}){const n=["dsg-toggle",`dsg-toggle--${t.size}`,`dsg-toggle--${t.disabled?"disabled":"enabled"}`,`dsg-toggle--${t.label.length?"has-label":"no-label"}`,`dsg-toggle--${t.subText.length?"has-subtext":"no-subtext"}`,t.classes].join(" "),i=u.ref(t.modelValue),a=()=>{t.disabled||(l("before-toggle",i.value,!i.value),i.value=!i.value,l("after-toggle",i.value),l("update:modelValue",i.value))},o=u.useTemplateRef("toggleCheckbox"),s=()=>{o.value&&o.value.focus(),t.disabled||a()},l=r;return e({set:f=>{i.value=f}}),(f,d)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(u.unref(n)),onClick:s},[u.createElementVNode("label",Cu,[u.createElementVNode("input",{type:"checkbox",class:"dsg-toggle--checkbox",checked:i.value,onChange:a,title:"checkbox",ref:"toggleCheckbox",disabled:f.disabled},null,40,bu),d[0]||(d[0]=u.createElementVNode("span",{class:"dsg-toggle--slider"},null,-1))]),f.label.length?(u.openBlock(),u.createElementBlock("div",Su,[u.renderSlot(f.$slots,"dsg-toggle--label",{},()=>[u.createElementVNode("h3",{class:"dsg-toggle--label",innerHTML:f.label},null,8,Iu)]),f.label.length&&f.subText.length?u.renderSlot(f.$slots,"dsg-toggle--subtext",{key:0},()=>[u.createElementVNode("p",{class:"dsg-toggle--subtext",innerHTML:f.subText},null,8,Ou)]):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)],2))}}),Nu={class:"dsg-progress"},Du={class:"dsg-progress--inner"},Bu={key:0,class:"text-sm text-gray-700 min-w-[60px] text-right"},Ru={key:0},Pu={key:1},ku={key:2},Mu=u.defineComponent({__name:"DsgProgress",props:{value:{},max:{},showText:{},textSuffix:{}},setup(t){const e=t,r=u.computed(()=>{const n=e.value/e.max*100;return isNaN(n)?0:Math.min(Math.max(n,0),100)});return(n,i)=>(u.openBlock(),u.createElementBlock("div",Nu,[u.createElementVNode("div",Du,[u.createElementVNode("div",{class:"dsg-progress--inner--progress",style:u.normalizeStyle({width:r.value+"%"})},null,4)]),n.showText!=="none"?(u.openBlock(),u.createElementBlock("div",Bu,[n.showText==="number"?(u.openBlock(),u.createElementBlock("span",Ru,u.toDisplayString(n.value)+"/"+u.toDisplayString(n.max),1)):n.showText==="percentage"?(u.openBlock(),u.createElementBlock("span",Pu,u.toDisplayString(r.value.toFixed(2))+"%",1)):u.createCommentVNode("",!0),n.textSuffix?(u.openBlock(),u.createElementBlock("span",ku," "+u.toDisplayString(n.textSuffix),1)):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)]))}});function Lu(t,e){var r=Object.setPrototypeOf;r?r(t,e):t.__proto__=e}function Fu(t,e){e===void 0&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}var Vu=(function(){var t=function(r,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(i[o]=a[o])},t(r,n)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Uu=(function(t){Vu(e,t);function e(r,n){var i=this.constructor,a=t.call(this,r,n)||this;return Object.defineProperty(a,"name",{value:i.name,enumerable:!1,configurable:!0}),Lu(a,i.prototype),Fu(a),a}return e})(Error),$u=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),be=(function(t){$u(e,t);function e(r){r===void 0&&(r=void 0);var n=t.call(this,r)||this;return n.message=r,n}return e.prototype.getKind=function(){var r=this.constructor;return r.kind},e.kind="Exception",e})(Uu),Hu=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Fe=(function(t){Hu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ArgumentException",e})(be),Gu=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),F=(function(t){Gu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="IllegalArgumentException",e})(be),zu=(function(){function t(e){if(this.binarizer=e,e===null)throw new F("Binarizer must be non-null.")}return t.prototype.getWidth=function(){return this.binarizer.getWidth()},t.prototype.getHeight=function(){return this.binarizer.getHeight()},t.prototype.getBlackRow=function(e,r){return this.binarizer.getBlackRow(e,r)},t.prototype.getBlackMatrix=function(){return(this.matrix===null||this.matrix===void 0)&&(this.matrix=this.binarizer.getBlackMatrix()),this.matrix},t.prototype.isCropSupported=function(){return this.binarizer.getLuminanceSource().isCropSupported()},t.prototype.crop=function(e,r,n,i){var a=this.binarizer.getLuminanceSource().crop(e,r,n,i);return new t(this.binarizer.createBinarizer(a))},t.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},t.prototype.rotateCounterClockwise=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new t(this.binarizer.createBinarizer(e))},t.prototype.rotateCounterClockwise45=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new t(this.binarizer.createBinarizer(e))},t.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch{return""}},t})(),Wu=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),me=(function(t){Wu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.getChecksumInstance=function(){return new e},e.kind="ChecksumException",e})(be),Xu=(function(){function t(e){this.source=e}return t.prototype.getLuminanceSource=function(){return this.source},t.prototype.getWidth=function(){return this.source.getWidth()},t.prototype.getHeight=function(){return this.source.getHeight()},t})(),ne=(function(){function t(){}return t.arraycopy=function(e,r,n,i,a){for(;a--;)n[i++]=e[r++]},t.currentTimeMillis=function(){return Date.now()},t})(),Ku=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Wn=(function(t){Ku(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="IndexOutOfBoundsException",e})(be),ju=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),yi=(function(t){ju(e,t);function e(r,n){r===void 0&&(r=void 0),n===void 0&&(n=void 0);var i=t.call(this,n)||this;return i.index=r,i.message=n,i}return e.kind="ArrayIndexOutOfBoundsException",e})(Wn),Yu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},De=(function(){function t(){}return t.fill=function(e,r){for(var n=0,i=e.length;n<i;n++)e[n]=r},t.fillWithin=function(e,r,n,i){t.rangeCheck(e.length,r,n);for(var a=r;a<n;a++)e[a]=i},t.rangeCheck=function(e,r,n){if(r>n)throw new F("fromIndex("+r+") > toIndex("+n+")");if(r<0)throw new yi(r);if(n>e)throw new yi(n)},t.asList=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e},t.create=function(e,r,n){var i=Array.from({length:e});return i.map(function(a){return Array.from({length:r}).fill(n)})},t.createInt32Array=function(e,r,n){var i=Array.from({length:e});return i.map(function(a){return Int32Array.from({length:r}).fill(n)})},t.equals=function(e,r){if(!e||!r||!e.length||!r.length||e.length!==r.length)return!1;for(var n=0,i=e.length;n<i;n++)if(e[n]!==r[n])return!1;return!0},t.hashCode=function(e){var r,n;if(e===null)return 0;var i=1;try{for(var a=Yu(e),o=a.next();!o.done;o=a.next()){var s=o.value;i=31*i+s}}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i},t.fillUint8Array=function(e,r){for(var n=0;n!==e.length;n++)e[n]=r},t.copyOf=function(e,r){return e.slice(0,r)},t.copyOfUint8Array=function(e,r){if(e.length<=r){var n=new Uint8Array(r);return n.set(e),n}return e.slice(0,r)},t.copyOfRange=function(e,r,n){var i=n-r,a=new Int32Array(i);return ne.arraycopy(e,r,a,0,i),a},t.binarySearch=function(e,r,n){n===void 0&&(n=t.numberComparator);for(var i=0,a=e.length-1;i<=a;){var o=a+i>>1,s=n(r,e[o]);if(s>0)i=o+1;else if(s<0)a=o-1;else return o}return-i-1},t.numberComparator=function(e,r){return e-r},t})(),G=(function(){function t(){}return t.numberOfTrailingZeros=function(e){var r;if(e===0)return 32;var n=31;return r=e<<16,r!==0&&(n-=16,e=r),r=e<<8,r!==0&&(n-=8,e=r),r=e<<4,r!==0&&(n-=4,e=r),r=e<<2,r!==0&&(n-=2,e=r),n-(e<<1>>>31)},t.numberOfLeadingZeros=function(e){if(e===0)return 32;var r=1;return e>>>16||(r+=16,e<<=16),e>>>24||(r+=8,e<<=8),e>>>28||(r+=4,e<<=4),e>>>30||(r+=2,e<<=2),r-=e>>>31,r},t.toHexString=function(e){return e.toString(16)},t.toBinaryString=function(e){return String(parseInt(String(e),2))},t.bitCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),e=e+(e>>>4)&252645135,e=e+(e>>>8),e=e+(e>>>16),e&63},t.truncDivision=function(e,r){return Math.trunc(e/r)},t.parseInt=function(e,r){return r===void 0&&(r=void 0),parseInt(e,r)},t.MIN_VALUE_32_BITS=-2147483648,t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t})(),ve=(function(){function t(e,r){e===void 0?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,r==null?this.bits=t.makeArray(e):this.bits=r)}return t.prototype.getSize=function(){return this.size},t.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},t.prototype.ensureCapacity=function(e){if(e>this.bits.length*32){var r=t.makeArray(e);ne.arraycopy(this.bits,0,r,0,this.bits.length),this.bits=r}},t.prototype.get=function(e){return(this.bits[Math.floor(e/32)]&1<<(e&31))!==0},t.prototype.set=function(e){this.bits[Math.floor(e/32)]|=1<<(e&31)},t.prototype.flip=function(e){this.bits[Math.floor(e/32)]^=1<<(e&31)},t.prototype.getNextSet=function(e){var r=this.size;if(e>=r)return r;var n=this.bits,i=Math.floor(e/32),a=n[i];a&=~((1<<(e&31))-1);for(var o=n.length;a===0;){if(++i===o)return r;a=n[i]}var s=i*32+G.numberOfTrailingZeros(a);return s>r?r:s},t.prototype.getNextUnset=function(e){var r=this.size;if(e>=r)return r;var n=this.bits,i=Math.floor(e/32),a=~n[i];a&=~((1<<(e&31))-1);for(var o=n.length;a===0;){if(++i===o)return r;a=~n[i]}var s=i*32+G.numberOfTrailingZeros(a);return s>r?r:s},t.prototype.setBulk=function(e,r){this.bits[Math.floor(e/32)]=r},t.prototype.setRange=function(e,r){if(r<e||e<0||r>this.size)throw new F;if(r!==e){r--;for(var n=Math.floor(e/32),i=Math.floor(r/32),a=this.bits,o=n;o<=i;o++){var s=o>n?0:e&31,l=o<i?31:r&31,c=(2<<l)-(1<<s);a[o]|=c}}},t.prototype.clear=function(){for(var e=this.bits.length,r=this.bits,n=0;n<e;n++)r[n]=0},t.prototype.isRange=function(e,r,n){if(r<e||e<0||r>this.size)throw new F;if(r===e)return!0;r--;for(var i=Math.floor(e/32),a=Math.floor(r/32),o=this.bits,s=i;s<=a;s++){var l=s>i?0:e&31,c=s<a?31:r&31,f=(2<<c)-(1<<l)&4294967295;if((o[s]&f)!==(n?f:0))return!1}return!0},t.prototype.appendBit=function(e){this.ensureCapacity(this.size+1),e&&(this.bits[Math.floor(this.size/32)]|=1<<(this.size&31)),this.size++},t.prototype.appendBits=function(e,r){if(r<0||r>32)throw new F("Num bits must be between 0 and 32");this.ensureCapacity(this.size+r);for(var n=r;n>0;n--)this.appendBit((e>>n-1&1)===1)},t.prototype.appendBitArray=function(e){var r=e.size;this.ensureCapacity(this.size+r);for(var n=0;n<r;n++)this.appendBit(e.get(n))},t.prototype.xor=function(e){if(this.size!==e.size)throw new F("Sizes don't match");for(var r=this.bits,n=0,i=r.length;n<i;n++)r[n]^=e.bits[n]},t.prototype.toBytes=function(e,r,n,i){for(var a=0;a<i;a++){for(var o=0,s=0;s<8;s++)this.get(e)&&(o|=1<<7-s),e++;r[n+a]=o}},t.prototype.getBitArray=function(){return this.bits},t.prototype.reverse=function(){for(var e=new Int32Array(this.bits.length),r=Math.floor((this.size-1)/32),n=r+1,i=this.bits,a=0;a<n;a++){var o=i[a];o=o>>1&1431655765|(o&1431655765)<<1,o=o>>2&858993459|(o&858993459)<<2,o=o>>4&252645135|(o&252645135)<<4,o=o>>8&16711935|(o&16711935)<<8,o=o>>16&65535|(o&65535)<<16,e[r-a]=o}if(this.size!==n*32){for(var s=n*32-this.size,l=e[0]>>>s,a=1;a<n;a++){var c=e[a];l|=c<<32-s,e[a-1]=l,l=c>>>s}e[n-1]=l}this.bits=e},t.makeArray=function(e){return new Int32Array(Math.floor((e+31)/32))},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.size===r.size&&De.equals(this.bits,r.bits)},t.prototype.hashCode=function(){return 31*this.size+De.hashCode(this.bits)},t.prototype.toString=function(){for(var e="",r=0,n=this.size;r<n;r++)(r&7)===0&&(e+=" "),e+=this.get(r)?"X":".";return e},t.prototype.clone=function(){return new t(this.size,this.bits.slice())},t})(),Sn;(function(t){t[t.OTHER=0]="OTHER",t[t.PURE_BARCODE=1]="PURE_BARCODE",t[t.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",t[t.TRY_HARDER=3]="TRY_HARDER",t[t.CHARACTER_SET=4]="CHARACTER_SET",t[t.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",t[t.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",t[t.ASSUME_GS1=7]="ASSUME_GS1",t[t.RETURN_CODABAR_START_END=8]="RETURN_CODABAR_START_END",t[t.NEED_RESULT_POINT_CALLBACK=9]="NEED_RESULT_POINT_CALLBACK",t[t.ALLOWED_EAN_EXTENSIONS=10]="ALLOWED_EAN_EXTENSIONS"})(Sn||(Sn={}));const le=Sn;var qu=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),R=(function(t){qu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.getFormatInstance=function(){return new e},e.kind="FormatException",e})(be),Zu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},q;(function(t){t[t.Cp437=0]="Cp437",t[t.ISO8859_1=1]="ISO8859_1",t[t.ISO8859_2=2]="ISO8859_2",t[t.ISO8859_3=3]="ISO8859_3",t[t.ISO8859_4=4]="ISO8859_4",t[t.ISO8859_5=5]="ISO8859_5",t[t.ISO8859_6=6]="ISO8859_6",t[t.ISO8859_7=7]="ISO8859_7",t[t.ISO8859_8=8]="ISO8859_8",t[t.ISO8859_9=9]="ISO8859_9",t[t.ISO8859_10=10]="ISO8859_10",t[t.ISO8859_11=11]="ISO8859_11",t[t.ISO8859_13=12]="ISO8859_13",t[t.ISO8859_14=13]="ISO8859_14",t[t.ISO8859_15=14]="ISO8859_15",t[t.ISO8859_16=15]="ISO8859_16",t[t.SJIS=16]="SJIS",t[t.Cp1250=17]="Cp1250",t[t.Cp1251=18]="Cp1251",t[t.Cp1252=19]="Cp1252",t[t.Cp1256=20]="Cp1256",t[t.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",t[t.UTF8=22]="UTF8",t[t.ASCII=23]="ASCII",t[t.Big5=24]="Big5",t[t.GB18030=25]="GB18030",t[t.EUC_KR=26]="EUC_KR"})(q||(q={}));var de=(function(){function t(e,r,n){for(var i,a,o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];this.valueIdentifier=e,this.name=n,typeof r=="number"?this.values=Int32Array.from([r]):this.values=r,this.otherEncodingNames=o,t.VALUE_IDENTIFIER_TO_ECI.set(e,this),t.NAME_TO_ECI.set(n,this);for(var l=this.values,c=0,f=l.length;c!==f;c++){var d=l[c];t.VALUES_TO_ECI.set(d,this)}try{for(var p=Zu(o),h=p.next();!h.done;h=p.next()){var v=h.value;t.NAME_TO_ECI.set(v,this)}}catch(g){i={error:g}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}}return t.prototype.getValueIdentifier=function(){return this.valueIdentifier},t.prototype.getName=function(){return this.name},t.prototype.getValue=function(){return this.values[0]},t.getCharacterSetECIByValue=function(e){if(e<0||e>=900)throw new R("incorect value");var r=t.VALUES_TO_ECI.get(e);if(r===void 0)throw new R("incorect value");return r},t.getCharacterSetECIByName=function(e){var r=t.NAME_TO_ECI.get(e);if(r===void 0)throw new R("incorect value");return r},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.getName()===r.getName()},t.VALUE_IDENTIFIER_TO_ECI=new Map,t.VALUES_TO_ECI=new Map,t.NAME_TO_ECI=new Map,t.Cp437=new t(q.Cp437,Int32Array.from([0,2]),"Cp437"),t.ISO8859_1=new t(q.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),t.ISO8859_2=new t(q.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),t.ISO8859_3=new t(q.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),t.ISO8859_4=new t(q.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),t.ISO8859_5=new t(q.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),t.ISO8859_6=new t(q.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),t.ISO8859_7=new t(q.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),t.ISO8859_8=new t(q.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),t.ISO8859_9=new t(q.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),t.ISO8859_10=new t(q.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),t.ISO8859_11=new t(q.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),t.ISO8859_13=new t(q.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),t.ISO8859_14=new t(q.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),t.ISO8859_15=new t(q.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),t.ISO8859_16=new t(q.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),t.SJIS=new t(q.SJIS,20,"SJIS","Shift_JIS"),t.Cp1250=new t(q.Cp1250,21,"Cp1250","windows-1250"),t.Cp1251=new t(q.Cp1251,22,"Cp1251","windows-1251"),t.Cp1252=new t(q.Cp1252,23,"Cp1252","windows-1252"),t.Cp1256=new t(q.Cp1256,24,"Cp1256","windows-1256"),t.UnicodeBigUnmarked=new t(q.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),t.UTF8=new t(q.UTF8,26,"UTF8","UTF-8"),t.ASCII=new t(q.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),t.Big5=new t(q.Big5,28,"Big5"),t.GB18030=new t(q.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),t.EUC_KR=new t(q.EUC_KR,30,"EUC_KR","EUC-KR"),t})(),Qu=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Nr=(function(t){Qu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="UnsupportedOperationException",e})(be),je=(function(){function t(){}return t.decode=function(e,r){var n=this.encodingName(r);return this.customDecoder?this.customDecoder(e,n):typeof TextDecoder>"u"||this.shouldDecodeOnFallback(n)?this.decodeFallback(e,n):new TextDecoder(n).decode(e)},t.shouldDecodeOnFallback=function(e){return!t.isBrowser()&&e==="ISO-8859-1"},t.encode=function(e,r){var n=this.encodingName(r);return this.customEncoder?this.customEncoder(e,n):typeof TextEncoder>"u"?this.encodeFallback(e):new TextEncoder().encode(e)},t.isBrowser=function(){return typeof window<"u"&&{}.toString.call(window)==="[object Window]"},t.encodingName=function(e){return typeof e=="string"?e:e.getName()},t.encodingCharacterSet=function(e){return e instanceof de?e:de.getCharacterSetECIByName(e)},t.decodeFallback=function(e,r){var n=this.encodingCharacterSet(r);if(t.isDecodeFallbackSupported(n)){for(var i="",a=0,o=e.length;a<o;a++){var s=e[a].toString(16);s.length<2&&(s="0"+s),i+="%"+s}return decodeURIComponent(i)}if(n.equals(de.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(e.buffer));throw new Nr("Encoding "+this.encodingName(r)+" not supported by fallback.")},t.isDecodeFallbackSupported=function(e){return e.equals(de.UTF8)||e.equals(de.ISO8859_1)||e.equals(de.ASCII)},t.encodeFallback=function(e){for(var r=btoa(unescape(encodeURIComponent(e))),n=r.split(""),i=[],a=0;a<n.length;a++)i.push(n[a].charCodeAt(0));return new Uint8Array(i)},t})(),re=(function(){function t(){}return t.castAsNonUtf8Char=function(e,r){r===void 0&&(r=null);var n=r?r.getName():this.ISO88591;return je.decode(new Uint8Array([e]),n)},t.guessEncoding=function(e,r){if(r!=null&&r.get(le.CHARACTER_SET)!==void 0)return r.get(le.CHARACTER_SET).toString();for(var n=e.length,i=!0,a=!0,o=!0,s=0,l=0,c=0,f=0,d=0,p=0,h=0,v=0,g=0,y=0,_=0,m=e.length>3&&e[0]===239&&e[1]===187&&e[2]===191,E=0;E<n&&(i||a||o);E++){var w=e[E]&255;o&&(s>0?(w&128)===0?o=!1:s--:(w&128)!==0&&((w&64)===0?o=!1:(s++,(w&32)===0?l++:(s++,(w&16)===0?c++:(s++,(w&8)===0?f++:o=!1))))),i&&(w>127&&w<160?i=!1:w>159&&(w<192||w===215||w===247)&&_++),a&&(d>0?w<64||w===127||w>252?a=!1:d--:w===128||w===160||w>239?a=!1:w>160&&w<224?(p++,v=0,h++,h>g&&(g=h)):w>127?(d++,h=0,v++,v>y&&(y=v)):(h=0,v=0))}return o&&s>0&&(o=!1),a&&d>0&&(a=!1),o&&(m||l+c+f>0)?t.UTF8:a&&(t.ASSUME_SHIFT_JIS||g>=3||y>=3)?t.SHIFT_JIS:i&&a?g===2&&p===2||_*10>=n?t.SHIFT_JIS:t.ISO88591:i?t.ISO88591:a?t.SHIFT_JIS:o?t.UTF8:t.PLATFORM_DEFAULT_ENCODING},t.format=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=-1;function a(s,l,c,f,d,p){if(s==="%%")return"%";if(r[++i]!==void 0){s=f?parseInt(f.substr(1)):void 0;var h=d?parseInt(d.substr(1)):void 0,v;switch(p){case"s":v=r[i];break;case"c":v=r[i][0];break;case"f":v=parseFloat(r[i]).toFixed(s);break;case"p":v=parseFloat(r[i]).toPrecision(s);break;case"e":v=parseFloat(r[i]).toExponential(s);break;case"x":v=parseInt(r[i]).toString(h||16);break;case"d":v=parseFloat(parseInt(r[i],h||10).toPrecision(s)).toFixed(0);break}v=typeof v=="object"?JSON.stringify(v):(+v).toString(h);for(var g=parseInt(c),y=c&&c[0]+""=="0"?"0":" ";v.length<g;)v=l!==void 0?v+y:y+v;return v}}var o=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return e.replace(o,a)},t.getBytes=function(e,r){return je.encode(e,r)},t.getCharCode=function(e,r){return r===void 0&&(r=0),e.charCodeAt(r)},t.getCharAt=function(e){return String.fromCharCode(e)},t.SHIFT_JIS=de.SJIS.getName(),t.GB2312="GB2312",t.ISO88591=de.ISO8859_1.getName(),t.EUC_JP="EUC_JP",t.UTF8=de.UTF8.getName(),t.PLATFORM_DEFAULT_ENCODING=t.UTF8,t.ASSUME_SHIFT_JIS=!1,t})(),J=(function(){function t(e){e===void 0&&(e=""),this.value=e}return t.prototype.enableDecoding=function(e){return this.encoding=e,this},t.prototype.append=function(e){return typeof e=="string"?this.value+=e.toString():this.encoding?this.value+=re.castAsNonUtf8Char(e,this.encoding):this.value+=String.fromCharCode(e),this},t.prototype.appendChars=function(e,r,n){for(var i=r;r<r+n;i++)this.append(e[i]);return this},t.prototype.length=function(){return this.value.length},t.prototype.charAt=function(e){return this.value.charAt(e)},t.prototype.deleteCharAt=function(e){this.value=this.value.substr(0,e)+this.value.substring(e+1)},t.prototype.setCharAt=function(e,r){this.value=this.value.substr(0,e)+r+this.value.substr(e+1)},t.prototype.substring=function(e,r){return this.value.substring(e,r)},t.prototype.setLengthToZero=function(){this.value=""},t.prototype.toString=function(){return this.value},t.prototype.insert=function(e,r){this.value=this.value.substr(0,e)+r+this.value.substr(e+r.length)},t})(),qe=(function(){function t(e,r,n,i){if(this.width=e,this.height=r,this.rowSize=n,this.bits=i,r==null&&(r=e),this.height=r,e<1||r<1)throw new F("Both dimensions must be greater than 0");n==null&&(n=Math.floor((e+31)/32)),this.rowSize=n,i==null&&(this.bits=new Int32Array(this.rowSize*this.height))}return t.parseFromBooleanArray=function(e){for(var r=e.length,n=e[0].length,i=new t(n,r),a=0;a<r;a++)for(var o=e[a],s=0;s<n;s++)o[s]&&i.set(s,a);return i},t.parseFromString=function(e,r,n){if(e===null)throw new F("stringRepresentation cannot be null");for(var i=new Array(e.length),a=0,o=0,s=-1,l=0,c=0;c<e.length;)if(e.charAt(c)===`
13
- `||e.charAt(c)==="\r"){if(a>o){if(s===-1)s=a-o;else if(a-o!==s)throw new F("row lengths do not match");o=a,l++}c++}else if(e.substring(c,c+r.length)===r)c+=r.length,i[a]=!0,a++;else if(e.substring(c,c+n.length)===n)c+=n.length,i[a]=!1,a++;else throw new F("illegal character encountered: "+e.substring(c));if(a>o){if(s===-1)s=a-o;else if(a-o!==s)throw new F("row lengths do not match");l++}for(var f=new t(s,l),d=0;d<a;d++)i[d]&&f.set(Math.floor(d%s),Math.floor(d/s));return f},t.prototype.get=function(e,r){var n=r*this.rowSize+Math.floor(e/32);return(this.bits[n]>>>(e&31)&1)!==0},t.prototype.set=function(e,r){var n=r*this.rowSize+Math.floor(e/32);this.bits[n]|=1<<(e&31)&4294967295},t.prototype.unset=function(e,r){var n=r*this.rowSize+Math.floor(e/32);this.bits[n]&=~(1<<(e&31)&4294967295)},t.prototype.flip=function(e,r){var n=r*this.rowSize+Math.floor(e/32);this.bits[n]^=1<<(e&31)&4294967295},t.prototype.xor=function(e){if(this.width!==e.getWidth()||this.height!==e.getHeight()||this.rowSize!==e.getRowSize())throw new F("input matrix dimensions do not match");for(var r=new ve(Math.floor(this.width/32)+1),n=this.rowSize,i=this.bits,a=0,o=this.height;a<o;a++)for(var s=a*n,l=e.getRow(a,r).getBitArray(),c=0;c<n;c++)i[s+c]^=l[c]},t.prototype.clear=function(){for(var e=this.bits,r=e.length,n=0;n<r;n++)e[n]=0},t.prototype.setRegion=function(e,r,n,i){if(r<0||e<0)throw new F("Left and top must be nonnegative");if(i<1||n<1)throw new F("Height and width must be at least 1");var a=e+n,o=r+i;if(o>this.height||a>this.width)throw new F("The region must fit inside the matrix");for(var s=this.rowSize,l=this.bits,c=r;c<o;c++)for(var f=c*s,d=e;d<a;d++)l[f+Math.floor(d/32)]|=1<<(d&31)&4294967295},t.prototype.getRow=function(e,r){r==null||r.getSize()<this.width?r=new ve(this.width):r.clear();for(var n=this.rowSize,i=this.bits,a=e*n,o=0;o<n;o++)r.setBulk(o*32,i[a+o]);return r},t.prototype.setRow=function(e,r){ne.arraycopy(r.getBitArray(),0,this.bits,e*this.rowSize,this.rowSize)},t.prototype.rotate180=function(){for(var e=this.getWidth(),r=this.getHeight(),n=new ve(e),i=new ve(e),a=0,o=Math.floor((r+1)/2);a<o;a++)n=this.getRow(a,n),i=this.getRow(r-1-a,i),n.reverse(),i.reverse(),this.setRow(a,i),this.setRow(r-1-a,n)},t.prototype.getEnclosingRectangle=function(){for(var e=this.width,r=this.height,n=this.rowSize,i=this.bits,a=e,o=r,s=-1,l=-1,c=0;c<r;c++)for(var f=0;f<n;f++){var d=i[c*n+f];if(d!==0){if(c<o&&(o=c),c>l&&(l=c),f*32<a){for(var p=0;(d<<31-p&4294967295)===0;)p++;f*32+p<a&&(a=f*32+p)}if(f*32+31>s){for(var p=31;!(d>>>p);)p--;f*32+p>s&&(s=f*32+p)}}}return s<a||l<o?null:Int32Array.from([a,o,s-a+1,l-o+1])},t.prototype.getTopLeftOnBit=function(){for(var e=this.rowSize,r=this.bits,n=0;n<r.length&&r[n]===0;)n++;if(n===r.length)return null;for(var i=n/e,a=n%e*32,o=r[n],s=0;(o<<31-s&4294967295)===0;)s++;return a+=s,Int32Array.from([a,i])},t.prototype.getBottomRightOnBit=function(){for(var e=this.rowSize,r=this.bits,n=r.length-1;n>=0&&r[n]===0;)n--;if(n<0)return null;for(var i=Math.floor(n/e),a=Math.floor(n%e)*32,o=r[n],s=31;!(o>>>s);)s--;return a+=s,Int32Array.from([a,i])},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.getRowSize=function(){return this.rowSize},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.width===r.width&&this.height===r.height&&this.rowSize===r.rowSize&&De.equals(this.bits,r.bits)},t.prototype.hashCode=function(){var e=this.width;return e=31*e+this.width,e=31*e+this.height,e=31*e+this.rowSize,e=31*e+De.hashCode(this.bits),e},t.prototype.toString=function(e,r,n){return e===void 0&&(e="X "),r===void 0&&(r=" "),n===void 0&&(n=`
14
- `),this.buildToString(e,r,n)},t.prototype.buildToString=function(e,r,n){for(var i=new J,a=0,o=this.height;a<o;a++){for(var s=0,l=this.width;s<l;s++)i.append(this.get(s,a)?e:r);i.append(n)}return i.toString()},t.prototype.clone=function(){return new t(this.width,this.height,this.rowSize,this.bits.slice())},t})(),Ju=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),I=(function(t){Ju(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.getNotFoundInstance=function(){return new e},e.kind="NotFoundException",e})(be),e1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),t1=(function(t){e1(e,t);function e(r){var n=t.call(this,r)||this;return n.luminances=e.EMPTY,n.buckets=new Int32Array(e.LUMINANCE_BUCKETS),n}return e.prototype.getBlackRow=function(r,n){var i=this.getLuminanceSource(),a=i.getWidth();n==null||n.getSize()<a?n=new ve(a):n.clear(),this.initArrays(a);for(var o=i.getRow(r,this.luminances),s=this.buckets,l=0;l<a;l++)s[(o[l]&255)>>e.LUMINANCE_SHIFT]++;var c=e.estimateBlackPoint(s);if(a<3)for(var l=0;l<a;l++)(o[l]&255)<c&&n.set(l);else for(var f=o[0]&255,d=o[1]&255,l=1;l<a-1;l++){var p=o[l+1]&255;(d*4-f-p)/2<c&&n.set(l),f=d,d=p}return n},e.prototype.getBlackMatrix=function(){var r=this.getLuminanceSource(),n=r.getWidth(),i=r.getHeight(),a=new qe(n,i);this.initArrays(n);for(var o=this.buckets,s=1;s<5;s++)for(var l=Math.floor(i*s/5),c=r.getRow(l,this.luminances),f=Math.floor(n*4/5),d=Math.floor(n/5);d<f;d++){var p=c[d]&255;o[p>>e.LUMINANCE_SHIFT]++}for(var h=e.estimateBlackPoint(o),v=r.getMatrix(),s=0;s<i;s++)for(var g=s*n,d=0;d<n;d++){var p=v[g+d]&255;p<h&&a.set(d,s)}return a},e.prototype.createBinarizer=function(r){return new e(r)},e.prototype.initArrays=function(r){this.luminances.length<r&&(this.luminances=new Uint8ClampedArray(r));for(var n=this.buckets,i=0;i<e.LUMINANCE_BUCKETS;i++)n[i]=0},e.estimateBlackPoint=function(r){for(var n=r.length,i=0,a=0,o=0,s=0;s<n;s++)r[s]>o&&(a=s,o=r[s]),r[s]>i&&(i=r[s]);for(var l=0,c=0,s=0;s<n;s++){var f=s-a,d=r[s]*f*f;d>c&&(l=s,c=d)}if(a>l){var p=a;a=l,l=p}if(l-a<=n/16)throw new I;for(var h=l-1,v=-1,s=l-1;s>a;s--){var g=s-a,d=g*g*(l-s)*(i-r[s]);d>v&&(h=s,v=d)}return h<<e.LUMINANCE_SHIFT},e.LUMINANCE_BITS=5,e.LUMINANCE_SHIFT=8-e.LUMINANCE_BITS,e.LUMINANCE_BUCKETS=1<<e.LUMINANCE_BITS,e.EMPTY=Uint8ClampedArray.from([0]),e})(Xu),r1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),n1=(function(t){r1(e,t);function e(r){var n=t.call(this,r)||this;return n.matrix=null,n}return e.prototype.getBlackMatrix=function(){if(this.matrix!==null)return this.matrix;var r=this.getLuminanceSource(),n=r.getWidth(),i=r.getHeight();if(n>=e.MINIMUM_DIMENSION&&i>=e.MINIMUM_DIMENSION){var a=r.getMatrix(),o=n>>e.BLOCK_SIZE_POWER;(n&e.BLOCK_SIZE_MASK)!==0&&o++;var s=i>>e.BLOCK_SIZE_POWER;(i&e.BLOCK_SIZE_MASK)!==0&&s++;var l=e.calculateBlackPoints(a,o,s,n,i),c=new qe(n,i);e.calculateThresholdForBlock(a,o,s,n,i,l,c),this.matrix=c}else this.matrix=t.prototype.getBlackMatrix.call(this);return this.matrix},e.prototype.createBinarizer=function(r){return new e(r)},e.calculateThresholdForBlock=function(r,n,i,a,o,s,l){for(var c=o-e.BLOCK_SIZE,f=a-e.BLOCK_SIZE,d=0;d<i;d++){var p=d<<e.BLOCK_SIZE_POWER;p>c&&(p=c);for(var h=e.cap(d,2,i-3),v=0;v<n;v++){var g=v<<e.BLOCK_SIZE_POWER;g>f&&(g=f);for(var y=e.cap(v,2,n-3),_=0,m=-2;m<=2;m++){var E=s[h+m];_+=E[y-2]+E[y-1]+E[y]+E[y+1]+E[y+2]}var w=_/25;e.thresholdBlock(r,g,p,w,a,l)}}},e.cap=function(r,n,i){return r<n?n:r>i?i:r},e.thresholdBlock=function(r,n,i,a,o,s){for(var l=0,c=i*o+n;l<e.BLOCK_SIZE;l++,c+=o)for(var f=0;f<e.BLOCK_SIZE;f++)(r[c+f]&255)<=a&&s.set(n+f,i+l)},e.calculateBlackPoints=function(r,n,i,a,o){for(var s=o-e.BLOCK_SIZE,l=a-e.BLOCK_SIZE,c=new Array(i),f=0;f<i;f++){c[f]=new Int32Array(n);var d=f<<e.BLOCK_SIZE_POWER;d>s&&(d=s);for(var p=0;p<n;p++){var h=p<<e.BLOCK_SIZE_POWER;h>l&&(h=l);for(var v=0,g=255,y=0,_=0,m=d*a+h;_<e.BLOCK_SIZE;_++,m+=a){for(var E=0;E<e.BLOCK_SIZE;E++){var w=r[m+E]&255;v+=w,w<g&&(g=w),w>y&&(y=w)}if(y-g>e.MIN_DYNAMIC_RANGE)for(_++,m+=a;_<e.BLOCK_SIZE;_++,m+=a)for(var E=0;E<e.BLOCK_SIZE;E++)v+=r[m+E]&255}var C=v>>e.BLOCK_SIZE_POWER*2;if(y-g<=e.MIN_DYNAMIC_RANGE&&(C=g/2,f>0&&p>0)){var b=(c[f-1][p]+2*c[f][p-1]+c[f-1][p-1])/4;g<b&&(C=b)}c[f][p]=C}}return c},e.BLOCK_SIZE_POWER=3,e.BLOCK_SIZE=1<<e.BLOCK_SIZE_POWER,e.BLOCK_SIZE_MASK=e.BLOCK_SIZE-1,e.MINIMUM_DIMENSION=e.BLOCK_SIZE*5,e.MIN_DYNAMIC_RANGE=24,e})(t1),zr=(function(){function t(e,r){this.width=e,this.height=r}return t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.isCropSupported=function(){return!1},t.prototype.crop=function(e,r,n,i){throw new Nr("This luminance source does not support cropping.")},t.prototype.isRotateSupported=function(){return!1},t.prototype.rotateCounterClockwise=function(){throw new Nr("This luminance source does not support rotation by 90 degrees.")},t.prototype.rotateCounterClockwise45=function(){throw new Nr("This luminance source does not support rotation by 45 degrees.")},t.prototype.toString=function(){for(var e=new Uint8ClampedArray(this.width),r=new J,n=0;n<this.height;n++){for(var i=this.getRow(n,e),a=0;a<this.width;a++){var o=i[a]&255,s=void 0;o<64?s="#":o<128?s="+":o<192?s=".":s=" ",r.append(s)}r.append(`
15
- `)}return r.toString()},t})(),i1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Xn=(function(t){i1(e,t);function e(r){var n=t.call(this,r.getWidth(),r.getHeight())||this;return n.delegate=r,n}return e.prototype.getRow=function(r,n){for(var i=this.delegate.getRow(r,n),a=this.getWidth(),o=0;o<a;o++)i[o]=255-(i[o]&255);return i},e.prototype.getMatrix=function(){for(var r=this.delegate.getMatrix(),n=this.getWidth()*this.getHeight(),i=new Uint8ClampedArray(n),a=0;a<n;a++)i[a]=255-(r[a]&255);return i},e.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},e.prototype.crop=function(r,n,i,a){return new e(this.delegate.crop(r,n,i,a))},e.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},e.prototype.invert=function(){return this.delegate},e.prototype.rotateCounterClockwise=function(){return new e(this.delegate.rotateCounterClockwise())},e.prototype.rotateCounterClockwise45=function(){return new e(this.delegate.rotateCounterClockwise45())},e})(zr),a1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),o1=(function(t){a1(e,t);function e(r){var n=t.call(this,r.width,r.height)||this;return n.canvas=r,n.tempCanvasElement=null,n.buffer=e.makeBufferFromCanvasImageData(r),n}return e.makeBufferFromCanvasImageData=function(r){var n=r.getContext("2d").getImageData(0,0,r.width,r.height);return e.toGrayscaleBuffer(n.data,r.width,r.height)},e.toGrayscaleBuffer=function(r,n,i){for(var a=new Uint8ClampedArray(n*i),o=0,s=0,l=r.length;o<l;o+=4,s++){var c=void 0,f=r[o+3];if(f===0)c=255;else{var d=r[o],p=r[o+1],h=r[o+2];c=306*d+601*p+117*h+512>>10}a[s]=c}return a},e.prototype.getRow=function(r,n){if(r<0||r>=this.getHeight())throw new F("Requested row is outside the image: "+r);var i=this.getWidth(),a=r*i;return n===null?n=this.buffer.slice(a,a+i):(n.length<i&&(n=new Uint8ClampedArray(i)),n.set(this.buffer.slice(a,a+i))),n},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(r,n,i,a){return t.prototype.crop.call(this,r,n,i,a),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.getTempCanvasElement=function(){if(this.tempCanvasElement===null){var r=this.canvas.ownerDocument.createElement("canvas");r.width=this.canvas.width,r.height=this.canvas.height,this.tempCanvasElement=r}return this.tempCanvasElement},e.prototype.rotate=function(r){var n=this.getTempCanvasElement(),i=n.getContext("2d"),a=r*e.DEGREE_TO_RADIANS,o=this.canvas.width,s=this.canvas.height,l=Math.ceil(Math.abs(Math.cos(a))*o+Math.abs(Math.sin(a))*s),c=Math.ceil(Math.abs(Math.sin(a))*o+Math.abs(Math.cos(a))*s);return n.width=l,n.height=c,i.translate(l/2,c/2),i.rotate(a),i.drawImage(this.canvas,o/-2,s/-2),this.buffer=e.makeBufferFromCanvasImageData(n),this},e.prototype.invert=function(){return new Xn(this)},e.DEGREE_TO_RADIANS=Math.PI/180,e})(zr),s1=(function(){function t(e,r,n){this.deviceId=e,this.label=r,this.kind="videoinput",this.groupId=n||void 0}return t.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},t})(),Ee=function(t,e,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(f){try{c(n.next(f))}catch(d){o(d)}}function l(f){try{c(n.throw(f))}catch(d){o(d)}}function c(f){f.done?a(f.value):i(f.value).then(s,l)}c((n=n.apply(t,e||[])).next())})},Ae=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(f){return l([c,f])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(f){c=[6,f],i=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},l1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Vt=(function(){function t(e,r,n){r===void 0&&(r=500),this.reader=e,this.timeBetweenScansMillis=r,this._hints=n,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}return Object.defineProperty(t.prototype,"hasNavigator",{get:function(){return typeof navigator<"u"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMediaDevicesSuported",{get:function(){return this.hasNavigator&&!!navigator.mediaDevices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canEnumerateDevices",{get:function(){return!!(this.isMediaDevicesSuported&&navigator.mediaDevices.enumerateDevices)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timeBetweenDecodingAttempts",{get:function(){return this._timeBetweenDecodingAttempts},set:function(e){this._timeBetweenDecodingAttempts=e<0?0:e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hints",{get:function(){return this._hints},set:function(e){this._hints=e||null},enumerable:!1,configurable:!0}),t.prototype.listVideoInputDevices=function(){return Ee(this,void 0,void 0,function(){var e,r,n,i,a,o,s,l,c,f,d,p;return Ae(this,function(h){switch(h.label){case 0:if(!this.hasNavigator)throw new Error("Can't enumerate devices, navigator is not present.");if(!this.canEnumerateDevices)throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:e=h.sent(),r=[];try{for(n=l1(e),i=n.next();!i.done;i=n.next())a=i.value,o=a.kind==="video"?"videoinput":a.kind,o==="videoinput"&&(s=a.deviceId||a.id,l=a.label||"Video device "+(r.length+1),c=a.groupId,f={deviceId:s,label:l,kind:o,groupId:c},r.push(f))}catch(v){d={error:v}}finally{try{i&&!i.done&&(p=n.return)&&p.call(n)}finally{if(d)throw d.error}}return[2,r]}})})},t.prototype.getVideoInputDevices=function(){return Ee(this,void 0,void 0,function(){var e;return Ae(this,function(r){switch(r.label){case 0:return[4,this.listVideoInputDevices()];case 1:return e=r.sent(),[2,e.map(function(n){return new s1(n.deviceId,n.label)})]}})})},t.prototype.findDeviceById=function(e){return Ee(this,void 0,void 0,function(){var r;return Ae(this,function(n){switch(n.label){case 0:return[4,this.listVideoInputDevices()];case 1:return r=n.sent(),r?[2,r.find(function(i){return i.deviceId===e})]:[2,null]}})})},t.prototype.decodeFromInputVideoDevice=function(e,r){return Ee(this,void 0,void 0,function(){return Ae(this,function(n){switch(n.label){case 0:return[4,this.decodeOnceFromVideoDevice(e,r)];case 1:return[2,n.sent()]}})})},t.prototype.decodeOnceFromVideoDevice=function(e,r){return Ee(this,void 0,void 0,function(){var n,i;return Ae(this,function(a){switch(a.label){case 0:return this.reset(),e?n={deviceId:{exact:e}}:n={facingMode:"environment"},i={video:n},[4,this.decodeOnceFromConstraints(i,r)];case 1:return[2,a.sent()]}})})},t.prototype.decodeOnceFromConstraints=function(e,r){return Ee(this,void 0,void 0,function(){var n;return Ae(this,function(i){switch(i.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return n=i.sent(),[4,this.decodeOnceFromStream(n,r)];case 2:return[2,i.sent()]}})})},t.prototype.decodeOnceFromStream=function(e,r){return Ee(this,void 0,void 0,function(){var n,i;return Ae(this,function(a){switch(a.label){case 0:return this.reset(),[4,this.attachStreamToVideo(e,r)];case 1:return n=a.sent(),[4,this.decodeOnce(n)];case 2:return i=a.sent(),[2,i]}})})},t.prototype.decodeFromInputVideoDeviceContinuously=function(e,r,n){return Ee(this,void 0,void 0,function(){return Ae(this,function(i){switch(i.label){case 0:return[4,this.decodeFromVideoDevice(e,r,n)];case 1:return[2,i.sent()]}})})},t.prototype.decodeFromVideoDevice=function(e,r,n){return Ee(this,void 0,void 0,function(){var i,a;return Ae(this,function(o){switch(o.label){case 0:return e?i={deviceId:{exact:e}}:i={facingMode:"environment"},a={video:i},[4,this.decodeFromConstraints(a,r,n)];case 1:return[2,o.sent()]}})})},t.prototype.decodeFromConstraints=function(e,r,n){return Ee(this,void 0,void 0,function(){var i;return Ae(this,function(a){switch(a.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return i=a.sent(),[4,this.decodeFromStream(i,r,n)];case 2:return[2,a.sent()]}})})},t.prototype.decodeFromStream=function(e,r,n){return Ee(this,void 0,void 0,function(){var i;return Ae(this,function(a){switch(a.label){case 0:return this.reset(),[4,this.attachStreamToVideo(e,r)];case 1:return i=a.sent(),[4,this.decodeContinuously(i,n)];case 2:return[2,a.sent()]}})})},t.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},t.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},t.prototype.attachStreamToVideo=function(e,r){return Ee(this,void 0,void 0,function(){var n;return Ae(this,function(i){switch(i.label){case 0:return n=this.prepareVideoElement(r),this.addVideoSource(n,e),this.videoElement=n,this.stream=e,[4,this.playVideoOnLoadAsync(n)];case 1:return i.sent(),[2,n]}})})},t.prototype.playVideoOnLoadAsync=function(e){var r=this;return new Promise(function(n,i){return r.playVideoOnLoad(e,function(){return n()})})},t.prototype.playVideoOnLoad=function(e,r){var n=this;this.videoEndedListener=function(){return n.stopStreams()},this.videoCanPlayListener=function(){return n.tryPlayVideo(e)},e.addEventListener("ended",this.videoEndedListener),e.addEventListener("canplay",this.videoCanPlayListener),e.addEventListener("playing",r),this.tryPlayVideo(e)},t.prototype.isVideoPlaying=function(e){return e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2},t.prototype.tryPlayVideo=function(e){return Ee(this,void 0,void 0,function(){return Ae(this,function(r){switch(r.label){case 0:if(this.isVideoPlaying(e))return console.warn("Trying to play video that is already playing."),[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,e.play()];case 2:return r.sent(),[3,4];case 3:return r.sent(),console.warn("It was not possible to play the video."),[3,4];case 4:return[2]}})})},t.prototype.getMediaElement=function(e,r){var n=document.getElementById(e);if(!n)throw new Fe("element with id '"+e+"' not found");if(n.nodeName.toLowerCase()!==r.toLowerCase())throw new Fe("element with id '"+e+"' must be an "+r+" element");return n},t.prototype.decodeFromImage=function(e,r){if(!e&&!r)throw new Fe("either imageElement with a src set or an url must be provided");return r&&!e?this.decodeFromImageUrl(r):this.decodeFromImageElement(e)},t.prototype.decodeFromVideo=function(e,r){if(!e&&!r)throw new Fe("Either an element with a src set or an URL must be provided");return r&&!e?this.decodeFromVideoUrl(r):this.decodeFromVideoElement(e)},t.prototype.decodeFromVideoContinuously=function(e,r,n){if(e===void 0&&r===void 0)throw new Fe("Either an element with a src set or an URL must be provided");return r&&!e?this.decodeFromVideoUrlContinuously(r,n):this.decodeFromVideoElementContinuously(e,n)},t.prototype.decodeFromImageElement=function(e){if(!e)throw new Fe("An image element must be provided.");this.reset();var r=this.prepareImageElement(e);this.imageElement=r;var n;return this.isImageLoaded(r)?n=this.decodeOnce(r,!1,!0):n=this._decodeOnLoadImage(r),n},t.prototype.decodeFromVideoElement=function(e){var r=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideo(r)},t.prototype.decodeFromVideoElementContinuously=function(e,r){var n=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideoContinuously(n,r)},t.prototype._decodeFromVideoElementSetup=function(e){if(!e)throw new Fe("A video element must be provided.");this.reset();var r=this.prepareVideoElement(e);return this.videoElement=r,r},t.prototype.decodeFromImageUrl=function(e){if(!e)throw new Fe("An URL must be provided.");this.reset();var r=this.prepareImageElement();this.imageElement=r;var n=this._decodeOnLoadImage(r);return r.src=e,n},t.prototype.decodeFromVideoUrl=function(e){if(!e)throw new Fe("An URL must be provided.");this.reset();var r=this.prepareVideoElement(),n=this.decodeFromVideoElement(r);return r.src=e,n},t.prototype.decodeFromVideoUrlContinuously=function(e,r){if(!e)throw new Fe("An URL must be provided.");this.reset();var n=this.prepareVideoElement(),i=this.decodeFromVideoElementContinuously(n,r);return n.src=e,i},t.prototype._decodeOnLoadImage=function(e){var r=this;return new Promise(function(n,i){r.imageLoadedListener=function(){return r.decodeOnce(e,!1,!0).then(n,i)},e.addEventListener("load",r.imageLoadedListener)})},t.prototype._decodeOnLoadVideo=function(e){return Ee(this,void 0,void 0,function(){return Ae(this,function(r){switch(r.label){case 0:return[4,this.playVideoOnLoadAsync(e)];case 1:return r.sent(),[4,this.decodeOnce(e)];case 2:return[2,r.sent()]}})})},t.prototype._decodeOnLoadVideoContinuously=function(e,r){return Ee(this,void 0,void 0,function(){return Ae(this,function(n){switch(n.label){case 0:return[4,this.playVideoOnLoadAsync(e)];case 1:return n.sent(),this.decodeContinuously(e,r),[2]}})})},t.prototype.isImageLoaded=function(e){return!(!e.complete||e.naturalWidth===0)},t.prototype.prepareImageElement=function(e){var r;return typeof e>"u"&&(r=document.createElement("img"),r.width=200,r.height=200),typeof e=="string"&&(r=this.getMediaElement(e,"img")),e instanceof HTMLImageElement&&(r=e),r},t.prototype.prepareVideoElement=function(e){var r;return!e&&typeof document<"u"&&(r=document.createElement("video"),r.width=200,r.height=200),typeof e=="string"&&(r=this.getMediaElement(e,"video")),e instanceof HTMLVideoElement&&(r=e),r.setAttribute("autoplay","true"),r.setAttribute("muted","true"),r.setAttribute("playsinline","true"),r},t.prototype.decodeOnce=function(e,r,n){var i=this;r===void 0&&(r=!0),n===void 0&&(n=!0),this._stopAsyncDecode=!1;var a=function(o,s){if(i._stopAsyncDecode){s(new I("Video stream has ended before any code could be detected.")),i._stopAsyncDecode=void 0;return}try{var l=i.decode(e);o(l)}catch(p){var c=r&&p instanceof I,f=p instanceof me||p instanceof R,d=f&&n;if(c||d)return setTimeout(a,i._timeBetweenDecodingAttempts,o,s);s(p)}};return new Promise(function(o,s){return a(o,s)})},t.prototype.decodeContinuously=function(e,r){var n=this;this._stopContinuousDecode=!1;var i=function(){if(n._stopContinuousDecode){n._stopContinuousDecode=void 0;return}try{var a=n.decode(e);r(a,null),setTimeout(i,n.timeBetweenScansMillis)}catch(l){r(null,l);var o=l instanceof me||l instanceof R,s=l instanceof I;(o||s)&&setTimeout(i,n._timeBetweenDecodingAttempts)}};i()},t.prototype.decode=function(e){var r=this.createBinaryBitmap(e);return this.decodeBitmap(r)},t.prototype._isHTMLVideoElement=function(e){var r=e;return r.videoWidth!==0},t.prototype.createBinaryBitmap=function(e){this.getCaptureCanvasContext(e),this._isHTMLVideoElement(e)?this.drawFrameOnCanvas(e):this.drawImageOnCanvas(e);var r=this.getCaptureCanvas(e),n=new o1(r),i=new n1(n);return new zu(i)},t.prototype.getCaptureCanvasContext=function(e){if(!this.captureCanvasContext){var r=this.getCaptureCanvas(e),n=void 0;try{n=r.getContext("2d",{willReadFrequently:!0})}catch{n=r.getContext("2d")}this.captureCanvasContext=n}return this.captureCanvasContext},t.prototype.getCaptureCanvas=function(e){if(!this.captureCanvas){var r=this.createCaptureCanvas(e);this.captureCanvas=r}return this.captureCanvas},t.prototype.drawFrameOnCanvas=function(e,r,n){r===void 0&&(r={sx:0,sy:0,sWidth:e.videoWidth,sHeight:e.videoHeight,dx:0,dy:0,dWidth:e.videoWidth,dHeight:e.videoHeight}),n===void 0&&(n=this.captureCanvasContext),n.drawImage(e,r.sx,r.sy,r.sWidth,r.sHeight,r.dx,r.dy,r.dWidth,r.dHeight)},t.prototype.drawImageOnCanvas=function(e,r,n){r===void 0&&(r={sx:0,sy:0,sWidth:e.naturalWidth,sHeight:e.naturalHeight,dx:0,dy:0,dWidth:e.naturalWidth,dHeight:e.naturalHeight}),n===void 0&&(n=this.captureCanvasContext),n.drawImage(e,r.sx,r.sy,r.sWidth,r.sHeight,r.dx,r.dy,r.dWidth,r.dHeight)},t.prototype.decodeBitmap=function(e){return this.reader.decode(e,this._hints)},t.prototype.createCaptureCanvas=function(e){if(typeof document>"u")return this._destroyCaptureCanvas(),null;var r=document.createElement("canvas"),n,i;return typeof e<"u"&&(e instanceof HTMLVideoElement?(n=e.videoWidth,i=e.videoHeight):e instanceof HTMLImageElement&&(n=e.naturalWidth||e.width,i=e.naturalHeight||e.height)),r.style.width=n+"px",r.style.height=i+"px",r.width=n,r.height=i,r},t.prototype.stopStreams=function(){this.stream&&(this.stream.getVideoTracks().forEach(function(e){return e.stop()}),this.stream=void 0),this._stopAsyncDecode===!1&&this.stopAsyncDecode(),this._stopContinuousDecode===!1&&this.stopContinuousDecode()},t.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},t.prototype._destroyVideoElement=function(){this.videoElement&&(typeof this.videoEndedListener<"u"&&this.videoElement.removeEventListener("ended",this.videoEndedListener),typeof this.videoPlayingEventListener<"u"&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),typeof this.videoCanPlayListener<"u"&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},t.prototype._destroyImageElement=function(){this.imageElement&&(this.imageLoadedListener!==void 0&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)},t.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},t.prototype.addVideoSource=function(e,r){try{e.srcObject=r}catch{e.src=URL.createObjectURL(r)}},t.prototype.cleanVideoSource=function(e){try{e.srcObject=null}catch{e.src=""}this.videoElement.removeAttribute("src")},t})(),Be=(function(){function t(e,r,n,i,a,o){n===void 0&&(n=r==null?0:8*r.length),o===void 0&&(o=ne.currentTimeMillis()),this.text=e,this.rawBytes=r,this.numBits=n,this.resultPoints=i,this.format=a,this.timestamp=o,this.text=e,this.rawBytes=r,n==null?this.numBits=r==null?0:8*r.length:this.numBits=n,this.resultPoints=i,this.format=a,this.resultMetadata=null,o==null?this.timestamp=ne.currentTimeMillis():this.timestamp=o}return t.prototype.getText=function(){return this.text},t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.getBarcodeFormat=function(){return this.format},t.prototype.getResultMetadata=function(){return this.resultMetadata},t.prototype.putMetadata=function(e,r){this.resultMetadata===null&&(this.resultMetadata=new Map),this.resultMetadata.set(e,r)},t.prototype.putAllMetadata=function(e){e!==null&&(this.resultMetadata===null?this.resultMetadata=e:this.resultMetadata=new Map(e))},t.prototype.addResultPoints=function(e){var r=this.resultPoints;if(r===null)this.resultPoints=e;else if(e!==null&&e.length>0){var n=new Array(r.length+e.length);ne.arraycopy(r,0,n,0,r.length),ne.arraycopy(e,0,n,r.length,e.length),this.resultPoints=n}},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.toString=function(){return this.text},t})(),In;(function(t){t[t.AZTEC=0]="AZTEC",t[t.CODABAR=1]="CODABAR",t[t.CODE_39=2]="CODE_39",t[t.CODE_93=3]="CODE_93",t[t.CODE_128=4]="CODE_128",t[t.DATA_MATRIX=5]="DATA_MATRIX",t[t.EAN_8=6]="EAN_8",t[t.EAN_13=7]="EAN_13",t[t.ITF=8]="ITF",t[t.MAXICODE=9]="MAXICODE",t[t.PDF_417=10]="PDF_417",t[t.QR_CODE=11]="QR_CODE",t[t.RSS_14=12]="RSS_14",t[t.RSS_EXPANDED=13]="RSS_EXPANDED",t[t.UPC_A=14]="UPC_A",t[t.UPC_E=15]="UPC_E",t[t.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"})(In||(In={}));const U=In;var On;(function(t){t[t.OTHER=0]="OTHER",t[t.ORIENTATION=1]="ORIENTATION",t[t.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",t[t.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",t[t.ISSUE_NUMBER=4]="ISSUE_NUMBER",t[t.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",t[t.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",t[t.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",t[t.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",t[t.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",t[t.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"})(On||(On={}));const we=On;var Wr=(function(){function t(e,r,n,i,a,o){a===void 0&&(a=-1),o===void 0&&(o=-1),this.rawBytes=e,this.text=r,this.byteSegments=n,this.ecLevel=i,this.structuredAppendSequenceNumber=a,this.structuredAppendParity=o,this.numBits=e==null?0:8*e.length}return t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.setNumBits=function(e){this.numBits=e},t.prototype.getText=function(){return this.text},t.prototype.getByteSegments=function(){return this.byteSegments},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getErrorsCorrected=function(){return this.errorsCorrected},t.prototype.setErrorsCorrected=function(e){this.errorsCorrected=e},t.prototype.getErasures=function(){return this.erasures},t.prototype.setErasures=function(e){this.erasures=e},t.prototype.getOther=function(){return this.other},t.prototype.setOther=function(e){this.other=e},t.prototype.hasStructuredAppend=function(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0},t.prototype.getStructuredAppendParity=function(){return this.structuredAppendParity},t.prototype.getStructuredAppendSequenceNumber=function(){return this.structuredAppendSequenceNumber},t})(),tr=(function(){function t(){}return t.prototype.exp=function(e){return this.expTable[e]},t.prototype.log=function(e){if(e===0)throw new F;return this.logTable[e]},t.addOrSubtract=function(e,r){return e^r},t})(),ct=(function(){function t(e,r){if(r.length===0)throw new F;this.field=e;var n=r.length;if(n>1&&r[0]===0){for(var i=1;i<n&&r[i]===0;)i++;i===n?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(n-i),ne.arraycopy(r,i,this.coefficients,0,this.coefficients.length))}else this.coefficients=r}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return this.coefficients[0]===0},t.prototype.getCoefficient=function(e){return this.coefficients[this.coefficients.length-1-e]},t.prototype.evaluateAt=function(e){if(e===0)return this.getCoefficient(0);var r=this.coefficients,n;if(e===1){n=0;for(var i=0,a=r.length;i!==a;i++){var o=r[i];n=tr.addOrSubtract(n,o)}return n}n=r[0];for(var s=r.length,l=this.field,i=1;i<s;i++)n=tr.addOrSubtract(l.multiply(e,n),r[i]);return n},t.prototype.addOrSubtract=function(e){if(!this.field.equals(e.field))throw new F("GenericGFPolys do not have same GenericGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var i=r;r=n,n=i}var a=new Int32Array(n.length),o=n.length-r.length;ne.arraycopy(n,0,a,0,o);for(var s=o;s<n.length;s++)a[s]=tr.addOrSubtract(r[s-o],n[s]);return new t(this.field,a)},t.prototype.multiply=function(e){if(!this.field.equals(e.field))throw new F("GenericGFPolys do not have same GenericGF field");if(this.isZero()||e.isZero())return this.field.getZero();for(var r=this.coefficients,n=r.length,i=e.coefficients,a=i.length,o=new Int32Array(n+a-1),s=this.field,l=0;l<n;l++)for(var c=r[l],f=0;f<a;f++)o[l+f]=tr.addOrSubtract(o[l+f],s.multiply(c,i[f]));return new t(s,o)},t.prototype.multiplyScalar=function(e){if(e===0)return this.field.getZero();if(e===1)return this;for(var r=this.coefficients.length,n=this.field,i=new Int32Array(r),a=this.coefficients,o=0;o<r;o++)i[o]=n.multiply(a[o],e);return new t(n,i)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new F;if(r===0)return this.field.getZero();for(var n=this.coefficients,i=n.length,a=new Int32Array(i+e),o=this.field,s=0;s<i;s++)a[s]=o.multiply(n[s],r);return new t(o,a)},t.prototype.divide=function(e){if(!this.field.equals(e.field))throw new F("GenericGFPolys do not have same GenericGF field");if(e.isZero())throw new F("Divide by 0");for(var r=this.field,n=r.getZero(),i=this,a=e.getCoefficient(e.getDegree()),o=r.inverse(a);i.getDegree()>=e.getDegree()&&!i.isZero();){var s=i.getDegree()-e.getDegree(),l=r.multiply(i.getCoefficient(i.getDegree()),o),c=e.multiplyByMonomial(s,l),f=r.buildMonomial(s,l);n=n.addOrSubtract(f),i=i.addOrSubtract(c)}return[n,i]},t.prototype.toString=function(){for(var e="",r=this.getDegree();r>=0;r--){var n=this.getCoefficient(r);if(n!==0){if(n<0?(e+=" - ",n=-n):e.length>0&&(e+=" + "),r===0||n!==1){var i=this.field.log(n);i===0?e+="1":i===1?e+="a":(e+="a^",e+=i)}r!==0&&(r===1?e+="x":(e+="x^",e+=r))}}return e},t})(),u1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),fa=(function(t){u1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ArithmeticException",e})(be),c1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ne=(function(t){c1(e,t);function e(r,n,i){var a=t.call(this)||this;a.primitive=r,a.size=n,a.generatorBase=i;for(var o=new Int32Array(n),s=1,l=0;l<n;l++)o[l]=s,s*=2,s>=n&&(s^=r,s&=n-1);a.expTable=o;for(var c=new Int32Array(n),l=0;l<n-1;l++)c[o[l]]=l;return a.logTable=c,a.zero=new ct(a,Int32Array.from([0])),a.one=new ct(a,Int32Array.from([1])),a}return e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(r,n){if(r<0)throw new F;if(n===0)return this.zero;var i=new Int32Array(r+1);return i[0]=n,new ct(this,i)},e.prototype.inverse=function(r){if(r===0)throw new fa;return this.expTable[this.size-this.logTable[r]-1]},e.prototype.multiply=function(r,n){return r===0||n===0?0:this.expTable[(this.logTable[r]+this.logTable[n])%(this.size-1)]},e.prototype.getSize=function(){return this.size},e.prototype.getGeneratorBase=function(){return this.generatorBase},e.prototype.toString=function(){return"GF(0x"+G.toHexString(this.primitive)+","+this.size+")"},e.prototype.equals=function(r){return r===this},e.AZTEC_DATA_12=new e(4201,4096,1),e.AZTEC_DATA_10=new e(1033,1024,1),e.AZTEC_DATA_6=new e(67,64,1),e.AZTEC_PARAM=new e(19,16,1),e.QR_CODE_FIELD_256=new e(285,256,0),e.DATA_MATRIX_FIELD_256=new e(301,256,1),e.AZTEC_DATA_8=e.DATA_MATRIX_FIELD_256,e.MAXICODE_FIELD_64=e.AZTEC_DATA_6,e})(tr),f1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),wr=(function(t){f1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ReedSolomonException",e})(be),d1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),hr=(function(t){d1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="IllegalStateException",e})(be),Xr=(function(){function t(e){this.field=e}return t.prototype.decode=function(e,r){for(var n=this.field,i=new ct(n,e),a=new Int32Array(r),o=!0,s=0;s<r;s++){var l=i.evaluateAt(n.exp(s+n.getGeneratorBase()));a[a.length-1-s]=l,l!==0&&(o=!1)}if(!o)for(var c=new ct(n,a),f=this.runEuclideanAlgorithm(n.buildMonomial(r,1),c,r),d=f[0],p=f[1],h=this.findErrorLocations(d),v=this.findErrorMagnitudes(p,h),s=0;s<h.length;s++){var g=e.length-1-n.log(h[s]);if(g<0)throw new wr("Bad error location");e[g]=Ne.addOrSubtract(e[g],v[s])}},t.prototype.runEuclideanAlgorithm=function(e,r,n){if(e.getDegree()<r.getDegree()){var i=e;e=r,r=i}for(var a=this.field,o=e,s=r,l=a.getZero(),c=a.getOne();s.getDegree()>=(n/2|0);){var f=o,d=l;if(o=s,l=c,o.isZero())throw new wr("r_{i-1} was zero");s=f;for(var p=a.getZero(),h=o.getCoefficient(o.getDegree()),v=a.inverse(h);s.getDegree()>=o.getDegree()&&!s.isZero();){var g=s.getDegree()-o.getDegree(),y=a.multiply(s.getCoefficient(s.getDegree()),v);p=p.addOrSubtract(a.buildMonomial(g,y)),s=s.addOrSubtract(o.multiplyByMonomial(g,y))}if(c=p.multiply(l).addOrSubtract(d),s.getDegree()>=o.getDegree())throw new hr("Division algorithm failed to reduce polynomial?")}var _=c.getCoefficient(0);if(_===0)throw new wr("sigmaTilde(0) was zero");var m=a.inverse(_),E=c.multiplyScalar(m),w=s.multiplyScalar(m);return[E,w]},t.prototype.findErrorLocations=function(e){var r=e.getDegree();if(r===1)return Int32Array.from([e.getCoefficient(1)]);for(var n=new Int32Array(r),i=0,a=this.field,o=1;o<a.getSize()&&i<r;o++)e.evaluateAt(o)===0&&(n[i]=a.inverse(o),i++);if(i!==r)throw new wr("Error locator degree does not match number of roots");return n},t.prototype.findErrorMagnitudes=function(e,r){for(var n=r.length,i=new Int32Array(n),a=this.field,o=0;o<n;o++){for(var s=a.inverse(r[o]),l=1,c=0;c<n;c++)if(o!==c){var f=a.multiply(r[c],s),d=(f&1)===0?f|1:f&-2;l=a.multiply(l,d)}i[o]=a.multiply(e.evaluateAt(s),a.inverse(l)),a.getGeneratorBase()!==0&&(i[o]=a.multiply(i[o],s))}return i},t})(),ge;(function(t){t[t.UPPER=0]="UPPER",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.DIGIT=3]="DIGIT",t[t.PUNCT=4]="PUNCT",t[t.BINARY=5]="BINARY"})(ge||(ge={}));var mi=(function(){function t(){}return t.prototype.decode=function(e){this.ddata=e;var r=e.getBits(),n=this.extractBits(r),i=this.correctBits(n),a=t.convertBoolArrayToByteArray(i),o=t.getEncodedData(i),s=new Wr(a,o,null,null);return s.setNumBits(i.length),s},t.highLevelDecode=function(e){return this.getEncodedData(e)},t.getEncodedData=function(e){for(var r=e.length,n=ge.UPPER,i=ge.UPPER,a="",o=0;o<r;)if(i===ge.BINARY){if(r-o<5)break;var s=t.readCode(e,o,5);if(o+=5,s===0){if(r-o<11)break;s=t.readCode(e,o,11)+31,o+=11}for(var l=0;l<s;l++){if(r-o<8){o=r;break}var c=t.readCode(e,o,8);a+=re.castAsNonUtf8Char(c),o+=8}i=n}else{var f=i===ge.DIGIT?4:5;if(r-o<f)break;var c=t.readCode(e,o,f);o+=f;var d=t.getCharacter(i,c);d.startsWith("CTRL_")?(n=i,i=t.getTable(d.charAt(5)),d.charAt(6)==="L"&&(n=i)):(a+=d,i=n)}return a},t.getTable=function(e){switch(e){case"L":return ge.LOWER;case"P":return ge.PUNCT;case"M":return ge.MIXED;case"D":return ge.DIGIT;case"B":return ge.BINARY;case"U":default:return ge.UPPER}},t.getCharacter=function(e,r){switch(e){case ge.UPPER:return t.UPPER_TABLE[r];case ge.LOWER:return t.LOWER_TABLE[r];case ge.MIXED:return t.MIXED_TABLE[r];case ge.PUNCT:return t.PUNCT_TABLE[r];case ge.DIGIT:return t.DIGIT_TABLE[r];default:throw new hr("Bad table")}},t.prototype.correctBits=function(e){var r,n;this.ddata.getNbLayers()<=2?(n=6,r=Ne.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(n=8,r=Ne.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(n=10,r=Ne.AZTEC_DATA_10):(n=12,r=Ne.AZTEC_DATA_12);var i=this.ddata.getNbDatablocks(),a=e.length/n;if(a<i)throw new R;for(var o=e.length%n,s=new Int32Array(a),l=0;l<a;l++,o+=n)s[l]=t.readCode(e,o,n);try{var c=new Xr(r);c.decode(s,a-i)}catch(y){throw new R(y)}for(var f=(1<<n)-1,d=0,l=0;l<i;l++){var p=s[l];if(p===0||p===f)throw new R;(p===1||p===f-1)&&d++}for(var h=new Array(i*n-d),v=0,l=0;l<i;l++){var p=s[l];if(p===1||p===f-1)h.fill(p>1,v,v+n-1),v+=n-1;else for(var g=n-1;g>=0;--g)h[v++]=(p&1<<g)!==0}return h},t.prototype.extractBits=function(e){var r=this.ddata.isCompact(),n=this.ddata.getNbLayers(),i=(r?11:14)+n*4,a=new Int32Array(i),o=new Array(this.totalBitsInLayer(n,r));if(r)for(var s=0;s<a.length;s++)a[s]=s;else for(var l=i+1+2*G.truncDivision(G.truncDivision(i,2)-1,15),c=i/2,f=G.truncDivision(l,2),s=0;s<c;s++){var d=s+G.truncDivision(s,15);a[c-s-1]=f-d-1,a[c+s]=f+d+1}for(var s=0,p=0;s<n;s++){for(var h=(n-s)*4+(r?9:12),v=s*2,g=i-1-v,y=0;y<h;y++)for(var _=y*2,m=0;m<2;m++)o[p+_+m]=e.get(a[v+m],a[v+y]),o[p+2*h+_+m]=e.get(a[v+y],a[g-m]),o[p+4*h+_+m]=e.get(a[g-m],a[g-y]),o[p+6*h+_+m]=e.get(a[g-y],a[v+m]);p+=h*8}return o},t.readCode=function(e,r,n){for(var i=0,a=r;a<r+n;a++)i<<=1,e[a]&&(i|=1);return i},t.readByte=function(e,r){var n=e.length-r;return n>=8?t.readCode(e,r,8):t.readCode(e,r,n)<<8-n},t.convertBoolArrayToByteArray=function(e){for(var r=new Uint8Array((e.length+7)/8),n=0;n<r.length;n++)r[n]=t.readByte(e,8*n);return r},t.prototype.totalBitsInLayer=function(e,r){return((r?88:112)+16*e)*e},t.UPPER_TABLE=["CTRL_PS"," ","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","CTRL_LL","CTRL_ML","CTRL_DL","CTRL_BS"],t.LOWER_TABLE=["CTRL_PS"," ","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","CTRL_US","CTRL_ML","CTRL_DL","CTRL_BS"],t.MIXED_TABLE=["CTRL_PS"," ","\\1","\\2","\\3","\\4","\\5","\\6","\\7","\b"," ",`
12
+ `,io=["href","title"],ao={class:"dsg-avatar--image-wrapper",tabindex:"0",ref:"avatarImageWrapperEl"},oo=["src","alt"],so={key:1,class:"dsg-avatar--initials"},lo={class:"dsg-avatar--status"},uo={key:0,class:"dsg-avatar--activity"},co=["innerHTML"],fo={key:2,class:"dsg-avatar--logo"},ho=["src","alt"],vo={key:0,class:"dsg-avatar--info"},po={class:"dsg-avatar--title"},go={class:"dsg-avatar--subtext"},sr=u.defineComponent({__name:"DsgAvatar",props:{profileUri:{default:""},fullName:{default:""},size:{default:"md"},theme:{default:"activity"},isOnline:{type:Boolean,default:!1},uri:{default:()=>{}},classes:{default:""},companyLogoUri:{default:()=>{}},preventDefault:{type:Boolean,default:!1},title:{default:""},subText:{default:""},noFocus:{type:Boolean,default:!1}},emits:["avatar-clicked","before-change-status","after-change-status"],setup(t,{expose:e,emit:r}){const n=["dsg-avatar",`dsg-avatar--${t.size}`,`dsg-avatar--${t.theme}`,`dsg-avatar--${t.isOnline?"online":"offline"}`,`dsg-avatar--${t.title?.length?"has-info":"no-info"}`,`dsg-avatar--${t.uri?"has-link":"no-link"}`,`dsg-avatar--${t.noFocus?"no-focus":"focus"}`,`dsg-avatar--${["profile-photo","profile-photo-verified"].indexOf(t.theme)!==-1?"profile-photo":"non-profile-photo"}`,t.classes].join(" ");["profile-photo","profile-photo-verified"].indexOf(t.theme)!==-1&&(["sm","md","lg"].indexOf(t.size)===-1&&new M.DsgPropSyntaxWarning("DsgAvatar: The 'profile-photo' theme only supports the 'sm', 'md', and 'lg' sizes."),(t.fullName||t.title||t.subText)&&new M.DsgWarning("DsgAvatar: The 'profile-photo' theme will not display the 'title' or 'subText' props.")),t.theme==="logo"&&!t.companyLogoUri&&new M.DsgPropSyntaxWarning("DsgAvatar: The 'logo' theme requires a 'companyLogoUri' prop."),["activity","verified","logo"].indexOf(t.theme)!==-1&&t.title?.length&&t.subText?.length&&["xs","sm","md","lg","xl","2xl"].indexOf(t.size)===-1&&new M.DsgPropSyntaxWarning("DsgAvatar: The 'activity', 'verified', and 'logo' themes only support the 'xs', 'sm', 'md', 'lg', and 'xl' sizes when 'title' and 'subText' are provided."),t.theme==="tile"&&!t.title?.length&&!t.fullName&&new M.DsgPropSyntaxWarning("DsgAvatar: The 'tile' theme requires either 'title' or 'fullName' prop."),t.size==="xxs"&&(t.title?.length||t.subText?.length)&&new M.DsgPropSyntaxWarning("DsgAvatar: The 'xxs' size does not support the 'title' or 'subText' props.");const i=v=>{const h=v.split(" ");return(h[0].charAt(0)+h[h.length-1].charAt(0)).toUpperCase()},a=()=>t.fullName?"Avatar of "+t.fullName:"Avatar",o=r,s=u.ref(!1),l=v=>{o("before-change-status",s.value,v),s.value=v,o("after-change-status",s.value)},c=u.useTemplateRef("avatarImageWrapperEl"),f=v=>{t.preventDefault||(o("avatar-clicked",v),c.value&&!t.uri&&c.value.focus())};return e({setUserActiveStatus:l,toggleFocus:v=>{c.value&&(v?c.value.focus():c.value.blur())}}),(v,h)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(u.unref(n))},[u.createElementVNode("a",{class:"dsg-avatar--link",href:t.uri,title:a(),target:"_blank",ref:"avatarLink",onClick:f},[u.createElementVNode("div",ao,[u.renderSlot(v.$slots,"dsg-avatar--background",{},()=>[t.profileUri?(u.openBlock(),u.createElementBlock("img",{key:0,class:"dsg-avatar--profile-image",src:t.profileUri,alt:a()},null,8,oo)):u.createCommentVNode("",!0),!t.profileUri&&t.fullName?(u.openBlock(),u.createElementBlock("span",so,u.toDisplayString(i(t.fullName)),1)):u.createCommentVNode("",!0),!t.profileUri&&!t.fullName?(u.openBlock(),u.createBlock(M._sfc_main,{key:2,class:"dsg-avatar--user-icon",icon:"user-01",color:u.unref(Za.ColoursConfig).gray[600],size:t.size},null,8,["color","size"])):u.createCommentVNode("",!0)]),["tile"].indexOf(t.theme)===-1?u.renderSlot(v.$slots,"dsg-avatar--status",{key:0},()=>[u.createElementVNode("div",lo,[t.theme==="activity"&&t.isOnline?(u.openBlock(),u.createElementBlock("span",uo)):u.createCommentVNode("",!0),["verified","profile-photo-verified"].indexOf(t.theme)!==-1?(u.openBlock(),u.createElementBlock("span",{key:1,class:"dsg-avatar--verified",innerHTML:u.unref(no)},null,8,co)):u.createCommentVNode("",!0),t.theme==="logo"?(u.openBlock(),u.createElementBlock("span",fo,[u.createElementVNode("img",{src:t.companyLogoUri,alt:a(),class:"dsg-avatar--company-logo"},null,8,ho)])):u.createCommentVNode("",!0)])]):u.createCommentVNode("",!0)],512),t.title?.length||t.theme==="tile"&&(t.title?.length||t.fullName)?(u.openBlock(),u.createElementBlock("div",vo,[t.title?.length||t.theme==="tile"&&(t.title?.length||t.fullName)?u.renderSlot(v.$slots,"dsg-avatar--title",{key:0},()=>[u.createElementVNode("h3",po,u.toDisplayString(t.title?.length?t.title:t.fullName),1)]):u.createCommentVNode("",!0),t.subText?.length?u.renderSlot(v.$slots,"dsg-avatar--subtext",{key:1},()=>[u.createElementVNode("p",go,u.toDisplayString(t.subText),1)]):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)],8,io)],2))}}),dr={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},Dt={LIGHT:"light",DARK:"dark",COLORED:"colored",AUTO:"auto"},Ce={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},xo={BOUNCE:"bounce",SLIDE:"slide",FLIP:"flip",ZOOM:"zoom",NONE:"none"},yo={dangerouslyHTMLString:!1,multiple:!0,position:dr.TOP_RIGHT,autoClose:5e3,transition:"bounce",hideProgressBar:!1,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,className:"",bodyClassName:"",style:{},progressClassName:"",progressStyle:{},role:"alert",theme:"light"},mo={rtl:!1,newestOnTop:!1,toastClassName:""},Wi={...yo,...mo};Ce.DEFAULT;var Y=(t=>(t[t.COLLAPSE_DURATION=300]="COLLAPSE_DURATION",t[t.DEBOUNCE_DURATION=50]="DEBOUNCE_DURATION",t.CSS_NAMESPACE="Toastify",t))(Y||{}),xn=(t=>(t.ENTRANCE_ANIMATION_END="d",t))(xn||{});const wo={enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0},Eo={enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0},Ao={enter:"Toastify--animate Toastify__zoom-enter",exit:"Toastify--animate Toastify__zoom-exit"},_o={enter:"Toastify--animate Toastify__flip-enter",exit:"Toastify--animate Toastify__flip-exit"},Qn="Toastify--animate Toastify__none-enter";function Xi(t,e=!1){var r;let n=wo;if(!t||typeof t=="string")switch(t){case"flip":n=_o;break;case"zoom":n=Ao;break;case"slide":n=Eo;break}else n=t;if(e)n.enter=Qn;else if(n.enter===Qn){const i=(r=n.exit.split("__")[1])==null?void 0:r.split("-")[0];n.enter=`Toastify--animate Toastify__${i}-enter`}return n}function Co(t){return t.containerId||String(t.position)}const Vr="will-unmount";function bo(t=dr.TOP_RIGHT){return!!document.querySelector(`.${Y.CSS_NAMESPACE}__toast-container--${t}`)}function So(t=dr.TOP_RIGHT){return`${Y.CSS_NAMESPACE}__toast-container--${t}`}function Io(t,e,r=!1){const n=[`${Y.CSS_NAMESPACE}__toast-container`,`${Y.CSS_NAMESPACE}__toast-container--${t}`,r?`${Y.CSS_NAMESPACE}__toast-container--rtl`:null].filter(Boolean).join(" ");return Ot(e)?e({position:t,rtl:r,defaultClassName:n}):`${n} ${e||""}`}function Oo(t){var e;const{position:r,containerClassName:n,rtl:i=!1,style:a={}}=t,o=Y.CSS_NAMESPACE,s=So(r),l=document.querySelector(`.${o}`),c=document.querySelector(`.${s}`),f=!!c&&!((e=c.className)!=null&&e.includes(Vr)),d=l||document.createElement("div"),v=document.createElement("div");v.className=Io(r,n,i),v.dataset.testid=`${Y.CSS_NAMESPACE}__toast-container--${r}`,v.id=Co(t);for(const h in a)if(Object.prototype.hasOwnProperty.call(a,h)){const p=a[h];v.style[h]=p}return l||(d.className=Y.CSS_NAMESPACE,document.body.appendChild(d)),f||d.appendChild(v),v}function yn(t){var e,r,n;const i=typeof t=="string"?t:((e=t.currentTarget)==null?void 0:e.id)||((r=t.target)==null?void 0:r.id),a=document.getElementById(i);a&&a.removeEventListener("animationend",yn,!1);try{lr[i].unmount(),(n=document.getElementById(i))==null||n.remove(),delete lr[i],delete xe[i]}catch{}}const lr=u.reactive({});function To(t,e){const r=document.getElementById(String(e));r&&(lr[r.id]=t)}function mn(t,e=!0){const r=String(t);if(!lr[r])return;const n=document.getElementById(r);n&&n.classList.add(Vr),e?(Do(t),n&&n.addEventListener("animationend",yn,!1)):yn(r),Ye.items=Ye.items.filter(i=>i.containerId!==t)}function No(t){for(const e in lr)mn(e,t);Ye.items=[]}function Ki(t,e){const r=document.getElementById(t.toastId);if(r){let n=t;n={...n,...Xi(n.transition)};const i=n.appendPosition?`${n.exit}--${n.position}`:n.exit;r.className+=` ${i}`,e&&e(r)}}function Do(t){for(const e in xe)if(e===t)for(const r of xe[e]||[])Ki(r)}function Bo(t){const e=Bt().find(r=>r.toastId===t);return e?.containerId}function Vn(t){return document.getElementById(t)}function Ro(t){const e=Vn(t.containerId);return e&&e.classList.contains(Vr)}function Jn(t){var e;const r=u.isVNode(t.content)?u.toRaw(t.content.props):null;return r??u.toRaw((e=t.data)!=null?e:{})}function Po(t){return t?Ye.items.filter(e=>e.containerId===t).length>0:Ye.items.length>0}function ko(){if(Ye.items.length>0){const t=Ye.items.shift();br(t?.toastContent,t?.toastProps)}}const xe=u.reactive({}),Ye=u.reactive({items:[]});function Bt(){const t=u.toRaw(xe);return Object.values(t).reduce((e,r)=>[...e,...r],[])}function Mo(t){return Bt().find(e=>e.toastId===t)}function br(t,e={}){if(Ro(e)){const r=Vn(e.containerId);r&&r.addEventListener("animationend",wn.bind(null,t,e),!1)}else wn(t,e)}function wn(t,e={}){const r=Vn(e.containerId);r&&r.removeEventListener("animationend",wn.bind(null,t,e),!1);const n=xe[e.containerId]||[],i=n.length>0;if(!i&&!bo(e.position)){const a=Oo(e),o=u.createApp(rs,e);e.useHandler&&e.useHandler(o),o.mount(a),To(o,a.id)}i&&!e.updateId&&(e.position=n[0].position),u.nextTick(()=>{e.updateId?Re.update(e):Re.add(t,e)})}const Re={add(t,e){const{containerId:r=""}=e;r&&(xe[r]=xe[r]||[],xe[r].find(n=>n.toastId===e.toastId)||setTimeout(()=>{var n,i;e.newestOnTop?(n=xe[r])==null||n.unshift(e):(i=xe[r])==null||i.push(e),e.onOpen&&e.onOpen(Jn(e))},e.delay||0))},remove(t){if(t){const e=Bo(t);if(e){const r=xe[e];let n=r.find(i=>i.toastId===t);xe[e]=r.filter(i=>i.toastId!==t),!xe[e].length&&!Po(e)&&mn(e,!1),ko(),u.nextTick(()=>{n!=null&&n.onClose&&(n.onClose(Jn(n)),n=void 0)})}}},update(t={}){const{containerId:e=""}=t;if(e&&t.updateId){xe[e]=xe[e]||[];const r=xe[e].find(a=>a.toastId===t.toastId),n=r?.position!==t.position||r?.transition!==t.transition,i={...t,disabledEnterTransition:!n,updateId:void 0};Re.dismissForce(t?.toastId),setTimeout(()=>{ee(i.content,i)},t.delay||0)}},clear(t,e=!0){t?mn(t,e):No(e)},dismissCallback(t){var e;const r=(e=t.currentTarget)==null?void 0:e.id,n=document.getElementById(r);n&&(n.removeEventListener("animationend",Re.dismissCallback,!1),setTimeout(()=>{Re.remove(r)}))},dismiss(t){if(t){const e=Bt();for(const r of e)if(r.toastId===t){Ki(r,n=>{n.addEventListener("animationend",Re.dismissCallback,!1)});break}}},dismissForce(t){if(t){const e=Bt();for(const r of e)if(r.toastId===t){const n=document.getElementById(t);n&&(n.remove(),n.removeEventListener("animationend",Re.dismissCallback,!1),Re.remove(t));break}}}},Lo=u.reactive({useHandler:void 0}),ji=u.reactive({}),Rr=u.reactive({});function Yi(){return Math.random().toString(36).substring(2,9)}function Fo(t){return typeof t=="number"&&!isNaN(t)}function En(t){return typeof t=="string"}function Ot(t){return typeof t=="function"}function Ur(...t){return u.mergeProps(...t)}function Sr(t){return typeof t=="object"&&(!!(t!=null&&t.render)||!!(t!=null&&t.setup)||typeof t?.type=="object")}function Vo(t={}){ji[`${Y.CSS_NAMESPACE}-default-options`]=t}function Uo(){return ji[`${Y.CSS_NAMESPACE}-default-options`]||Wi}function $o(){const t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;return document.documentElement.classList.contains("dark")||t?"dark":"light"}var Ir=(t=>(t[t.Enter=0]="Enter",t[t.Exit=1]="Exit",t))(Ir||{});const Zi={containerId:{type:[String,Number],required:!1,default:""},clearOnUrlChange:{type:Boolean,required:!1,default:!0},disabledEnterTransition:{type:Boolean,required:!1,default:!1},dangerouslyHTMLString:{type:Boolean,required:!1,default:!1},multiple:{type:Boolean,required:!1,default:!0},limit:{type:Number,required:!1,default:void 0},position:{type:String,required:!1,default:dr.TOP_LEFT},bodyClassName:{type:String,required:!1,default:""},autoClose:{type:[Number,Boolean],required:!1,default:!1},closeButton:{type:[Boolean,Function,Object],required:!1,default:void 0},transition:{type:[String,Object],required:!1,default:"bounce"},hideProgressBar:{type:Boolean,required:!1,default:!1},pauseOnHover:{type:Boolean,required:!1,default:!0},pauseOnFocusLoss:{type:Boolean,required:!1,default:!0},closeOnClick:{type:Boolean,required:!1,default:!0},progress:{type:Number,required:!1,default:void 0},progressClassName:{type:String,required:!1,default:""},toastStyle:{type:Object,required:!1,default(){return{}}},progressStyle:{type:Object,required:!1,default(){return{}}},role:{type:String,required:!1,default:"alert"},theme:{type:String,required:!1,default:Dt.AUTO},content:{type:[String,Object,Function],required:!1,default:""},toastId:{type:[String,Number],required:!1,default:""},data:{type:[Object,String],required:!1,default(){return{}}},type:{type:String,required:!1,default:Ce.DEFAULT},icon:{type:[Boolean,String,Number,Object,Function],required:!1,default:void 0},delay:{type:Number,required:!1,default:void 0},onOpen:{type:Function,required:!1,default:void 0},onClose:{type:Function,required:!1,default:void 0},onClick:{type:Function,required:!1,default:void 0},isLoading:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},toastClassName:{type:String,required:!1,default:""},updateId:{type:[String,Number],required:!1,default:""},contentProps:{type:Object,required:!1,default:null},expandCustomProps:{type:Boolean,required:!1,default:!1}},Ho={autoClose:{type:[Number,Boolean],required:!0},isRunning:{type:Boolean,required:!1,default:void 0},type:{type:String,required:!1,default:Ce.DEFAULT},theme:{type:String,required:!1,default:Dt.AUTO},hide:{type:Boolean,required:!1,default:void 0},className:{type:[String,Function],required:!1,default:""},controlledProgress:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:void 0},isIn:{type:Boolean,required:!1,default:void 0},progress:{type:Number,required:!1,default:void 0},closeToast:{type:Function,required:!1,default:void 0}},Go=u.defineComponent({name:"ProgressBar",props:Ho,setup(t,{attrs:e}){const r=u.ref(),n=u.computed(()=>t.hide?"true":"false"),i=u.computed(()=>({...e.style||{},animationDuration:`${t.autoClose===!0?5e3:t.autoClose}ms`,animationPlayState:t.isRunning?"running":"paused",opacity:t.hide||t.autoClose===!1?0:1,transform:t.controlledProgress?`scaleX(${t.progress})`:"none"})),a=u.computed(()=>[`${Y.CSS_NAMESPACE}__progress-bar`,t.controlledProgress?`${Y.CSS_NAMESPACE}__progress-bar--controlled`:`${Y.CSS_NAMESPACE}__progress-bar--animated`,`${Y.CSS_NAMESPACE}__progress-bar-theme--${t.theme}`,`${Y.CSS_NAMESPACE}__progress-bar--${t.type}`,t.rtl?`${Y.CSS_NAMESPACE}__progress-bar--rtl`:null].filter(Boolean).join(" ")),o=u.computed(()=>`${a.value} ${e?.class||""}`),s=()=>{r.value&&(r.value.onanimationend=null,r.value.ontransitionend=null)},l=()=>{t.isIn&&t.closeToast&&t.autoClose!==!1&&(t.closeToast(),s())},c=u.computed(()=>t.controlledProgress?null:l),f=u.computed(()=>t.controlledProgress?l:null);return u.watchEffect(()=>{r.value&&(s(),r.value.onanimationend=c.value,r.value.ontransitionend=f.value)}),()=>u.createVNode("div",{ref:r,role:"progressbar","aria-hidden":n.value,"aria-label":"notification timer",class:o.value,style:i.value},null)}}),zo=u.defineComponent({name:"CloseButton",inheritAttrs:!1,props:{theme:{type:String,required:!1,default:Dt.AUTO},type:{type:String,required:!1,default:Dt.LIGHT},ariaLabel:{type:String,required:!1,default:"close"},closeToast:{type:Function,required:!1,default:void 0}},setup(t){return()=>u.createVNode("button",{class:`${Y.CSS_NAMESPACE}__close-button ${Y.CSS_NAMESPACE}__close-button--${t.theme}`,type:"button",onClick:e=>{e.stopPropagation(),t.closeToast&&t.closeToast(e)},"aria-label":t.ariaLabel},[u.createVNode("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},[u.createVNode("path",{"fill-rule":"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"},null)])])}}),$r=({theme:t,type:e,path:r,...n})=>u.createVNode("svg",u.mergeProps({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${e})`},n),[u.createVNode("path",{d:r},null)]);function Wo(t){return u.createVNode($r,u.mergeProps(t,{path:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}),null)}function Xo(t){return u.createVNode($r,u.mergeProps(t,{path:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}),null)}function Ko(t){return u.createVNode($r,u.mergeProps(t,{path:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}),null)}function jo(t){return u.createVNode($r,u.mergeProps(t,{path:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}),null)}function Yo(){return u.createVNode("div",{class:`${Y.CSS_NAMESPACE}__spinner`},null)}const Or={info:Xo,warning:Wo,success:Ko,error:jo,spinner:Yo},Zo=t=>t in Or;function qo({theme:t,type:e,isLoading:r,icon:n}){let i;const a=!!r||e==="loading",o={theme:t,type:e};if(a&&(n===void 0||typeof n=="boolean"))return Or.spinner();if(n!==!1){if(Sr(n))i=u.toRaw(n);else if(Ot(n)){const s=n;o.type=a?"loading":e,i=s(o),i=!i&&a?Or.spinner():i}else u.isVNode(n)?i=u.cloneVNode(n,o):En(n)||Fo(n)?i=n:Zo(e)&&(i=Or[e](o));return i}}const Qo=()=>{};function Jo(t,e,r=Y.COLLAPSE_DURATION){const{scrollHeight:n,style:i}=t,a=r;requestAnimationFrame(()=>{i.minHeight="initial",i.height=n+"px",i.transition=`all ${a}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(e,a)})})}function es(t){const e=u.ref(!1),r=u.ref(!1),n=u.ref(!1),i=u.ref(Ir.Enter),a=u.reactive({...t,appendPosition:t.appendPosition||!1,collapse:typeof t.collapse>"u"?!0:t.collapse,collapseDuration:t.collapseDuration||Y.COLLAPSE_DURATION}),o=a.done||Qo,s=u.computed(()=>a.appendPosition?`${a.enter}--${a.position}`:a.enter),l=u.computed(()=>a.appendPosition?`${a.exit}--${a.position}`:a.exit),c=u.computed(()=>t.pauseOnHover?{onMouseenter:y,onMouseleave:g}:{});function f(){const m=s.value.split(" ");v().addEventListener(xn.ENTRANCE_ANIMATION_END,g,{once:!0});const A=C=>{const b=v();C.target===b&&(b.dispatchEvent(new Event(xn.ENTRANCE_ANIMATION_END)),b.removeEventListener("animationend",A),b.removeEventListener("animationcancel",A),i.value===Ir.Enter&&C.type!=="animationcancel"&&b.classList.remove(...m))},E=()=>{const C=v();C.classList.add(...m),C.addEventListener("animationend",A),C.addEventListener("animationcancel",A)};t.pauseOnFocusLoss&&h(),E()}function d(){if(!v())return;const m=()=>{const E=v();E.removeEventListener("animationend",m),a.collapse?Jo(E,o,a.collapseDuration):o()},A=()=>{const E=v();i.value=Ir.Exit,E&&(E.className+=` ${l.value}`,E.addEventListener("animationend",m))};r.value||(n.value?m():setTimeout(A))}function v(){return t.toastRef.value}function h(){document.hasFocus()||y(),window.addEventListener("focus",g),window.addEventListener("blur",y)}function p(){window.removeEventListener("focus",g),window.removeEventListener("blur",y)}function g(){(!t.loading.value||t.isLoading===void 0)&&(e.value=!0)}function y(){e.value=!1}function w(m){m&&(m.stopPropagation(),m.preventDefault()),r.value=!1}return u.watchEffect(d),u.watchEffect(()=>{const m=Bt();r.value=m.findIndex(A=>A.toastId===a.toastId)>-1}),u.watchEffect(()=>{t.isLoading!==void 0&&(t.loading.value?y():g())}),u.onMounted(f),u.onUnmounted(()=>{t.pauseOnFocusLoss&&p()}),{isIn:r,isRunning:e,hideToast:w,eventHandlers:c}}const ts=u.defineComponent({name:"ToastItem",inheritAttrs:!1,props:Zi,setup(t){const e=u.ref(),r=u.computed(()=>!!t.isLoading),n=u.computed(()=>t.progress!==void 0&&t.progress!==null),i=u.computed(()=>qo(t)),a=u.computed(()=>[`${Y.CSS_NAMESPACE}__toast`,`${Y.CSS_NAMESPACE}__toast-theme--${t.theme}`,`${Y.CSS_NAMESPACE}__toast--${t.type}`,t.rtl?`${Y.CSS_NAMESPACE}__toast--rtl`:void 0,t.toastClassName||""].filter(Boolean).join(" ")),{isRunning:o,isIn:s,hideToast:l,eventHandlers:c}=es({toastRef:e,loading:r,done:()=>{Re.remove(t.toastId)},...Xi(t.transition,t.disabledEnterTransition),...t});return()=>u.createVNode("div",u.mergeProps({id:t.toastId,class:a.value,style:t.toastStyle||{},ref:e,"data-testid":`toast-item-${t.toastId}`,onClick:f=>{t.closeOnClick&&l(),t.onClick&&t.onClick(f)}},c.value),[u.createVNode("div",{role:t.role,"data-testid":"toast-body",class:`${Y.CSS_NAMESPACE}__toast-body ${t.bodyClassName||""}`},[i.value!=null&&u.createVNode("div",{"data-testid":`toast-icon-${t.type}`,class:[`${Y.CSS_NAMESPACE}__toast-icon`,t.isLoading?"":`${Y.CSS_NAMESPACE}--animate-icon ${Y.CSS_NAMESPACE}__zoom-enter`].join(" ")},[Sr(i.value)?u.h(u.toRaw(i.value),{theme:t.theme,type:t.type}):Ot(i.value)?i.value({theme:t.theme,type:t.type}):i.value]),u.createVNode("div",{"data-testid":"toast-content"},[Sr(t.content)?u.h(u.toRaw(t.content),{toastProps:u.toRaw(t),closeToast:l,data:t.data,...t.expandCustomProps?t.contentProps:{contentProps:t.contentProps||{}}}):Ot(t.content)?t.content({toastProps:u.toRaw(t),closeToast:l,data:t.data}):t.dangerouslyHTMLString?u.h("div",{innerHTML:t.content}):t.content])]),(t.closeButton===void 0||t.closeButton===!0)&&u.createVNode(zo,{theme:t.theme,closeToast:f=>{f.stopPropagation(),f.preventDefault(),l()}},null),Sr(t.closeButton)?u.h(u.toRaw(t.closeButton),{closeToast:l,type:t.type,theme:t.theme}):Ot(t.closeButton)?t.closeButton({closeToast:l,type:t.type,theme:t.theme}):null,u.createVNode(Go,{className:t.progressClassName,style:t.progressStyle,rtl:t.rtl,theme:t.theme,isIn:s.value,type:t.type,hide:t.hideProgressBar,isRunning:o.value,autoClose:t.autoClose,controlledProgress:n.value,progress:t.progress,closeToast:t.isLoading?void 0:l},null)])}});let ar=0;function qi(){typeof window>"u"||(ar&&window.cancelAnimationFrame(ar),ar=window.requestAnimationFrame(qi),Rr.lastUrl!==window.location.href&&(Rr.lastUrl=window.location.href,Re.clear()))}const rs=u.defineComponent({name:"ToastifyContainer",inheritAttrs:!1,props:Zi,setup(t){const e=u.computed(()=>t.containerId),r=u.computed(()=>xe[e.value]||[]),n=u.computed(()=>r.value.filter(i=>i.position===t.position));return u.onMounted(()=>{typeof window<"u"&&t.clearOnUrlChange&&window.requestAnimationFrame(qi)}),u.onUnmounted(()=>{typeof window<"u"&&ar&&(window.cancelAnimationFrame(ar),Rr.lastUrl="")}),()=>u.createVNode(u.Fragment,null,[n.value.map(i=>{const{toastId:a=""}=i;return u.createVNode(ts,u.mergeProps({key:a},i),null)})])}});let Kr=!1;const Qi={isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1};function Ji(){const t=[];return Bt().forEach(e=>{const r=document.getElementById(e.containerId);r&&!r.classList.contains(Vr)&&t.push(e)}),t}function ns(t){const e=Ji().length,r=t??0;return r>0&&e+Ye.items.length>=r}function is(t){ns(t.limit)&&!t.updateId&&Ye.items.push({toastId:t.toastId,containerId:t.containerId,toastContent:t.content,toastProps:t})}function dt(t,e,r={}){if(Kr)return;r=Ur(Uo(),{type:e},u.toRaw(r)),(!r.toastId||typeof r.toastId!="string"&&typeof r.toastId!="number")&&(r.toastId=Yi()),r={...r,...r.type==="loading"?Qi:{},content:t,containerId:r.containerId||String(r.position)};const n=Number(r?.progress);return!isNaN(n)&&n<0&&(r.progress=0),n>1&&(r.progress=1),r.theme==="auto"&&(r.theme=$o()),is(r),Rr.lastUrl=window.location.href,r.multiple?Ye.items.length?r.updateId&&br(t,r):br(t,r):(Kr=!0,ee.clearAll(void 0,!1),setTimeout(()=>{br(t,r)},0),setTimeout(()=>{Kr=!1},390)),r.toastId}const ee=(t,e)=>dt(t,Ce.DEFAULT,e);ee.info=(t,e)=>dt(t,Ce.DEFAULT,{...e,type:Ce.INFO});ee.error=(t,e)=>dt(t,Ce.DEFAULT,{...e,type:Ce.ERROR});ee.warning=(t,e)=>dt(t,Ce.DEFAULT,{...e,type:Ce.WARNING});ee.warn=ee.warning;ee.success=(t,e)=>dt(t,Ce.DEFAULT,{...e,type:Ce.SUCCESS});ee.loading=(t,e)=>dt(t,Ce.DEFAULT,Ur(e,Qi));ee.dark=(t,e)=>dt(t,Ce.DEFAULT,Ur(e,{theme:Dt.DARK}));ee.remove=t=>{t?Re.dismiss(t):Re.clear()};ee.clearAll=(t,e)=>{u.nextTick(()=>{Re.clear(t,e)})};ee.isActive=t=>{let e=!1;return e=Ji().findIndex(r=>r.toastId===t)>-1,e};ee.update=(t,e={})=>{setTimeout(()=>{const r=Mo(t);if(r){const n=u.toRaw(r),{content:i}=n,a={...n,...e,toastId:e.toastId||t,updateId:Yi()},o=a.render||i;delete a.render,dt(o,a.type,a)}},0)};ee.done=t=>{ee.update(t,{isLoading:!1,progress:1})};ee.promise=as;function as(t,{pending:e,error:r,success:n},i){var a,o,s;let l;const c={...i||{},autoClose:!1};e&&(l=En(e)?ee.loading(e,c):ee.loading(e.render,{...c,...e}));const f={autoClose:(a=i?.autoClose)!=null?a:!0,closeOnClick:(o=i?.closeOnClick)!=null?o:!0,closeButton:(s=i?.autoClose)!=null?s:null,isLoading:void 0,draggable:null,delay:100},d=(h,p,g)=>{if(p==null){ee.remove(l);return}const y={type:h,...f,...i,data:g},w=En(p)?{render:p}:p;return l?ee.update(l,{...y,...w,isLoading:!1}):ee(w.render,{...y,...w,isLoading:!1}),g},v=Ot(t)?t():t;return v.then(h=>{d("success",n,h)}).catch(h=>{d("error",r,h)}),v}ee.POSITION=dr;ee.THEME=Dt;ee.TYPE=Ce;ee.TRANSITIONS=xo;const os={install(t,e={}){Lo.useHandler=e.useHandler||(()=>{}),ss(e)}};typeof window<"u"&&(window.Vue3Toastify=os);function ss(t={}){const e=Ur(Wi,t);Vo(e)}const ls={class:"dsg-alert__wrapper"},us=["innerHTML"],ea=u.defineComponent({__name:"DsgAlertComponent",props:{contentProps:{default:()=>({title:"",message:"",type:"gray",hasCloseButton:!0,useToast:!0})}},setup(t){const e=["dsg-alert","dsg-alert--"+t.contentProps.type,t.contentProps.hasCloseButton?"dsg-alert--has-close":"dsg-alert--no-close"],n=u.useAttrs().closeToast,i=u.ref(!1),a=()=>{t.contentProps.useToast?n():i.value=!0};return(o,s)=>i.value?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("div",{key:0,class:u.normalizeClass(e)},[t.contentProps.type==="gray"?(u.openBlock(),u.createBlock(bt,{key:0,icon:{icon:"info-circle"},type:"outline",theme:"gray",size:"lg"})):u.createCommentVNode("",!0),t.contentProps.type==="error"?(u.openBlock(),u.createBlock(bt,{key:1,icon:{icon:"alert-circle"},type:"outline",theme:"error",size:"lg"})):u.createCommentVNode("",!0),t.contentProps.type==="warning"?(u.openBlock(),u.createBlock(bt,{key:2,icon:{icon:"alert-circle"},type:"outline",theme:"warning",size:"lg"})):u.createCommentVNode("",!0),t.contentProps.type==="success"?(u.openBlock(),u.createBlock(bt,{key:3,icon:{icon:"check-circle"},type:"outline",theme:"success",size:"lg"})):u.createCommentVNode("",!0),u.createElementVNode("div",ls,[u.createElementVNode("p",{class:u.normalizeClass(["dsg-alert__title",{"dsg-alert__title--with-close-button":t.contentProps.hasCloseButton}])},u.toDisplayString(t.contentProps.title),3),t.contentProps.message?(u.openBlock(),u.createElementBlock("p",{key:0,innerHTML:t.contentProps.message,class:"dsg-alert__message"},null,8,us)):u.createCommentVNode("",!0)]),t.contentProps.hasCloseButton?(u.openBlock(),u.createElementBlock("button",{key:4,onClick:a,class:"dsg-alert__close-button"},[u.createVNode(M._sfc_main,{icon:"x-close",size:"sm"})])):u.createCommentVNode("",!0)]))}}),cs=new class qt{info(e="",r="",n={}){qt.showToast("gray",e,r,n)}error(e="",r="",n={}){qt.showToast("error",e,r,n)}warning(e="",r="",n={}){qt.showToast("warning",e,r,n)}success(e="",r="",n={}){qt.showToast("success",e,r,n)}static showToast(e,r,n,i){const a={hasCloseButton:!1,position:"top-right",maxWidthClass:"",...i};ee(ea,{autoClose:!a.hasCloseButton,closeButton:!1,hideProgressBar:!0,closeOnClick:!a.hasCloseButton,position:a.position,containerClassName:`dsg-alert-container ${a.maxWidthClass}`,toastClassName:"dsg-alert",bodyClassName:"dsg-alert--body",contentProps:{title:r,message:n,type:e,hasCloseButton:a.hasCloseButton},onClick:()=>{}})}};function jr(t){return t===0?!1:Array.isArray(t)&&t.length===0?!0:!t}function fs(t){return(...e)=>!t(...e)}function ds(t,e){return t===void 0&&(t="undefined"),t===null&&(t="null"),t===!1&&(t="false"),t.toString().toLowerCase().indexOf(e.trim())!==-1}function hs(t){return t.filter(e=>!e.$isLabel)}function Yr(t,e){return r=>r.reduce((n,i)=>i[t]&&i[t].length?(n.push({$groupLabel:i[e],$isLabel:!0}),n.concat(i[t])):n,[])}const ei=(...t)=>e=>t.reduce((r,n)=>n(r),e);var vs={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(t,e){return jr(t)?"":e?t[e]:t}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1},filteringSortFunc:{type:Function,default:null}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const t=this.search||"",e=t.toLowerCase().trim();let r=this.options.concat();return this.internalSearch?r=this.groupValues?this.filterAndFlat(r,e,this.label):this.filterOptions(r,e,this.label,this.customLabel):r=this.groupValues?Yr(this.groupValues,this.groupLabel)(r):r,r=this.hideSelected?r.filter(fs(this.isSelected)):r,this.taggable&&e.length&&!this.isExistingOption(e)&&(this.tagPosition==="bottom"?r.push({isTag:!0,label:t}):r.unshift({isTag:!0,label:t})),r.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(t=>t[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(e=>this.customLabel(e,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(t,e,r){return ei(this.filterGroups(e,r,this.groupValues,this.groupLabel,this.customLabel),Yr(this.groupValues,this.groupLabel))(t)},flatAndStrip(t){return ei(Yr(this.groupValues,this.groupLabel),hs)(t)},updateSearch(t){this.search=t},isExistingOption(t){return this.options?this.optionKeys.indexOf(t)>-1:!1},isSelected(t){const e=this.trackBy?t[this.trackBy]:t;return this.valueKeys.indexOf(e)>-1},isOptionDisabled(t){return!!t.$isDisabled},getOptionLabel(t){if(jr(t))return"";if(t.isTag)return t.label;if(t.$isLabel)return t.$groupLabel;const e=this.customLabel(t,this.label);return jr(e)?"":e},select(t,e){if(t.$isLabel&&this.groupSelect){this.selectGroup(t);return}if(!(this.blockKeys.indexOf(e)!==-1||this.disabled||t.$isDisabled||t.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(e==="Tab"&&!this.pointerDirty)){if(t.isTag)this.$emit("tag",t.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(t)){e!=="Tab"&&this.removeElement(t);return}this.multiple?this.$emit("update:modelValue",this.internalValue.concat([t])):this.$emit("update:modelValue",t),this.$emit("select",t,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(t){const e=this.options.find(r=>r[this.groupLabel]===t.$groupLabel);if(e){if(this.wholeGroupSelected(e)){this.$emit("remove",e[this.groupValues],this.id);const r=this.trackBy?e[this.groupValues].map(i=>i[this.trackBy]):e[this.groupValues],n=this.internalValue.filter(i=>r.indexOf(this.trackBy?i[this.trackBy]:i)===-1);this.$emit("update:modelValue",n)}else{const r=e[this.groupValues].filter(n=>!(this.isOptionDisabled(n)||this.isSelected(n)));this.max&&r.splice(this.max-this.internalValue.length),this.$emit("select",r,this.id),this.$emit("update:modelValue",this.internalValue.concat(r))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(t){return t[this.groupValues].every(e=>this.isSelected(e)||this.isOptionDisabled(e))},wholeGroupDisabled(t){return t[this.groupValues].every(this.isOptionDisabled)},removeElement(t,e=!0){if(this.disabled||t.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const r=typeof t=="object"?this.valueKeys.indexOf(t[this.trackBy]):this.valueKeys.indexOf(t);if(this.multiple){const n=this.internalValue.slice(0,r).concat(this.internalValue.slice(r+1));this.$emit("update:modelValue",n)}else this.$emit("update:modelValue",null);this.$emit("remove",t,this.id),this.closeOnSelect&&e&&this.deactivate()},removeLastElement(){this.blockKeys.indexOf("Delete")===-1&&this.search.length===0&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&this.pointer===0&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||typeof this.$el<"u"&&this.$el.focus(),this.$emit("open",this.id))},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search!==null&&typeof this.$refs.search<"u"&&this.$refs.search.blur():typeof this.$el<"u"&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window>"u")return;const t=this.$el.getBoundingClientRect().top,e=window.innerHeight-this.$el.getBoundingClientRect().bottom;e>this.maxHeight||e>t||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(e-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(t-40,this.maxHeight))},filterOptions(t,e,r,n){return e?t.filter(i=>ds(n(i,r),e)).sort((i,a)=>typeof this.filteringSortFunc=="function"?this.filteringSortFunc(i,a):n(i,r).length-n(a,r).length):t},filterGroups(t,e,r,n,i){return a=>a.map(o=>{if(!o[r])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const s=this.filterOptions(o[r],t,e,i);return s.length?{[n]:o[n],[r]:s}:[]})}}},ps={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(t,e){return{"multiselect__option--highlight":t===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(e)}},groupHighlight(t,e){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":e.$isLabel}];const r=this.options.find(n=>n[this.groupLabel]===e.$groupLabel);return r&&!this.wholeGroupDisabled(r)?["multiselect__option--group",{"multiselect__option--highlight":t===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(r)}]:"multiselect__option--disabled"},addPointerElement({key:t}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],t),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list?.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list?.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(t){this.pointer=t,this.pointerDirty=!0}}},Un={name:"vue-multiselect",mixins:[vs,ps],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:t=>`and ${t} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},spellcheck:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0},required:{type:Boolean,default:!1},useTeleport:{type:Boolean,default:!1}},data(){return{dropdownStyles:{},ready:!1}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)},isRequired(){return this.required===!1?!1:this.internalValue.length<=0}},watch:{isOpen(t){t&&(this.useTeleport?(this.ready=!1,this.$nextTick(()=>{const e=this.$el.getBoundingClientRect();this.dropdownStyles={position:"absolute",top:`${e.bottom+window.scrollY}px`,left:`${e.left+window.scrollX}px`,width:`${e.width}px`,zIndex:9999},this.ready=!0})):this.ready=!0)}}};const gs=["tabindex","aria-expanded","aria-owns","aria-activedescendant"],xs={ref:"tags",class:"multiselect__tags"},ys={class:"multiselect__tags-wrap"},ms=["textContent"],ws=["onKeypress","onMousedown"],Es=["textContent"],As={class:"multiselect__spinner"},_s=["name","id","spellcheck","placeholder","required","value","disabled","tabindex","aria-label","aria-controls"],Cs=["id","aria-multiselectable"],bs={key:0},Ss={class:"multiselect__option"},Is=["aria-selected","id","role"],Os=["onClick","onMouseenter","data-select","data-selected","data-deselect"],Ts=["data-select","data-deselect","onMouseenter","onMousedown"],Ns={class:"multiselect__option"},Ds={class:"multiselect__option"};function Bs(t,e,r,n,i,a){return u.openBlock(),u.createElementBlock("div",{tabindex:t.searchable?-1:r.tabindex,class:u.normalizeClass([{"multiselect--active":t.isOpen,"multiselect--disabled":r.disabled,"multiselect--above":a.isAbove,"multiselect--has-options-group":a.hasOptionGroup},"multiselect"]),onFocus:e[14]||(e[14]=o=>t.activate()),onBlur:e[15]||(e[15]=o=>t.searchable?!1:t.deactivate()),onKeydown:[e[16]||(e[16]=u.withKeys(u.withModifiers(o=>t.pointerForward(),["self","prevent"]),["down"])),e[17]||(e[17]=u.withKeys(u.withModifiers(o=>t.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:e[18]||(e[18]=u.withKeys(u.withModifiers(o=>t.addPointerElement(o),["stop","self"]),["enter","tab"])),onKeyup:e[19]||(e[19]=u.withKeys(o=>t.deactivate(),["esc"])),role:"combobox","aria-expanded":t.isOpen,"aria-owns":"listbox-"+t.id,"aria-activedescendant":t.isOpen&&t.pointer!==null?t.id+"-"+t.pointer:null},[u.renderSlot(t.$slots,"caret",{toggle:t.toggle},()=>[u.createElementVNode("div",{onMousedown:e[0]||(e[0]=u.withModifiers(o=>t.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),u.renderSlot(t.$slots,"clear",{search:t.search}),u.createElementVNode("div",xs,[u.renderSlot(t.$slots,"selection",{search:t.search,remove:t.removeElement,values:a.visibleValues,isOpen:t.isOpen},()=>[u.withDirectives(u.createElementVNode("div",ys,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.visibleValues,(o,s)=>u.renderSlot(t.$slots,"tag",{option:o,search:t.search,remove:t.removeElement},()=>[(u.openBlock(),u.createElementBlock("span",{class:"multiselect__tag",key:s,onMousedown:e[1]||(e[1]=u.withModifiers(()=>{},["prevent"]))},[u.createElementVNode("span",{textContent:u.toDisplayString(t.getOptionLabel(o))},null,8,ms),u.createElementVNode("i",{tabindex:"1",onKeypress:u.withKeys(u.withModifiers(l=>t.removeElement(o),["prevent"]),["enter"]),onMousedown:u.withModifiers(l=>t.removeElement(o),["prevent"]),class:"multiselect__tag-icon"},null,40,ws)],32))])),256))],512),[[u.vShow,a.visibleValues.length>0]]),t.internalValue&&t.internalValue.length>r.limit?u.renderSlot(t.$slots,"limit",{key:0},()=>[u.createElementVNode("strong",{class:"multiselect__strong",textContent:u.toDisplayString(r.limitText(t.internalValue.length-r.limit))},null,8,Es)]):u.createCommentVNode("v-if",!0)]),u.createVNode(u.Transition,{name:"multiselect__loading"},{default:u.withCtx(()=>[u.renderSlot(t.$slots,"loading",{},()=>[u.withDirectives(u.createElementVNode("div",As,null,512),[[u.vShow,r.loading]])])]),_:3}),t.searchable?(u.openBlock(),u.createElementBlock("input",{key:0,ref:"search",name:r.name,id:t.id,type:"text",autocomplete:"off",spellcheck:r.spellcheck,placeholder:t.placeholder,required:a.isRequired,style:u.normalizeStyle(a.inputStyle),value:t.search,disabled:r.disabled,tabindex:r.tabindex,"aria-label":r.name+"-searchbox",onInput:e[2]||(e[2]=o=>t.updateSearch(o.target.value)),onFocus:e[3]||(e[3]=u.withModifiers(o=>t.activate(),["prevent"])),onBlur:e[4]||(e[4]=u.withModifiers(o=>t.deactivate(),["prevent"])),onKeyup:e[5]||(e[5]=u.withKeys(o=>t.deactivate(),["esc"])),onKeydown:[e[6]||(e[6]=u.withKeys(u.withModifiers(o=>t.pointerForward(),["prevent"]),["down"])),e[7]||(e[7]=u.withKeys(u.withModifiers(o=>t.pointerBackward(),["prevent"]),["up"])),e[9]||(e[9]=u.withKeys(u.withModifiers(o=>t.removeLastElement(),["stop"]),["delete"]))],onKeypress:e[8]||(e[8]=u.withKeys(u.withModifiers(o=>t.addPointerElement(o),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+t.id},null,44,_s)):u.createCommentVNode("v-if",!0),a.isSingleLabelVisible?(u.openBlock(),u.createElementBlock("span",{key:1,class:"multiselect__single",onMousedown:e[10]||(e[10]=u.withModifiers((...o)=>t.toggle&&t.toggle(...o),["prevent"]))},[u.renderSlot(t.$slots,"singleLabel",{option:a.singleValue},()=>[u.createTextVNode(u.toDisplayString(t.currentOptionLabel),1)])],32)):u.createCommentVNode("v-if",!0),a.isPlaceholderVisible?(u.openBlock(),u.createElementBlock("span",{key:2,class:"multiselect__placeholder",onMousedown:e[11]||(e[11]=u.withModifiers((...o)=>t.toggle&&t.toggle(...o),["prevent"]))},[u.renderSlot(t.$slots,"placeholder",{},()=>[u.createTextVNode(u.toDisplayString(t.placeholder),1)])],32)):u.createCommentVNode("v-if",!0)],512),(u.openBlock(),u.createBlock(u.Teleport,{to:"body",disabled:!r.useTeleport},[u.createVNode(u.Transition,{name:"multiselect"},{default:u.withCtx(()=>[t.isOpen&&i.ready?(u.openBlock(),u.createElementBlock("div",{key:0,class:"multiselect__content-wrapper",onFocus:e[12]||(e[12]=(...o)=>t.activate&&t.activate(...o)),tabindex:"-1",onMousedown:e[13]||(e[13]=u.withModifiers(()=>{},["prevent"])),style:u.normalizeStyle([i.dropdownStyles,{maxHeight:t.optimizedHeight+"px"}]),ref:"list"},[u.createElementVNode("ul",{class:"multiselect__content",style:u.normalizeStyle(a.contentStyle),role:"listbox",id:"listbox-"+t.id,"aria-multiselectable":t.multiple},[u.renderSlot(t.$slots,"beforeList"),t.multiple&&t.max===t.internalValue.length?(u.openBlock(),u.createElementBlock("li",bs,[u.createElementVNode("span",Ss,[u.renderSlot(t.$slots,"maxElements",{},()=>[u.createTextVNode("Maximum of "+u.toDisplayString(t.max)+" options selected. First remove a selected option to select another.",1)])])])):u.createCommentVNode("v-if",!0),!t.max||t.internalValue.length<t.max?(u.openBlock(!0),u.createElementBlock(u.Fragment,{key:1},u.renderList(t.filteredOptions,(o,s)=>(u.openBlock(),u.createElementBlock("li",{class:"multiselect__element",key:s,"aria-selected":t.isSelected(o),id:t.id+"-"+s,role:o&&(o.$isLabel||o.$isDisabled)?null:"option"},[o&&(o.$isLabel||o.$isDisabled)?u.createCommentVNode("v-if",!0):(u.openBlock(),u.createElementBlock("span",{key:0,class:u.normalizeClass([t.optionHighlight(s,o),"multiselect__option"]),onClick:u.withModifiers(l=>t.select(o),["stop"]),onMouseenter:u.withModifiers(l=>t.pointerSet(s),["self"]),"data-select":o&&o.isTag?t.tagPlaceholder:a.selectLabelText,"data-selected":a.selectedLabelText,"data-deselect":a.deselectLabelText},[u.renderSlot(t.$slots,"option",{option:o,search:t.search,index:s},()=>[u.createElementVNode("span",null,u.toDisplayString(t.getOptionLabel(o)),1)])],42,Os)),o&&(o.$isLabel||o.$isDisabled)?(u.openBlock(),u.createElementBlock("span",{key:1,"data-select":t.groupSelect&&a.selectGroupLabelText,"data-deselect":t.groupSelect&&a.deselectGroupLabelText,class:u.normalizeClass([t.groupHighlight(s,o),"multiselect__option"]),onMouseenter:u.withModifiers(l=>t.groupSelect&&t.pointerSet(s),["self"]),onMousedown:u.withModifiers(l=>t.selectGroup(o),["prevent"])},[u.renderSlot(t.$slots,"option",{option:o,search:t.search,index:s},()=>[u.createElementVNode("span",null,u.toDisplayString(t.getOptionLabel(o)),1)])],42,Ts)):u.createCommentVNode("v-if",!0)],8,Is))),128)):u.createCommentVNode("v-if",!0),u.withDirectives(u.createElementVNode("li",null,[u.createElementVNode("span",Ns,[u.renderSlot(t.$slots,"noResult",{search:t.search},()=>[e[20]||(e[20]=u.createTextVNode("No elements found. Consider changing the search query."))])])],512),[[u.vShow,r.showNoResults&&t.filteredOptions.length===0&&t.search&&!r.loading]]),u.withDirectives(u.createElementVNode("li",null,[u.createElementVNode("span",Ds,[u.renderSlot(t.$slots,"noOptions",{},()=>[e[21]||(e[21]=u.createTextVNode("List is empty."))])])],512),[[u.vShow,r.showNoOptions&&(t.options.length===0||a.hasOptionGroup===!0&&t.filteredOptions.length===0)&&!t.search&&!r.loading]]),u.renderSlot(t.$slots,"afterList")],12,Cs)],36)):u.createCommentVNode("v-if",!0)]),_:3})],8,["disabled"]))],42,gs)}Un.render=Bs;const Rs={class:"user-picker"},Ps={class:"user-option"},ks=["data-initials"],Ms=["src"],Ls={class:"meta"},Fs={class:"name"},Vs={key:0,class:"email"},Us={class:"tags"},$s=["data-initials"],Hs=["src"],Gs={key:0,class:"inline-block relative"},zs={class:"placeholder"},Ws={key:0,class:"single-display"},Xs=["data-initials"],Ks=["src"],js={key:0,class:"name"},Ys={class:"placeholder"},Zs=u.defineComponent({__name:"DsgIconSelect",props:{modelValue:{},options:{},endpoint:{},queryParam:{default:"q"},extraParams:{},method:{default:"GET"},minChars:{default:1},delay:{default:300},multiple:{type:Boolean,default:!1},trackBy:{default:"id"},labelKey:{default:"primaryText"},secondaryTextKey:{default:"secondaryText"},iconKey:{default:"iconUrl"},placeholder:{default:"Search..."},clearOnSelect:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},selectLabel:{default:""},selectedLabel:{default:""},hideSelectedLabel:{type:Boolean,default:!1}},emits:["update:modelValue","change","search","loaded","error"],setup(t,{emit:e}){const r=t,n=e,i=u.ref(r.options??[]),a=u.ref(!1),o=u.ref("");let s,l=null;u.watch(()=>r.options,g=>{g&&(i.value=[...g])});const c=(g,y)=>{if(g)return g[y]},f=g=>{if(!g)return"";const y=g.trim().split(/\s+/),w=y[0]?.[0]??"",m=y.length>1?y[y.length-1][0]??"":"";return(w+m).toUpperCase()};u.computed(()=>r.multiple?r.modelValue??[]:r.modelValue?[r.modelValue]:[]);const d=u.computed(()=>!!r.endpoint),v=async g=>{if(d.value&&!((g?.length??0)<r.minChars)){a.value=!0,l?.abort(),l=new AbortController;try{const y=new URL(r.endpoint);if(r.method==="GET"){y.searchParams.set(r.queryParam,g),r.extraParams&&Object.entries(r.extraParams).forEach(([A,E])=>y.searchParams.set(A,String(E)));const w=await fetch(y.toString(),{signal:l.signal});if(!w.ok)throw new Error(`Request failed: ${w.status}`);const m=await w.json();i.value=Array.isArray(m)?m:m?.items??[],n("loaded",i.value)}else{const w={[r.queryParam]:g,...r.extraParams??{}},m=await fetch(y.toString(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(w),signal:l.signal});if(!m.ok)throw new Error(`Request failed: ${m.status}`);const A=await m.json();i.value=Array.isArray(A)?A:A?.items??[],n("loaded",i.value)}}catch(y){y?.name!=="AbortError"&&(console.error(y),n("error",y))}finally{a.value=!1}}},h=g=>{o.value=g,n("search",g),d.value&&(window.clearTimeout(s),s=window.setTimeout(()=>v(g),r.delay))},p=g=>{n("update:modelValue",g),n("change",g)};return(g,y)=>(u.openBlock(),u.createElementBlock("div",Rs,[u.createVNode(u.unref(Un),{"model-value":t.modelValue,"onUpdate:modelValue":p,options:i.value,multiple:t.multiple,"track-by":t.trackBy,searchable:!0,"internal-search":!d.value,loading:a.value,"clear-on-select":!1,"close-on-select":!t.multiple,deselectLabel:"",placeholder:t.placeholder,disabled:t.disabled,label:"name","allow-empty":!0,onSearchChange:h,"select-label":t.selectLabel,"selected-label":t.selectedLabel,class:"user-picker__multiselect"},{option:u.withCtx(({option:w})=>[u.createElementVNode("div",Ps,[u.createElementVNode("div",{class:"avatar","data-initials":f(c(w,t.labelKey))},[c(w,t.iconKey)?(u.openBlock(),u.createElementBlock("img",{key:0,src:c(w,t.iconKey),alt:""},null,8,Ms)):u.createCommentVNode("",!0)],8,ks),u.createElementVNode("div",Ls,[u.createElementVNode("div",Fs,u.toDisplayString(c(w,t.labelKey)),1),w.secondaryText?(u.openBlock(),u.createElementBlock("div",Vs,u.toDisplayString(w.secondaryText),1)):u.createCommentVNode("",!0)])])]),selection:u.withCtx(({values:w,isOpen:m})=>[u.createElementVNode("div",Us,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(w,A=>(u.openBlock(),u.createElementBlock("div",{class:"avatar","data-initials":f(c(A,t.labelKey))},[c(A,t.iconKey)?(u.openBlock(),u.createElementBlock("img",{key:0,src:c(A,t.iconKey),alt:""},null,8,Hs)):u.createCommentVNode("",!0)],8,$s))),256)),t.multiple&&w.length>0?(u.openBlock(),u.createElementBlock("div",Gs,[u.createElementVNode("div",zs,[u.createVNode(M._sfc_main,{icon:"plus",size:"xs"})])])):u.createCommentVNode("",!0)])]),singleLabel:u.withCtx(({option:w})=>[w?(u.openBlock(),u.createElementBlock("div",Ws,[u.createElementVNode("div",{class:"avatar","data-initials":f(c(w,t.labelKey))},[c(w,t.iconKey)?(u.openBlock(),u.createElementBlock("img",{key:0,src:c(w,t.iconKey),alt:""},null,8,Ks)):u.createCommentVNode("",!0)],8,Xs),t.hideSelectedLabel?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("span",js,u.toDisplayString(c(w,t.labelKey)),1))])):u.createCommentVNode("",!0)]),placeholder:u.withCtx(()=>[u.createElementVNode("div",Ys,[u.createVNode(M._sfc_main,{icon:"plus",size:"xs"})])]),noResult:u.withCtx(()=>[...y[0]||(y[0]=[u.createElementVNode("div",{class:"empty"},"No results found.",-1)])]),_:1},8,["model-value","options","multiple","track-by","internal-search","loading","close-on-select","placeholder","disabled","select-label","selected-label"])]))}}),qs=Lt(Zs,[["__scopeId","data-v-3ede6fde"]]),Qs={class:"dsg-badge--before"},Js={key:2,class:"dsg-badge--dot"},el={key:1,class:"dsg-badge--label"},tl={class:"dsg-badge--after"},rl={key:1,class:"dsg-badge--close-wrapper"},ta=u.defineComponent({__name:"DsgBadge",props:{label:{default:""},classes:{default:""},type:{default:"standard"},size:{default:"md"},hasClose:{type:Boolean,default:!1},avatarUri:{default:""},iconBefore:{default:""},icon:{default:""},iconAfter:{default:""},iconOnly:{type:Boolean,default:!1},hasDot:{type:Boolean,default:!1},theme:{default:"badge-modern"},themeColor:{default:"gray"},destroyOnClose:{type:Boolean,default:!1}},emits:["before-hide","after-hide","before-destroy","after-destroy","on-click"],setup(t,{expose:e,emit:r}){const n=t.iconBefore||t.iconAfter||t.type==="add"||t.type==="icon-only",i=["dsg-badge",`dsg-badge--${t.size}`,`dsg-badge--${t.type}`,`dsg-badge--${t.theme}`,`dsg-badge--${t.themeColor}`,`dsg-badge--${t.iconOnly?"icon-only":"label"}`,`${t.hasClose?"dsg-badge--has-close":""}`,`${t.avatarUri?"dsg-badge--has-avatar":""}`,`${t.hasDot?"dsg-badge--has-dot":""}`,`${n?"dsg-badge--has-icon":""}`,`${t.iconBefore?"dsg-badge--has-icon-before":""}`,`${t.iconAfter?"dsg-badge--has-icon-after":""}`,t.classes].join(" ").replaceAll(/\s+/g," ").trim();(t.type==="add"||t.type==="icon-only")&&(t.label||t.avatarUri||t.hasDot||t.iconBefore||t.iconAfter||t.hasClose)&&t.theme!=="badge-modern"&&t.themeColor&&new M.DsgPropSyntaxWarning("DsgBadge: 'add'/'icon-only' type badges should only be called with 'size', 'theme' and 'themeColor' props. Note that 'themeColor' prop is discarded for theme 'badge-modern'."),[t.avatarUri,t.iconBefore,t.hasDot].filter(Boolean).length>1&&new M.DsgPropSyntaxWarning("DsgBadge: 'avatarUri', 'iconBefore' and 'hasDot' props are mutually exclusive. Please use only one of them."),[t.iconAfter,t.hasClose].filter(Boolean).length>1&&new M.DsgPropSyntaxWarning("DsgBadge: 'iconAfter' and 'hasClose' props are mutually exclusive. Please use only one of them.");const s=r,l=u.useTemplateRef("dsgBadge"),c=d=>{t.destroyOnClose?(s("before-destroy",l.value),l.value?.remove(),s("after-destroy")):(s("before-hide",l.value),l.value&&(l.value.style.display="none"),s("after-hide",l.value))},f=d=>{s("on-click",l.value)};return e({hideOrDestroy:c,clickEvent:f}),(d,v)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(u.unref(i)),ref:"dsgBadge",onClick:f},[t.type==="standard"?u.renderSlot(d.$slots,"dsg-badge--before",{key:0},()=>[u.createElementVNode("div",Qs,[t.avatarUri?(u.openBlock(),u.createBlock(sr,{key:0,"profile-uri":t.avatarUri,class:"dsg-badge--avatar",size:"xxs"},null,8,["profile-uri"])):u.createCommentVNode("",!0),t.iconBefore?(u.openBlock(),u.createBlock(M._sfc_main,{key:1,icon:t.iconBefore,size:"xxs",class:"dsg-badge--icon-before dsg-badge--icon"},null,8,["icon"])):u.createCommentVNode("",!0),t.hasDot?(u.openBlock(),u.createElementBlock("span",Js)):u.createCommentVNode("",!0)])]):u.createCommentVNode("",!0),t.type==="standard"?(u.openBlock(),u.createElementBlock("label",el,u.toDisplayString(t.label),1)):u.createCommentVNode("",!0),t.type==="add"?(u.openBlock(),u.createBlock(M._sfc_main,{key:2,icon:"plus",size:"xxs",class:"dsg-badge--icon-add dsg-badge--icon"})):u.createCommentVNode("",!0),t.type==="icon-only"?(u.openBlock(),u.createBlock(M._sfc_main,{key:3,icon:t.icon,size:"xxs",class:"dsg-badge--icon-only dsg-badge--icon"},null,8,["icon"])):u.createCommentVNode("",!0),t.type==="standard"?u.renderSlot(d.$slots,"dsg-badge--after",{key:4},()=>[u.createElementVNode("div",tl,[t.iconAfter?(u.openBlock(),u.createBlock(M._sfc_main,{key:0,icon:t.iconAfter,size:"xxs",class:"dsg-badge--icon-after dsg-badge--icon"},null,8,["icon"])):u.createCommentVNode("",!0),t.hasClose?(u.openBlock(),u.createElementBlock("span",rl,[t.hasClose?(u.openBlock(),u.createBlock(M._sfc_main,{key:0,icon:"x-close",class:"dsg-badge--close",size:"xxs",onClick:c})):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)])]):u.createCommentVNode("",!0)],2))}}),nl={class:"dsg-input-number--control"},il=["disabled"],al=["value","disabled"],ol=["disabled"],sl={key:0,class:"dsg-input-number--label"},ll=u.defineComponent({__name:"DsgInputNumber",props:{modelValue:{},disabled:{type:Boolean},label:{},step:{}},emits:["update:modelValue"],setup(t,{emit:e}){const r=t,n=e,i=()=>{r.disabled||n("update:modelValue",r.modelValue+(r.step??1))},a=()=>{r.disabled||n("update:modelValue",r.modelValue-(r.step??1))},o=s=>{if(r.disabled)return;const l=s.target;n("update:modelValue",Number(l.value))};return(s,l)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-input-number",{"dsg-input-number--disabled":r.disabled}])},[u.createElementVNode("div",nl,[u.createElementVNode("button",{type:"button",onClick:a,disabled:r.disabled,class:"dsg-input-number--btn dsg-input-number--decrement"},[r.disabled?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(M._sfc_main,{key:0,icon:"minus",size:"sm"}))],8,il),u.createElementVNode("input",{type:"number",value:t.modelValue,onInput:o,disabled:r.disabled,class:"dsg-input-number--input flex-1"},null,40,al),u.createElementVNode("button",{type:"button",disabled:r.disabled,onClick:i,class:"dsg-input-number--btn dsg-input-number--increment"},[r.disabled?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(M._sfc_main,{key:0,icon:"plus",size:"sm"}))],8,ol)]),t.label!==void 0||s.$slots.label?(u.openBlock(),u.createElementBlock("div",sl,[u.renderSlot(s.$slots,"label",{},()=>[u.createTextVNode(u.toDisplayString(t.label),1)])])):u.createCommentVNode("",!0)],2))}}),ul={key:0,class:"dsg-checkbox-group--form-wrapper"},cl={class:"dsg-checkbox-group--header"},fl={class:"dsg-checkbox-group--header-title-wrapper"},dl={class:"dsg-checkbox-group--title"},hl=["innerHTML"],vl={class:"dsg-checkbox-group--options"},pl=["onClick"],gl=["textContent"],xl=["innerHTML","data"],yl=u.defineComponent({__name:"DsgCheckboxGroup",props:u.mergeModels({size:{default:"md"},theme:{default:"form"},title:{default:""},subtext:{default:""},options:{default:()=>[]},tooltip:{default:null},defaultValue:{type:[String,Number,Boolean,Array,null],default:()=>[]}},{modelValue:{type:[String,Number,Boolean,Array,null],default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=u.useModel(t,"modelValue"),r=["dsg-checkbox-group",`dsg-checkbox-group--${t.size}`,`dsg-checkbox-group--theme-${t.theme}`],n=(i,a)=>{i.target instanceof HTMLAnchorElement||(e.value=a.value)};return(i,a)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(r)},[["form","form-radio"].includes(t.theme)?(u.openBlock(),u.createElementBlock("div",ul,[u.createElementVNode("div",cl,[u.renderSlot(i.$slots,"dsg-checkbox-group--header",{},()=>[u.createElementVNode("div",fl,[u.createElementVNode("h3",dl,u.toDisplayString(t.title),1),t.tooltip?(u.openBlock(),u.createBlock(M._sfc_main$1,{key:0,label:t.tooltip,position:"top",triggers:["hover"],"auto-hide":!0,theme:"dark",class:"dsg-checkbox-group--tooltip"},null,8,["label"])):u.createCommentVNode("",!0)]),t.subtext?(u.openBlock(),u.createElementBlock("p",{key:0,class:"dsg-checkbox-group--subtext",innerHTML:t.subtext},null,8,hl)):u.createCommentVNode("",!0)])]),u.createElementVNode("div",vl,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(t.options,(o,s)=>(u.openBlock(),u.createElementBlock("div",{key:s,class:"dsg-checkbox-group--option"},[u.createVNode(M._sfc_main$2,{label:o.label,value:o.value,disabled:o.disabled,size:"sm",type:["form","panel"].includes(t.theme)?"checkbox":"radio",modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=l=>e.value=l)},null,8,["label","value","disabled","type","modelValue"])]))),128))])])):u.createCommentVNode("",!0),["panel","panel-content"].includes(t.theme)?(u.openBlock(!0),u.createElementBlock(u.Fragment,{key:1},u.renderList(t.options,(o,s)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-checkbox-group--panel",`dsg-checkbox-group--panel-${e.value===o.value?"selected":"unselected"}`]),onClick:l=>n(l,o)},[(u.openBlock(),u.createElementBlock("div",{class:"dsg-checkbox-group--panel-left",key:s},[u.renderSlot(i.$slots,`dsg-checkbox-group--panel-title--${String(o.value).trim().toLowerCase().replace(/[^0-9a-zA-Z]/g,"-").replace(/-+/g,"-")}`,{data:o},()=>[o.icon?(u.openBlock(),u.createBlock(M._sfc_main,{key:0,icon:o.icon,size:"xl"},null,8,["icon"])):u.createCommentVNode("",!0),u.createElementVNode("h3",{class:"dsg-checkbox-group--panel-title",textContent:u.toDisplayString(o.label)},null,8,gl)]),u.renderSlot(i.$slots,`dsg-checkbox-group--panel-subtext--${String(o.value).trim().toLowerCase().replace(/[^0-9a-zA-Z]/g,"-").replace(/-+/g,"-")}`,{},()=>[o.subtext?(u.openBlock(),u.createElementBlock("p",{key:0,class:"dsg-checkbox-group--panel-subtext",innerHTML:o.subtext,data:o},null,8,xl)):u.createCommentVNode("",!0)])])),(u.openBlock(),u.createElementBlock("div",{key:s,class:"dsg-checkbox-group--panel-right"},[u.createVNode(M._sfc_main$2,{value:o.value,disabled:o.disabled,type:"radio",modelValue:e.value,"onUpdate:modelValue":a[1]||(a[1]=l=>e.value=l)},null,8,["value","disabled","modelValue"])]))],10,pl))),256)):u.createCommentVNode("",!0)]))}});var ml="2.0.5",An=500,ti="user-agent",Rt="",ri="?",Pr="function",lt="undefined",Pt="object",_n="string",Ie="browser",Qe="cpu",We="device",Ve="engine",ke="os",Tt="result",D="name",S="type",N="vendor",B="version",Oe="architecture",ur="major",T="model",Qt="console",$="mobile",q="tablet",ue="smarttv",Ge="wearable",pr="xr",Jt="embedded",Et="inapp",$n="brands",yt="formFactors",Hn="fullVersionList",Nt="platform",Gn="platformVersion",Hr="bitness",ht="sec-ch-ua",wl=ht+"-full-version-list",El=ht+"-arch",Al=ht+"-"+Hr,_l=ht+"-form-factors",Cl=ht+"-"+$,bl=ht+"-"+T,ra=ht+"-"+Nt,Sl=ra+"-version",na=[$n,Hn,$,T,Nt,Gn,Oe,yt,Hr],gr="Amazon",At="Apple",ni="ASUS",ii="BlackBerry",vt="Google",ai="Huawei",Zr="Lenovo",oi="Honor",xr="LG",qr="Microsoft",Qr="Motorola",Jr="Nvidia",si="OnePlus",en="OPPO",$t="Samsung",li="Sharp",Ht="Sony",tn="Xiaomi",rn="Zebra",ui="Chrome",ci="Chromium",nt="Chromecast",Tr="Edge",Gt="Firefox",zt="Opera",nn="Facebook",fi="Sogou",_t="Mobile ",Wt=" Browser",Cn="Windows",Il=typeof window!==lt,Te=Il&&window.navigator?window.navigator:void 0,st=Te&&Te.userAgentData?Te.userAgentData:void 0,Ol=function(t,e){var r={},n=e;if(!kr(e)){n={};for(var i in e)for(var a in e[i])n[a]=e[i][a].concat(n[a]?n[a]:[])}for(var o in t)r[o]=n[o]&&n[o].length%2===0?n[o].concat(t[o]):t[o];return r},Gr=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},bn=function(t,e){if(typeof t===Pt&&t.length>0){for(var r in t)if(ut(e)==ut(t[r]))return!0;return!1}return Ft(t)?ut(e)==ut(t):!1},kr=function(t,e){for(var r in t)return/^(browser|cpu|device|engine|os)$/.test(r)||(e?kr(t[r]):!1)},Ft=function(t){return typeof t===_n},an=function(t){if(t){for(var e=[],r=kt(/\\?\"/g,t).split(","),n=0;n<r.length;n++)if(r[n].indexOf(";")>-1){var i=Mr(r[n]).split(";v=");e[n]={brand:i[0],version:i[1]}}else e[n]=Mr(r[n]);return e}},ut=function(t){return Ft(t)?t.toLowerCase():t},on=function(t){return Ft(t)?kt(/[^\d\.]/g,t).split(".")[0]:void 0},Je=function(t){for(var e in t)if(t.hasOwnProperty(e)){var r=t[e];typeof r==Pt&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this},kt=function(t,e){return Ft(e)?e.replace(t,Rt):e},Xt=function(t){return kt(/\\?\"/g,t)},Mr=function(t,e){if(Ft(t))return t=kt(/^\s\s*/,t),typeof e===lt?t:t.substring(0,An)},sn=function(t,e){if(!(!t||!e))for(var r=0,n,i,a,o,s,l;r<e.length&&!s;){var c=e[r],f=e[r+1];for(n=i=0;n<c.length&&!s&&c[n];)if(s=c[n++].exec(t),s)for(a=0;a<f.length;a++)l=s[++i],o=f[a],typeof o===Pt&&o.length>0?o.length===2?typeof o[1]==Pr?this[o[0]]=o[1].call(this,l):this[o[0]]=o[1]:o.length>=3&&(typeof o[1]===Pr&&!(o[1].exec&&o[1].test)?o.length>3?this[o[0]]=l?o[1].apply(this,o.slice(2)):void 0:this[o[0]]=l?o[1].call(this,l,o[2]):void 0:o.length==3?this[o[0]]=l?l.replace(o[1],o[2]):void 0:o.length==4?this[o[0]]=l?o[3].call(this,l.replace(o[1],o[2])):void 0:o.length>4&&(this[o[0]]=l?o[3].apply(this,[l.replace(o[1],o[2])].concat(o.slice(4))):void 0)):this[o]=l||void 0;r+=2}},ze=function(t,e){for(var r in e)if(typeof e[r]===Pt&&e[r].length>0){for(var n=0;n<e[r].length;n++)if(bn(e[r][n],t))return r===ri?void 0:r}else if(bn(e[r],t))return r===ri?void 0:r;return e.hasOwnProperty("*")?e["*"]:t},di={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},hi={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Tl={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},vi={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[B,[D,_t+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[B,[D,Tr+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[B,[D,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[D,B],[/opios[\/ ]+([\w\.]+)/i],[B,[D,zt+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[B,[D,zt+" GX"]],[/\bopr\/([\w\.]+)/i],[B,[D,zt]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[B,[D,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[B,[D,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[D,B],[/quark(?:pc)?\/([-\w\.]+)/i],[B,[D,"Quark"]],[/\bddg\/([\w\.]+)/i],[B,[D,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[B,[D,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[B,[D,"WeChat"]],[/konqueror\/([\w\.]+)/i],[B,[D,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[B,[D,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[B,[D,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[B,[D,"Smart "+Zr+Wt]],[/(avast|avg)\/([\w\.]+)/i],[[D,/(.+)/,"$1 Secure"+Wt],B],[/\bfocus\/([\w\.]+)/i],[B,[D,Gt+" Focus"]],[/\bopt\/([\w\.]+)/i],[B,[D,zt+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[B,[D,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[B,[D,"Dolphin"]],[/coast\/([\w\.]+)/i],[B,[D,zt+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[B,[D,"MIUI"+Wt]],[/fxios\/([\w\.-]+)/i],[B,[D,_t+Gt]],[/\bqihoobrowser\/?([\w\.]*)/i],[B,[D,"360"]],[/\b(qq)\/([\w\.]+)/i],[[D,/(.+)/,"$1Browser"],B],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[D,/(.+)/,"$1"+Wt],B],[/samsungbrowser\/([\w\.]+)/i],[B,[D,$t+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[B,[D,fi+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[D,fi+" Mobile"],B],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[D,B],[/(lbbrowser|rekonq)/i],[D],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[B,D],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[D,nn],B,[S,Et]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[D,B,[S,Et]],[/\bgsa\/([\w\.]+) .*safari\//i],[B,[D,"GSA"],[S,Et]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[B,[D,"TikTok"],[S,Et]],[/\[(linkedin)app\]/i],[D,[S,Et]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[D,/(.+)/,"Zalo"],B,[S,Et]],[/(chromium)[\/ ]([-\w\.]+)/i],[D,B],[/headlesschrome(?:\/([\w\.]+)| )/i],[B,[D,ui+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[B,[D,Tr+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[D,ui+" WebView"],B],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[B,[D,"Android"+Wt]],[/chrome\/([\w\.]+) mobile/i],[B,[D,_t+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[D,B],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[B,[D,_t+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[D,_t+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[B,D],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[D,[B,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[D,B],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[D,_t+Gt],B],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[D,"Netscape"],B],[/(wolvic|librewolf)\/([\w\.]+)/i],[D,B],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[B,[D,Gt+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[D,[B,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[D,[B,/[^\d\.]+./,Rt]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Oe,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Oe,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Oe,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Oe,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Oe,"arm"]],[/ sun4\w[;\)]/i],[[Oe,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[Oe,/ower/,Rt,ut]],[/winnt.+\[axp/i],[[Oe,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[T,[N,$t],[S,q]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[T,[N,$t],[S,$]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[T,[N,At],[S,$]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[T,[N,At],[S,q]],[/(macintosh);/i],[T,[N,At]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[T,[N,li],[S,$]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[T,[N,oi],[S,q]],[/honor([-\w ]+)[;\)]/i],[T,[N,oi],[S,$]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[T,[N,ai],[S,q]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[T,[N,ai],[S,$]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[T,/_/g," "],[N,tn],[S,q]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[T,/_/g," "],[N,tn],[S,$]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[T,[N,si],[S,$]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[T,[N,en],[S,$]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[T,[N,ze,{OnePlus:["203","304","403","404","413","415"],"*":en}],[S,q]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[T,[N,"BLU"],[S,$]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[T,[N,"Vivo"],[S,$]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[T,[N,"Realme"],[S,$]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[T,[N,Zr],[S,q]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[T,[N,Zr],[S,$]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[T,[N,Qr],[S,$]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[T,[N,Qr],[S,q]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[T,[N,xr],[S,q]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[T,[N,xr],[S,$]],[/(nokia) (t[12][01])/i],[N,T,[S,q]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[T,/_/g," "],[S,$],[N,"Nokia"]],[/(pixel (c|tablet))\b/i],[T,[N,vt],[S,q]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[T,[N,vt],[S,$]],[/(google) (pixelbook( go)?)/i],[N,T],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[T,[N,Ht],[S,$]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[T,"Xperia Tablet"],[N,Ht],[S,q]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[T,[N,gr],[S,q]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[T,/(.+)/g,"Fire Phone $1"],[N,gr],[S,$]],[/(playbook);[-\w\),; ]+(rim)/i],[T,N,[S,q]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[T,[N,ii],[S,$]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[T,[N,ni],[S,q]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[T,[N,ni],[S,$]],[/(nexus 9)/i],[T,[N,"HTC"],[S,q]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[N,[T,/_/g," "],[S,$]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[T,[N,"TCL"],[S,q]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[T,[N,"TCL"],[S,$]],[/(itel) ((\w+))/i],[[N,ut],T,[S,ze,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[T,[N,"Acer"],[S,q]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[T,[N,"Meizu"],[S,$]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[T,[N,"Ulefone"],[S,$]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[T,[N,"Energizer"],[S,$]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[T,[N,"Cat"],[S,$]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[T,[N,"Smartfren"],[S,$]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[T,[N,"Nothing"],[S,$]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[T,[N,"Archos"],[S,q]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[T,[N,"Archos"],[S,$]],[/; (n159v)/i],[T,[N,"HMD"],[S,$]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[N,T,[S,q]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[N,T,[S,$]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[N,T,[S,q]],[/(surface duo)/i],[T,[N,qr],[S,q]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[T,[N,"Fairphone"],[S,$]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[T,[N,Jr],[S,q]],[/(sprint) (\w+)/i],[N,T,[S,$]],[/(kin\.[onetw]{3})/i],[[T,/\./g," "],[N,qr],[S,$]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[T,[N,rn],[S,q]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[T,[N,rn],[S,$]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[N,[S,ue]],[/hbbtv.+maple;(\d+)/i],[[T,/^/,"SmartTV"],[N,$t],[S,ue]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[N,T,[S,ue]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[N,xr],[S,ue]],[/(apple) ?tv/i],[N,[T,At+" TV"],[S,ue]],[/crkey.*devicetype\/chromecast/i],[[T,nt+" Third Generation"],[N,vt],[S,ue]],[/crkey.*devicetype\/([^/]*)/i],[[T,/^/,"Chromecast "],[N,vt],[S,ue]],[/fuchsia.*crkey/i],[[T,nt+" Nest Hub"],[N,vt],[S,ue]],[/crkey/i],[[T,nt],[N,vt],[S,ue]],[/(portaltv)/i],[T,[N,nn],[S,ue]],[/droid.+aft(\w+)( bui|\))/i],[T,[N,gr],[S,ue]],[/(shield \w+ tv)/i],[T,[N,Jr],[S,ue]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[T,[N,li],[S,ue]],[/(bravia[\w ]+)( bui|\))/i],[T,[N,Ht],[S,ue]],[/(mi(tv|box)-?\w+) bui/i],[T,[N,tn],[S,ue]],[/Hbbtv.*(technisat) (.*);/i],[N,T,[S,ue]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[N,/.+\/(\w+)/,"$1",ze,{LG:"lge"}],[T,Mr],[S,ue]],[/(playstation \w+)/i],[T,[N,Ht],[S,Qt]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[T,[N,qr],[S,Qt]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[N,T,[S,Qt]],[/droid.+; (shield)( bui|\))/i],[T,[N,Jr],[S,Qt]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[T,[N,$t],[S,Ge]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[N,T,[S,Ge]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[T,[N,en],[S,Ge]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[T,[N,At],[S,Ge]],[/(opwwe\d{3})/i],[T,[N,si],[S,Ge]],[/(moto 360)/i],[T,[N,Qr],[S,Ge]],[/(smartwatch 3)/i],[T,[N,Ht],[S,Ge]],[/(g watch r)/i],[T,[N,xr],[S,Ge]],[/droid.+; (wt63?0{2,3})\)/i],[T,[N,rn],[S,Ge]],[/droid.+; (glass) \d/i],[T,[N,vt],[S,pr]],[/(pico) ([\w ]+) os\d/i],[N,T,[S,pr]],[/(quest( \d| pro)?s?).+vr/i],[T,[N,nn],[S,pr]],[/mobile vr; rv.+firefox/i],[[S,pr]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[N,[S,Jt]],[/(aeobc)\b/i],[T,[N,gr],[S,Jt]],[/(homepod).+mac os/i],[T,[N,At],[S,Jt]],[/windows iot/i],[[S,Jt]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[T,[S,ue]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[S,ue]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[T,[S,ze,{mobile:"Mobile",xr:"VR","*":q}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[S,q]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[S,$]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[T,[N,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[B,[D,Tr+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[D,B],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[B,[D,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[D,B],[/ladybird\//i],[[D,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[B,D]],os:[[/(windows nt) (6\.[23]); arm/i],[[D,/N/,"R"],[B,ze,di]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[D,B],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[B,/(;|\))/g,"",ze,di],[D,Cn]],[/(windows ce)\/?([\d\.]*)/i],[D,B],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[B,/_/g,"."],[D,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[D,"macOS"],[B,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[B,[D,nt+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[B,[D,nt+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[B,[D,nt+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[B,[D,nt+" Linux"]],[/crkey\/([\d\.]+)/i],[B,[D,nt]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[B,D],[/(ubuntu) ([\w\.]+) like android/i],[[D,/(.+)/,"$1 Touch"],B],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[D,B],[/\(bb(10);/i],[B,[D,ii]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[B,[D,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[B,[D,Gt+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[B,[D,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[B,ze,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[D,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[B,[D,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[D,"Chrome OS"],B],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[D,B],[/(sunos) ?([\d\.]*)/i],[[D,"Solaris"],B],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[D,B]]},yr=(function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return Je.call(t.init,[[Ie,[D,B,ur,S]],[Qe,[Oe]],[We,[S,T,N]],[Ve,[D,B]],[ke,[D,B]]]),Je.call(t.isIgnore,[[Ie,[B,ur]],[Ve,[B]],[ke,[B]]]),Je.call(t.isIgnoreRgx,[[Ie,/ ?browser$/i],[ke,/ ?os$/i]]),Je.call(t.toString,[[Ie,[D,B]],[Qe,[Oe]],[We,[N,T]],[Ve,[D,B]],[ke,[D,B]]]),t})(),Nl=function(t,e){var r=yr.init[e],n=yr.isIgnore[e]||0,i=yr.isIgnoreRgx[e]||0,a=yr.toString[e]||0;function o(){Je.call(this,r)}return o.prototype.getItem=function(){return t},o.prototype.withClientHints=function(){return st?st.getHighEntropyValues(na).then(function(s){return t.setCH(new ia(s,!1)).parseCH().get()}):t.parseCH().get()},o.prototype.withFeatureCheck=function(){return t.detectFeature().get()},e!=Tt&&(o.prototype.is=function(s){var l=!1;for(var c in this)if(this.hasOwnProperty(c)&&!bn(n,c)&&ut(i?kt(i,this[c]):this[c])==ut(i?kt(i,s):s)){if(l=!0,s!=lt)break}else if(s==lt&&l){l=!l;break}return l},o.prototype.toString=function(){var s=Rt;for(var l in a)typeof this[a[l]]!==lt&&(s+=(s?" ":Rt)+this[a[l]]);return s||lt}),st||(o.prototype.then=function(s){var l=this,c=function(){for(var d in l)l.hasOwnProperty(d)&&(this[d]=l[d])};c.prototype={is:o.prototype.is,toString:o.prototype.toString};var f=new c;return s(f),f}),new o};function ia(t,e){if(t=t||{},Je.call(this,na),e)Je.call(this,[[$n,an(t[ht])],[Hn,an(t[wl])],[$,/\?1/.test(t[Cl])],[T,Xt(t[bl])],[Nt,Xt(t[ra])],[Gn,Xt(t[Sl])],[Oe,Xt(t[El])],[yt,an(t[_l])],[Hr,Xt(t[Al])]]);else for(var r in t)this.hasOwnProperty(r)&&typeof t[r]!==lt&&(this[r]=t[r])}function pi(t,e,r,n){return this.get=function(i){return i?this.data.hasOwnProperty(i)?this.data[i]:void 0:this.data},this.set=function(i,a){return this.data[i]=a,this},this.setCH=function(i){return this.uaCH=i,this},this.detectFeature=function(){if(Te&&Te.userAgent==this.ua)switch(this.itemType){case Ie:Te.brave&&typeof Te.brave.isBrave==Pr&&this.set(D,"Brave");break;case We:!this.get(S)&&st&&st[$]&&this.set(S,$),this.get(T)=="Macintosh"&&Te&&typeof Te.standalone!==lt&&Te.maxTouchPoints&&Te.maxTouchPoints>2&&this.set(T,"iPad").set(S,q);break;case ke:!this.get(D)&&st&&st[Nt]&&this.set(D,st[Nt]);break;case Tt:var i=this.data,a=function(o){return i[o].getItem().detectFeature().get()};this.set(Ie,a(Ie)).set(Qe,a(Qe)).set(We,a(We)).set(Ve,a(Ve)).set(ke,a(ke))}return this},this.parseUA=function(){return this.itemType!=Tt&&sn.call(this.data,this.ua,this.rgxMap),this.itemType==Ie&&this.set(ur,on(this.get(B))),this},this.parseCH=function(){var i=this.uaCH,a=this.rgxMap;switch(this.itemType){case Ie:case Ve:var o=i[Hn]||i[$n],s;if(o)for(var l=0;l<o.length;l++){var c=o[l].brand||o[l],f=o[l].version;this.itemType==Ie&&!/not.a.brand/i.test(c)&&(!s||/Chrom/.test(s)&&c!=ci||s==Tr&&/WebView2/.test(c))&&(c=ze(c,Tl),s=this.get(D),s&&!/Chrom/.test(s)&&/Chrom/.test(c)||this.set(D,c).set(B,f).set(ur,on(f)),s=c),this.itemType==Ve&&c==ci&&this.set(B,f)}break;case Qe:var d=i[Oe];d&&(d&&i[Hr]=="64"&&(d+="64"),sn.call(this.data,d+";",a));break;case We:if(i[$]&&this.set(S,$),i[T]&&(this.set(T,i[T]),!this.get(S)||!this.get(N))){var v={};sn.call(v,"droid 9; "+i[T]+")",a),!this.get(S)&&v.type&&this.set(S,v.type),!this.get(N)&&v.vendor&&this.set(N,v.vendor)}if(i[yt]){var h;if(typeof i[yt]!="string")for(var p=0;!h&&p<i[yt].length;)h=ze(i[yt][p++],hi);else h=ze(i[yt],hi);this.set(S,h)}break;case ke:var g=i[Nt];if(g){var y=i[Gn];g==Cn&&(y=parseInt(on(y),10)>=13?"11":"10"),this.set(D,g).set(B,y)}this.get(D)==Cn&&i[T]=="Xbox"&&this.set(D,"Xbox").set(B,void 0);break;case Tt:var w=this.data,m=function(A){return w[A].getItem().setCH(i).parseCH().get()};this.set(Ie,m(Ie)).set(Qe,m(Qe)).set(We,m(We)).set(Ve,m(Ve)).set(ke,m(ke))}return this},Je.call(this,[["itemType",t],["ua",e],["uaCH",n],["rgxMap",r],["data",Nl(this,t)]]),this}function et(t,e,r){if(typeof t===Pt?(kr(t,!0)?(typeof e===Pt&&(r=e),e=t):(r=t,e=void 0),t=void 0):typeof t===_n&&!kr(e,!0)&&(r=e,e=void 0),r)if(typeof r.append===Pr){var n={};r.forEach(function(f,d){n[String(d).toLowerCase()]=f}),r=n}else{var i={};for(var a in r)r.hasOwnProperty(a)&&(i[String(a).toLowerCase()]=r[a]);r=i}if(!(this instanceof et))return new et(t,e,r).getResult();var o=typeof t===_n?t:r&&r[ti]?r[ti]:Te&&Te.userAgent?Te.userAgent:Rt,s=new ia(r,!0),l=e?Ol(vi,e):vi,c=function(f){return f==Tt?function(){return new pi(f,o,l,s).set("ua",o).set(Ie,this.getBrowser()).set(Qe,this.getCPU()).set(We,this.getDevice()).set(Ve,this.getEngine()).set(ke,this.getOS()).get()}:function(){return new pi(f,o,l[f],s).parseUA().get()}};return Je.call(this,[["getBrowser",c(Ie)],["getCPU",c(Qe)],["getDevice",c(We)],["getEngine",c(Ve)],["getOS",c(ke)],["getResult",c(Tt)],["getUA",function(){return o}],["setUA",function(f){return Ft(f)&&(o=f.length>An?Mr(f,An):f),this}]]).setUA(o),this}et.VERSION=ml;et.BROWSER=Gr([D,B,ur,S]);et.CPU=Gr([Oe]);et.DEVICE=Gr([T,N,S,Qt,$,ue,q,Ge,Jt]);et.ENGINE=et.OS=Gr([D,B]);const ln=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function un(t,e,r,n){t.addEventListener?t.addEventListener(e,r,n):t.attachEvent&&t.attachEvent("on".concat(e),r)}function Kt(t,e,r,n){t.removeEventListener?t.removeEventListener(e,r,n):t.detachEvent&&t.detachEvent("on".concat(e),r)}function aa(t,e){const r=e.slice(0,e.length-1);for(let n=0;n<r.length;n++)r[n]=t[r[n].toLowerCase()];return r}function oa(t){typeof t!="string"&&(t=""),t=t.replace(/\s/g,"");const e=t.split(",");let r=e.lastIndexOf("");for(;r>=0;)e[r-1]+=",",e.splice(r,1),r=e.lastIndexOf("");return e}function Dl(t,e){const r=t.length>=e.length?t:e,n=t.length>=e.length?e:t;let i=!0;for(let a=0;a<r.length;a++)n.indexOf(r[a])===-1&&(i=!1);return i}const cr={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":ln?173:189,"=":ln?61:187,";":ln?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},$e={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,meta:91,command:91},er={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},ye={16:!1,18:!1,17:!1,91:!1},se={};for(let t=1;t<20;t++)cr["f".concat(t)]=111+t;let oe=[],or=null,sa="all";const qe=new Map,Vt=t=>cr[t.toLowerCase()]||$e[t.toLowerCase()]||t.toUpperCase().charCodeAt(0),Bl=t=>Object.keys(cr).find(e=>cr[e]===t),Rl=t=>Object.keys($e).find(e=>$e[e]===t);function la(t){sa=t||"all"}function fr(){return sa||"all"}function Pl(){return oe.slice(0)}function kl(){return oe.map(t=>Bl(t)||Rl(t)||String.fromCharCode(t))}function Ml(){const t=[];return Object.keys(se).forEach(e=>{se[e].forEach(r=>{let{key:n,scope:i,mods:a,shortcut:o}=r;t.push({scope:i,shortcut:o,mods:a,keys:n.split("+").map(s=>Vt(s))})})}),t}function Ll(t){const e=t.target||t.srcElement,{tagName:r}=e;let n=!0;const i=r==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||r==="TEXTAREA"||r==="SELECT")&&!e.readOnly)&&(n=!1),n}function Fl(t){return typeof t=="string"&&(t=Vt(t)),oe.indexOf(t)!==-1}function Vl(t,e){let r,n;t||(t=fr());for(const i in se)if(Object.prototype.hasOwnProperty.call(se,i))for(r=se[i],n=0;n<r.length;)r[n].scope===t?r.splice(n,1).forEach(o=>{let{element:s}=o;return zn(s)}):n++;fr()===t&&la(e||"all")}function Ul(t){let e=t.keyCode||t.which||t.charCode;t.key&&t.key.toLowerCase()==="capslock"&&(e=Vt(t.key));const r=oe.indexOf(e);if(r>=0&&oe.splice(r,1),t.key&&t.key.toLowerCase()==="meta"&&oe.splice(0,oe.length),(e===93||e===224)&&(e=91),e in ye){ye[e]=!1;for(const n in $e)$e[n]===e&&(Xe[n]=!1)}}function ua(t){if(typeof t>"u")Object.keys(se).forEach(i=>{Array.isArray(se[i])&&se[i].forEach(a=>mr(a)),delete se[i]}),zn(null);else if(Array.isArray(t))t.forEach(i=>{i.key&&mr(i)});else if(typeof t=="object")t.key&&mr(t);else if(typeof t=="string"){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];let[i,a]=r;typeof i=="function"&&(a=i,i=""),mr({key:t,scope:i,method:a,splitKey:"+"})}}const mr=t=>{let{key:e,scope:r,method:n,splitKey:i="+"}=t;oa(e).forEach(o=>{const s=o.split(i),l=s.length,c=s[l-1],f=c==="*"?"*":Vt(c);if(!se[f])return;r||(r=fr());const d=l>1?aa($e,s):[],v=[];se[f]=se[f].filter(h=>{const g=(n?h.method===n:!0)&&h.scope===r&&Dl(h.mods,d);return g&&v.push(h.element),!g}),v.forEach(h=>zn(h))})};function gi(t,e,r,n){if(e.element!==n)return;let i;if(e.scope===r||e.scope==="all"){i=e.mods.length>0;for(const a in ye)Object.prototype.hasOwnProperty.call(ye,a)&&(!ye[a]&&e.mods.indexOf(+a)>-1||ye[a]&&e.mods.indexOf(+a)===-1)&&(i=!1);(e.mods.length===0&&!ye[16]&&!ye[18]&&!ye[17]&&!ye[91]||i||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(oe),e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function xi(t,e){const r=se["*"];let n=t.keyCode||t.which||t.charCode;if(t.key&&t.key.toLowerCase()==="capslock"||!Xe.filter.call(this,t))return;if((n===93||n===224)&&(n=91),oe.indexOf(n)===-1&&n!==229&&oe.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach(s=>{const l=er[s];t[s]&&oe.indexOf(l)===-1?oe.push(l):!t[s]&&oe.indexOf(l)>-1?oe.splice(oe.indexOf(l),1):s==="metaKey"&&t[s]&&(oe=oe.filter(c=>c in er||c===n))}),n in ye){ye[n]=!0;for(const s in $e)if(Object.prototype.hasOwnProperty.call($e,s)){const l=er[$e[s]];Xe[s]=t[l]}if(!r)return}for(const s in ye)Object.prototype.hasOwnProperty.call(ye,s)&&(ye[s]=t[er[s]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(oe.indexOf(17)===-1&&oe.push(17),oe.indexOf(18)===-1&&oe.push(18),ye[17]=!0,ye[18]=!0);const i=fr();if(r)for(let s=0;s<r.length;s++)r[s].scope===i&&(t.type==="keydown"&&r[s].keydown||t.type==="keyup"&&r[s].keyup)&&gi(t,r[s],i,e);if(!(n in se))return;const a=se[n],o=a.length;for(let s=0;s<o;s++)if((t.type==="keydown"&&a[s].keydown||t.type==="keyup"&&a[s].keyup)&&a[s].key){const l=a[s],{splitKey:c}=l,f=l.key.split(c),d=[];for(let v=0;v<f.length;v++)d.push(Vt(f[v]));d.sort().join("")===oe.sort().join("")&&gi(t,l,i,e)}}function Xe(t,e,r){oe=[];const n=oa(t);let i=[],a="all",o=document,s=0,l=!1,c=!0,f="+",d=!1,v=!1;for(r===void 0&&typeof e=="function"&&(r=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(a=e.scope),e.element&&(o=e.element),e.keyup&&(l=e.keyup),e.keydown!==void 0&&(c=e.keydown),e.capture!==void 0&&(d=e.capture),typeof e.splitKey=="string"&&(f=e.splitKey),e.single===!0&&(v=!0)),typeof e=="string"&&(a=e),v&&ua(t,a);s<n.length;s++)t=n[s].split(f),i=[],t.length>1&&(i=aa($e,t)),t=t[t.length-1],t=t==="*"?"*":Vt(t),t in se||(se[t]=[]),se[t].push({keyup:l,keydown:c,scope:a,mods:i,shortcut:n[s],method:r,key:n[s],splitKey:f,element:o});if(typeof o<"u"&&window){if(!qe.has(o)){const h=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return xi(g,o)},p=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;xi(g,o),Ul(g)};qe.set(o,{keydownListener:h,keyupListenr:p,capture:d}),un(o,"keydown",h,d),un(o,"keyup",p,d)}if(!or){const h=()=>{oe=[]};or={listener:h,capture:d},un(window,"focus",h,d)}}}function $l(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(se).forEach(r=>{se[r].filter(i=>i.scope===e&&i.shortcut===t).forEach(i=>{i&&i.method&&i.method()})})}function zn(t){const e=Object.values(se).flat();if(e.findIndex(n=>{let{element:i}=n;return i===t})<0){const{keydownListener:n,keyupListenr:i,capture:a}=qe.get(t)||{};n&&i&&(Kt(t,"keyup",i,a),Kt(t,"keydown",n,a),qe.delete(t))}if((e.length<=0||qe.size<=0)&&(Object.keys(qe).forEach(i=>{const{keydownListener:a,keyupListenr:o,capture:s}=qe.get(i)||{};a&&o&&(Kt(i,"keyup",o,s),Kt(i,"keydown",a,s),qe.delete(i))}),qe.clear(),Object.keys(se).forEach(i=>delete se[i]),or)){const{listener:i,capture:a}=or;Kt(window,"focus",i,a),or=null}}const cn={getPressedKeyString:kl,setScope:la,getScope:fr,deleteScope:Vl,getPressedKeyCodes:Pl,getAllKeyCodes:Ml,isPressed:Fl,filter:Ll,trigger:$l,unbind:ua,keyMap:cr,modifier:$e,modifierMap:er};for(const t in cn)Object.prototype.hasOwnProperty.call(cn,t)&&(Xe[t]=cn[t]);if(typeof window<"u"){const t=window.hotkeys;Xe.noConflict=e=>(e&&window.hotkeys===Xe&&(window.hotkeys=t),Xe),window.hotkeys=Xe}const Hl={class:"dsg-dropdown--trigger",tabindex:"0"},Gl={class:"dsg-dropdown--menu"},zl={key:0,class:"dsg-dropdown--menu-header"},Wl={key:1,class:"dsg-dropdown--menu-header"},Xl={class:"dsg-dropdown--menu-title"},Kl={key:2,class:"dsg-dropdown--menu-header subsection"},jl={class:"dsg-dropdown--menu-subtitle"},Yl=["href","target","tabindex","title","onClick"],Zl={key:0,class:"dsg-dropdown--menu-item--content"},ql={key:0,class:"dsg-dropdown--menu-item--icon"},Ql={class:"dsg-dropdown--menu-item--label"},Jl={class:"dsg-dropdown--menu-item--hotkey"},eu={key:0},tu={key:1,class:"dsg-dropdown--menu-item--content"},ru=u.defineComponent({__name:"DsgDropdown",props:{label:{default:""},type:{default:"button"},icon:{default:"dots-vertical"},iconBefore:{default:()=>{}},buttonTheme:{default:"gray"},menuItems:{default:()=>[]},avatarInfo:{default:null},isOpen:{type:Boolean,default:!1},placement:{default:"bottom-end"},headerType:{default:"none"},headerTitle:{default:""},classes:{default:""},strategy:{default:"absolute"},skidding:{default:0},distance:{default:0},size:{default:"md"}},setup(t,{expose:e}){const r=u.ref(t.isOpen),n=new et().getOS().name;t.menuItems.forEach(h=>{});const i=u.useTemplateRef("floatingVueDropdownEl"),a=u.useTemplateRef("dsgDropdownAvatarTriggerEl"),o=u.useTemplateRef("dsgDropdownButtonTriggerEl"),s=h=>{c(),a.value&&setTimeout(()=>{a?.value?.toggleFocus(r.value)},100)},l=h=>{c(),o.value&&setTimeout(()=>{o?.value?.focusButton(r.value)},100)},c=()=>{r.value=!r.value,r.value?i.value?.show():i.value?.hide()},f=(h,p)=>{p.uri||h.preventDefault(),p.action&&(p.action(),i.value?.hide())},d=u.useTemplateRef("dsgDropdown"),v=h=>(h=h.toLowerCase(),h.replace("ctrl","⌃").replace("shift","⇧").replace("alt","⌥").replace("cmd",n==="macOS"?"⌘":"⊞").replace("++","+").replace("+","").toUpperCase());return u.onMounted(()=>{t.menuItems.forEach(h=>{h.hotkey&&Xe(h.hotkey,p=>{h.hotkeyPreventDefault&&h.hotkeyPreventDefault===!0&&p.preventDefault(),h.uri&&window.open(h.uri,h.uriTarget??"_blank"),typeof h.action=="function"&&(h.action(),i.value?.hide())})})}),u.onBeforeUnmount(()=>{Xe.deleteScope("dsgDropdown")}),e({handleTriggerClick:c}),(h,p)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-dropdown",`dsg-dropdown--${t.size}`+t.classes]),ref:"dsgDropdown"},[u.createVNode(u.unref(M.kt),u.mergeProps({triggers:[],placement:t.placement,"handle-resize":!1,strategy:t.strategy,shown:r.value,flip:!1,shift:!1,boundary:d.value,container:d.value,skidding:t.skidding,distance:t.distance,class:"dsg-dropdown--popper",onHide:p[0]||(p[0]=g=>r.value=!1),ref:"floatingVueDropdownEl"},h.$attrs),{popper:u.withCtx(()=>[u.createElementVNode("div",Gl,[u.renderSlot(h.$slots,"dsg-dropdown-menu--header",{},()=>[t.headerType==="avatar"?(u.openBlock(),u.createElementBlock("div",zl,[t.avatarInfo?(u.openBlock(),u.createBlock(sr,{key:0,size:"md",profileUri:t.avatarInfo.profileUri,fullName:t.avatarInfo.fullName,isOnline:t.avatarInfo.isOnline,title:t.avatarInfo.title,"sub-text":t.avatarInfo.subText},null,8,["profileUri","fullName","isOnline","title","sub-text"])):u.createCommentVNode("",!0)])):t.headerType==="title"?(u.openBlock(),u.createElementBlock("div",Wl,[u.createElementVNode("h3",Xl,u.toDisplayString(t.headerTitle),1)])):t.headerType==="subsection"?(u.openBlock(),u.createElementBlock("div",Kl,[u.createElementVNode("h4",jl,u.toDisplayString(t.headerTitle),1)])):u.createCommentVNode("",!0)]),u.renderSlot(h.$slots,"dsg-dropdown-menu-content",{},()=>[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(t.menuItems,(g,y)=>(u.openBlock(),u.createElementBlock("a",{class:u.normalizeClass(["dsg-dropdown--menu-item",{"is-divider":g.type==="divider"}]),href:g.uri,target:g.uriTarget??"_blank",tabindex:!g.uri&&g.type!=="divider"?0:void 0,title:g.label,key:y,onClick:w=>f(w,g)},[g.type==="item"||g.type===void 0?(u.openBlock(),u.createElementBlock("div",Zl,[g.icon?(u.openBlock(),u.createElementBlock("div",ql,[u.createVNode(M._sfc_main,{icon:g.icon,size:"xs"},null,8,["icon"])])):u.createCommentVNode("",!0),u.createElementVNode("span",Ql,u.toDisplayString(g.label),1),u.createElementVNode("div",Jl,[g.hotkey?(u.openBlock(),u.createElementBlock("span",eu,u.toDisplayString(v(g.hotkey)),1)):u.createCommentVNode("",!0)])])):g.type==="divider"?(u.openBlock(),u.createElementBlock("div",tu,[...p[1]||(p[1]=[u.createElementVNode("hr",null,null,-1)])])):u.createCommentVNode("",!0)],10,Yl))),128))])])]),default:u.withCtx(()=>[u.createElementVNode("div",Hl,[u.renderSlot(h.$slots,"dsg-dropdown--trigger",{},()=>[t.type==="avatar"?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[t.avatarInfo?(u.openBlock(),u.createBlock(sr,{key:0,size:"lg",profileUri:t.avatarInfo.profileUri,fullName:t.avatarInfo.fullName,ref:"dsgDropdownAvatarTriggerEl",onClick:s,"prevent-default":!0},null,8,["profileUri","fullName"])):u.createCommentVNode("",!0)],64)):t.type==="button"?(u.openBlock(),u.createBlock(M._sfc_main$3,{key:1,theme:t.buttonTheme,label:t.label,onClick:l,ref:"dsgDropdownButtonTriggerEl","icon-before":t.iconBefore,size:t.size,"icon-after":"chevron-down",class:u.normalizeClass({"dropdown-active":r.value})},null,8,["theme","label","icon-before","size","class"])):t.type==="icon"?(u.openBlock(),u.createBlock(M._sfc_main$3,{key:2,"icon-before":t.icon,size:"sm",theme:t.buttonTheme,class:u.normalizeClass(["dsg-dropdown--trigger-button",{"dropdown-active":r.value}]),onClick:c},null,8,["icon-before","theme","class"])):u.createCommentVNode("",!0)])])]),_:3},16,["placement","strategy","shown","boundary","container","skidding","distance"])],2))}}),nu={class:"dsg-input--label-wrapper block"},iu=["onMousedown"],au={class:"option-label"},ou={key:0,class:"dsg-input-select--error-wrapper"},su=u.defineComponent({__name:"DsgInputSelect",props:u.mergeModels({options:{default:()=>[]},multiple:{type:Boolean,default:!1},fetchOnLoad:{type:Boolean,default:!1},getUrl:{},extraParams:{default:()=>({})},strategy:{default:"absolute"},placeholder:{},icon:{default:null},label:{default:"label"},showLabels:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},trackBy:{default:"id"},contentMaxWidth:{default:"24rem"},itemLabel:{default:"label"},allowEmpty:{type:Boolean,default:!1},validateOnLoad:{type:Boolean,default:!0},selectLabel:{default:""},selectedLabel:{default:""},errors:{default:()=>[]},scrollBind:{default:()=>document.body},size:{default:"md"}},{modelValue:{},modelModifiers:{},single:{},singleModifiers:{}}),emits:u.mergeModels(["update:modelValue","update:model-value","search-change","select","open","close","remove","tag"],["update:modelValue","update:single"]),setup(t,{emit:e}){const r=u.useModel(t,"modelValue"),n=u.useModel(t,"single"),i=u.ref(t.options),a=u.useTemplateRef("multiselectEl"),o=u.ref(!1),s=u.ref([]);u.computed(()=>s.value.length>0);const l=u.computed(()=>[...Array.isArray(t.errors)?t.errors:[t.errors],...s.value].filter((C,b,O)=>b===O.indexOf(C))),c=u.computed(()=>["dsg-input-select",`dsg-input-select--${t.size}`,`dsg-input-select--${t.strategy}`,`dsg-input-select--${l.value.length>0?"has-errors":"no-errors"}`].join(" ").replace(/\s+/g," ").trim()),f=()=>{p()},d=E=>{p()};u.watchEffect(()=>{}),u.watch(()=>t.options,E=>{Array.isArray(E)?i.value=E:console.warn("Options should be an array.")});const v=u.ref(null);u.watch(()=>t.scrollBind,async E=>{await u.nextTick(),v.value&&typeof v.value.removeEventListener=="function"&&v.value.removeEventListener("scroll",d);const C=O=>{const P=window.getComputedStyle(O),H=["auto","scroll","overlay"].includes(P.overflow)||["auto","scroll","overlay"].includes(P.overflowY)||["auto","scroll","overlay"].includes(P.overflowX),L=O.scrollHeight>O.clientHeight||O.scrollWidth>O.clientWidth;return H&&L};let b=null;E?b=C(E)?E:window:b=window,b&&typeof b.addEventListener=="function"?(b.addEventListener("scroll",d),v.value=b):v.value=null},{immediate:!0});const h=e,p=()=>{if(a.value)if(o.value===!0){const E=a.value.$el.getBoundingClientRect(),C=a.value.$el.offsetHeight,b=window.innerHeight;u.nextTick(()=>{const O=a.value.$el.querySelector(".multiselect__content-wrapper");O.style.display="block";const P=O.offsetHeight;if(t.strategy==="fixed"){O.style.left=E.left+"px",O.style.right="auto",O.style.top="auto",O.style.bottom="auto";const H=E.width,L=window.innerWidth-E.left,V=H>L?Math.min(300,L-16):H;O.style.width=`${V}px`;const z=b-E.bottom,he=E.top,He=P+8;(z<He&&he>z?"top":"bottom")==="top"?O.style.bottom=`${b-E.top+4}px`:O.style.top=`${E.bottom+4}px`;let tt=!1;if(v.value===window)tt=E.top<b&&E.bottom>0&&E.left<window.innerWidth&&E.right>0;else if(v.value){const rt=v.value.getBoundingClientRect();tt=E.top<rt.bottom&&E.bottom>rt.top&&E.left<rt.right&&E.right>rt.left}else tt=E.top<b&&E.bottom>0&&E.left<window.innerWidth&&E.right>0;if(!tt){O.style.display="none";return}O.style.display="block"}else O.style.left="0",O.style.right="auto",O.style.width="auto",O.style.maxWidth=t.contentMaxWidth,(E.bottom+P+C+2>b?"top":"bottom")==="top"?O.style.bottom=`${C+4}px`:O.style.top=`${C+4}px`})}else{const E=a.value.$refs.list;E&&(E.style.display="none",E.style.top="auto",E.style.bottom="auto",E.style.left="auto",E.style.right="auto")}},g=E=>{o.value=!0,p(),h("open",E)},y=(E,C)=>{o.value=!1,p(),h("close",E,C)},w=M.useDebounceFn(E=>{t.getUrl&&E.length>=2&&M.axios.get(t.getUrl,{params:{term:E,...t.extraParams}}).then(C=>{i.value=C.data}),h("search-change",E)},300),m=(E,C=!0)=>{if(s.value=[],t.allowEmpty===!1&&(E==null||Array.isArray(E)&&E.length===0)&&s.value.push(`${t.label} is required.`),C===!0)try{A(E),h("update:modelValue",E),h("update:model-value",E)}catch(b){console.log(b)}},A=E=>{E?n.value=E[t.trackBy]||E:n.value=null};return u.onMounted(()=>{window.addEventListener("resize",f),t.getUrl&&t.options.length===0&&t.fetchOnLoad&&M.axios.get(t.getUrl).then(E=>{i.value=E.data}).catch(E=>{console.error("Error fetching options:",E)}),t.validateOnLoad&&m(r.value,!1)}),u.onUnmounted(()=>{window.removeEventListener("resize",f),v.value&&typeof v.value.removeEventListener=="function"&&v.value.removeEventListener("scroll",d)}),(E,C)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(c.value),ref:"dsgInputSelectEl"},[u.createElementVNode("div",nu,[t.label?(u.openBlock(),u.createBlock(zi._sfc_main,{key:0,label:t.label,size:"sm"},null,8,["label"])):u.createCommentVNode("",!0)]),u.createVNode(u.unref(Un),u.mergeProps({ref:"multiselectEl",modelValue:r.value,"onUpdate:modelValue":[C[0]||(C[0]=b=>r.value=b),C[3]||(C[3]=b=>m(b,!0))],options:i.value,multiple:t.multiple,onSearchChange:u.unref(w),onOpen:C[1]||(C[1]=b=>g(b)),onClose:C[2]||(C[2]=(b,O)=>y(b,O)),onRemove:C[4]||(C[4]=(b,O)=>h("remove",b,O)),onTag:C[5]||(C[5]=(b,O)=>h("tag",b,O)),placeholder:t.placeholder,label:t.itemLabel,"track-by":t.trackBy,"close-on-select":t.closeOnSelect,"show-labels":t.showLabels,disabled:t.disabled,"allow-empty":t.allowEmpty,"select-label":t.selectLabel,"preserve-search":!0,"selected-label":t.selectedLabel,class:["dsg-input--multiselect",{"dsg-input--multiselect--has-errors":t.errors&&t.errors.length,"dsg-input--multiselect--disabled":t.disabled}]},E.$attrs),{selection:u.withCtx(()=>[t.icon?(u.openBlock(),u.createBlock(M._sfc_main,{key:0,icon:t.icon,size:"md",class:"dsg-untitled-icon text-gray-500 transition-all duration-200 ease-in-out inline-block mr-2"},null,8,["icon"])):u.createCommentVNode("",!0)]),caret:u.withCtx(({toggle:b})=>[u.createElementVNode("div",{onMousedown:u.withModifiers(O=>b(),["prevent","stop"]),class:"multiselect__select"},[u.createVNode(M._sfc_main,{icon:"chevron-down"})],40,iu)]),option:u.withCtx(({option:b})=>[u.createElementVNode("span",au,u.toDisplayString(b[t.itemLabel]),1),u.createVNode(M._sfc_main,{icon:"check",size:"sm",class:"option-icon text-brand-600"})]),_:1},16,["modelValue","options","multiple","onSearchChange","placeholder","label","track-by","close-on-select","show-labels","disabled","allow-empty","select-label","selected-label","class"]),l.value&&l.value.length?(u.openBlock(),u.createElementBlock("div",ou,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(l.value,(b,O)=>(u.openBlock(),u.createElementBlock("span",{class:"dsg-input--error",key:O},u.toDisplayString(b),1))),128))])):u.createCommentVNode("",!0)],2))}}),lu=["name"],uu=["selected"],cu=["value","selected"],fu=u.defineComponent({__name:"DsgInputDropdown",props:u.mergeModels({name:{default:""},placeholder:{default:""},classes:{default:""},options:{default:()=>[]}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=u.useModel(t,"modelValue");return(r,n)=>u.withDirectives((u.openBlock(),u.createElementBlock("select",{class:u.normalizeClass(["dsg-input-dropdown",t.classes]),name:t.name,"onUpdate:modelValue":n[0]||(n[0]=i=>e.value=i)},[t.placeholder?(u.openBlock(),u.createElementBlock("option",{key:0,value:"",disabled:"",selected:e.value===""},u.toDisplayString(t.placeholder),9,uu)):u.createCommentVNode("",!0),(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(t.options,(i,a)=>(u.openBlock(),u.createElementBlock("option",{key:a,value:i.value,selected:e.value===i.value},u.toDisplayString(i.label),9,cu))),128))],10,lu)),[[u.vModelSelect,e.value]])}}),du=["href","title","target"],hu={key:0,class:"dsg-link--label"},vu=u.defineComponent({__name:"DsgLink",props:{label:{default:"Link"},href:{default:""},uriTarget:{default:"_self"},size:{default:"md"},classes:{default:""},preventDefault:{type:Boolean,default:!1}},emits:["link-clicked"],setup(t,{emit:e}){const r=["dsg-link","dsg-link--"+t.size,t.classes].join(" "),n=e,i=a=>{t.preventDefault&&a.preventDefault(),n("link-clicked",a)};return(a,o)=>(u.openBlock(),u.createElementBlock("a",{href:t.href,title:"Link: "+t.label,target:t.uriTarget,class:u.normalizeClass(u.unref(r)),onClick:i},[u.renderSlot(a.$slots,"dsg-link-content",{},()=>[t.label?(u.openBlock(),u.createElementBlock("span",hu,u.toDisplayString(t.label),1)):u.createCommentVNode("",!0)])],10,du))}}),pu={key:1,class:"dsg-modal__header-text"},gu={key:0,class:"dsg-modal__header-title"},xu={key:1,class:"dsg-modal__header-description"},yu={key:1,class:"dsg-modal__body"},ca=u.defineComponent({__name:"DsgModal",props:{title:{default:""},description:{default:""},miscIcon:{default:null},hasClosedButton:{type:Boolean,default:!0},initialOpen:{type:Boolean,default:!1},closeClickBackground:{type:Boolean,default:!1},wrapperClasses:{default:""},width:{default:400},type:{default:"left"},footerType:{default:"horizontal-even"},primaryButton:{type:[Object,Boolean],default:!1},secondaryButton:{type:[Object,Boolean],default:!1},hasBackground:{type:Boolean,default:!0}},emits:["before-open","after-open","before-close","after-close","secondary-button-clicked","primary-button-clicked"],setup(t,{expose:e,emit:r}){const n=r,i=u.ref(t.initialOpen),a=()=>{n("before-open"),i.value=!0,n("after-open")},o=()=>{n("before-close"),i.value=!1,n("after-close")},s=()=>{i.value&&t.closeClickBackground&&o()},l=()=>{n("secondary-button-clicked")},c=()=>{n("primary-button-clicked")};return e({open:a,close:o,secondaryButtonClicked:l,primaryButtonClicked:c}),(f,d)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-modal",`dsg-modal--${i.value?"open":"closed"}`])},[t.hasBackground?(u.openBlock(),u.createElementBlock("div",{key:0,class:"dsg-modal__background",onDblclick:s},null,32)):u.createCommentVNode("",!0),u.createElementVNode("div",{class:u.normalizeClass(["dsg-modal__wrapper",t.wrapperClasses]),style:u.normalizeStyle({width:t.width})},[t.hasClosedButton?(u.openBlock(),u.createBlock(M._sfc_main$3,{key:0,theme:"gray-tertiary",iconBefore:"x",size:"lg",class:u.normalizeClass(["dsg-modal__close-button",`dsg-modal__close-button--${t.type}`]),onClick:o},null,8,["class"])):u.createCommentVNode("",!0),u.renderSlot(f.$slots,"dsg-modal__header",{},()=>[u.createElementVNode("div",{class:u.normalizeClass(["dsg-modal__header",[`dsg-modal__header--${t.type}`,`${f.$slots.default?"dsg-modal__header--with-body":""}`].join(" ")])},[t.miscIcon?(u.openBlock(),u.createBlock(bt,u.normalizeProps(u.mergeProps({key:0},t.miscIcon)),null,16)):u.createCommentVNode("",!0),t.title||t.description?(u.openBlock(),u.createElementBlock("div",pu,[t.title?(u.openBlock(),u.createElementBlock("h3",gu,u.toDisplayString(t.title),1)):u.createCommentVNode("",!0),t.description?(u.openBlock(),u.createElementBlock("p",xu,u.toDisplayString(t.description),1)):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)],2)]),f.$slots.default?(u.openBlock(),u.createElementBlock("div",yu,[u.renderSlot(f.$slots,"default")])):u.createCommentVNode("",!0),u.renderSlot(f.$slots,"dsg-modal__footer",{},()=>[u.createElementVNode("div",{class:u.normalizeClass(["dsg-modal__footer",`dsg-modal__footer--${t.footerType}`])},[t.secondaryButton?(u.openBlock(),u.createBlock(M._sfc_main$3,u.mergeProps({key:0},t.secondaryButton,{onButtonClicked:l,classes:"dsg-modal__secondary-button"}),null,16)):u.createCommentVNode("",!0),t.primaryButton?(u.openBlock(),u.createBlock(M._sfc_main$3,u.mergeProps({key:1},t.primaryButton,{onButtonClicked:c,classes:"dsg-dsg-modal__primary-button"}),null,16)):u.createCommentVNode("",!0)],2)])],6)],2))}}),mu={class:"dsg-tag--before"},wu={class:"dsg-tag--label"},Eu={class:"dsg-tag--after"},Au={key:0,class:"dsg-tag--count"},_u=u.defineComponent({__name:"DsgTag",props:{label:{default:""},size:{default:"md"},hasClose:{type:Boolean,default:!1},tagCount:{default:null},avatarUri:{default:""},hasCheckbox:{type:Boolean,default:!1},dotHex:{default:null},destroyOnClose:{type:Boolean,default:!1},value:{default:null},classes:{default:""}},emits:["before-checked","after-checked","before-hide","after-hide","before-destroy","after-destroy"],setup(t,{expose:e,emit:r}){const n=["dsg-tag",`dsg-tag--${t.size}`,`dsg-tag--${t.hasClose?"has-close":"no-close"}`,`dsg-tag--${t.tagCount?"has-count":"no-count"}`,`dsg-tag--${t.avatarUri?"has-avatar":"no-avatar"}`,`dsg-tag--${t.hasCheckbox?"has-checkbox":"no-checkbox"}`,t.classes].join(" "),i=()=>`tag-${t.size}`;t.hasClose&&t.tagCount!==null&&new M.DsgPropSyntaxWarning("DsgTag: 'hasClose' and 'tagCount' props are mutually exclusive. Please use only one of them."),t.avatarUri&&t.dotHex&&new M.DsgPropSyntaxWarning("DsgTag: 'avatarUri' and 'dotHex' props are mutually exclusive. Please use only one of them.");const a=r,o=u.useTemplateRef("dsgTag"),s=g=>{t.destroyOnClose?(a("before-destroy",o.value),o.value?.remove(),a("after-destroy")):(a("before-hide",o.value),o.value&&(o.value.style.display="none"),a("after-hide",o.value))},l=(g,y)=>{a("before-checked",g,y)},c=g=>{a("after-checked",g)},f=u.ref(t.tagCount),d=g=>{f.value=g},v=u.ref(t.value);return e({setTagCount:d,setValue:g=>{v.value=g},getValue:()=>v.value}),(g,y)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(u.unref(n)),ref:"dsgTag"},[u.createElementVNode("div",mu,[t.hasCheckbox?(u.openBlock(),u.createBlock(M._sfc_main$2,{key:0,class:"dsg-tag--checkbox",size:i(),"no-focus":!0,onBeforeChecked:l,onAfterChecked:c},null,8,["size"])):u.createCommentVNode("",!0),t.avatarUri?(u.openBlock(),u.createBlock(sr,{key:1,"profile-uri":t.avatarUri,size:"xxs","no-focus":!0,class:"dsg-tag--avatar"},null,8,["profile-uri"])):u.createCommentVNode("",!0),t.dotHex?(u.openBlock(),u.createElementBlock("span",{key:2,class:"dsg-tag--dot",style:u.normalizeStyle({backgroundColor:t.dotHex})},null,4)):u.createCommentVNode("",!0)]),u.renderSlot(g.$slots,"dsg-tag--label",{},()=>[u.createElementVNode("span",wu,u.toDisplayString(t.label),1)]),u.createElementVNode("div",Eu,[f.value&&f.value>0?(u.openBlock(),u.createElementBlock("div",Au,u.toDisplayString(f.value),1)):u.createCommentVNode("",!0),t.hasClose?(u.openBlock(),u.createBlock(M._sfc_main,{key:1,icon:"x-close",class:"dsg-tag--close",onClick:s})):u.createCommentVNode("",!0)])],2))}}),Cu={class:"dsg-toggle--element"},bu=["checked","disabled"],Su={key:0,class:"dsg-toggle--label-wrapper"},Iu=["innerHTML"],Ou=["innerHTML"],Tu=u.defineComponent({__name:"DsgToggle",props:{modelValue:{type:Boolean,default:!1},size:{default:"md"},label:{default:""},subText:{default:""},disabled:{type:Boolean,default:!1},classes:{default:""}},emits:["before-toggle","after-toggle","update:modelValue"],setup(t,{expose:e,emit:r}){const n=["dsg-toggle",`dsg-toggle--${t.size}`,`dsg-toggle--${t.disabled?"disabled":"enabled"}`,`dsg-toggle--${t.label.length?"has-label":"no-label"}`,`dsg-toggle--${t.subText.length?"has-subtext":"no-subtext"}`,t.classes].join(" "),i=u.ref(t.modelValue),a=()=>{t.disabled||(l("before-toggle",i.value,!i.value),i.value=!i.value,l("after-toggle",i.value),l("update:modelValue",i.value))},o=u.useTemplateRef("toggleCheckbox"),s=()=>{o.value&&o.value.focus(),t.disabled||a()},l=r;return e({set:f=>{i.value=f}}),(f,d)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(u.unref(n)),onClick:s},[u.createElementVNode("label",Cu,[u.createElementVNode("input",{type:"checkbox",class:"dsg-toggle--checkbox",checked:i.value,onChange:a,title:"checkbox",ref:"toggleCheckbox",disabled:t.disabled},null,40,bu),d[0]||(d[0]=u.createElementVNode("span",{class:"dsg-toggle--slider"},null,-1))]),t.label.length?(u.openBlock(),u.createElementBlock("div",Su,[u.renderSlot(f.$slots,"dsg-toggle--label",{},()=>[u.createElementVNode("h3",{class:"dsg-toggle--label",innerHTML:t.label},null,8,Iu)]),t.label.length&&t.subText.length?u.renderSlot(f.$slots,"dsg-toggle--subtext",{key:0},()=>[u.createElementVNode("p",{class:"dsg-toggle--subtext",innerHTML:t.subText},null,8,Ou)]):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)],2))}}),Nu={class:"dsg-progress"},Du={class:"dsg-progress--inner"},Bu={key:0,class:"text-sm text-gray-700 min-w-[60px] text-right"},Ru={key:0},Pu={key:1},ku={key:2},Mu=u.defineComponent({__name:"DsgProgress",props:{value:{},max:{},showText:{},textSuffix:{}},setup(t){const e=t,r=u.computed(()=>{const n=e.value/e.max*100;return isNaN(n)?0:Math.min(Math.max(n,0),100)});return(n,i)=>(u.openBlock(),u.createElementBlock("div",Nu,[u.createElementVNode("div",Du,[u.createElementVNode("div",{class:"dsg-progress--inner--progress",style:u.normalizeStyle({width:r.value+"%"})},null,4)]),t.showText!=="none"?(u.openBlock(),u.createElementBlock("div",Bu,[t.showText==="number"?(u.openBlock(),u.createElementBlock("span",Ru,u.toDisplayString(t.value)+"/"+u.toDisplayString(t.max),1)):t.showText==="percentage"?(u.openBlock(),u.createElementBlock("span",Pu,u.toDisplayString(r.value.toFixed(2))+"%",1)):u.createCommentVNode("",!0),t.textSuffix?(u.openBlock(),u.createElementBlock("span",ku," "+u.toDisplayString(t.textSuffix),1)):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)]))}});function Lu(t,e){var r=Object.setPrototypeOf;r?r(t,e):t.__proto__=e}function Fu(t,e){e===void 0&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}var Vu=(function(){var t=function(r,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(i[o]=a[o])},t(r,n)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Uu=(function(t){Vu(e,t);function e(r,n){var i=this.constructor,a=t.call(this,r,n)||this;return Object.defineProperty(a,"name",{value:i.name,enumerable:!1,configurable:!0}),Lu(a,i.prototype),Fu(a),a}return e})(Error),$u=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),be=(function(t){$u(e,t);function e(r){r===void 0&&(r=void 0);var n=t.call(this,r)||this;return n.message=r,n}return e.prototype.getKind=function(){var r=this.constructor;return r.kind},e.kind="Exception",e})(Uu),Hu=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Fe=(function(t){Hu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ArgumentException",e})(be),Gu=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),F=(function(t){Gu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="IllegalArgumentException",e})(be),zu=(function(){function t(e){if(this.binarizer=e,e===null)throw new F("Binarizer must be non-null.")}return t.prototype.getWidth=function(){return this.binarizer.getWidth()},t.prototype.getHeight=function(){return this.binarizer.getHeight()},t.prototype.getBlackRow=function(e,r){return this.binarizer.getBlackRow(e,r)},t.prototype.getBlackMatrix=function(){return(this.matrix===null||this.matrix===void 0)&&(this.matrix=this.binarizer.getBlackMatrix()),this.matrix},t.prototype.isCropSupported=function(){return this.binarizer.getLuminanceSource().isCropSupported()},t.prototype.crop=function(e,r,n,i){var a=this.binarizer.getLuminanceSource().crop(e,r,n,i);return new t(this.binarizer.createBinarizer(a))},t.prototype.isRotateSupported=function(){return this.binarizer.getLuminanceSource().isRotateSupported()},t.prototype.rotateCounterClockwise=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new t(this.binarizer.createBinarizer(e))},t.prototype.rotateCounterClockwise45=function(){var e=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new t(this.binarizer.createBinarizer(e))},t.prototype.toString=function(){try{return this.getBlackMatrix().toString()}catch{return""}},t})(),Wu=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),me=(function(t){Wu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.getChecksumInstance=function(){return new e},e.kind="ChecksumException",e})(be),Xu=(function(){function t(e){this.source=e}return t.prototype.getLuminanceSource=function(){return this.source},t.prototype.getWidth=function(){return this.source.getWidth()},t.prototype.getHeight=function(){return this.source.getHeight()},t})(),ne=(function(){function t(){}return t.arraycopy=function(e,r,n,i,a){for(;a--;)n[i++]=e[r++]},t.currentTimeMillis=function(){return Date.now()},t})(),Ku=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Wn=(function(t){Ku(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="IndexOutOfBoundsException",e})(be),ju=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),yi=(function(t){ju(e,t);function e(r,n){r===void 0&&(r=void 0),n===void 0&&(n=void 0);var i=t.call(this,n)||this;return i.index=r,i.message=n,i}return e.kind="ArrayIndexOutOfBoundsException",e})(Wn),Yu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},De=(function(){function t(){}return t.fill=function(e,r){for(var n=0,i=e.length;n<i;n++)e[n]=r},t.fillWithin=function(e,r,n,i){t.rangeCheck(e.length,r,n);for(var a=r;a<n;a++)e[a]=i},t.rangeCheck=function(e,r,n){if(r>n)throw new F("fromIndex("+r+") > toIndex("+n+")");if(r<0)throw new yi(r);if(n>e)throw new yi(n)},t.asList=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e},t.create=function(e,r,n){var i=Array.from({length:e});return i.map(function(a){return Array.from({length:r}).fill(n)})},t.createInt32Array=function(e,r,n){var i=Array.from({length:e});return i.map(function(a){return Int32Array.from({length:r}).fill(n)})},t.equals=function(e,r){if(!e||!r||!e.length||!r.length||e.length!==r.length)return!1;for(var n=0,i=e.length;n<i;n++)if(e[n]!==r[n])return!1;return!0},t.hashCode=function(e){var r,n;if(e===null)return 0;var i=1;try{for(var a=Yu(e),o=a.next();!o.done;o=a.next()){var s=o.value;i=31*i+s}}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i},t.fillUint8Array=function(e,r){for(var n=0;n!==e.length;n++)e[n]=r},t.copyOf=function(e,r){return e.slice(0,r)},t.copyOfUint8Array=function(e,r){if(e.length<=r){var n=new Uint8Array(r);return n.set(e),n}return e.slice(0,r)},t.copyOfRange=function(e,r,n){var i=n-r,a=new Int32Array(i);return ne.arraycopy(e,r,a,0,i),a},t.binarySearch=function(e,r,n){n===void 0&&(n=t.numberComparator);for(var i=0,a=e.length-1;i<=a;){var o=a+i>>1,s=n(r,e[o]);if(s>0)i=o+1;else if(s<0)a=o-1;else return o}return-i-1},t.numberComparator=function(e,r){return e-r},t})(),G=(function(){function t(){}return t.numberOfTrailingZeros=function(e){var r;if(e===0)return 32;var n=31;return r=e<<16,r!==0&&(n-=16,e=r),r=e<<8,r!==0&&(n-=8,e=r),r=e<<4,r!==0&&(n-=4,e=r),r=e<<2,r!==0&&(n-=2,e=r),n-(e<<1>>>31)},t.numberOfLeadingZeros=function(e){if(e===0)return 32;var r=1;return e>>>16||(r+=16,e<<=16),e>>>24||(r+=8,e<<=8),e>>>28||(r+=4,e<<=4),e>>>30||(r+=2,e<<=2),r-=e>>>31,r},t.toHexString=function(e){return e.toString(16)},t.toBinaryString=function(e){return String(parseInt(String(e),2))},t.bitCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),e=e+(e>>>4)&252645135,e=e+(e>>>8),e=e+(e>>>16),e&63},t.truncDivision=function(e,r){return Math.trunc(e/r)},t.parseInt=function(e,r){return r===void 0&&(r=void 0),parseInt(e,r)},t.MIN_VALUE_32_BITS=-2147483648,t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t})(),pe=(function(){function t(e,r){e===void 0?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,r==null?this.bits=t.makeArray(e):this.bits=r)}return t.prototype.getSize=function(){return this.size},t.prototype.getSizeInBytes=function(){return Math.floor((this.size+7)/8)},t.prototype.ensureCapacity=function(e){if(e>this.bits.length*32){var r=t.makeArray(e);ne.arraycopy(this.bits,0,r,0,this.bits.length),this.bits=r}},t.prototype.get=function(e){return(this.bits[Math.floor(e/32)]&1<<(e&31))!==0},t.prototype.set=function(e){this.bits[Math.floor(e/32)]|=1<<(e&31)},t.prototype.flip=function(e){this.bits[Math.floor(e/32)]^=1<<(e&31)},t.prototype.getNextSet=function(e){var r=this.size;if(e>=r)return r;var n=this.bits,i=Math.floor(e/32),a=n[i];a&=~((1<<(e&31))-1);for(var o=n.length;a===0;){if(++i===o)return r;a=n[i]}var s=i*32+G.numberOfTrailingZeros(a);return s>r?r:s},t.prototype.getNextUnset=function(e){var r=this.size;if(e>=r)return r;var n=this.bits,i=Math.floor(e/32),a=~n[i];a&=~((1<<(e&31))-1);for(var o=n.length;a===0;){if(++i===o)return r;a=~n[i]}var s=i*32+G.numberOfTrailingZeros(a);return s>r?r:s},t.prototype.setBulk=function(e,r){this.bits[Math.floor(e/32)]=r},t.prototype.setRange=function(e,r){if(r<e||e<0||r>this.size)throw new F;if(r!==e){r--;for(var n=Math.floor(e/32),i=Math.floor(r/32),a=this.bits,o=n;o<=i;o++){var s=o>n?0:e&31,l=o<i?31:r&31,c=(2<<l)-(1<<s);a[o]|=c}}},t.prototype.clear=function(){for(var e=this.bits.length,r=this.bits,n=0;n<e;n++)r[n]=0},t.prototype.isRange=function(e,r,n){if(r<e||e<0||r>this.size)throw new F;if(r===e)return!0;r--;for(var i=Math.floor(e/32),a=Math.floor(r/32),o=this.bits,s=i;s<=a;s++){var l=s>i?0:e&31,c=s<a?31:r&31,f=(2<<c)-(1<<l)&4294967295;if((o[s]&f)!==(n?f:0))return!1}return!0},t.prototype.appendBit=function(e){this.ensureCapacity(this.size+1),e&&(this.bits[Math.floor(this.size/32)]|=1<<(this.size&31)),this.size++},t.prototype.appendBits=function(e,r){if(r<0||r>32)throw new F("Num bits must be between 0 and 32");this.ensureCapacity(this.size+r);for(var n=r;n>0;n--)this.appendBit((e>>n-1&1)===1)},t.prototype.appendBitArray=function(e){var r=e.size;this.ensureCapacity(this.size+r);for(var n=0;n<r;n++)this.appendBit(e.get(n))},t.prototype.xor=function(e){if(this.size!==e.size)throw new F("Sizes don't match");for(var r=this.bits,n=0,i=r.length;n<i;n++)r[n]^=e.bits[n]},t.prototype.toBytes=function(e,r,n,i){for(var a=0;a<i;a++){for(var o=0,s=0;s<8;s++)this.get(e)&&(o|=1<<7-s),e++;r[n+a]=o}},t.prototype.getBitArray=function(){return this.bits},t.prototype.reverse=function(){for(var e=new Int32Array(this.bits.length),r=Math.floor((this.size-1)/32),n=r+1,i=this.bits,a=0;a<n;a++){var o=i[a];o=o>>1&1431655765|(o&1431655765)<<1,o=o>>2&858993459|(o&858993459)<<2,o=o>>4&252645135|(o&252645135)<<4,o=o>>8&16711935|(o&16711935)<<8,o=o>>16&65535|(o&65535)<<16,e[r-a]=o}if(this.size!==n*32){for(var s=n*32-this.size,l=e[0]>>>s,a=1;a<n;a++){var c=e[a];l|=c<<32-s,e[a-1]=l,l=c>>>s}e[n-1]=l}this.bits=e},t.makeArray=function(e){return new Int32Array(Math.floor((e+31)/32))},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.size===r.size&&De.equals(this.bits,r.bits)},t.prototype.hashCode=function(){return 31*this.size+De.hashCode(this.bits)},t.prototype.toString=function(){for(var e="",r=0,n=this.size;r<n;r++)(r&7)===0&&(e+=" "),e+=this.get(r)?"X":".";return e},t.prototype.clone=function(){return new t(this.size,this.bits.slice())},t})(),Sn;(function(t){t[t.OTHER=0]="OTHER",t[t.PURE_BARCODE=1]="PURE_BARCODE",t[t.POSSIBLE_FORMATS=2]="POSSIBLE_FORMATS",t[t.TRY_HARDER=3]="TRY_HARDER",t[t.CHARACTER_SET=4]="CHARACTER_SET",t[t.ALLOWED_LENGTHS=5]="ALLOWED_LENGTHS",t[t.ASSUME_CODE_39_CHECK_DIGIT=6]="ASSUME_CODE_39_CHECK_DIGIT",t[t.ASSUME_GS1=7]="ASSUME_GS1",t[t.RETURN_CODABAR_START_END=8]="RETURN_CODABAR_START_END",t[t.NEED_RESULT_POINT_CALLBACK=9]="NEED_RESULT_POINT_CALLBACK",t[t.ALLOWED_EAN_EXTENSIONS=10]="ALLOWED_EAN_EXTENSIONS"})(Sn||(Sn={}));const le=Sn;var Zu=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),R=(function(t){Zu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.getFormatInstance=function(){return new e},e.kind="FormatException",e})(be),qu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Z;(function(t){t[t.Cp437=0]="Cp437",t[t.ISO8859_1=1]="ISO8859_1",t[t.ISO8859_2=2]="ISO8859_2",t[t.ISO8859_3=3]="ISO8859_3",t[t.ISO8859_4=4]="ISO8859_4",t[t.ISO8859_5=5]="ISO8859_5",t[t.ISO8859_6=6]="ISO8859_6",t[t.ISO8859_7=7]="ISO8859_7",t[t.ISO8859_8=8]="ISO8859_8",t[t.ISO8859_9=9]="ISO8859_9",t[t.ISO8859_10=10]="ISO8859_10",t[t.ISO8859_11=11]="ISO8859_11",t[t.ISO8859_13=12]="ISO8859_13",t[t.ISO8859_14=13]="ISO8859_14",t[t.ISO8859_15=14]="ISO8859_15",t[t.ISO8859_16=15]="ISO8859_16",t[t.SJIS=16]="SJIS",t[t.Cp1250=17]="Cp1250",t[t.Cp1251=18]="Cp1251",t[t.Cp1252=19]="Cp1252",t[t.Cp1256=20]="Cp1256",t[t.UnicodeBigUnmarked=21]="UnicodeBigUnmarked",t[t.UTF8=22]="UTF8",t[t.ASCII=23]="ASCII",t[t.Big5=24]="Big5",t[t.GB18030=25]="GB18030",t[t.EUC_KR=26]="EUC_KR"})(Z||(Z={}));var de=(function(){function t(e,r,n){for(var i,a,o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];this.valueIdentifier=e,this.name=n,typeof r=="number"?this.values=Int32Array.from([r]):this.values=r,this.otherEncodingNames=o,t.VALUE_IDENTIFIER_TO_ECI.set(e,this),t.NAME_TO_ECI.set(n,this);for(var l=this.values,c=0,f=l.length;c!==f;c++){var d=l[c];t.VALUES_TO_ECI.set(d,this)}try{for(var v=qu(o),h=v.next();!h.done;h=v.next()){var p=h.value;t.NAME_TO_ECI.set(p,this)}}catch(g){i={error:g}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}}return t.prototype.getValueIdentifier=function(){return this.valueIdentifier},t.prototype.getName=function(){return this.name},t.prototype.getValue=function(){return this.values[0]},t.getCharacterSetECIByValue=function(e){if(e<0||e>=900)throw new R("incorect value");var r=t.VALUES_TO_ECI.get(e);if(r===void 0)throw new R("incorect value");return r},t.getCharacterSetECIByName=function(e){var r=t.NAME_TO_ECI.get(e);if(r===void 0)throw new R("incorect value");return r},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.getName()===r.getName()},t.VALUE_IDENTIFIER_TO_ECI=new Map,t.VALUES_TO_ECI=new Map,t.NAME_TO_ECI=new Map,t.Cp437=new t(Z.Cp437,Int32Array.from([0,2]),"Cp437"),t.ISO8859_1=new t(Z.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),t.ISO8859_2=new t(Z.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),t.ISO8859_3=new t(Z.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),t.ISO8859_4=new t(Z.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),t.ISO8859_5=new t(Z.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),t.ISO8859_6=new t(Z.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),t.ISO8859_7=new t(Z.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),t.ISO8859_8=new t(Z.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),t.ISO8859_9=new t(Z.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),t.ISO8859_10=new t(Z.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),t.ISO8859_11=new t(Z.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),t.ISO8859_13=new t(Z.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),t.ISO8859_14=new t(Z.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),t.ISO8859_15=new t(Z.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),t.ISO8859_16=new t(Z.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),t.SJIS=new t(Z.SJIS,20,"SJIS","Shift_JIS"),t.Cp1250=new t(Z.Cp1250,21,"Cp1250","windows-1250"),t.Cp1251=new t(Z.Cp1251,22,"Cp1251","windows-1251"),t.Cp1252=new t(Z.Cp1252,23,"Cp1252","windows-1252"),t.Cp1256=new t(Z.Cp1256,24,"Cp1256","windows-1256"),t.UnicodeBigUnmarked=new t(Z.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),t.UTF8=new t(Z.UTF8,26,"UTF8","UTF-8"),t.ASCII=new t(Z.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),t.Big5=new t(Z.Big5,28,"Big5"),t.GB18030=new t(Z.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),t.EUC_KR=new t(Z.EUC_KR,30,"EUC_KR","EUC-KR"),t})(),Qu=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Nr=(function(t){Qu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="UnsupportedOperationException",e})(be),je=(function(){function t(){}return t.decode=function(e,r){var n=this.encodingName(r);return this.customDecoder?this.customDecoder(e,n):typeof TextDecoder>"u"||this.shouldDecodeOnFallback(n)?this.decodeFallback(e,n):new TextDecoder(n).decode(e)},t.shouldDecodeOnFallback=function(e){return!t.isBrowser()&&e==="ISO-8859-1"},t.encode=function(e,r){var n=this.encodingName(r);return this.customEncoder?this.customEncoder(e,n):typeof TextEncoder>"u"?this.encodeFallback(e):new TextEncoder().encode(e)},t.isBrowser=function(){return typeof window<"u"&&{}.toString.call(window)==="[object Window]"},t.encodingName=function(e){return typeof e=="string"?e:e.getName()},t.encodingCharacterSet=function(e){return e instanceof de?e:de.getCharacterSetECIByName(e)},t.decodeFallback=function(e,r){var n=this.encodingCharacterSet(r);if(t.isDecodeFallbackSupported(n)){for(var i="",a=0,o=e.length;a<o;a++){var s=e[a].toString(16);s.length<2&&(s="0"+s),i+="%"+s}return decodeURIComponent(i)}if(n.equals(de.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(e.buffer));throw new Nr("Encoding "+this.encodingName(r)+" not supported by fallback.")},t.isDecodeFallbackSupported=function(e){return e.equals(de.UTF8)||e.equals(de.ISO8859_1)||e.equals(de.ASCII)},t.encodeFallback=function(e){for(var r=btoa(unescape(encodeURIComponent(e))),n=r.split(""),i=[],a=0;a<n.length;a++)i.push(n[a].charCodeAt(0));return new Uint8Array(i)},t})(),re=(function(){function t(){}return t.castAsNonUtf8Char=function(e,r){r===void 0&&(r=null);var n=r?r.getName():this.ISO88591;return je.decode(new Uint8Array([e]),n)},t.guessEncoding=function(e,r){if(r!=null&&r.get(le.CHARACTER_SET)!==void 0)return r.get(le.CHARACTER_SET).toString();for(var n=e.length,i=!0,a=!0,o=!0,s=0,l=0,c=0,f=0,d=0,v=0,h=0,p=0,g=0,y=0,w=0,m=e.length>3&&e[0]===239&&e[1]===187&&e[2]===191,A=0;A<n&&(i||a||o);A++){var E=e[A]&255;o&&(s>0?(E&128)===0?o=!1:s--:(E&128)!==0&&((E&64)===0?o=!1:(s++,(E&32)===0?l++:(s++,(E&16)===0?c++:(s++,(E&8)===0?f++:o=!1))))),i&&(E>127&&E<160?i=!1:E>159&&(E<192||E===215||E===247)&&w++),a&&(d>0?E<64||E===127||E>252?a=!1:d--:E===128||E===160||E>239?a=!1:E>160&&E<224?(v++,p=0,h++,h>g&&(g=h)):E>127?(d++,h=0,p++,p>y&&(y=p)):(h=0,p=0))}return o&&s>0&&(o=!1),a&&d>0&&(a=!1),o&&(m||l+c+f>0)?t.UTF8:a&&(t.ASSUME_SHIFT_JIS||g>=3||y>=3)?t.SHIFT_JIS:i&&a?g===2&&v===2||w*10>=n?t.SHIFT_JIS:t.ISO88591:i?t.ISO88591:a?t.SHIFT_JIS:o?t.UTF8:t.PLATFORM_DEFAULT_ENCODING},t.format=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=-1;function a(s,l,c,f,d,v){if(s==="%%")return"%";if(r[++i]!==void 0){s=f?parseInt(f.substr(1)):void 0;var h=d?parseInt(d.substr(1)):void 0,p;switch(v){case"s":p=r[i];break;case"c":p=r[i][0];break;case"f":p=parseFloat(r[i]).toFixed(s);break;case"p":p=parseFloat(r[i]).toPrecision(s);break;case"e":p=parseFloat(r[i]).toExponential(s);break;case"x":p=parseInt(r[i]).toString(h||16);break;case"d":p=parseFloat(parseInt(r[i],h||10).toPrecision(s)).toFixed(0);break}p=typeof p=="object"?JSON.stringify(p):(+p).toString(h);for(var g=parseInt(c),y=c&&c[0]+""=="0"?"0":" ";p.length<g;)p=l!==void 0?p+y:y+p;return p}}var o=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return e.replace(o,a)},t.getBytes=function(e,r){return je.encode(e,r)},t.getCharCode=function(e,r){return r===void 0&&(r=0),e.charCodeAt(r)},t.getCharAt=function(e){return String.fromCharCode(e)},t.SHIFT_JIS=de.SJIS.getName(),t.GB2312="GB2312",t.ISO88591=de.ISO8859_1.getName(),t.EUC_JP="EUC_JP",t.UTF8=de.UTF8.getName(),t.PLATFORM_DEFAULT_ENCODING=t.UTF8,t.ASSUME_SHIFT_JIS=!1,t})(),J=(function(){function t(e){e===void 0&&(e=""),this.value=e}return t.prototype.enableDecoding=function(e){return this.encoding=e,this},t.prototype.append=function(e){return typeof e=="string"?this.value+=e.toString():this.encoding?this.value+=re.castAsNonUtf8Char(e,this.encoding):this.value+=String.fromCharCode(e),this},t.prototype.appendChars=function(e,r,n){for(var i=r;r<r+n;i++)this.append(e[i]);return this},t.prototype.length=function(){return this.value.length},t.prototype.charAt=function(e){return this.value.charAt(e)},t.prototype.deleteCharAt=function(e){this.value=this.value.substr(0,e)+this.value.substring(e+1)},t.prototype.setCharAt=function(e,r){this.value=this.value.substr(0,e)+r+this.value.substr(e+1)},t.prototype.substring=function(e,r){return this.value.substring(e,r)},t.prototype.setLengthToZero=function(){this.value=""},t.prototype.toString=function(){return this.value},t.prototype.insert=function(e,r){this.value=this.value.substr(0,e)+r+this.value.substr(e+r.length)},t})(),Ze=(function(){function t(e,r,n,i){if(this.width=e,this.height=r,this.rowSize=n,this.bits=i,r==null&&(r=e),this.height=r,e<1||r<1)throw new F("Both dimensions must be greater than 0");n==null&&(n=Math.floor((e+31)/32)),this.rowSize=n,i==null&&(this.bits=new Int32Array(this.rowSize*this.height))}return t.parseFromBooleanArray=function(e){for(var r=e.length,n=e[0].length,i=new t(n,r),a=0;a<r;a++)for(var o=e[a],s=0;s<n;s++)o[s]&&i.set(s,a);return i},t.parseFromString=function(e,r,n){if(e===null)throw new F("stringRepresentation cannot be null");for(var i=new Array(e.length),a=0,o=0,s=-1,l=0,c=0;c<e.length;)if(e.charAt(c)===`
13
+ `||e.charAt(c)==="\r"){if(a>o){if(s===-1)s=a-o;else if(a-o!==s)throw new F("row lengths do not match");o=a,l++}c++}else if(e.substring(c,c+r.length)===r)c+=r.length,i[a]=!0,a++;else if(e.substring(c,c+n.length)===n)c+=n.length,i[a]=!1,a++;else throw new F("illegal character encountered: "+e.substring(c));if(a>o){if(s===-1)s=a-o;else if(a-o!==s)throw new F("row lengths do not match");l++}for(var f=new t(s,l),d=0;d<a;d++)i[d]&&f.set(Math.floor(d%s),Math.floor(d/s));return f},t.prototype.get=function(e,r){var n=r*this.rowSize+Math.floor(e/32);return(this.bits[n]>>>(e&31)&1)!==0},t.prototype.set=function(e,r){var n=r*this.rowSize+Math.floor(e/32);this.bits[n]|=1<<(e&31)&4294967295},t.prototype.unset=function(e,r){var n=r*this.rowSize+Math.floor(e/32);this.bits[n]&=~(1<<(e&31)&4294967295)},t.prototype.flip=function(e,r){var n=r*this.rowSize+Math.floor(e/32);this.bits[n]^=1<<(e&31)&4294967295},t.prototype.xor=function(e){if(this.width!==e.getWidth()||this.height!==e.getHeight()||this.rowSize!==e.getRowSize())throw new F("input matrix dimensions do not match");for(var r=new pe(Math.floor(this.width/32)+1),n=this.rowSize,i=this.bits,a=0,o=this.height;a<o;a++)for(var s=a*n,l=e.getRow(a,r).getBitArray(),c=0;c<n;c++)i[s+c]^=l[c]},t.prototype.clear=function(){for(var e=this.bits,r=e.length,n=0;n<r;n++)e[n]=0},t.prototype.setRegion=function(e,r,n,i){if(r<0||e<0)throw new F("Left and top must be nonnegative");if(i<1||n<1)throw new F("Height and width must be at least 1");var a=e+n,o=r+i;if(o>this.height||a>this.width)throw new F("The region must fit inside the matrix");for(var s=this.rowSize,l=this.bits,c=r;c<o;c++)for(var f=c*s,d=e;d<a;d++)l[f+Math.floor(d/32)]|=1<<(d&31)&4294967295},t.prototype.getRow=function(e,r){r==null||r.getSize()<this.width?r=new pe(this.width):r.clear();for(var n=this.rowSize,i=this.bits,a=e*n,o=0;o<n;o++)r.setBulk(o*32,i[a+o]);return r},t.prototype.setRow=function(e,r){ne.arraycopy(r.getBitArray(),0,this.bits,e*this.rowSize,this.rowSize)},t.prototype.rotate180=function(){for(var e=this.getWidth(),r=this.getHeight(),n=new pe(e),i=new pe(e),a=0,o=Math.floor((r+1)/2);a<o;a++)n=this.getRow(a,n),i=this.getRow(r-1-a,i),n.reverse(),i.reverse(),this.setRow(a,i),this.setRow(r-1-a,n)},t.prototype.getEnclosingRectangle=function(){for(var e=this.width,r=this.height,n=this.rowSize,i=this.bits,a=e,o=r,s=-1,l=-1,c=0;c<r;c++)for(var f=0;f<n;f++){var d=i[c*n+f];if(d!==0){if(c<o&&(o=c),c>l&&(l=c),f*32<a){for(var v=0;(d<<31-v&4294967295)===0;)v++;f*32+v<a&&(a=f*32+v)}if(f*32+31>s){for(var v=31;!(d>>>v);)v--;f*32+v>s&&(s=f*32+v)}}}return s<a||l<o?null:Int32Array.from([a,o,s-a+1,l-o+1])},t.prototype.getTopLeftOnBit=function(){for(var e=this.rowSize,r=this.bits,n=0;n<r.length&&r[n]===0;)n++;if(n===r.length)return null;for(var i=n/e,a=n%e*32,o=r[n],s=0;(o<<31-s&4294967295)===0;)s++;return a+=s,Int32Array.from([a,i])},t.prototype.getBottomRightOnBit=function(){for(var e=this.rowSize,r=this.bits,n=r.length-1;n>=0&&r[n]===0;)n--;if(n<0)return null;for(var i=Math.floor(n/e),a=Math.floor(n%e)*32,o=r[n],s=31;!(o>>>s);)s--;return a+=s,Int32Array.from([a,i])},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.getRowSize=function(){return this.rowSize},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.width===r.width&&this.height===r.height&&this.rowSize===r.rowSize&&De.equals(this.bits,r.bits)},t.prototype.hashCode=function(){var e=this.width;return e=31*e+this.width,e=31*e+this.height,e=31*e+this.rowSize,e=31*e+De.hashCode(this.bits),e},t.prototype.toString=function(e,r,n){return e===void 0&&(e="X "),r===void 0&&(r=" "),n===void 0&&(n=`
14
+ `),this.buildToString(e,r,n)},t.prototype.buildToString=function(e,r,n){for(var i=new J,a=0,o=this.height;a<o;a++){for(var s=0,l=this.width;s<l;s++)i.append(this.get(s,a)?e:r);i.append(n)}return i.toString()},t.prototype.clone=function(){return new t(this.width,this.height,this.rowSize,this.bits.slice())},t})(),Ju=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),I=(function(t){Ju(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.getNotFoundInstance=function(){return new e},e.kind="NotFoundException",e})(be),ec=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),tc=(function(t){ec(e,t);function e(r){var n=t.call(this,r)||this;return n.luminances=e.EMPTY,n.buckets=new Int32Array(e.LUMINANCE_BUCKETS),n}return e.prototype.getBlackRow=function(r,n){var i=this.getLuminanceSource(),a=i.getWidth();n==null||n.getSize()<a?n=new pe(a):n.clear(),this.initArrays(a);for(var o=i.getRow(r,this.luminances),s=this.buckets,l=0;l<a;l++)s[(o[l]&255)>>e.LUMINANCE_SHIFT]++;var c=e.estimateBlackPoint(s);if(a<3)for(var l=0;l<a;l++)(o[l]&255)<c&&n.set(l);else for(var f=o[0]&255,d=o[1]&255,l=1;l<a-1;l++){var v=o[l+1]&255;(d*4-f-v)/2<c&&n.set(l),f=d,d=v}return n},e.prototype.getBlackMatrix=function(){var r=this.getLuminanceSource(),n=r.getWidth(),i=r.getHeight(),a=new Ze(n,i);this.initArrays(n);for(var o=this.buckets,s=1;s<5;s++)for(var l=Math.floor(i*s/5),c=r.getRow(l,this.luminances),f=Math.floor(n*4/5),d=Math.floor(n/5);d<f;d++){var v=c[d]&255;o[v>>e.LUMINANCE_SHIFT]++}for(var h=e.estimateBlackPoint(o),p=r.getMatrix(),s=0;s<i;s++)for(var g=s*n,d=0;d<n;d++){var v=p[g+d]&255;v<h&&a.set(d,s)}return a},e.prototype.createBinarizer=function(r){return new e(r)},e.prototype.initArrays=function(r){this.luminances.length<r&&(this.luminances=new Uint8ClampedArray(r));for(var n=this.buckets,i=0;i<e.LUMINANCE_BUCKETS;i++)n[i]=0},e.estimateBlackPoint=function(r){for(var n=r.length,i=0,a=0,o=0,s=0;s<n;s++)r[s]>o&&(a=s,o=r[s]),r[s]>i&&(i=r[s]);for(var l=0,c=0,s=0;s<n;s++){var f=s-a,d=r[s]*f*f;d>c&&(l=s,c=d)}if(a>l){var v=a;a=l,l=v}if(l-a<=n/16)throw new I;for(var h=l-1,p=-1,s=l-1;s>a;s--){var g=s-a,d=g*g*(l-s)*(i-r[s]);d>p&&(h=s,p=d)}return h<<e.LUMINANCE_SHIFT},e.LUMINANCE_BITS=5,e.LUMINANCE_SHIFT=8-e.LUMINANCE_BITS,e.LUMINANCE_BUCKETS=1<<e.LUMINANCE_BITS,e.EMPTY=Uint8ClampedArray.from([0]),e})(Xu),rc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),nc=(function(t){rc(e,t);function e(r){var n=t.call(this,r)||this;return n.matrix=null,n}return e.prototype.getBlackMatrix=function(){if(this.matrix!==null)return this.matrix;var r=this.getLuminanceSource(),n=r.getWidth(),i=r.getHeight();if(n>=e.MINIMUM_DIMENSION&&i>=e.MINIMUM_DIMENSION){var a=r.getMatrix(),o=n>>e.BLOCK_SIZE_POWER;(n&e.BLOCK_SIZE_MASK)!==0&&o++;var s=i>>e.BLOCK_SIZE_POWER;(i&e.BLOCK_SIZE_MASK)!==0&&s++;var l=e.calculateBlackPoints(a,o,s,n,i),c=new Ze(n,i);e.calculateThresholdForBlock(a,o,s,n,i,l,c),this.matrix=c}else this.matrix=t.prototype.getBlackMatrix.call(this);return this.matrix},e.prototype.createBinarizer=function(r){return new e(r)},e.calculateThresholdForBlock=function(r,n,i,a,o,s,l){for(var c=o-e.BLOCK_SIZE,f=a-e.BLOCK_SIZE,d=0;d<i;d++){var v=d<<e.BLOCK_SIZE_POWER;v>c&&(v=c);for(var h=e.cap(d,2,i-3),p=0;p<n;p++){var g=p<<e.BLOCK_SIZE_POWER;g>f&&(g=f);for(var y=e.cap(p,2,n-3),w=0,m=-2;m<=2;m++){var A=s[h+m];w+=A[y-2]+A[y-1]+A[y]+A[y+1]+A[y+2]}var E=w/25;e.thresholdBlock(r,g,v,E,a,l)}}},e.cap=function(r,n,i){return r<n?n:r>i?i:r},e.thresholdBlock=function(r,n,i,a,o,s){for(var l=0,c=i*o+n;l<e.BLOCK_SIZE;l++,c+=o)for(var f=0;f<e.BLOCK_SIZE;f++)(r[c+f]&255)<=a&&s.set(n+f,i+l)},e.calculateBlackPoints=function(r,n,i,a,o){for(var s=o-e.BLOCK_SIZE,l=a-e.BLOCK_SIZE,c=new Array(i),f=0;f<i;f++){c[f]=new Int32Array(n);var d=f<<e.BLOCK_SIZE_POWER;d>s&&(d=s);for(var v=0;v<n;v++){var h=v<<e.BLOCK_SIZE_POWER;h>l&&(h=l);for(var p=0,g=255,y=0,w=0,m=d*a+h;w<e.BLOCK_SIZE;w++,m+=a){for(var A=0;A<e.BLOCK_SIZE;A++){var E=r[m+A]&255;p+=E,E<g&&(g=E),E>y&&(y=E)}if(y-g>e.MIN_DYNAMIC_RANGE)for(w++,m+=a;w<e.BLOCK_SIZE;w++,m+=a)for(var A=0;A<e.BLOCK_SIZE;A++)p+=r[m+A]&255}var C=p>>e.BLOCK_SIZE_POWER*2;if(y-g<=e.MIN_DYNAMIC_RANGE&&(C=g/2,f>0&&v>0)){var b=(c[f-1][v]+2*c[f][v-1]+c[f-1][v-1])/4;g<b&&(C=b)}c[f][v]=C}}return c},e.BLOCK_SIZE_POWER=3,e.BLOCK_SIZE=1<<e.BLOCK_SIZE_POWER,e.BLOCK_SIZE_MASK=e.BLOCK_SIZE-1,e.MINIMUM_DIMENSION=e.BLOCK_SIZE*5,e.MIN_DYNAMIC_RANGE=24,e})(tc),zr=(function(){function t(e,r){this.width=e,this.height=r}return t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.isCropSupported=function(){return!1},t.prototype.crop=function(e,r,n,i){throw new Nr("This luminance source does not support cropping.")},t.prototype.isRotateSupported=function(){return!1},t.prototype.rotateCounterClockwise=function(){throw new Nr("This luminance source does not support rotation by 90 degrees.")},t.prototype.rotateCounterClockwise45=function(){throw new Nr("This luminance source does not support rotation by 45 degrees.")},t.prototype.toString=function(){for(var e=new Uint8ClampedArray(this.width),r=new J,n=0;n<this.height;n++){for(var i=this.getRow(n,e),a=0;a<this.width;a++){var o=i[a]&255,s=void 0;o<64?s="#":o<128?s="+":o<192?s=".":s=" ",r.append(s)}r.append(`
15
+ `)}return r.toString()},t})(),ic=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Xn=(function(t){ic(e,t);function e(r){var n=t.call(this,r.getWidth(),r.getHeight())||this;return n.delegate=r,n}return e.prototype.getRow=function(r,n){for(var i=this.delegate.getRow(r,n),a=this.getWidth(),o=0;o<a;o++)i[o]=255-(i[o]&255);return i},e.prototype.getMatrix=function(){for(var r=this.delegate.getMatrix(),n=this.getWidth()*this.getHeight(),i=new Uint8ClampedArray(n),a=0;a<n;a++)i[a]=255-(r[a]&255);return i},e.prototype.isCropSupported=function(){return this.delegate.isCropSupported()},e.prototype.crop=function(r,n,i,a){return new e(this.delegate.crop(r,n,i,a))},e.prototype.isRotateSupported=function(){return this.delegate.isRotateSupported()},e.prototype.invert=function(){return this.delegate},e.prototype.rotateCounterClockwise=function(){return new e(this.delegate.rotateCounterClockwise())},e.prototype.rotateCounterClockwise45=function(){return new e(this.delegate.rotateCounterClockwise45())},e})(zr),ac=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),oc=(function(t){ac(e,t);function e(r){var n=t.call(this,r.width,r.height)||this;return n.canvas=r,n.tempCanvasElement=null,n.buffer=e.makeBufferFromCanvasImageData(r),n}return e.makeBufferFromCanvasImageData=function(r){var n=r.getContext("2d").getImageData(0,0,r.width,r.height);return e.toGrayscaleBuffer(n.data,r.width,r.height)},e.toGrayscaleBuffer=function(r,n,i){for(var a=new Uint8ClampedArray(n*i),o=0,s=0,l=r.length;o<l;o+=4,s++){var c=void 0,f=r[o+3];if(f===0)c=255;else{var d=r[o],v=r[o+1],h=r[o+2];c=306*d+601*v+117*h+512>>10}a[s]=c}return a},e.prototype.getRow=function(r,n){if(r<0||r>=this.getHeight())throw new F("Requested row is outside the image: "+r);var i=this.getWidth(),a=r*i;return n===null?n=this.buffer.slice(a,a+i):(n.length<i&&(n=new Uint8ClampedArray(i)),n.set(this.buffer.slice(a,a+i))),n},e.prototype.getMatrix=function(){return this.buffer},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(r,n,i,a){return t.prototype.crop.call(this,r,n,i,a),this},e.prototype.isRotateSupported=function(){return!0},e.prototype.rotateCounterClockwise=function(){return this.rotate(-90),this},e.prototype.rotateCounterClockwise45=function(){return this.rotate(-45),this},e.prototype.getTempCanvasElement=function(){if(this.tempCanvasElement===null){var r=this.canvas.ownerDocument.createElement("canvas");r.width=this.canvas.width,r.height=this.canvas.height,this.tempCanvasElement=r}return this.tempCanvasElement},e.prototype.rotate=function(r){var n=this.getTempCanvasElement(),i=n.getContext("2d"),a=r*e.DEGREE_TO_RADIANS,o=this.canvas.width,s=this.canvas.height,l=Math.ceil(Math.abs(Math.cos(a))*o+Math.abs(Math.sin(a))*s),c=Math.ceil(Math.abs(Math.sin(a))*o+Math.abs(Math.cos(a))*s);return n.width=l,n.height=c,i.translate(l/2,c/2),i.rotate(a),i.drawImage(this.canvas,o/-2,s/-2),this.buffer=e.makeBufferFromCanvasImageData(n),this},e.prototype.invert=function(){return new Xn(this)},e.DEGREE_TO_RADIANS=Math.PI/180,e})(zr),sc=(function(){function t(e,r,n){this.deviceId=e,this.label=r,this.kind="videoinput",this.groupId=n||void 0}return t.prototype.toJSON=function(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}},t})(),Ae=function(t,e,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function s(f){try{c(n.next(f))}catch(d){o(d)}}function l(f){try{c(n.throw(f))}catch(d){o(d)}}function c(f){f.done?a(f.value):i(f.value).then(s,l)}c((n=n.apply(t,e||[])).next())})},_e=function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(f){return l([c,f])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(f){c=[6,f],i=0}finally{n=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},lc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ut=(function(){function t(e,r,n){r===void 0&&(r=500),this.reader=e,this.timeBetweenScansMillis=r,this._hints=n,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}return Object.defineProperty(t.prototype,"hasNavigator",{get:function(){return typeof navigator<"u"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMediaDevicesSuported",{get:function(){return this.hasNavigator&&!!navigator.mediaDevices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canEnumerateDevices",{get:function(){return!!(this.isMediaDevicesSuported&&navigator.mediaDevices.enumerateDevices)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timeBetweenDecodingAttempts",{get:function(){return this._timeBetweenDecodingAttempts},set:function(e){this._timeBetweenDecodingAttempts=e<0?0:e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hints",{get:function(){return this._hints},set:function(e){this._hints=e||null},enumerable:!1,configurable:!0}),t.prototype.listVideoInputDevices=function(){return Ae(this,void 0,void 0,function(){var e,r,n,i,a,o,s,l,c,f,d,v;return _e(this,function(h){switch(h.label){case 0:if(!this.hasNavigator)throw new Error("Can't enumerate devices, navigator is not present.");if(!this.canEnumerateDevices)throw new Error("Can't enumerate devices, method not supported.");return[4,navigator.mediaDevices.enumerateDevices()];case 1:e=h.sent(),r=[];try{for(n=lc(e),i=n.next();!i.done;i=n.next())a=i.value,o=a.kind==="video"?"videoinput":a.kind,o==="videoinput"&&(s=a.deviceId||a.id,l=a.label||"Video device "+(r.length+1),c=a.groupId,f={deviceId:s,label:l,kind:o,groupId:c},r.push(f))}catch(p){d={error:p}}finally{try{i&&!i.done&&(v=n.return)&&v.call(n)}finally{if(d)throw d.error}}return[2,r]}})})},t.prototype.getVideoInputDevices=function(){return Ae(this,void 0,void 0,function(){var e;return _e(this,function(r){switch(r.label){case 0:return[4,this.listVideoInputDevices()];case 1:return e=r.sent(),[2,e.map(function(n){return new sc(n.deviceId,n.label)})]}})})},t.prototype.findDeviceById=function(e){return Ae(this,void 0,void 0,function(){var r;return _e(this,function(n){switch(n.label){case 0:return[4,this.listVideoInputDevices()];case 1:return r=n.sent(),r?[2,r.find(function(i){return i.deviceId===e})]:[2,null]}})})},t.prototype.decodeFromInputVideoDevice=function(e,r){return Ae(this,void 0,void 0,function(){return _e(this,function(n){switch(n.label){case 0:return[4,this.decodeOnceFromVideoDevice(e,r)];case 1:return[2,n.sent()]}})})},t.prototype.decodeOnceFromVideoDevice=function(e,r){return Ae(this,void 0,void 0,function(){var n,i;return _e(this,function(a){switch(a.label){case 0:return this.reset(),e?n={deviceId:{exact:e}}:n={facingMode:"environment"},i={video:n},[4,this.decodeOnceFromConstraints(i,r)];case 1:return[2,a.sent()]}})})},t.prototype.decodeOnceFromConstraints=function(e,r){return Ae(this,void 0,void 0,function(){var n;return _e(this,function(i){switch(i.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return n=i.sent(),[4,this.decodeOnceFromStream(n,r)];case 2:return[2,i.sent()]}})})},t.prototype.decodeOnceFromStream=function(e,r){return Ae(this,void 0,void 0,function(){var n,i;return _e(this,function(a){switch(a.label){case 0:return this.reset(),[4,this.attachStreamToVideo(e,r)];case 1:return n=a.sent(),[4,this.decodeOnce(n)];case 2:return i=a.sent(),[2,i]}})})},t.prototype.decodeFromInputVideoDeviceContinuously=function(e,r,n){return Ae(this,void 0,void 0,function(){return _e(this,function(i){switch(i.label){case 0:return[4,this.decodeFromVideoDevice(e,r,n)];case 1:return[2,i.sent()]}})})},t.prototype.decodeFromVideoDevice=function(e,r,n){return Ae(this,void 0,void 0,function(){var i,a;return _e(this,function(o){switch(o.label){case 0:return e?i={deviceId:{exact:e}}:i={facingMode:"environment"},a={video:i},[4,this.decodeFromConstraints(a,r,n)];case 1:return[2,o.sent()]}})})},t.prototype.decodeFromConstraints=function(e,r,n){return Ae(this,void 0,void 0,function(){var i;return _e(this,function(a){switch(a.label){case 0:return[4,navigator.mediaDevices.getUserMedia(e)];case 1:return i=a.sent(),[4,this.decodeFromStream(i,r,n)];case 2:return[2,a.sent()]}})})},t.prototype.decodeFromStream=function(e,r,n){return Ae(this,void 0,void 0,function(){var i;return _e(this,function(a){switch(a.label){case 0:return this.reset(),[4,this.attachStreamToVideo(e,r)];case 1:return i=a.sent(),[4,this.decodeContinuously(i,n)];case 2:return[2,a.sent()]}})})},t.prototype.stopAsyncDecode=function(){this._stopAsyncDecode=!0},t.prototype.stopContinuousDecode=function(){this._stopContinuousDecode=!0},t.prototype.attachStreamToVideo=function(e,r){return Ae(this,void 0,void 0,function(){var n;return _e(this,function(i){switch(i.label){case 0:return n=this.prepareVideoElement(r),this.addVideoSource(n,e),this.videoElement=n,this.stream=e,[4,this.playVideoOnLoadAsync(n)];case 1:return i.sent(),[2,n]}})})},t.prototype.playVideoOnLoadAsync=function(e){var r=this;return new Promise(function(n,i){return r.playVideoOnLoad(e,function(){return n()})})},t.prototype.playVideoOnLoad=function(e,r){var n=this;this.videoEndedListener=function(){return n.stopStreams()},this.videoCanPlayListener=function(){return n.tryPlayVideo(e)},e.addEventListener("ended",this.videoEndedListener),e.addEventListener("canplay",this.videoCanPlayListener),e.addEventListener("playing",r),this.tryPlayVideo(e)},t.prototype.isVideoPlaying=function(e){return e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2},t.prototype.tryPlayVideo=function(e){return Ae(this,void 0,void 0,function(){return _e(this,function(r){switch(r.label){case 0:if(this.isVideoPlaying(e))return console.warn("Trying to play video that is already playing."),[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,e.play()];case 2:return r.sent(),[3,4];case 3:return r.sent(),console.warn("It was not possible to play the video."),[3,4];case 4:return[2]}})})},t.prototype.getMediaElement=function(e,r){var n=document.getElementById(e);if(!n)throw new Fe("element with id '"+e+"' not found");if(n.nodeName.toLowerCase()!==r.toLowerCase())throw new Fe("element with id '"+e+"' must be an "+r+" element");return n},t.prototype.decodeFromImage=function(e,r){if(!e&&!r)throw new Fe("either imageElement with a src set or an url must be provided");return r&&!e?this.decodeFromImageUrl(r):this.decodeFromImageElement(e)},t.prototype.decodeFromVideo=function(e,r){if(!e&&!r)throw new Fe("Either an element with a src set or an URL must be provided");return r&&!e?this.decodeFromVideoUrl(r):this.decodeFromVideoElement(e)},t.prototype.decodeFromVideoContinuously=function(e,r,n){if(e===void 0&&r===void 0)throw new Fe("Either an element with a src set or an URL must be provided");return r&&!e?this.decodeFromVideoUrlContinuously(r,n):this.decodeFromVideoElementContinuously(e,n)},t.prototype.decodeFromImageElement=function(e){if(!e)throw new Fe("An image element must be provided.");this.reset();var r=this.prepareImageElement(e);this.imageElement=r;var n;return this.isImageLoaded(r)?n=this.decodeOnce(r,!1,!0):n=this._decodeOnLoadImage(r),n},t.prototype.decodeFromVideoElement=function(e){var r=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideo(r)},t.prototype.decodeFromVideoElementContinuously=function(e,r){var n=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideoContinuously(n,r)},t.prototype._decodeFromVideoElementSetup=function(e){if(!e)throw new Fe("A video element must be provided.");this.reset();var r=this.prepareVideoElement(e);return this.videoElement=r,r},t.prototype.decodeFromImageUrl=function(e){if(!e)throw new Fe("An URL must be provided.");this.reset();var r=this.prepareImageElement();this.imageElement=r;var n=this._decodeOnLoadImage(r);return r.src=e,n},t.prototype.decodeFromVideoUrl=function(e){if(!e)throw new Fe("An URL must be provided.");this.reset();var r=this.prepareVideoElement(),n=this.decodeFromVideoElement(r);return r.src=e,n},t.prototype.decodeFromVideoUrlContinuously=function(e,r){if(!e)throw new Fe("An URL must be provided.");this.reset();var n=this.prepareVideoElement(),i=this.decodeFromVideoElementContinuously(n,r);return n.src=e,i},t.prototype._decodeOnLoadImage=function(e){var r=this;return new Promise(function(n,i){r.imageLoadedListener=function(){return r.decodeOnce(e,!1,!0).then(n,i)},e.addEventListener("load",r.imageLoadedListener)})},t.prototype._decodeOnLoadVideo=function(e){return Ae(this,void 0,void 0,function(){return _e(this,function(r){switch(r.label){case 0:return[4,this.playVideoOnLoadAsync(e)];case 1:return r.sent(),[4,this.decodeOnce(e)];case 2:return[2,r.sent()]}})})},t.prototype._decodeOnLoadVideoContinuously=function(e,r){return Ae(this,void 0,void 0,function(){return _e(this,function(n){switch(n.label){case 0:return[4,this.playVideoOnLoadAsync(e)];case 1:return n.sent(),this.decodeContinuously(e,r),[2]}})})},t.prototype.isImageLoaded=function(e){return!(!e.complete||e.naturalWidth===0)},t.prototype.prepareImageElement=function(e){var r;return typeof e>"u"&&(r=document.createElement("img"),r.width=200,r.height=200),typeof e=="string"&&(r=this.getMediaElement(e,"img")),e instanceof HTMLImageElement&&(r=e),r},t.prototype.prepareVideoElement=function(e){var r;return!e&&typeof document<"u"&&(r=document.createElement("video"),r.width=200,r.height=200),typeof e=="string"&&(r=this.getMediaElement(e,"video")),e instanceof HTMLVideoElement&&(r=e),r.setAttribute("autoplay","true"),r.setAttribute("muted","true"),r.setAttribute("playsinline","true"),r},t.prototype.decodeOnce=function(e,r,n){var i=this;r===void 0&&(r=!0),n===void 0&&(n=!0),this._stopAsyncDecode=!1;var a=function(o,s){if(i._stopAsyncDecode){s(new I("Video stream has ended before any code could be detected.")),i._stopAsyncDecode=void 0;return}try{var l=i.decode(e);o(l)}catch(v){var c=r&&v instanceof I,f=v instanceof me||v instanceof R,d=f&&n;if(c||d)return setTimeout(a,i._timeBetweenDecodingAttempts,o,s);s(v)}};return new Promise(function(o,s){return a(o,s)})},t.prototype.decodeContinuously=function(e,r){var n=this;this._stopContinuousDecode=!1;var i=function(){if(n._stopContinuousDecode){n._stopContinuousDecode=void 0;return}try{var a=n.decode(e);r(a,null),setTimeout(i,n.timeBetweenScansMillis)}catch(l){r(null,l);var o=l instanceof me||l instanceof R,s=l instanceof I;(o||s)&&setTimeout(i,n._timeBetweenDecodingAttempts)}};i()},t.prototype.decode=function(e){var r=this.createBinaryBitmap(e);return this.decodeBitmap(r)},t.prototype._isHTMLVideoElement=function(e){var r=e;return r.videoWidth!==0},t.prototype.createBinaryBitmap=function(e){this.getCaptureCanvasContext(e),this._isHTMLVideoElement(e)?this.drawFrameOnCanvas(e):this.drawImageOnCanvas(e);var r=this.getCaptureCanvas(e),n=new oc(r),i=new nc(n);return new zu(i)},t.prototype.getCaptureCanvasContext=function(e){if(!this.captureCanvasContext){var r=this.getCaptureCanvas(e),n=void 0;try{n=r.getContext("2d",{willReadFrequently:!0})}catch{n=r.getContext("2d")}this.captureCanvasContext=n}return this.captureCanvasContext},t.prototype.getCaptureCanvas=function(e){if(!this.captureCanvas){var r=this.createCaptureCanvas(e);this.captureCanvas=r}return this.captureCanvas},t.prototype.drawFrameOnCanvas=function(e,r,n){r===void 0&&(r={sx:0,sy:0,sWidth:e.videoWidth,sHeight:e.videoHeight,dx:0,dy:0,dWidth:e.videoWidth,dHeight:e.videoHeight}),n===void 0&&(n=this.captureCanvasContext),n.drawImage(e,r.sx,r.sy,r.sWidth,r.sHeight,r.dx,r.dy,r.dWidth,r.dHeight)},t.prototype.drawImageOnCanvas=function(e,r,n){r===void 0&&(r={sx:0,sy:0,sWidth:e.naturalWidth,sHeight:e.naturalHeight,dx:0,dy:0,dWidth:e.naturalWidth,dHeight:e.naturalHeight}),n===void 0&&(n=this.captureCanvasContext),n.drawImage(e,r.sx,r.sy,r.sWidth,r.sHeight,r.dx,r.dy,r.dWidth,r.dHeight)},t.prototype.decodeBitmap=function(e){return this.reader.decode(e,this._hints)},t.prototype.createCaptureCanvas=function(e){if(typeof document>"u")return this._destroyCaptureCanvas(),null;var r=document.createElement("canvas"),n,i;return typeof e<"u"&&(e instanceof HTMLVideoElement?(n=e.videoWidth,i=e.videoHeight):e instanceof HTMLImageElement&&(n=e.naturalWidth||e.width,i=e.naturalHeight||e.height)),r.style.width=n+"px",r.style.height=i+"px",r.width=n,r.height=i,r},t.prototype.stopStreams=function(){this.stream&&(this.stream.getVideoTracks().forEach(function(e){return e.stop()}),this.stream=void 0),this._stopAsyncDecode===!1&&this.stopAsyncDecode(),this._stopContinuousDecode===!1&&this.stopContinuousDecode()},t.prototype.reset=function(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()},t.prototype._destroyVideoElement=function(){this.videoElement&&(typeof this.videoEndedListener<"u"&&this.videoElement.removeEventListener("ended",this.videoEndedListener),typeof this.videoPlayingEventListener<"u"&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),typeof this.videoCanPlayListener<"u"&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)},t.prototype._destroyImageElement=function(){this.imageElement&&(this.imageLoadedListener!==void 0&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)},t.prototype._destroyCaptureCanvas=function(){this.captureCanvasContext=void 0,this.captureCanvas=void 0},t.prototype.addVideoSource=function(e,r){try{e.srcObject=r}catch{e.src=URL.createObjectURL(r)}},t.prototype.cleanVideoSource=function(e){try{e.srcObject=null}catch{e.src=""}this.videoElement.removeAttribute("src")},t})(),Be=(function(){function t(e,r,n,i,a,o){n===void 0&&(n=r==null?0:8*r.length),o===void 0&&(o=ne.currentTimeMillis()),this.text=e,this.rawBytes=r,this.numBits=n,this.resultPoints=i,this.format=a,this.timestamp=o,this.text=e,this.rawBytes=r,n==null?this.numBits=r==null?0:8*r.length:this.numBits=n,this.resultPoints=i,this.format=a,this.resultMetadata=null,o==null?this.timestamp=ne.currentTimeMillis():this.timestamp=o}return t.prototype.getText=function(){return this.text},t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.getBarcodeFormat=function(){return this.format},t.prototype.getResultMetadata=function(){return this.resultMetadata},t.prototype.putMetadata=function(e,r){this.resultMetadata===null&&(this.resultMetadata=new Map),this.resultMetadata.set(e,r)},t.prototype.putAllMetadata=function(e){e!==null&&(this.resultMetadata===null?this.resultMetadata=e:this.resultMetadata=new Map(e))},t.prototype.addResultPoints=function(e){var r=this.resultPoints;if(r===null)this.resultPoints=e;else if(e!==null&&e.length>0){var n=new Array(r.length+e.length);ne.arraycopy(r,0,n,0,r.length),ne.arraycopy(e,0,n,r.length,e.length),this.resultPoints=n}},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.toString=function(){return this.text},t})(),In;(function(t){t[t.AZTEC=0]="AZTEC",t[t.CODABAR=1]="CODABAR",t[t.CODE_39=2]="CODE_39",t[t.CODE_93=3]="CODE_93",t[t.CODE_128=4]="CODE_128",t[t.DATA_MATRIX=5]="DATA_MATRIX",t[t.EAN_8=6]="EAN_8",t[t.EAN_13=7]="EAN_13",t[t.ITF=8]="ITF",t[t.MAXICODE=9]="MAXICODE",t[t.PDF_417=10]="PDF_417",t[t.QR_CODE=11]="QR_CODE",t[t.RSS_14=12]="RSS_14",t[t.RSS_EXPANDED=13]="RSS_EXPANDED",t[t.UPC_A=14]="UPC_A",t[t.UPC_E=15]="UPC_E",t[t.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION"})(In||(In={}));const U=In;var On;(function(t){t[t.OTHER=0]="OTHER",t[t.ORIENTATION=1]="ORIENTATION",t[t.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",t[t.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",t[t.ISSUE_NUMBER=4]="ISSUE_NUMBER",t[t.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",t[t.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",t[t.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",t[t.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",t[t.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",t[t.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY"})(On||(On={}));const we=On;var Wr=(function(){function t(e,r,n,i,a,o){a===void 0&&(a=-1),o===void 0&&(o=-1),this.rawBytes=e,this.text=r,this.byteSegments=n,this.ecLevel=i,this.structuredAppendSequenceNumber=a,this.structuredAppendParity=o,this.numBits=e==null?0:8*e.length}return t.prototype.getRawBytes=function(){return this.rawBytes},t.prototype.getNumBits=function(){return this.numBits},t.prototype.setNumBits=function(e){this.numBits=e},t.prototype.getText=function(){return this.text},t.prototype.getByteSegments=function(){return this.byteSegments},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getErrorsCorrected=function(){return this.errorsCorrected},t.prototype.setErrorsCorrected=function(e){this.errorsCorrected=e},t.prototype.getErasures=function(){return this.erasures},t.prototype.setErasures=function(e){this.erasures=e},t.prototype.getOther=function(){return this.other},t.prototype.setOther=function(e){this.other=e},t.prototype.hasStructuredAppend=function(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0},t.prototype.getStructuredAppendParity=function(){return this.structuredAppendParity},t.prototype.getStructuredAppendSequenceNumber=function(){return this.structuredAppendSequenceNumber},t})(),tr=(function(){function t(){}return t.prototype.exp=function(e){return this.expTable[e]},t.prototype.log=function(e){if(e===0)throw new F;return this.logTable[e]},t.addOrSubtract=function(e,r){return e^r},t})(),ct=(function(){function t(e,r){if(r.length===0)throw new F;this.field=e;var n=r.length;if(n>1&&r[0]===0){for(var i=1;i<n&&r[i]===0;)i++;i===n?this.coefficients=Int32Array.from([0]):(this.coefficients=new Int32Array(n-i),ne.arraycopy(r,i,this.coefficients,0,this.coefficients.length))}else this.coefficients=r}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return this.coefficients[0]===0},t.prototype.getCoefficient=function(e){return this.coefficients[this.coefficients.length-1-e]},t.prototype.evaluateAt=function(e){if(e===0)return this.getCoefficient(0);var r=this.coefficients,n;if(e===1){n=0;for(var i=0,a=r.length;i!==a;i++){var o=r[i];n=tr.addOrSubtract(n,o)}return n}n=r[0];for(var s=r.length,l=this.field,i=1;i<s;i++)n=tr.addOrSubtract(l.multiply(e,n),r[i]);return n},t.prototype.addOrSubtract=function(e){if(!this.field.equals(e.field))throw new F("GenericGFPolys do not have same GenericGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var i=r;r=n,n=i}var a=new Int32Array(n.length),o=n.length-r.length;ne.arraycopy(n,0,a,0,o);for(var s=o;s<n.length;s++)a[s]=tr.addOrSubtract(r[s-o],n[s]);return new t(this.field,a)},t.prototype.multiply=function(e){if(!this.field.equals(e.field))throw new F("GenericGFPolys do not have same GenericGF field");if(this.isZero()||e.isZero())return this.field.getZero();for(var r=this.coefficients,n=r.length,i=e.coefficients,a=i.length,o=new Int32Array(n+a-1),s=this.field,l=0;l<n;l++)for(var c=r[l],f=0;f<a;f++)o[l+f]=tr.addOrSubtract(o[l+f],s.multiply(c,i[f]));return new t(s,o)},t.prototype.multiplyScalar=function(e){if(e===0)return this.field.getZero();if(e===1)return this;for(var r=this.coefficients.length,n=this.field,i=new Int32Array(r),a=this.coefficients,o=0;o<r;o++)i[o]=n.multiply(a[o],e);return new t(n,i)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new F;if(r===0)return this.field.getZero();for(var n=this.coefficients,i=n.length,a=new Int32Array(i+e),o=this.field,s=0;s<i;s++)a[s]=o.multiply(n[s],r);return new t(o,a)},t.prototype.divide=function(e){if(!this.field.equals(e.field))throw new F("GenericGFPolys do not have same GenericGF field");if(e.isZero())throw new F("Divide by 0");for(var r=this.field,n=r.getZero(),i=this,a=e.getCoefficient(e.getDegree()),o=r.inverse(a);i.getDegree()>=e.getDegree()&&!i.isZero();){var s=i.getDegree()-e.getDegree(),l=r.multiply(i.getCoefficient(i.getDegree()),o),c=e.multiplyByMonomial(s,l),f=r.buildMonomial(s,l);n=n.addOrSubtract(f),i=i.addOrSubtract(c)}return[n,i]},t.prototype.toString=function(){for(var e="",r=this.getDegree();r>=0;r--){var n=this.getCoefficient(r);if(n!==0){if(n<0?(e+=" - ",n=-n):e.length>0&&(e+=" + "),r===0||n!==1){var i=this.field.log(n);i===0?e+="1":i===1?e+="a":(e+="a^",e+=i)}r!==0&&(r===1?e+="x":(e+="x^",e+=r))}}return e},t})(),uc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),fa=(function(t){uc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ArithmeticException",e})(be),cc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ne=(function(t){cc(e,t);function e(r,n,i){var a=t.call(this)||this;a.primitive=r,a.size=n,a.generatorBase=i;for(var o=new Int32Array(n),s=1,l=0;l<n;l++)o[l]=s,s*=2,s>=n&&(s^=r,s&=n-1);a.expTable=o;for(var c=new Int32Array(n),l=0;l<n-1;l++)c[o[l]]=l;return a.logTable=c,a.zero=new ct(a,Int32Array.from([0])),a.one=new ct(a,Int32Array.from([1])),a}return e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(r,n){if(r<0)throw new F;if(n===0)return this.zero;var i=new Int32Array(r+1);return i[0]=n,new ct(this,i)},e.prototype.inverse=function(r){if(r===0)throw new fa;return this.expTable[this.size-this.logTable[r]-1]},e.prototype.multiply=function(r,n){return r===0||n===0?0:this.expTable[(this.logTable[r]+this.logTable[n])%(this.size-1)]},e.prototype.getSize=function(){return this.size},e.prototype.getGeneratorBase=function(){return this.generatorBase},e.prototype.toString=function(){return"GF(0x"+G.toHexString(this.primitive)+","+this.size+")"},e.prototype.equals=function(r){return r===this},e.AZTEC_DATA_12=new e(4201,4096,1),e.AZTEC_DATA_10=new e(1033,1024,1),e.AZTEC_DATA_6=new e(67,64,1),e.AZTEC_PARAM=new e(19,16,1),e.QR_CODE_FIELD_256=new e(285,256,0),e.DATA_MATRIX_FIELD_256=new e(301,256,1),e.AZTEC_DATA_8=e.DATA_MATRIX_FIELD_256,e.MAXICODE_FIELD_64=e.AZTEC_DATA_6,e})(tr),fc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),wr=(function(t){fc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ReedSolomonException",e})(be),dc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),hr=(function(t){dc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="IllegalStateException",e})(be),Xr=(function(){function t(e){this.field=e}return t.prototype.decode=function(e,r){for(var n=this.field,i=new ct(n,e),a=new Int32Array(r),o=!0,s=0;s<r;s++){var l=i.evaluateAt(n.exp(s+n.getGeneratorBase()));a[a.length-1-s]=l,l!==0&&(o=!1)}if(!o)for(var c=new ct(n,a),f=this.runEuclideanAlgorithm(n.buildMonomial(r,1),c,r),d=f[0],v=f[1],h=this.findErrorLocations(d),p=this.findErrorMagnitudes(v,h),s=0;s<h.length;s++){var g=e.length-1-n.log(h[s]);if(g<0)throw new wr("Bad error location");e[g]=Ne.addOrSubtract(e[g],p[s])}},t.prototype.runEuclideanAlgorithm=function(e,r,n){if(e.getDegree()<r.getDegree()){var i=e;e=r,r=i}for(var a=this.field,o=e,s=r,l=a.getZero(),c=a.getOne();s.getDegree()>=(n/2|0);){var f=o,d=l;if(o=s,l=c,o.isZero())throw new wr("r_{i-1} was zero");s=f;for(var v=a.getZero(),h=o.getCoefficient(o.getDegree()),p=a.inverse(h);s.getDegree()>=o.getDegree()&&!s.isZero();){var g=s.getDegree()-o.getDegree(),y=a.multiply(s.getCoefficient(s.getDegree()),p);v=v.addOrSubtract(a.buildMonomial(g,y)),s=s.addOrSubtract(o.multiplyByMonomial(g,y))}if(c=v.multiply(l).addOrSubtract(d),s.getDegree()>=o.getDegree())throw new hr("Division algorithm failed to reduce polynomial?")}var w=c.getCoefficient(0);if(w===0)throw new wr("sigmaTilde(0) was zero");var m=a.inverse(w),A=c.multiplyScalar(m),E=s.multiplyScalar(m);return[A,E]},t.prototype.findErrorLocations=function(e){var r=e.getDegree();if(r===1)return Int32Array.from([e.getCoefficient(1)]);for(var n=new Int32Array(r),i=0,a=this.field,o=1;o<a.getSize()&&i<r;o++)e.evaluateAt(o)===0&&(n[i]=a.inverse(o),i++);if(i!==r)throw new wr("Error locator degree does not match number of roots");return n},t.prototype.findErrorMagnitudes=function(e,r){for(var n=r.length,i=new Int32Array(n),a=this.field,o=0;o<n;o++){for(var s=a.inverse(r[o]),l=1,c=0;c<n;c++)if(o!==c){var f=a.multiply(r[c],s),d=(f&1)===0?f|1:f&-2;l=a.multiply(l,d)}i[o]=a.multiply(e.evaluateAt(s),a.inverse(l)),a.getGeneratorBase()!==0&&(i[o]=a.multiply(i[o],s))}return i},t})(),ge;(function(t){t[t.UPPER=0]="UPPER",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.DIGIT=3]="DIGIT",t[t.PUNCT=4]="PUNCT",t[t.BINARY=5]="BINARY"})(ge||(ge={}));var mi=(function(){function t(){}return t.prototype.decode=function(e){this.ddata=e;var r=e.getBits(),n=this.extractBits(r),i=this.correctBits(n),a=t.convertBoolArrayToByteArray(i),o=t.getEncodedData(i),s=new Wr(a,o,null,null);return s.setNumBits(i.length),s},t.highLevelDecode=function(e){return this.getEncodedData(e)},t.getEncodedData=function(e){for(var r=e.length,n=ge.UPPER,i=ge.UPPER,a="",o=0;o<r;)if(i===ge.BINARY){if(r-o<5)break;var s=t.readCode(e,o,5);if(o+=5,s===0){if(r-o<11)break;s=t.readCode(e,o,11)+31,o+=11}for(var l=0;l<s;l++){if(r-o<8){o=r;break}var c=t.readCode(e,o,8);a+=re.castAsNonUtf8Char(c),o+=8}i=n}else{var f=i===ge.DIGIT?4:5;if(r-o<f)break;var c=t.readCode(e,o,f);o+=f;var d=t.getCharacter(i,c);d.startsWith("CTRL_")?(n=i,i=t.getTable(d.charAt(5)),d.charAt(6)==="L"&&(n=i)):(a+=d,i=n)}return a},t.getTable=function(e){switch(e){case"L":return ge.LOWER;case"P":return ge.PUNCT;case"M":return ge.MIXED;case"D":return ge.DIGIT;case"B":return ge.BINARY;case"U":default:return ge.UPPER}},t.getCharacter=function(e,r){switch(e){case ge.UPPER:return t.UPPER_TABLE[r];case ge.LOWER:return t.LOWER_TABLE[r];case ge.MIXED:return t.MIXED_TABLE[r];case ge.PUNCT:return t.PUNCT_TABLE[r];case ge.DIGIT:return t.DIGIT_TABLE[r];default:throw new hr("Bad table")}},t.prototype.correctBits=function(e){var r,n;this.ddata.getNbLayers()<=2?(n=6,r=Ne.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(n=8,r=Ne.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(n=10,r=Ne.AZTEC_DATA_10):(n=12,r=Ne.AZTEC_DATA_12);var i=this.ddata.getNbDatablocks(),a=e.length/n;if(a<i)throw new R;for(var o=e.length%n,s=new Int32Array(a),l=0;l<a;l++,o+=n)s[l]=t.readCode(e,o,n);try{var c=new Xr(r);c.decode(s,a-i)}catch(y){throw new R(y)}for(var f=(1<<n)-1,d=0,l=0;l<i;l++){var v=s[l];if(v===0||v===f)throw new R;(v===1||v===f-1)&&d++}for(var h=new Array(i*n-d),p=0,l=0;l<i;l++){var v=s[l];if(v===1||v===f-1)h.fill(v>1,p,p+n-1),p+=n-1;else for(var g=n-1;g>=0;--g)h[p++]=(v&1<<g)!==0}return h},t.prototype.extractBits=function(e){var r=this.ddata.isCompact(),n=this.ddata.getNbLayers(),i=(r?11:14)+n*4,a=new Int32Array(i),o=new Array(this.totalBitsInLayer(n,r));if(r)for(var s=0;s<a.length;s++)a[s]=s;else for(var l=i+1+2*G.truncDivision(G.truncDivision(i,2)-1,15),c=i/2,f=G.truncDivision(l,2),s=0;s<c;s++){var d=s+G.truncDivision(s,15);a[c-s-1]=f-d-1,a[c+s]=f+d+1}for(var s=0,v=0;s<n;s++){for(var h=(n-s)*4+(r?9:12),p=s*2,g=i-1-p,y=0;y<h;y++)for(var w=y*2,m=0;m<2;m++)o[v+w+m]=e.get(a[p+m],a[p+y]),o[v+2*h+w+m]=e.get(a[p+y],a[g-m]),o[v+4*h+w+m]=e.get(a[g-m],a[g-y]),o[v+6*h+w+m]=e.get(a[g-y],a[p+m]);v+=h*8}return o},t.readCode=function(e,r,n){for(var i=0,a=r;a<r+n;a++)i<<=1,e[a]&&(i|=1);return i},t.readByte=function(e,r){var n=e.length-r;return n>=8?t.readCode(e,r,8):t.readCode(e,r,n)<<8-n},t.convertBoolArrayToByteArray=function(e){for(var r=new Uint8Array((e.length+7)/8),n=0;n<r.length;n++)r[n]=t.readByte(e,8*n);return r},t.prototype.totalBitsInLayer=function(e,r){return((r?88:112)+16*e)*e},t.UPPER_TABLE=["CTRL_PS"," ","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","CTRL_LL","CTRL_ML","CTRL_DL","CTRL_BS"],t.LOWER_TABLE=["CTRL_PS"," ","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","CTRL_US","CTRL_ML","CTRL_DL","CTRL_BS"],t.MIXED_TABLE=["CTRL_PS"," ","\\1","\\2","\\3","\\4","\\5","\\6","\\7","\b"," ",`
16
16
  `,"\\13","\f","\r","\\33","\\34","\\35","\\36","\\37","@","\\","^","_","`","|","~","\\177","CTRL_LL","CTRL_UL","CTRL_PL","CTRL_BS"],t.PUNCT_TABLE=["","\r",`\r
17
- `,". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],t.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],t})(),X=(function(){function t(){}return t.round=function(e){return isNaN(e)?0:e<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:e>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:e+(e<0?-.5:.5)|0},t.distance=function(e,r,n,i){var a=e-n,o=r-i;return Math.sqrt(a*a+o*o)},t.sum=function(e){for(var r=0,n=0,i=e.length;n!==i;n++){var a=e[n];r+=a}return r},t})(),Tn=(function(){function t(){}return t.floatToIntBits=function(e){return e},t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t})(),k=(function(){function t(e,r){this.x=e,this.y=r}return t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t.prototype.equals=function(e){if(e instanceof t){var r=e;return this.x===r.x&&this.y===r.y}return!1},t.prototype.hashCode=function(){return 31*Tn.floatToIntBits(this.x)+Tn.floatToIntBits(this.y)},t.prototype.toString=function(){return"("+this.x+","+this.y+")"},t.orderBestPatterns=function(e){var r=this.distance(e[0],e[1]),n=this.distance(e[1],e[2]),i=this.distance(e[0],e[2]),a,o,s;if(n>=r&&n>=i?(o=e[0],a=e[1],s=e[2]):i>=n&&i>=r?(o=e[1],a=e[0],s=e[2]):(o=e[2],a=e[0],s=e[1]),this.crossProductZ(a,o,s)<0){var l=a;a=s,s=l}e[0]=a,e[1]=o,e[2]=s},t.distance=function(e,r){return X.distance(e.x,e.y,r.x,r.y)},t.crossProductZ=function(e,r,n){var i=r.x,a=r.y;return(n.x-i)*(e.y-a)-(n.y-a)*(e.x-i)},t})(),Kn=(function(){function t(e,r){this.bits=e,this.points=r}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t})(),h1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),p1=(function(t){h1(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n)||this;return s.compact=i,s.nbDatablocks=a,s.nbLayers=o,s}return e.prototype.getNbLayers=function(){return this.nbLayers},e.prototype.getNbDatablocks=function(){return this.nbDatablocks},e.prototype.isCompact=function(){return this.compact},e})(Kn),Nn=(function(){function t(e,r,n,i){this.image=e,this.height=e.getHeight(),this.width=e.getWidth(),r==null&&(r=t.INIT_SIZE),n==null&&(n=e.getWidth()/2|0),i==null&&(i=e.getHeight()/2|0);var a=r/2|0;if(this.leftInit=n-a,this.rightInit=n+a,this.upInit=i-a,this.downInit=i+a,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new I}return t.prototype.detect=function(){for(var e=this.leftInit,r=this.rightInit,n=this.upInit,i=this.downInit,a=!1,o=!0,s=!1,l=!1,c=!1,f=!1,d=!1,p=this.width,h=this.height;o;){o=!1;for(var v=!0;(v||!l)&&r<p;)v=this.containsBlackPoint(n,i,r,!1),v?(r++,o=!0,l=!0):l||r++;if(r>=p){a=!0;break}for(var g=!0;(g||!c)&&i<h;)g=this.containsBlackPoint(e,r,i,!0),g?(i++,o=!0,c=!0):c||i++;if(i>=h){a=!0;break}for(var y=!0;(y||!f)&&e>=0;)y=this.containsBlackPoint(n,i,e,!1),y?(e--,o=!0,f=!0):f||e--;if(e<0){a=!0;break}for(var _=!0;(_||!d)&&n>=0;)_=this.containsBlackPoint(e,r,n,!0),_?(n--,o=!0,d=!0):d||n--;if(n<0){a=!0;break}o&&(s=!0)}if(!a&&s){for(var m=r-e,E=null,w=1;E===null&&w<m;w++)E=this.getBlackPointOnSegment(e,i-w,e+w,i);if(E==null)throw new I;for(var C=null,w=1;C===null&&w<m;w++)C=this.getBlackPointOnSegment(e,n+w,e+w,n);if(C==null)throw new I;for(var b=null,w=1;b===null&&w<m;w++)b=this.getBlackPointOnSegment(r,n+w,r-w,n);if(b==null)throw new I;for(var O=null,w=1;O===null&&w<m;w++)O=this.getBlackPointOnSegment(r,i-w,r-w,i);if(O==null)throw new I;return this.centerEdges(O,E,b,C)}else throw new I},t.prototype.getBlackPointOnSegment=function(e,r,n,i){for(var a=X.round(X.distance(e,r,n,i)),o=(n-e)/a,s=(i-r)/a,l=this.image,c=0;c<a;c++){var f=X.round(e+c*o),d=X.round(r+c*s);if(l.get(f,d))return new k(f,d)}return null},t.prototype.centerEdges=function(e,r,n,i){var a=e.getX(),o=e.getY(),s=r.getX(),l=r.getY(),c=n.getX(),f=n.getY(),d=i.getX(),p=i.getY(),h=t.CORR;return a<this.width/2?[new k(d-h,p+h),new k(s+h,l+h),new k(c-h,f-h),new k(a+h,o-h)]:[new k(d+h,p+h),new k(s+h,l-h),new k(c-h,f+h),new k(a-h,o-h)]},t.prototype.containsBlackPoint=function(e,r,n,i){var a=this.image;if(i){for(var o=e;o<=r;o++)if(a.get(o,n))return!0}else for(var s=e;s<=r;s++)if(a.get(n,s))return!0;return!1},t.INIT_SIZE=10,t.CORR=1,t})(),wi=(function(){function t(){}return t.checkAndNudgePoints=function(e,r){for(var n=e.getWidth(),i=e.getHeight(),a=!0,o=0;o<r.length&&a;o+=2){var s=Math.floor(r[o]),l=Math.floor(r[o+1]);if(s<-1||s>n||l<-1||l>i)throw new I;a=!1,s===-1?(r[o]=0,a=!0):s===n&&(r[o]=n-1,a=!0),l===-1?(r[o+1]=0,a=!0):l===i&&(r[o+1]=i-1,a=!0)}a=!0;for(var o=r.length-2;o>=0&&a;o-=2){var s=Math.floor(r[o]),l=Math.floor(r[o+1]);if(s<-1||s>n||l<-1||l>i)throw new I;a=!1,s===-1?(r[o]=0,a=!0):s===n&&(r[o]=n-1,a=!0),l===-1?(r[o+1]=0,a=!0):l===i&&(r[o+1]=i-1,a=!0)}},t})(),da=(function(){function t(e,r,n,i,a,o,s,l,c){this.a11=e,this.a21=r,this.a31=n,this.a12=i,this.a22=a,this.a32=o,this.a13=s,this.a23=l,this.a33=c}return t.quadrilateralToQuadrilateral=function(e,r,n,i,a,o,s,l,c,f,d,p,h,v,g,y){var _=t.quadrilateralToSquare(e,r,n,i,a,o,s,l),m=t.squareToQuadrilateral(c,f,d,p,h,v,g,y);return m.times(_)},t.prototype.transformPoints=function(e){for(var r=e.length,n=this.a11,i=this.a12,a=this.a13,o=this.a21,s=this.a22,l=this.a23,c=this.a31,f=this.a32,d=this.a33,p=0;p<r;p+=2){var h=e[p],v=e[p+1],g=a*h+l*v+d;e[p]=(n*h+o*v+c)/g,e[p+1]=(i*h+s*v+f)/g}},t.prototype.transformPointsWithValues=function(e,r){for(var n=this.a11,i=this.a12,a=this.a13,o=this.a21,s=this.a22,l=this.a23,c=this.a31,f=this.a32,d=this.a33,p=e.length,h=0;h<p;h++){var v=e[h],g=r[h],y=a*v+l*g+d;e[h]=(n*v+o*g+c)/y,r[h]=(i*v+s*g+f)/y}},t.squareToQuadrilateral=function(e,r,n,i,a,o,s,l){var c=e-n+a-s,f=r-i+o-l;if(c===0&&f===0)return new t(n-e,a-n,e,i-r,o-i,r,0,0,1);var d=n-a,p=s-a,h=i-o,v=l-o,g=d*v-p*h,y=(c*v-p*f)/g,_=(d*f-c*h)/g;return new t(n-e+y*n,s-e+_*s,e,i-r+y*i,l-r+_*l,r,y,_,1)},t.quadrilateralToSquare=function(e,r,n,i,a,o,s,l){return t.squareToQuadrilateral(e,r,n,i,a,o,s,l).buildAdjoint()},t.prototype.buildAdjoint=function(){return new t(this.a22*this.a33-this.a23*this.a32,this.a23*this.a31-this.a21*this.a33,this.a21*this.a32-this.a22*this.a31,this.a13*this.a32-this.a12*this.a33,this.a11*this.a33-this.a13*this.a31,this.a12*this.a31-this.a11*this.a32,this.a12*this.a23-this.a13*this.a22,this.a13*this.a21-this.a11*this.a23,this.a11*this.a22-this.a12*this.a21)},t.prototype.times=function(e){return new t(this.a11*e.a11+this.a21*e.a12+this.a31*e.a13,this.a11*e.a21+this.a21*e.a22+this.a31*e.a23,this.a11*e.a31+this.a21*e.a32+this.a31*e.a33,this.a12*e.a11+this.a22*e.a12+this.a32*e.a13,this.a12*e.a21+this.a22*e.a22+this.a32*e.a23,this.a12*e.a31+this.a22*e.a32+this.a32*e.a33,this.a13*e.a11+this.a23*e.a12+this.a33*e.a13,this.a13*e.a21+this.a23*e.a22+this.a33*e.a23,this.a13*e.a31+this.a23*e.a32+this.a33*e.a33)},t})(),v1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),g1=(function(t){v1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.sampleGrid=function(r,n,i,a,o,s,l,c,f,d,p,h,v,g,y,_,m,E,w){var C=da.quadrilateralToQuadrilateral(a,o,s,l,c,f,d,p,h,v,g,y,_,m,E,w);return this.sampleGridWithTransform(r,n,i,C)},e.prototype.sampleGridWithTransform=function(r,n,i,a){if(n<=0||i<=0)throw new I;for(var o=new qe(n,i),s=new Float32Array(2*n),l=0;l<i;l++){for(var c=s.length,f=l+.5,d=0;d<c;d+=2)s[d]=d/2+.5,s[d+1]=f;a.transformPoints(s),wi.checkAndNudgePoints(r,s);try{for(var d=0;d<c;d+=2)r.get(Math.floor(s[d]),Math.floor(s[d+1]))&&o.set(d/2,l)}catch{throw new I}}return o},e})(wi),jn=(function(){function t(){}return t.setGridSampler=function(e){t.gridSampler=e},t.getInstance=function(){return t.gridSampler},t.gridSampler=new g1,t})(),Se=(function(){function t(e,r){this.x=e,this.y=r}return t.prototype.toResultPoint=function(){return new k(this.getX(),this.getY())},t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t})(),x1=(function(){function t(e){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=e}return t.prototype.detect=function(){return this.detectMirror(!1)},t.prototype.detectMirror=function(e){var r=this.getMatrixCenter(),n=this.getBullsEyeCorners(r);if(e){var i=n[0];n[0]=n[2],n[2]=i}this.extractParameters(n);var a=this.sampleGrid(this.image,n[this.shift%4],n[(this.shift+1)%4],n[(this.shift+2)%4],n[(this.shift+3)%4]),o=this.getMatrixCornerPoints(n);return new p1(a,o,this.compact,this.nbDataBlocks,this.nbLayers)},t.prototype.extractParameters=function(e){if(!this.isValidPoint(e[0])||!this.isValidPoint(e[1])||!this.isValidPoint(e[2])||!this.isValidPoint(e[3]))throw new I;var r=2*this.nbCenterLayers,n=new Int32Array([this.sampleLine(e[0],e[1],r),this.sampleLine(e[1],e[2],r),this.sampleLine(e[2],e[3],r),this.sampleLine(e[3],e[0],r)]);this.shift=this.getRotation(n,r);for(var i=0,a=0;a<4;a++){var o=n[(this.shift+a)%4];this.compact?(i<<=7,i+=o>>1&127):(i<<=10,i+=(o>>2&992)+(o>>1&31))}var s=this.getCorrectedParameterData(i,this.compact);this.compact?(this.nbLayers=(s>>6)+1,this.nbDataBlocks=(s&63)+1):(this.nbLayers=(s>>11)+1,this.nbDataBlocks=(s&2047)+1)},t.prototype.getRotation=function(e,r){var n=0;e.forEach(function(a,o,s){var l=(a>>r-2<<1)+(a&1);n=(n<<3)+l}),n=((n&1)<<11)+(n>>1);for(var i=0;i<4;i++)if(G.bitCount(n^this.EXPECTED_CORNER_BITS[i])<=2)return i;throw new I},t.prototype.getCorrectedParameterData=function(e,r){var n,i;r?(n=7,i=2):(n=10,i=4);for(var a=n-i,o=new Int32Array(n),s=n-1;s>=0;--s)o[s]=e&15,e>>=4;try{var l=new Xr(Ne.AZTEC_PARAM);l.decode(o,a)}catch{throw new I}for(var c=0,s=0;s<i;s++)c=(c<<4)+o[s];return c},t.prototype.getBullsEyeCorners=function(e){var r=e,n=e,i=e,a=e,o=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){var s=this.getFirstDifferent(r,o,1,-1),l=this.getFirstDifferent(n,o,1,1),c=this.getFirstDifferent(i,o,-1,1),f=this.getFirstDifferent(a,o,-1,-1);if(this.nbCenterLayers>2){var d=this.distancePoint(f,s)*this.nbCenterLayers/(this.distancePoint(a,r)*(this.nbCenterLayers+2));if(d<.75||d>1.25||!this.isWhiteOrBlackRectangle(s,l,c,f))break}r=s,n=l,i=c,a=f,o=!o}if(this.nbCenterLayers!==5&&this.nbCenterLayers!==7)throw new I;this.compact=this.nbCenterLayers===5;var p=new k(r.getX()+.5,r.getY()-.5),h=new k(n.getX()+.5,n.getY()+.5),v=new k(i.getX()-.5,i.getY()+.5),g=new k(a.getX()-.5,a.getY()-.5);return this.expandSquare([p,h,v,g],2*this.nbCenterLayers-3,2*this.nbCenterLayers)},t.prototype.getMatrixCenter=function(){var e,r,n,i;try{var a=new Nn(this.image).detect();e=a[0],r=a[1],n=a[2],i=a[3]}catch{var o=this.image.getWidth()/2,s=this.image.getHeight()/2;e=this.getFirstDifferent(new Se(o+7,s-7),!1,1,-1).toResultPoint(),r=this.getFirstDifferent(new Se(o+7,s+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Se(o-7,s+7),!1,-1,1).toResultPoint(),i=this.getFirstDifferent(new Se(o-7,s-7),!1,-1,-1).toResultPoint()}var l=X.round((e.getX()+i.getX()+r.getX()+n.getX())/4),c=X.round((e.getY()+i.getY()+r.getY()+n.getY())/4);try{var a=new Nn(this.image,15,l,c).detect();e=a[0],r=a[1],n=a[2],i=a[3]}catch{e=this.getFirstDifferent(new Se(l+7,c-7),!1,1,-1).toResultPoint(),r=this.getFirstDifferent(new Se(l+7,c+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Se(l-7,c+7),!1,-1,1).toResultPoint(),i=this.getFirstDifferent(new Se(l-7,c-7),!1,-1,-1).toResultPoint()}return l=X.round((e.getX()+i.getX()+r.getX()+n.getX())/4),c=X.round((e.getY()+i.getY()+r.getY()+n.getY())/4),new Se(l,c)},t.prototype.getMatrixCornerPoints=function(e){return this.expandSquare(e,2*this.nbCenterLayers,this.getDimension())},t.prototype.sampleGrid=function(e,r,n,i,a){var o=jn.getInstance(),s=this.getDimension(),l=s/2-this.nbCenterLayers,c=s/2+this.nbCenterLayers;return o.sampleGrid(e,s,s,l,l,c,l,c,c,l,c,r.getX(),r.getY(),n.getX(),n.getY(),i.getX(),i.getY(),a.getX(),a.getY())},t.prototype.sampleLine=function(e,r,n){for(var i=0,a=this.distanceResultPoint(e,r),o=a/n,s=e.getX(),l=e.getY(),c=o*(r.getX()-e.getX())/a,f=o*(r.getY()-e.getY())/a,d=0;d<n;d++)this.image.get(X.round(s+d*c),X.round(l+d*f))&&(i|=1<<n-d-1);return i},t.prototype.isWhiteOrBlackRectangle=function(e,r,n,i){var a=3;e=new Se(e.getX()-a,e.getY()+a),r=new Se(r.getX()-a,r.getY()-a),n=new Se(n.getX()+a,n.getY()-a),i=new Se(i.getX()+a,i.getY()+a);var o=this.getColor(i,e);if(o===0)return!1;var s=this.getColor(e,r);return s!==o||(s=this.getColor(r,n),s!==o)?!1:(s=this.getColor(n,i),s===o)},t.prototype.getColor=function(e,r){for(var n=this.distancePoint(e,r),i=(r.getX()-e.getX())/n,a=(r.getY()-e.getY())/n,o=0,s=e.getX(),l=e.getY(),c=this.image.get(e.getX(),e.getY()),f=Math.ceil(n),d=0;d<f;d++)s+=i,l+=a,this.image.get(X.round(s),X.round(l))!==c&&o++;var p=o/n;return p>.1&&p<.9?0:p<=.1===c?1:-1},t.prototype.getFirstDifferent=function(e,r,n,i){for(var a=e.getX()+n,o=e.getY()+i;this.isValid(a,o)&&this.image.get(a,o)===r;)a+=n,o+=i;for(a-=n,o-=i;this.isValid(a,o)&&this.image.get(a,o)===r;)a+=n;for(a-=n;this.isValid(a,o)&&this.image.get(a,o)===r;)o+=i;return o-=i,new Se(a,o)},t.prototype.expandSquare=function(e,r,n){var i=n/(2*r),a=e[0].getX()-e[2].getX(),o=e[0].getY()-e[2].getY(),s=(e[0].getX()+e[2].getX())/2,l=(e[0].getY()+e[2].getY())/2,c=new k(s+i*a,l+i*o),f=new k(s-i*a,l-i*o);a=e[1].getX()-e[3].getX(),o=e[1].getY()-e[3].getY(),s=(e[1].getX()+e[3].getX())/2,l=(e[1].getY()+e[3].getY())/2;var d=new k(s+i*a,l+i*o),p=new k(s-i*a,l-i*o),h=[c,d,f,p];return h},t.prototype.isValid=function(e,r){return e>=0&&e<this.image.getWidth()&&r>0&&r<this.image.getHeight()},t.prototype.isValidPoint=function(e){var r=X.round(e.getX()),n=X.round(e.getY());return this.isValid(r,n)},t.prototype.distancePoint=function(e,r){return X.distance(e.getX(),e.getY(),r.getX(),r.getY())},t.prototype.distanceResultPoint=function(e,r){return X.distance(e.getX(),e.getY(),r.getX(),r.getY())},t.prototype.getDimension=function(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(G.truncDivision(this.nbLayers-4,8)+1)+15},t})(),Dn=(function(){function t(){}return t.prototype.decode=function(e,r){r===void 0&&(r=null);var n=null,i=new x1(e.getBlackMatrix()),a=null,o=null;try{var s=i.detectMirror(!1);a=s.getPoints(),this.reportFoundResultPoints(r,a),o=new mi().decode(s)}catch(d){n=d}if(o==null)try{var s=i.detectMirror(!0);a=s.getPoints(),this.reportFoundResultPoints(r,a),o=new mi().decode(s)}catch(d){throw n??d}var l=new Be(o.getText(),o.getRawBytes(),o.getNumBits(),a,U.AZTEC,ne.currentTimeMillis()),c=o.getByteSegments();c!=null&&l.putMetadata(we.BYTE_SEGMENTS,c);var f=o.getECLevel();return f!=null&&l.putMetadata(we.ERROR_CORRECTION_LEVEL,f),l},t.prototype.reportFoundResultPoints=function(e,r){if(e!=null){var n=e.get(le.NEED_RESULT_POINT_CALLBACK);n!=null&&r.forEach(function(i,a,o){n.foundPossibleResultPoint(i)})}},t.prototype.reset=function(){},t})(),y1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();(function(t){y1(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Dn,r)||this}return e})(Vt);var _e=(function(){function t(){}return t.prototype.decode=function(e,r){try{return this.doDecode(e,r)}catch{var n=r&&r.get(le.TRY_HARDER)===!0;if(n&&e.isRotateSupported()){var i=e.rotateCounterClockwise(),a=this.doDecode(i,r),o=a.getResultMetadata(),s=270;o!==null&&o.get(we.ORIENTATION)===!0&&(s=s+o.get(we.ORIENTATION)%360),a.putMetadata(we.ORIENTATION,s);var l=a.getResultPoints();if(l!==null)for(var c=i.getHeight(),f=0;f<l.length;f++)l[f]=new k(c-l[f].getY()-1,l[f].getX());return a}else throw new I}},t.prototype.reset=function(){},t.prototype.doDecode=function(e,r){var n=e.getWidth(),i=e.getHeight(),a=new ve(n),o=r&&r.get(le.TRY_HARDER)===!0,s=Math.max(1,i>>(o?8:5)),l;o?l=i:l=15;for(var c=Math.trunc(i/2),f=0;f<l;f++){var d=Math.trunc((f+1)/2),p=(f&1)===0,h=c+s*(p?d:-d);if(h<0||h>=i)break;try{a=e.getBlackRow(h,a)}catch{continue}for(var v=function(m){if(m===1&&(a.reverse(),r&&r.get(le.NEED_RESULT_POINT_CALLBACK)===!0)){var E=new Map;r.forEach(function(b,O){return E.set(O,b)}),E.delete(le.NEED_RESULT_POINT_CALLBACK),r=E}try{var w=g.decodeRow(h,a,r);if(m===1){w.putMetadata(we.ORIENTATION,180);var C=w.getResultPoints();C!==null&&(C[0]=new k(n-C[0].getX()-1,C[0].getY()),C[1]=new k(n-C[1].getX()-1,C[1].getY()))}return{value:w}}catch{}},g=this,y=0;y<2;y++){var _=v(y);if(typeof _=="object")return _.value}}throw new I},t.recordPattern=function(e,r,n){for(var i=n.length,a=0;a<i;a++)n[a]=0;var o=e.getSize();if(r>=o)throw new I;for(var s=!e.get(r),l=0,c=r;c<o;){if(e.get(c)!==s)n[l]++;else{if(++l===i)break;n[l]=1,s=!s}c++}if(!(l===i||l===i-1&&c===o))throw new I},t.recordPatternInReverse=function(e,r,n){for(var i=n.length,a=e.get(r);r>0&&i>=0;)e.get(--r)!==a&&(i--,a=!a);if(i>=0)throw new I;t.recordPattern(e,r+1,n)},t.patternMatchVariance=function(e,r,n){for(var i=e.length,a=0,o=0,s=0;s<i;s++)a+=e[s],o+=r[s];if(a<o)return Number.POSITIVE_INFINITY;var l=a/o;n*=l;for(var c=0,f=0;f<i;f++){var d=e[f],p=r[f]*l,h=d>p?d-p:p-d;if(h>n)return Number.POSITIVE_INFINITY;c+=h}return c/a},t})(),m1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),_i=(function(t){m1(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.findStartPattern=function(r){for(var n=r.getSize(),i=r.getNextSet(0),a=0,o=Int32Array.from([0,0,0,0,0,0]),s=i,l=!1,c=6,f=i;f<n;f++)if(r.get(f)!==l)o[a]++;else{if(a===c-1){for(var d=e.MAX_AVG_VARIANCE,p=-1,h=e.CODE_START_A;h<=e.CODE_START_C;h++){var v=_e.patternMatchVariance(o,e.CODE_PATTERNS[h],e.MAX_INDIVIDUAL_VARIANCE);v<d&&(d=v,p=h)}if(p>=0&&r.isRange(Math.max(0,s-(f-s)/2),s,!1))return Int32Array.from([s,f,p]);s+=o[0]+o[1],o=o.slice(2,o.length-1),o[a-1]=0,o[a]=0,a--}else a++;o[a]=1,l=!l}throw new I},e.decodeCode=function(r,n,i){_e.recordPattern(r,i,n);for(var a=e.MAX_AVG_VARIANCE,o=-1,s=0;s<e.CODE_PATTERNS.length;s++){var l=e.CODE_PATTERNS[s],c=this.patternMatchVariance(n,l,e.MAX_INDIVIDUAL_VARIANCE);c<a&&(a=c,o=s)}if(o>=0)return o;throw new I},e.prototype.decodeRow=function(r,n,i){var a=i&&i.get(le.ASSUME_GS1)===!0,o=e.findStartPattern(n),s=o[2],l=0,c=new Uint8Array(20);c[l++]=s;var f;switch(s){case e.CODE_START_A:f=e.CODE_CODE_A;break;case e.CODE_START_B:f=e.CODE_CODE_B;break;case e.CODE_START_C:f=e.CODE_CODE_C;break;default:throw new R}for(var d=!1,p=!1,h="",v=o[0],g=o[1],y=Int32Array.from([0,0,0,0,0,0]),_=0,m=0,E=s,w=0,C=!0,b=!1,O=!1;!d;){var P=p;switch(p=!1,_=m,m=e.decodeCode(n,y,g),c[l++]=m,m!==e.CODE_STOP&&(C=!0),m!==e.CODE_STOP&&(w++,E+=w*m),v=g,g+=y.reduce(function(rt,nt){return rt+nt},0),m){case e.CODE_START_A:case e.CODE_START_B:case e.CODE_START_C:throw new R}switch(f){case e.CODE_CODE_A:if(m<64)O===b?h+=String.fromCharCode(32+m):h+=String.fromCharCode(32+m+128),O=!1;else if(m<96)O===b?h+=String.fromCharCode(m-64):h+=String.fromCharCode(m+64),O=!1;else switch(m!==e.CODE_STOP&&(C=!1),m){case e.CODE_FNC_1:a&&(h.length===0?h+="]C1":h+="");break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_A:!b&&O?(b=!0,O=!1):b&&O?(b=!1,O=!1):O=!0;break;case e.CODE_SHIFT:p=!0,f=e.CODE_CODE_B;break;case e.CODE_CODE_B:f=e.CODE_CODE_B;break;case e.CODE_CODE_C:f=e.CODE_CODE_C;break;case e.CODE_STOP:d=!0;break}break;case e.CODE_CODE_B:if(m<96)O===b?h+=String.fromCharCode(32+m):h+=String.fromCharCode(32+m+128),O=!1;else switch(m!==e.CODE_STOP&&(C=!1),m){case e.CODE_FNC_1:a&&(h.length===0?h+="]C1":h+="");break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_B:!b&&O?(b=!0,O=!1):b&&O?(b=!1,O=!1):O=!0;break;case e.CODE_SHIFT:p=!0,f=e.CODE_CODE_A;break;case e.CODE_CODE_A:f=e.CODE_CODE_A;break;case e.CODE_CODE_C:f=e.CODE_CODE_C;break;case e.CODE_STOP:d=!0;break}break;case e.CODE_CODE_C:if(m<100)m<10&&(h+="0"),h+=m;else switch(m!==e.CODE_STOP&&(C=!1),m){case e.CODE_FNC_1:a&&(h.length===0?h+="]C1":h+="");break;case e.CODE_CODE_A:f=e.CODE_CODE_A;break;case e.CODE_CODE_B:f=e.CODE_CODE_B;break;case e.CODE_STOP:d=!0;break}break}P&&(f=f===e.CODE_CODE_A?e.CODE_CODE_B:e.CODE_CODE_A)}var H=g-v;if(g=n.getNextUnset(g),!n.isRange(g,Math.min(n.getSize(),g+(g-v)/2),!1))throw new I;if(E-=w*_,E%103!==_)throw new me;var L=h.length;if(L===0)throw new I;L>0&&C&&(f===e.CODE_CODE_C?h=h.substring(0,L-2):h=h.substring(0,L-1));for(var te=(o[1]+o[0])/2,V=v+H/2,z=c.length,he=new Uint8Array(z),He=0;He<z;He++)he[He]=c[He];var pr=[new k(te,r),new k(V,r)];return new Be(h,he,0,pr,U.CODE_128,new Date().getTime())},e.CODE_PATTERNS=[Int32Array.from([2,1,2,2,2,2]),Int32Array.from([2,2,2,1,2,2]),Int32Array.from([2,2,2,2,2,1]),Int32Array.from([1,2,1,2,2,3]),Int32Array.from([1,2,1,3,2,2]),Int32Array.from([1,3,1,2,2,2]),Int32Array.from([1,2,2,2,1,3]),Int32Array.from([1,2,2,3,1,2]),Int32Array.from([1,3,2,2,1,2]),Int32Array.from([2,2,1,2,1,3]),Int32Array.from([2,2,1,3,1,2]),Int32Array.from([2,3,1,2,1,2]),Int32Array.from([1,1,2,2,3,2]),Int32Array.from([1,2,2,1,3,2]),Int32Array.from([1,2,2,2,3,1]),Int32Array.from([1,1,3,2,2,2]),Int32Array.from([1,2,3,1,2,2]),Int32Array.from([1,2,3,2,2,1]),Int32Array.from([2,2,3,2,1,1]),Int32Array.from([2,2,1,1,3,2]),Int32Array.from([2,2,1,2,3,1]),Int32Array.from([2,1,3,2,1,2]),Int32Array.from([2,2,3,1,1,2]),Int32Array.from([3,1,2,1,3,1]),Int32Array.from([3,1,1,2,2,2]),Int32Array.from([3,2,1,1,2,2]),Int32Array.from([3,2,1,2,2,1]),Int32Array.from([3,1,2,2,1,2]),Int32Array.from([3,2,2,1,1,2]),Int32Array.from([3,2,2,2,1,1]),Int32Array.from([2,1,2,1,2,3]),Int32Array.from([2,1,2,3,2,1]),Int32Array.from([2,3,2,1,2,1]),Int32Array.from([1,1,1,3,2,3]),Int32Array.from([1,3,1,1,2,3]),Int32Array.from([1,3,1,3,2,1]),Int32Array.from([1,1,2,3,1,3]),Int32Array.from([1,3,2,1,1,3]),Int32Array.from([1,3,2,3,1,1]),Int32Array.from([2,1,1,3,1,3]),Int32Array.from([2,3,1,1,1,3]),Int32Array.from([2,3,1,3,1,1]),Int32Array.from([1,1,2,1,3,3]),Int32Array.from([1,1,2,3,3,1]),Int32Array.from([1,3,2,1,3,1]),Int32Array.from([1,1,3,1,2,3]),Int32Array.from([1,1,3,3,2,1]),Int32Array.from([1,3,3,1,2,1]),Int32Array.from([3,1,3,1,2,1]),Int32Array.from([2,1,1,3,3,1]),Int32Array.from([2,3,1,1,3,1]),Int32Array.from([2,1,3,1,1,3]),Int32Array.from([2,1,3,3,1,1]),Int32Array.from([2,1,3,1,3,1]),Int32Array.from([3,1,1,1,2,3]),Int32Array.from([3,1,1,3,2,1]),Int32Array.from([3,3,1,1,2,1]),Int32Array.from([3,1,2,1,1,3]),Int32Array.from([3,1,2,3,1,1]),Int32Array.from([3,3,2,1,1,1]),Int32Array.from([3,1,4,1,1,1]),Int32Array.from([2,2,1,4,1,1]),Int32Array.from([4,3,1,1,1,1]),Int32Array.from([1,1,1,2,2,4]),Int32Array.from([1,1,1,4,2,2]),Int32Array.from([1,2,1,1,2,4]),Int32Array.from([1,2,1,4,2,1]),Int32Array.from([1,4,1,1,2,2]),Int32Array.from([1,4,1,2,2,1]),Int32Array.from([1,1,2,2,1,4]),Int32Array.from([1,1,2,4,1,2]),Int32Array.from([1,2,2,1,1,4]),Int32Array.from([1,2,2,4,1,1]),Int32Array.from([1,4,2,1,1,2]),Int32Array.from([1,4,2,2,1,1]),Int32Array.from([2,4,1,2,1,1]),Int32Array.from([2,2,1,1,1,4]),Int32Array.from([4,1,3,1,1,1]),Int32Array.from([2,4,1,1,1,2]),Int32Array.from([1,3,4,1,1,1]),Int32Array.from([1,1,1,2,4,2]),Int32Array.from([1,2,1,1,4,2]),Int32Array.from([1,2,1,2,4,1]),Int32Array.from([1,1,4,2,1,2]),Int32Array.from([1,2,4,1,1,2]),Int32Array.from([1,2,4,2,1,1]),Int32Array.from([4,1,1,2,1,2]),Int32Array.from([4,2,1,1,1,2]),Int32Array.from([4,2,1,2,1,1]),Int32Array.from([2,1,2,1,4,1]),Int32Array.from([2,1,4,1,2,1]),Int32Array.from([4,1,2,1,2,1]),Int32Array.from([1,1,1,1,4,3]),Int32Array.from([1,1,1,3,4,1]),Int32Array.from([1,3,1,1,4,1]),Int32Array.from([1,1,4,1,1,3]),Int32Array.from([1,1,4,3,1,1]),Int32Array.from([4,1,1,1,1,3]),Int32Array.from([4,1,1,3,1,1]),Int32Array.from([1,1,3,1,4,1]),Int32Array.from([1,1,4,1,3,1]),Int32Array.from([3,1,1,1,4,1]),Int32Array.from([4,1,1,1,3,1]),Int32Array.from([2,1,1,4,1,2]),Int32Array.from([2,1,1,2,1,4]),Int32Array.from([2,1,1,2,3,2]),Int32Array.from([2,3,3,1,1,1,2])],e.MAX_AVG_VARIANCE=.25,e.MAX_INDIVIDUAL_VARIANCE=.7,e.CODE_SHIFT=98,e.CODE_CODE_C=99,e.CODE_CODE_B=100,e.CODE_CODE_A=101,e.CODE_FNC_1=102,e.CODE_FNC_2=97,e.CODE_FNC_3=96,e.CODE_FNC_4_A=101,e.CODE_FNC_4_B=100,e.CODE_START_A=103,e.CODE_START_B=104,e.CODE_START_C=105,e.CODE_STOP=106,e})(_e),w1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),fn=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ei=(function(t){w1(e,t);function e(r,n){r===void 0&&(r=!1),n===void 0&&(n=!1);var i=t.call(this)||this;return i.usingCheckDigit=r,i.extendedMode=n,i.decodeRowResult="",i.counters=new Int32Array(9),i}return e.prototype.decodeRow=function(r,n,i){var a,o,s,l,c=this.counters;c.fill(0),this.decodeRowResult="";var f=e.findAsteriskPattern(n,c),d=n.getNextSet(f[1]),p=n.getSize(),h,v;do{e.recordPattern(n,d,c);var g=e.toNarrowWidePattern(c);if(g<0)throw new I;h=e.patternToChar(g),this.decodeRowResult+=h,v=d;try{for(var y=(a=void 0,fn(c)),_=y.next();!_.done;_=y.next()){var m=_.value;d+=m}}catch(z){a={error:z}}finally{try{_&&!_.done&&(o=y.return)&&o.call(y)}finally{if(a)throw a.error}}d=n.getNextSet(d)}while(h!=="*");this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var E=0;try{for(var w=fn(c),C=w.next();!C.done;C=w.next()){var m=C.value;E+=m}}catch(z){s={error:z}}finally{try{C&&!C.done&&(l=w.return)&&l.call(w)}finally{if(s)throw s.error}}var b=d-v-E;if(d!==p&&b*2<E)throw new I;if(this.usingCheckDigit){for(var O=this.decodeRowResult.length-1,P=0,H=0;H<O;H++)P+=e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(H));if(this.decodeRowResult.charAt(O)!==e.ALPHABET_STRING.charAt(P%43))throw new me;this.decodeRowResult=this.decodeRowResult.substring(0,O)}if(this.decodeRowResult.length===0)throw new I;var L;this.extendedMode?L=e.decodeExtended(this.decodeRowResult):L=this.decodeRowResult;var te=(f[1]+f[0])/2,V=v+E/2;return new Be(L,null,0,[new k(te,r),new k(V,r)],U.CODE_39,new Date().getTime())},e.findAsteriskPattern=function(r,n){for(var i=r.getSize(),a=r.getNextSet(0),o=0,s=a,l=!1,c=n.length,f=a;f<i;f++)if(r.get(f)!==l)n[o]++;else{if(o===c-1){if(this.toNarrowWidePattern(n)===e.ASTERISK_ENCODING&&r.isRange(Math.max(0,s-Math.floor((f-s)/2)),s,!1))return[s,f];s+=n[0]+n[1],n.copyWithin(0,2,2+o-1),n[o-1]=0,n[o]=0,o--}else o++;n[o]=1,l=!l}throw new I},e.toNarrowWidePattern=function(r){var n,i,a=r.length,o=0,s;do{var l=2147483647;try{for(var c=(n=void 0,fn(r)),f=c.next();!f.done;f=c.next()){var d=f.value;d<l&&d>o&&(l=d)}}catch(g){n={error:g}}finally{try{f&&!f.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}o=l,s=0;for(var p=0,h=0,v=0;v<a;v++){var d=r[v];d>o&&(h|=1<<a-1-v,s++,p+=d)}if(s===3){for(var v=0;v<a&&s>0;v++){var d=r[v];if(d>o&&(s--,d*2>=p))return-1}return h}}while(s>3);return-1},e.patternToChar=function(r){for(var n=0;n<e.CHARACTER_ENCODINGS.length;n++)if(e.CHARACTER_ENCODINGS[n]===r)return e.ALPHABET_STRING.charAt(n);if(r===e.ASTERISK_ENCODING)return"*";throw new I},e.decodeExtended=function(r){for(var n=r.length,i="",a=0;a<n;a++){var o=r.charAt(a);if(o==="+"||o==="$"||o==="%"||o==="/"){var s=r.charAt(a+1),l="\0";switch(o){case"+":if(s>="A"&&s<="Z")l=String.fromCharCode(s.charCodeAt(0)+32);else throw new R;break;case"$":if(s>="A"&&s<="Z")l=String.fromCharCode(s.charCodeAt(0)-64);else throw new R;break;case"%":if(s>="A"&&s<="E")l=String.fromCharCode(s.charCodeAt(0)-38);else if(s>="F"&&s<="J")l=String.fromCharCode(s.charCodeAt(0)-11);else if(s>="K"&&s<="O")l=String.fromCharCode(s.charCodeAt(0)+16);else if(s>="P"&&s<="T")l=String.fromCharCode(s.charCodeAt(0)+43);else if(s==="U")l="\0";else if(s==="V")l="@";else if(s==="W")l="`";else if(s==="X"||s==="Y"||s==="Z")l="";else throw new R;break;case"/":if(s>="A"&&s<="O")l=String.fromCharCode(s.charCodeAt(0)-32);else if(s==="Z")l=":";else throw new R;break}i+=l,a++}else i+=o}return i},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",e.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],e.ASTERISK_ENCODING=148,e})(_e),_1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),E1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ai=(function(t){_1(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.narrowLineWidth=-1,r}return e.prototype.decodeRow=function(r,n,i){var a,o,s=this.decodeStart(n),l=this.decodeEnd(n),c=new J;e.decodeMiddle(n,s[1],l[0],c);var f=c.toString(),d=null;i!=null&&(d=i.get(le.ALLOWED_LENGTHS)),d==null&&(d=e.DEFAULT_ALLOWED_LENGTHS);var p=f.length,h=!1,v=0;try{for(var g=E1(d),y=g.next();!y.done;y=g.next()){var _=y.value;if(p===_){h=!0;break}_>v&&(v=_)}}catch(w){a={error:w}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}if(!h&&p>v&&(h=!0),!h)throw new R;var m=[new k(s[1],r),new k(l[0],r)],E=new Be(f,null,0,m,U.ITF,new Date().getTime());return E},e.decodeMiddle=function(r,n,i,a){var o=new Int32Array(10),s=new Int32Array(5),l=new Int32Array(5);for(o.fill(0),s.fill(0),l.fill(0);n<i;){_e.recordPattern(r,n,o);for(var c=0;c<5;c++){var f=2*c;s[c]=o[f],l[c]=o[f+1]}var d=e.decodeDigit(s);a.append(d.toString()),d=this.decodeDigit(l),a.append(d.toString()),o.forEach(function(p){n+=p})}},e.prototype.decodeStart=function(r){var n=e.skipWhiteSpace(r),i=e.findGuardPattern(r,n,e.START_PATTERN);return this.narrowLineWidth=(i[1]-i[0])/4,this.validateQuietZone(r,i[0]),i},e.prototype.validateQuietZone=function(r,n){var i=this.narrowLineWidth*10;i=i<n?i:n;for(var a=n-1;i>0&&a>=0&&!r.get(a);a--)i--;if(i!==0)throw new I},e.skipWhiteSpace=function(r){var n=r.getSize(),i=r.getNextSet(0);if(i===n)throw new I;return i},e.prototype.decodeEnd=function(r){r.reverse();try{var n=e.skipWhiteSpace(r),i=void 0;try{i=e.findGuardPattern(r,n,e.END_PATTERN_REVERSED[0])}catch(o){o instanceof I&&(i=e.findGuardPattern(r,n,e.END_PATTERN_REVERSED[1]))}this.validateQuietZone(r,i[0]);var a=i[0];return i[0]=r.getSize()-i[1],i[1]=r.getSize()-a,i}finally{r.reverse()}},e.findGuardPattern=function(r,n,i){var a=i.length,o=new Int32Array(a),s=r.getSize(),l=!1,c=0,f=n;o.fill(0);for(var d=n;d<s;d++)if(r.get(d)!==l)o[c]++;else{if(c===a-1){if(_e.patternMatchVariance(o,i,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return[f,d];f+=o[0]+o[1],ne.arraycopy(o,2,o,0,c-1),o[c-1]=0,o[c]=0,c--}else c++;o[c]=1,l=!l}throw new I},e.decodeDigit=function(r){for(var n=e.MAX_AVG_VARIANCE,i=-1,a=e.PATTERNS.length,o=0;o<a;o++){var s=e.PATTERNS[o],l=_e.patternMatchVariance(r,s,e.MAX_INDIVIDUAL_VARIANCE);l<n?(n=l,i=o):l===n&&(i=-1)}if(i>=0)return i%10;throw new I},e.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],e.MAX_AVG_VARIANCE=.38,e.MAX_INDIVIDUAL_VARIANCE=.5,e.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],e.START_PATTERN=Int32Array.from([1,1,1,1]),e.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])],e})(_e),A1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),kt=(function(t){A1(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.decodeRowStringBuffer="",r}return e.findStartGuardPattern=function(r){for(var n=!1,i,a=0,o=Int32Array.from([0,0,0]);!n;){o=Int32Array.from([0,0,0]),i=e.findGuardPattern(r,a,!1,this.START_END_PATTERN,o);var s=i[0];a=i[1];var l=s-(a-s);l>=0&&(n=r.isRange(l,s,!1))}return i},e.checkChecksum=function(r){return e.checkStandardUPCEANChecksum(r)},e.checkStandardUPCEANChecksum=function(r){var n=r.length;if(n===0)return!1;var i=parseInt(r.charAt(n-1),10);return e.getStandardUPCEANChecksum(r.substring(0,n-1))===i},e.getStandardUPCEANChecksum=function(r){for(var n=r.length,i=0,a=n-1;a>=0;a-=2){var o=r.charAt(a).charCodeAt(0)-48;if(o<0||o>9)throw new R;i+=o}i*=3;for(var a=n-2;a>=0;a-=2){var o=r.charAt(a).charCodeAt(0)-48;if(o<0||o>9)throw new R;i+=o}return(1e3-i)%10},e.decodeEnd=function(r,n){return e.findGuardPattern(r,n,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e.findGuardPatternWithoutCounters=function(r,n,i,a){return this.findGuardPattern(r,n,i,a,new Int32Array(a.length))},e.findGuardPattern=function(r,n,i,a,o){var s=r.getSize();n=i?r.getNextUnset(n):r.getNextSet(n);for(var l=0,c=n,f=a.length,d=i,p=n;p<s;p++)if(r.get(p)!==d)o[l]++;else{if(l===f-1){if(_e.patternMatchVariance(o,a,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return Int32Array.from([c,p]);c+=o[0]+o[1];for(var h=o.slice(2,o.length-1),v=0;v<l-1;v++)o[v]=h[v];o[l-1]=0,o[l]=0,l--}else l++;o[l]=1,d=!d}throw new I},e.decodeDigit=function(r,n,i,a){this.recordPattern(r,i,n);for(var o=this.MAX_AVG_VARIANCE,s=-1,l=a.length,c=0;c<l;c++){var f=a[c],d=_e.patternMatchVariance(n,f,e.MAX_INDIVIDUAL_VARIANCE);d<o&&(o=d,s=c)}if(s>=0)return s;throw new I},e.MAX_AVG_VARIANCE=.48,e.MAX_INDIVIDUAL_VARIANCE=.7,e.START_END_PATTERN=Int32Array.from([1,1,1]),e.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),e.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])],e})(_e),C1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},b1=(function(){function t(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var i=this.decodeRowStringBuffer,a=this.decodeMiddle(r,n,i),o=i.toString(),s=t.parseExtensionString(o),l=[new k((n[0]+n[1])/2,e),new k(a,e)],c=new Be(o,null,0,l,U.UPC_EAN_EXTENSION,new Date().getTime());return s!=null&&c.putAllMetadata(s),c},t.prototype.decodeMiddle=function(e,r,n){var i,a,o=this.decodeMiddleCounters;o[0]=0,o[1]=0,o[2]=0,o[3]=0;for(var s=e.getSize(),l=r[1],c=0,f=0;f<5&&l<s;f++){var d=kt.decodeDigit(e,o,l,kt.L_AND_G_PATTERNS);n+=String.fromCharCode(48+d%10);try{for(var p=(i=void 0,C1(o)),h=p.next();!h.done;h=p.next()){var v=h.value;l+=v}}catch(y){i={error:y}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}d>=10&&(c|=1<<4-f),f!==4&&(l=e.getNextSet(l),l=e.getNextUnset(l))}if(n.length!==5)throw new I;var g=this.determineCheckDigit(c);if(t.extensionChecksum(n.toString())!==g)throw new I;return l},t.extensionChecksum=function(e){for(var r=e.length,n=0,i=r-2;i>=0;i-=2)n+=e.charAt(i).charCodeAt(0)-48;n*=3;for(var i=r-1;i>=0;i-=2)n+=e.charAt(i).charCodeAt(0)-48;return n*=3,n%10},t.prototype.determineCheckDigit=function(e){for(var r=0;r<10;r++)if(e===this.CHECK_DIGIT_ENCODINGS[r])return r;throw new I},t.parseExtensionString=function(e){if(e.length!==5)return null;var r=t.parseExtension5String(e);return r==null?null:new Map([[we.SUGGESTED_PRICE,r]])},t.parseExtension5String=function(e){var r;switch(e.charAt(0)){case"0":r="£";break;case"5":r="$";break;case"9":switch(e){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}r="";break;default:r="";break}var n=parseInt(e.substring(1)),i=(n/100).toString(),a=n%100,o=a<10?"0"+a:a.toString();return r+i+"."+o},t})(),S1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},I1=(function(){function t(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var i=this.decodeRowStringBuffer,a=this.decodeMiddle(r,n,i),o=i.toString(),s=t.parseExtensionString(o),l=[new k((n[0]+n[1])/2,e),new k(a,e)],c=new Be(o,null,0,l,U.UPC_EAN_EXTENSION,new Date().getTime());return s!=null&&c.putAllMetadata(s),c},t.prototype.decodeMiddle=function(e,r,n){var i,a,o=this.decodeMiddleCounters;o[0]=0,o[1]=0,o[2]=0,o[3]=0;for(var s=e.getSize(),l=r[1],c=0,f=0;f<2&&l<s;f++){var d=kt.decodeDigit(e,o,l,kt.L_AND_G_PATTERNS);n+=String.fromCharCode(48+d%10);try{for(var p=(i=void 0,S1(o)),h=p.next();!h.done;h=p.next()){var v=h.value;l+=v}}catch(g){i={error:g}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}d>=10&&(c|=1<<1-f),f!==1&&(l=e.getNextSet(l),l=e.getNextUnset(l))}if(n.length!==2)throw new I;if(parseInt(n.toString())%4!==c)throw new I;return l},t.parseExtensionString=function(e){return e.length!==2?null:new Map([[we.ISSUE_NUMBER,parseInt(e)]])},t})(),O1=(function(){function t(){}return t.decodeRow=function(e,r,n){var i=kt.findGuardPattern(r,n,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{var a=new b1;return a.decodeRow(e,r,i)}catch{var o=new I1;return o.decodeRow(e,r,i)}},t.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]),t})(),T1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),fe=(function(t){T1(e,t);function e(){var r=t.call(this)||this;r.decodeRowStringBuffer="",e.L_AND_G_PATTERNS=e.L_PATTERNS.map(function(s){return Int32Array.from(s)});for(var n=10;n<20;n++){for(var i=e.L_PATTERNS[n-10],a=new Int32Array(i.length),o=0;o<i.length;o++)a[o]=i[i.length-o-1];e.L_AND_G_PATTERNS[n]=a}return r}return e.prototype.decodeRow=function(r,n,i){var a=e.findStartGuardPattern(n),o=i==null?null:i.get(le.NEED_RESULT_POINT_CALLBACK);if(o!=null){var s=new k((a[0]+a[1])/2,r);o.foundPossibleResultPoint(s)}var l=this.decodeMiddle(n,a,this.decodeRowStringBuffer),c=l.rowOffset,f=l.resultString;if(o!=null){var d=new k(c,r);o.foundPossibleResultPoint(d)}var p=e.decodeEnd(n,c);if(o!=null){var h=new k((p[0]+p[1])/2,r);o.foundPossibleResultPoint(h)}var v=p[1],g=v+(v-p[0]);if(g>=n.getSize()||!n.isRange(v,g,!1))throw new I;var y=f.toString();if(y.length<8)throw new R;if(!e.checkChecksum(y))throw new me;var _=(a[1]+a[0])/2,m=(p[1]+p[0])/2,E=this.getBarcodeFormat(),w=[new k(_,r),new k(m,r)],C=new Be(y,null,0,w,E,new Date().getTime()),b=0;try{var O=O1.decodeRow(r,n,p[1]);C.putMetadata(we.UPC_EAN_EXTENSION,O.getText()),C.putAllMetadata(O.getResultMetadata()),C.addResultPoints(O.getResultPoints()),b=O.getText().length}catch{}var P=i==null?null:i.get(le.ALLOWED_EAN_EXTENSIONS);if(P!=null){var H=!1;for(var L in P)if(b.toString()===L){H=!0;break}if(!H)throw new I}return E===U.EAN_13||U.UPC_A,C},e.checkChecksum=function(r){return e.checkStandardUPCEANChecksum(r)},e.checkStandardUPCEANChecksum=function(r){var n=r.length;if(n===0)return!1;var i=parseInt(r.charAt(n-1),10);return e.getStandardUPCEANChecksum(r.substring(0,n-1))===i},e.getStandardUPCEANChecksum=function(r){for(var n=r.length,i=0,a=n-1;a>=0;a-=2){var o=r.charAt(a).charCodeAt(0)-48;if(o<0||o>9)throw new R;i+=o}i*=3;for(var a=n-2;a>=0;a-=2){var o=r.charAt(a).charCodeAt(0)-48;if(o<0||o>9)throw new R;i+=o}return(1e3-i)%10},e.decodeEnd=function(r,n){return e.findGuardPattern(r,n,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e})(kt),N1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ci=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Bn=(function(t){N1(e,t);function e(){var r=t.call(this)||this;return r.decodeMiddleCounters=Int32Array.from([0,0,0,0]),r}return e.prototype.decodeMiddle=function(r,n,i){var a,o,s,l,c=this.decodeMiddleCounters;c[0]=0,c[1]=0,c[2]=0,c[3]=0;for(var f=r.getSize(),d=n[1],p=0,h=0;h<6&&d<f;h++){var v=fe.decodeDigit(r,c,d,fe.L_AND_G_PATTERNS);i+=String.fromCharCode(48+v%10);try{for(var g=(a=void 0,Ci(c)),y=g.next();!y.done;y=g.next()){var _=y.value;d+=_}}catch(C){a={error:C}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}v>=10&&(p|=1<<5-h)}i=e.determineFirstDigit(i,p);var m=fe.findGuardPattern(r,d,!0,fe.MIDDLE_PATTERN,new Int32Array(fe.MIDDLE_PATTERN.length).fill(0));d=m[1];for(var h=0;h<6&&d<f;h++){var v=fe.decodeDigit(r,c,d,fe.L_PATTERNS);i+=String.fromCharCode(48+v);try{for(var E=(s=void 0,Ci(c)),w=E.next();!w.done;w=E.next()){var _=w.value;d+=_}}catch(O){s={error:O}}finally{try{w&&!w.done&&(l=E.return)&&l.call(E)}finally{if(s)throw s.error}}}return{rowOffset:d,resultString:i}},e.prototype.getBarcodeFormat=function(){return U.EAN_13},e.determineFirstDigit=function(r,n){for(var i=0;i<10;i++)if(n===this.FIRST_DIGIT_ENCODINGS[i])return r=String.fromCharCode(48+i)+r,r;throw new I},e.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],e})(fe),D1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),bi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Si=(function(t){D1(e,t);function e(){var r=t.call(this)||this;return r.decodeMiddleCounters=Int32Array.from([0,0,0,0]),r}return e.prototype.decodeMiddle=function(r,n,i){var a,o,s,l,c=this.decodeMiddleCounters;c[0]=0,c[1]=0,c[2]=0,c[3]=0;for(var f=r.getSize(),d=n[1],p=0;p<4&&d<f;p++){var h=fe.decodeDigit(r,c,d,fe.L_PATTERNS);i+=String.fromCharCode(48+h);try{for(var v=(a=void 0,bi(c)),g=v.next();!g.done;g=v.next()){var y=g.value;d+=y}}catch(w){a={error:w}}finally{try{g&&!g.done&&(o=v.return)&&o.call(v)}finally{if(a)throw a.error}}}var _=fe.findGuardPattern(r,d,!0,fe.MIDDLE_PATTERN,new Int32Array(fe.MIDDLE_PATTERN.length).fill(0));d=_[1];for(var p=0;p<4&&d<f;p++){var h=fe.decodeDigit(r,c,d,fe.L_PATTERNS);i+=String.fromCharCode(48+h);try{for(var m=(s=void 0,bi(c)),E=m.next();!E.done;E=m.next()){var y=E.value;d+=y}}catch(b){s={error:b}}finally{try{E&&!E.done&&(l=m.return)&&l.call(m)}finally{if(s)throw s.error}}}return{rowOffset:d,resultString:i}},e.prototype.getBarcodeFormat=function(){return U.EAN_8},e})(fe),B1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ii=(function(t){B1(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.ean13Reader=new Bn,r}return e.prototype.getBarcodeFormat=function(){return U.UPC_A},e.prototype.decode=function(r,n){return this.maybeReturnResult(this.ean13Reader.decode(r))},e.prototype.decodeRow=function(r,n,i){return this.maybeReturnResult(this.ean13Reader.decodeRow(r,n,i))},e.prototype.decodeMiddle=function(r,n,i){return this.ean13Reader.decodeMiddle(r,n,i)},e.prototype.maybeReturnResult=function(r){var n=r.getText();if(n.charAt(0)==="0"){var i=new Be(n.substring(1),null,null,r.getResultPoints(),U.UPC_A);return r.getResultMetadata()!=null&&i.putAllMetadata(r.getResultMetadata()),i}else throw new I},e.prototype.reset=function(){this.ean13Reader.reset()},e})(fe),R1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),P1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Oi=(function(t){R1(e,t);function e(){var r=t.call(this)||this;return r.decodeMiddleCounters=new Int32Array(4),r}return e.prototype.decodeMiddle=function(r,n,i){var a,o,s=this.decodeMiddleCounters.map(function(y){return y});s[0]=0,s[1]=0,s[2]=0,s[3]=0;for(var l=r.getSize(),c=n[1],f=0,d=0;d<6&&c<l;d++){var p=e.decodeDigit(r,s,c,e.L_AND_G_PATTERNS);i+=String.fromCharCode(48+p%10);try{for(var h=(a=void 0,P1(s)),v=h.next();!v.done;v=h.next()){var g=v.value;c+=g}}catch(y){a={error:y}}finally{try{v&&!v.done&&(o=h.return)&&o.call(h)}finally{if(a)throw a.error}}p>=10&&(f|=1<<5-d)}return e.determineNumSysAndCheckDigit(new J(i),f),c},e.prototype.decodeEnd=function(r,n){return e.findGuardPatternWithoutCounters(r,n,!0,e.MIDDLE_END_PATTERN)},e.prototype.checkChecksum=function(r){return fe.checkChecksum(e.convertUPCEtoUPCA(r))},e.determineNumSysAndCheckDigit=function(r,n){for(var i=0;i<=1;i++)for(var a=0;a<10;a++)if(n===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[i][a]){r.insert(0,"0"+i),r.append("0"+a);return}throw I.getNotFoundInstance()},e.prototype.getBarcodeFormat=function(){return U.UPC_E},e.convertUPCEtoUPCA=function(r){var n=r.slice(1,7).split("").map(function(o){return o.charCodeAt(0)}),i=new J;i.append(r.charAt(0));var a=n[5];switch(a){case 0:case 1:case 2:i.appendChars(n,0,2),i.append(a),i.append("0000"),i.appendChars(n,2,3);break;case 3:i.appendChars(n,0,3),i.append("00000"),i.appendChars(n,3,2);break;case 4:i.appendChars(n,0,4),i.append("00000"),i.append(n[4]);break;default:i.appendChars(n,0,5),i.append("0000"),i.append(a);break}return r.length>=8&&i.append(r.charAt(7)),i.toString()},e.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,1])],e})(fe),k1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ti=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},dn=(function(t){k1(e,t);function e(r){var n=t.call(this)||this,i=r==null?null:r.get(le.POSSIBLE_FORMATS),a=[];return i!=null&&(i.indexOf(U.EAN_13)>-1&&a.push(new Bn),i.indexOf(U.UPC_A)>-1&&a.push(new Ii),i.indexOf(U.EAN_8)>-1&&a.push(new Si),i.indexOf(U.UPC_E)>-1&&a.push(new Oi)),a.length===0&&(a.push(new Bn),a.push(new Ii),a.push(new Si),a.push(new Oi)),n.readers=a,n}return e.prototype.decodeRow=function(r,n,i){var a,o;try{for(var s=Ti(this.readers),l=s.next();!l.done;l=s.next()){var c=l.value;try{var f=c.decodeRow(r,n,i),d=f.getBarcodeFormat()===U.EAN_13&&f.getText().charAt(0)==="0",p=i==null?null:i.get(le.POSSIBLE_FORMATS),h=p==null||p.includes(U.UPC_A);if(d&&h){var v=f.getRawBytes(),g=new Be(f.getText().substring(1),v,v?v.length:null,f.getResultPoints(),U.UPC_A);return g.putAllMetadata(f.getResultMetadata()),g}return f}catch{}}}catch(y){a={error:y}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(a)throw a.error}}throw new I},e.prototype.reset=function(){var r,n;try{for(var i=Ti(this.readers),a=i.next();!a.done;a=i.next()){var o=a.value;o.reset()}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e})(_e),M1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),L1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xt=(function(t){M1(e,t);function e(){var r=t.call(this)||this;return r.decodeFinderCounters=new Int32Array(4),r.dataCharacterCounters=new Int32Array(8),r.oddRoundingErrors=new Array(4),r.evenRoundingErrors=new Array(4),r.oddCounts=new Array(r.dataCharacterCounters.length/2),r.evenCounts=new Array(r.dataCharacterCounters.length/2),r}return e.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},e.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},e.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},e.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},e.prototype.getOddCounts=function(){return this.oddCounts},e.prototype.getEvenCounts=function(){return this.evenCounts},e.prototype.parseFinderValue=function(r,n){for(var i=0;i<n.length;i++)if(_e.patternMatchVariance(r,n[i],e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return i;throw new I},e.count=function(r){return X.sum(new Int32Array(r))},e.increment=function(r,n){for(var i=0,a=n[0],o=1;o<r.length;o++)n[o]>a&&(a=n[o],i=o);r[i]++},e.decrement=function(r,n){for(var i=0,a=n[0],o=1;o<r.length;o++)n[o]<a&&(a=n[o],i=o);r[i]--},e.isFinderPattern=function(r){var n,i,a=r[0]+r[1],o=a+r[2]+r[3],s=a/o;if(s>=e.MIN_FINDER_PATTERN_RATIO&&s<=e.MAX_FINDER_PATTERN_RATIO){var l=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER;try{for(var f=L1(r),d=f.next();!d.done;d=f.next()){var p=d.value;p>c&&(c=p),p<l&&(l=p)}}catch(h){n={error:h}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}return c<10*l}return!1},e.MAX_AVG_VARIANCE=.2,e.MAX_INDIVIDUAL_VARIANCE=.45,e.MIN_FINDER_PATTERN_RATIO=9.5/12,e.MAX_FINDER_PATTERN_RATIO=12.5/14,e})(_e),Lr=(function(){function t(e,r){this.value=e,this.checksumPortion=r}return t.prototype.getValue=function(){return this.value},t.prototype.getChecksumPortion=function(){return this.checksumPortion},t.prototype.toString=function(){return this.value+"("+this.checksumPortion+")"},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value&&this.checksumPortion===r.checksumPortion},t.prototype.hashCode=function(){return this.value^this.checksumPortion},t})(),ha=(function(){function t(e,r,n,i,a){this.value=e,this.startEnd=r,this.value=e,this.startEnd=r,this.resultPoints=new Array,this.resultPoints.push(new k(n,a)),this.resultPoints.push(new k(i,a))}return t.prototype.getValue=function(){return this.value},t.prototype.getStartEnd=function(){return this.startEnd},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.hashCode=function(){return this.value},t})(),F1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},bt=(function(){function t(){}return t.getRSSvalue=function(e,r,n){var i,a,o=0;try{for(var s=F1(e),l=s.next();!l.done;l=s.next()){var c=l.value;o+=c}}catch(m){i={error:m}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}for(var f=0,d=0,p=e.length,h=0;h<p-1;h++){var v=void 0;for(v=1,d|=1<<h;v<e[h];v++,d&=~(1<<h)){var g=t.combins(o-v-1,p-h-2);if(n&&d===0&&o-v-(p-h-1)>=p-h-1&&(g-=t.combins(o-v-(p-h),p-h-2)),p-h-1>1){for(var y=0,_=o-v-(p-h-2);_>r;_--)y+=t.combins(o-v-_-1,p-h-3);g-=y*(p-1-h)}else o-v>r&&g--;f+=g}o-=v}return f},t.combins=function(e,r){var n,i;e-r>r?(i=r,n=e-r):(i=e-r,n=r);for(var a=1,o=1,s=e;s>n;s--)a*=s,o<=i&&(a/=o,o++);for(;o<=i;)a/=o,o++;return a},t})(),V1=(function(){function t(){}return t.buildBitArray=function(e){var r=e.length*2-1;e[e.length-1].getRightChar()==null&&(r-=1);for(var n=12*r,i=new ve(n),a=0,o=e[0],s=o.getRightChar().getValue(),l=11;l>=0;--l)(s&1<<l)!=0&&i.set(a),a++;for(var l=1;l<e.length;++l){for(var c=e[l],f=c.getLeftChar().getValue(),d=11;d>=0;--d)(f&1<<d)!=0&&i.set(a),a++;if(c.getRightChar()!=null)for(var p=c.getRightChar().getValue(),d=11;d>=0;--d)(p&1<<d)!=0&&i.set(a),a++}return i},t})(),vt=(function(){function t(e,r){r?this.decodedInformation=null:(this.finished=e,this.decodedInformation=r)}return t.prototype.getDecodedInformation=function(){return this.decodedInformation},t.prototype.isFinished=function(){return this.finished},t})(),Yn=(function(){function t(e){this.newPosition=e}return t.prototype.getNewPosition=function(){return this.newPosition},t})(),U1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Le=(function(t){U1(e,t);function e(r,n){var i=t.call(this,r)||this;return i.value=n,i}return e.prototype.getValue=function(){return this.value},e.prototype.isFNC1=function(){return this.value===e.FNC1},e.FNC1="$",e})(Yn),$1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),gt=(function(t){$1(e,t);function e(r,n,i){var a=t.call(this,r)||this;return i?(a.remaining=!0,a.remainingValue=a.remainingValue):(a.remaining=!1,a.remainingValue=0),a.newString=n,a}return e.prototype.getNewString=function(){return this.newString},e.prototype.isRemaining=function(){return this.remaining},e.prototype.getRemainingValue=function(){return this.remainingValue},e})(Yn),H1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),At=(function(t){H1(e,t);function e(r,n,i){var a=t.call(this,r)||this;if(n<0||n>10||i<0||i>10)throw new R;return a.firstDigit=n,a.secondDigit=i,a}return e.prototype.getFirstDigit=function(){return this.firstDigit},e.prototype.getSecondDigit=function(){return this.secondDigit},e.prototype.getValue=function(){return this.firstDigit*10+this.secondDigit},e.prototype.isFirstDigitFNC1=function(){return this.firstDigit===e.FNC1},e.prototype.isSecondDigitFNC1=function(){return this.secondDigit===e.FNC1},e.prototype.isAnyFNC1=function(){return this.firstDigit===e.FNC1||this.secondDigit===e.FNC1},e.FNC1=10,e})(Yn),_r=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},G1=(function(){function t(){}return t.parseFieldsInGeneralPurpose=function(e){var r,n,i,a,o,s,l,c;if(!e)return null;if(e.length<2)throw new I;var f=e.substring(0,2);try{for(var d=_r(t.TWO_DIGIT_DATA_LENGTH),p=d.next();!p.done;p=d.next()){var h=p.value;if(h[0]===f)return h[1]===t.VARIABLE_LENGTH?t.processVariableAI(2,h[2],e):t.processFixedAI(2,h[1],e)}}catch(b){r={error:b}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}if(e.length<3)throw new I;var v=e.substring(0,3);try{for(var g=_r(t.THREE_DIGIT_DATA_LENGTH),y=g.next();!y.done;y=g.next()){var h=y.value;if(h[0]===v)return h[1]===t.VARIABLE_LENGTH?t.processVariableAI(3,h[2],e):t.processFixedAI(3,h[1],e)}}catch(b){i={error:b}}finally{try{y&&!y.done&&(a=g.return)&&a.call(g)}finally{if(i)throw i.error}}try{for(var _=_r(t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),m=_.next();!m.done;m=_.next()){var h=m.value;if(h[0]===v)return h[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,h[2],e):t.processFixedAI(4,h[1],e)}}catch(b){o={error:b}}finally{try{m&&!m.done&&(s=_.return)&&s.call(_)}finally{if(o)throw o.error}}if(e.length<4)throw new I;var E=e.substring(0,4);try{for(var w=_r(t.FOUR_DIGIT_DATA_LENGTH),C=w.next();!C.done;C=w.next()){var h=C.value;if(h[0]===E)return h[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,h[2],e):t.processFixedAI(4,h[1],e)}}catch(b){l={error:b}}finally{try{C&&!C.done&&(c=w.return)&&c.call(w)}finally{if(l)throw l.error}}throw new I},t.processFixedAI=function(e,r,n){if(n.length<e)throw new I;var i=n.substring(0,e);if(n.length<e+r)throw new I;var a=n.substring(e,e+r),o=n.substring(e+r),s="("+i+")"+a,l=t.parseFieldsInGeneralPurpose(o);return l==null?s:s+l},t.processVariableAI=function(e,r,n){var i=n.substring(0,e),a;n.length<e+r?a=n.length:a=e+r;var o=n.substring(e,a),s=n.substring(a),l="("+i+")"+o,c=t.parseFieldsInGeneralPurpose(s);return c==null?l:l+c},t.VARIABLE_LENGTH=[],t.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",t.VARIABLE_LENGTH,20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",t.VARIABLE_LENGTH,20],["22",t.VARIABLE_LENGTH,29],["30",t.VARIABLE_LENGTH,8],["37",t.VARIABLE_LENGTH,8],["90",t.VARIABLE_LENGTH,30],["91",t.VARIABLE_LENGTH,30],["92",t.VARIABLE_LENGTH,30],["93",t.VARIABLE_LENGTH,30],["94",t.VARIABLE_LENGTH,30],["95",t.VARIABLE_LENGTH,30],["96",t.VARIABLE_LENGTH,30],["97",t.VARIABLE_LENGTH,3],["98",t.VARIABLE_LENGTH,30],["99",t.VARIABLE_LENGTH,30]],t.THREE_DIGIT_DATA_LENGTH=[["240",t.VARIABLE_LENGTH,30],["241",t.VARIABLE_LENGTH,30],["242",t.VARIABLE_LENGTH,6],["250",t.VARIABLE_LENGTH,30],["251",t.VARIABLE_LENGTH,30],["253",t.VARIABLE_LENGTH,17],["254",t.VARIABLE_LENGTH,20],["400",t.VARIABLE_LENGTH,30],["401",t.VARIABLE_LENGTH,30],["402",17],["403",t.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",t.VARIABLE_LENGTH,20],["421",t.VARIABLE_LENGTH,15],["422",3],["423",t.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH=[["310",6],["311",6],["312",6],["313",6],["314",6],["315",6],["316",6],["320",6],["321",6],["322",6],["323",6],["324",6],["325",6],["326",6],["327",6],["328",6],["329",6],["330",6],["331",6],["332",6],["333",6],["334",6],["335",6],["336",6],["340",6],["341",6],["342",6],["343",6],["344",6],["345",6],["346",6],["347",6],["348",6],["349",6],["350",6],["351",6],["352",6],["353",6],["354",6],["355",6],["356",6],["357",6],["360",6],["361",6],["362",6],["363",6],["364",6],["365",6],["366",6],["367",6],["368",6],["369",6],["390",t.VARIABLE_LENGTH,15],["391",t.VARIABLE_LENGTH,18],["392",t.VARIABLE_LENGTH,15],["393",t.VARIABLE_LENGTH,18],["703",t.VARIABLE_LENGTH,30]],t.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",t.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",t.VARIABLE_LENGTH,20],["8003",t.VARIABLE_LENGTH,30],["8004",t.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",t.VARIABLE_LENGTH,30],["8008",t.VARIABLE_LENGTH,12],["8018",18],["8020",t.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",t.VARIABLE_LENGTH,70],["8200",t.VARIABLE_LENGTH,70]],t})(),Dr=(function(){function t(e){this.buffer=new J,this.information=e}return t.prototype.decodeAllCodes=function(e,r){var n=r,i=null;do{var a=this.decodeGeneralPurposeField(n,i),o=G1.parseFieldsInGeneralPurpose(a.getNewString());if(o!=null&&e.append(o),a.isRemaining()?i=""+a.getRemainingValue():i=null,n===a.getNewPosition())break;n=a.getNewPosition()}while(!0);return e.toString()},t.prototype.isStillNumeric=function(e){if(e+7>this.information.getSize())return e+4<=this.information.getSize();for(var r=e;r<e+3;++r)if(this.information.get(r))return!0;return this.information.get(e+3)},t.prototype.decodeNumeric=function(e){if(e+7>this.information.getSize()){var r=this.extractNumericValueFromBitArray(e,4);return r===0?new At(this.information.getSize(),At.FNC1,At.FNC1):new At(this.information.getSize(),r-1,At.FNC1)}var n=this.extractNumericValueFromBitArray(e,7),i=(n-8)/11,a=(n-8)%11;return new At(e+7,i,a)},t.prototype.extractNumericValueFromBitArray=function(e,r){return t.extractNumericValueFromBitArray(this.information,e,r)},t.extractNumericValueFromBitArray=function(e,r,n){for(var i=0,a=0;a<n;++a)e.get(r+a)&&(i|=1<<n-a-1);return i},t.prototype.decodeGeneralPurposeField=function(e,r){this.buffer.setLengthToZero(),r!=null&&this.buffer.append(r),this.current.setPosition(e);var n=this.parseBlocks();return n!=null&&n.isRemaining()?new gt(this.current.getPosition(),this.buffer.toString(),n.getRemainingValue()):new gt(this.current.getPosition(),this.buffer.toString())},t.prototype.parseBlocks=function(){var e,r;do{var n=this.current.getPosition();this.current.isAlpha()?(r=this.parseAlphaBlock(),e=r.isFinished()):this.current.isIsoIec646()?(r=this.parseIsoIec646Block(),e=r.isFinished()):(r=this.parseNumericBlock(),e=r.isFinished());var i=n!==this.current.getPosition();if(!i&&!e)break}while(!e);return r.getDecodedInformation()},t.prototype.parseNumericBlock=function(){for(;this.isStillNumeric(this.current.getPosition());){var e=this.decodeNumeric(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFirstDigitFNC1()){var r=void 0;return e.isSecondDigitFNC1()?r=new gt(this.current.getPosition(),this.buffer.toString()):r=new gt(this.current.getPosition(),this.buffer.toString(),e.getSecondDigit()),new vt(!0,r)}if(this.buffer.append(e.getFirstDigit()),e.isSecondDigitFNC1()){var r=new gt(this.current.getPosition(),this.buffer.toString());return new vt(!0,r)}this.buffer.append(e.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new vt(!1)},t.prototype.parseIsoIec646Block=function(){for(;this.isStillIsoIec646(this.current.getPosition());){var e=this.decodeIsoIec646(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFNC1()){var r=new gt(this.current.getPosition(),this.buffer.toString());return new vt(!0,r)}this.buffer.append(e.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setAlpha()),new vt(!1)},t.prototype.parseAlphaBlock=function(){for(;this.isStillAlpha(this.current.getPosition());){var e=this.decodeAlphanumeric(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFNC1()){var r=new gt(this.current.getPosition(),this.buffer.toString());return new vt(!0,r)}this.buffer.append(e.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setIsoIec646()),new vt(!1)},t.prototype.isStillIsoIec646=function(e){if(e+5>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(e,5);if(r>=5&&r<16)return!0;if(e+7>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(e,7);if(n>=64&&n<116)return!0;if(e+8>this.information.getSize())return!1;var i=this.extractNumericValueFromBitArray(e,8);return i>=232&&i<253},t.prototype.decodeIsoIec646=function(e){var r=this.extractNumericValueFromBitArray(e,5);if(r===15)return new Le(e+5,Le.FNC1);if(r>=5&&r<15)return new Le(e+5,"0"+(r-5));var n=this.extractNumericValueFromBitArray(e,7);if(n>=64&&n<90)return new Le(e+7,""+(n+1));if(n>=90&&n<116)return new Le(e+7,""+(n+7));var i=this.extractNumericValueFromBitArray(e,8),a;switch(i){case 232:a="!";break;case 233:a='"';break;case 234:a="%";break;case 235:a="&";break;case 236:a="'";break;case 237:a="(";break;case 238:a=")";break;case 239:a="*";break;case 240:a="+";break;case 241:a=",";break;case 242:a="-";break;case 243:a=".";break;case 244:a="/";break;case 245:a=":";break;case 246:a=";";break;case 247:a="<";break;case 248:a="=";break;case 249:a=">";break;case 250:a="?";break;case 251:a="_";break;case 252:a=" ";break;default:throw new R}return new Le(e+8,a)},t.prototype.isStillAlpha=function(e){if(e+5>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(e,5);if(r>=5&&r<16)return!0;if(e+6>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(e,6);return n>=16&&n<63},t.prototype.decodeAlphanumeric=function(e){var r=this.extractNumericValueFromBitArray(e,5);if(r===15)return new Le(e+5,Le.FNC1);if(r>=5&&r<15)return new Le(e+5,"0"+(r-5));var n=this.extractNumericValueFromBitArray(e,6);if(n>=32&&n<58)return new Le(e+6,""+(n+33));var i;switch(n){case 58:i="*";break;case 59:i=",";break;case 60:i="-";break;case 61:i=".";break;case 62:i="/";break;default:throw new hr("Decoding invalid alphanumeric value: "+n)}return new Le(e+6,i)},t.prototype.isAlphaTo646ToAlphaLatch=function(e){if(e+1>this.information.getSize())return!1;for(var r=0;r<5&&r+e<this.information.getSize();++r)if(r===2){if(!this.information.get(e+2))return!1}else if(this.information.get(e+r))return!1;return!0},t.prototype.isAlphaOr646ToNumericLatch=function(e){if(e+3>this.information.getSize())return!1;for(var r=e;r<e+3;++r)if(this.information.get(r))return!1;return!0},t.prototype.isNumericToAlphaNumericLatch=function(e){if(e+1>this.information.getSize())return!1;for(var r=0;r<4&&r+e<this.information.getSize();++r)if(this.information.get(e+r))return!1;return!0},t})(),pa=(function(){function t(e){this.information=e,this.generalDecoder=new Dr(e)}return t.prototype.getInformation=function(){return this.information},t.prototype.getGeneralDecoder=function(){return this.generalDecoder},t})(),z1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ue=(function(t){z1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.encodeCompressedGtin=function(r,n){r.append("(01)");var i=r.length();r.append("9"),this.encodeCompressedGtinWithoutAI(r,n,i)},e.prototype.encodeCompressedGtinWithoutAI=function(r,n,i){for(var a=0;a<4;++a){var o=this.getGeneralDecoder().extractNumericValueFromBitArray(n+10*a,10);o/100===0&&r.append("0"),o/10===0&&r.append("0"),r.append(o)}e.appendCheckDigit(r,i)},e.appendCheckDigit=function(r,n){for(var i=0,a=0;a<13;a++){var o=r.charAt(a+n).charCodeAt(0)-48;i+=(a&1)===0?3*o:o}i=10-i%10,i===10&&(i=0),r.append(i)},e.GTIN_SIZE=40,e})(pa),W1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),X1=(function(t){W1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){var r=new J;r.append("(01)");var n=r.length(),i=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE,4);return r.append(i),this.encodeCompressedGtinWithoutAI(r,e.HEADER_SIZE+4,n),this.getGeneralDecoder().decodeAllCodes(r,e.HEADER_SIZE+44)},e.HEADER_SIZE=4,e})(Ue),K1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),j1=(function(t){K1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){var r=new J;return this.getGeneralDecoder().decodeAllCodes(r,e.HEADER_SIZE)},e.HEADER_SIZE=5,e})(pa),Y1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Br=(function(t){Y1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.encodeCompressedWeight=function(r,n,i){var a=this.getGeneralDecoder().extractNumericValueFromBitArray(n,i);this.addWeightCode(r,a);for(var o=this.checkWeight(a),s=1e5,l=0;l<5;++l)o/s===0&&r.append("0"),s/=10;r.append(o)},e})(Ue),q1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),va=(function(t){q1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()!=e.HEADER_SIZE+Br.GTIN_SIZE+e.WEIGHT_SIZE)throw new I;var r=new J;return this.encodeCompressedGtin(r,e.HEADER_SIZE),this.encodeCompressedWeight(r,e.HEADER_SIZE+Br.GTIN_SIZE,e.WEIGHT_SIZE),r.toString()},e.HEADER_SIZE=5,e.WEIGHT_SIZE=15,e})(Br),Z1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Q1=(function(t){Z1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.addWeightCode=function(r,n){r.append("(3103)")},e.prototype.checkWeight=function(r){return r},e})(va),J1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),ec=(function(t){J1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.addWeightCode=function(r,n){n<1e4?r.append("(3202)"):r.append("(3203)")},e.prototype.checkWeight=function(r){return r<1e4?r:r-1e4},e})(va),tc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),rc=(function(t){tc(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+Ue.GTIN_SIZE)throw new I;var r=new J;this.encodeCompressedGtin(r,e.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ue.GTIN_SIZE,e.LAST_DIGIT_SIZE);r.append("(392"),r.append(n),r.append(")");var i=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+Ue.GTIN_SIZE+e.LAST_DIGIT_SIZE,null);return r.append(i.getNewString()),r.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e})(Ue),nc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),ic=(function(t){nc(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+Ue.GTIN_SIZE)throw new I;var r=new J;this.encodeCompressedGtin(r,e.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ue.GTIN_SIZE,e.LAST_DIGIT_SIZE);r.append("(393"),r.append(n),r.append(")");var i=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ue.GTIN_SIZE+e.LAST_DIGIT_SIZE,e.FIRST_THREE_DIGITS_SIZE);i/100==0&&r.append("0"),i/10==0&&r.append("0"),r.append(i);var a=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+Ue.GTIN_SIZE+e.LAST_DIGIT_SIZE+e.FIRST_THREE_DIGITS_SIZE,null);return r.append(a.getNewString()),r.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e.FIRST_THREE_DIGITS_SIZE=10,e})(Ue),ac=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),at=(function(t){ac(e,t);function e(r,n,i){var a=t.call(this,r)||this;return a.dateCode=i,a.firstAIdigits=n,a}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()!=e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE+e.DATE_SIZE)throw new I;var r=new J;return this.encodeCompressedGtin(r,e.HEADER_SIZE),this.encodeCompressedWeight(r,e.HEADER_SIZE+e.GTIN_SIZE,e.WEIGHT_SIZE),this.encodeCompressedDate(r,e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE),r.toString()},e.prototype.encodeCompressedDate=function(r,n){var i=this.getGeneralDecoder().extractNumericValueFromBitArray(n,e.DATE_SIZE);if(i!=38400){r.append("("),r.append(this.dateCode),r.append(")");var a=i%32;i/=32;var o=i%12+1;i/=12;var s=i;s/10==0&&r.append("0"),r.append(s),o/10==0&&r.append("0"),r.append(o),a/10==0&&r.append("0"),r.append(a)}},e.prototype.addWeightCode=function(r,n){r.append("("),r.append(this.firstAIdigits),r.append(n/1e5),r.append(")")},e.prototype.checkWeight=function(r){return r%1e5},e.HEADER_SIZE=8,e.WEIGHT_SIZE=20,e.DATE_SIZE=16,e})(Br);function oc(t){try{if(t.get(1))return new X1(t);if(!t.get(2))return new j1(t);var e=Dr.extractNumericValueFromBitArray(t,1,4);switch(e){case 4:return new Q1(t);case 5:return new ec(t)}var r=Dr.extractNumericValueFromBitArray(t,1,5);switch(r){case 12:return new rc(t);case 13:return new ic(t)}var n=Dr.extractNumericValueFromBitArray(t,1,7);switch(n){case 56:return new at(t,"310","11");case 57:return new at(t,"320","11");case 58:return new at(t,"310","13");case 59:return new at(t,"320","13");case 60:return new at(t,"310","15");case 61:return new at(t,"320","15");case 62:return new at(t,"310","17");case 63:return new at(t,"320","17")}}catch(i){throw console.log(i),new hr("unknown decoder: "+t)}}var Ni=(function(){function t(e,r,n,i){this.leftchar=e,this.rightchar=r,this.finderpattern=n,this.maybeLast=i}return t.prototype.mayBeLast=function(){return this.maybeLast},t.prototype.getLeftChar=function(){return this.leftchar},t.prototype.getRightChar=function(){return this.rightchar},t.prototype.getFinderPattern=function(){return this.finderpattern},t.prototype.mustBeLast=function(){return this.rightchar==null},t.prototype.toString=function(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(this.finderpattern==null?"null":this.finderpattern.getValue())+" ]"},t.equals=function(e,r){return e instanceof t?t.equalsOrNull(e.leftchar,r.leftchar)&&t.equalsOrNull(e.rightchar,r.rightchar)&&t.equalsOrNull(e.finderpattern,r.finderpattern):!1},t.equalsOrNull=function(e,r){return e===null?r===null:t.equals(e,r)},t.prototype.hashCode=function(){var e=this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue();return e},t})(),sc=(function(){function t(e,r,n){this.pairs=e,this.rowNumber=r,this.wasReversed=n}return t.prototype.getPairs=function(){return this.pairs},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.isReversed=function(){return this.wasReversed},t.prototype.isEquivalent=function(e){return this.checkEqualitity(this,e)},t.prototype.toString=function(){return"{ "+this.pairs+" }"},t.prototype.equals=function(e,r){return e instanceof t?this.checkEqualitity(e,r)&&e.wasReversed===r.wasReversed:!1},t.prototype.checkEqualitity=function(e,r){if(!(!e||!r)){var n;return e.forEach(function(i,a){r.forEach(function(o){i.getLeftChar().getValue()===o.getLeftChar().getValue()&&i.getRightChar().getValue()===o.getRightChar().getValue()&&i.getFinderPatter().getValue()===o.getFinderPatter().getValue()&&(n=!0)})}),n}},t})(),lc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),ot=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},uc=(function(t){lc(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.pairs=new Array(e.MAX_PAIRS),r.rows=new Array,r.startEnd=[2],r}return e.prototype.decodeRow=function(r,n,i){this.pairs.length=0,this.startFromEven=!1;try{return e.constructResult(this.decodeRow2pairs(r,n))}catch{}return this.pairs.length=0,this.startFromEven=!0,e.constructResult(this.decodeRow2pairs(r,n))},e.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},e.prototype.decodeRow2pairs=function(r,n){for(var i=!1;!i;)try{this.pairs.push(this.retrieveNextPair(n,this.pairs,r))}catch(s){if(s instanceof I){if(!this.pairs.length)throw new I;i=!0}}if(this.checkChecksum())return this.pairs;var a;if(this.rows.length?a=!0:a=!1,this.storeRow(r,!1),a){var o=this.checkRowsBoolean(!1);if(o!=null||(o=this.checkRowsBoolean(!0),o!=null))return o}throw new I},e.prototype.checkRowsBoolean=function(r){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,r&&(this.rows=this.rows.reverse());var n=null;try{n=this.checkRows(new Array,0)}catch(i){console.log(i)}return r&&(this.rows=this.rows.reverse()),n},e.prototype.checkRows=function(r,n){for(var i,a,o=n;o<this.rows.length;o++){var s=this.rows[o];this.pairs.length=0;try{for(var l=(i=void 0,ot(r)),c=l.next();!c.done;c=l.next()){var f=c.value;this.pairs.push(f.getPairs())}}catch(p){i={error:p}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}if(this.pairs.push(s.getPairs()),!!e.isValidSequence(this.pairs)){if(this.checkChecksum())return this.pairs;var d=new Array(r);d.push(s);try{return this.checkRows(d,o+1)}catch(p){console.log(p)}}}throw new I},e.isValidSequence=function(r){var n,i;try{for(var a=ot(e.FINDER_PATTERN_SEQUENCES),o=a.next();!o.done;o=a.next()){var s=o.value;if(!(r.length>s.length)){for(var l=!0,c=0;c<r.length;c++)if(r[c].getFinderPattern().getValue()!=s[c]){l=!1;break}if(l)return!0}}}catch(f){n={error:f}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return!1},e.prototype.storeRow=function(r,n){for(var i=0,a=!1,o=!1;i<this.rows.length;){var s=this.rows[i];if(s.getRowNumber()>r){o=s.isEquivalent(this.pairs);break}a=s.isEquivalent(this.pairs),i++}o||a||e.isPartialRow(this.pairs,this.rows)||(this.rows.push(i,new sc(this.pairs,r,n)),this.removePartialRows(this.pairs,this.rows))},e.prototype.removePartialRows=function(r,n){var i,a,o,s,l,c;try{for(var f=ot(n),d=f.next();!d.done;d=f.next()){var p=d.value;if(p.getPairs().length!==r.length){var h=!0;try{for(var v=(o=void 0,ot(p.getPairs())),g=v.next();!g.done;g=v.next()){var y=g.value,_=!1;try{for(var m=(l=void 0,ot(r)),E=m.next();!E.done;E=m.next()){var w=E.value;if(Ni.equals(y,w)){_=!0;break}}}catch(C){l={error:C}}finally{try{E&&!E.done&&(c=m.return)&&c.call(m)}finally{if(l)throw l.error}}_||(h=!1)}}catch(C){o={error:C}}finally{try{g&&!g.done&&(s=v.return)&&s.call(v)}finally{if(o)throw o.error}}}}}catch(C){i={error:C}}finally{try{d&&!d.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}},e.isPartialRow=function(r,n){var i,a,o,s,l,c;try{for(var f=ot(n),d=f.next();!d.done;d=f.next()){var p=d.value,h=!0;try{for(var v=(o=void 0,ot(r)),g=v.next();!g.done;g=v.next()){var y=g.value,_=!1;try{for(var m=(l=void 0,ot(p.getPairs())),E=m.next();!E.done;E=m.next()){var w=E.value;if(y.equals(w)){_=!0;break}}}catch(C){l={error:C}}finally{try{E&&!E.done&&(c=m.return)&&c.call(m)}finally{if(l)throw l.error}}if(!_){h=!1;break}}}catch(C){o={error:C}}finally{try{g&&!g.done&&(s=v.return)&&s.call(v)}finally{if(o)throw o.error}}if(h)return!0}}catch(C){i={error:C}}finally{try{d&&!d.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}return!1},e.prototype.getRows=function(){return this.rows},e.constructResult=function(r){var n=V1.buildBitArray(r),i=oc(n),a=i.parseInformation(),o=r[0].getFinderPattern().getResultPoints(),s=r[r.length-1].getFinderPattern().getResultPoints(),l=[o[0],o[1],s[0],s[1]];return new Be(a,null,null,l,U.RSS_EXPANDED,null)},e.prototype.checkChecksum=function(){var r=this.pairs.get(0),n=r.getLeftChar(),i=r.getRightChar();if(i==null)return!1;for(var a=i.getChecksumPortion(),o=2,s=1;s<this.pairs.size();++s){var l=this.pairs.get(s);a+=l.getLeftChar().getChecksumPortion(),o++;var c=l.getRightChar();c!=null&&(a+=c.getChecksumPortion(),o++)}a%=211;var f=211*(o-4)+a;return f==n.getValue()},e.getNextSecondBar=function(r,n){var i;return r.get(n)?(i=r.getNextUnset(n),i=r.getNextSet(i)):(i=r.getNextSet(n),i=r.getNextUnset(i)),i},e.prototype.retrieveNextPair=function(r,n,i){var a=n.length%2==0;this.startFromEven&&(a=!a);var o,s=!0,l=-1;do this.findNextPair(r,n,l),o=this.parseFoundFinderPattern(r,i,a),o==null?l=e.getNextSecondBar(r,this.startEnd[0]):s=!1;while(s);var c=this.decodeDataCharacter(r,o,a,!0);if(!this.isEmptyPair(n)&&n[n.length-1].mustBeLast())throw new I;var f;try{f=this.decodeDataCharacter(r,o,a,!1)}catch(d){f=null,console.log(d)}return new Ni(c,f,o,!0)},e.prototype.isEmptyPair=function(r){return r.length===0},e.prototype.findNextPair=function(r,n,i){var a=this.getDecodeFinderCounters();a[0]=0,a[1]=0,a[2]=0,a[3]=0;var o=r.getSize(),s;if(i>=0)s=i;else if(this.isEmptyPair(n))s=0;else{var l=n[n.length-1];s=l.getFinderPattern().getStartEnd()[1]}var c=n.length%2!=0;this.startFromEven&&(c=!c);for(var f=!1;s<o&&(f=!r.get(s),!!f);)s++;for(var d=0,p=s,h=s;h<o;h++)if(r.get(h)!=f)a[d]++;else{if(d==3){if(c&&e.reverseCounters(a),e.isFinderPattern(a)){this.startEnd[0]=p,this.startEnd[1]=h;return}c&&e.reverseCounters(a),p+=a[0]+a[1],a[0]=a[2],a[1]=a[3],a[2]=0,a[3]=0,d--}else d++;a[d]=1,f=!f}throw new I},e.reverseCounters=function(r){for(var n=r.length,i=0;i<n/2;++i){var a=r[i];r[i]=r[n-i-1],r[n-i-1]=a}},e.prototype.parseFoundFinderPattern=function(r,n,i){var a,o,s;if(i){for(var l=this.startEnd[0]-1;l>=0&&!r.get(l);)l--;l++,a=this.startEnd[0]-l,o=l,s=this.startEnd[1]}else o=this.startEnd[0],s=r.getNextUnset(this.startEnd[1]+1),a=s-this.startEnd[1];var c=this.getDecodeFinderCounters();ne.arraycopy(c,0,c,1,c.length-1),c[0]=a;var f;try{f=this.parseFinderValue(c,e.FINDER_PATTERNS)}catch{return null}return new ha(f,[o,s],o,s,n)},e.prototype.decodeDataCharacter=function(r,n,i,a){for(var o=this.getDataCharacterCounters(),s=0;s<o.length;s++)o[s]=0;if(a)e.recordPatternInReverse(r,n.getStartEnd()[0],o);else{e.recordPattern(r,n.getStartEnd()[1],o);for(var l=0,c=o.length-1;l<c;l++,c--){var f=o[l];o[l]=o[c],o[c]=f}}var d=17,p=X.sum(new Int32Array(o))/d,h=(n.getStartEnd()[1]-n.getStartEnd()[0])/15;if(Math.abs(p-h)/h>.3)throw new I;for(var v=this.getOddCounts(),g=this.getEvenCounts(),y=this.getOddRoundingErrors(),_=this.getEvenRoundingErrors(),l=0;l<o.length;l++){var m=1*o[l]/p,E=m+.5;if(E<1){if(m<.3)throw new I;E=1}else if(E>8){if(m>8.7)throw new I;E=8}var w=l/2;(l&1)==0?(v[w]=E,y[w]=m-E):(g[w]=E,_[w]=m-E)}this.adjustOddEvenCounts(d);for(var C=4*n.getValue()+(i?0:2)+(a?0:1)-1,b=0,O=0,l=v.length-1;l>=0;l--){if(e.isNotA1left(n,i,a)){var P=e.WEIGHTS[C][2*l];O+=v[l]*P}b+=v[l]}for(var H=0,l=g.length-1;l>=0;l--)if(e.isNotA1left(n,i,a)){var P=e.WEIGHTS[C][2*l+1];H+=g[l]*P}var L=O+H;if((b&1)!=0||b>13||b<4)throw new I;var te=(13-b)/2,V=e.SYMBOL_WIDEST[te],z=9-V,he=bt.getRSSvalue(v,V,!0),He=bt.getRSSvalue(g,z,!1),pr=e.EVEN_TOTAL_SUBSET[te],rt=e.GSUM[te],nt=he*pr+He+rt;return new Lr(nt,L)},e.isNotA1left=function(r,n,i){return!(r.getValue()==0&&n&&i)},e.prototype.adjustOddEvenCounts=function(r){var n=X.sum(new Int32Array(this.getOddCounts())),i=X.sum(new Int32Array(this.getEvenCounts())),a=!1,o=!1;n>13?o=!0:n<4&&(a=!0);var s=!1,l=!1;i>13?l=!0:i<4&&(s=!0);var c=n+i-r,f=(n&1)==1,d=(i&1)==0;if(c==1)if(f){if(d)throw new I;o=!0}else{if(!d)throw new I;l=!0}else if(c==-1)if(f){if(d)throw new I;a=!0}else{if(!d)throw new I;s=!0}else if(c==0){if(f){if(!d)throw new I;n<i?(a=!0,l=!0):(o=!0,s=!0)}else if(d)throw new I}else throw new I;if(a){if(o)throw new I;e.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(o&&e.decrement(this.getOddCounts(),this.getOddRoundingErrors()),s){if(l)throw new I;e.increment(this.getEvenCounts(),this.getOddRoundingErrors())}l&&e.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.SYMBOL_WIDEST=[7,5,4,3,1],e.EVEN_TOTAL_SUBSET=[4,20,52,104,204],e.GSUM=[0,348,1388,2948,3988],e.FINDER_PATTERNS=[Int32Array.from([1,8,4,1]),Int32Array.from([3,6,4,1]),Int32Array.from([3,4,6,1]),Int32Array.from([3,2,8,1]),Int32Array.from([2,6,5,1]),Int32Array.from([2,2,9,1])],e.WEIGHTS=[[1,3,9,27,81,32,96,77],[20,60,180,118,143,7,21,63],[189,145,13,39,117,140,209,205],[193,157,49,147,19,57,171,91],[62,186,136,197,169,85,44,132],[185,133,188,142,4,12,36,108],[113,128,173,97,80,29,87,50],[150,28,84,41,123,158,52,156],[46,138,203,187,139,206,196,166],[76,17,51,153,37,111,122,155],[43,129,176,106,107,110,119,146],[16,48,144,10,30,90,59,177],[109,116,137,200,178,112,125,164],[70,210,208,202,184,130,179,115],[134,191,151,31,93,68,204,190],[148,22,66,198,172,94,71,2],[6,18,54,162,64,192,154,40],[120,149,25,75,14,42,126,167],[79,26,78,23,69,207,199,175],[103,98,83,38,114,131,182,124],[161,61,183,127,170,88,53,159],[55,165,73,8,24,72,5,15],[45,135,194,160,58,174,100,89]],e.FINDER_PAT_A=0,e.FINDER_PAT_B=1,e.FINDER_PAT_C=2,e.FINDER_PAT_D=3,e.FINDER_PAT_E=4,e.FINDER_PAT_F=5,e.FINDER_PATTERN_SEQUENCES=[[e.FINDER_PAT_A,e.FINDER_PAT_A],[e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B],[e.FINDER_PAT_A,e.FINDER_PAT_C,e.FINDER_PAT_B,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_C],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F]],e.MAX_PAIRS=11,e})(xt),cc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),fc=(function(t){cc(e,t);function e(r,n,i){var a=t.call(this,r,n)||this;return a.count=0,a.finderPattern=i,a}return e.prototype.getFinderPattern=function(){return this.finderPattern},e.prototype.getCount=function(){return this.count},e.prototype.incrementCount=function(){this.count++},e})(Lr),dc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),hn=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Di=(function(t){dc(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.possibleLeftPairs=[],r.possibleRightPairs=[],r}return e.prototype.decodeRow=function(r,n,i){var a,o,s,l,c=this.decodePair(n,!1,r,i);e.addOrTally(this.possibleLeftPairs,c),n.reverse();var f=this.decodePair(n,!0,r,i);e.addOrTally(this.possibleRightPairs,f),n.reverse();try{for(var d=hn(this.possibleLeftPairs),p=d.next();!p.done;p=d.next()){var h=p.value;if(h.getCount()>1)try{for(var v=(s=void 0,hn(this.possibleRightPairs)),g=v.next();!g.done;g=v.next()){var y=g.value;if(y.getCount()>1&&e.checkChecksum(h,y))return e.constructResult(h,y)}}catch(_){s={error:_}}finally{try{g&&!g.done&&(l=v.return)&&l.call(v)}finally{if(s)throw s.error}}}}catch(_){a={error:_}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(a)throw a.error}}throw new I},e.addOrTally=function(r,n){var i,a;if(n!=null){var o=!1;try{for(var s=hn(r),l=s.next();!l.done;l=s.next()){var c=l.value;if(c.getValue()===n.getValue()){c.incrementCount(),o=!0;break}}}catch(f){i={error:f}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}o||r.push(n)}},e.prototype.reset=function(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0},e.constructResult=function(r,n){for(var i=4537077*r.getValue()+n.getValue(),a=new String(i).toString(),o=new J,s=13-a.length;s>0;s--)o.append("0");o.append(a);for(var l=0,s=0;s<13;s++){var c=o.charAt(s).charCodeAt(0)-48;l+=(s&1)===0?3*c:c}l=10-l%10,l===10&&(l=0),o.append(l.toString());var f=r.getFinderPattern().getResultPoints(),d=n.getFinderPattern().getResultPoints();return new Be(o.toString(),null,0,[f[0],f[1],d[0],d[1]],U.RSS_14,new Date().getTime())},e.checkChecksum=function(r,n){var i=(r.getChecksumPortion()+16*n.getChecksumPortion())%79,a=9*r.getFinderPattern().getValue()+n.getFinderPattern().getValue();return a>72&&a--,a>8&&a--,i===a},e.prototype.decodePair=function(r,n,i,a){try{var o=this.findFinderPattern(r,n),s=this.parseFoundFinderPattern(r,i,n,o),l=a==null?null:a.get(le.NEED_RESULT_POINT_CALLBACK);if(l!=null){var c=(o[0]+o[1])/2;n&&(c=r.getSize()-1-c),l.foundPossibleResultPoint(new k(c,i))}var f=this.decodeDataCharacter(r,s,!0),d=this.decodeDataCharacter(r,s,!1);return new fc(1597*f.getValue()+d.getValue(),f.getChecksumPortion()+4*d.getChecksumPortion(),s)}catch{return null}},e.prototype.decodeDataCharacter=function(r,n,i){for(var a=this.getDataCharacterCounters(),o=0;o<a.length;o++)a[o]=0;if(i)_e.recordPatternInReverse(r,n.getStartEnd()[0],a);else{_e.recordPattern(r,n.getStartEnd()[1]+1,a);for(var s=0,l=a.length-1;s<l;s++,l--){var c=a[s];a[s]=a[l],a[l]=c}}for(var f=i?16:15,d=X.sum(new Int32Array(a))/f,p=this.getOddCounts(),h=this.getEvenCounts(),v=this.getOddRoundingErrors(),g=this.getEvenRoundingErrors(),s=0;s<a.length;s++){var y=a[s]/d,_=Math.floor(y+.5);_<1?_=1:_>8&&(_=8);var m=Math.floor(s/2);(s&1)===0?(p[m]=_,v[m]=y-_):(h[m]=_,g[m]=y-_)}this.adjustOddEvenCounts(i,f);for(var E=0,w=0,s=p.length-1;s>=0;s--)w*=9,w+=p[s],E+=p[s];for(var C=0,b=0,s=h.length-1;s>=0;s--)C*=9,C+=h[s],b+=h[s];var O=w+3*C;if(i){if((E&1)!==0||E>12||E<4)throw new I;var P=(12-E)/2,H=e.OUTSIDE_ODD_WIDEST[P],L=9-H,te=bt.getRSSvalue(p,H,!1),V=bt.getRSSvalue(h,L,!0),z=e.OUTSIDE_EVEN_TOTAL_SUBSET[P],he=e.OUTSIDE_GSUM[P];return new Lr(te*z+V+he,O)}else{if((b&1)!==0||b>10||b<4)throw new I;var P=(10-b)/2,H=e.INSIDE_ODD_WIDEST[P],L=9-H,te=bt.getRSSvalue(p,H,!0),V=bt.getRSSvalue(h,L,!1),He=e.INSIDE_ODD_TOTAL_SUBSET[P],he=e.INSIDE_GSUM[P];return new Lr(V*He+te+he,O)}},e.prototype.findFinderPattern=function(r,n){var i=this.getDecodeFinderCounters();i[0]=0,i[1]=0,i[2]=0,i[3]=0;for(var a=r.getSize(),o=!1,s=0;s<a&&(o=!r.get(s),n!==o);)s++;for(var l=0,c=s,f=s;f<a;f++)if(r.get(f)!==o)i[l]++;else{if(l===3){if(xt.isFinderPattern(i))return[c,f];c+=i[0]+i[1],i[0]=i[2],i[1]=i[3],i[2]=0,i[3]=0,l--}else l++;i[l]=1,o=!o}throw new I},e.prototype.parseFoundFinderPattern=function(r,n,i,a){for(var o=r.get(a[0]),s=a[0]-1;s>=0&&o!==r.get(s);)s--;s++;var l=a[0]-s,c=this.getDecodeFinderCounters(),f=new Int32Array(c.length);ne.arraycopy(c,0,f,1,c.length-1),f[0]=l;var d=this.parseFinderValue(f,e.FINDER_PATTERNS),p=s,h=a[1];return i&&(p=r.getSize()-1-p,h=r.getSize()-1-h),new ha(d,[s,a[1]],p,h,n)},e.prototype.adjustOddEvenCounts=function(r,n){var i=X.sum(new Int32Array(this.getOddCounts())),a=X.sum(new Int32Array(this.getEvenCounts())),o=!1,s=!1,l=!1,c=!1;r?(i>12?s=!0:i<4&&(o=!0),a>12?c=!0:a<4&&(l=!0)):(i>11?s=!0:i<5&&(o=!0),a>10?c=!0:a<4&&(l=!0));var f=i+a-n,d=(i&1)===(r?1:0),p=(a&1)===1;if(f===1)if(d){if(p)throw new I;s=!0}else{if(!p)throw new I;c=!0}else if(f===-1)if(d){if(p)throw new I;o=!0}else{if(!p)throw new I;l=!0}else if(f===0){if(d){if(!p)throw new I;i<a?(o=!0,c=!0):(s=!0,l=!0)}else if(p)throw new I}else throw new I;if(o){if(s)throw new I;xt.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(s&&xt.decrement(this.getOddCounts(),this.getOddRoundingErrors()),l){if(c)throw new I;xt.increment(this.getEvenCounts(),this.getOddRoundingErrors())}c&&xt.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],e.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],e.OUTSIDE_GSUM=[0,161,961,2015,2715],e.INSIDE_GSUM=[0,336,1036,1516],e.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],e.INSIDE_ODD_WIDEST=[2,4,6,8],e.FINDER_PATTERNS=[Int32Array.from([3,8,2,1]),Int32Array.from([3,5,5,1]),Int32Array.from([3,3,7,1]),Int32Array.from([3,1,9,1]),Int32Array.from([2,7,4,1]),Int32Array.from([2,5,6,1]),Int32Array.from([2,3,8,1]),Int32Array.from([1,5,7,1]),Int32Array.from([1,3,9,1])],e})(xt),hc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),rr=(function(t){hc(e,t);function e(r){var n=t.call(this)||this;n.readers=[];var i=r?r.get(le.POSSIBLE_FORMATS):null,a=r&&r.get(le.ASSUME_CODE_39_CHECK_DIGIT)!==void 0;return i&&((i.includes(U.EAN_13)||i.includes(U.UPC_A)||i.includes(U.EAN_8)||i.includes(U.UPC_E))&&n.readers.push(new dn(r)),i.includes(U.CODE_39)&&n.readers.push(new Ei(a)),i.includes(U.CODE_128)&&n.readers.push(new _i),i.includes(U.ITF)&&n.readers.push(new Ai),i.includes(U.RSS_14)&&n.readers.push(new Di),i.includes(U.RSS_EXPANDED)&&(console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),n.readers.push(new uc))),n.readers.length===0&&(n.readers.push(new dn(r)),n.readers.push(new Ei),n.readers.push(new dn(r)),n.readers.push(new _i),n.readers.push(new Ai),n.readers.push(new Di)),n}return e.prototype.decodeRow=function(r,n,i){for(var a=0;a<this.readers.length;a++)try{return this.readers[a].decodeRow(r,n,i)}catch{}throw new I},e.prototype.reset=function(){this.readers.forEach(function(r){return r.reset()})},e})(_e),pc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();(function(t){pc(e,t);function e(r,n){return r===void 0&&(r=500),t.call(this,new rr(n),r,n)||this}return e})(Vt);var Bi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},j=(function(){function t(e,r,n){this.ecCodewords=e,this.ecBlocks=[r],n&&this.ecBlocks.push(n)}return t.prototype.getECCodewords=function(){return this.ecCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t})(),K=(function(){function t(e,r){this.count=e,this.dataCodewords=r}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t})(),vc=(function(){function t(e,r,n,i,a,o){var s,l;this.versionNumber=e,this.symbolSizeRows=r,this.symbolSizeColumns=n,this.dataRegionSizeRows=i,this.dataRegionSizeColumns=a,this.ecBlocks=o;var c=0,f=o.getECCodewords(),d=o.getECBlocks();try{for(var p=Bi(d),h=p.next();!h.done;h=p.next()){var v=h.value;c+=v.getCount()*(v.getDataCodewords()+f)}}catch(g){s={error:g}}finally{try{h&&!h.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}this.totalCodewords=c}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},t.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},t.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},t.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t.getVersionForDimensions=function(e,r){var n,i;if((e&1)!==0||(r&1)!==0)throw new R;try{for(var a=Bi(t.VERSIONS),o=a.next();!o.done;o=a.next()){var s=o.value;if(s.symbolSizeRows===e&&s.symbolSizeColumns===r)return s}}catch(l){n={error:l}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}throw new R},t.prototype.toString=function(){return""+this.versionNumber},t.buildVersions=function(){return[new t(1,10,10,8,8,new j(5,new K(1,3))),new t(2,12,12,10,10,new j(7,new K(1,5))),new t(3,14,14,12,12,new j(10,new K(1,8))),new t(4,16,16,14,14,new j(12,new K(1,12))),new t(5,18,18,16,16,new j(14,new K(1,18))),new t(6,20,20,18,18,new j(18,new K(1,22))),new t(7,22,22,20,20,new j(20,new K(1,30))),new t(8,24,24,22,22,new j(24,new K(1,36))),new t(9,26,26,24,24,new j(28,new K(1,44))),new t(10,32,32,14,14,new j(36,new K(1,62))),new t(11,36,36,16,16,new j(42,new K(1,86))),new t(12,40,40,18,18,new j(48,new K(1,114))),new t(13,44,44,20,20,new j(56,new K(1,144))),new t(14,48,48,22,22,new j(68,new K(1,174))),new t(15,52,52,24,24,new j(42,new K(2,102))),new t(16,64,64,14,14,new j(56,new K(2,140))),new t(17,72,72,16,16,new j(36,new K(4,92))),new t(18,80,80,18,18,new j(48,new K(4,114))),new t(19,88,88,20,20,new j(56,new K(4,144))),new t(20,96,96,22,22,new j(68,new K(4,174))),new t(21,104,104,24,24,new j(56,new K(6,136))),new t(22,120,120,18,18,new j(68,new K(6,175))),new t(23,132,132,20,20,new j(62,new K(8,163))),new t(24,144,144,22,22,new j(62,new K(8,156),new K(2,155))),new t(25,8,18,6,16,new j(7,new K(1,5))),new t(26,8,32,6,14,new j(11,new K(1,10))),new t(27,12,26,10,24,new j(14,new K(1,16))),new t(28,12,36,10,16,new j(18,new K(1,22))),new t(29,16,36,14,16,new j(24,new K(1,32))),new t(30,16,48,14,22,new j(28,new K(1,49)))]},t.VERSIONS=t.buildVersions(),t})(),gc=(function(){function t(e){var r=e.getHeight();if(r<8||r>144||(r&1)!==0)throw new R;this.version=t.readVersion(e),this.mappingBitMatrix=this.extractDataRegion(e),this.readMappingMatrix=new qe(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}return t.prototype.getVersion=function(){return this.version},t.readVersion=function(e){var r=e.getHeight(),n=e.getWidth();return vc.getVersionForDimensions(r,n)},t.prototype.readCodewords=function(){var e=new Int8Array(this.version.getTotalCodewords()),r=0,n=4,i=0,a=this.mappingBitMatrix.getHeight(),o=this.mappingBitMatrix.getWidth(),s=!1,l=!1,c=!1,f=!1;do if(n===a&&i===0&&!s)e[r++]=this.readCorner1(a,o)&255,n-=2,i+=2,s=!0;else if(n===a-2&&i===0&&(o&3)!==0&&!l)e[r++]=this.readCorner2(a,o)&255,n-=2,i+=2,l=!0;else if(n===a+4&&i===2&&(o&7)===0&&!c)e[r++]=this.readCorner3(a,o)&255,n-=2,i+=2,c=!0;else if(n===a-2&&i===0&&(o&7)===4&&!f)e[r++]=this.readCorner4(a,o)&255,n-=2,i+=2,f=!0;else{do n<a&&i>=0&&!this.readMappingMatrix.get(i,n)&&(e[r++]=this.readUtah(n,i,a,o)&255),n-=2,i+=2;while(n>=0&&i<o);n+=1,i+=3;do n>=0&&i<o&&!this.readMappingMatrix.get(i,n)&&(e[r++]=this.readUtah(n,i,a,o)&255),n+=2,i-=2;while(n<a&&i>=0);n+=3,i+=1}while(n<a||i<o);if(r!==this.version.getTotalCodewords())throw new R;return e},t.prototype.readModule=function(e,r,n,i){return e<0&&(e+=n,r+=4-(n+4&7)),r<0&&(r+=i,e+=4-(i+4&7)),this.readMappingMatrix.set(r,e),this.mappingBitMatrix.get(r,e)},t.prototype.readUtah=function(e,r,n,i){var a=0;return this.readModule(e-2,r-2,n,i)&&(a|=1),a<<=1,this.readModule(e-2,r-1,n,i)&&(a|=1),a<<=1,this.readModule(e-1,r-2,n,i)&&(a|=1),a<<=1,this.readModule(e-1,r-1,n,i)&&(a|=1),a<<=1,this.readModule(e-1,r,n,i)&&(a|=1),a<<=1,this.readModule(e,r-2,n,i)&&(a|=1),a<<=1,this.readModule(e,r-1,n,i)&&(a|=1),a<<=1,this.readModule(e,r,n,i)&&(a|=1),a},t.prototype.readCorner1=function(e,r){var n=0;return this.readModule(e-1,0,e,r)&&(n|=1),n<<=1,this.readModule(e-1,1,e,r)&&(n|=1),n<<=1,this.readModule(e-1,2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-1,e,r)&&(n|=1),n<<=1,this.readModule(1,r-1,e,r)&&(n|=1),n<<=1,this.readModule(2,r-1,e,r)&&(n|=1),n<<=1,this.readModule(3,r-1,e,r)&&(n|=1),n},t.prototype.readCorner2=function(e,r){var n=0;return this.readModule(e-3,0,e,r)&&(n|=1),n<<=1,this.readModule(e-2,0,e,r)&&(n|=1),n<<=1,this.readModule(e-1,0,e,r)&&(n|=1),n<<=1,this.readModule(0,r-4,e,r)&&(n|=1),n<<=1,this.readModule(0,r-3,e,r)&&(n|=1),n<<=1,this.readModule(0,r-2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-1,e,r)&&(n|=1),n<<=1,this.readModule(1,r-1,e,r)&&(n|=1),n},t.prototype.readCorner3=function(e,r){var n=0;return this.readModule(e-1,0,e,r)&&(n|=1),n<<=1,this.readModule(e-1,r-1,e,r)&&(n|=1),n<<=1,this.readModule(0,r-3,e,r)&&(n|=1),n<<=1,this.readModule(0,r-2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-1,e,r)&&(n|=1),n<<=1,this.readModule(1,r-3,e,r)&&(n|=1),n<<=1,this.readModule(1,r-2,e,r)&&(n|=1),n<<=1,this.readModule(1,r-1,e,r)&&(n|=1),n},t.prototype.readCorner4=function(e,r){var n=0;return this.readModule(e-3,0,e,r)&&(n|=1),n<<=1,this.readModule(e-2,0,e,r)&&(n|=1),n<<=1,this.readModule(e-1,0,e,r)&&(n|=1),n<<=1,this.readModule(0,r-2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-1,e,r)&&(n|=1),n<<=1,this.readModule(1,r-1,e,r)&&(n|=1),n<<=1,this.readModule(2,r-1,e,r)&&(n|=1),n<<=1,this.readModule(3,r-1,e,r)&&(n|=1),n},t.prototype.extractDataRegion=function(e){var r=this.version.getSymbolSizeRows(),n=this.version.getSymbolSizeColumns();if(e.getHeight()!==r)throw new F("Dimension of bitMatrix must match the version size");for(var i=this.version.getDataRegionSizeRows(),a=this.version.getDataRegionSizeColumns(),o=r/i|0,s=n/a|0,l=o*i,c=s*a,f=new qe(c,l),d=0;d<o;++d)for(var p=d*i,h=0;h<s;++h)for(var v=h*a,g=0;g<i;++g)for(var y=d*(i+2)+1+g,_=p+g,m=0;m<a;++m){var E=h*(a+2)+1+m;if(e.get(E,y)){var w=v+m;f.set(w,_)}}return f},t})(),Ri=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xc=(function(){function t(e,r){this.numDataCodewords=e,this.codewords=r}return t.getDataBlocks=function(e,r){var n,i,a,o,s=r.getECBlocks(),l=0,c=s.getECBlocks();try{for(var f=Ri(c),d=f.next();!d.done;d=f.next()){var p=d.value;l+=p.getCount()}}catch(he){n={error:he}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}var h=new Array(l),v=0;try{for(var g=Ri(c),y=g.next();!y.done;y=g.next())for(var p=y.value,_=0;_<p.getCount();_++){var m=p.getDataCodewords(),E=s.getECCodewords()+m;h[v++]=new t(m,new Uint8Array(E))}}catch(he){a={error:he}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}for(var w=h[0].codewords.length,C=w-s.getECCodewords(),b=C-1,O=0,_=0;_<b;_++)for(var P=0;P<v;P++)h[P].codewords[_]=e[O++];for(var H=r.getVersionNumber()===24,L=H?8:v,P=0;P<L;P++)h[P].codewords[C-1]=e[O++];for(var te=h[0].codewords.length,_=C;_<te;_++)for(var P=0;P<v;P++){var V=H?(P+8)%v:P,z=H&&V>7?_-1:_;h[V].codewords[z]=e[O++]}if(O!==e.length)throw new F;return h},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t})(),ga=(function(){function t(e){this.bytes=e,this.byteOffset=0,this.bitOffset=0}return t.prototype.getBitOffset=function(){return this.bitOffset},t.prototype.getByteOffset=function(){return this.byteOffset},t.prototype.readBits=function(e){if(e<1||e>32||e>this.available())throw new F(""+e);var r=0,n=this.bitOffset,i=this.byteOffset,a=this.bytes;if(n>0){var o=8-n,s=e<o?e:o,l=o-s,c=255>>8-s<<l;r=(a[i]&c)>>l,e-=s,n+=s,n===8&&(n=0,i++)}if(e>0){for(;e>=8;)r=r<<8|a[i]&255,i++,e-=8;if(e>0){var l=8-e,c=255>>l<<l;r=r<<e|(a[i]&c)>>l,n+=e}}return this.bitOffset=n,this.byteOffset=i,r},t.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},t})(),ce;(function(t){t[t.PAD_ENCODE=0]="PAD_ENCODE",t[t.ASCII_ENCODE=1]="ASCII_ENCODE",t[t.C40_ENCODE=2]="C40_ENCODE",t[t.TEXT_ENCODE=3]="TEXT_ENCODE",t[t.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",t[t.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",t[t.BASE256_ENCODE=6]="BASE256_ENCODE"})(ce||(ce={}));var yc=(function(){function t(){}return t.decode=function(e){var r=new ga(e),n=new J,i=new J,a=new Array,o=ce.ASCII_ENCODE;do if(o===ce.ASCII_ENCODE)o=this.decodeAsciiSegment(r,n,i);else{switch(o){case ce.C40_ENCODE:this.decodeC40Segment(r,n);break;case ce.TEXT_ENCODE:this.decodeTextSegment(r,n);break;case ce.ANSIX12_ENCODE:this.decodeAnsiX12Segment(r,n);break;case ce.EDIFACT_ENCODE:this.decodeEdifactSegment(r,n);break;case ce.BASE256_ENCODE:this.decodeBase256Segment(r,n,a);break;default:throw new R}o=ce.ASCII_ENCODE}while(o!==ce.PAD_ENCODE&&r.available()>0);return i.length()>0&&n.append(i.toString()),new Wr(e,n.toString(),a.length===0?null:a,null)},t.decodeAsciiSegment=function(e,r,n){var i=!1;do{var a=e.readBits(8);if(a===0)throw new R;if(a<=128)return i&&(a+=128),r.append(String.fromCharCode(a-1)),ce.ASCII_ENCODE;if(a===129)return ce.PAD_ENCODE;if(a<=229){var o=a-130;o<10&&r.append("0"),r.append(""+o)}else switch(a){case 230:return ce.C40_ENCODE;case 231:return ce.BASE256_ENCODE;case 232:r.append("");break;case 233:case 234:break;case 235:i=!0;break;case 236:r.append("[)>05"),n.insert(0,"");break;case 237:r.append("[)>06"),n.insert(0,"");break;case 238:return ce.ANSIX12_ENCODE;case 239:return ce.TEXT_ENCODE;case 240:return ce.EDIFACT_ENCODE;case 241:break;default:if(a!==254||e.available()!==0)throw new R;break}}while(e.available()>0);return ce.ASCII_ENCODE},t.decodeC40Segment=function(e,r){var n=!1,i=[],a=0;do{if(e.available()===8)return;var o=e.readBits(8);if(o===254)return;this.parseTwoBytes(o,e.readBits(8),i);for(var s=0;s<3;s++){var l=i[s];switch(a){case 0:if(l<3)a=l+1;else if(l<this.C40_BASIC_SET_CHARS.length){var c=this.C40_BASIC_SET_CHARS[l];n?(r.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):r.append(c)}else throw new R;break;case 1:n?(r.append(String.fromCharCode(l+128)),n=!1):r.append(String.fromCharCode(l)),a=0;break;case 2:if(l<this.C40_SHIFT2_SET_CHARS.length){var c=this.C40_SHIFT2_SET_CHARS[l];n?(r.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):r.append(c)}else switch(l){case 27:r.append("");break;case 30:n=!0;break;default:throw new R}a=0;break;case 3:n?(r.append(String.fromCharCode(l+224)),n=!1):r.append(String.fromCharCode(l+96)),a=0;break;default:throw new R}}}while(e.available()>0)},t.decodeTextSegment=function(e,r){var n=!1,i=[],a=0;do{if(e.available()===8)return;var o=e.readBits(8);if(o===254)return;this.parseTwoBytes(o,e.readBits(8),i);for(var s=0;s<3;s++){var l=i[s];switch(a){case 0:if(l<3)a=l+1;else if(l<this.TEXT_BASIC_SET_CHARS.length){var c=this.TEXT_BASIC_SET_CHARS[l];n?(r.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):r.append(c)}else throw new R;break;case 1:n?(r.append(String.fromCharCode(l+128)),n=!1):r.append(String.fromCharCode(l)),a=0;break;case 2:if(l<this.TEXT_SHIFT2_SET_CHARS.length){var c=this.TEXT_SHIFT2_SET_CHARS[l];n?(r.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):r.append(c)}else switch(l){case 27:r.append("");break;case 30:n=!0;break;default:throw new R}a=0;break;case 3:if(l<this.TEXT_SHIFT3_SET_CHARS.length){var c=this.TEXT_SHIFT3_SET_CHARS[l];n?(r.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):r.append(c),a=0}else throw new R;break;default:throw new R}}}while(e.available()>0)},t.decodeAnsiX12Segment=function(e,r){var n=[];do{if(e.available()===8)return;var i=e.readBits(8);if(i===254)return;this.parseTwoBytes(i,e.readBits(8),n);for(var a=0;a<3;a++){var o=n[a];switch(o){case 0:r.append("\r");break;case 1:r.append("*");break;case 2:r.append(">");break;case 3:r.append(" ");break;default:if(o<14)r.append(String.fromCharCode(o+44));else if(o<40)r.append(String.fromCharCode(o+51));else throw new R;break}}}while(e.available()>0)},t.parseTwoBytes=function(e,r,n){var i=(e<<8)+r-1,a=Math.floor(i/1600);n[0]=a,i-=a*1600,a=Math.floor(i/40),n[1]=a,n[2]=i-a*40},t.decodeEdifactSegment=function(e,r){do{if(e.available()<=16)return;for(var n=0;n<4;n++){var i=e.readBits(6);if(i===31){var a=8-e.getBitOffset();a!==8&&e.readBits(a);return}(i&32)===0&&(i|=64),r.append(String.fromCharCode(i))}}while(e.available()>0)},t.decodeBase256Segment=function(e,r,n){var i=1+e.getByteOffset(),a=this.unrandomize255State(e.readBits(8),i++),o;if(a===0?o=e.available()/8|0:a<250?o=a:o=250*(a-249)+this.unrandomize255State(e.readBits(8),i++),o<0)throw new R;for(var s=new Uint8Array(o),l=0;l<o;l++){if(e.available()<8)throw new R;s[l]=this.unrandomize255State(e.readBits(8),i++)}n.push(s);try{r.append(je.decode(s,re.ISO88591))}catch(c){throw new hr("Platform does not support required encoding: "+c.message)}},t.unrandomize255State=function(e,r){var n=149*r%255+1,i=e-n;return i>=0?i:i+256},t.C40_BASIC_SET_CHARS=["*","*","*"," ","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.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],t.TEXT_BASIC_SET_CHARS=["*","*","*"," ","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.TEXT_SHIFT2_SET_CHARS=t.C40_SHIFT2_SET_CHARS,t.TEXT_SHIFT3_SET_CHARS=["`","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})(),mc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wc=(function(){function t(){this.rsDecoder=new Xr(Ne.DATA_MATRIX_FIELD_256)}return t.prototype.decode=function(e){var r,n,i=new gc(e),a=i.getVersion(),o=i.readCodewords(),s=xc.getDataBlocks(o,a),l=0;try{for(var c=mc(s),f=c.next();!f.done;f=c.next()){var d=f.value;l+=d.getNumDataCodewords()}}catch(E){r={error:E}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}for(var p=new Uint8Array(l),h=s.length,v=0;v<h;v++){var g=s[v],y=g.getCodewords(),_=g.getNumDataCodewords();this.correctErrors(y,_);for(var m=0;m<_;m++)p[m*h+v]=y[m]}return yc.decode(p)},t.prototype.correctErrors=function(e,r){var n=new Int32Array(e);try{this.rsDecoder.decode(n,e.length-r)}catch{throw new me}for(var i=0;i<r;i++)e[i]=n[i]},t})(),_c=(function(){function t(e){this.image=e,this.rectangleDetector=new Nn(this.image)}return t.prototype.detect=function(){var e=this.rectangleDetector.detect(),r=this.detectSolid1(e);if(r=this.detectSolid2(r),r[3]=this.correctTopRight(r),!r[3])throw new I;r=this.shiftToModuleCenter(r);var n=r[0],i=r[1],a=r[2],o=r[3],s=this.transitionsBetween(n,o)+1,l=this.transitionsBetween(a,o)+1;(s&1)===1&&(s+=1),(l&1)===1&&(l+=1),4*s<7*l&&4*l<7*s&&(s=l=Math.max(s,l));var c=t.sampleGrid(this.image,n,i,a,o,s,l);return new Kn(c,[n,i,a,o])},t.shiftPoint=function(e,r,n){var i=(r.getX()-e.getX())/(n+1),a=(r.getY()-e.getY())/(n+1);return new k(e.getX()+i,e.getY()+a)},t.moveAway=function(e,r,n){var i=e.getX(),a=e.getY();return i<r?i-=1:i+=1,a<n?a-=1:a+=1,new k(i,a)},t.prototype.detectSolid1=function(e){var r=e[0],n=e[1],i=e[3],a=e[2],o=this.transitionsBetween(r,n),s=this.transitionsBetween(n,i),l=this.transitionsBetween(i,a),c=this.transitionsBetween(a,r),f=o,d=[a,r,n,i];return f>s&&(f=s,d[0]=r,d[1]=n,d[2]=i,d[3]=a),f>l&&(f=l,d[0]=n,d[1]=i,d[2]=a,d[3]=r),f>c&&(d[0]=i,d[1]=a,d[2]=r,d[3]=n),d},t.prototype.detectSolid2=function(e){var r=e[0],n=e[1],i=e[2],a=e[3],o=this.transitionsBetween(r,a),s=t.shiftPoint(n,i,(o+1)*4),l=t.shiftPoint(i,n,(o+1)*4),c=this.transitionsBetween(s,r),f=this.transitionsBetween(l,a);return c<f?(e[0]=r,e[1]=n,e[2]=i,e[3]=a):(e[0]=n,e[1]=i,e[2]=a,e[3]=r),e},t.prototype.correctTopRight=function(e){var r=e[0],n=e[1],i=e[2],a=e[3],o=this.transitionsBetween(r,a),s=this.transitionsBetween(n,a),l=t.shiftPoint(r,n,(s+1)*4),c=t.shiftPoint(i,n,(o+1)*4);o=this.transitionsBetween(l,a),s=this.transitionsBetween(c,a);var f=new k(a.getX()+(i.getX()-n.getX())/(o+1),a.getY()+(i.getY()-n.getY())/(o+1)),d=new k(a.getX()+(r.getX()-n.getX())/(s+1),a.getY()+(r.getY()-n.getY())/(s+1));if(!this.isValid(f))return this.isValid(d)?d:null;if(!this.isValid(d))return f;var p=this.transitionsBetween(l,f)+this.transitionsBetween(c,f),h=this.transitionsBetween(l,d)+this.transitionsBetween(c,d);return p>h?f:d},t.prototype.shiftToModuleCenter=function(e){var r=e[0],n=e[1],i=e[2],a=e[3],o=this.transitionsBetween(r,a)+1,s=this.transitionsBetween(i,a)+1,l=t.shiftPoint(r,n,s*4),c=t.shiftPoint(i,n,o*4);o=this.transitionsBetween(l,a)+1,s=this.transitionsBetween(c,a)+1,(o&1)===1&&(o+=1),(s&1)===1&&(s+=1);var f=(r.getX()+n.getX()+i.getX()+a.getX())/4,d=(r.getY()+n.getY()+i.getY()+a.getY())/4;r=t.moveAway(r,f,d),n=t.moveAway(n,f,d),i=t.moveAway(i,f,d),a=t.moveAway(a,f,d);var p,h;return l=t.shiftPoint(r,n,s*4),l=t.shiftPoint(l,a,o*4),p=t.shiftPoint(n,r,s*4),p=t.shiftPoint(p,i,o*4),c=t.shiftPoint(i,a,s*4),c=t.shiftPoint(c,n,o*4),h=t.shiftPoint(a,i,s*4),h=t.shiftPoint(h,r,o*4),[l,p,c,h]},t.prototype.isValid=function(e){return e.getX()>=0&&e.getX()<this.image.getWidth()&&e.getY()>0&&e.getY()<this.image.getHeight()},t.sampleGrid=function(e,r,n,i,a,o,s){var l=jn.getInstance();return l.sampleGrid(e,o,s,.5,.5,o-.5,.5,o-.5,s-.5,.5,s-.5,r.getX(),r.getY(),a.getX(),a.getY(),i.getX(),i.getY(),n.getX(),n.getY())},t.prototype.transitionsBetween=function(e,r){var n=Math.trunc(e.getX()),i=Math.trunc(e.getY()),a=Math.trunc(r.getX()),o=Math.trunc(r.getY()),s=Math.abs(o-i)>Math.abs(a-n);if(s){var l=n;n=i,i=l,l=a,a=o,o=l}for(var c=Math.abs(a-n),f=Math.abs(o-i),d=-c/2,p=i<o?1:-1,h=n<a?1:-1,v=0,g=this.image.get(s?i:n,s?n:i),y=n,_=i;y!==a;y+=h){var m=this.image.get(s?_:y,s?y:_);if(m!==g&&(v++,g=m),d+=f,d>0){if(_===o)break;_+=p,d-=c}}return v},t})(),Rn=(function(){function t(){this.decoder=new wc}return t.prototype.decode=function(e,r){r===void 0&&(r=null);var n,i;if(r!=null&&r.has(le.PURE_BARCODE)){var a=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decode(a),i=t.NO_POINTS}else{var o=new _c(e.getBlackMatrix()).detect();n=this.decoder.decode(o.getBits()),i=o.getPoints()}var s=n.getRawBytes(),l=new Be(n.getText(),s,8*s.length,i,U.DATA_MATRIX,ne.currentTimeMillis()),c=n.getByteSegments();c!=null&&l.putMetadata(we.BYTE_SEGMENTS,c);var f=n.getECLevel();return f!=null&&l.putMetadata(we.ERROR_CORRECTION_LEVEL,f),l},t.prototype.reset=function(){},t.extractPureBits=function(e){var r=e.getTopLeftOnBit(),n=e.getBottomRightOnBit();if(r==null||n==null)throw new I;var i=this.moduleSize(r,e),a=r[1],o=n[1],s=r[0],l=n[0],c=(l-s+1)/i,f=(o-a+1)/i;if(c<=0||f<=0)throw new I;var d=i/2;a+=d,s+=d;for(var p=new qe(c,f),h=0;h<f;h++)for(var v=a+h*i,g=0;g<c;g++)e.get(s+g*i,v)&&p.set(g,h);return p},t.moduleSize=function(e,r){for(var n=r.getWidth(),i=e[0],a=e[1];i<n&&r.get(i,a);)i++;if(i===n)throw new I;var o=i-e[0];if(o===0)throw new I;return o},t.NO_POINTS=[],t})(),Ec=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();(function(t){Ec(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Rn,r)||this}return e})(Vt);var St;(function(t){t[t.L=0]="L",t[t.M=1]="M",t[t.Q=2]="Q",t[t.H=3]="H"})(St||(St={}));var Ac=(function(){function t(e,r,n){this.value=e,this.stringValue=r,this.bits=n,t.FOR_BITS.set(n,this),t.FOR_VALUE.set(e,this)}return t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.fromString=function(e){switch(e){case"L":return t.L;case"M":return t.M;case"Q":return t.Q;case"H":return t.H;default:throw new Fe(e+"not available")}},t.prototype.toString=function(){return this.stringValue},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.forBits=function(e){if(e<0||e>=t.FOR_BITS.size)throw new F;return t.FOR_BITS.get(e)},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.L=new t(St.L,"L",1),t.M=new t(St.M,"M",0),t.Q=new t(St.Q,"Q",3),t.H=new t(St.H,"H",2),t})(),Cc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xa=(function(){function t(e){this.errorCorrectionLevel=Ac.forBits(e>>3&3),this.dataMask=e&7}return t.numBitsDiffering=function(e,r){return G.bitCount(e^r)},t.decodeFormatInformation=function(e,r){var n=t.doDecodeFormatInformation(e,r);return n!==null?n:t.doDecodeFormatInformation(e^t.FORMAT_INFO_MASK_QR,r^t.FORMAT_INFO_MASK_QR)},t.doDecodeFormatInformation=function(e,r){var n,i,a=Number.MAX_SAFE_INTEGER,o=0;try{for(var s=Cc(t.FORMAT_INFO_DECODE_LOOKUP),l=s.next();!l.done;l=s.next()){var c=l.value,f=c[0];if(f===e||f===r)return new t(c[1]);var d=t.numBitsDiffering(e,f);d<a&&(o=c[1],a=d),e!==r&&(d=t.numBitsDiffering(r,f),d<a&&(o=c[1],a=d))}}catch(p){n={error:p}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return a<=3?new t(o):null},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getDataMask=function(){return this.dataMask},t.prototype.hashCode=function(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.errorCorrectionLevel===r.errorCorrectionLevel&&this.dataMask===r.dataMask},t.FORMAT_INFO_MASK_QR=21522,t.FORMAT_INFO_DECODE_LOOKUP=[Int32Array.from([21522,0]),Int32Array.from([20773,1]),Int32Array.from([24188,2]),Int32Array.from([23371,3]),Int32Array.from([17913,4]),Int32Array.from([16590,5]),Int32Array.from([20375,6]),Int32Array.from([19104,7]),Int32Array.from([30660,8]),Int32Array.from([29427,9]),Int32Array.from([32170,10]),Int32Array.from([30877,11]),Int32Array.from([26159,12]),Int32Array.from([25368,13]),Int32Array.from([27713,14]),Int32Array.from([26998,15]),Int32Array.from([5769,16]),Int32Array.from([5054,17]),Int32Array.from([7399,18]),Int32Array.from([6608,19]),Int32Array.from([1890,20]),Int32Array.from([597,21]),Int32Array.from([3340,22]),Int32Array.from([2107,23]),Int32Array.from([13663,24]),Int32Array.from([12392,25]),Int32Array.from([16177,26]),Int32Array.from([14854,27]),Int32Array.from([9396,28]),Int32Array.from([8579,29]),Int32Array.from([11994,30]),Int32Array.from([11245,31])],t})(),bc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},A=(function(){function t(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.ecCodewordsPerBlock=e,this.ecBlocks=r}return t.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},t.prototype.getNumBlocks=function(){var e,r,n=0,i=this.ecBlocks;try{for(var a=bc(i),o=a.next();!o.done;o=a.next()){var s=o.value;n+=s.getCount()}}catch(l){e={error:l}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return n},t.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},t.prototype.getECBlocks=function(){return this.ecBlocks},t})(),x=(function(){function t(e,r){this.count=e,this.dataCodewords=r}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t})(),Sc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wt=(function(){function t(e,r){for(var n,i,a=[],o=2;o<arguments.length;o++)a[o-2]=arguments[o];this.versionNumber=e,this.alignmentPatternCenters=r,this.ecBlocks=a;var s=0,l=a[0].getECCodewordsPerBlock(),c=a[0].getECBlocks();try{for(var f=Sc(c),d=f.next();!d.done;d=f.next()){var p=d.value;s+=p.getCount()*(p.getDataCodewords()+l)}}catch(h){n={error:h}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}this.totalCodewords=s}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},t.prototype.getECBlocksForLevel=function(e){return this.ecBlocks[e.getValue()]},t.getProvisionalVersionForDimension=function(e){if(e%4!==1)throw new R;try{return this.getVersionForNumber((e-17)/4)}catch{throw new R}},t.getVersionForNumber=function(e){if(e<1||e>40)throw new F;return t.VERSIONS[e-1]},t.decodeVersionInformation=function(e){for(var r=Number.MAX_SAFE_INTEGER,n=0,i=0;i<t.VERSION_DECODE_INFO.length;i++){var a=t.VERSION_DECODE_INFO[i];if(a===e)return t.getVersionForNumber(i+7);var o=xa.numBitsDiffering(e,a);o<r&&(n=i+7,r=o)}return r<=3?t.getVersionForNumber(n):null},t.prototype.buildFunctionPattern=function(){var e=this.getDimensionForVersion(),r=new qe(e);r.setRegion(0,0,9,9),r.setRegion(e-8,0,8,9),r.setRegion(0,e-8,9,8);for(var n=this.alignmentPatternCenters.length,i=0;i<n;i++)for(var a=this.alignmentPatternCenters[i]-2,o=0;o<n;o++)i===0&&(o===0||o===n-1)||i===n-1&&o===0||r.setRegion(this.alignmentPatternCenters[o]-2,a,5,5);return r.setRegion(6,9,1,e-17),r.setRegion(9,6,e-17,1),this.versionNumber>6&&(r.setRegion(e-11,0,3,6),r.setRegion(0,e-11,6,3)),r},t.prototype.toString=function(){return""+this.versionNumber},t.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),t.VERSIONS=[new t(1,new Int32Array(0),new A(7,new x(1,19)),new A(10,new x(1,16)),new A(13,new x(1,13)),new A(17,new x(1,9))),new t(2,Int32Array.from([6,18]),new A(10,new x(1,34)),new A(16,new x(1,28)),new A(22,new x(1,22)),new A(28,new x(1,16))),new t(3,Int32Array.from([6,22]),new A(15,new x(1,55)),new A(26,new x(1,44)),new A(18,new x(2,17)),new A(22,new x(2,13))),new t(4,Int32Array.from([6,26]),new A(20,new x(1,80)),new A(18,new x(2,32)),new A(26,new x(2,24)),new A(16,new x(4,9))),new t(5,Int32Array.from([6,30]),new A(26,new x(1,108)),new A(24,new x(2,43)),new A(18,new x(2,15),new x(2,16)),new A(22,new x(2,11),new x(2,12))),new t(6,Int32Array.from([6,34]),new A(18,new x(2,68)),new A(16,new x(4,27)),new A(24,new x(4,19)),new A(28,new x(4,15))),new t(7,Int32Array.from([6,22,38]),new A(20,new x(2,78)),new A(18,new x(4,31)),new A(18,new x(2,14),new x(4,15)),new A(26,new x(4,13),new x(1,14))),new t(8,Int32Array.from([6,24,42]),new A(24,new x(2,97)),new A(22,new x(2,38),new x(2,39)),new A(22,new x(4,18),new x(2,19)),new A(26,new x(4,14),new x(2,15))),new t(9,Int32Array.from([6,26,46]),new A(30,new x(2,116)),new A(22,new x(3,36),new x(2,37)),new A(20,new x(4,16),new x(4,17)),new A(24,new x(4,12),new x(4,13))),new t(10,Int32Array.from([6,28,50]),new A(18,new x(2,68),new x(2,69)),new A(26,new x(4,43),new x(1,44)),new A(24,new x(6,19),new x(2,20)),new A(28,new x(6,15),new x(2,16))),new t(11,Int32Array.from([6,30,54]),new A(20,new x(4,81)),new A(30,new x(1,50),new x(4,51)),new A(28,new x(4,22),new x(4,23)),new A(24,new x(3,12),new x(8,13))),new t(12,Int32Array.from([6,32,58]),new A(24,new x(2,92),new x(2,93)),new A(22,new x(6,36),new x(2,37)),new A(26,new x(4,20),new x(6,21)),new A(28,new x(7,14),new x(4,15))),new t(13,Int32Array.from([6,34,62]),new A(26,new x(4,107)),new A(22,new x(8,37),new x(1,38)),new A(24,new x(8,20),new x(4,21)),new A(22,new x(12,11),new x(4,12))),new t(14,Int32Array.from([6,26,46,66]),new A(30,new x(3,115),new x(1,116)),new A(24,new x(4,40),new x(5,41)),new A(20,new x(11,16),new x(5,17)),new A(24,new x(11,12),new x(5,13))),new t(15,Int32Array.from([6,26,48,70]),new A(22,new x(5,87),new x(1,88)),new A(24,new x(5,41),new x(5,42)),new A(30,new x(5,24),new x(7,25)),new A(24,new x(11,12),new x(7,13))),new t(16,Int32Array.from([6,26,50,74]),new A(24,new x(5,98),new x(1,99)),new A(28,new x(7,45),new x(3,46)),new A(24,new x(15,19),new x(2,20)),new A(30,new x(3,15),new x(13,16))),new t(17,Int32Array.from([6,30,54,78]),new A(28,new x(1,107),new x(5,108)),new A(28,new x(10,46),new x(1,47)),new A(28,new x(1,22),new x(15,23)),new A(28,new x(2,14),new x(17,15))),new t(18,Int32Array.from([6,30,56,82]),new A(30,new x(5,120),new x(1,121)),new A(26,new x(9,43),new x(4,44)),new A(28,new x(17,22),new x(1,23)),new A(28,new x(2,14),new x(19,15))),new t(19,Int32Array.from([6,30,58,86]),new A(28,new x(3,113),new x(4,114)),new A(26,new x(3,44),new x(11,45)),new A(26,new x(17,21),new x(4,22)),new A(26,new x(9,13),new x(16,14))),new t(20,Int32Array.from([6,34,62,90]),new A(28,new x(3,107),new x(5,108)),new A(26,new x(3,41),new x(13,42)),new A(30,new x(15,24),new x(5,25)),new A(28,new x(15,15),new x(10,16))),new t(21,Int32Array.from([6,28,50,72,94]),new A(28,new x(4,116),new x(4,117)),new A(26,new x(17,42)),new A(28,new x(17,22),new x(6,23)),new A(30,new x(19,16),new x(6,17))),new t(22,Int32Array.from([6,26,50,74,98]),new A(28,new x(2,111),new x(7,112)),new A(28,new x(17,46)),new A(30,new x(7,24),new x(16,25)),new A(24,new x(34,13))),new t(23,Int32Array.from([6,30,54,78,102]),new A(30,new x(4,121),new x(5,122)),new A(28,new x(4,47),new x(14,48)),new A(30,new x(11,24),new x(14,25)),new A(30,new x(16,15),new x(14,16))),new t(24,Int32Array.from([6,28,54,80,106]),new A(30,new x(6,117),new x(4,118)),new A(28,new x(6,45),new x(14,46)),new A(30,new x(11,24),new x(16,25)),new A(30,new x(30,16),new x(2,17))),new t(25,Int32Array.from([6,32,58,84,110]),new A(26,new x(8,106),new x(4,107)),new A(28,new x(8,47),new x(13,48)),new A(30,new x(7,24),new x(22,25)),new A(30,new x(22,15),new x(13,16))),new t(26,Int32Array.from([6,30,58,86,114]),new A(28,new x(10,114),new x(2,115)),new A(28,new x(19,46),new x(4,47)),new A(28,new x(28,22),new x(6,23)),new A(30,new x(33,16),new x(4,17))),new t(27,Int32Array.from([6,34,62,90,118]),new A(30,new x(8,122),new x(4,123)),new A(28,new x(22,45),new x(3,46)),new A(30,new x(8,23),new x(26,24)),new A(30,new x(12,15),new x(28,16))),new t(28,Int32Array.from([6,26,50,74,98,122]),new A(30,new x(3,117),new x(10,118)),new A(28,new x(3,45),new x(23,46)),new A(30,new x(4,24),new x(31,25)),new A(30,new x(11,15),new x(31,16))),new t(29,Int32Array.from([6,30,54,78,102,126]),new A(30,new x(7,116),new x(7,117)),new A(28,new x(21,45),new x(7,46)),new A(30,new x(1,23),new x(37,24)),new A(30,new x(19,15),new x(26,16))),new t(30,Int32Array.from([6,26,52,78,104,130]),new A(30,new x(5,115),new x(10,116)),new A(28,new x(19,47),new x(10,48)),new A(30,new x(15,24),new x(25,25)),new A(30,new x(23,15),new x(25,16))),new t(31,Int32Array.from([6,30,56,82,108,134]),new A(30,new x(13,115),new x(3,116)),new A(28,new x(2,46),new x(29,47)),new A(30,new x(42,24),new x(1,25)),new A(30,new x(23,15),new x(28,16))),new t(32,Int32Array.from([6,34,60,86,112,138]),new A(30,new x(17,115)),new A(28,new x(10,46),new x(23,47)),new A(30,new x(10,24),new x(35,25)),new A(30,new x(19,15),new x(35,16))),new t(33,Int32Array.from([6,30,58,86,114,142]),new A(30,new x(17,115),new x(1,116)),new A(28,new x(14,46),new x(21,47)),new A(30,new x(29,24),new x(19,25)),new A(30,new x(11,15),new x(46,16))),new t(34,Int32Array.from([6,34,62,90,118,146]),new A(30,new x(13,115),new x(6,116)),new A(28,new x(14,46),new x(23,47)),new A(30,new x(44,24),new x(7,25)),new A(30,new x(59,16),new x(1,17))),new t(35,Int32Array.from([6,30,54,78,102,126,150]),new A(30,new x(12,121),new x(7,122)),new A(28,new x(12,47),new x(26,48)),new A(30,new x(39,24),new x(14,25)),new A(30,new x(22,15),new x(41,16))),new t(36,Int32Array.from([6,24,50,76,102,128,154]),new A(30,new x(6,121),new x(14,122)),new A(28,new x(6,47),new x(34,48)),new A(30,new x(46,24),new x(10,25)),new A(30,new x(2,15),new x(64,16))),new t(37,Int32Array.from([6,28,54,80,106,132,158]),new A(30,new x(17,122),new x(4,123)),new A(28,new x(29,46),new x(14,47)),new A(30,new x(49,24),new x(10,25)),new A(30,new x(24,15),new x(46,16))),new t(38,Int32Array.from([6,32,58,84,110,136,162]),new A(30,new x(4,122),new x(18,123)),new A(28,new x(13,46),new x(32,47)),new A(30,new x(48,24),new x(14,25)),new A(30,new x(42,15),new x(32,16))),new t(39,Int32Array.from([6,26,54,82,110,138,166]),new A(30,new x(20,117),new x(4,118)),new A(28,new x(40,47),new x(7,48)),new A(30,new x(43,24),new x(22,25)),new A(30,new x(10,15),new x(67,16))),new t(40,Int32Array.from([6,30,58,86,114,142,170]),new A(30,new x(19,118),new x(6,119)),new A(28,new x(18,47),new x(31,48)),new A(30,new x(34,24),new x(34,25)),new A(30,new x(20,15),new x(61,16)))],t})(),pe;(function(t){t[t.DATA_MASK_000=0]="DATA_MASK_000",t[t.DATA_MASK_001=1]="DATA_MASK_001",t[t.DATA_MASK_010=2]="DATA_MASK_010",t[t.DATA_MASK_011=3]="DATA_MASK_011",t[t.DATA_MASK_100=4]="DATA_MASK_100",t[t.DATA_MASK_101=5]="DATA_MASK_101",t[t.DATA_MASK_110=6]="DATA_MASK_110",t[t.DATA_MASK_111=7]="DATA_MASK_111"})(pe||(pe={}));var Pi=(function(){function t(e,r){this.value=e,this.isMasked=r}return t.prototype.unmaskBitMatrix=function(e,r){for(var n=0;n<r;n++)for(var i=0;i<r;i++)this.isMasked(n,i)&&e.flip(i,n)},t.values=new Map([[pe.DATA_MASK_000,new t(pe.DATA_MASK_000,function(e,r){return(e+r&1)===0})],[pe.DATA_MASK_001,new t(pe.DATA_MASK_001,function(e,r){return(e&1)===0})],[pe.DATA_MASK_010,new t(pe.DATA_MASK_010,function(e,r){return r%3===0})],[pe.DATA_MASK_011,new t(pe.DATA_MASK_011,function(e,r){return(e+r)%3===0})],[pe.DATA_MASK_100,new t(pe.DATA_MASK_100,function(e,r){return(Math.floor(e/2)+Math.floor(r/3)&1)===0})],[pe.DATA_MASK_101,new t(pe.DATA_MASK_101,function(e,r){return e*r%6===0})],[pe.DATA_MASK_110,new t(pe.DATA_MASK_110,function(e,r){return e*r%6<3})],[pe.DATA_MASK_111,new t(pe.DATA_MASK_111,function(e,r){return(e+r+e*r%3&1)===0})]]),t})(),Ic=(function(){function t(e){var r=e.getHeight();if(r<21||(r&3)!==1)throw new R;this.bitMatrix=e}return t.prototype.readFormatInformation=function(){if(this.parsedFormatInfo!==null&&this.parsedFormatInfo!==void 0)return this.parsedFormatInfo;for(var e=0,r=0;r<6;r++)e=this.copyBit(r,8,e);e=this.copyBit(7,8,e),e=this.copyBit(8,8,e),e=this.copyBit(8,7,e);for(var n=5;n>=0;n--)e=this.copyBit(8,n,e);for(var i=this.bitMatrix.getHeight(),a=0,o=i-7,n=i-1;n>=o;n--)a=this.copyBit(8,n,a);for(var r=i-8;r<i;r++)a=this.copyBit(r,8,a);if(this.parsedFormatInfo=xa.decodeFormatInformation(e,a),this.parsedFormatInfo!==null)return this.parsedFormatInfo;throw new R},t.prototype.readVersion=function(){if(this.parsedVersion!==null&&this.parsedVersion!==void 0)return this.parsedVersion;var e=this.bitMatrix.getHeight(),r=Math.floor((e-17)/4);if(r<=6)return wt.getVersionForNumber(r);for(var n=0,i=e-11,a=5;a>=0;a--)for(var o=e-9;o>=i;o--)n=this.copyBit(o,a,n);var s=wt.decodeVersionInformation(n);if(s!==null&&s.getDimensionForVersion()===e)return this.parsedVersion=s,s;n=0;for(var o=5;o>=0;o--)for(var a=e-9;a>=i;a--)n=this.copyBit(o,a,n);if(s=wt.decodeVersionInformation(n),s!==null&&s.getDimensionForVersion()===e)return this.parsedVersion=s,s;throw new R},t.prototype.copyBit=function(e,r,n){var i=this.isMirror?this.bitMatrix.get(r,e):this.bitMatrix.get(e,r);return i?n<<1|1:n<<1},t.prototype.readCodewords=function(){var e=this.readFormatInformation(),r=this.readVersion(),n=Pi.values.get(e.getDataMask()),i=this.bitMatrix.getHeight();n.unmaskBitMatrix(this.bitMatrix,i);for(var a=r.buildFunctionPattern(),o=!0,s=new Uint8Array(r.getTotalCodewords()),l=0,c=0,f=0,d=i-1;d>0;d-=2){d===6&&d--;for(var p=0;p<i;p++)for(var h=o?i-1-p:p,v=0;v<2;v++)a.get(d-v,h)||(f++,c<<=1,this.bitMatrix.get(d-v,h)&&(c|=1),f===8&&(s[l++]=c,f=0,c=0));o=!o}if(l!==r.getTotalCodewords())throw new R;return s},t.prototype.remask=function(){if(this.parsedFormatInfo!==null){var e=Pi.values[this.parsedFormatInfo.getDataMask()],r=this.bitMatrix.getHeight();e.unmaskBitMatrix(this.bitMatrix,r)}},t.prototype.setMirror=function(e){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=e},t.prototype.mirror=function(){for(var e=this.bitMatrix,r=0,n=e.getWidth();r<n;r++)for(var i=r+1,a=e.getHeight();i<a;i++)e.get(r,i)!==e.get(i,r)&&(e.flip(i,r),e.flip(r,i))},t})(),ki=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Oc=(function(){function t(e,r){this.numDataCodewords=e,this.codewords=r}return t.getDataBlocks=function(e,r,n){var i,a,o,s;if(e.length!==r.getTotalCodewords())throw new F;var l=r.getECBlocksForLevel(n),c=0,f=l.getECBlocks();try{for(var d=ki(f),p=d.next();!p.done;p=d.next()){var h=p.value;c+=h.getCount()}}catch(z){i={error:z}}finally{try{p&&!p.done&&(a=d.return)&&a.call(d)}finally{if(i)throw i.error}}var v=new Array(c),g=0;try{for(var y=ki(f),_=y.next();!_.done;_=y.next())for(var h=_.value,m=0;m<h.getCount();m++){var E=h.getDataCodewords(),w=l.getECCodewordsPerBlock()+E;v[g++]=new t(E,new Uint8Array(w))}}catch(z){o={error:z}}finally{try{_&&!_.done&&(s=y.return)&&s.call(y)}finally{if(o)throw o.error}}for(var C=v[0].codewords.length,b=v.length-1;b>=0;){var O=v[b].codewords.length;if(O===C)break;b--}b++;for(var P=C-l.getECCodewordsPerBlock(),H=0,m=0;m<P;m++)for(var L=0;L<g;L++)v[L].codewords[m]=e[H++];for(var L=b;L<g;L++)v[L].codewords[P]=e[H++];for(var te=v[0].codewords.length,m=P;m<te;m++)for(var L=0;L<g;L++){var V=L<b?m:m+1;v[L].codewords[V]=e[H++]}return v},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t})(),Pe;(function(t){t[t.TERMINATOR=0]="TERMINATOR",t[t.NUMERIC=1]="NUMERIC",t[t.ALPHANUMERIC=2]="ALPHANUMERIC",t[t.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",t[t.BYTE=4]="BYTE",t[t.ECI=5]="ECI",t[t.KANJI=6]="KANJI",t[t.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",t[t.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",t[t.HANZI=9]="HANZI"})(Pe||(Pe={}));var ae=(function(){function t(e,r,n,i){this.value=e,this.stringValue=r,this.characterCountBitsForVersions=n,this.bits=i,t.FOR_BITS.set(i,this),t.FOR_VALUE.set(e,this)}return t.forBits=function(e){var r=t.FOR_BITS.get(e);if(r===void 0)throw new F;return r},t.prototype.getCharacterCountBits=function(e){var r=e.getVersionNumber(),n;return r<=9?n=0:r<=26?n=1:n=2,this.characterCountBitsForVersions[n]},t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.toString=function(){return this.stringValue},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.TERMINATOR=new t(Pe.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),t.NUMERIC=new t(Pe.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),t.ALPHANUMERIC=new t(Pe.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),t.STRUCTURED_APPEND=new t(Pe.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),t.BYTE=new t(Pe.BYTE,"BYTE",Int32Array.from([8,16,16]),4),t.ECI=new t(Pe.ECI,"ECI",Int32Array.from([0,0,0]),7),t.KANJI=new t(Pe.KANJI,"KANJI",Int32Array.from([8,10,12]),8),t.FNC1_FIRST_POSITION=new t(Pe.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),t.FNC1_SECOND_POSITION=new t(Pe.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),t.HANZI=new t(Pe.HANZI,"HANZI",Int32Array.from([8,10,12]),13),t})(),Tc=(function(){function t(){}return t.decode=function(e,r,n,i){var a=new ga(e),o=new J,s=new Array,l=-1,c=-1;try{var f=null,d=!1,p=void 0;do{if(a.available()<4)p=ae.TERMINATOR;else{var h=a.readBits(4);p=ae.forBits(h)}switch(p){case ae.TERMINATOR:break;case ae.FNC1_FIRST_POSITION:case ae.FNC1_SECOND_POSITION:d=!0;break;case ae.STRUCTURED_APPEND:if(a.available()<16)throw new R;l=a.readBits(8),c=a.readBits(8);break;case ae.ECI:var v=t.parseECIValue(a);if(f=de.getCharacterSetECIByValue(v),f===null)throw new R;break;case ae.HANZI:var g=a.readBits(4),y=a.readBits(p.getCharacterCountBits(r));g===t.GB2312_SUBSET&&t.decodeHanziSegment(a,o,y);break;default:var _=a.readBits(p.getCharacterCountBits(r));switch(p){case ae.NUMERIC:t.decodeNumericSegment(a,o,_);break;case ae.ALPHANUMERIC:t.decodeAlphanumericSegment(a,o,_,d);break;case ae.BYTE:t.decodeByteSegment(a,o,_,f,s,i);break;case ae.KANJI:t.decodeKanjiSegment(a,o,_);break;default:throw new R}break}}while(p!==ae.TERMINATOR)}catch{throw new R}return new Wr(e,o.toString(),s.length===0?null:s,n===null?null:n.toString(),l,c)},t.decodeHanziSegment=function(e,r,n){if(n*13>e.available())throw new R;for(var i=new Uint8Array(2*n),a=0;n>0;){var o=e.readBits(13),s=o/96<<8&4294967295|o%96;s<959?s+=41377:s+=42657,i[a]=s>>8&255,i[a+1]=s&255,a+=2,n--}try{r.append(je.decode(i,re.GB2312))}catch(l){throw new R(l)}},t.decodeKanjiSegment=function(e,r,n){if(n*13>e.available())throw new R;for(var i=new Uint8Array(2*n),a=0;n>0;){var o=e.readBits(13),s=o/192<<8&4294967295|o%192;s<7936?s+=33088:s+=49472,i[a]=s>>8,i[a+1]=s,a+=2,n--}try{r.append(je.decode(i,re.SHIFT_JIS))}catch(l){throw new R(l)}},t.decodeByteSegment=function(e,r,n,i,a,o){if(8*n>e.available())throw new R;for(var s=new Uint8Array(n),l=0;l<n;l++)s[l]=e.readBits(8);var c;i===null?c=re.guessEncoding(s,o):c=i.getName();try{r.append(je.decode(s,c))}catch(f){throw new R(f)}a.push(s)},t.toAlphaNumericChar=function(e){if(e>=t.ALPHANUMERIC_CHARS.length)throw new R;return t.ALPHANUMERIC_CHARS[e]},t.decodeAlphanumericSegment=function(e,r,n,i){for(var a=r.length();n>1;){if(e.available()<11)throw new R;var o=e.readBits(11);r.append(t.toAlphaNumericChar(Math.floor(o/45))),r.append(t.toAlphaNumericChar(o%45)),n-=2}if(n===1){if(e.available()<6)throw new R;r.append(t.toAlphaNumericChar(e.readBits(6)))}if(i)for(var s=a;s<r.length();s++)r.charAt(s)==="%"&&(s<r.length()-1&&r.charAt(s+1)==="%"?r.deleteCharAt(s+1):r.setCharAt(s,""))},t.decodeNumericSegment=function(e,r,n){for(;n>=3;){if(e.available()<10)throw new R;var i=e.readBits(10);if(i>=1e3)throw new R;r.append(t.toAlphaNumericChar(Math.floor(i/100))),r.append(t.toAlphaNumericChar(Math.floor(i/10)%10)),r.append(t.toAlphaNumericChar(i%10)),n-=3}if(n===2){if(e.available()<7)throw new R;var a=e.readBits(7);if(a>=100)throw new R;r.append(t.toAlphaNumericChar(Math.floor(a/10))),r.append(t.toAlphaNumericChar(a%10))}else if(n===1){if(e.available()<4)throw new R;var o=e.readBits(4);if(o>=10)throw new R;r.append(t.toAlphaNumericChar(o))}},t.parseECIValue=function(e){var r=e.readBits(8);if((r&128)===0)return r&127;if((r&192)===128){var n=e.readBits(8);return(r&63)<<8&4294967295|n}if((r&224)===192){var i=e.readBits(16);return(r&31)<<16&4294967295|i}throw new R},t.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.GB2312_SUBSET=1,t})(),ya=(function(){function t(e){this.mirrored=e}return t.prototype.isMirrored=function(){return this.mirrored},t.prototype.applyMirroredCorrection=function(e){if(!(!this.mirrored||e===null||e.length<3)){var r=e[0];e[0]=e[2],e[2]=r}},t})(),Mi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Nc=(function(){function t(){this.rsDecoder=new Xr(Ne.QR_CODE_FIELD_256)}return t.prototype.decodeBooleanArray=function(e,r){return this.decodeBitMatrix(qe.parseFromBooleanArray(e),r)},t.prototype.decodeBitMatrix=function(e,r){var n=new Ic(e),i=null;try{return this.decodeBitMatrixParser(n,r)}catch(o){i=o}try{n.remask(),n.setMirror(!0),n.readVersion(),n.readFormatInformation(),n.mirror();var a=this.decodeBitMatrixParser(n,r);return a.setOther(new ya(!0)),a}catch(o){throw i!==null?i:o}},t.prototype.decodeBitMatrixParser=function(e,r){var n,i,a,o,s=e.readVersion(),l=e.readFormatInformation().getErrorCorrectionLevel(),c=e.readCodewords(),f=Oc.getDataBlocks(c,s,l),d=0;try{for(var p=Mi(f),h=p.next();!h.done;h=p.next()){var v=h.value;d+=v.getNumDataCodewords()}}catch(b){n={error:b}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}var g=new Uint8Array(d),y=0;try{for(var _=Mi(f),m=_.next();!m.done;m=_.next()){var v=m.value,E=v.getCodewords(),w=v.getNumDataCodewords();this.correctErrors(E,w);for(var C=0;C<w;C++)g[y++]=E[C]}}catch(b){a={error:b}}finally{try{m&&!m.done&&(o=_.return)&&o.call(_)}finally{if(a)throw a.error}}return Tc.decode(g,s,l,r)},t.prototype.correctErrors=function(e,r){var n=new Int32Array(e);try{this.rsDecoder.decode(n,e.length-r)}catch{throw new me}for(var i=0;i<r;i++)e[i]=n[i]},t})(),Dc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Bc=(function(t){Dc(e,t);function e(r,n,i){var a=t.call(this,r,n)||this;return a.estimatedModuleSize=i,a}return e.prototype.aboutEquals=function(r,n,i){if(Math.abs(n-this.getY())<=r&&Math.abs(i-this.getX())<=r){var a=Math.abs(r-this.estimatedModuleSize);return a<=1||a<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(r,n,i){var a=(this.getX()+n)/2,o=(this.getY()+r)/2,s=(this.estimatedModuleSize+i)/2;return new e(a,o,s)},e})(k),Rc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Pc=(function(){function t(e,r,n,i,a,o,s){this.image=e,this.startX=r,this.startY=n,this.width=i,this.height=a,this.moduleSize=o,this.resultPointCallback=s,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}return t.prototype.find=function(){for(var e=this.startX,r=this.height,n=this.width,i=e+n,a=this.startY+r/2,o=new Int32Array(3),s=this.image,l=0;l<r;l++){var c=a+((l&1)===0?Math.floor((l+1)/2):-Math.floor((l+1)/2));o[0]=0,o[1]=0,o[2]=0;for(var f=e;f<i&&!s.get(f,c);)f++;for(var d=0;f<i;){if(s.get(f,c))if(d===1)o[1]++;else if(d===2){if(this.foundPatternCross(o)){var p=this.handlePossibleCenter(o,c,f);if(p!==null)return p}o[0]=o[2],o[1]=1,o[2]=0,d=1}else o[++d]++;else d===1&&d++,o[d]++;f++}if(this.foundPatternCross(o)){var p=this.handlePossibleCenter(o,c,i);if(p!==null)return p}}if(this.possibleCenters.length!==0)return this.possibleCenters[0];throw new I},t.centerFromEnd=function(e,r){return r-e[2]-e[1]/2},t.prototype.foundPatternCross=function(e){for(var r=this.moduleSize,n=r/2,i=0;i<3;i++)if(Math.abs(r-e[i])>=n)return!1;return!0},t.prototype.crossCheckVertical=function(e,r,n,i){var a=this.image,o=a.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;for(var l=e;l>=0&&a.get(r,l)&&s[1]<=n;)s[1]++,l--;if(l<0||s[1]>n)return NaN;for(;l>=0&&!a.get(r,l)&&s[0]<=n;)s[0]++,l--;if(s[0]>n)return NaN;for(l=e+1;l<o&&a.get(r,l)&&s[1]<=n;)s[1]++,l++;if(l===o||s[1]>n)return NaN;for(;l<o&&!a.get(r,l)&&s[2]<=n;)s[2]++,l++;if(s[2]>n)return NaN;var c=s[0]+s[1]+s[2];return 5*Math.abs(c-i)>=2*i?NaN:this.foundPatternCross(s)?t.centerFromEnd(s,l):NaN},t.prototype.handlePossibleCenter=function(e,r,n){var i,a,o=e[0]+e[1]+e[2],s=t.centerFromEnd(e,n),l=this.crossCheckVertical(r,s,2*e[1],o);if(!isNaN(l)){var c=(e[0]+e[1]+e[2])/3;try{for(var f=Rc(this.possibleCenters),d=f.next();!d.done;d=f.next()){var p=d.value;if(p.aboutEquals(c,l,s))return p.combineEstimate(l,s,c)}}catch(v){i={error:v}}finally{try{d&&!d.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}var h=new Bc(s,l,c);this.possibleCenters.push(h),this.resultPointCallback!==null&&this.resultPointCallback!==void 0&&this.resultPointCallback.foundPossibleResultPoint(h)}return null},t})(),kc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Mc=(function(t){kc(e,t);function e(r,n,i,a){var o=t.call(this,r,n)||this;return o.estimatedModuleSize=i,o.count=a,a===void 0&&(o.count=1),o}return e.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},e.prototype.getCount=function(){return this.count},e.prototype.aboutEquals=function(r,n,i){if(Math.abs(n-this.getY())<=r&&Math.abs(i-this.getX())<=r){var a=Math.abs(r-this.estimatedModuleSize);return a<=1||a<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(r,n,i){var a=this.count+1,o=(this.count*this.getX()+n)/a,s=(this.count*this.getY()+r)/a,l=(this.count*this.estimatedModuleSize+i)/a;return new e(o,s,l,a)},e})(k),Lc=(function(){function t(e){this.bottomLeft=e[0],this.topLeft=e[1],this.topRight=e[2]}return t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t})(),jt=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Fc=(function(){function t(e,r){this.image=e,this.resultPointCallback=r,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=r}return t.prototype.getImage=function(){return this.image},t.prototype.getPossibleCenters=function(){return this.possibleCenters},t.prototype.find=function(e){var r=e!=null&&e.get(le.TRY_HARDER)!==void 0,n=e!=null&&e.get(le.PURE_BARCODE)!==void 0,i=this.image,a=i.getHeight(),o=i.getWidth(),s=Math.floor(3*a/(4*t.MAX_MODULES));(s<t.MIN_SKIP||r)&&(s=t.MIN_SKIP);for(var l=!1,c=new Int32Array(5),f=s-1;f<a&&!l;f+=s){c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0;for(var d=0,p=0;p<o;p++)if(i.get(p,f))(d&1)===1&&d++,c[d]++;else if((d&1)===0)if(d===4)if(t.foundPatternCross(c)){var h=this.handlePossibleCenter(c,f,p,n);if(h===!0)if(s=2,this.hasSkipped===!0)l=this.haveMultiplyConfirmedCenters();else{var v=this.findRowSkip();v>c[2]&&(f+=v-c[2]-s,p=o-1)}else{c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,d=3;continue}d=0,c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0}else c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,d=3;else c[++d]++;else c[d]++;if(t.foundPatternCross(c)){var h=this.handlePossibleCenter(c,f,o,n);h===!0&&(s=c[0],this.hasSkipped&&(l=this.haveMultiplyConfirmedCenters()))}}var g=this.selectBestPatterns();return k.orderBestPatterns(g),new Lc(g)},t.centerFromEnd=function(e,r){return r-e[4]-e[3]-e[2]/2},t.foundPatternCross=function(e){for(var r=0,n=0;n<5;n++){var i=e[n];if(i===0)return!1;r+=i}if(r<7)return!1;var a=r/7,o=a/2;return Math.abs(a-e[0])<o&&Math.abs(a-e[1])<o&&Math.abs(3*a-e[2])<3*o&&Math.abs(a-e[3])<o&&Math.abs(a-e[4])<o},t.prototype.getCrossCheckStateCount=function(){var e=this.crossCheckStateCount;return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e},t.prototype.crossCheckDiagonal=function(e,r,n,i){for(var a=this.getCrossCheckStateCount(),o=0,s=this.image;e>=o&&r>=o&&s.get(r-o,e-o);)a[2]++,o++;if(e<o||r<o)return!1;for(;e>=o&&r>=o&&!s.get(r-o,e-o)&&a[1]<=n;)a[1]++,o++;if(e<o||r<o||a[1]>n)return!1;for(;e>=o&&r>=o&&s.get(r-o,e-o)&&a[0]<=n;)a[0]++,o++;if(a[0]>n)return!1;var l=s.getHeight(),c=s.getWidth();for(o=1;e+o<l&&r+o<c&&s.get(r+o,e+o);)a[2]++,o++;if(e+o>=l||r+o>=c)return!1;for(;e+o<l&&r+o<c&&!s.get(r+o,e+o)&&a[3]<n;)a[3]++,o++;if(e+o>=l||r+o>=c||a[3]>=n)return!1;for(;e+o<l&&r+o<c&&s.get(r+o,e+o)&&a[4]<n;)a[4]++,o++;if(a[4]>=n)return!1;var f=a[0]+a[1]+a[2]+a[3]+a[4];return Math.abs(f-i)<2*i&&t.foundPatternCross(a)},t.prototype.crossCheckVertical=function(e,r,n,i){for(var a=this.image,o=a.getHeight(),s=this.getCrossCheckStateCount(),l=e;l>=0&&a.get(r,l);)s[2]++,l--;if(l<0)return NaN;for(;l>=0&&!a.get(r,l)&&s[1]<=n;)s[1]++,l--;if(l<0||s[1]>n)return NaN;for(;l>=0&&a.get(r,l)&&s[0]<=n;)s[0]++,l--;if(s[0]>n)return NaN;for(l=e+1;l<o&&a.get(r,l);)s[2]++,l++;if(l===o)return NaN;for(;l<o&&!a.get(r,l)&&s[3]<n;)s[3]++,l++;if(l===o||s[3]>=n)return NaN;for(;l<o&&a.get(r,l)&&s[4]<n;)s[4]++,l++;if(s[4]>=n)return NaN;var c=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(c-i)>=2*i?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,l):NaN},t.prototype.crossCheckHorizontal=function(e,r,n,i){for(var a=this.image,o=a.getWidth(),s=this.getCrossCheckStateCount(),l=e;l>=0&&a.get(l,r);)s[2]++,l--;if(l<0)return NaN;for(;l>=0&&!a.get(l,r)&&s[1]<=n;)s[1]++,l--;if(l<0||s[1]>n)return NaN;for(;l>=0&&a.get(l,r)&&s[0]<=n;)s[0]++,l--;if(s[0]>n)return NaN;for(l=e+1;l<o&&a.get(l,r);)s[2]++,l++;if(l===o)return NaN;for(;l<o&&!a.get(l,r)&&s[3]<n;)s[3]++,l++;if(l===o||s[3]>=n)return NaN;for(;l<o&&a.get(l,r)&&s[4]<n;)s[4]++,l++;if(s[4]>=n)return NaN;var c=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(c-i)>=i?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,l):NaN},t.prototype.handlePossibleCenter=function(e,r,n,i){var a=e[0]+e[1]+e[2]+e[3]+e[4],o=t.centerFromEnd(e,n),s=this.crossCheckVertical(r,Math.floor(o),e[2],a);if(!isNaN(s)&&(o=this.crossCheckHorizontal(Math.floor(o),Math.floor(s),e[2],a),!isNaN(o)&&(!i||this.crossCheckDiagonal(Math.floor(s),Math.floor(o),e[2],a)))){for(var l=a/7,c=!1,f=this.possibleCenters,d=0,p=f.length;d<p;d++){var h=f[d];if(h.aboutEquals(l,s,o)){f[d]=h.combineEstimate(s,o,l),c=!0;break}}if(!c){var v=new Mc(o,s,l);f.push(v),this.resultPointCallback!==null&&this.resultPointCallback!==void 0&&this.resultPointCallback.foundPossibleResultPoint(v)}return!0}return!1},t.prototype.findRowSkip=function(){var e,r,n=this.possibleCenters.length;if(n<=1)return 0;var i=null;try{for(var a=jt(this.possibleCenters),o=a.next();!o.done;o=a.next()){var s=o.value;if(s.getCount()>=t.CENTER_QUORUM)if(i==null)i=s;else return this.hasSkipped=!0,Math.floor((Math.abs(i.getX()-s.getX())-Math.abs(i.getY()-s.getY()))/2)}}catch(l){e={error:l}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return 0},t.prototype.haveMultiplyConfirmedCenters=function(){var e,r,n,i,a=0,o=0,s=this.possibleCenters.length;try{for(var l=jt(this.possibleCenters),c=l.next();!c.done;c=l.next()){var f=c.value;f.getCount()>=t.CENTER_QUORUM&&(a++,o+=f.getEstimatedModuleSize())}}catch(g){e={error:g}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}if(a<3)return!1;var d=o/s,p=0;try{for(var h=jt(this.possibleCenters),v=h.next();!v.done;v=h.next()){var f=v.value;p+=Math.abs(f.getEstimatedModuleSize()-d)}}catch(g){n={error:g}}finally{try{v&&!v.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}return p<=.05*o},t.prototype.selectBestPatterns=function(){var e,r,n,i,a=this.possibleCenters.length;if(a<3)throw new I;var o=this.possibleCenters,s;if(a>3){var l=0,c=0;try{for(var f=jt(this.possibleCenters),d=f.next();!d.done;d=f.next()){var p=d.value,h=p.getEstimatedModuleSize();l+=h,c+=h*h}}catch(C){e={error:C}}finally{try{d&&!d.done&&(r=f.return)&&r.call(f)}finally{if(e)throw e.error}}s=l/a;var v=Math.sqrt(c/a-s*s);o.sort(function(C,b){var O=Math.abs(b.getEstimatedModuleSize()-s),P=Math.abs(C.getEstimatedModuleSize()-s);return O<P?-1:O>P?1:0});for(var g=Math.max(.2*s,v),y=0;y<o.length&&o.length>3;y++){var _=o[y];Math.abs(_.getEstimatedModuleSize()-s)>g&&(o.splice(y,1),y--)}}if(o.length>3){var l=0;try{for(var m=jt(o),E=m.next();!E.done;E=m.next()){var w=E.value;l+=w.getEstimatedModuleSize()}}catch(b){n={error:b}}finally{try{E&&!E.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}s=l/o.length,o.sort(function(b,O){if(O.getCount()===b.getCount()){var P=Math.abs(O.getEstimatedModuleSize()-s),H=Math.abs(b.getEstimatedModuleSize()-s);return P<H?1:P>H?-1:0}else return O.getCount()-b.getCount()}),o.splice(3)}return[o[0],o[1],o[2]]},t.CENTER_QUORUM=2,t.MIN_SKIP=3,t.MAX_MODULES=57,t})(),Vc=(function(){function t(e){this.image=e}return t.prototype.getImage=function(){return this.image},t.prototype.getResultPointCallback=function(){return this.resultPointCallback},t.prototype.detect=function(e){this.resultPointCallback=e==null?null:e.get(le.NEED_RESULT_POINT_CALLBACK);var r=new Fc(this.image,this.resultPointCallback),n=r.find(e);return this.processFinderPatternInfo(n)},t.prototype.processFinderPatternInfo=function(e){var r=e.getTopLeft(),n=e.getTopRight(),i=e.getBottomLeft(),a=this.calculateModuleSize(r,n,i);if(a<1)throw new I("No pattern found in proccess finder.");var o=t.computeDimension(r,n,i,a),s=wt.getProvisionalVersionForDimension(o),l=s.getDimensionForVersion()-7,c=null;if(s.getAlignmentPatternCenters().length>0)for(var f=n.getX()-r.getX()+i.getX(),d=n.getY()-r.getY()+i.getY(),p=1-3/l,h=Math.floor(r.getX()+p*(f-r.getX())),v=Math.floor(r.getY()+p*(d-r.getY())),g=4;g<=16;g<<=1)try{c=this.findAlignmentInRegion(a,h,v,g);break}catch(E){if(!(E instanceof I))throw E}var y=t.createTransform(r,n,i,c,o),_=t.sampleGrid(this.image,y,o),m;return c===null?m=[i,r,n]:m=[i,r,n,c],new Kn(_,m)},t.createTransform=function(e,r,n,i,a){var o=a-3.5,s,l,c,f;return i!==null?(s=i.getX(),l=i.getY(),c=o-3,f=c):(s=r.getX()-e.getX()+n.getX(),l=r.getY()-e.getY()+n.getY(),c=o,f=o),da.quadrilateralToQuadrilateral(3.5,3.5,o,3.5,c,f,3.5,o,e.getX(),e.getY(),r.getX(),r.getY(),s,l,n.getX(),n.getY())},t.sampleGrid=function(e,r,n){var i=jn.getInstance();return i.sampleGridWithTransform(e,n,n,r)},t.computeDimension=function(e,r,n,i){var a=X.round(k.distance(e,r)/i),o=X.round(k.distance(e,n)/i),s=Math.floor((a+o)/2)+7;switch(s&3){case 0:s++;break;case 2:s--;break;case 3:throw new I("Dimensions could be not found.")}return s},t.prototype.calculateModuleSize=function(e,r,n){return(this.calculateModuleSizeOneWay(e,r)+this.calculateModuleSizeOneWay(e,n))/2},t.prototype.calculateModuleSizeOneWay=function(e,r){var n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(r.getX()),Math.floor(r.getY())),i=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(r.getX()),Math.floor(r.getY()),Math.floor(e.getX()),Math.floor(e.getY()));return isNaN(n)?i/7:isNaN(i)?n/7:(n+i)/14},t.prototype.sizeOfBlackWhiteBlackRunBothWays=function(e,r,n,i){var a=this.sizeOfBlackWhiteBlackRun(e,r,n,i),o=1,s=e-(n-e);s<0?(o=e/(e-s),s=0):s>=this.image.getWidth()&&(o=(this.image.getWidth()-1-e)/(s-e),s=this.image.getWidth()-1);var l=Math.floor(r-(i-r)*o);return o=1,l<0?(o=r/(r-l),l=0):l>=this.image.getHeight()&&(o=(this.image.getHeight()-1-r)/(l-r),l=this.image.getHeight()-1),s=Math.floor(e+(s-e)*o),a+=this.sizeOfBlackWhiteBlackRun(e,r,s,l),a-1},t.prototype.sizeOfBlackWhiteBlackRun=function(e,r,n,i){var a=Math.abs(i-r)>Math.abs(n-e);if(a){var o=e;e=r,r=o,o=n,n=i,i=o}for(var s=Math.abs(n-e),l=Math.abs(i-r),c=-s/2,f=e<n?1:-1,d=r<i?1:-1,p=0,h=n+f,v=e,g=r;v!==h;v+=f){var y=a?g:v,_=a?v:g;if(p===1===this.image.get(y,_)){if(p===2)return X.distance(v,g,e,r);p++}if(c+=l,c>0){if(g===i)break;g+=d,c-=s}}return p===2?X.distance(n+f,i,e,r):NaN},t.prototype.findAlignmentInRegion=function(e,r,n,i){var a=Math.floor(i*e),o=Math.max(0,r-a),s=Math.min(this.image.getWidth()-1,r+a);if(s-o<e*3)throw new I("Alignment top exceeds estimated module size.");var l=Math.max(0,n-a),c=Math.min(this.image.getHeight()-1,n+a);if(c-l<e*3)throw new I("Alignment bottom exceeds estimated module size.");var f=new Pc(this.image,o,l,s-o,c-l,e,this.resultPointCallback);return f.find()},t})(),Pn=(function(){function t(){this.decoder=new Nc}return t.prototype.getDecoder=function(){return this.decoder},t.prototype.decode=function(e,r){var n,i;if(r!=null&&r.get(le.PURE_BARCODE)!==void 0){var a=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decodeBitMatrix(a,r),i=t.NO_POINTS}else{var o=new Vc(e.getBlackMatrix()).detect(r);n=this.decoder.decodeBitMatrix(o.getBits(),r),i=o.getPoints()}n.getOther()instanceof ya&&n.getOther().applyMirroredCorrection(i);var s=new Be(n.getText(),n.getRawBytes(),void 0,i,U.QR_CODE,void 0),l=n.getByteSegments();l!==null&&s.putMetadata(we.BYTE_SEGMENTS,l);var c=n.getECLevel();return c!==null&&s.putMetadata(we.ERROR_CORRECTION_LEVEL,c),n.hasStructuredAppend()&&(s.putMetadata(we.STRUCTURED_APPEND_SEQUENCE,n.getStructuredAppendSequenceNumber()),s.putMetadata(we.STRUCTURED_APPEND_PARITY,n.getStructuredAppendParity())),s},t.prototype.reset=function(){},t.extractPureBits=function(e){var r=e.getTopLeftOnBit(),n=e.getBottomRightOnBit();if(r===null||n===null)throw new I;var i=this.moduleSize(r,e),a=r[1],o=n[1],s=r[0],l=n[0];if(s>=l||a>=o)throw new I;if(o-a!==l-s&&(l=s+(o-a),l>=e.getWidth()))throw new I;var c=Math.round((l-s+1)/i),f=Math.round((o-a+1)/i);if(c<=0||f<=0)throw new I;if(f!==c)throw new I;var d=Math.floor(i/2);a+=d,s+=d;var p=s+Math.floor((c-1)*i)-l;if(p>0){if(p>d)throw new I;s-=p}var h=a+Math.floor((f-1)*i)-o;if(h>0){if(h>d)throw new I;a-=h}for(var v=new qe(c,f),g=0;g<f;g++)for(var y=a+Math.floor(g*i),_=0;_<c;_++)e.get(s+Math.floor(_*i),y)&&v.set(_,g);return v},t.moduleSize=function(e,r){for(var n=r.getHeight(),i=r.getWidth(),a=e[0],o=e[1],s=!0,l=0;a<i&&o<n;){if(s!==r.get(a,o)){if(++l===5)break;s=!s}a++,o++}if(a===i||o===n)throw new I;return(a-e[0])/7},t.NO_POINTS=new Array,t})(),Uc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},W=(function(){function t(){}return t.prototype.PDF417Common=function(){},t.getBitCountSum=function(e){return X.sum(e)},t.toIntArray=function(e){var r,n;if(e==null||!e.length)return t.EMPTY_INT_ARRAY;var i=new Int32Array(e.length),a=0;try{for(var o=Uc(e),s=o.next();!s.done;s=o.next()){var l=s.value;i[a++]=l}}catch(c){r={error:c}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},t.getCodeword=function(e){var r=De.binarySearch(t.SYMBOL_TABLE,e&262143);return r<0?-1:(t.CODEWORD_TABLE[r]-1)%t.NUMBER_OF_CODEWORDS},t.NUMBER_OF_CODEWORDS=929,t.MAX_CODEWORDS_IN_BARCODE=t.NUMBER_OF_CODEWORDS-1,t.MIN_ROWS_IN_BARCODE=3,t.MAX_ROWS_IN_BARCODE=90,t.MODULES_IN_CODEWORD=17,t.MODULES_IN_STOP_PATTERN=18,t.BARS_IN_MODULE=8,t.EMPTY_INT_ARRAY=new Int32Array([]),t.SYMBOL_TABLE=Int32Array.from([66142,66170,66206,66236,66290,66292,66350,66382,66396,66454,66470,66476,66594,66600,66614,66626,66628,66632,66640,66654,66662,66668,66682,66690,66718,66720,66748,66758,66776,66798,66802,66804,66820,66824,66832,66846,66848,66876,66880,66936,66950,66956,66968,66992,67006,67022,67036,67042,67044,67048,67062,67118,67150,67164,67214,67228,67256,67294,67322,67350,67366,67372,67398,67404,67416,67438,67474,67476,67490,67492,67496,67510,67618,67624,67650,67656,67664,67678,67686,67692,67706,67714,67716,67728,67742,67744,67772,67782,67788,67800,67822,67826,67828,67842,67848,67870,67872,67900,67904,67960,67974,67992,68016,68030,68046,68060,68066,68068,68072,68086,68104,68112,68126,68128,68156,68160,68216,68336,68358,68364,68376,68400,68414,68448,68476,68494,68508,68536,68546,68548,68552,68560,68574,68582,68588,68654,68686,68700,68706,68708,68712,68726,68750,68764,68792,68802,68804,68808,68816,68830,68838,68844,68858,68878,68892,68920,68976,68990,68994,68996,69e3,69008,69022,69024,69052,69062,69068,69080,69102,69106,69108,69142,69158,69164,69190,69208,69230,69254,69260,69272,69296,69310,69326,69340,69386,69394,69396,69410,69416,69430,69442,69444,69448,69456,69470,69478,69484,69554,69556,69666,69672,69698,69704,69712,69726,69754,69762,69764,69776,69790,69792,69820,69830,69836,69848,69870,69874,69876,69890,69918,69920,69948,69952,70008,70022,70040,70064,70078,70094,70108,70114,70116,70120,70134,70152,70174,70176,70264,70384,70412,70448,70462,70496,70524,70542,70556,70584,70594,70600,70608,70622,70630,70636,70664,70672,70686,70688,70716,70720,70776,70896,71136,71180,71192,71216,71230,71264,71292,71360,71416,71452,71480,71536,71550,71554,71556,71560,71568,71582,71584,71612,71622,71628,71640,71662,71726,71732,71758,71772,71778,71780,71784,71798,71822,71836,71864,71874,71880,71888,71902,71910,71916,71930,71950,71964,71992,72048,72062,72066,72068,72080,72094,72096,72124,72134,72140,72152,72174,72178,72180,72206,72220,72248,72304,72318,72416,72444,72456,72464,72478,72480,72508,72512,72568,72588,72600,72624,72638,72654,72668,72674,72676,72680,72694,72726,72742,72748,72774,72780,72792,72814,72838,72856,72880,72894,72910,72924,72930,72932,72936,72950,72966,72972,72984,73008,73022,73056,73084,73102,73116,73144,73156,73160,73168,73182,73190,73196,73210,73226,73234,73236,73250,73252,73256,73270,73282,73284,73296,73310,73318,73324,73346,73348,73352,73360,73374,73376,73404,73414,73420,73432,73454,73498,73518,73522,73524,73550,73564,73570,73572,73576,73590,73800,73822,73858,73860,73872,73886,73888,73916,73944,73970,73972,73992,74014,74016,74044,74048,74104,74118,74136,74160,74174,74210,74212,74216,74230,74244,74256,74270,74272,74360,74480,74502,74508,74544,74558,74592,74620,74638,74652,74680,74690,74696,74704,74726,74732,74782,74784,74812,74992,75232,75288,75326,75360,75388,75456,75512,75576,75632,75646,75650,75652,75664,75678,75680,75708,75718,75724,75736,75758,75808,75836,75840,75896,76016,76256,76736,76824,76848,76862,76896,76924,76992,77048,77296,77340,77368,77424,77438,77536,77564,77572,77576,77584,77600,77628,77632,77688,77702,77708,77720,77744,77758,77774,77788,77870,77902,77916,77922,77928,77966,77980,78008,78018,78024,78032,78046,78060,78074,78094,78136,78192,78206,78210,78212,78224,78238,78240,78268,78278,78284,78296,78322,78324,78350,78364,78448,78462,78560,78588,78600,78622,78624,78652,78656,78712,78726,78744,78768,78782,78798,78812,78818,78820,78824,78838,78862,78876,78904,78960,78974,79072,79100,79296,79352,79368,79376,79390,79392,79420,79424,79480,79600,79628,79640,79664,79678,79712,79740,79772,79800,79810,79812,79816,79824,79838,79846,79852,79894,79910,79916,79942,79948,79960,79982,79988,80006,80024,80048,80062,80078,80092,80098,80100,80104,80134,80140,80176,80190,80224,80252,80270,80284,80312,80328,80336,80350,80358,80364,80378,80390,80396,80408,80432,80446,80480,80508,80576,80632,80654,80668,80696,80752,80766,80776,80784,80798,80800,80828,80844,80856,80878,80882,80884,80914,80916,80930,80932,80936,80950,80962,80968,80976,80990,80998,81004,81026,81028,81040,81054,81056,81084,81094,81100,81112,81134,81154,81156,81160,81168,81182,81184,81212,81216,81272,81286,81292,81304,81328,81342,81358,81372,81380,81384,81398,81434,81454,81458,81460,81486,81500,81506,81508,81512,81526,81550,81564,81592,81602,81604,81608,81616,81630,81638,81644,81702,81708,81722,81734,81740,81752,81774,81778,81780,82050,82078,82080,82108,82180,82184,82192,82206,82208,82236,82240,82296,82316,82328,82352,82366,82402,82404,82408,82440,82448,82462,82464,82492,82496,82552,82672,82694,82700,82712,82736,82750,82784,82812,82830,82882,82884,82888,82896,82918,82924,82952,82960,82974,82976,83004,83008,83064,83184,83424,83468,83480,83504,83518,83552,83580,83648,83704,83740,83768,83824,83838,83842,83844,83848,83856,83872,83900,83910,83916,83928,83950,83984,84e3,84028,84032,84088,84208,84448,84928,85040,85054,85088,85116,85184,85240,85488,85560,85616,85630,85728,85756,85764,85768,85776,85790,85792,85820,85824,85880,85894,85900,85912,85936,85966,85980,86048,86080,86136,86256,86496,86976,88160,88188,88256,88312,88560,89056,89200,89214,89312,89340,89536,89592,89608,89616,89632,89664,89720,89840,89868,89880,89904,89952,89980,89998,90012,90040,90190,90204,90254,90268,90296,90306,90308,90312,90334,90382,90396,90424,90480,90494,90500,90504,90512,90526,90528,90556,90566,90572,90584,90610,90612,90638,90652,90680,90736,90750,90848,90876,90884,90888,90896,90910,90912,90940,90944,91e3,91014,91020,91032,91056,91070,91086,91100,91106,91108,91112,91126,91150,91164,91192,91248,91262,91360,91388,91584,91640,91664,91678,91680,91708,91712,91768,91888,91928,91952,91966,92e3,92028,92046,92060,92088,92098,92100,92104,92112,92126,92134,92140,92188,92216,92272,92384,92412,92608,92664,93168,93200,93214,93216,93244,93248,93304,93424,93664,93720,93744,93758,93792,93820,93888,93944,93980,94008,94064,94078,94084,94088,94096,94110,94112,94140,94150,94156,94168,94246,94252,94278,94284,94296,94318,94342,94348,94360,94384,94398,94414,94428,94440,94470,94476,94488,94512,94526,94560,94588,94606,94620,94648,94658,94660,94664,94672,94686,94694,94700,94714,94726,94732,94744,94768,94782,94816,94844,94912,94968,94990,95004,95032,95088,95102,95112,95120,95134,95136,95164,95180,95192,95214,95218,95220,95244,95256,95280,95294,95328,95356,95424,95480,95728,95758,95772,95800,95856,95870,95968,95996,96008,96016,96030,96032,96060,96064,96120,96152,96176,96190,96220,96226,96228,96232,96290,96292,96296,96310,96322,96324,96328,96336,96350,96358,96364,96386,96388,96392,96400,96414,96416,96444,96454,96460,96472,96494,96498,96500,96514,96516,96520,96528,96542,96544,96572,96576,96632,96646,96652,96664,96688,96702,96718,96732,96738,96740,96744,96758,96772,96776,96784,96798,96800,96828,96832,96888,97008,97030,97036,97048,97072,97086,97120,97148,97166,97180,97208,97220,97224,97232,97246,97254,97260,97326,97330,97332,97358,97372,97378,97380,97384,97398,97422,97436,97464,97474,97476,97480,97488,97502,97510,97516,97550,97564,97592,97648,97666,97668,97672,97680,97694,97696,97724,97734,97740,97752,97774,97830,97836,97850,97862,97868,97880,97902,97906,97908,97926,97932,97944,97968,97998,98012,98018,98020,98024,98038,98618,98674,98676,98838,98854,98874,98892,98904,98926,98930,98932,98968,99006,99042,99044,99048,99062,99166,99194,99246,99286,99350,99366,99372,99386,99398,99416,99438,99442,99444,99462,99504,99518,99534,99548,99554,99556,99560,99574,99590,99596,99608,99632,99646,99680,99708,99726,99740,99768,99778,99780,99784,99792,99806,99814,99820,99834,99858,99860,99874,99880,99894,99906,99920,99934,99962,99970,99972,99976,99984,99998,1e5,100028,100038,100044,100056,100078,100082,100084,100142,100174,100188,100246,100262,100268,100306,100308,100390,100396,100410,100422,100428,100440,100462,100466,100468,100486,100504,100528,100542,100558,100572,100578,100580,100584,100598,100620,100656,100670,100704,100732,100750,100792,100802,100808,100816,100830,100838,100844,100858,100888,100912,100926,100960,100988,101056,101112,101148,101176,101232,101246,101250,101252,101256,101264,101278,101280,101308,101318,101324,101336,101358,101362,101364,101410,101412,101416,101430,101442,101448,101456,101470,101478,101498,101506,101508,101520,101534,101536,101564,101580,101618,101620,101636,101640,101648,101662,101664,101692,101696,101752,101766,101784,101838,101858,101860,101864,101934,101938,101940,101966,101980,101986,101988,101992,102030,102044,102072,102082,102084,102088,102096,102138,102166,102182,102188,102214,102220,102232,102254,102282,102290,102292,102306,102308,102312,102326,102444,102458,102470,102476,102488,102514,102516,102534,102552,102576,102590,102606,102620,102626,102632,102646,102662,102668,102704,102718,102752,102780,102798,102812,102840,102850,102856,102864,102878,102886,102892,102906,102936,102974,103008,103036,103104,103160,103224,103280,103294,103298,103300,103312,103326,103328,103356,103366,103372,103384,103406,103410,103412,103472,103486,103520,103548,103616,103672,103920,103992,104048,104062,104160,104188,104194,104196,104200,104208,104224,104252,104256,104312,104326,104332,104344,104368,104382,104398,104412,104418,104420,104424,104482,104484,104514,104520,104528,104542,104550,104570,104578,104580,104592,104606,104608,104636,104652,104690,104692,104706,104712,104734,104736,104764,104768,104824,104838,104856,104910,104930,104932,104936,104968,104976,104990,104992,105020,105024,105080,105200,105240,105278,105312,105372,105410,105412,105416,105424,105446,105518,105524,105550,105564,105570,105572,105576,105614,105628,105656,105666,105672,105680,105702,105722,105742,105756,105784,105840,105854,105858,105860,105864,105872,105888,105932,105970,105972,106006,106022,106028,106054,106060,106072,106100,106118,106124,106136,106160,106174,106190,106210,106212,106216,106250,106258,106260,106274,106276,106280,106306,106308,106312,106320,106334,106348,106394,106414,106418,106420,106566,106572,106610,106612,106630,106636,106648,106672,106686,106722,106724,106728,106742,106758,106764,106776,106800,106814,106848,106876,106894,106908,106936,106946,106948,106952,106960,106974,106982,106988,107032,107056,107070,107104,107132,107200,107256,107292,107320,107376,107390,107394,107396,107400,107408,107422,107424,107452,107462,107468,107480,107502,107506,107508,107544,107568,107582,107616,107644,107712,107768,108016,108060,108088,108144,108158,108256,108284,108290,108292,108296,108304,108318,108320,108348,108352,108408,108422,108428,108440,108464,108478,108494,108508,108514,108516,108520,108592,108640,108668,108736,108792,109040,109536,109680,109694,109792,109820,110016,110072,110084,110088,110096,110112,110140,110144,110200,110320,110342,110348,110360,110384,110398,110432,110460,110478,110492,110520,110532,110536,110544,110558,110658,110686,110714,110722,110724,110728,110736,110750,110752,110780,110796,110834,110836,110850,110852,110856,110864,110878,110880,110908,110912,110968,110982,111e3,111054,111074,111076,111080,111108,111112,111120,111134,111136,111164,111168,111224,111344,111372,111422,111456,111516,111554,111556,111560,111568,111590,111632,111646,111648,111676,111680,111736,111856,112096,112152,112224,112252,112320,112440,112514,112516,112520,112528,112542,112544,112588,112686,112718,112732,112782,112796,112824,112834,112836,112840,112848,112870,112890,112910,112924,112952,113008,113022,113026,113028,113032,113040,113054,113056,113100,113138,113140,113166,113180,113208,113264,113278,113376,113404,113416,113424,113440,113468,113472,113560,113614,113634,113636,113640,113686,113702,113708,113734,113740,113752,113778,113780,113798,113804,113816,113840,113854,113870,113890,113892,113896,113926,113932,113944,113968,113982,114016,114044,114076,114114,114116,114120,114128,114150,114170,114194,114196,114210,114212,114216,114242,114244,114248,114256,114270,114278,114306,114308,114312,114320,114334,114336,114364,114380,114420,114458,114478,114482,114484,114510,114524,114530,114532,114536,114842,114866,114868,114970,114994,114996,115042,115044,115048,115062,115130,115226,115250,115252,115278,115292,115298,115300,115304,115318,115342,115394,115396,115400,115408,115422,115430,115436,115450,115478,115494,115514,115526,115532,115570,115572,115738,115758,115762,115764,115790,115804,115810,115812,115816,115830,115854,115868,115896,115906,115912,115920,115934,115942,115948,115962,115996,116024,116080,116094,116098,116100,116104,116112,116126,116128,116156,116166,116172,116184,116206,116210,116212,116246,116262,116268,116282,116294,116300,116312,116334,116338,116340,116358,116364,116376,116400,116414,116430,116444,116450,116452,116456,116498,116500,116514,116520,116534,116546,116548,116552,116560,116574,116582,116588,116602,116654,116694,116714,116762,116782,116786,116788,116814,116828,116834,116836,116840,116854,116878,116892,116920,116930,116936,116944,116958,116966,116972,116986,117006,117048,117104,117118,117122,117124,117136,117150,117152,117180,117190,117196,117208,117230,117234,117236,117304,117360,117374,117472,117500,117506,117508,117512,117520,117536,117564,117568,117624,117638,117644,117656,117680,117694,117710,117724,117730,117732,117736,117750,117782,117798,117804,117818,117830,117848,117874,117876,117894,117936,117950,117966,117986,117988,117992,118022,118028,118040,118064,118078,118112,118140,118172,118210,118212,118216,118224,118238,118246,118266,118306,118312,118338,118352,118366,118374,118394,118402,118404,118408,118416,118430,118432,118460,118476,118514,118516,118574,118578,118580,118606,118620,118626,118628,118632,118678,118694,118700,118730,118738,118740,118830,118834,118836,118862,118876,118882,118884,118888,118902,118926,118940,118968,118978,118980,118984,118992,119006,119014,119020,119034,119068,119096,119152,119166,119170,119172,119176,119184,119198,119200,119228,119238,119244,119256,119278,119282,119284,119324,119352,119408,119422,119520,119548,119554,119556,119560,119568,119582,119584,119612,119616,119672,119686,119692,119704,119728,119742,119758,119772,119778,119780,119784,119798,119920,119934,120032,120060,120256,120312,120324,120328,120336,120352,120384,120440,120560,120582,120588,120600,120624,120638,120672,120700,120718,120732,120760,120770,120772,120776,120784,120798,120806,120812,120870,120876,120890,120902,120908,120920,120946,120948,120966,120972,120984,121008,121022,121038,121058,121060,121064,121078,121100,121112,121136,121150,121184,121212,121244,121282,121284,121288,121296,121318,121338,121356,121368,121392,121406,121440,121468,121536,121592,121656,121730,121732,121736,121744,121758,121760,121804,121842,121844,121890,121922,121924,121928,121936,121950,121958,121978,121986,121988,121992,122e3,122014,122016,122044,122060,122098,122100,122116,122120,122128,122142,122144,122172,122176,122232,122246,122264,122318,122338,122340,122344,122414,122418,122420,122446,122460,122466,122468,122472,122510,122524,122552,122562,122564,122568,122576,122598,122618,122646,122662,122668,122694,122700,122712,122738,122740,122762,122770,122772,122786,122788,122792,123018,123026,123028,123042,123044,123048,123062,123098,123146,123154,123156,123170,123172,123176,123190,123202,123204,123208,123216,123238,123244,123258,123290,123314,123316,123402,123410,123412,123426,123428,123432,123446,123458,123464,123472,123486,123494,123500,123514,123522,123524,123528,123536,123552,123580,123590,123596,123608,123630,123634,123636,123674,123698,123700,123740,123746,123748,123752,123834,123914,123922,123924,123938,123944,123958,123970,123976,123984,123998,124006,124012,124026,124034,124036,124048,124062,124064,124092,124102,124108,124120,124142,124146,124148,124162,124164,124168,124176,124190,124192,124220,124224,124280,124294,124300,124312,124336,124350,124366,124380,124386,124388,124392,124406,124442,124462,124466,124468,124494,124508,124514,124520,124558,124572,124600,124610,124612,124616,124624,124646,124666,124694,124710,124716,124730,124742,124748,124760,124786,124788,124818,124820,124834,124836,124840,124854,124946,124948,124962,124964,124968,124982,124994,124996,125e3,125008,125022,125030,125036,125050,125058,125060,125064,125072,125086,125088,125116,125126,125132,125144,125166,125170,125172,125186,125188,125192,125200,125216,125244,125248,125304,125318,125324,125336,125360,125374,125390,125404,125410,125412,125416,125430,125444,125448,125456,125472,125504,125560,125680,125702,125708,125720,125744,125758,125792,125820,125838,125852,125880,125890,125892,125896,125904,125918,125926,125932,125978,125998,126002,126004,126030,126044,126050,126052,126056,126094,126108,126136,126146,126148,126152,126160,126182,126202,126222,126236,126264,126320,126334,126338,126340,126344,126352,126366,126368,126412,126450,126452,126486,126502,126508,126522,126534,126540,126552,126574,126578,126580,126598,126604,126616,126640,126654,126670,126684,126690,126692,126696,126738,126754,126756,126760,126774,126786,126788,126792,126800,126814,126822,126828,126842,126894,126898,126900,126934,127126,127142,127148,127162,127178,127186,127188,127254,127270,127276,127290,127302,127308,127320,127342,127346,127348,127370,127378,127380,127394,127396,127400,127450,127510,127526,127532,127546,127558,127576,127598,127602,127604,127622,127628,127640,127664,127678,127694,127708,127714,127716,127720,127734,127754,127762,127764,127778,127784,127810,127812,127816,127824,127838,127846,127866,127898,127918,127922,127924,128022,128038,128044,128058,128070,128076,128088,128110,128114,128116,128134,128140,128152,128176,128190,128206,128220,128226,128228,128232,128246,128262,128268,128280,128304,128318,128352,128380,128398,128412,128440,128450,128452,128456,128464,128478,128486,128492,128506,128522,128530,128532,128546,128548,128552,128566,128578,128580,128584,128592,128606,128614,128634,128642,128644,128648,128656,128670,128672,128700,128716,128754,128756,128794,128814,128818,128820,128846,128860,128866,128868,128872,128886,128918,128934,128940,128954,128978,128980,129178,129198,129202,129204,129238,129258,129306,129326,129330,129332,129358,129372,129378,129380,129384,129398,129430,129446,129452,129466,129482,129490,129492,129562,129582,129586,129588,129614,129628,129634,129636,129640,129654,129678,129692,129720,129730,129732,129736,129744,129758,129766,129772,129814,129830,129836,129850,129862,129868,129880,129902,129906,129908,129930,129938,129940,129954,129956,129960,129974,130010]),t.CODEWORD_TABLE=Int32Array.from([2627,1819,2622,2621,1813,1812,2729,2724,2723,2779,2774,2773,902,896,908,868,865,861,859,2511,873,871,1780,835,2493,825,2491,842,837,844,1764,1762,811,810,809,2483,807,2482,806,2480,815,814,813,812,2484,817,816,1745,1744,1742,1746,2655,2637,2635,2626,2625,2623,2628,1820,2752,2739,2737,2728,2727,2725,2730,2785,2783,2778,2777,2775,2780,787,781,747,739,736,2413,754,752,1719,692,689,681,2371,678,2369,700,697,694,703,1688,1686,642,638,2343,631,2341,627,2338,651,646,643,2345,654,652,1652,1650,1647,1654,601,599,2322,596,2321,594,2319,2317,611,610,608,606,2324,603,2323,615,614,612,1617,1616,1614,1612,616,1619,1618,2575,2538,2536,905,901,898,909,2509,2507,2504,870,867,864,860,2512,875,872,1781,2490,2489,2487,2485,1748,836,834,832,830,2494,827,2492,843,841,839,845,1765,1763,2701,2676,2674,2653,2648,2656,2634,2633,2631,2629,1821,2638,2636,2770,2763,2761,2750,2745,2753,2736,2735,2733,2731,1848,2740,2738,2786,2784,591,588,576,569,566,2296,1590,537,534,526,2276,522,2274,545,542,539,548,1572,1570,481,2245,466,2242,462,2239,492,485,482,2249,496,494,1534,1531,1528,1538,413,2196,406,2191,2188,425,419,2202,415,2199,432,430,427,1472,1467,1464,433,1476,1474,368,367,2160,365,2159,362,2157,2155,2152,378,377,375,2166,372,2165,369,2162,383,381,379,2168,1419,1418,1416,1414,385,1411,384,1423,1422,1420,1424,2461,802,2441,2439,790,786,783,794,2409,2406,2403,750,742,738,2414,756,753,1720,2367,2365,2362,2359,1663,693,691,684,2373,680,2370,702,699,696,704,1690,1687,2337,2336,2334,2332,1624,2329,1622,640,637,2344,634,2342,630,2340,650,648,645,2346,655,653,1653,1651,1649,1655,2612,2597,2595,2571,2568,2565,2576,2534,2529,2526,1787,2540,2537,907,904,900,910,2503,2502,2500,2498,1768,2495,1767,2510,2508,2506,869,866,863,2513,876,874,1782,2720,2713,2711,2697,2694,2691,2702,2672,2670,2664,1828,2678,2675,2647,2646,2644,2642,1823,2639,1822,2654,2652,2650,2657,2771,1855,2765,2762,1850,1849,2751,2749,2747,2754,353,2148,344,342,336,2142,332,2140,345,1375,1373,306,2130,299,2128,295,2125,319,314,311,2132,1354,1352,1349,1356,262,257,2101,253,2096,2093,274,273,267,2107,263,2104,280,278,275,1316,1311,1308,1320,1318,2052,202,2050,2044,2040,219,2063,212,2060,208,2055,224,221,2066,1260,1258,1252,231,1248,229,1266,1264,1261,1268,155,1998,153,1996,1994,1991,1988,165,164,2007,162,2006,159,2003,2e3,172,171,169,2012,166,2010,1186,1184,1182,1179,175,1176,173,1192,1191,1189,1187,176,1194,1193,2313,2307,2305,592,589,2294,2292,2289,578,572,568,2297,580,1591,2272,2267,2264,1547,538,536,529,2278,525,2275,547,544,541,1574,1571,2237,2235,2229,1493,2225,1489,478,2247,470,2244,465,2241,493,488,484,2250,498,495,1536,1533,1530,1539,2187,2186,2184,2182,1432,2179,1430,2176,1427,414,412,2197,409,2195,405,2193,2190,426,424,421,2203,418,2201,431,429,1473,1471,1469,1466,434,1477,1475,2478,2472,2470,2459,2457,2454,2462,803,2437,2432,2429,1726,2443,2440,792,789,785,2401,2399,2393,1702,2389,1699,2411,2408,2405,745,741,2415,758,755,1721,2358,2357,2355,2353,1661,2350,1660,2347,1657,2368,2366,2364,2361,1666,690,687,2374,683,2372,701,698,705,1691,1689,2619,2617,2610,2608,2605,2613,2593,2588,2585,1803,2599,2596,2563,2561,2555,1797,2551,1795,2573,2570,2567,2577,2525,2524,2522,2520,1786,2517,1785,2514,1783,2535,2533,2531,2528,1788,2541,2539,906,903,911,2721,1844,2715,2712,1838,1836,2699,2696,2693,2703,1827,1826,1824,2673,2671,2669,2666,1829,2679,2677,1858,1857,2772,1854,1853,1851,1856,2766,2764,143,1987,139,1986,135,133,131,1984,128,1983,125,1981,138,137,136,1985,1133,1132,1130,112,110,1974,107,1973,104,1971,1969,122,121,119,117,1977,114,1976,124,1115,1114,1112,1110,1117,1116,84,83,1953,81,1952,78,1950,1948,1945,94,93,91,1959,88,1958,85,1955,99,97,95,1961,1086,1085,1083,1081,1078,100,1090,1089,1087,1091,49,47,1917,44,1915,1913,1910,1907,59,1926,56,1925,53,1922,1919,66,64,1931,61,1929,1042,1040,1038,71,1035,70,1032,68,1048,1047,1045,1043,1050,1049,12,10,1869,1867,1864,1861,21,1880,19,1877,1874,1871,28,1888,25,1886,22,1883,982,980,977,974,32,30,991,989,987,984,34,995,994,992,2151,2150,2147,2146,2144,356,355,354,2149,2139,2138,2136,2134,1359,343,341,338,2143,335,2141,348,347,346,1376,1374,2124,2123,2121,2119,1326,2116,1324,310,308,305,2131,302,2129,298,2127,320,318,316,313,2133,322,321,1355,1353,1351,1357,2092,2091,2089,2087,1276,2084,1274,2081,1271,259,2102,256,2100,252,2098,2095,272,269,2108,266,2106,281,279,277,1317,1315,1313,1310,282,1321,1319,2039,2037,2035,2032,1203,2029,1200,1197,207,2053,205,2051,201,2049,2046,2043,220,218,2064,215,2062,211,2059,228,226,223,2069,1259,1257,1254,232,1251,230,1267,1265,1263,2316,2315,2312,2311,2309,2314,2304,2303,2301,2299,1593,2308,2306,590,2288,2287,2285,2283,1578,2280,1577,2295,2293,2291,579,577,574,571,2298,582,581,1592,2263,2262,2260,2258,1545,2255,1544,2252,1541,2273,2271,2269,2266,1550,535,532,2279,528,2277,546,543,549,1575,1573,2224,2222,2220,1486,2217,1485,2214,1482,1479,2238,2236,2234,2231,1496,2228,1492,480,477,2248,473,2246,469,2243,490,487,2251,497,1537,1535,1532,2477,2476,2474,2479,2469,2468,2466,2464,1730,2473,2471,2453,2452,2450,2448,1729,2445,1728,2460,2458,2456,2463,805,804,2428,2427,2425,2423,1725,2420,1724,2417,1722,2438,2436,2434,2431,1727,2444,2442,793,791,788,795,2388,2386,2384,1697,2381,1696,2378,1694,1692,2402,2400,2398,2395,1703,2392,1701,2412,2410,2407,751,748,744,2416,759,757,1807,2620,2618,1806,1805,2611,2609,2607,2614,1802,1801,1799,2594,2592,2590,2587,1804,2600,2598,1794,1793,1791,1789,2564,2562,2560,2557,1798,2554,1796,2574,2572,2569,2578,1847,1846,2722,1843,1842,1840,1845,2716,2714,1835,1834,1832,1830,1839,1837,2700,2698,2695,2704,1817,1811,1810,897,862,1777,829,826,838,1760,1758,808,2481,1741,1740,1738,1743,2624,1818,2726,2776,782,740,737,1715,686,679,695,1682,1680,639,628,2339,647,644,1645,1643,1640,1648,602,600,597,595,2320,593,2318,609,607,604,1611,1610,1608,1606,613,1615,1613,2328,926,924,892,886,899,857,850,2505,1778,824,823,821,819,2488,818,2486,833,831,828,840,1761,1759,2649,2632,2630,2746,2734,2732,2782,2781,570,567,1587,531,527,523,540,1566,1564,476,467,463,2240,486,483,1524,1521,1518,1529,411,403,2192,399,2189,423,416,1462,1457,1454,428,1468,1465,2210,366,363,2158,360,2156,357,2153,376,373,370,2163,1410,1409,1407,1405,382,1402,380,1417,1415,1412,1421,2175,2174,777,774,771,784,732,725,722,2404,743,1716,676,674,668,2363,665,2360,685,1684,1681,626,624,622,2335,620,2333,617,2330,641,635,649,1646,1644,1642,2566,928,925,2530,2527,894,891,888,2501,2499,2496,858,856,854,851,1779,2692,2668,2665,2645,2643,2640,2651,2768,2759,2757,2744,2743,2741,2748,352,1382,340,337,333,1371,1369,307,300,296,2126,315,312,1347,1342,1350,261,258,250,2097,246,2094,271,268,264,1306,1301,1298,276,1312,1309,2115,203,2048,195,2045,191,2041,213,209,2056,1246,1244,1238,225,1234,222,1256,1253,1249,1262,2080,2079,154,1997,150,1995,147,1992,1989,163,160,2004,156,2001,1175,1174,1172,1170,1167,170,1164,167,1185,1183,1180,1177,174,1190,1188,2025,2024,2022,587,586,564,559,556,2290,573,1588,520,518,512,2268,508,2265,530,1568,1565,461,457,2233,450,2230,446,2226,479,471,489,1526,1523,1520,397,395,2185,392,2183,389,2180,2177,410,2194,402,422,1463,1461,1459,1456,1470,2455,799,2433,2430,779,776,773,2397,2394,2390,734,728,724,746,1717,2356,2354,2351,2348,1658,677,675,673,670,667,688,1685,1683,2606,2589,2586,2559,2556,2552,927,2523,2521,2518,2515,1784,2532,895,893,890,2718,2709,2707,2689,2687,2684,2663,2662,2660,2658,1825,2667,2769,1852,2760,2758,142,141,1139,1138,134,132,129,126,1982,1129,1128,1126,1131,113,111,108,105,1972,101,1970,120,118,115,1109,1108,1106,1104,123,1113,1111,82,79,1951,75,1949,72,1946,92,89,86,1956,1077,1076,1074,1072,98,1069,96,1084,1082,1079,1088,1968,1967,48,45,1916,42,1914,39,1911,1908,60,57,54,1923,50,1920,1031,1030,1028,1026,67,1023,65,1020,62,1041,1039,1036,1033,69,1046,1044,1944,1943,1941,11,9,1868,7,1865,1862,1859,20,1878,16,1875,13,1872,970,968,966,963,29,960,26,23,983,981,978,975,33,971,31,990,988,985,1906,1904,1902,993,351,2145,1383,331,330,328,326,2137,323,2135,339,1372,1370,294,293,291,289,2122,286,2120,283,2117,309,303,317,1348,1346,1344,245,244,242,2090,239,2088,236,2085,2082,260,2099,249,270,1307,1305,1303,1300,1314,189,2038,186,2036,183,2033,2030,2026,206,198,2047,194,216,1247,1245,1243,1240,227,1237,1255,2310,2302,2300,2286,2284,2281,565,563,561,558,575,1589,2261,2259,2256,2253,1542,521,519,517,514,2270,511,533,1569,1567,2223,2221,2218,2215,1483,2211,1480,459,456,453,2232,449,474,491,1527,1525,1522,2475,2467,2465,2451,2449,2446,801,800,2426,2424,2421,2418,1723,2435,780,778,775,2387,2385,2382,2379,1695,2375,1693,2396,735,733,730,727,749,1718,2616,2615,2604,2603,2601,2584,2583,2581,2579,1800,2591,2550,2549,2547,2545,1792,2542,1790,2558,929,2719,1841,2710,2708,1833,1831,2690,2688,2686,1815,1809,1808,1774,1756,1754,1737,1736,1734,1739,1816,1711,1676,1674,633,629,1638,1636,1633,1641,598,1605,1604,1602,1600,605,1609,1607,2327,887,853,1775,822,820,1757,1755,1584,524,1560,1558,468,464,1514,1511,1508,1519,408,404,400,1452,1447,1444,417,1458,1455,2208,364,361,358,2154,1401,1400,1398,1396,374,1393,371,1408,1406,1403,1413,2173,2172,772,726,723,1712,672,669,666,682,1678,1675,625,623,621,618,2331,636,632,1639,1637,1635,920,918,884,880,889,849,848,847,846,2497,855,852,1776,2641,2742,2787,1380,334,1367,1365,301,297,1340,1338,1335,1343,255,251,247,1296,1291,1288,265,1302,1299,2113,204,196,192,2042,1232,1230,1224,214,1220,210,1242,1239,1235,1250,2077,2075,151,148,1993,144,1990,1163,1162,1160,1158,1155,161,1152,157,1173,1171,1168,1165,168,1181,1178,2021,2020,2018,2023,585,560,557,1585,516,509,1562,1559,458,447,2227,472,1516,1513,1510,398,396,393,390,2181,386,2178,407,1453,1451,1449,1446,420,1460,2209,769,764,720,712,2391,729,1713,664,663,661,659,2352,656,2349,671,1679,1677,2553,922,919,2519,2516,885,883,881,2685,2661,2659,2767,2756,2755,140,1137,1136,130,127,1125,1124,1122,1127,109,106,102,1103,1102,1100,1098,116,1107,1105,1980,80,76,73,1947,1068,1067,1065,1063,90,1060,87,1075,1073,1070,1080,1966,1965,46,43,40,1912,36,1909,1019,1018,1016,1014,58,1011,55,1008,51,1029,1027,1024,1021,63,1037,1034,1940,1939,1937,1942,8,1866,4,1863,1,1860,956,954,952,949,946,17,14,969,967,964,961,27,957,24,979,976,972,1901,1900,1898,1896,986,1905,1903,350,349,1381,329,327,324,1368,1366,292,290,287,284,2118,304,1341,1339,1337,1345,243,240,237,2086,233,2083,254,1297,1295,1293,1290,1304,2114,190,187,184,2034,180,2031,177,2027,199,1233,1231,1229,1226,217,1223,1241,2078,2076,584,555,554,552,550,2282,562,1586,507,506,504,502,2257,499,2254,515,1563,1561,445,443,441,2219,438,2216,435,2212,460,454,475,1517,1515,1512,2447,798,797,2422,2419,770,768,766,2383,2380,2376,721,719,717,714,731,1714,2602,2582,2580,2548,2546,2543,923,921,2717,2706,2705,2683,2682,2680,1771,1752,1750,1733,1732,1731,1735,1814,1707,1670,1668,1631,1629,1626,1634,1599,1598,1596,1594,1603,1601,2326,1772,1753,1751,1581,1554,1552,1504,1501,1498,1509,1442,1437,1434,401,1448,1445,2206,1392,1391,1389,1387,1384,359,1399,1397,1394,1404,2171,2170,1708,1672,1669,619,1632,1630,1628,1773,1378,1363,1361,1333,1328,1336,1286,1281,1278,248,1292,1289,2111,1218,1216,1210,197,1206,193,1228,1225,1221,1236,2073,2071,1151,1150,1148,1146,152,1143,149,1140,145,1161,1159,1156,1153,158,1169,1166,2017,2016,2014,2019,1582,510,1556,1553,452,448,1506,1500,394,391,387,1443,1441,1439,1436,1450,2207,765,716,713,1709,662,660,657,1673,1671,916,914,879,878,877,882,1135,1134,1121,1120,1118,1123,1097,1096,1094,1092,103,1101,1099,1979,1059,1058,1056,1054,77,1051,74,1066,1064,1061,1071,1964,1963,1007,1006,1004,1002,999,41,996,37,1017,1015,1012,1009,52,1025,1022,1936,1935,1933,1938,942,940,938,935,932,5,2,955,953,950,947,18,943,15,965,962,958,1895,1894,1892,1890,973,1899,1897,1379,325,1364,1362,288,285,1334,1332,1330,241,238,234,1287,1285,1283,1280,1294,2112,188,185,181,178,2028,1219,1217,1215,1212,200,1209,1227,2074,2072,583,553,551,1583,505,503,500,513,1557,1555,444,442,439,436,2213,455,451,1507,1505,1502,796,763,762,760,767,711,710,708,706,2377,718,715,1710,2544,917,915,2681,1627,1597,1595,2325,1769,1749,1747,1499,1438,1435,2204,1390,1388,1385,1395,2169,2167,1704,1665,1662,1625,1623,1620,1770,1329,1282,1279,2109,1214,1207,1222,2068,2065,1149,1147,1144,1141,146,1157,1154,2013,2011,2008,2015,1579,1549,1546,1495,1487,1433,1431,1428,1425,388,1440,2205,1705,658,1667,1664,1119,1095,1093,1978,1057,1055,1052,1062,1962,1960,1005,1003,1e3,997,38,1013,1010,1932,1930,1927,1934,941,939,936,933,6,930,3,951,948,944,1889,1887,1884,1881,959,1893,1891,35,1377,1360,1358,1327,1325,1322,1331,1277,1275,1272,1269,235,1284,2110,1205,1204,1201,1198,182,1195,179,1213,2070,2067,1580,501,1551,1548,440,437,1497,1494,1490,1503,761,709,707,1706,913,912,2198,1386,2164,2161,1621,1766,2103,1208,2058,2054,1145,1142,2005,2002,1999,2009,1488,1429,1426,2200,1698,1659,1656,1975,1053,1957,1954,1001,998,1924,1921,1918,1928,937,934,931,1879,1876,1873,1870,945,1885,1882,1323,1273,1270,2105,1202,1199,1196,1211,2061,2057,1576,1543,1540,1484,1481,1478,1491,1700]),t})(),$c=(function(){function t(e,r){this.bits=e,this.points=r}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t})(),Hc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Gc=(function(){function t(){}return t.detectMultiple=function(e,r,n){var i=e.getBlackMatrix(),a=t.detect(n,i);return a.length||(i=i.clone(),i.rotate180(),a=t.detect(n,i)),new $c(i,a)},t.detect=function(e,r){for(var n,i,a=new Array,o=0,s=0,l=!1;o<r.getHeight();){var c=t.findVertices(r,o,s);if(c[0]==null&&c[3]==null){if(!l)break;l=!1,s=0;try{for(var f=(n=void 0,Hc(a)),d=f.next();!d.done;d=f.next()){var p=d.value;p[1]!=null&&(o=Math.trunc(Math.max(o,p[1].getY()))),p[3]!=null&&(o=Math.max(o,Math.trunc(p[3].getY())))}}catch(h){n={error:h}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}o+=t.ROW_STEP;continue}if(l=!0,a.push(c),!e)break;c[2]!=null?(s=Math.trunc(c[2].getX()),o=Math.trunc(c[2].getY())):(s=Math.trunc(c[4].getX()),o=Math.trunc(c[4].getY()))}return a},t.findVertices=function(e,r,n){var i=e.getHeight(),a=e.getWidth(),o=new Array(8);return t.copyToResult(o,t.findRowsWithPattern(e,i,a,r,n,t.START_PATTERN),t.INDEXES_START_PATTERN),o[4]!=null&&(n=Math.trunc(o[4].getX()),r=Math.trunc(o[4].getY())),t.copyToResult(o,t.findRowsWithPattern(e,i,a,r,n,t.STOP_PATTERN),t.INDEXES_STOP_PATTERN),o},t.copyToResult=function(e,r,n){for(var i=0;i<n.length;i++)e[n[i]]=r[i]},t.findRowsWithPattern=function(e,r,n,i,a,o){for(var s=new Array(4),l=!1,c=new Int32Array(o.length);i<r;i+=t.ROW_STEP){var f=t.findGuardPattern(e,a,i,n,!1,o,c);if(f!=null){for(;i>0;){var d=t.findGuardPattern(e,a,--i,n,!1,o,c);if(d!=null)f=d;else{i++;break}}s[0]=new k(f[0],i),s[1]=new k(f[1],i),l=!0;break}}var p=i+1;if(l){for(var h=0,d=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);p<r;p++){var f=t.findGuardPattern(e,d[0],p,n,!1,o,c);if(f!=null&&Math.abs(d[0]-f[0])<t.MAX_PATTERN_DRIFT&&Math.abs(d[1]-f[1])<t.MAX_PATTERN_DRIFT)d=f,h=0;else{if(h>t.SKIPPED_ROW_COUNT_MAX)break;h++}}p-=h+1,s[2]=new k(d[0],p),s[3]=new k(d[1],p)}return p-i<t.BARCODE_MIN_HEIGHT&&De.fill(s,null),s},t.findGuardPattern=function(e,r,n,i,a,o,s){De.fillWithin(s,0,s.length,0);for(var l=r,c=0;e.get(l,n)&&l>0&&c++<t.MAX_PIXEL_DRIFT;)l--;for(var f=l,d=0,p=o.length,h=a;f<i;f++){var v=e.get(f,n);if(v!==h)s[d]++;else{if(d===p-1){if(t.patternMatchVariance(s,o,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return new Int32Array([l,f]);l+=s[0]+s[1],ne.arraycopy(s,2,s,0,d-1),s[d-1]=0,s[d]=0,d--}else d++;s[d]=1,h=!h}}return d===p-1&&t.patternMatchVariance(s,o,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE?new Int32Array([l,f-1]):null},t.patternMatchVariance=function(e,r,n){for(var i=e.length,a=0,o=0,s=0;s<i;s++)a+=e[s],o+=r[s];if(a<o)return 1/0;var l=a/o;n*=l;for(var c=0,f=0;f<i;f++){var d=e[f],p=r[f]*l,h=d>p?d-p:p-d;if(h>n)return 1/0;c+=h}return c/a},t.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),t.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),t.MAX_AVG_VARIANCE=.42,t.MAX_INDIVIDUAL_VARIANCE=.8,t.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),t.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),t.MAX_PIXEL_DRIFT=3,t.MAX_PATTERN_DRIFT=5,t.SKIPPED_ROW_COUNT_MAX=25,t.ROW_STEP=5,t.BARCODE_MIN_HEIGHT=10,t})(),zc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mt=(function(){function t(e,r){if(r.length===0)throw new F;this.field=e;var n=r.length;if(n>1&&r[0]===0){for(var i=1;i<n&&r[i]===0;)i++;i===n?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(n-i),ne.arraycopy(r,i,this.coefficients,0,this.coefficients.length))}else this.coefficients=r}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return this.coefficients[0]===0},t.prototype.getCoefficient=function(e){return this.coefficients[this.coefficients.length-1-e]},t.prototype.evaluateAt=function(e){var r,n;if(e===0)return this.getCoefficient(0);if(e===1){var i=0;try{for(var a=zc(this.coefficients),o=a.next();!o.done;o=a.next()){var s=o.value;i=this.field.add(i,s)}}catch(d){r={error:d}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i}for(var l=this.coefficients[0],c=this.coefficients.length,f=1;f<c;f++)l=this.field.add(this.field.multiply(e,l),this.coefficients[f]);return l},t.prototype.add=function(e){if(!this.field.equals(e.field))throw new F("ModulusPolys do not have same ModulusGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var i=r;r=n,n=i}var a=new Int32Array(n.length),o=n.length-r.length;ne.arraycopy(n,0,a,0,o);for(var s=o;s<n.length;s++)a[s]=this.field.add(r[s-o],n[s]);return new t(this.field,a)},t.prototype.subtract=function(e){if(!this.field.equals(e.field))throw new F("ModulusPolys do not have same ModulusGF field");return e.isZero()?this:this.add(e.negative())},t.prototype.multiply=function(e){return e instanceof t?this.multiplyOther(e):this.multiplyScalar(e)},t.prototype.multiplyOther=function(e){if(!this.field.equals(e.field))throw new F("ModulusPolys do not have same ModulusGF field");if(this.isZero()||e.isZero())return new t(this.field,new Int32Array([0]));for(var r=this.coefficients,n=r.length,i=e.coefficients,a=i.length,o=new Int32Array(n+a-1),s=0;s<n;s++)for(var l=r[s],c=0;c<a;c++)o[s+c]=this.field.add(o[s+c],this.field.multiply(l,i[c]));return new t(this.field,o)},t.prototype.negative=function(){for(var e=this.coefficients.length,r=new Int32Array(e),n=0;n<e;n++)r[n]=this.field.subtract(0,this.coefficients[n]);return new t(this.field,r)},t.prototype.multiplyScalar=function(e){if(e===0)return new t(this.field,new Int32Array([0]));if(e===1)return this;for(var r=this.coefficients.length,n=new Int32Array(r),i=0;i<r;i++)n[i]=this.field.multiply(this.coefficients[i],e);return new t(this.field,n)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new F;if(r===0)return new t(this.field,new Int32Array([0]));for(var n=this.coefficients.length,i=new Int32Array(n+e),a=0;a<n;a++)i[a]=this.field.multiply(this.coefficients[a],r);return new t(this.field,i)},t.prototype.toString=function(){for(var e=new J,r=this.getDegree();r>=0;r--){var n=this.getCoefficient(r);n!==0&&(n<0?(e.append(" - "),n=-n):e.length()>0&&e.append(" + "),(r===0||n!==1)&&e.append(n),r!==0&&(r===1?e.append("x"):(e.append("x^"),e.append(r))))}return e.toString()},t})(),Wc=(function(){function t(){}return t.prototype.add=function(e,r){return(e+r)%this.modulus},t.prototype.subtract=function(e,r){return(this.modulus+e-r)%this.modulus},t.prototype.exp=function(e){return this.expTable[e]},t.prototype.log=function(e){if(e===0)throw new F;return this.logTable[e]},t.prototype.inverse=function(e){if(e===0)throw new fa;return this.expTable[this.modulus-this.logTable[e]-1]},t.prototype.multiply=function(e,r){return e===0||r===0?0:this.expTable[(this.logTable[e]+this.logTable[r])%(this.modulus-1)]},t.prototype.getSize=function(){return this.modulus},t.prototype.equals=function(e){return e===this},t})(),Xc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Kc=(function(t){Xc(e,t);function e(r,n){var i=t.call(this)||this;i.modulus=r,i.expTable=new Int32Array(r),i.logTable=new Int32Array(r);for(var a=1,o=0;o<r;o++)i.expTable[o]=a,a=a*n%r;for(var o=0;o<r-1;o++)i.logTable[i.expTable[o]]=o;return i.zero=new mt(i,new Int32Array([0])),i.one=new mt(i,new Int32Array([1])),i}return e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(r,n){if(r<0)throw new F;if(n===0)return this.zero;var i=new Int32Array(r+1);return i[0]=n,new mt(this,i)},e.PDF417_GF=new e(W.NUMBER_OF_CODEWORDS,3),e})(Wc),jc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Yc=(function(){function t(){this.field=Kc.PDF417_GF}return t.prototype.decode=function(e,r,n){for(var i,a,o=new mt(this.field,e),s=new Int32Array(r),l=!1,c=r;c>0;c--){var f=o.evaluateAt(this.field.exp(c));s[r-c]=f,f!==0&&(l=!0)}if(!l)return 0;var d=this.field.getOne();if(n!=null)try{for(var p=jc(n),h=p.next();!h.done;h=p.next()){var v=h.value,g=this.field.exp(e.length-1-v),y=new mt(this.field,new Int32Array([this.field.subtract(0,g),1]));d=d.multiply(y)}}catch(P){i={error:P}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}for(var _=new mt(this.field,s),m=this.runEuclideanAlgorithm(this.field.buildMonomial(r,1),_,r),E=m[0],w=m[1],C=this.findErrorLocations(E),b=this.findErrorMagnitudes(w,E,C),c=0;c<C.length;c++){var O=e.length-1-this.field.log(C[c]);if(O<0)throw me.getChecksumInstance();e[O]=this.field.subtract(e[O],b[c])}return C.length},t.prototype.runEuclideanAlgorithm=function(e,r,n){if(e.getDegree()<r.getDegree()){var i=e;e=r,r=i}for(var a=e,o=r,s=this.field.getZero(),l=this.field.getOne();o.getDegree()>=Math.round(n/2);){var c=a,f=s;if(a=o,s=l,a.isZero())throw me.getChecksumInstance();o=c;for(var d=this.field.getZero(),p=a.getCoefficient(a.getDegree()),h=this.field.inverse(p);o.getDegree()>=a.getDegree()&&!o.isZero();){var v=o.getDegree()-a.getDegree(),g=this.field.multiply(o.getCoefficient(o.getDegree()),h);d=d.add(this.field.buildMonomial(v,g)),o=o.subtract(a.multiplyByMonomial(v,g))}l=d.multiply(s).subtract(f).negative()}var y=l.getCoefficient(0);if(y===0)throw me.getChecksumInstance();var _=this.field.inverse(y),m=l.multiply(_),E=o.multiply(_);return[m,E]},t.prototype.findErrorLocations=function(e){for(var r=e.getDegree(),n=new Int32Array(r),i=0,a=1;a<this.field.getSize()&&i<r;a++)e.evaluateAt(a)===0&&(n[i]=this.field.inverse(a),i++);if(i!==r)throw me.getChecksumInstance();return n},t.prototype.findErrorMagnitudes=function(e,r,n){for(var i=r.getDegree(),a=new Int32Array(i),o=1;o<=i;o++)a[i-o]=this.field.multiply(o,r.getCoefficient(o));for(var s=new mt(this.field,a),l=n.length,c=new Int32Array(l),o=0;o<l;o++){var f=this.field.inverse(n[o]),d=this.field.subtract(0,e.evaluateAt(f)),p=this.field.inverse(s.evaluateAt(f));c[o]=this.field.multiply(d,p)}return c},t})(),kn=(function(){function t(e,r,n,i,a){e instanceof t?this.constructor_2(e):this.constructor_1(e,r,n,i,a)}return t.prototype.constructor_1=function(e,r,n,i,a){var o=r==null||n==null,s=i==null||a==null;if(o&&s)throw new I;o?(r=new k(0,i.getY()),n=new k(0,a.getY())):s&&(i=new k(e.getWidth()-1,r.getY()),a=new k(e.getWidth()-1,n.getY())),this.image=e,this.topLeft=r,this.bottomLeft=n,this.topRight=i,this.bottomRight=a,this.minX=Math.trunc(Math.min(r.getX(),n.getX())),this.maxX=Math.trunc(Math.max(i.getX(),a.getX())),this.minY=Math.trunc(Math.min(r.getY(),i.getY())),this.maxY=Math.trunc(Math.max(n.getY(),a.getY()))},t.prototype.constructor_2=function(e){this.image=e.image,this.topLeft=e.getTopLeft(),this.bottomLeft=e.getBottomLeft(),this.topRight=e.getTopRight(),this.bottomRight=e.getBottomRight(),this.minX=e.getMinX(),this.maxX=e.getMaxX(),this.minY=e.getMinY(),this.maxY=e.getMaxY()},t.merge=function(e,r){return e==null?r:r==null?e:new t(e.image,e.topLeft,e.bottomLeft,r.topRight,r.bottomRight)},t.prototype.addMissingRows=function(e,r,n){var i=this.topLeft,a=this.bottomLeft,o=this.topRight,s=this.bottomRight;if(e>0){var l=n?this.topLeft:this.topRight,c=Math.trunc(l.getY()-e);c<0&&(c=0);var f=new k(l.getX(),c);n?i=f:o=f}if(r>0){var d=n?this.bottomLeft:this.bottomRight,p=Math.trunc(d.getY()+r);p>=this.image.getHeight()&&(p=this.image.getHeight()-1);var h=new k(d.getX(),p);n?a=h:s=h}return new t(this.image,i,a,o,s)},t.prototype.getMinX=function(){return this.minX},t.prototype.getMaxX=function(){return this.maxX},t.prototype.getMinY=function(){return this.minY},t.prototype.getMaxY=function(){return this.maxY},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getBottomRight=function(){return this.bottomRight},t})(),qc=(function(){function t(e,r,n,i){this.columnCount=e,this.errorCorrectionLevel=i,this.rowCountUpperPart=r,this.rowCountLowerPart=n,this.rowCount=r+n}return t.prototype.getColumnCount=function(){return this.columnCount},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getRowCount=function(){return this.rowCount},t.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},t.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},t})(),qn=(function(){function t(){this.buffer=""}return t.form=function(e,r){var n=-1;function i(o,s,l,c,f,d){if(o==="%%")return"%";if(r[++n]!==void 0){o=c?parseInt(c.substr(1)):void 0;var p=f?parseInt(f.substr(1)):void 0,h;switch(d){case"s":h=r[n];break;case"c":h=r[n][0];break;case"f":h=parseFloat(r[n]).toFixed(o);break;case"p":h=parseFloat(r[n]).toPrecision(o);break;case"e":h=parseFloat(r[n]).toExponential(o);break;case"x":h=parseInt(r[n]).toString(p||16);break;case"d":h=parseFloat(parseInt(r[n],p||10).toPrecision(o)).toFixed(0);break}h=typeof h=="object"?JSON.stringify(h):(+h).toString(p);for(var v=parseInt(l),g=l&&l[0]+""=="0"?"0":" ";h.length<v;)h=s!==void 0?h+g:g+h;return h}}var a=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return e.replace(a,i)},t.prototype.format=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.buffer+=t.form(e,r)},t.prototype.toString=function(){return this.buffer},t})(),Zc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ma=(function(){function t(e){this.boundingBox=new kn(e),this.codewords=new Array(e.getMaxY()-e.getMinY()+1)}return t.prototype.getCodewordNearby=function(e){var r=this.getCodeword(e);if(r!=null)return r;for(var n=1;n<t.MAX_NEARBY_DISTANCE;n++){var i=this.imageRowToCodewordIndex(e)-n;if(i>=0&&(r=this.codewords[i],r!=null)||(i=this.imageRowToCodewordIndex(e)+n,i<this.codewords.length&&(r=this.codewords[i],r!=null)))return r}return null},t.prototype.imageRowToCodewordIndex=function(e){return e-this.boundingBox.getMinY()},t.prototype.setCodeword=function(e,r){this.codewords[this.imageRowToCodewordIndex(e)]=r},t.prototype.getCodeword=function(e){return this.codewords[this.imageRowToCodewordIndex(e)]},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.getCodewords=function(){return this.codewords},t.prototype.toString=function(){var e,r,n=new qn,i=0;try{for(var a=Zc(this.codewords),o=a.next();!o.done;o=a.next()){var s=o.value;if(s==null){n.format("%3d: | %n",i++);continue}n.format("%3d: %3d|%3d%n",i++,s.getRowNumber(),s.getValue())}}catch(l){e={error:l}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return n.toString()},t.MAX_NEARBY_DISTANCE=5,t})(),Qc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Jc=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a},nr=(function(){function t(){this.values=new Map}return t.prototype.setValue=function(e){e=Math.trunc(e);var r=this.values.get(e);r==null&&(r=0),r++,this.values.set(e,r)},t.prototype.getValue=function(){var e,r,n=-1,i=new Array,a=function(d,p){var h={getKey:function(){return d},getValue:function(){return p}};h.getValue()>n?(n=h.getValue(),i=[],i.push(h.getKey())):h.getValue()===n&&i.push(h.getKey())};try{for(var o=Qc(this.values.entries()),s=o.next();!s.done;s=o.next()){var l=Jc(s.value,2),c=l[0],f=l[1];a(c,f)}}catch(d){e={error:d}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return W.toIntArray(i)},t.prototype.getConfidence=function(e){return this.values.get(e)},t})(),ef=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),pn=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Li=(function(t){ef(e,t);function e(r,n){var i=t.call(this,r)||this;return i._isLeft=n,i}return e.prototype.setRowNumbers=function(){var r,n;try{for(var i=pn(this.getCodewords()),a=i.next();!a.done;a=i.next()){var o=a.value;o?.setRowNumberAsRowIndicatorColumn()}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e.prototype.adjustCompleteIndicatorColumnRowNumbers=function(r){var n=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(n,r);for(var i=this.getBoundingBox(),a=this._isLeft?i.getTopLeft():i.getTopRight(),o=this._isLeft?i.getBottomLeft():i.getBottomRight(),s=this.imageRowToCodewordIndex(Math.trunc(a.getY())),l=this.imageRowToCodewordIndex(Math.trunc(o.getY())),c=-1,f=1,d=0,p=s;p<l;p++)if(n[p]!=null){var h=n[p],v=h.getRowNumber()-c;if(v===0)d++;else if(v===1)f=Math.max(f,d),d=1,c=h.getRowNumber();else if(v<0||h.getRowNumber()>=r.getRowCount()||v>p)n[p]=null;else{var g=void 0;f>2?g=(f-2)*v:g=v;for(var y=g>=p,_=1;_<=g&&!y;_++)y=n[p-_]!=null;y?n[p]=null:(c=h.getRowNumber(),d=1)}}},e.prototype.getRowHeights=function(){var r,n,i=this.getBarcodeMetadata();if(i==null)return null;this.adjustIncompleteIndicatorColumnRowNumbers(i);var a=new Int32Array(i.getRowCount());try{for(var o=pn(this.getCodewords()),s=o.next();!s.done;s=o.next()){var l=s.value;if(l!=null){var c=l.getRowNumber();if(c>=a.length)continue;a[c]++}}}catch(f){r={error:f}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},e.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(r){for(var n=this.getBoundingBox(),i=this._isLeft?n.getTopLeft():n.getTopRight(),a=this._isLeft?n.getBottomLeft():n.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(i.getY())),s=this.imageRowToCodewordIndex(Math.trunc(a.getY())),l=this.getCodewords(),c=-1,f=o;f<s;f++)if(l[f]!=null){var d=l[f];d.setRowNumberAsRowIndicatorColumn();var p=d.getRowNumber()-c;p===0||(p===1?c=d.getRowNumber():d.getRowNumber()>=r.getRowCount()?l[f]=null:c=d.getRowNumber())}},e.prototype.getBarcodeMetadata=function(){var r,n,i=this.getCodewords(),a=new nr,o=new nr,s=new nr,l=new nr;try{for(var c=pn(i),f=c.next();!f.done;f=c.next()){var d=f.value;if(d!=null){d.setRowNumberAsRowIndicatorColumn();var p=d.getValue()%30,h=d.getRowNumber();switch(this._isLeft||(h+=2),h%3){case 0:o.setValue(p*3+1);break;case 1:l.setValue(p/3),s.setValue(p%3);break;case 2:a.setValue(p+1);break}}}}catch(g){r={error:g}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}if(a.getValue().length===0||o.getValue().length===0||s.getValue().length===0||l.getValue().length===0||a.getValue()[0]<1||o.getValue()[0]+s.getValue()[0]<W.MIN_ROWS_IN_BARCODE||o.getValue()[0]+s.getValue()[0]>W.MAX_ROWS_IN_BARCODE)return null;var v=new qc(a.getValue()[0],o.getValue()[0],s.getValue()[0],l.getValue()[0]);return this.removeIncorrectCodewords(i,v),v},e.prototype.removeIncorrectCodewords=function(r,n){for(var i=0;i<r.length;i++){var a=r[i];if(r[i]!=null){var o=a.getValue()%30,s=a.getRowNumber();if(s>n.getRowCount()){r[i]=null;continue}switch(this._isLeft||(s+=2),s%3){case 0:o*3+1!==n.getRowCountUpperPart()&&(r[i]=null);break;case 1:(Math.trunc(o/3)!==n.getErrorCorrectionLevel()||o%3!==n.getRowCountLowerPart())&&(r[i]=null);break;case 2:o+1!==n.getColumnCount()&&(r[i]=null);break}}}},e.prototype.isLeft=function(){return this._isLeft},e.prototype.toString=function(){return"IsLeft: "+this._isLeft+`
18
- `+t.prototype.toString.call(this)},e})(ma),tf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},rf=(function(){function t(e,r){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=e,this.barcodeColumnCount=e.getColumnCount(),this.boundingBox=r,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}return t.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);var e=W.MAX_CODEWORDS_IN_BARCODE,r;do r=e,e=this.adjustRowNumbersAndGetCount();while(e>0&&e<r);return this.detectionResultColumns},t.prototype.adjustIndicatorColumnRowNumbers=function(e){e?.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)},t.prototype.adjustRowNumbersAndGetCount=function(){var e=this.adjustRowNumbersByRow();if(e===0)return 0;for(var r=1;r<this.barcodeColumnCount+1;r++)for(var n=this.detectionResultColumns[r].getCodewords(),i=0;i<n.length;i++)n[i]!=null&&(n[i].hasValidRowNumber()||this.adjustRowNumbers(r,i,n));return e},t.prototype.adjustRowNumbersByRow=function(){this.adjustRowNumbersFromBothRI();var e=this.adjustRowNumbersFromLRI();return e+this.adjustRowNumbersFromRRI()},t.prototype.adjustRowNumbersFromBothRI=function(){if(!(this.detectionResultColumns[0]==null||this.detectionResultColumns[this.barcodeColumnCount+1]==null)){for(var e=this.detectionResultColumns[0].getCodewords(),r=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<e.length;n++)if(e[n]!=null&&r[n]!=null&&e[n].getRowNumber()===r[n].getRowNumber())for(var i=1;i<=this.barcodeColumnCount;i++){var a=this.detectionResultColumns[i].getCodewords()[n];a!=null&&(a.setRowNumber(e[n].getRowNumber()),a.hasValidRowNumber()||(this.detectionResultColumns[i].getCodewords()[n]=null))}}},t.prototype.adjustRowNumbersFromRRI=function(){if(this.detectionResultColumns[this.barcodeColumnCount+1]==null)return 0;for(var e=0,r=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<r.length;n++)if(r[n]!=null)for(var i=r[n].getRowNumber(),a=0,o=this.barcodeColumnCount+1;o>0&&a<this.ADJUST_ROW_NUMBER_SKIP;o--){var s=this.detectionResultColumns[o].getCodewords()[n];s!=null&&(a=t.adjustRowNumberIfValid(i,a,s),s.hasValidRowNumber()||e++)}return e},t.prototype.adjustRowNumbersFromLRI=function(){if(this.detectionResultColumns[0]==null)return 0;for(var e=0,r=this.detectionResultColumns[0].getCodewords(),n=0;n<r.length;n++)if(r[n]!=null)for(var i=r[n].getRowNumber(),a=0,o=1;o<this.barcodeColumnCount+1&&a<this.ADJUST_ROW_NUMBER_SKIP;o++){var s=this.detectionResultColumns[o].getCodewords()[n];s!=null&&(a=t.adjustRowNumberIfValid(i,a,s),s.hasValidRowNumber()||e++)}return e},t.adjustRowNumberIfValid=function(e,r,n){return n==null||n.hasValidRowNumber()||(n.isValidRowNumber(e)?(n.setRowNumber(e),r=0):++r),r},t.prototype.adjustRowNumbers=function(e,r,n){var i,a;if(this.detectionResultColumns[e-1]!=null){var o=n[r],s=this.detectionResultColumns[e-1].getCodewords(),l=s;this.detectionResultColumns[e+1]!=null&&(l=this.detectionResultColumns[e+1].getCodewords());var c=new Array(14);c[2]=s[r],c[3]=l[r],r>0&&(c[0]=n[r-1],c[4]=s[r-1],c[5]=l[r-1]),r>1&&(c[8]=n[r-2],c[10]=s[r-2],c[11]=l[r-2]),r<n.length-1&&(c[1]=n[r+1],c[6]=s[r+1],c[7]=l[r+1]),r<n.length-2&&(c[9]=n[r+2],c[12]=s[r+2],c[13]=l[r+2]);try{for(var f=tf(c),d=f.next();!d.done;d=f.next()){var p=d.value;if(t.adjustRowNumber(o,p))return}}catch(h){i={error:h}}finally{try{d&&!d.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}}},t.adjustRowNumber=function(e,r){return r==null?!1:r.hasValidRowNumber()&&r.getBucket()===e.getBucket()?(e.setRowNumber(r.getRowNumber()),!0):!1},t.prototype.getBarcodeColumnCount=function(){return this.barcodeColumnCount},t.prototype.getBarcodeRowCount=function(){return this.barcodeMetadata.getRowCount()},t.prototype.getBarcodeECLevel=function(){return this.barcodeMetadata.getErrorCorrectionLevel()},t.prototype.setBoundingBox=function(e){this.boundingBox=e},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.setDetectionResultColumn=function(e,r){this.detectionResultColumns[e]=r},t.prototype.getDetectionResultColumn=function(e){return this.detectionResultColumns[e]},t.prototype.toString=function(){var e=this.detectionResultColumns[0];e==null&&(e=this.detectionResultColumns[this.barcodeColumnCount+1]);for(var r=new qn,n=0;n<e.getCodewords().length;n++){r.format("CW %3d:",n);for(var i=0;i<this.barcodeColumnCount+2;i++){if(this.detectionResultColumns[i]==null){r.format(" | ");continue}var a=this.detectionResultColumns[i].getCodewords()[n];if(a==null){r.format(" | ");continue}r.format(" %3d|%3d",a.getRowNumber(),a.getValue())}r.format("%n")}return r.toString()},t})(),nf=(function(){function t(e,r,n,i){this.rowNumber=t.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(e),this.endX=Math.trunc(r),this.bucket=Math.trunc(n),this.value=Math.trunc(i)}return t.prototype.hasValidRowNumber=function(){return this.isValidRowNumber(this.rowNumber)},t.prototype.isValidRowNumber=function(e){return e!==t.BARCODE_ROW_UNKNOWN&&this.bucket===e%3*3},t.prototype.setRowNumberAsRowIndicatorColumn=function(){this.rowNumber=Math.trunc(Math.trunc(this.value/30)*3+Math.trunc(this.bucket/3))},t.prototype.getWidth=function(){return this.endX-this.startX},t.prototype.getStartX=function(){return this.startX},t.prototype.getEndX=function(){return this.endX},t.prototype.getBucket=function(){return this.bucket},t.prototype.getValue=function(){return this.value},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.setRowNumber=function(e){this.rowNumber=e},t.prototype.toString=function(){return this.rowNumber+"|"+this.value},t.BARCODE_ROW_UNKNOWN=-1,t})(),af=(function(){function t(){}return t.initialize=function(){for(var e=0;e<W.SYMBOL_TABLE.length;e++)for(var r=W.SYMBOL_TABLE[e],n=r&1,i=0;i<W.BARS_IN_MODULE;i++){for(var a=0;(r&1)===n;)a+=1,r>>=1;n=r&1,t.RATIOS_TABLE[e]||(t.RATIOS_TABLE[e]=new Array(W.BARS_IN_MODULE)),t.RATIOS_TABLE[e][W.BARS_IN_MODULE-i-1]=Math.fround(a/W.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},t.getDecodedValue=function(e){var r=t.getDecodedCodewordValue(t.sampleBitCounts(e));return r!==-1?r:t.getClosestDecodedValue(e)},t.sampleBitCounts=function(e){for(var r=X.sum(e),n=new Int32Array(W.BARS_IN_MODULE),i=0,a=0,o=0;o<W.MODULES_IN_CODEWORD;o++){var s=r/(2*W.MODULES_IN_CODEWORD)+o*r/W.MODULES_IN_CODEWORD;a+e[i]<=s&&(a+=e[i],i++),n[i]++}return n},t.getDecodedCodewordValue=function(e){var r=t.getBitValue(e);return W.getCodeword(r)===-1?-1:r},t.getBitValue=function(e){for(var r=0,n=0;n<e.length;n++)for(var i=0;i<e[n];i++)r=r<<1|(n%2===0?1:0);return Math.trunc(r)},t.getClosestDecodedValue=function(e){var r=X.sum(e),n=new Array(W.BARS_IN_MODULE);if(r>1)for(var i=0;i<n.length;i++)n[i]=Math.fround(e[i]/r);var a=Tn.MAX_VALUE,o=-1;this.bSymbolTableReady||t.initialize();for(var s=0;s<t.RATIOS_TABLE.length;s++){for(var l=0,c=t.RATIOS_TABLE[s],f=0;f<W.BARS_IN_MODULE;f++){var d=Math.fround(c[f]-n[f]);if(l+=Math.fround(d*d),l>=a)break}l<a&&(a=l,o=W.SYMBOL_TABLE[s])}return o},t.bSymbolTableReady=!1,t.RATIOS_TABLE=new Array(W.SYMBOL_TABLE.length).map(function(e){return new Array(W.BARS_IN_MODULE)}),t})(),of=(function(){function t(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}return t.prototype.getSegmentIndex=function(){return this.segmentIndex},t.prototype.setSegmentIndex=function(e){this.segmentIndex=e},t.prototype.getFileId=function(){return this.fileId},t.prototype.setFileId=function(e){this.fileId=e},t.prototype.getOptionalData=function(){return this.optionalData},t.prototype.setOptionalData=function(e){this.optionalData=e},t.prototype.isLastSegment=function(){return this.lastSegment},t.prototype.setLastSegment=function(e){this.lastSegment=e},t.prototype.getSegmentCount=function(){return this.segmentCount},t.prototype.setSegmentCount=function(e){this.segmentCount=e},t.prototype.getSender=function(){return this.sender||null},t.prototype.setSender=function(e){this.sender=e},t.prototype.getAddressee=function(){return this.addressee||null},t.prototype.setAddressee=function(e){this.addressee=e},t.prototype.getFileName=function(){return this.fileName},t.prototype.setFileName=function(e){this.fileName=e},t.prototype.getFileSize=function(){return this.fileSize},t.prototype.setFileSize=function(e){this.fileSize=e},t.prototype.getChecksum=function(){return this.checksum},t.prototype.setChecksum=function(e){this.checksum=e},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.setTimestamp=function(e){this.timestamp=e},t})(),Fi=(function(){function t(){}return t.parseLong=function(e,r){return r===void 0&&(r=void 0),parseInt(e,r)},t})(),sf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),lf=(function(t){sf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="NullPointerException",e})(be),uf=(function(){function t(){}return t.prototype.writeBytes=function(e){this.writeBytesOffset(e,0,e.length)},t.prototype.writeBytesOffset=function(e,r,n){if(e==null)throw new lf;if(r<0||r>e.length||n<0||r+n>e.length||r+n<0)throw new Wn;if(n===0)return;for(var i=0;i<n;i++)this.write(e[r+i])},t.prototype.flush=function(){},t.prototype.close=function(){},t})(),cf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),ff=(function(t){cf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(be),df=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),hf=(function(t){df(e,t);function e(r){r===void 0&&(r=32);var n=t.call(this)||this;if(n.count=0,r<0)throw new F("Negative initial size: "+r);return n.buf=new Uint8Array(r),n}return e.prototype.ensureCapacity=function(r){r-this.buf.length>0&&this.grow(r)},e.prototype.grow=function(r){var n=this.buf.length,i=n<<1;if(i-r<0&&(i=r),i<0){if(r<0)throw new ff;i=G.MAX_VALUE}this.buf=De.copyOfUint8Array(this.buf,i)},e.prototype.write=function(r){this.ensureCapacity(this.count+1),this.buf[this.count]=r,this.count+=1},e.prototype.writeBytesOffset=function(r,n,i){if(n<0||n>r.length||i<0||n+i-r.length>0)throw new Wn;this.ensureCapacity(this.count+i),ne.arraycopy(r,n,this.buf,this.count,i),this.count+=i},e.prototype.writeTo=function(r){r.writeBytesOffset(this.buf,0,this.count)},e.prototype.reset=function(){this.count=0},e.prototype.toByteArray=function(){return De.copyOfUint8Array(this.buf,this.count)},e.prototype.size=function(){return this.count},e.prototype.toString=function(r){return r?typeof r=="string"?this.toString_string(r):this.toString_number(r):this.toString_void()},e.prototype.toString_void=function(){return new String(this.buf).toString()},e.prototype.toString_string=function(r){return new String(this.buf).toString()},e.prototype.toString_number=function(r){return new String(this.buf).toString()},e.prototype.close=function(){},e})(uf),Q;(function(t){t[t.ALPHA=0]="ALPHA",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.PUNCT=3]="PUNCT",t[t.ALPHA_SHIFT=4]="ALPHA_SHIFT",t[t.PUNCT_SHIFT=5]="PUNCT_SHIFT"})(Q||(Q={}));function wa(){if(typeof window<"u")return window.BigInt||null;if(typeof global<"u")return global.BigInt||null;if(typeof self<"u")return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}var Er;function st(t){if(typeof Er>"u"&&(Er=wa()),Er===null)throw new Error("BigInt is not supported!");return Er(t)}function pf(){var t=[];t[0]=st(1);var e=st(900);t[1]=e;for(var r=2;r<16;r++)t[r]=t[r-1]*e;return t}var vf=(function(){function t(){}return t.decode=function(e,r){var n=new J(""),i=de.ISO8859_1;n.enableDecoding(i);for(var a=1,o=e[a++],s=new of;a<e[0];){switch(o){case t.TEXT_COMPACTION_MODE_LATCH:a=t.textCompaction(e,a,n);break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:a=t.byteCompaction(o,e,i,a,n);break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[a++]);break;case t.NUMERIC_COMPACTION_MODE_LATCH:a=t.numericCompaction(e,a,n);break;case t.ECI_CHARSET:de.getCharacterSetECIByValue(e[a++]);break;case t.ECI_GENERAL_PURPOSE:a+=2;break;case t.ECI_USER_DEFINED:a++;break;case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:a=t.decodeMacroBlock(e,a,s);break;case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:throw new R;default:a--,a=t.textCompaction(e,a,n);break}if(a<e.length)o=e[a++];else throw R.getFormatInstance()}if(n.length()===0)throw R.getFormatInstance();var l=new Wr(null,n.toString(),null,r);return l.setOther(s),l},t.decodeMacroBlock=function(e,r,n){if(r+t.NUMBER_OF_SEQUENCE_CODEWORDS>e[0])throw R.getFormatInstance();for(var i=new Int32Array(t.NUMBER_OF_SEQUENCE_CODEWORDS),a=0;a<t.NUMBER_OF_SEQUENCE_CODEWORDS;a++,r++)i[a]=e[r];n.setSegmentIndex(G.parseInt(t.decodeBase900toBase10(i,t.NUMBER_OF_SEQUENCE_CODEWORDS)));var o=new J;r=t.textCompaction(e,r,o),n.setFileId(o.toString());var s=-1;for(e[r]===t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(s=r+1);r<e[0];)switch(e[r]){case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(r++,e[r]){case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:var l=new J;r=t.textCompaction(e,r+1,l),n.setFileName(l.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var c=new J;r=t.textCompaction(e,r+1,c),n.setSender(c.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var f=new J;r=t.textCompaction(e,r+1,f),n.setAddressee(f.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var d=new J;r=t.numericCompaction(e,r+1,d),n.setSegmentCount(G.parseInt(d.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var p=new J;r=t.numericCompaction(e,r+1,p),n.setTimestamp(Fi.parseLong(p.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var h=new J;r=t.numericCompaction(e,r+1,h),n.setChecksum(G.parseInt(h.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var v=new J;r=t.numericCompaction(e,r+1,v),n.setFileSize(Fi.parseLong(v.toString()));break;default:throw R.getFormatInstance()}break;case t.MACRO_PDF417_TERMINATOR:r++,n.setLastSegment(!0);break;default:throw R.getFormatInstance()}if(s!==-1){var g=r-s;n.isLastSegment()&&g--,n.setOptionalData(De.copyOfRange(e,s,s+g))}return r},t.textCompaction=function(e,r,n){for(var i=new Int32Array((e[0]-r)*2),a=new Int32Array((e[0]-r)*2),o=0,s=!1;r<e[0]&&!s;){var l=e[r++];if(l<t.TEXT_COMPACTION_MODE_LATCH)i[o]=l/30,i[o+1]=l%30,o+=2;else switch(l){case t.TEXT_COMPACTION_MODE_LATCH:i[o++]=t.TEXT_COMPACTION_MODE_LATCH;break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,s=!0;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i[o]=t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,l=e[r++],a[o]=l,o++;break}}return t.decodeTextCompaction(i,a,o,n),r},t.decodeTextCompaction=function(e,r,n,i){for(var a=Q.ALPHA,o=Q.ALPHA,s=0;s<n;){var l=e[s],c="";switch(a){case Q.ALPHA:if(l<26)c=String.fromCharCode(65+l);else switch(l){case 26:c=" ";break;case t.LL:a=Q.LOWER;break;case t.ML:a=Q.MIXED;break;case t.PS:o=a,a=Q.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=Q.ALPHA;break}break;case Q.LOWER:if(l<26)c=String.fromCharCode(97+l);else switch(l){case 26:c=" ";break;case t.AS:o=a,a=Q.ALPHA_SHIFT;break;case t.ML:a=Q.MIXED;break;case t.PS:o=a,a=Q.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=Q.ALPHA;break}break;case Q.MIXED:if(l<t.PL)c=t.MIXED_CHARS[l];else switch(l){case t.PL:a=Q.PUNCT;break;case 26:c=" ";break;case t.LL:a=Q.LOWER;break;case t.AL:a=Q.ALPHA;break;case t.PS:o=a,a=Q.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=Q.ALPHA;break}break;case Q.PUNCT:if(l<t.PAL)c=t.PUNCT_CHARS[l];else switch(l){case t.PAL:a=Q.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=Q.ALPHA;break}break;case Q.ALPHA_SHIFT:if(a=o,l<26)c=String.fromCharCode(65+l);else switch(l){case 26:c=" ";break;case t.TEXT_COMPACTION_MODE_LATCH:a=Q.ALPHA;break}break;case Q.PUNCT_SHIFT:if(a=o,l<t.PAL)c=t.PUNCT_CHARS[l];else switch(l){case t.PAL:a=Q.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=Q.ALPHA;break}break}c!==""&&i.append(c),s++}},t.byteCompaction=function(e,r,n,i,a){var o=new hf,s=0,l=0,c=!1;switch(e){case t.BYTE_COMPACTION_MODE_LATCH:for(var f=new Int32Array(6),d=r[i++];i<r[0]&&!c;)switch(f[s++]=d,l=900*l+d,d=r[i++],d){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:i--,c=!0;break;default:if(s%5===0&&s>0){for(var p=0;p<6;++p)o.write(Number(st(l)>>st(8*(5-p))));l=0,s=0}break}i===r[0]&&d<t.TEXT_COMPACTION_MODE_LATCH&&(f[s++]=d);for(var h=0;h<s;h++)o.write(f[h]);break;case t.BYTE_COMPACTION_MODE_LATCH_6:for(;i<r[0]&&!c;){var v=r[i++];if(v<t.TEXT_COMPACTION_MODE_LATCH)s++,l=900*l+v;else switch(v){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:i--,c=!0;break}if(s%5===0&&s>0){for(var p=0;p<6;++p)o.write(Number(st(l)>>st(8*(5-p))));l=0,s=0}}break}return a.append(je.decode(o.toByteArray(),n)),i},t.numericCompaction=function(e,r,n){for(var i=0,a=!1,o=new Int32Array(t.MAX_NUMERIC_CODEWORDS);r<e[0]&&!a;){var s=e[r++];if(r===e[0]&&(a=!0),s<t.TEXT_COMPACTION_MODE_LATCH)o[i]=s,i++;else switch(s){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,a=!0;break}(i%t.MAX_NUMERIC_CODEWORDS===0||s===t.NUMERIC_COMPACTION_MODE_LATCH||a)&&i>0&&(n.append(t.decodeBase900toBase10(o,i)),i=0)}return r},t.decodeBase900toBase10=function(e,r){for(var n=st(0),i=0;i<r;i++)n+=t.EXP900[r-i-1]*st(e[i]);var a=n.toString();if(a.charAt(0)!=="1")throw new R;return a.substring(1)},t.TEXT_COMPACTION_MODE_LATCH=900,t.BYTE_COMPACTION_MODE_LATCH=901,t.NUMERIC_COMPACTION_MODE_LATCH=902,t.BYTE_COMPACTION_MODE_LATCH_6=924,t.ECI_USER_DEFINED=925,t.ECI_GENERAL_PURPOSE=926,t.ECI_CHARSET=927,t.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,t.MACRO_PDF417_TERMINATOR=922,t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,t.MAX_NUMERIC_CODEWORDS=15,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,t.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,t.PL=25,t.LL=27,t.AS=27,t.ML=28,t.AL=28,t.PS=29,t.PAL=29,t.PUNCT_CHARS=`;<>@[\\]_\`~!\r ,:
19
- -.$/"|*()?{}'`,t.MIXED_CHARS="0123456789&\r ,:#-.$/+%*=^",t.EXP900=wa()?pf():[],t.NUMBER_OF_SEQUENCE_CODEWORDS=2,t})(),Yt=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},gf=(function(){function t(){}return t.decode=function(e,r,n,i,a,o,s){for(var l=new kn(e,r,n,i,a),c=null,f=null,d,p=!0;;p=!1){if(r!=null&&(c=t.getRowIndicatorColumn(e,l,r,!0,o,s)),i!=null&&(f=t.getRowIndicatorColumn(e,l,i,!1,o,s)),d=t.merge(c,f),d==null)throw I.getNotFoundInstance();var h=d.getBoundingBox();if(p&&h!=null&&(h.getMinY()<l.getMinY()||h.getMaxY()>l.getMaxY()))l=h;else break}d.setBoundingBox(l);var v=d.getBarcodeColumnCount()+1;d.setDetectionResultColumn(0,c),d.setDetectionResultColumn(v,f);for(var g=c!=null,y=1;y<=v;y++){var _=g?y:v-y;if(d.getDetectionResultColumn(_)===void 0){var m=void 0;_===0||_===v?m=new Li(l,_===0):m=new ma(l),d.setDetectionResultColumn(_,m);for(var E=-1,w=E,C=l.getMinY();C<=l.getMaxY();C++){if(E=t.getStartColumn(d,_,C,g),E<0||E>l.getMaxX()){if(w===-1)continue;E=w}var b=t.detectCodeword(e,l.getMinX(),l.getMaxX(),g,E,C,o,s);b!=null&&(m.setCodeword(C,b),w=E,o=Math.min(o,b.getWidth()),s=Math.max(s,b.getWidth()))}}}return t.createDecoderResult(d)},t.merge=function(e,r){if(e==null&&r==null)return null;var n=t.getBarcodeMetadata(e,r);if(n==null)return null;var i=kn.merge(t.adjustBoundingBox(e),t.adjustBoundingBox(r));return new rf(n,i)},t.adjustBoundingBox=function(e){var r,n;if(e==null)return null;var i=e.getRowHeights();if(i==null)return null;var a=t.getMax(i),o=0;try{for(var s=Yt(i),l=s.next();!l.done;l=s.next()){var c=l.value;if(o+=a-c,c>0)break}}catch(h){r={error:h}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}for(var f=e.getCodewords(),d=0;o>0&&f[d]==null;d++)o--;for(var p=0,d=i.length-1;d>=0&&(p+=a-i[d],!(i[d]>0));d--);for(var d=f.length-1;p>0&&f[d]==null;d--)p--;return e.getBoundingBox().addMissingRows(o,p,e.isLeft())},t.getMax=function(e){var r,n,i=-1;try{for(var a=Yt(e),o=a.next();!o.done;o=a.next()){var s=o.value;i=Math.max(i,s)}}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i},t.getBarcodeMetadata=function(e,r){var n;if(e==null||(n=e.getBarcodeMetadata())==null)return r==null?null:r.getBarcodeMetadata();var i;return r==null||(i=r.getBarcodeMetadata())==null?n:n.getColumnCount()!==i.getColumnCount()&&n.getErrorCorrectionLevel()!==i.getErrorCorrectionLevel()&&n.getRowCount()!==i.getRowCount()?null:n},t.getRowIndicatorColumn=function(e,r,n,i,a,o){for(var s=new Li(r,i),l=0;l<2;l++)for(var c=l===0?1:-1,f=Math.trunc(Math.trunc(n.getX())),d=Math.trunc(Math.trunc(n.getY()));d<=r.getMaxY()&&d>=r.getMinY();d+=c){var p=t.detectCodeword(e,0,e.getWidth(),i,f,d,a,o);p!=null&&(s.setCodeword(d,p),i?f=p.getStartX():f=p.getEndX())}return s},t.adjustCodewordCount=function(e,r){var n=r[0][1],i=n.getValue(),a=e.getBarcodeColumnCount()*e.getBarcodeRowCount()-t.getNumberOfECCodeWords(e.getBarcodeECLevel());if(i.length===0){if(a<1||a>W.MAX_CODEWORDS_IN_BARCODE)throw I.getNotFoundInstance();n.setValue(a)}else i[0]!==a&&n.setValue(a)},t.createDecoderResult=function(e){var r=t.createBarcodeMatrix(e);t.adjustCodewordCount(e,r);for(var n=new Array,i=new Int32Array(e.getBarcodeRowCount()*e.getBarcodeColumnCount()),a=[],o=new Array,s=0;s<e.getBarcodeRowCount();s++)for(var l=0;l<e.getBarcodeColumnCount();l++){var c=r[s][l+1].getValue(),f=s*e.getBarcodeColumnCount()+l;c.length===0?n.push(f):c.length===1?i[f]=c[0]:(o.push(f),a.push(c))}for(var d=new Array(a.length),p=0;p<d.length;p++)d[p]=a[p];return t.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(),i,W.toIntArray(n),W.toIntArray(o),d)},t.createDecoderResultFromAmbiguousValues=function(e,r,n,i,a){for(var o=new Int32Array(i.length),s=100;s-- >0;){for(var l=0;l<o.length;l++)r[i[l]]=a[l][o[l]];try{return t.decodeCodewords(r,e,n)}catch(f){var c=f instanceof me;if(!c)throw f}if(o.length===0)throw me.getChecksumInstance();for(var l=0;l<o.length;l++)if(o[l]<a[l].length-1){o[l]++;break}else if(o[l]=0,l===o.length-1)throw me.getChecksumInstance()}throw me.getChecksumInstance()},t.createBarcodeMatrix=function(e){for(var r,n,i,a,o=Array.from({length:e.getBarcodeRowCount()},function(){return new Array(e.getBarcodeColumnCount()+2)}),s=0;s<o.length;s++)for(var l=0;l<o[s].length;l++)o[s][l]=new nr;var c=0;try{for(var f=Yt(e.getDetectionResultColumns()),d=f.next();!d.done;d=f.next()){var p=d.value;if(p!=null)try{for(var h=(i=void 0,Yt(p.getCodewords())),v=h.next();!v.done;v=h.next()){var g=v.value;if(g!=null){var y=g.getRowNumber();if(y>=0){if(y>=o.length)continue;o[y][c].setValue(g.getValue())}}}}catch(_){i={error:_}}finally{try{v&&!v.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}c++}}catch(_){r={error:_}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}return o},t.isValidBarcodeColumn=function(e,r){return r>=0&&r<=e.getBarcodeColumnCount()+1},t.getStartColumn=function(e,r,n,i){var a,o,s=i?1:-1,l=null;if(t.isValidBarcodeColumn(e,r-s)&&(l=e.getDetectionResultColumn(r-s).getCodeword(n)),l!=null)return i?l.getEndX():l.getStartX();if(l=e.getDetectionResultColumn(r).getCodewordNearby(n),l!=null)return i?l.getStartX():l.getEndX();if(t.isValidBarcodeColumn(e,r-s)&&(l=e.getDetectionResultColumn(r-s).getCodewordNearby(n)),l!=null)return i?l.getEndX():l.getStartX();for(var c=0;t.isValidBarcodeColumn(e,r-s);){r-=s;try{for(var f=(a=void 0,Yt(e.getDetectionResultColumn(r).getCodewords())),d=f.next();!d.done;d=f.next()){var p=d.value;if(p!=null)return(i?p.getEndX():p.getStartX())+s*c*(p.getEndX()-p.getStartX())}}catch(h){a={error:h}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(a)throw a.error}}c++}return i?e.getBoundingBox().getMinX():e.getBoundingBox().getMaxX()},t.detectCodeword=function(e,r,n,i,a,o,s,l){a=t.adjustCodewordStartColumn(e,r,n,i,a,o);var c=t.getModuleBitCount(e,r,n,i,a,o);if(c==null)return null;var f,d=X.sum(c);if(i)f=a+d;else{for(var p=0;p<c.length/2;p++){var h=c[p];c[p]=c[c.length-1-p],c[c.length-1-p]=h}f=a,a=f-d}if(!t.checkCodewordSkew(d,s,l))return null;var v=af.getDecodedValue(c),g=W.getCodeword(v);return g===-1?null:new nf(a,f,t.getCodewordBucketNumber(v),g)},t.getModuleBitCount=function(e,r,n,i,a,o){for(var s=a,l=new Int32Array(8),c=0,f=i?1:-1,d=i;(i?s<n:s>=r)&&c<l.length;)e.get(s,o)===d?(l[c]++,s+=f):(c++,d=!d);return c===l.length||s===(i?n:r)&&c===l.length-1?l:null},t.getNumberOfECCodeWords=function(e){return 2<<e},t.adjustCodewordStartColumn=function(e,r,n,i,a,o){for(var s=a,l=i?-1:1,c=0;c<2;c++){for(;(i?s>=r:s<n)&&i===e.get(s,o);){if(Math.abs(a-s)>t.CODEWORD_SKEW_SIZE)return a;s+=l}l=-l,i=!i}return s},t.checkCodewordSkew=function(e,r,n){return r-t.CODEWORD_SKEW_SIZE<=e&&e<=n+t.CODEWORD_SKEW_SIZE},t.decodeCodewords=function(e,r,n){if(e.length===0)throw R.getFormatInstance();var i=1<<r+1,a=t.correctErrors(e,n,i);t.verifyCodewordCount(e,i);var o=vf.decode(e,""+r);return o.setErrorsCorrected(a),o.setErasures(n.length),o},t.correctErrors=function(e,r,n){if(r!=null&&r.length>n/2+t.MAX_ERRORS||n<0||n>t.MAX_EC_CODEWORDS)throw me.getChecksumInstance();return t.errorCorrection.decode(e,n,r)},t.verifyCodewordCount=function(e,r){if(e.length<4)throw R.getFormatInstance();var n=e[0];if(n>e.length)throw R.getFormatInstance();if(n===0)if(r<e.length)e[0]=e.length-r;else throw R.getFormatInstance()},t.getBitCountForCodeword=function(e){for(var r=new Int32Array(8),n=0,i=r.length-1;!((e&1)!==n&&(n=e&1,i--,i<0));)r[i]++,e>>=1;return r},t.getCodewordBucketNumber=function(e){return e instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(e):this.getCodewordBucketNumber_number(e)},t.getCodewordBucketNumber_number=function(e){return t.getCodewordBucketNumber(t.getBitCountForCodeword(e))},t.getCodewordBucketNumber_Int32Array=function(e){return(e[0]-e[2]+e[4]-e[6]+9)%9},t.toString=function(e){for(var r=new qn,n=0;n<e.length;n++){r.format("Row %2d: ",n);for(var i=0;i<e[n].length;i++){var a=e[n][i];a.getValue().length===0?r.format(" ",null):r.format("%4d(%2d)",a.getValue()[0],a.getConfidence(a.getValue()[0]))}r.format("%n")}return r.toString()},t.CODEWORD_SKEW_SIZE=2,t.MAX_ERRORS=3,t.MAX_EC_CODEWORDS=512,t.errorCorrection=new Yc,t})(),xf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Mn=(function(){function t(){}return t.prototype.decode=function(e,r){r===void 0&&(r=null);var n=t.decode(e,r,!1);if(n==null||n.length===0||n[0]==null)throw I.getNotFoundInstance();return n[0]},t.prototype.decodeMultiple=function(e,r){r===void 0&&(r=null);try{return t.decode(e,r,!0)}catch(n){throw n instanceof R||n instanceof me?I.getNotFoundInstance():n}},t.decode=function(e,r,n){var i,a,o=new Array,s=Gc.detectMultiple(e,r,n);try{for(var l=xf(s.getPoints()),c=l.next();!c.done;c=l.next()){var f=c.value,d=gf.decode(s.getBits(),f[4],f[5],f[6],f[7],t.getMinCodewordWidth(f),t.getMaxCodewordWidth(f)),p=new Be(d.getText(),d.getRawBytes(),void 0,f,U.PDF_417);p.putMetadata(we.ERROR_CORRECTION_LEVEL,d.getECLevel());var h=d.getOther();h!=null&&p.putMetadata(we.PDF417_EXTRA_METADATA,h),o.push(p)}}catch(v){i={error:v}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}return o.map(function(v){return v})},t.getMaxWidth=function(e,r){return e==null||r==null?0:Math.trunc(Math.abs(e.getX()-r.getX()))},t.getMinWidth=function(e,r){return e==null||r==null?G.MAX_VALUE:Math.trunc(Math.abs(e.getX()-r.getX()))},t.getMaxCodewordWidth=function(e){return Math.floor(Math.max(Math.max(t.getMaxWidth(e[0],e[4]),t.getMaxWidth(e[6],e[2])*W.MODULES_IN_CODEWORD/W.MODULES_IN_STOP_PATTERN),Math.max(t.getMaxWidth(e[1],e[5]),t.getMaxWidth(e[7],e[3])*W.MODULES_IN_CODEWORD/W.MODULES_IN_STOP_PATTERN)))},t.getMinCodewordWidth=function(e){return Math.floor(Math.min(Math.min(t.getMinWidth(e[0],e[4]),t.getMinWidth(e[6],e[2])*W.MODULES_IN_CODEWORD/W.MODULES_IN_STOP_PATTERN),Math.min(t.getMinWidth(e[1],e[5]),t.getMinWidth(e[7],e[3])*W.MODULES_IN_CODEWORD/W.MODULES_IN_STOP_PATTERN)))},t.prototype.reset=function(){},t})(),yf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Vi=(function(t){yf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ReaderException",e})(be),Ui=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mf=(function(){function t(){}return t.prototype.decode=function(e,r){return this.setHints(r),this.decodeInternal(e)},t.prototype.decodeWithState=function(e){return(this.readers===null||this.readers===void 0)&&this.setHints(null),this.decodeInternal(e)},t.prototype.setHints=function(e){this.hints=e;var r=e!=null&&e.get(le.TRY_HARDER)!==void 0,n=e==null?null:e.get(le.POSSIBLE_FORMATS),i=new Array;if(n!=null){var a=n.some(function(o){return o===U.UPC_A||o===U.UPC_E||o===U.EAN_13||o===U.EAN_8||o===U.CODABAR||o===U.CODE_39||o===U.CODE_93||o===U.CODE_128||o===U.ITF||o===U.RSS_14||o===U.RSS_EXPANDED});a&&!r&&i.push(new rr(e)),n.includes(U.QR_CODE)&&i.push(new Pn),n.includes(U.DATA_MATRIX)&&i.push(new Rn),n.includes(U.AZTEC)&&i.push(new Dn),n.includes(U.PDF_417)&&i.push(new Mn),a&&r&&i.push(new rr(e))}i.length===0&&(r||i.push(new rr(e)),i.push(new Pn),i.push(new Rn),i.push(new Dn),i.push(new Mn),r&&i.push(new rr(e))),this.readers=i},t.prototype.reset=function(){var e,r;if(this.readers!==null)try{for(var n=Ui(this.readers),i=n.next();!i.done;i=n.next()){var a=i.value;a.reset()}}catch(o){e={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.decodeInternal=function(e){var r,n;if(this.readers===null)throw new Vi("No readers where selected, nothing can be read.");try{for(var i=Ui(this.readers),a=i.next();!a.done;a=i.next()){var o=a.value;try{return o.decode(e,this.hints)}catch(s){if(s instanceof Vi)continue}}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}throw new I("No MultiFormat Readers were able to detect the code.")},t})(),wf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),_f=(function(t){wf(e,t);function e(r,n){r===void 0&&(r=null),n===void 0&&(n=500);var i=this,a=new mf;return a.setHints(r),i=t.call(this,a,n)||this,i}return e.prototype.decodeBitmap=function(r){return this.reader.decodeWithState(r)},e})(Vt),Ef=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();(function(t){Ef(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Mn,r)||this}return e})(Vt);var Af=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();(function(t){Af(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Pn,r)||this}return e})(Vt);var Ln;(function(t){t[t.ERROR_CORRECTION=0]="ERROR_CORRECTION",t[t.CHARACTER_SET=1]="CHARACTER_SET",t[t.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",t[t.MIN_SIZE=3]="MIN_SIZE",t[t.MAX_SIZE=4]="MAX_SIZE",t[t.MARGIN=5]="MARGIN",t[t.PDF417_COMPACT=6]="PDF417_COMPACT",t[t.PDF417_COMPACTION=7]="PDF417_COMPACTION",t[t.PDF417_DIMENSIONS=8]="PDF417_DIMENSIONS",t[t.AZTEC_LAYERS=9]="AZTEC_LAYERS",t[t.QR_VERSION=10]="QR_VERSION"})(Ln||(Ln={}));const Ar=Ln;var _a=(function(){function t(e){this.field=e,this.cachedGenerators=[],this.cachedGenerators.push(new ct(e,Int32Array.from([1])))}return t.prototype.buildGenerator=function(e){var r=this.cachedGenerators;if(e>=r.length)for(var n=r[r.length-1],i=this.field,a=r.length;a<=e;a++){var o=n.multiply(new ct(i,Int32Array.from([1,i.exp(a-1+i.getGeneratorBase())])));r.push(o),n=o}return r[e]},t.prototype.encode=function(e,r){if(r===0)throw new F("No error correction bytes");var n=e.length-r;if(n<=0)throw new F("No data bytes provided");var i=this.buildGenerator(r),a=new Int32Array(n);ne.arraycopy(e,0,a,0,n);var o=new ct(this.field,a);o=o.multiplyByMonomial(r,1);for(var s=o.divide(i)[1],l=s.getCoefficients(),c=r-l.length,f=0;f<c;f++)e[n+f]=0;ne.arraycopy(l,0,e,n+c,l.length)},t})(),ir=(function(){function t(){}return t.applyMaskPenaltyRule1=function(e){return t.applyMaskPenaltyRule1Internal(e,!0)+t.applyMaskPenaltyRule1Internal(e,!1)},t.applyMaskPenaltyRule2=function(e){for(var r=0,n=e.getArray(),i=e.getWidth(),a=e.getHeight(),o=0;o<a-1;o++)for(var s=n[o],l=0;l<i-1;l++){var c=s[l];c===s[l+1]&&c===n[o+1][l]&&c===n[o+1][l+1]&&r++}return t.N2*r},t.applyMaskPenaltyRule3=function(e){for(var r=0,n=e.getArray(),i=e.getWidth(),a=e.getHeight(),o=0;o<a;o++)for(var s=0;s<i;s++){var l=n[o];s+6<i&&l[s]===1&&l[s+1]===0&&l[s+2]===1&&l[s+3]===1&&l[s+4]===1&&l[s+5]===0&&l[s+6]===1&&(t.isWhiteHorizontal(l,s-4,s)||t.isWhiteHorizontal(l,s+7,s+11))&&r++,o+6<a&&n[o][s]===1&&n[o+1][s]===0&&n[o+2][s]===1&&n[o+3][s]===1&&n[o+4][s]===1&&n[o+5][s]===0&&n[o+6][s]===1&&(t.isWhiteVertical(n,s,o-4,o)||t.isWhiteVertical(n,s,o+7,o+11))&&r++}return r*t.N3},t.isWhiteHorizontal=function(e,r,n){r=Math.max(r,0),n=Math.min(n,e.length);for(var i=r;i<n;i++)if(e[i]===1)return!1;return!0},t.isWhiteVertical=function(e,r,n,i){n=Math.max(n,0),i=Math.min(i,e.length);for(var a=n;a<i;a++)if(e[a][r]===1)return!1;return!0},t.applyMaskPenaltyRule4=function(e){for(var r=0,n=e.getArray(),i=e.getWidth(),a=e.getHeight(),o=0;o<a;o++)for(var s=n[o],l=0;l<i;l++)s[l]===1&&r++;var c=e.getHeight()*e.getWidth(),f=Math.floor(Math.abs(r*2-c)*10/c);return f*t.N4},t.getDataMaskBit=function(e,r,n){var i,a;switch(e){case 0:i=n+r&1;break;case 1:i=n&1;break;case 2:i=r%3;break;case 3:i=(n+r)%3;break;case 4:i=Math.floor(n/2)+Math.floor(r/3)&1;break;case 5:a=n*r,i=(a&1)+a%3;break;case 6:a=n*r,i=(a&1)+a%3&1;break;case 7:a=n*r,i=a%3+(n+r&1)&1;break;default:throw new F("Invalid mask pattern: "+e)}return i===0},t.applyMaskPenaltyRule1Internal=function(e,r){for(var n=0,i=r?e.getHeight():e.getWidth(),a=r?e.getWidth():e.getHeight(),o=e.getArray(),s=0;s<i;s++){for(var l=0,c=-1,f=0;f<a;f++){var d=r?o[s][f]:o[f][s];d===c?l++:(l>=5&&(n+=t.N1+(l-5)),l=1,c=d)}l>=5&&(n+=t.N1+(l-5))}return n},t.N1=3,t.N2=3,t.N3=40,t.N4=10,t})(),Cf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},bf=(function(){function t(e,r){this.width=e,this.height=r;for(var n=new Array(r),i=0;i!==r;i++)n[i]=new Uint8Array(e);this.bytes=n}return t.prototype.getHeight=function(){return this.height},t.prototype.getWidth=function(){return this.width},t.prototype.get=function(e,r){return this.bytes[r][e]},t.prototype.getArray=function(){return this.bytes},t.prototype.setNumber=function(e,r,n){this.bytes[r][e]=n},t.prototype.setBoolean=function(e,r,n){this.bytes[r][e]=n?1:0},t.prototype.clear=function(e){var r,n;try{for(var i=Cf(this.bytes),a=i.next();!a.done;a=i.next()){var o=a.value;De.fill(o,e)}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;if(this.width!==r.width||this.height!==r.height)return!1;for(var n=0,i=this.height;n<i;++n)for(var a=this.bytes[n],o=r.bytes[n],s=0,l=this.width;s<l;++s)if(a[s]!==o[s])return!1;return!0},t.prototype.toString=function(){for(var e=new J,r=0,n=this.height;r<n;++r){for(var i=this.bytes[r],a=0,o=this.width;a<o;++a)switch(i[a]){case 0:e.append(" 0");break;case 1:e.append(" 1");break;default:e.append(" ");break}e.append(`
17
+ `,". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],t.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],t})(),X=(function(){function t(){}return t.round=function(e){return isNaN(e)?0:e<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:e>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:e+(e<0?-.5:.5)|0},t.distance=function(e,r,n,i){var a=e-n,o=r-i;return Math.sqrt(a*a+o*o)},t.sum=function(e){for(var r=0,n=0,i=e.length;n!==i;n++){var a=e[n];r+=a}return r},t})(),Tn=(function(){function t(){}return t.floatToIntBits=function(e){return e},t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t})(),k=(function(){function t(e,r){this.x=e,this.y=r}return t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t.prototype.equals=function(e){if(e instanceof t){var r=e;return this.x===r.x&&this.y===r.y}return!1},t.prototype.hashCode=function(){return 31*Tn.floatToIntBits(this.x)+Tn.floatToIntBits(this.y)},t.prototype.toString=function(){return"("+this.x+","+this.y+")"},t.orderBestPatterns=function(e){var r=this.distance(e[0],e[1]),n=this.distance(e[1],e[2]),i=this.distance(e[0],e[2]),a,o,s;if(n>=r&&n>=i?(o=e[0],a=e[1],s=e[2]):i>=n&&i>=r?(o=e[1],a=e[0],s=e[2]):(o=e[2],a=e[0],s=e[1]),this.crossProductZ(a,o,s)<0){var l=a;a=s,s=l}e[0]=a,e[1]=o,e[2]=s},t.distance=function(e,r){return X.distance(e.x,e.y,r.x,r.y)},t.crossProductZ=function(e,r,n){var i=r.x,a=r.y;return(n.x-i)*(e.y-a)-(n.y-a)*(e.x-i)},t})(),Kn=(function(){function t(e,r){this.bits=e,this.points=r}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t})(),hc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),vc=(function(t){hc(e,t);function e(r,n,i,a,o){var s=t.call(this,r,n)||this;return s.compact=i,s.nbDatablocks=a,s.nbLayers=o,s}return e.prototype.getNbLayers=function(){return this.nbLayers},e.prototype.getNbDatablocks=function(){return this.nbDatablocks},e.prototype.isCompact=function(){return this.compact},e})(Kn),Nn=(function(){function t(e,r,n,i){this.image=e,this.height=e.getHeight(),this.width=e.getWidth(),r==null&&(r=t.INIT_SIZE),n==null&&(n=e.getWidth()/2|0),i==null&&(i=e.getHeight()/2|0);var a=r/2|0;if(this.leftInit=n-a,this.rightInit=n+a,this.upInit=i-a,this.downInit=i+a,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new I}return t.prototype.detect=function(){for(var e=this.leftInit,r=this.rightInit,n=this.upInit,i=this.downInit,a=!1,o=!0,s=!1,l=!1,c=!1,f=!1,d=!1,v=this.width,h=this.height;o;){o=!1;for(var p=!0;(p||!l)&&r<v;)p=this.containsBlackPoint(n,i,r,!1),p?(r++,o=!0,l=!0):l||r++;if(r>=v){a=!0;break}for(var g=!0;(g||!c)&&i<h;)g=this.containsBlackPoint(e,r,i,!0),g?(i++,o=!0,c=!0):c||i++;if(i>=h){a=!0;break}for(var y=!0;(y||!f)&&e>=0;)y=this.containsBlackPoint(n,i,e,!1),y?(e--,o=!0,f=!0):f||e--;if(e<0){a=!0;break}for(var w=!0;(w||!d)&&n>=0;)w=this.containsBlackPoint(e,r,n,!0),w?(n--,o=!0,d=!0):d||n--;if(n<0){a=!0;break}o&&(s=!0)}if(!a&&s){for(var m=r-e,A=null,E=1;A===null&&E<m;E++)A=this.getBlackPointOnSegment(e,i-E,e+E,i);if(A==null)throw new I;for(var C=null,E=1;C===null&&E<m;E++)C=this.getBlackPointOnSegment(e,n+E,e+E,n);if(C==null)throw new I;for(var b=null,E=1;b===null&&E<m;E++)b=this.getBlackPointOnSegment(r,n+E,r-E,n);if(b==null)throw new I;for(var O=null,E=1;O===null&&E<m;E++)O=this.getBlackPointOnSegment(r,i-E,r-E,i);if(O==null)throw new I;return this.centerEdges(O,A,b,C)}else throw new I},t.prototype.getBlackPointOnSegment=function(e,r,n,i){for(var a=X.round(X.distance(e,r,n,i)),o=(n-e)/a,s=(i-r)/a,l=this.image,c=0;c<a;c++){var f=X.round(e+c*o),d=X.round(r+c*s);if(l.get(f,d))return new k(f,d)}return null},t.prototype.centerEdges=function(e,r,n,i){var a=e.getX(),o=e.getY(),s=r.getX(),l=r.getY(),c=n.getX(),f=n.getY(),d=i.getX(),v=i.getY(),h=t.CORR;return a<this.width/2?[new k(d-h,v+h),new k(s+h,l+h),new k(c-h,f-h),new k(a+h,o-h)]:[new k(d+h,v+h),new k(s+h,l-h),new k(c-h,f+h),new k(a-h,o-h)]},t.prototype.containsBlackPoint=function(e,r,n,i){var a=this.image;if(i){for(var o=e;o<=r;o++)if(a.get(o,n))return!0}else for(var s=e;s<=r;s++)if(a.get(n,s))return!0;return!1},t.INIT_SIZE=10,t.CORR=1,t})(),wi=(function(){function t(){}return t.checkAndNudgePoints=function(e,r){for(var n=e.getWidth(),i=e.getHeight(),a=!0,o=0;o<r.length&&a;o+=2){var s=Math.floor(r[o]),l=Math.floor(r[o+1]);if(s<-1||s>n||l<-1||l>i)throw new I;a=!1,s===-1?(r[o]=0,a=!0):s===n&&(r[o]=n-1,a=!0),l===-1?(r[o+1]=0,a=!0):l===i&&(r[o+1]=i-1,a=!0)}a=!0;for(var o=r.length-2;o>=0&&a;o-=2){var s=Math.floor(r[o]),l=Math.floor(r[o+1]);if(s<-1||s>n||l<-1||l>i)throw new I;a=!1,s===-1?(r[o]=0,a=!0):s===n&&(r[o]=n-1,a=!0),l===-1?(r[o+1]=0,a=!0):l===i&&(r[o+1]=i-1,a=!0)}},t})(),da=(function(){function t(e,r,n,i,a,o,s,l,c){this.a11=e,this.a21=r,this.a31=n,this.a12=i,this.a22=a,this.a32=o,this.a13=s,this.a23=l,this.a33=c}return t.quadrilateralToQuadrilateral=function(e,r,n,i,a,o,s,l,c,f,d,v,h,p,g,y){var w=t.quadrilateralToSquare(e,r,n,i,a,o,s,l),m=t.squareToQuadrilateral(c,f,d,v,h,p,g,y);return m.times(w)},t.prototype.transformPoints=function(e){for(var r=e.length,n=this.a11,i=this.a12,a=this.a13,o=this.a21,s=this.a22,l=this.a23,c=this.a31,f=this.a32,d=this.a33,v=0;v<r;v+=2){var h=e[v],p=e[v+1],g=a*h+l*p+d;e[v]=(n*h+o*p+c)/g,e[v+1]=(i*h+s*p+f)/g}},t.prototype.transformPointsWithValues=function(e,r){for(var n=this.a11,i=this.a12,a=this.a13,o=this.a21,s=this.a22,l=this.a23,c=this.a31,f=this.a32,d=this.a33,v=e.length,h=0;h<v;h++){var p=e[h],g=r[h],y=a*p+l*g+d;e[h]=(n*p+o*g+c)/y,r[h]=(i*p+s*g+f)/y}},t.squareToQuadrilateral=function(e,r,n,i,a,o,s,l){var c=e-n+a-s,f=r-i+o-l;if(c===0&&f===0)return new t(n-e,a-n,e,i-r,o-i,r,0,0,1);var d=n-a,v=s-a,h=i-o,p=l-o,g=d*p-v*h,y=(c*p-v*f)/g,w=(d*f-c*h)/g;return new t(n-e+y*n,s-e+w*s,e,i-r+y*i,l-r+w*l,r,y,w,1)},t.quadrilateralToSquare=function(e,r,n,i,a,o,s,l){return t.squareToQuadrilateral(e,r,n,i,a,o,s,l).buildAdjoint()},t.prototype.buildAdjoint=function(){return new t(this.a22*this.a33-this.a23*this.a32,this.a23*this.a31-this.a21*this.a33,this.a21*this.a32-this.a22*this.a31,this.a13*this.a32-this.a12*this.a33,this.a11*this.a33-this.a13*this.a31,this.a12*this.a31-this.a11*this.a32,this.a12*this.a23-this.a13*this.a22,this.a13*this.a21-this.a11*this.a23,this.a11*this.a22-this.a12*this.a21)},t.prototype.times=function(e){return new t(this.a11*e.a11+this.a21*e.a12+this.a31*e.a13,this.a11*e.a21+this.a21*e.a22+this.a31*e.a23,this.a11*e.a31+this.a21*e.a32+this.a31*e.a33,this.a12*e.a11+this.a22*e.a12+this.a32*e.a13,this.a12*e.a21+this.a22*e.a22+this.a32*e.a23,this.a12*e.a31+this.a22*e.a32+this.a32*e.a33,this.a13*e.a11+this.a23*e.a12+this.a33*e.a13,this.a13*e.a21+this.a23*e.a22+this.a33*e.a23,this.a13*e.a31+this.a23*e.a32+this.a33*e.a33)},t})(),pc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),gc=(function(t){pc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.sampleGrid=function(r,n,i,a,o,s,l,c,f,d,v,h,p,g,y,w,m,A,E){var C=da.quadrilateralToQuadrilateral(a,o,s,l,c,f,d,v,h,p,g,y,w,m,A,E);return this.sampleGridWithTransform(r,n,i,C)},e.prototype.sampleGridWithTransform=function(r,n,i,a){if(n<=0||i<=0)throw new I;for(var o=new Ze(n,i),s=new Float32Array(2*n),l=0;l<i;l++){for(var c=s.length,f=l+.5,d=0;d<c;d+=2)s[d]=d/2+.5,s[d+1]=f;a.transformPoints(s),wi.checkAndNudgePoints(r,s);try{for(var d=0;d<c;d+=2)r.get(Math.floor(s[d]),Math.floor(s[d+1]))&&o.set(d/2,l)}catch{throw new I}}return o},e})(wi),jn=(function(){function t(){}return t.setGridSampler=function(e){t.gridSampler=e},t.getInstance=function(){return t.gridSampler},t.gridSampler=new gc,t})(),Se=(function(){function t(e,r){this.x=e,this.y=r}return t.prototype.toResultPoint=function(){return new k(this.getX(),this.getY())},t.prototype.getX=function(){return this.x},t.prototype.getY=function(){return this.y},t})(),xc=(function(){function t(e){this.EXPECTED_CORNER_BITS=new Int32Array([3808,476,2107,1799]),this.image=e}return t.prototype.detect=function(){return this.detectMirror(!1)},t.prototype.detectMirror=function(e){var r=this.getMatrixCenter(),n=this.getBullsEyeCorners(r);if(e){var i=n[0];n[0]=n[2],n[2]=i}this.extractParameters(n);var a=this.sampleGrid(this.image,n[this.shift%4],n[(this.shift+1)%4],n[(this.shift+2)%4],n[(this.shift+3)%4]),o=this.getMatrixCornerPoints(n);return new vc(a,o,this.compact,this.nbDataBlocks,this.nbLayers)},t.prototype.extractParameters=function(e){if(!this.isValidPoint(e[0])||!this.isValidPoint(e[1])||!this.isValidPoint(e[2])||!this.isValidPoint(e[3]))throw new I;var r=2*this.nbCenterLayers,n=new Int32Array([this.sampleLine(e[0],e[1],r),this.sampleLine(e[1],e[2],r),this.sampleLine(e[2],e[3],r),this.sampleLine(e[3],e[0],r)]);this.shift=this.getRotation(n,r);for(var i=0,a=0;a<4;a++){var o=n[(this.shift+a)%4];this.compact?(i<<=7,i+=o>>1&127):(i<<=10,i+=(o>>2&992)+(o>>1&31))}var s=this.getCorrectedParameterData(i,this.compact);this.compact?(this.nbLayers=(s>>6)+1,this.nbDataBlocks=(s&63)+1):(this.nbLayers=(s>>11)+1,this.nbDataBlocks=(s&2047)+1)},t.prototype.getRotation=function(e,r){var n=0;e.forEach(function(a,o,s){var l=(a>>r-2<<1)+(a&1);n=(n<<3)+l}),n=((n&1)<<11)+(n>>1);for(var i=0;i<4;i++)if(G.bitCount(n^this.EXPECTED_CORNER_BITS[i])<=2)return i;throw new I},t.prototype.getCorrectedParameterData=function(e,r){var n,i;r?(n=7,i=2):(n=10,i=4);for(var a=n-i,o=new Int32Array(n),s=n-1;s>=0;--s)o[s]=e&15,e>>=4;try{var l=new Xr(Ne.AZTEC_PARAM);l.decode(o,a)}catch{throw new I}for(var c=0,s=0;s<i;s++)c=(c<<4)+o[s];return c},t.prototype.getBullsEyeCorners=function(e){var r=e,n=e,i=e,a=e,o=!0;for(this.nbCenterLayers=1;this.nbCenterLayers<9;this.nbCenterLayers++){var s=this.getFirstDifferent(r,o,1,-1),l=this.getFirstDifferent(n,o,1,1),c=this.getFirstDifferent(i,o,-1,1),f=this.getFirstDifferent(a,o,-1,-1);if(this.nbCenterLayers>2){var d=this.distancePoint(f,s)*this.nbCenterLayers/(this.distancePoint(a,r)*(this.nbCenterLayers+2));if(d<.75||d>1.25||!this.isWhiteOrBlackRectangle(s,l,c,f))break}r=s,n=l,i=c,a=f,o=!o}if(this.nbCenterLayers!==5&&this.nbCenterLayers!==7)throw new I;this.compact=this.nbCenterLayers===5;var v=new k(r.getX()+.5,r.getY()-.5),h=new k(n.getX()+.5,n.getY()+.5),p=new k(i.getX()-.5,i.getY()+.5),g=new k(a.getX()-.5,a.getY()-.5);return this.expandSquare([v,h,p,g],2*this.nbCenterLayers-3,2*this.nbCenterLayers)},t.prototype.getMatrixCenter=function(){var e,r,n,i;try{var a=new Nn(this.image).detect();e=a[0],r=a[1],n=a[2],i=a[3]}catch{var o=this.image.getWidth()/2,s=this.image.getHeight()/2;e=this.getFirstDifferent(new Se(o+7,s-7),!1,1,-1).toResultPoint(),r=this.getFirstDifferent(new Se(o+7,s+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Se(o-7,s+7),!1,-1,1).toResultPoint(),i=this.getFirstDifferent(new Se(o-7,s-7),!1,-1,-1).toResultPoint()}var l=X.round((e.getX()+i.getX()+r.getX()+n.getX())/4),c=X.round((e.getY()+i.getY()+r.getY()+n.getY())/4);try{var a=new Nn(this.image,15,l,c).detect();e=a[0],r=a[1],n=a[2],i=a[3]}catch{e=this.getFirstDifferent(new Se(l+7,c-7),!1,1,-1).toResultPoint(),r=this.getFirstDifferent(new Se(l+7,c+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Se(l-7,c+7),!1,-1,1).toResultPoint(),i=this.getFirstDifferent(new Se(l-7,c-7),!1,-1,-1).toResultPoint()}return l=X.round((e.getX()+i.getX()+r.getX()+n.getX())/4),c=X.round((e.getY()+i.getY()+r.getY()+n.getY())/4),new Se(l,c)},t.prototype.getMatrixCornerPoints=function(e){return this.expandSquare(e,2*this.nbCenterLayers,this.getDimension())},t.prototype.sampleGrid=function(e,r,n,i,a){var o=jn.getInstance(),s=this.getDimension(),l=s/2-this.nbCenterLayers,c=s/2+this.nbCenterLayers;return o.sampleGrid(e,s,s,l,l,c,l,c,c,l,c,r.getX(),r.getY(),n.getX(),n.getY(),i.getX(),i.getY(),a.getX(),a.getY())},t.prototype.sampleLine=function(e,r,n){for(var i=0,a=this.distanceResultPoint(e,r),o=a/n,s=e.getX(),l=e.getY(),c=o*(r.getX()-e.getX())/a,f=o*(r.getY()-e.getY())/a,d=0;d<n;d++)this.image.get(X.round(s+d*c),X.round(l+d*f))&&(i|=1<<n-d-1);return i},t.prototype.isWhiteOrBlackRectangle=function(e,r,n,i){var a=3;e=new Se(e.getX()-a,e.getY()+a),r=new Se(r.getX()-a,r.getY()-a),n=new Se(n.getX()+a,n.getY()-a),i=new Se(i.getX()+a,i.getY()+a);var o=this.getColor(i,e);if(o===0)return!1;var s=this.getColor(e,r);return s!==o||(s=this.getColor(r,n),s!==o)?!1:(s=this.getColor(n,i),s===o)},t.prototype.getColor=function(e,r){for(var n=this.distancePoint(e,r),i=(r.getX()-e.getX())/n,a=(r.getY()-e.getY())/n,o=0,s=e.getX(),l=e.getY(),c=this.image.get(e.getX(),e.getY()),f=Math.ceil(n),d=0;d<f;d++)s+=i,l+=a,this.image.get(X.round(s),X.round(l))!==c&&o++;var v=o/n;return v>.1&&v<.9?0:v<=.1===c?1:-1},t.prototype.getFirstDifferent=function(e,r,n,i){for(var a=e.getX()+n,o=e.getY()+i;this.isValid(a,o)&&this.image.get(a,o)===r;)a+=n,o+=i;for(a-=n,o-=i;this.isValid(a,o)&&this.image.get(a,o)===r;)a+=n;for(a-=n;this.isValid(a,o)&&this.image.get(a,o)===r;)o+=i;return o-=i,new Se(a,o)},t.prototype.expandSquare=function(e,r,n){var i=n/(2*r),a=e[0].getX()-e[2].getX(),o=e[0].getY()-e[2].getY(),s=(e[0].getX()+e[2].getX())/2,l=(e[0].getY()+e[2].getY())/2,c=new k(s+i*a,l+i*o),f=new k(s-i*a,l-i*o);a=e[1].getX()-e[3].getX(),o=e[1].getY()-e[3].getY(),s=(e[1].getX()+e[3].getX())/2,l=(e[1].getY()+e[3].getY())/2;var d=new k(s+i*a,l+i*o),v=new k(s-i*a,l-i*o),h=[c,d,f,v];return h},t.prototype.isValid=function(e,r){return e>=0&&e<this.image.getWidth()&&r>0&&r<this.image.getHeight()},t.prototype.isValidPoint=function(e){var r=X.round(e.getX()),n=X.round(e.getY());return this.isValid(r,n)},t.prototype.distancePoint=function(e,r){return X.distance(e.getX(),e.getY(),r.getX(),r.getY())},t.prototype.distanceResultPoint=function(e,r){return X.distance(e.getX(),e.getY(),r.getX(),r.getY())},t.prototype.getDimension=function(){return this.compact?4*this.nbLayers+11:this.nbLayers<=4?4*this.nbLayers+15:4*this.nbLayers+2*(G.truncDivision(this.nbLayers-4,8)+1)+15},t})(),Dn=(function(){function t(){}return t.prototype.decode=function(e,r){r===void 0&&(r=null);var n=null,i=new xc(e.getBlackMatrix()),a=null,o=null;try{var s=i.detectMirror(!1);a=s.getPoints(),this.reportFoundResultPoints(r,a),o=new mi().decode(s)}catch(d){n=d}if(o==null)try{var s=i.detectMirror(!0);a=s.getPoints(),this.reportFoundResultPoints(r,a),o=new mi().decode(s)}catch(d){throw n??d}var l=new Be(o.getText(),o.getRawBytes(),o.getNumBits(),a,U.AZTEC,ne.currentTimeMillis()),c=o.getByteSegments();c!=null&&l.putMetadata(we.BYTE_SEGMENTS,c);var f=o.getECLevel();return f!=null&&l.putMetadata(we.ERROR_CORRECTION_LEVEL,f),l},t.prototype.reportFoundResultPoints=function(e,r){if(e!=null){var n=e.get(le.NEED_RESULT_POINT_CALLBACK);n!=null&&r.forEach(function(i,a,o){n.foundPossibleResultPoint(i)})}},t.prototype.reset=function(){},t})(),yc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();(function(t){yc(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Dn,r)||this}return e})(Ut);var Ee=(function(){function t(){}return t.prototype.decode=function(e,r){try{return this.doDecode(e,r)}catch{var n=r&&r.get(le.TRY_HARDER)===!0;if(n&&e.isRotateSupported()){var i=e.rotateCounterClockwise(),a=this.doDecode(i,r),o=a.getResultMetadata(),s=270;o!==null&&o.get(we.ORIENTATION)===!0&&(s=s+o.get(we.ORIENTATION)%360),a.putMetadata(we.ORIENTATION,s);var l=a.getResultPoints();if(l!==null)for(var c=i.getHeight(),f=0;f<l.length;f++)l[f]=new k(c-l[f].getY()-1,l[f].getX());return a}else throw new I}},t.prototype.reset=function(){},t.prototype.doDecode=function(e,r){var n=e.getWidth(),i=e.getHeight(),a=new pe(n),o=r&&r.get(le.TRY_HARDER)===!0,s=Math.max(1,i>>(o?8:5)),l;o?l=i:l=15;for(var c=Math.trunc(i/2),f=0;f<l;f++){var d=Math.trunc((f+1)/2),v=(f&1)===0,h=c+s*(v?d:-d);if(h<0||h>=i)break;try{a=e.getBlackRow(h,a)}catch{continue}for(var p=function(m){if(m===1&&(a.reverse(),r&&r.get(le.NEED_RESULT_POINT_CALLBACK)===!0)){var A=new Map;r.forEach(function(b,O){return A.set(O,b)}),A.delete(le.NEED_RESULT_POINT_CALLBACK),r=A}try{var E=g.decodeRow(h,a,r);if(m===1){E.putMetadata(we.ORIENTATION,180);var C=E.getResultPoints();C!==null&&(C[0]=new k(n-C[0].getX()-1,C[0].getY()),C[1]=new k(n-C[1].getX()-1,C[1].getY()))}return{value:E}}catch{}},g=this,y=0;y<2;y++){var w=p(y);if(typeof w=="object")return w.value}}throw new I},t.recordPattern=function(e,r,n){for(var i=n.length,a=0;a<i;a++)n[a]=0;var o=e.getSize();if(r>=o)throw new I;for(var s=!e.get(r),l=0,c=r;c<o;){if(e.get(c)!==s)n[l]++;else{if(++l===i)break;n[l]=1,s=!s}c++}if(!(l===i||l===i-1&&c===o))throw new I},t.recordPatternInReverse=function(e,r,n){for(var i=n.length,a=e.get(r);r>0&&i>=0;)e.get(--r)!==a&&(i--,a=!a);if(i>=0)throw new I;t.recordPattern(e,r+1,n)},t.patternMatchVariance=function(e,r,n){for(var i=e.length,a=0,o=0,s=0;s<i;s++)a+=e[s],o+=r[s];if(a<o)return Number.POSITIVE_INFINITY;var l=a/o;n*=l;for(var c=0,f=0;f<i;f++){var d=e[f],v=r[f]*l,h=d>v?d-v:v-d;if(h>n)return Number.POSITIVE_INFINITY;c+=h}return c/a},t})(),mc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ei=(function(t){mc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.findStartPattern=function(r){for(var n=r.getSize(),i=r.getNextSet(0),a=0,o=Int32Array.from([0,0,0,0,0,0]),s=i,l=!1,c=6,f=i;f<n;f++)if(r.get(f)!==l)o[a]++;else{if(a===c-1){for(var d=e.MAX_AVG_VARIANCE,v=-1,h=e.CODE_START_A;h<=e.CODE_START_C;h++){var p=Ee.patternMatchVariance(o,e.CODE_PATTERNS[h],e.MAX_INDIVIDUAL_VARIANCE);p<d&&(d=p,v=h)}if(v>=0&&r.isRange(Math.max(0,s-(f-s)/2),s,!1))return Int32Array.from([s,f,v]);s+=o[0]+o[1],o=o.slice(2,o.length-1),o[a-1]=0,o[a]=0,a--}else a++;o[a]=1,l=!l}throw new I},e.decodeCode=function(r,n,i){Ee.recordPattern(r,i,n);for(var a=e.MAX_AVG_VARIANCE,o=-1,s=0;s<e.CODE_PATTERNS.length;s++){var l=e.CODE_PATTERNS[s],c=this.patternMatchVariance(n,l,e.MAX_INDIVIDUAL_VARIANCE);c<a&&(a=c,o=s)}if(o>=0)return o;throw new I},e.prototype.decodeRow=function(r,n,i){var a=i&&i.get(le.ASSUME_GS1)===!0,o=e.findStartPattern(n),s=o[2],l=0,c=new Uint8Array(20);c[l++]=s;var f;switch(s){case e.CODE_START_A:f=e.CODE_CODE_A;break;case e.CODE_START_B:f=e.CODE_CODE_B;break;case e.CODE_START_C:f=e.CODE_CODE_C;break;default:throw new R}for(var d=!1,v=!1,h="",p=o[0],g=o[1],y=Int32Array.from([0,0,0,0,0,0]),w=0,m=0,A=s,E=0,C=!0,b=!1,O=!1;!d;){var P=v;switch(v=!1,w=m,m=e.decodeCode(n,y,g),c[l++]=m,m!==e.CODE_STOP&&(C=!0),m!==e.CODE_STOP&&(E++,A+=E*m),p=g,g+=y.reduce(function(tt,rt){return tt+rt},0),m){case e.CODE_START_A:case e.CODE_START_B:case e.CODE_START_C:throw new R}switch(f){case e.CODE_CODE_A:if(m<64)O===b?h+=String.fromCharCode(32+m):h+=String.fromCharCode(32+m+128),O=!1;else if(m<96)O===b?h+=String.fromCharCode(m-64):h+=String.fromCharCode(m+64),O=!1;else switch(m!==e.CODE_STOP&&(C=!1),m){case e.CODE_FNC_1:a&&(h.length===0?h+="]C1":h+="");break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_A:!b&&O?(b=!0,O=!1):b&&O?(b=!1,O=!1):O=!0;break;case e.CODE_SHIFT:v=!0,f=e.CODE_CODE_B;break;case e.CODE_CODE_B:f=e.CODE_CODE_B;break;case e.CODE_CODE_C:f=e.CODE_CODE_C;break;case e.CODE_STOP:d=!0;break}break;case e.CODE_CODE_B:if(m<96)O===b?h+=String.fromCharCode(32+m):h+=String.fromCharCode(32+m+128),O=!1;else switch(m!==e.CODE_STOP&&(C=!1),m){case e.CODE_FNC_1:a&&(h.length===0?h+="]C1":h+="");break;case e.CODE_FNC_2:case e.CODE_FNC_3:break;case e.CODE_FNC_4_B:!b&&O?(b=!0,O=!1):b&&O?(b=!1,O=!1):O=!0;break;case e.CODE_SHIFT:v=!0,f=e.CODE_CODE_A;break;case e.CODE_CODE_A:f=e.CODE_CODE_A;break;case e.CODE_CODE_C:f=e.CODE_CODE_C;break;case e.CODE_STOP:d=!0;break}break;case e.CODE_CODE_C:if(m<100)m<10&&(h+="0"),h+=m;else switch(m!==e.CODE_STOP&&(C=!1),m){case e.CODE_FNC_1:a&&(h.length===0?h+="]C1":h+="");break;case e.CODE_CODE_A:f=e.CODE_CODE_A;break;case e.CODE_CODE_B:f=e.CODE_CODE_B;break;case e.CODE_STOP:d=!0;break}break}P&&(f=f===e.CODE_CODE_A?e.CODE_CODE_B:e.CODE_CODE_A)}var H=g-p;if(g=n.getNextUnset(g),!n.isRange(g,Math.min(n.getSize(),g+(g-p)/2),!1))throw new I;if(A-=E*w,A%103!==w)throw new me;var L=h.length;if(L===0)throw new I;L>0&&C&&(f===e.CODE_CODE_C?h=h.substring(0,L-2):h=h.substring(0,L-1));for(var te=(o[1]+o[0])/2,V=p+H/2,z=c.length,he=new Uint8Array(z),He=0;He<z;He++)he[He]=c[He];var vr=[new k(te,r),new k(V,r)];return new Be(h,he,0,vr,U.CODE_128,new Date().getTime())},e.CODE_PATTERNS=[Int32Array.from([2,1,2,2,2,2]),Int32Array.from([2,2,2,1,2,2]),Int32Array.from([2,2,2,2,2,1]),Int32Array.from([1,2,1,2,2,3]),Int32Array.from([1,2,1,3,2,2]),Int32Array.from([1,3,1,2,2,2]),Int32Array.from([1,2,2,2,1,3]),Int32Array.from([1,2,2,3,1,2]),Int32Array.from([1,3,2,2,1,2]),Int32Array.from([2,2,1,2,1,3]),Int32Array.from([2,2,1,3,1,2]),Int32Array.from([2,3,1,2,1,2]),Int32Array.from([1,1,2,2,3,2]),Int32Array.from([1,2,2,1,3,2]),Int32Array.from([1,2,2,2,3,1]),Int32Array.from([1,1,3,2,2,2]),Int32Array.from([1,2,3,1,2,2]),Int32Array.from([1,2,3,2,2,1]),Int32Array.from([2,2,3,2,1,1]),Int32Array.from([2,2,1,1,3,2]),Int32Array.from([2,2,1,2,3,1]),Int32Array.from([2,1,3,2,1,2]),Int32Array.from([2,2,3,1,1,2]),Int32Array.from([3,1,2,1,3,1]),Int32Array.from([3,1,1,2,2,2]),Int32Array.from([3,2,1,1,2,2]),Int32Array.from([3,2,1,2,2,1]),Int32Array.from([3,1,2,2,1,2]),Int32Array.from([3,2,2,1,1,2]),Int32Array.from([3,2,2,2,1,1]),Int32Array.from([2,1,2,1,2,3]),Int32Array.from([2,1,2,3,2,1]),Int32Array.from([2,3,2,1,2,1]),Int32Array.from([1,1,1,3,2,3]),Int32Array.from([1,3,1,1,2,3]),Int32Array.from([1,3,1,3,2,1]),Int32Array.from([1,1,2,3,1,3]),Int32Array.from([1,3,2,1,1,3]),Int32Array.from([1,3,2,3,1,1]),Int32Array.from([2,1,1,3,1,3]),Int32Array.from([2,3,1,1,1,3]),Int32Array.from([2,3,1,3,1,1]),Int32Array.from([1,1,2,1,3,3]),Int32Array.from([1,1,2,3,3,1]),Int32Array.from([1,3,2,1,3,1]),Int32Array.from([1,1,3,1,2,3]),Int32Array.from([1,1,3,3,2,1]),Int32Array.from([1,3,3,1,2,1]),Int32Array.from([3,1,3,1,2,1]),Int32Array.from([2,1,1,3,3,1]),Int32Array.from([2,3,1,1,3,1]),Int32Array.from([2,1,3,1,1,3]),Int32Array.from([2,1,3,3,1,1]),Int32Array.from([2,1,3,1,3,1]),Int32Array.from([3,1,1,1,2,3]),Int32Array.from([3,1,1,3,2,1]),Int32Array.from([3,3,1,1,2,1]),Int32Array.from([3,1,2,1,1,3]),Int32Array.from([3,1,2,3,1,1]),Int32Array.from([3,3,2,1,1,1]),Int32Array.from([3,1,4,1,1,1]),Int32Array.from([2,2,1,4,1,1]),Int32Array.from([4,3,1,1,1,1]),Int32Array.from([1,1,1,2,2,4]),Int32Array.from([1,1,1,4,2,2]),Int32Array.from([1,2,1,1,2,4]),Int32Array.from([1,2,1,4,2,1]),Int32Array.from([1,4,1,1,2,2]),Int32Array.from([1,4,1,2,2,1]),Int32Array.from([1,1,2,2,1,4]),Int32Array.from([1,1,2,4,1,2]),Int32Array.from([1,2,2,1,1,4]),Int32Array.from([1,2,2,4,1,1]),Int32Array.from([1,4,2,1,1,2]),Int32Array.from([1,4,2,2,1,1]),Int32Array.from([2,4,1,2,1,1]),Int32Array.from([2,2,1,1,1,4]),Int32Array.from([4,1,3,1,1,1]),Int32Array.from([2,4,1,1,1,2]),Int32Array.from([1,3,4,1,1,1]),Int32Array.from([1,1,1,2,4,2]),Int32Array.from([1,2,1,1,4,2]),Int32Array.from([1,2,1,2,4,1]),Int32Array.from([1,1,4,2,1,2]),Int32Array.from([1,2,4,1,1,2]),Int32Array.from([1,2,4,2,1,1]),Int32Array.from([4,1,1,2,1,2]),Int32Array.from([4,2,1,1,1,2]),Int32Array.from([4,2,1,2,1,1]),Int32Array.from([2,1,2,1,4,1]),Int32Array.from([2,1,4,1,2,1]),Int32Array.from([4,1,2,1,2,1]),Int32Array.from([1,1,1,1,4,3]),Int32Array.from([1,1,1,3,4,1]),Int32Array.from([1,3,1,1,4,1]),Int32Array.from([1,1,4,1,1,3]),Int32Array.from([1,1,4,3,1,1]),Int32Array.from([4,1,1,1,1,3]),Int32Array.from([4,1,1,3,1,1]),Int32Array.from([1,1,3,1,4,1]),Int32Array.from([1,1,4,1,3,1]),Int32Array.from([3,1,1,1,4,1]),Int32Array.from([4,1,1,1,3,1]),Int32Array.from([2,1,1,4,1,2]),Int32Array.from([2,1,1,2,1,4]),Int32Array.from([2,1,1,2,3,2]),Int32Array.from([2,3,3,1,1,1,2])],e.MAX_AVG_VARIANCE=.25,e.MAX_INDIVIDUAL_VARIANCE=.7,e.CODE_SHIFT=98,e.CODE_CODE_C=99,e.CODE_CODE_B=100,e.CODE_CODE_A=101,e.CODE_FNC_1=102,e.CODE_FNC_2=97,e.CODE_FNC_3=96,e.CODE_FNC_4_A=101,e.CODE_FNC_4_B=100,e.CODE_START_A=103,e.CODE_START_B=104,e.CODE_START_C=105,e.CODE_STOP=106,e})(Ee),wc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),fn=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ai=(function(t){wc(e,t);function e(r,n){r===void 0&&(r=!1),n===void 0&&(n=!1);var i=t.call(this)||this;return i.usingCheckDigit=r,i.extendedMode=n,i.decodeRowResult="",i.counters=new Int32Array(9),i}return e.prototype.decodeRow=function(r,n,i){var a,o,s,l,c=this.counters;c.fill(0),this.decodeRowResult="";var f=e.findAsteriskPattern(n,c),d=n.getNextSet(f[1]),v=n.getSize(),h,p;do{e.recordPattern(n,d,c);var g=e.toNarrowWidePattern(c);if(g<0)throw new I;h=e.patternToChar(g),this.decodeRowResult+=h,p=d;try{for(var y=(a=void 0,fn(c)),w=y.next();!w.done;w=y.next()){var m=w.value;d+=m}}catch(z){a={error:z}}finally{try{w&&!w.done&&(o=y.return)&&o.call(y)}finally{if(a)throw a.error}}d=n.getNextSet(d)}while(h!=="*");this.decodeRowResult=this.decodeRowResult.substring(0,this.decodeRowResult.length-1);var A=0;try{for(var E=fn(c),C=E.next();!C.done;C=E.next()){var m=C.value;A+=m}}catch(z){s={error:z}}finally{try{C&&!C.done&&(l=E.return)&&l.call(E)}finally{if(s)throw s.error}}var b=d-p-A;if(d!==v&&b*2<A)throw new I;if(this.usingCheckDigit){for(var O=this.decodeRowResult.length-1,P=0,H=0;H<O;H++)P+=e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(H));if(this.decodeRowResult.charAt(O)!==e.ALPHABET_STRING.charAt(P%43))throw new me;this.decodeRowResult=this.decodeRowResult.substring(0,O)}if(this.decodeRowResult.length===0)throw new I;var L;this.extendedMode?L=e.decodeExtended(this.decodeRowResult):L=this.decodeRowResult;var te=(f[1]+f[0])/2,V=p+A/2;return new Be(L,null,0,[new k(te,r),new k(V,r)],U.CODE_39,new Date().getTime())},e.findAsteriskPattern=function(r,n){for(var i=r.getSize(),a=r.getNextSet(0),o=0,s=a,l=!1,c=n.length,f=a;f<i;f++)if(r.get(f)!==l)n[o]++;else{if(o===c-1){if(this.toNarrowWidePattern(n)===e.ASTERISK_ENCODING&&r.isRange(Math.max(0,s-Math.floor((f-s)/2)),s,!1))return[s,f];s+=n[0]+n[1],n.copyWithin(0,2,2+o-1),n[o-1]=0,n[o]=0,o--}else o++;n[o]=1,l=!l}throw new I},e.toNarrowWidePattern=function(r){var n,i,a=r.length,o=0,s;do{var l=2147483647;try{for(var c=(n=void 0,fn(r)),f=c.next();!f.done;f=c.next()){var d=f.value;d<l&&d>o&&(l=d)}}catch(g){n={error:g}}finally{try{f&&!f.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}o=l,s=0;for(var v=0,h=0,p=0;p<a;p++){var d=r[p];d>o&&(h|=1<<a-1-p,s++,v+=d)}if(s===3){for(var p=0;p<a&&s>0;p++){var d=r[p];if(d>o&&(s--,d*2>=v))return-1}return h}}while(s>3);return-1},e.patternToChar=function(r){for(var n=0;n<e.CHARACTER_ENCODINGS.length;n++)if(e.CHARACTER_ENCODINGS[n]===r)return e.ALPHABET_STRING.charAt(n);if(r===e.ASTERISK_ENCODING)return"*";throw new I},e.decodeExtended=function(r){for(var n=r.length,i="",a=0;a<n;a++){var o=r.charAt(a);if(o==="+"||o==="$"||o==="%"||o==="/"){var s=r.charAt(a+1),l="\0";switch(o){case"+":if(s>="A"&&s<="Z")l=String.fromCharCode(s.charCodeAt(0)+32);else throw new R;break;case"$":if(s>="A"&&s<="Z")l=String.fromCharCode(s.charCodeAt(0)-64);else throw new R;break;case"%":if(s>="A"&&s<="E")l=String.fromCharCode(s.charCodeAt(0)-38);else if(s>="F"&&s<="J")l=String.fromCharCode(s.charCodeAt(0)-11);else if(s>="K"&&s<="O")l=String.fromCharCode(s.charCodeAt(0)+16);else if(s>="P"&&s<="T")l=String.fromCharCode(s.charCodeAt(0)+43);else if(s==="U")l="\0";else if(s==="V")l="@";else if(s==="W")l="`";else if(s==="X"||s==="Y"||s==="Z")l="";else throw new R;break;case"/":if(s>="A"&&s<="O")l=String.fromCharCode(s.charCodeAt(0)-32);else if(s==="Z")l=":";else throw new R;break}i+=l,a++}else i+=o}return i},e.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",e.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],e.ASTERISK_ENCODING=148,e})(Ee),Ec=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ac=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_i=(function(t){Ec(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.narrowLineWidth=-1,r}return e.prototype.decodeRow=function(r,n,i){var a,o,s=this.decodeStart(n),l=this.decodeEnd(n),c=new J;e.decodeMiddle(n,s[1],l[0],c);var f=c.toString(),d=null;i!=null&&(d=i.get(le.ALLOWED_LENGTHS)),d==null&&(d=e.DEFAULT_ALLOWED_LENGTHS);var v=f.length,h=!1,p=0;try{for(var g=Ac(d),y=g.next();!y.done;y=g.next()){var w=y.value;if(v===w){h=!0;break}w>p&&(p=w)}}catch(E){a={error:E}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}if(!h&&v>p&&(h=!0),!h)throw new R;var m=[new k(s[1],r),new k(l[0],r)],A=new Be(f,null,0,m,U.ITF,new Date().getTime());return A},e.decodeMiddle=function(r,n,i,a){var o=new Int32Array(10),s=new Int32Array(5),l=new Int32Array(5);for(o.fill(0),s.fill(0),l.fill(0);n<i;){Ee.recordPattern(r,n,o);for(var c=0;c<5;c++){var f=2*c;s[c]=o[f],l[c]=o[f+1]}var d=e.decodeDigit(s);a.append(d.toString()),d=this.decodeDigit(l),a.append(d.toString()),o.forEach(function(v){n+=v})}},e.prototype.decodeStart=function(r){var n=e.skipWhiteSpace(r),i=e.findGuardPattern(r,n,e.START_PATTERN);return this.narrowLineWidth=(i[1]-i[0])/4,this.validateQuietZone(r,i[0]),i},e.prototype.validateQuietZone=function(r,n){var i=this.narrowLineWidth*10;i=i<n?i:n;for(var a=n-1;i>0&&a>=0&&!r.get(a);a--)i--;if(i!==0)throw new I},e.skipWhiteSpace=function(r){var n=r.getSize(),i=r.getNextSet(0);if(i===n)throw new I;return i},e.prototype.decodeEnd=function(r){r.reverse();try{var n=e.skipWhiteSpace(r),i=void 0;try{i=e.findGuardPattern(r,n,e.END_PATTERN_REVERSED[0])}catch(o){o instanceof I&&(i=e.findGuardPattern(r,n,e.END_PATTERN_REVERSED[1]))}this.validateQuietZone(r,i[0]);var a=i[0];return i[0]=r.getSize()-i[1],i[1]=r.getSize()-a,i}finally{r.reverse()}},e.findGuardPattern=function(r,n,i){var a=i.length,o=new Int32Array(a),s=r.getSize(),l=!1,c=0,f=n;o.fill(0);for(var d=n;d<s;d++)if(r.get(d)!==l)o[c]++;else{if(c===a-1){if(Ee.patternMatchVariance(o,i,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return[f,d];f+=o[0]+o[1],ne.arraycopy(o,2,o,0,c-1),o[c-1]=0,o[c]=0,c--}else c++;o[c]=1,l=!l}throw new I},e.decodeDigit=function(r){for(var n=e.MAX_AVG_VARIANCE,i=-1,a=e.PATTERNS.length,o=0;o<a;o++){var s=e.PATTERNS[o],l=Ee.patternMatchVariance(r,s,e.MAX_INDIVIDUAL_VARIANCE);l<n?(n=l,i=o):l===n&&(i=-1)}if(i>=0)return i%10;throw new I},e.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],e.MAX_AVG_VARIANCE=.38,e.MAX_INDIVIDUAL_VARIANCE=.5,e.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],e.START_PATTERN=Int32Array.from([1,1,1,1]),e.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])],e})(Ee),_c=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Mt=(function(t){_c(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.decodeRowStringBuffer="",r}return e.findStartGuardPattern=function(r){for(var n=!1,i,a=0,o=Int32Array.from([0,0,0]);!n;){o=Int32Array.from([0,0,0]),i=e.findGuardPattern(r,a,!1,this.START_END_PATTERN,o);var s=i[0];a=i[1];var l=s-(a-s);l>=0&&(n=r.isRange(l,s,!1))}return i},e.checkChecksum=function(r){return e.checkStandardUPCEANChecksum(r)},e.checkStandardUPCEANChecksum=function(r){var n=r.length;if(n===0)return!1;var i=parseInt(r.charAt(n-1),10);return e.getStandardUPCEANChecksum(r.substring(0,n-1))===i},e.getStandardUPCEANChecksum=function(r){for(var n=r.length,i=0,a=n-1;a>=0;a-=2){var o=r.charAt(a).charCodeAt(0)-48;if(o<0||o>9)throw new R;i+=o}i*=3;for(var a=n-2;a>=0;a-=2){var o=r.charAt(a).charCodeAt(0)-48;if(o<0||o>9)throw new R;i+=o}return(1e3-i)%10},e.decodeEnd=function(r,n){return e.findGuardPattern(r,n,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e.findGuardPatternWithoutCounters=function(r,n,i,a){return this.findGuardPattern(r,n,i,a,new Int32Array(a.length))},e.findGuardPattern=function(r,n,i,a,o){var s=r.getSize();n=i?r.getNextUnset(n):r.getNextSet(n);for(var l=0,c=n,f=a.length,d=i,v=n;v<s;v++)if(r.get(v)!==d)o[l]++;else{if(l===f-1){if(Ee.patternMatchVariance(o,a,e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return Int32Array.from([c,v]);c+=o[0]+o[1];for(var h=o.slice(2,o.length-1),p=0;p<l-1;p++)o[p]=h[p];o[l-1]=0,o[l]=0,l--}else l++;o[l]=1,d=!d}throw new I},e.decodeDigit=function(r,n,i,a){this.recordPattern(r,i,n);for(var o=this.MAX_AVG_VARIANCE,s=-1,l=a.length,c=0;c<l;c++){var f=a[c],d=Ee.patternMatchVariance(n,f,e.MAX_INDIVIDUAL_VARIANCE);d<o&&(o=d,s=c)}if(s>=0)return s;throw new I},e.MAX_AVG_VARIANCE=.48,e.MAX_INDIVIDUAL_VARIANCE=.7,e.START_END_PATTERN=Int32Array.from([1,1,1]),e.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),e.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])],e})(Ee),Cc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},bc=(function(){function t(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var i=this.decodeRowStringBuffer,a=this.decodeMiddle(r,n,i),o=i.toString(),s=t.parseExtensionString(o),l=[new k((n[0]+n[1])/2,e),new k(a,e)],c=new Be(o,null,0,l,U.UPC_EAN_EXTENSION,new Date().getTime());return s!=null&&c.putAllMetadata(s),c},t.prototype.decodeMiddle=function(e,r,n){var i,a,o=this.decodeMiddleCounters;o[0]=0,o[1]=0,o[2]=0,o[3]=0;for(var s=e.getSize(),l=r[1],c=0,f=0;f<5&&l<s;f++){var d=Mt.decodeDigit(e,o,l,Mt.L_AND_G_PATTERNS);n+=String.fromCharCode(48+d%10);try{for(var v=(i=void 0,Cc(o)),h=v.next();!h.done;h=v.next()){var p=h.value;l+=p}}catch(y){i={error:y}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}d>=10&&(c|=1<<4-f),f!==4&&(l=e.getNextSet(l),l=e.getNextUnset(l))}if(n.length!==5)throw new I;var g=this.determineCheckDigit(c);if(t.extensionChecksum(n.toString())!==g)throw new I;return l},t.extensionChecksum=function(e){for(var r=e.length,n=0,i=r-2;i>=0;i-=2)n+=e.charAt(i).charCodeAt(0)-48;n*=3;for(var i=r-1;i>=0;i-=2)n+=e.charAt(i).charCodeAt(0)-48;return n*=3,n%10},t.prototype.determineCheckDigit=function(e){for(var r=0;r<10;r++)if(e===this.CHECK_DIGIT_ENCODINGS[r])return r;throw new I},t.parseExtensionString=function(e){if(e.length!==5)return null;var r=t.parseExtension5String(e);return r==null?null:new Map([[we.SUGGESTED_PRICE,r]])},t.parseExtension5String=function(e){var r;switch(e.charAt(0)){case"0":r="£";break;case"5":r="$";break;case"9":switch(e){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}r="";break;default:r="";break}var n=parseInt(e.substring(1)),i=(n/100).toString(),a=n%100,o=a<10?"0"+a:a.toString();return r+i+"."+o},t})(),Sc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ic=(function(){function t(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}return t.prototype.decodeRow=function(e,r,n){var i=this.decodeRowStringBuffer,a=this.decodeMiddle(r,n,i),o=i.toString(),s=t.parseExtensionString(o),l=[new k((n[0]+n[1])/2,e),new k(a,e)],c=new Be(o,null,0,l,U.UPC_EAN_EXTENSION,new Date().getTime());return s!=null&&c.putAllMetadata(s),c},t.prototype.decodeMiddle=function(e,r,n){var i,a,o=this.decodeMiddleCounters;o[0]=0,o[1]=0,o[2]=0,o[3]=0;for(var s=e.getSize(),l=r[1],c=0,f=0;f<2&&l<s;f++){var d=Mt.decodeDigit(e,o,l,Mt.L_AND_G_PATTERNS);n+=String.fromCharCode(48+d%10);try{for(var v=(i=void 0,Sc(o)),h=v.next();!h.done;h=v.next()){var p=h.value;l+=p}}catch(g){i={error:g}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}d>=10&&(c|=1<<1-f),f!==1&&(l=e.getNextSet(l),l=e.getNextUnset(l))}if(n.length!==2)throw new I;if(parseInt(n.toString())%4!==c)throw new I;return l},t.parseExtensionString=function(e){return e.length!==2?null:new Map([[we.ISSUE_NUMBER,parseInt(e)]])},t})(),Oc=(function(){function t(){}return t.decodeRow=function(e,r,n){var i=Mt.findGuardPattern(r,n,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{var a=new bc;return a.decodeRow(e,r,i)}catch{var o=new Ic;return o.decodeRow(e,r,i)}},t.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]),t})(),Tc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),fe=(function(t){Tc(e,t);function e(){var r=t.call(this)||this;r.decodeRowStringBuffer="",e.L_AND_G_PATTERNS=e.L_PATTERNS.map(function(s){return Int32Array.from(s)});for(var n=10;n<20;n++){for(var i=e.L_PATTERNS[n-10],a=new Int32Array(i.length),o=0;o<i.length;o++)a[o]=i[i.length-o-1];e.L_AND_G_PATTERNS[n]=a}return r}return e.prototype.decodeRow=function(r,n,i){var a=e.findStartGuardPattern(n),o=i==null?null:i.get(le.NEED_RESULT_POINT_CALLBACK);if(o!=null){var s=new k((a[0]+a[1])/2,r);o.foundPossibleResultPoint(s)}var l=this.decodeMiddle(n,a,this.decodeRowStringBuffer),c=l.rowOffset,f=l.resultString;if(o!=null){var d=new k(c,r);o.foundPossibleResultPoint(d)}var v=e.decodeEnd(n,c);if(o!=null){var h=new k((v[0]+v[1])/2,r);o.foundPossibleResultPoint(h)}var p=v[1],g=p+(p-v[0]);if(g>=n.getSize()||!n.isRange(p,g,!1))throw new I;var y=f.toString();if(y.length<8)throw new R;if(!e.checkChecksum(y))throw new me;var w=(a[1]+a[0])/2,m=(v[1]+v[0])/2,A=this.getBarcodeFormat(),E=[new k(w,r),new k(m,r)],C=new Be(y,null,0,E,A,new Date().getTime()),b=0;try{var O=Oc.decodeRow(r,n,v[1]);C.putMetadata(we.UPC_EAN_EXTENSION,O.getText()),C.putAllMetadata(O.getResultMetadata()),C.addResultPoints(O.getResultPoints()),b=O.getText().length}catch{}var P=i==null?null:i.get(le.ALLOWED_EAN_EXTENSIONS);if(P!=null){var H=!1;for(var L in P)if(b.toString()===L){H=!0;break}if(!H)throw new I}return A===U.EAN_13||U.UPC_A,C},e.checkChecksum=function(r){return e.checkStandardUPCEANChecksum(r)},e.checkStandardUPCEANChecksum=function(r){var n=r.length;if(n===0)return!1;var i=parseInt(r.charAt(n-1),10);return e.getStandardUPCEANChecksum(r.substring(0,n-1))===i},e.getStandardUPCEANChecksum=function(r){for(var n=r.length,i=0,a=n-1;a>=0;a-=2){var o=r.charAt(a).charCodeAt(0)-48;if(o<0||o>9)throw new R;i+=o}i*=3;for(var a=n-2;a>=0;a-=2){var o=r.charAt(a).charCodeAt(0)-48;if(o<0||o>9)throw new R;i+=o}return(1e3-i)%10},e.decodeEnd=function(r,n){return e.findGuardPattern(r,n,!1,e.START_END_PATTERN,new Int32Array(e.START_END_PATTERN.length).fill(0))},e})(Mt),Nc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ci=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Bn=(function(t){Nc(e,t);function e(){var r=t.call(this)||this;return r.decodeMiddleCounters=Int32Array.from([0,0,0,0]),r}return e.prototype.decodeMiddle=function(r,n,i){var a,o,s,l,c=this.decodeMiddleCounters;c[0]=0,c[1]=0,c[2]=0,c[3]=0;for(var f=r.getSize(),d=n[1],v=0,h=0;h<6&&d<f;h++){var p=fe.decodeDigit(r,c,d,fe.L_AND_G_PATTERNS);i+=String.fromCharCode(48+p%10);try{for(var g=(a=void 0,Ci(c)),y=g.next();!y.done;y=g.next()){var w=y.value;d+=w}}catch(C){a={error:C}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}p>=10&&(v|=1<<5-h)}i=e.determineFirstDigit(i,v);var m=fe.findGuardPattern(r,d,!0,fe.MIDDLE_PATTERN,new Int32Array(fe.MIDDLE_PATTERN.length).fill(0));d=m[1];for(var h=0;h<6&&d<f;h++){var p=fe.decodeDigit(r,c,d,fe.L_PATTERNS);i+=String.fromCharCode(48+p);try{for(var A=(s=void 0,Ci(c)),E=A.next();!E.done;E=A.next()){var w=E.value;d+=w}}catch(O){s={error:O}}finally{try{E&&!E.done&&(l=A.return)&&l.call(A)}finally{if(s)throw s.error}}}return{rowOffset:d,resultString:i}},e.prototype.getBarcodeFormat=function(){return U.EAN_13},e.determineFirstDigit=function(r,n){for(var i=0;i<10;i++)if(n===this.FIRST_DIGIT_ENCODINGS[i])return r=String.fromCharCode(48+i)+r,r;throw new I},e.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],e})(fe),Dc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),bi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Si=(function(t){Dc(e,t);function e(){var r=t.call(this)||this;return r.decodeMiddleCounters=Int32Array.from([0,0,0,0]),r}return e.prototype.decodeMiddle=function(r,n,i){var a,o,s,l,c=this.decodeMiddleCounters;c[0]=0,c[1]=0,c[2]=0,c[3]=0;for(var f=r.getSize(),d=n[1],v=0;v<4&&d<f;v++){var h=fe.decodeDigit(r,c,d,fe.L_PATTERNS);i+=String.fromCharCode(48+h);try{for(var p=(a=void 0,bi(c)),g=p.next();!g.done;g=p.next()){var y=g.value;d+=y}}catch(E){a={error:E}}finally{try{g&&!g.done&&(o=p.return)&&o.call(p)}finally{if(a)throw a.error}}}var w=fe.findGuardPattern(r,d,!0,fe.MIDDLE_PATTERN,new Int32Array(fe.MIDDLE_PATTERN.length).fill(0));d=w[1];for(var v=0;v<4&&d<f;v++){var h=fe.decodeDigit(r,c,d,fe.L_PATTERNS);i+=String.fromCharCode(48+h);try{for(var m=(s=void 0,bi(c)),A=m.next();!A.done;A=m.next()){var y=A.value;d+=y}}catch(b){s={error:b}}finally{try{A&&!A.done&&(l=m.return)&&l.call(m)}finally{if(s)throw s.error}}}return{rowOffset:d,resultString:i}},e.prototype.getBarcodeFormat=function(){return U.EAN_8},e})(fe),Bc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ii=(function(t){Bc(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.ean13Reader=new Bn,r}return e.prototype.getBarcodeFormat=function(){return U.UPC_A},e.prototype.decode=function(r,n){return this.maybeReturnResult(this.ean13Reader.decode(r))},e.prototype.decodeRow=function(r,n,i){return this.maybeReturnResult(this.ean13Reader.decodeRow(r,n,i))},e.prototype.decodeMiddle=function(r,n,i){return this.ean13Reader.decodeMiddle(r,n,i)},e.prototype.maybeReturnResult=function(r){var n=r.getText();if(n.charAt(0)==="0"){var i=new Be(n.substring(1),null,null,r.getResultPoints(),U.UPC_A);return r.getResultMetadata()!=null&&i.putAllMetadata(r.getResultMetadata()),i}else throw new I},e.prototype.reset=function(){this.ean13Reader.reset()},e})(fe),Rc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Pc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Oi=(function(t){Rc(e,t);function e(){var r=t.call(this)||this;return r.decodeMiddleCounters=new Int32Array(4),r}return e.prototype.decodeMiddle=function(r,n,i){var a,o,s=this.decodeMiddleCounters.map(function(y){return y});s[0]=0,s[1]=0,s[2]=0,s[3]=0;for(var l=r.getSize(),c=n[1],f=0,d=0;d<6&&c<l;d++){var v=e.decodeDigit(r,s,c,e.L_AND_G_PATTERNS);i+=String.fromCharCode(48+v%10);try{for(var h=(a=void 0,Pc(s)),p=h.next();!p.done;p=h.next()){var g=p.value;c+=g}}catch(y){a={error:y}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(a)throw a.error}}v>=10&&(f|=1<<5-d)}return e.determineNumSysAndCheckDigit(new J(i),f),c},e.prototype.decodeEnd=function(r,n){return e.findGuardPatternWithoutCounters(r,n,!0,e.MIDDLE_END_PATTERN)},e.prototype.checkChecksum=function(r){return fe.checkChecksum(e.convertUPCEtoUPCA(r))},e.determineNumSysAndCheckDigit=function(r,n){for(var i=0;i<=1;i++)for(var a=0;a<10;a++)if(n===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[i][a]){r.insert(0,"0"+i),r.append("0"+a);return}throw I.getNotFoundInstance()},e.prototype.getBarcodeFormat=function(){return U.UPC_E},e.convertUPCEtoUPCA=function(r){var n=r.slice(1,7).split("").map(function(o){return o.charCodeAt(0)}),i=new J;i.append(r.charAt(0));var a=n[5];switch(a){case 0:case 1:case 2:i.appendChars(n,0,2),i.append(a),i.append("0000"),i.appendChars(n,2,3);break;case 3:i.appendChars(n,0,3),i.append("00000"),i.appendChars(n,3,2);break;case 4:i.appendChars(n,0,4),i.append("00000"),i.append(n[4]);break;default:i.appendChars(n,0,5),i.append("0000"),i.append(a);break}return r.length>=8&&i.append(r.charAt(7)),i.toString()},e.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),e.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,1])],e})(fe),kc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ti=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},dn=(function(t){kc(e,t);function e(r){var n=t.call(this)||this,i=r==null?null:r.get(le.POSSIBLE_FORMATS),a=[];return i!=null&&(i.indexOf(U.EAN_13)>-1&&a.push(new Bn),i.indexOf(U.UPC_A)>-1&&a.push(new Ii),i.indexOf(U.EAN_8)>-1&&a.push(new Si),i.indexOf(U.UPC_E)>-1&&a.push(new Oi)),a.length===0&&(a.push(new Bn),a.push(new Ii),a.push(new Si),a.push(new Oi)),n.readers=a,n}return e.prototype.decodeRow=function(r,n,i){var a,o;try{for(var s=Ti(this.readers),l=s.next();!l.done;l=s.next()){var c=l.value;try{var f=c.decodeRow(r,n,i),d=f.getBarcodeFormat()===U.EAN_13&&f.getText().charAt(0)==="0",v=i==null?null:i.get(le.POSSIBLE_FORMATS),h=v==null||v.includes(U.UPC_A);if(d&&h){var p=f.getRawBytes(),g=new Be(f.getText().substring(1),p,p?p.length:null,f.getResultPoints(),U.UPC_A);return g.putAllMetadata(f.getResultMetadata()),g}return f}catch{}}}catch(y){a={error:y}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(a)throw a.error}}throw new I},e.prototype.reset=function(){var r,n;try{for(var i=Ti(this.readers),a=i.next();!a.done;a=i.next()){var o=a.value;o.reset()}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e})(Ee),Mc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Lc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xt=(function(t){Mc(e,t);function e(){var r=t.call(this)||this;return r.decodeFinderCounters=new Int32Array(4),r.dataCharacterCounters=new Int32Array(8),r.oddRoundingErrors=new Array(4),r.evenRoundingErrors=new Array(4),r.oddCounts=new Array(r.dataCharacterCounters.length/2),r.evenCounts=new Array(r.dataCharacterCounters.length/2),r}return e.prototype.getDecodeFinderCounters=function(){return this.decodeFinderCounters},e.prototype.getDataCharacterCounters=function(){return this.dataCharacterCounters},e.prototype.getOddRoundingErrors=function(){return this.oddRoundingErrors},e.prototype.getEvenRoundingErrors=function(){return this.evenRoundingErrors},e.prototype.getOddCounts=function(){return this.oddCounts},e.prototype.getEvenCounts=function(){return this.evenCounts},e.prototype.parseFinderValue=function(r,n){for(var i=0;i<n.length;i++)if(Ee.patternMatchVariance(r,n[i],e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return i;throw new I},e.count=function(r){return X.sum(new Int32Array(r))},e.increment=function(r,n){for(var i=0,a=n[0],o=1;o<r.length;o++)n[o]>a&&(a=n[o],i=o);r[i]++},e.decrement=function(r,n){for(var i=0,a=n[0],o=1;o<r.length;o++)n[o]<a&&(a=n[o],i=o);r[i]--},e.isFinderPattern=function(r){var n,i,a=r[0]+r[1],o=a+r[2]+r[3],s=a/o;if(s>=e.MIN_FINDER_PATTERN_RATIO&&s<=e.MAX_FINDER_PATTERN_RATIO){var l=Number.MAX_SAFE_INTEGER,c=Number.MIN_SAFE_INTEGER;try{for(var f=Lc(r),d=f.next();!d.done;d=f.next()){var v=d.value;v>c&&(c=v),v<l&&(l=v)}}catch(h){n={error:h}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}return c<10*l}return!1},e.MAX_AVG_VARIANCE=.2,e.MAX_INDIVIDUAL_VARIANCE=.45,e.MIN_FINDER_PATTERN_RATIO=9.5/12,e.MAX_FINDER_PATTERN_RATIO=12.5/14,e})(Ee),Lr=(function(){function t(e,r){this.value=e,this.checksumPortion=r}return t.prototype.getValue=function(){return this.value},t.prototype.getChecksumPortion=function(){return this.checksumPortion},t.prototype.toString=function(){return this.value+"("+this.checksumPortion+")"},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value&&this.checksumPortion===r.checksumPortion},t.prototype.hashCode=function(){return this.value^this.checksumPortion},t})(),ha=(function(){function t(e,r,n,i,a){this.value=e,this.startEnd=r,this.value=e,this.startEnd=r,this.resultPoints=new Array,this.resultPoints.push(new k(n,a)),this.resultPoints.push(new k(i,a))}return t.prototype.getValue=function(){return this.value},t.prototype.getStartEnd=function(){return this.startEnd},t.prototype.getResultPoints=function(){return this.resultPoints},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.hashCode=function(){return this.value},t})(),Fc=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},St=(function(){function t(){}return t.getRSSvalue=function(e,r,n){var i,a,o=0;try{for(var s=Fc(e),l=s.next();!l.done;l=s.next()){var c=l.value;o+=c}}catch(m){i={error:m}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}for(var f=0,d=0,v=e.length,h=0;h<v-1;h++){var p=void 0;for(p=1,d|=1<<h;p<e[h];p++,d&=~(1<<h)){var g=t.combins(o-p-1,v-h-2);if(n&&d===0&&o-p-(v-h-1)>=v-h-1&&(g-=t.combins(o-p-(v-h),v-h-2)),v-h-1>1){for(var y=0,w=o-p-(v-h-2);w>r;w--)y+=t.combins(o-p-w-1,v-h-3);g-=y*(v-1-h)}else o-p>r&&g--;f+=g}o-=p}return f},t.combins=function(e,r){var n,i;e-r>r?(i=r,n=e-r):(i=e-r,n=r);for(var a=1,o=1,s=e;s>n;s--)a*=s,o<=i&&(a/=o,o++);for(;o<=i;)a/=o,o++;return a},t})(),Vc=(function(){function t(){}return t.buildBitArray=function(e){var r=e.length*2-1;e[e.length-1].getRightChar()==null&&(r-=1);for(var n=12*r,i=new pe(n),a=0,o=e[0],s=o.getRightChar().getValue(),l=11;l>=0;--l)(s&1<<l)!=0&&i.set(a),a++;for(var l=1;l<e.length;++l){for(var c=e[l],f=c.getLeftChar().getValue(),d=11;d>=0;--d)(f&1<<d)!=0&&i.set(a),a++;if(c.getRightChar()!=null)for(var v=c.getRightChar().getValue(),d=11;d>=0;--d)(v&1<<d)!=0&&i.set(a),a++}return i},t})(),pt=(function(){function t(e,r){r?this.decodedInformation=null:(this.finished=e,this.decodedInformation=r)}return t.prototype.getDecodedInformation=function(){return this.decodedInformation},t.prototype.isFinished=function(){return this.finished},t})(),Yn=(function(){function t(e){this.newPosition=e}return t.prototype.getNewPosition=function(){return this.newPosition},t})(),Uc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Le=(function(t){Uc(e,t);function e(r,n){var i=t.call(this,r)||this;return i.value=n,i}return e.prototype.getValue=function(){return this.value},e.prototype.isFNC1=function(){return this.value===e.FNC1},e.FNC1="$",e})(Yn),$c=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),gt=(function(t){$c(e,t);function e(r,n,i){var a=t.call(this,r)||this;return i?(a.remaining=!0,a.remainingValue=a.remainingValue):(a.remaining=!1,a.remainingValue=0),a.newString=n,a}return e.prototype.getNewString=function(){return this.newString},e.prototype.isRemaining=function(){return this.remaining},e.prototype.getRemainingValue=function(){return this.remainingValue},e})(Yn),Hc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ct=(function(t){Hc(e,t);function e(r,n,i){var a=t.call(this,r)||this;if(n<0||n>10||i<0||i>10)throw new R;return a.firstDigit=n,a.secondDigit=i,a}return e.prototype.getFirstDigit=function(){return this.firstDigit},e.prototype.getSecondDigit=function(){return this.secondDigit},e.prototype.getValue=function(){return this.firstDigit*10+this.secondDigit},e.prototype.isFirstDigitFNC1=function(){return this.firstDigit===e.FNC1},e.prototype.isSecondDigitFNC1=function(){return this.secondDigit===e.FNC1},e.prototype.isAnyFNC1=function(){return this.firstDigit===e.FNC1||this.secondDigit===e.FNC1},e.FNC1=10,e})(Yn),Er=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Gc=(function(){function t(){}return t.parseFieldsInGeneralPurpose=function(e){var r,n,i,a,o,s,l,c;if(!e)return null;if(e.length<2)throw new I;var f=e.substring(0,2);try{for(var d=Er(t.TWO_DIGIT_DATA_LENGTH),v=d.next();!v.done;v=d.next()){var h=v.value;if(h[0]===f)return h[1]===t.VARIABLE_LENGTH?t.processVariableAI(2,h[2],e):t.processFixedAI(2,h[1],e)}}catch(b){r={error:b}}finally{try{v&&!v.done&&(n=d.return)&&n.call(d)}finally{if(r)throw r.error}}if(e.length<3)throw new I;var p=e.substring(0,3);try{for(var g=Er(t.THREE_DIGIT_DATA_LENGTH),y=g.next();!y.done;y=g.next()){var h=y.value;if(h[0]===p)return h[1]===t.VARIABLE_LENGTH?t.processVariableAI(3,h[2],e):t.processFixedAI(3,h[1],e)}}catch(b){i={error:b}}finally{try{y&&!y.done&&(a=g.return)&&a.call(g)}finally{if(i)throw i.error}}try{for(var w=Er(t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH),m=w.next();!m.done;m=w.next()){var h=m.value;if(h[0]===p)return h[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,h[2],e):t.processFixedAI(4,h[1],e)}}catch(b){o={error:b}}finally{try{m&&!m.done&&(s=w.return)&&s.call(w)}finally{if(o)throw o.error}}if(e.length<4)throw new I;var A=e.substring(0,4);try{for(var E=Er(t.FOUR_DIGIT_DATA_LENGTH),C=E.next();!C.done;C=E.next()){var h=C.value;if(h[0]===A)return h[1]===t.VARIABLE_LENGTH?t.processVariableAI(4,h[2],e):t.processFixedAI(4,h[1],e)}}catch(b){l={error:b}}finally{try{C&&!C.done&&(c=E.return)&&c.call(E)}finally{if(l)throw l.error}}throw new I},t.processFixedAI=function(e,r,n){if(n.length<e)throw new I;var i=n.substring(0,e);if(n.length<e+r)throw new I;var a=n.substring(e,e+r),o=n.substring(e+r),s="("+i+")"+a,l=t.parseFieldsInGeneralPurpose(o);return l==null?s:s+l},t.processVariableAI=function(e,r,n){var i=n.substring(0,e),a;n.length<e+r?a=n.length:a=e+r;var o=n.substring(e,a),s=n.substring(a),l="("+i+")"+o,c=t.parseFieldsInGeneralPurpose(s);return c==null?l:l+c},t.VARIABLE_LENGTH=[],t.TWO_DIGIT_DATA_LENGTH=[["00",18],["01",14],["02",14],["10",t.VARIABLE_LENGTH,20],["11",6],["12",6],["13",6],["15",6],["17",6],["20",2],["21",t.VARIABLE_LENGTH,20],["22",t.VARIABLE_LENGTH,29],["30",t.VARIABLE_LENGTH,8],["37",t.VARIABLE_LENGTH,8],["90",t.VARIABLE_LENGTH,30],["91",t.VARIABLE_LENGTH,30],["92",t.VARIABLE_LENGTH,30],["93",t.VARIABLE_LENGTH,30],["94",t.VARIABLE_LENGTH,30],["95",t.VARIABLE_LENGTH,30],["96",t.VARIABLE_LENGTH,30],["97",t.VARIABLE_LENGTH,3],["98",t.VARIABLE_LENGTH,30],["99",t.VARIABLE_LENGTH,30]],t.THREE_DIGIT_DATA_LENGTH=[["240",t.VARIABLE_LENGTH,30],["241",t.VARIABLE_LENGTH,30],["242",t.VARIABLE_LENGTH,6],["250",t.VARIABLE_LENGTH,30],["251",t.VARIABLE_LENGTH,30],["253",t.VARIABLE_LENGTH,17],["254",t.VARIABLE_LENGTH,20],["400",t.VARIABLE_LENGTH,30],["401",t.VARIABLE_LENGTH,30],["402",17],["403",t.VARIABLE_LENGTH,30],["410",13],["411",13],["412",13],["413",13],["414",13],["420",t.VARIABLE_LENGTH,20],["421",t.VARIABLE_LENGTH,15],["422",3],["423",t.VARIABLE_LENGTH,15],["424",3],["425",3],["426",3]],t.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH=[["310",6],["311",6],["312",6],["313",6],["314",6],["315",6],["316",6],["320",6],["321",6],["322",6],["323",6],["324",6],["325",6],["326",6],["327",6],["328",6],["329",6],["330",6],["331",6],["332",6],["333",6],["334",6],["335",6],["336",6],["340",6],["341",6],["342",6],["343",6],["344",6],["345",6],["346",6],["347",6],["348",6],["349",6],["350",6],["351",6],["352",6],["353",6],["354",6],["355",6],["356",6],["357",6],["360",6],["361",6],["362",6],["363",6],["364",6],["365",6],["366",6],["367",6],["368",6],["369",6],["390",t.VARIABLE_LENGTH,15],["391",t.VARIABLE_LENGTH,18],["392",t.VARIABLE_LENGTH,15],["393",t.VARIABLE_LENGTH,18],["703",t.VARIABLE_LENGTH,30]],t.FOUR_DIGIT_DATA_LENGTH=[["7001",13],["7002",t.VARIABLE_LENGTH,30],["7003",10],["8001",14],["8002",t.VARIABLE_LENGTH,20],["8003",t.VARIABLE_LENGTH,30],["8004",t.VARIABLE_LENGTH,30],["8005",6],["8006",18],["8007",t.VARIABLE_LENGTH,30],["8008",t.VARIABLE_LENGTH,12],["8018",18],["8020",t.VARIABLE_LENGTH,25],["8100",6],["8101",10],["8102",2],["8110",t.VARIABLE_LENGTH,70],["8200",t.VARIABLE_LENGTH,70]],t})(),Dr=(function(){function t(e){this.buffer=new J,this.information=e}return t.prototype.decodeAllCodes=function(e,r){var n=r,i=null;do{var a=this.decodeGeneralPurposeField(n,i),o=Gc.parseFieldsInGeneralPurpose(a.getNewString());if(o!=null&&e.append(o),a.isRemaining()?i=""+a.getRemainingValue():i=null,n===a.getNewPosition())break;n=a.getNewPosition()}while(!0);return e.toString()},t.prototype.isStillNumeric=function(e){if(e+7>this.information.getSize())return e+4<=this.information.getSize();for(var r=e;r<e+3;++r)if(this.information.get(r))return!0;return this.information.get(e+3)},t.prototype.decodeNumeric=function(e){if(e+7>this.information.getSize()){var r=this.extractNumericValueFromBitArray(e,4);return r===0?new Ct(this.information.getSize(),Ct.FNC1,Ct.FNC1):new Ct(this.information.getSize(),r-1,Ct.FNC1)}var n=this.extractNumericValueFromBitArray(e,7),i=(n-8)/11,a=(n-8)%11;return new Ct(e+7,i,a)},t.prototype.extractNumericValueFromBitArray=function(e,r){return t.extractNumericValueFromBitArray(this.information,e,r)},t.extractNumericValueFromBitArray=function(e,r,n){for(var i=0,a=0;a<n;++a)e.get(r+a)&&(i|=1<<n-a-1);return i},t.prototype.decodeGeneralPurposeField=function(e,r){this.buffer.setLengthToZero(),r!=null&&this.buffer.append(r),this.current.setPosition(e);var n=this.parseBlocks();return n!=null&&n.isRemaining()?new gt(this.current.getPosition(),this.buffer.toString(),n.getRemainingValue()):new gt(this.current.getPosition(),this.buffer.toString())},t.prototype.parseBlocks=function(){var e,r;do{var n=this.current.getPosition();this.current.isAlpha()?(r=this.parseAlphaBlock(),e=r.isFinished()):this.current.isIsoIec646()?(r=this.parseIsoIec646Block(),e=r.isFinished()):(r=this.parseNumericBlock(),e=r.isFinished());var i=n!==this.current.getPosition();if(!i&&!e)break}while(!e);return r.getDecodedInformation()},t.prototype.parseNumericBlock=function(){for(;this.isStillNumeric(this.current.getPosition());){var e=this.decodeNumeric(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFirstDigitFNC1()){var r=void 0;return e.isSecondDigitFNC1()?r=new gt(this.current.getPosition(),this.buffer.toString()):r=new gt(this.current.getPosition(),this.buffer.toString(),e.getSecondDigit()),new pt(!0,r)}if(this.buffer.append(e.getFirstDigit()),e.isSecondDigitFNC1()){var r=new gt(this.current.getPosition(),this.buffer.toString());return new pt(!0,r)}this.buffer.append(e.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new pt(!1)},t.prototype.parseIsoIec646Block=function(){for(;this.isStillIsoIec646(this.current.getPosition());){var e=this.decodeIsoIec646(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFNC1()){var r=new gt(this.current.getPosition(),this.buffer.toString());return new pt(!0,r)}this.buffer.append(e.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setAlpha()),new pt(!1)},t.prototype.parseAlphaBlock=function(){for(;this.isStillAlpha(this.current.getPosition());){var e=this.decodeAlphanumeric(this.current.getPosition());if(this.current.setPosition(e.getNewPosition()),e.isFNC1()){var r=new gt(this.current.getPosition(),this.buffer.toString());return new pt(!0,r)}this.buffer.append(e.getValue())}return this.isAlphaOr646ToNumericLatch(this.current.getPosition())?(this.current.incrementPosition(3),this.current.setNumeric()):this.isAlphaTo646ToAlphaLatch(this.current.getPosition())&&(this.current.getPosition()+5<this.information.getSize()?this.current.incrementPosition(5):this.current.setPosition(this.information.getSize()),this.current.setIsoIec646()),new pt(!1)},t.prototype.isStillIsoIec646=function(e){if(e+5>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(e,5);if(r>=5&&r<16)return!0;if(e+7>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(e,7);if(n>=64&&n<116)return!0;if(e+8>this.information.getSize())return!1;var i=this.extractNumericValueFromBitArray(e,8);return i>=232&&i<253},t.prototype.decodeIsoIec646=function(e){var r=this.extractNumericValueFromBitArray(e,5);if(r===15)return new Le(e+5,Le.FNC1);if(r>=5&&r<15)return new Le(e+5,"0"+(r-5));var n=this.extractNumericValueFromBitArray(e,7);if(n>=64&&n<90)return new Le(e+7,""+(n+1));if(n>=90&&n<116)return new Le(e+7,""+(n+7));var i=this.extractNumericValueFromBitArray(e,8),a;switch(i){case 232:a="!";break;case 233:a='"';break;case 234:a="%";break;case 235:a="&";break;case 236:a="'";break;case 237:a="(";break;case 238:a=")";break;case 239:a="*";break;case 240:a="+";break;case 241:a=",";break;case 242:a="-";break;case 243:a=".";break;case 244:a="/";break;case 245:a=":";break;case 246:a=";";break;case 247:a="<";break;case 248:a="=";break;case 249:a=">";break;case 250:a="?";break;case 251:a="_";break;case 252:a=" ";break;default:throw new R}return new Le(e+8,a)},t.prototype.isStillAlpha=function(e){if(e+5>this.information.getSize())return!1;var r=this.extractNumericValueFromBitArray(e,5);if(r>=5&&r<16)return!0;if(e+6>this.information.getSize())return!1;var n=this.extractNumericValueFromBitArray(e,6);return n>=16&&n<63},t.prototype.decodeAlphanumeric=function(e){var r=this.extractNumericValueFromBitArray(e,5);if(r===15)return new Le(e+5,Le.FNC1);if(r>=5&&r<15)return new Le(e+5,"0"+(r-5));var n=this.extractNumericValueFromBitArray(e,6);if(n>=32&&n<58)return new Le(e+6,""+(n+33));var i;switch(n){case 58:i="*";break;case 59:i=",";break;case 60:i="-";break;case 61:i=".";break;case 62:i="/";break;default:throw new hr("Decoding invalid alphanumeric value: "+n)}return new Le(e+6,i)},t.prototype.isAlphaTo646ToAlphaLatch=function(e){if(e+1>this.information.getSize())return!1;for(var r=0;r<5&&r+e<this.information.getSize();++r)if(r===2){if(!this.information.get(e+2))return!1}else if(this.information.get(e+r))return!1;return!0},t.prototype.isAlphaOr646ToNumericLatch=function(e){if(e+3>this.information.getSize())return!1;for(var r=e;r<e+3;++r)if(this.information.get(r))return!1;return!0},t.prototype.isNumericToAlphaNumericLatch=function(e){if(e+1>this.information.getSize())return!1;for(var r=0;r<4&&r+e<this.information.getSize();++r)if(this.information.get(e+r))return!1;return!0},t})(),va=(function(){function t(e){this.information=e,this.generalDecoder=new Dr(e)}return t.prototype.getInformation=function(){return this.information},t.prototype.getGeneralDecoder=function(){return this.generalDecoder},t})(),zc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ue=(function(t){zc(e,t);function e(r){return t.call(this,r)||this}return e.prototype.encodeCompressedGtin=function(r,n){r.append("(01)");var i=r.length();r.append("9"),this.encodeCompressedGtinWithoutAI(r,n,i)},e.prototype.encodeCompressedGtinWithoutAI=function(r,n,i){for(var a=0;a<4;++a){var o=this.getGeneralDecoder().extractNumericValueFromBitArray(n+10*a,10);o/100===0&&r.append("0"),o/10===0&&r.append("0"),r.append(o)}e.appendCheckDigit(r,i)},e.appendCheckDigit=function(r,n){for(var i=0,a=0;a<13;a++){var o=r.charAt(a+n).charCodeAt(0)-48;i+=(a&1)===0?3*o:o}i=10-i%10,i===10&&(i=0),r.append(i)},e.GTIN_SIZE=40,e})(va),Wc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Xc=(function(t){Wc(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){var r=new J;r.append("(01)");var n=r.length(),i=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE,4);return r.append(i),this.encodeCompressedGtinWithoutAI(r,e.HEADER_SIZE+4,n),this.getGeneralDecoder().decodeAllCodes(r,e.HEADER_SIZE+44)},e.HEADER_SIZE=4,e})(Ue),Kc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),jc=(function(t){Kc(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){var r=new J;return this.getGeneralDecoder().decodeAllCodes(r,e.HEADER_SIZE)},e.HEADER_SIZE=5,e})(va),Yc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Br=(function(t){Yc(e,t);function e(r){return t.call(this,r)||this}return e.prototype.encodeCompressedWeight=function(r,n,i){var a=this.getGeneralDecoder().extractNumericValueFromBitArray(n,i);this.addWeightCode(r,a);for(var o=this.checkWeight(a),s=1e5,l=0;l<5;++l)o/s===0&&r.append("0"),s/=10;r.append(o)},e})(Ue),Zc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),pa=(function(t){Zc(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()!=e.HEADER_SIZE+Br.GTIN_SIZE+e.WEIGHT_SIZE)throw new I;var r=new J;return this.encodeCompressedGtin(r,e.HEADER_SIZE),this.encodeCompressedWeight(r,e.HEADER_SIZE+Br.GTIN_SIZE,e.WEIGHT_SIZE),r.toString()},e.HEADER_SIZE=5,e.WEIGHT_SIZE=15,e})(Br),qc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Qc=(function(t){qc(e,t);function e(r){return t.call(this,r)||this}return e.prototype.addWeightCode=function(r,n){r.append("(3103)")},e.prototype.checkWeight=function(r){return r},e})(pa),Jc=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),e1=(function(t){Jc(e,t);function e(r){return t.call(this,r)||this}return e.prototype.addWeightCode=function(r,n){n<1e4?r.append("(3202)"):r.append("(3203)")},e.prototype.checkWeight=function(r){return r<1e4?r:r-1e4},e})(pa),t1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),r1=(function(t){t1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+Ue.GTIN_SIZE)throw new I;var r=new J;this.encodeCompressedGtin(r,e.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ue.GTIN_SIZE,e.LAST_DIGIT_SIZE);r.append("(392"),r.append(n),r.append(")");var i=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+Ue.GTIN_SIZE+e.LAST_DIGIT_SIZE,null);return r.append(i.getNewString()),r.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e})(Ue),n1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),i1=(function(t){n1(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+Ue.GTIN_SIZE)throw new I;var r=new J;this.encodeCompressedGtin(r,e.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ue.GTIN_SIZE,e.LAST_DIGIT_SIZE);r.append("(393"),r.append(n),r.append(")");var i=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+Ue.GTIN_SIZE+e.LAST_DIGIT_SIZE,e.FIRST_THREE_DIGITS_SIZE);i/100==0&&r.append("0"),i/10==0&&r.append("0"),r.append(i);var a=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+Ue.GTIN_SIZE+e.LAST_DIGIT_SIZE+e.FIRST_THREE_DIGITS_SIZE,null);return r.append(a.getNewString()),r.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e.FIRST_THREE_DIGITS_SIZE=10,e})(Ue),a1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),it=(function(t){a1(e,t);function e(r,n,i){var a=t.call(this,r)||this;return a.dateCode=i,a.firstAIdigits=n,a}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()!=e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE+e.DATE_SIZE)throw new I;var r=new J;return this.encodeCompressedGtin(r,e.HEADER_SIZE),this.encodeCompressedWeight(r,e.HEADER_SIZE+e.GTIN_SIZE,e.WEIGHT_SIZE),this.encodeCompressedDate(r,e.HEADER_SIZE+e.GTIN_SIZE+e.WEIGHT_SIZE),r.toString()},e.prototype.encodeCompressedDate=function(r,n){var i=this.getGeneralDecoder().extractNumericValueFromBitArray(n,e.DATE_SIZE);if(i!=38400){r.append("("),r.append(this.dateCode),r.append(")");var a=i%32;i/=32;var o=i%12+1;i/=12;var s=i;s/10==0&&r.append("0"),r.append(s),o/10==0&&r.append("0"),r.append(o),a/10==0&&r.append("0"),r.append(a)}},e.prototype.addWeightCode=function(r,n){r.append("("),r.append(this.firstAIdigits),r.append(n/1e5),r.append(")")},e.prototype.checkWeight=function(r){return r%1e5},e.HEADER_SIZE=8,e.WEIGHT_SIZE=20,e.DATE_SIZE=16,e})(Br);function o1(t){try{if(t.get(1))return new Xc(t);if(!t.get(2))return new jc(t);var e=Dr.extractNumericValueFromBitArray(t,1,4);switch(e){case 4:return new Qc(t);case 5:return new e1(t)}var r=Dr.extractNumericValueFromBitArray(t,1,5);switch(r){case 12:return new r1(t);case 13:return new i1(t)}var n=Dr.extractNumericValueFromBitArray(t,1,7);switch(n){case 56:return new it(t,"310","11");case 57:return new it(t,"320","11");case 58:return new it(t,"310","13");case 59:return new it(t,"320","13");case 60:return new it(t,"310","15");case 61:return new it(t,"320","15");case 62:return new it(t,"310","17");case 63:return new it(t,"320","17")}}catch(i){throw console.log(i),new hr("unknown decoder: "+t)}}var Ni=(function(){function t(e,r,n,i){this.leftchar=e,this.rightchar=r,this.finderpattern=n,this.maybeLast=i}return t.prototype.mayBeLast=function(){return this.maybeLast},t.prototype.getLeftChar=function(){return this.leftchar},t.prototype.getRightChar=function(){return this.rightchar},t.prototype.getFinderPattern=function(){return this.finderpattern},t.prototype.mustBeLast=function(){return this.rightchar==null},t.prototype.toString=function(){return"[ "+this.leftchar+", "+this.rightchar+" : "+(this.finderpattern==null?"null":this.finderpattern.getValue())+" ]"},t.equals=function(e,r){return e instanceof t?t.equalsOrNull(e.leftchar,r.leftchar)&&t.equalsOrNull(e.rightchar,r.rightchar)&&t.equalsOrNull(e.finderpattern,r.finderpattern):!1},t.equalsOrNull=function(e,r){return e===null?r===null:t.equals(e,r)},t.prototype.hashCode=function(){var e=this.leftchar.getValue()^this.rightchar.getValue()^this.finderpattern.getValue();return e},t})(),s1=(function(){function t(e,r,n){this.pairs=e,this.rowNumber=r,this.wasReversed=n}return t.prototype.getPairs=function(){return this.pairs},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.isReversed=function(){return this.wasReversed},t.prototype.isEquivalent=function(e){return this.checkEqualitity(this,e)},t.prototype.toString=function(){return"{ "+this.pairs+" }"},t.prototype.equals=function(e,r){return e instanceof t?this.checkEqualitity(e,r)&&e.wasReversed===r.wasReversed:!1},t.prototype.checkEqualitity=function(e,r){if(!(!e||!r)){var n;return e.forEach(function(i,a){r.forEach(function(o){i.getLeftChar().getValue()===o.getLeftChar().getValue()&&i.getRightChar().getValue()===o.getRightChar().getValue()&&i.getFinderPatter().getValue()===o.getFinderPatter().getValue()&&(n=!0)})}),n}},t})(),l1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),at=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},u1=(function(t){l1(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.pairs=new Array(e.MAX_PAIRS),r.rows=new Array,r.startEnd=[2],r}return e.prototype.decodeRow=function(r,n,i){this.pairs.length=0,this.startFromEven=!1;try{return e.constructResult(this.decodeRow2pairs(r,n))}catch{}return this.pairs.length=0,this.startFromEven=!0,e.constructResult(this.decodeRow2pairs(r,n))},e.prototype.reset=function(){this.pairs.length=0,this.rows.length=0},e.prototype.decodeRow2pairs=function(r,n){for(var i=!1;!i;)try{this.pairs.push(this.retrieveNextPair(n,this.pairs,r))}catch(s){if(s instanceof I){if(!this.pairs.length)throw new I;i=!0}}if(this.checkChecksum())return this.pairs;var a;if(this.rows.length?a=!0:a=!1,this.storeRow(r,!1),a){var o=this.checkRowsBoolean(!1);if(o!=null||(o=this.checkRowsBoolean(!0),o!=null))return o}throw new I},e.prototype.checkRowsBoolean=function(r){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,r&&(this.rows=this.rows.reverse());var n=null;try{n=this.checkRows(new Array,0)}catch(i){console.log(i)}return r&&(this.rows=this.rows.reverse()),n},e.prototype.checkRows=function(r,n){for(var i,a,o=n;o<this.rows.length;o++){var s=this.rows[o];this.pairs.length=0;try{for(var l=(i=void 0,at(r)),c=l.next();!c.done;c=l.next()){var f=c.value;this.pairs.push(f.getPairs())}}catch(v){i={error:v}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}if(this.pairs.push(s.getPairs()),!!e.isValidSequence(this.pairs)){if(this.checkChecksum())return this.pairs;var d=new Array(r);d.push(s);try{return this.checkRows(d,o+1)}catch(v){console.log(v)}}}throw new I},e.isValidSequence=function(r){var n,i;try{for(var a=at(e.FINDER_PATTERN_SEQUENCES),o=a.next();!o.done;o=a.next()){var s=o.value;if(!(r.length>s.length)){for(var l=!0,c=0;c<r.length;c++)if(r[c].getFinderPattern().getValue()!=s[c]){l=!1;break}if(l)return!0}}}catch(f){n={error:f}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return!1},e.prototype.storeRow=function(r,n){for(var i=0,a=!1,o=!1;i<this.rows.length;){var s=this.rows[i];if(s.getRowNumber()>r){o=s.isEquivalent(this.pairs);break}a=s.isEquivalent(this.pairs),i++}o||a||e.isPartialRow(this.pairs,this.rows)||(this.rows.push(i,new s1(this.pairs,r,n)),this.removePartialRows(this.pairs,this.rows))},e.prototype.removePartialRows=function(r,n){var i,a,o,s,l,c;try{for(var f=at(n),d=f.next();!d.done;d=f.next()){var v=d.value;if(v.getPairs().length!==r.length){var h=!0;try{for(var p=(o=void 0,at(v.getPairs())),g=p.next();!g.done;g=p.next()){var y=g.value,w=!1;try{for(var m=(l=void 0,at(r)),A=m.next();!A.done;A=m.next()){var E=A.value;if(Ni.equals(y,E)){w=!0;break}}}catch(C){l={error:C}}finally{try{A&&!A.done&&(c=m.return)&&c.call(m)}finally{if(l)throw l.error}}w||(h=!1)}}catch(C){o={error:C}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(o)throw o.error}}}}}catch(C){i={error:C}}finally{try{d&&!d.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}},e.isPartialRow=function(r,n){var i,a,o,s,l,c;try{for(var f=at(n),d=f.next();!d.done;d=f.next()){var v=d.value,h=!0;try{for(var p=(o=void 0,at(r)),g=p.next();!g.done;g=p.next()){var y=g.value,w=!1;try{for(var m=(l=void 0,at(v.getPairs())),A=m.next();!A.done;A=m.next()){var E=A.value;if(y.equals(E)){w=!0;break}}}catch(C){l={error:C}}finally{try{A&&!A.done&&(c=m.return)&&c.call(m)}finally{if(l)throw l.error}}if(!w){h=!1;break}}}catch(C){o={error:C}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(o)throw o.error}}if(h)return!0}}catch(C){i={error:C}}finally{try{d&&!d.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}return!1},e.prototype.getRows=function(){return this.rows},e.constructResult=function(r){var n=Vc.buildBitArray(r),i=o1(n),a=i.parseInformation(),o=r[0].getFinderPattern().getResultPoints(),s=r[r.length-1].getFinderPattern().getResultPoints(),l=[o[0],o[1],s[0],s[1]];return new Be(a,null,null,l,U.RSS_EXPANDED,null)},e.prototype.checkChecksum=function(){var r=this.pairs.get(0),n=r.getLeftChar(),i=r.getRightChar();if(i==null)return!1;for(var a=i.getChecksumPortion(),o=2,s=1;s<this.pairs.size();++s){var l=this.pairs.get(s);a+=l.getLeftChar().getChecksumPortion(),o++;var c=l.getRightChar();c!=null&&(a+=c.getChecksumPortion(),o++)}a%=211;var f=211*(o-4)+a;return f==n.getValue()},e.getNextSecondBar=function(r,n){var i;return r.get(n)?(i=r.getNextUnset(n),i=r.getNextSet(i)):(i=r.getNextSet(n),i=r.getNextUnset(i)),i},e.prototype.retrieveNextPair=function(r,n,i){var a=n.length%2==0;this.startFromEven&&(a=!a);var o,s=!0,l=-1;do this.findNextPair(r,n,l),o=this.parseFoundFinderPattern(r,i,a),o==null?l=e.getNextSecondBar(r,this.startEnd[0]):s=!1;while(s);var c=this.decodeDataCharacter(r,o,a,!0);if(!this.isEmptyPair(n)&&n[n.length-1].mustBeLast())throw new I;var f;try{f=this.decodeDataCharacter(r,o,a,!1)}catch(d){f=null,console.log(d)}return new Ni(c,f,o,!0)},e.prototype.isEmptyPair=function(r){return r.length===0},e.prototype.findNextPair=function(r,n,i){var a=this.getDecodeFinderCounters();a[0]=0,a[1]=0,a[2]=0,a[3]=0;var o=r.getSize(),s;if(i>=0)s=i;else if(this.isEmptyPair(n))s=0;else{var l=n[n.length-1];s=l.getFinderPattern().getStartEnd()[1]}var c=n.length%2!=0;this.startFromEven&&(c=!c);for(var f=!1;s<o&&(f=!r.get(s),!!f);)s++;for(var d=0,v=s,h=s;h<o;h++)if(r.get(h)!=f)a[d]++;else{if(d==3){if(c&&e.reverseCounters(a),e.isFinderPattern(a)){this.startEnd[0]=v,this.startEnd[1]=h;return}c&&e.reverseCounters(a),v+=a[0]+a[1],a[0]=a[2],a[1]=a[3],a[2]=0,a[3]=0,d--}else d++;a[d]=1,f=!f}throw new I},e.reverseCounters=function(r){for(var n=r.length,i=0;i<n/2;++i){var a=r[i];r[i]=r[n-i-1],r[n-i-1]=a}},e.prototype.parseFoundFinderPattern=function(r,n,i){var a,o,s;if(i){for(var l=this.startEnd[0]-1;l>=0&&!r.get(l);)l--;l++,a=this.startEnd[0]-l,o=l,s=this.startEnd[1]}else o=this.startEnd[0],s=r.getNextUnset(this.startEnd[1]+1),a=s-this.startEnd[1];var c=this.getDecodeFinderCounters();ne.arraycopy(c,0,c,1,c.length-1),c[0]=a;var f;try{f=this.parseFinderValue(c,e.FINDER_PATTERNS)}catch{return null}return new ha(f,[o,s],o,s,n)},e.prototype.decodeDataCharacter=function(r,n,i,a){for(var o=this.getDataCharacterCounters(),s=0;s<o.length;s++)o[s]=0;if(a)e.recordPatternInReverse(r,n.getStartEnd()[0],o);else{e.recordPattern(r,n.getStartEnd()[1],o);for(var l=0,c=o.length-1;l<c;l++,c--){var f=o[l];o[l]=o[c],o[c]=f}}var d=17,v=X.sum(new Int32Array(o))/d,h=(n.getStartEnd()[1]-n.getStartEnd()[0])/15;if(Math.abs(v-h)/h>.3)throw new I;for(var p=this.getOddCounts(),g=this.getEvenCounts(),y=this.getOddRoundingErrors(),w=this.getEvenRoundingErrors(),l=0;l<o.length;l++){var m=1*o[l]/v,A=m+.5;if(A<1){if(m<.3)throw new I;A=1}else if(A>8){if(m>8.7)throw new I;A=8}var E=l/2;(l&1)==0?(p[E]=A,y[E]=m-A):(g[E]=A,w[E]=m-A)}this.adjustOddEvenCounts(d);for(var C=4*n.getValue()+(i?0:2)+(a?0:1)-1,b=0,O=0,l=p.length-1;l>=0;l--){if(e.isNotA1left(n,i,a)){var P=e.WEIGHTS[C][2*l];O+=p[l]*P}b+=p[l]}for(var H=0,l=g.length-1;l>=0;l--)if(e.isNotA1left(n,i,a)){var P=e.WEIGHTS[C][2*l+1];H+=g[l]*P}var L=O+H;if((b&1)!=0||b>13||b<4)throw new I;var te=(13-b)/2,V=e.SYMBOL_WIDEST[te],z=9-V,he=St.getRSSvalue(p,V,!0),He=St.getRSSvalue(g,z,!1),vr=e.EVEN_TOTAL_SUBSET[te],tt=e.GSUM[te],rt=he*vr+He+tt;return new Lr(rt,L)},e.isNotA1left=function(r,n,i){return!(r.getValue()==0&&n&&i)},e.prototype.adjustOddEvenCounts=function(r){var n=X.sum(new Int32Array(this.getOddCounts())),i=X.sum(new Int32Array(this.getEvenCounts())),a=!1,o=!1;n>13?o=!0:n<4&&(a=!0);var s=!1,l=!1;i>13?l=!0:i<4&&(s=!0);var c=n+i-r,f=(n&1)==1,d=(i&1)==0;if(c==1)if(f){if(d)throw new I;o=!0}else{if(!d)throw new I;l=!0}else if(c==-1)if(f){if(d)throw new I;a=!0}else{if(!d)throw new I;s=!0}else if(c==0){if(f){if(!d)throw new I;n<i?(a=!0,l=!0):(o=!0,s=!0)}else if(d)throw new I}else throw new I;if(a){if(o)throw new I;e.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(o&&e.decrement(this.getOddCounts(),this.getOddRoundingErrors()),s){if(l)throw new I;e.increment(this.getEvenCounts(),this.getOddRoundingErrors())}l&&e.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.SYMBOL_WIDEST=[7,5,4,3,1],e.EVEN_TOTAL_SUBSET=[4,20,52,104,204],e.GSUM=[0,348,1388,2948,3988],e.FINDER_PATTERNS=[Int32Array.from([1,8,4,1]),Int32Array.from([3,6,4,1]),Int32Array.from([3,4,6,1]),Int32Array.from([3,2,8,1]),Int32Array.from([2,6,5,1]),Int32Array.from([2,2,9,1])],e.WEIGHTS=[[1,3,9,27,81,32,96,77],[20,60,180,118,143,7,21,63],[189,145,13,39,117,140,209,205],[193,157,49,147,19,57,171,91],[62,186,136,197,169,85,44,132],[185,133,188,142,4,12,36,108],[113,128,173,97,80,29,87,50],[150,28,84,41,123,158,52,156],[46,138,203,187,139,206,196,166],[76,17,51,153,37,111,122,155],[43,129,176,106,107,110,119,146],[16,48,144,10,30,90,59,177],[109,116,137,200,178,112,125,164],[70,210,208,202,184,130,179,115],[134,191,151,31,93,68,204,190],[148,22,66,198,172,94,71,2],[6,18,54,162,64,192,154,40],[120,149,25,75,14,42,126,167],[79,26,78,23,69,207,199,175],[103,98,83,38,114,131,182,124],[161,61,183,127,170,88,53,159],[55,165,73,8,24,72,5,15],[45,135,194,160,58,174,100,89]],e.FINDER_PAT_A=0,e.FINDER_PAT_B=1,e.FINDER_PAT_C=2,e.FINDER_PAT_D=3,e.FINDER_PAT_E=4,e.FINDER_PAT_F=5,e.FINDER_PATTERN_SEQUENCES=[[e.FINDER_PAT_A,e.FINDER_PAT_A],[e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B],[e.FINDER_PAT_A,e.FINDER_PAT_C,e.FINDER_PAT_B,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_C],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_E,e.FINDER_PAT_B,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F],[e.FINDER_PAT_A,e.FINDER_PAT_A,e.FINDER_PAT_B,e.FINDER_PAT_B,e.FINDER_PAT_C,e.FINDER_PAT_D,e.FINDER_PAT_D,e.FINDER_PAT_E,e.FINDER_PAT_E,e.FINDER_PAT_F,e.FINDER_PAT_F]],e.MAX_PAIRS=11,e})(xt),c1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),f1=(function(t){c1(e,t);function e(r,n,i){var a=t.call(this,r,n)||this;return a.count=0,a.finderPattern=i,a}return e.prototype.getFinderPattern=function(){return this.finderPattern},e.prototype.getCount=function(){return this.count},e.prototype.incrementCount=function(){this.count++},e})(Lr),d1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),hn=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Di=(function(t){d1(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.possibleLeftPairs=[],r.possibleRightPairs=[],r}return e.prototype.decodeRow=function(r,n,i){var a,o,s,l,c=this.decodePair(n,!1,r,i);e.addOrTally(this.possibleLeftPairs,c),n.reverse();var f=this.decodePair(n,!0,r,i);e.addOrTally(this.possibleRightPairs,f),n.reverse();try{for(var d=hn(this.possibleLeftPairs),v=d.next();!v.done;v=d.next()){var h=v.value;if(h.getCount()>1)try{for(var p=(s=void 0,hn(this.possibleRightPairs)),g=p.next();!g.done;g=p.next()){var y=g.value;if(y.getCount()>1&&e.checkChecksum(h,y))return e.constructResult(h,y)}}catch(w){s={error:w}}finally{try{g&&!g.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}}}catch(w){a={error:w}}finally{try{v&&!v.done&&(o=d.return)&&o.call(d)}finally{if(a)throw a.error}}throw new I},e.addOrTally=function(r,n){var i,a;if(n!=null){var o=!1;try{for(var s=hn(r),l=s.next();!l.done;l=s.next()){var c=l.value;if(c.getValue()===n.getValue()){c.incrementCount(),o=!0;break}}}catch(f){i={error:f}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}o||r.push(n)}},e.prototype.reset=function(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0},e.constructResult=function(r,n){for(var i=4537077*r.getValue()+n.getValue(),a=new String(i).toString(),o=new J,s=13-a.length;s>0;s--)o.append("0");o.append(a);for(var l=0,s=0;s<13;s++){var c=o.charAt(s).charCodeAt(0)-48;l+=(s&1)===0?3*c:c}l=10-l%10,l===10&&(l=0),o.append(l.toString());var f=r.getFinderPattern().getResultPoints(),d=n.getFinderPattern().getResultPoints();return new Be(o.toString(),null,0,[f[0],f[1],d[0],d[1]],U.RSS_14,new Date().getTime())},e.checkChecksum=function(r,n){var i=(r.getChecksumPortion()+16*n.getChecksumPortion())%79,a=9*r.getFinderPattern().getValue()+n.getFinderPattern().getValue();return a>72&&a--,a>8&&a--,i===a},e.prototype.decodePair=function(r,n,i,a){try{var o=this.findFinderPattern(r,n),s=this.parseFoundFinderPattern(r,i,n,o),l=a==null?null:a.get(le.NEED_RESULT_POINT_CALLBACK);if(l!=null){var c=(o[0]+o[1])/2;n&&(c=r.getSize()-1-c),l.foundPossibleResultPoint(new k(c,i))}var f=this.decodeDataCharacter(r,s,!0),d=this.decodeDataCharacter(r,s,!1);return new f1(1597*f.getValue()+d.getValue(),f.getChecksumPortion()+4*d.getChecksumPortion(),s)}catch{return null}},e.prototype.decodeDataCharacter=function(r,n,i){for(var a=this.getDataCharacterCounters(),o=0;o<a.length;o++)a[o]=0;if(i)Ee.recordPatternInReverse(r,n.getStartEnd()[0],a);else{Ee.recordPattern(r,n.getStartEnd()[1]+1,a);for(var s=0,l=a.length-1;s<l;s++,l--){var c=a[s];a[s]=a[l],a[l]=c}}for(var f=i?16:15,d=X.sum(new Int32Array(a))/f,v=this.getOddCounts(),h=this.getEvenCounts(),p=this.getOddRoundingErrors(),g=this.getEvenRoundingErrors(),s=0;s<a.length;s++){var y=a[s]/d,w=Math.floor(y+.5);w<1?w=1:w>8&&(w=8);var m=Math.floor(s/2);(s&1)===0?(v[m]=w,p[m]=y-w):(h[m]=w,g[m]=y-w)}this.adjustOddEvenCounts(i,f);for(var A=0,E=0,s=v.length-1;s>=0;s--)E*=9,E+=v[s],A+=v[s];for(var C=0,b=0,s=h.length-1;s>=0;s--)C*=9,C+=h[s],b+=h[s];var O=E+3*C;if(i){if((A&1)!==0||A>12||A<4)throw new I;var P=(12-A)/2,H=e.OUTSIDE_ODD_WIDEST[P],L=9-H,te=St.getRSSvalue(v,H,!1),V=St.getRSSvalue(h,L,!0),z=e.OUTSIDE_EVEN_TOTAL_SUBSET[P],he=e.OUTSIDE_GSUM[P];return new Lr(te*z+V+he,O)}else{if((b&1)!==0||b>10||b<4)throw new I;var P=(10-b)/2,H=e.INSIDE_ODD_WIDEST[P],L=9-H,te=St.getRSSvalue(v,H,!0),V=St.getRSSvalue(h,L,!1),He=e.INSIDE_ODD_TOTAL_SUBSET[P],he=e.INSIDE_GSUM[P];return new Lr(V*He+te+he,O)}},e.prototype.findFinderPattern=function(r,n){var i=this.getDecodeFinderCounters();i[0]=0,i[1]=0,i[2]=0,i[3]=0;for(var a=r.getSize(),o=!1,s=0;s<a&&(o=!r.get(s),n!==o);)s++;for(var l=0,c=s,f=s;f<a;f++)if(r.get(f)!==o)i[l]++;else{if(l===3){if(xt.isFinderPattern(i))return[c,f];c+=i[0]+i[1],i[0]=i[2],i[1]=i[3],i[2]=0,i[3]=0,l--}else l++;i[l]=1,o=!o}throw new I},e.prototype.parseFoundFinderPattern=function(r,n,i,a){for(var o=r.get(a[0]),s=a[0]-1;s>=0&&o!==r.get(s);)s--;s++;var l=a[0]-s,c=this.getDecodeFinderCounters(),f=new Int32Array(c.length);ne.arraycopy(c,0,f,1,c.length-1),f[0]=l;var d=this.parseFinderValue(f,e.FINDER_PATTERNS),v=s,h=a[1];return i&&(v=r.getSize()-1-v,h=r.getSize()-1-h),new ha(d,[s,a[1]],v,h,n)},e.prototype.adjustOddEvenCounts=function(r,n){var i=X.sum(new Int32Array(this.getOddCounts())),a=X.sum(new Int32Array(this.getEvenCounts())),o=!1,s=!1,l=!1,c=!1;r?(i>12?s=!0:i<4&&(o=!0),a>12?c=!0:a<4&&(l=!0)):(i>11?s=!0:i<5&&(o=!0),a>10?c=!0:a<4&&(l=!0));var f=i+a-n,d=(i&1)===(r?1:0),v=(a&1)===1;if(f===1)if(d){if(v)throw new I;s=!0}else{if(!v)throw new I;c=!0}else if(f===-1)if(d){if(v)throw new I;o=!0}else{if(!v)throw new I;l=!0}else if(f===0){if(d){if(!v)throw new I;i<a?(o=!0,c=!0):(s=!0,l=!0)}else if(v)throw new I}else throw new I;if(o){if(s)throw new I;xt.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(s&&xt.decrement(this.getOddCounts(),this.getOddRoundingErrors()),l){if(c)throw new I;xt.increment(this.getEvenCounts(),this.getOddRoundingErrors())}c&&xt.decrement(this.getEvenCounts(),this.getEvenRoundingErrors())},e.OUTSIDE_EVEN_TOTAL_SUBSET=[1,10,34,70,126],e.INSIDE_ODD_TOTAL_SUBSET=[4,20,48,81],e.OUTSIDE_GSUM=[0,161,961,2015,2715],e.INSIDE_GSUM=[0,336,1036,1516],e.OUTSIDE_ODD_WIDEST=[8,6,4,3,1],e.INSIDE_ODD_WIDEST=[2,4,6,8],e.FINDER_PATTERNS=[Int32Array.from([3,8,2,1]),Int32Array.from([3,5,5,1]),Int32Array.from([3,3,7,1]),Int32Array.from([3,1,9,1]),Int32Array.from([2,7,4,1]),Int32Array.from([2,5,6,1]),Int32Array.from([2,3,8,1]),Int32Array.from([1,5,7,1]),Int32Array.from([1,3,9,1])],e})(xt),h1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),rr=(function(t){h1(e,t);function e(r){var n=t.call(this)||this;n.readers=[];var i=r?r.get(le.POSSIBLE_FORMATS):null,a=r&&r.get(le.ASSUME_CODE_39_CHECK_DIGIT)!==void 0;return i&&((i.includes(U.EAN_13)||i.includes(U.UPC_A)||i.includes(U.EAN_8)||i.includes(U.UPC_E))&&n.readers.push(new dn(r)),i.includes(U.CODE_39)&&n.readers.push(new Ai(a)),i.includes(U.CODE_128)&&n.readers.push(new Ei),i.includes(U.ITF)&&n.readers.push(new _i),i.includes(U.RSS_14)&&n.readers.push(new Di),i.includes(U.RSS_EXPANDED)&&(console.warn("RSS Expanded reader IS NOT ready for production yet! use at your own risk."),n.readers.push(new u1))),n.readers.length===0&&(n.readers.push(new dn(r)),n.readers.push(new Ai),n.readers.push(new dn(r)),n.readers.push(new Ei),n.readers.push(new _i),n.readers.push(new Di)),n}return e.prototype.decodeRow=function(r,n,i){for(var a=0;a<this.readers.length;a++)try{return this.readers[a].decodeRow(r,n,i)}catch{}throw new I},e.prototype.reset=function(){this.readers.forEach(function(r){return r.reset()})},e})(Ee),v1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();(function(t){v1(e,t);function e(r,n){return r===void 0&&(r=500),t.call(this,new rr(n),r,n)||this}return e})(Ut);var Bi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},j=(function(){function t(e,r,n){this.ecCodewords=e,this.ecBlocks=[r],n&&this.ecBlocks.push(n)}return t.prototype.getECCodewords=function(){return this.ecCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t})(),K=(function(){function t(e,r){this.count=e,this.dataCodewords=r}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t})(),p1=(function(){function t(e,r,n,i,a,o){var s,l;this.versionNumber=e,this.symbolSizeRows=r,this.symbolSizeColumns=n,this.dataRegionSizeRows=i,this.dataRegionSizeColumns=a,this.ecBlocks=o;var c=0,f=o.getECCodewords(),d=o.getECBlocks();try{for(var v=Bi(d),h=v.next();!h.done;h=v.next()){var p=h.value;c+=p.getCount()*(p.getDataCodewords()+f)}}catch(g){s={error:g}}finally{try{h&&!h.done&&(l=v.return)&&l.call(v)}finally{if(s)throw s.error}}this.totalCodewords=c}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getSymbolSizeRows=function(){return this.symbolSizeRows},t.prototype.getSymbolSizeColumns=function(){return this.symbolSizeColumns},t.prototype.getDataRegionSizeRows=function(){return this.dataRegionSizeRows},t.prototype.getDataRegionSizeColumns=function(){return this.dataRegionSizeColumns},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getECBlocks=function(){return this.ecBlocks},t.getVersionForDimensions=function(e,r){var n,i;if((e&1)!==0||(r&1)!==0)throw new R;try{for(var a=Bi(t.VERSIONS),o=a.next();!o.done;o=a.next()){var s=o.value;if(s.symbolSizeRows===e&&s.symbolSizeColumns===r)return s}}catch(l){n={error:l}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}throw new R},t.prototype.toString=function(){return""+this.versionNumber},t.buildVersions=function(){return[new t(1,10,10,8,8,new j(5,new K(1,3))),new t(2,12,12,10,10,new j(7,new K(1,5))),new t(3,14,14,12,12,new j(10,new K(1,8))),new t(4,16,16,14,14,new j(12,new K(1,12))),new t(5,18,18,16,16,new j(14,new K(1,18))),new t(6,20,20,18,18,new j(18,new K(1,22))),new t(7,22,22,20,20,new j(20,new K(1,30))),new t(8,24,24,22,22,new j(24,new K(1,36))),new t(9,26,26,24,24,new j(28,new K(1,44))),new t(10,32,32,14,14,new j(36,new K(1,62))),new t(11,36,36,16,16,new j(42,new K(1,86))),new t(12,40,40,18,18,new j(48,new K(1,114))),new t(13,44,44,20,20,new j(56,new K(1,144))),new t(14,48,48,22,22,new j(68,new K(1,174))),new t(15,52,52,24,24,new j(42,new K(2,102))),new t(16,64,64,14,14,new j(56,new K(2,140))),new t(17,72,72,16,16,new j(36,new K(4,92))),new t(18,80,80,18,18,new j(48,new K(4,114))),new t(19,88,88,20,20,new j(56,new K(4,144))),new t(20,96,96,22,22,new j(68,new K(4,174))),new t(21,104,104,24,24,new j(56,new K(6,136))),new t(22,120,120,18,18,new j(68,new K(6,175))),new t(23,132,132,20,20,new j(62,new K(8,163))),new t(24,144,144,22,22,new j(62,new K(8,156),new K(2,155))),new t(25,8,18,6,16,new j(7,new K(1,5))),new t(26,8,32,6,14,new j(11,new K(1,10))),new t(27,12,26,10,24,new j(14,new K(1,16))),new t(28,12,36,10,16,new j(18,new K(1,22))),new t(29,16,36,14,16,new j(24,new K(1,32))),new t(30,16,48,14,22,new j(28,new K(1,49)))]},t.VERSIONS=t.buildVersions(),t})(),g1=(function(){function t(e){var r=e.getHeight();if(r<8||r>144||(r&1)!==0)throw new R;this.version=t.readVersion(e),this.mappingBitMatrix=this.extractDataRegion(e),this.readMappingMatrix=new Ze(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}return t.prototype.getVersion=function(){return this.version},t.readVersion=function(e){var r=e.getHeight(),n=e.getWidth();return p1.getVersionForDimensions(r,n)},t.prototype.readCodewords=function(){var e=new Int8Array(this.version.getTotalCodewords()),r=0,n=4,i=0,a=this.mappingBitMatrix.getHeight(),o=this.mappingBitMatrix.getWidth(),s=!1,l=!1,c=!1,f=!1;do if(n===a&&i===0&&!s)e[r++]=this.readCorner1(a,o)&255,n-=2,i+=2,s=!0;else if(n===a-2&&i===0&&(o&3)!==0&&!l)e[r++]=this.readCorner2(a,o)&255,n-=2,i+=2,l=!0;else if(n===a+4&&i===2&&(o&7)===0&&!c)e[r++]=this.readCorner3(a,o)&255,n-=2,i+=2,c=!0;else if(n===a-2&&i===0&&(o&7)===4&&!f)e[r++]=this.readCorner4(a,o)&255,n-=2,i+=2,f=!0;else{do n<a&&i>=0&&!this.readMappingMatrix.get(i,n)&&(e[r++]=this.readUtah(n,i,a,o)&255),n-=2,i+=2;while(n>=0&&i<o);n+=1,i+=3;do n>=0&&i<o&&!this.readMappingMatrix.get(i,n)&&(e[r++]=this.readUtah(n,i,a,o)&255),n+=2,i-=2;while(n<a&&i>=0);n+=3,i+=1}while(n<a||i<o);if(r!==this.version.getTotalCodewords())throw new R;return e},t.prototype.readModule=function(e,r,n,i){return e<0&&(e+=n,r+=4-(n+4&7)),r<0&&(r+=i,e+=4-(i+4&7)),this.readMappingMatrix.set(r,e),this.mappingBitMatrix.get(r,e)},t.prototype.readUtah=function(e,r,n,i){var a=0;return this.readModule(e-2,r-2,n,i)&&(a|=1),a<<=1,this.readModule(e-2,r-1,n,i)&&(a|=1),a<<=1,this.readModule(e-1,r-2,n,i)&&(a|=1),a<<=1,this.readModule(e-1,r-1,n,i)&&(a|=1),a<<=1,this.readModule(e-1,r,n,i)&&(a|=1),a<<=1,this.readModule(e,r-2,n,i)&&(a|=1),a<<=1,this.readModule(e,r-1,n,i)&&(a|=1),a<<=1,this.readModule(e,r,n,i)&&(a|=1),a},t.prototype.readCorner1=function(e,r){var n=0;return this.readModule(e-1,0,e,r)&&(n|=1),n<<=1,this.readModule(e-1,1,e,r)&&(n|=1),n<<=1,this.readModule(e-1,2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-1,e,r)&&(n|=1),n<<=1,this.readModule(1,r-1,e,r)&&(n|=1),n<<=1,this.readModule(2,r-1,e,r)&&(n|=1),n<<=1,this.readModule(3,r-1,e,r)&&(n|=1),n},t.prototype.readCorner2=function(e,r){var n=0;return this.readModule(e-3,0,e,r)&&(n|=1),n<<=1,this.readModule(e-2,0,e,r)&&(n|=1),n<<=1,this.readModule(e-1,0,e,r)&&(n|=1),n<<=1,this.readModule(0,r-4,e,r)&&(n|=1),n<<=1,this.readModule(0,r-3,e,r)&&(n|=1),n<<=1,this.readModule(0,r-2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-1,e,r)&&(n|=1),n<<=1,this.readModule(1,r-1,e,r)&&(n|=1),n},t.prototype.readCorner3=function(e,r){var n=0;return this.readModule(e-1,0,e,r)&&(n|=1),n<<=1,this.readModule(e-1,r-1,e,r)&&(n|=1),n<<=1,this.readModule(0,r-3,e,r)&&(n|=1),n<<=1,this.readModule(0,r-2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-1,e,r)&&(n|=1),n<<=1,this.readModule(1,r-3,e,r)&&(n|=1),n<<=1,this.readModule(1,r-2,e,r)&&(n|=1),n<<=1,this.readModule(1,r-1,e,r)&&(n|=1),n},t.prototype.readCorner4=function(e,r){var n=0;return this.readModule(e-3,0,e,r)&&(n|=1),n<<=1,this.readModule(e-2,0,e,r)&&(n|=1),n<<=1,this.readModule(e-1,0,e,r)&&(n|=1),n<<=1,this.readModule(0,r-2,e,r)&&(n|=1),n<<=1,this.readModule(0,r-1,e,r)&&(n|=1),n<<=1,this.readModule(1,r-1,e,r)&&(n|=1),n<<=1,this.readModule(2,r-1,e,r)&&(n|=1),n<<=1,this.readModule(3,r-1,e,r)&&(n|=1),n},t.prototype.extractDataRegion=function(e){var r=this.version.getSymbolSizeRows(),n=this.version.getSymbolSizeColumns();if(e.getHeight()!==r)throw new F("Dimension of bitMatrix must match the version size");for(var i=this.version.getDataRegionSizeRows(),a=this.version.getDataRegionSizeColumns(),o=r/i|0,s=n/a|0,l=o*i,c=s*a,f=new Ze(c,l),d=0;d<o;++d)for(var v=d*i,h=0;h<s;++h)for(var p=h*a,g=0;g<i;++g)for(var y=d*(i+2)+1+g,w=v+g,m=0;m<a;++m){var A=h*(a+2)+1+m;if(e.get(A,y)){var E=p+m;f.set(E,w)}}return f},t})(),Ri=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},x1=(function(){function t(e,r){this.numDataCodewords=e,this.codewords=r}return t.getDataBlocks=function(e,r){var n,i,a,o,s=r.getECBlocks(),l=0,c=s.getECBlocks();try{for(var f=Ri(c),d=f.next();!d.done;d=f.next()){var v=d.value;l+=v.getCount()}}catch(he){n={error:he}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}var h=new Array(l),p=0;try{for(var g=Ri(c),y=g.next();!y.done;y=g.next())for(var v=y.value,w=0;w<v.getCount();w++){var m=v.getDataCodewords(),A=s.getECCodewords()+m;h[p++]=new t(m,new Uint8Array(A))}}catch(he){a={error:he}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}for(var E=h[0].codewords.length,C=E-s.getECCodewords(),b=C-1,O=0,w=0;w<b;w++)for(var P=0;P<p;P++)h[P].codewords[w]=e[O++];for(var H=r.getVersionNumber()===24,L=H?8:p,P=0;P<L;P++)h[P].codewords[C-1]=e[O++];for(var te=h[0].codewords.length,w=C;w<te;w++)for(var P=0;P<p;P++){var V=H?(P+8)%p:P,z=H&&V>7?w-1:w;h[V].codewords[z]=e[O++]}if(O!==e.length)throw new F;return h},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t})(),ga=(function(){function t(e){this.bytes=e,this.byteOffset=0,this.bitOffset=0}return t.prototype.getBitOffset=function(){return this.bitOffset},t.prototype.getByteOffset=function(){return this.byteOffset},t.prototype.readBits=function(e){if(e<1||e>32||e>this.available())throw new F(""+e);var r=0,n=this.bitOffset,i=this.byteOffset,a=this.bytes;if(n>0){var o=8-n,s=e<o?e:o,l=o-s,c=255>>8-s<<l;r=(a[i]&c)>>l,e-=s,n+=s,n===8&&(n=0,i++)}if(e>0){for(;e>=8;)r=r<<8|a[i]&255,i++,e-=8;if(e>0){var l=8-e,c=255>>l<<l;r=r<<e|(a[i]&c)>>l,n+=e}}return this.bitOffset=n,this.byteOffset=i,r},t.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},t})(),ce;(function(t){t[t.PAD_ENCODE=0]="PAD_ENCODE",t[t.ASCII_ENCODE=1]="ASCII_ENCODE",t[t.C40_ENCODE=2]="C40_ENCODE",t[t.TEXT_ENCODE=3]="TEXT_ENCODE",t[t.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",t[t.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",t[t.BASE256_ENCODE=6]="BASE256_ENCODE"})(ce||(ce={}));var y1=(function(){function t(){}return t.decode=function(e){var r=new ga(e),n=new J,i=new J,a=new Array,o=ce.ASCII_ENCODE;do if(o===ce.ASCII_ENCODE)o=this.decodeAsciiSegment(r,n,i);else{switch(o){case ce.C40_ENCODE:this.decodeC40Segment(r,n);break;case ce.TEXT_ENCODE:this.decodeTextSegment(r,n);break;case ce.ANSIX12_ENCODE:this.decodeAnsiX12Segment(r,n);break;case ce.EDIFACT_ENCODE:this.decodeEdifactSegment(r,n);break;case ce.BASE256_ENCODE:this.decodeBase256Segment(r,n,a);break;default:throw new R}o=ce.ASCII_ENCODE}while(o!==ce.PAD_ENCODE&&r.available()>0);return i.length()>0&&n.append(i.toString()),new Wr(e,n.toString(),a.length===0?null:a,null)},t.decodeAsciiSegment=function(e,r,n){var i=!1;do{var a=e.readBits(8);if(a===0)throw new R;if(a<=128)return i&&(a+=128),r.append(String.fromCharCode(a-1)),ce.ASCII_ENCODE;if(a===129)return ce.PAD_ENCODE;if(a<=229){var o=a-130;o<10&&r.append("0"),r.append(""+o)}else switch(a){case 230:return ce.C40_ENCODE;case 231:return ce.BASE256_ENCODE;case 232:r.append("");break;case 233:case 234:break;case 235:i=!0;break;case 236:r.append("[)>05"),n.insert(0,"");break;case 237:r.append("[)>06"),n.insert(0,"");break;case 238:return ce.ANSIX12_ENCODE;case 239:return ce.TEXT_ENCODE;case 240:return ce.EDIFACT_ENCODE;case 241:break;default:if(a!==254||e.available()!==0)throw new R;break}}while(e.available()>0);return ce.ASCII_ENCODE},t.decodeC40Segment=function(e,r){var n=!1,i=[],a=0;do{if(e.available()===8)return;var o=e.readBits(8);if(o===254)return;this.parseTwoBytes(o,e.readBits(8),i);for(var s=0;s<3;s++){var l=i[s];switch(a){case 0:if(l<3)a=l+1;else if(l<this.C40_BASIC_SET_CHARS.length){var c=this.C40_BASIC_SET_CHARS[l];n?(r.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):r.append(c)}else throw new R;break;case 1:n?(r.append(String.fromCharCode(l+128)),n=!1):r.append(String.fromCharCode(l)),a=0;break;case 2:if(l<this.C40_SHIFT2_SET_CHARS.length){var c=this.C40_SHIFT2_SET_CHARS[l];n?(r.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):r.append(c)}else switch(l){case 27:r.append("");break;case 30:n=!0;break;default:throw new R}a=0;break;case 3:n?(r.append(String.fromCharCode(l+224)),n=!1):r.append(String.fromCharCode(l+96)),a=0;break;default:throw new R}}}while(e.available()>0)},t.decodeTextSegment=function(e,r){var n=!1,i=[],a=0;do{if(e.available()===8)return;var o=e.readBits(8);if(o===254)return;this.parseTwoBytes(o,e.readBits(8),i);for(var s=0;s<3;s++){var l=i[s];switch(a){case 0:if(l<3)a=l+1;else if(l<this.TEXT_BASIC_SET_CHARS.length){var c=this.TEXT_BASIC_SET_CHARS[l];n?(r.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):r.append(c)}else throw new R;break;case 1:n?(r.append(String.fromCharCode(l+128)),n=!1):r.append(String.fromCharCode(l)),a=0;break;case 2:if(l<this.TEXT_SHIFT2_SET_CHARS.length){var c=this.TEXT_SHIFT2_SET_CHARS[l];n?(r.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):r.append(c)}else switch(l){case 27:r.append("");break;case 30:n=!0;break;default:throw new R}a=0;break;case 3:if(l<this.TEXT_SHIFT3_SET_CHARS.length){var c=this.TEXT_SHIFT3_SET_CHARS[l];n?(r.append(String.fromCharCode(c.charCodeAt(0)+128)),n=!1):r.append(c),a=0}else throw new R;break;default:throw new R}}}while(e.available()>0)},t.decodeAnsiX12Segment=function(e,r){var n=[];do{if(e.available()===8)return;var i=e.readBits(8);if(i===254)return;this.parseTwoBytes(i,e.readBits(8),n);for(var a=0;a<3;a++){var o=n[a];switch(o){case 0:r.append("\r");break;case 1:r.append("*");break;case 2:r.append(">");break;case 3:r.append(" ");break;default:if(o<14)r.append(String.fromCharCode(o+44));else if(o<40)r.append(String.fromCharCode(o+51));else throw new R;break}}}while(e.available()>0)},t.parseTwoBytes=function(e,r,n){var i=(e<<8)+r-1,a=Math.floor(i/1600);n[0]=a,i-=a*1600,a=Math.floor(i/40),n[1]=a,n[2]=i-a*40},t.decodeEdifactSegment=function(e,r){do{if(e.available()<=16)return;for(var n=0;n<4;n++){var i=e.readBits(6);if(i===31){var a=8-e.getBitOffset();a!==8&&e.readBits(a);return}(i&32)===0&&(i|=64),r.append(String.fromCharCode(i))}}while(e.available()>0)},t.decodeBase256Segment=function(e,r,n){var i=1+e.getByteOffset(),a=this.unrandomize255State(e.readBits(8),i++),o;if(a===0?o=e.available()/8|0:a<250?o=a:o=250*(a-249)+this.unrandomize255State(e.readBits(8),i++),o<0)throw new R;for(var s=new Uint8Array(o),l=0;l<o;l++){if(e.available()<8)throw new R;s[l]=this.unrandomize255State(e.readBits(8),i++)}n.push(s);try{r.append(je.decode(s,re.ISO88591))}catch(c){throw new hr("Platform does not support required encoding: "+c.message)}},t.unrandomize255State=function(e,r){var n=149*r%255+1,i=e-n;return i>=0?i:i+256},t.C40_BASIC_SET_CHARS=["*","*","*"," ","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.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],t.TEXT_BASIC_SET_CHARS=["*","*","*"," ","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.TEXT_SHIFT2_SET_CHARS=t.C40_SHIFT2_SET_CHARS,t.TEXT_SHIFT3_SET_CHARS=["`","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})(),m1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},w1=(function(){function t(){this.rsDecoder=new Xr(Ne.DATA_MATRIX_FIELD_256)}return t.prototype.decode=function(e){var r,n,i=new g1(e),a=i.getVersion(),o=i.readCodewords(),s=x1.getDataBlocks(o,a),l=0;try{for(var c=m1(s),f=c.next();!f.done;f=c.next()){var d=f.value;l+=d.getNumDataCodewords()}}catch(A){r={error:A}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}for(var v=new Uint8Array(l),h=s.length,p=0;p<h;p++){var g=s[p],y=g.getCodewords(),w=g.getNumDataCodewords();this.correctErrors(y,w);for(var m=0;m<w;m++)v[m*h+p]=y[m]}return y1.decode(v)},t.prototype.correctErrors=function(e,r){var n=new Int32Array(e);try{this.rsDecoder.decode(n,e.length-r)}catch{throw new me}for(var i=0;i<r;i++)e[i]=n[i]},t})(),E1=(function(){function t(e){this.image=e,this.rectangleDetector=new Nn(this.image)}return t.prototype.detect=function(){var e=this.rectangleDetector.detect(),r=this.detectSolid1(e);if(r=this.detectSolid2(r),r[3]=this.correctTopRight(r),!r[3])throw new I;r=this.shiftToModuleCenter(r);var n=r[0],i=r[1],a=r[2],o=r[3],s=this.transitionsBetween(n,o)+1,l=this.transitionsBetween(a,o)+1;(s&1)===1&&(s+=1),(l&1)===1&&(l+=1),4*s<7*l&&4*l<7*s&&(s=l=Math.max(s,l));var c=t.sampleGrid(this.image,n,i,a,o,s,l);return new Kn(c,[n,i,a,o])},t.shiftPoint=function(e,r,n){var i=(r.getX()-e.getX())/(n+1),a=(r.getY()-e.getY())/(n+1);return new k(e.getX()+i,e.getY()+a)},t.moveAway=function(e,r,n){var i=e.getX(),a=e.getY();return i<r?i-=1:i+=1,a<n?a-=1:a+=1,new k(i,a)},t.prototype.detectSolid1=function(e){var r=e[0],n=e[1],i=e[3],a=e[2],o=this.transitionsBetween(r,n),s=this.transitionsBetween(n,i),l=this.transitionsBetween(i,a),c=this.transitionsBetween(a,r),f=o,d=[a,r,n,i];return f>s&&(f=s,d[0]=r,d[1]=n,d[2]=i,d[3]=a),f>l&&(f=l,d[0]=n,d[1]=i,d[2]=a,d[3]=r),f>c&&(d[0]=i,d[1]=a,d[2]=r,d[3]=n),d},t.prototype.detectSolid2=function(e){var r=e[0],n=e[1],i=e[2],a=e[3],o=this.transitionsBetween(r,a),s=t.shiftPoint(n,i,(o+1)*4),l=t.shiftPoint(i,n,(o+1)*4),c=this.transitionsBetween(s,r),f=this.transitionsBetween(l,a);return c<f?(e[0]=r,e[1]=n,e[2]=i,e[3]=a):(e[0]=n,e[1]=i,e[2]=a,e[3]=r),e},t.prototype.correctTopRight=function(e){var r=e[0],n=e[1],i=e[2],a=e[3],o=this.transitionsBetween(r,a),s=this.transitionsBetween(n,a),l=t.shiftPoint(r,n,(s+1)*4),c=t.shiftPoint(i,n,(o+1)*4);o=this.transitionsBetween(l,a),s=this.transitionsBetween(c,a);var f=new k(a.getX()+(i.getX()-n.getX())/(o+1),a.getY()+(i.getY()-n.getY())/(o+1)),d=new k(a.getX()+(r.getX()-n.getX())/(s+1),a.getY()+(r.getY()-n.getY())/(s+1));if(!this.isValid(f))return this.isValid(d)?d:null;if(!this.isValid(d))return f;var v=this.transitionsBetween(l,f)+this.transitionsBetween(c,f),h=this.transitionsBetween(l,d)+this.transitionsBetween(c,d);return v>h?f:d},t.prototype.shiftToModuleCenter=function(e){var r=e[0],n=e[1],i=e[2],a=e[3],o=this.transitionsBetween(r,a)+1,s=this.transitionsBetween(i,a)+1,l=t.shiftPoint(r,n,s*4),c=t.shiftPoint(i,n,o*4);o=this.transitionsBetween(l,a)+1,s=this.transitionsBetween(c,a)+1,(o&1)===1&&(o+=1),(s&1)===1&&(s+=1);var f=(r.getX()+n.getX()+i.getX()+a.getX())/4,d=(r.getY()+n.getY()+i.getY()+a.getY())/4;r=t.moveAway(r,f,d),n=t.moveAway(n,f,d),i=t.moveAway(i,f,d),a=t.moveAway(a,f,d);var v,h;return l=t.shiftPoint(r,n,s*4),l=t.shiftPoint(l,a,o*4),v=t.shiftPoint(n,r,s*4),v=t.shiftPoint(v,i,o*4),c=t.shiftPoint(i,a,s*4),c=t.shiftPoint(c,n,o*4),h=t.shiftPoint(a,i,s*4),h=t.shiftPoint(h,r,o*4),[l,v,c,h]},t.prototype.isValid=function(e){return e.getX()>=0&&e.getX()<this.image.getWidth()&&e.getY()>0&&e.getY()<this.image.getHeight()},t.sampleGrid=function(e,r,n,i,a,o,s){var l=jn.getInstance();return l.sampleGrid(e,o,s,.5,.5,o-.5,.5,o-.5,s-.5,.5,s-.5,r.getX(),r.getY(),a.getX(),a.getY(),i.getX(),i.getY(),n.getX(),n.getY())},t.prototype.transitionsBetween=function(e,r){var n=Math.trunc(e.getX()),i=Math.trunc(e.getY()),a=Math.trunc(r.getX()),o=Math.trunc(r.getY()),s=Math.abs(o-i)>Math.abs(a-n);if(s){var l=n;n=i,i=l,l=a,a=o,o=l}for(var c=Math.abs(a-n),f=Math.abs(o-i),d=-c/2,v=i<o?1:-1,h=n<a?1:-1,p=0,g=this.image.get(s?i:n,s?n:i),y=n,w=i;y!==a;y+=h){var m=this.image.get(s?w:y,s?y:w);if(m!==g&&(p++,g=m),d+=f,d>0){if(w===o)break;w+=v,d-=c}}return p},t})(),Rn=(function(){function t(){this.decoder=new w1}return t.prototype.decode=function(e,r){r===void 0&&(r=null);var n,i;if(r!=null&&r.has(le.PURE_BARCODE)){var a=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decode(a),i=t.NO_POINTS}else{var o=new E1(e.getBlackMatrix()).detect();n=this.decoder.decode(o.getBits()),i=o.getPoints()}var s=n.getRawBytes(),l=new Be(n.getText(),s,8*s.length,i,U.DATA_MATRIX,ne.currentTimeMillis()),c=n.getByteSegments();c!=null&&l.putMetadata(we.BYTE_SEGMENTS,c);var f=n.getECLevel();return f!=null&&l.putMetadata(we.ERROR_CORRECTION_LEVEL,f),l},t.prototype.reset=function(){},t.extractPureBits=function(e){var r=e.getTopLeftOnBit(),n=e.getBottomRightOnBit();if(r==null||n==null)throw new I;var i=this.moduleSize(r,e),a=r[1],o=n[1],s=r[0],l=n[0],c=(l-s+1)/i,f=(o-a+1)/i;if(c<=0||f<=0)throw new I;var d=i/2;a+=d,s+=d;for(var v=new Ze(c,f),h=0;h<f;h++)for(var p=a+h*i,g=0;g<c;g++)e.get(s+g*i,p)&&v.set(g,h);return v},t.moduleSize=function(e,r){for(var n=r.getWidth(),i=e[0],a=e[1];i<n&&r.get(i,a);)i++;if(i===n)throw new I;var o=i-e[0];if(o===0)throw new I;return o},t.NO_POINTS=[],t})(),A1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();(function(t){A1(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Rn,r)||this}return e})(Ut);var It;(function(t){t[t.L=0]="L",t[t.M=1]="M",t[t.Q=2]="Q",t[t.H=3]="H"})(It||(It={}));var _1=(function(){function t(e,r,n){this.value=e,this.stringValue=r,this.bits=n,t.FOR_BITS.set(n,this),t.FOR_VALUE.set(e,this)}return t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.fromString=function(e){switch(e){case"L":return t.L;case"M":return t.M;case"Q":return t.Q;case"H":return t.H;default:throw new Fe(e+"not available")}},t.prototype.toString=function(){return this.stringValue},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.forBits=function(e){if(e<0||e>=t.FOR_BITS.size)throw new F;return t.FOR_BITS.get(e)},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.L=new t(It.L,"L",1),t.M=new t(It.M,"M",0),t.Q=new t(It.Q,"Q",3),t.H=new t(It.H,"H",2),t})(),C1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xa=(function(){function t(e){this.errorCorrectionLevel=_1.forBits(e>>3&3),this.dataMask=e&7}return t.numBitsDiffering=function(e,r){return G.bitCount(e^r)},t.decodeFormatInformation=function(e,r){var n=t.doDecodeFormatInformation(e,r);return n!==null?n:t.doDecodeFormatInformation(e^t.FORMAT_INFO_MASK_QR,r^t.FORMAT_INFO_MASK_QR)},t.doDecodeFormatInformation=function(e,r){var n,i,a=Number.MAX_SAFE_INTEGER,o=0;try{for(var s=C1(t.FORMAT_INFO_DECODE_LOOKUP),l=s.next();!l.done;l=s.next()){var c=l.value,f=c[0];if(f===e||f===r)return new t(c[1]);var d=t.numBitsDiffering(e,f);d<a&&(o=c[1],a=d),e!==r&&(d=t.numBitsDiffering(r,f),d<a&&(o=c[1],a=d))}}catch(v){n={error:v}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return a<=3?new t(o):null},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getDataMask=function(){return this.dataMask},t.prototype.hashCode=function(){return this.errorCorrectionLevel.getBits()<<3|this.dataMask},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.errorCorrectionLevel===r.errorCorrectionLevel&&this.dataMask===r.dataMask},t.FORMAT_INFO_MASK_QR=21522,t.FORMAT_INFO_DECODE_LOOKUP=[Int32Array.from([21522,0]),Int32Array.from([20773,1]),Int32Array.from([24188,2]),Int32Array.from([23371,3]),Int32Array.from([17913,4]),Int32Array.from([16590,5]),Int32Array.from([20375,6]),Int32Array.from([19104,7]),Int32Array.from([30660,8]),Int32Array.from([29427,9]),Int32Array.from([32170,10]),Int32Array.from([30877,11]),Int32Array.from([26159,12]),Int32Array.from([25368,13]),Int32Array.from([27713,14]),Int32Array.from([26998,15]),Int32Array.from([5769,16]),Int32Array.from([5054,17]),Int32Array.from([7399,18]),Int32Array.from([6608,19]),Int32Array.from([1890,20]),Int32Array.from([597,21]),Int32Array.from([3340,22]),Int32Array.from([2107,23]),Int32Array.from([13663,24]),Int32Array.from([12392,25]),Int32Array.from([16177,26]),Int32Array.from([14854,27]),Int32Array.from([9396,28]),Int32Array.from([8579,29]),Int32Array.from([11994,30]),Int32Array.from([11245,31])],t})(),b1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},_=(function(){function t(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.ecCodewordsPerBlock=e,this.ecBlocks=r}return t.prototype.getECCodewordsPerBlock=function(){return this.ecCodewordsPerBlock},t.prototype.getNumBlocks=function(){var e,r,n=0,i=this.ecBlocks;try{for(var a=b1(i),o=a.next();!o.done;o=a.next()){var s=o.value;n+=s.getCount()}}catch(l){e={error:l}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return n},t.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},t.prototype.getECBlocks=function(){return this.ecBlocks},t})(),x=(function(){function t(e,r){this.count=e,this.dataCodewords=r}return t.prototype.getCount=function(){return this.count},t.prototype.getDataCodewords=function(){return this.dataCodewords},t})(),S1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wt=(function(){function t(e,r){for(var n,i,a=[],o=2;o<arguments.length;o++)a[o-2]=arguments[o];this.versionNumber=e,this.alignmentPatternCenters=r,this.ecBlocks=a;var s=0,l=a[0].getECCodewordsPerBlock(),c=a[0].getECBlocks();try{for(var f=S1(c),d=f.next();!d.done;d=f.next()){var v=d.value;s+=v.getCount()*(v.getDataCodewords()+l)}}catch(h){n={error:h}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}this.totalCodewords=s}return t.prototype.getVersionNumber=function(){return this.versionNumber},t.prototype.getAlignmentPatternCenters=function(){return this.alignmentPatternCenters},t.prototype.getTotalCodewords=function(){return this.totalCodewords},t.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},t.prototype.getECBlocksForLevel=function(e){return this.ecBlocks[e.getValue()]},t.getProvisionalVersionForDimension=function(e){if(e%4!==1)throw new R;try{return this.getVersionForNumber((e-17)/4)}catch{throw new R}},t.getVersionForNumber=function(e){if(e<1||e>40)throw new F;return t.VERSIONS[e-1]},t.decodeVersionInformation=function(e){for(var r=Number.MAX_SAFE_INTEGER,n=0,i=0;i<t.VERSION_DECODE_INFO.length;i++){var a=t.VERSION_DECODE_INFO[i];if(a===e)return t.getVersionForNumber(i+7);var o=xa.numBitsDiffering(e,a);o<r&&(n=i+7,r=o)}return r<=3?t.getVersionForNumber(n):null},t.prototype.buildFunctionPattern=function(){var e=this.getDimensionForVersion(),r=new Ze(e);r.setRegion(0,0,9,9),r.setRegion(e-8,0,8,9),r.setRegion(0,e-8,9,8);for(var n=this.alignmentPatternCenters.length,i=0;i<n;i++)for(var a=this.alignmentPatternCenters[i]-2,o=0;o<n;o++)i===0&&(o===0||o===n-1)||i===n-1&&o===0||r.setRegion(this.alignmentPatternCenters[o]-2,a,5,5);return r.setRegion(6,9,1,e-17),r.setRegion(9,6,e-17,1),this.versionNumber>6&&(r.setRegion(e-11,0,3,6),r.setRegion(0,e-11,6,3)),r},t.prototype.toString=function(){return""+this.versionNumber},t.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),t.VERSIONS=[new t(1,new Int32Array(0),new _(7,new x(1,19)),new _(10,new x(1,16)),new _(13,new x(1,13)),new _(17,new x(1,9))),new t(2,Int32Array.from([6,18]),new _(10,new x(1,34)),new _(16,new x(1,28)),new _(22,new x(1,22)),new _(28,new x(1,16))),new t(3,Int32Array.from([6,22]),new _(15,new x(1,55)),new _(26,new x(1,44)),new _(18,new x(2,17)),new _(22,new x(2,13))),new t(4,Int32Array.from([6,26]),new _(20,new x(1,80)),new _(18,new x(2,32)),new _(26,new x(2,24)),new _(16,new x(4,9))),new t(5,Int32Array.from([6,30]),new _(26,new x(1,108)),new _(24,new x(2,43)),new _(18,new x(2,15),new x(2,16)),new _(22,new x(2,11),new x(2,12))),new t(6,Int32Array.from([6,34]),new _(18,new x(2,68)),new _(16,new x(4,27)),new _(24,new x(4,19)),new _(28,new x(4,15))),new t(7,Int32Array.from([6,22,38]),new _(20,new x(2,78)),new _(18,new x(4,31)),new _(18,new x(2,14),new x(4,15)),new _(26,new x(4,13),new x(1,14))),new t(8,Int32Array.from([6,24,42]),new _(24,new x(2,97)),new _(22,new x(2,38),new x(2,39)),new _(22,new x(4,18),new x(2,19)),new _(26,new x(4,14),new x(2,15))),new t(9,Int32Array.from([6,26,46]),new _(30,new x(2,116)),new _(22,new x(3,36),new x(2,37)),new _(20,new x(4,16),new x(4,17)),new _(24,new x(4,12),new x(4,13))),new t(10,Int32Array.from([6,28,50]),new _(18,new x(2,68),new x(2,69)),new _(26,new x(4,43),new x(1,44)),new _(24,new x(6,19),new x(2,20)),new _(28,new x(6,15),new x(2,16))),new t(11,Int32Array.from([6,30,54]),new _(20,new x(4,81)),new _(30,new x(1,50),new x(4,51)),new _(28,new x(4,22),new x(4,23)),new _(24,new x(3,12),new x(8,13))),new t(12,Int32Array.from([6,32,58]),new _(24,new x(2,92),new x(2,93)),new _(22,new x(6,36),new x(2,37)),new _(26,new x(4,20),new x(6,21)),new _(28,new x(7,14),new x(4,15))),new t(13,Int32Array.from([6,34,62]),new _(26,new x(4,107)),new _(22,new x(8,37),new x(1,38)),new _(24,new x(8,20),new x(4,21)),new _(22,new x(12,11),new x(4,12))),new t(14,Int32Array.from([6,26,46,66]),new _(30,new x(3,115),new x(1,116)),new _(24,new x(4,40),new x(5,41)),new _(20,new x(11,16),new x(5,17)),new _(24,new x(11,12),new x(5,13))),new t(15,Int32Array.from([6,26,48,70]),new _(22,new x(5,87),new x(1,88)),new _(24,new x(5,41),new x(5,42)),new _(30,new x(5,24),new x(7,25)),new _(24,new x(11,12),new x(7,13))),new t(16,Int32Array.from([6,26,50,74]),new _(24,new x(5,98),new x(1,99)),new _(28,new x(7,45),new x(3,46)),new _(24,new x(15,19),new x(2,20)),new _(30,new x(3,15),new x(13,16))),new t(17,Int32Array.from([6,30,54,78]),new _(28,new x(1,107),new x(5,108)),new _(28,new x(10,46),new x(1,47)),new _(28,new x(1,22),new x(15,23)),new _(28,new x(2,14),new x(17,15))),new t(18,Int32Array.from([6,30,56,82]),new _(30,new x(5,120),new x(1,121)),new _(26,new x(9,43),new x(4,44)),new _(28,new x(17,22),new x(1,23)),new _(28,new x(2,14),new x(19,15))),new t(19,Int32Array.from([6,30,58,86]),new _(28,new x(3,113),new x(4,114)),new _(26,new x(3,44),new x(11,45)),new _(26,new x(17,21),new x(4,22)),new _(26,new x(9,13),new x(16,14))),new t(20,Int32Array.from([6,34,62,90]),new _(28,new x(3,107),new x(5,108)),new _(26,new x(3,41),new x(13,42)),new _(30,new x(15,24),new x(5,25)),new _(28,new x(15,15),new x(10,16))),new t(21,Int32Array.from([6,28,50,72,94]),new _(28,new x(4,116),new x(4,117)),new _(26,new x(17,42)),new _(28,new x(17,22),new x(6,23)),new _(30,new x(19,16),new x(6,17))),new t(22,Int32Array.from([6,26,50,74,98]),new _(28,new x(2,111),new x(7,112)),new _(28,new x(17,46)),new _(30,new x(7,24),new x(16,25)),new _(24,new x(34,13))),new t(23,Int32Array.from([6,30,54,78,102]),new _(30,new x(4,121),new x(5,122)),new _(28,new x(4,47),new x(14,48)),new _(30,new x(11,24),new x(14,25)),new _(30,new x(16,15),new x(14,16))),new t(24,Int32Array.from([6,28,54,80,106]),new _(30,new x(6,117),new x(4,118)),new _(28,new x(6,45),new x(14,46)),new _(30,new x(11,24),new x(16,25)),new _(30,new x(30,16),new x(2,17))),new t(25,Int32Array.from([6,32,58,84,110]),new _(26,new x(8,106),new x(4,107)),new _(28,new x(8,47),new x(13,48)),new _(30,new x(7,24),new x(22,25)),new _(30,new x(22,15),new x(13,16))),new t(26,Int32Array.from([6,30,58,86,114]),new _(28,new x(10,114),new x(2,115)),new _(28,new x(19,46),new x(4,47)),new _(28,new x(28,22),new x(6,23)),new _(30,new x(33,16),new x(4,17))),new t(27,Int32Array.from([6,34,62,90,118]),new _(30,new x(8,122),new x(4,123)),new _(28,new x(22,45),new x(3,46)),new _(30,new x(8,23),new x(26,24)),new _(30,new x(12,15),new x(28,16))),new t(28,Int32Array.from([6,26,50,74,98,122]),new _(30,new x(3,117),new x(10,118)),new _(28,new x(3,45),new x(23,46)),new _(30,new x(4,24),new x(31,25)),new _(30,new x(11,15),new x(31,16))),new t(29,Int32Array.from([6,30,54,78,102,126]),new _(30,new x(7,116),new x(7,117)),new _(28,new x(21,45),new x(7,46)),new _(30,new x(1,23),new x(37,24)),new _(30,new x(19,15),new x(26,16))),new t(30,Int32Array.from([6,26,52,78,104,130]),new _(30,new x(5,115),new x(10,116)),new _(28,new x(19,47),new x(10,48)),new _(30,new x(15,24),new x(25,25)),new _(30,new x(23,15),new x(25,16))),new t(31,Int32Array.from([6,30,56,82,108,134]),new _(30,new x(13,115),new x(3,116)),new _(28,new x(2,46),new x(29,47)),new _(30,new x(42,24),new x(1,25)),new _(30,new x(23,15),new x(28,16))),new t(32,Int32Array.from([6,34,60,86,112,138]),new _(30,new x(17,115)),new _(28,new x(10,46),new x(23,47)),new _(30,new x(10,24),new x(35,25)),new _(30,new x(19,15),new x(35,16))),new t(33,Int32Array.from([6,30,58,86,114,142]),new _(30,new x(17,115),new x(1,116)),new _(28,new x(14,46),new x(21,47)),new _(30,new x(29,24),new x(19,25)),new _(30,new x(11,15),new x(46,16))),new t(34,Int32Array.from([6,34,62,90,118,146]),new _(30,new x(13,115),new x(6,116)),new _(28,new x(14,46),new x(23,47)),new _(30,new x(44,24),new x(7,25)),new _(30,new x(59,16),new x(1,17))),new t(35,Int32Array.from([6,30,54,78,102,126,150]),new _(30,new x(12,121),new x(7,122)),new _(28,new x(12,47),new x(26,48)),new _(30,new x(39,24),new x(14,25)),new _(30,new x(22,15),new x(41,16))),new t(36,Int32Array.from([6,24,50,76,102,128,154]),new _(30,new x(6,121),new x(14,122)),new _(28,new x(6,47),new x(34,48)),new _(30,new x(46,24),new x(10,25)),new _(30,new x(2,15),new x(64,16))),new t(37,Int32Array.from([6,28,54,80,106,132,158]),new _(30,new x(17,122),new x(4,123)),new _(28,new x(29,46),new x(14,47)),new _(30,new x(49,24),new x(10,25)),new _(30,new x(24,15),new x(46,16))),new t(38,Int32Array.from([6,32,58,84,110,136,162]),new _(30,new x(4,122),new x(18,123)),new _(28,new x(13,46),new x(32,47)),new _(30,new x(48,24),new x(14,25)),new _(30,new x(42,15),new x(32,16))),new t(39,Int32Array.from([6,26,54,82,110,138,166]),new _(30,new x(20,117),new x(4,118)),new _(28,new x(40,47),new x(7,48)),new _(30,new x(43,24),new x(22,25)),new _(30,new x(10,15),new x(67,16))),new t(40,Int32Array.from([6,30,58,86,114,142,170]),new _(30,new x(19,118),new x(6,119)),new _(28,new x(18,47),new x(31,48)),new _(30,new x(34,24),new x(34,25)),new _(30,new x(20,15),new x(61,16)))],t})(),ve;(function(t){t[t.DATA_MASK_000=0]="DATA_MASK_000",t[t.DATA_MASK_001=1]="DATA_MASK_001",t[t.DATA_MASK_010=2]="DATA_MASK_010",t[t.DATA_MASK_011=3]="DATA_MASK_011",t[t.DATA_MASK_100=4]="DATA_MASK_100",t[t.DATA_MASK_101=5]="DATA_MASK_101",t[t.DATA_MASK_110=6]="DATA_MASK_110",t[t.DATA_MASK_111=7]="DATA_MASK_111"})(ve||(ve={}));var Pi=(function(){function t(e,r){this.value=e,this.isMasked=r}return t.prototype.unmaskBitMatrix=function(e,r){for(var n=0;n<r;n++)for(var i=0;i<r;i++)this.isMasked(n,i)&&e.flip(i,n)},t.values=new Map([[ve.DATA_MASK_000,new t(ve.DATA_MASK_000,function(e,r){return(e+r&1)===0})],[ve.DATA_MASK_001,new t(ve.DATA_MASK_001,function(e,r){return(e&1)===0})],[ve.DATA_MASK_010,new t(ve.DATA_MASK_010,function(e,r){return r%3===0})],[ve.DATA_MASK_011,new t(ve.DATA_MASK_011,function(e,r){return(e+r)%3===0})],[ve.DATA_MASK_100,new t(ve.DATA_MASK_100,function(e,r){return(Math.floor(e/2)+Math.floor(r/3)&1)===0})],[ve.DATA_MASK_101,new t(ve.DATA_MASK_101,function(e,r){return e*r%6===0})],[ve.DATA_MASK_110,new t(ve.DATA_MASK_110,function(e,r){return e*r%6<3})],[ve.DATA_MASK_111,new t(ve.DATA_MASK_111,function(e,r){return(e+r+e*r%3&1)===0})]]),t})(),I1=(function(){function t(e){var r=e.getHeight();if(r<21||(r&3)!==1)throw new R;this.bitMatrix=e}return t.prototype.readFormatInformation=function(){if(this.parsedFormatInfo!==null&&this.parsedFormatInfo!==void 0)return this.parsedFormatInfo;for(var e=0,r=0;r<6;r++)e=this.copyBit(r,8,e);e=this.copyBit(7,8,e),e=this.copyBit(8,8,e),e=this.copyBit(8,7,e);for(var n=5;n>=0;n--)e=this.copyBit(8,n,e);for(var i=this.bitMatrix.getHeight(),a=0,o=i-7,n=i-1;n>=o;n--)a=this.copyBit(8,n,a);for(var r=i-8;r<i;r++)a=this.copyBit(r,8,a);if(this.parsedFormatInfo=xa.decodeFormatInformation(e,a),this.parsedFormatInfo!==null)return this.parsedFormatInfo;throw new R},t.prototype.readVersion=function(){if(this.parsedVersion!==null&&this.parsedVersion!==void 0)return this.parsedVersion;var e=this.bitMatrix.getHeight(),r=Math.floor((e-17)/4);if(r<=6)return wt.getVersionForNumber(r);for(var n=0,i=e-11,a=5;a>=0;a--)for(var o=e-9;o>=i;o--)n=this.copyBit(o,a,n);var s=wt.decodeVersionInformation(n);if(s!==null&&s.getDimensionForVersion()===e)return this.parsedVersion=s,s;n=0;for(var o=5;o>=0;o--)for(var a=e-9;a>=i;a--)n=this.copyBit(o,a,n);if(s=wt.decodeVersionInformation(n),s!==null&&s.getDimensionForVersion()===e)return this.parsedVersion=s,s;throw new R},t.prototype.copyBit=function(e,r,n){var i=this.isMirror?this.bitMatrix.get(r,e):this.bitMatrix.get(e,r);return i?n<<1|1:n<<1},t.prototype.readCodewords=function(){var e=this.readFormatInformation(),r=this.readVersion(),n=Pi.values.get(e.getDataMask()),i=this.bitMatrix.getHeight();n.unmaskBitMatrix(this.bitMatrix,i);for(var a=r.buildFunctionPattern(),o=!0,s=new Uint8Array(r.getTotalCodewords()),l=0,c=0,f=0,d=i-1;d>0;d-=2){d===6&&d--;for(var v=0;v<i;v++)for(var h=o?i-1-v:v,p=0;p<2;p++)a.get(d-p,h)||(f++,c<<=1,this.bitMatrix.get(d-p,h)&&(c|=1),f===8&&(s[l++]=c,f=0,c=0));o=!o}if(l!==r.getTotalCodewords())throw new R;return s},t.prototype.remask=function(){if(this.parsedFormatInfo!==null){var e=Pi.values[this.parsedFormatInfo.getDataMask()],r=this.bitMatrix.getHeight();e.unmaskBitMatrix(this.bitMatrix,r)}},t.prototype.setMirror=function(e){this.parsedVersion=null,this.parsedFormatInfo=null,this.isMirror=e},t.prototype.mirror=function(){for(var e=this.bitMatrix,r=0,n=e.getWidth();r<n;r++)for(var i=r+1,a=e.getHeight();i<a;i++)e.get(r,i)!==e.get(i,r)&&(e.flip(i,r),e.flip(r,i))},t})(),ki=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},O1=(function(){function t(e,r){this.numDataCodewords=e,this.codewords=r}return t.getDataBlocks=function(e,r,n){var i,a,o,s;if(e.length!==r.getTotalCodewords())throw new F;var l=r.getECBlocksForLevel(n),c=0,f=l.getECBlocks();try{for(var d=ki(f),v=d.next();!v.done;v=d.next()){var h=v.value;c+=h.getCount()}}catch(z){i={error:z}}finally{try{v&&!v.done&&(a=d.return)&&a.call(d)}finally{if(i)throw i.error}}var p=new Array(c),g=0;try{for(var y=ki(f),w=y.next();!w.done;w=y.next())for(var h=w.value,m=0;m<h.getCount();m++){var A=h.getDataCodewords(),E=l.getECCodewordsPerBlock()+A;p[g++]=new t(A,new Uint8Array(E))}}catch(z){o={error:z}}finally{try{w&&!w.done&&(s=y.return)&&s.call(y)}finally{if(o)throw o.error}}for(var C=p[0].codewords.length,b=p.length-1;b>=0;){var O=p[b].codewords.length;if(O===C)break;b--}b++;for(var P=C-l.getECCodewordsPerBlock(),H=0,m=0;m<P;m++)for(var L=0;L<g;L++)p[L].codewords[m]=e[H++];for(var L=b;L<g;L++)p[L].codewords[P]=e[H++];for(var te=p[0].codewords.length,m=P;m<te;m++)for(var L=0;L<g;L++){var V=L<b?m:m+1;p[L].codewords[V]=e[H++]}return p},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t})(),Pe;(function(t){t[t.TERMINATOR=0]="TERMINATOR",t[t.NUMERIC=1]="NUMERIC",t[t.ALPHANUMERIC=2]="ALPHANUMERIC",t[t.STRUCTURED_APPEND=3]="STRUCTURED_APPEND",t[t.BYTE=4]="BYTE",t[t.ECI=5]="ECI",t[t.KANJI=6]="KANJI",t[t.FNC1_FIRST_POSITION=7]="FNC1_FIRST_POSITION",t[t.FNC1_SECOND_POSITION=8]="FNC1_SECOND_POSITION",t[t.HANZI=9]="HANZI"})(Pe||(Pe={}));var ae=(function(){function t(e,r,n,i){this.value=e,this.stringValue=r,this.characterCountBitsForVersions=n,this.bits=i,t.FOR_BITS.set(i,this),t.FOR_VALUE.set(e,this)}return t.forBits=function(e){var r=t.FOR_BITS.get(e);if(r===void 0)throw new F;return r},t.prototype.getCharacterCountBits=function(e){var r=e.getVersionNumber(),n;return r<=9?n=0:r<=26?n=1:n=2,this.characterCountBitsForVersions[n]},t.prototype.getValue=function(){return this.value},t.prototype.getBits=function(){return this.bits},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;return this.value===r.value},t.prototype.toString=function(){return this.stringValue},t.FOR_BITS=new Map,t.FOR_VALUE=new Map,t.TERMINATOR=new t(Pe.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),t.NUMERIC=new t(Pe.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),t.ALPHANUMERIC=new t(Pe.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),t.STRUCTURED_APPEND=new t(Pe.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),t.BYTE=new t(Pe.BYTE,"BYTE",Int32Array.from([8,16,16]),4),t.ECI=new t(Pe.ECI,"ECI",Int32Array.from([0,0,0]),7),t.KANJI=new t(Pe.KANJI,"KANJI",Int32Array.from([8,10,12]),8),t.FNC1_FIRST_POSITION=new t(Pe.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),t.FNC1_SECOND_POSITION=new t(Pe.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),t.HANZI=new t(Pe.HANZI,"HANZI",Int32Array.from([8,10,12]),13),t})(),T1=(function(){function t(){}return t.decode=function(e,r,n,i){var a=new ga(e),o=new J,s=new Array,l=-1,c=-1;try{var f=null,d=!1,v=void 0;do{if(a.available()<4)v=ae.TERMINATOR;else{var h=a.readBits(4);v=ae.forBits(h)}switch(v){case ae.TERMINATOR:break;case ae.FNC1_FIRST_POSITION:case ae.FNC1_SECOND_POSITION:d=!0;break;case ae.STRUCTURED_APPEND:if(a.available()<16)throw new R;l=a.readBits(8),c=a.readBits(8);break;case ae.ECI:var p=t.parseECIValue(a);if(f=de.getCharacterSetECIByValue(p),f===null)throw new R;break;case ae.HANZI:var g=a.readBits(4),y=a.readBits(v.getCharacterCountBits(r));g===t.GB2312_SUBSET&&t.decodeHanziSegment(a,o,y);break;default:var w=a.readBits(v.getCharacterCountBits(r));switch(v){case ae.NUMERIC:t.decodeNumericSegment(a,o,w);break;case ae.ALPHANUMERIC:t.decodeAlphanumericSegment(a,o,w,d);break;case ae.BYTE:t.decodeByteSegment(a,o,w,f,s,i);break;case ae.KANJI:t.decodeKanjiSegment(a,o,w);break;default:throw new R}break}}while(v!==ae.TERMINATOR)}catch{throw new R}return new Wr(e,o.toString(),s.length===0?null:s,n===null?null:n.toString(),l,c)},t.decodeHanziSegment=function(e,r,n){if(n*13>e.available())throw new R;for(var i=new Uint8Array(2*n),a=0;n>0;){var o=e.readBits(13),s=o/96<<8&4294967295|o%96;s<959?s+=41377:s+=42657,i[a]=s>>8&255,i[a+1]=s&255,a+=2,n--}try{r.append(je.decode(i,re.GB2312))}catch(l){throw new R(l)}},t.decodeKanjiSegment=function(e,r,n){if(n*13>e.available())throw new R;for(var i=new Uint8Array(2*n),a=0;n>0;){var o=e.readBits(13),s=o/192<<8&4294967295|o%192;s<7936?s+=33088:s+=49472,i[a]=s>>8,i[a+1]=s,a+=2,n--}try{r.append(je.decode(i,re.SHIFT_JIS))}catch(l){throw new R(l)}},t.decodeByteSegment=function(e,r,n,i,a,o){if(8*n>e.available())throw new R;for(var s=new Uint8Array(n),l=0;l<n;l++)s[l]=e.readBits(8);var c;i===null?c=re.guessEncoding(s,o):c=i.getName();try{r.append(je.decode(s,c))}catch(f){throw new R(f)}a.push(s)},t.toAlphaNumericChar=function(e){if(e>=t.ALPHANUMERIC_CHARS.length)throw new R;return t.ALPHANUMERIC_CHARS[e]},t.decodeAlphanumericSegment=function(e,r,n,i){for(var a=r.length();n>1;){if(e.available()<11)throw new R;var o=e.readBits(11);r.append(t.toAlphaNumericChar(Math.floor(o/45))),r.append(t.toAlphaNumericChar(o%45)),n-=2}if(n===1){if(e.available()<6)throw new R;r.append(t.toAlphaNumericChar(e.readBits(6)))}if(i)for(var s=a;s<r.length();s++)r.charAt(s)==="%"&&(s<r.length()-1&&r.charAt(s+1)==="%"?r.deleteCharAt(s+1):r.setCharAt(s,""))},t.decodeNumericSegment=function(e,r,n){for(;n>=3;){if(e.available()<10)throw new R;var i=e.readBits(10);if(i>=1e3)throw new R;r.append(t.toAlphaNumericChar(Math.floor(i/100))),r.append(t.toAlphaNumericChar(Math.floor(i/10)%10)),r.append(t.toAlphaNumericChar(i%10)),n-=3}if(n===2){if(e.available()<7)throw new R;var a=e.readBits(7);if(a>=100)throw new R;r.append(t.toAlphaNumericChar(Math.floor(a/10))),r.append(t.toAlphaNumericChar(a%10))}else if(n===1){if(e.available()<4)throw new R;var o=e.readBits(4);if(o>=10)throw new R;r.append(t.toAlphaNumericChar(o))}},t.parseECIValue=function(e){var r=e.readBits(8);if((r&128)===0)return r&127;if((r&192)===128){var n=e.readBits(8);return(r&63)<<8&4294967295|n}if((r&224)===192){var i=e.readBits(16);return(r&31)<<16&4294967295|i}throw new R},t.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.GB2312_SUBSET=1,t})(),ya=(function(){function t(e){this.mirrored=e}return t.prototype.isMirrored=function(){return this.mirrored},t.prototype.applyMirroredCorrection=function(e){if(!(!this.mirrored||e===null||e.length<3)){var r=e[0];e[0]=e[2],e[2]=r}},t})(),Mi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},N1=(function(){function t(){this.rsDecoder=new Xr(Ne.QR_CODE_FIELD_256)}return t.prototype.decodeBooleanArray=function(e,r){return this.decodeBitMatrix(Ze.parseFromBooleanArray(e),r)},t.prototype.decodeBitMatrix=function(e,r){var n=new I1(e),i=null;try{return this.decodeBitMatrixParser(n,r)}catch(o){i=o}try{n.remask(),n.setMirror(!0),n.readVersion(),n.readFormatInformation(),n.mirror();var a=this.decodeBitMatrixParser(n,r);return a.setOther(new ya(!0)),a}catch(o){throw i!==null?i:o}},t.prototype.decodeBitMatrixParser=function(e,r){var n,i,a,o,s=e.readVersion(),l=e.readFormatInformation().getErrorCorrectionLevel(),c=e.readCodewords(),f=O1.getDataBlocks(c,s,l),d=0;try{for(var v=Mi(f),h=v.next();!h.done;h=v.next()){var p=h.value;d+=p.getNumDataCodewords()}}catch(b){n={error:b}}finally{try{h&&!h.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}var g=new Uint8Array(d),y=0;try{for(var w=Mi(f),m=w.next();!m.done;m=w.next()){var p=m.value,A=p.getCodewords(),E=p.getNumDataCodewords();this.correctErrors(A,E);for(var C=0;C<E;C++)g[y++]=A[C]}}catch(b){a={error:b}}finally{try{m&&!m.done&&(o=w.return)&&o.call(w)}finally{if(a)throw a.error}}return T1.decode(g,s,l,r)},t.prototype.correctErrors=function(e,r){var n=new Int32Array(e);try{this.rsDecoder.decode(n,e.length-r)}catch{throw new me}for(var i=0;i<r;i++)e[i]=n[i]},t})(),D1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),B1=(function(t){D1(e,t);function e(r,n,i){var a=t.call(this,r,n)||this;return a.estimatedModuleSize=i,a}return e.prototype.aboutEquals=function(r,n,i){if(Math.abs(n-this.getY())<=r&&Math.abs(i-this.getX())<=r){var a=Math.abs(r-this.estimatedModuleSize);return a<=1||a<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(r,n,i){var a=(this.getX()+n)/2,o=(this.getY()+r)/2,s=(this.estimatedModuleSize+i)/2;return new e(a,o,s)},e})(k),R1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},P1=(function(){function t(e,r,n,i,a,o,s){this.image=e,this.startX=r,this.startY=n,this.width=i,this.height=a,this.moduleSize=o,this.resultPointCallback=s,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(3)}return t.prototype.find=function(){for(var e=this.startX,r=this.height,n=this.width,i=e+n,a=this.startY+r/2,o=new Int32Array(3),s=this.image,l=0;l<r;l++){var c=a+((l&1)===0?Math.floor((l+1)/2):-Math.floor((l+1)/2));o[0]=0,o[1]=0,o[2]=0;for(var f=e;f<i&&!s.get(f,c);)f++;for(var d=0;f<i;){if(s.get(f,c))if(d===1)o[1]++;else if(d===2){if(this.foundPatternCross(o)){var v=this.handlePossibleCenter(o,c,f);if(v!==null)return v}o[0]=o[2],o[1]=1,o[2]=0,d=1}else o[++d]++;else d===1&&d++,o[d]++;f++}if(this.foundPatternCross(o)){var v=this.handlePossibleCenter(o,c,i);if(v!==null)return v}}if(this.possibleCenters.length!==0)return this.possibleCenters[0];throw new I},t.centerFromEnd=function(e,r){return r-e[2]-e[1]/2},t.prototype.foundPatternCross=function(e){for(var r=this.moduleSize,n=r/2,i=0;i<3;i++)if(Math.abs(r-e[i])>=n)return!1;return!0},t.prototype.crossCheckVertical=function(e,r,n,i){var a=this.image,o=a.getHeight(),s=this.crossCheckStateCount;s[0]=0,s[1]=0,s[2]=0;for(var l=e;l>=0&&a.get(r,l)&&s[1]<=n;)s[1]++,l--;if(l<0||s[1]>n)return NaN;for(;l>=0&&!a.get(r,l)&&s[0]<=n;)s[0]++,l--;if(s[0]>n)return NaN;for(l=e+1;l<o&&a.get(r,l)&&s[1]<=n;)s[1]++,l++;if(l===o||s[1]>n)return NaN;for(;l<o&&!a.get(r,l)&&s[2]<=n;)s[2]++,l++;if(s[2]>n)return NaN;var c=s[0]+s[1]+s[2];return 5*Math.abs(c-i)>=2*i?NaN:this.foundPatternCross(s)?t.centerFromEnd(s,l):NaN},t.prototype.handlePossibleCenter=function(e,r,n){var i,a,o=e[0]+e[1]+e[2],s=t.centerFromEnd(e,n),l=this.crossCheckVertical(r,s,2*e[1],o);if(!isNaN(l)){var c=(e[0]+e[1]+e[2])/3;try{for(var f=R1(this.possibleCenters),d=f.next();!d.done;d=f.next()){var v=d.value;if(v.aboutEquals(c,l,s))return v.combineEstimate(l,s,c)}}catch(p){i={error:p}}finally{try{d&&!d.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}var h=new B1(s,l,c);this.possibleCenters.push(h),this.resultPointCallback!==null&&this.resultPointCallback!==void 0&&this.resultPointCallback.foundPossibleResultPoint(h)}return null},t})(),k1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),M1=(function(t){k1(e,t);function e(r,n,i,a){var o=t.call(this,r,n)||this;return o.estimatedModuleSize=i,o.count=a,a===void 0&&(o.count=1),o}return e.prototype.getEstimatedModuleSize=function(){return this.estimatedModuleSize},e.prototype.getCount=function(){return this.count},e.prototype.aboutEquals=function(r,n,i){if(Math.abs(n-this.getY())<=r&&Math.abs(i-this.getX())<=r){var a=Math.abs(r-this.estimatedModuleSize);return a<=1||a<=this.estimatedModuleSize}return!1},e.prototype.combineEstimate=function(r,n,i){var a=this.count+1,o=(this.count*this.getX()+n)/a,s=(this.count*this.getY()+r)/a,l=(this.count*this.estimatedModuleSize+i)/a;return new e(o,s,l,a)},e})(k),L1=(function(){function t(e){this.bottomLeft=e[0],this.topLeft=e[1],this.topRight=e[2]}return t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t})(),jt=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},F1=(function(){function t(e,r){this.image=e,this.resultPointCallback=r,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=r}return t.prototype.getImage=function(){return this.image},t.prototype.getPossibleCenters=function(){return this.possibleCenters},t.prototype.find=function(e){var r=e!=null&&e.get(le.TRY_HARDER)!==void 0,n=e!=null&&e.get(le.PURE_BARCODE)!==void 0,i=this.image,a=i.getHeight(),o=i.getWidth(),s=Math.floor(3*a/(4*t.MAX_MODULES));(s<t.MIN_SKIP||r)&&(s=t.MIN_SKIP);for(var l=!1,c=new Int32Array(5),f=s-1;f<a&&!l;f+=s){c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0;for(var d=0,v=0;v<o;v++)if(i.get(v,f))(d&1)===1&&d++,c[d]++;else if((d&1)===0)if(d===4)if(t.foundPatternCross(c)){var h=this.handlePossibleCenter(c,f,v,n);if(h===!0)if(s=2,this.hasSkipped===!0)l=this.haveMultiplyConfirmedCenters();else{var p=this.findRowSkip();p>c[2]&&(f+=p-c[2]-s,v=o-1)}else{c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,d=3;continue}d=0,c[0]=0,c[1]=0,c[2]=0,c[3]=0,c[4]=0}else c[0]=c[2],c[1]=c[3],c[2]=c[4],c[3]=1,c[4]=0,d=3;else c[++d]++;else c[d]++;if(t.foundPatternCross(c)){var h=this.handlePossibleCenter(c,f,o,n);h===!0&&(s=c[0],this.hasSkipped&&(l=this.haveMultiplyConfirmedCenters()))}}var g=this.selectBestPatterns();return k.orderBestPatterns(g),new L1(g)},t.centerFromEnd=function(e,r){return r-e[4]-e[3]-e[2]/2},t.foundPatternCross=function(e){for(var r=0,n=0;n<5;n++){var i=e[n];if(i===0)return!1;r+=i}if(r<7)return!1;var a=r/7,o=a/2;return Math.abs(a-e[0])<o&&Math.abs(a-e[1])<o&&Math.abs(3*a-e[2])<3*o&&Math.abs(a-e[3])<o&&Math.abs(a-e[4])<o},t.prototype.getCrossCheckStateCount=function(){var e=this.crossCheckStateCount;return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e},t.prototype.crossCheckDiagonal=function(e,r,n,i){for(var a=this.getCrossCheckStateCount(),o=0,s=this.image;e>=o&&r>=o&&s.get(r-o,e-o);)a[2]++,o++;if(e<o||r<o)return!1;for(;e>=o&&r>=o&&!s.get(r-o,e-o)&&a[1]<=n;)a[1]++,o++;if(e<o||r<o||a[1]>n)return!1;for(;e>=o&&r>=o&&s.get(r-o,e-o)&&a[0]<=n;)a[0]++,o++;if(a[0]>n)return!1;var l=s.getHeight(),c=s.getWidth();for(o=1;e+o<l&&r+o<c&&s.get(r+o,e+o);)a[2]++,o++;if(e+o>=l||r+o>=c)return!1;for(;e+o<l&&r+o<c&&!s.get(r+o,e+o)&&a[3]<n;)a[3]++,o++;if(e+o>=l||r+o>=c||a[3]>=n)return!1;for(;e+o<l&&r+o<c&&s.get(r+o,e+o)&&a[4]<n;)a[4]++,o++;if(a[4]>=n)return!1;var f=a[0]+a[1]+a[2]+a[3]+a[4];return Math.abs(f-i)<2*i&&t.foundPatternCross(a)},t.prototype.crossCheckVertical=function(e,r,n,i){for(var a=this.image,o=a.getHeight(),s=this.getCrossCheckStateCount(),l=e;l>=0&&a.get(r,l);)s[2]++,l--;if(l<0)return NaN;for(;l>=0&&!a.get(r,l)&&s[1]<=n;)s[1]++,l--;if(l<0||s[1]>n)return NaN;for(;l>=0&&a.get(r,l)&&s[0]<=n;)s[0]++,l--;if(s[0]>n)return NaN;for(l=e+1;l<o&&a.get(r,l);)s[2]++,l++;if(l===o)return NaN;for(;l<o&&!a.get(r,l)&&s[3]<n;)s[3]++,l++;if(l===o||s[3]>=n)return NaN;for(;l<o&&a.get(r,l)&&s[4]<n;)s[4]++,l++;if(s[4]>=n)return NaN;var c=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(c-i)>=2*i?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,l):NaN},t.prototype.crossCheckHorizontal=function(e,r,n,i){for(var a=this.image,o=a.getWidth(),s=this.getCrossCheckStateCount(),l=e;l>=0&&a.get(l,r);)s[2]++,l--;if(l<0)return NaN;for(;l>=0&&!a.get(l,r)&&s[1]<=n;)s[1]++,l--;if(l<0||s[1]>n)return NaN;for(;l>=0&&a.get(l,r)&&s[0]<=n;)s[0]++,l--;if(s[0]>n)return NaN;for(l=e+1;l<o&&a.get(l,r);)s[2]++,l++;if(l===o)return NaN;for(;l<o&&!a.get(l,r)&&s[3]<n;)s[3]++,l++;if(l===o||s[3]>=n)return NaN;for(;l<o&&a.get(l,r)&&s[4]<n;)s[4]++,l++;if(s[4]>=n)return NaN;var c=s[0]+s[1]+s[2]+s[3]+s[4];return 5*Math.abs(c-i)>=i?NaN:t.foundPatternCross(s)?t.centerFromEnd(s,l):NaN},t.prototype.handlePossibleCenter=function(e,r,n,i){var a=e[0]+e[1]+e[2]+e[3]+e[4],o=t.centerFromEnd(e,n),s=this.crossCheckVertical(r,Math.floor(o),e[2],a);if(!isNaN(s)&&(o=this.crossCheckHorizontal(Math.floor(o),Math.floor(s),e[2],a),!isNaN(o)&&(!i||this.crossCheckDiagonal(Math.floor(s),Math.floor(o),e[2],a)))){for(var l=a/7,c=!1,f=this.possibleCenters,d=0,v=f.length;d<v;d++){var h=f[d];if(h.aboutEquals(l,s,o)){f[d]=h.combineEstimate(s,o,l),c=!0;break}}if(!c){var p=new M1(o,s,l);f.push(p),this.resultPointCallback!==null&&this.resultPointCallback!==void 0&&this.resultPointCallback.foundPossibleResultPoint(p)}return!0}return!1},t.prototype.findRowSkip=function(){var e,r,n=this.possibleCenters.length;if(n<=1)return 0;var i=null;try{for(var a=jt(this.possibleCenters),o=a.next();!o.done;o=a.next()){var s=o.value;if(s.getCount()>=t.CENTER_QUORUM)if(i==null)i=s;else return this.hasSkipped=!0,Math.floor((Math.abs(i.getX()-s.getX())-Math.abs(i.getY()-s.getY()))/2)}}catch(l){e={error:l}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return 0},t.prototype.haveMultiplyConfirmedCenters=function(){var e,r,n,i,a=0,o=0,s=this.possibleCenters.length;try{for(var l=jt(this.possibleCenters),c=l.next();!c.done;c=l.next()){var f=c.value;f.getCount()>=t.CENTER_QUORUM&&(a++,o+=f.getEstimatedModuleSize())}}catch(g){e={error:g}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}if(a<3)return!1;var d=o/s,v=0;try{for(var h=jt(this.possibleCenters),p=h.next();!p.done;p=h.next()){var f=p.value;v+=Math.abs(f.getEstimatedModuleSize()-d)}}catch(g){n={error:g}}finally{try{p&&!p.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}return v<=.05*o},t.prototype.selectBestPatterns=function(){var e,r,n,i,a=this.possibleCenters.length;if(a<3)throw new I;var o=this.possibleCenters,s;if(a>3){var l=0,c=0;try{for(var f=jt(this.possibleCenters),d=f.next();!d.done;d=f.next()){var v=d.value,h=v.getEstimatedModuleSize();l+=h,c+=h*h}}catch(C){e={error:C}}finally{try{d&&!d.done&&(r=f.return)&&r.call(f)}finally{if(e)throw e.error}}s=l/a;var p=Math.sqrt(c/a-s*s);o.sort(function(C,b){var O=Math.abs(b.getEstimatedModuleSize()-s),P=Math.abs(C.getEstimatedModuleSize()-s);return O<P?-1:O>P?1:0});for(var g=Math.max(.2*s,p),y=0;y<o.length&&o.length>3;y++){var w=o[y];Math.abs(w.getEstimatedModuleSize()-s)>g&&(o.splice(y,1),y--)}}if(o.length>3){var l=0;try{for(var m=jt(o),A=m.next();!A.done;A=m.next()){var E=A.value;l+=E.getEstimatedModuleSize()}}catch(b){n={error:b}}finally{try{A&&!A.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}s=l/o.length,o.sort(function(b,O){if(O.getCount()===b.getCount()){var P=Math.abs(O.getEstimatedModuleSize()-s),H=Math.abs(b.getEstimatedModuleSize()-s);return P<H?1:P>H?-1:0}else return O.getCount()-b.getCount()}),o.splice(3)}return[o[0],o[1],o[2]]},t.CENTER_QUORUM=2,t.MIN_SKIP=3,t.MAX_MODULES=57,t})(),V1=(function(){function t(e){this.image=e}return t.prototype.getImage=function(){return this.image},t.prototype.getResultPointCallback=function(){return this.resultPointCallback},t.prototype.detect=function(e){this.resultPointCallback=e==null?null:e.get(le.NEED_RESULT_POINT_CALLBACK);var r=new F1(this.image,this.resultPointCallback),n=r.find(e);return this.processFinderPatternInfo(n)},t.prototype.processFinderPatternInfo=function(e){var r=e.getTopLeft(),n=e.getTopRight(),i=e.getBottomLeft(),a=this.calculateModuleSize(r,n,i);if(a<1)throw new I("No pattern found in proccess finder.");var o=t.computeDimension(r,n,i,a),s=wt.getProvisionalVersionForDimension(o),l=s.getDimensionForVersion()-7,c=null;if(s.getAlignmentPatternCenters().length>0)for(var f=n.getX()-r.getX()+i.getX(),d=n.getY()-r.getY()+i.getY(),v=1-3/l,h=Math.floor(r.getX()+v*(f-r.getX())),p=Math.floor(r.getY()+v*(d-r.getY())),g=4;g<=16;g<<=1)try{c=this.findAlignmentInRegion(a,h,p,g);break}catch(A){if(!(A instanceof I))throw A}var y=t.createTransform(r,n,i,c,o),w=t.sampleGrid(this.image,y,o),m;return c===null?m=[i,r,n]:m=[i,r,n,c],new Kn(w,m)},t.createTransform=function(e,r,n,i,a){var o=a-3.5,s,l,c,f;return i!==null?(s=i.getX(),l=i.getY(),c=o-3,f=c):(s=r.getX()-e.getX()+n.getX(),l=r.getY()-e.getY()+n.getY(),c=o,f=o),da.quadrilateralToQuadrilateral(3.5,3.5,o,3.5,c,f,3.5,o,e.getX(),e.getY(),r.getX(),r.getY(),s,l,n.getX(),n.getY())},t.sampleGrid=function(e,r,n){var i=jn.getInstance();return i.sampleGridWithTransform(e,n,n,r)},t.computeDimension=function(e,r,n,i){var a=X.round(k.distance(e,r)/i),o=X.round(k.distance(e,n)/i),s=Math.floor((a+o)/2)+7;switch(s&3){case 0:s++;break;case 2:s--;break;case 3:throw new I("Dimensions could be not found.")}return s},t.prototype.calculateModuleSize=function(e,r,n){return(this.calculateModuleSizeOneWay(e,r)+this.calculateModuleSizeOneWay(e,n))/2},t.prototype.calculateModuleSizeOneWay=function(e,r){var n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(r.getX()),Math.floor(r.getY())),i=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(r.getX()),Math.floor(r.getY()),Math.floor(e.getX()),Math.floor(e.getY()));return isNaN(n)?i/7:isNaN(i)?n/7:(n+i)/14},t.prototype.sizeOfBlackWhiteBlackRunBothWays=function(e,r,n,i){var a=this.sizeOfBlackWhiteBlackRun(e,r,n,i),o=1,s=e-(n-e);s<0?(o=e/(e-s),s=0):s>=this.image.getWidth()&&(o=(this.image.getWidth()-1-e)/(s-e),s=this.image.getWidth()-1);var l=Math.floor(r-(i-r)*o);return o=1,l<0?(o=r/(r-l),l=0):l>=this.image.getHeight()&&(o=(this.image.getHeight()-1-r)/(l-r),l=this.image.getHeight()-1),s=Math.floor(e+(s-e)*o),a+=this.sizeOfBlackWhiteBlackRun(e,r,s,l),a-1},t.prototype.sizeOfBlackWhiteBlackRun=function(e,r,n,i){var a=Math.abs(i-r)>Math.abs(n-e);if(a){var o=e;e=r,r=o,o=n,n=i,i=o}for(var s=Math.abs(n-e),l=Math.abs(i-r),c=-s/2,f=e<n?1:-1,d=r<i?1:-1,v=0,h=n+f,p=e,g=r;p!==h;p+=f){var y=a?g:p,w=a?p:g;if(v===1===this.image.get(y,w)){if(v===2)return X.distance(p,g,e,r);v++}if(c+=l,c>0){if(g===i)break;g+=d,c-=s}}return v===2?X.distance(n+f,i,e,r):NaN},t.prototype.findAlignmentInRegion=function(e,r,n,i){var a=Math.floor(i*e),o=Math.max(0,r-a),s=Math.min(this.image.getWidth()-1,r+a);if(s-o<e*3)throw new I("Alignment top exceeds estimated module size.");var l=Math.max(0,n-a),c=Math.min(this.image.getHeight()-1,n+a);if(c-l<e*3)throw new I("Alignment bottom exceeds estimated module size.");var f=new P1(this.image,o,l,s-o,c-l,e,this.resultPointCallback);return f.find()},t})(),Pn=(function(){function t(){this.decoder=new N1}return t.prototype.getDecoder=function(){return this.decoder},t.prototype.decode=function(e,r){var n,i;if(r!=null&&r.get(le.PURE_BARCODE)!==void 0){var a=t.extractPureBits(e.getBlackMatrix());n=this.decoder.decodeBitMatrix(a,r),i=t.NO_POINTS}else{var o=new V1(e.getBlackMatrix()).detect(r);n=this.decoder.decodeBitMatrix(o.getBits(),r),i=o.getPoints()}n.getOther()instanceof ya&&n.getOther().applyMirroredCorrection(i);var s=new Be(n.getText(),n.getRawBytes(),void 0,i,U.QR_CODE,void 0),l=n.getByteSegments();l!==null&&s.putMetadata(we.BYTE_SEGMENTS,l);var c=n.getECLevel();return c!==null&&s.putMetadata(we.ERROR_CORRECTION_LEVEL,c),n.hasStructuredAppend()&&(s.putMetadata(we.STRUCTURED_APPEND_SEQUENCE,n.getStructuredAppendSequenceNumber()),s.putMetadata(we.STRUCTURED_APPEND_PARITY,n.getStructuredAppendParity())),s},t.prototype.reset=function(){},t.extractPureBits=function(e){var r=e.getTopLeftOnBit(),n=e.getBottomRightOnBit();if(r===null||n===null)throw new I;var i=this.moduleSize(r,e),a=r[1],o=n[1],s=r[0],l=n[0];if(s>=l||a>=o)throw new I;if(o-a!==l-s&&(l=s+(o-a),l>=e.getWidth()))throw new I;var c=Math.round((l-s+1)/i),f=Math.round((o-a+1)/i);if(c<=0||f<=0)throw new I;if(f!==c)throw new I;var d=Math.floor(i/2);a+=d,s+=d;var v=s+Math.floor((c-1)*i)-l;if(v>0){if(v>d)throw new I;s-=v}var h=a+Math.floor((f-1)*i)-o;if(h>0){if(h>d)throw new I;a-=h}for(var p=new Ze(c,f),g=0;g<f;g++)for(var y=a+Math.floor(g*i),w=0;w<c;w++)e.get(s+Math.floor(w*i),y)&&p.set(w,g);return p},t.moduleSize=function(e,r){for(var n=r.getHeight(),i=r.getWidth(),a=e[0],o=e[1],s=!0,l=0;a<i&&o<n;){if(s!==r.get(a,o)){if(++l===5)break;s=!s}a++,o++}if(a===i||o===n)throw new I;return(a-e[0])/7},t.NO_POINTS=new Array,t})(),U1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},W=(function(){function t(){}return t.prototype.PDF417Common=function(){},t.getBitCountSum=function(e){return X.sum(e)},t.toIntArray=function(e){var r,n;if(e==null||!e.length)return t.EMPTY_INT_ARRAY;var i=new Int32Array(e.length),a=0;try{for(var o=U1(e),s=o.next();!s.done;s=o.next()){var l=s.value;i[a++]=l}}catch(c){r={error:c}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i},t.getCodeword=function(e){var r=De.binarySearch(t.SYMBOL_TABLE,e&262143);return r<0?-1:(t.CODEWORD_TABLE[r]-1)%t.NUMBER_OF_CODEWORDS},t.NUMBER_OF_CODEWORDS=929,t.MAX_CODEWORDS_IN_BARCODE=t.NUMBER_OF_CODEWORDS-1,t.MIN_ROWS_IN_BARCODE=3,t.MAX_ROWS_IN_BARCODE=90,t.MODULES_IN_CODEWORD=17,t.MODULES_IN_STOP_PATTERN=18,t.BARS_IN_MODULE=8,t.EMPTY_INT_ARRAY=new Int32Array([]),t.SYMBOL_TABLE=Int32Array.from([66142,66170,66206,66236,66290,66292,66350,66382,66396,66454,66470,66476,66594,66600,66614,66626,66628,66632,66640,66654,66662,66668,66682,66690,66718,66720,66748,66758,66776,66798,66802,66804,66820,66824,66832,66846,66848,66876,66880,66936,66950,66956,66968,66992,67006,67022,67036,67042,67044,67048,67062,67118,67150,67164,67214,67228,67256,67294,67322,67350,67366,67372,67398,67404,67416,67438,67474,67476,67490,67492,67496,67510,67618,67624,67650,67656,67664,67678,67686,67692,67706,67714,67716,67728,67742,67744,67772,67782,67788,67800,67822,67826,67828,67842,67848,67870,67872,67900,67904,67960,67974,67992,68016,68030,68046,68060,68066,68068,68072,68086,68104,68112,68126,68128,68156,68160,68216,68336,68358,68364,68376,68400,68414,68448,68476,68494,68508,68536,68546,68548,68552,68560,68574,68582,68588,68654,68686,68700,68706,68708,68712,68726,68750,68764,68792,68802,68804,68808,68816,68830,68838,68844,68858,68878,68892,68920,68976,68990,68994,68996,69e3,69008,69022,69024,69052,69062,69068,69080,69102,69106,69108,69142,69158,69164,69190,69208,69230,69254,69260,69272,69296,69310,69326,69340,69386,69394,69396,69410,69416,69430,69442,69444,69448,69456,69470,69478,69484,69554,69556,69666,69672,69698,69704,69712,69726,69754,69762,69764,69776,69790,69792,69820,69830,69836,69848,69870,69874,69876,69890,69918,69920,69948,69952,70008,70022,70040,70064,70078,70094,70108,70114,70116,70120,70134,70152,70174,70176,70264,70384,70412,70448,70462,70496,70524,70542,70556,70584,70594,70600,70608,70622,70630,70636,70664,70672,70686,70688,70716,70720,70776,70896,71136,71180,71192,71216,71230,71264,71292,71360,71416,71452,71480,71536,71550,71554,71556,71560,71568,71582,71584,71612,71622,71628,71640,71662,71726,71732,71758,71772,71778,71780,71784,71798,71822,71836,71864,71874,71880,71888,71902,71910,71916,71930,71950,71964,71992,72048,72062,72066,72068,72080,72094,72096,72124,72134,72140,72152,72174,72178,72180,72206,72220,72248,72304,72318,72416,72444,72456,72464,72478,72480,72508,72512,72568,72588,72600,72624,72638,72654,72668,72674,72676,72680,72694,72726,72742,72748,72774,72780,72792,72814,72838,72856,72880,72894,72910,72924,72930,72932,72936,72950,72966,72972,72984,73008,73022,73056,73084,73102,73116,73144,73156,73160,73168,73182,73190,73196,73210,73226,73234,73236,73250,73252,73256,73270,73282,73284,73296,73310,73318,73324,73346,73348,73352,73360,73374,73376,73404,73414,73420,73432,73454,73498,73518,73522,73524,73550,73564,73570,73572,73576,73590,73800,73822,73858,73860,73872,73886,73888,73916,73944,73970,73972,73992,74014,74016,74044,74048,74104,74118,74136,74160,74174,74210,74212,74216,74230,74244,74256,74270,74272,74360,74480,74502,74508,74544,74558,74592,74620,74638,74652,74680,74690,74696,74704,74726,74732,74782,74784,74812,74992,75232,75288,75326,75360,75388,75456,75512,75576,75632,75646,75650,75652,75664,75678,75680,75708,75718,75724,75736,75758,75808,75836,75840,75896,76016,76256,76736,76824,76848,76862,76896,76924,76992,77048,77296,77340,77368,77424,77438,77536,77564,77572,77576,77584,77600,77628,77632,77688,77702,77708,77720,77744,77758,77774,77788,77870,77902,77916,77922,77928,77966,77980,78008,78018,78024,78032,78046,78060,78074,78094,78136,78192,78206,78210,78212,78224,78238,78240,78268,78278,78284,78296,78322,78324,78350,78364,78448,78462,78560,78588,78600,78622,78624,78652,78656,78712,78726,78744,78768,78782,78798,78812,78818,78820,78824,78838,78862,78876,78904,78960,78974,79072,79100,79296,79352,79368,79376,79390,79392,79420,79424,79480,79600,79628,79640,79664,79678,79712,79740,79772,79800,79810,79812,79816,79824,79838,79846,79852,79894,79910,79916,79942,79948,79960,79982,79988,80006,80024,80048,80062,80078,80092,80098,80100,80104,80134,80140,80176,80190,80224,80252,80270,80284,80312,80328,80336,80350,80358,80364,80378,80390,80396,80408,80432,80446,80480,80508,80576,80632,80654,80668,80696,80752,80766,80776,80784,80798,80800,80828,80844,80856,80878,80882,80884,80914,80916,80930,80932,80936,80950,80962,80968,80976,80990,80998,81004,81026,81028,81040,81054,81056,81084,81094,81100,81112,81134,81154,81156,81160,81168,81182,81184,81212,81216,81272,81286,81292,81304,81328,81342,81358,81372,81380,81384,81398,81434,81454,81458,81460,81486,81500,81506,81508,81512,81526,81550,81564,81592,81602,81604,81608,81616,81630,81638,81644,81702,81708,81722,81734,81740,81752,81774,81778,81780,82050,82078,82080,82108,82180,82184,82192,82206,82208,82236,82240,82296,82316,82328,82352,82366,82402,82404,82408,82440,82448,82462,82464,82492,82496,82552,82672,82694,82700,82712,82736,82750,82784,82812,82830,82882,82884,82888,82896,82918,82924,82952,82960,82974,82976,83004,83008,83064,83184,83424,83468,83480,83504,83518,83552,83580,83648,83704,83740,83768,83824,83838,83842,83844,83848,83856,83872,83900,83910,83916,83928,83950,83984,84e3,84028,84032,84088,84208,84448,84928,85040,85054,85088,85116,85184,85240,85488,85560,85616,85630,85728,85756,85764,85768,85776,85790,85792,85820,85824,85880,85894,85900,85912,85936,85966,85980,86048,86080,86136,86256,86496,86976,88160,88188,88256,88312,88560,89056,89200,89214,89312,89340,89536,89592,89608,89616,89632,89664,89720,89840,89868,89880,89904,89952,89980,89998,90012,90040,90190,90204,90254,90268,90296,90306,90308,90312,90334,90382,90396,90424,90480,90494,90500,90504,90512,90526,90528,90556,90566,90572,90584,90610,90612,90638,90652,90680,90736,90750,90848,90876,90884,90888,90896,90910,90912,90940,90944,91e3,91014,91020,91032,91056,91070,91086,91100,91106,91108,91112,91126,91150,91164,91192,91248,91262,91360,91388,91584,91640,91664,91678,91680,91708,91712,91768,91888,91928,91952,91966,92e3,92028,92046,92060,92088,92098,92100,92104,92112,92126,92134,92140,92188,92216,92272,92384,92412,92608,92664,93168,93200,93214,93216,93244,93248,93304,93424,93664,93720,93744,93758,93792,93820,93888,93944,93980,94008,94064,94078,94084,94088,94096,94110,94112,94140,94150,94156,94168,94246,94252,94278,94284,94296,94318,94342,94348,94360,94384,94398,94414,94428,94440,94470,94476,94488,94512,94526,94560,94588,94606,94620,94648,94658,94660,94664,94672,94686,94694,94700,94714,94726,94732,94744,94768,94782,94816,94844,94912,94968,94990,95004,95032,95088,95102,95112,95120,95134,95136,95164,95180,95192,95214,95218,95220,95244,95256,95280,95294,95328,95356,95424,95480,95728,95758,95772,95800,95856,95870,95968,95996,96008,96016,96030,96032,96060,96064,96120,96152,96176,96190,96220,96226,96228,96232,96290,96292,96296,96310,96322,96324,96328,96336,96350,96358,96364,96386,96388,96392,96400,96414,96416,96444,96454,96460,96472,96494,96498,96500,96514,96516,96520,96528,96542,96544,96572,96576,96632,96646,96652,96664,96688,96702,96718,96732,96738,96740,96744,96758,96772,96776,96784,96798,96800,96828,96832,96888,97008,97030,97036,97048,97072,97086,97120,97148,97166,97180,97208,97220,97224,97232,97246,97254,97260,97326,97330,97332,97358,97372,97378,97380,97384,97398,97422,97436,97464,97474,97476,97480,97488,97502,97510,97516,97550,97564,97592,97648,97666,97668,97672,97680,97694,97696,97724,97734,97740,97752,97774,97830,97836,97850,97862,97868,97880,97902,97906,97908,97926,97932,97944,97968,97998,98012,98018,98020,98024,98038,98618,98674,98676,98838,98854,98874,98892,98904,98926,98930,98932,98968,99006,99042,99044,99048,99062,99166,99194,99246,99286,99350,99366,99372,99386,99398,99416,99438,99442,99444,99462,99504,99518,99534,99548,99554,99556,99560,99574,99590,99596,99608,99632,99646,99680,99708,99726,99740,99768,99778,99780,99784,99792,99806,99814,99820,99834,99858,99860,99874,99880,99894,99906,99920,99934,99962,99970,99972,99976,99984,99998,1e5,100028,100038,100044,100056,100078,100082,100084,100142,100174,100188,100246,100262,100268,100306,100308,100390,100396,100410,100422,100428,100440,100462,100466,100468,100486,100504,100528,100542,100558,100572,100578,100580,100584,100598,100620,100656,100670,100704,100732,100750,100792,100802,100808,100816,100830,100838,100844,100858,100888,100912,100926,100960,100988,101056,101112,101148,101176,101232,101246,101250,101252,101256,101264,101278,101280,101308,101318,101324,101336,101358,101362,101364,101410,101412,101416,101430,101442,101448,101456,101470,101478,101498,101506,101508,101520,101534,101536,101564,101580,101618,101620,101636,101640,101648,101662,101664,101692,101696,101752,101766,101784,101838,101858,101860,101864,101934,101938,101940,101966,101980,101986,101988,101992,102030,102044,102072,102082,102084,102088,102096,102138,102166,102182,102188,102214,102220,102232,102254,102282,102290,102292,102306,102308,102312,102326,102444,102458,102470,102476,102488,102514,102516,102534,102552,102576,102590,102606,102620,102626,102632,102646,102662,102668,102704,102718,102752,102780,102798,102812,102840,102850,102856,102864,102878,102886,102892,102906,102936,102974,103008,103036,103104,103160,103224,103280,103294,103298,103300,103312,103326,103328,103356,103366,103372,103384,103406,103410,103412,103472,103486,103520,103548,103616,103672,103920,103992,104048,104062,104160,104188,104194,104196,104200,104208,104224,104252,104256,104312,104326,104332,104344,104368,104382,104398,104412,104418,104420,104424,104482,104484,104514,104520,104528,104542,104550,104570,104578,104580,104592,104606,104608,104636,104652,104690,104692,104706,104712,104734,104736,104764,104768,104824,104838,104856,104910,104930,104932,104936,104968,104976,104990,104992,105020,105024,105080,105200,105240,105278,105312,105372,105410,105412,105416,105424,105446,105518,105524,105550,105564,105570,105572,105576,105614,105628,105656,105666,105672,105680,105702,105722,105742,105756,105784,105840,105854,105858,105860,105864,105872,105888,105932,105970,105972,106006,106022,106028,106054,106060,106072,106100,106118,106124,106136,106160,106174,106190,106210,106212,106216,106250,106258,106260,106274,106276,106280,106306,106308,106312,106320,106334,106348,106394,106414,106418,106420,106566,106572,106610,106612,106630,106636,106648,106672,106686,106722,106724,106728,106742,106758,106764,106776,106800,106814,106848,106876,106894,106908,106936,106946,106948,106952,106960,106974,106982,106988,107032,107056,107070,107104,107132,107200,107256,107292,107320,107376,107390,107394,107396,107400,107408,107422,107424,107452,107462,107468,107480,107502,107506,107508,107544,107568,107582,107616,107644,107712,107768,108016,108060,108088,108144,108158,108256,108284,108290,108292,108296,108304,108318,108320,108348,108352,108408,108422,108428,108440,108464,108478,108494,108508,108514,108516,108520,108592,108640,108668,108736,108792,109040,109536,109680,109694,109792,109820,110016,110072,110084,110088,110096,110112,110140,110144,110200,110320,110342,110348,110360,110384,110398,110432,110460,110478,110492,110520,110532,110536,110544,110558,110658,110686,110714,110722,110724,110728,110736,110750,110752,110780,110796,110834,110836,110850,110852,110856,110864,110878,110880,110908,110912,110968,110982,111e3,111054,111074,111076,111080,111108,111112,111120,111134,111136,111164,111168,111224,111344,111372,111422,111456,111516,111554,111556,111560,111568,111590,111632,111646,111648,111676,111680,111736,111856,112096,112152,112224,112252,112320,112440,112514,112516,112520,112528,112542,112544,112588,112686,112718,112732,112782,112796,112824,112834,112836,112840,112848,112870,112890,112910,112924,112952,113008,113022,113026,113028,113032,113040,113054,113056,113100,113138,113140,113166,113180,113208,113264,113278,113376,113404,113416,113424,113440,113468,113472,113560,113614,113634,113636,113640,113686,113702,113708,113734,113740,113752,113778,113780,113798,113804,113816,113840,113854,113870,113890,113892,113896,113926,113932,113944,113968,113982,114016,114044,114076,114114,114116,114120,114128,114150,114170,114194,114196,114210,114212,114216,114242,114244,114248,114256,114270,114278,114306,114308,114312,114320,114334,114336,114364,114380,114420,114458,114478,114482,114484,114510,114524,114530,114532,114536,114842,114866,114868,114970,114994,114996,115042,115044,115048,115062,115130,115226,115250,115252,115278,115292,115298,115300,115304,115318,115342,115394,115396,115400,115408,115422,115430,115436,115450,115478,115494,115514,115526,115532,115570,115572,115738,115758,115762,115764,115790,115804,115810,115812,115816,115830,115854,115868,115896,115906,115912,115920,115934,115942,115948,115962,115996,116024,116080,116094,116098,116100,116104,116112,116126,116128,116156,116166,116172,116184,116206,116210,116212,116246,116262,116268,116282,116294,116300,116312,116334,116338,116340,116358,116364,116376,116400,116414,116430,116444,116450,116452,116456,116498,116500,116514,116520,116534,116546,116548,116552,116560,116574,116582,116588,116602,116654,116694,116714,116762,116782,116786,116788,116814,116828,116834,116836,116840,116854,116878,116892,116920,116930,116936,116944,116958,116966,116972,116986,117006,117048,117104,117118,117122,117124,117136,117150,117152,117180,117190,117196,117208,117230,117234,117236,117304,117360,117374,117472,117500,117506,117508,117512,117520,117536,117564,117568,117624,117638,117644,117656,117680,117694,117710,117724,117730,117732,117736,117750,117782,117798,117804,117818,117830,117848,117874,117876,117894,117936,117950,117966,117986,117988,117992,118022,118028,118040,118064,118078,118112,118140,118172,118210,118212,118216,118224,118238,118246,118266,118306,118312,118338,118352,118366,118374,118394,118402,118404,118408,118416,118430,118432,118460,118476,118514,118516,118574,118578,118580,118606,118620,118626,118628,118632,118678,118694,118700,118730,118738,118740,118830,118834,118836,118862,118876,118882,118884,118888,118902,118926,118940,118968,118978,118980,118984,118992,119006,119014,119020,119034,119068,119096,119152,119166,119170,119172,119176,119184,119198,119200,119228,119238,119244,119256,119278,119282,119284,119324,119352,119408,119422,119520,119548,119554,119556,119560,119568,119582,119584,119612,119616,119672,119686,119692,119704,119728,119742,119758,119772,119778,119780,119784,119798,119920,119934,120032,120060,120256,120312,120324,120328,120336,120352,120384,120440,120560,120582,120588,120600,120624,120638,120672,120700,120718,120732,120760,120770,120772,120776,120784,120798,120806,120812,120870,120876,120890,120902,120908,120920,120946,120948,120966,120972,120984,121008,121022,121038,121058,121060,121064,121078,121100,121112,121136,121150,121184,121212,121244,121282,121284,121288,121296,121318,121338,121356,121368,121392,121406,121440,121468,121536,121592,121656,121730,121732,121736,121744,121758,121760,121804,121842,121844,121890,121922,121924,121928,121936,121950,121958,121978,121986,121988,121992,122e3,122014,122016,122044,122060,122098,122100,122116,122120,122128,122142,122144,122172,122176,122232,122246,122264,122318,122338,122340,122344,122414,122418,122420,122446,122460,122466,122468,122472,122510,122524,122552,122562,122564,122568,122576,122598,122618,122646,122662,122668,122694,122700,122712,122738,122740,122762,122770,122772,122786,122788,122792,123018,123026,123028,123042,123044,123048,123062,123098,123146,123154,123156,123170,123172,123176,123190,123202,123204,123208,123216,123238,123244,123258,123290,123314,123316,123402,123410,123412,123426,123428,123432,123446,123458,123464,123472,123486,123494,123500,123514,123522,123524,123528,123536,123552,123580,123590,123596,123608,123630,123634,123636,123674,123698,123700,123740,123746,123748,123752,123834,123914,123922,123924,123938,123944,123958,123970,123976,123984,123998,124006,124012,124026,124034,124036,124048,124062,124064,124092,124102,124108,124120,124142,124146,124148,124162,124164,124168,124176,124190,124192,124220,124224,124280,124294,124300,124312,124336,124350,124366,124380,124386,124388,124392,124406,124442,124462,124466,124468,124494,124508,124514,124520,124558,124572,124600,124610,124612,124616,124624,124646,124666,124694,124710,124716,124730,124742,124748,124760,124786,124788,124818,124820,124834,124836,124840,124854,124946,124948,124962,124964,124968,124982,124994,124996,125e3,125008,125022,125030,125036,125050,125058,125060,125064,125072,125086,125088,125116,125126,125132,125144,125166,125170,125172,125186,125188,125192,125200,125216,125244,125248,125304,125318,125324,125336,125360,125374,125390,125404,125410,125412,125416,125430,125444,125448,125456,125472,125504,125560,125680,125702,125708,125720,125744,125758,125792,125820,125838,125852,125880,125890,125892,125896,125904,125918,125926,125932,125978,125998,126002,126004,126030,126044,126050,126052,126056,126094,126108,126136,126146,126148,126152,126160,126182,126202,126222,126236,126264,126320,126334,126338,126340,126344,126352,126366,126368,126412,126450,126452,126486,126502,126508,126522,126534,126540,126552,126574,126578,126580,126598,126604,126616,126640,126654,126670,126684,126690,126692,126696,126738,126754,126756,126760,126774,126786,126788,126792,126800,126814,126822,126828,126842,126894,126898,126900,126934,127126,127142,127148,127162,127178,127186,127188,127254,127270,127276,127290,127302,127308,127320,127342,127346,127348,127370,127378,127380,127394,127396,127400,127450,127510,127526,127532,127546,127558,127576,127598,127602,127604,127622,127628,127640,127664,127678,127694,127708,127714,127716,127720,127734,127754,127762,127764,127778,127784,127810,127812,127816,127824,127838,127846,127866,127898,127918,127922,127924,128022,128038,128044,128058,128070,128076,128088,128110,128114,128116,128134,128140,128152,128176,128190,128206,128220,128226,128228,128232,128246,128262,128268,128280,128304,128318,128352,128380,128398,128412,128440,128450,128452,128456,128464,128478,128486,128492,128506,128522,128530,128532,128546,128548,128552,128566,128578,128580,128584,128592,128606,128614,128634,128642,128644,128648,128656,128670,128672,128700,128716,128754,128756,128794,128814,128818,128820,128846,128860,128866,128868,128872,128886,128918,128934,128940,128954,128978,128980,129178,129198,129202,129204,129238,129258,129306,129326,129330,129332,129358,129372,129378,129380,129384,129398,129430,129446,129452,129466,129482,129490,129492,129562,129582,129586,129588,129614,129628,129634,129636,129640,129654,129678,129692,129720,129730,129732,129736,129744,129758,129766,129772,129814,129830,129836,129850,129862,129868,129880,129902,129906,129908,129930,129938,129940,129954,129956,129960,129974,130010]),t.CODEWORD_TABLE=Int32Array.from([2627,1819,2622,2621,1813,1812,2729,2724,2723,2779,2774,2773,902,896,908,868,865,861,859,2511,873,871,1780,835,2493,825,2491,842,837,844,1764,1762,811,810,809,2483,807,2482,806,2480,815,814,813,812,2484,817,816,1745,1744,1742,1746,2655,2637,2635,2626,2625,2623,2628,1820,2752,2739,2737,2728,2727,2725,2730,2785,2783,2778,2777,2775,2780,787,781,747,739,736,2413,754,752,1719,692,689,681,2371,678,2369,700,697,694,703,1688,1686,642,638,2343,631,2341,627,2338,651,646,643,2345,654,652,1652,1650,1647,1654,601,599,2322,596,2321,594,2319,2317,611,610,608,606,2324,603,2323,615,614,612,1617,1616,1614,1612,616,1619,1618,2575,2538,2536,905,901,898,909,2509,2507,2504,870,867,864,860,2512,875,872,1781,2490,2489,2487,2485,1748,836,834,832,830,2494,827,2492,843,841,839,845,1765,1763,2701,2676,2674,2653,2648,2656,2634,2633,2631,2629,1821,2638,2636,2770,2763,2761,2750,2745,2753,2736,2735,2733,2731,1848,2740,2738,2786,2784,591,588,576,569,566,2296,1590,537,534,526,2276,522,2274,545,542,539,548,1572,1570,481,2245,466,2242,462,2239,492,485,482,2249,496,494,1534,1531,1528,1538,413,2196,406,2191,2188,425,419,2202,415,2199,432,430,427,1472,1467,1464,433,1476,1474,368,367,2160,365,2159,362,2157,2155,2152,378,377,375,2166,372,2165,369,2162,383,381,379,2168,1419,1418,1416,1414,385,1411,384,1423,1422,1420,1424,2461,802,2441,2439,790,786,783,794,2409,2406,2403,750,742,738,2414,756,753,1720,2367,2365,2362,2359,1663,693,691,684,2373,680,2370,702,699,696,704,1690,1687,2337,2336,2334,2332,1624,2329,1622,640,637,2344,634,2342,630,2340,650,648,645,2346,655,653,1653,1651,1649,1655,2612,2597,2595,2571,2568,2565,2576,2534,2529,2526,1787,2540,2537,907,904,900,910,2503,2502,2500,2498,1768,2495,1767,2510,2508,2506,869,866,863,2513,876,874,1782,2720,2713,2711,2697,2694,2691,2702,2672,2670,2664,1828,2678,2675,2647,2646,2644,2642,1823,2639,1822,2654,2652,2650,2657,2771,1855,2765,2762,1850,1849,2751,2749,2747,2754,353,2148,344,342,336,2142,332,2140,345,1375,1373,306,2130,299,2128,295,2125,319,314,311,2132,1354,1352,1349,1356,262,257,2101,253,2096,2093,274,273,267,2107,263,2104,280,278,275,1316,1311,1308,1320,1318,2052,202,2050,2044,2040,219,2063,212,2060,208,2055,224,221,2066,1260,1258,1252,231,1248,229,1266,1264,1261,1268,155,1998,153,1996,1994,1991,1988,165,164,2007,162,2006,159,2003,2e3,172,171,169,2012,166,2010,1186,1184,1182,1179,175,1176,173,1192,1191,1189,1187,176,1194,1193,2313,2307,2305,592,589,2294,2292,2289,578,572,568,2297,580,1591,2272,2267,2264,1547,538,536,529,2278,525,2275,547,544,541,1574,1571,2237,2235,2229,1493,2225,1489,478,2247,470,2244,465,2241,493,488,484,2250,498,495,1536,1533,1530,1539,2187,2186,2184,2182,1432,2179,1430,2176,1427,414,412,2197,409,2195,405,2193,2190,426,424,421,2203,418,2201,431,429,1473,1471,1469,1466,434,1477,1475,2478,2472,2470,2459,2457,2454,2462,803,2437,2432,2429,1726,2443,2440,792,789,785,2401,2399,2393,1702,2389,1699,2411,2408,2405,745,741,2415,758,755,1721,2358,2357,2355,2353,1661,2350,1660,2347,1657,2368,2366,2364,2361,1666,690,687,2374,683,2372,701,698,705,1691,1689,2619,2617,2610,2608,2605,2613,2593,2588,2585,1803,2599,2596,2563,2561,2555,1797,2551,1795,2573,2570,2567,2577,2525,2524,2522,2520,1786,2517,1785,2514,1783,2535,2533,2531,2528,1788,2541,2539,906,903,911,2721,1844,2715,2712,1838,1836,2699,2696,2693,2703,1827,1826,1824,2673,2671,2669,2666,1829,2679,2677,1858,1857,2772,1854,1853,1851,1856,2766,2764,143,1987,139,1986,135,133,131,1984,128,1983,125,1981,138,137,136,1985,1133,1132,1130,112,110,1974,107,1973,104,1971,1969,122,121,119,117,1977,114,1976,124,1115,1114,1112,1110,1117,1116,84,83,1953,81,1952,78,1950,1948,1945,94,93,91,1959,88,1958,85,1955,99,97,95,1961,1086,1085,1083,1081,1078,100,1090,1089,1087,1091,49,47,1917,44,1915,1913,1910,1907,59,1926,56,1925,53,1922,1919,66,64,1931,61,1929,1042,1040,1038,71,1035,70,1032,68,1048,1047,1045,1043,1050,1049,12,10,1869,1867,1864,1861,21,1880,19,1877,1874,1871,28,1888,25,1886,22,1883,982,980,977,974,32,30,991,989,987,984,34,995,994,992,2151,2150,2147,2146,2144,356,355,354,2149,2139,2138,2136,2134,1359,343,341,338,2143,335,2141,348,347,346,1376,1374,2124,2123,2121,2119,1326,2116,1324,310,308,305,2131,302,2129,298,2127,320,318,316,313,2133,322,321,1355,1353,1351,1357,2092,2091,2089,2087,1276,2084,1274,2081,1271,259,2102,256,2100,252,2098,2095,272,269,2108,266,2106,281,279,277,1317,1315,1313,1310,282,1321,1319,2039,2037,2035,2032,1203,2029,1200,1197,207,2053,205,2051,201,2049,2046,2043,220,218,2064,215,2062,211,2059,228,226,223,2069,1259,1257,1254,232,1251,230,1267,1265,1263,2316,2315,2312,2311,2309,2314,2304,2303,2301,2299,1593,2308,2306,590,2288,2287,2285,2283,1578,2280,1577,2295,2293,2291,579,577,574,571,2298,582,581,1592,2263,2262,2260,2258,1545,2255,1544,2252,1541,2273,2271,2269,2266,1550,535,532,2279,528,2277,546,543,549,1575,1573,2224,2222,2220,1486,2217,1485,2214,1482,1479,2238,2236,2234,2231,1496,2228,1492,480,477,2248,473,2246,469,2243,490,487,2251,497,1537,1535,1532,2477,2476,2474,2479,2469,2468,2466,2464,1730,2473,2471,2453,2452,2450,2448,1729,2445,1728,2460,2458,2456,2463,805,804,2428,2427,2425,2423,1725,2420,1724,2417,1722,2438,2436,2434,2431,1727,2444,2442,793,791,788,795,2388,2386,2384,1697,2381,1696,2378,1694,1692,2402,2400,2398,2395,1703,2392,1701,2412,2410,2407,751,748,744,2416,759,757,1807,2620,2618,1806,1805,2611,2609,2607,2614,1802,1801,1799,2594,2592,2590,2587,1804,2600,2598,1794,1793,1791,1789,2564,2562,2560,2557,1798,2554,1796,2574,2572,2569,2578,1847,1846,2722,1843,1842,1840,1845,2716,2714,1835,1834,1832,1830,1839,1837,2700,2698,2695,2704,1817,1811,1810,897,862,1777,829,826,838,1760,1758,808,2481,1741,1740,1738,1743,2624,1818,2726,2776,782,740,737,1715,686,679,695,1682,1680,639,628,2339,647,644,1645,1643,1640,1648,602,600,597,595,2320,593,2318,609,607,604,1611,1610,1608,1606,613,1615,1613,2328,926,924,892,886,899,857,850,2505,1778,824,823,821,819,2488,818,2486,833,831,828,840,1761,1759,2649,2632,2630,2746,2734,2732,2782,2781,570,567,1587,531,527,523,540,1566,1564,476,467,463,2240,486,483,1524,1521,1518,1529,411,403,2192,399,2189,423,416,1462,1457,1454,428,1468,1465,2210,366,363,2158,360,2156,357,2153,376,373,370,2163,1410,1409,1407,1405,382,1402,380,1417,1415,1412,1421,2175,2174,777,774,771,784,732,725,722,2404,743,1716,676,674,668,2363,665,2360,685,1684,1681,626,624,622,2335,620,2333,617,2330,641,635,649,1646,1644,1642,2566,928,925,2530,2527,894,891,888,2501,2499,2496,858,856,854,851,1779,2692,2668,2665,2645,2643,2640,2651,2768,2759,2757,2744,2743,2741,2748,352,1382,340,337,333,1371,1369,307,300,296,2126,315,312,1347,1342,1350,261,258,250,2097,246,2094,271,268,264,1306,1301,1298,276,1312,1309,2115,203,2048,195,2045,191,2041,213,209,2056,1246,1244,1238,225,1234,222,1256,1253,1249,1262,2080,2079,154,1997,150,1995,147,1992,1989,163,160,2004,156,2001,1175,1174,1172,1170,1167,170,1164,167,1185,1183,1180,1177,174,1190,1188,2025,2024,2022,587,586,564,559,556,2290,573,1588,520,518,512,2268,508,2265,530,1568,1565,461,457,2233,450,2230,446,2226,479,471,489,1526,1523,1520,397,395,2185,392,2183,389,2180,2177,410,2194,402,422,1463,1461,1459,1456,1470,2455,799,2433,2430,779,776,773,2397,2394,2390,734,728,724,746,1717,2356,2354,2351,2348,1658,677,675,673,670,667,688,1685,1683,2606,2589,2586,2559,2556,2552,927,2523,2521,2518,2515,1784,2532,895,893,890,2718,2709,2707,2689,2687,2684,2663,2662,2660,2658,1825,2667,2769,1852,2760,2758,142,141,1139,1138,134,132,129,126,1982,1129,1128,1126,1131,113,111,108,105,1972,101,1970,120,118,115,1109,1108,1106,1104,123,1113,1111,82,79,1951,75,1949,72,1946,92,89,86,1956,1077,1076,1074,1072,98,1069,96,1084,1082,1079,1088,1968,1967,48,45,1916,42,1914,39,1911,1908,60,57,54,1923,50,1920,1031,1030,1028,1026,67,1023,65,1020,62,1041,1039,1036,1033,69,1046,1044,1944,1943,1941,11,9,1868,7,1865,1862,1859,20,1878,16,1875,13,1872,970,968,966,963,29,960,26,23,983,981,978,975,33,971,31,990,988,985,1906,1904,1902,993,351,2145,1383,331,330,328,326,2137,323,2135,339,1372,1370,294,293,291,289,2122,286,2120,283,2117,309,303,317,1348,1346,1344,245,244,242,2090,239,2088,236,2085,2082,260,2099,249,270,1307,1305,1303,1300,1314,189,2038,186,2036,183,2033,2030,2026,206,198,2047,194,216,1247,1245,1243,1240,227,1237,1255,2310,2302,2300,2286,2284,2281,565,563,561,558,575,1589,2261,2259,2256,2253,1542,521,519,517,514,2270,511,533,1569,1567,2223,2221,2218,2215,1483,2211,1480,459,456,453,2232,449,474,491,1527,1525,1522,2475,2467,2465,2451,2449,2446,801,800,2426,2424,2421,2418,1723,2435,780,778,775,2387,2385,2382,2379,1695,2375,1693,2396,735,733,730,727,749,1718,2616,2615,2604,2603,2601,2584,2583,2581,2579,1800,2591,2550,2549,2547,2545,1792,2542,1790,2558,929,2719,1841,2710,2708,1833,1831,2690,2688,2686,1815,1809,1808,1774,1756,1754,1737,1736,1734,1739,1816,1711,1676,1674,633,629,1638,1636,1633,1641,598,1605,1604,1602,1600,605,1609,1607,2327,887,853,1775,822,820,1757,1755,1584,524,1560,1558,468,464,1514,1511,1508,1519,408,404,400,1452,1447,1444,417,1458,1455,2208,364,361,358,2154,1401,1400,1398,1396,374,1393,371,1408,1406,1403,1413,2173,2172,772,726,723,1712,672,669,666,682,1678,1675,625,623,621,618,2331,636,632,1639,1637,1635,920,918,884,880,889,849,848,847,846,2497,855,852,1776,2641,2742,2787,1380,334,1367,1365,301,297,1340,1338,1335,1343,255,251,247,1296,1291,1288,265,1302,1299,2113,204,196,192,2042,1232,1230,1224,214,1220,210,1242,1239,1235,1250,2077,2075,151,148,1993,144,1990,1163,1162,1160,1158,1155,161,1152,157,1173,1171,1168,1165,168,1181,1178,2021,2020,2018,2023,585,560,557,1585,516,509,1562,1559,458,447,2227,472,1516,1513,1510,398,396,393,390,2181,386,2178,407,1453,1451,1449,1446,420,1460,2209,769,764,720,712,2391,729,1713,664,663,661,659,2352,656,2349,671,1679,1677,2553,922,919,2519,2516,885,883,881,2685,2661,2659,2767,2756,2755,140,1137,1136,130,127,1125,1124,1122,1127,109,106,102,1103,1102,1100,1098,116,1107,1105,1980,80,76,73,1947,1068,1067,1065,1063,90,1060,87,1075,1073,1070,1080,1966,1965,46,43,40,1912,36,1909,1019,1018,1016,1014,58,1011,55,1008,51,1029,1027,1024,1021,63,1037,1034,1940,1939,1937,1942,8,1866,4,1863,1,1860,956,954,952,949,946,17,14,969,967,964,961,27,957,24,979,976,972,1901,1900,1898,1896,986,1905,1903,350,349,1381,329,327,324,1368,1366,292,290,287,284,2118,304,1341,1339,1337,1345,243,240,237,2086,233,2083,254,1297,1295,1293,1290,1304,2114,190,187,184,2034,180,2031,177,2027,199,1233,1231,1229,1226,217,1223,1241,2078,2076,584,555,554,552,550,2282,562,1586,507,506,504,502,2257,499,2254,515,1563,1561,445,443,441,2219,438,2216,435,2212,460,454,475,1517,1515,1512,2447,798,797,2422,2419,770,768,766,2383,2380,2376,721,719,717,714,731,1714,2602,2582,2580,2548,2546,2543,923,921,2717,2706,2705,2683,2682,2680,1771,1752,1750,1733,1732,1731,1735,1814,1707,1670,1668,1631,1629,1626,1634,1599,1598,1596,1594,1603,1601,2326,1772,1753,1751,1581,1554,1552,1504,1501,1498,1509,1442,1437,1434,401,1448,1445,2206,1392,1391,1389,1387,1384,359,1399,1397,1394,1404,2171,2170,1708,1672,1669,619,1632,1630,1628,1773,1378,1363,1361,1333,1328,1336,1286,1281,1278,248,1292,1289,2111,1218,1216,1210,197,1206,193,1228,1225,1221,1236,2073,2071,1151,1150,1148,1146,152,1143,149,1140,145,1161,1159,1156,1153,158,1169,1166,2017,2016,2014,2019,1582,510,1556,1553,452,448,1506,1500,394,391,387,1443,1441,1439,1436,1450,2207,765,716,713,1709,662,660,657,1673,1671,916,914,879,878,877,882,1135,1134,1121,1120,1118,1123,1097,1096,1094,1092,103,1101,1099,1979,1059,1058,1056,1054,77,1051,74,1066,1064,1061,1071,1964,1963,1007,1006,1004,1002,999,41,996,37,1017,1015,1012,1009,52,1025,1022,1936,1935,1933,1938,942,940,938,935,932,5,2,955,953,950,947,18,943,15,965,962,958,1895,1894,1892,1890,973,1899,1897,1379,325,1364,1362,288,285,1334,1332,1330,241,238,234,1287,1285,1283,1280,1294,2112,188,185,181,178,2028,1219,1217,1215,1212,200,1209,1227,2074,2072,583,553,551,1583,505,503,500,513,1557,1555,444,442,439,436,2213,455,451,1507,1505,1502,796,763,762,760,767,711,710,708,706,2377,718,715,1710,2544,917,915,2681,1627,1597,1595,2325,1769,1749,1747,1499,1438,1435,2204,1390,1388,1385,1395,2169,2167,1704,1665,1662,1625,1623,1620,1770,1329,1282,1279,2109,1214,1207,1222,2068,2065,1149,1147,1144,1141,146,1157,1154,2013,2011,2008,2015,1579,1549,1546,1495,1487,1433,1431,1428,1425,388,1440,2205,1705,658,1667,1664,1119,1095,1093,1978,1057,1055,1052,1062,1962,1960,1005,1003,1e3,997,38,1013,1010,1932,1930,1927,1934,941,939,936,933,6,930,3,951,948,944,1889,1887,1884,1881,959,1893,1891,35,1377,1360,1358,1327,1325,1322,1331,1277,1275,1272,1269,235,1284,2110,1205,1204,1201,1198,182,1195,179,1213,2070,2067,1580,501,1551,1548,440,437,1497,1494,1490,1503,761,709,707,1706,913,912,2198,1386,2164,2161,1621,1766,2103,1208,2058,2054,1145,1142,2005,2002,1999,2009,1488,1429,1426,2200,1698,1659,1656,1975,1053,1957,1954,1001,998,1924,1921,1918,1928,937,934,931,1879,1876,1873,1870,945,1885,1882,1323,1273,1270,2105,1202,1199,1196,1211,2061,2057,1576,1543,1540,1484,1481,1478,1491,1700]),t})(),$1=(function(){function t(e,r){this.bits=e,this.points=r}return t.prototype.getBits=function(){return this.bits},t.prototype.getPoints=function(){return this.points},t})(),H1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},G1=(function(){function t(){}return t.detectMultiple=function(e,r,n){var i=e.getBlackMatrix(),a=t.detect(n,i);return a.length||(i=i.clone(),i.rotate180(),a=t.detect(n,i)),new $1(i,a)},t.detect=function(e,r){for(var n,i,a=new Array,o=0,s=0,l=!1;o<r.getHeight();){var c=t.findVertices(r,o,s);if(c[0]==null&&c[3]==null){if(!l)break;l=!1,s=0;try{for(var f=(n=void 0,H1(a)),d=f.next();!d.done;d=f.next()){var v=d.value;v[1]!=null&&(o=Math.trunc(Math.max(o,v[1].getY()))),v[3]!=null&&(o=Math.max(o,Math.trunc(v[3].getY())))}}catch(h){n={error:h}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}o+=t.ROW_STEP;continue}if(l=!0,a.push(c),!e)break;c[2]!=null?(s=Math.trunc(c[2].getX()),o=Math.trunc(c[2].getY())):(s=Math.trunc(c[4].getX()),o=Math.trunc(c[4].getY()))}return a},t.findVertices=function(e,r,n){var i=e.getHeight(),a=e.getWidth(),o=new Array(8);return t.copyToResult(o,t.findRowsWithPattern(e,i,a,r,n,t.START_PATTERN),t.INDEXES_START_PATTERN),o[4]!=null&&(n=Math.trunc(o[4].getX()),r=Math.trunc(o[4].getY())),t.copyToResult(o,t.findRowsWithPattern(e,i,a,r,n,t.STOP_PATTERN),t.INDEXES_STOP_PATTERN),o},t.copyToResult=function(e,r,n){for(var i=0;i<n.length;i++)e[n[i]]=r[i]},t.findRowsWithPattern=function(e,r,n,i,a,o){for(var s=new Array(4),l=!1,c=new Int32Array(o.length);i<r;i+=t.ROW_STEP){var f=t.findGuardPattern(e,a,i,n,!1,o,c);if(f!=null){for(;i>0;){var d=t.findGuardPattern(e,a,--i,n,!1,o,c);if(d!=null)f=d;else{i++;break}}s[0]=new k(f[0],i),s[1]=new k(f[1],i),l=!0;break}}var v=i+1;if(l){for(var h=0,d=Int32Array.from([Math.trunc(s[0].getX()),Math.trunc(s[1].getX())]);v<r;v++){var f=t.findGuardPattern(e,d[0],v,n,!1,o,c);if(f!=null&&Math.abs(d[0]-f[0])<t.MAX_PATTERN_DRIFT&&Math.abs(d[1]-f[1])<t.MAX_PATTERN_DRIFT)d=f,h=0;else{if(h>t.SKIPPED_ROW_COUNT_MAX)break;h++}}v-=h+1,s[2]=new k(d[0],v),s[3]=new k(d[1],v)}return v-i<t.BARCODE_MIN_HEIGHT&&De.fill(s,null),s},t.findGuardPattern=function(e,r,n,i,a,o,s){De.fillWithin(s,0,s.length,0);for(var l=r,c=0;e.get(l,n)&&l>0&&c++<t.MAX_PIXEL_DRIFT;)l--;for(var f=l,d=0,v=o.length,h=a;f<i;f++){var p=e.get(f,n);if(p!==h)s[d]++;else{if(d===v-1){if(t.patternMatchVariance(s,o,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE)return new Int32Array([l,f]);l+=s[0]+s[1],ne.arraycopy(s,2,s,0,d-1),s[d-1]=0,s[d]=0,d--}else d++;s[d]=1,h=!h}}return d===v-1&&t.patternMatchVariance(s,o,t.MAX_INDIVIDUAL_VARIANCE)<t.MAX_AVG_VARIANCE?new Int32Array([l,f-1]):null},t.patternMatchVariance=function(e,r,n){for(var i=e.length,a=0,o=0,s=0;s<i;s++)a+=e[s],o+=r[s];if(a<o)return 1/0;var l=a/o;n*=l;for(var c=0,f=0;f<i;f++){var d=e[f],v=r[f]*l,h=d>v?d-v:v-d;if(h>n)return 1/0;c+=h}return c/a},t.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),t.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),t.MAX_AVG_VARIANCE=.42,t.MAX_INDIVIDUAL_VARIANCE=.8,t.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),t.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),t.MAX_PIXEL_DRIFT=3,t.MAX_PATTERN_DRIFT=5,t.SKIPPED_ROW_COUNT_MAX=25,t.ROW_STEP=5,t.BARCODE_MIN_HEIGHT=10,t})(),z1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mt=(function(){function t(e,r){if(r.length===0)throw new F;this.field=e;var n=r.length;if(n>1&&r[0]===0){for(var i=1;i<n&&r[i]===0;)i++;i===n?this.coefficients=new Int32Array([0]):(this.coefficients=new Int32Array(n-i),ne.arraycopy(r,i,this.coefficients,0,this.coefficients.length))}else this.coefficients=r}return t.prototype.getCoefficients=function(){return this.coefficients},t.prototype.getDegree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return this.coefficients[0]===0},t.prototype.getCoefficient=function(e){return this.coefficients[this.coefficients.length-1-e]},t.prototype.evaluateAt=function(e){var r,n;if(e===0)return this.getCoefficient(0);if(e===1){var i=0;try{for(var a=z1(this.coefficients),o=a.next();!o.done;o=a.next()){var s=o.value;i=this.field.add(i,s)}}catch(d){r={error:d}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i}for(var l=this.coefficients[0],c=this.coefficients.length,f=1;f<c;f++)l=this.field.add(this.field.multiply(e,l),this.coefficients[f]);return l},t.prototype.add=function(e){if(!this.field.equals(e.field))throw new F("ModulusPolys do not have same ModulusGF field");if(this.isZero())return e;if(e.isZero())return this;var r=this.coefficients,n=e.coefficients;if(r.length>n.length){var i=r;r=n,n=i}var a=new Int32Array(n.length),o=n.length-r.length;ne.arraycopy(n,0,a,0,o);for(var s=o;s<n.length;s++)a[s]=this.field.add(r[s-o],n[s]);return new t(this.field,a)},t.prototype.subtract=function(e){if(!this.field.equals(e.field))throw new F("ModulusPolys do not have same ModulusGF field");return e.isZero()?this:this.add(e.negative())},t.prototype.multiply=function(e){return e instanceof t?this.multiplyOther(e):this.multiplyScalar(e)},t.prototype.multiplyOther=function(e){if(!this.field.equals(e.field))throw new F("ModulusPolys do not have same ModulusGF field");if(this.isZero()||e.isZero())return new t(this.field,new Int32Array([0]));for(var r=this.coefficients,n=r.length,i=e.coefficients,a=i.length,o=new Int32Array(n+a-1),s=0;s<n;s++)for(var l=r[s],c=0;c<a;c++)o[s+c]=this.field.add(o[s+c],this.field.multiply(l,i[c]));return new t(this.field,o)},t.prototype.negative=function(){for(var e=this.coefficients.length,r=new Int32Array(e),n=0;n<e;n++)r[n]=this.field.subtract(0,this.coefficients[n]);return new t(this.field,r)},t.prototype.multiplyScalar=function(e){if(e===0)return new t(this.field,new Int32Array([0]));if(e===1)return this;for(var r=this.coefficients.length,n=new Int32Array(r),i=0;i<r;i++)n[i]=this.field.multiply(this.coefficients[i],e);return new t(this.field,n)},t.prototype.multiplyByMonomial=function(e,r){if(e<0)throw new F;if(r===0)return new t(this.field,new Int32Array([0]));for(var n=this.coefficients.length,i=new Int32Array(n+e),a=0;a<n;a++)i[a]=this.field.multiply(this.coefficients[a],r);return new t(this.field,i)},t.prototype.toString=function(){for(var e=new J,r=this.getDegree();r>=0;r--){var n=this.getCoefficient(r);n!==0&&(n<0?(e.append(" - "),n=-n):e.length()>0&&e.append(" + "),(r===0||n!==1)&&e.append(n),r!==0&&(r===1?e.append("x"):(e.append("x^"),e.append(r))))}return e.toString()},t})(),W1=(function(){function t(){}return t.prototype.add=function(e,r){return(e+r)%this.modulus},t.prototype.subtract=function(e,r){return(this.modulus+e-r)%this.modulus},t.prototype.exp=function(e){return this.expTable[e]},t.prototype.log=function(e){if(e===0)throw new F;return this.logTable[e]},t.prototype.inverse=function(e){if(e===0)throw new fa;return this.expTable[this.modulus-this.logTable[e]-1]},t.prototype.multiply=function(e,r){return e===0||r===0?0:this.expTable[(this.logTable[e]+this.logTable[r])%(this.modulus-1)]},t.prototype.getSize=function(){return this.modulus},t.prototype.equals=function(e){return e===this},t})(),X1=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),K1=(function(t){X1(e,t);function e(r,n){var i=t.call(this)||this;i.modulus=r,i.expTable=new Int32Array(r),i.logTable=new Int32Array(r);for(var a=1,o=0;o<r;o++)i.expTable[o]=a,a=a*n%r;for(var o=0;o<r-1;o++)i.logTable[i.expTable[o]]=o;return i.zero=new mt(i,new Int32Array([0])),i.one=new mt(i,new Int32Array([1])),i}return e.prototype.getZero=function(){return this.zero},e.prototype.getOne=function(){return this.one},e.prototype.buildMonomial=function(r,n){if(r<0)throw new F;if(n===0)return this.zero;var i=new Int32Array(r+1);return i[0]=n,new mt(this,i)},e.PDF417_GF=new e(W.NUMBER_OF_CODEWORDS,3),e})(W1),j1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Y1=(function(){function t(){this.field=K1.PDF417_GF}return t.prototype.decode=function(e,r,n){for(var i,a,o=new mt(this.field,e),s=new Int32Array(r),l=!1,c=r;c>0;c--){var f=o.evaluateAt(this.field.exp(c));s[r-c]=f,f!==0&&(l=!0)}if(!l)return 0;var d=this.field.getOne();if(n!=null)try{for(var v=j1(n),h=v.next();!h.done;h=v.next()){var p=h.value,g=this.field.exp(e.length-1-p),y=new mt(this.field,new Int32Array([this.field.subtract(0,g),1]));d=d.multiply(y)}}catch(P){i={error:P}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}for(var w=new mt(this.field,s),m=this.runEuclideanAlgorithm(this.field.buildMonomial(r,1),w,r),A=m[0],E=m[1],C=this.findErrorLocations(A),b=this.findErrorMagnitudes(E,A,C),c=0;c<C.length;c++){var O=e.length-1-this.field.log(C[c]);if(O<0)throw me.getChecksumInstance();e[O]=this.field.subtract(e[O],b[c])}return C.length},t.prototype.runEuclideanAlgorithm=function(e,r,n){if(e.getDegree()<r.getDegree()){var i=e;e=r,r=i}for(var a=e,o=r,s=this.field.getZero(),l=this.field.getOne();o.getDegree()>=Math.round(n/2);){var c=a,f=s;if(a=o,s=l,a.isZero())throw me.getChecksumInstance();o=c;for(var d=this.field.getZero(),v=a.getCoefficient(a.getDegree()),h=this.field.inverse(v);o.getDegree()>=a.getDegree()&&!o.isZero();){var p=o.getDegree()-a.getDegree(),g=this.field.multiply(o.getCoefficient(o.getDegree()),h);d=d.add(this.field.buildMonomial(p,g)),o=o.subtract(a.multiplyByMonomial(p,g))}l=d.multiply(s).subtract(f).negative()}var y=l.getCoefficient(0);if(y===0)throw me.getChecksumInstance();var w=this.field.inverse(y),m=l.multiply(w),A=o.multiply(w);return[m,A]},t.prototype.findErrorLocations=function(e){for(var r=e.getDegree(),n=new Int32Array(r),i=0,a=1;a<this.field.getSize()&&i<r;a++)e.evaluateAt(a)===0&&(n[i]=this.field.inverse(a),i++);if(i!==r)throw me.getChecksumInstance();return n},t.prototype.findErrorMagnitudes=function(e,r,n){for(var i=r.getDegree(),a=new Int32Array(i),o=1;o<=i;o++)a[i-o]=this.field.multiply(o,r.getCoefficient(o));for(var s=new mt(this.field,a),l=n.length,c=new Int32Array(l),o=0;o<l;o++){var f=this.field.inverse(n[o]),d=this.field.subtract(0,e.evaluateAt(f)),v=this.field.inverse(s.evaluateAt(f));c[o]=this.field.multiply(d,v)}return c},t})(),kn=(function(){function t(e,r,n,i,a){e instanceof t?this.constructor_2(e):this.constructor_1(e,r,n,i,a)}return t.prototype.constructor_1=function(e,r,n,i,a){var o=r==null||n==null,s=i==null||a==null;if(o&&s)throw new I;o?(r=new k(0,i.getY()),n=new k(0,a.getY())):s&&(i=new k(e.getWidth()-1,r.getY()),a=new k(e.getWidth()-1,n.getY())),this.image=e,this.topLeft=r,this.bottomLeft=n,this.topRight=i,this.bottomRight=a,this.minX=Math.trunc(Math.min(r.getX(),n.getX())),this.maxX=Math.trunc(Math.max(i.getX(),a.getX())),this.minY=Math.trunc(Math.min(r.getY(),i.getY())),this.maxY=Math.trunc(Math.max(n.getY(),a.getY()))},t.prototype.constructor_2=function(e){this.image=e.image,this.topLeft=e.getTopLeft(),this.bottomLeft=e.getBottomLeft(),this.topRight=e.getTopRight(),this.bottomRight=e.getBottomRight(),this.minX=e.getMinX(),this.maxX=e.getMaxX(),this.minY=e.getMinY(),this.maxY=e.getMaxY()},t.merge=function(e,r){return e==null?r:r==null?e:new t(e.image,e.topLeft,e.bottomLeft,r.topRight,r.bottomRight)},t.prototype.addMissingRows=function(e,r,n){var i=this.topLeft,a=this.bottomLeft,o=this.topRight,s=this.bottomRight;if(e>0){var l=n?this.topLeft:this.topRight,c=Math.trunc(l.getY()-e);c<0&&(c=0);var f=new k(l.getX(),c);n?i=f:o=f}if(r>0){var d=n?this.bottomLeft:this.bottomRight,v=Math.trunc(d.getY()+r);v>=this.image.getHeight()&&(v=this.image.getHeight()-1);var h=new k(d.getX(),v);n?a=h:s=h}return new t(this.image,i,a,o,s)},t.prototype.getMinX=function(){return this.minX},t.prototype.getMaxX=function(){return this.maxX},t.prototype.getMinY=function(){return this.minY},t.prototype.getMaxY=function(){return this.maxY},t.prototype.getTopLeft=function(){return this.topLeft},t.prototype.getTopRight=function(){return this.topRight},t.prototype.getBottomLeft=function(){return this.bottomLeft},t.prototype.getBottomRight=function(){return this.bottomRight},t})(),Z1=(function(){function t(e,r,n,i){this.columnCount=e,this.errorCorrectionLevel=i,this.rowCountUpperPart=r,this.rowCountLowerPart=n,this.rowCount=r+n}return t.prototype.getColumnCount=function(){return this.columnCount},t.prototype.getErrorCorrectionLevel=function(){return this.errorCorrectionLevel},t.prototype.getRowCount=function(){return this.rowCount},t.prototype.getRowCountUpperPart=function(){return this.rowCountUpperPart},t.prototype.getRowCountLowerPart=function(){return this.rowCountLowerPart},t})(),Zn=(function(){function t(){this.buffer=""}return t.form=function(e,r){var n=-1;function i(o,s,l,c,f,d){if(o==="%%")return"%";if(r[++n]!==void 0){o=c?parseInt(c.substr(1)):void 0;var v=f?parseInt(f.substr(1)):void 0,h;switch(d){case"s":h=r[n];break;case"c":h=r[n][0];break;case"f":h=parseFloat(r[n]).toFixed(o);break;case"p":h=parseFloat(r[n]).toPrecision(o);break;case"e":h=parseFloat(r[n]).toExponential(o);break;case"x":h=parseInt(r[n]).toString(v||16);break;case"d":h=parseFloat(parseInt(r[n],v||10).toPrecision(o)).toFixed(0);break}h=typeof h=="object"?JSON.stringify(h):(+h).toString(v);for(var p=parseInt(l),g=l&&l[0]+""=="0"?"0":" ";h.length<p;)h=s!==void 0?h+g:g+h;return h}}var a=/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g;return e.replace(a,i)},t.prototype.format=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.buffer+=t.form(e,r)},t.prototype.toString=function(){return this.buffer},t})(),q1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ma=(function(){function t(e){this.boundingBox=new kn(e),this.codewords=new Array(e.getMaxY()-e.getMinY()+1)}return t.prototype.getCodewordNearby=function(e){var r=this.getCodeword(e);if(r!=null)return r;for(var n=1;n<t.MAX_NEARBY_DISTANCE;n++){var i=this.imageRowToCodewordIndex(e)-n;if(i>=0&&(r=this.codewords[i],r!=null)||(i=this.imageRowToCodewordIndex(e)+n,i<this.codewords.length&&(r=this.codewords[i],r!=null)))return r}return null},t.prototype.imageRowToCodewordIndex=function(e){return e-this.boundingBox.getMinY()},t.prototype.setCodeword=function(e,r){this.codewords[this.imageRowToCodewordIndex(e)]=r},t.prototype.getCodeword=function(e){return this.codewords[this.imageRowToCodewordIndex(e)]},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.getCodewords=function(){return this.codewords},t.prototype.toString=function(){var e,r,n=new Zn,i=0;try{for(var a=q1(this.codewords),o=a.next();!o.done;o=a.next()){var s=o.value;if(s==null){n.format("%3d: | %n",i++);continue}n.format("%3d: %3d|%3d%n",i++,s.getRowNumber(),s.getValue())}}catch(l){e={error:l}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(e)throw e.error}}return n.toString()},t.MAX_NEARBY_DISTANCE=5,t})(),Q1=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},J1=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a},nr=(function(){function t(){this.values=new Map}return t.prototype.setValue=function(e){e=Math.trunc(e);var r=this.values.get(e);r==null&&(r=0),r++,this.values.set(e,r)},t.prototype.getValue=function(){var e,r,n=-1,i=new Array,a=function(d,v){var h={getKey:function(){return d},getValue:function(){return v}};h.getValue()>n?(n=h.getValue(),i=[],i.push(h.getKey())):h.getValue()===n&&i.push(h.getKey())};try{for(var o=Q1(this.values.entries()),s=o.next();!s.done;s=o.next()){var l=J1(s.value,2),c=l[0],f=l[1];a(c,f)}}catch(d){e={error:d}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return W.toIntArray(i)},t.prototype.getConfidence=function(e){return this.values.get(e)},t})(),ef=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),vn=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Li=(function(t){ef(e,t);function e(r,n){var i=t.call(this,r)||this;return i._isLeft=n,i}return e.prototype.setRowNumbers=function(){var r,n;try{for(var i=vn(this.getCodewords()),a=i.next();!a.done;a=i.next()){var o=a.value;o?.setRowNumberAsRowIndicatorColumn()}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e.prototype.adjustCompleteIndicatorColumnRowNumbers=function(r){var n=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(n,r);for(var i=this.getBoundingBox(),a=this._isLeft?i.getTopLeft():i.getTopRight(),o=this._isLeft?i.getBottomLeft():i.getBottomRight(),s=this.imageRowToCodewordIndex(Math.trunc(a.getY())),l=this.imageRowToCodewordIndex(Math.trunc(o.getY())),c=-1,f=1,d=0,v=s;v<l;v++)if(n[v]!=null){var h=n[v],p=h.getRowNumber()-c;if(p===0)d++;else if(p===1)f=Math.max(f,d),d=1,c=h.getRowNumber();else if(p<0||h.getRowNumber()>=r.getRowCount()||p>v)n[v]=null;else{var g=void 0;f>2?g=(f-2)*p:g=p;for(var y=g>=v,w=1;w<=g&&!y;w++)y=n[v-w]!=null;y?n[v]=null:(c=h.getRowNumber(),d=1)}}},e.prototype.getRowHeights=function(){var r,n,i=this.getBarcodeMetadata();if(i==null)return null;this.adjustIncompleteIndicatorColumnRowNumbers(i);var a=new Int32Array(i.getRowCount());try{for(var o=vn(this.getCodewords()),s=o.next();!s.done;s=o.next()){var l=s.value;if(l!=null){var c=l.getRowNumber();if(c>=a.length)continue;a[c]++}}}catch(f){r={error:f}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a},e.prototype.adjustIncompleteIndicatorColumnRowNumbers=function(r){for(var n=this.getBoundingBox(),i=this._isLeft?n.getTopLeft():n.getTopRight(),a=this._isLeft?n.getBottomLeft():n.getBottomRight(),o=this.imageRowToCodewordIndex(Math.trunc(i.getY())),s=this.imageRowToCodewordIndex(Math.trunc(a.getY())),l=this.getCodewords(),c=-1,f=o;f<s;f++)if(l[f]!=null){var d=l[f];d.setRowNumberAsRowIndicatorColumn();var v=d.getRowNumber()-c;v===0||(v===1?c=d.getRowNumber():d.getRowNumber()>=r.getRowCount()?l[f]=null:c=d.getRowNumber())}},e.prototype.getBarcodeMetadata=function(){var r,n,i=this.getCodewords(),a=new nr,o=new nr,s=new nr,l=new nr;try{for(var c=vn(i),f=c.next();!f.done;f=c.next()){var d=f.value;if(d!=null){d.setRowNumberAsRowIndicatorColumn();var v=d.getValue()%30,h=d.getRowNumber();switch(this._isLeft||(h+=2),h%3){case 0:o.setValue(v*3+1);break;case 1:l.setValue(v/3),s.setValue(v%3);break;case 2:a.setValue(v+1);break}}}}catch(g){r={error:g}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}if(a.getValue().length===0||o.getValue().length===0||s.getValue().length===0||l.getValue().length===0||a.getValue()[0]<1||o.getValue()[0]+s.getValue()[0]<W.MIN_ROWS_IN_BARCODE||o.getValue()[0]+s.getValue()[0]>W.MAX_ROWS_IN_BARCODE)return null;var p=new Z1(a.getValue()[0],o.getValue()[0],s.getValue()[0],l.getValue()[0]);return this.removeIncorrectCodewords(i,p),p},e.prototype.removeIncorrectCodewords=function(r,n){for(var i=0;i<r.length;i++){var a=r[i];if(r[i]!=null){var o=a.getValue()%30,s=a.getRowNumber();if(s>n.getRowCount()){r[i]=null;continue}switch(this._isLeft||(s+=2),s%3){case 0:o*3+1!==n.getRowCountUpperPart()&&(r[i]=null);break;case 1:(Math.trunc(o/3)!==n.getErrorCorrectionLevel()||o%3!==n.getRowCountLowerPart())&&(r[i]=null);break;case 2:o+1!==n.getColumnCount()&&(r[i]=null);break}}}},e.prototype.isLeft=function(){return this._isLeft},e.prototype.toString=function(){return"IsLeft: "+this._isLeft+`
18
+ `+t.prototype.toString.call(this)},e})(ma),tf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},rf=(function(){function t(e,r){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=e,this.barcodeColumnCount=e.getColumnCount(),this.boundingBox=r,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}return t.prototype.getDetectionResultColumns=function(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);var e=W.MAX_CODEWORDS_IN_BARCODE,r;do r=e,e=this.adjustRowNumbersAndGetCount();while(e>0&&e<r);return this.detectionResultColumns},t.prototype.adjustIndicatorColumnRowNumbers=function(e){e?.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)},t.prototype.adjustRowNumbersAndGetCount=function(){var e=this.adjustRowNumbersByRow();if(e===0)return 0;for(var r=1;r<this.barcodeColumnCount+1;r++)for(var n=this.detectionResultColumns[r].getCodewords(),i=0;i<n.length;i++)n[i]!=null&&(n[i].hasValidRowNumber()||this.adjustRowNumbers(r,i,n));return e},t.prototype.adjustRowNumbersByRow=function(){this.adjustRowNumbersFromBothRI();var e=this.adjustRowNumbersFromLRI();return e+this.adjustRowNumbersFromRRI()},t.prototype.adjustRowNumbersFromBothRI=function(){if(!(this.detectionResultColumns[0]==null||this.detectionResultColumns[this.barcodeColumnCount+1]==null)){for(var e=this.detectionResultColumns[0].getCodewords(),r=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<e.length;n++)if(e[n]!=null&&r[n]!=null&&e[n].getRowNumber()===r[n].getRowNumber())for(var i=1;i<=this.barcodeColumnCount;i++){var a=this.detectionResultColumns[i].getCodewords()[n];a!=null&&(a.setRowNumber(e[n].getRowNumber()),a.hasValidRowNumber()||(this.detectionResultColumns[i].getCodewords()[n]=null))}}},t.prototype.adjustRowNumbersFromRRI=function(){if(this.detectionResultColumns[this.barcodeColumnCount+1]==null)return 0;for(var e=0,r=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords(),n=0;n<r.length;n++)if(r[n]!=null)for(var i=r[n].getRowNumber(),a=0,o=this.barcodeColumnCount+1;o>0&&a<this.ADJUST_ROW_NUMBER_SKIP;o--){var s=this.detectionResultColumns[o].getCodewords()[n];s!=null&&(a=t.adjustRowNumberIfValid(i,a,s),s.hasValidRowNumber()||e++)}return e},t.prototype.adjustRowNumbersFromLRI=function(){if(this.detectionResultColumns[0]==null)return 0;for(var e=0,r=this.detectionResultColumns[0].getCodewords(),n=0;n<r.length;n++)if(r[n]!=null)for(var i=r[n].getRowNumber(),a=0,o=1;o<this.barcodeColumnCount+1&&a<this.ADJUST_ROW_NUMBER_SKIP;o++){var s=this.detectionResultColumns[o].getCodewords()[n];s!=null&&(a=t.adjustRowNumberIfValid(i,a,s),s.hasValidRowNumber()||e++)}return e},t.adjustRowNumberIfValid=function(e,r,n){return n==null||n.hasValidRowNumber()||(n.isValidRowNumber(e)?(n.setRowNumber(e),r=0):++r),r},t.prototype.adjustRowNumbers=function(e,r,n){var i,a;if(this.detectionResultColumns[e-1]!=null){var o=n[r],s=this.detectionResultColumns[e-1].getCodewords(),l=s;this.detectionResultColumns[e+1]!=null&&(l=this.detectionResultColumns[e+1].getCodewords());var c=new Array(14);c[2]=s[r],c[3]=l[r],r>0&&(c[0]=n[r-1],c[4]=s[r-1],c[5]=l[r-1]),r>1&&(c[8]=n[r-2],c[10]=s[r-2],c[11]=l[r-2]),r<n.length-1&&(c[1]=n[r+1],c[6]=s[r+1],c[7]=l[r+1]),r<n.length-2&&(c[9]=n[r+2],c[12]=s[r+2],c[13]=l[r+2]);try{for(var f=tf(c),d=f.next();!d.done;d=f.next()){var v=d.value;if(t.adjustRowNumber(o,v))return}}catch(h){i={error:h}}finally{try{d&&!d.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}}},t.adjustRowNumber=function(e,r){return r==null?!1:r.hasValidRowNumber()&&r.getBucket()===e.getBucket()?(e.setRowNumber(r.getRowNumber()),!0):!1},t.prototype.getBarcodeColumnCount=function(){return this.barcodeColumnCount},t.prototype.getBarcodeRowCount=function(){return this.barcodeMetadata.getRowCount()},t.prototype.getBarcodeECLevel=function(){return this.barcodeMetadata.getErrorCorrectionLevel()},t.prototype.setBoundingBox=function(e){this.boundingBox=e},t.prototype.getBoundingBox=function(){return this.boundingBox},t.prototype.setDetectionResultColumn=function(e,r){this.detectionResultColumns[e]=r},t.prototype.getDetectionResultColumn=function(e){return this.detectionResultColumns[e]},t.prototype.toString=function(){var e=this.detectionResultColumns[0];e==null&&(e=this.detectionResultColumns[this.barcodeColumnCount+1]);for(var r=new Zn,n=0;n<e.getCodewords().length;n++){r.format("CW %3d:",n);for(var i=0;i<this.barcodeColumnCount+2;i++){if(this.detectionResultColumns[i]==null){r.format(" | ");continue}var a=this.detectionResultColumns[i].getCodewords()[n];if(a==null){r.format(" | ");continue}r.format(" %3d|%3d",a.getRowNumber(),a.getValue())}r.format("%n")}return r.toString()},t})(),nf=(function(){function t(e,r,n,i){this.rowNumber=t.BARCODE_ROW_UNKNOWN,this.startX=Math.trunc(e),this.endX=Math.trunc(r),this.bucket=Math.trunc(n),this.value=Math.trunc(i)}return t.prototype.hasValidRowNumber=function(){return this.isValidRowNumber(this.rowNumber)},t.prototype.isValidRowNumber=function(e){return e!==t.BARCODE_ROW_UNKNOWN&&this.bucket===e%3*3},t.prototype.setRowNumberAsRowIndicatorColumn=function(){this.rowNumber=Math.trunc(Math.trunc(this.value/30)*3+Math.trunc(this.bucket/3))},t.prototype.getWidth=function(){return this.endX-this.startX},t.prototype.getStartX=function(){return this.startX},t.prototype.getEndX=function(){return this.endX},t.prototype.getBucket=function(){return this.bucket},t.prototype.getValue=function(){return this.value},t.prototype.getRowNumber=function(){return this.rowNumber},t.prototype.setRowNumber=function(e){this.rowNumber=e},t.prototype.toString=function(){return this.rowNumber+"|"+this.value},t.BARCODE_ROW_UNKNOWN=-1,t})(),af=(function(){function t(){}return t.initialize=function(){for(var e=0;e<W.SYMBOL_TABLE.length;e++)for(var r=W.SYMBOL_TABLE[e],n=r&1,i=0;i<W.BARS_IN_MODULE;i++){for(var a=0;(r&1)===n;)a+=1,r>>=1;n=r&1,t.RATIOS_TABLE[e]||(t.RATIOS_TABLE[e]=new Array(W.BARS_IN_MODULE)),t.RATIOS_TABLE[e][W.BARS_IN_MODULE-i-1]=Math.fround(a/W.MODULES_IN_CODEWORD)}this.bSymbolTableReady=!0},t.getDecodedValue=function(e){var r=t.getDecodedCodewordValue(t.sampleBitCounts(e));return r!==-1?r:t.getClosestDecodedValue(e)},t.sampleBitCounts=function(e){for(var r=X.sum(e),n=new Int32Array(W.BARS_IN_MODULE),i=0,a=0,o=0;o<W.MODULES_IN_CODEWORD;o++){var s=r/(2*W.MODULES_IN_CODEWORD)+o*r/W.MODULES_IN_CODEWORD;a+e[i]<=s&&(a+=e[i],i++),n[i]++}return n},t.getDecodedCodewordValue=function(e){var r=t.getBitValue(e);return W.getCodeword(r)===-1?-1:r},t.getBitValue=function(e){for(var r=0,n=0;n<e.length;n++)for(var i=0;i<e[n];i++)r=r<<1|(n%2===0?1:0);return Math.trunc(r)},t.getClosestDecodedValue=function(e){var r=X.sum(e),n=new Array(W.BARS_IN_MODULE);if(r>1)for(var i=0;i<n.length;i++)n[i]=Math.fround(e[i]/r);var a=Tn.MAX_VALUE,o=-1;this.bSymbolTableReady||t.initialize();for(var s=0;s<t.RATIOS_TABLE.length;s++){for(var l=0,c=t.RATIOS_TABLE[s],f=0;f<W.BARS_IN_MODULE;f++){var d=Math.fround(c[f]-n[f]);if(l+=Math.fround(d*d),l>=a)break}l<a&&(a=l,o=W.SYMBOL_TABLE[s])}return o},t.bSymbolTableReady=!1,t.RATIOS_TABLE=new Array(W.SYMBOL_TABLE.length).map(function(e){return new Array(W.BARS_IN_MODULE)}),t})(),of=(function(){function t(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}return t.prototype.getSegmentIndex=function(){return this.segmentIndex},t.prototype.setSegmentIndex=function(e){this.segmentIndex=e},t.prototype.getFileId=function(){return this.fileId},t.prototype.setFileId=function(e){this.fileId=e},t.prototype.getOptionalData=function(){return this.optionalData},t.prototype.setOptionalData=function(e){this.optionalData=e},t.prototype.isLastSegment=function(){return this.lastSegment},t.prototype.setLastSegment=function(e){this.lastSegment=e},t.prototype.getSegmentCount=function(){return this.segmentCount},t.prototype.setSegmentCount=function(e){this.segmentCount=e},t.prototype.getSender=function(){return this.sender||null},t.prototype.setSender=function(e){this.sender=e},t.prototype.getAddressee=function(){return this.addressee||null},t.prototype.setAddressee=function(e){this.addressee=e},t.prototype.getFileName=function(){return this.fileName},t.prototype.setFileName=function(e){this.fileName=e},t.prototype.getFileSize=function(){return this.fileSize},t.prototype.setFileSize=function(e){this.fileSize=e},t.prototype.getChecksum=function(){return this.checksum},t.prototype.setChecksum=function(e){this.checksum=e},t.prototype.getTimestamp=function(){return this.timestamp},t.prototype.setTimestamp=function(e){this.timestamp=e},t})(),Fi=(function(){function t(){}return t.parseLong=function(e,r){return r===void 0&&(r=void 0),parseInt(e,r)},t})(),sf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),lf=(function(t){sf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="NullPointerException",e})(be),uf=(function(){function t(){}return t.prototype.writeBytes=function(e){this.writeBytesOffset(e,0,e.length)},t.prototype.writeBytesOffset=function(e,r,n){if(e==null)throw new lf;if(r<0||r>e.length||n<0||r+n>e.length||r+n<0)throw new Wn;if(n===0)return;for(var i=0;i<n;i++)this.write(e[r+i])},t.prototype.flush=function(){},t.prototype.close=function(){},t})(),cf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),ff=(function(t){cf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(be),df=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),hf=(function(t){df(e,t);function e(r){r===void 0&&(r=32);var n=t.call(this)||this;if(n.count=0,r<0)throw new F("Negative initial size: "+r);return n.buf=new Uint8Array(r),n}return e.prototype.ensureCapacity=function(r){r-this.buf.length>0&&this.grow(r)},e.prototype.grow=function(r){var n=this.buf.length,i=n<<1;if(i-r<0&&(i=r),i<0){if(r<0)throw new ff;i=G.MAX_VALUE}this.buf=De.copyOfUint8Array(this.buf,i)},e.prototype.write=function(r){this.ensureCapacity(this.count+1),this.buf[this.count]=r,this.count+=1},e.prototype.writeBytesOffset=function(r,n,i){if(n<0||n>r.length||i<0||n+i-r.length>0)throw new Wn;this.ensureCapacity(this.count+i),ne.arraycopy(r,n,this.buf,this.count,i),this.count+=i},e.prototype.writeTo=function(r){r.writeBytesOffset(this.buf,0,this.count)},e.prototype.reset=function(){this.count=0},e.prototype.toByteArray=function(){return De.copyOfUint8Array(this.buf,this.count)},e.prototype.size=function(){return this.count},e.prototype.toString=function(r){return r?typeof r=="string"?this.toString_string(r):this.toString_number(r):this.toString_void()},e.prototype.toString_void=function(){return new String(this.buf).toString()},e.prototype.toString_string=function(r){return new String(this.buf).toString()},e.prototype.toString_number=function(r){return new String(this.buf).toString()},e.prototype.close=function(){},e})(uf),Q;(function(t){t[t.ALPHA=0]="ALPHA",t[t.LOWER=1]="LOWER",t[t.MIXED=2]="MIXED",t[t.PUNCT=3]="PUNCT",t[t.ALPHA_SHIFT=4]="ALPHA_SHIFT",t[t.PUNCT_SHIFT=5]="PUNCT_SHIFT"})(Q||(Q={}));function wa(){if(typeof window<"u")return window.BigInt||null;if(typeof global<"u")return global.BigInt||null;if(typeof self<"u")return self.BigInt||null;throw new Error("Can't search globals for BigInt!")}var Ar;function ot(t){if(typeof Ar>"u"&&(Ar=wa()),Ar===null)throw new Error("BigInt is not supported!");return Ar(t)}function vf(){var t=[];t[0]=ot(1);var e=ot(900);t[1]=e;for(var r=2;r<16;r++)t[r]=t[r-1]*e;return t}var pf=(function(){function t(){}return t.decode=function(e,r){var n=new J(""),i=de.ISO8859_1;n.enableDecoding(i);for(var a=1,o=e[a++],s=new of;a<e[0];){switch(o){case t.TEXT_COMPACTION_MODE_LATCH:a=t.textCompaction(e,a,n);break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:a=t.byteCompaction(o,e,i,a,n);break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:n.append(e[a++]);break;case t.NUMERIC_COMPACTION_MODE_LATCH:a=t.numericCompaction(e,a,n);break;case t.ECI_CHARSET:de.getCharacterSetECIByValue(e[a++]);break;case t.ECI_GENERAL_PURPOSE:a+=2;break;case t.ECI_USER_DEFINED:a++;break;case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:a=t.decodeMacroBlock(e,a,s);break;case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:throw new R;default:a--,a=t.textCompaction(e,a,n);break}if(a<e.length)o=e[a++];else throw R.getFormatInstance()}if(n.length()===0)throw R.getFormatInstance();var l=new Wr(null,n.toString(),null,r);return l.setOther(s),l},t.decodeMacroBlock=function(e,r,n){if(r+t.NUMBER_OF_SEQUENCE_CODEWORDS>e[0])throw R.getFormatInstance();for(var i=new Int32Array(t.NUMBER_OF_SEQUENCE_CODEWORDS),a=0;a<t.NUMBER_OF_SEQUENCE_CODEWORDS;a++,r++)i[a]=e[r];n.setSegmentIndex(G.parseInt(t.decodeBase900toBase10(i,t.NUMBER_OF_SEQUENCE_CODEWORDS)));var o=new J;r=t.textCompaction(e,r,o),n.setFileId(o.toString());var s=-1;for(e[r]===t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD&&(s=r+1);r<e[0];)switch(e[r]){case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:switch(r++,e[r]){case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME:var l=new J;r=t.textCompaction(e,r+1,l),n.setFileName(l.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var c=new J;r=t.textCompaction(e,r+1,c),n.setSender(c.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var f=new J;r=t.textCompaction(e,r+1,f),n.setAddressee(f.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var d=new J;r=t.numericCompaction(e,r+1,d),n.setSegmentCount(G.parseInt(d.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var v=new J;r=t.numericCompaction(e,r+1,v),n.setTimestamp(Fi.parseLong(v.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var h=new J;r=t.numericCompaction(e,r+1,h),n.setChecksum(G.parseInt(h.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var p=new J;r=t.numericCompaction(e,r+1,p),n.setFileSize(Fi.parseLong(p.toString()));break;default:throw R.getFormatInstance()}break;case t.MACRO_PDF417_TERMINATOR:r++,n.setLastSegment(!0);break;default:throw R.getFormatInstance()}if(s!==-1){var g=r-s;n.isLastSegment()&&g--,n.setOptionalData(De.copyOfRange(e,s,s+g))}return r},t.textCompaction=function(e,r,n){for(var i=new Int32Array((e[0]-r)*2),a=new Int32Array((e[0]-r)*2),o=0,s=!1;r<e[0]&&!s;){var l=e[r++];if(l<t.TEXT_COMPACTION_MODE_LATCH)i[o]=l/30,i[o+1]=l%30,o+=2;else switch(l){case t.TEXT_COMPACTION_MODE_LATCH:i[o++]=t.TEXT_COMPACTION_MODE_LATCH;break;case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,s=!0;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i[o]=t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE,l=e[r++],a[o]=l,o++;break}}return t.decodeTextCompaction(i,a,o,n),r},t.decodeTextCompaction=function(e,r,n,i){for(var a=Q.ALPHA,o=Q.ALPHA,s=0;s<n;){var l=e[s],c="";switch(a){case Q.ALPHA:if(l<26)c=String.fromCharCode(65+l);else switch(l){case 26:c=" ";break;case t.LL:a=Q.LOWER;break;case t.ML:a=Q.MIXED;break;case t.PS:o=a,a=Q.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=Q.ALPHA;break}break;case Q.LOWER:if(l<26)c=String.fromCharCode(97+l);else switch(l){case 26:c=" ";break;case t.AS:o=a,a=Q.ALPHA_SHIFT;break;case t.ML:a=Q.MIXED;break;case t.PS:o=a,a=Q.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=Q.ALPHA;break}break;case Q.MIXED:if(l<t.PL)c=t.MIXED_CHARS[l];else switch(l){case t.PL:a=Q.PUNCT;break;case 26:c=" ";break;case t.LL:a=Q.LOWER;break;case t.AL:a=Q.ALPHA;break;case t.PS:o=a,a=Q.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=Q.ALPHA;break}break;case Q.PUNCT:if(l<t.PAL)c=t.PUNCT_CHARS[l];else switch(l){case t.PAL:a=Q.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=Q.ALPHA;break}break;case Q.ALPHA_SHIFT:if(a=o,l<26)c=String.fromCharCode(65+l);else switch(l){case 26:c=" ";break;case t.TEXT_COMPACTION_MODE_LATCH:a=Q.ALPHA;break}break;case Q.PUNCT_SHIFT:if(a=o,l<t.PAL)c=t.PUNCT_CHARS[l];else switch(l){case t.PAL:a=Q.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=Q.ALPHA;break}break}c!==""&&i.append(c),s++}},t.byteCompaction=function(e,r,n,i,a){var o=new hf,s=0,l=0,c=!1;switch(e){case t.BYTE_COMPACTION_MODE_LATCH:for(var f=new Int32Array(6),d=r[i++];i<r[0]&&!c;)switch(f[s++]=d,l=900*l+d,d=r[i++],d){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:i--,c=!0;break;default:if(s%5===0&&s>0){for(var v=0;v<6;++v)o.write(Number(ot(l)>>ot(8*(5-v))));l=0,s=0}break}i===r[0]&&d<t.TEXT_COMPACTION_MODE_LATCH&&(f[s++]=d);for(var h=0;h<s;h++)o.write(f[h]);break;case t.BYTE_COMPACTION_MODE_LATCH_6:for(;i<r[0]&&!c;){var p=r[i++];if(p<t.TEXT_COMPACTION_MODE_LATCH)s++,l=900*l+p;else switch(p){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.NUMERIC_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:i--,c=!0;break}if(s%5===0&&s>0){for(var v=0;v<6;++v)o.write(Number(ot(l)>>ot(8*(5-v))));l=0,s=0}}break}return a.append(je.decode(o.toByteArray(),n)),i},t.numericCompaction=function(e,r,n){for(var i=0,a=!1,o=new Int32Array(t.MAX_NUMERIC_CODEWORDS);r<e[0]&&!a;){var s=e[r++];if(r===e[0]&&(a=!0),s<t.TEXT_COMPACTION_MODE_LATCH)o[i]=s,i++;else switch(s){case t.TEXT_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH:case t.BYTE_COMPACTION_MODE_LATCH_6:case t.BEGIN_MACRO_PDF417_CONTROL_BLOCK:case t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD:case t.MACRO_PDF417_TERMINATOR:r--,a=!0;break}(i%t.MAX_NUMERIC_CODEWORDS===0||s===t.NUMERIC_COMPACTION_MODE_LATCH||a)&&i>0&&(n.append(t.decodeBase900toBase10(o,i)),i=0)}return r},t.decodeBase900toBase10=function(e,r){for(var n=ot(0),i=0;i<r;i++)n+=t.EXP900[r-i-1]*ot(e[i]);var a=n.toString();if(a.charAt(0)!=="1")throw new R;return a.substring(1)},t.TEXT_COMPACTION_MODE_LATCH=900,t.BYTE_COMPACTION_MODE_LATCH=901,t.NUMERIC_COMPACTION_MODE_LATCH=902,t.BYTE_COMPACTION_MODE_LATCH_6=924,t.ECI_USER_DEFINED=925,t.ECI_GENERAL_PURPOSE=926,t.ECI_CHARSET=927,t.BEGIN_MACRO_PDF417_CONTROL_BLOCK=928,t.BEGIN_MACRO_PDF417_OPTIONAL_FIELD=923,t.MACRO_PDF417_TERMINATOR=922,t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE=913,t.MAX_NUMERIC_CODEWORDS=15,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_NAME=0,t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT=1,t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP=2,t.MACRO_PDF417_OPTIONAL_FIELD_SENDER=3,t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE=4,t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE=5,t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM=6,t.PL=25,t.LL=27,t.AS=27,t.ML=28,t.AL=28,t.PS=29,t.PAL=29,t.PUNCT_CHARS=`;<>@[\\]_\`~!\r ,:
19
+ -.$/"|*()?{}'`,t.MIXED_CHARS="0123456789&\r ,:#-.$/+%*=^",t.EXP900=wa()?vf():[],t.NUMBER_OF_SEQUENCE_CODEWORDS=2,t})(),Yt=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},gf=(function(){function t(){}return t.decode=function(e,r,n,i,a,o,s){for(var l=new kn(e,r,n,i,a),c=null,f=null,d,v=!0;;v=!1){if(r!=null&&(c=t.getRowIndicatorColumn(e,l,r,!0,o,s)),i!=null&&(f=t.getRowIndicatorColumn(e,l,i,!1,o,s)),d=t.merge(c,f),d==null)throw I.getNotFoundInstance();var h=d.getBoundingBox();if(v&&h!=null&&(h.getMinY()<l.getMinY()||h.getMaxY()>l.getMaxY()))l=h;else break}d.setBoundingBox(l);var p=d.getBarcodeColumnCount()+1;d.setDetectionResultColumn(0,c),d.setDetectionResultColumn(p,f);for(var g=c!=null,y=1;y<=p;y++){var w=g?y:p-y;if(d.getDetectionResultColumn(w)===void 0){var m=void 0;w===0||w===p?m=new Li(l,w===0):m=new ma(l),d.setDetectionResultColumn(w,m);for(var A=-1,E=A,C=l.getMinY();C<=l.getMaxY();C++){if(A=t.getStartColumn(d,w,C,g),A<0||A>l.getMaxX()){if(E===-1)continue;A=E}var b=t.detectCodeword(e,l.getMinX(),l.getMaxX(),g,A,C,o,s);b!=null&&(m.setCodeword(C,b),E=A,o=Math.min(o,b.getWidth()),s=Math.max(s,b.getWidth()))}}}return t.createDecoderResult(d)},t.merge=function(e,r){if(e==null&&r==null)return null;var n=t.getBarcodeMetadata(e,r);if(n==null)return null;var i=kn.merge(t.adjustBoundingBox(e),t.adjustBoundingBox(r));return new rf(n,i)},t.adjustBoundingBox=function(e){var r,n;if(e==null)return null;var i=e.getRowHeights();if(i==null)return null;var a=t.getMax(i),o=0;try{for(var s=Yt(i),l=s.next();!l.done;l=s.next()){var c=l.value;if(o+=a-c,c>0)break}}catch(h){r={error:h}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}for(var f=e.getCodewords(),d=0;o>0&&f[d]==null;d++)o--;for(var v=0,d=i.length-1;d>=0&&(v+=a-i[d],!(i[d]>0));d--);for(var d=f.length-1;v>0&&f[d]==null;d--)v--;return e.getBoundingBox().addMissingRows(o,v,e.isLeft())},t.getMax=function(e){var r,n,i=-1;try{for(var a=Yt(e),o=a.next();!o.done;o=a.next()){var s=o.value;i=Math.max(i,s)}}catch(l){r={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i},t.getBarcodeMetadata=function(e,r){var n;if(e==null||(n=e.getBarcodeMetadata())==null)return r==null?null:r.getBarcodeMetadata();var i;return r==null||(i=r.getBarcodeMetadata())==null?n:n.getColumnCount()!==i.getColumnCount()&&n.getErrorCorrectionLevel()!==i.getErrorCorrectionLevel()&&n.getRowCount()!==i.getRowCount()?null:n},t.getRowIndicatorColumn=function(e,r,n,i,a,o){for(var s=new Li(r,i),l=0;l<2;l++)for(var c=l===0?1:-1,f=Math.trunc(Math.trunc(n.getX())),d=Math.trunc(Math.trunc(n.getY()));d<=r.getMaxY()&&d>=r.getMinY();d+=c){var v=t.detectCodeword(e,0,e.getWidth(),i,f,d,a,o);v!=null&&(s.setCodeword(d,v),i?f=v.getStartX():f=v.getEndX())}return s},t.adjustCodewordCount=function(e,r){var n=r[0][1],i=n.getValue(),a=e.getBarcodeColumnCount()*e.getBarcodeRowCount()-t.getNumberOfECCodeWords(e.getBarcodeECLevel());if(i.length===0){if(a<1||a>W.MAX_CODEWORDS_IN_BARCODE)throw I.getNotFoundInstance();n.setValue(a)}else i[0]!==a&&n.setValue(a)},t.createDecoderResult=function(e){var r=t.createBarcodeMatrix(e);t.adjustCodewordCount(e,r);for(var n=new Array,i=new Int32Array(e.getBarcodeRowCount()*e.getBarcodeColumnCount()),a=[],o=new Array,s=0;s<e.getBarcodeRowCount();s++)for(var l=0;l<e.getBarcodeColumnCount();l++){var c=r[s][l+1].getValue(),f=s*e.getBarcodeColumnCount()+l;c.length===0?n.push(f):c.length===1?i[f]=c[0]:(o.push(f),a.push(c))}for(var d=new Array(a.length),v=0;v<d.length;v++)d[v]=a[v];return t.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(),i,W.toIntArray(n),W.toIntArray(o),d)},t.createDecoderResultFromAmbiguousValues=function(e,r,n,i,a){for(var o=new Int32Array(i.length),s=100;s-- >0;){for(var l=0;l<o.length;l++)r[i[l]]=a[l][o[l]];try{return t.decodeCodewords(r,e,n)}catch(f){var c=f instanceof me;if(!c)throw f}if(o.length===0)throw me.getChecksumInstance();for(var l=0;l<o.length;l++)if(o[l]<a[l].length-1){o[l]++;break}else if(o[l]=0,l===o.length-1)throw me.getChecksumInstance()}throw me.getChecksumInstance()},t.createBarcodeMatrix=function(e){for(var r,n,i,a,o=Array.from({length:e.getBarcodeRowCount()},function(){return new Array(e.getBarcodeColumnCount()+2)}),s=0;s<o.length;s++)for(var l=0;l<o[s].length;l++)o[s][l]=new nr;var c=0;try{for(var f=Yt(e.getDetectionResultColumns()),d=f.next();!d.done;d=f.next()){var v=d.value;if(v!=null)try{for(var h=(i=void 0,Yt(v.getCodewords())),p=h.next();!p.done;p=h.next()){var g=p.value;if(g!=null){var y=g.getRowNumber();if(y>=0){if(y>=o.length)continue;o[y][c].setValue(g.getValue())}}}}catch(w){i={error:w}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}c++}}catch(w){r={error:w}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(r)throw r.error}}return o},t.isValidBarcodeColumn=function(e,r){return r>=0&&r<=e.getBarcodeColumnCount()+1},t.getStartColumn=function(e,r,n,i){var a,o,s=i?1:-1,l=null;if(t.isValidBarcodeColumn(e,r-s)&&(l=e.getDetectionResultColumn(r-s).getCodeword(n)),l!=null)return i?l.getEndX():l.getStartX();if(l=e.getDetectionResultColumn(r).getCodewordNearby(n),l!=null)return i?l.getStartX():l.getEndX();if(t.isValidBarcodeColumn(e,r-s)&&(l=e.getDetectionResultColumn(r-s).getCodewordNearby(n)),l!=null)return i?l.getEndX():l.getStartX();for(var c=0;t.isValidBarcodeColumn(e,r-s);){r-=s;try{for(var f=(a=void 0,Yt(e.getDetectionResultColumn(r).getCodewords())),d=f.next();!d.done;d=f.next()){var v=d.value;if(v!=null)return(i?v.getEndX():v.getStartX())+s*c*(v.getEndX()-v.getStartX())}}catch(h){a={error:h}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(a)throw a.error}}c++}return i?e.getBoundingBox().getMinX():e.getBoundingBox().getMaxX()},t.detectCodeword=function(e,r,n,i,a,o,s,l){a=t.adjustCodewordStartColumn(e,r,n,i,a,o);var c=t.getModuleBitCount(e,r,n,i,a,o);if(c==null)return null;var f,d=X.sum(c);if(i)f=a+d;else{for(var v=0;v<c.length/2;v++){var h=c[v];c[v]=c[c.length-1-v],c[c.length-1-v]=h}f=a,a=f-d}if(!t.checkCodewordSkew(d,s,l))return null;var p=af.getDecodedValue(c),g=W.getCodeword(p);return g===-1?null:new nf(a,f,t.getCodewordBucketNumber(p),g)},t.getModuleBitCount=function(e,r,n,i,a,o){for(var s=a,l=new Int32Array(8),c=0,f=i?1:-1,d=i;(i?s<n:s>=r)&&c<l.length;)e.get(s,o)===d?(l[c]++,s+=f):(c++,d=!d);return c===l.length||s===(i?n:r)&&c===l.length-1?l:null},t.getNumberOfECCodeWords=function(e){return 2<<e},t.adjustCodewordStartColumn=function(e,r,n,i,a,o){for(var s=a,l=i?-1:1,c=0;c<2;c++){for(;(i?s>=r:s<n)&&i===e.get(s,o);){if(Math.abs(a-s)>t.CODEWORD_SKEW_SIZE)return a;s+=l}l=-l,i=!i}return s},t.checkCodewordSkew=function(e,r,n){return r-t.CODEWORD_SKEW_SIZE<=e&&e<=n+t.CODEWORD_SKEW_SIZE},t.decodeCodewords=function(e,r,n){if(e.length===0)throw R.getFormatInstance();var i=1<<r+1,a=t.correctErrors(e,n,i);t.verifyCodewordCount(e,i);var o=pf.decode(e,""+r);return o.setErrorsCorrected(a),o.setErasures(n.length),o},t.correctErrors=function(e,r,n){if(r!=null&&r.length>n/2+t.MAX_ERRORS||n<0||n>t.MAX_EC_CODEWORDS)throw me.getChecksumInstance();return t.errorCorrection.decode(e,n,r)},t.verifyCodewordCount=function(e,r){if(e.length<4)throw R.getFormatInstance();var n=e[0];if(n>e.length)throw R.getFormatInstance();if(n===0)if(r<e.length)e[0]=e.length-r;else throw R.getFormatInstance()},t.getBitCountForCodeword=function(e){for(var r=new Int32Array(8),n=0,i=r.length-1;!((e&1)!==n&&(n=e&1,i--,i<0));)r[i]++,e>>=1;return r},t.getCodewordBucketNumber=function(e){return e instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(e):this.getCodewordBucketNumber_number(e)},t.getCodewordBucketNumber_number=function(e){return t.getCodewordBucketNumber(t.getBitCountForCodeword(e))},t.getCodewordBucketNumber_Int32Array=function(e){return(e[0]-e[2]+e[4]-e[6]+9)%9},t.toString=function(e){for(var r=new Zn,n=0;n<e.length;n++){r.format("Row %2d: ",n);for(var i=0;i<e[n].length;i++){var a=e[n][i];a.getValue().length===0?r.format(" ",null):r.format("%4d(%2d)",a.getValue()[0],a.getConfidence(a.getValue()[0]))}r.format("%n")}return r.toString()},t.CODEWORD_SKEW_SIZE=2,t.MAX_ERRORS=3,t.MAX_EC_CODEWORDS=512,t.errorCorrection=new Y1,t})(),xf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Mn=(function(){function t(){}return t.prototype.decode=function(e,r){r===void 0&&(r=null);var n=t.decode(e,r,!1);if(n==null||n.length===0||n[0]==null)throw I.getNotFoundInstance();return n[0]},t.prototype.decodeMultiple=function(e,r){r===void 0&&(r=null);try{return t.decode(e,r,!0)}catch(n){throw n instanceof R||n instanceof me?I.getNotFoundInstance():n}},t.decode=function(e,r,n){var i,a,o=new Array,s=G1.detectMultiple(e,r,n);try{for(var l=xf(s.getPoints()),c=l.next();!c.done;c=l.next()){var f=c.value,d=gf.decode(s.getBits(),f[4],f[5],f[6],f[7],t.getMinCodewordWidth(f),t.getMaxCodewordWidth(f)),v=new Be(d.getText(),d.getRawBytes(),void 0,f,U.PDF_417);v.putMetadata(we.ERROR_CORRECTION_LEVEL,d.getECLevel());var h=d.getOther();h!=null&&v.putMetadata(we.PDF417_EXTRA_METADATA,h),o.push(v)}}catch(p){i={error:p}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}return o.map(function(p){return p})},t.getMaxWidth=function(e,r){return e==null||r==null?0:Math.trunc(Math.abs(e.getX()-r.getX()))},t.getMinWidth=function(e,r){return e==null||r==null?G.MAX_VALUE:Math.trunc(Math.abs(e.getX()-r.getX()))},t.getMaxCodewordWidth=function(e){return Math.floor(Math.max(Math.max(t.getMaxWidth(e[0],e[4]),t.getMaxWidth(e[6],e[2])*W.MODULES_IN_CODEWORD/W.MODULES_IN_STOP_PATTERN),Math.max(t.getMaxWidth(e[1],e[5]),t.getMaxWidth(e[7],e[3])*W.MODULES_IN_CODEWORD/W.MODULES_IN_STOP_PATTERN)))},t.getMinCodewordWidth=function(e){return Math.floor(Math.min(Math.min(t.getMinWidth(e[0],e[4]),t.getMinWidth(e[6],e[2])*W.MODULES_IN_CODEWORD/W.MODULES_IN_STOP_PATTERN),Math.min(t.getMinWidth(e[1],e[5]),t.getMinWidth(e[7],e[3])*W.MODULES_IN_CODEWORD/W.MODULES_IN_STOP_PATTERN)))},t.prototype.reset=function(){},t})(),yf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Vi=(function(t){yf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ReaderException",e})(be),Ui=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mf=(function(){function t(){}return t.prototype.decode=function(e,r){return this.setHints(r),this.decodeInternal(e)},t.prototype.decodeWithState=function(e){return(this.readers===null||this.readers===void 0)&&this.setHints(null),this.decodeInternal(e)},t.prototype.setHints=function(e){this.hints=e;var r=e!=null&&e.get(le.TRY_HARDER)!==void 0,n=e==null?null:e.get(le.POSSIBLE_FORMATS),i=new Array;if(n!=null){var a=n.some(function(o){return o===U.UPC_A||o===U.UPC_E||o===U.EAN_13||o===U.EAN_8||o===U.CODABAR||o===U.CODE_39||o===U.CODE_93||o===U.CODE_128||o===U.ITF||o===U.RSS_14||o===U.RSS_EXPANDED});a&&!r&&i.push(new rr(e)),n.includes(U.QR_CODE)&&i.push(new Pn),n.includes(U.DATA_MATRIX)&&i.push(new Rn),n.includes(U.AZTEC)&&i.push(new Dn),n.includes(U.PDF_417)&&i.push(new Mn),a&&r&&i.push(new rr(e))}i.length===0&&(r||i.push(new rr(e)),i.push(new Pn),i.push(new Rn),i.push(new Dn),i.push(new Mn),r&&i.push(new rr(e))),this.readers=i},t.prototype.reset=function(){var e,r;if(this.readers!==null)try{for(var n=Ui(this.readers),i=n.next();!i.done;i=n.next()){var a=i.value;a.reset()}}catch(o){e={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.prototype.decodeInternal=function(e){var r,n;if(this.readers===null)throw new Vi("No readers where selected, nothing can be read.");try{for(var i=Ui(this.readers),a=i.next();!a.done;a=i.next()){var o=a.value;try{return o.decode(e,this.hints)}catch(s){if(s instanceof Vi)continue}}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}throw new I("No MultiFormat Readers were able to detect the code.")},t})(),wf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Ef=(function(t){wf(e,t);function e(r,n){r===void 0&&(r=null),n===void 0&&(n=500);var i=this,a=new mf;return a.setHints(r),i=t.call(this,a,n)||this,i}return e.prototype.decodeBitmap=function(r){return this.reader.decodeWithState(r)},e})(Ut),Af=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();(function(t){Af(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Mn,r)||this}return e})(Ut);var _f=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();(function(t){_f(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Pn,r)||this}return e})(Ut);var Ln;(function(t){t[t.ERROR_CORRECTION=0]="ERROR_CORRECTION",t[t.CHARACTER_SET=1]="CHARACTER_SET",t[t.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",t[t.MIN_SIZE=3]="MIN_SIZE",t[t.MAX_SIZE=4]="MAX_SIZE",t[t.MARGIN=5]="MARGIN",t[t.PDF417_COMPACT=6]="PDF417_COMPACT",t[t.PDF417_COMPACTION=7]="PDF417_COMPACTION",t[t.PDF417_DIMENSIONS=8]="PDF417_DIMENSIONS",t[t.AZTEC_LAYERS=9]="AZTEC_LAYERS",t[t.QR_VERSION=10]="QR_VERSION"})(Ln||(Ln={}));const _r=Ln;var Ea=(function(){function t(e){this.field=e,this.cachedGenerators=[],this.cachedGenerators.push(new ct(e,Int32Array.from([1])))}return t.prototype.buildGenerator=function(e){var r=this.cachedGenerators;if(e>=r.length)for(var n=r[r.length-1],i=this.field,a=r.length;a<=e;a++){var o=n.multiply(new ct(i,Int32Array.from([1,i.exp(a-1+i.getGeneratorBase())])));r.push(o),n=o}return r[e]},t.prototype.encode=function(e,r){if(r===0)throw new F("No error correction bytes");var n=e.length-r;if(n<=0)throw new F("No data bytes provided");var i=this.buildGenerator(r),a=new Int32Array(n);ne.arraycopy(e,0,a,0,n);var o=new ct(this.field,a);o=o.multiplyByMonomial(r,1);for(var s=o.divide(i)[1],l=s.getCoefficients(),c=r-l.length,f=0;f<c;f++)e[n+f]=0;ne.arraycopy(l,0,e,n+c,l.length)},t})(),ir=(function(){function t(){}return t.applyMaskPenaltyRule1=function(e){return t.applyMaskPenaltyRule1Internal(e,!0)+t.applyMaskPenaltyRule1Internal(e,!1)},t.applyMaskPenaltyRule2=function(e){for(var r=0,n=e.getArray(),i=e.getWidth(),a=e.getHeight(),o=0;o<a-1;o++)for(var s=n[o],l=0;l<i-1;l++){var c=s[l];c===s[l+1]&&c===n[o+1][l]&&c===n[o+1][l+1]&&r++}return t.N2*r},t.applyMaskPenaltyRule3=function(e){for(var r=0,n=e.getArray(),i=e.getWidth(),a=e.getHeight(),o=0;o<a;o++)for(var s=0;s<i;s++){var l=n[o];s+6<i&&l[s]===1&&l[s+1]===0&&l[s+2]===1&&l[s+3]===1&&l[s+4]===1&&l[s+5]===0&&l[s+6]===1&&(t.isWhiteHorizontal(l,s-4,s)||t.isWhiteHorizontal(l,s+7,s+11))&&r++,o+6<a&&n[o][s]===1&&n[o+1][s]===0&&n[o+2][s]===1&&n[o+3][s]===1&&n[o+4][s]===1&&n[o+5][s]===0&&n[o+6][s]===1&&(t.isWhiteVertical(n,s,o-4,o)||t.isWhiteVertical(n,s,o+7,o+11))&&r++}return r*t.N3},t.isWhiteHorizontal=function(e,r,n){r=Math.max(r,0),n=Math.min(n,e.length);for(var i=r;i<n;i++)if(e[i]===1)return!1;return!0},t.isWhiteVertical=function(e,r,n,i){n=Math.max(n,0),i=Math.min(i,e.length);for(var a=n;a<i;a++)if(e[a][r]===1)return!1;return!0},t.applyMaskPenaltyRule4=function(e){for(var r=0,n=e.getArray(),i=e.getWidth(),a=e.getHeight(),o=0;o<a;o++)for(var s=n[o],l=0;l<i;l++)s[l]===1&&r++;var c=e.getHeight()*e.getWidth(),f=Math.floor(Math.abs(r*2-c)*10/c);return f*t.N4},t.getDataMaskBit=function(e,r,n){var i,a;switch(e){case 0:i=n+r&1;break;case 1:i=n&1;break;case 2:i=r%3;break;case 3:i=(n+r)%3;break;case 4:i=Math.floor(n/2)+Math.floor(r/3)&1;break;case 5:a=n*r,i=(a&1)+a%3;break;case 6:a=n*r,i=(a&1)+a%3&1;break;case 7:a=n*r,i=a%3+(n+r&1)&1;break;default:throw new F("Invalid mask pattern: "+e)}return i===0},t.applyMaskPenaltyRule1Internal=function(e,r){for(var n=0,i=r?e.getHeight():e.getWidth(),a=r?e.getWidth():e.getHeight(),o=e.getArray(),s=0;s<i;s++){for(var l=0,c=-1,f=0;f<a;f++){var d=r?o[s][f]:o[f][s];d===c?l++:(l>=5&&(n+=t.N1+(l-5)),l=1,c=d)}l>=5&&(n+=t.N1+(l-5))}return n},t.N1=3,t.N2=3,t.N3=40,t.N4=10,t})(),Cf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},bf=(function(){function t(e,r){this.width=e,this.height=r;for(var n=new Array(r),i=0;i!==r;i++)n[i]=new Uint8Array(e);this.bytes=n}return t.prototype.getHeight=function(){return this.height},t.prototype.getWidth=function(){return this.width},t.prototype.get=function(e,r){return this.bytes[r][e]},t.prototype.getArray=function(){return this.bytes},t.prototype.setNumber=function(e,r,n){this.bytes[r][e]=n},t.prototype.setBoolean=function(e,r,n){this.bytes[r][e]=n?1:0},t.prototype.clear=function(e){var r,n;try{for(var i=Cf(this.bytes),a=i.next();!a.done;a=i.next()){var o=a.value;De.fill(o,e)}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},t.prototype.equals=function(e){if(!(e instanceof t))return!1;var r=e;if(this.width!==r.width||this.height!==r.height)return!1;for(var n=0,i=this.height;n<i;++n)for(var a=this.bytes[n],o=r.bytes[n],s=0,l=this.width;s<l;++s)if(a[s]!==o[s])return!1;return!0},t.prototype.toString=function(){for(var e=new J,r=0,n=this.height;r<n;++r){for(var i=this.bytes[r],a=0,o=this.width;a<o;++a)switch(i[a]){case 0:e.append(" 0");break;case 1:e.append(" 1");break;default:e.append(" ");break}e.append(`
20
20
  `)}return e.toString()},t})(),Fn=(function(){function t(){this.maskPattern=-1}return t.prototype.getMode=function(){return this.mode},t.prototype.getECLevel=function(){return this.ecLevel},t.prototype.getVersion=function(){return this.version},t.prototype.getMaskPattern=function(){return this.maskPattern},t.prototype.getMatrix=function(){return this.matrix},t.prototype.toString=function(){var e=new J;return e.append(`<<
21
21
  `),e.append(" mode: "),e.append(this.mode?this.mode.toString():"null"),e.append(`
22
22
  ecLevel: `),e.append(this.ecLevel?this.ecLevel.toString():"null"),e.append(`
@@ -26,6 +26,6 @@
26
26
  `),e.append(this.matrix.toString())):e.append(`
27
27
  matrix: null
28
28
  `),e.append(`>>
29
- `),e.toString()},t.prototype.setMode=function(e){this.mode=e},t.prototype.setECLevel=function(e){this.ecLevel=e},t.prototype.setVersion=function(e){this.version=e},t.prototype.setMaskPattern=function(e){this.maskPattern=e},t.prototype.setMatrix=function(e){this.matrix=e},t.isValidMaskPattern=function(e){return e>=0&&e<t.NUM_MASK_PATTERNS},t.NUM_MASK_PATTERNS=8,t})(),Sf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),ie=(function(t){Sf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="WriterException",e})(be),$i=(function(){function t(){}return t.clearMatrix=function(e){e.clear(255)},t.buildMatrix=function(e,r,n,i,a){t.clearMatrix(a),t.embedBasicPatterns(n,a),t.embedTypeInfo(r,i,a),t.maybeEmbedVersionInfo(n,a),t.embedDataBits(e,i,a)},t.embedBasicPatterns=function(e,r){t.embedPositionDetectionPatternsAndSeparators(r),t.embedDarkDotAtLeftBottomCorner(r),t.maybeEmbedPositionAdjustmentPatterns(e,r),t.embedTimingPatterns(r)},t.embedTypeInfo=function(e,r,n){var i=new ve;t.makeTypeInfoBits(e,r,i);for(var a=0,o=i.getSize();a<o;++a){var s=i.get(i.getSize()-1-a),l=t.TYPE_INFO_COORDINATES[a],c=l[0],f=l[1];if(n.setBoolean(c,f,s),a<8){var d=n.getWidth()-a-1,p=8;n.setBoolean(d,p,s)}else{var d=8,p=n.getHeight()-7+(a-8);n.setBoolean(d,p,s)}}},t.maybeEmbedVersionInfo=function(e,r){if(!(e.getVersionNumber()<7)){var n=new ve;t.makeVersionInfoBits(e,n);for(var i=17,a=0;a<6;++a)for(var o=0;o<3;++o){var s=n.get(i);i--,r.setBoolean(a,r.getHeight()-11+o,s),r.setBoolean(r.getHeight()-11+o,a,s)}}},t.embedDataBits=function(e,r,n){for(var i=0,a=-1,o=n.getWidth()-1,s=n.getHeight()-1;o>0;){for(o===6&&(o-=1);s>=0&&s<n.getHeight();){for(var l=0;l<2;++l){var c=o-l;if(t.isEmpty(n.get(c,s))){var f=void 0;i<e.getSize()?(f=e.get(i),++i):f=!1,r!==255&&ir.getDataMaskBit(r,c,s)&&(f=!f),n.setBoolean(c,s,f)}}s+=a}a=-a,s+=a,o-=2}if(i!==e.getSize())throw new ie("Not all bits consumed: "+i+"/"+e.getSize())},t.findMSBSet=function(e){return 32-G.numberOfLeadingZeros(e)},t.calculateBCHCode=function(e,r){if(r===0)throw new F("0 polynomial");var n=t.findMSBSet(r);for(e<<=n-1;t.findMSBSet(e)>=n;)e^=r<<t.findMSBSet(e)-n;return e},t.makeTypeInfoBits=function(e,r,n){if(!Fn.isValidMaskPattern(r))throw new ie("Invalid mask pattern");var i=e.getBits()<<3|r;n.appendBits(i,5);var a=t.calculateBCHCode(i,t.TYPE_INFO_POLY);n.appendBits(a,10);var o=new ve;if(o.appendBits(t.TYPE_INFO_MASK_PATTERN,15),n.xor(o),n.getSize()!==15)throw new ie("should not happen but we got: "+n.getSize())},t.makeVersionInfoBits=function(e,r){r.appendBits(e.getVersionNumber(),6);var n=t.calculateBCHCode(e.getVersionNumber(),t.VERSION_INFO_POLY);if(r.appendBits(n,12),r.getSize()!==18)throw new ie("should not happen but we got: "+r.getSize())},t.isEmpty=function(e){return e===255},t.embedTimingPatterns=function(e){for(var r=8;r<e.getWidth()-8;++r){var n=(r+1)%2;t.isEmpty(e.get(r,6))&&e.setNumber(r,6,n),t.isEmpty(e.get(6,r))&&e.setNumber(6,r,n)}},t.embedDarkDotAtLeftBottomCorner=function(e){if(e.get(8,e.getHeight()-8)===0)throw new ie;e.setNumber(8,e.getHeight()-8,1)},t.embedHorizontalSeparationPattern=function(e,r,n){for(var i=0;i<8;++i){if(!t.isEmpty(n.get(e+i,r)))throw new ie;n.setNumber(e+i,r,0)}},t.embedVerticalSeparationPattern=function(e,r,n){for(var i=0;i<7;++i){if(!t.isEmpty(n.get(e,r+i)))throw new ie;n.setNumber(e,r+i,0)}},t.embedPositionAdjustmentPattern=function(e,r,n){for(var i=0;i<5;++i)for(var a=t.POSITION_ADJUSTMENT_PATTERN[i],o=0;o<5;++o)n.setNumber(e+o,r+i,a[o])},t.embedPositionDetectionPattern=function(e,r,n){for(var i=0;i<7;++i)for(var a=t.POSITION_DETECTION_PATTERN[i],o=0;o<7;++o)n.setNumber(e+o,r+i,a[o])},t.embedPositionDetectionPatternsAndSeparators=function(e){var r=t.POSITION_DETECTION_PATTERN[0].length;t.embedPositionDetectionPattern(0,0,e),t.embedPositionDetectionPattern(e.getWidth()-r,0,e),t.embedPositionDetectionPattern(0,e.getWidth()-r,e);var n=8;t.embedHorizontalSeparationPattern(0,n-1,e),t.embedHorizontalSeparationPattern(e.getWidth()-n,n-1,e),t.embedHorizontalSeparationPattern(0,e.getWidth()-n,e);var i=7;t.embedVerticalSeparationPattern(i,0,e),t.embedVerticalSeparationPattern(e.getHeight()-i-1,0,e),t.embedVerticalSeparationPattern(i,e.getHeight()-i,e)},t.maybeEmbedPositionAdjustmentPatterns=function(e,r){if(!(e.getVersionNumber()<2))for(var n=e.getVersionNumber()-1,i=t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[n],a=0,o=i.length;a!==o;a++){var s=i[a];if(s>=0)for(var l=0;l!==o;l++){var c=i[l];c>=0&&t.isEmpty(r.get(c,s))&&t.embedPositionAdjustmentPattern(c-2,s-2,r)}}},t.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),t.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),t.VERSION_INFO_POLY=7973,t.TYPE_INFO_POLY=1335,t.TYPE_INFO_MASK_PATTERN=21522,t})(),If=(function(){function t(e,r){this.dataBytes=e,this.errorCorrectionBytes=r}return t.prototype.getDataBytes=function(){return this.dataBytes},t.prototype.getErrorCorrectionBytes=function(){return this.errorCorrectionBytes},t})(),Hi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(){function t(){}return t.calculateMaskPenalty=function(e){return ir.applyMaskPenaltyRule1(e)+ir.applyMaskPenaltyRule2(e)+ir.applyMaskPenaltyRule3(e)+ir.applyMaskPenaltyRule4(e)},t.encode=function(e,r,n){n===void 0&&(n=null);var i=t.DEFAULT_BYTE_MODE_ENCODING,a=n!==null&&n.get(Ar.CHARACTER_SET)!==void 0;a&&(i=n.get(Ar.CHARACTER_SET).toString());var o=this.chooseMode(e,i),s=new ve;if(o===ae.BYTE&&(a||t.DEFAULT_BYTE_MODE_ENCODING!==i)){var l=de.getCharacterSetECIByName(i);l!==void 0&&this.appendECI(l,s)}this.appendModeInfo(o,s);var c=new ve;this.appendBytes(e,o,c,i);var f;if(n!==null&&n.get(Ar.QR_VERSION)!==void 0){var d=Number.parseInt(n.get(Ar.QR_VERSION).toString(),10);f=wt.getVersionForNumber(d);var p=this.calculateBitsNeeded(o,s,c,f);if(!this.willFit(p,f,r))throw new ie("Data too big for requested version")}else f=this.recommendVersion(r,o,s,c);var h=new ve;h.appendBitArray(s);var v=o===ae.BYTE?c.getSizeInBytes():e.length;this.appendLengthInfo(v,f,o,h),h.appendBitArray(c);var g=f.getECBlocksForLevel(r),y=f.getTotalCodewords()-g.getTotalECCodewords();this.terminateBits(y,h);var _=this.interleaveWithECBytes(h,f.getTotalCodewords(),y,g.getNumBlocks()),m=new Fn;m.setECLevel(r),m.setMode(o),m.setVersion(f);var E=f.getDimensionForVersion(),w=new bf(E,E),C=this.chooseMaskPattern(_,r,f,w);return m.setMaskPattern(C),$i.buildMatrix(_,r,f,C,w),m.setMatrix(w),m},t.recommendVersion=function(e,r,n,i){var a=this.calculateBitsNeeded(r,n,i,wt.getVersionForNumber(1)),o=this.chooseVersion(a,e),s=this.calculateBitsNeeded(r,n,i,o);return this.chooseVersion(s,e)},t.calculateBitsNeeded=function(e,r,n,i){return r.getSize()+e.getCharacterCountBits(i)+n.getSize()},t.getAlphanumericCode=function(e){return e<t.ALPHANUMERIC_TABLE.length?t.ALPHANUMERIC_TABLE[e]:-1},t.chooseMode=function(e,r){if(r===void 0&&(r=null),de.SJIS.getName()===r&&this.isOnlyDoubleByteKanji(e))return ae.KANJI;for(var n=!1,i=!1,a=0,o=e.length;a<o;++a){var s=e.charAt(a);if(t.isDigit(s))n=!0;else if(this.getAlphanumericCode(s.charCodeAt(0))!==-1)i=!0;else return ae.BYTE}return i?ae.ALPHANUMERIC:n?ae.NUMERIC:ae.BYTE},t.isOnlyDoubleByteKanji=function(e){var r;try{r=je.encode(e,de.SJIS)}catch{return!1}var n=r.length;if(n%2!==0)return!1;for(var i=0;i<n;i+=2){var a=r[i]&255;if((a<129||a>159)&&(a<224||a>235))return!1}return!0},t.chooseMaskPattern=function(e,r,n,i){for(var a=Number.MAX_SAFE_INTEGER,o=-1,s=0;s<Fn.NUM_MASK_PATTERNS;s++){$i.buildMatrix(e,r,n,s,i);var l=this.calculateMaskPenalty(i);l<a&&(a=l,o=s)}return o},t.chooseVersion=function(e,r){for(var n=1;n<=40;n++){var i=wt.getVersionForNumber(n);if(t.willFit(e,i,r))return i}throw new ie("Data too big")},t.willFit=function(e,r,n){var i=r.getTotalCodewords(),a=r.getECBlocksForLevel(n),o=a.getTotalECCodewords(),s=i-o,l=(e+7)/8;return s>=l},t.terminateBits=function(e,r){var n=e*8;if(r.getSize()>n)throw new ie("data bits cannot fit in the QR Code"+r.getSize()+" > "+n);for(var i=0;i<4&&r.getSize()<n;++i)r.appendBit(!1);var a=r.getSize()&7;if(a>0)for(var i=a;i<8;i++)r.appendBit(!1);for(var o=e-r.getSizeInBytes(),i=0;i<o;++i)r.appendBits((i&1)===0?236:17,8);if(r.getSize()!==n)throw new ie("Bits size does not equal capacity")},t.getNumDataBytesAndNumECBytesForBlockID=function(e,r,n,i,a,o){if(i>=n)throw new ie("Block ID too large");var s=e%n,l=n-s,c=Math.floor(e/n),f=c+1,d=Math.floor(r/n),p=d+1,h=c-d,v=f-p;if(h!==v)throw new ie("EC bytes mismatch");if(n!==l+s)throw new ie("RS blocks mismatch");if(e!==(d+h)*l+(p+v)*s)throw new ie("Total bytes mismatch");i<l?(a[0]=d,o[0]=h):(a[0]=p,o[0]=v)},t.interleaveWithECBytes=function(e,r,n,i){var a,o,s,l;if(e.getSizeInBytes()!==n)throw new ie("Number of bits and data bytes does not match");for(var c=0,f=0,d=0,p=new Array,h=0;h<i;++h){var v=new Int32Array(1),g=new Int32Array(1);t.getNumDataBytesAndNumECBytesForBlockID(r,n,i,h,v,g);var y=v[0],_=new Uint8Array(y);e.toBytes(8*c,_,0,y);var m=t.generateECBytes(_,g[0]);p.push(new If(_,m)),f=Math.max(f,y),d=Math.max(d,m.length),c+=v[0]}if(n!==c)throw new ie("Data bytes does not match offset");for(var E=new ve,h=0;h<f;++h)try{for(var w=(a=void 0,Hi(p)),C=w.next();!C.done;C=w.next()){var b=C.value,_=b.getDataBytes();h<_.length&&E.appendBits(_[h],8)}}catch(L){a={error:L}}finally{try{C&&!C.done&&(o=w.return)&&o.call(w)}finally{if(a)throw a.error}}for(var h=0;h<d;++h)try{for(var O=(s=void 0,Hi(p)),P=O.next();!P.done;P=O.next()){var b=P.value,m=b.getErrorCorrectionBytes();h<m.length&&E.appendBits(m[h],8)}}catch(L){s={error:L}}finally{try{P&&!P.done&&(l=O.return)&&l.call(O)}finally{if(s)throw s.error}}if(r!==E.getSizeInBytes())throw new ie("Interleaving error: "+r+" and "+E.getSizeInBytes()+" differ.");return E},t.generateECBytes=function(e,r){for(var n=e.length,i=new Int32Array(n+r),a=0;a<n;a++)i[a]=e[a]&255;new _a(Ne.QR_CODE_FIELD_256).encode(i,r);for(var o=new Uint8Array(r),a=0;a<r;a++)o[a]=i[n+a];return o},t.appendModeInfo=function(e,r){r.appendBits(e.getBits(),4)},t.appendLengthInfo=function(e,r,n,i){var a=n.getCharacterCountBits(r);if(e>=1<<a)throw new ie(e+" is bigger than "+((1<<a)-1));i.appendBits(e,a)},t.appendBytes=function(e,r,n,i){switch(r){case ae.NUMERIC:t.appendNumericBytes(e,n);break;case ae.ALPHANUMERIC:t.appendAlphanumericBytes(e,n);break;case ae.BYTE:t.append8BitBytes(e,n,i);break;case ae.KANJI:t.appendKanjiBytes(e,n);break;default:throw new ie("Invalid mode: "+r)}},t.getDigit=function(e){return e.charCodeAt(0)-48},t.isDigit=function(e){var r=t.getDigit(e);return r>=0&&r<=9},t.appendNumericBytes=function(e,r){for(var n=e.length,i=0;i<n;){var a=t.getDigit(e.charAt(i));if(i+2<n){var o=t.getDigit(e.charAt(i+1)),s=t.getDigit(e.charAt(i+2));r.appendBits(a*100+o*10+s,10),i+=3}else if(i+1<n){var o=t.getDigit(e.charAt(i+1));r.appendBits(a*10+o,7),i+=2}else r.appendBits(a,4),i++}},t.appendAlphanumericBytes=function(e,r){for(var n=e.length,i=0;i<n;){var a=t.getAlphanumericCode(e.charCodeAt(i));if(a===-1)throw new ie;if(i+1<n){var o=t.getAlphanumericCode(e.charCodeAt(i+1));if(o===-1)throw new ie;r.appendBits(a*45+o,11),i+=2}else r.appendBits(a,6),i++}},t.append8BitBytes=function(e,r,n){var i;try{i=je.encode(e,n)}catch(l){throw new ie(l)}for(var a=0,o=i.length;a!==o;a++){var s=i[a];r.appendBits(s,8)}},t.appendKanjiBytes=function(e,r){var n;try{n=je.encode(e,de.SJIS)}catch(d){throw new ie(d)}for(var i=n.length,a=0;a<i;a+=2){var o=n[a]&255,s=n[a+1]&255,l=o<<8&4294967295|s,c=-1;if(l>=33088&&l<=40956?c=l-33088:l>=57408&&l<=60351&&(c=l-49472),c===-1)throw new ie("Invalid byte sequence");var f=(c>>8)*192+(c&255);r.appendBits(f,13)}},t.appendECI=function(e,r){r.appendBits(ae.ECI.getBits(),4),r.appendBits(e.getValue(),8)},t.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),t.DEFAULT_BYTE_MODE_ENCODING=de.UTF8.getName(),t})();var Of=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();(function(t){Of(e,t);function e(r,n,i,a,o,s,l,c){var f=t.call(this,s,l)||this;if(f.yuvData=r,f.dataWidth=n,f.dataHeight=i,f.left=a,f.top=o,a+s>n||o+l>i)throw new F("Crop rectangle does not fit within image data.");return c&&f.reverseHorizontal(s,l),f}return e.prototype.getRow=function(r,n){if(r<0||r>=this.getHeight())throw new F("Requested row is outside the image: "+r);var i=this.getWidth();(n==null||n.length<i)&&(n=new Uint8ClampedArray(i));var a=(r+this.top)*this.dataWidth+this.left;return ne.arraycopy(this.yuvData,a,n,0,i),n},e.prototype.getMatrix=function(){var r=this.getWidth(),n=this.getHeight();if(r===this.dataWidth&&n===this.dataHeight)return this.yuvData;var i=r*n,a=new Uint8ClampedArray(i),o=this.top*this.dataWidth+this.left;if(r===this.dataWidth)return ne.arraycopy(this.yuvData,o,a,0,i),a;for(var s=0;s<n;s++){var l=s*r;ne.arraycopy(this.yuvData,o,a,l,r),o+=this.dataWidth}return a},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(r,n,i,a){return new e(this.yuvData,this.dataWidth,this.dataHeight,this.left+r,this.top+n,i,a,!1)},e.prototype.renderThumbnail=function(){for(var r=this.getWidth()/e.THUMBNAIL_SCALE_FACTOR,n=this.getHeight()/e.THUMBNAIL_SCALE_FACTOR,i=new Int32Array(r*n),a=this.yuvData,o=this.top*this.dataWidth+this.left,s=0;s<n;s++){for(var l=s*r,c=0;c<r;c++){var f=a[o+c*e.THUMBNAIL_SCALE_FACTOR]&255;i[l+c]=4278190080|f*65793}o+=this.dataWidth*e.THUMBNAIL_SCALE_FACTOR}return i},e.prototype.getThumbnailWidth=function(){return this.getWidth()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.getThumbnailHeight=function(){return this.getHeight()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.reverseHorizontal=function(r,n){for(var i=this.yuvData,a=0,o=this.top*this.dataWidth+this.left;a<n;a++,o+=this.dataWidth)for(var s=o+r/2,l=o,c=o+r-1;l<s;l++,c--){var f=i[l];i[l]=i[c],i[c]=f}},e.prototype.invert=function(){return new Xn(this)},e.THUMBNAIL_SCALE_FACTOR=2,e})(zr);var Tf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();(function(t){Tf(e,t);function e(r,n,i,a,o,s,l){var c=t.call(this,n,i)||this;if(c.dataWidth=a,c.dataHeight=o,c.left=s,c.top=l,r.BYTES_PER_ELEMENT===4){for(var f=n*i,d=new Uint8ClampedArray(f),p=0;p<f;p++){var h=r[p],v=h>>16&255,g=h>>7&510,y=h&255;d[p]=(v+g+y)/4&255}c.luminances=d}else c.luminances=r;if(a===void 0&&(c.dataWidth=n),o===void 0&&(c.dataHeight=i),s===void 0&&(c.left=0),l===void 0&&(c.top=0),c.left+n>c.dataWidth||c.top+i>c.dataHeight)throw new F("Crop rectangle does not fit within image data.");return c}return e.prototype.getRow=function(r,n){if(r<0||r>=this.getHeight())throw new F("Requested row is outside the image: "+r);var i=this.getWidth();(n==null||n.length<i)&&(n=new Uint8ClampedArray(i));var a=(r+this.top)*this.dataWidth+this.left;return ne.arraycopy(this.luminances,a,n,0,i),n},e.prototype.getMatrix=function(){var r=this.getWidth(),n=this.getHeight();if(r===this.dataWidth&&n===this.dataHeight)return this.luminances;var i=r*n,a=new Uint8ClampedArray(i),o=this.top*this.dataWidth+this.left;if(r===this.dataWidth)return ne.arraycopy(this.luminances,o,a,0,i),a;for(var s=0;s<n;s++){var l=s*r;ne.arraycopy(this.luminances,o,a,l,r),o+=this.dataWidth}return a},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(r,n,i,a){return new e(this.luminances,i,a,this.dataWidth,this.dataHeight,this.left+r,this.top+n)},e.prototype.invert=function(){return new Xn(this)},e})(zr);var Nf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();(function(t){Nf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.forName=function(r){return this.getCharacterSetECIByName(r)},e})(de);(function(){function t(){}return t.ISO_8859_1=de.ISO8859_1,t})();var Df=(function(){function t(){}return t.prototype.isCompact=function(){return this.compact},t.prototype.setCompact=function(e){this.compact=e},t.prototype.getSize=function(){return this.size},t.prototype.setSize=function(e){this.size=e},t.prototype.getLayers=function(){return this.layers},t.prototype.setLayers=function(e){this.layers=e},t.prototype.getCodeWords=function(){return this.codeWords},t.prototype.setCodeWords=function(e){this.codeWords=e},t.prototype.getMatrix=function(){return this.matrix},t.prototype.setMatrix=function(e){this.matrix=e},t})(),Gi=(function(){function t(){}return t.singletonList=function(e){return[e]},t.min=function(e,r){return e.sort(r)[0]},t})(),Bf=(function(){function t(e){this.previous=e}return t.prototype.getPrevious=function(){return this.previous},t})(),Rf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),Zn=(function(t){Rf(e,t);function e(r,n,i){var a=t.call(this,r)||this;return a.value=n,a.bitCount=i,a}return e.prototype.appendTo=function(r,n){r.appendBits(this.value,this.bitCount)},e.prototype.add=function(r,n){return new e(this,r,n)},e.prototype.addBinaryShift=function(r,n){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new e(this,r,n)},e.prototype.toString=function(){var r=this.value&(1<<this.bitCount)-1;return r|=1<<this.bitCount,"<"+G.toBinaryString(r|1<<this.bitCount).substring(1)+">"},e})(Bf),Pf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),kf=(function(t){Pf(e,t);function e(r,n,i){var a=t.call(this,r,0,0)||this;return a.binaryShiftStart=n,a.binaryShiftByteCount=i,a}return e.prototype.appendTo=function(r,n){for(var i=0;i<this.binaryShiftByteCount;i++)(i===0||i===31&&this.binaryShiftByteCount<=62)&&(r.appendBits(31,5),this.binaryShiftByteCount>62?r.appendBits(this.binaryShiftByteCount-31,16):i===0?r.appendBits(Math.min(this.binaryShiftByteCount,31),5):r.appendBits(this.binaryShiftByteCount-31,5)),r.appendBits(n[this.binaryShiftStart+i],8)},e.prototype.addBinaryShift=function(r,n){return new e(this,r,n)},e.prototype.toString=function(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"},e})(Zn);function Mf(t,e,r){return new kf(t,e,r)}function qt(t,e,r){return new Zn(t,e,r)}var Lf=["UPPER","LOWER","DIGIT","MIXED","PUNCT"],ft=0,Fr=1,Me=2,Ea=3,Ke=4,Ff=new Zn(null,0,0),vn=[Int32Array.from([0,(5<<16)+28,(5<<16)+30,(5<<16)+29,656318]),Int32Array.from([(9<<16)+480+14,0,(5<<16)+30,(5<<16)+29,656318]),Int32Array.from([(4<<16)+14,(9<<16)+448+28,0,(9<<16)+448+29,932798]),Int32Array.from([(5<<16)+29,(5<<16)+28,656318,0,(5<<16)+30]),Int32Array.from([(5<<16)+31,656380,656382,656381,0])],Vf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Uf(t){var e,r;try{for(var n=Vf(t),i=n.next();!i.done;i=n.next()){var a=i.value;De.fill(a,-1)}}catch(o){e={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return t[ft][Ke]=0,t[Fr][Ke]=0,t[Fr][ft]=28,t[Ea][Ke]=0,t[Me][Ke]=0,t[Me][ft]=15,t}var Aa=Uf(De.createInt32Array(6,6)),$f=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Hf=(function(){function t(e,r,n,i){this.token=e,this.mode=r,this.binaryShiftByteCount=n,this.bitCount=i}return t.prototype.getMode=function(){return this.mode},t.prototype.getToken=function(){return this.token},t.prototype.getBinaryShiftByteCount=function(){return this.binaryShiftByteCount},t.prototype.getBitCount=function(){return this.bitCount},t.prototype.latchAndAppend=function(e,r){var n=this.bitCount,i=this.token;if(e!==this.mode){var a=vn[this.mode][e];i=qt(i,a&65535,a>>16),n+=a>>16}var o=e===Me?4:5;return i=qt(i,r,o),new t(i,e,0,n+o)},t.prototype.shiftAndAppend=function(e,r){var n=this.token,i=this.mode===Me?4:5;return n=qt(n,Aa[this.mode][e],i),n=qt(n,r,5),new t(n,this.mode,0,this.bitCount+i+5)},t.prototype.addBinaryShiftChar=function(e){var r=this.token,n=this.mode,i=this.bitCount;if(this.mode===Ke||this.mode===Me){var a=vn[n][ft];r=qt(r,a&65535,a>>16),i+=a>>16,n=ft}var o=this.binaryShiftByteCount===0||this.binaryShiftByteCount===31?18:this.binaryShiftByteCount===62?9:8,s=new t(r,n,this.binaryShiftByteCount+1,i+o);return s.binaryShiftByteCount===2078&&(s=s.endBinaryShift(e+1)),s},t.prototype.endBinaryShift=function(e){if(this.binaryShiftByteCount===0)return this;var r=this.token;return r=Mf(r,e-this.binaryShiftByteCount,this.binaryShiftByteCount),new t(r,this.mode,0,this.bitCount)},t.prototype.isBetterThanOrEqualTo=function(e){var r=this.bitCount+(vn[this.mode][e.mode]>>16);return this.binaryShiftByteCount<e.binaryShiftByteCount?r+=t.calculateBinaryShiftCost(e)-t.calculateBinaryShiftCost(this):this.binaryShiftByteCount>e.binaryShiftByteCount&&e.binaryShiftByteCount>0&&(r+=10),r<=e.bitCount},t.prototype.toBitArray=function(e){for(var r,n,i=[],a=this.endBinaryShift(e.length).token;a!==null;a=a.getPrevious())i.unshift(a);var o=new ve;try{for(var s=$f(i),l=s.next();!l.done;l=s.next()){var c=l.value;c.appendTo(o,e)}}catch(f){r={error:f}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o},t.prototype.toString=function(){return re.format("%s bits=%d bytes=%d",Lf[this.mode],this.bitCount,this.binaryShiftByteCount)},t.calculateBinaryShiftCost=function(e){return e.binaryShiftByteCount>62?21:e.binaryShiftByteCount>31?20:e.binaryShiftByteCount>0?10:0},t.INITIAL_STATE=new t(Ff,ft,0,0),t})();function Gf(t){var e=re.getCharCode(" "),r=re.getCharCode("."),n=re.getCharCode(",");t[ft][e]=1;for(var i=re.getCharCode("Z"),a=re.getCharCode("A"),o=a;o<=i;o++)t[ft][o]=o-a+2;t[Fr][e]=1;for(var s=re.getCharCode("z"),l=re.getCharCode("a"),o=l;o<=s;o++)t[Fr][o]=o-l+2;t[Me][e]=1;for(var c=re.getCharCode("9"),f=re.getCharCode("0"),o=f;o<=c;o++)t[Me][o]=o-f+2;t[Me][n]=12,t[Me][r]=13;for(var d=["\0"," ","","","","","","","\x07","\b"," ",`
30
- `,"\v","\f","\r","\x1B","","","","","@","\\","^","_","`","|","~",""],p=0;p<d.length;p++)t[Ea][re.getCharCode(d[p])]=p;for(var h=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"],p=0;p<h.length;p++)re.getCharCode(h[p])>0&&(t[Ke][re.getCharCode(h[p])]=p);return t}var gn=Gf(De.createInt32Array(5,256)),Cr=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},zf=(function(){function t(e){this.text=e}return t.prototype.encode=function(){for(var e=re.getCharCode(" "),r=re.getCharCode(`
31
- `),n=Gi.singletonList(Hf.INITIAL_STATE),i=0;i<this.text.length;i++){var a=void 0,o=i+1<this.text.length?this.text[i+1]:0;switch(this.text[i]){case re.getCharCode("\r"):a=o===r?2:0;break;case re.getCharCode("."):a=o===e?3:0;break;case re.getCharCode(","):a=o===e?4:0;break;case re.getCharCode(":"):a=o===e?5:0;break;default:a=0}a>0?(n=t.updateStateListForPair(n,i,a),i++):n=this.updateStateListForChar(n,i)}var s=Gi.min(n,function(l,c){return l.getBitCount()-c.getBitCount()});return s.toBitArray(this.text)},t.prototype.updateStateListForChar=function(e,r){var n,i,a=[];try{for(var o=Cr(e),s=o.next();!s.done;s=o.next()){var l=s.value;this.updateStateForChar(l,r,a)}}catch(c){n={error:c}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return t.simplifyStates(a)},t.prototype.updateStateForChar=function(e,r,n){for(var i=this.text[r]&255,a=gn[e.getMode()][i]>0,o=null,s=0;s<=Ke;s++){var l=gn[s][i];if(l>0){if(o==null&&(o=e.endBinaryShift(r)),!a||s===e.getMode()||s===Me){var c=o.latchAndAppend(s,l);n.push(c)}if(!a&&Aa[e.getMode()][s]>=0){var f=o.shiftAndAppend(s,l);n.push(f)}}}if(e.getBinaryShiftByteCount()>0||gn[e.getMode()][i]===0){var d=e.addBinaryShiftChar(r);n.push(d)}},t.updateStateListForPair=function(e,r,n){var i,a,o=[];try{for(var s=Cr(e),l=s.next();!l.done;l=s.next()){var c=l.value;this.updateStateForPair(c,r,n,o)}}catch(f){i={error:f}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}return this.simplifyStates(o)},t.updateStateForPair=function(e,r,n,i){var a=e.endBinaryShift(r);if(i.push(a.latchAndAppend(Ke,n)),e.getMode()!==Ke&&i.push(a.shiftAndAppend(Ke,n)),n===3||n===4){var o=a.latchAndAppend(Me,16-n).latchAndAppend(Me,1);i.push(o)}if(e.getBinaryShiftByteCount()>0){var s=e.addBinaryShiftChar(r).addBinaryShiftChar(r+1);i.push(s)}},t.simplifyStates=function(e){var r,n,i,a,o=[];try{for(var s=Cr(e),l=s.next();!l.done;l=s.next()){var c=l.value,f=!0,d=function(y){if(y.isBetterThanOrEqualTo(c))return f=!1,"break";c.isBetterThanOrEqualTo(y)&&(o=o.filter(function(_){return _!==y}))};try{for(var p=(i=void 0,Cr(o)),h=p.next();!h.done;h=p.next()){var v=h.value,g=d(v);if(g==="break")break}}catch(y){i={error:y}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}f&&o.push(c)}}catch(y){r={error:y}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o},t})(),Wf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(){function t(){}return t.encodeBytes=function(e){return t.encode(e,t.DEFAULT_EC_PERCENT,t.DEFAULT_AZTEC_LAYERS)},t.encode=function(e,r,n){var i=new zf(e).encode(),a=G.truncDivision(i.getSize()*r,100)+11,o=i.getSize()+a,s,l,c,f,d;if(n!==t.DEFAULT_AZTEC_LAYERS){if(s=n<0,l=Math.abs(n),l>(s?t.MAX_NB_BITS_COMPACT:t.MAX_NB_BITS))throw new F(re.format("Illegal value %s for layers",n));c=t.totalBitsInLayer(l,s),f=t.WORD_SIZE[l];var p=c-c%f;if(d=t.stuffBits(i,f),d.getSize()+a>p)throw new F("Data to large for user specified layer");if(s&&d.getSize()>f*64)throw new F("Data to large for user specified layer")}else{f=0,d=null;for(var h=0;;h++){if(h>t.MAX_NB_BITS)throw new F("Data too large for an Aztec code");if(s=h<=3,l=s?h+1:h,c=t.totalBitsInLayer(l,s),!(o>c)){(d==null||f!==t.WORD_SIZE[l])&&(f=t.WORD_SIZE[l],d=t.stuffBits(i,f));var p=c-c%f;if(!(s&&d.getSize()>f*64)&&d.getSize()+a<=p)break}}}var v=t.generateCheckWords(d,c,f),g=d.getSize()/f,y=t.generateModeMessage(s,l,g),_=(s?11:14)+l*4,m=new Int32Array(_),E;if(s){E=_;for(var h=0;h<m.length;h++)m[h]=h}else{E=_+1+2*G.truncDivision(G.truncDivision(_,2)-1,15);for(var w=G.truncDivision(_,2),C=G.truncDivision(E,2),h=0;h<w;h++){var b=h+G.truncDivision(h,15);m[w-h-1]=C-b-1,m[w+h]=C+b+1}}for(var O=new qe(E),h=0,P=0;h<l;h++){for(var H=(l-h)*4+(s?9:12),L=0;L<H;L++)for(var te=L*2,V=0;V<2;V++)v.get(P+te+V)&&O.set(m[h*2+V],m[h*2+L]),v.get(P+H*2+te+V)&&O.set(m[h*2+L],m[_-1-h*2-V]),v.get(P+H*4+te+V)&&O.set(m[_-1-h*2-V],m[_-1-h*2-L]),v.get(P+H*6+te+V)&&O.set(m[_-1-h*2-L],m[h*2+V]);P+=H*8}if(t.drawModeMessage(O,s,E,y),s)t.drawBullsEye(O,G.truncDivision(E,2),5);else{t.drawBullsEye(O,G.truncDivision(E,2),7);for(var h=0,L=0;h<G.truncDivision(_,2)-1;h+=15,L+=16)for(var V=G.truncDivision(E,2)&1;V<E;V+=2)O.set(G.truncDivision(E,2)-L,V),O.set(G.truncDivision(E,2)+L,V),O.set(V,G.truncDivision(E,2)-L),O.set(V,G.truncDivision(E,2)+L)}var z=new Df;return z.setCompact(s),z.setSize(E),z.setLayers(l),z.setCodeWords(g),z.setMatrix(O),z},t.drawBullsEye=function(e,r,n){for(var i=0;i<n;i+=2)for(var a=r-i;a<=r+i;a++)e.set(a,r-i),e.set(a,r+i),e.set(r-i,a),e.set(r+i,a);e.set(r-n,r-n),e.set(r-n+1,r-n),e.set(r-n,r-n+1),e.set(r+n,r-n),e.set(r+n,r-n+1),e.set(r+n,r+n-1)},t.generateModeMessage=function(e,r,n){var i=new ve;return e?(i.appendBits(r-1,2),i.appendBits(n-1,6),i=t.generateCheckWords(i,28,4)):(i.appendBits(r-1,5),i.appendBits(n-1,11),i=t.generateCheckWords(i,40,4)),i},t.drawModeMessage=function(e,r,n,i){var a=G.truncDivision(n,2);if(r)for(var o=0;o<7;o++){var s=a-3+o;i.get(o)&&e.set(s,a-5),i.get(o+7)&&e.set(a+5,s),i.get(20-o)&&e.set(s,a+5),i.get(27-o)&&e.set(a-5,s)}else for(var o=0;o<10;o++){var s=a-5+o+G.truncDivision(o,5);i.get(o)&&e.set(s,a-7),i.get(o+10)&&e.set(a+7,s),i.get(29-o)&&e.set(s,a+7),i.get(39-o)&&e.set(a-7,s)}},t.generateCheckWords=function(e,r,n){var i,a,o=e.getSize()/n,s=new _a(t.getGF(n)),l=G.truncDivision(r,n),c=t.bitsToWords(e,n,l);s.encode(c,l-o);var f=r%n,d=new ve;d.appendBits(0,f);try{for(var p=Wf(Array.from(c)),h=p.next();!h.done;h=p.next()){var v=h.value;d.appendBits(v,n)}}catch(g){i={error:g}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}return d},t.bitsToWords=function(e,r,n){var i=new Int32Array(n),a,o;for(a=0,o=e.getSize()/r;a<o;a++){for(var s=0,l=0;l<r;l++)s|=e.get(a*r+l)?1<<r-l-1:0;i[a]=s}return i},t.getGF=function(e){switch(e){case 4:return Ne.AZTEC_PARAM;case 6:return Ne.AZTEC_DATA_6;case 8:return Ne.AZTEC_DATA_8;case 10:return Ne.AZTEC_DATA_10;case 12:return Ne.AZTEC_DATA_12;default:throw new F("Unsupported word size "+e)}},t.stuffBits=function(e,r){for(var n=new ve,i=e.getSize(),a=(1<<r)-2,o=0;o<i;o+=r){for(var s=0,l=0;l<r;l++)(o+l>=i||e.get(o+l))&&(s|=1<<r-1-l);(s&a)===a?(n.appendBits(s&a,r),o--):(s&a)===0?(n.appendBits(s|1,r),o--):n.appendBits(s,r)}return n},t.totalBitsInLayer=function(e,r){return((r?88:112)+16*e)*e},t.DEFAULT_EC_PERCENT=33,t.DEFAULT_AZTEC_LAYERS=0,t.MAX_NB_BITS=32,t.MAX_NB_BITS_COMPACT=4,t.WORD_SIZE=Int32Array.from([4,6,6,8,8,8,8,8,8,10,10,10,10,10,10,10,10,10,10,10,10,10,10,12,12,12,12,12,12,12,12,12,12]),t})();const Xf={name:"stream-barcode-reader",data(){return{isLoading:!0,codeReader:new _f,isMediaStreamAPISupported:navigator&&navigator.mediaDevices&&"enumerateDevices"in navigator.mediaDevices}},mounted(){if(!this.isMediaStreamAPISupported)throw new be("Media Stream API is not supported");this.start(),this.$refs.scanner.oncanplay=t=>{this.isLoading=!1,this.$emit("loaded")}},beforeUnmount(){this.codeReader.reset()},methods:{start(){this.codeReader.decodeFromVideoDevice(void 0,this.$refs.scanner,(t,e)=>{t&&(this.$emit("decode",t.text),this.$emit("result",t))})}}},Kf={class:"scanner-container"},jf={poster:"data:image/gif,AAAA",ref:"scanner"};function Yf(t,e,r,n,i,a){return u.openBlock(),u.createElementBlock("div",Kf,[u.withDirectives(u.createElementVNode("div",null,[u.createElementVNode("video",jf,null,512),e[0]||(e[0]=u.createElementVNode("div",{class:"overlay-element"},null,-1)),e[1]||(e[1]=u.createElementVNode("div",{class:"laser"},null,-1))],512),[[u.vShow,!i.isLoading]])])}const qf=Mt(Xf,[["render",Yf],["__scopeId","data-v-3b725b25"]]),Zf={key:0,class:"scanner-modal"},Qf={class:"scanner-header"},Jf={class:"scanner-title"},e0={key:0,class:"scanner-subtitle"},t0={class:"scanner-stream"},r0={class:"scanner-overlay"},n0={key:0,class:"scanner-slot"},i0={class:"scanner-manual"},a0={key:0},o0=u.defineComponent({__name:"DsgBarcodeScanner",props:{failTitle:{},failSubtitle:{},onScan:{type:Function}},setup(t,{expose:e}){const r=t,n=u.ref(!1),i=u.ref(""),a=u.ref("");u.ref(null);const o=u.ref(""),s=u.ref(!1),l=u.ref(!1),c=u.ref(!1),f=u.ref(r.failTitle??"Scan Failed"),d=u.ref(r.failSubtitle??"Please try again or enter the barcode manually."),p=u.ref(null),h={theme:"error",type:"light",size:"lg",icon:{icon:"alert-circle",size:"sm",color:"currentColor",classes:""},classes:""};u.watch(()=>r.failTitle,V=>{V&&(f.value=V)}),u.watch(()=>r.failSubtitle,V=>{V&&(d.value=V)});const v={label:"Re-scan",theme:"destructive"},g={label:"Input manually",theme:"gray"};function y(V){i.value=V.title,a.value=V.subtitle??"",o.value="",s.value=!1,n.value=!0}function _(V){C({type:"scanned",value:V})}function m(){o.value.trim()&&(E(),C({type:"manual",value:o.value.trim()}))}function E(){s.value=!s.value,s.value&&(o.value="")}function w(){C({type:"cancelled"})}function C(V){console.log("Scan result:",V),r.onScan&&r.onScan(V)}function b(){n.value=!1}function O(){l.value=!0,setTimeout(()=>{l.value=!1},3e3)}function P(){p.value?.open()}function H(){c.value=!0}function L(){c.value=!1}e({scan:y,close:b,success:O,error:P,showSlot:H,hideSlot:L});const te=()=>{document.documentElement.style.setProperty("--vh",`${window.innerHeight*.01}px`)};return u.onMounted(()=>{te(),window.addEventListener("resize",te)}),u.onBeforeUnmount(()=>{window.removeEventListener("resize",te)}),(V,z)=>(u.openBlock(),u.createBlock(u.Teleport,{to:"body"},[n.value?(u.openBlock(),u.createElementBlock("div",Zf,[u.createVNode(ca,{ref_key:"modalRef",ref:p,title:f.value,description:d.value,miscIcon:h,onClose:w,footerType:"vertical",primaryButton:v,secondaryButton:g,onPrimaryButtonClicked:z[0]||(z[0]=he=>{p.value?.close()}),onSecondaryButtonClicked:z[1]||(z[1]=he=>{E(),p.value?.close()}),width:500},null,8,["title","description"]),u.createElementVNode("div",Qf,[u.createElementVNode("div",null,[u.createElementVNode("h2",Jf,u.toDisplayString(i.value),1),a.value?(u.openBlock(),u.createElementBlock("p",e0,u.toDisplayString(a.value),1)):u.createCommentVNode("",!0)]),u.createElementVNode("button",{class:"scanner-close",onClick:w,"aria-label":"Close"},"×")]),u.createElementVNode("div",t0,[u.createVNode(u.unref(qf),{class:"scanner-video",onDecode:_}),u.createElementVNode("div",r0,[c.value?(u.openBlock(),u.createElementBlock("div",n0,[u.renderSlot(V.$slots,"default",{},void 0,!0)])):u.createCommentVNode("",!0),u.createElementVNode("div",i0,[s.value?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("span",a0,"No barcode?")),s.value?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(M._sfc_main$3,{key:1,label:"Input manually",onClick:E,"icon-before":"pencil-01",theme:"gray-secondary"})),s.value?(u.openBlock(),u.createBlock(M._sfc_main$4,{key:2,modelValue:o.value,"onUpdate:modelValue":z[2]||(z[2]=he=>o.value=he),placeholder:"Enter barcode manually",class:"w-full"},null,8,["modelValue"])):u.createCommentVNode("",!0),s.value?(u.openBlock(),u.createBlock(M._sfc_main$3,{key:3,label:"Submit",onClick:m,"icon-before":"check",theme:"gray-secondary"})):u.createCommentVNode("",!0)]),l.value?(u.openBlock(),u.createBlock(M._sfc_main,{key:1,icon:"check",size:"3xl",class:"scanner-success"})):u.createCommentVNode("",!0)])])])):u.createCommentVNode("",!0)]))}}),s0=Mt(o0,[["__scopeId","data-v-f9dfc5f7"]]),Ca=u.defineComponent({__name:"DsgCard",props:{variant:{default:"default"},hoverable:{type:Boolean,default:!1},classes:{default:""}},setup(t){return(e,r)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-card",[`dsg-card--${e.variant}`,{"dsg-card--hoverable":e.hoverable},e.classes]])},[u.renderSlot(e.$slots,"default")],2))}}),l0=u.defineComponent({__name:"DsgCardContainer",props:{columns:{default:1},gap:{},items:{},itemKey:{default:null},cardProps:{default:()=>({})}},setup(t){return(e,r)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-card-container",`dsg-card-container--cols-${e.columns} dsg-card-container--gap-${e.gap}`])},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(e.items,(n,i)=>(u.openBlock(),u.createBlock(Ca,u.mergeProps({key:e.itemKey?n[e.itemKey]:i},{ref_for:!0},e.cardProps),{default:u.withCtx(()=>[u.renderSlot(e.$slots,"default",{item:n,index:i})]),_:2},1040))),128))],2))}}),u0={key:1},c0=u.defineComponent({__name:"DsgBreadcrumb",props:{breadcrumbs:{default:()=>[]},divider:{default:()=>({icon:"slash-divider",size:"sm",classes:""})},theme:{default:"text"}},setup(t){return(e,r)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-breadcrumbs","dsg-breadcrumbs"])},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(e.breadcrumbs,(n,i)=>(u.openBlock(),u.createElementBlock(u.Fragment,{key:`breadcrumb-item-${i}`},[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(n.url??!1?"a":"span"),{href:n.url??null,disabled:n.disabled,class:u.normalizeClass(["dsg-breadcrumbs__button-base",`dsg-breadcrumbs__button-base--${e.theme}`,`${n.active??i===e.breadcrumbs.length-1?"dsg-breadcrumbs__button-base--active":""}`].join(" "))},{default:u.withCtx(()=>[n.icon&&n.useIcon?(u.openBlock(),u.createBlock(M._sfc_main,{key:0,icon:n.icon,size:"sm",classes:"dsg-breadcrumbs__icon"},null,8,["icon"])):(u.openBlock(),u.createElementBlock("span",u0,u.toDisplayString(n.label),1))]),_:2},1032,["href","disabled","class"])),i<e.breadcrumbs.length-1?(u.openBlock(),u.createBlock(M._sfc_main,u.mergeProps({key:0,ref_for:!0},e.divider,{class:"dsg-breadcrumbs__divider"}),null,16)):u.createCommentVNode("",!0)],64))),128))]))}}),f0=Mt(c0,[["__scopeId","data-v-8f108e12"]]),d0={class:"dsg-tab--mobile"},h0={"aria-label":"Select a tab",class:"dsg-tab--mobile-select"},p0=["selected","textContent"],v0={class:"dsg-tab--desktop"},g0={class:"dsg-tab--desktop-wrapper"},x0=["href","onClick","aria-current"],y0=["textContent"],m0={key:0,class:"dsg-tab--content"},w0=u.defineComponent({__name:"DsgTab",props:{tabs:{default:()=>[]},style:{default:"tabs"},preventVisits:{type:Boolean,default:!0},useWindowLocation:{type:Boolean,default:!1},replaceState:{type:Boolean,default:!1},replaceStrategy:{default:"window"},useSlots:{type:Boolean,default:!1},selfUpdate:{type:Boolean,default:!0},teleportSlotTo:{}},emits:["tab-clicked"],setup(t,{emit:e}){const r=e,n=a=>{t.tabs.forEach(o=>{o.current=a.name===o.name})},i=a=>{if(t.preventVisits&&r("tab-clicked",a),t.useWindowLocation&&a.href&&(window.location.href=a.href),t.replaceState){const o=new URL(window.location.href),s=new URLSearchParams(o.search);s.set("tab",a.key);const l=`${o.origin}${o.pathname}?${s.toString()}`;t.replaceStrategy==="window"&&window.history.replaceState({},"",l)}t.selfUpdate&&n(a)};return(a,o)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-tab",`dsg-tab--${a.style}`])},[u.createElementVNode("div",d0,[u.createElementVNode("select",h0,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.tabs,s=>(u.openBlock(),u.createElementBlock("option",{key:s.name,selected:s.current,textContent:u.toDisplayString(s.name)},null,8,p0))),128))]),u.createVNode(M._sfc_main,{class:"dsg-tab--mobile-select-icon",icon:"chevron-down","aria-hidden":"true",size:"sm"})]),u.createElementVNode("div",v0,[u.createElementVNode("div",g0,[u.createElementVNode("div",{class:u.normalizeClass(["dsg-tab--desktop-nav",a.style==="pills"?"dsg-tab--pills-nav":""]),"aria-label":"Tabs"},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.tabs,s=>(u.openBlock(),u.createElementBlock("a",{key:s.name,href:s.href,onClick:u.withModifiers(l=>i(s),["prevent"]),class:u.normalizeClass(["dsg-tab--desktop-link",[a.style==="pills"?s.current?"pills-active":"pills-inactive":s.current?"link-active":"link-inactive"]]),"aria-current":s.current?"page":void 0},[u.createElementVNode("span",{class:"dsg-tab--desktop-link-label",textContent:u.toDisplayString(s.name)},null,8,y0),s.badge?(u.openBlock(),u.createBlock(ta,{key:0,label:s.badge.label,"theme-color":s.current?"brand":"gray",theme:"pill-color",size:"sm"},null,8,["label","theme-color"])):u.createCommentVNode("",!0)],10,x0))),128))],2)])]),a.useSlots?(u.openBlock(),u.createElementBlock("div",m0,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(a.tabs,(s,l)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[s.current?u.renderSlot(a.$slots,`dsg-tab--content--${String(s.key).trim().toLowerCase().replace(/[^0-9a-zA-Z]/g,"-").replace(/-+/g,"-")}`,{key:0,data:s}):u.createCommentVNode("",!0)],64))),256))])):u.createCommentVNode("",!0)],2))}}),ba=M._sfc_main,Sa=Ct,Ia=M._sfc_main$5,Oa=ro,Ta=cs,Na=ea,Da=sr,_0=Zs,Ba=ta,Ra=M._sfc_main$3,Pa=M._sfc_main$2,ka=yl,Ma=ru,La=M._sfc_main$4,Fa=su,Va=fu,Ua=M._sfc_main$6,$a=zi._sfc_main,Ha=pu,Ga=ca,za=Au,Wa=Tu,Xa=M._sfc_main$1,Ka=M._sfc_main$7,E0=ll,A0=Mu,C0=s0,b0=Ca,S0=l0,ja=f0,Ya=w0,I0={DsgIcon:ba,DsgMiscIcon:Sa,DsgCreditCardIcon:Ia,DsgAlert:Ta,DsgAccordion:Oa,DsgAnnouncement:Na,DsgAvatar:Da,DsgBadge:Ba,DsgButton:Ra,DsgCheckbox:Pa,DsgCheckboxGroup:ka,DsgDropdown:Ma,DsgInput:La,DsgInputSelect:Fa,DsgInputDropdown:Va,DsgDatepicker:Ua,DsgLabel:$a,DsgLink:Ha,DsgModal:Ga,DsgTag:za,DsgToggle:Wa,DsgTooltip:Xa,DsgBreadcrumb:ja,DsgTab:Ya,DsgFilter:Ka};exports.DsgAccordion=Oa;exports.DsgAlert=Ta;exports.DsgAnnouncement=Na;exports.DsgAvatar=Da;exports.DsgBadge=Ba;exports.DsgBarcodeScanner=C0;exports.DsgBreadcrumb=ja;exports.DsgButton=Ra;exports.DsgCard=b0;exports.DsgCardContainer=S0;exports.DsgCheckbox=Pa;exports.DsgCheckboxGroup=ka;exports.DsgCreditCardIcon=Ia;exports.DsgDatepicker=Ua;exports.DsgDropdown=Ma;exports.DsgFilter=Ka;exports.DsgIcon=ba;exports.DsgIconSelect=_0;exports.DsgInput=La;exports.DsgInputDropdown=Va;exports.DsgInputNumber=E0;exports.DsgInputSelect=Fa;exports.DsgLabel=$a;exports.DsgLink=Ha;exports.DsgMiscIcon=Sa;exports.DsgModal=Ga;exports.DsgProgress=A0;exports.DsgTab=Ya;exports.DsgTag=za;exports.DsgToggle=Wa;exports.DsgTooltip=Xa;exports.default=I0;
29
+ `),e.toString()},t.prototype.setMode=function(e){this.mode=e},t.prototype.setECLevel=function(e){this.ecLevel=e},t.prototype.setVersion=function(e){this.version=e},t.prototype.setMaskPattern=function(e){this.maskPattern=e},t.prototype.setMatrix=function(e){this.matrix=e},t.isValidMaskPattern=function(e){return e>=0&&e<t.NUM_MASK_PATTERNS},t.NUM_MASK_PATTERNS=8,t})(),Sf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),ie=(function(t){Sf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="WriterException",e})(be),$i=(function(){function t(){}return t.clearMatrix=function(e){e.clear(255)},t.buildMatrix=function(e,r,n,i,a){t.clearMatrix(a),t.embedBasicPatterns(n,a),t.embedTypeInfo(r,i,a),t.maybeEmbedVersionInfo(n,a),t.embedDataBits(e,i,a)},t.embedBasicPatterns=function(e,r){t.embedPositionDetectionPatternsAndSeparators(r),t.embedDarkDotAtLeftBottomCorner(r),t.maybeEmbedPositionAdjustmentPatterns(e,r),t.embedTimingPatterns(r)},t.embedTypeInfo=function(e,r,n){var i=new pe;t.makeTypeInfoBits(e,r,i);for(var a=0,o=i.getSize();a<o;++a){var s=i.get(i.getSize()-1-a),l=t.TYPE_INFO_COORDINATES[a],c=l[0],f=l[1];if(n.setBoolean(c,f,s),a<8){var d=n.getWidth()-a-1,v=8;n.setBoolean(d,v,s)}else{var d=8,v=n.getHeight()-7+(a-8);n.setBoolean(d,v,s)}}},t.maybeEmbedVersionInfo=function(e,r){if(!(e.getVersionNumber()<7)){var n=new pe;t.makeVersionInfoBits(e,n);for(var i=17,a=0;a<6;++a)for(var o=0;o<3;++o){var s=n.get(i);i--,r.setBoolean(a,r.getHeight()-11+o,s),r.setBoolean(r.getHeight()-11+o,a,s)}}},t.embedDataBits=function(e,r,n){for(var i=0,a=-1,o=n.getWidth()-1,s=n.getHeight()-1;o>0;){for(o===6&&(o-=1);s>=0&&s<n.getHeight();){for(var l=0;l<2;++l){var c=o-l;if(t.isEmpty(n.get(c,s))){var f=void 0;i<e.getSize()?(f=e.get(i),++i):f=!1,r!==255&&ir.getDataMaskBit(r,c,s)&&(f=!f),n.setBoolean(c,s,f)}}s+=a}a=-a,s+=a,o-=2}if(i!==e.getSize())throw new ie("Not all bits consumed: "+i+"/"+e.getSize())},t.findMSBSet=function(e){return 32-G.numberOfLeadingZeros(e)},t.calculateBCHCode=function(e,r){if(r===0)throw new F("0 polynomial");var n=t.findMSBSet(r);for(e<<=n-1;t.findMSBSet(e)>=n;)e^=r<<t.findMSBSet(e)-n;return e},t.makeTypeInfoBits=function(e,r,n){if(!Fn.isValidMaskPattern(r))throw new ie("Invalid mask pattern");var i=e.getBits()<<3|r;n.appendBits(i,5);var a=t.calculateBCHCode(i,t.TYPE_INFO_POLY);n.appendBits(a,10);var o=new pe;if(o.appendBits(t.TYPE_INFO_MASK_PATTERN,15),n.xor(o),n.getSize()!==15)throw new ie("should not happen but we got: "+n.getSize())},t.makeVersionInfoBits=function(e,r){r.appendBits(e.getVersionNumber(),6);var n=t.calculateBCHCode(e.getVersionNumber(),t.VERSION_INFO_POLY);if(r.appendBits(n,12),r.getSize()!==18)throw new ie("should not happen but we got: "+r.getSize())},t.isEmpty=function(e){return e===255},t.embedTimingPatterns=function(e){for(var r=8;r<e.getWidth()-8;++r){var n=(r+1)%2;t.isEmpty(e.get(r,6))&&e.setNumber(r,6,n),t.isEmpty(e.get(6,r))&&e.setNumber(6,r,n)}},t.embedDarkDotAtLeftBottomCorner=function(e){if(e.get(8,e.getHeight()-8)===0)throw new ie;e.setNumber(8,e.getHeight()-8,1)},t.embedHorizontalSeparationPattern=function(e,r,n){for(var i=0;i<8;++i){if(!t.isEmpty(n.get(e+i,r)))throw new ie;n.setNumber(e+i,r,0)}},t.embedVerticalSeparationPattern=function(e,r,n){for(var i=0;i<7;++i){if(!t.isEmpty(n.get(e,r+i)))throw new ie;n.setNumber(e,r+i,0)}},t.embedPositionAdjustmentPattern=function(e,r,n){for(var i=0;i<5;++i)for(var a=t.POSITION_ADJUSTMENT_PATTERN[i],o=0;o<5;++o)n.setNumber(e+o,r+i,a[o])},t.embedPositionDetectionPattern=function(e,r,n){for(var i=0;i<7;++i)for(var a=t.POSITION_DETECTION_PATTERN[i],o=0;o<7;++o)n.setNumber(e+o,r+i,a[o])},t.embedPositionDetectionPatternsAndSeparators=function(e){var r=t.POSITION_DETECTION_PATTERN[0].length;t.embedPositionDetectionPattern(0,0,e),t.embedPositionDetectionPattern(e.getWidth()-r,0,e),t.embedPositionDetectionPattern(0,e.getWidth()-r,e);var n=8;t.embedHorizontalSeparationPattern(0,n-1,e),t.embedHorizontalSeparationPattern(e.getWidth()-n,n-1,e),t.embedHorizontalSeparationPattern(0,e.getWidth()-n,e);var i=7;t.embedVerticalSeparationPattern(i,0,e),t.embedVerticalSeparationPattern(e.getHeight()-i-1,0,e),t.embedVerticalSeparationPattern(i,e.getHeight()-i,e)},t.maybeEmbedPositionAdjustmentPatterns=function(e,r){if(!(e.getVersionNumber()<2))for(var n=e.getVersionNumber()-1,i=t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[n],a=0,o=i.length;a!==o;a++){var s=i[a];if(s>=0)for(var l=0;l!==o;l++){var c=i[l];c>=0&&t.isEmpty(r.get(c,s))&&t.embedPositionAdjustmentPattern(c-2,s-2,r)}}},t.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),t.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),t.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),t.VERSION_INFO_POLY=7973,t.TYPE_INFO_POLY=1335,t.TYPE_INFO_MASK_PATTERN=21522,t})(),If=(function(){function t(e,r){this.dataBytes=e,this.errorCorrectionBytes=r}return t.prototype.getDataBytes=function(){return this.dataBytes},t.prototype.getErrorCorrectionBytes=function(){return this.errorCorrectionBytes},t})(),Hi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(){function t(){}return t.calculateMaskPenalty=function(e){return ir.applyMaskPenaltyRule1(e)+ir.applyMaskPenaltyRule2(e)+ir.applyMaskPenaltyRule3(e)+ir.applyMaskPenaltyRule4(e)},t.encode=function(e,r,n){n===void 0&&(n=null);var i=t.DEFAULT_BYTE_MODE_ENCODING,a=n!==null&&n.get(_r.CHARACTER_SET)!==void 0;a&&(i=n.get(_r.CHARACTER_SET).toString());var o=this.chooseMode(e,i),s=new pe;if(o===ae.BYTE&&(a||t.DEFAULT_BYTE_MODE_ENCODING!==i)){var l=de.getCharacterSetECIByName(i);l!==void 0&&this.appendECI(l,s)}this.appendModeInfo(o,s);var c=new pe;this.appendBytes(e,o,c,i);var f;if(n!==null&&n.get(_r.QR_VERSION)!==void 0){var d=Number.parseInt(n.get(_r.QR_VERSION).toString(),10);f=wt.getVersionForNumber(d);var v=this.calculateBitsNeeded(o,s,c,f);if(!this.willFit(v,f,r))throw new ie("Data too big for requested version")}else f=this.recommendVersion(r,o,s,c);var h=new pe;h.appendBitArray(s);var p=o===ae.BYTE?c.getSizeInBytes():e.length;this.appendLengthInfo(p,f,o,h),h.appendBitArray(c);var g=f.getECBlocksForLevel(r),y=f.getTotalCodewords()-g.getTotalECCodewords();this.terminateBits(y,h);var w=this.interleaveWithECBytes(h,f.getTotalCodewords(),y,g.getNumBlocks()),m=new Fn;m.setECLevel(r),m.setMode(o),m.setVersion(f);var A=f.getDimensionForVersion(),E=new bf(A,A),C=this.chooseMaskPattern(w,r,f,E);return m.setMaskPattern(C),$i.buildMatrix(w,r,f,C,E),m.setMatrix(E),m},t.recommendVersion=function(e,r,n,i){var a=this.calculateBitsNeeded(r,n,i,wt.getVersionForNumber(1)),o=this.chooseVersion(a,e),s=this.calculateBitsNeeded(r,n,i,o);return this.chooseVersion(s,e)},t.calculateBitsNeeded=function(e,r,n,i){return r.getSize()+e.getCharacterCountBits(i)+n.getSize()},t.getAlphanumericCode=function(e){return e<t.ALPHANUMERIC_TABLE.length?t.ALPHANUMERIC_TABLE[e]:-1},t.chooseMode=function(e,r){if(r===void 0&&(r=null),de.SJIS.getName()===r&&this.isOnlyDoubleByteKanji(e))return ae.KANJI;for(var n=!1,i=!1,a=0,o=e.length;a<o;++a){var s=e.charAt(a);if(t.isDigit(s))n=!0;else if(this.getAlphanumericCode(s.charCodeAt(0))!==-1)i=!0;else return ae.BYTE}return i?ae.ALPHANUMERIC:n?ae.NUMERIC:ae.BYTE},t.isOnlyDoubleByteKanji=function(e){var r;try{r=je.encode(e,de.SJIS)}catch{return!1}var n=r.length;if(n%2!==0)return!1;for(var i=0;i<n;i+=2){var a=r[i]&255;if((a<129||a>159)&&(a<224||a>235))return!1}return!0},t.chooseMaskPattern=function(e,r,n,i){for(var a=Number.MAX_SAFE_INTEGER,o=-1,s=0;s<Fn.NUM_MASK_PATTERNS;s++){$i.buildMatrix(e,r,n,s,i);var l=this.calculateMaskPenalty(i);l<a&&(a=l,o=s)}return o},t.chooseVersion=function(e,r){for(var n=1;n<=40;n++){var i=wt.getVersionForNumber(n);if(t.willFit(e,i,r))return i}throw new ie("Data too big")},t.willFit=function(e,r,n){var i=r.getTotalCodewords(),a=r.getECBlocksForLevel(n),o=a.getTotalECCodewords(),s=i-o,l=(e+7)/8;return s>=l},t.terminateBits=function(e,r){var n=e*8;if(r.getSize()>n)throw new ie("data bits cannot fit in the QR Code"+r.getSize()+" > "+n);for(var i=0;i<4&&r.getSize()<n;++i)r.appendBit(!1);var a=r.getSize()&7;if(a>0)for(var i=a;i<8;i++)r.appendBit(!1);for(var o=e-r.getSizeInBytes(),i=0;i<o;++i)r.appendBits((i&1)===0?236:17,8);if(r.getSize()!==n)throw new ie("Bits size does not equal capacity")},t.getNumDataBytesAndNumECBytesForBlockID=function(e,r,n,i,a,o){if(i>=n)throw new ie("Block ID too large");var s=e%n,l=n-s,c=Math.floor(e/n),f=c+1,d=Math.floor(r/n),v=d+1,h=c-d,p=f-v;if(h!==p)throw new ie("EC bytes mismatch");if(n!==l+s)throw new ie("RS blocks mismatch");if(e!==(d+h)*l+(v+p)*s)throw new ie("Total bytes mismatch");i<l?(a[0]=d,o[0]=h):(a[0]=v,o[0]=p)},t.interleaveWithECBytes=function(e,r,n,i){var a,o,s,l;if(e.getSizeInBytes()!==n)throw new ie("Number of bits and data bytes does not match");for(var c=0,f=0,d=0,v=new Array,h=0;h<i;++h){var p=new Int32Array(1),g=new Int32Array(1);t.getNumDataBytesAndNumECBytesForBlockID(r,n,i,h,p,g);var y=p[0],w=new Uint8Array(y);e.toBytes(8*c,w,0,y);var m=t.generateECBytes(w,g[0]);v.push(new If(w,m)),f=Math.max(f,y),d=Math.max(d,m.length),c+=p[0]}if(n!==c)throw new ie("Data bytes does not match offset");for(var A=new pe,h=0;h<f;++h)try{for(var E=(a=void 0,Hi(v)),C=E.next();!C.done;C=E.next()){var b=C.value,w=b.getDataBytes();h<w.length&&A.appendBits(w[h],8)}}catch(L){a={error:L}}finally{try{C&&!C.done&&(o=E.return)&&o.call(E)}finally{if(a)throw a.error}}for(var h=0;h<d;++h)try{for(var O=(s=void 0,Hi(v)),P=O.next();!P.done;P=O.next()){var b=P.value,m=b.getErrorCorrectionBytes();h<m.length&&A.appendBits(m[h],8)}}catch(L){s={error:L}}finally{try{P&&!P.done&&(l=O.return)&&l.call(O)}finally{if(s)throw s.error}}if(r!==A.getSizeInBytes())throw new ie("Interleaving error: "+r+" and "+A.getSizeInBytes()+" differ.");return A},t.generateECBytes=function(e,r){for(var n=e.length,i=new Int32Array(n+r),a=0;a<n;a++)i[a]=e[a]&255;new Ea(Ne.QR_CODE_FIELD_256).encode(i,r);for(var o=new Uint8Array(r),a=0;a<r;a++)o[a]=i[n+a];return o},t.appendModeInfo=function(e,r){r.appendBits(e.getBits(),4)},t.appendLengthInfo=function(e,r,n,i){var a=n.getCharacterCountBits(r);if(e>=1<<a)throw new ie(e+" is bigger than "+((1<<a)-1));i.appendBits(e,a)},t.appendBytes=function(e,r,n,i){switch(r){case ae.NUMERIC:t.appendNumericBytes(e,n);break;case ae.ALPHANUMERIC:t.appendAlphanumericBytes(e,n);break;case ae.BYTE:t.append8BitBytes(e,n,i);break;case ae.KANJI:t.appendKanjiBytes(e,n);break;default:throw new ie("Invalid mode: "+r)}},t.getDigit=function(e){return e.charCodeAt(0)-48},t.isDigit=function(e){var r=t.getDigit(e);return r>=0&&r<=9},t.appendNumericBytes=function(e,r){for(var n=e.length,i=0;i<n;){var a=t.getDigit(e.charAt(i));if(i+2<n){var o=t.getDigit(e.charAt(i+1)),s=t.getDigit(e.charAt(i+2));r.appendBits(a*100+o*10+s,10),i+=3}else if(i+1<n){var o=t.getDigit(e.charAt(i+1));r.appendBits(a*10+o,7),i+=2}else r.appendBits(a,4),i++}},t.appendAlphanumericBytes=function(e,r){for(var n=e.length,i=0;i<n;){var a=t.getAlphanumericCode(e.charCodeAt(i));if(a===-1)throw new ie;if(i+1<n){var o=t.getAlphanumericCode(e.charCodeAt(i+1));if(o===-1)throw new ie;r.appendBits(a*45+o,11),i+=2}else r.appendBits(a,6),i++}},t.append8BitBytes=function(e,r,n){var i;try{i=je.encode(e,n)}catch(l){throw new ie(l)}for(var a=0,o=i.length;a!==o;a++){var s=i[a];r.appendBits(s,8)}},t.appendKanjiBytes=function(e,r){var n;try{n=je.encode(e,de.SJIS)}catch(d){throw new ie(d)}for(var i=n.length,a=0;a<i;a+=2){var o=n[a]&255,s=n[a+1]&255,l=o<<8&4294967295|s,c=-1;if(l>=33088&&l<=40956?c=l-33088:l>=57408&&l<=60351&&(c=l-49472),c===-1)throw new ie("Invalid byte sequence");var f=(c>>8)*192+(c&255);r.appendBits(f,13)}},t.appendECI=function(e,r){r.appendBits(ae.ECI.getBits(),4),r.appendBits(e.getValue(),8)},t.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),t.DEFAULT_BYTE_MODE_ENCODING=de.UTF8.getName(),t})();var Of=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();(function(t){Of(e,t);function e(r,n,i,a,o,s,l,c){var f=t.call(this,s,l)||this;if(f.yuvData=r,f.dataWidth=n,f.dataHeight=i,f.left=a,f.top=o,a+s>n||o+l>i)throw new F("Crop rectangle does not fit within image data.");return c&&f.reverseHorizontal(s,l),f}return e.prototype.getRow=function(r,n){if(r<0||r>=this.getHeight())throw new F("Requested row is outside the image: "+r);var i=this.getWidth();(n==null||n.length<i)&&(n=new Uint8ClampedArray(i));var a=(r+this.top)*this.dataWidth+this.left;return ne.arraycopy(this.yuvData,a,n,0,i),n},e.prototype.getMatrix=function(){var r=this.getWidth(),n=this.getHeight();if(r===this.dataWidth&&n===this.dataHeight)return this.yuvData;var i=r*n,a=new Uint8ClampedArray(i),o=this.top*this.dataWidth+this.left;if(r===this.dataWidth)return ne.arraycopy(this.yuvData,o,a,0,i),a;for(var s=0;s<n;s++){var l=s*r;ne.arraycopy(this.yuvData,o,a,l,r),o+=this.dataWidth}return a},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(r,n,i,a){return new e(this.yuvData,this.dataWidth,this.dataHeight,this.left+r,this.top+n,i,a,!1)},e.prototype.renderThumbnail=function(){for(var r=this.getWidth()/e.THUMBNAIL_SCALE_FACTOR,n=this.getHeight()/e.THUMBNAIL_SCALE_FACTOR,i=new Int32Array(r*n),a=this.yuvData,o=this.top*this.dataWidth+this.left,s=0;s<n;s++){for(var l=s*r,c=0;c<r;c++){var f=a[o+c*e.THUMBNAIL_SCALE_FACTOR]&255;i[l+c]=4278190080|f*65793}o+=this.dataWidth*e.THUMBNAIL_SCALE_FACTOR}return i},e.prototype.getThumbnailWidth=function(){return this.getWidth()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.getThumbnailHeight=function(){return this.getHeight()/e.THUMBNAIL_SCALE_FACTOR},e.prototype.reverseHorizontal=function(r,n){for(var i=this.yuvData,a=0,o=this.top*this.dataWidth+this.left;a<n;a++,o+=this.dataWidth)for(var s=o+r/2,l=o,c=o+r-1;l<s;l++,c--){var f=i[l];i[l]=i[c],i[c]=f}},e.prototype.invert=function(){return new Xn(this)},e.THUMBNAIL_SCALE_FACTOR=2,e})(zr);var Tf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();(function(t){Tf(e,t);function e(r,n,i,a,o,s,l){var c=t.call(this,n,i)||this;if(c.dataWidth=a,c.dataHeight=o,c.left=s,c.top=l,r.BYTES_PER_ELEMENT===4){for(var f=n*i,d=new Uint8ClampedArray(f),v=0;v<f;v++){var h=r[v],p=h>>16&255,g=h>>7&510,y=h&255;d[v]=(p+g+y)/4&255}c.luminances=d}else c.luminances=r;if(a===void 0&&(c.dataWidth=n),o===void 0&&(c.dataHeight=i),s===void 0&&(c.left=0),l===void 0&&(c.top=0),c.left+n>c.dataWidth||c.top+i>c.dataHeight)throw new F("Crop rectangle does not fit within image data.");return c}return e.prototype.getRow=function(r,n){if(r<0||r>=this.getHeight())throw new F("Requested row is outside the image: "+r);var i=this.getWidth();(n==null||n.length<i)&&(n=new Uint8ClampedArray(i));var a=(r+this.top)*this.dataWidth+this.left;return ne.arraycopy(this.luminances,a,n,0,i),n},e.prototype.getMatrix=function(){var r=this.getWidth(),n=this.getHeight();if(r===this.dataWidth&&n===this.dataHeight)return this.luminances;var i=r*n,a=new Uint8ClampedArray(i),o=this.top*this.dataWidth+this.left;if(r===this.dataWidth)return ne.arraycopy(this.luminances,o,a,0,i),a;for(var s=0;s<n;s++){var l=s*r;ne.arraycopy(this.luminances,o,a,l,r),o+=this.dataWidth}return a},e.prototype.isCropSupported=function(){return!0},e.prototype.crop=function(r,n,i,a){return new e(this.luminances,i,a,this.dataWidth,this.dataHeight,this.left+r,this.top+n)},e.prototype.invert=function(){return new Xn(this)},e})(zr);var Nf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})();(function(t){Nf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.forName=function(r){return this.getCharacterSetECIByName(r)},e})(de);(function(){function t(){}return t.ISO_8859_1=de.ISO8859_1,t})();var Df=(function(){function t(){}return t.prototype.isCompact=function(){return this.compact},t.prototype.setCompact=function(e){this.compact=e},t.prototype.getSize=function(){return this.size},t.prototype.setSize=function(e){this.size=e},t.prototype.getLayers=function(){return this.layers},t.prototype.setLayers=function(e){this.layers=e},t.prototype.getCodeWords=function(){return this.codeWords},t.prototype.setCodeWords=function(e){this.codeWords=e},t.prototype.getMatrix=function(){return this.matrix},t.prototype.setMatrix=function(e){this.matrix=e},t})(),Gi=(function(){function t(){}return t.singletonList=function(e){return[e]},t.min=function(e,r){return e.sort(r)[0]},t})(),Bf=(function(){function t(e){this.previous=e}return t.prototype.getPrevious=function(){return this.previous},t})(),Rf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),qn=(function(t){Rf(e,t);function e(r,n,i){var a=t.call(this,r)||this;return a.value=n,a.bitCount=i,a}return e.prototype.appendTo=function(r,n){r.appendBits(this.value,this.bitCount)},e.prototype.add=function(r,n){return new e(this,r,n)},e.prototype.addBinaryShift=function(r,n){return console.warn("addBinaryShift on SimpleToken, this simply returns a copy of this token"),new e(this,r,n)},e.prototype.toString=function(){var r=this.value&(1<<this.bitCount)-1;return r|=1<<this.bitCount,"<"+G.toBinaryString(r|1<<this.bitCount).substring(1)+">"},e})(Bf),Pf=(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},t(e,r)};return function(e,r){t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}})(),kf=(function(t){Pf(e,t);function e(r,n,i){var a=t.call(this,r,0,0)||this;return a.binaryShiftStart=n,a.binaryShiftByteCount=i,a}return e.prototype.appendTo=function(r,n){for(var i=0;i<this.binaryShiftByteCount;i++)(i===0||i===31&&this.binaryShiftByteCount<=62)&&(r.appendBits(31,5),this.binaryShiftByteCount>62?r.appendBits(this.binaryShiftByteCount-31,16):i===0?r.appendBits(Math.min(this.binaryShiftByteCount,31),5):r.appendBits(this.binaryShiftByteCount-31,5)),r.appendBits(n[this.binaryShiftStart+i],8)},e.prototype.addBinaryShift=function(r,n){return new e(this,r,n)},e.prototype.toString=function(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"},e})(qn);function Mf(t,e,r){return new kf(t,e,r)}function Zt(t,e,r){return new qn(t,e,r)}var Lf=["UPPER","LOWER","DIGIT","MIXED","PUNCT"],ft=0,Fr=1,Me=2,Aa=3,Ke=4,Ff=new qn(null,0,0),pn=[Int32Array.from([0,(5<<16)+28,(5<<16)+30,(5<<16)+29,656318]),Int32Array.from([(9<<16)+480+14,0,(5<<16)+30,(5<<16)+29,656318]),Int32Array.from([(4<<16)+14,(9<<16)+448+28,0,(9<<16)+448+29,932798]),Int32Array.from([(5<<16)+29,(5<<16)+28,656318,0,(5<<16)+30]),Int32Array.from([(5<<16)+31,656380,656382,656381,0])],Vf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Uf(t){var e,r;try{for(var n=Vf(t),i=n.next();!i.done;i=n.next()){var a=i.value;De.fill(a,-1)}}catch(o){e={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return t[ft][Ke]=0,t[Fr][Ke]=0,t[Fr][ft]=28,t[Aa][Ke]=0,t[Me][Ke]=0,t[Me][ft]=15,t}var _a=Uf(De.createInt32Array(6,6)),$f=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Hf=(function(){function t(e,r,n,i){this.token=e,this.mode=r,this.binaryShiftByteCount=n,this.bitCount=i}return t.prototype.getMode=function(){return this.mode},t.prototype.getToken=function(){return this.token},t.prototype.getBinaryShiftByteCount=function(){return this.binaryShiftByteCount},t.prototype.getBitCount=function(){return this.bitCount},t.prototype.latchAndAppend=function(e,r){var n=this.bitCount,i=this.token;if(e!==this.mode){var a=pn[this.mode][e];i=Zt(i,a&65535,a>>16),n+=a>>16}var o=e===Me?4:5;return i=Zt(i,r,o),new t(i,e,0,n+o)},t.prototype.shiftAndAppend=function(e,r){var n=this.token,i=this.mode===Me?4:5;return n=Zt(n,_a[this.mode][e],i),n=Zt(n,r,5),new t(n,this.mode,0,this.bitCount+i+5)},t.prototype.addBinaryShiftChar=function(e){var r=this.token,n=this.mode,i=this.bitCount;if(this.mode===Ke||this.mode===Me){var a=pn[n][ft];r=Zt(r,a&65535,a>>16),i+=a>>16,n=ft}var o=this.binaryShiftByteCount===0||this.binaryShiftByteCount===31?18:this.binaryShiftByteCount===62?9:8,s=new t(r,n,this.binaryShiftByteCount+1,i+o);return s.binaryShiftByteCount===2078&&(s=s.endBinaryShift(e+1)),s},t.prototype.endBinaryShift=function(e){if(this.binaryShiftByteCount===0)return this;var r=this.token;return r=Mf(r,e-this.binaryShiftByteCount,this.binaryShiftByteCount),new t(r,this.mode,0,this.bitCount)},t.prototype.isBetterThanOrEqualTo=function(e){var r=this.bitCount+(pn[this.mode][e.mode]>>16);return this.binaryShiftByteCount<e.binaryShiftByteCount?r+=t.calculateBinaryShiftCost(e)-t.calculateBinaryShiftCost(this):this.binaryShiftByteCount>e.binaryShiftByteCount&&e.binaryShiftByteCount>0&&(r+=10),r<=e.bitCount},t.prototype.toBitArray=function(e){for(var r,n,i=[],a=this.endBinaryShift(e.length).token;a!==null;a=a.getPrevious())i.unshift(a);var o=new pe;try{for(var s=$f(i),l=s.next();!l.done;l=s.next()){var c=l.value;c.appendTo(o,e)}}catch(f){r={error:f}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o},t.prototype.toString=function(){return re.format("%s bits=%d bytes=%d",Lf[this.mode],this.bitCount,this.binaryShiftByteCount)},t.calculateBinaryShiftCost=function(e){return e.binaryShiftByteCount>62?21:e.binaryShiftByteCount>31?20:e.binaryShiftByteCount>0?10:0},t.INITIAL_STATE=new t(Ff,ft,0,0),t})();function Gf(t){var e=re.getCharCode(" "),r=re.getCharCode("."),n=re.getCharCode(",");t[ft][e]=1;for(var i=re.getCharCode("Z"),a=re.getCharCode("A"),o=a;o<=i;o++)t[ft][o]=o-a+2;t[Fr][e]=1;for(var s=re.getCharCode("z"),l=re.getCharCode("a"),o=l;o<=s;o++)t[Fr][o]=o-l+2;t[Me][e]=1;for(var c=re.getCharCode("9"),f=re.getCharCode("0"),o=f;o<=c;o++)t[Me][o]=o-f+2;t[Me][n]=12,t[Me][r]=13;for(var d=["\0"," ","","","","","","","\x07","\b"," ",`
30
+ `,"\v","\f","\r","\x1B","","","","","@","\\","^","_","`","|","~",""],v=0;v<d.length;v++)t[Aa][re.getCharCode(d[v])]=v;for(var h=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"],v=0;v<h.length;v++)re.getCharCode(h[v])>0&&(t[Ke][re.getCharCode(h[v])]=v);return t}var gn=Gf(De.createInt32Array(5,256)),Cr=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},zf=(function(){function t(e){this.text=e}return t.prototype.encode=function(){for(var e=re.getCharCode(" "),r=re.getCharCode(`
31
+ `),n=Gi.singletonList(Hf.INITIAL_STATE),i=0;i<this.text.length;i++){var a=void 0,o=i+1<this.text.length?this.text[i+1]:0;switch(this.text[i]){case re.getCharCode("\r"):a=o===r?2:0;break;case re.getCharCode("."):a=o===e?3:0;break;case re.getCharCode(","):a=o===e?4:0;break;case re.getCharCode(":"):a=o===e?5:0;break;default:a=0}a>0?(n=t.updateStateListForPair(n,i,a),i++):n=this.updateStateListForChar(n,i)}var s=Gi.min(n,function(l,c){return l.getBitCount()-c.getBitCount()});return s.toBitArray(this.text)},t.prototype.updateStateListForChar=function(e,r){var n,i,a=[];try{for(var o=Cr(e),s=o.next();!s.done;s=o.next()){var l=s.value;this.updateStateForChar(l,r,a)}}catch(c){n={error:c}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return t.simplifyStates(a)},t.prototype.updateStateForChar=function(e,r,n){for(var i=this.text[r]&255,a=gn[e.getMode()][i]>0,o=null,s=0;s<=Ke;s++){var l=gn[s][i];if(l>0){if(o==null&&(o=e.endBinaryShift(r)),!a||s===e.getMode()||s===Me){var c=o.latchAndAppend(s,l);n.push(c)}if(!a&&_a[e.getMode()][s]>=0){var f=o.shiftAndAppend(s,l);n.push(f)}}}if(e.getBinaryShiftByteCount()>0||gn[e.getMode()][i]===0){var d=e.addBinaryShiftChar(r);n.push(d)}},t.updateStateListForPair=function(e,r,n){var i,a,o=[];try{for(var s=Cr(e),l=s.next();!l.done;l=s.next()){var c=l.value;this.updateStateForPair(c,r,n,o)}}catch(f){i={error:f}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}return this.simplifyStates(o)},t.updateStateForPair=function(e,r,n,i){var a=e.endBinaryShift(r);if(i.push(a.latchAndAppend(Ke,n)),e.getMode()!==Ke&&i.push(a.shiftAndAppend(Ke,n)),n===3||n===4){var o=a.latchAndAppend(Me,16-n).latchAndAppend(Me,1);i.push(o)}if(e.getBinaryShiftByteCount()>0){var s=e.addBinaryShiftChar(r).addBinaryShiftChar(r+1);i.push(s)}},t.simplifyStates=function(e){var r,n,i,a,o=[];try{for(var s=Cr(e),l=s.next();!l.done;l=s.next()){var c=l.value,f=!0,d=function(y){if(y.isBetterThanOrEqualTo(c))return f=!1,"break";c.isBetterThanOrEqualTo(y)&&(o=o.filter(function(w){return w!==y}))};try{for(var v=(i=void 0,Cr(o)),h=v.next();!h.done;h=v.next()){var p=h.value,g=d(p);if(g==="break")break}}catch(y){i={error:y}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}f&&o.push(c)}}catch(y){r={error:y}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o},t})(),Wf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(){function t(){}return t.encodeBytes=function(e){return t.encode(e,t.DEFAULT_EC_PERCENT,t.DEFAULT_AZTEC_LAYERS)},t.encode=function(e,r,n){var i=new zf(e).encode(),a=G.truncDivision(i.getSize()*r,100)+11,o=i.getSize()+a,s,l,c,f,d;if(n!==t.DEFAULT_AZTEC_LAYERS){if(s=n<0,l=Math.abs(n),l>(s?t.MAX_NB_BITS_COMPACT:t.MAX_NB_BITS))throw new F(re.format("Illegal value %s for layers",n));c=t.totalBitsInLayer(l,s),f=t.WORD_SIZE[l];var v=c-c%f;if(d=t.stuffBits(i,f),d.getSize()+a>v)throw new F("Data to large for user specified layer");if(s&&d.getSize()>f*64)throw new F("Data to large for user specified layer")}else{f=0,d=null;for(var h=0;;h++){if(h>t.MAX_NB_BITS)throw new F("Data too large for an Aztec code");if(s=h<=3,l=s?h+1:h,c=t.totalBitsInLayer(l,s),!(o>c)){(d==null||f!==t.WORD_SIZE[l])&&(f=t.WORD_SIZE[l],d=t.stuffBits(i,f));var v=c-c%f;if(!(s&&d.getSize()>f*64)&&d.getSize()+a<=v)break}}}var p=t.generateCheckWords(d,c,f),g=d.getSize()/f,y=t.generateModeMessage(s,l,g),w=(s?11:14)+l*4,m=new Int32Array(w),A;if(s){A=w;for(var h=0;h<m.length;h++)m[h]=h}else{A=w+1+2*G.truncDivision(G.truncDivision(w,2)-1,15);for(var E=G.truncDivision(w,2),C=G.truncDivision(A,2),h=0;h<E;h++){var b=h+G.truncDivision(h,15);m[E-h-1]=C-b-1,m[E+h]=C+b+1}}for(var O=new Ze(A),h=0,P=0;h<l;h++){for(var H=(l-h)*4+(s?9:12),L=0;L<H;L++)for(var te=L*2,V=0;V<2;V++)p.get(P+te+V)&&O.set(m[h*2+V],m[h*2+L]),p.get(P+H*2+te+V)&&O.set(m[h*2+L],m[w-1-h*2-V]),p.get(P+H*4+te+V)&&O.set(m[w-1-h*2-V],m[w-1-h*2-L]),p.get(P+H*6+te+V)&&O.set(m[w-1-h*2-L],m[h*2+V]);P+=H*8}if(t.drawModeMessage(O,s,A,y),s)t.drawBullsEye(O,G.truncDivision(A,2),5);else{t.drawBullsEye(O,G.truncDivision(A,2),7);for(var h=0,L=0;h<G.truncDivision(w,2)-1;h+=15,L+=16)for(var V=G.truncDivision(A,2)&1;V<A;V+=2)O.set(G.truncDivision(A,2)-L,V),O.set(G.truncDivision(A,2)+L,V),O.set(V,G.truncDivision(A,2)-L),O.set(V,G.truncDivision(A,2)+L)}var z=new Df;return z.setCompact(s),z.setSize(A),z.setLayers(l),z.setCodeWords(g),z.setMatrix(O),z},t.drawBullsEye=function(e,r,n){for(var i=0;i<n;i+=2)for(var a=r-i;a<=r+i;a++)e.set(a,r-i),e.set(a,r+i),e.set(r-i,a),e.set(r+i,a);e.set(r-n,r-n),e.set(r-n+1,r-n),e.set(r-n,r-n+1),e.set(r+n,r-n),e.set(r+n,r-n+1),e.set(r+n,r+n-1)},t.generateModeMessage=function(e,r,n){var i=new pe;return e?(i.appendBits(r-1,2),i.appendBits(n-1,6),i=t.generateCheckWords(i,28,4)):(i.appendBits(r-1,5),i.appendBits(n-1,11),i=t.generateCheckWords(i,40,4)),i},t.drawModeMessage=function(e,r,n,i){var a=G.truncDivision(n,2);if(r)for(var o=0;o<7;o++){var s=a-3+o;i.get(o)&&e.set(s,a-5),i.get(o+7)&&e.set(a+5,s),i.get(20-o)&&e.set(s,a+5),i.get(27-o)&&e.set(a-5,s)}else for(var o=0;o<10;o++){var s=a-5+o+G.truncDivision(o,5);i.get(o)&&e.set(s,a-7),i.get(o+10)&&e.set(a+7,s),i.get(29-o)&&e.set(s,a+7),i.get(39-o)&&e.set(a-7,s)}},t.generateCheckWords=function(e,r,n){var i,a,o=e.getSize()/n,s=new Ea(t.getGF(n)),l=G.truncDivision(r,n),c=t.bitsToWords(e,n,l);s.encode(c,l-o);var f=r%n,d=new pe;d.appendBits(0,f);try{for(var v=Wf(Array.from(c)),h=v.next();!h.done;h=v.next()){var p=h.value;d.appendBits(p,n)}}catch(g){i={error:g}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}return d},t.bitsToWords=function(e,r,n){var i=new Int32Array(n),a,o;for(a=0,o=e.getSize()/r;a<o;a++){for(var s=0,l=0;l<r;l++)s|=e.get(a*r+l)?1<<r-l-1:0;i[a]=s}return i},t.getGF=function(e){switch(e){case 4:return Ne.AZTEC_PARAM;case 6:return Ne.AZTEC_DATA_6;case 8:return Ne.AZTEC_DATA_8;case 10:return Ne.AZTEC_DATA_10;case 12:return Ne.AZTEC_DATA_12;default:throw new F("Unsupported word size "+e)}},t.stuffBits=function(e,r){for(var n=new pe,i=e.getSize(),a=(1<<r)-2,o=0;o<i;o+=r){for(var s=0,l=0;l<r;l++)(o+l>=i||e.get(o+l))&&(s|=1<<r-1-l);(s&a)===a?(n.appendBits(s&a,r),o--):(s&a)===0?(n.appendBits(s|1,r),o--):n.appendBits(s,r)}return n},t.totalBitsInLayer=function(e,r){return((r?88:112)+16*e)*e},t.DEFAULT_EC_PERCENT=33,t.DEFAULT_AZTEC_LAYERS=0,t.MAX_NB_BITS=32,t.MAX_NB_BITS_COMPACT=4,t.WORD_SIZE=Int32Array.from([4,6,6,8,8,8,8,8,8,10,10,10,10,10,10,10,10,10,10,10,10,10,10,12,12,12,12,12,12,12,12,12,12]),t})();const Xf={name:"stream-barcode-reader",data(){return{isLoading:!0,codeReader:new Ef,isMediaStreamAPISupported:navigator&&navigator.mediaDevices&&"enumerateDevices"in navigator.mediaDevices}},mounted(){if(!this.isMediaStreamAPISupported)throw new be("Media Stream API is not supported");this.start(),this.$refs.scanner.oncanplay=t=>{this.isLoading=!1,this.$emit("loaded")}},beforeUnmount(){this.codeReader.reset()},methods:{start(){this.codeReader.decodeFromVideoDevice(void 0,this.$refs.scanner,(t,e)=>{t&&(this.$emit("decode",t.text),this.$emit("result",t))})}}},Kf={class:"scanner-container"},jf={poster:"data:image/gif,AAAA",ref:"scanner"};function Yf(t,e,r,n,i,a){return u.openBlock(),u.createElementBlock("div",Kf,[u.withDirectives(u.createElementVNode("div",null,[u.createElementVNode("video",jf,null,512),e[0]||(e[0]=u.createElementVNode("div",{class:"overlay-element"},null,-1)),e[1]||(e[1]=u.createElementVNode("div",{class:"laser"},null,-1))],512),[[u.vShow,!i.isLoading]])])}const Zf=Lt(Xf,[["render",Yf],["__scopeId","data-v-3b725b25"]]),qf={key:0,class:"scanner-modal"},Qf={class:"scanner-header"},Jf={class:"scanner-title"},e0={key:0,class:"scanner-subtitle"},t0={class:"scanner-stream"},r0={class:"scanner-overlay"},n0={key:0,class:"scanner-slot"},i0={class:"scanner-manual"},a0={key:0},o0=u.defineComponent({__name:"DsgBarcodeScanner",props:{failTitle:{},failSubtitle:{},onScan:{type:Function}},setup(t,{expose:e}){const r=t,n=u.ref(!1),i=u.ref(""),a=u.ref("");u.ref(null);const o=u.ref(""),s=u.ref(!1),l=u.ref(!1),c=u.ref(!1),f=u.ref(r.failTitle??"Scan Failed"),d=u.ref(r.failSubtitle??"Please try again or enter the barcode manually."),v=u.ref(null),h={theme:"error",type:"light",size:"lg",icon:{icon:"alert-circle",size:"sm",color:"currentColor",classes:""},classes:""};u.watch(()=>r.failTitle,V=>{V&&(f.value=V)}),u.watch(()=>r.failSubtitle,V=>{V&&(d.value=V)});const p={label:"Re-scan",theme:"destructive"},g={label:"Input manually",theme:"gray"};function y(V){i.value=V.title,a.value=V.subtitle??"",o.value="",s.value=!1,n.value=!0}function w(V){C({type:"scanned",value:V})}function m(){o.value.trim()&&(A(),C({type:"manual",value:o.value.trim()}))}function A(){s.value=!s.value,s.value&&(o.value="")}function E(){C({type:"cancelled"})}function C(V){console.log("Scan result:",V),r.onScan&&r.onScan(V)}function b(){n.value=!1}function O(){l.value=!0,setTimeout(()=>{l.value=!1},3e3)}function P(){v.value?.open()}function H(){c.value=!0}function L(){c.value=!1}e({scan:y,close:b,success:O,error:P,showSlot:H,hideSlot:L});const te=()=>{document.documentElement.style.setProperty("--vh",`${window.innerHeight*.01}px`)};return u.onMounted(()=>{te(),window.addEventListener("resize",te)}),u.onBeforeUnmount(()=>{window.removeEventListener("resize",te)}),(V,z)=>(u.openBlock(),u.createBlock(u.Teleport,{to:"body"},[n.value?(u.openBlock(),u.createElementBlock("div",qf,[u.createVNode(ca,{ref_key:"modalRef",ref:v,title:f.value,description:d.value,miscIcon:h,onClose:E,footerType:"vertical",primaryButton:p,secondaryButton:g,onPrimaryButtonClicked:z[0]||(z[0]=he=>v.value?.close()),onSecondaryButtonClicked:z[1]||(z[1]=he=>{A(),v.value?.close()}),width:500},null,8,["title","description"]),u.createElementVNode("div",Qf,[u.createElementVNode("div",null,[u.createElementVNode("h2",Jf,u.toDisplayString(i.value),1),a.value?(u.openBlock(),u.createElementBlock("p",e0,u.toDisplayString(a.value),1)):u.createCommentVNode("",!0)]),u.createElementVNode("button",{class:"scanner-close",onClick:E,"aria-label":"Close"}," × ")]),u.createElementVNode("div",t0,[u.createVNode(u.unref(Zf),{class:"scanner-video",onDecode:w}),u.createElementVNode("div",r0,[c.value?(u.openBlock(),u.createElementBlock("div",n0,[u.renderSlot(V.$slots,"default",{},void 0,!0)])):u.createCommentVNode("",!0),u.createElementVNode("div",i0,[s.value?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("span",a0,"No barcode?")),s.value?u.createCommentVNode("",!0):(u.openBlock(),u.createBlock(M._sfc_main$3,{key:1,label:"Input manually",onClick:A,"icon-before":"pencil-01",theme:"gray-secondary"})),s.value?(u.openBlock(),u.createBlock(M._sfc_main$4,{key:2,modelValue:o.value,"onUpdate:modelValue":z[2]||(z[2]=he=>o.value=he),placeholder:"Enter barcode manually",class:"w-full"},null,8,["modelValue"])):u.createCommentVNode("",!0),s.value?(u.openBlock(),u.createBlock(M._sfc_main$3,{key:3,label:"Submit",onClick:m,"icon-before":"check",theme:"gray-secondary"})):u.createCommentVNode("",!0)]),l.value?(u.openBlock(),u.createBlock(M._sfc_main,{key:1,icon:"check",size:"3xl",class:"scanner-success"})):u.createCommentVNode("",!0)])])])):u.createCommentVNode("",!0)]))}}),s0=Lt(o0,[["__scopeId","data-v-e5e3bcdd"]]),Ca=u.defineComponent({__name:"DsgCard",props:{variant:{default:"default"},hoverable:{type:Boolean,default:!1},classes:{default:""}},setup(t){return(e,r)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-card",[`dsg-card--${t.variant}`,{"dsg-card--hoverable":t.hoverable},t.classes]])},[u.renderSlot(e.$slots,"default")],2))}}),l0=u.defineComponent({__name:"DsgCardContainer",props:{columns:{default:1},gap:{},items:{},itemKey:{default:null},cardProps:{default:()=>({})}},setup(t){return(e,r)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-card-container",`dsg-card-container--cols-${t.columns} dsg-card-container--gap-${t.gap}`])},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(t.items,(n,i)=>(u.openBlock(),u.createBlock(Ca,u.mergeProps({key:t.itemKey?n[t.itemKey]:i},{ref_for:!0},t.cardProps),{default:u.withCtx(()=>[u.renderSlot(e.$slots,"default",{item:n,index:i})]),_:2},1040))),128))],2))}}),u0={key:1},c0=u.defineComponent({__name:"DsgBreadcrumb",props:{breadcrumbs:{default:()=>[]},divider:{default:()=>({icon:"slash-divider",size:"sm",classes:""})},theme:{default:"text"}},setup(t){return(e,r)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-breadcrumbs","dsg-breadcrumbs"])},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(t.breadcrumbs,(n,i)=>(u.openBlock(),u.createElementBlock(u.Fragment,{key:`breadcrumb-item-${i}`},[(u.openBlock(),u.createBlock(u.resolveDynamicComponent(n.url??!1?"a":"span"),{href:n.url??null,disabled:n.disabled,class:u.normalizeClass(["dsg-breadcrumbs__button-base",`dsg-breadcrumbs__button-base--${t.theme}`,`${n.active??i===t.breadcrumbs.length-1?"dsg-breadcrumbs__button-base--active":""}`].join(" "))},{default:u.withCtx(()=>[n.icon&&n.useIcon?(u.openBlock(),u.createBlock(M._sfc_main,{key:0,icon:n.icon,size:"sm",classes:"dsg-breadcrumbs__icon"},null,8,["icon"])):(u.openBlock(),u.createElementBlock("span",u0,u.toDisplayString(n.label),1))]),_:2},1032,["href","disabled","class"])),i<t.breadcrumbs.length-1?(u.openBlock(),u.createBlock(M._sfc_main,u.mergeProps({key:0,ref_for:!0},t.divider,{class:"dsg-breadcrumbs__divider"}),null,16)):u.createCommentVNode("",!0)],64))),128))]))}}),f0=Lt(c0,[["__scopeId","data-v-8f108e12"]]),d0={class:"dsg-tab--mobile"},h0={"aria-label":"Select a tab",class:"dsg-tab--mobile-select"},v0=["selected","textContent"],p0={class:"dsg-tab--desktop"},g0={class:"dsg-tab--desktop-wrapper"},x0=["href","onClick","aria-current"],y0=["textContent"],m0={key:0,class:"dsg-tab--content"},w0=u.defineComponent({__name:"DsgTab",props:{tabs:{default:()=>[]},style:{default:"tabs"},preventVisits:{type:Boolean,default:!0},useWindowLocation:{type:Boolean,default:!1},replaceState:{type:Boolean,default:!1},replaceStrategy:{default:"window"},useSlots:{type:Boolean,default:!1},selfUpdate:{type:Boolean,default:!0},teleportSlotTo:{}},emits:["tab-clicked"],setup(t,{emit:e}){const r=e,n=a=>{t.tabs.forEach(o=>{o.current=a.name===o.name})},i=a=>{if(t.useWindowLocation&&a.href&&!t.preventVisits&&(window.location.href=a.href),t.replaceState){const o=new URL(window.location.href),s=new URLSearchParams(o.search);s.set("tab",a.key);const l=`${o.origin}${o.pathname}?${s.toString()}`;t.replaceStrategy==="window"&&window.history.pushState({},"",l)}t.selfUpdate&&n(a),t.preventVisits&&r("tab-clicked",a)};return(a,o)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(["dsg-tab",`dsg-tab--${t.style}`])},[u.createElementVNode("div",d0,[u.createElementVNode("select",h0,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(t.tabs,s=>(u.openBlock(),u.createElementBlock("option",{key:s.name,selected:s.current,textContent:u.toDisplayString(s.name)},null,8,v0))),128))]),u.createVNode(M._sfc_main,{class:"dsg-tab--mobile-select-icon",icon:"chevron-down","aria-hidden":"true",size:"sm"})]),u.createElementVNode("div",p0,[u.createElementVNode("div",g0,[u.createElementVNode("div",{class:u.normalizeClass(["dsg-tab--desktop-nav",t.style==="pills"?"dsg-tab--pills-nav":""]),"aria-label":"Tabs"},[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(t.tabs,s=>(u.openBlock(),u.createElementBlock("a",{key:s.name,href:s.href,onClick:u.withModifiers(l=>i(s),["prevent"]),class:u.normalizeClass(["dsg-tab--desktop-link",[t.style==="pills"?s.current?"pills-active":"pills-inactive":s.current?"link-active":"link-inactive"]]),"aria-current":s.current?"page":void 0},[u.createElementVNode("span",{class:"dsg-tab--desktop-link-label",textContent:u.toDisplayString(s.name)},null,8,y0),s.badge?(u.openBlock(),u.createBlock(ta,{key:0,label:s.badge.label,"theme-color":s.current?"brand":"gray",theme:"pill-color",size:"sm"},null,8,["label","theme-color"])):u.createCommentVNode("",!0)],10,x0))),128))],2)])]),t.useSlots?(u.openBlock(),u.createElementBlock("div",m0,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(t.tabs,(s,l)=>(u.openBlock(),u.createElementBlock(u.Fragment,null,[s.current?u.renderSlot(a.$slots,`dsg-tab--content--${String(s.key).trim().toLowerCase().replace(/[^0-9a-zA-Z]/g,"-").replace(/-+/g,"-")}`,{key:0,data:s}):u.createCommentVNode("",!0)],64))),256))])):u.createCommentVNode("",!0)],2))}}),ba=M._sfc_main,Sa=bt,Ia=M._sfc_main$5,Oa=ro,Ta=cs,Na=ea,Da=sr,E0=qs,Ba=ta,Ra=M._sfc_main$3,Pa=M._sfc_main$2,ka=yl,Ma=ru,La=M._sfc_main$4,Fa=su,Va=fu,Ua=M._sfc_main$6,$a=zi._sfc_main,Ha=vu,Ga=ca,za=_u,Wa=Tu,Xa=M._sfc_main$1,Ka=M._sfc_main$7,A0=ll,_0=Mu,C0=s0,b0=Ca,S0=l0,ja=f0,Ya=w0,I0={DsgIcon:ba,DsgMiscIcon:Sa,DsgCreditCardIcon:Ia,DsgAlert:Ta,DsgAccordion:Oa,DsgAnnouncement:Na,DsgAvatar:Da,DsgBadge:Ba,DsgButton:Ra,DsgCheckbox:Pa,DsgCheckboxGroup:ka,DsgDropdown:Ma,DsgInput:La,DsgInputSelect:Fa,DsgInputDropdown:Va,DsgDatepicker:Ua,DsgLabel:$a,DsgLink:Ha,DsgModal:Ga,DsgTag:za,DsgToggle:Wa,DsgTooltip:Xa,DsgBreadcrumb:ja,DsgTab:Ya,DsgFilter:Ka};exports.DsgAccordion=Oa;exports.DsgAlert=Ta;exports.DsgAnnouncement=Na;exports.DsgAvatar=Da;exports.DsgBadge=Ba;exports.DsgBarcodeScanner=C0;exports.DsgBreadcrumb=ja;exports.DsgButton=Ra;exports.DsgCard=b0;exports.DsgCardContainer=S0;exports.DsgCheckbox=Pa;exports.DsgCheckboxGroup=ka;exports.DsgCreditCardIcon=Ia;exports.DsgDatepicker=Ua;exports.DsgDropdown=Ma;exports.DsgFilter=Ka;exports.DsgIcon=ba;exports.DsgIconSelect=E0;exports.DsgInput=La;exports.DsgInputDropdown=Va;exports.DsgInputNumber=A0;exports.DsgInputSelect=Fa;exports.DsgLabel=$a;exports.DsgLink=Ha;exports.DsgMiscIcon=Sa;exports.DsgModal=Ga;exports.DsgProgress=_0;exports.DsgTab=Ya;exports.DsgTag=za;exports.DsgToggle=Wa;exports.DsgTooltip=Xa;exports.default=I0;