QRCode/dist/assets/index.acdfd36c.js

79 lines
1.1 MiB
JavaScript
Raw Permalink Normal View History

2022-04-22 01:07:53 +00:00
var k3=Object.defineProperty,x3=Object.defineProperties;var M3=Object.getOwnPropertyDescriptors;var Uu=Object.getOwnPropertySymbols;var N1=Object.prototype.hasOwnProperty,k1=Object.prototype.propertyIsEnumerable;var _1=(e,t,n)=>t in e?k3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,be=(e,t)=>{for(var n in t||(t={}))N1.call(t,n)&&_1(e,n,t[n]);if(Uu)for(var n of Uu(t))k1.call(t,n)&&_1(e,n,t[n]);return e},Qe=(e,t)=>x3(e,M3(t));var x1=(e,t)=>{var n={};for(var o in e)N1.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&Uu)for(var o of Uu(e))t.indexOf(o)<0&&k1.call(e,o)&&(n[o]=e[o]);return n};var O3=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var kne=O3((Wo,jo)=>{function D3(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(o){if(o!=="default"&&!(o in e)){var s=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:function(){return n[o]}})}})}),Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const $3=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&o(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerpolicy&&(i.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?i.credentials="include":s.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}};$3();var Co="top",Yo="bottom",Go="right",Eo="left",vd="auto",Qa=[Co,Yo,Go,Eo],Bi="start",Da="end",Fy="clippingParents",_p="viewport",va="popper",Vy="reference",hh=Qa.reduce(function(e,t){return e.concat([t+"-"+Bi,t+"-"+Da])},[]),yd=[].concat(Qa,[vd]).reduce(function(e,t){return e.concat([t,t+"-"+Bi,t+"-"+Da])},[]),Hy="beforeRead",zy="read",Uy="afterRead",Wy="beforeMain",jy="main",Ky="afterMain",Yy="beforeWrite",Gy="write",Xy="afterWrite",qy=[Hy,zy,Uy,Wy,jy,Ky,Yy,Gy,Xy];function Qr(e){return e?(e.nodeName||"").toLowerCase():null}function Rr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function $a(e){var t=Rr(e).Element;return e instanceof t||e instanceof Element}function ur(e){var t=Rr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Np(e){if(typeof ShadowRoot=="undefined")return!1;var t=Rr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function R3(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var o=t.styles[n]||{},s=t.attributes[n]||{},i=t.elements[n];!ur(i)||!Qr(i)||(Object.assign(i.style,o),Object.keys(s).forEach(function(l){var c=s[l];c===!1?i.removeAttribute(l):i.setAttribute(l,c===!0?"":c)}))})}function L3(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(o){var s=t.elements[o],i=t.attributes[o]||{},l=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:n[o]),c=l.reduce(function(f,p){return f[p]="",f},{});!ur(s)||!Qr(s)||(Object.assign(s.style,c),Object.keys(i).forEach(function(f){s.removeAttribute(f)}))})}}var kp={name:"applyStyles",enabled:!0,phase:"write",fn:R3,effect:L3,requires:["computeStyles"]};function Zr(e){return e.split("-")[0]}var ki=Math.max,jc=Math.min,Ra=Math.round;function La(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),o=1,s=1;if(ur(e)&&t){var i=e.offsetHeight,l=e.offsetWidth;l>0&&(o=Ra(n.width)/l||1),i>0&&(s=Ra(n.height)/i||1)}return{width:n.width/o,height:n.height/s,top:n.top/s,right:n.right/o,bottom:n.bottom/s,left:n.left/o,x:n.left/o,y:n.top/s}}function xp(e){var t=
2022-04-21 09:53:52 +00:00
* Bootstrap v5.1.3 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/const CA=1e6,EA=1e3,gh="transitionend",SA=e=>e==null?`${e}`:{}.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),AA=e=>{do e+=Math.floor(Math.random()*CA);while(document.getElementById(e));return e},ub=e=>{let t=e.getAttribute("data-bs-target");if(!t||t==="#"){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&n!=="#"?n.trim():null}return t},Bp=e=>{const t=ub(e);return t&&document.querySelector(t)?t:null},Ws=e=>{const t=ub(e);return t?document.querySelector(t):null},TA=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const o=Number.parseFloat(t),s=Number.parseFloat(n);return!o&&!s?0:(t=t.split(",")[0],n=n.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(n))*EA)},cb=e=>{e.dispatchEvent(new Event(gh))},Fi=e=>!e||typeof e!="object"?!1:(typeof e.jquery!="undefined"&&(e=e[0]),typeof e.nodeType!="undefined"),js=e=>Fi(e)?e.jquery?e[0]:e:typeof e=="string"&&e.length>0?document.querySelector(e):null,es=(e,t,n)=>{Object.keys(n).forEach(o=>{const s=n[o],i=t[o],l=i&&Fi(i)?"element":SA(i);if(!new RegExp(s).test(l))throw new TypeError(`${e.toUpperCase()}: Option "${o}" provided type "${l}" but expected type "${s}".`)})},bu=e=>!Fi(e)||e.getClientRects().length===0?!1:getComputedStyle(e).getPropertyValue("visibility")==="visible",xi=e=>!e||e.nodeType!==Node.ELEMENT_NODE||e.classList.contains("disabled")?!0:typeof e.disabled!="undefined"?e.disabled:e.hasAttribute("disabled")&&e.getAttribute("disabled")!=="false",db=e=>{if(!document.documentElement.attachShadow)return null;if(typeof e.getRootNode=="function"){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?db(e.parentNode):null},Kc=()=>{},Ja=e=>{e.offsetHeight},fb=()=>{const{jQuery:e}=window;return e&&!document.body.hasAttribute("data-bs-no-jquery")?e:null},Ef=[],IA=e=>{document.readyState==="loading"?(Ef.length||document.addEventListener("DOMContentLoaded",()=>{Ef.forEach(t=>t())}),Ef.push(e)):e()},Oo=()=>document.documentElement.dir==="rtl",vr=e=>{IA(()=>{const t=fb();if(t){const n=e.NAME,o=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=o,e.jQueryInterface)}})},wi=e=>{typeof e=="function"&&e()},hb=(e,t,n=!0)=>{if(!n){wi(e);return}const o=5,s=TA(t)+o;let i=!1;const l=({target:c})=>{c===t&&(i=!0,t.removeEventListener(gh,l),wi(e))};t.addEventListener(gh,l),setTimeout(()=>{i||cb(t)},s)},pb=(e,t,n,o)=>{let s=e.indexOf(t);if(s===-1)return e[!n&&o?e.length-1:0];const i=e.length;return s+=n?1:-1,o&&(s=(s+i)%i),e[Math.max(0,Math.min(s,i-1))]},_A=/[^.]*(?=\..*)\.|.*/,NA=/\..*/,kA=/::\d+$/,Sf={};let F1=1;const xA={mouseenter:"mouseover",mouseleave:"mouseout"},MA=/^(mouseenter|mouseleave)/i,gb=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function mb(e,t){return t&&`${t}::${F1++}`||e.uidEvent||F1++}function vb(e){const t=mb(e);return e.uidEvent=t,Sf[t]=Sf[t]||{},Sf[t]}function OA(e,t){return function n(o){return o.delegateTarget=e,n.oneOff&&ut.off(e,o.type,t),t.apply(e,[o])}}function DA(e,t,n){return function o(s){const i=e.querySelectorAll(t);for(let{target:l}=s;l&&l!==this;l=l.parentNode)for(let c=i.length;c--;)if(i[c]===l)return s.delegateTarget=l,o.oneOff&&ut.off(e,s.type,t,n),n.apply(l,[s]);return null}}function yb(e,t,n=null){const o=Object.keys(e);for(let s=0,i=o.length;s<i;s++){const l=e[o[s]];if(l.originalHandler===t&&l.delegationSelector===n)return l}return null}function bb(e,t,n){const o=typeof t=="string",s=o?n:t;let i=wb(e);return gb.h
`),s]);else{const i=[`[Vue warn]: ${e}`,...t];s.length&&i.push(`
`,...KI(s)),console.warn(...i)}Xi()}function jI(){let e=Fl[Fl.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}function KI(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[`
`],...YI(n))}),t}function YI({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=e.component?e.component.parent==null:!1,s=` at <${R2(e.component,e.type,o)}`,i=">"+n;return e.props?[s,...GI(e.props),i]:[s+i]}function GI(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...r2(o,e[o]))}),n.length>3&&t.push(" ..."),t}function r2(e,t,n){return _t(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:wn(t)?(t=r2(e,an(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):It(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=an(t),n?t:[`${e}=`,t])}function us(e,t,n,o){let s;try{s=o?e(...o):e()}catch(i){Od(i,t,n)}return s}function cr(e,t,n,o){if(It(e)){const i=us(e,t,n,o);return i&&Hi(i)&&i.catch(l=>{Od(l,t,n)}),i}const s=[];for(let i=0;i<e.length;i++)s.push(cr(e[i],t,n,o));return s}function Od(e,t,n,o=!0){const s=t?t.vnode:null;if(t){let i=t.parent;const l=t.proxy,c=n;for(;i;){const p=i.ec;if(p){for(let m=0;m<p.length;m++)if(p[m](e,l,c)===!1)return}i=i.parent}const f=t.appContext.config.errorHandler;if(f){us(f,null,10,[e,l,c]);return}}XI(e,n,s,o)}function XI(e,t,n,o=!0){console.error(e)}let qc=!1,Ih=!1;const Ho=[];let is=0;const Vl=[];let Ml=null,ya=0;const Hl=[];let $s=null,ba=0;const s2=Promise.resolve();let e0=null,_h=null;function dt(e){const t=e0||s2;return e?t.then(this?e.bind(this):e):t}function qI(e){let t=is+1,n=Ho.length;for(;t<n;){const o=t+n>>>1;eu(Ho[o])<e?t=o+1:n=o}return t}function i2(e){(!Ho.length||!Ho.includes(e,qc&&e.allowRecurse?is+1:is))&&e!==_h&&(e.id==null?Ho.push(e):Ho.splice(qI(e.id),0,e),a2())}function a2(){!qc&&!Ih&&(Ih=!0,e0=s2.then(c2))}function ZI(e){const t=Ho.indexOf(e);t>is&&Ho.splice(t,1)}function l2(e,t,n,o){wt(e)?n.push(...e):(!t||!t.includes(e,e.allowRecurse?o+1:o))&&n.push(e),a2()}function QI(e){l2(e,Ml,Vl,ya)}function JI(e){l2(e,$s,Hl,ba)}function t0(e,t=null){if(Vl.length){for(_h=t,Ml=[...new Set(Vl)],Vl.length=0,ya=0;ya<Ml.length;ya++)Ml[ya]();Ml=null,ya=0,_h=null,t0(e,t)}}function u2(e){if(Hl.length){const t=[...new Set(Hl)];if(Hl.length=0,$s){$s.push(...t);return}for($s=t,$s.sort((n,o)=>eu(n)-eu(o)),ba=0;ba<$s.length;ba++)$s[ba]();$s=null,ba=0}}const eu=e=>e.id==null?1/0:e.id;function c2(e){Ih=!1,qc=!0,t0(e),Ho.sort((n,o)=>eu(n)-eu(o));const t=on;try{for(is=0;is<Ho.length;is++){const n=Ho[is];n&&n.active!==!1&&us(n,null,14)}}finally{is=0,Ho.length=0,u2(),qc=!1,e0=null,(Ho.length||Vl.length||Hl.length)&&c2(e)}}function e_(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||bn;let s=n;const i=t.startsWith("update:"),l=i&&t.slice(7);if(l&&l in o){const m=`${l==="modelValue"?"model":l}Modifiers`,{number:y,trim:v}=o[m]||bn;v?s=n.map(w=>w.trim()):y&&(s=n.map(Xc))}let c,f=o[c=mc(t)]||o[c=mc(hr(t))];!f&&i&&(f=o[c=mc(ei(t))]),f&&cr(f,e,6,s);const p=o[c+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,cr(p,e,6,s)}}function d2(e,t,n=!1){const o=t.emitsCache,s=o.get(e);if(s!==void 0)return s;const i=e.emits;let l={},c=!1;if(!It(e)){const f=p=>{const m=d2(p,t,!0);m&&(c=!0,Jn(l,m))};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}return!i&&!c?(o.set(e,null),null):(wt(i)?i.forEach(f=>l[f]=null):Jn(l,i),o.set(e,l),l)}function Dd(e,t){return!e||!Nd(t)?!1:(t=t.slice(2).replace(/Once$/,""),Bt(e,t[0].toLowerCase()+t.slice(1))||Bt(e,ei(t))||Bt(e,t))}let po=null,f2=null;function Zc(e){const t=po;return po=e,f2=e&&e.type.__scopeId||null,t}function ae(e,t=po,n){if(!t||e._n)return e;const o=(...s)=>{o._d&&Xg(-1);const i=Zc(t),l=e(...s);return Zc(i),o._d&&Xg(1),l};return o._n=!0,o._c=!0,o._d=!0,o}function Mf(e){const{type:t,vnode:n,proxy:o,withProxy:s,props:i,propsOptions:[l],slots:c,attrs:f,emit:p,render:m,renderCache:y,data:v,setupState:w,ctx:E,inheritAttrs:I}=e;let S,T;const _=Zc(e);try{if(n.shapeFlag&4){const O=s||o;S=Yr(m.call(O,O,y,i,w,v,E)),T=f}else{const O=t;S=Yr(O.length>1?O(i,{attrs:f,slots:c,emit:p}):O(i,null)),T=t.props?f:t_(f)}}catch(O){Ul.length=0,Od(O,e,1),S=le(So)}let N=S;if(T&&I!==!1){const O=Object.keys(T),{shapeFlag:D}=N;O.length&&D&
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
`,h7=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function p7(e){const t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing"),o=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),s=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:h7.map(l=>`${l}:${t.getPropertyValue(l)}`).join(";"),paddingSize:o,borderSize:s,boxSizing:n}}function dv(e,t=1,n){var o;Sr||(Sr=document.createElement("textarea"),document.body.appendChild(Sr));const{paddingSize:s,borderSize:i,boxSizing:l,contextStyle:c}=p7(e);Sr.setAttribute("style",`${c};${f7}`),Sr.value=e.value||e.placeholder||"";let f=Sr.scrollHeight;const p={};l==="border-box"?f=f+i:l==="content-box"&&(f=f-s),Sr.value="";const m=Sr.scrollHeight-s;if(Qt(t)){let y=m*t;l==="border-box"&&(y=y+s+i),f=Math.max(y,f),p.minHeight=`${y}px`}if(Qt(n)){let y=m*n;l==="border-box"&&(y=y+s+i),f=Math.min(y,f)}return p.height=`${f}px`,(o=Sr.parentNode)==null||o.removeChild(Sr),Sr=void 0,p}const g7=ct({size:Qd,disabled:Boolean,modelValue:{type:Xe([String,Number,Object]),default:""},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:Xe([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},placeholder:{type:String},form:{type:String,default:""},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:uo,default:""},prefixIcon:{type:uo,default:""},label:{type:String},tabindex:{type:[Number,String]},validateEvent:{type:Boolean,default:!0},inputStyle:{type:Xe([Object,Array,String]),default:()=>In({})}}),m7={[Ot]:e=>_t(e),input:e=>_t(e),change:e=>_t(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},v7=["type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder"],y7=["tabindex","disabled","readonly","autocomplete","aria-label","placeholder"],b7={name:"ElInput",inheritAttrs:!1},w7=ve(Qe(be({},b7),{props:g7,emits:m7,setup(e,{expose:t,emit:n}){const o=e,s={suffix:"append",prefix:"prepend"},i=Dt(),l=L2(),c=Nu(),f=O0(),{form:p,formItem:m}=il(),y=Fn(),v=ea(),w=Be("input"),E=Be("textarea"),I=Hn(),S=Hn(),T=F(!1),_=F(!1),N=F(!1),O=F(!1),D=Hn(o.inputStyle),x=$(()=>I.value||S.value),R=$(()=>{var ie;return(ie=p==null?void 0:p.statusIcon)!=null?ie:!1}),B=$(()=>(m==null?void 0:m.validateState)||""),Y=$(()=>Rw[B.value]),X=$(()=>O.value?DL:q$),K=$(()=>[l.style,o.inputStyle]),J=$(()=>[o.inputStyle,D.value,{resize:o.resize}]),G=$(()=>T0(o.modelValue)?"":String(o.modelValue)),z=$(()=>o.clearable&&!v.value&&!o.readonly&&!!G.value&&(T.value||_.value)),ee=$(()=>o.showPassword&&!v.value&&!o.readonly&&(!!G.value||T.value)),j=$(()=>o.showWordLimit&&!!f.value.maxlength&&(o.type==="text"||o.type==="textarea")&&!v.value&&!o.readonly&&!o.showPassword),V=$(()=>Array.from(G.value).length),q=$(()=>!!j.value&&V.value>Number(f.value.maxlength)),ce=$(()=>!!c.suffix||!!o.suffixIcon||z.value||o.showPassword||j.value||!!B.value&&R.value),ue=()=>{const{type:ie,autosize:re}=o;if(!(!jt||ie!=="textarea"))if(re){const ge=Kt(re)?re.minRows:void 0,Te=Kt(re)?re.maxRows:void 0;D.value=be({},dv(S.value,ge,Te))}else D.value={minHeight:dv(S.value).minHeight}},ne=()=>{const ie=x.value;!ie||ie.value===G.value||(ie.value=G.value)},Se=ie=>{const{el:re}=i.vnode;if(!re)return;const Te=Array.from(re.querySelectorAll(`.${w.e(ie)}`)).find(he=>he.parentNode===re);if(!Te)return;const Je=s[ie];c[Je]?Te.style.transform=`translateX(${ie==="suffix"?"-":""}${re.q
* Checks if an event is supported in the current execution environment.
*
* NOTE: This will not work correctly for non-generic events such as `change`,
* `reset`, `load`, `error`, and `select`.
*
* Borrows from Modernizr.
*
* @param {string} eventNameSuffix Event name, e.g. "click".
* @param {?boolean} capture Check if the capture phase is supported.
* @return {boolean} True if the event is supported.
* @internal
* @license Modernizr 3.0.0pre (Custom Build) | MIT
*/const LB=function(e,t){if(e&&e.addEventListener){const n=function(o){const s=RB(o);t&&Reflect.apply(t,this,[o,s])};M0()?e.addEventListener("DOMMouseScroll",n):e.onmousewheel=n}},PB={beforeMount(e,t){LB(e,t.value)}},BB={beforeMount(e,t){e._handleResize=()=>{var n;e&&((n=t.value)==null||n.call(t,e))},ol(e,e._handleResize)},beforeUnmount(e){rl(e,e._handleResize)}},Gf=(e,t,n)=>{const o=[],s=t&&n();for(let i=0;i<e;i++)o[i]=s?s.includes(i):!1;return o},Xf=e=>e.map((t,n)=>t||n).filter(t=>t!==!0),KC=(e,t,n)=>({getHoursList:(l,c)=>Gf(24,e,()=>e(l,c)),getMinutesList:(l,c,f)=>Gf(60,t,()=>t(l,c,f)),getSecondsList:(l,c,f,p)=>Gf(60,n,()=>n(l,c,f,p))}),YC=(e,t,n)=>{const{getHoursList:o,getMinutesList:s,getSecondsList:i}=KC(e,t,n);return{getAvailableHours:(p,m)=>Xf(o(p,m)),getAvailableMinutes:(p,m,y)=>Xf(s(p,m,y)),getAvailableSeconds:(p,m,y,v)=>Xf(i(p,m,y,v))}},GC=e=>{const t=F(e.parsedValue);return Re(()=>e.visible,n=>{n||(t.value=e.parsedValue)}),t},FB=ve({directives:{repeatClick:PC},components:{ElScrollbar:Es,ElIcon:yt,ArrowUp:xu,ArrowDown:Qi},props:{role:{type:String,required:!0},spinnerDate:{type:Object,required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:String,default:""},disabledHours:{type:Function},disabledMinutes:{type:Function},disabledSeconds:{type:Function}},emits:["change","select-range","set-option"],setup(e,t){const n=Be("time");let o=!1;const s=$o(pe=>{o=!1,Y(pe)},200),i=F(null),l=F(null),c=F(null),f=F(null),p={hours:l,minutes:c,seconds:f},m=$(()=>{const pe=["hours","minutes","seconds"];return e.showSeconds?pe:pe.slice(0,2)}),y=$(()=>e.spinnerDate.hour()),v=$(()=>e.spinnerDate.minute()),w=$(()=>e.spinnerDate.second()),E=$(()=>({hours:y,minutes:v,seconds:w})),I=$(()=>Ee(e.role)),S=$(()=>qe(y.value,e.role)),T=$(()=>xe(y.value,v.value,e.role)),_=$(()=>({hours:I,minutes:S,seconds:T})),N=$(()=>{const pe=y.value;return[pe>0?pe-1:void 0,pe,pe<23?pe+1:void 0]}),O=$(()=>{const pe=v.value;return[pe>0?pe-1:void 0,pe,pe<59?pe+1:void 0]}),D=$(()=>{const pe=w.value;return[pe>0?pe-1:void 0,pe,pe<59?pe+1:void 0]}),x=$(()=>({hours:N,minutes:O,seconds:D})),R=pe=>{if(!!!e.amPmMode)return"";const We=e.amPmMode==="A";let ze=pe<12?" am":" pm";return We&&(ze=ze.toUpperCase()),ze},B=pe=>{pe==="hours"?t.emit("select-range",0,2):pe==="minutes"?t.emit("select-range",3,5):pe==="seconds"&&t.emit("select-range",6,8),i.value=pe},Y=pe=>{J(pe,E.value[pe].value)},X=()=>{Y("hours"),Y("minutes"),Y("seconds")},K=pe=>pe.querySelector(`.${n.namespace.value}-scrollbar__wrap`),J=(pe,Me)=>{if(e.arrowControl)return;const We=p[pe];We&&We.$el&&(K(We.$el).scrollTop=Math.max(0,Me*G(pe)))},G=pe=>p[pe].$el.querySelector("li").offsetHeight,z=()=>{j(1)},ee=()=>{j(-1)},j=pe=>{i.value||B("hours");const Me=i.value;let We=E.value[Me].value;const ze=i.value==="hours"?24:60;We=(We+pe+ze)%ze,V(Me,We),J(Me,We),dt(()=>B(i.value))},V=(pe,Me)=>{if(!_.value[pe].value[Me])switch(pe){case"hours":t.emit("change",e.spinnerDate.hour(Me).minute(v.value).second(w.value));break;case"minutes":t.emit("change",e.spinnerDate.hour(y.value).minute(Me).second(w.value));break;case"seconds":t.emit("change",e.spinnerDate.hour(y.value).minute(v.value).second(Me));break}},q=(pe,{value:Me,disabled:We})=>{We||(V(pe,Me),B(pe),J(pe,Me))},ce=pe=>{o=!0,s(pe);const Me=Math.min(Math.round((K(p[pe].$el).scrollTop-(ue(pe)*.5-10)/G(pe)+3)/G(pe)),pe==="hours"?23:59);V(pe,Me)},ue=pe=>p[pe].$el.offsetHeight,ne=()=>{const pe=Me=>{p[Me]&&p[Me].$el&&(K(p[Me].$el).onscroll=()=>{ce(Me)})};pe("hours"),pe("minutes"),pe("seconds")};kt(()=>{dt(()=>{!e.arrowControl&&ne(),X(),e.role==="start"&&B("hours")})});const Se=(pe,Me)=>{p[Me]=pe};t.emit("set-option",[`${e.role}_scrollDown`,j]),t.emit("set-option",[`${e.role}_emitSelectRange`,B]);const{getHoursList:Ee,getMinutesList:qe,getSecondsList:xe}=KC(e.disabledHours,e.disabledMinutes,e.disabledSeconds);return Re(()=>e.spinnerDate,()=>{o||X()}),{ns:n,setRef:Se,spinnerItems:m,currentScrollbar:i,hours:y,minutes:v,seconds:w,hoursList:I,minutesList:S,arrowHourList:N,arrowMinuteList:O,arrowSecondList:D,getAmPmFlag:R,emitSelectRange:B,adjustCurrentS
Add an empty element to avoid render label,
do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485
`),mV]),_:1},8,["model-value","label","disabled","onUpdate:modelValue"])):e.isLeaf&&e.node.checked?(M(),me(p,{key:2,class:P(e.ns.e("prefix"))},{default:ae(()=>[le(f)]),_:1},8,["class"])):fe("v-if",!0),fe(" content "),le(m),fe(" postfix "),e.isLeaf?fe("v-if",!0):(M(),W(at,{key:3},[e.node.loading?(M(),me(p,{key:0,class:P([e.ns.is("loading"),e.ns.e("postfix")])},{default:ae(()=>[le(y)]),_:1},8,["class"])):(M(),me(p,{key:1,class:P(["arrow-right",e.ns.e("postfix")])},{default:ae(()=>[le(v)]),_:1},8,["class"]))],2112))],42,gV)}var yV=Ue(pV,[["render",vV],["__file","/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/node.vue"]]);const bV=ve({name:"ElCascaderMenu",components:{Loading:ti,ElIcon:yt,ElScrollbar:Es,ElCascaderNode:yV},props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0}},setup(e){const t=Dt(),n=Be("cascader-menu"),{t:o}=un(),s=Mu();let i=null,l=null;const c=et(z0),f=F(null),p=$(()=>!e.nodes.length),m=$(()=>!c.initialLoaded),y=$(()=>`cascader-menu-${s}-${e.index}`),v=S=>{i=S.target},w=S=>{if(!(!c.isHoverMenu||!i||!f.value))if(i.contains(S.target)){E();const T=t.vnode.el,{left:_}=T.getBoundingClientRect(),{offsetWidth:N,offsetHeight:O}=T,D=S.clientX-_,x=i.offsetTop,R=x+i.offsetHeight;f.value.innerHTML=`
<path style="pointer-events: auto;" fill="transparent" d="M${D} ${x} L${N} 0 V${x} Z" />
<path style="pointer-events: auto;" fill="transparent" d="M${D} ${R} L${N} ${O} V${R} Z" />
`}else l||(l=window.setTimeout(I,c.config.hoverThreshold))},E=()=>{!l||(clearTimeout(l),l=null)},I=()=>{!f.value||(f.value.innerHTML="",E())};return{ns:n,panel:c,hoverZone:f,isEmpty:p,isLoading:m,menuId:y,t:o,handleExpand:v,handleMouseMove:w,clearHoverZone:I}}});function wV(e,t,n,o,s,i){const l=Ae("el-cascader-node"),c=Ae("loading"),f=Ae("el-icon"),p=Ae("el-scrollbar");return M(),me(p,{key:e.menuId,tag:"ul",role:"menu",class:P(e.ns.b()),"wrap-class":e.ns.e("wrap"),"view-class":[e.ns.e("list"),e.ns.is("empty",e.isEmpty)],onMousemove:e.handleMouseMove,onMouseleave:e.clearHoverZone},{default:ae(()=>{var m;return[(M(!0),W(at,null,zt(e.nodes,y=>(M(),me(l,{key:y.uid,node:y,"menu-id":e.menuId,onExpand:e.handleExpand},null,8,["node","menu-id","onExpand"]))),128)),e.isLoading?(M(),W("div",{key:0,class:P(e.ns.e("empty-text"))},[le(f,{size:"14",class:P(e.ns.is("loading"))},{default:ae(()=>[le(c)]),_:1},8,["class"]),Ht(" "+Pe(e.t("el.cascader.loading")),1)],2)):e.isEmpty?(M(),W("div",{key:1,class:P(e.ns.e("empty-text"))},Pe(e.t("el.cascader.noData")),3)):(m=e.panel)!=null&&m.isHoverMenu?(M(),W("svg",{key:2,ref:"hoverZone",class:P(e.ns.e("hover-zone"))},null,2)):fe("v-if",!0)]}),_:1},8,["class","wrap-class","view-class","onMousemove","onMouseleave"])}var CV=Ue(bV,[["render",wV],["__file","/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/menu.vue"]]),U0=(e=>(e.CLICK="click",e.HOVER="hover",e))(U0||{});let EV=0;const SV=e=>{const t=[e];let{parent:n}=e;for(;n;)t.unshift(n),n=n.parent;return t};class Ya{constructor(t,n,o,s=!1){this.data=t,this.config=n,this.parent=o,this.root=s,this.uid=EV++,this.checked=!1,this.indeterminate=!1,this.loading=!1;const{value:i,label:l,children:c}=n,f=t[c],p=SV(this);this.level=s?0:o?o.level+1:1,this.value=t[i],this.label=t[l],this.pathNodes=p,this.pathValues=p.map(m=>m.value),this.pathLabels=p.map(m=>m.label),this.childrenData=f,this.children=(f||[]).map(m=>new Ya(m,n,this)),this.loaded=!n.lazy||this.isLeaf||!uu(f)}get isDisabled(){const{data:t,parent:n,config:o}=this,{disabled:s,checkStrictly:i}=o;return(It(s)?s(t,this):!!t[s])||!i&&(n==null?void 0:n.isDisabled)}get isLeaf(){const{data:t,config:n,childrenData:o,loaded:s}=this,{lazy:i,leaf:l}=n,c=It(l)?l(t,this):t[l];return zo(c)?i&&!s?!1:!(Array.isArray(o)&&o.length):!!c}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(t){const{childrenData:n,children:o}=this,s=new Ya(t,this.config,this);return Array.isArray(n)?n.push(t):this.childrenData=[t],o.push(s),s}calcText(t,n){const o=t?this.pathLabels.join(n):this.label;return this.text=o,o}broadcast(t,...n){const o=`onParent${Vo(t)}`;this.children.forEach(s=>{s&&(s.broadcast(t,...n),s[o]&&s[o](...n))})}emit(t,...n){const{parent:o}=this,s=`onChild${Vo(t)}`;o&&(o[s]&&o[s](...n),o.emit(t,...n))}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,n=t.filter(s=>!s.isDisabled),o=n.length?n.every(s=>s.checked):!1;this.setCheckState(o)}setCheckState(t){const n=this.children.length,o=this.children.reduce((s,i)=>{const l=i.checked?1:i.indeterminate?.5:0;return s+l},0);this.checked=this.loaded&&this.children.every(s=>s.loaded&&s.checked)&&t,this.indeterminate=this.loaded&&o!==n&&o>0}doCheck(t){if(this.checked===t)return;const{checkStrictly:n,multiple:o}=this.config;n||!o?this.checked=t:(this.broadcast("check",t),this.setCheckState(t),this.emit("check"))}}const rp=(e,t)=>e.reduce((n,o)=>(o.isLeaf?n.push(o):(!t&&n.push(o),n=n.concat(rp(o.children,t))),n),[]);class xv{constructor(t,n){this.config=n;const o=(t||[]).map(s=>new Ya(s,this.config));this.nodes=o,this.allNodes=rp(o,!1),this.leafNodes=rp(o,!0)}getNodes(){return this.nodes}getFlattedNodes(t){return t?this.leafNodes:this.allNodes}appendNode(t,n){const o=n?n.appendChild(t):new Ya(t,this.config);n||this.nodes.push(o),this.allNodes.push(o),o.isLeaf&&this.leafNodes.push(o)}appendNodes(t,n){t.forEach(o=>this.appendNode(o,n))}getNodeByValue(t,n=!1){return!t&&t!==0?null:this.getFlattedNodes(n).find(s=>Ko(s.value,t)||Ko(s.pathValues,t))||null}getSameNode(t
M 50 50
m 0 ${_?"":"-"}${T}
a ${T} ${T} 0 1 1 0 ${_?"-":""}${T*2}
a ${T} ${T} 0 1 1 0 ${_?"":"-"}${T*2}
`}),l=$(()=>2*Math.PI*s.value),c=$(()=>e.type==="dashboard"?.75:1),f=$(()=>`${-1*l.value*(1-c.value)/2}px`),p=$(()=>({strokeDasharray:`${l.value*c.value}px, ${l.value}px`,strokeDashoffset:f.value})),m=$(()=>({strokeDasharray:`${l.value*c.value*(e.percentage/100)}px, ${l.value}px`,strokeDashoffset:f.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease"})),y=$(()=>{let T;if(e.color)T=I(e.percentage);else switch(e.status){case"success":T="#13ce66";break;case"exception":T="#ff4949";break;case"warning":T="#e6a23c";break;default:T="#20a0ff"}return T}),v=$(()=>e.status==="warning"?cu:e.type==="line"?e.status==="success"?ad:gs:e.status==="success"?ja:gr),w=$(()=>e.type==="line"?12+e.strokeWidth*.4:e.width*.111111+2),E=$(()=>e.format(e.percentage)),I=T=>{var _;const{color:N}=e;if(typeof N=="function")return N(T);if(typeof N=="string")return N;{const O=100/N.length,x=N.map((R,B)=>typeof R=="string"?{color:R,percentage:(B+1)*O}:R).sort((R,B)=>R.percentage-B.percentage);for(const R of x)if(R.percentage>T)return R.color;return(_=x[x.length-1])==null?void 0:_.color}},S=$(()=>({percentage:e.percentage}));return{ns:t,barStyle:n,relativeStrokeWidth:o,radius:s,trackPath:i,perimeter:l,rate:c,strokeDashoffset:f,trailPathStyle:p,circlePathStyle:m,stroke:y,statusIcon:v,progressTextSize:w,content:E,slotData:S}}}),lX=["aria-valuenow"],uX={viewBox:"0 0 100 100"},cX=["d","stroke-width"],dX=["d","stroke","stroke-linecap","stroke-width"],fX={key:0};function hX(e,t,n,o,s,i){const l=Ae("el-icon");return M(),W("div",{class:P([e.ns.b(),e.ns.m(e.type),e.ns.is(e.status),{[e.ns.m("without-text")]:!e.showText,[e.ns.m("text-inside")]:e.textInside}]),role:"progressbar","aria-valuenow":e.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[e.type==="line"?(M(),W("div",{key:0,class:P(e.ns.b("bar"))},[Q("div",{class:P(e.ns.be("bar","outer")),style:st({height:`${e.strokeWidth}px`})},[Q("div",{class:P([e.ns.be("bar","inner"),{[e.ns.bem("bar","inner","indeterminate")]:e.indeterminate}]),style:st(e.barStyle)},[(e.showText||e.$slots.default)&&e.textInside?(M(),W("div",{key:0,class:P(e.ns.be("bar","innerText"))},[Ie(e.$slots,"default",Nr(Ys(e.slotData)),()=>[Q("span",null,Pe(e.content),1)])],2)):fe("v-if",!0)],6)],6)],2)):(M(),W("div",{key:1,class:P(e.ns.b("circle")),style:st({height:`${e.width}px`,width:`${e.width}px`})},[(M(),W("svg",uX,[Q("path",{class:P(e.ns.be("circle","track")),d:e.trackPath,stroke:"var(--el-fill-color-light, #e5e9f2)","stroke-width":e.relativeStrokeWidth,fill:"none",style:st(e.trailPathStyle)},null,14,cX),Q("path",{class:P(e.ns.be("circle","path")),d:e.trackPath,stroke:e.stroke,fill:"none","stroke-linecap":e.strokeLinecap,"stroke-width":e.percentage?e.relativeStrokeWidth:0,style:st(e.circlePathStyle)},null,14,dX)]))],6)),(e.showText||e.$slots.default)&&!e.textInside?(M(),W("div",{key:2,class:P(e.ns.e("text")),style:st({fontSize:`${e.progressTextSize}px`})},[Ie(e.$slots,"default",Nr(Ys(e.slotData)),()=>[e.status?(M(),me(l,{key:1},{default:ae(()=>[(M(),me(Xt(e.statusIcon)))]),_:1})):(M(),W("span",fX,Pe(e.content),1))])],6)):fe("v-if",!0)],10,lX)}var pX=Ue(aX,[["render",hX],["__file","/home/runner/work/element-plus/element-plus/packages/components/progress/src/progress.vue"]]);const QE=$t(pX),gX=ct({modelValue:{type:Number,default:0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:Xe([Array,Object]),default:()=>In(["","",""])},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:Xe([Array,Object]),default:()=>[oc,oc,oc]},voidIcon:{type:uo,default:()=>EL},disabledVoidIcon:{type:uo,default:()=>oc},disabled:{type:Boolean,default:!1},allowHalf:{type:Boolean,default:!1},showText:{type:Boolean,default:!1},showScore:{type:Boolean,default:!1},textColor:{type:String,default:""},texts:{type:Xe(Array),default:()=>In(["Extremely bad","Disappointed","Fair","Satisfied","Surprise"])},scoreTemplate:{type:String,default:"{value}"},size:{type:String,validator:Zo}}),mX={change:e=>typeof e=="number",[Ot]:e=>typeof e=="number"},vX=["aria-
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/var EZ=/["'&<>]/,SZ=AZ;function AZ(e){var t=""+e,n=EZ.exec(t);if(!n)return t;var o,s="",i=0,l=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:o="&quot;";break;case 38:o="&amp;";break;case 39:o="&#39;";break;case 60:o="&lt;";break;case 62:o="&gt;";break;default:continue}l!==i&&(s+=t.substring(l,i)),l=i+1,s+=o}return l!==i?s+t.substring(l,i):s}const lh=function(e){let t=e.target;for(;t&&t.tagName.toUpperCase()!=="HTML";){if(t.tagName.toUpperCase()==="TD")return t;t=t.parentNode}return null},gy=function(e){return e!==null&&typeof e=="object"},TZ=function(e,t,n,o,s){if(!t&&!o&&(!s||Array.isArray(s)&&!s.length))return e;typeof n=="string"?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const i=o?null:function(c,f){return s?(Array.isArray(s)||(s=[s]),s.map(p=>typeof p=="string"?An(c,p):p(c,f,e))):(t!=="$key"&&gy(c)&&"$value"in c&&(c=c.$value),[gy(c)?An(c,t):c])},l=function(c,f){if(o)return o(c.value,f.value);for(let p=0,m=c.key.length;p<m;p++){if(c.key[p]<f.key[p])return-1;if(c.key[p]>f.key[p])return 1}return 0};return e.map((c,f)=>({value:c,index:f,key:i?i(c,f):null})).sort((c,f)=>{let p=l(c,f);return p||(p=c.index-f.index),p*+n}).map(c=>c.value)},gS=function(e,t){let n=null;return e.columns.forEach(o=>{o.id===t&&(n=o)}),n},IZ=function(e,t){let n=null;for(let o=0;o<e.columns.length;o++){const s=e.columns[o];if(s.columnKey===t){n=s;break}}return n},my=function(e,t,n){const o=(t.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return o?gS(e,o[0]):null},so=(e,t)=>{if(!e)throw new Error("Row is required when get row identity");if(typeof t=="string"){if(!t.includes("."))return`${e[t]}`;const n=t.split(".");let o=e;for(const s of n)o=o[s];return`${o}`}else if(typeof t=="function")return t.call(null,e)},Ni=function(e,t){const n={};return(e||[]).forEach((o,s)=>{n[so(o,t)]={row:o,index:s}}),n};function _Z(e,t){const n={};let o;for(o in e)n[o]=e[o];for(o in t)if(Bt(t,o)){const s=t[o];typeof s!="undefined"&&(n[o]=s)}return n}function t1(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function mS(e){return e===""||e!==void 0&&(e=t1(e),Number.isNaN(e)&&(e=80)),e}function vp(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function NZ(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...o)=>t(n(...o)))}function Bc(e,t,n){let o=!1;const s=e.indexOf(t),i=s!==-1,l=()=>{e.push(t),o=!0},c=()=>{e.splice(s,1),o=!0};return typeof n=="boolean"?n&&!i?l():!n&&i&&c():i?c():l(),o}function kZ(e,t,n="children",o="hasChildren"){const s=l=>!(Array.isArray(l)&&l.length);function i(l,c,f){t(l,c,f),c.forEach(p=>{if(p[o]){t(p,null,f+1);return}const m=p[n];s(m)||i(p,m,f+1)})}e.forEach(l=>{if(l[o]){t(l,null,0);return}const c=l[n];s(c)||i(l,c,0)})}let pd;function xZ(e,t,n,o){const{nextZIndex:s}=ws();function i(){const y=o==="light",v=document.createElement("div");return v.className=`el-popper ${y?"is-light":"is-dark"}`,t=SZ(t),v.innerHTML=t,v.style.zIndex=String(s()),document.body.appendChild(v),v}function l(){const y=document.createElement("div");return y.className="el-popper__arrow",y}function c(){f&&f.update()}pd=function y(){try{f&&f.destroy(),p&&document.body.removeChild(p),Kn(e,"mouseenter",c),Kn(e,"mouseleave",y)}catch{}};let f=null;const p=i(),m=l();return p.appendChild(m),f=yu(e,p,be({modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"arrow",options:{element:m,padding:10}}]},n)),Bn(e,"mouseenter",c),Bn(e,"mouseleave",pd),f}const vS=(e,t,n,o)=>{let s=0,i=e;if(o){if(o[e].colSpan>1)return{};for(let f=0;f<e;f++)s+=o[f].colSpan;i=s+o[e].colSpan-1}else s=e;let l;const c=n.states.columns;switch(t){case"left":i<n.states.fixedLeafColumnsLength.value&&(l="left");break;case"right":s>=c.value.length-n.states.rightFixedLeafColumnsLength.value&&(l="right");break;default:i<n.states.fixedLeafColumnsLength.value?l="left":s>=c.value.length-n.states.rightFixedLeafColumnsLength.value&&(l="right")}return l?{direction:l,start:s,after:i}:{}},n1=(e,t,n,o,s)=>{const i=[],{direction:l,start:c}=vS(t,n,o,s);if(l){const f=l==="left";i.push(`${e}-fixed-col
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(H,r){H.__proto__=r}||function(H,r){for(var a in r)r.hasOwnProperty(a)&&(H[a]=r[a])};function s(H,r){o(H,r);function a(){this.constructor=H}H.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}function i(H,r){var a=Object.setPrototypeOf;a?a(H,r):H.__proto__=r}function l(H,r){r===void 0&&(r=H.constructor);var a=Error.captureStackTrace;a&&a(H,r)}var c=function(H){s(r,H);function r(a){var u=this.constructor,d=H.call(this,a)||this;return Object.defineProperty(d,"name",{value:u.name,enumerable:!1}),i(d,u.prototype),l(d),d}return r}(Error);class f extends c{constructor(r=void 0){super(r),this.message=r}getKind(){return this.constructor.kind}}f.kind="Exception";class p extends f{}p.kind="ArgumentException";class m extends f{}m.kind="IllegalArgumentException";class y{constructor(r){if(this.binarizer=r,r===null)throw new m("Binarizer must be non-null.")}getWidth(){return this.binarizer.getWidth()}getHeight(){return this.binarizer.getHeight()}getBlackRow(r,a){return this.binarizer.getBlackRow(r,a)}getBlackMatrix(){return(this.matrix===null||this.matrix===void 0)&&(this.matrix=this.binarizer.getBlackMatrix()),this.matrix}isCropSupported(){return this.binarizer.getLuminanceSource().isCropSupported()}crop(r,a,u,d){const h=this.binarizer.getLuminanceSource().crop(r,a,u,d);return new y(this.binarizer.createBinarizer(h))}isRotateSupported(){return this.binarizer.getLuminanceSource().isRotateSupported()}rotateCounterClockwise(){const r=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new y(this.binarizer.createBinarizer(r))}rotateCounterClockwise45(){const r=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new y(this.binarizer.createBinarizer(r))}toString(){try{return this.getBlackMatrix().toString()}catch{return""}}}class v extends f{static getChecksumInstance(){return new v}}v.kind="ChecksumException";class w{constructor(r){this.source=r}getLuminanceSource(){return this.source}getWidth(){return this.source.getWidth()}getHeight(){return this.source.getHeight()}}class E{static arraycopy(r,a,u,d,h){for(;h--;)u[d++]=r[a++]}static currentTimeMillis(){return Date.now()}}class I extends f{}I.kind="IndexOutOfBoundsException";class S extends I{constructor(r=void 0,a=void 0){super(a),this.index=r,this.message=a}}S.kind="ArrayIndexOutOfBoundsException";class T{static fill(r,a){for(let u=0,d=r.length;u<d;u++)r[u]=a}static fillWithin(r,a,u,d){T.rangeCheck(r.length,a,u);for(let h=a;h<u;h++)r[h]=d}static rangeCheck(r,a,u){if(a>u)throw new m("fromIndex("+a+") > toIndex("+u+")");if(a<0)throw new S(a);if(u>r)throw new S(u)}static asList(...r){return r}static create(r,a,u){return Array.from({length:r}).map(h=>Array.from({length:a}).fill(u))}static createInt32Array(r,a,u){return Array.from({length:r}).map(h=>Int32Array.from({length:a}).fill(u))}static equals(r,a){if(!r||!a||!r.length||!a.length||r.length!==a.length)return!1;for(let u=0,d=r.length;u<d;u++)if(r[u]!==a[u])return!1;return!0}static hashCode(r){if(r===null)return 0;let a=1;for(const u of r)a=31*a+u;return a}static fillUint8Array(r,a){for(let u=0;u!==r.length;u++)r[u]=a}static copyOf(r,a){return r.slice(0,a)}static copyOfUint8Array(r,a){if(r.length<=a){const u=new Uint8Array(a);return u.set(r),u}return r.slice(0,a)}static copyOfRange(r,a,u){const d=u-a,h=new Int32Array(d);return E.arraycopy(r,a,h,0,d),h}static binarySearch(r,a,u){u===void 0&&(u=T.numberComparator);let d=0,h=r.length-1;for(;d<=h;){const g=h+d>>1,b=u(a,r[g]);if(b>0)d=g+1;else if(b<0)h=g-1;else return g}return-d-1}static numberComparator(r,a){return r-a}}class _{static numberOfTrailingZeros(r){let a;if(r===0)return 32;let u=31;return a=r<<16,a!==0&&(u-=16,r=a),a=r<<8,a!==0&&(u-=8,r=a),a=r<<4,a!==0&&(u-=4,r=a),a=r<<2,a!==0&&(u-=2,r=a),u-(r<<1>>>31)}static numberOfLeadingZeros(r){if(r===0)return 32;let a=1;return r>>>16===0&&(a+=16,r<<=16),r>>>24===0&&(a+=8,r<<=8),r>>>28===0&&(a+=4,r<<=4),r>>>30===0&&(a+=2,r<<=2),a-=r>>>31,a}s
`||r.charAt(A)==="\r"){if(h>g){if(b===-1)b=h-g;else if(h-g!==b)throw new m("row lengths do not match");g=h,C++}A++}else if(r.substring(A,A+a.length)===a)A+=a.length,d[h]=!0,h++;else if(r.substring(A,A+u.length)===u)A+=u.length,d[h]=!1,h++;else throw new m("illegal character encountered: "+r.substring(A));if(h>g){if(b===-1)b=h-g;else if(h-g!==b)throw new m("row lengths do not match");C++}const L=new G(b,C);for(let U=0;U<h;U++)d[U]&&L.set(Math.floor(U%b),Math.floor(U/b));return L}get(r,a){const u=a*this.rowSize+Math.floor(r/32);return(this.bits[u]>>>(r&31)&1)!==0}set(r,a){const u=a*this.rowSize+Math.floor(r/32);this.bits[u]|=1<<(r&31)&4294967295}unset(r,a){const u=a*this.rowSize+Math.floor(r/32);this.bits[u]&=~(1<<(r&31)&4294967295)}flip(r,a){const u=a*this.rowSize+Math.floor(r/32);this.bits[u]^=1<<(r&31)&4294967295}xor(r){if(this.width!==r.getWidth()||this.height!==r.getHeight()||this.rowSize!==r.getRowSize())throw new m("input matrix dimensions do not match");const a=new N(Math.floor(this.width/32)+1),u=this.rowSize,d=this.bits;for(let h=0,g=this.height;h<g;h++){const b=h*u,C=r.getRow(h,a).getBitArray();for(let A=0;A<u;A++)d[b+A]^=C[A]}}clear(){const r=this.bits,a=r.length;for(let u=0;u<a;u++)r[u]=0}setRegion(r,a,u,d){if(a<0||r<0)throw new m("Left and top must be nonnegative");if(d<1||u<1)throw new m("Height and width must be at least 1");const h=r+u,g=a+d;if(g>this.height||h>this.width)throw new m("The region must fit inside the matrix");const b=this.rowSize,C=this.bits;for(let A=a;A<g;A++){const L=A*b;for(let U=r;U<h;U++)C[L+Math.floor(U/32)]|=1<<(U&31)&4294967295}}getRow(r,a){a==null||a.getSize()<this.width?a=new N(this.width):a.clear();const u=this.rowSize,d=this.bits,h=r*u;for(let g=0;g<u;g++)a.setBulk(g*32,d[h+g]);return a}setRow(r,a){E.arraycopy(a.getBitArray(),0,this.bits,r*this.rowSize,this.rowSize)}rotate180(){const r=this.getWidth(),a=this.getHeight();let u=new N(r),d=new N(r);for(let h=0,g=Math.floor((a+1)/2);h<g;h++)u=this.getRow(h,u),d=this.getRow(a-1-h,d),u.reverse(),d.reverse(),this.setRow(h,d),this.setRow(a-1-h,u)}getEnclosingRectangle(){const r=this.width,a=this.height,u=this.rowSize,d=this.bits;let h=r,g=a,b=-1,C=-1;for(let A=0;A<a;A++)for(let L=0;L<u;L++){const U=d[A*u+L];if(U!==0){if(A<g&&(g=A),A>C&&(C=A),L*32<h){let Z=0;for(;(U<<31-Z&4294967295)===0;)Z++;L*32+Z<h&&(h=L*32+Z)}if(L*32+31>b){let Z=31;for(;U>>>Z===0;)Z--;L*32+Z>b&&(b=L*32+Z)}}}return b<h||C<g?null:Int32Array.from([h,g,b-h+1,C-g+1])}getTopLeftOnBit(){const r=this.rowSize,a=this.bits;let u=0;for(;u<a.length&&a[u]===0;)u++;if(u===a.length)return null;const d=u/r;let h=u%r*32;const g=a[u];let b=0;for(;(g<<31-b&4294967295)===0;)b++;return h+=b,Int32Array.from([h,d])}getBottomRightOnBit(){const r=this.rowSize,a=this.bits;let u=a.length-1;for(;u>=0&&a[u]===0;)u--;if(u<0)return null;const d=Math.floor(u/r);let h=Math.floor(u%r)*32;const g=a[u];let b=31;for(;g>>>b===0;)b--;return h+=b,Int32Array.from([h,d])}getWidth(){return this.width}getHeight(){return this.height}getRowSize(){return this.rowSize}equals(r){if(!(r instanceof G))return!1;const a=r;return this.width===a.width&&this.height===a.height&&this.rowSize===a.rowSize&&T.equals(this.bits,a.bits)}hashCode(){let r=this.width;return r=31*r+this.width,r=31*r+this.height,r=31*r+this.rowSize,r=31*r+T.hashCode(this.bits),r}toString(r="X ",a=" ",u=`
`){return this.buildToString(r,a,u)}buildToString(r,a,u){let d=new J;for(let h=0,g=this.height;h<g;h++){for(let b=0,C=this.width;b<C;b++)d.append(this.get(b,h)?r:a);d.append(u)}return d.toString()}clone(){return new G(this.width,this.height,this.rowSize,this.bits.slice())}}class z extends f{static getNotFoundInstance(){return new z}}z.kind="NotFoundException";class ee extends w{constructor(r){super(r),this.luminances=ee.EMPTY,this.buckets=new Int32Array(ee.LUMINANCE_BUCKETS)}getBlackRow(r,a){const u=this.getLuminanceSource(),d=u.getWidth();a==null||a.getSize()<d?a=new N(d):a.clear(),this.initArrays(d);const h=u.getRow(r,this.luminances),g=this.buckets;for(let C=0;C<d;C++)g[(h[C]&255)>>ee.LUMINANCE_SHIFT]++;const b=ee.estimateBlackPoint(g);if(d<3)for(let C=0;C<d;C++)(h[C]&255)<b&&a.set(C);else{let C=h[0]&255,A=h[1]&255;for(let L=1;L<d-1;L++){const U=h[L+1]&255;(A*4-C-U)/2<b&&a.set(L),C=A,A=U}}return a}getBlackMatrix(){const r=this.getLuminanceSource(),a=r.getWidth(),u=r.getHeight(),d=new G(a,u);this.initArrays(a);const h=this.buckets;for(let C=1;C<5;C++){const A=Math.floor(u*C/5),L=r.getRow(A,this.luminances),U=Math.floor(a*4/5);for(let Z=Math.floor(a/5);Z<U;Z++){const se=L[Z]&255;h[se>>ee.LUMINANCE_SHIFT]++}}const g=ee.estimateBlackPoint(h),b=r.getMatrix();for(let C=0;C<u;C++){const A=C*a;for(let L=0;L<a;L++)(b[A+L]&255)<g&&d.set(L,C)}return d}createBinarizer(r){return new ee(r)}initArrays(r){this.luminances.length<r&&(this.luminances=new Uint8ClampedArray(r));const a=this.buckets;for(let u=0;u<ee.LUMINANCE_BUCKETS;u++)a[u]=0}static estimateBlackPoint(r){const a=r.length;let u=0,d=0,h=0;for(let L=0;L<a;L++)r[L]>h&&(d=L,h=r[L]),r[L]>u&&(u=r[L]);let g=0,b=0;for(let L=0;L<a;L++){const U=L-d,Z=r[L]*U*U;Z>b&&(g=L,b=Z)}if(d>g){const L=d;d=g,g=L}if(g-d<=a/16)throw new z;let C=g-1,A=-1;for(let L=g-1;L>d;L--){const U=L-d,Z=U*U*(g-L)*(u-r[L]);Z>A&&(C=L,A=Z)}return C<<ee.LUMINANCE_SHIFT}}ee.LUMINANCE_BITS=5,ee.LUMINANCE_SHIFT=8-ee.LUMINANCE_BITS,ee.LUMINANCE_BUCKETS=1<<ee.LUMINANCE_BITS,ee.EMPTY=Uint8ClampedArray.from([0]);class j extends ee{constructor(r){super(r),this.matrix=null}getBlackMatrix(){if(this.matrix!==null)return this.matrix;const r=this.getLuminanceSource(),a=r.getWidth(),u=r.getHeight();if(a>=j.MINIMUM_DIMENSION&&u>=j.MINIMUM_DIMENSION){const d=r.getMatrix();let h=a>>j.BLOCK_SIZE_POWER;(a&j.BLOCK_SIZE_MASK)!==0&&h++;let g=u>>j.BLOCK_SIZE_POWER;(u&j.BLOCK_SIZE_MASK)!==0&&g++;const b=j.calculateBlackPoints(d,h,g,a,u),C=new G(a,u);j.calculateThresholdForBlock(d,h,g,a,u,b,C),this.matrix=C}else this.matrix=super.getBlackMatrix();return this.matrix}createBinarizer(r){return new j(r)}static calculateThresholdForBlock(r,a,u,d,h,g,b){const C=h-j.BLOCK_SIZE,A=d-j.BLOCK_SIZE;for(let L=0;L<u;L++){let U=L<<j.BLOCK_SIZE_POWER;U>C&&(U=C);const Z=j.cap(L,2,u-3);for(let se=0;se<a;se++){let ye=se<<j.BLOCK_SIZE_POWER;ye>A&&(ye=A);const Ce=j.cap(se,2,a-3);let Oe=0;for(let ft=-2;ft<=2;ft++){const ht=g[Z+ft];Oe+=ht[Ce-2]+ht[Ce-1]+ht[Ce]+ht[Ce+1]+ht[Ce+2]}const Ke=Oe/25;j.thresholdBlock(r,ye,U,Ke,d,b)}}}static cap(r,a,u){return r<a?a:r>u?u:r}static thresholdBlock(r,a,u,d,h,g){for(let b=0,C=u*h+a;b<j.BLOCK_SIZE;b++,C+=h)for(let A=0;A<j.BLOCK_SIZE;A++)(r[C+A]&255)<=d&&g.set(a+A,u+b)}static calculateBlackPoints(r,a,u,d,h){const g=h-j.BLOCK_SIZE,b=d-j.BLOCK_SIZE,C=new Array(u);for(let A=0;A<u;A++){C[A]=new Int32Array(a);let L=A<<j.BLOCK_SIZE_POWER;L>g&&(L=g);for(let U=0;U<a;U++){let Z=U<<j.BLOCK_SIZE_POWER;Z>b&&(Z=b);let se=0,ye=255,Ce=0;for(let Ke=0,ft=L*d+Z;Ke<j.BLOCK_SIZE;Ke++,ft+=d){for(let ht=0;ht<j.BLOCK_SIZE;ht++){const lt=r[ft+ht]&255;se+=lt,lt<ye&&(ye=lt),lt>Ce&&(Ce=lt)}if(Ce-ye>j.MIN_DYNAMIC_RANGE)for(Ke++,ft+=d;Ke<j.BLOCK_SIZE;Ke++,ft+=d)for(let ht=0;ht<j.BLOCK_SIZE;ht++)se+=r[ft+ht]&255}let Oe=se>>j.BLOCK_SIZE_POWER*2;if(Ce-ye<=j.MIN_DYNAMIC_RANGE&&(Oe=ye/2,A>0&&U>0)){const Ke=(C[A-1][U]+2*C[A][U-1]+C[A-1][U-1])/4;ye<Ke&&(Oe=Ke)}C[A][U]=Oe}}return C}}j.BLOCK_SIZE_POWER=3,j.BLOCK_SIZE=1<<j.BLOCK_SIZE_POWER,j.BLOCK_SIZE_MASK=j.BLOCK_SIZE-1,j.MINIMUM_DIMENSION=j.BLOCK_SIZE*5,j.MIN_DYNAMIC_RANGE=24;class V{constructor(r,a){this.width
`)}return a.toString()}}class q extends V{constructor(r){super(r.getWidth(),r.getHeight()),this.delegate=r}getRow(r,a){const u=this.delegate.getRow(r,a),d=this.getWidth();for(let h=0;h<d;h++)u[h]=255-(u[h]&255);return u}getMatrix(){const r=this.delegate.getMatrix(),a=this.getWidth()*this.getHeight(),u=new Uint8ClampedArray(a);for(let d=0;d<a;d++)u[d]=255-(r[d]&255);return u}isCropSupported(){return this.delegate.isCropSupported()}crop(r,a,u,d){return new q(this.delegate.crop(r,a,u,d))}isRotateSupported(){return this.delegate.isRotateSupported()}invert(){return this.delegate}rotateCounterClockwise(){return new q(this.delegate.rotateCounterClockwise())}rotateCounterClockwise45(){return new q(this.delegate.rotateCounterClockwise45())}}class ce extends V{constructor(r){super(r.width,r.height),this.canvas=r,this.tempCanvasElement=null,this.buffer=ce.makeBufferFromCanvasImageData(r)}static makeBufferFromCanvasImageData(r){const a=r.getContext("2d").getImageData(0,0,r.width,r.height);return ce.toGrayscaleBuffer(a.data,r.width,r.height)}static toGrayscaleBuffer(r,a,u){const d=new Uint8ClampedArray(a*u);for(let h=0,g=0,b=r.length;h<b;h+=4,g++){let C;if(r[h+3]===0)C=255;else{const L=r[h],U=r[h+1],Z=r[h+2];C=306*L+601*U+117*Z+512>>10}d[g]=C}return d}getRow(r,a){if(r<0||r>=this.getHeight())throw new m("Requested row is outside the image: "+r);const u=this.getWidth(),d=r*u;return a===null?a=this.buffer.slice(d,d+u):(a.length<u&&(a=new Uint8ClampedArray(u)),a.set(this.buffer.slice(d,d+u))),a}getMatrix(){return this.buffer}isCropSupported(){return!0}crop(r,a,u,d){return super.crop(r,a,u,d),this}isRotateSupported(){return!0}rotateCounterClockwise(){return this.rotate(-90),this}rotateCounterClockwise45(){return this.rotate(-45),this}getTempCanvasElement(){if(this.tempCanvasElement===null){const r=this.canvas.ownerDocument.createElement("canvas");r.width=this.canvas.width,r.height=this.canvas.height,this.tempCanvasElement=r}return this.tempCanvasElement}rotate(r){const a=this.getTempCanvasElement(),u=a.getContext("2d"),d=r*ce.DEGREE_TO_RADIANS,h=this.canvas.width,g=this.canvas.height,b=Math.ceil(Math.abs(Math.cos(d))*h+Math.abs(Math.sin(d))*g),C=Math.ceil(Math.abs(Math.sin(d))*h+Math.abs(Math.cos(d))*g);return a.width=b,a.height=C,u.translate(b/2,C/2),u.rotate(d),u.drawImage(this.canvas,h/-2,g/-2),this.buffer=ce.makeBufferFromCanvasImageData(a),this}invert(){return new q(this)}}ce.DEGREE_TO_RADIANS=Math.PI/180;class ue{constructor(r,a,u){this.deviceId=r,this.label=a,this.kind="videoinput",this.groupId=u||void 0}toJSON(){return{kind:this.kind,groupId:this.groupId,deviceId:this.deviceId,label:this.label}}}var ne=(globalThis||Mo||self||window||void 0)&&(globalThis||Mo||self||window||void 0).__awaiter||function(H,r,a,u){function d(h){return h instanceof a?h:new a(function(g){g(h)})}return new(a||(a=Promise))(function(h,g){function b(L){try{A(u.next(L))}catch(U){g(U)}}function C(L){try{A(u.throw(L))}catch(U){g(U)}}function A(L){L.done?h(L.value):d(L.value).then(b,C)}A((u=u.apply(H,r||[])).next())})};class Se{constructor(r,a=500,u){this.reader=r,this.timeBetweenScansMillis=a,this._hints=u,this._stopContinuousDecode=!1,this._stopAsyncDecode=!1,this._timeBetweenDecodingAttempts=0}get hasNavigator(){return typeof navigator!="undefined"}get isMediaDevicesSuported(){return this.hasNavigator&&!!navigator.mediaDevices}get canEnumerateDevices(){return!!(this.isMediaDevicesSuported&&navigator.mediaDevices.enumerateDevices)}get timeBetweenDecodingAttempts(){return this._timeBetweenDecodingAttempts}set timeBetweenDecodingAttempts(r){this._timeBetweenDecodingAttempts=r<0?0:r}set hints(r){this._hints=r||null}get hints(){return this._hints}listVideoInputDevices(){return ne(this,void 0,void 0,function*(){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.");const r=yield navigator.mediaDevices.enumerateDevices(),a=[];for(const u of r){const d=u.kind==="video"?"videoinput":u.kind;if(d!=="videoinput")continue;const h=u.deviceId||
`,"\\13","\f","\r","\\33","\\34","\\35","\\36","\\37","@","\\","^","_","`","|","~","\\177","CTRL_LL","CTRL_UL","CTRL_PL","CTRL_BS"],ke.PUNCT_TABLE=["","\r",`\r
`,". ",", ",": ","!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}","CTRL_UL"],ke.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"];class Ve{constructor(){}static round(r){return r===NaN?0:r<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:r>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:r+(r<0?-.5:.5)|0}static distance(r,a,u,d){const h=r-u,g=a-d;return Math.sqrt(h*h+g*g)}static sum(r){let a=0;for(let u=0,d=r.length;u!==d;u++)a+=r[u];return a}}class ie{static floatToIntBits(r){return r}}ie.MAX_VALUE=Number.MAX_SAFE_INTEGER;class re{constructor(r,a){this.x=r,this.y=a}getX(){return this.x}getY(){return this.y}equals(r){if(r instanceof re){const a=r;return this.x===a.x&&this.y===a.y}return!1}hashCode(){return 31*ie.floatToIntBits(this.x)+ie.floatToIntBits(this.y)}toString(){return"("+this.x+","+this.y+")"}static orderBestPatterns(r){const a=this.distance(r[0],r[1]),u=this.distance(r[1],r[2]),d=this.distance(r[0],r[2]);let h,g,b;if(u>=a&&u>=d?(g=r[0],h=r[1],b=r[2]):d>=u&&d>=a?(g=r[1],h=r[0],b=r[2]):(g=r[2],h=r[0],b=r[1]),this.crossProductZ(h,g,b)<0){const C=h;h=b,b=C}r[0]=h,r[1]=g,r[2]=b}static distance(r,a){return Ve.distance(r.x,r.y,a.x,a.y)}static crossProductZ(r,a,u){const d=a.x,h=a.y;return(u.x-d)*(r.y-h)-(u.y-h)*(r.x-d)}}class ge{constructor(r,a){this.bits=r,this.points=a}getBits(){return this.bits}getPoints(){return this.points}}class Te extends ge{constructor(r,a,u,d,h){super(r,a),this.compact=u,this.nbDatablocks=d,this.nbLayers=h}getNbLayers(){return this.nbLayers}getNbDatablocks(){return this.nbDatablocks}isCompact(){return this.compact}}class Je{constructor(r,a,u,d){this.image=r,this.height=r.getHeight(),this.width=r.getWidth(),a==null&&(a=Je.INIT_SIZE),u==null&&(u=r.getWidth()/2|0),d==null&&(d=r.getHeight()/2|0);const h=a/2|0;if(this.leftInit=u-h,this.rightInit=u+h,this.upInit=d-h,this.downInit=d+h,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new z}detect(){let r=this.leftInit,a=this.rightInit,u=this.upInit,d=this.downInit,h=!1,g=!0,b=!1,C=!1,A=!1,L=!1,U=!1;const Z=this.width,se=this.height;for(;g;){g=!1;let ye=!0;for(;(ye||!C)&&a<Z;)ye=this.containsBlackPoint(u,d,a,!1),ye?(a++,g=!0,C=!0):C||a++;if(a>=Z){h=!0;break}let Ce=!0;for(;(Ce||!A)&&d<se;)Ce=this.containsBlackPoint(r,a,d,!0),Ce?(d++,g=!0,A=!0):A||d++;if(d>=se){h=!0;break}let Oe=!0;for(;(Oe||!L)&&r>=0;)Oe=this.containsBlackPoint(u,d,r,!1),Oe?(r--,g=!0,L=!0):L||r--;if(r<0){h=!0;break}let Ke=!0;for(;(Ke||!U)&&u>=0;)Ke=this.containsBlackPoint(r,a,u,!0),Ke?(u--,g=!0,U=!0):U||u--;if(u<0){h=!0;break}g&&(b=!0)}if(!h&&b){const ye=a-r;let Ce=null;for(let ht=1;Ce===null&&ht<ye;ht++)Ce=this.getBlackPointOnSegment(r,d-ht,r+ht,d);if(Ce==null)throw new z;let Oe=null;for(let ht=1;Oe===null&&ht<ye;ht++)Oe=this.getBlackPointOnSegment(r,u+ht,r+ht,u);if(Oe==null)throw new z;let Ke=null;for(let ht=1;Ke===null&&ht<ye;ht++)Ke=this.getBlackPointOnSegment(a,u+ht,a-ht,u);if(Ke==null)throw new z;let ft=null;for(let ht=1;ft===null&&ht<ye;ht++)ft=this.getBlackPointOnSegment(a,d-ht,a-ht,d);if(ft==null)throw new z;return this.centerEdges(ft,Ce,Ke,Oe)}else throw new z}getBlackPointOnSegment(r,a,u,d){const h=Ve.round(Ve.distance(r,a,u,d)),g=(u-r)/h,b=(d-a)/h,C=this.image;for(let A=0;A<h;A++){const L=Ve.round(r+A*g),U=Ve.round(a+A*b);if(C.get(L,U))return new re(L,U)}return null}centerEdges(r,a,u,d){const h=r.getX(),g=r.getY(),b=a.getX(),C=a.getY(),A=u.getX(),L=u.getY(),U=d.getX(),Z=d.getY(),se=Je.CORR;return h<this.width/2?[new re(U-se,Z+se),new re(b+se,C+se),new re(A-se,L-se),new re(h+se,g-se)]:[new re(U+se,Z+se),new re(b+se,C-se),new re(A-se,L+se),new re(h-se,g-se)]}containsBlackPoint(r,a,u,d){const h=this.image;if(d){for(let g=r;g<=a;g++)if(h.get(g,u))return!0}else for(let g=r;g<=a;g++)if(h.get(u,g))return!0;return!1}}Je.INIT_SIZE=10,Je.CORR=1;class he{static checkAndNudgePoints(r,a){const u=r.getWidth(),d=r.getHeight();let h=!0;for(let g=0;g<a.length&&h;g+=2){const b=Math.floor(a[g]),C=Math.floor(a[g+1]);if(b<-1||b>u||C<-1||C>d)throw new z;h=
`+super.toString()}}class pl{constructor(r,a){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=r,this.barcodeColumnCount=r.getColumnCount(),this.boundingBox=a,this.detectionResultColumns=new Array(this.barcodeColumnCount+2)}getDetectionResultColumns(){this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);let r=Vt.MAX_CODEWORDS_IN_BARCODE,a;do a=r,r=this.adjustRowNumbersAndGetCount();while(r>0&&r<a);return this.detectionResultColumns}adjustIndicatorColumnRowNumbers(r){r!=null&&r.adjustCompleteIndicatorColumnRowNumbers(this.barcodeMetadata)}adjustRowNumbersAndGetCount(){let r=this.adjustRowNumbersByRow();if(r===0)return 0;for(let a=1;a<this.barcodeColumnCount+1;a++){let u=this.detectionResultColumns[a].getCodewords();for(let d=0;d<u.length;d++)u[d]!=null&&(u[d].hasValidRowNumber()||this.adjustRowNumbers(a,d,u))}return r}adjustRowNumbersByRow(){return this.adjustRowNumbersFromBothRI(),this.adjustRowNumbersFromLRI()+this.adjustRowNumbersFromRRI()}adjustRowNumbersFromBothRI(){if(this.detectionResultColumns[0]==null||this.detectionResultColumns[this.barcodeColumnCount+1]==null)return;let r=this.detectionResultColumns[0].getCodewords(),a=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords();for(let u=0;u<r.length;u++)if(r[u]!=null&&a[u]!=null&&r[u].getRowNumber()===a[u].getRowNumber())for(let d=1;d<=this.barcodeColumnCount;d++){let h=this.detectionResultColumns[d].getCodewords()[u];h!=null&&(h.setRowNumber(r[u].getRowNumber()),h.hasValidRowNumber()||(this.detectionResultColumns[d].getCodewords()[u]=null))}}adjustRowNumbersFromRRI(){if(this.detectionResultColumns[this.barcodeColumnCount+1]==null)return 0;let r=0,a=this.detectionResultColumns[this.barcodeColumnCount+1].getCodewords();for(let u=0;u<a.length;u++){if(a[u]==null)continue;let d=a[u].getRowNumber(),h=0;for(let g=this.barcodeColumnCount+1;g>0&&h<this.ADJUST_ROW_NUMBER_SKIP;g--){let b=this.detectionResultColumns[g].getCodewords()[u];b!=null&&(h=pl.adjustRowNumberIfValid(d,h,b),b.hasValidRowNumber()||r++)}}return r}adjustRowNumbersFromLRI(){if(this.detectionResultColumns[0]==null)return 0;let r=0,a=this.detectionResultColumns[0].getCodewords();for(let u=0;u<a.length;u++){if(a[u]==null)continue;let d=a[u].getRowNumber(),h=0;for(let g=1;g<this.barcodeColumnCount+1&&h<this.ADJUST_ROW_NUMBER_SKIP;g++){let b=this.detectionResultColumns[g].getCodewords()[u];b!=null&&(h=pl.adjustRowNumberIfValid(d,h,b),b.hasValidRowNumber()||r++)}}return r}static adjustRowNumberIfValid(r,a,u){return u==null||u.hasValidRowNumber()||(u.isValidRowNumber(r)?(u.setRowNumber(r),a=0):++a),a}adjustRowNumbers(r,a,u){let d=u[a],h=this.detectionResultColumns[r-1].getCodewords(),g=h;this.detectionResultColumns[r+1]!=null&&(g=this.detectionResultColumns[r+1].getCodewords());let b=new Array(14);b[2]=h[a],b[3]=g[a],a>0&&(b[0]=u[a-1],b[4]=h[a-1],b[5]=g[a-1]),a>1&&(b[8]=u[a-2],b[10]=h[a-2],b[11]=g[a-2]),a<u.length-1&&(b[1]=u[a+1],b[6]=h[a+1],b[7]=g[a+1]),a<u.length-2&&(b[9]=u[a+2],b[12]=h[a+2],b[13]=g[a+2]);for(let C of b)if(pl.adjustRowNumber(d,C))return}static adjustRowNumber(r,a){return a==null?!1:a.hasValidRowNumber()&&a.getBucket()===r.getBucket()?(r.setRowNumber(a.getRowNumber()),!0):!1}getBarcodeColumnCount(){return this.barcodeColumnCount}getBarcodeRowCount(){return this.barcodeMetadata.getRowCount()}getBarcodeECLevel(){return this.barcodeMetadata.getErrorCorrectionLevel()}setBoundingBox(r){this.boundingBox=r}getBoundingBox(){return this.boundingBox}setDetectionResultColumn(r,a){this.detectionResultColumns[r]=a}getDetectionResultColumn(r){return this.detectionResultColumns[r]}toString(){let r=this.detectionResultColumns[0];r==null&&(r=this.detectionResultColumns[this.barcodeColumnCount+1]);let a=new dl;for(let u=0;u<r.getCodewords().length;u++){a.format("CW %3d:",u);for(let d=0;d<this.barcodeColumnCount+2;d++){if(this.detectionResultColumns[d]==null){a.format(" | ");continue}let h=this.detectionResultColumns[d].getCodewords()[u];if(h==null){a.format(" | ");continue}a.fo
-.$/"|*()?{}'`,je.MIXED_CHARS="0123456789&\r ,:#-.$/+%*=^",je.EXP900=w1()?g3():[],je.NUMBER_OF_SEQUENCE_CODEWORDS=2;class tn{constructor(){}static decode(r,a,u,d,h,g,b){let C=new ri(r,a,u,d,h),A=null,L=null,U;for(let ye=!0;;ye=!1){if(a!=null&&(A=tn.getRowIndicatorColumn(r,C,a,!0,g,b)),d!=null&&(L=tn.getRowIndicatorColumn(r,C,d,!1,g,b)),U=tn.merge(A,L),U==null)throw z.getNotFoundInstance();let Ce=U.getBoundingBox();if(ye&&Ce!=null&&(Ce.getMinY()<C.getMinY()||Ce.getMaxY()>C.getMaxY()))C=Ce;else break}U.setBoundingBox(C);let Z=U.getBarcodeColumnCount()+1;U.setDetectionResultColumn(0,A),U.setDetectionResultColumn(Z,L);let se=A!=null;for(let ye=1;ye<=Z;ye++){let Ce=se?ye:Z-ye;if(U.getDetectionResultColumn(Ce)!==void 0)continue;let Oe;Ce===0||Ce===Z?Oe=new m1(C,Ce===0):Oe=new fl(C),U.setDetectionResultColumn(Ce,Oe);let Ke=-1,ft=Ke;for(let ht=C.getMinY();ht<=C.getMaxY();ht++){if(Ke=tn.getStartColumn(U,Ce,ht,se),Ke<0||Ke>C.getMaxX()){if(ft===-1)continue;Ke=ft}let lt=tn.detectCodeword(r,C.getMinX(),C.getMaxX(),se,Ke,ht,g,b);lt!=null&&(Oe.setCodeword(ht,lt),ft=Ke,g=Math.min(g,lt.getWidth()),b=Math.max(b,lt.getWidth()))}}return tn.createDecoderResult(U)}static merge(r,a){if(r==null&&a==null)return null;let u=tn.getBarcodeMetadata(r,a);if(u==null)return null;let d=ri.merge(tn.adjustBoundingBox(r),tn.adjustBoundingBox(a));return new pl(u,d)}static adjustBoundingBox(r){if(r==null)return null;let a=r.getRowHeights();if(a==null)return null;let u=tn.getMax(a),d=0;for(let b of a)if(d+=u-b,b>0)break;let h=r.getCodewords();for(let b=0;d>0&&h[b]==null;b++)d--;let g=0;for(let b=a.length-1;b>=0&&(g+=u-a[b],!(a[b]>0));b--);for(let b=h.length-1;g>0&&h[b]==null;b--)g--;return r.getBoundingBox().addMissingRows(d,g,r.isLeft())}static getMax(r){let a=-1;for(let u of r)a=Math.max(a,u);return a}static getBarcodeMetadata(r,a){let u;if(r==null||(u=r.getBarcodeMetadata())==null)return a==null?null:a.getBarcodeMetadata();let d;return a==null||(d=a.getBarcodeMetadata())==null?u:u.getColumnCount()!==d.getColumnCount()&&u.getErrorCorrectionLevel()!==d.getErrorCorrectionLevel()&&u.getRowCount()!==d.getRowCount()?null:u}static getRowIndicatorColumn(r,a,u,d,h,g){let b=new m1(a,d);for(let C=0;C<2;C++){let A=C===0?1:-1,L=Math.trunc(Math.trunc(u.getX()));for(let U=Math.trunc(Math.trunc(u.getY()));U<=a.getMaxY()&&U>=a.getMinY();U+=A){let Z=tn.detectCodeword(r,0,r.getWidth(),d,L,U,h,g);Z!=null&&(b.setCodeword(U,Z),d?L=Z.getStartX():L=Z.getEndX())}}return b}static adjustCodewordCount(r,a){let u=a[0][1],d=u.getValue(),h=r.getBarcodeColumnCount()*r.getBarcodeRowCount()-tn.getNumberOfECCodeWords(r.getBarcodeECLevel());if(d.length===0){if(h<1||h>Vt.MAX_CODEWORDS_IN_BARCODE)throw z.getNotFoundInstance();u.setValue(h)}else d[0]!==h&&u.setValue(h)}static createDecoderResult(r){let a=tn.createBarcodeMatrix(r);tn.adjustCodewordCount(r,a);let u=new Array,d=new Int32Array(r.getBarcodeRowCount()*r.getBarcodeColumnCount()),h=[],g=new Array;for(let C=0;C<r.getBarcodeRowCount();C++)for(let A=0;A<r.getBarcodeColumnCount();A++){let L=a[C][A+1].getValue(),U=C*r.getBarcodeColumnCount()+A;L.length===0?u.push(U):L.length===1?d[U]=L[0]:(g.push(U),h.push(L))}let b=new Array(h.length);for(let C=0;C<b.length;C++)b[C]=h[C];return tn.createDecoderResultFromAmbiguousValues(r.getBarcodeECLevel(),d,Vt.toIntArray(u),Vt.toIntArray(g),b)}static createDecoderResultFromAmbiguousValues(r,a,u,d,h){let g=new Int32Array(d.length),b=100;for(;b-- >0;){for(let C=0;C<g.length;C++)a[d[C]]=h[C][g[C]];try{return tn.decodeCodewords(a,r,u)}catch(C){if(!(C instanceof v))throw C}if(g.length===0)throw v.getChecksumInstance();for(let C=0;C<g.length;C++)if(g[C]<h[C].length-1){g[C]++;break}else if(g[C]=0,C===g.length-1)throw v.getChecksumInstance()}throw v.getChecksumInstance()}static createBarcodeMatrix(r){let a=Array.from({length:r.getBarcodeRowCount()},()=>new Array(r.getBarcodeColumnCount()+2));for(let d=0;d<a.length;d++)for(let h=0;h<a[d].length;h++)a[d][h]=new hl;let u=0;for(let d of r.getDetectionResultColumns()){if(d!=null){for(let h of d.getCodewords())if(h!=null){let g=h.getRowNumber();if(g>=0){if(g>=a.length
`)}return r.toString()}}class si{constructor(){this.maskPattern=-1}getMode(){return this.mode}getECLevel(){return this.ecLevel}getVersion(){return this.version}getMaskPattern(){return this.maskPattern}getMatrix(){return this.matrix}toString(){const r=new J;return r.append(`<<
`),r.append(" mode: "),r.append(this.mode?this.mode.toString():"null"),r.append(`
ecLevel: `),r.append(this.ecLevel?this.ecLevel.toString():"null"),r.append(`
version: `),r.append(this.version?this.version.toString():"null"),r.append(`
maskPattern: `),r.append(this.maskPattern.toString()),this.matrix?(r.append(`
matrix:
`),r.append(this.matrix.toString())):r.append(`
matrix: null
`),r.append(`>>
`),r.toString()}setMode(r){this.mode=r}setECLevel(r){this.ecLevel=r}setVersion(r){this.version=r}setMaskPattern(r){this.maskPattern=r}setMatrix(r){this.matrix=r}static isValidMaskPattern(r){return r>=0&&r<si.NUM_MASK_PATTERNS}}si.NUM_MASK_PATTERNS=8;class vn extends f{}vn.kind="WriterException";class Lt{constructor(){}static clearMatrix(r){r.clear(255)}static buildMatrix(r,a,u,d,h){Lt.clearMatrix(h),Lt.embedBasicPatterns(u,h),Lt.embedTypeInfo(a,d,h),Lt.maybeEmbedVersionInfo(u,h),Lt.embedDataBits(r,d,h)}static embedBasicPatterns(r,a){Lt.embedPositionDetectionPatternsAndSeparators(a),Lt.embedDarkDotAtLeftBottomCorner(a),Lt.maybeEmbedPositionAdjustmentPatterns(r,a),Lt.embedTimingPatterns(a)}static embedTypeInfo(r,a,u){const d=new N;Lt.makeTypeInfoBits(r,a,d);for(let h=0,g=d.getSize();h<g;++h){const b=d.get(d.getSize()-1-h),C=Lt.TYPE_INFO_COORDINATES[h],A=C[0],L=C[1];if(u.setBoolean(A,L,b),h<8){const U=u.getWidth()-h-1,Z=8;u.setBoolean(U,Z,b)}else{const Z=u.getHeight()-7+(h-8);u.setBoolean(8,Z,b)}}}static maybeEmbedVersionInfo(r,a){if(r.getVersionNumber()<7)return;const u=new N;Lt.makeVersionInfoBits(r,u);let d=6*3-1;for(let h=0;h<6;++h)for(let g=0;g<3;++g){const b=u.get(d);d--,a.setBoolean(h,a.getHeight()-11+g,b),a.setBoolean(a.getHeight()-11+g,h,b)}}static embedDataBits(r,a,u){let d=0,h=-1,g=u.getWidth()-1,b=u.getHeight()-1;for(;g>0;){for(g===6&&(g-=1);b>=0&&b<u.getHeight();){for(let C=0;C<2;++C){const A=g-C;if(!Lt.isEmpty(u.get(A,b)))continue;let L;d<r.getSize()?(L=r.get(d),++d):L=!1,a!==255&&Ln.getDataMaskBit(a,A,b)&&(L=!L),u.setBoolean(A,b,L)}b+=h}h=-h,b+=h,g-=2}if(d!==r.getSize())throw new vn("Not all bits consumed: "+d+"/"+r.getSize())}static findMSBSet(r){return 32-_.numberOfLeadingZeros(r)}static calculateBCHCode(r,a){if(a===0)throw new m("0 polynomial");const u=Lt.findMSBSet(a);for(r<<=u-1;Lt.findMSBSet(r)>=u;)r^=a<<Lt.findMSBSet(r)-u;return r}static makeTypeInfoBits(r,a,u){if(!si.isValidMaskPattern(a))throw new vn("Invalid mask pattern");const d=r.getBits()<<3|a;u.appendBits(d,5);const h=Lt.calculateBCHCode(d,Lt.TYPE_INFO_POLY);u.appendBits(h,10);const g=new N;if(g.appendBits(Lt.TYPE_INFO_MASK_PATTERN,15),u.xor(g),u.getSize()!==15)throw new vn("should not happen but we got: "+u.getSize())}static makeVersionInfoBits(r,a){a.appendBits(r.getVersionNumber(),6);const u=Lt.calculateBCHCode(r.getVersionNumber(),Lt.VERSION_INFO_POLY);if(a.appendBits(u,12),a.getSize()!==18)throw new vn("should not happen but we got: "+a.getSize())}static isEmpty(r){return r===255}static embedTimingPatterns(r){for(let a=8;a<r.getWidth()-8;++a){const u=(a+1)%2;Lt.isEmpty(r.get(a,6))&&r.setNumber(a,6,u),Lt.isEmpty(r.get(6,a))&&r.setNumber(6,a,u)}}static embedDarkDotAtLeftBottomCorner(r){if(r.get(8,r.getHeight()-8)===0)throw new vn;r.setNumber(8,r.getHeight()-8,1)}static embedHorizontalSeparationPattern(r,a,u){for(let d=0;d<8;++d){if(!Lt.isEmpty(u.get(r+d,a)))throw new vn;u.setNumber(r+d,a,0)}}static embedVerticalSeparationPattern(r,a,u){for(let d=0;d<7;++d){if(!Lt.isEmpty(u.get(r,a+d)))throw new vn;u.setNumber(r,a+d,0)}}static embedPositionAdjustmentPattern(r,a,u){for(let d=0;d<5;++d){const h=Lt.POSITION_ADJUSTMENT_PATTERN[d];for(let g=0;g<5;++g)u.setNumber(r+g,a+d,h[g])}}static embedPositionDetectionPattern(r,a,u){for(let d=0;d<7;++d){const h=Lt.POSITION_DETECTION_PATTERN[d];for(let g=0;g<7;++g)u.setNumber(r+g,a+d,h[g])}}static embedPositionDetectionPatternsAndSeparators(r){const a=Lt.POSITION_DETECTION_PATTERN[0].length;Lt.embedPositionDetectionPattern(0,0,r),Lt.embedPositionDetectionPattern(r.getWidth()-a,0,r),Lt.embedPositionDetectionPattern(0,r.getWidth()-a,r);const u=8;Lt.embedHorizontalSeparationPattern(0,u-1,r),Lt.embedHorizontalSeparationPattern(r.getWidth()-u,u-1,r),Lt.embedHorizontalSeparationPattern(0,r.getWidth()-u,r);const d=7;Lt.embedVerticalSeparationPattern(d,0,r),Lt.embedVerticalSeparationPattern(r.getHeight()-d-1,0,r),Lt.embedVerticalSeparationPattern(d,r.getHeight()-d,r)}static maybeEmbedPositionAdjustmentPatterns(r,a){if(r.getVersionNumber()<2)return;const u=r.getVersionNumber()-1,d=Lt.POSITION_ADJUSTMENT_PATTERN_COORDIN
`,"\v","\f","\r","\x1B","","","","","@","\\","^","_","`","|","~","\x7F"];for(let Z=0;Z<L.length;Z++)H[T1][K.getCharCode(L[Z])]=Z;const U=["\0","\r","\0","\0","\0","\0","!","'","#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","[","]","{","}"];for(let Z=0;Z<U.length;Z++)K.getCharCode(U[Z])>0&&(H[zr][K.getCharCode(U[Z])]=Z);return H}const Cf=I3(T.createInt32Array(5,256));class vl{constructor(r){this.text=r}encode(){const r=K.getCharCode(" "),a=K.getCharCode(`
2022-04-22 05:34:46 +00:00
`);let u=A1.singletonList(Ur.INITIAL_STATE);for(let h=0;h<this.text.length;h++){let g,b=h+1<this.text.length?this.text[h+1]:0;switch(this.text[h]){case K.getCharCode("\r"):g=b===a?2:0;break;case K.getCharCode("."):g=b===r?3:0;break;case K.getCharCode(","):g=b===r?4:0;break;case K.getCharCode(":"):g=b===r?5:0;break;default:g=0}g>0?(u=vl.updateStateListForPair(u,h,g),h++):u=this.updateStateListForChar(u,h)}return A1.min(u,(h,g)=>h.getBitCount()-g.getBitCount()).toBitArray(this.text)}updateStateListForChar(r,a){const u=[];for(let d of r)this.updateStateForChar(d,a,u);return vl.simplifyStates(u)}updateStateForChar(r,a,u){let d=this.text[a]&255,h=Cf[r.getMode()][d]>0,g=null;for(let b=0;b<=zr;b++){let C=Cf[b][d];if(C>0){if(g==null&&(g=r.endBinaryShift(a)),!h||b===r.getMode()||b===or){const A=g.latchAndAppend(b,C);u.push(A)}if(!h&&I1[r.getMode()][b]>=0){const A=g.shiftAndAppend(b,C);u.push(A)}}}if(r.getBinaryShiftByteCount()>0||Cf[r.getMode()][d]===0){let b=r.addBinaryShiftChar(a);u.push(b)}}static updateStateListForPair(r,a,u){const d=[];for(let h of r)this.updateStateForPair(h,a,u,d);return this.simplifyStates(d)}static updateStateForPair(r,a,u,d){let h=r.endBinaryShift(a);if(d.push(h.latchAndAppend(zr,u)),r.getMode()!==zr&&d.push(h.shiftAndAppend(zr,u)),u===3||u===4){let g=h.latchAndAppend(or,16-u).latchAndAppend(or,1);d.push(g)}if(r.getBinaryShiftByteCount()>0){let g=r.addBinaryShiftChar(a).addBinaryShiftChar(a+1);d.push(g)}}static simplifyStates(r){let a=[];for(const u of r){let d=!0;for(const h of a){if(h.isBetterThanOrEqualTo(u)){d=!1;break}u.isBetterThanOrEqualTo(h)&&(a=a.filter(g=>g!==h))}d&&a.push(u)}return a}}class dn{constructor(){}static encodeBytes(r){return dn.encode(r,dn.DEFAULT_EC_PERCENT,dn.DEFAULT_AZTEC_LAYERS)}static encode(r,a,u){let d=new vl(r).encode(),h=_.truncDivision(d.getSize()*a,100)+11,g=d.getSize()+h,b,C,A,L,U;if(u!==dn.DEFAULT_AZTEC_LAYERS){if(b=u<0,C=Math.abs(u),C>(b?dn.MAX_NB_BITS_COMPACT:dn.MAX_NB_BITS))throw new m(K.format("Illegal value %s for layers",u));A=dn.totalBitsInLayer(C,b),L=dn.WORD_SIZE[C];let lt=A-A%L;if(U=dn.stuffBits(d,L),U.getSize()+h>lt)throw new m("Data to large for user specified layer");if(b&&U.getSize()>L*64)throw new m("Data to large for user specified layer")}else{L=0,U=null;for(let lt=0;;lt++){if(lt>dn.MAX_NB_BITS)throw new m("Data too large for an Aztec code");if(b=lt<=3,C=b?lt+1:lt,A=dn.totalBitsInLayer(C,b),g>A)continue;(U==null||L!==dn.WORD_SIZE[C])&&(L=dn.WORD_SIZE[C],U=dn.stuffBits(d,L));let rn=A-A%L;if(!(b&&U.getSize()>L*64)&&U.getSize()+h<=rn)break}}let Z=dn.generateCheckWords(U,A,L),se=U.getSize()/L,ye=dn.generateModeMessage(b,C,se),Ce=(b?11:14)+C*4,Oe=new Int32Array(Ce),Ke;if(b){Ke=Ce;for(let lt=0;lt<Oe.length;lt++)Oe[lt]=lt}else{Ke=Ce+1+2*_.truncDivision(_.truncDivision(Ce,2)-1,15);let lt=_.truncDivision(Ce,2),rn=_.truncDivision(Ke,2);for(let qt=0;qt<lt;qt++){let _o=qt+_.truncDivision(qt,15);Oe[lt-qt-1]=rn-_o-1,Oe[lt+qt]=rn+_o+1}}let ft=new G(Ke);for(let lt=0,rn=0;lt<C;lt++){let qt=(C-lt)*4+(b?9:12);for(let _o=0;_o<qt;_o++){let Er=_o*2;for(let No=0;No<2;No++)Z.get(rn+Er+No)&&ft.set(Oe[lt*2+No],Oe[lt*2+_o]),Z.get(rn+qt*2+Er+No)&&ft.set(Oe[lt*2+_o],Oe[Ce-1-lt*2-No]),Z.get(rn+qt*4+Er+No)&&ft.set(Oe[Ce-1-lt*2-No],Oe[Ce-1-lt*2-_o]),Z.get(rn+qt*6+Er+No)&&ft.set(Oe[Ce-1-lt*2-_o],Oe[lt*2+No])}rn+=qt*8}if(dn.drawModeMessage(ft,b,Ke,ye),b)dn.drawBullsEye(ft,_.truncDivision(Ke,2),5);else{dn.drawBullsEye(ft,_.truncDivision(Ke,2),7);for(let lt=0,rn=0;lt<_.truncDivision(Ce,2)-1;lt+=15,rn+=16)for(let qt=_.truncDivision(Ke,2)&1;qt<Ke;qt+=2)ft.set(_.truncDivision(Ke,2)-rn,qt),ft.set(_.truncDivision(Ke,2)+rn,qt),ft.set(qt,_.truncDivision(Ke,2)-rn),ft.set(qt,_.truncDivision(Ke,2)+rn)}let ht=new S1;return ht.setCompact(b),ht.setSize(Ke),ht.setLayers(C),ht.setCodeWords(se),ht.setMatrix(ft),ht}static drawBullsEye(r,a,u){for(let d=0;d<u;d+=2)for(let h=a-d;h<=a+d;h++)r.set(h,a-d),r.set(h,a+d),r.set(a-d,h),r.set(a+d,h);r.set(a-u,a-u),r.set(a-u+1,a-u),r.set(a-u,a-u+1),r.set(a+u,a-u),r.set(a+u,a-u+1),r.set(a+u,a+u-1)}static generateModeMessage(r,a,u){let d=new N;return r?(d.appendBits(