@dcodegroup-au/dsg-vue 0.1.17 → 0.1.18
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/components/Elements/DsgInputSelect.vue.d.ts +7 -1
- package/dist/dsg-vue.cjs +12 -12
- package/dist/dsg-vue.css +1 -1
- package/dist/dsg-vue.esm.js +3169 -3150
- package/dist/main.d.ts +6 -2
- package/package.json +7 -7
package/dist/dsg-vue.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const F=require("./DsgTablePerPage.vue_vue_type_style_index_0_lang-DU5GAN6E.cjs"),u=require("vue"),Ka=require("./DsgColoursConfig-D7UiFGB5.cjs"),Hi=require("./DsgLabel.vue_vue_type_style_index_0_lang-DAM6oT0f.cjs"),Ya=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(F._sfc_main,u.normalizeProps(u.guardReactiveProps(t.icon)),null,16)],2))}}),Mt=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r},bt=Mt(Ya,[["__scopeId","data-v-6f50208c"]]),qa={key:0,class:"dsg-accordion--header"},Za={class:"dsg-accordion--row-content"},Qa={key:0,class:"dsg-accordion--expanded"},Ja=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",Za,[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",Qa,[u.renderSlot(a.$slots,"expanded",{row:s,index:l},void 0,!0)])):u.createCommentVNode("",!0)]),_:2},1024)]))),128))])],2))}}),eo=Mt(Ja,[["__scopeId","data-v-d17346aa"]]),to=`<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,15 +9,15 @@
|
|
|
9
9
|
</clipPath>
|
|
10
10
|
</defs>
|
|
11
11
|
</svg>
|
|
12
|
-
`,eo=["href","title"],to={class:"dsg-avatar--image-wrapper",tabindex:"0",ref:"avatarImageWrapperEl"},ro=["src","alt"],no={key:1,class:"dsg-avatar--initials"},io={class:"dsg-avatar--status"},ao={key:0,class:"dsg-avatar--activity"},oo=["innerHTML"],so={key:2,class:"dsg-avatar--logo"},lo=["src","alt"],uo={key:0,class:"dsg-avatar--info"},co={class:"dsg-avatar--title"},fo={class:"dsg-avatar--subtext"},ar=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",to,[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,ro)):u.createCommentVNode("",!0),!t.profileUri&&t.fullName?(u.openBlock(),u.createElementBlock("span",no,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(Xa.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",io,[t.theme==="activity"&&t.isOnline?(u.openBlock(),u.createElementBlock("span",ao)):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(Ja)},null,8,oo)):u.createCommentVNode("",!0),t.theme==="logo"?(u.openBlock(),u.createElementBlock("span",so,[u.createElementVNode("img",{src:t.companyLogoUri,alt:a(),class:"dsg-avatar--company-logo"},null,8,lo)])):u.createCommentVNode("",!0)])]):u.createCommentVNode("",!0)],512),t.title?.length||t.theme==="tile"&&(t.title?.length||t.fullName)?(u.openBlock(),u.createElementBlock("div",uo,[t.title?.length||t.theme==="tile"&&(t.title?.length||t.fullName)?u.renderSlot(v.$slots,"dsg-avatar--title",{key:0},()=>[u.createElementVNode("h3",co,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",fo,u.toDisplayString(t.subText),1)]):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)],8,eo)],2))}}),cr={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"},Se={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},ho={BOUNCE:"bounce",SLIDE:"slide",FLIP:"flip",ZOOM:"zoom",NONE:"none"},vo={dangerouslyHTMLString:!1,multiple:!0,position:cr.TOP_RIGHT,autoClose:5e3,transition:"bounce",hideProgressBar:!1,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,className:"",bodyClassName:"",style:{},progressClassName:"",progressStyle:{},role:"alert",theme:"light"},po={rtl:!1,newestOnTop:!1,toastClassName:""},$i={...vo,...po};Se.DEFAULT;var Y=(t=>(t[t.COLLAPSE_DURATION=300]="COLLAPSE_DURATION",t[t.DEBOUNCE_DURATION=50]="DEBOUNCE_DURATION",t.CSS_NAMESPACE="Toastify",t))(Y||{}),pn=(t=>(t.ENTRANCE_ANIMATION_END="d",t))(pn||{});const go={enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0},xo={enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0},yo={enter:"Toastify--animate Toastify__zoom-enter",exit:"Toastify--animate Toastify__zoom-exit"},mo={enter:"Toastify--animate Toastify__flip-enter",exit:"Toastify--animate Toastify__flip-exit"},Kn="Toastify--animate Toastify__none-enter";function Hi(t,e=!1){var r;let n=go;if(!t||typeof t=="string")switch(t){case"flip":n=mo;break;case"zoom":n=yo;break;case"slide":n=xo;break}else n=t;if(e)n.enter=Kn;else if(n.enter===Kn){const i=(r=n.exit.split("__")[1])==null?void 0:r.split("-")[0];n.enter=`Toastify--animate Toastify__${i}-enter`}return n}function wo(t){return t.containerId||String(t.position)}const Lr="will-unmount";function Eo(t=cr.TOP_RIGHT){return!!document.querySelector(`.${Y.CSS_NAMESPACE}__toast-container--${t}`)}function Ao(t=cr.TOP_RIGHT){return`${Y.CSS_NAMESPACE}__toast-container--${t}`}function Co(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 _o(t){var e;const{position:r,containerClassName:n,rtl:i=!1,style:a={}}=t,o=Y.CSS_NAMESPACE,s=Ao(r),l=document.querySelector(`.${o}`),c=document.querySelector(`.${s}`),f=!!c&&!((e=c.className)!=null&&e.includes(Lr)),d=l||document.createElement("div"),v=document.createElement("div");v.className=Co(r,n,i),v.dataset.testid=`${Y.CSS_NAMESPACE}__toast-container--${r}`,v.id=wo(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 gn(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",gn,!1);try{or[i].unmount(),(n=document.getElementById(i))==null||n.remove(),delete or[i],delete ye[i]}catch{}}const or=u.reactive({});function bo(t,e){const r=document.getElementById(String(e));r&&(or[r.id]=t)}function xn(t,e=!0){const r=String(t);if(!or[r])return;const n=document.getElementById(r);n&&n.classList.add(Lr),e?(Io(t),n&&n.addEventListener("animationend",gn,!1)):gn(r),qe.items=qe.items.filter(i=>i.containerId!==t)}function So(t){for(const e in or)xn(e,t);qe.items=[]}function Gi(t,e){const r=document.getElementById(t.toastId);if(r){let n=t;n={...n,...Hi(n.transition)};const i=n.appendPosition?`${n.exit}--${n.position}`:n.exit;r.className+=` ${i}`,e&&e(r)}}function Io(t){for(const e in ye)if(e===t)for(const r of ye[e]||[])Gi(r)}function Oo(t){const e=Bt().find(r=>r.toastId===t);return e?.containerId}function kn(t){return document.getElementById(t)}function To(t){const e=kn(t.containerId);return e&&e.classList.contains(Lr)}function Yn(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 No(t){return t?qe.items.filter(e=>e.containerId===t).length>0:qe.items.length>0}function Do(){if(qe.items.length>0){const t=qe.items.shift();_r(t?.toastContent,t?.toastProps)}}const ye=u.reactive({}),qe=u.reactive({items:[]});function Bt(){const t=u.toRaw(ye);return Object.values(t).reduce((e,r)=>[...e,...r],[])}function Bo(t){return Bt().find(e=>e.toastId===t)}function _r(t,e={}){if(To(e)){const r=kn(e.containerId);r&&r.addEventListener("animationend",yn.bind(null,t,e),!1)}else yn(t,e)}function yn(t,e={}){const r=kn(e.containerId);r&&r.removeEventListener("animationend",yn.bind(null,t,e),!1);const n=ye[e.containerId]||[],i=n.length>0;if(!i&&!Eo(e.position)){const a=_o(e),o=u.createApp(Qo,e);e.useHandler&&e.useHandler(o),o.mount(a),bo(o,a.id)}i&&!e.updateId&&(e.position=n[0].position),u.nextTick(()=>{e.updateId?ke.update(e):ke.add(t,e)})}const ke={add(t,e){const{containerId:r=""}=e;r&&(ye[r]=ye[r]||[],ye[r].find(n=>n.toastId===e.toastId)||setTimeout(()=>{var n,i;e.newestOnTop?(n=ye[r])==null||n.unshift(e):(i=ye[r])==null||i.push(e),e.onOpen&&e.onOpen(Yn(e))},e.delay||0))},remove(t){if(t){const e=Oo(t);if(e){const r=ye[e];let n=r.find(i=>i.toastId===t);ye[e]=r.filter(i=>i.toastId!==t),!ye[e].length&&!No(e)&&xn(e,!1),Do(),u.nextTick(()=>{n!=null&&n.onClose&&(n.onClose(Yn(n)),n=void 0)})}}},update(t={}){const{containerId:e=""}=t;if(e&&t.updateId){ye[e]=ye[e]||[];const r=ye[e].find(a=>a.toastId===t.toastId),n=r?.position!==t.position||r?.transition!==t.transition,i={...t,disabledEnterTransition:!n,updateId:void 0};ke.dismissForce(t?.toastId),setTimeout(()=>{ee(i.content,i)},t.delay||0)}},clear(t,e=!0){t?xn(t,e):So(e)},dismissCallback(t){var e;const r=(e=t.currentTarget)==null?void 0:e.id,n=document.getElementById(r);n&&(n.removeEventListener("animationend",ke.dismissCallback,!1),setTimeout(()=>{ke.remove(r)}))},dismiss(t){if(t){const e=Bt();for(const r of e)if(r.toastId===t){Gi(r,n=>{n.addEventListener("animationend",ke.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",ke.dismissCallback,!1),ke.remove(t));break}}}},Ro=u.reactive({useHandler:void 0}),zi=u.reactive({}),Br=u.reactive({});function Wi(){return Math.random().toString(36).substring(2,9)}function Po(t){return typeof t=="number"&&!isNaN(t)}function mn(t){return typeof t=="string"}function Ot(t){return typeof t=="function"}function Fr(...t){return u.mergeProps(...t)}function br(t){return typeof t=="object"&&(!!(t!=null&&t.render)||!!(t!=null&&t.setup)||typeof t?.type=="object")}function ko(t={}){zi[`${Y.CSS_NAMESPACE}-default-options`]=t}function Mo(){return zi[`${Y.CSS_NAMESPACE}-default-options`]||$i}function Lo(){const t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;return document.documentElement.classList.contains("dark")||t?"dark":"light"}var Sr=(t=>(t[t.Enter=0]="Enter",t[t.Exit=1]="Exit",t))(Sr||{});const Xi={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:cr.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:Se.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}},Fo={autoClose:{type:[Number,Boolean],required:!0},isRunning:{type:Boolean,required:!1,default:void 0},type:{type:String,required:!1,default:Se.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}},Vo=u.defineComponent({name:"ProgressBar",props:Fo,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)}}),Uo=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)])])}}),Vr=({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 $o(t){return u.createVNode(Vr,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 Ho(t){return u.createVNode(Vr,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 Go(t){return u.createVNode(Vr,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 zo(t){return u.createVNode(Vr,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 Wo(){return u.createVNode("div",{class:`${Y.CSS_NAMESPACE}__spinner`},null)}const Ir={info:Ho,warning:$o,success:Go,error:zo,spinner:Wo},Xo=t=>t in Ir;function jo({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 Ir.spinner();if(n!==!1){if(br(n))i=u.toRaw(n);else if(Ot(n)){const s=n;o.type=a?"loading":e,i=s(o),i=!i&&a?Ir.spinner():i}else u.isVNode(n)?i=u.cloneVNode(n,o):mn(n)||Po(n)?i=n:Xo(e)&&(i=Ir[e](o));return i}}const Ko=()=>{};function Yo(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 qo(t){const e=u.ref(!1),r=u.ref(!1),n=u.ref(!1),i=u.ref(Sr.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||Ko,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(pn.ENTRANCE_ANIMATION_END,g,{once:!0});const A=_=>{const b=v();_.target===b&&(b.dispatchEvent(new Event(pn.ENTRANCE_ANIMATION_END)),b.removeEventListener("animationend",A),b.removeEventListener("animationcancel",A),i.value===Sr.Enter&&_.type!=="animationcancel"&&b.classList.remove(...m))},E=()=>{const _=v();_.classList.add(...m),_.addEventListener("animationend",A),_.addEventListener("animationcancel",A)};t.pauseOnFocusLoss&&h(),E()}function d(){if(!v())return;const m=()=>{const E=v();E.removeEventListener("animationend",m),a.collapse?Yo(E,o,a.collapseDuration):o()},A=()=>{const E=v();i.value=Sr.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 Zo=u.defineComponent({name:"ToastItem",inheritAttrs:!1,props:Xi,setup(t){const e=u.ref(),r=u.computed(()=>!!t.isLoading),n=u.computed(()=>t.progress!==void 0&&t.progress!==null),i=u.computed(()=>jo(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}=qo({toastRef:e,loading:r,done:()=>{ke.remove(t.toastId)},...Hi(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(" ")},[br(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"},[br(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(Uo,{theme:t.theme,closeToast:f=>{f.stopPropagation(),f.preventDefault(),l()}},null),br(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(Vo,{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 nr=0;function ji(){typeof window>"u"||(nr&&window.cancelAnimationFrame(nr),nr=window.requestAnimationFrame(ji),Br.lastUrl!==window.location.href&&(Br.lastUrl=window.location.href,ke.clear()))}const Qo=u.defineComponent({name:"ToastifyContainer",inheritAttrs:!1,props:Xi,setup(t){const e=u.computed(()=>t.containerId),r=u.computed(()=>ye[e.value]||[]),n=u.computed(()=>r.value.filter(i=>i.position===t.position));return u.onMounted(()=>{typeof window<"u"&&t.clearOnUrlChange&&window.requestAnimationFrame(ji)}),u.onUnmounted(()=>{typeof window<"u"&&nr&&(window.cancelAnimationFrame(nr),Br.lastUrl="")}),()=>u.createVNode(u.Fragment,null,[n.value.map(i=>{const{toastId:a=""}=i;return u.createVNode(Zo,u.mergeProps({key:a},i),null)})])}});let Wr=!1;const Ki={isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1};function Yi(){const t=[];return Bt().forEach(e=>{const r=document.getElementById(e.containerId);r&&!r.classList.contains(Lr)&&t.push(e)}),t}function Jo(t){const e=Yi().length,r=t??0;return r>0&&e+qe.items.length>=r}function es(t){Jo(t.limit)&&!t.updateId&&qe.items.push({toastId:t.toastId,containerId:t.containerId,toastContent:t.content,toastProps:t})}function dt(t,e,r={}){if(Wr)return;r=Fr(Mo(),{type:e},u.toRaw(r)),(!r.toastId||typeof r.toastId!="string"&&typeof r.toastId!="number")&&(r.toastId=Wi()),r={...r,...r.type==="loading"?Ki:{},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=Lo()),es(r),Br.lastUrl=window.location.href,r.multiple?qe.items.length?r.updateId&&_r(t,r):_r(t,r):(Wr=!0,ee.clearAll(void 0,!1),setTimeout(()=>{_r(t,r)},0),setTimeout(()=>{Wr=!1},390)),r.toastId}const ee=(t,e)=>dt(t,Se.DEFAULT,e);ee.info=(t,e)=>dt(t,Se.DEFAULT,{...e,type:Se.INFO});ee.error=(t,e)=>dt(t,Se.DEFAULT,{...e,type:Se.ERROR});ee.warning=(t,e)=>dt(t,Se.DEFAULT,{...e,type:Se.WARNING});ee.warn=ee.warning;ee.success=(t,e)=>dt(t,Se.DEFAULT,{...e,type:Se.SUCCESS});ee.loading=(t,e)=>dt(t,Se.DEFAULT,Fr(e,Ki));ee.dark=(t,e)=>dt(t,Se.DEFAULT,Fr(e,{theme:Dt.DARK}));ee.remove=t=>{t?ke.dismiss(t):ke.clear()};ee.clearAll=(t,e)=>{u.nextTick(()=>{ke.clear(t,e)})};ee.isActive=t=>{let e=!1;return e=Yi().findIndex(r=>r.toastId===t)>-1,e};ee.update=(t,e={})=>{setTimeout(()=>{const r=Bo(t);if(r){const n=u.toRaw(r),{content:i}=n,a={...n,...e,toastId:e.toastId||t,updateId:Wi()},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=ts;function ts(t,{pending:e,error:r,success:n},i){var a,o,s;let l;const c={...i||{},autoClose:!1};e&&(l=mn(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=mn(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=cr;ee.THEME=Dt;ee.TYPE=Se;ee.TRANSITIONS=ho;const rs={install(t,e={}){Ro.useHandler=e.useHandler||(()=>{}),ns(e)}};typeof window<"u"&&(window.Vue3Toastify=rs);function ns(t={}){const e=Fr($i,t);ko(e)}const is={class:"dsg-alert__wrapper"},as=["innerHTML"],qi=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",is,[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,as)):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)]))}}),os=new class Yt{info(e="",r="",n={}){Yt.showToast("gray",e,r,n)}error(e="",r="",n={}){Yt.showToast("error",e,r,n)}warning(e="",r="",n={}){Yt.showToast("warning",e,r,n)}success(e="",r="",n={}){Yt.showToast("success",e,r,n)}static showToast(e,r,n,i){const a={hasCloseButton:!1,position:"top-right",maxWidthClass:"",...i};ee(qi,{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 Xr(t){return t===0?!1:Array.isArray(t)&&t.length===0?!0:!t}function ss(t){return(...e)=>!t(...e)}function ls(t,e){return t===void 0&&(t="undefined"),t===null&&(t="null"),t===!1&&(t="false"),t.toString().toLowerCase().indexOf(e.trim())!==-1}function us(t){return t.filter(e=>!e.$isLabel)}function jr(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 qn=(...t)=>e=>t.reduce((r,n)=>n(r),e);var cs={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 Xr(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?jr(this.groupValues,this.groupLabel)(r):r,r=this.hideSelected?r.filter(ss(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 qn(this.filterGroups(e,r,this.groupValues,this.groupLabel,this.customLabel),jr(this.groupValues,this.groupLabel))(t)},flatAndStrip(t){return qn(jr(this.groupValues,this.groupLabel),us)(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(Xr(t))return"";if(t.isTag)return t.label;if(t.$isLabel)return t.$groupLabel;const e=this.customLabel(t,this.label);return Xr(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=>ls(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}:[]})}}},fs={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}}},Mn={name:"vue-multiselect",mixins:[cs,fs],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},contentWrapperClass:{type:[String,Array,Object],default:""}},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 ds=["tabindex","aria-expanded","aria-owns","aria-activedescendant"],hs={ref:"tags",class:"multiselect__tags"},vs={class:"multiselect__tags-wrap"},ps=["textContent"],gs=["onKeydown","onMousedown"],xs=["textContent"],ys={class:"multiselect__spinner"},ms=["name","id","spellcheck","placeholder","required","value","disabled","tabindex","aria-label","aria-controls"],ws=["id","aria-multiselectable"],Es={key:0},As={class:"multiselect__option"},Cs=["aria-selected","id","role"],_s=["onClick","onMouseenter","data-select","data-selected","data-deselect"],bs=["data-select","data-deselect","onMouseenter","onMousedown"],Ss={class:"multiselect__option"},Is={class:"multiselect__option"};function Os(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"])),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",hs,[u.renderSlot(t.$slots,"selection",{search:t.search,remove:t.removeElement,values:a.visibleValues,isOpen:t.isOpen},()=>[u.withDirectives(u.createElementVNode("div",vs,[(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,ps),u.createElementVNode("i",{tabindex:"1",onKeydown:u.withKeys(u.withModifiers(l=>t.removeElement(o),["prevent"]),["enter"]),onMousedown:u.withModifiers(l=>t.removeElement(o),["prevent"]),class:"multiselect__tag-icon"},null,40,gs)],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,xs)]):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",ys,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[8]||(e[8]=u.withKeys(u.withModifiers(o=>t.addPointerElement(o),["prevent","stop","self"]),["enter"])),e[9]||(e[9]=u.withKeys(u.withModifiers(o=>t.removeLastElement(),["stop"]),["delete"]))],class:"multiselect__input","aria-controls":"listbox-"+t.id},null,44,ms)):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:u.normalizeClass(["multiselect__content-wrapper",r.contentWrapperClass]),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",Es,[u.createElementVNode("span",As,[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,_s)),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,bs)):u.createCommentVNode("v-if",!0)],8,Cs))),128)):u.createCommentVNode("v-if",!0),u.withDirectives(u.createElementVNode("li",null,[u.createElementVNode("span",Ss,[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",Is,[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,ws)],38)):u.createCommentVNode("v-if",!0)]),_:3})],8,["disabled"]))],42,ds)}Mn.render=Os;const Ts={class:"user-picker"},Ns={class:"user-option"},Ds=["data-initials"],Bs=["src"],Rs={class:"meta"},Ps={class:"name"},ks={key:0,class:"email"},Ms={class:"tags"},Ls=["data-initials"],Fs=["src"],Vs={key:0,class:"inline-block relative"},Us={class:"placeholder"},$s={key:0,class:"single-display"},Hs=["data-initials"],Gs=["src"],zs={key:0,class:"name"},Ws={class:"placeholder"},Xs=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",Ts,[u.createVNode(u.unref(Mn),{"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",Ns,[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,Bs)):u.createCommentVNode("",!0)],8,Ds),u.createElementVNode("div",Rs,[u.createElementVNode("div",Ps,u.toDisplayString(c(w,t.labelKey)),1),w.secondaryText?(u.openBlock(),u.createElementBlock("div",ks,u.toDisplayString(w.secondaryText),1)):u.createCommentVNode("",!0)])])]),selection:u.withCtx(({values:w,isOpen:m})=>[u.createElementVNode("div",Ms,[(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,Fs)):u.createCommentVNode("",!0)],8,Ls))),256)),t.multiple&&w.length>0?(u.openBlock(),u.createElementBlock("div",Vs,[u.createElementVNode("div",Us,[u.createVNode(M._sfc_main,{icon:"plus",size:"xs"})])])):u.createCommentVNode("",!0)])]),singleLabel:u.withCtx(({option:w})=>[w?(u.openBlock(),u.createElementBlock("div",$s,[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,Gs)):u.createCommentVNode("",!0)],8,Hs),t.hideSelectedLabel?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("span",zs,u.toDisplayString(c(w,t.labelKey)),1))])):u.createCommentVNode("",!0)]),placeholder:u.withCtx(()=>[u.createElementVNode("div",Ws,[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"])]))}}),js=Mt(Xs,[["__scopeId","data-v-3ede6fde"]]),Ks={class:"dsg-badge--before"},Ys={key:2,class:"dsg-badge--dot"},qs={key:1,class:"dsg-badge--label"},Zs={class:"dsg-badge--after"},Qs={key:1,class:"dsg-badge--close-wrapper"},Zi=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",Ks,[t.avatarUri?(u.openBlock(),u.createBlock(ar,{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",Ys)):u.createCommentVNode("",!0)])]):u.createCommentVNode("",!0),t.type==="standard"?(u.openBlock(),u.createElementBlock("label",qs,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",Zs,[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",Qs,[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))}}),Js={class:"dsg-input-number--control"},el=["disabled"],tl=["value","disabled"],rl=["disabled"],nl={key:0,class:"dsg-input-number--label"},il=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",Js,[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,el),u.createElementVNode("input",{type:"number",value:t.modelValue,onInput:o,disabled:r.disabled,class:"dsg-input-number--input flex-1"},null,40,tl),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,rl)]),t.label!==void 0||s.$slots.label?(u.openBlock(),u.createElementBlock("div",nl,[u.renderSlot(s.$slots,"label",{},()=>[u.createTextVNode(u.toDisplayString(t.label),1)])])):u.createCommentVNode("",!0)],2))}}),al={key:0,class:"dsg-checkbox-group--form-wrapper"},ol={class:"dsg-checkbox-group--header"},sl={class:"dsg-checkbox-group--header-title-wrapper"},ll={class:"dsg-checkbox-group--title"},ul=["innerHTML"],cl={class:"dsg-checkbox-group--options"},fl=["onClick"],dl=["textContent"],hl=["innerHTML","data"],vl=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",al,[u.createElementVNode("div",ol,[u.renderSlot(i.$slots,"dsg-checkbox-group--header",{},()=>[u.createElementVNode("div",sl,[u.createElementVNode("h3",ll,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,ul)):u.createCommentVNode("",!0)])]),u.createElementVNode("div",cl,[(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,dl)]),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,hl)):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,fl))),256)):u.createCommentVNode("",!0)]))}});var pl="2.0.6",gl=500,Zn="user-agent",Rt="",Qn="?",ue={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},Te="browser",Je="cpu",Xe="device",Ue="engine",Pe="os",Tt="result",N="name",S="type",D="vendor",B="version",be="architecture",sr="major",T="model",qt="console",$="mobile",Z="tablet",ce="smarttv",ze="wearable",vr="xr",Zt="embedded",Et="inapp",Ln="brands",yt="formFactors",Fn="fullVersionList",Nt="platform",Vn="platformVersion",Ur="bitness",ht="sec-ch-ua",xl=ht+"-full-version-list",yl=ht+"-arch",ml=ht+"-"+Ur,wl=ht+"-form-factors",El=ht+"-"+$,Al=ht+"-"+T,Qi=ht+"-"+Nt,Cl=Qi+"-version",Ji=[Ln,Fn,$,T,Nt,Vn,be,yt,Ur],pr="Amazon",At="Apple",Jn="ASUS",ei="BlackBerry",vt="Google",ti="Huawei",Kr="Lenovo",ri="Honor",gr="LG",Yr="Microsoft",qr="Motorola",Zr="Nvidia",ni="OnePlus",Qr="OPPO",Vt="Samsung",ii="Sharp",Ut="Sony",Jr="Xiaomi",en="Zebra",ai="Chrome",oi="Chromium",it="Chromecast",Or="Edge",$t="Firefox",Ht="Opera",tn="Facebook",si="Sogou",Ct="Mobile ",Gt=" Browser",wn="Windows",_l=typeof window!==ue.UNDEFINED,Ne=_l&&window.navigator?window.navigator:void 0,lt=Ne&&Ne.userAgentData?Ne.userAgentData:void 0,bl=function(t,e){var r={},n=e;if(!Rr(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},$r=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},En=function(t,e){if(typeof t===ue.OBJECT&&t.length>0){for(var r in t)if(ut(e)==ut(t[r]))return!0;return!1}return fr(t)?ut(e)==ut(t):!1},Rr=function(t,e){for(var r in t)return/^(browser|cpu|device|engine|os)$/.test(r)||(e?Rr(t[r]):!1)},fr=function(t){return typeof t===ue.STRING},rn=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=Pr(r[n]).split(";v=");e[n]={brand:i[0],version:i[1]}}else e[n]=Pr(r[n]);return e}},ut=function(t){return fr(t)?t.toLowerCase():t},nn=function(t){return fr(t)?Pt(/[^\d\.]/g,t).split(".")[0]:void 0},et=function(t){for(var e in t)if(t.hasOwnProperty(e)){var r=t[e];typeof r==ue.OBJECT&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this},Pt=function(t,e){return fr(e)?e.replace(t,Rt):e},zt=function(t){return Pt(/\\?\"/g,t)},Pr=function(t,e){return t=Pt(/^\s\s*/,String(t)),typeof e===ue.UNDEFINED?t:t.substring(0,e)},an=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===ue.OBJECT&&o.length>0?o.length===2?typeof o[1]==ue.FUNCTION?this[o[0]]=o[1].call(this,l):this[o[0]]=o[1]:o.length>=3&&(typeof o[1]===ue.FUNCTION&&!(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}},We=function(t,e){for(var r in e)if(typeof e[r]===ue.OBJECT&&e[r].length>0){for(var n=0;n<e[r].length;n++)if(En(e[r][n],t))return r===Qn?void 0:r}else if(En(e[r],t))return r===Qn?void 0:r;return e.hasOwnProperty("*")?e["*"]:t},li={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:""},ui={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Sl={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"},ci={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[B,[N,Ct+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[B,[N,Or+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[B,[N,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[N,B],[/opios[\/ ]+([\w\.]+)/i],[B,[N,Ht+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[B,[N,Ht+" GX"]],[/\bopr\/([\w\.]+)/i],[B,[N,Ht]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[B,[N,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[B,[N,"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|palemoon)\/([-\w\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[N,B],[/quark(?:pc)?\/([-\w\.]+)/i],[B,[N,"Quark"]],[/\bddg\/([\w\.]+)/i],[B,[N,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[B,[N,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[B,[N,"WeChat"]],[/konqueror\/([\w\.]+)/i],[B,[N,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[B,[N,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[B,[N,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[B,[N,"Smart "+Kr+Gt]],[/(avast|avg)\/([\w\.]+)/i],[[N,/(.+)/,"$1 Secure"+Gt],B],[/\bfocus\/([\w\.]+)/i],[B,[N,$t+" Focus"]],[/\bopt\/([\w\.]+)/i],[B,[N,Ht+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[B,[N,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[B,[N,"Dolphin"]],[/coast\/([\w\.]+)/i],[B,[N,Ht+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[B,[N,"MIUI"+Gt]],[/fxios\/([\w\.-]+)/i],[B,[N,Ct+$t]],[/\bqihoobrowser\/?([\w\.]*)/i],[B,[N,"360"]],[/\b(qq)\/([\w\.]+)/i],[[N,/(.+)/,"$1Browser"],B],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[N,/(.+)/,"$1"+Gt],B],[/samsungbrowser\/([\w\.]+)/i],[B,[N,Vt+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[B,[N,si+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[N,si+" Mobile"],B],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[N,B],[/(lbbrowser|rekonq)/i],[N],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[B,N],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[N,tn],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,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[N,B,[S,Et]],[/\bgsa\/([\w\.]+) .*safari\//i],[B,[N,"GSA"],[S,Et]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[B,[N,"TikTok"],[S,Et]],[/\[(linkedin)app\]/i],[N,[S,Et]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[N,/(.+)/,"Zalo"],B,[S,Et]],[/(chromium)[\/ ]([-\w\.]+)/i],[N,B],[/headlesschrome(?:\/([\w\.]+)| )/i],[B,[N,ai+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[B,[N,Or+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[N,ai+" WebView"],B],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[B,[N,"Android"+Gt]],[/chrome\/([\w\.]+) mobile/i],[B,[N,Ct+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[N,B],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[B,[N,Ct+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[N,Ct+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[B,N],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[N,[B,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[N,B],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[N,Ct+$t],B],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[N,"Netscape"],B],[/(wolvic|librewolf)\/([\w\.]+)/i],[N,B],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[B,[N,$t+" 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|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[N,[B,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[N,[B,/[^\d\.]+./,Rt]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[be,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[be,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[be,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[be,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[be,"arm"]],[/ sun4\w[;\)]/i],[[be,"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],[[be,/ower/,Rt,ut]],[/mc680.0/i],[[be,"68k"]],[/winnt.+\[axp/i],[[be,"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,[D,Vt],[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,[D,Vt],[S,$]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[T,[D,At],[S,$]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[T,[D,At],[S,Z]],[/(macintosh);/i],[T,[D,At]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[T,[D,ii],[S,$]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[T,[D,ri],[S,Z]],[/honor([-\w ]+)[;\)]/i],[T,[D,ri],[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,[D,ti],[S,Z]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[T,[D,ti],[S,$]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[T,/_/g," "],[D,Jr],[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|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[T,/_/g," "],[D,Jr],[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,[D,ni],[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,[D,Qr],[S,$]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[T,[D,We,{OnePlus:["203","304","403","404","413","415"],"*":Qr}],[S,Z]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[T,[D,"BLU"],[S,$]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[T,[D,"Vivo"],[S,$]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[T,[D,"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,[D,Kr],[S,Z]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[T,[D,Kr],[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,[D,qr],[S,$]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[T,[D,qr],[S,Z]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[T,[D,gr],[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,[D,gr],[S,$]],[/(nokia) (t[12][01])/i],[D,T,[S,Z]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[T,/_/g," "],[S,$],[D,"Nokia"]],[/(pixel (c|tablet))\b/i],[T,[D,vt],[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,[D,vt],[S,$]],[/(google) (pixelbook( go)?)/i],[D,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,[D,Ut],[S,$]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[T,"Xperia Tablet"],[D,Ut],[S,Z]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[T,[D,pr],[S,Z]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[T,/(.+)/g,"Fire Phone $1"],[D,pr],[S,$]],[/(playbook);[-\w\),; ]+(rim)/i],[T,D,[S,Z]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[T,[D,ei],[S,$]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[T,[D,Jn],[S,Z]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[T,[D,Jn],[S,$]],[/(nexus 9)/i],[T,[D,"HTC"],[S,Z]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[D,[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,[D,"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,[D,"TCL"],[S,$]],[/(itel) ((\w+))/i],[[D,ut],T,[S,We,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[T,[D,"Acer"],[S,Z]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[T,[D,"Meizu"],[S,$]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[T,[D,"Ulefone"],[S,$]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[T,[D,"Energizer"],[S,$]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[T,[D,"Cat"],[S,$]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[T,[D,"Smartfren"],[S,$]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[T,[D,"Nothing"],[S,$]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[T,[D,"Archos"],[S,Z]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[T,[D,"Archos"],[S,$]],[/; (n159v)/i],[T,[D,"HMD"],[S,$]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[D,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|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[D,T,[S,$]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[D,T,[S,Z]],[/(surface duo)/i],[T,[D,Yr],[S,Z]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[T,[D,"Fairphone"],[S,$]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[T,[D,Zr],[S,Z]],[/(sprint) (\w+)/i],[D,T,[S,$]],[/(kin\.[onetw]{3})/i],[[T,/\./g," "],[D,Yr],[S,$]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[T,[D,en],[S,Z]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[T,[D,en],[S,$]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[D,[S,ce]],[/hbbtv.+maple;(\d+)/i],[[T,/^/,"SmartTV"],[D,Vt],[S,ce]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[D,T,[S,ce]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[D,gr],[S,ce]],[/(apple) ?tv/i],[D,[T,At+" TV"],[S,ce]],[/crkey.*devicetype\/chromecast/i],[[T,it+" Third Generation"],[D,vt],[S,ce]],[/crkey.*devicetype\/([^/]*)/i],[[T,/^/,"Chromecast "],[D,vt],[S,ce]],[/fuchsia.*crkey/i],[[T,it+" Nest Hub"],[D,vt],[S,ce]],[/crkey/i],[[T,it],[D,vt],[S,ce]],[/(portaltv)/i],[T,[D,tn],[S,ce]],[/droid.+aft(\w+)( bui|\))/i],[T,[D,pr],[S,ce]],[/(shield \w+ tv)/i],[T,[D,Zr],[S,ce]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[T,[D,ii],[S,ce]],[/(bravia[\w ]+)( bui|\))/i],[T,[D,Ut],[S,ce]],[/(mi(tv|box)-?\w+) bui/i],[T,[D,Jr],[S,ce]],[/Hbbtv.*(technisat) (.*);/i],[D,T,[S,ce]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[D,/.+\/(\w+)/,"$1",We,{LG:"lge"}],[T,Pr],[S,ce]],[/(playstation \w+)/i],[T,[D,Ut],[S,qt]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[T,[D,Yr],[S,qt]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[D,T,[S,qt]],[/droid.+; (shield)( bui|\))/i],[T,[D,Zr],[S,qt]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[T,[D,Vt],[S,ze]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[D,T,[S,ze]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[T,[D,Qr],[S,ze]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[T,[D,At],[S,ze]],[/(opwwe\d{3})/i],[T,[D,ni],[S,ze]],[/(moto 360)/i],[T,[D,qr],[S,ze]],[/(smartwatch 3)/i],[T,[D,Ut],[S,ze]],[/(g watch r)/i],[T,[D,gr],[S,ze]],[/droid.+; (wt63?0{2,3})\)/i],[T,[D,en],[S,ze]],[/droid.+; (glass) \d/i],[T,[D,vt],[S,vr]],[/(pico) ([\w ]+) os\d/i],[D,T,[S,vr]],[/(quest( \d| pro)?s?).+vr/i],[T,[D,tn],[S,vr]],[/mobile vr; rv.+firefox/i],[[S,vr]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[D,[S,Zt]],[/(aeobc)\b/i],[T,[D,pr],[S,Zt]],[/(homepod).+mac os/i],[T,[D,At],[S,Zt]],[/windows iot/i],[[S,Zt]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[T,[S,ce]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[S,ce]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[T,[S,We,{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,[D,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[B,[N,Or+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[N,B],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[B,[N,"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],[N,B],[/ladybird\//i],[[N,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[B,N]],os:[[/(windows nt) (6\.[23]); arm/i],[[N,/N/,"R"],[B,We,li]],[/(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],[N,B],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[B,/(;|\))/g,"",We,li],[N,wn]],[/(windows ce)\/?([\d\.]*)/i],[N,B],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[B,/_/g,"."],[N,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[N,"macOS"],[B,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[B,[N,it+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[B,[N,it+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[B,[N,it+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[B,[N,it+" Linux"]],[/crkey\/([\d\.]+)/i],[B,[N,it]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[B,N],[/(ubuntu) ([\w\.]+) like android/i],[[N,/(.+)/,"$1 Touch"],B],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[N,B],[/\(bb(10);/i],[B,[N,ei]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[B,[N,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[B,[N,$t+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[B,[N,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[B,We,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[N,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[B,[N,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[N,"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],[N,B],[/(sunos) ?([\d\.]*)/i],[[N,"Solaris"],B],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[N,B]]},xr=(function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return et.call(t.init,[[Te,[N,B,sr,S]],[Je,[be]],[Xe,[S,T,D]],[Ue,[N,B]],[Pe,[N,B]]]),et.call(t.isIgnore,[[Te,[B,sr]],[Ue,[B]],[Pe,[B]]]),et.call(t.isIgnoreRgx,[[Te,/ ?browser$/i],[Pe,/ ?os$/i]]),et.call(t.toString,[[Te,[N,B]],[Je,[be]],[Xe,[D,T]],[Ue,[N,B]],[Pe,[N,B]]]),t})(),Il=function(t,e){var r=xr.init[e],n=xr.isIgnore[e]||0,i=xr.isIgnoreRgx[e]||0,a=xr.toString[e]||0;function o(){et.call(this,r)}return o.prototype.getItem=function(){return t},o.prototype.withClientHints=function(){return lt?lt.getHighEntropyValues(Ji).then(function(s){return t.setCH(new ea(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)&&!En(n,c)&&ut(i?Pt(i,this[c]):this[c])==ut(i?Pt(i,s):s)){if(l=!0,s!=ue.UNDEFINED)break}else if(s==ue.UNDEFINED&&l){l=!l;break}return l},o.prototype.toString=function(){var s=Rt;for(var l in a)typeof this[a[l]]!==ue.UNDEFINED&&(s+=(s?" ":Rt)+this[a[l]]);return s||ue.UNDEFINED}),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 ea(t,e){if(t=t||{},et.call(this,Ji),e)et.call(this,[[Ln,rn(t[ht])],[Fn,rn(t[xl])],[$,/\?1/.test(t[El])],[T,zt(t[Al])],[Nt,zt(t[Qi])],[Vn,zt(t[Cl])],[be,zt(t[yl])],[yt,rn(t[wl])],[Ur,zt(t[ml])]]);else for(var r in t)this.hasOwnProperty(r)&&typeof t[r]!==ue.UNDEFINED&&(this[r]=t[r])}function fi(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(Ne&&Ne.userAgent==this.ua)switch(this.itemType){case Te:Ne.brave&&typeof Ne.brave.isBrave==ue.FUNCTION&&this.set(N,"Brave");break;case Xe:!this.get(S)&<&<[$]&&this.set(S,$),this.get(T)=="Macintosh"&&Ne&&typeof Ne.standalone!==ue.UNDEFINED&&Ne.maxTouchPoints&&Ne.maxTouchPoints>2&&this.set(T,"iPad").set(S,Z);break;case Pe:!this.get(N)&<&<[Nt]&&this.set(N,lt[Nt]);break;case Tt:var i=this.data,a=function(o){return i[o].getItem().detectFeature().get()};this.set(Te,a(Te)).set(Je,a(Je)).set(Xe,a(Xe)).set(Ue,a(Ue)).set(Pe,a(Pe))}return this},this.parseUA=function(){switch(this.itemType!=Tt&&an.call(this.data,this.ua,this.rgxMap),this.itemType){case Te:this.set(sr,nn(this.get(B)));break;case Pe:if(this.get(N)=="iOS"&&this.get(B)=="18.6"){var i=/\) Version\/([\d\.]+)/.exec(this.ua);i&&parseInt(i[1].substring(0,2),10)>=26&&this.set(B,i[1])}break}return this},this.parseCH=function(){var i=this.uaCH,a=this.rgxMap;switch(this.itemType){case Te:case Ue:var o=i[Fn]||i[Ln],s;if(o)for(var l=0;l<o.length;l++){var c=o[l].brand||o[l],f=o[l].version;this.itemType==Te&&!/not.a.brand/i.test(c)&&(!s||/Chrom/.test(s)&&c!=oi||s==Or&&/WebView2/.test(c))&&(c=We(c,Sl),s=this.get(N),s&&!/Chrom/.test(s)&&/Chrom/.test(c)||this.set(N,c).set(B,f).set(sr,nn(f)),s=c),this.itemType==Ue&&c==oi&&this.set(B,f)}break;case Je:var d=i[be];d&&(d&&i[Ur]=="64"&&(d+="64"),an.call(this.data,d+";",a));break;case Xe:if(i[$]&&this.set(S,$),i[T]&&(this.set(T,i[T]),!this.get(S)||!this.get(D))){var v={};an.call(v,"droid 9; "+i[T]+")",a),!this.get(S)&&v.type&&this.set(S,v.type),!this.get(D)&&v.vendor&&this.set(D,v.vendor)}if(i[yt]){var h;if(typeof i[yt]!="string")for(var p=0;!h&&p<i[yt].length;)h=We(i[yt][p++],ui);else h=We(i[yt],ui);this.set(S,h)}break;case Pe:var g=i[Nt];if(g){var y=i[Vn];g==wn&&(y=parseInt(nn(y),10)>=13?"11":"10"),this.set(N,g).set(B,y)}this.get(N)==wn&&i[T]=="Xbox"&&this.set(N,"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(Te,m(Te)).set(Je,m(Je)).set(Xe,m(Xe)).set(Ue,m(Ue)).set(Pe,m(Pe))}return this},et.call(this,[["itemType",t],["ua",e],["uaCH",n],["rgxMap",r],["data",Il(this,t)]]),this}function tt(t,e,r){if(typeof t===ue.OBJECT?(Rr(t,!0)?(typeof e===ue.OBJECT&&(r=e),e=t):(r=t,e=void 0),t=void 0):typeof t===ue.STRING&&!Rr(e,!0)&&(r=e,e=void 0),r)if(typeof r.append===ue.FUNCTION){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 tt))return new tt(t,e,r).getResult();var o=typeof t===ue.STRING?t:r&&r[Zn]?r[Zn]:Ne&&Ne.userAgent?Ne.userAgent:Rt,s=new ea(r,!0),l=e?bl(ci,e):ci,c=function(f){return f==Tt?function(){return new fi(f,o,l,s).set("ua",o).set(Te,this.getBrowser()).set(Je,this.getCPU()).set(Xe,this.getDevice()).set(Ue,this.getEngine()).set(Pe,this.getOS()).get()}:function(){return new fi(f,o,l[f],s).parseUA().get()}};return et.call(this,[["getBrowser",c(Te)],["getCPU",c(Je)],["getDevice",c(Xe)],["getEngine",c(Ue)],["getOS",c(Pe)],["getResult",c(Tt)],["getUA",function(){return o}],["setUA",function(f){return fr(f)&&(o=Pr(f,gl)),this}]]).setUA(o),this}tt.VERSION=pl;tt.BROWSER=$r([N,B,sr,S]);tt.CPU=$r([be]);tt.DEVICE=$r([T,D,S,qt,$,ce,Z,ze,Zt]);tt.ENGINE=tt.OS=$r([N,B]);const on=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function sn(t,e,r,n){t.addEventListener?t.addEventListener(e,r,n):t.attachEvent&&t.attachEvent("on".concat(e),r)}function Wt(t,e,r,n){t.removeEventListener?t.removeEventListener(e,r,n):t.detachEvent&&t.detachEvent("on".concat(e),r)}function ta(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 ra(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 Ol(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 lr={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,"-":on?173:189,"=":on?61:187,";":on?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},He={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,meta:91,command:91},Qt={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},me={16:!1,18:!1,17:!1,91:!1},se={};for(let t=1;t<20;t++)lr["f".concat(t)]=111+t;let oe=[],ir=null,na="all";const Qe=new Map,Lt=t=>lr[t.toLowerCase()]||He[t.toLowerCase()]||t.toUpperCase().charCodeAt(0),Tl=t=>Object.keys(lr).find(e=>lr[e]===t),Nl=t=>Object.keys(He).find(e=>He[e]===t);function ia(t){na=t||"all"}function ur(){return na||"all"}function Dl(){return oe.slice(0)}function Bl(){return oe.map(t=>Tl(t)||Nl(t)||String.fromCharCode(t))}function Rl(){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=>Lt(s))})})}),t}function Pl(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 kl(t){return typeof t=="string"&&(t=Lt(t)),oe.indexOf(t)!==-1}function Ml(t,e){let r,n;t||(t=ur());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 Un(s)}):n++;ur()===t&&ia(e||"all")}function Ll(t){let e=t.keyCode||t.which||t.charCode;t.key&&t.key.toLowerCase()==="capslock"&&(e=Lt(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 me){me[e]=!1;for(const n in He)He[n]===e&&(je[n]=!1)}}function aa(t){if(typeof t>"u")Object.keys(se).forEach(i=>{Array.isArray(se[i])&&se[i].forEach(a=>yr(a)),delete se[i]}),Un(null);else if(Array.isArray(t))t.forEach(i=>{i.key&&yr(i)});else if(typeof t=="object")t.key&&yr(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=""),yr({key:t,scope:i,method:a,splitKey:"+"})}}const yr=t=>{let{key:e,scope:r,method:n,splitKey:i="+"}=t;ra(e).forEach(o=>{const s=o.split(i),l=s.length,c=s[l-1],f=c==="*"?"*":Lt(c);if(!se[f])return;r||(r=ur());const d=l>1?ta(He,s):[],v=[];se[f]=se[f].filter(h=>{const g=(n?h.method===n:!0)&&h.scope===r&&Ol(h.mods,d);return g&&v.push(h.element),!g}),v.forEach(h=>Un(h))})};function di(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 me)Object.prototype.hasOwnProperty.call(me,a)&&(!me[a]&&e.mods.indexOf(+a)>-1||me[a]&&e.mods.indexOf(+a)===-1)&&(i=!1);(e.mods.length===0&&!me[16]&&!me[18]&&!me[17]&&!me[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 hi(t,e){const r=se["*"];let n=t.keyCode||t.which||t.charCode;if(t.key&&t.key.toLowerCase()==="capslock"||!je.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=Qt[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 Qt||c===n))}),n in me){me[n]=!0;for(const s in He)if(Object.prototype.hasOwnProperty.call(He,s)){const l=Qt[He[s]];je[s]=t[l]}if(!r)return}for(const s in me)Object.prototype.hasOwnProperty.call(me,s)&&(me[s]=t[Qt[s]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(oe.indexOf(17)===-1&&oe.push(17),oe.indexOf(18)===-1&&oe.push(18),me[17]=!0,me[18]=!0);const i=ur();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)&&di(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(Lt(f[v]));d.sort().join("")===oe.sort().join("")&&di(t,l,i,e)}}function je(t,e,r){oe=[];const n=ra(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&&aa(t,a);s<n.length;s++)t=n[s].split(f),i=[],t.length>1&&(i=ta(He,t)),t=t[t.length-1],t=t==="*"?"*":Lt(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 hi(g,o)},p=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;hi(g,o),Ll(g)};Qe.set(o,{keydownListener:h,keyupListenr:p,capture:d}),sn(o,"keydown",h,d),sn(o,"keyup",p,d)}if(!ir){const h=()=>{oe=[]};ir={listener:h,capture:d},sn(window,"focus",h,d)}}}function Fl(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 Un(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&&(Wt(t,"keyup",i,a),Wt(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&&(Wt(i,"keyup",o,s),Wt(i,"keydown",a,s),Qe.delete(i))}),Qe.clear(),Object.keys(se).forEach(i=>delete se[i]),ir)){const{listener:i,capture:a}=ir;Wt(window,"focus",i,a),ir=null}}const ln={getPressedKeyString:Bl,setScope:ia,getScope:ur,deleteScope:Ml,getPressedKeyCodes:Dl,getAllKeyCodes:Rl,isPressed:kl,filter:Pl,trigger:Fl,unbind:aa,keyMap:lr,modifier:He,modifierMap:Qt};for(const t in ln)Object.prototype.hasOwnProperty.call(ln,t)&&(je[t]=ln[t]);if(typeof window<"u"){const t=window.hotkeys;je.noConflict=e=>(e&&window.hotkeys===je&&(window.hotkeys=t),je),window.hotkeys=je}const Vl={class:"dsg-dropdown--trigger",tabindex:"0"},Ul={class:"dsg-dropdown--menu"},$l={key:0,class:"dsg-dropdown--menu-header"},Hl={key:1,class:"dsg-dropdown--menu-header"},Gl={class:"dsg-dropdown--menu-title"},zl={key:2,class:"dsg-dropdown--menu-header subsection"},Wl={class:"dsg-dropdown--menu-subtitle"},Xl=["href","target","tabindex","title","onClick"],jl={key:0,class:"dsg-dropdown--menu-item--content"},Kl={key:0,class:"dsg-dropdown--menu-item--icon"},Yl={class:"dsg-dropdown--menu-item--label"},ql={class:"dsg-dropdown--menu-item--hotkey"},Zl={key:0},Ql={key:1,class:"dsg-dropdown--menu-item--content"},Jl=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,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&&je(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(()=>{je.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",Ul,[u.renderSlot(h.$slots,"dsg-dropdown-menu--header",{},()=>[t.headerType==="avatar"?(u.openBlock(),u.createElementBlock("div",$l,[t.avatarInfo?(u.openBlock(),u.createBlock(ar,{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",Hl,[u.createElementVNode("h3",Gl,u.toDisplayString(t.headerTitle),1)])):t.headerType==="subsection"?(u.openBlock(),u.createElementBlock("div",zl,[u.createElementVNode("h4",Wl,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",jl,[g.icon?(u.openBlock(),u.createElementBlock("div",Kl,[u.createVNode(M._sfc_main,{icon:g.icon,size:"xs"},null,8,["icon"])])):u.createCommentVNode("",!0),u.createElementVNode("span",Yl,u.toDisplayString(g.label),1),u.createElementVNode("div",ql,[g.hotkey?(u.openBlock(),u.createElementBlock("span",Zl,u.toDisplayString(v(g.hotkey)),1)):u.createCommentVNode("",!0)])])):g.type==="divider"?(u.openBlock(),u.createElementBlock("div",Ql,[...p[1]||(p[1]=[u.createElementVNode("hr",null,null,-1)])])):u.createCommentVNode("",!0)],10,Xl))),128))])])]),default:u.withCtx(()=>[u.createElementVNode("div",Vl,[u.renderSlot(h.$slots,"dsg-dropdown--trigger",{},()=>[t.type==="avatar"?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[t.avatarInfo?(u.openBlock(),u.createBlock(ar,{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))}}),eu={class:"dsg-input--label-wrapper block"},tu=["onMousedown"],ru={class:"option-label"},nu={key:0,class:"dsg-input-select--error-wrapper"},iu=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((_,b,O)=>b===O.indexOf(_))),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 _=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=_(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(),_=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,ve=E.top,Ge=P+8;(z<Ge&&ve>z?"top":"bottom")==="top"?O.style.bottom=`${b-E.top+4}px`:O.style.top=`${E.bottom+4}px`;let rt=!1;if(v.value===window)rt=E.top<b&&E.bottom>0&&E.left<window.innerWidth&&E.right>0;else if(v.value){const nt=v.value.getBoundingClientRect();rt=E.top<nt.bottom&&E.bottom>nt.top&&E.left<nt.right&&E.right>nt.left}else rt=E.top<b&&E.bottom>0&&E.left<window.innerWidth&&E.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,(E.bottom+P+_+2>b?"top":"bottom")==="top"?O.style.bottom=`${_+4}px`:O.style.top=`${_+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,_)=>{o.value=!1,p(),h("close",E,_)},w=M.useDebounceFn(E=>{t.getUrl&&E.length>=2&&M.axios.get(t.getUrl,{params:{term:E,...t.extraParams}}).then(_=>{i.value=_.data}),h("search-change",E)},300),m=(E,_=!0)=>{if(s.value=[],t.allowEmpty===!1&&(E==null||Array.isArray(E)&&E.length===0)&&s.value.push(`${t.label} is required.`),_===!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,_)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(c.value),ref:"dsgInputSelectEl"},[u.createElementVNode("div",eu,[t.label?(u.openBlock(),u.createBlock(Ui._sfc_main,{key:0,label:t.label,size:"sm"},null,8,["label"])):u.createCommentVNode("",!0)]),u.createVNode(u.unref(Mn),u.mergeProps({ref:"multiselectEl",modelValue:r.value,"onUpdate:modelValue":[_[0]||(_[0]=b=>r.value=b),_[3]||(_[3]=b=>m(b,!0))],options:i.value,multiple:t.multiple,onSearchChange:u.unref(w),onOpen:_[1]||(_[1]=b=>g(b)),onClose:_[2]||(_[2]=(b,O)=>y(b,O)),onRemove:_[4]||(_[4]=(b,O)=>h("remove",b,O)),onTag:_[5]||(_[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,tu)]),option:u.withCtx(({option:b})=>[u.createElementVNode("span",ru,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",nu,[(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))}}),au=["name"],ou=["selected"],su=["value","selected"],lu=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,ou)):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,su))),128))],10,au)),[[u.vModelSelect,e.value]])}}),uu=["href","title","target"],cu={key:0,class:"dsg-link--label"},fu=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",cu,u.toDisplayString(t.label),1)):u.createCommentVNode("",!0)])],10,uu))}}),du={key:1,class:"dsg-modal__header-text"},hu={key:0,class:"dsg-modal__header-title"},vu={key:1,class:"dsg-modal__header-description"},pu={key:1,class:"dsg-modal__body"},oa=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",du,[t.title?(u.openBlock(),u.createElementBlock("h3",hu,u.toDisplayString(t.title),1)):u.createCommentVNode("",!0),t.description?(u.openBlock(),u.createElementBlock("p",vu,u.toDisplayString(t.description),1)):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)],2)]),f.$slots.default?(u.openBlock(),u.createElementBlock("div",pu,[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))}}),gu={class:"dsg-tag--before"},xu={class:"dsg-tag--label"},yu={class:"dsg-tag--after"},mu={key:0,class:"dsg-tag--count"},wu=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",gu,[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(ar,{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",xu,u.toDisplayString(t.label),1)]),u.createElementVNode("div",yu,[f.value&&f.value>0?(u.openBlock(),u.createElementBlock("div",mu,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))}}),Eu={class:"dsg-toggle--element"},Au=["checked","disabled"],Cu={key:0,class:"dsg-toggle--label-wrapper"},_u=["innerHTML"],bu=["innerHTML"],Su=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",Eu,[u.createElementVNode("input",{type:"checkbox",class:"dsg-toggle--checkbox",checked:i.value,onChange:a,title:"checkbox",ref:"toggleCheckbox",disabled:t.disabled},null,40,Au),d[0]||(d[0]=u.createElementVNode("span",{class:"dsg-toggle--slider"},null,-1))]),t.label.length?(u.openBlock(),u.createElementBlock("div",Cu,[u.renderSlot(f.$slots,"dsg-toggle--label",{},()=>[u.createElementVNode("h3",{class:"dsg-toggle--label",innerHTML:t.label},null,8,_u)]),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,bu)]):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)],2))}}),Iu={class:"dsg-progress"},Ou={class:"dsg-progress--inner"},Tu={key:0,class:"text-sm text-gray-700 min-w-[60px] text-right"},Nu={key:0},Du={key:1},Bu={key:2},Ru=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",Iu,[u.createElementVNode("div",Ou,[u.createElementVNode("div",{class:"dsg-progress--inner--progress",style:u.normalizeStyle({width:r.value+"%"})},null,4)]),t.showText!=="none"?(u.openBlock(),u.createElementBlock("div",Tu,[t.showText==="number"?(u.openBlock(),u.createElementBlock("span",Nu,u.toDisplayString(t.value)+"/"+u.toDisplayString(t.max),1)):t.showText==="percentage"?(u.openBlock(),u.createElementBlock("span",Du,u.toDisplayString(r.value.toFixed(2))+"%",1)):u.createCommentVNode("",!0),t.textSuffix?(u.openBlock(),u.createElementBlock("span",Bu," "+u.toDisplayString(t.textSuffix),1)):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)]))}});function Pu(t,e){var r=Object.setPrototypeOf;r?r(t,e):t.__proto__=e}function ku(t,e){e===void 0&&(e=t.constructor);var r=Error.captureStackTrace;r&&r(t,e)}var Mu=(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)}})(),Lu=(function(t){Mu(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}),Pu(a,i.prototype),ku(a),a}return e})(Error),Fu=(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){Fu(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})(Lu),Vu=(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)}})(),Ve=(function(t){Vu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ArgumentException",e})(Ie),Uu=(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){Uu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="IllegalArgumentException",e})(Ie),$u=(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})(),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)}})(),we=(function(t){Hu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.getChecksumInstance=function(){return new e},e.kind="ChecksumException",e})(Ie),Gu=(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})(),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)}})(),$n=(function(t){zu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="IndexOutOfBoundsException",e})(Ie),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)}})(),vi=(function(t){Wu(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})($n),Xu=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.")},Be=(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 vi(r);if(n>e)throw new vi(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=Xu(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})(),ge=(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&&Be.equals(this.bits,r.bits)},t.prototype.hashCode=function(){return 31*this.size+Be.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})(),An;(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"})(An||(An={}));const le=An;var 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)}})(),R=(function(t){ju(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.getFormatInstance=function(){return new e},e.kind="FormatException",e})(Ie),Ku=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 he=(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=Ku(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(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})(),Yu=(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)}})(),Tr=(function(t){Yu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="UnsupportedOperationException",e})(Ie),Ye=(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 he?e:he.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(he.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(e.buffer));throw new Tr("Encoding "+this.encodingName(r)+" not supported by fallback.")},t.isDecodeFallbackSupported=function(e){return e.equals(he.UTF8)||e.equals(he.ISO8859_1)||e.equals(he.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 Ye.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 Ye.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=he.SJIS.getName(),t.GB2312="GB2312",t.ISO88591=he.ISO8859_1.getName(),t.EUC_JP="EUC_JP",t.UTF8=he.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
|
|
14
|
-
`),this.buildToString(e,r,n)},t.prototype.buildToString=function(e,r,n){for(var i=new
|
|
15
|
-
`)}return r.toString()},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)}})(),Hn=(function(t){tc(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})(Hr),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.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 Hn(this)},e.DEGREE_TO_RADIANS=Math.PI/180,e})(Hr),ic=(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})(),Ce=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}}},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.")},Ft=(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 Ce(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=ac(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 Ce(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 ic(n.deviceId,n.label)})]}})})},t.prototype.findDeviceById=function(e){return Ce(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 Ce(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 Ce(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 Ce(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 Ce(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 Ce(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 Ce(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 Ce(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 Ce(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 Ce(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 Ce(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 Ve("element with id '"+e+"' not found");if(n.nodeName.toLowerCase()!==r.toLowerCase())throw new Ve("element with id '"+e+"' must be an "+r+" element");return n},t.prototype.decodeFromImage=function(e,r){if(!e&&!r)throw new Ve("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 Ve("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 Ve("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 Ve("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 Ve("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 Ve("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 Ve("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 Ve("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 Ce(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 Ce(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 we||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 we||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 nc(r),i=new ec(n);return new $u(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})(),Re=(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})(),Cn;(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"})(Cn||(Cn={}));const U=Cn;var _n;(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"})(_n||(_n={}));const Ee=_n;var Gr=(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})(),Jt=(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=Jt.addOrSubtract(n,o)}return n}n=r[0];for(var s=r.length,l=this.field,i=1;i<s;i++)n=Jt.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]=Jt.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]=Jt.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})(),oc=(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)}})(),sa=(function(t){oc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ArithmeticException",e})(Ie),sc=(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)}})(),De=(function(t){sc(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 sa;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})(Jt),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)}})(),mr=(function(t){lc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ReedSolomonException",e})(Ie),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)}})(),dr=(function(t){uc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="IllegalStateException",e})(Ie),zr=(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 mr("Bad error location");e[g]=De.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 mr("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 dr("Division algorithm failed to reduce polynomial?")}var w=c.getCoefficient(0);if(w===0)throw new mr("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 mr("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})(),xe;(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"})(xe||(xe={}));var pi=(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 Gr(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=xe.UPPER,i=xe.UPPER,a="",o=0;o<r;)if(i===xe.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===xe.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 xe.LOWER;case"P":return xe.PUNCT;case"M":return xe.MIXED;case"D":return xe.DIGIT;case"B":return xe.BINARY;case"U":default:return xe.UPPER}},t.getCharacter=function(e,r){switch(e){case xe.UPPER:return t.UPPER_TABLE[r];case xe.LOWER:return t.LOWER_TABLE[r];case xe.MIXED:return t.MIXED_TABLE[r];case xe.PUNCT:return t.PUNCT_TABLE[r];case xe.DIGIT:return t.DIGIT_TABLE[r];default:throw new dr("Bad table")}},t.prototype.correctBits=function(e){var r,n;this.ddata.getNbLayers()<=2?(n=6,r=De.AZTEC_DATA_6):this.ddata.getNbLayers()<=8?(n=8,r=De.AZTEC_DATA_8):this.ddata.getNbLayers()<=22?(n=10,r=De.AZTEC_DATA_10):(n=12,r=De.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 zr(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"," ",`
|
|
12
|
+
`,ro=["href","title"],no={class:"dsg-avatar--image-wrapper",tabindex:"0",ref:"avatarImageWrapperEl"},io=["src","alt"],ao={key:1,class:"dsg-avatar--initials"},oo={class:"dsg-avatar--status"},so={key:0,class:"dsg-avatar--activity"},lo=["innerHTML"],uo={key:2,class:"dsg-avatar--logo"},co=["src","alt"],fo={key:0,class:"dsg-avatar--info"},ho={class:"dsg-avatar--title"},vo={class:"dsg-avatar--subtext"},or=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 F.DsgPropSyntaxWarning("DsgAvatar: The 'profile-photo' theme only supports the 'sm', 'md', and 'lg' sizes."),(t.fullName||t.title||t.subText)&&new F.DsgWarning("DsgAvatar: The 'profile-photo' theme will not display the 'title' or 'subText' props.")),t.theme==="logo"&&!t.companyLogoUri&&new F.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 F.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 F.DsgPropSyntaxWarning("DsgAvatar: The 'tile' theme requires either 'title' or 'fullName' prop."),t.size==="xxs"&&(t.title?.length||t.subText?.length)&&new F.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",no,[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,io)):u.createCommentVNode("",!0),!t.profileUri&&t.fullName?(u.openBlock(),u.createElementBlock("span",ao,u.toDisplayString(i(t.fullName)),1)):u.createCommentVNode("",!0),!t.profileUri&&!t.fullName?(u.openBlock(),u.createBlock(F._sfc_main,{key:2,class:"dsg-avatar--user-icon",icon:"user-01",color:u.unref(Ka.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",oo,[t.theme==="activity"&&t.isOnline?(u.openBlock(),u.createElementBlock("span",so)):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(to)},null,8,lo)):u.createCommentVNode("",!0),t.theme==="logo"?(u.openBlock(),u.createElementBlock("span",uo,[u.createElementVNode("img",{src:t.companyLogoUri,alt:a(),class:"dsg-avatar--company-logo"},null,8,co)])):u.createCommentVNode("",!0)])]):u.createCommentVNode("",!0)],512),t.title?.length||t.theme==="tile"&&(t.title?.length||t.fullName)?(u.openBlock(),u.createElementBlock("div",fo,[t.title?.length||t.theme==="tile"&&(t.title?.length||t.fullName)?u.renderSlot(v.$slots,"dsg-avatar--title",{key:0},()=>[u.createElementVNode("h3",ho,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",vo,u.toDisplayString(t.subText),1)]):u.createCommentVNode("",!0)])):u.createCommentVNode("",!0)],8,ro)],2))}}),fr={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},Tt={LIGHT:"light",DARK:"dark",COLORED:"colored",AUTO:"auto"},Se={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},po={BOUNCE:"bounce",SLIDE:"slide",FLIP:"flip",ZOOM:"zoom",NONE:"none"},go={dangerouslyHTMLString:!1,multiple:!0,position:fr.TOP_RIGHT,autoClose:5e3,transition:"bounce",hideProgressBar:!1,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,className:"",bodyClassName:"",style:{},progressClassName:"",progressStyle:{},role:"alert",theme:"light"},xo={rtl:!1,newestOnTop:!1,toastClassName:""},Gi={...go,...xo};Se.DEFAULT;var q=(t=>(t[t.COLLAPSE_DURATION=300]="COLLAPSE_DURATION",t[t.DEBOUNCE_DURATION=50]="DEBOUNCE_DURATION",t.CSS_NAMESPACE="Toastify",t))(q||{}),pn=(t=>(t.ENTRANCE_ANIMATION_END="d",t))(pn||{});const yo={enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0},mo={enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0},wo={enter:"Toastify--animate Toastify__zoom-enter",exit:"Toastify--animate Toastify__zoom-exit"},Eo={enter:"Toastify--animate Toastify__flip-enter",exit:"Toastify--animate Toastify__flip-exit"},qn="Toastify--animate Toastify__none-enter";function zi(t,e=!1){var r;let n=yo;if(!t||typeof t=="string")switch(t){case"flip":n=Eo;break;case"zoom":n=wo;break;case"slide":n=mo;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 Ao(t){return t.containerId||String(t.position)}const Ur="will-unmount";function Co(t=fr.TOP_RIGHT){return!!document.querySelector(`.${q.CSS_NAMESPACE}__toast-container--${t}`)}function _o(t=fr.TOP_RIGHT){return`${q.CSS_NAMESPACE}__toast-container--${t}`}function bo(t,e,r=!1){const n=[`${q.CSS_NAMESPACE}__toast-container`,`${q.CSS_NAMESPACE}__toast-container--${t}`,r?`${q.CSS_NAMESPACE}__toast-container--rtl`:null].filter(Boolean).join(" ");return Ot(e)?e({position:t,rtl:r,defaultClassName:n}):`${n} ${e||""}`}function So(t){var e;const{position:r,containerClassName:n,rtl:i=!1,style:a={}}=t,o=q.CSS_NAMESPACE,s=_o(r),l=document.querySelector(`.${o}`),c=document.querySelector(`.${s}`),f=!!c&&!((e=c.className)!=null&&e.includes(Ur)),d=l||document.createElement("div"),v=document.createElement("div");v.className=bo(r,n,i),v.dataset.testid=`${q.CSS_NAMESPACE}__toast-container--${r}`,v.id=Ao(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=q.CSS_NAMESPACE,document.body.appendChild(d)),f||d.appendChild(v),v}function gn(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",gn,!1);try{sr[i].unmount(),(n=document.getElementById(i))==null||n.remove(),delete sr[i],delete ye[i]}catch{}}const sr=u.reactive({});function Io(t,e){const r=document.getElementById(String(e));r&&(sr[r.id]=t)}function xn(t,e=!0){const r=String(t);if(!sr[r])return;const n=document.getElementById(r);n&&n.classList.add(Ur),e?(To(t),n&&n.addEventListener("animationend",gn,!1)):gn(r),qe.items=qe.items.filter(i=>i.containerId!==t)}function Oo(t){for(const e in sr)xn(e,t);qe.items=[]}function Wi(t,e){const r=document.getElementById(t.toastId);if(r){let n=t;n={...n,...zi(n.transition)};const i=n.appendPosition?`${n.exit}--${n.position}`:n.exit;r.className+=` ${i}`,e&&e(r)}}function To(t){for(const e in ye)if(e===t)for(const r of ye[e]||[])Wi(r)}function No(t){const e=Nt().find(r=>r.toastId===t);return e?.containerId}function Ln(t){return document.getElementById(t)}function Do(t){const e=Ln(t.containerId);return e&&e.classList.contains(Ur)}function Zn(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 Bo(t){return t?qe.items.filter(e=>e.containerId===t).length>0:qe.items.length>0}function Ro(){if(qe.items.length>0){const t=qe.items.shift();Sr(t?.toastContent,t?.toastProps)}}const ye=u.reactive({}),qe=u.reactive({items:[]});function Nt(){const t=u.toRaw(ye);return Object.values(t).reduce((e,r)=>[...e,...r],[])}function Po(t){return Nt().find(e=>e.toastId===t)}function Sr(t,e={}){if(Do(e)){const r=Ln(e.containerId);r&&r.addEventListener("animationend",yn.bind(null,t,e),!1)}else yn(t,e)}function yn(t,e={}){const r=Ln(e.containerId);r&&r.removeEventListener("animationend",yn.bind(null,t,e),!1);const n=ye[e.containerId]||[],i=n.length>0;if(!i&&!Co(e.position)){const a=So(e),o=u.createApp(es,e);e.useHandler&&e.useHandler(o),o.mount(a),Io(o,a.id)}i&&!e.updateId&&(e.position=n[0].position),u.nextTick(()=>{e.updateId?Pe.update(e):Pe.add(t,e)})}const Pe={add(t,e){const{containerId:r=""}=e;r&&(ye[r]=ye[r]||[],ye[r].find(n=>n.toastId===e.toastId)||setTimeout(()=>{var n,i;e.newestOnTop?(n=ye[r])==null||n.unshift(e):(i=ye[r])==null||i.push(e),e.onOpen&&e.onOpen(Zn(e))},e.delay||0))},remove(t){if(t){const e=No(t);if(e){const r=ye[e];let n=r.find(i=>i.toastId===t);ye[e]=r.filter(i=>i.toastId!==t),!ye[e].length&&!Bo(e)&&xn(e,!1),Ro(),u.nextTick(()=>{n!=null&&n.onClose&&(n.onClose(Zn(n)),n=void 0)})}}},update(t={}){const{containerId:e=""}=t;if(e&&t.updateId){ye[e]=ye[e]||[];const r=ye[e].find(a=>a.toastId===t.toastId),n=r?.position!==t.position||r?.transition!==t.transition,i={...t,disabledEnterTransition:!n,updateId:void 0};Pe.dismissForce(t?.toastId),setTimeout(()=>{te(i.content,i)},t.delay||0)}},clear(t,e=!0){t?xn(t,e):Oo(e)},dismissCallback(t){var e;const r=(e=t.currentTarget)==null?void 0:e.id,n=document.getElementById(r);n&&(n.removeEventListener("animationend",Pe.dismissCallback,!1),setTimeout(()=>{Pe.remove(r)}))},dismiss(t){if(t){const e=Nt();for(const r of e)if(r.toastId===t){Wi(r,n=>{n.addEventListener("animationend",Pe.dismissCallback,!1)});break}}},dismissForce(t){if(t){const e=Nt();for(const r of e)if(r.toastId===t){const n=document.getElementById(t);n&&(n.remove(),n.removeEventListener("animationend",Pe.dismissCallback,!1),Pe.remove(t));break}}}},ko=u.reactive({useHandler:void 0}),Xi=u.reactive({}),kr=u.reactive({});function ji(){return Math.random().toString(36).substring(2,9)}function Mo(t){return typeof t=="number"&&!isNaN(t)}function mn(t){return typeof t=="string"}function Ot(t){return typeof t=="function"}function $r(...t){return u.mergeProps(...t)}function Ir(t){return typeof t=="object"&&(!!(t!=null&&t.render)||!!(t!=null&&t.setup)||typeof t?.type=="object")}function Lo(t={}){Xi[`${q.CSS_NAMESPACE}-default-options`]=t}function Fo(){return Xi[`${q.CSS_NAMESPACE}-default-options`]||Gi}function Vo(){const t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;return document.documentElement.classList.contains("dark")||t?"dark":"light"}var Or=(t=>(t[t.Enter=0]="Enter",t[t.Exit=1]="Exit",t))(Or||{});const Ki={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:fr.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:Tt.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:Se.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}},Uo={autoClose:{type:[Number,Boolean],required:!0},isRunning:{type:Boolean,required:!1,default:void 0},type:{type:String,required:!1,default:Se.DEFAULT},theme:{type:String,required:!1,default:Tt.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}},$o=u.defineComponent({name:"ProgressBar",props:Uo,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(()=>[`${q.CSS_NAMESPACE}__progress-bar`,t.controlledProgress?`${q.CSS_NAMESPACE}__progress-bar--controlled`:`${q.CSS_NAMESPACE}__progress-bar--animated`,`${q.CSS_NAMESPACE}__progress-bar-theme--${t.theme}`,`${q.CSS_NAMESPACE}__progress-bar--${t.type}`,t.rtl?`${q.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)}}),Ho=u.defineComponent({name:"CloseButton",inheritAttrs:!1,props:{theme:{type:String,required:!1,default:Tt.AUTO},type:{type:String,required:!1,default:Tt.LIGHT},ariaLabel:{type:String,required:!1,default:"close"},closeToast:{type:Function,required:!1,default:void 0}},setup(t){return()=>u.createVNode("button",{class:`${q.CSS_NAMESPACE}__close-button ${q.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)])])}}),Hr=({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 Go(t){return u.createVNode(Hr,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 zo(t){return u.createVNode(Hr,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 Wo(t){return u.createVNode(Hr,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 Xo(t){return u.createVNode(Hr,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 jo(){return u.createVNode("div",{class:`${q.CSS_NAMESPACE}__spinner`},null)}const Tr={info:zo,warning:Go,success:Wo,error:Xo,spinner:jo},Ko=t=>t in Tr;function Yo({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 Tr.spinner();if(n!==!1){if(Ir(n))i=u.toRaw(n);else if(Ot(n)){const s=n;o.type=a?"loading":e,i=s(o),i=!i&&a?Tr.spinner():i}else u.isVNode(n)?i=u.cloneVNode(n,o):mn(n)||Mo(n)?i=n:Ko(e)&&(i=Tr[e](o));return i}}const qo=()=>{};function Zo(t,e,r=q.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 Qo(t){const e=u.ref(!1),r=u.ref(!1),n=u.ref(!1),i=u.ref(Or.Enter),a=u.reactive({...t,appendPosition:t.appendPosition||!1,collapse:typeof t.collapse>"u"?!0:t.collapse,collapseDuration:t.collapseDuration||q.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(pn.ENTRANCE_ANIMATION_END,g,{once:!0});const E=I=>{const B=v();I.target===B&&(B.dispatchEvent(new Event(pn.ENTRANCE_ANIMATION_END)),B.removeEventListener("animationend",E),B.removeEventListener("animationcancel",E),i.value===Or.Enter&&I.type!=="animationcancel"&&B.classList.remove(...m))},C=()=>{const I=v();I.classList.add(...m),I.addEventListener("animationend",E),I.addEventListener("animationcancel",E)};t.pauseOnFocusLoss&&h(),C()}function d(){if(!v())return;const m=()=>{const C=v();C.removeEventListener("animationend",m),a.collapse?Zo(C,o,a.collapseDuration):o()},E=()=>{const C=v();i.value=Or.Exit,C&&(C.className+=` ${l.value}`,C.addEventListener("animationend",m))};r.value||(n.value?m():setTimeout(E))}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=Nt();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&&p()}),{isIn:r,isRunning:e,hideToast:w,eventHandlers:c}}const Jo=u.defineComponent({name:"ToastItem",inheritAttrs:!1,props:Ki,setup(t){const e=u.ref(),r=u.computed(()=>!!t.isLoading),n=u.computed(()=>t.progress!==void 0&&t.progress!==null),i=u.computed(()=>Yo(t)),a=u.computed(()=>[`${q.CSS_NAMESPACE}__toast`,`${q.CSS_NAMESPACE}__toast-theme--${t.theme}`,`${q.CSS_NAMESPACE}__toast--${t.type}`,t.rtl?`${q.CSS_NAMESPACE}__toast--rtl`:void 0,t.toastClassName||""].filter(Boolean).join(" ")),{isRunning:o,isIn:s,hideToast:l,eventHandlers:c}=Qo({toastRef:e,loading:r,done:()=>{Pe.remove(t.toastId)},...zi(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:`${q.CSS_NAMESPACE}__toast-body ${t.bodyClassName||""}`},[i.value!=null&&u.createVNode("div",{"data-testid":`toast-icon-${t.type}`,class:[`${q.CSS_NAMESPACE}__toast-icon`,t.isLoading?"":`${q.CSS_NAMESPACE}--animate-icon ${q.CSS_NAMESPACE}__zoom-enter`].join(" ")},[Ir(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"},[Ir(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(Ho,{theme:t.theme,closeToast:f=>{f.stopPropagation(),f.preventDefault(),l()}},null),Ir(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($o,{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 ir=0;function Yi(){typeof window>"u"||(ir&&window.cancelAnimationFrame(ir),ir=window.requestAnimationFrame(Yi),kr.lastUrl!==window.location.href&&(kr.lastUrl=window.location.href,Pe.clear()))}const es=u.defineComponent({name:"ToastifyContainer",inheritAttrs:!1,props:Ki,setup(t){const e=u.computed(()=>t.containerId),r=u.computed(()=>ye[e.value]||[]),n=u.computed(()=>r.value.filter(i=>i.position===t.position));return u.onMounted(()=>{typeof window<"u"&&t.clearOnUrlChange&&window.requestAnimationFrame(Yi)}),u.onUnmounted(()=>{typeof window<"u"&&ir&&(window.cancelAnimationFrame(ir),kr.lastUrl="")}),()=>u.createVNode(u.Fragment,null,[n.value.map(i=>{const{toastId:a=""}=i;return u.createVNode(Jo,u.mergeProps({key:a},i),null)})])}});let Kr=!1;const qi={isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1};function Zi(){const t=[];return Nt().forEach(e=>{const r=document.getElementById(e.containerId);r&&!r.classList.contains(Ur)&&t.push(e)}),t}function ts(t){const e=Zi().length,r=t??0;return r>0&&e+qe.items.length>=r}function rs(t){ts(t.limit)&&!t.updateId&&qe.items.push({toastId:t.toastId,containerId:t.containerId,toastContent:t.content,toastProps:t})}function ct(t,e,r={}){if(Kr)return;r=$r(Fo(),{type:e},u.toRaw(r)),(!r.toastId||typeof r.toastId!="string"&&typeof r.toastId!="number")&&(r.toastId=ji()),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=Vo()),rs(r),kr.lastUrl=window.location.href,r.multiple?qe.items.length?r.updateId&&Sr(t,r):Sr(t,r):(Kr=!0,te.clearAll(void 0,!1),setTimeout(()=>{Sr(t,r)},0),setTimeout(()=>{Kr=!1},390)),r.toastId}const te=(t,e)=>ct(t,Se.DEFAULT,e);te.info=(t,e)=>ct(t,Se.DEFAULT,{...e,type:Se.INFO});te.error=(t,e)=>ct(t,Se.DEFAULT,{...e,type:Se.ERROR});te.warning=(t,e)=>ct(t,Se.DEFAULT,{...e,type:Se.WARNING});te.warn=te.warning;te.success=(t,e)=>ct(t,Se.DEFAULT,{...e,type:Se.SUCCESS});te.loading=(t,e)=>ct(t,Se.DEFAULT,$r(e,qi));te.dark=(t,e)=>ct(t,Se.DEFAULT,$r(e,{theme:Tt.DARK}));te.remove=t=>{t?Pe.dismiss(t):Pe.clear()};te.clearAll=(t,e)=>{u.nextTick(()=>{Pe.clear(t,e)})};te.isActive=t=>{let e=!1;return e=Zi().findIndex(r=>r.toastId===t)>-1,e};te.update=(t,e={})=>{setTimeout(()=>{const r=Po(t);if(r){const n=u.toRaw(r),{content:i}=n,a={...n,...e,toastId:e.toastId||t,updateId:ji()},o=a.render||i;delete a.render,ct(o,a.type,a)}},0)};te.done=t=>{te.update(t,{isLoading:!1,progress:1})};te.promise=ns;function ns(t,{pending:e,error:r,success:n},i){var a,o,s;let l;const c={...i||{},autoClose:!1};e&&(l=mn(e)?te.loading(e,c):te.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){te.remove(l);return}const y={type:h,...f,...i,data:g},w=mn(p)?{render:p}:p;return l?te.update(l,{...y,...w,isLoading:!1}):te(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}te.POSITION=fr;te.THEME=Tt;te.TYPE=Se;te.TRANSITIONS=po;const is={install(t,e={}){ko.useHandler=e.useHandler||(()=>{}),as(e)}};typeof window<"u"&&(window.Vue3Toastify=is);function as(t={}){const e=$r(Gi,t);Lo(e)}const os={class:"dsg-alert__wrapper"},ss=["innerHTML"],Qi=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",os,[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,ss)):u.createCommentVNode("",!0)]),t.contentProps.hasCloseButton?(u.openBlock(),u.createElementBlock("button",{key:4,onClick:a,class:"dsg-alert__close-button"},[u.createVNode(F._sfc_main,{icon:"x-close",size:"sm"})])):u.createCommentVNode("",!0)]))}}),ls=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};te(Qi,{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 Yr(t){return t===0?!1:Array.isArray(t)&&t.length===0?!0:!t}function us(t){return(...e)=>!t(...e)}function cs(t,e){return t===void 0&&(t="undefined"),t===null&&(t="null"),t===!1&&(t="false"),t.toString().toLowerCase().indexOf(e.trim())!==-1}function fs(t){return t.filter(e=>!e.$isLabel)}function qr(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 Qn=(...t)=>e=>t.reduce((r,n)=>n(r),e);var ds={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 Yr(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?qr(this.groupValues,this.groupLabel)(r):r,r=this.hideSelected?r.filter(us(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 Qn(this.filterGroups(e,r,this.groupValues,this.groupLabel,this.customLabel),qr(this.groupValues,this.groupLabel))(t)},flatAndStrip(t){return Qn(qr(this.groupValues,this.groupLabel),fs)(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(Yr(t))return"";if(t.isTag)return t.label;if(t.$isLabel)return t.$groupLabel;const e=this.customLabel(t,this.label);return Yr(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=>cs(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}:[]})}}},hs={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}}},Fn={name:"vue-multiselect",mixins:[ds,hs],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},contentWrapperClass:{type:[String,Array,Object],default:""}},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 vs=["tabindex","aria-expanded","aria-owns","aria-activedescendant"],ps={ref:"tags",class:"multiselect__tags"},gs={class:"multiselect__tags-wrap"},xs=["textContent"],ys=["onKeydown","onMousedown"],ms=["textContent"],ws={class:"multiselect__spinner"},Es=["name","id","spellcheck","placeholder","required","value","disabled","tabindex","aria-label","aria-controls"],As=["id","aria-multiselectable"],Cs={key:0},_s={class:"multiselect__option"},bs=["aria-selected","id","role"],Ss=["onClick","onMouseenter","data-select","data-selected","data-deselect"],Is=["data-select","data-deselect","onMouseenter","onMousedown"],Os={class:"multiselect__option"},Ts={class:"multiselect__option"};function Ns(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"])),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",ps,[u.renderSlot(t.$slots,"selection",{search:t.search,remove:t.removeElement,values:a.visibleValues,isOpen:t.isOpen},()=>[u.withDirectives(u.createElementVNode("div",gs,[(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,xs),u.createElementVNode("i",{tabindex:"1",onKeydown:u.withKeys(u.withModifiers(l=>t.removeElement(o),["prevent"]),["enter"]),onMousedown:u.withModifiers(l=>t.removeElement(o),["prevent"]),class:"multiselect__tag-icon"},null,40,ys)],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,ms)]):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",ws,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[8]||(e[8]=u.withKeys(u.withModifiers(o=>t.addPointerElement(o),["prevent","stop","self"]),["enter"])),e[9]||(e[9]=u.withKeys(u.withModifiers(o=>t.removeLastElement(),["stop"]),["delete"]))],class:"multiselect__input","aria-controls":"listbox-"+t.id},null,44,Es)):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:u.normalizeClass(["multiselect__content-wrapper",r.contentWrapperClass]),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",Cs,[u.createElementVNode("span",_s,[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,Ss)),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,Is)):u.createCommentVNode("v-if",!0)],8,bs))),128)):u.createCommentVNode("v-if",!0),u.withDirectives(u.createElementVNode("li",null,[u.createElementVNode("span",Os,[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",Ts,[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,As)],38)):u.createCommentVNode("v-if",!0)]),_:3})],8,["disabled"]))],42,vs)}Fn.render=Ns;const Ds={class:"user-picker"},Bs={class:"user-option"},Rs=["data-initials"],Ps=["src"],ks={class:"meta"},Ms={class:"name"},Ls={key:0,class:"email"},Fs={class:"tags"},Vs=["data-initials"],Us=["src"],$s={key:0,class:"inline-block relative"},Hs={class:"placeholder"},Gs={key:0,class:"single-display"},zs=["data-initials"],Ws=["src"],Xs={key:0,class:"name"},js={class:"placeholder"},Ks=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(([E,C])=>y.searchParams.set(E,String(C)));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 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(()=>v(g),r.delay))},p=g=>{n("update:modelValue",g),n("change",g)};return(g,y)=>(u.openBlock(),u.createElementBlock("div",Ds,[u.createVNode(u.unref(Fn),{"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",Bs,[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,Ps)):u.createCommentVNode("",!0)],8,Rs),u.createElementVNode("div",ks,[u.createElementVNode("div",Ms,u.toDisplayString(c(w,t.labelKey)),1),w.secondaryText?(u.openBlock(),u.createElementBlock("div",Ls,u.toDisplayString(w.secondaryText),1)):u.createCommentVNode("",!0)])])]),selection:u.withCtx(({values:w,isOpen:m})=>[u.createElementVNode("div",Fs,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(w,E=>(u.openBlock(),u.createElementBlock("div",{class:"avatar","data-initials":f(c(E,t.labelKey))},[c(E,t.iconKey)?(u.openBlock(),u.createElementBlock("img",{key:0,src:c(E,t.iconKey),alt:""},null,8,Us)):u.createCommentVNode("",!0)],8,Vs))),256)),t.multiple&&w.length>0?(u.openBlock(),u.createElementBlock("div",$s,[u.createElementVNode("div",Hs,[u.createVNode(F._sfc_main,{icon:"plus",size:"xs"})])])):u.createCommentVNode("",!0)])]),singleLabel:u.withCtx(({option:w})=>[w?(u.openBlock(),u.createElementBlock("div",Gs,[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,Ws)):u.createCommentVNode("",!0)],8,zs),t.hideSelectedLabel?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("span",Xs,u.toDisplayString(c(w,t.labelKey)),1))])):u.createCommentVNode("",!0)]),placeholder:u.withCtx(()=>[u.createElementVNode("div",js,[u.createVNode(F._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"])]))}}),Ys=Mt(Ks,[["__scopeId","data-v-3ede6fde"]]),qs={class:"dsg-badge--before"},Zs={key:2,class:"dsg-badge--dot"},Qs={key:1,class:"dsg-badge--label"},Js={class:"dsg-badge--after"},el={key:1,class:"dsg-badge--close-wrapper"},Ji=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 F.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 F.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 F.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(or,{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(F._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",Zs)):u.createCommentVNode("",!0)])]):u.createCommentVNode("",!0),t.type==="standard"?(u.openBlock(),u.createElementBlock("label",Qs,u.toDisplayString(t.label),1)):u.createCommentVNode("",!0),t.type==="add"?(u.openBlock(),u.createBlock(F._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(F._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",Js,[t.iconAfter?(u.openBlock(),u.createBlock(F._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",el,[t.hasClose?(u.openBlock(),u.createBlock(F._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))}}),tl={class:"dsg-input-number--control"},rl=["disabled"],nl=["value","disabled"],il=["disabled"],al={key:0,class:"dsg-input-number--label"},ol=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",tl,[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(F._sfc_main,{key:0,icon:"minus",size:"sm"}))],8,rl),u.createElementVNode("input",{type:"number",value:t.modelValue,onInput:o,disabled:r.disabled,class:"dsg-input-number--input flex-1"},null,40,nl),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(F._sfc_main,{key:0,icon:"plus",size:"sm"}))],8,il)]),t.label!==void 0||s.$slots.label?(u.openBlock(),u.createElementBlock("div",al,[u.renderSlot(s.$slots,"label",{},()=>[u.createTextVNode(u.toDisplayString(t.label),1)])])):u.createCommentVNode("",!0)],2))}}),sl={key:0,class:"dsg-checkbox-group--form-wrapper"},ll={class:"dsg-checkbox-group--header"},ul={class:"dsg-checkbox-group--header-title-wrapper"},cl={class:"dsg-checkbox-group--title"},fl=["innerHTML"],dl={class:"dsg-checkbox-group--options"},hl=["onClick"],vl=["textContent"],pl=["innerHTML","data"],gl=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",sl,[u.createElementVNode("div",ll,[u.renderSlot(i.$slots,"dsg-checkbox-group--header",{},()=>[u.createElementVNode("div",ul,[u.createElementVNode("h3",cl,u.toDisplayString(t.title),1),t.tooltip?(u.openBlock(),u.createBlock(F._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,fl)):u.createCommentVNode("",!0)])]),u.createElementVNode("div",dl,[(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(F._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(F._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,vl)]),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,pl)):u.createCommentVNode("",!0)])])),(u.openBlock(),u.createElementBlock("div",{key:s,class:"dsg-checkbox-group--panel-right"},[u.createVNode(F._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,hl))),256)):u.createCommentVNode("",!0)]))}});var xl="2.0.7",yl=500,Jn="user-agent",Dt="",ei="?",ue={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},De="browser",et="cpu",Ke="device",He="engine",ke="os",Bt="result",T="name",b="type",N="vendor",D="version",be="architecture",lr="major",O="model",Nr="console",H="mobile",Q="tablet",ce="smarttv",We="wearable",gr="xr",Qt="embedded",Et="inapp",Vn="brands",gt="formFactors",Un="fullVersionList",Rt="platform",$n="platformVersion",Gr="bitness",ft="sec-ch-ua",ml=ft+"-full-version-list",wl=ft+"-arch",El=ft+"-"+Gr,Al=ft+"-form-factors",Cl=ft+"-"+H,_l=ft+"-"+O,ea=ft+"-"+Rt,bl=ea+"-version",ta=[Vn,Un,H,O,Rt,$n,be,gt,Gr],xr="Amazon",At="Apple",ti="ASUS",ri="BlackBerry",dt="Google",ni="Huawei",Zr="Lenovo",ii="Honor",yr="LG",Qr="Microsoft",Jr="Motorola",ai="Nvidia",oi="OnePlus",en="OPPO",$t="Samsung",si="Sharp",Ht="Sony",tn="Xiaomi",rn="Zebra",li="Chrome",ui="Chromium",rt="Chromecast",Dr="Edge",Gt="Firefox",zt="Opera",nn="Facebook",ci="Sogou",Ct="Mobile ",Wt=" Browser",wn="Windows",Sl=typeof window!==ue.UNDEFINED,Te=Sl&&window.navigator?window.navigator:void 0,xt=Te&&Te.userAgentData?Te.userAgentData:void 0,Il=function(t,e){var r={},n=e;if(!Mr(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},zr=function(t){for(var e={},r=0;r<t.length;r++)e[t[r].toUpperCase()]=t[r];return e},En=function(t,e){if(typeof t===ue.OBJECT&&t.length>0){for(var r in t)if(ot(e)==ot(t[r]))return!0;return!1}return dr(t)?ot(e)==ot(t):!1},Mr=function(t,e){for(var r in t)return/^(browser|cpu|device|engine|os)$/.test(r)||(e?Mr(t[r]):!1)},dr=function(t){return typeof t===ue.STRING},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=Lr(r[n]).split(";v=");e[n]={brand:i[0],version:i[1]}}else e[n]=Lr(r[n]);return e}},ot=function(t){return dr(t)?t.toLowerCase():t},An=function(t){return dr(t)?Pt(/[^\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==ue.OBJECT&&r.length==2?this[r[0]]=r[1]:this[r]=void 0}return this},Pt=function(t,e){return dr(e)?e.replace(t,Dt):e},Xt=function(t){return Pt(/\\?\"/g,t)},Lr=function(t,e){return t=Pt(/^\s\s*/,String(t)),typeof e===ue.UNDEFINED?t:t.substring(0,e)},Cn=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===ue.OBJECT&&o.length>0?o.length===2?typeof o[1]==ue.FUNCTION?this[o[0]]=o[1].call(this,l):this[o[0]]=o[1]:o.length>=3&&(typeof o[1]===ue.FUNCTION&&!(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}},Ue=function(t,e){for(var r in e)if(typeof e[r]===ue.OBJECT&&e[r].length>0){for(var n=0;n<e[r].length;n++)if(En(e[r][n],t))return r===ei?void 0:r}else if(En(e[r],t))return r===ei?void 0:r;return e.hasOwnProperty("*")?e["*"]:t},fi={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:""},di={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Ol={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"},hi={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[D,[T,Ct+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[D,[T,Dr+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[D,[T,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[T,D],[/opios[\/ ]+([\w\.]+)/i],[D,[T,zt+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[D,[T,zt+" GX"]],[/\bopr\/([\w\.]+)/i],[D,[T,zt]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[D,[T,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[D,[T,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|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|palemoon)\/([-\w\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[T,D],[/quark(?:pc)?\/([-\w\.]+)/i],[D,[T,"Quark"]],[/\bddg\/([\w\.]+)/i],[D,[T,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[D,[T,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[D,[T,"WeChat"]],[/konqueror\/([\w\.]+)/i],[D,[T,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[D,[T,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[D,[T,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[D,[T,"Smart "+Zr+Wt]],[/(avast|avg)\/([\w\.]+)/i],[[T,/(.+)/,"$1 Secure"+Wt],D],[/\bfocus\/([\w\.]+)/i],[D,[T,Gt+" Focus"]],[/\bopt\/([\w\.]+)/i],[D,[T,zt+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[D,[T,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[D,[T,"Dolphin"]],[/coast\/([\w\.]+)/i],[D,[T,zt+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[D,[T,"MIUI"+Wt]],[/fxios\/([\w\.-]+)/i],[D,[T,Ct+Gt]],[/\bqihoobrowser\/?([\w\.]*)/i],[D,[T,"360"]],[/\b(qq)\/([\w\.]+)/i],[[T,/(.+)/,"$1Browser"],D],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[T,/(.+)/,"$1"+Wt],D],[/samsungbrowser\/([\w\.]+)/i],[D,[T,$t+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[D,[T,ci+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[T,ci+" Mobile"],D],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[T,D],[/(lbbrowser|rekonq|steam(?= (clie|tenf|gameo)))/i],[T],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[D,T],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[T,nn],D,[b,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,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[T,D,[b,Et]],[/\bgsa\/([\w\.]+) .*safari\//i],[D,[T,"GSA"],[b,Et]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[D,[T,"TikTok"],[b,Et]],[/\[(linkedin)app\]/i],[T,[b,Et]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[T,/(.+)/,"Zalo"],D,[b,Et]],[/(chromium)[\/ ]([-\w\.]+)/i],[T,D],[/headlesschrome(?:\/([\w\.]+)| )/i],[D,[T,li+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[D,[T,Dr+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[T,li+" WebView"],D],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[D,[T,"Android"+Wt]],[/chrome\/([\w\.]+) mobile/i],[D,[T,Ct+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[T,D],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[D,[T,Ct+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[T,Ct+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[D,T],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[T,[D,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[T,D],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[T,Ct+Gt],D],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[T,"Netscape"],D],[/(wolvic|librewolf)\/([\w\.]+)/i],[T,D],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[D,[T,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|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[T,[D,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[T,[D,/[^\d\.]+./,Dt]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[be,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[be,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[be,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[be,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[be,"arm"]],[/ sun4\w[;\)]/i],[[be,"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],[[be,/ower/,Dt,ot]],[/mc680.0/i],[[be,"68k"]],[/winnt.+\[axp/i],[[be,"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],[O,[N,$t],[b,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],[O,[N,$t],[b,H]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[O,[N,At],[b,H]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[O,[N,At],[b,Q]],[/(macintosh);/i],[O,[N,At]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[O,[N,si],[b,H]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[O,[N,ii],[b,Q]],[/honor([-\w ]+)[;\)]/i],[O,[N,ii],[b,H]],[/\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],[O,[N,ni],[b,Q]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[O,[N,ni],[b,H]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[O,/_/g," "],[N,tn],[b,Q]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[O,/_/g," "],[N,tn],[b,H]],[/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],[O,[N,oi],[b,H]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[O,[N,en],[b,H]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[O,[N,Ue,{OnePlus:["203","304","403","404","413","415"],"*":en}],[b,Q]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[O,[N,"BLU"],[b,H]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[O,[N,"Vivo"],[b,H]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[O,[N,"Realme"],[b,H]],[/(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],[O,[N,Zr],[b,Q]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[O,[N,Zr],[b,H]],[/\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],[O,[N,Jr],[b,H]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[O,[N,Jr],[b,Q]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[O,[N,yr],[b,Q]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[O,[N,yr],[b,H]],[/(nokia) (t[12][01])/i],[N,O,[b,Q]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[O,/_/g," "],[b,H],[N,"Nokia"]],[/(pixel (c|tablet))\b/i],[O,[N,dt],[b,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],[O,[N,dt],[b,H]],[/(google) (pixelbook( go)?)/i],[N,O],[/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],[O,[N,Ht],[b,H]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[O,"Xperia Tablet"],[N,Ht],[b,Q]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[O,[N,xr],[b,Q]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[O,/(.+)/g,"Fire Phone $1"],[N,xr],[b,H]],[/(playbook);[-\w\),; ]+(rim)/i],[O,N,[b,Q]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[O,[N,ri],[b,H]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[O,[N,ti],[b,Q]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[O,[N,ti],[b,H]],[/(nexus 9)/i],[O,[N,"HTC"],[b,Q]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[N,[O,/_/g," "],[b,H]],[/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],[O,[N,"TCL"],[b,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],[O,[N,"TCL"],[b,H]],[/(itel) ((\w+))/i],[[N,ot],O,[b,Ue,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[O,[N,"Acer"],[b,Q]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[O,[N,"Meizu"],[b,H]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[O,[N,"Ulefone"],[b,H]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[O,[N,"Energizer"],[b,H]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[O,[N,"Cat"],[b,H]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[O,[N,"Smartfren"],[b,H]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[O,[N,"Nothing"],[b,H]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[O,[N,"Archos"],[b,Q]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[O,[N,"Archos"],[b,H]],[/; (n159v)/i],[O,[N,"HMD"],[b,H]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[N,O,[b,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|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[N,O,[b,H]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[N,O,[b,Q]],[/(surface duo)/i],[O,[N,Qr],[b,Q]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[O,[N,"Fairphone"],[b,H]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[O,[N,ai],[b,Q]],[/(sprint) (\w+)/i],[N,O,[b,H]],[/(kin\.[onetw]{3})/i],[[O,/\./g," "],[N,Qr],[b,H]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[O,[N,rn],[b,Q]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[O,[N,rn],[b,H]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[N,[b,ce]],[/hbbtv.+maple;(\d+)/i],[[O,/^/,"SmartTV"],[N,$t],[b,ce]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[N,O,[b,ce]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[N,yr],[b,ce]],[/(apple) ?tv/i],[N,[O,At+" TV"],[b,ce]],[/crkey.*devicetype\/chromecast/i],[[O,rt+" Third Generation"],[N,dt],[b,ce]],[/crkey.*devicetype\/([^/]*)/i],[[O,/^/,"Chromecast "],[N,dt],[b,ce]],[/fuchsia.*crkey/i],[[O,rt+" Nest Hub"],[N,dt],[b,ce]],[/crkey/i],[[O,rt],[N,dt],[b,ce]],[/(portaltv)/i],[O,[N,nn],[b,ce]],[/droid.+aft(\w+)( bui|\))/i],[O,[N,xr],[b,ce]],[/(shield \w+ tv)/i],[O,[N,ai],[b,ce]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[O,[N,si],[b,ce]],[/(bravia[\w ]+)( bui|\))/i],[O,[N,Ht],[b,ce]],[/(mi(tv|box)-?\w+) bui/i],[O,[N,tn],[b,ce]],[/Hbbtv.*(technisat) (.*);/i],[N,O,[b,ce]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[N,/.+\/(\w+)/,"$1",Ue,{LG:"lge"}],[O,Lr],[b,ce]],[/(playstation \w+)/i],[O,[N,Ht],[b,Nr]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[O,[N,Qr],[b,Nr]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[N,Ue,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],O,[b,Nr]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[O,[N,$t],[b,We]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[N,O,[b,We]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[O,[N,en],[b,We]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[O,[N,At],[b,We]],[/(opwwe\d{3})/i],[O,[N,oi],[b,We]],[/(moto 360)/i],[O,[N,Jr],[b,We]],[/(smartwatch 3)/i],[O,[N,Ht],[b,We]],[/(g watch r)/i],[O,[N,yr],[b,We]],[/droid.+; (wt63?0{2,3})\)/i],[O,[N,rn],[b,We]],[/droid.+; (glass) \d/i],[O,[N,dt],[b,gr]],[/(pico) ([\w ]+) os\d/i],[N,O,[b,gr]],[/(quest( \d| pro)?s?).+vr/i],[O,[N,nn],[b,gr]],[/mobile vr; rv.+firefox/i],[[b,gr]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[N,[b,Qt]],[/(aeobc)\b/i],[O,[N,xr],[b,Qt]],[/(homepod).+mac os/i],[O,[N,At],[b,Qt]],[/windows iot/i],[[b,Qt]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[O,[b,ce]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[b,ce]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[O,[b,Ue,{mobile:"Mobile",xr:"VR","*":Q}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[b,Q]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[b,H]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[O,[N,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[D,[T,Dr+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[T,D],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[D,[T,"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],[T,D],[/ladybird\//i],[[T,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[D,T]],os:[[/(windows nt) (6\.[23]); arm/i],[[T,/N/,"R"],[D,Ue,fi]],[/(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],[T,D],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[D,/(;|\))/g,"",Ue,fi],[T,wn]],[/(windows ce)\/?([\d\.]*)/i],[T,D],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[D,/_/g,"."],[T,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[T,"macOS"],[D,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[D,[T,rt+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[D,[T,rt+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[D,[T,rt+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[D,[T,rt+" Linux"]],[/crkey\/([\d\.]+)/i],[D,[T,rt]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[D,T],[/(ubuntu) ([\w\.]+) like android/i],[[T,/(.+)/,"$1 Touch"],D],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[T,D],[/\(bb(10);/i],[D,[T,ri]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[D,[T,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[D,[T,Gt+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[D,[T,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[D,Ue,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[T,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[D,[T,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[T,"Chrome OS"],D],[/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],[T,D],[/(sunos) ?([\d\.]*)/i],[[T,"Solaris"],D],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[T,D]]},mr=(function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return Je.call(t.init,[[De,[T,D,lr,b]],[et,[be]],[Ke,[b,O,N]],[He,[T,D]],[ke,[T,D]]]),Je.call(t.isIgnore,[[De,[D,lr]],[He,[D]],[ke,[D]]]),Je.call(t.isIgnoreRgx,[[De,/ ?browser$/i],[ke,/ ?os$/i]]),Je.call(t.toString,[[De,[T,D]],[et,[be]],[Ke,[N,O]],[He,[T,D]],[ke,[T,D]]]),t})(),Tl=function(t,e){var r=mr.init[e],n=mr.isIgnore[e]||0,i=mr.isIgnoreRgx[e]||0,a=mr.toString[e]||0;function o(){Je.call(this,r)}return o.prototype.getItem=function(){return t},o.prototype.withClientHints=function(){return xt?xt.getHighEntropyValues(ta).then(function(s){return t.setCH(new ra(s,!1)).parseCH().get()}):t.parseCH().get()},o.prototype.withFeatureCheck=function(){return t.detectFeature().get()},e!=Bt&&(o.prototype.is=function(s){var l=!1;for(var c in this)if(this.hasOwnProperty(c)&&!En(n,c)&&ot(i?Pt(i,this[c]):this[c])==ot(i?Pt(i,s):s)){if(l=!0,s!=ue.UNDEFINED)break}else if(s==ue.UNDEFINED&&l){l=!l;break}return l},o.prototype.toString=function(){var s=Dt;for(var l in a)typeof this[a[l]]!==ue.UNDEFINED&&(s+=(s?" ":Dt)+this[a[l]]);return s||ue.UNDEFINED}),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,withClientHints:o.prototype.withClientHints,withFeatureCheck:o.prototype.withFeatureCheck};var f=new c;return s(f),f},new o};function ra(t,e){if(t=t||{},Je.call(this,ta),e)Je.call(this,[[Vn,an(t[ft])],[Un,an(t[ml])],[H,/\?1/.test(t[Cl])],[O,Xt(t[_l])],[Rt,Xt(t[ea])],[$n,Xt(t[bl])],[be,Xt(t[wl])],[gt,an(t[Al])],[Gr,Xt(t[El])]]);else for(var r in t)this.hasOwnProperty(r)&&typeof t[r]!==ue.UNDEFINED&&(this[r]=t[r])}function ut(t,e,r,n){return Je.call(this,[["itemType",t],["ua",e],["uaCH",n],["rgxMap",r],["data",Tl(this,t)]]),this}ut.prototype.get=function(t){return t?this.data.hasOwnProperty(t)?this.data[t]:void 0:this.data};ut.prototype.set=function(t,e){return this.data[t]=e,this};ut.prototype.setCH=function(t){return this.uaCH=t,this};ut.prototype.detectFeature=function(){if(Te&&Te.userAgent==this.ua)switch(this.itemType){case De:Te.brave&&typeof Te.brave.isBrave==ue.FUNCTION&&this.set(T,"Brave");break;case Ke:!this.get(b)&&xt&&xt[H]&&this.set(b,H),this.get(O)=="Macintosh"&&Te&&typeof Te.standalone!==ue.UNDEFINED&&Te.maxTouchPoints&&Te.maxTouchPoints>2&&this.set(O,"iPad").set(b,Q);break;case ke:!this.get(T)&&xt&&xt[Rt]&&this.set(T,xt[Rt]);break;case Bt:var t=this.data,e=function(r){return t[r].getItem().detectFeature().get()};this.set(De,e(De)).set(et,e(et)).set(Ke,e(Ke)).set(He,e(He)).set(ke,e(ke))}return this};ut.prototype.parseUA=function(){switch(this.itemType!=Bt&&Cn.call(this.data,this.ua,this.rgxMap),this.itemType){case De:this.set(lr,An(this.get(D)));break;case ke:if(this.get(T)=="iOS"&&this.get(D)=="18.6"){var t=/\) Version\/([\d\.]+)/.exec(this.ua);t&&parseInt(t[1].substring(0,2),10)>=26&&this.set(D,t[1])}break}return this};ut.prototype.parseCH=function(){var t=this.uaCH,e=this.rgxMap;switch(this.itemType){case De:case He:var r=t[Un]||t[Vn],n;if(r)for(var i=0;i<r.length;i++){var a=r[i].brand||r[i],o=r[i].version;this.itemType==De&&!/not.a.brand/i.test(a)&&(!n||/Chrom/.test(n)&&a!=ui||n==Dr&&/WebView2/.test(a))&&(a=Ue(a,Ol),n=this.get(T),n&&!/Chrom/.test(n)&&/Chrom/.test(a)||this.set(T,a).set(D,o).set(lr,An(o)),n=a),this.itemType==He&&a==ui&&this.set(D,o)}break;case et:var s=t[be];s&&(s&&t[Gr]=="64"&&(s+="64"),Cn.call(this.data,s+";",e));break;case Ke:if(t[H]&&this.set(b,H),t[O]&&(this.set(O,t[O]),!this.get(b)||!this.get(N))){var l={};Cn.call(l,"droid 9; "+t[O]+")",e),!this.get(b)&&l.type&&this.set(b,l.type),!this.get(N)&&l.vendor&&this.set(N,l.vendor)}if(t[gt]){var c;if(typeof t[gt]!="string")for(var f=0;!c&&f<t[gt].length;)c=Ue(t[gt][f++],di);else c=Ue(t[gt],di);this.set(b,c)}break;case ke:var d=t[Rt];if(d){var v=t[$n];d==wn&&(v=parseInt(An(v),10)>=13?"11":"10"),this.set(T,d).set(D,v)}this.get(T)==wn&&t[O]=="Xbox"&&this.set(T,"Xbox").set(D,void 0);break;case Bt:var h=this.data,p=function(g){return h[g].getItem().setCH(t).parseCH().get()};this.set(De,p(De)).set(et,p(et)).set(Ke,p(Ke)).set(He,p(He)).set(ke,p(ke))}return this};function tt(t,e,r){if(typeof t===ue.OBJECT?(Mr(t,!0)?(typeof e===ue.OBJECT&&(r=e),e=t):(r=t,e=void 0),t=void 0):typeof t===ue.STRING&&!Mr(e,!0)&&(r=e,e=void 0),r)if(typeof r.append===ue.FUNCTION){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 tt))return new tt(t,e,r).getResult();var o=typeof t===ue.STRING?t:r&&r[Jn]?r[Jn]:Te&&Te.userAgent?Te.userAgent:Dt,s=new ra(r,!0),l=e?Il(hi,e):hi,c=function(f){return f==Bt?function(){return new ut(f,o,l,s).set("ua",o).set(De,this.getBrowser()).set(et,this.getCPU()).set(Ke,this.getDevice()).set(He,this.getEngine()).set(ke,this.getOS()).get()}:function(){return new ut(f,o,l[f],s).parseUA().get()}};return Je.call(this,[["getBrowser",c(De)],["getCPU",c(et)],["getDevice",c(Ke)],["getEngine",c(He)],["getOS",c(ke)],["getResult",c(Bt)],["getUA",function(){return o}],["setUA",function(f){return dr(f)&&(o=Lr(f,yl)),this}]]).setUA(o),this}tt.VERSION=xl;tt.BROWSER=zr([T,D,lr,b]);tt.CPU=zr([be]);tt.DEVICE=zr([O,N,b,Nr,H,ce,Q,We,Qt]);tt.ENGINE=tt.OS=zr([T,D]);const on=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function sn(t,e,r,n){t.addEventListener?t.addEventListener(e,r,n):t.attachEvent&&t.attachEvent("on".concat(e),r)}function jt(t,e,r,n){t.removeEventListener?t.removeEventListener(e,r,n):t.detachEvent&&t.detachEvent("on".concat(e),r)}function na(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 ia(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 Nl(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 ur={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,"-":on?173:189,"=":on?61:187,";":on?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},Ge={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,meta:91,command:91},Jt={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},me={16:!1,18:!1,17:!1,91:!1},se={};for(let t=1;t<20;t++)ur["f".concat(t)]=111+t;let oe=[],ar=null,aa="all";const Qe=new Map,Lt=t=>ur[t.toLowerCase()]||Ge[t.toLowerCase()]||t.toUpperCase().charCodeAt(0),Dl=t=>Object.keys(ur).find(e=>ur[e]===t),Bl=t=>Object.keys(Ge).find(e=>Ge[e]===t);function oa(t){aa=t||"all"}function cr(){return aa||"all"}function Rl(){return oe.slice(0)}function Pl(){return oe.map(t=>Dl(t)||Bl(t)||String.fromCharCode(t))}function kl(){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=>Lt(s))})})}),t}function Ml(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 Ll(t){return typeof t=="string"&&(t=Lt(t)),oe.indexOf(t)!==-1}function Fl(t,e){let r,n;t||(t=cr());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 Hn(s)}):n++;cr()===t&&oa(e||"all")}function Vl(t){let e=t.keyCode||t.which||t.charCode;t.key&&t.key.toLowerCase()==="capslock"&&(e=Lt(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 me){me[e]=!1;for(const n in Ge)Ge[n]===e&&(Xe[n]=!1)}}function sa(t){if(typeof t>"u")Object.keys(se).forEach(i=>{Array.isArray(se[i])&&se[i].forEach(a=>wr(a)),delete se[i]}),Hn(null);else if(Array.isArray(t))t.forEach(i=>{i.key&&wr(i)});else if(typeof t=="object")t.key&&wr(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=""),wr({key:t,scope:i,method:a,splitKey:"+"})}}const wr=t=>{let{key:e,scope:r,method:n,splitKey:i="+"}=t;ia(e).forEach(o=>{const s=o.split(i),l=s.length,c=s[l-1],f=c==="*"?"*":Lt(c);if(!se[f])return;r||(r=cr());const d=l>1?na(Ge,s):[],v=[];se[f]=se[f].filter(h=>{const g=(n?h.method===n:!0)&&h.scope===r&&Nl(h.mods,d);return g&&v.push(h.element),!g}),v.forEach(h=>Hn(h))})};function vi(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 me)Object.prototype.hasOwnProperty.call(me,a)&&(!me[a]&&e.mods.indexOf(+a)>-1||me[a]&&e.mods.indexOf(+a)===-1)&&(i=!1);(e.mods.length===0&&!me[16]&&!me[18]&&!me[17]&&!me[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 pi(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=Jt[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 Jt||c===n))}),n in me){me[n]=!0;for(const s in Ge)if(Object.prototype.hasOwnProperty.call(Ge,s)){const l=Jt[Ge[s]];Xe[s]=t[l]}if(!r)return}for(const s in me)Object.prototype.hasOwnProperty.call(me,s)&&(me[s]=t[Jt[s]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(oe.indexOf(17)===-1&&oe.push(17),oe.indexOf(18)===-1&&oe.push(18),me[17]=!0,me[18]=!0);const i=cr();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)&&vi(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(Lt(f[v]));d.sort().join("")===oe.sort().join("")&&vi(t,l,i,e)}}function Xe(t,e,r){oe=[];const n=ia(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&&sa(t,a);s<n.length;s++)t=n[s].split(f),i=[],t.length>1&&(i=na(Ge,t)),t=t[t.length-1],t=t==="*"?"*":Lt(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 pi(g,o)},p=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;pi(g,o),Vl(g)};Qe.set(o,{keydownListener:h,keyupListenr:p,capture:d}),sn(o,"keydown",h,d),sn(o,"keyup",p,d)}if(!ar){const h=()=>{oe=[]};ar={listener:h,capture:d},sn(window,"focus",h,d)}}}function Ul(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 Hn(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&&(jt(t,"keyup",i,a),jt(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&&(jt(i,"keyup",o,s),jt(i,"keydown",a,s),Qe.delete(i))}),Qe.clear(),Object.keys(se).forEach(i=>delete se[i]),ar)){const{listener:i,capture:a}=ar;jt(window,"focus",i,a),ar=null}}const ln={getPressedKeyString:Pl,setScope:oa,getScope:cr,deleteScope:Fl,getPressedKeyCodes:Rl,getAllKeyCodes:kl,isPressed:Ll,filter:Ml,trigger:Ul,unbind:sa,keyMap:ur,modifier:Ge,modifierMap:Jt};for(const t in ln)Object.prototype.hasOwnProperty.call(ln,t)&&(Xe[t]=ln[t]);if(typeof window<"u"){const t=window.hotkeys;Xe.noConflict=e=>(e&&window.hotkeys===Xe&&(window.hotkeys=t),Xe),window.hotkeys=Xe}const $l={class:"dsg-dropdown--trigger",tabindex:"0"},Hl={class:"dsg-dropdown--menu"},Gl={key:0,class:"dsg-dropdown--menu-header"},zl={key:1,class:"dsg-dropdown--menu-header"},Wl={class:"dsg-dropdown--menu-title"},Xl={key:2,class:"dsg-dropdown--menu-header subsection"},jl={class:"dsg-dropdown--menu-subtitle"},Kl=["href","target","tabindex","title","onClick"],Yl={key:0,class:"dsg-dropdown--menu-item--content"},ql={key:0,class:"dsg-dropdown--menu-item--icon"},Zl={class:"dsg-dropdown--menu-item--label"},Ql={class:"dsg-dropdown--menu-item--hotkey"},Jl={key:0},eu={key:1,class:"dsg-dropdown--menu-item--content"},tu=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,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(F.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",Hl,[u.renderSlot(h.$slots,"dsg-dropdown-menu--header",{},()=>[t.headerType==="avatar"?(u.openBlock(),u.createElementBlock("div",Gl,[t.avatarInfo?(u.openBlock(),u.createBlock(or,{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",zl,[u.createElementVNode("h3",Wl,u.toDisplayString(t.headerTitle),1)])):t.headerType==="subsection"?(u.openBlock(),u.createElementBlock("div",Xl,[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",Yl,[g.icon?(u.openBlock(),u.createElementBlock("div",ql,[u.createVNode(F._sfc_main,{icon:g.icon,size:"xs"},null,8,["icon"])])):u.createCommentVNode("",!0),u.createElementVNode("span",Zl,u.toDisplayString(g.label),1),u.createElementVNode("div",Ql,[g.hotkey?(u.openBlock(),u.createElementBlock("span",Jl,u.toDisplayString(v(g.hotkey)),1)):u.createCommentVNode("",!0)])])):g.type==="divider"?(u.openBlock(),u.createElementBlock("div",eu,[...p[1]||(p[1]=[u.createElementVNode("hr",null,null,-1)])])):u.createCommentVNode("",!0)],10,Kl))),128))])])]),default:u.withCtx(()=>[u.createElementVNode("div",$l,[u.renderSlot(h.$slots,"dsg-dropdown--trigger",{},()=>[t.type==="avatar"?(u.openBlock(),u.createElementBlock(u.Fragment,{key:0},[t.avatarInfo?(u.openBlock(),u.createBlock(or,{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(F._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(F._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))}}),ru={class:"dsg-input--label-wrapper block"},nu=["onMousedown"],iu=["textContent"],au={class:"option-icon-wrapper"},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},useTeleport:{type:Boolean,default:!1},wrapContent:{type:Boolean,default:!1},contentWrapperClass:{default:""},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,{expose:e,emit:r}){const n=u.useModel(t,"modelValue"),i=u.useModel(t,"single"),a=u.ref(t.options),o=u.useTemplateRef("multiselectEl"),s=u.ref(!1),l=u.ref([]);u.computed(()=>l.value.length>0);const c=u.computed(()=>[...Array.isArray(t.errors)?t.errors:[t.errors],...l.value].filter((R,M,P)=>M===P.indexOf(R))),f=u.computed(()=>{const _=Array.isArray(t.contentWrapperClass)?t.contentWrapperClass:[t.contentWrapperClass],R=t.wrapContent?"dsg-input-select--content-wrapper--wrap":"dsg-input-select--content-wrapper--no-wrap";return[..._,"dsg-input-select--content-wrapper",R].join(" ")}),d=u.computed(()=>["dsg-input-select",`dsg-input-select--${t.size}`,`dsg-input-select--${t.strategy}`,`dsg-input-select--${c.value.length>0?"has-errors":"no-errors"}`,`dsg-input-select--${t.wrapContent?"wrap-content":"no-wrap-content"}`].join(" ").replace(/\s+/g," ").trim()),v=()=>{t.useTeleport||y()},h=_=>{t.useTeleport||y()};u.watchEffect(()=>{}),u.watch(()=>t.options,_=>{Array.isArray(_)?a.value=_:console.warn("Options should be an array.")});const p=u.ref(null);u.watch(()=>t.scrollBind,async _=>{await u.nextTick(),p.value&&typeof p.value.removeEventListener=="function"&&p.value.removeEventListener("scroll",h);const R=P=>{const X=window.getComputedStyle(P),V=["auto","scroll","overlay"].includes(X.overflow)||["auto","scroll","overlay"].includes(X.overflowY)||["auto","scroll","overlay"].includes(X.overflowX),G=P.scrollHeight>P.clientHeight||P.scrollWidth>P.clientWidth;return V&&G};let M=null;_?M=R(_)?_:window:M=window,M&&typeof M.addEventListener=="function"?(M.addEventListener("scroll",h),p.value=M):p.value=null},{immediate:!0});const g=r,y=()=>{if(o.value)if(s.value===!0){const _=o.value.$el.getBoundingClientRect(),R=o.value.$el.offsetHeight,M=window.innerHeight;u.nextTick(()=>{const P=o.value.$el.querySelector(".multiselect__content-wrapper");P.style.display="block";const X=P.offsetHeight;if(t.strategy==="fixed"){P.style.left=_.left+"px",P.style.right="auto",P.style.top="auto",P.style.bottom="auto";const V=_.width,G=window.innerWidth-_.left,ze=V>G?Math.min(300,G-16):V;P.style.width=`${ze}px`;const wt=M-_.bottom,Vt=_.top,Ut=X+8;(wt<Ut&&Vt>wt?"top":"bottom")==="top"?P.style.bottom=`${M-_.top+4}px`:P.style.top=`${_.bottom+4}px`;let vr=!1;if(p.value===window)vr=_.top<M&&_.bottom>0&&_.left<window.innerWidth&&_.right>0;else if(p.value){const pr=p.value.getBoundingClientRect();vr=_.top<pr.bottom&&_.bottom>pr.top&&_.left<pr.right&&_.right>pr.left}else vr=_.top<M&&_.bottom>0&&_.left<window.innerWidth&&_.right>0;if(!vr){P.style.display="none";return}P.style.display="block"}else P.style.left="0",P.style.right="auto",P.style.width="auto",P.style.maxWidth=t.contentMaxWidth,(_.bottom+X+R+2>M?"top":"bottom")==="top"?P.style.bottom=`${R+4}px`:P.style.top=`${R+4}px`})}else{const _=o.value.$refs.list;_&&(_.style.display="none",_.style.top="auto",_.style.bottom="auto",_.style.left="auto",_.style.right="auto")}},w=_=>{s.value=!0,t.useTeleport||y(),g("open",_)},m=(_,R)=>{s.value=!1,t.useTeleport||y(),g("close",_,R)},E=F.useDebounceFn(_=>{t.getUrl&&_.length>=2&&F.axios.get(t.getUrl,{params:{term:_,...t.extraParams}}).then(R=>{a.value=R.data}),g("search-change",_)},300),C=(_,R=!0)=>{if(l.value=[],t.allowEmpty===!1&&(_==null||Array.isArray(_)&&_.length===0)&&l.value.push(`${t.label} is required.`),R===!0)try{I(_),g("update:modelValue",_),g("update:model-value",_)}catch(M){console.log(M)}},I=_=>{_?i.value=_[t.trackBy]||_:i.value=null};return u.onMounted(()=>{window.addEventListener("resize",v),t.getUrl&&t.options.length===0&&t.fetchOnLoad&&F.axios.get(t.getUrl).then(_=>{a.value=_.data}).catch(_=>{console.error("Error fetching options:",_)}),t.validateOnLoad&&C(n.value,!1)}),u.onUnmounted(()=>{window.removeEventListener("resize",v),p.value&&typeof p.value.removeEventListener=="function"&&p.value.removeEventListener("scroll",h)}),e({getInstance:()=>o.value}),(_,R)=>(u.openBlock(),u.createElementBlock("div",{class:u.normalizeClass(d.value),ref:"dsgInputSelectEl"},[u.createElementVNode("div",ru,[t.label?(u.openBlock(),u.createBlock(Hi._sfc_main,{key:0,label:t.label,size:"sm"},null,8,["label"])):u.createCommentVNode("",!0)]),u.createVNode(u.unref(Fn),u.mergeProps({ref:"multiselectEl",modelValue:n.value,"onUpdate:modelValue":[R[0]||(R[0]=M=>n.value=M),R[3]||(R[3]=M=>C(M,!0))],options:a.value,multiple:t.multiple,onSearchChange:u.unref(E),onOpen:R[1]||(R[1]=M=>w(M)),onClose:R[2]||(R[2]=(M,P)=>m(M,P)),onRemove:R[4]||(R[4]=(M,P)=>g("remove",M,P)),onTag:R[5]||(R[5]=(M,P)=>g("tag",M,P)),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,"use-teleport":t.useTeleport,class:["dsg-input--multiselect",{"dsg-input--multiselect--has-errors":t.errors&&t.errors.length,"dsg-input--multiselect--disabled":t.disabled}],"content-wrapper-class":f.value},_.$attrs),{selection:u.withCtx(()=>[t.icon?(u.openBlock(),u.createBlock(F._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:M})=>[u.createElementVNode("div",{onMousedown:u.withModifiers(P=>M(),["prevent","stop"]),class:"multiselect__select"},[u.createVNode(F._sfc_main,{icon:"chevron-down"})],40,nu)]),option:u.withCtx(({option:M})=>[u.createElementVNode("span",{class:"option-label",textContent:u.toDisplayString(M[t.itemLabel])},null,8,iu),u.createElementVNode("span",au,[u.createVNode(F._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","use-teleport","content-wrapper-class","class"]),c.value&&c.value.length?(u.openBlock(),u.createElementBlock("div",ou,[(u.openBlock(!0),u.createElementBlock(u.Fragment,null,u.renderList(c.value,(M,P)=>(u.openBlock(),u.createElementBlock("span",{class:"dsg-input--error",key:P},u.toDisplayString(M),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"},la=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(F._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(F._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(F._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"},Cu=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 F.DsgPropSyntaxWarning("DsgTag: 'hasClose' and 'tagCount' props are mutually exclusive. Please use only one of them."),t.avatarUri&&t.dotHex&&new F.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(F._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(or,{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(F._sfc_main,{key:1,icon:"x-close",class:"dsg-tag--close",onClick:s})):u.createCommentVNode("",!0)])],2))}}),_u={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",_u,[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)}})(),Ie=(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)}})(),Ve=(function(t){Hu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ArgumentException",e})(Ie),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)}})(),U=(function(t){Gu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="IllegalArgumentException",e})(Ie),zu=(function(){function t(e){if(this.binarizer=e,e===null)throw new U("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)}})(),we=(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})(Ie),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})(),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)}})(),Gn=(function(t){ju(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="IndexOutOfBoundsException",e})(Ie),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)}})(),gi=(function(t){Ku(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})(Gn),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.")},Be=(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 U("fromIndex("+r+") > toIndex("+n+")");if(r<0)throw new gi(r);if(n>e)throw new gi(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})(),z=(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+z.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+z.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 U;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 U;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 U("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 U("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&&Be.equals(this.bits,r.bits)},t.prototype.hashCode=function(){return 31*this.size+Be.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})(),_n;(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"})(_n||(_n={}));const le=_n;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)}})(),k=(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})(Ie),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.")},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 he=(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=Zu(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 k("incorect value");var r=t.VALUES_TO_ECI.get(e);if(r===void 0)throw new k("incorect value");return r},t.getCharacterSetECIByName=function(e){var r=t.NAME_TO_ECI.get(e);if(r===void 0)throw new k("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)}})(),Br=(function(t){Qu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="UnsupportedOperationException",e})(Ie),Ye=(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 he?e:he.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(he.UnicodeBigUnmarked))return String.fromCharCode.apply(null,new Uint16Array(e.buffer));throw new Br("Encoding "+this.encodingName(r)+" not supported by fallback.")},t.isDecodeFallbackSupported=function(e){return e.equals(he.UTF8)||e.equals(he.ISO8859_1)||e.equals(he.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 Ye.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,E=0;E<n&&(i||a||o);E++){var C=e[E]&255;o&&(s>0?(C&128)===0?o=!1:s--:(C&128)!==0&&((C&64)===0?o=!1:(s++,(C&32)===0?l++:(s++,(C&16)===0?c++:(s++,(C&8)===0?f++:o=!1))))),i&&(C>127&&C<160?i=!1:C>159&&(C<192||C===215||C===247)&&w++),a&&(d>0?C<64||C===127||C>252?a=!1:d--:C===128||C===160||C>239?a=!1:C>160&&C<224?(v++,p=0,h++,h>g&&(g=h)):C>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 Ye.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=he.SJIS.getName(),t.GB2312="GB2312",t.ISO88591=he.ISO8859_1.getName(),t.EUC_JP="EUC_JP",t.UTF8=he.UTF8.getName(),t.PLATFORM_DEFAULT_ENCODING=t.UTF8,t.ASSUME_SHIFT_JIS=!1,t})(),ee=(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 U("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 U("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 U("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 U("illegal character encountered: "+e.substring(c));if(a>o){if(s===-1)s=a-o;else if(a-o!==s)throw new U("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 U("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 U("Left and top must be nonnegative");if(i<1||n<1)throw new U("Height and width must be at least 1");var a=e+n,o=r+i;if(o>this.height||a>this.width)throw new U("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&&Be.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+Be.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 ee,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)}})(),S=(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})(Ie),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 S;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 E=s[h+m];w+=E[y-2]+E[y-1]+E[y]+E[y+1]+E[y+2]}var C=w/25;e.thresholdBlock(r,g,v,C,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 E=0;E<e.BLOCK_SIZE;E++){var C=r[m+E]&255;p+=C,C<g&&(g=C),C>y&&(y=C)}if(y-g>e.MIN_DYNAMIC_RANGE)for(w++,m+=a;w<e.BLOCK_SIZE;w++,m+=a)for(var E=0;E<e.BLOCK_SIZE;E++)p+=r[m+E]&255}var I=p>>e.BLOCK_SIZE_POWER*2;if(y-g<=e.MIN_DYNAMIC_RANGE&&(I=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&&(I=B)}c[f][v]=I}}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),Wr=(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 Br("This luminance source does not support cropping.")},t.prototype.isRotateSupported=function(){return!1},t.prototype.rotateCounterClockwise=function(){throw new Br("This luminance source does not support rotation by 90 degrees.")},t.prototype.rotateCounterClockwise45=function(){throw new Br("This luminance source does not support rotation by 45 degrees.")},t.prototype.toString=function(){for(var e=new Uint8ClampedArray(this.width),r=new ee,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)}})(),zn=(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})(Wr),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 U("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 zn(this)},e.DEGREE_TO_RADIANS=Math.PI/180,e})(Wr),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})(),Ce=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.")},Ft=(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 Ce(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 Ce(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 Ce(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 Ce(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 Ce(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 Ce(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 Ce(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 Ce(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 Ce(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 Ce(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 Ce(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 Ce(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 Ce(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 Ve("element with id '"+e+"' not found");if(n.nodeName.toLowerCase()!==r.toLowerCase())throw new Ve("element with id '"+e+"' must be an "+r+" element");return n},t.prototype.decodeFromImage=function(e,r){if(!e&&!r)throw new Ve("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 Ve("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 Ve("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 Ve("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 Ve("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 Ve("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 Ve("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 Ve("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 Ce(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 Ce(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 S("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 S,f=v instanceof we||v instanceof k,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 we||l instanceof k,s=l instanceof S;(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})(),Re=(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})(),bn;(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"})(bn||(bn={}));const $=bn;var Sn;(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"})(Sn||(Sn={}));const Ee=Sn;var Xr=(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})(),er=(function(){function t(){}return t.prototype.exp=function(e){return this.expTable[e]},t.prototype.log=function(e){if(e===0)throw new U;return this.logTable[e]},t.addOrSubtract=function(e,r){return e^r},t})(),st=(function(){function t(e,r){if(r.length===0)throw new U;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=er.addOrSubtract(n,o)}return n}n=r[0];for(var s=r.length,l=this.field,i=1;i<s;i++)n=er.addOrSubtract(l.multiply(e,n),r[i]);return n},t.prototype.addOrSubtract=function(e){if(!this.field.equals(e.field))throw new U("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]=er.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 U("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]=er.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 U;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 U("GenericGFPolys do not have same GenericGF field");if(e.isZero())throw new U("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)}})(),ua=(function(t){uc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ArithmeticException",e})(Ie),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 st(a,Int32Array.from([0])),a.one=new st(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 U;if(n===0)return this.zero;var i=new Int32Array(r+1);return i[0]=n,new st(this,i)},e.prototype.inverse=function(r){if(r===0)throw new ua;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"+z.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})(er),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)}})(),Er=(function(t){fc(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ReedSolomonException",e})(Ie),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})(Ie),jr=(function(){function t(e){this.field=e}return t.prototype.decode=function(e,r){for(var n=this.field,i=new st(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 st(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 Er("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 Er("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 Er("sigmaTilde(0) was zero");var m=a.inverse(w),E=c.multiplyScalar(m),C=s.multiplyScalar(m);return[E,C]},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 Er("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})(),xe;(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"})(xe||(xe={}));var xi=(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 Xr(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=xe.UPPER,i=xe.UPPER,a="",o=0;o<r;)if(i===xe.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===xe.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 xe.LOWER;case"P":return xe.PUNCT;case"M":return xe.MIXED;case"D":return xe.DIGIT;case"B":return xe.BINARY;case"U":default:return xe.UPPER}},t.getCharacter=function(e,r){switch(e){case xe.UPPER:return t.UPPER_TABLE[r];case xe.LOWER:return t.LOWER_TABLE[r];case xe.MIXED:return t.MIXED_TABLE[r];case xe.PUNCT:return t.PUNCT_TABLE[r];case xe.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 k;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 jr(r);c.decode(s,a-i)}catch(y){throw new k(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 k;(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*z.truncDivision(z.truncDivision(i,2)-1,15),c=i/2,f=z.truncDivision(l,2),s=0;s<c;s++){var d=s+z.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})(),bn=(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*bn.floatToIntBits(this.x)+bn.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})(),Gn=(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})(),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,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})(Gn),Sn=(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 _=null,E=1;_===null&&E<m;E++)_=this.getBlackPointOnSegment(e,n+E,e+E,n);if(_==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,_)}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})(),gi=(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})(),la=(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})(),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)}})(),hc=(function(t){dc(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 _=la.quadrilateralToQuadrilateral(a,o,s,l,c,f,d,v,h,p,g,y,w,m,A,E);return this.sampleGridWithTransform(r,n,i,_)},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),gi.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})(gi),zn=(function(){function t(){}return t.setGridSampler=function(e){t.gridSampler=e},t.getInstance=function(){return t.gridSampler},t.gridSampler=new hc,t})(),Oe=(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})(),vc=(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 fc(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 zr(De.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 Sn(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 Oe(o+7,s-7),!1,1,-1).toResultPoint(),r=this.getFirstDifferent(new Oe(o+7,s+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Oe(o-7,s+7),!1,-1,1).toResultPoint(),i=this.getFirstDifferent(new Oe(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 Sn(this.image,15,l,c).detect();e=a[0],r=a[1],n=a[2],i=a[3]}catch{e=this.getFirstDifferent(new Oe(l+7,c-7),!1,1,-1).toResultPoint(),r=this.getFirstDifferent(new Oe(l+7,c+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Oe(l-7,c+7),!1,-1,1).toResultPoint(),i=this.getFirstDifferent(new Oe(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 Oe(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=zn.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 Oe(e.getX()-a,e.getY()+a),r=new Oe(r.getX()-a,r.getY()-a),n=new Oe(n.getX()+a,n.getY()-a),i=new Oe(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 Oe(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})(),In=(function(){function t(){}return t.prototype.decode=function(e,r){r===void 0&&(r=null);var n=null,i=new vc(e.getBlackMatrix()),a=null,o=null;try{var s=i.detectMirror(!1);a=s.getPoints(),this.reportFoundResultPoints(r,a),o=new pi().decode(s)}catch(d){n=d}if(o==null)try{var s=i.detectMirror(!0);a=s.getPoints(),this.reportFoundResultPoints(r,a),o=new pi().decode(s)}catch(d){throw n??d}var l=new Re(o.getText(),o.getRawBytes(),o.getNumBits(),a,U.AZTEC,ne.currentTimeMillis()),c=o.getByteSegments();c!=null&&l.putMetadata(Ee.BYTE_SEGMENTS,c);var f=o.getECLevel();return f!=null&&l.putMetadata(Ee.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})(),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){return r===void 0&&(r=500),t.call(this,new In,r)||this}return e})(Ft);var Ae=(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(Ee.ORIENTATION)===!0&&(s=s+o.get(Ee.ORIENTATION)%360),a.putMetadata(Ee.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 ge(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(Ee.ORIENTATION,180);var _=E.getResultPoints();_!==null&&(_[0]=new k(n-_[0].getX()-1,_[0].getY()),_[1]=new k(n-_[1].getX()-1,_[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})(),gc=(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)}})(),xi=(function(t){gc(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=Ae.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){Ae.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,_=!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&&(_=!0),m!==e.CODE_STOP&&(E++,A+=E*m),p=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&&(_=!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&&(_=!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&&(_=!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 we;var L=h.length;if(L===0)throw new I;L>0&&_&&(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,ve=new Uint8Array(z),Ge=0;Ge<z;Ge++)ve[Ge]=c[Ge];var hr=[new k(te,r),new k(V,r)];return new Re(h,ve,0,hr,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})(Ae),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)}})(),un=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.")},yi=(function(t){xc(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,un(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=un(c),_=E.next();!_.done;_=E.next()){var m=_.value;A+=m}}catch(z){s={error:z}}finally{try{_&&!_.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 we;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 Re(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,un(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})(Ae),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)}})(),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.")},mi=(function(t){yc(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=mc(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 Re(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;){Ae.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(Ae.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=Ae.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})(Ae),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)}})(),kt=(function(t){wc(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(Ae.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=Ae.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})(Ae),Ec=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.")},Ac=(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 Re(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 v=(i=void 0,Ec(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([[Ee.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})(),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.")},_c=(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 Re(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 v=(i=void 0,Cc(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([[Ee.ISSUE_NUMBER,parseInt(e)]])},t})(),bc=(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 Ac;return a.decodeRow(e,r,i)}catch{var o=new _c;return o.decodeRow(e,r,i)}},t.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]),t})(),Sc=(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)}})(),de=(function(t){Sc(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 we;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)],_=new Re(y,null,0,E,A,new Date().getTime()),b=0;try{var O=bc.decodeRow(r,n,v[1]);_.putMetadata(Ee.UPC_EAN_EXTENSION,O.getText()),_.putAllMetadata(O.getResultMetadata()),_.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,_},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),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)}})(),wi=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.")},On=(function(t){Ic(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=de.decodeDigit(r,c,d,de.L_AND_G_PATTERNS);i+=String.fromCharCode(48+p%10);try{for(var g=(a=void 0,wi(c)),y=g.next();!y.done;y=g.next()){var w=y.value;d+=w}}catch(_){a={error:_}}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=de.findGuardPattern(r,d,!0,de.MIDDLE_PATTERN,new Int32Array(de.MIDDLE_PATTERN.length).fill(0));d=m[1];for(var h=0;h<6&&d<f;h++){var p=de.decodeDigit(r,c,d,de.L_PATTERNS);i+=String.fromCharCode(48+p);try{for(var A=(s=void 0,wi(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})(de),Oc=(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){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){Oc(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=de.decodeDigit(r,c,d,de.L_PATTERNS);i+=String.fromCharCode(48+h);try{for(var p=(a=void 0,Ei(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=de.findGuardPattern(r,d,!0,de.MIDDLE_PATTERN,new Int32Array(de.MIDDLE_PATTERN.length).fill(0));d=w[1];for(var v=0;v<4&&d<f;v++){var h=de.decodeDigit(r,c,d,de.L_PATTERNS);i+=String.fromCharCode(48+h);try{for(var m=(s=void 0,Ei(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})(de),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)}})(),Ci=(function(t){Tc(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.ean13Reader=new On,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 Re(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})(de),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)}})(),Dc=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){Nc(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,Dc(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 de.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})(de),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)}})(),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.")},cn=(function(t){Bc(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 On),i.indexOf(U.UPC_A)>-1&&a.push(new Ci),i.indexOf(U.EAN_8)>-1&&a.push(new Ai),i.indexOf(U.UPC_E)>-1&&a.push(new _i)),a.length===0&&(a.push(new On),a.push(new Ci),a.push(new Ai),a.push(new _i)),n.readers=a,n}return e.prototype.decodeRow=function(r,n,i){var a,o;try{for(var s=bi(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 Re(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=bi(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})(Ae),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.")},xt=(function(t){Rc(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(Ae.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=Pc(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})(Ae),kr=(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})(),ua=(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})(),kc=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=kc(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})(),Mc=(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 ge(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})(),Wn=(function(){function t(e){this.newPosition=e}return t.prototype.getNewPosition=function(){return this.newPosition},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)}})(),Fe=(function(t){Lc(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})(Wn),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)}})(),gt=(function(t){Fc(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})(Wn),Vc=(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)}})(),_t=(function(t){Vc(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})(Wn),wr=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(){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=wr(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=wr(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=wr(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=wr(t.FOUR_DIGIT_DATA_LENGTH),_=E.next();!_.done;_=E.next()){var h=_.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{_&&!_.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})(),Nr=(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=Uc.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 _t(this.information.getSize(),_t.FNC1,_t.FNC1):new _t(this.information.getSize(),r-1,_t.FNC1)}var n=this.extractNumericValueFromBitArray(e,7),i=(n-8)/11,a=(n-8)%11;return new _t(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 Fe(e+5,Fe.FNC1);if(r>=5&&r<15)return new Fe(e+5,"0"+(r-5));var n=this.extractNumericValueFromBitArray(e,7);if(n>=64&&n<90)return new Fe(e+7,""+(n+1));if(n>=90&&n<116)return new Fe(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 Fe(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 Fe(e+5,Fe.FNC1);if(r>=5&&r<15)return new Fe(e+5,"0"+(r-5));var n=this.extractNumericValueFromBitArray(e,6);if(n>=32&&n<58)return new Fe(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 dr("Decoding invalid alphanumeric value: "+n)}return new Fe(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})(),ca=(function(){function t(e){this.information=e,this.generalDecoder=new Nr(e)}return t.prototype.getInformation=function(){return this.information},t.prototype.getGeneralDecoder=function(){return this.generalDecoder},t})(),$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)}})(),$e=(function(t){$c(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})(ca),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)}})(),Gc=(function(t){Hc(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})($e),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)}})(),Wc=(function(t){zc(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})(ca),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)}})(),Dr=(function(t){Xc(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})($e),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)}})(),fa=(function(t){jc(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()!=e.HEADER_SIZE+Dr.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+Dr.GTIN_SIZE,e.WEIGHT_SIZE),r.toString()},e.HEADER_SIZE=5,e.WEIGHT_SIZE=15,e})(Dr),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)}})(),Yc=(function(t){Kc(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})(fa),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)}})(),Zc=(function(t){qc(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})(fa),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)}})(),Jc=(function(t){Qc(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+$e.GTIN_SIZE)throw new I;var r=new J;this.encodeCompressedGtin(r,e.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+$e.GTIN_SIZE,e.LAST_DIGIT_SIZE);r.append("(392"),r.append(n),r.append(")");var i=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+$e.GTIN_SIZE+e.LAST_DIGIT_SIZE,null);return r.append(i.getNewString()),r.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e})($e),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){return t.call(this,r)||this}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()<e.HEADER_SIZE+$e.GTIN_SIZE)throw new I;var r=new J;this.encodeCompressedGtin(r,e.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+$e.GTIN_SIZE,e.LAST_DIGIT_SIZE);r.append("(393"),r.append(n),r.append(")");var i=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+$e.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+$e.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})($e),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)}})(),at=(function(t){r1(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})(Dr);function n1(t){try{if(t.get(1))return new Gc(t);if(!t.get(2))return new Wc(t);var e=Nr.extractNumericValueFromBitArray(t,1,4);switch(e){case 4:return new Yc(t);case 5:return new Zc(t)}var r=Nr.extractNumericValueFromBitArray(t,1,5);switch(r){case 12:return new Jc(t);case 13:return new t1(t)}var n=Nr.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 dr("unknown decoder: "+t)}}var Si=(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})(),i1=(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})(),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)}})(),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.")},o1=(function(t){a1(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(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=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 i1(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 v=d.value;if(v.getPairs().length!==r.length){var h=!0;try{for(var p=(o=void 0,ot(v.getPairs())),g=p.next();!g.done;g=p.next()){var y=g.value,w=!1;try{for(var m=(l=void 0,ot(r)),A=m.next();!A.done;A=m.next()){var E=A.value;if(Si.equals(y,E)){w=!0;break}}}catch(_){l={error:_}}finally{try{A&&!A.done&&(c=m.return)&&c.call(m)}finally{if(l)throw l.error}}w||(h=!1)}}catch(_){o={error:_}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(o)throw o.error}}}}}catch(_){i={error:_}}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 v=d.value,h=!0;try{for(var p=(o=void 0,ot(r)),g=p.next();!g.done;g=p.next()){var y=g.value,w=!1;try{for(var m=(l=void 0,ot(v.getPairs())),A=m.next();!A.done;A=m.next()){var E=A.value;if(y.equals(E)){w=!0;break}}}catch(_){l={error:_}}finally{try{A&&!A.done&&(c=m.return)&&c.call(m)}finally{if(l)throw l.error}}if(!w){h=!1;break}}}catch(_){o={error:_}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(o)throw o.error}}if(h)return!0}}catch(_){i={error:_}}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=Mc.buildBitArray(r),i=n1(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 Re(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 Si(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 ua(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 _=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[_][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[_][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,ve=St.getRSSvalue(p,V,!0),Ge=St.getRSSvalue(g,z,!1),hr=e.EVEN_TOTAL_SUBSET[te],rt=e.GSUM[te],nt=ve*hr+Ge+rt;return new kr(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),s1=(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){s1(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})(kr),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)}})(),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.")},Ii=(function(t){u1(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=fn(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,fn(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=fn(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 Re(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 l1(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)Ae.recordPatternInReverse(r,n.getStartEnd()[0],a);else{Ae.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 _=0,b=0,s=h.length-1;s>=0;s--)_*=9,_+=h[s],b+=h[s];var O=E+3*_;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],ve=e.OUTSIDE_GSUM[P];return new kr(te*z+V+ve,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),Ge=e.INSIDE_ODD_TOTAL_SUBSET[P],ve=e.INSIDE_GSUM[P];return new kr(V*Ge+te+ve,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 ua(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),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)}})(),er=(function(t){c1(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 cn(r)),i.includes(U.CODE_39)&&n.readers.push(new yi(a)),i.includes(U.CODE_128)&&n.readers.push(new xi),i.includes(U.ITF)&&n.readers.push(new mi),i.includes(U.RSS_14)&&n.readers.push(new Ii),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 o1))),n.readers.length===0&&(n.readers.push(new cn(r)),n.readers.push(new yi),n.readers.push(new cn(r)),n.readers.push(new xi),n.readers.push(new mi),n.readers.push(new Ii)),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})(Ae),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)}})();(function(t){f1(e,t);function e(r,n){return r===void 0&&(r=500),t.call(this,new er(n),r,n)||this}return e})(Ft);var Oi=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.")},K=(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})(),j=(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})(),d1=(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=Oi(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=Oi(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 K(5,new j(1,3))),new t(2,12,12,10,10,new K(7,new j(1,5))),new t(3,14,14,12,12,new K(10,new j(1,8))),new t(4,16,16,14,14,new K(12,new j(1,12))),new t(5,18,18,16,16,new K(14,new j(1,18))),new t(6,20,20,18,18,new K(18,new j(1,22))),new t(7,22,22,20,20,new K(20,new j(1,30))),new t(8,24,24,22,22,new K(24,new j(1,36))),new t(9,26,26,24,24,new K(28,new j(1,44))),new t(10,32,32,14,14,new K(36,new j(1,62))),new t(11,36,36,16,16,new K(42,new j(1,86))),new t(12,40,40,18,18,new K(48,new j(1,114))),new t(13,44,44,20,20,new K(56,new j(1,144))),new t(14,48,48,22,22,new K(68,new j(1,174))),new t(15,52,52,24,24,new K(42,new j(2,102))),new t(16,64,64,14,14,new K(56,new j(2,140))),new t(17,72,72,16,16,new K(36,new j(4,92))),new t(18,80,80,18,18,new K(48,new j(4,114))),new t(19,88,88,20,20,new K(56,new j(4,144))),new t(20,96,96,22,22,new K(68,new j(4,174))),new t(21,104,104,24,24,new K(56,new j(6,136))),new t(22,120,120,18,18,new K(68,new j(6,175))),new t(23,132,132,20,20,new K(62,new j(8,163))),new t(24,144,144,22,22,new K(62,new j(8,156),new j(2,155))),new t(25,8,18,6,16,new K(7,new j(1,5))),new t(26,8,32,6,14,new K(11,new j(1,10))),new t(27,12,26,10,24,new K(14,new j(1,16))),new t(28,12,36,10,16,new K(18,new j(1,22))),new t(29,16,36,14,16,new K(24,new j(1,32))),new t(30,16,48,14,22,new K(28,new j(1,49)))]},t.VERSIONS=t.buildVersions(),t})(),h1=(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 d1.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})(),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.")},v1=(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=Ti(c),d=f.next();!d.done;d=f.next()){var v=d.value;l+=v.getCount()}}catch(ve){n={error:ve}}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=Ti(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(ve){a={error:ve}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}for(var E=h[0].codewords.length,_=E-s.getECCodewords(),b=_-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[_-1]=e[O++];for(var te=h[0].codewords.length,w=_;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})(),da=(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})(),fe;(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"})(fe||(fe={}));var p1=(function(){function t(){}return t.decode=function(e){var r=new da(e),n=new J,i=new J,a=new Array,o=fe.ASCII_ENCODE;do if(o===fe.ASCII_ENCODE)o=this.decodeAsciiSegment(r,n,i);else{switch(o){case fe.C40_ENCODE:this.decodeC40Segment(r,n);break;case fe.TEXT_ENCODE:this.decodeTextSegment(r,n);break;case fe.ANSIX12_ENCODE:this.decodeAnsiX12Segment(r,n);break;case fe.EDIFACT_ENCODE:this.decodeEdifactSegment(r,n);break;case fe.BASE256_ENCODE:this.decodeBase256Segment(r,n,a);break;default:throw new R}o=fe.ASCII_ENCODE}while(o!==fe.PAD_ENCODE&&r.available()>0);return i.length()>0&&n.append(i.toString()),new Gr(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)),fe.ASCII_ENCODE;if(a===129)return fe.PAD_ENCODE;if(a<=229){var o=a-130;o<10&&r.append("0"),r.append(""+o)}else switch(a){case 230:return fe.C40_ENCODE;case 231:return fe.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 fe.ANSIX12_ENCODE;case 239:return fe.TEXT_ENCODE;case 240:return fe.EDIFACT_ENCODE;case 241:break;default:if(a!==254||e.available()!==0)throw new R;break}}while(e.available()>0);return fe.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(Ye.decode(s,re.ISO88591))}catch(c){throw new dr("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})(),g1=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(){this.rsDecoder=new zr(De.DATA_MATRIX_FIELD_256)}return t.prototype.decode=function(e){var r,n,i=new h1(e),a=i.getVersion(),o=i.readCodewords(),s=v1.getDataBlocks(o,a),l=0;try{for(var c=g1(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 p1.decode(v)},t.prototype.correctErrors=function(e,r){var n=new Int32Array(e);try{this.rsDecoder.decode(n,e.length-r)}catch{throw new we}for(var i=0;i<r;i++)e[i]=n[i]},t})(),y1=(function(){function t(e){this.image=e,this.rectangleDetector=new Sn(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 Gn(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=zn.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})(),Tn=(function(){function t(){this.decoder=new x1}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 y1(e.getBlackMatrix()).detect();n=this.decoder.decode(o.getBits()),i=o.getPoints()}var s=n.getRawBytes(),l=new Re(n.getText(),s,8*s.length,i,U.DATA_MATRIX,ne.currentTimeMillis()),c=n.getByteSegments();c!=null&&l.putMetadata(Ee.BYTE_SEGMENTS,c);var f=n.getECLevel();return f!=null&&l.putMetadata(Ee.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})(),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)}})();(function(t){m1(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Tn,r)||this}return e})(Ft);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 w1=(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 Ve(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})(),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.")},ha=(function(){function t(e){this.errorCorrectionLevel=w1.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=E1(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})(),A1=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.")},C=(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=A1(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})(),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.")},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=C1(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=ha.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 C(7,new x(1,19)),new C(10,new x(1,16)),new C(13,new x(1,13)),new C(17,new x(1,9))),new t(2,Int32Array.from([6,18]),new C(10,new x(1,34)),new C(16,new x(1,28)),new C(22,new x(1,22)),new C(28,new x(1,16))),new t(3,Int32Array.from([6,22]),new C(15,new x(1,55)),new C(26,new x(1,44)),new C(18,new x(2,17)),new C(22,new x(2,13))),new t(4,Int32Array.from([6,26]),new C(20,new x(1,80)),new C(18,new x(2,32)),new C(26,new x(2,24)),new C(16,new x(4,9))),new t(5,Int32Array.from([6,30]),new C(26,new x(1,108)),new C(24,new x(2,43)),new C(18,new x(2,15),new x(2,16)),new C(22,new x(2,11),new x(2,12))),new t(6,Int32Array.from([6,34]),new C(18,new x(2,68)),new C(16,new x(4,27)),new C(24,new x(4,19)),new C(28,new x(4,15))),new t(7,Int32Array.from([6,22,38]),new C(20,new x(2,78)),new C(18,new x(4,31)),new C(18,new x(2,14),new x(4,15)),new C(26,new x(4,13),new x(1,14))),new t(8,Int32Array.from([6,24,42]),new C(24,new x(2,97)),new C(22,new x(2,38),new x(2,39)),new C(22,new x(4,18),new x(2,19)),new C(26,new x(4,14),new x(2,15))),new t(9,Int32Array.from([6,26,46]),new C(30,new x(2,116)),new C(22,new x(3,36),new x(2,37)),new C(20,new x(4,16),new x(4,17)),new C(24,new x(4,12),new x(4,13))),new t(10,Int32Array.from([6,28,50]),new C(18,new x(2,68),new x(2,69)),new C(26,new x(4,43),new x(1,44)),new C(24,new x(6,19),new x(2,20)),new C(28,new x(6,15),new x(2,16))),new t(11,Int32Array.from([6,30,54]),new C(20,new x(4,81)),new C(30,new x(1,50),new x(4,51)),new C(28,new x(4,22),new x(4,23)),new C(24,new x(3,12),new x(8,13))),new t(12,Int32Array.from([6,32,58]),new C(24,new x(2,92),new x(2,93)),new C(22,new x(6,36),new x(2,37)),new C(26,new x(4,20),new x(6,21)),new C(28,new x(7,14),new x(4,15))),new t(13,Int32Array.from([6,34,62]),new C(26,new x(4,107)),new C(22,new x(8,37),new x(1,38)),new C(24,new x(8,20),new x(4,21)),new C(22,new x(12,11),new x(4,12))),new t(14,Int32Array.from([6,26,46,66]),new C(30,new x(3,115),new x(1,116)),new C(24,new x(4,40),new x(5,41)),new C(20,new x(11,16),new x(5,17)),new C(24,new x(11,12),new x(5,13))),new t(15,Int32Array.from([6,26,48,70]),new C(22,new x(5,87),new x(1,88)),new C(24,new x(5,41),new x(5,42)),new C(30,new x(5,24),new x(7,25)),new C(24,new x(11,12),new x(7,13))),new t(16,Int32Array.from([6,26,50,74]),new C(24,new x(5,98),new x(1,99)),new C(28,new x(7,45),new x(3,46)),new C(24,new x(15,19),new x(2,20)),new C(30,new x(3,15),new x(13,16))),new t(17,Int32Array.from([6,30,54,78]),new C(28,new x(1,107),new x(5,108)),new C(28,new x(10,46),new x(1,47)),new C(28,new x(1,22),new x(15,23)),new C(28,new x(2,14),new x(17,15))),new t(18,Int32Array.from([6,30,56,82]),new C(30,new x(5,120),new x(1,121)),new C(26,new x(9,43),new x(4,44)),new C(28,new x(17,22),new x(1,23)),new C(28,new x(2,14),new x(19,15))),new t(19,Int32Array.from([6,30,58,86]),new C(28,new x(3,113),new x(4,114)),new C(26,new x(3,44),new x(11,45)),new C(26,new x(17,21),new x(4,22)),new C(26,new x(9,13),new x(16,14))),new t(20,Int32Array.from([6,34,62,90]),new C(28,new x(3,107),new x(5,108)),new C(26,new x(3,41),new x(13,42)),new C(30,new x(15,24),new x(5,25)),new C(28,new x(15,15),new x(10,16))),new t(21,Int32Array.from([6,28,50,72,94]),new C(28,new x(4,116),new x(4,117)),new C(26,new x(17,42)),new C(28,new x(17,22),new x(6,23)),new C(30,new x(19,16),new x(6,17))),new t(22,Int32Array.from([6,26,50,74,98]),new C(28,new x(2,111),new x(7,112)),new C(28,new x(17,46)),new C(30,new x(7,24),new x(16,25)),new C(24,new x(34,13))),new t(23,Int32Array.from([6,30,54,78,102]),new C(30,new x(4,121),new x(5,122)),new C(28,new x(4,47),new x(14,48)),new C(30,new x(11,24),new x(14,25)),new C(30,new x(16,15),new x(14,16))),new t(24,Int32Array.from([6,28,54,80,106]),new C(30,new x(6,117),new x(4,118)),new C(28,new x(6,45),new x(14,46)),new C(30,new x(11,24),new x(16,25)),new C(30,new x(30,16),new x(2,17))),new t(25,Int32Array.from([6,32,58,84,110]),new C(26,new x(8,106),new x(4,107)),new C(28,new x(8,47),new x(13,48)),new C(30,new x(7,24),new x(22,25)),new C(30,new x(22,15),new x(13,16))),new t(26,Int32Array.from([6,30,58,86,114]),new C(28,new x(10,114),new x(2,115)),new C(28,new x(19,46),new x(4,47)),new C(28,new x(28,22),new x(6,23)),new C(30,new x(33,16),new x(4,17))),new t(27,Int32Array.from([6,34,62,90,118]),new C(30,new x(8,122),new x(4,123)),new C(28,new x(22,45),new x(3,46)),new C(30,new x(8,23),new x(26,24)),new C(30,new x(12,15),new x(28,16))),new t(28,Int32Array.from([6,26,50,74,98,122]),new C(30,new x(3,117),new x(10,118)),new C(28,new x(3,45),new x(23,46)),new C(30,new x(4,24),new x(31,25)),new C(30,new x(11,15),new x(31,16))),new t(29,Int32Array.from([6,30,54,78,102,126]),new C(30,new x(7,116),new x(7,117)),new C(28,new x(21,45),new x(7,46)),new C(30,new x(1,23),new x(37,24)),new C(30,new x(19,15),new x(26,16))),new t(30,Int32Array.from([6,26,52,78,104,130]),new C(30,new x(5,115),new x(10,116)),new C(28,new x(19,47),new x(10,48)),new C(30,new x(15,24),new x(25,25)),new C(30,new x(23,15),new x(25,16))),new t(31,Int32Array.from([6,30,56,82,108,134]),new C(30,new x(13,115),new x(3,116)),new C(28,new x(2,46),new x(29,47)),new C(30,new x(42,24),new x(1,25)),new C(30,new x(23,15),new x(28,16))),new t(32,Int32Array.from([6,34,60,86,112,138]),new C(30,new x(17,115)),new C(28,new x(10,46),new x(23,47)),new C(30,new x(10,24),new x(35,25)),new C(30,new x(19,15),new x(35,16))),new t(33,Int32Array.from([6,30,58,86,114,142]),new C(30,new x(17,115),new x(1,116)),new C(28,new x(14,46),new x(21,47)),new C(30,new x(29,24),new x(19,25)),new C(30,new x(11,15),new x(46,16))),new t(34,Int32Array.from([6,34,62,90,118,146]),new C(30,new x(13,115),new x(6,116)),new C(28,new x(14,46),new x(23,47)),new C(30,new x(44,24),new x(7,25)),new C(30,new x(59,16),new x(1,17))),new t(35,Int32Array.from([6,30,54,78,102,126,150]),new C(30,new x(12,121),new x(7,122)),new C(28,new x(12,47),new x(26,48)),new C(30,new x(39,24),new x(14,25)),new C(30,new x(22,15),new x(41,16))),new t(36,Int32Array.from([6,24,50,76,102,128,154]),new C(30,new x(6,121),new x(14,122)),new C(28,new x(6,47),new x(34,48)),new C(30,new x(46,24),new x(10,25)),new C(30,new x(2,15),new x(64,16))),new t(37,Int32Array.from([6,28,54,80,106,132,158]),new C(30,new x(17,122),new x(4,123)),new C(28,new x(29,46),new x(14,47)),new C(30,new x(49,24),new x(10,25)),new C(30,new x(24,15),new x(46,16))),new t(38,Int32Array.from([6,32,58,84,110,136,162]),new C(30,new x(4,122),new x(18,123)),new C(28,new x(13,46),new x(32,47)),new C(30,new x(48,24),new x(14,25)),new C(30,new x(42,15),new x(32,16))),new t(39,Int32Array.from([6,26,54,82,110,138,166]),new C(30,new x(20,117),new x(4,118)),new C(28,new x(40,47),new x(7,48)),new C(30,new x(43,24),new x(22,25)),new C(30,new x(10,15),new x(67,16))),new t(40,Int32Array.from([6,30,58,86,114,142,170]),new C(30,new x(19,118),new x(6,119)),new C(28,new x(18,47),new x(31,48)),new C(30,new x(34,24),new x(34,25)),new C(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 Ni=(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})(),_1=(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=ha.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=Ni.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=Ni.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})(),Di=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(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=Di(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=Di(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 _=p[0].codewords.length,b=p.length-1;b>=0;){var O=p[b].codewords.length;if(O===_)break;b--}b++;for(var P=_-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})(),Me;(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"})(Me||(Me={}));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(Me.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),t.NUMERIC=new t(Me.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),t.ALPHANUMERIC=new t(Me.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),t.STRUCTURED_APPEND=new t(Me.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),t.BYTE=new t(Me.BYTE,"BYTE",Int32Array.from([8,16,16]),4),t.ECI=new t(Me.ECI,"ECI",Int32Array.from([0,0,0]),7),t.KANJI=new t(Me.KANJI,"KANJI",Int32Array.from([8,10,12]),8),t.FNC1_FIRST_POSITION=new t(Me.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),t.FNC1_SECOND_POSITION=new t(Me.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),t.HANZI=new t(Me.HANZI,"HANZI",Int32Array.from([8,10,12]),13),t})(),S1=(function(){function t(){}return t.decode=function(e,r,n,i){var a=new da(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=he.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 Gr(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(Ye.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(Ye.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(Ye.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})(),va=(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})(),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.")},I1=(function(){function t(){this.rsDecoder=new zr(De.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 _1(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 va(!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=b1.getDataBlocks(c,s,l),d=0;try{for(var v=Bi(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=Bi(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 _=0;_<E;_++)g[y++]=A[_]}}catch(b){a={error:b}}finally{try{m&&!m.done&&(o=w.return)&&o.call(w)}finally{if(a)throw a.error}}return S1.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 we}for(var i=0;i<r;i++)e[i]=n[i]},t})(),O1=(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){O1(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),N1=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.")},D1=(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=N1(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 T1(s,l,c);this.possibleCenters.push(h),this.resultPointCallback!==null&&this.resultPointCallback!==void 0&&this.resultPointCallback.foundPossibleResultPoint(h)}return null},t})(),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)}})(),R1=(function(t){B1(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),P1=(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})(),Xt=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.")},k1=(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 P1(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 R1(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=Xt(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=Xt(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=Xt(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=Xt(this.possibleCenters),d=f.next();!d.done;d=f.next()){var v=d.value,h=v.getEstimatedModuleSize();l+=h,c+=h*h}}catch(_){e={error:_}}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(_,b){var O=Math.abs(b.getEstimatedModuleSize()-s),P=Math.abs(_.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=Xt(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})(),M1=(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 k1(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 Gn(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),la.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=zn.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 D1(this.image,o,l,s-o,c-l,e,this.resultPointCallback);return f.find()},t})(),Nn=(function(){function t(){this.decoder=new I1}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 M1(e.getBlackMatrix()).detect(r);n=this.decoder.decodeBitMatrix(o.getBits(),r),i=o.getPoints()}n.getOther()instanceof va&&n.getOther().applyMirroredCorrection(i);var s=new Re(n.getText(),n.getRawBytes(),void 0,i,U.QR_CODE,void 0),l=n.getByteSegments();l!==null&&s.putMetadata(Ee.BYTE_SEGMENTS,l);var c=n.getECLevel();return c!==null&&s.putMetadata(Ee.ERROR_CORRECTION_LEVEL,c),n.hasStructuredAppend()&&(s.putMetadata(Ee.STRUCTURED_APPEND_SEQUENCE,n.getStructuredAppendSequenceNumber()),s.putMetadata(Ee.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})(),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.")},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=L1(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=Be.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})(),F1=(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})(),V1=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(){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 F1(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,V1(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&&Be.fill(s,null),s},t.findGuardPattern=function(e,r,n,i,a,o,s){Be.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})(),$1=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=$1(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})(),H1=(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 sa;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})(),G1=(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)}})(),z1=(function(t){G1(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})(H1),W1=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(){this.field=z1.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=W1(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],_=this.findErrorLocations(A),b=this.findErrorMagnitudes(E,A,_),c=0;c<_.length;c++){var O=e.length-1-this.field.log(_[c]);if(O<0)throw we.getChecksumInstance();e[O]=this.field.subtract(e[O],b[c])}return _.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 we.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 we.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 we.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})(),Dn=(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})(),j1=(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})(),Xn=(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})(),K1=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.")},pa=(function(){function t(e){this.boundingBox=new Dn(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 Xn,i=0;try{for(var a=K1(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})(),Y1=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.")},q1=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},tr=(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=Y1(this.values.entries()),s=o.next();!s.done;s=o.next()){var l=q1(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})(),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)}})(),dn=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.")},Ri=(function(t){Z1(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=dn(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=dn(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 tr,o=new tr,s=new tr,l=new tr;try{for(var c=dn(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 j1(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})(pa),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(){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=Q1(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 Xn,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})(),ef=(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})(),tf=(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=bn.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})(),rf=(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})(),Pi=(function(){function t(){}return t.parseLong=function(e,r){return r===void 0&&(r=void 0),parseInt(e,r)},t})(),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)}})(),af=(function(t){nf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="NullPointerException",e})(Ie),of=(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 af;if(r<0||r>e.length||n<0||r+n>e.length||r+n<0)throw new $n;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})(),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})(Ie),uf=(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)}})(),cf=(function(t){uf(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 lf;i=G.MAX_VALUE}this.buf=Be.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 $n;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 Be.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})(of),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 ga(){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=ga()),Er===null)throw new Error("BigInt is not supported!");return Er(t)}function ff(){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 df=(function(){function t(){}return t.decode=function(e,r){var n=new J(""),i=he.ISO8859_1;n.enableDecoding(i);for(var a=1,o=e[a++],s=new rf;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:he.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 Gr(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(Pi.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(Pi.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(Be.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 cf,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(st(l)>>st(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(st(l)>>st(8*(5-v))));l=0,s=0}}break}return a.append(Ye.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=ga()?ff():[],t.NUMBER_OF_SEQUENCE_CODEWORDS=2,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.")},hf=(function(){function t(){}return t.decode=function(e,r,n,i,a,o,s){for(var l=new Dn(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 Ri(l,w===0):m=new pa(l),d.setDetectionResultColumn(w,m);for(var A=-1,E=A,_=l.getMinY();_<=l.getMaxY();_++){if(A=t.getStartColumn(d,w,_,g),A<0||A>l.getMaxX()){if(E===-1)continue;A=E}var b=t.detectCodeword(e,l.getMinX(),l.getMaxX(),g,A,_,o,s);b!=null&&(m.setCodeword(_,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=Dn.merge(t.adjustBoundingBox(e),t.adjustBoundingBox(r));return new J1(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=jt(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=jt(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 Ri(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 we;if(!c)throw f}if(o.length===0)throw we.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 we.getChecksumInstance()}throw we.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 tr;var c=0;try{for(var f=jt(e.getDetectionResultColumns()),d=f.next();!d.done;d=f.next()){var v=d.value;if(v!=null)try{for(var h=(i=void 0,jt(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,jt(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=tf.getDecodedValue(c),g=W.getCodeword(p);return g===-1?null:new ef(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=df.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 we.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 Xn,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 X1,t})(),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.")},Bn=(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 we?I.getNotFoundInstance():n}},t.decode=function(e,r,n){var i,a,o=new Array,s=U1.detectMultiple(e,r,n);try{for(var l=vf(s.getPoints()),c=l.next();!c.done;c=l.next()){var f=c.value,d=hf.decode(s.getBits(),f[4],f[5],f[6],f[7],t.getMinCodewordWidth(f),t.getMaxCodewordWidth(f)),v=new Re(d.getText(),d.getRawBytes(),void 0,f,U.PDF_417);v.putMetadata(Ee.ERROR_CORRECTION_LEVEL,d.getECLevel());var h=d.getOther();h!=null&&v.putMetadata(Ee.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})(),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)}})(),ki=(function(t){pf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ReaderException",e})(Ie),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.")},gf=(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 er(e)),n.includes(U.QR_CODE)&&i.push(new Nn),n.includes(U.DATA_MATRIX)&&i.push(new Tn),n.includes(U.AZTEC)&&i.push(new In),n.includes(U.PDF_417)&&i.push(new Bn),a&&r&&i.push(new er(e))}i.length===0&&(r||i.push(new er(e)),i.push(new Nn),i.push(new Tn),i.push(new In),i.push(new Bn),r&&i.push(new er(e))),this.readers=i},t.prototype.reset=function(){var e,r;if(this.readers!==null)try{for(var n=Mi(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 ki("No readers where selected, nothing can be read.");try{for(var i=Mi(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 ki)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})(),xf=(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)}})(),yf=(function(t){xf(e,t);function e(r,n){r===void 0&&(r=null),n===void 0&&(n=500);var i=this,a=new gf;return a.setHints(r),i=t.call(this,a,n)||this,i}return e.prototype.decodeBitmap=function(r){return this.reader.decodeWithState(r)},e})(Ft),mf=(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){mf(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Bn,r)||this}return e})(Ft);var 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)}})();(function(t){wf(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Nn,r)||this}return e})(Ft);var Rn;(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"})(Rn||(Rn={}));const Ar=Rn;var xa=(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})(),rr=(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})(),Ef=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.")},Af=(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=Ef(this.bytes),a=i.next();!a.done;a=i.next()){var o=a.value;Be.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
|
-
`)}return e.toString()},t})(),
|
|
17
|
+
`,". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],t.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"],t})(),j=(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})(),In=(function(){function t(){}return t.floatToIntBits=function(e){return e},t.MAX_VALUE=Number.MAX_SAFE_INTEGER,t})(),L=(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*In.floatToIntBits(this.x)+In.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 j.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})(),Wn=(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})(Wn),On=(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 S}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,E=null,C=1;E===null&&C<m;C++)E=this.getBlackPointOnSegment(e,i-C,e+C,i);if(E==null)throw new S;for(var I=null,C=1;I===null&&C<m;C++)I=this.getBlackPointOnSegment(e,n+C,e+C,n);if(I==null)throw new S;for(var B=null,C=1;B===null&&C<m;C++)B=this.getBlackPointOnSegment(r,n+C,r-C,n);if(B==null)throw new S;for(var _=null,C=1;_===null&&C<m;C++)_=this.getBlackPointOnSegment(r,i-C,r-C,i);if(_==null)throw new S;return this.centerEdges(_,E,B,I)}else throw new S},t.prototype.getBlackPointOnSegment=function(e,r,n,i){for(var a=j.round(j.distance(e,r,n,i)),o=(n-e)/a,s=(i-r)/a,l=this.image,c=0;c<a;c++){var f=j.round(e+c*o),d=j.round(r+c*s);if(l.get(f,d))return new L(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 L(d-h,v+h),new L(s+h,l+h),new L(c-h,f-h),new L(a+h,o-h)]:[new L(d+h,v+h),new L(s+h,l-h),new L(c-h,f+h),new L(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})(),yi=(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 S;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 S;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})(),ca=(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,E,C){var I=ca.quadrilateralToQuadrilateral(a,o,s,l,c,f,d,v,h,p,g,y,w,m,E,C);return this.sampleGridWithTransform(r,n,i,I)},e.prototype.sampleGridWithTransform=function(r,n,i,a){if(n<=0||i<=0)throw new S;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),yi.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 S}}return o},e})(yi),Xn=(function(){function t(){}return t.setGridSampler=function(e){t.gridSampler=e},t.getInstance=function(){return t.gridSampler},t.gridSampler=new gc,t})(),Oe=(function(){function t(e,r){this.x=e,this.y=r}return t.prototype.toResultPoint=function(){return new L(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 S;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(z.bitCount(n^this.EXPECTED_CORNER_BITS[i])<=2)return i;throw new S},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 jr(Ne.AZTEC_PARAM);l.decode(o,a)}catch{throw new S}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 S;this.compact=this.nbCenterLayers===5;var v=new L(r.getX()+.5,r.getY()-.5),h=new L(n.getX()+.5,n.getY()+.5),p=new L(i.getX()-.5,i.getY()+.5),g=new L(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 On(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 Oe(o+7,s-7),!1,1,-1).toResultPoint(),r=this.getFirstDifferent(new Oe(o+7,s+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Oe(o-7,s+7),!1,-1,1).toResultPoint(),i=this.getFirstDifferent(new Oe(o-7,s-7),!1,-1,-1).toResultPoint()}var l=j.round((e.getX()+i.getX()+r.getX()+n.getX())/4),c=j.round((e.getY()+i.getY()+r.getY()+n.getY())/4);try{var a=new On(this.image,15,l,c).detect();e=a[0],r=a[1],n=a[2],i=a[3]}catch{e=this.getFirstDifferent(new Oe(l+7,c-7),!1,1,-1).toResultPoint(),r=this.getFirstDifferent(new Oe(l+7,c+7),!1,1,1).toResultPoint(),n=this.getFirstDifferent(new Oe(l-7,c+7),!1,-1,1).toResultPoint(),i=this.getFirstDifferent(new Oe(l-7,c-7),!1,-1,-1).toResultPoint()}return l=j.round((e.getX()+i.getX()+r.getX()+n.getX())/4),c=j.round((e.getY()+i.getY()+r.getY()+n.getY())/4),new Oe(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=Xn.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(j.round(s+d*c),j.round(l+d*f))&&(i|=1<<n-d-1);return i},t.prototype.isWhiteOrBlackRectangle=function(e,r,n,i){var a=3;e=new Oe(e.getX()-a,e.getY()+a),r=new Oe(r.getX()-a,r.getY()-a),n=new Oe(n.getX()+a,n.getY()-a),i=new Oe(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(j.round(s),j.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 Oe(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 L(s+i*a,l+i*o),f=new L(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 L(s+i*a,l+i*o),v=new L(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=j.round(e.getX()),n=j.round(e.getY());return this.isValid(r,n)},t.prototype.distancePoint=function(e,r){return j.distance(e.getX(),e.getY(),r.getX(),r.getY())},t.prototype.distanceResultPoint=function(e,r){return j.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*(z.truncDivision(this.nbLayers-4,8)+1)+15},t})(),Tn=(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 xi().decode(s)}catch(d){n=d}if(o==null)try{var s=i.detectMirror(!0);a=s.getPoints(),this.reportFoundResultPoints(r,a),o=new xi().decode(s)}catch(d){throw n??d}var l=new Re(o.getText(),o.getRawBytes(),o.getNumBits(),a,$.AZTEC,ne.currentTimeMillis()),c=o.getByteSegments();c!=null&&l.putMetadata(Ee.BYTE_SEGMENTS,c);var f=o.getECLevel();return f!=null&&l.putMetadata(Ee.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 Tn,r)||this}return e})(Ft);var Ae=(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(Ee.ORIENTATION)===!0&&(s=s+o.get(Ee.ORIENTATION)%360),a.putMetadata(Ee.ORIENTATION,s);var l=a.getResultPoints();if(l!==null)for(var c=i.getHeight(),f=0;f<l.length;f++)l[f]=new L(c-l[f].getY()-1,l[f].getX());return a}else throw new S}},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 E=new Map;r.forEach(function(B,_){return E.set(_,B)}),E.delete(le.NEED_RESULT_POINT_CALLBACK),r=E}try{var C=g.decodeRow(h,a,r);if(m===1){C.putMetadata(Ee.ORIENTATION,180);var I=C.getResultPoints();I!==null&&(I[0]=new L(n-I[0].getX()-1,I[0].getY()),I[1]=new L(n-I[1].getX()-1,I[1].getY()))}return{value:C}}catch{}},g=this,y=0;y<2;y++){var w=p(y);if(typeof w=="object")return w.value}}throw new S},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 S;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 S},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 S;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)}})(),mi=(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=Ae.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 S},e.decodeCode=function(r,n,i){Ae.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 S},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 k}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,E=s,C=0,I=!0,B=!1,_=!1;!d;){var R=v;switch(v=!1,w=m,m=e.decodeCode(n,y,g),c[l++]=m,m!==e.CODE_STOP&&(I=!0),m!==e.CODE_STOP&&(C++,E+=C*m),p=g,g+=y.reduce(function(Vt,Ut){return Vt+Ut},0),m){case e.CODE_START_A:case e.CODE_START_B:case e.CODE_START_C:throw new k}switch(f){case e.CODE_CODE_A:if(m<64)_===B?h+=String.fromCharCode(32+m):h+=String.fromCharCode(32+m+128),_=!1;else if(m<96)_===B?h+=String.fromCharCode(m-64):h+=String.fromCharCode(m+64),_=!1;else switch(m!==e.CODE_STOP&&(I=!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&&_?(B=!0,_=!1):B&&_?(B=!1,_=!1):_=!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)_===B?h+=String.fromCharCode(32+m):h+=String.fromCharCode(32+m+128),_=!1;else switch(m!==e.CODE_STOP&&(I=!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&&_?(B=!0,_=!1):B&&_?(B=!1,_=!1):_=!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&&(I=!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}R&&(f=f===e.CODE_CODE_A?e.CODE_CODE_B:e.CODE_CODE_A)}var M=g-p;if(g=n.getNextUnset(g),!n.isRange(g,Math.min(n.getSize(),g+(g-p)/2),!1))throw new S;if(E-=C*w,E%103!==w)throw new we;var P=h.length;if(P===0)throw new S;P>0&&I&&(f===e.CODE_CODE_C?h=h.substring(0,P-2):h=h.substring(0,P-1));for(var X=(o[1]+o[0])/2,V=p+M/2,G=c.length,ge=new Uint8Array(G),ze=0;ze<G;ze++)ge[ze]=c[ze];var wt=[new L(X,r),new L(V,r)];return new Re(h,ge,0,wt,$.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})(Ae),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)}})(),un=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.")},wi=(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 S;h=e.patternToChar(g),this.decodeRowResult+=h,p=d;try{for(var y=(a=void 0,un(c)),w=y.next();!w.done;w=y.next()){var m=w.value;d+=m}}catch(G){a={error:G}}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 E=0;try{for(var C=un(c),I=C.next();!I.done;I=C.next()){var m=I.value;E+=m}}catch(G){s={error:G}}finally{try{I&&!I.done&&(l=C.return)&&l.call(C)}finally{if(s)throw s.error}}var B=d-p-E;if(d!==v&&B*2<E)throw new S;if(this.usingCheckDigit){for(var _=this.decodeRowResult.length-1,R=0,M=0;M<_;M++)R+=e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(M));if(this.decodeRowResult.charAt(_)!==e.ALPHABET_STRING.charAt(R%43))throw new we;this.decodeRowResult=this.decodeRowResult.substring(0,_)}if(this.decodeRowResult.length===0)throw new S;var P;this.extendedMode?P=e.decodeExtended(this.decodeRowResult):P=this.decodeRowResult;var X=(f[1]+f[0])/2,V=p+E/2;return new Re(P,null,0,[new L(X,r),new L(V,r)],$.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 S},e.toNarrowWidePattern=function(r){var n,i,a=r.length,o=0,s;do{var l=2147483647;try{for(var c=(n=void 0,un(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 S},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 k;break;case"$":if(s>="A"&&s<="Z")l=String.fromCharCode(s.charCodeAt(0)-64);else throw new k;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 k;break;case"/":if(s>="A"&&s<="O")l=String.fromCharCode(s.charCodeAt(0)-32);else if(s==="Z")l=":";else throw new k;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})(Ae),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.")},Ei=(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 ee;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(C){a={error:C}}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 k;var m=[new L(s[1],r),new L(l[0],r)],E=new Re(f,null,0,m,$.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;){Ae.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 S},e.skipWhiteSpace=function(r){var n=r.getSize(),i=r.getNextSet(0);if(i===n)throw new S;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 S&&(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(Ae.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 S},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=Ae.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 S},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})(Ae),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)}})(),kt=(function(t){Cc(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 k;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 k;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(Ae.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 S},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=Ae.patternMatchVariance(n,f,e.MAX_INDIVIDUAL_VARIANCE);d<o&&(o=d,s=c)}if(s>=0)return s;throw new S},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})(Ae),_c=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 L((n[0]+n[1])/2,e),new L(a,e)],c=new Re(o,null,0,l,$.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 v=(i=void 0,_c(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 S;var g=this.determineCheckDigit(c);if(t.extensionChecksum(n.toString())!==g)throw new S;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 S},t.parseExtensionString=function(e){if(e.length!==5)return null;var r=t.parseExtension5String(e);return r==null?null:new Map([[Ee.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 L((n[0]+n[1])/2,e),new L(a,e)],c=new Re(o,null,0,l,$.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 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 S;if(parseInt(n.toString())%4!==c)throw new S;return l},t.parseExtensionString=function(e){return e.length!==2?null:new Map([[Ee.ISSUE_NUMBER,parseInt(e)]])},t})(),Oc=(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 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)}})(),de=(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 L((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 L(c,r);o.foundPossibleResultPoint(d)}var v=e.decodeEnd(n,c);if(o!=null){var h=new L((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 S;var y=f.toString();if(y.length<8)throw new k;if(!e.checkChecksum(y))throw new we;var w=(a[1]+a[0])/2,m=(v[1]+v[0])/2,E=this.getBarcodeFormat(),C=[new L(w,r),new L(m,r)],I=new Re(y,null,0,C,E,new Date().getTime()),B=0;try{var _=Oc.decodeRow(r,n,v[1]);I.putMetadata(Ee.UPC_EAN_EXTENSION,_.getText()),I.putAllMetadata(_.getResultMetadata()),I.addResultPoints(_.getResultPoints()),B=_.getText().length}catch{}var R=i==null?null:i.get(le.ALLOWED_EAN_EXTENSIONS);if(R!=null){var M=!1;for(var P in R)if(B.toString()===P){M=!0;break}if(!M)throw new S}return E===$.EAN_13||$.UPC_A,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 k;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 k;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),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)}})(),Ai=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.")},Nn=(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=de.decodeDigit(r,c,d,de.L_AND_G_PATTERNS);i+=String.fromCharCode(48+p%10);try{for(var g=(a=void 0,Ai(c)),y=g.next();!y.done;y=g.next()){var w=y.value;d+=w}}catch(I){a={error:I}}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=de.findGuardPattern(r,d,!0,de.MIDDLE_PATTERN,new Int32Array(de.MIDDLE_PATTERN.length).fill(0));d=m[1];for(var h=0;h<6&&d<f;h++){var p=de.decodeDigit(r,c,d,de.L_PATTERNS);i+=String.fromCharCode(48+p);try{for(var E=(s=void 0,Ai(c)),C=E.next();!C.done;C=E.next()){var w=C.value;d+=w}}catch(_){s={error:_}}finally{try{C&&!C.done&&(l=E.return)&&l.call(E)}finally{if(s)throw s.error}}}return{rowOffset:d,resultString:i}},e.prototype.getBarcodeFormat=function(){return $.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 S},e.FIRST_DIGIT_ENCODINGS=[0,11,13,14,19,25,28,21,22,26],e})(de),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)}})(),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.")},_i=(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=de.decodeDigit(r,c,d,de.L_PATTERNS);i+=String.fromCharCode(48+h);try{for(var p=(a=void 0,Ci(c)),g=p.next();!g.done;g=p.next()){var y=g.value;d+=y}}catch(C){a={error:C}}finally{try{g&&!g.done&&(o=p.return)&&o.call(p)}finally{if(a)throw a.error}}}var w=de.findGuardPattern(r,d,!0,de.MIDDLE_PATTERN,new Int32Array(de.MIDDLE_PATTERN.length).fill(0));d=w[1];for(var v=0;v<4&&d<f;v++){var h=de.decodeDigit(r,c,d,de.L_PATTERNS);i+=String.fromCharCode(48+h);try{for(var m=(s=void 0,Ci(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 $.EAN_8},e})(de),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)}})(),bi=(function(t){Bc(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.ean13Reader=new Nn,r}return e.prototype.getBarcodeFormat=function(){return $.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 Re(n.substring(1),null,null,r.getResultPoints(),$.UPC_A);return r.getResultMetadata()!=null&&i.putAllMetadata(r.getResultMetadata()),i}else throw new S},e.prototype.reset=function(){this.ean13Reader.reset()},e})(de),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.")},Si=(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 ee(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 de.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 S.getNotFoundInstance()},e.prototype.getBarcodeFormat=function(){return $.UPC_E},e.convertUPCEtoUPCA=function(r){var n=r.slice(1,7).split("").map(function(o){return o.charCodeAt(0)}),i=new ee;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})(de),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)}})(),Ii=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.")},cn=(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($.EAN_13)>-1&&a.push(new Nn),i.indexOf($.UPC_A)>-1&&a.push(new bi),i.indexOf($.EAN_8)>-1&&a.push(new _i),i.indexOf($.UPC_E)>-1&&a.push(new Si)),a.length===0&&(a.push(new Nn),a.push(new bi),a.push(new _i),a.push(new Si)),n.readers=a,n}return e.prototype.decodeRow=function(r,n,i){var a,o;try{for(var s=Ii(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()===$.EAN_13&&f.getText().charAt(0)==="0",v=i==null?null:i.get(le.POSSIBLE_FORMATS),h=v==null||v.includes($.UPC_A);if(d&&h){var p=f.getRawBytes(),g=new Re(f.getText().substring(1),p,p?p.length:null,f.getResultPoints(),$.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 S},e.prototype.reset=function(){var r,n;try{for(var i=Ii(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})(Ae),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.")},pt=(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(Ae.patternMatchVariance(r,n[i],e.MAX_INDIVIDUAL_VARIANCE)<e.MAX_AVG_VARIANCE)return i;throw new S},e.count=function(r){return j.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})(Ae),Fr=(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})(),fa=(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 L(n,a)),this.resultPoints.push(new L(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})(),ht=(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})(),jn=(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)}})(),Fe=(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})(jn),$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)}})(),vt=(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})(jn),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)}})(),_t=(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 k;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})(jn),Ar=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 S;var f=e.substring(0,2);try{for(var d=Ar(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 S;var p=e.substring(0,3);try{for(var g=Ar(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=Ar(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 S;var E=e.substring(0,4);try{for(var C=Ar(t.FOUR_DIGIT_DATA_LENGTH),I=C.next();!I.done;I=C.next()){var h=I.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{I&&!I.done&&(c=C.return)&&c.call(C)}finally{if(l)throw l.error}}throw new S},t.processFixedAI=function(e,r,n){if(n.length<e)throw new S;var i=n.substring(0,e);if(n.length<e+r)throw new S;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})(),Rr=(function(){function t(e){this.buffer=new ee,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 _t(this.information.getSize(),_t.FNC1,_t.FNC1):new _t(this.information.getSize(),r-1,_t.FNC1)}var n=this.extractNumericValueFromBitArray(e,7),i=(n-8)/11,a=(n-8)%11;return new _t(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 vt(this.current.getPosition(),this.buffer.toString(),n.getRemainingValue()):new vt(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 vt(this.current.getPosition(),this.buffer.toString()):r=new vt(this.current.getPosition(),this.buffer.toString(),e.getSecondDigit()),new ht(!0,r)}if(this.buffer.append(e.getFirstDigit()),e.isSecondDigitFNC1()){var r=new vt(this.current.getPosition(),this.buffer.toString());return new ht(!0,r)}this.buffer.append(e.getSecondDigit())}return this.isNumericToAlphaNumericLatch(this.current.getPosition())&&(this.current.setAlpha(),this.current.incrementPosition(4)),new ht(!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 vt(this.current.getPosition(),this.buffer.toString());return new ht(!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 ht(!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 vt(this.current.getPosition(),this.buffer.toString());return new ht(!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 ht(!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 Fe(e+5,Fe.FNC1);if(r>=5&&r<15)return new Fe(e+5,"0"+(r-5));var n=this.extractNumericValueFromBitArray(e,7);if(n>=64&&n<90)return new Fe(e+7,""+(n+1));if(n>=90&&n<116)return new Fe(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 k}return new Fe(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 Fe(e+5,Fe.FNC1);if(r>=5&&r<15)return new Fe(e+5,"0"+(r-5));var n=this.extractNumericValueFromBitArray(e,6);if(n>=32&&n<58)return new Fe(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 Fe(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})(),da=(function(){function t(e){this.information=e,this.generalDecoder=new Rr(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)}})(),$e=(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})(da),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 ee;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})($e),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)}})(),Kc=(function(t){jc(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){var r=new ee;return this.getGeneralDecoder().decodeAllCodes(r,e.HEADER_SIZE)},e.HEADER_SIZE=5,e})(da),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)}})(),Pr=(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})($e),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)}})(),ha=(function(t){qc(e,t);function e(r){return t.call(this,r)||this}return e.prototype.parseInformation=function(){if(this.getInformation().getSize()!=e.HEADER_SIZE+Pr.GTIN_SIZE+e.WEIGHT_SIZE)throw new S;var r=new ee;return this.encodeCompressedGtin(r,e.HEADER_SIZE),this.encodeCompressedWeight(r,e.HEADER_SIZE+Pr.GTIN_SIZE,e.WEIGHT_SIZE),r.toString()},e.HEADER_SIZE=5,e.WEIGHT_SIZE=15,e})(Pr),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)}})(),Qc=(function(t){Zc(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})(ha),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})(ha),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+$e.GTIN_SIZE)throw new S;var r=new ee;this.encodeCompressedGtin(r,e.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+$e.GTIN_SIZE,e.LAST_DIGIT_SIZE);r.append("(392"),r.append(n),r.append(")");var i=this.getGeneralDecoder().decodeGeneralPurposeField(e.HEADER_SIZE+$e.GTIN_SIZE+e.LAST_DIGIT_SIZE,null);return r.append(i.getNewString()),r.toString()},e.HEADER_SIZE=8,e.LAST_DIGIT_SIZE=2,e})($e),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+$e.GTIN_SIZE)throw new S;var r=new ee;this.encodeCompressedGtin(r,e.HEADER_SIZE);var n=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+$e.GTIN_SIZE,e.LAST_DIGIT_SIZE);r.append("(393"),r.append(n),r.append(")");var i=this.getGeneralDecoder().extractNumericValueFromBitArray(e.HEADER_SIZE+$e.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+$e.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})($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)}})(),nt=(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 S;var r=new ee;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})(Pr);function o1(t){try{if(t.get(1))return new Xc(t);if(!t.get(2))return new Kc(t);var e=Rr.extractNumericValueFromBitArray(t,1,4);switch(e){case 4:return new Qc(t);case 5:return new e1(t)}var r=Rr.extractNumericValueFromBitArray(t,1,5);switch(r){case 12:return new r1(t);case 13:return new i1(t)}var n=Rr.extractNumericValueFromBitArray(t,1,7);switch(n){case 56:return new nt(t,"310","11");case 57:return new nt(t,"320","11");case 58:return new nt(t,"310","13");case 59:return new nt(t,"320","13");case 60:return new nt(t,"310","15");case 61:return new nt(t,"320","15");case 62:return new nt(t,"310","17");case 63:return new nt(t,"320","17")}}catch(i){throw console.log(i),new hr("unknown decoder: "+t)}}var Oi=(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)}})(),it=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 S){if(!this.pairs.length)throw new S;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 S},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,it(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 S},e.isValidSequence=function(r){var n,i;try{for(var a=it(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=it(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,it(v.getPairs())),g=p.next();!g.done;g=p.next()){var y=g.value,w=!1;try{for(var m=(l=void 0,it(r)),E=m.next();!E.done;E=m.next()){var C=E.value;if(Oi.equals(y,C)){w=!0;break}}}catch(I){l={error:I}}finally{try{E&&!E.done&&(c=m.return)&&c.call(m)}finally{if(l)throw l.error}}w||(h=!1)}}catch(I){o={error:I}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(o)throw o.error}}}}}catch(I){i={error:I}}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=it(n),d=f.next();!d.done;d=f.next()){var v=d.value,h=!0;try{for(var p=(o=void 0,it(r)),g=p.next();!g.done;g=p.next()){var y=g.value,w=!1;try{for(var m=(l=void 0,it(v.getPairs())),E=m.next();!E.done;E=m.next()){var C=E.value;if(y.equals(C)){w=!0;break}}}catch(I){l={error:I}}finally{try{E&&!E.done&&(c=m.return)&&c.call(m)}finally{if(l)throw l.error}}if(!w){h=!1;break}}}catch(I){o={error:I}}finally{try{g&&!g.done&&(s=p.return)&&s.call(p)}finally{if(o)throw o.error}}if(h)return!0}}catch(I){i={error:I}}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 Re(a,null,null,l,$.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 S;var f;try{f=this.decodeDataCharacter(r,o,a,!1)}catch(d){f=null,console.log(d)}return new Oi(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 S},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 fa(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=j.sum(new Int32Array(o))/d,h=(n.getStartEnd()[1]-n.getStartEnd()[0])/15;if(Math.abs(v-h)/h>.3)throw new S;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,E=m+.5;if(E<1){if(m<.3)throw new S;E=1}else if(E>8){if(m>8.7)throw new S;E=8}var C=l/2;(l&1)==0?(p[C]=E,y[C]=m-E):(g[C]=E,w[C]=m-E)}this.adjustOddEvenCounts(d);for(var I=4*n.getValue()+(i?0:2)+(a?0:1)-1,B=0,_=0,l=p.length-1;l>=0;l--){if(e.isNotA1left(n,i,a)){var R=e.WEIGHTS[I][2*l];_+=p[l]*R}B+=p[l]}for(var M=0,l=g.length-1;l>=0;l--)if(e.isNotA1left(n,i,a)){var R=e.WEIGHTS[I][2*l+1];M+=g[l]*R}var P=_+M;if((B&1)!=0||B>13||B<4)throw new S;var X=(13-B)/2,V=e.SYMBOL_WIDEST[X],G=9-V,ge=St.getRSSvalue(p,V,!0),ze=St.getRSSvalue(g,G,!1),wt=e.EVEN_TOTAL_SUBSET[X],Vt=e.GSUM[X],Ut=ge*wt+ze+Vt;return new Fr(Ut,P)},e.isNotA1left=function(r,n,i){return!(r.getValue()==0&&n&&i)},e.prototype.adjustOddEvenCounts=function(r){var n=j.sum(new Int32Array(this.getOddCounts())),i=j.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 S;o=!0}else{if(!d)throw new S;l=!0}else if(c==-1)if(f){if(d)throw new S;a=!0}else{if(!d)throw new S;s=!0}else if(c==0){if(f){if(!d)throw new S;n<i?(a=!0,l=!0):(o=!0,s=!0)}else if(d)throw new S}else throw new S;if(a){if(o)throw new S;e.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(o&&e.decrement(this.getOddCounts(),this.getOddRoundingErrors()),s){if(l)throw new S;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})(pt),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})(Fr),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)}})(),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.")},Ti=(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=fn(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,fn(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 S},e.addOrTally=function(r,n){var i,a;if(n!=null){var o=!1;try{for(var s=fn(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 ee,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 Re(o.toString(),null,0,[f[0],f[1],d[0],d[1]],$.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 L(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)Ae.recordPatternInReverse(r,n.getStartEnd()[0],a);else{Ae.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=j.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 E=0,C=0,s=v.length-1;s>=0;s--)C*=9,C+=v[s],E+=v[s];for(var I=0,B=0,s=h.length-1;s>=0;s--)I*=9,I+=h[s],B+=h[s];var _=C+3*I;if(i){if((E&1)!==0||E>12||E<4)throw new S;var R=(12-E)/2,M=e.OUTSIDE_ODD_WIDEST[R],P=9-M,X=St.getRSSvalue(v,M,!1),V=St.getRSSvalue(h,P,!0),G=e.OUTSIDE_EVEN_TOTAL_SUBSET[R],ge=e.OUTSIDE_GSUM[R];return new Fr(X*G+V+ge,_)}else{if((B&1)!==0||B>10||B<4)throw new S;var R=(10-B)/2,M=e.INSIDE_ODD_WIDEST[R],P=9-M,X=St.getRSSvalue(v,M,!0),V=St.getRSSvalue(h,P,!1),ze=e.INSIDE_ODD_TOTAL_SUBSET[R],ge=e.INSIDE_GSUM[R];return new Fr(V*ze+X+ge,_)}},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(pt.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 S},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 fa(d,[s,a[1]],v,h,n)},e.prototype.adjustOddEvenCounts=function(r,n){var i=j.sum(new Int32Array(this.getOddCounts())),a=j.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 S;s=!0}else{if(!v)throw new S;c=!0}else if(f===-1)if(d){if(v)throw new S;o=!0}else{if(!v)throw new S;l=!0}else if(f===0){if(d){if(!v)throw new S;i<a?(o=!0,c=!0):(s=!0,l=!0)}else if(v)throw new S}else throw new S;if(o){if(s)throw new S;pt.increment(this.getOddCounts(),this.getOddRoundingErrors())}if(s&&pt.decrement(this.getOddCounts(),this.getOddRoundingErrors()),l){if(c)throw new S;pt.increment(this.getEvenCounts(),this.getOddRoundingErrors())}c&&pt.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})(pt),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)}})(),tr=(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($.EAN_13)||i.includes($.UPC_A)||i.includes($.EAN_8)||i.includes($.UPC_E))&&n.readers.push(new cn(r)),i.includes($.CODE_39)&&n.readers.push(new wi(a)),i.includes($.CODE_128)&&n.readers.push(new mi),i.includes($.ITF)&&n.readers.push(new Ei),i.includes($.RSS_14)&&n.readers.push(new Ti),i.includes($.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 cn(r)),n.readers.push(new wi),n.readers.push(new cn(r)),n.readers.push(new mi),n.readers.push(new Ei),n.readers.push(new Ti)),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 S},e.prototype.reset=function(){this.readers.forEach(function(r){return r.reset()})},e})(Ae),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 tr(n),r,n)||this}return e})(Ft);var Ni=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.")},Y=(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=Ni(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 k;try{for(var a=Ni(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 k},t.prototype.toString=function(){return""+this.versionNumber},t.buildVersions=function(){return[new t(1,10,10,8,8,new Y(5,new K(1,3))),new t(2,12,12,10,10,new Y(7,new K(1,5))),new t(3,14,14,12,12,new Y(10,new K(1,8))),new t(4,16,16,14,14,new Y(12,new K(1,12))),new t(5,18,18,16,16,new Y(14,new K(1,18))),new t(6,20,20,18,18,new Y(18,new K(1,22))),new t(7,22,22,20,20,new Y(20,new K(1,30))),new t(8,24,24,22,22,new Y(24,new K(1,36))),new t(9,26,26,24,24,new Y(28,new K(1,44))),new t(10,32,32,14,14,new Y(36,new K(1,62))),new t(11,36,36,16,16,new Y(42,new K(1,86))),new t(12,40,40,18,18,new Y(48,new K(1,114))),new t(13,44,44,20,20,new Y(56,new K(1,144))),new t(14,48,48,22,22,new Y(68,new K(1,174))),new t(15,52,52,24,24,new Y(42,new K(2,102))),new t(16,64,64,14,14,new Y(56,new K(2,140))),new t(17,72,72,16,16,new Y(36,new K(4,92))),new t(18,80,80,18,18,new Y(48,new K(4,114))),new t(19,88,88,20,20,new Y(56,new K(4,144))),new t(20,96,96,22,22,new Y(68,new K(4,174))),new t(21,104,104,24,24,new Y(56,new K(6,136))),new t(22,120,120,18,18,new Y(68,new K(6,175))),new t(23,132,132,20,20,new Y(62,new K(8,163))),new t(24,144,144,22,22,new Y(62,new K(8,156),new K(2,155))),new t(25,8,18,6,16,new Y(7,new K(1,5))),new t(26,8,32,6,14,new Y(11,new K(1,10))),new t(27,12,26,10,24,new Y(14,new K(1,16))),new t(28,12,36,10,16,new Y(18,new K(1,22))),new t(29,16,36,14,16,new Y(24,new K(1,32))),new t(30,16,48,14,22,new Y(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 k;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 k;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 U("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 E=h*(a+2)+1+m;if(e.get(E,y)){var C=p+m;f.set(C,w)}}return f},t})(),Di=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=Di(c),d=f.next();!d.done;d=f.next()){var v=d.value;l+=v.getCount()}}catch(ge){n={error:ge}}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=Di(c),y=g.next();!y.done;y=g.next())for(var v=y.value,w=0;w<v.getCount();w++){var m=v.getDataCodewords(),E=s.getECCodewords()+m;h[p++]=new t(m,new Uint8Array(E))}}catch(ge){a={error:ge}}finally{try{y&&!y.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}for(var C=h[0].codewords.length,I=C-s.getECCodewords(),B=I-1,_=0,w=0;w<B;w++)for(var R=0;R<p;R++)h[R].codewords[w]=e[_++];for(var M=r.getVersionNumber()===24,P=M?8:p,R=0;R<P;R++)h[R].codewords[I-1]=e[_++];for(var X=h[0].codewords.length,w=I;w<X;w++)for(var R=0;R<p;R++){var V=M?(R+8)%p:R,G=M&&V>7?w-1:w;h[V].codewords[G]=e[_++]}if(_!==e.length)throw new U;return h},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t})(),va=(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 U(""+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})(),fe;(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"})(fe||(fe={}));var y1=(function(){function t(){}return t.decode=function(e){var r=new va(e),n=new ee,i=new ee,a=new Array,o=fe.ASCII_ENCODE;do if(o===fe.ASCII_ENCODE)o=this.decodeAsciiSegment(r,n,i);else{switch(o){case fe.C40_ENCODE:this.decodeC40Segment(r,n);break;case fe.TEXT_ENCODE:this.decodeTextSegment(r,n);break;case fe.ANSIX12_ENCODE:this.decodeAnsiX12Segment(r,n);break;case fe.EDIFACT_ENCODE:this.decodeEdifactSegment(r,n);break;case fe.BASE256_ENCODE:this.decodeBase256Segment(r,n,a);break;default:throw new k}o=fe.ASCII_ENCODE}while(o!==fe.PAD_ENCODE&&r.available()>0);return i.length()>0&&n.append(i.toString()),new Xr(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 k;if(a<=128)return i&&(a+=128),r.append(String.fromCharCode(a-1)),fe.ASCII_ENCODE;if(a===129)return fe.PAD_ENCODE;if(a<=229){var o=a-130;o<10&&r.append("0"),r.append(""+o)}else switch(a){case 230:return fe.C40_ENCODE;case 231:return fe.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 fe.ANSIX12_ENCODE;case 239:return fe.TEXT_ENCODE;case 240:return fe.EDIFACT_ENCODE;case 241:break;default:if(a!==254||e.available()!==0)throw new k;break}}while(e.available()>0);return fe.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 k;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 k}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 k}}}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 k;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 k}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 k;break;default:throw new k}}}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 k;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 k;for(var s=new Uint8Array(o),l=0;l<o;l++){if(e.available()<8)throw new k;s[l]=this.unrandomize255State(e.readBits(8),i++)}n.push(s);try{r.append(Ye.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 jr(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(E){r={error:E}}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 we}for(var i=0;i<r;i++)e[i]=n[i]},t})(),E1=(function(){function t(e){this.image=e,this.rectangleDetector=new On(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 S;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 Wn(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 L(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 L(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 L(a.getX()+(i.getX()-n.getX())/(o+1),a.getY()+(i.getY()-n.getY())/(o+1)),d=new L(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=Xn.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})(),Dn=(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 Re(n.getText(),s,8*s.length,i,$.DATA_MATRIX,ne.currentTimeMillis()),c=n.getByteSegments();c!=null&&l.putMetadata(Ee.BYTE_SEGMENTS,c);var f=n.getECLevel();return f!=null&&l.putMetadata(Ee.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 S;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 S;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 S;var o=i-e[0];if(o===0)throw new S;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 Dn,r)||this}return e})(Ft);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 C1=(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 Ve(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 U;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})(),_1=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.")},pa=(function(){function t(e){this.errorCorrectionLevel=C1.forBits(e>>3&3),this.dataMask=e&7}return t.numBitsDiffering=function(e,r){return z.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=_1(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.")},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=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.")},mt=(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 k;try{return this.getVersionForNumber((e-17)/4)}catch{throw new k}},t.getVersionForNumber=function(e){if(e<1||e>40)throw new U;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=pa.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 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})(),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 Bi=(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 k;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=pa.decodeFormatInformation(e,a),this.parsedFormatInfo!==null)return this.parsedFormatInfo;throw new k},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 mt.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=mt.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=mt.decodeVersionInformation(n),s!==null&&s.getDimensionForVersion()===e)return this.parsedVersion=s,s;throw new k},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=Bi.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 k;return s},t.prototype.remask=function(){if(this.parsedFormatInfo!==null){var e=Bi.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})(),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.")},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 U;var l=r.getECBlocksForLevel(n),c=0,f=l.getECBlocks();try{for(var d=Ri(f),v=d.next();!v.done;v=d.next()){var h=v.value;c+=h.getCount()}}catch(G){i={error:G}}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=Ri(f),w=y.next();!w.done;w=y.next())for(var h=w.value,m=0;m<h.getCount();m++){var E=h.getDataCodewords(),C=l.getECCodewordsPerBlock()+E;p[g++]=new t(E,new Uint8Array(C))}}catch(G){o={error:G}}finally{try{w&&!w.done&&(s=y.return)&&s.call(y)}finally{if(o)throw o.error}}for(var I=p[0].codewords.length,B=p.length-1;B>=0;){var _=p[B].codewords.length;if(_===I)break;B--}B++;for(var R=I-l.getECCodewordsPerBlock(),M=0,m=0;m<R;m++)for(var P=0;P<g;P++)p[P].codewords[m]=e[M++];for(var P=B;P<g;P++)p[P].codewords[R]=e[M++];for(var X=p[0].codewords.length,m=R;m<X;m++)for(var P=0;P<g;P++){var V=P<B?m:m+1;p[P].codewords[V]=e[M++]}return p},t.prototype.getNumDataCodewords=function(){return this.numDataCodewords},t.prototype.getCodewords=function(){return this.codewords},t})(),Me;(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"})(Me||(Me={}));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 U;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(Me.TERMINATOR,"TERMINATOR",Int32Array.from([0,0,0]),0),t.NUMERIC=new t(Me.NUMERIC,"NUMERIC",Int32Array.from([10,12,14]),1),t.ALPHANUMERIC=new t(Me.ALPHANUMERIC,"ALPHANUMERIC",Int32Array.from([9,11,13]),2),t.STRUCTURED_APPEND=new t(Me.STRUCTURED_APPEND,"STRUCTURED_APPEND",Int32Array.from([0,0,0]),3),t.BYTE=new t(Me.BYTE,"BYTE",Int32Array.from([8,16,16]),4),t.ECI=new t(Me.ECI,"ECI",Int32Array.from([0,0,0]),7),t.KANJI=new t(Me.KANJI,"KANJI",Int32Array.from([8,10,12]),8),t.FNC1_FIRST_POSITION=new t(Me.FNC1_FIRST_POSITION,"FNC1_FIRST_POSITION",Int32Array.from([0,0,0]),5),t.FNC1_SECOND_POSITION=new t(Me.FNC1_SECOND_POSITION,"FNC1_SECOND_POSITION",Int32Array.from([0,0,0]),9),t.HANZI=new t(Me.HANZI,"HANZI",Int32Array.from([8,10,12]),13),t})(),T1=(function(){function t(){}return t.decode=function(e,r,n,i){var a=new va(e),o=new ee,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 k;l=a.readBits(8),c=a.readBits(8);break;case ae.ECI:var p=t.parseECIValue(a);if(f=he.getCharacterSetECIByValue(p),f===null)throw new k;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 k}break}}while(v!==ae.TERMINATOR)}catch{throw new k}return new Xr(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 k;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(Ye.decode(i,re.GB2312))}catch(l){throw new k(l)}},t.decodeKanjiSegment=function(e,r,n){if(n*13>e.available())throw new k;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(Ye.decode(i,re.SHIFT_JIS))}catch(l){throw new k(l)}},t.decodeByteSegment=function(e,r,n,i,a,o){if(8*n>e.available())throw new k;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(Ye.decode(s,c))}catch(f){throw new k(f)}a.push(s)},t.toAlphaNumericChar=function(e){if(e>=t.ALPHANUMERIC_CHARS.length)throw new k;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 k;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 k;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 k;var i=e.readBits(10);if(i>=1e3)throw new k;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 k;var a=e.readBits(7);if(a>=100)throw new k;r.append(t.toAlphaNumericChar(Math.floor(a/10))),r.append(t.toAlphaNumericChar(a%10))}else if(n===1){if(e.available()<4)throw new k;var o=e.readBits(4);if(o>=10)throw new k;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 k},t.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.GB2312_SUBSET=1,t})(),ga=(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})(),Pi=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 jr(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 ga(!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=Pi(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=Pi(f),m=w.next();!m.done;m=w.next()){var p=m.value,E=p.getCodewords(),C=p.getNumDataCodewords();this.correctErrors(E,C);for(var I=0;I<C;I++)g[y++]=E[I]}}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 we}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})(L),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 S},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})(L),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})(),Kt=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 L.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=Kt(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=Kt(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=Kt(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 S;var o=this.possibleCenters,s;if(a>3){var l=0,c=0;try{for(var f=Kt(this.possibleCenters),d=f.next();!d.done;d=f.next()){var v=d.value,h=v.getEstimatedModuleSize();l+=h,c+=h*h}}catch(I){e={error:I}}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(I,B){var _=Math.abs(B.getEstimatedModuleSize()-s),R=Math.abs(I.getEstimatedModuleSize()-s);return _<R?-1:_>R?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=Kt(o),E=m.next();!E.done;E=m.next()){var C=E.value;l+=C.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,_){if(_.getCount()===B.getCount()){var R=Math.abs(_.getEstimatedModuleSize()-s),M=Math.abs(B.getEstimatedModuleSize()-s);return R<M?1:R>M?-1:0}else return _.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 S("No pattern found in proccess finder.");var o=t.computeDimension(r,n,i,a),s=mt.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(E){if(!(E instanceof S))throw E}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 Wn(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),ca.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=Xn.getInstance();return i.sampleGridWithTransform(e,n,n,r)},t.computeDimension=function(e,r,n,i){var a=j.round(L.distance(e,r)/i),o=j.round(L.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 S("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 j.distance(p,g,e,r);v++}if(c+=l,c>0){if(g===i)break;g+=d,c-=s}}return v===2?j.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 S("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 S("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})(),Bn=(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 ga&&n.getOther().applyMirroredCorrection(i);var s=new Re(n.getText(),n.getRawBytes(),void 0,i,$.QR_CODE,void 0),l=n.getByteSegments();l!==null&&s.putMetadata(Ee.BYTE_SEGMENTS,l);var c=n.getECLevel();return c!==null&&s.putMetadata(Ee.ERROR_CORRECTION_LEVEL,c),n.hasStructuredAppend()&&(s.putMetadata(Ee.STRUCTURED_APPEND_SEQUENCE,n.getStructuredAppendSequenceNumber()),s.putMetadata(Ee.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 S;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 S;if(o-a!==l-s&&(l=s+(o-a),l>=e.getWidth()))throw new S;var c=Math.round((l-s+1)/i),f=Math.round((o-a+1)/i);if(c<=0||f<=0)throw new S;if(f!==c)throw new S;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 S;s-=v}var h=a+Math.floor((f-1)*i)-o;if(h>0){if(h>d)throw new S;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 S;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 j.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=Be.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 L(f[0],i),s[1]=new L(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 L(d[0],v),s[3]=new L(d[1],v)}return v-i<t.BARCODE_MIN_HEIGHT&&Be.fill(s,null),s},t.findGuardPattern=function(e,r,n,i,a,o,s){Be.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.")},yt=(function(){function t(e,r){if(r.length===0)throw new U;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 U("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 U("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 U("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 U;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 ee,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 U;return this.logTable[e]},t.prototype.inverse=function(e){if(e===0)throw new ua;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)}})(),j1=(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 yt(i,new Int32Array([0])),i.one=new yt(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 U;if(n===0)return this.zero;var i=new Int32Array(r+1);return i[0]=n,new yt(this,i)},e.PDF417_GF=new e(W.NUMBER_OF_CODEWORDS,3),e})(W1),K1=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=j1.PDF417_GF}return t.prototype.decode=function(e,r,n){for(var i,a,o=new yt(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=K1(n),h=v.next();!h.done;h=v.next()){var p=h.value,g=this.field.exp(e.length-1-p),y=new yt(this.field,new Int32Array([this.field.subtract(0,g),1]));d=d.multiply(y)}}catch(R){i={error:R}}finally{try{h&&!h.done&&(a=v.return)&&a.call(v)}finally{if(i)throw i.error}}for(var w=new yt(this.field,s),m=this.runEuclideanAlgorithm(this.field.buildMonomial(r,1),w,r),E=m[0],C=m[1],I=this.findErrorLocations(E),B=this.findErrorMagnitudes(C,E,I),c=0;c<I.length;c++){var _=e.length-1-this.field.log(I[c]);if(_<0)throw we.getChecksumInstance();e[_]=this.field.subtract(e[_],B[c])}return I.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 we.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 we.getChecksumInstance();var w=this.field.inverse(y),m=l.multiply(w),E=o.multiply(w);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 we.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 yt(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})(),Rn=(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 S;o?(r=new L(0,i.getY()),n=new L(0,a.getY())):s&&(i=new L(e.getWidth()-1,r.getY()),a=new L(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 L(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 L(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})(),q1=(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})(),Kn=(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})(),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.")},xa=(function(){function t(e){this.boundingBox=new Rn(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 Kn,i=0;try{for(var a=Z1(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},rr=(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)}})(),dn=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.")},ki=(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=dn(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=dn(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 rr,o=new rr,s=new rr,l=new rr;try{for(var c=dn(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 q1(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})(xa),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 Kn,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=j.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=j.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=In.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})(),Mi=(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})(Ie),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 Gn;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})(Ie),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 U("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=z.MAX_VALUE}this.buf=Be.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 Gn;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 Be.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),J;(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"})(J||(J={}));function ya(){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 Cr;function at(t){if(typeof Cr>"u"&&(Cr=ya()),Cr===null)throw new Error("BigInt is not supported!");return Cr(t)}function vf(){var t=[];t[0]=at(1);var e=at(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 ee(""),i=he.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:he.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 k;default:a--,a=t.textCompaction(e,a,n);break}if(a<e.length)o=e[a++];else throw k.getFormatInstance()}if(n.length()===0)throw k.getFormatInstance();var l=new Xr(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 k.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(z.parseInt(t.decodeBase900toBase10(i,t.NUMBER_OF_SEQUENCE_CODEWORDS)));var o=new ee;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 ee;r=t.textCompaction(e,r+1,l),n.setFileName(l.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SENDER:var c=new ee;r=t.textCompaction(e,r+1,c),n.setSender(c.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_ADDRESSEE:var f=new ee;r=t.textCompaction(e,r+1,f),n.setAddressee(f.toString());break;case t.MACRO_PDF417_OPTIONAL_FIELD_SEGMENT_COUNT:var d=new ee;r=t.numericCompaction(e,r+1,d),n.setSegmentCount(z.parseInt(d.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_TIME_STAMP:var v=new ee;r=t.numericCompaction(e,r+1,v),n.setTimestamp(Mi.parseLong(v.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_CHECKSUM:var h=new ee;r=t.numericCompaction(e,r+1,h),n.setChecksum(z.parseInt(h.toString()));break;case t.MACRO_PDF417_OPTIONAL_FIELD_FILE_SIZE:var p=new ee;r=t.numericCompaction(e,r+1,p),n.setFileSize(Mi.parseLong(p.toString()));break;default:throw k.getFormatInstance()}break;case t.MACRO_PDF417_TERMINATOR:r++,n.setLastSegment(!0);break;default:throw k.getFormatInstance()}if(s!==-1){var g=r-s;n.isLastSegment()&&g--,n.setOptionalData(Be.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=J.ALPHA,o=J.ALPHA,s=0;s<n;){var l=e[s],c="";switch(a){case J.ALPHA:if(l<26)c=String.fromCharCode(65+l);else switch(l){case 26:c=" ";break;case t.LL:a=J.LOWER;break;case t.ML:a=J.MIXED;break;case t.PS:o=a,a=J.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=J.ALPHA;break}break;case J.LOWER:if(l<26)c=String.fromCharCode(97+l);else switch(l){case 26:c=" ";break;case t.AS:o=a,a=J.ALPHA_SHIFT;break;case t.ML:a=J.MIXED;break;case t.PS:o=a,a=J.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=J.ALPHA;break}break;case J.MIXED:if(l<t.PL)c=t.MIXED_CHARS[l];else switch(l){case t.PL:a=J.PUNCT;break;case 26:c=" ";break;case t.LL:a=J.LOWER;break;case t.AL:a=J.ALPHA;break;case t.PS:o=a,a=J.PUNCT_SHIFT;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=J.ALPHA;break}break;case J.PUNCT:if(l<t.PAL)c=t.PUNCT_CHARS[l];else switch(l){case t.PAL:a=J.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=J.ALPHA;break}break;case J.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=J.ALPHA;break}break;case J.PUNCT_SHIFT:if(a=o,l<t.PAL)c=t.PUNCT_CHARS[l];else switch(l){case t.PAL:a=J.ALPHA;break;case t.MODE_SHIFT_TO_BYTE_COMPACTION_MODE:i.append(r[s]);break;case t.TEXT_COMPACTION_MODE_LATCH:a=J.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(at(l)>>at(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(at(l)>>at(8*(5-v))));l=0,s=0}}break}return a.append(Ye.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=at(0),i=0;i<r;i++)n+=t.EXP900[r-i-1]*at(e[i]);var a=n.toString();if(a.charAt(0)!=="1")throw new k;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=ya()?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 Rn(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 S.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 ki(l,w===0):m=new xa(l),d.setDetectionResultColumn(w,m);for(var E=-1,C=E,I=l.getMinY();I<=l.getMaxY();I++){if(E=t.getStartColumn(d,w,I,g),E<0||E>l.getMaxX()){if(C===-1)continue;E=C}var B=t.detectCodeword(e,l.getMinX(),l.getMaxX(),g,E,I,o,s);B!=null&&(m.setCodeword(I,B),C=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=Rn.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 ki(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 S.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 we;if(!c)throw f}if(o.length===0)throw we.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 we.getChecksumInstance()}throw we.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 rr;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=j.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 k.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 we.getChecksumInstance();return t.errorCorrection.decode(e,n,r)},t.verifyCodewordCount=function(e,r){if(e.length<4)throw k.getFormatInstance();var n=e[0];if(n>e.length)throw k.getFormatInstance();if(n===0)if(r<e.length)e[0]=e.length-r;else throw k.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 Kn,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.")},Pn=(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 S.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 k||n instanceof we?S.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 Re(d.getText(),d.getRawBytes(),void 0,f,$.PDF_417);v.putMetadata(Ee.ERROR_CORRECTION_LEVEL,d.getECLevel());var h=d.getOther();h!=null&&v.putMetadata(Ee.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?z.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)}})(),Li=(function(t){yf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="ReaderException",e})(Ie),Fi=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===$.UPC_A||o===$.UPC_E||o===$.EAN_13||o===$.EAN_8||o===$.CODABAR||o===$.CODE_39||o===$.CODE_93||o===$.CODE_128||o===$.ITF||o===$.RSS_14||o===$.RSS_EXPANDED});a&&!r&&i.push(new tr(e)),n.includes($.QR_CODE)&&i.push(new Bn),n.includes($.DATA_MATRIX)&&i.push(new Dn),n.includes($.AZTEC)&&i.push(new Tn),n.includes($.PDF_417)&&i.push(new Pn),a&&r&&i.push(new tr(e))}i.length===0&&(r||i.push(new tr(e)),i.push(new Bn),i.push(new Dn),i.push(new Tn),i.push(new Pn),r&&i.push(new tr(e))),this.readers=i},t.prototype.reset=function(){var e,r;if(this.readers!==null)try{for(var n=Fi(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 Li("No readers where selected, nothing can be read.");try{for(var i=Fi(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 Li)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 S("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})(Ft),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})(Ft);var 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)}})();(function(t){Cf(e,t);function e(r){return r===void 0&&(r=500),t.call(this,new Bn,r)||this}return e})(Ft);var kn;(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"})(kn||(kn={}));const _r=kn;var ma=(function(){function t(e){this.field=e,this.cachedGenerators=[],this.cachedGenerators.push(new st(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 st(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 U("No error correction bytes");var n=e.length-r;if(n<=0)throw new U("No data bytes provided");var i=this.buildGenerator(r),a=new Int32Array(n);ne.arraycopy(e,0,a,0,n);var o=new st(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})(),nr=(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 U("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})(),_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.")},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=_f(this.bytes),a=i.next();!a.done;a=i.next()){var o=a.value;Be.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 ee,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
|
+
`)}return e.toString()},t})(),Mn=(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 ee;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(`
|
|
23
23
|
version: `),e.append(this.version?this.version.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})(),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)}})(),ie=(function(t){Cf(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.kind="WriterException",e})(Ie),Li=(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 ge;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 ge;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&&rr.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(!Pn.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 ge;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})(),_f=(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})(),Fi=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 rr.applyMaskPenaltyRule1(e)+rr.applyMaskPenaltyRule2(e)+rr.applyMaskPenaltyRule3(e)+rr.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 ge;if(o===ae.BYTE&&(a||t.DEFAULT_BYTE_MODE_ENCODING!==i)){var l=he.getCharacterSetECIByName(i);l!==void 0&&this.appendECI(l,s)}this.appendModeInfo(o,s);var c=new ge;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 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 ge;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 Pn;m.setECLevel(r),m.setMode(o),m.setVersion(f);var A=f.getDimensionForVersion(),E=new Af(A,A),_=this.chooseMaskPattern(w,r,f,E);return m.setMaskPattern(_),Li.buildMatrix(w,r,f,_,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),he.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=Ye.encode(e,he.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<Pn.NUM_MASK_PATTERNS;s++){Li.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 _f(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 ge,h=0;h<f;++h)try{for(var E=(a=void 0,Fi(v)),_=E.next();!_.done;_=E.next()){var b=_.value,w=b.getDataBytes();h<w.length&&A.appendBits(w[h],8)}}catch(L){a={error:L}}finally{try{_&&!_.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,Fi(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 xa(De.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=Ye.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=Ye.encode(e,he.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=he.UTF8.getName(),t})();var bf=(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){bf(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 Hn(this)},e.THUMBNAIL_SCALE_FACTOR=2,e})(Hr);var 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)}})();(function(t){Sf(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 Hn(this)},e})(Hr);var If=(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){If(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.forName=function(r){return this.getCharacterSetECIByName(r)},e})(he);(function(){function t(){}return t.ISO_8859_1=he.ISO8859_1,t})();var Of=(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})(),Vi=(function(){function t(){}return t.singletonList=function(e){return[e]},t.min=function(e,r){return e.sort(r)[0]},t})(),Tf=(function(){function t(e){this.previous=e}return t.prototype.getPrevious=function(){return this.previous},t})(),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)}})(),jn=(function(t){Nf(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})(Tf),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)}})(),Bf=(function(t){Df(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})(jn);function Rf(t,e,r){return new Bf(t,e,r)}function Kt(t,e,r){return new jn(t,e,r)}var Pf=["UPPER","LOWER","DIGIT","MIXED","PUNCT"],ft=0,Mr=1,Le=2,ya=3,Ke=4,kf=new jn(null,0,0),hn=[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])],Mf=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 Lf(t){var e,r;try{for(var n=Mf(t),i=n.next();!i.done;i=n.next()){var a=i.value;Be.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[Mr][Ke]=0,t[Mr][ft]=28,t[ya][Ke]=0,t[Le][Ke]=0,t[Le][ft]=15,t}var ma=Lf(Be.createInt32Array(6,6)),Ff=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.")},Vf=(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=hn[this.mode][e];i=Kt(i,a&65535,a>>16),n+=a>>16}var o=e===Le?4:5;return i=Kt(i,r,o),new t(i,e,0,n+o)},t.prototype.shiftAndAppend=function(e,r){var n=this.token,i=this.mode===Le?4:5;return n=Kt(n,ma[this.mode][e],i),n=Kt(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===Le){var a=hn[n][ft];r=Kt(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=Rf(r,e-this.binaryShiftByteCount,this.binaryShiftByteCount),new t(r,this.mode,0,this.bitCount)},t.prototype.isBetterThanOrEqualTo=function(e){var r=this.bitCount+(hn[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 ge;try{for(var s=Ff(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",Pf[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(kf,ft,0,0),t})();function Uf(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[Mr][e]=1;for(var s=re.getCharCode("z"),l=re.getCharCode("a"),o=l;o<=s;o++)t[Mr][o]=o-l+2;t[Le][e]=1;for(var c=re.getCharCode("9"),f=re.getCharCode("0"),o=f;o<=c;o++)t[Le][o]=o-f+2;t[Le][n]=12,t[Le][r]=13;for(var d=["\0"," ","","","","","","","\x07","\b"," ",`
|
|
30
|
-
`,"\v","\f","\r","\x1B","","","","","@","\\","^","_","`","|","~",""],v=0;v<d.length;v++)t[
|
|
31
|
-
`),n=Vi.singletonList(Vf.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=Vi.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=vn[e.getMode()][i]>0,o=null,s=0;s<=Ke;s++){var l=vn[s][i];if(l>0){if(o==null&&(o=e.endBinaryShift(r)),!a||s===e.getMode()||s===Le){var c=o.latchAndAppend(s,l);n.push(c)}if(!a&&ma[e.getMode()][s]>=0){var f=o.shiftAndAppend(s,l);n.push(f)}}}if(e.getBinaryShiftByteCount()>0||vn[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(Le,16-n).latchAndAppend(Le,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})(),Hf=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 $f(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),_=G.truncDivision(A,2),h=0;h<E;h++){var b=h+G.truncDivision(h,15);m[E-h-1]=_-b-1,m[E+h]=_+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 Of;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 ge;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 xa(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 ge;d.appendBits(0,f);try{for(var v=Hf(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 De.AZTEC_PARAM;case 6:return De.AZTEC_DATA_6;case 8:return De.AZTEC_DATA_8;case 10:return De.AZTEC_DATA_10;case 12:return De.AZTEC_DATA_12;default:throw new F("Unsupported word size "+e)}},t.stuffBits=function(e,r){for(var n=new ge,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 Gf={name:"stream-barcode-reader",data(){return{isLoading:!0,codeReader:new yf,isMediaStreamAPISupported:navigator&&navigator.mediaDevices&&"enumerateDevices"in navigator.mediaDevices}},mounted(){if(!this.isMediaStreamAPISupported)throw new Ie("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))})}}},zf={class:"scanner-container"},Wf={poster:"data:image/gif,AAAA",ref:"scanner"};function Xf(t,e,r,n,i,a){return u.openBlock(),u.createElementBlock("div",zf,[u.withDirectives(u.createElementVNode("div",null,[u.createElementVNode("video",Wf,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 jf=Mt(Gf,[["render",Xf],["__scopeId","data-v-3b725b25"]]),Kf={key:0,class:"scanner-modal"},Yf={class:"scanner-header"},qf={class:"scanner-title"},Zf={key:0,class:"scanner-subtitle"},Qf={class:"scanner-stream"},Jf={class:"scanner-overlay"},e0={key:0,class:"scanner-slot"},t0={class:"scanner-manual"},r0={key:0},n0=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){_({type:"scanned",value:V})}function m(){o.value.trim()&&(A(),_({type:"manual",value:o.value.trim()}))}function A(){s.value=!s.value,s.value&&(o.value="")}function E(){_({type:"cancelled"})}function _(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",Kf,[u.createVNode(oa,{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]=ve=>v.value?.close()),onSecondaryButtonClicked:z[1]||(z[1]=ve=>{A(),v.value?.close()}),width:500},null,8,["title","description"]),u.createElementVNode("div",Yf,[u.createElementVNode("div",null,[u.createElementVNode("h2",qf,u.toDisplayString(i.value),1),a.value?(u.openBlock(),u.createElementBlock("p",Zf,u.toDisplayString(a.value),1)):u.createCommentVNode("",!0)]),u.createElementVNode("button",{class:"scanner-close",onClick:E,"aria-label":"Close"}," × ")]),u.createElementVNode("div",Qf,[u.createVNode(u.unref(jf),{class:"scanner-video",onDecode:w}),u.createElementVNode("div",Jf,[c.value?(u.openBlock(),u.createElementBlock("div",e0,[u.renderSlot(V.$slots,"default",{},void 0,!0)])):u.createCommentVNode("",!0),u.createElementVNode("div",t0,[s.value?u.createCommentVNode("",!0):(u.openBlock(),u.createElementBlock("span",r0,"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]=ve=>o.value=ve),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)]))}}),i0=Mt(n0,[["__scopeId","data-v-e5e3bcdd"]]),wa=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))}}),a0=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(wa,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))}}),o0={key:1},s0=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",o0,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))]))}}),l0=Mt(s0,[["__scopeId","data-v-8f108e12"]]),u0={class:"dsg-tab--mobile"},c0={"aria-label":"Select a tab",class:"dsg-tab--mobile-select"},f0=["selected","textContent"],d0={class:"dsg-tab--desktop"},h0={class:"dsg-tab--desktop-wrapper"},v0=["href","onClick","aria-current"],p0=["textContent"],g0={key:0,class:"dsg-tab--content"},x0=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",u0,[u.createElementVNode("select",c0,[(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,f0))),128))]),u.createVNode(M._sfc_main,{class:"dsg-tab--mobile-select-icon",icon:"chevron-down","aria-hidden":"true",size:"sm"})]),u.createElementVNode("div",d0,[u.createElementVNode("div",h0,[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,p0),s.badge?(u.openBlock(),u.createBlock(Zi,{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,v0))),128))],2)])]),t.useSlots?(u.openBlock(),u.createElementBlock("div",g0,[(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))}}),Ea=M._sfc_main,Aa=bt,Ca=M._sfc_main$5,_a=Qa,ba=os,Sa=qi,Ia=ar,y0=js,Oa=Zi,Ta=M._sfc_main$3,Na=M._sfc_main$2,Da=vl,Ba=Jl,Ra=M._sfc_main$4,Pa=iu,ka=lu,Ma=M._sfc_main$6,La=Ui._sfc_main,Fa=fu,Va=oa,Ua=wu,$a=Su,Ha=M._sfc_main$1,Ga=M._sfc_main$7,m0=il,w0=Ru,E0=i0,A0=wa,C0=a0,za=l0,Wa=x0,_0={DsgIcon:Ea,DsgMiscIcon:Aa,DsgCreditCardIcon:Ca,DsgAlert:ba,DsgAccordion:_a,DsgAnnouncement:Sa,DsgAvatar:Ia,DsgBadge:Oa,DsgButton:Ta,DsgCheckbox:Na,DsgCheckboxGroup:Da,DsgDropdown:Ba,DsgInput:Ra,DsgInputSelect:Pa,DsgInputDropdown:ka,DsgDatepicker:Ma,DsgLabel:La,DsgLink:Fa,DsgModal:Va,DsgTag:Ua,DsgToggle:$a,DsgTooltip:Ha,DsgBreadcrumb:za,DsgTab:Wa,DsgFilter:Ga};exports.DsgAccordion=_a;exports.DsgAlert=ba;exports.DsgAnnouncement=Sa;exports.DsgAvatar=Ia;exports.DsgBadge=Oa;exports.DsgBarcodeScanner=E0;exports.DsgBreadcrumb=za;exports.DsgButton=Ta;exports.DsgCard=A0;exports.DsgCardContainer=C0;exports.DsgCheckbox=Na;exports.DsgCheckboxGroup=Da;exports.DsgCreditCardIcon=Ca;exports.DsgDatepicker=Ma;exports.DsgDropdown=Ba;exports.DsgFilter=Ga;exports.DsgIcon=Ea;exports.DsgIconSelect=y0;exports.DsgInput=Ra;exports.DsgInputDropdown=ka;exports.DsgInputNumber=m0;exports.DsgInputSelect=Pa;exports.DsgLabel=La;exports.DsgLink=Fa;exports.DsgMiscIcon=Aa;exports.DsgModal=Va;exports.DsgProgress=w0;exports.DsgTab=Wa;exports.DsgTag=Ua;exports.DsgToggle=$a;exports.DsgTooltip=Ha;exports.default=_0;
|
|
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})(Ie),Vi=(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&&nr.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-z.numberOfLeadingZeros(e)},t.calculateBCHCode=function(e,r){if(r===0)throw new U("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(!Mn.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})(),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.")};(function(){function t(){}return t.calculateMaskPenalty=function(e){return nr.applyMaskPenaltyRule1(e)+nr.applyMaskPenaltyRule2(e)+nr.applyMaskPenaltyRule3(e)+nr.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=he.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=mt.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 Mn;m.setECLevel(r),m.setMode(o),m.setVersion(f);var E=f.getDimensionForVersion(),C=new bf(E,E),I=this.chooseMaskPattern(w,r,f,C);return m.setMaskPattern(I),Vi.buildMatrix(w,r,f,I,C),m.setMatrix(C),m},t.recommendVersion=function(e,r,n,i){var a=this.calculateBitsNeeded(r,n,i,mt.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),he.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=Ye.encode(e,he.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<Mn.NUM_MASK_PATTERNS;s++){Vi.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=mt.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 E=new pe,h=0;h<f;++h)try{for(var C=(a=void 0,Ui(v)),I=C.next();!I.done;I=C.next()){var B=I.value,w=B.getDataBytes();h<w.length&&E.appendBits(w[h],8)}}catch(P){a={error:P}}finally{try{I&&!I.done&&(o=C.return)&&o.call(C)}finally{if(a)throw a.error}}for(var h=0;h<d;++h)try{for(var _=(s=void 0,Ui(v)),R=_.next();!R.done;R=_.next()){var B=R.value,m=B.getErrorCorrectionBytes();h<m.length&&E.appendBits(m[h],8)}}catch(P){s={error:P}}finally{try{R&&!R.done&&(l=_.return)&&l.call(_)}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 ma(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=Ye.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=Ye.encode(e,he.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=he.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 U("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 U("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 zn(this)},e.THUMBNAIL_SCALE_FACTOR=2,e})(Wr);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 U("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 U("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 zn(this)},e})(Wr);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})(he);(function(){function t(){}return t.ISO_8859_1=he.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})(),$i=(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)}})(),Yn=(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,"<"+z.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})(Yn);function Mf(t,e,r){return new kf(t,e,r)}function qt(t,e,r){return new Yn(t,e,r)}var Lf=["UPPER","LOWER","DIGIT","MIXED","PUNCT"],lt=0,Vr=1,Le=2,wa=3,je=4,Ff=new Yn(null,0,0),hn=[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;Be.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[lt][je]=0,t[Vr][je]=0,t[Vr][lt]=28,t[wa][je]=0,t[Le][je]=0,t[Le][lt]=15,t}var Ea=Uf(Be.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=hn[this.mode][e];i=qt(i,a&65535,a>>16),n+=a>>16}var o=e===Le?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===Le?4:5;return n=qt(n,Ea[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===je||this.mode===Le){var a=hn[n][lt];r=qt(r,a&65535,a>>16),i+=a>>16,n=lt}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+(hn[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,lt,0,0),t})();function Gf(t){var e=re.getCharCode(" "),r=re.getCharCode("."),n=re.getCharCode(",");t[lt][e]=1;for(var i=re.getCharCode("Z"),a=re.getCharCode("A"),o=a;o<=i;o++)t[lt][o]=o-a+2;t[Vr][e]=1;for(var s=re.getCharCode("z"),l=re.getCharCode("a"),o=l;o<=s;o++)t[Vr][o]=o-l+2;t[Le][e]=1;for(var c=re.getCharCode("9"),f=re.getCharCode("0"),o=f;o<=c;o++)t[Le][o]=o-f+2;t[Le][n]=12,t[Le][r]=13;for(var d=["\0"," ","","","","","","","\x07","\b"," ",`
|
|
30
|
+
`,"\v","\f","\r","\x1B","","","","","@","\\","^","_","`","|","~",""],v=0;v<d.length;v++)t[wa][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[je][re.getCharCode(h[v])]=v);return t}var vn=Gf(Be.createInt32Array(5,256)),br=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=$i.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=$i.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=br(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=vn[e.getMode()][i]>0,o=null,s=0;s<=je;s++){var l=vn[s][i];if(l>0){if(o==null&&(o=e.endBinaryShift(r)),!a||s===e.getMode()||s===Le){var c=o.latchAndAppend(s,l);n.push(c)}if(!a&&Ea[e.getMode()][s]>=0){var f=o.shiftAndAppend(s,l);n.push(f)}}}if(e.getBinaryShiftByteCount()>0||vn[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=br(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(je,n)),e.getMode()!==je&&i.push(a.shiftAndAppend(je,n)),n===3||n===4){var o=a.latchAndAppend(Le,16-n).latchAndAppend(Le,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=br(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,br(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=z.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 U(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 U("Data to large for user specified layer");if(s&&d.getSize()>f*64)throw new U("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 U("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),E;if(s){E=w;for(var h=0;h<m.length;h++)m[h]=h}else{E=w+1+2*z.truncDivision(z.truncDivision(w,2)-1,15);for(var C=z.truncDivision(w,2),I=z.truncDivision(E,2),h=0;h<C;h++){var B=h+z.truncDivision(h,15);m[C-h-1]=I-B-1,m[C+h]=I+B+1}}for(var _=new Ze(E),h=0,R=0;h<l;h++){for(var M=(l-h)*4+(s?9:12),P=0;P<M;P++)for(var X=P*2,V=0;V<2;V++)p.get(R+X+V)&&_.set(m[h*2+V],m[h*2+P]),p.get(R+M*2+X+V)&&_.set(m[h*2+P],m[w-1-h*2-V]),p.get(R+M*4+X+V)&&_.set(m[w-1-h*2-V],m[w-1-h*2-P]),p.get(R+M*6+X+V)&&_.set(m[w-1-h*2-P],m[h*2+V]);R+=M*8}if(t.drawModeMessage(_,s,E,y),s)t.drawBullsEye(_,z.truncDivision(E,2),5);else{t.drawBullsEye(_,z.truncDivision(E,2),7);for(var h=0,P=0;h<z.truncDivision(w,2)-1;h+=15,P+=16)for(var V=z.truncDivision(E,2)&1;V<E;V+=2)_.set(z.truncDivision(E,2)-P,V),_.set(z.truncDivision(E,2)+P,V),_.set(V,z.truncDivision(E,2)-P),_.set(V,z.truncDivision(E,2)+P)}var G=new Df;return G.setCompact(s),G.setSize(E),G.setLayers(l),G.setCodeWords(g),G.setMatrix(_),G},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=z.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+z.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 ma(t.getGF(n)),l=z.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 U("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 Ie("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))})}}},jf={class:"scanner-container"},Kf={poster:"data:image/gif,AAAA",ref:"scanner"};function Yf(t,e,r,n,i,a){return u.openBlock(),u.createElementBlock("div",jf,[u.withDirectives(u.createElementVNode("div",null,[u.createElementVNode("video",Kf,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."),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){I({type:"scanned",value:V})}function m(){o.value.trim()&&(E(),I({type:"manual",value:o.value.trim()}))}function E(){s.value=!s.value,s.value&&(o.value="")}function C(){I({type:"cancelled"})}function I(V){console.log("Scan result:",V),r.onScan&&r.onScan(V)}function B(){n.value=!1}function _(){l.value=!0,setTimeout(()=>{l.value=!1},3e3)}function R(){v.value?.open()}function M(){c.value=!0}function P(){c.value=!1}e({scan:y,close:B,success:_,error:R,showSlot:M,hideSlot:P});const X=()=>{document.documentElement.style.setProperty("--vh",`${window.innerHeight*.01}px`)};return u.onMounted(()=>{X(),window.addEventListener("resize",X)}),u.onBeforeUnmount(()=>{window.removeEventListener("resize",X)}),(V,G)=>(u.openBlock(),u.createBlock(u.Teleport,{to:"body"},[n.value?(u.openBlock(),u.createElementBlock("div",Zf,[u.createVNode(la,{ref_key:"modalRef",ref:v,title:f.value,description:d.value,miscIcon:h,onClose:C,footerType:"vertical",primaryButton:p,secondaryButton:g,onPrimaryButtonClicked:G[0]||(G[0]=ge=>v.value?.close()),onSecondaryButtonClicked:G[1]||(G[1]=ge=>{E(),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:C,"aria-label":"Close"}," × ")]),u.createElementVNode("div",t0,[u.createVNode(u.unref(qf),{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(F._sfc_main$3,{key:1,label:"Input manually",onClick:E,"icon-before":"pencil-01",theme:"gray-secondary"})),s.value?(u.openBlock(),u.createBlock(F._sfc_main$4,{key:2,modelValue:o.value,"onUpdate:modelValue":G[2]||(G[2]=ge=>o.value=ge),placeholder:"Enter barcode manually",class:"w-full"},null,8,["modelValue"])):u.createCommentVNode("",!0),s.value?(u.openBlock(),u.createBlock(F._sfc_main$3,{key:3,label:"Submit",onClick:m,"icon-before":"check",theme:"gray-secondary"})):u.createCommentVNode("",!0)]),l.value?(u.openBlock(),u.createBlock(F._sfc_main,{key:1,icon:"check",size:"3xl",class:"scanner-success"})):u.createCommentVNode("",!0)])])])):u.createCommentVNode("",!0)]))}}),s0=Mt(o0,[["__scopeId","data-v-e5e3bcdd"]]),Aa=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(Aa,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(F._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(F._sfc_main,u.mergeProps({key:0,ref_for:!0},t.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"},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(F._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(Ji,{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))}}),Ca=F._sfc_main,_a=bt,ba=F._sfc_main$5,Sa=eo,Ia=ls,Oa=Qi,Ta=or,E0=Ys,Na=Ji,Da=F._sfc_main$3,Ba=F._sfc_main$2,Ra=gl,Pa=tu,ka=F._sfc_main$4,Ma=su,La=fu,Fa=F._sfc_main$6,Va=Hi._sfc_main,Ua=vu,$a=la,Ha=Cu,Ga=Tu,za=F._sfc_main$1,Wa=F._sfc_main$7,A0=ol,C0=Mu,_0=s0,b0=Aa,S0=l0,Xa=f0,ja=w0,I0={DsgIcon:Ca,DsgMiscIcon:_a,DsgCreditCardIcon:ba,DsgAlert:Ia,DsgAccordion:Sa,DsgAnnouncement:Oa,DsgAvatar:Ta,DsgBadge:Na,DsgButton:Da,DsgCheckbox:Ba,DsgCheckboxGroup:Ra,DsgDropdown:Pa,DsgInput:ka,DsgInputSelect:Ma,DsgInputDropdown:La,DsgDatepicker:Fa,DsgLabel:Va,DsgLink:Ua,DsgModal:$a,DsgTag:Ha,DsgToggle:Ga,DsgTooltip:za,DsgBreadcrumb:Xa,DsgTab:ja,DsgFilter:Wa};exports.DsgAccordion=Sa;exports.DsgAlert=Ia;exports.DsgAnnouncement=Oa;exports.DsgAvatar=Ta;exports.DsgBadge=Na;exports.DsgBarcodeScanner=_0;exports.DsgBreadcrumb=Xa;exports.DsgButton=Da;exports.DsgCard=b0;exports.DsgCardContainer=S0;exports.DsgCheckbox=Ba;exports.DsgCheckboxGroup=Ra;exports.DsgCreditCardIcon=ba;exports.DsgDatepicker=Fa;exports.DsgDropdown=Pa;exports.DsgFilter=Wa;exports.DsgIcon=Ca;exports.DsgIconSelect=E0;exports.DsgInput=ka;exports.DsgInputDropdown=La;exports.DsgInputNumber=A0;exports.DsgInputSelect=Ma;exports.DsgLabel=Va;exports.DsgLink=Ua;exports.DsgMiscIcon=_a;exports.DsgModal=$a;exports.DsgProgress=C0;exports.DsgTab=ja;exports.DsgTag=Ha;exports.DsgToggle=Ga;exports.DsgTooltip=za;exports.default=I0;
|