1 |
- System.register(["./forgotPassword-legacy-ccea5a83.js","./teacherIcon-legacy-3eeb62c3.js","./maleIcon-legacy-f2aee668.js","./index-legacy-af0a420c.js","./index-legacy-fad19aef.js","./api-legacy-b9ed74b8.js"],(function(e,t){"use strict";var n,o,r,a,i,l,s,d,c,u,h,f,p,g,m,v,b,y,w,C,x,k,_,T,P,A,S,R,B,M,I,D,L,N,E,O,F,j,z,U,$,q,K,H,G,V,W,Q,X,Y,J,Z,ee,te,ne,oe,re,ae,ie,le,se,de,ce,ue,he,fe,pe,ge,me,ve,be,ye,we,Ce,xe,ke,_e,Te,Pe,Ae,Se,Re,Be,Me,Ie,De,Le,Ne,Ee,Oe,Fe,je,ze,Ue,$e,qe,Ke,He,Ge,Ve;return{setters:[e=>{n=e.s,o=e.F},e=>{r=e.d},e=>{a=e.m,i=e.f},e=>{l=e.co,s=e.cp,d=e.d,c=e.cq,u=e.bq,h=e.r,f=e.aQ,p=e.as,g=e.T,m=e.cr,v=e.cs,b=e.ct,y=e.cu,w=e.cv,C=e.cw,x=e.cx,k=e.cy,_=e.ay,T=e.$,P=e.cz,A=e.cA,S=e.cB,R=e.cC,B=e.cD,M=e.l,I=e.cE,D=e.cF,L=e.cG,N=e.cH,E=e.cI,O=e.bR,F=e.cJ,j=e.cK,z=e.cn,U=e.cL,$=e.cM,q=e.cN,K=e.cO,H=e.cP,G=e.cQ,V=e.cR,W=e.cS,Q=e.cT,X=e.cU,Y=e.cV,J=e.ci,Z=e.cW,ee=e.cX,te=e.cY,ne=e.aB,oe=e.w,re=e.b0,ae=e.cZ,ie=e.c_,le=e.c$,se=e.d0,de=e.d1,ce=e.d2,ue=e.d3,he=e.d4,fe=e.d5,pe=e.d6,ge=e.d7,me=e.aK,ve=e.cc,be=e.b,ye=e.c,we=e.e,Ce=e.q,xe=e.f,ke=e.o,_e=e.k,Te=e.N,Pe=e.ca,Ae=e.cb,Se=e.g,Re=e.h,Be=e.C,Me=e.B,Ie=e.j,De=e.y,Le=e.d8,Ne=e.a3,Ee=e.a_,Oe=e.a4,Fe=e.z,je=e.d9,ze=e.F,Ue=e.bW,$e=e.x,qe=e.A,Ke=e.a,He=e.m,Ge=e.n},e=>{Ve=e.U},null],execute:function(){var We=document.createElement("style");We.textContent="._logo_sn7fs_1{position:relative;width:100Px;height:100Px;border-radius:50%;overflow:hidden}._logo_sn7fs_1 ._changeHead_sn7fs_8{position:absolute;left:0;right:0;top:0;bottom:0;background-color:rgba(0,0,0,.7);display:flex;justify-content:center;align-items:center;font-size:.83333vw;color:#fff;font-weight:600;transition:opacity .3s;border-radius:50%;cursor:pointer;opacity:0}._logo_sn7fs_1 ._changeHead_sn7fs_8:hover{opacity:1}._logo_sn7fs_1 ._uploadFile_sn7fs_29{position:absolute;left:0;right:0;top:0;bottom:0;opacity:0}._formWrap_sn7fs_37 .n-input{min-width:14.79167vw;height:2.60417vw;border-radius:8Px}._formWrap_sn7fs_37 .n-input .n-input__input-el{height:100%}._formWrap_sn7fs_37 .n-input.n-input--disabled{background-color:#f5f6fa;color:#959598}._formWrap_sn7fs_37 .n-base-selection{height:2.60417vw;min-width:14.79167vw;border-radius:8Px}._formWrap_sn7fs_37 .n-base-selection .n-base-selection-label{height:100%}._formWrap_sn7fs_37 .n-base-selection.n-base-selection--disabled .n-base-selection-label{background-color:#f5f6fa;color:#959598}._schoolInfo_sn7fs_61 .n-form-item .n-form-item-label{color:#777}._schoolInfo_sn7fs_61 .n-button{border-radius:.41667vw}._schoolInfo_sn7fs_61 .n-data-table .n-data-table-th{background:#F7F7F8;color:#717172!important;border:none;min-height:54Px;font-size:15Px}._schoolInfo_sn7fs_61 .n-data-table.n-data-table--bordered .n-data-table-wrapper{border:none}._schoolInfo_sn7fs_61 .n-data-table-tr .n-data-table-td .n-button__content,._schoolInfo_sn7fs_61 .n-data-table .n-data-table-td{font-weight:700;font-size:15Px}._schoolInfo_sn7fs_61 .n-input{height:2.60417vw;border-radius:8Px}._schoolInfo_sn7fs_61 .n-input .n-input__input-el{height:100%}._schoolInfo_sn7fs_61 .n-input.n-input--disabled{background-color:#f5f6fa;color:#959598}._schoolInfo_sn7fs_61 .n-base-selection{border-radius:8Px}._schoolInfo_sn7fs_61 .n-base-selection .n-base-selection-label{height:2.60417vw}._schoolInfo_sn7fs_61 .n-base-selection.n-base-selection--disabled .n-base-selection-label{background-color:#f5f6fa;color:#959598}._schoolInfo_sn7fs_61 ._errorBtn_sn7fs_103 .n-button__content{color:#ff4d4f}._addTeacher_sn7fs_106{padding:0;border-radius:16Px;overflow:hidden;min-width:456Px}._addTeacher_sn7fs_106 .n-dialog__close{transform:translateY(3Px)}._addTeacher_sn7fs_106 .n-dialog__title{min-height:70Px;justify-content:center;background:#F5F6FA}._addTeacher_sn7fs_106 .n-form{padding:20Px 0}._addTeacher_sn7fs_106 .n-input{height:2.60417vw;border-radius:8Px}._addTeacher_sn7fs_106 .n-input .n-input__input-el{height:100%}._addTeacher_sn7fs_106 .n-input.n-input--disabled{background-color:#f5f6fa;color:#959598}._addTeacher_sn7fs_106 .n-base-selection{border-radius:8Px}._addTeacher_sn7fs_106 .n-base-selection .n-base-selection-label{height:2.60417vw}._addTeacher_sn7fs_106 .n-base-selection.n-base-selection--disabled .n-base-selection-label{background-color:#f5f6fa;color:#959598}._addTeacher_sn7fs_106 .n-form-item-blank{padding-right:30Px}._addTeacher_sn7fs_106 .genderBtn{min-width:84Px;min-height:37Px;border-radius:8Px}._addTeacher_sn7fs_106 .n-form-item-label{color:#777;padding:0;font-size:18Px}._addTeacher_sn7fs_106 .n-form-item-label__text{height:2.60417vw;display:flex;align-items:center;justify-content:center}._addTeacher_sn7fs_106 .nalert{padding:0 30Px}._addTeacher_sn7fs_106 .nalert .n-alert{background:#FFE8E8;text-align:center}._addTeacher_sn7fs_106 .nalert .n-alert-body .n-alert-body__content{color:#ea4132}._addTeacher_sn7fs_106 .actionBtn{width:156Px;height:47Px;font-size:18Px}._btnList_sn7fs_178{width:100%}._btnList_sn7fs_178 ._btn_sn7fs_178{width:7.5vw;border-radius:.41667vw;font-size:.9375vw;font-weight:600!important;margin-right:1.25vw}\n",document.head.appendChild(We);const Qe=l("base-menu-mask","\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n padding: 14px;\n overflow: hidden;\n",[s()]),Xe=d({name:"BaseMenuMask",props:{clsPrefix:{type:String,required:!0}},setup(e){c("-base-menu-mask",Qe,u(e,"clsPrefix"));const t=h(null);let n=null;const o=h(!1);f((()=>{null!==n&&window.clearTimeout(n)}));const r={showOnce(e,r=1500){n&&window.clearTimeout(n),o.value=!0,t.value=e,n=window.setTimeout((()=>{o.value=!1,t.value=null}),r)}};return Object.assign({message:t,show:o},r)},render(){return p(g,{name:"fade-in-transition"},{default:()=>this.show?p("div",{class:`${this.clsPrefix}-base-menu-mask`},this.message):null})}}),Ye=m({name:"Cascader",common:v,peers:{InternalSelectMenu:b,InternalSelection:y,Scrollbar:w,Checkbox:C,Empty:x},self:e=>{const{borderRadius:t,boxShadow2:n,popoverColor:o,textColor2:r,textColor3:a,primaryColor:i,textColorDisabled:l,dividerColor:s,hoverColor:d,fontSizeMedium:c,heightMedium:u}=e;return{menuBorderRadius:t,menuColor:o,menuBoxShadow:n,menuDividerColor:s,menuHeight:"calc(var(--n-option-height) * 6.6)",optionArrowColor:a,optionHeight:u,optionFontSize:c,optionColorHover:d,optionTextColor:r,optionTextColorActive:i,optionTextColorDisabled:l,optionCheckMarkColor:i,loadingColor:i,columnWidth:"180px"}}});function Je(e){return e?e.map((e=>e.rawNode)):null}function Ze(e,t,n){const o=[];for(;e;)o.push(e.rawNode[n]),e=e.parent;return o.reverse().join(t)}const et=k("n-cascader"),tt=d({name:"NCascaderOption",props:{tmNode:{type:Object,required:!0}},setup(e){const{expandTriggerRef:t,remoteRef:n,multipleRef:o,mergedValueRef:r,checkedKeysRef:a,indeterminateKeysRef:i,hoverKeyPathRef:l,keyboardKeyRef:s,loadingKeySetRef:d,cascadeRef:c,mergedCheckStrategyRef:u,onLoadRef:h,mergedClsPrefixRef:f,mergedThemeRef:p,labelFieldRef:g,showCheckboxRef:m,updateHoverKey:v,updateKeyboardKey:b,addLoadingKey:y,deleteLoadingKey:w,closeMenu:C,doCheck:x,doUncheck:k,renderLabelRef:A}=_(et),S=T((()=>e.tmNode.key)),R=T((()=>{const{value:e}=t,{value:o}=n;return!o&&"hover"===e})),B=T((()=>{if(R.value)return $})),M=T((()=>{if(R.value)return q})),D=P((()=>{const{value:e}=o;return e?a.value.includes(S.value):r.value===S.value})),L=P((()=>!!o.value&&i.value.includes(S.value))),N=P((()=>l.value.includes(S.value))),E=P((()=>{const{value:e}=s;return null!==e&&e===S.value})),O=P((()=>!!n.value&&d.value.has(S.value))),F=T((()=>e.tmNode.isLeaf)),j=T((()=>e.tmNode.disabled)),z=T((()=>e.tmNode.rawNode[g.value])),U=T((()=>e.tmNode.shallowLoaded));function $(){if(!R.value||j.value)return;const{value:e}=S;v(e),b(e)}function q(){R.value&&$()}function K(){const{value:e}=o,{value:t}=S;e?L.value||D.value?k(t):x(t):(x(t),C(!0))}return{checkStrategy:u,multiple:o,cascade:c,checked:D,indeterminate:L,hoverPending:N,keyboardPending:E,isLoading:O,showCheckbox:m,isLeaf:F,disabled:j,label:z,mergedClsPrefix:f,mergedTheme:p,handleClick:function(t){if(j.value)return;const{value:o}=n,{value:r}=d,{value:a}=h,{value:i}=S,{value:l}=F,{value:s}=U;I(t,"checkbox")||(o&&!s&&!r.has(i)&&a&&(y(i),a(e.tmNode.rawNode).then((()=>{w(i)})).catch((()=>{w(i)}))),v(i),b(i)),l&&K()},handleCheckboxUpdateValue:function(){const{value:e}=F;e||K()},mergedHandleMouseEnter:B,mergedHandleMouseMove:M,renderLabel:A}},render(){const{mergedClsPrefix:e,renderLabel:t}=this;return p("div",{class:[`${e}-cascader-option`,{[`${e}-cascader-option--pending`]:this.keyboardPending||this.hoverPending,[`${e}-cascader-option--disabled`]:this.disabled,[`${e}-cascader-option--show-prefix`]:this.showCheckbox}],onMouseenter:this.mergedHandleMouseEnter,onMousemove:this.mergedHandleMouseMove,onClick:this.handleClick},this.showCheckbox?p("div",{class:`${e}-cascader-option__prefix`},p(M,{focusable:!1,"data-checkbox":!0,disabled:this.disabled,checked:this.checked,indeterminate:this.indeterminate,theme:this.mergedTheme.peers.Checkbox,themeOverrides:this.mergedTheme.peerOverrides.Checkbox,onUpdateChecked:this.handleCheckboxUpdateValue})):null,p("span",{class:`${e}-cascader-option__label`},t?t(this.tmNode.rawNode,this.checked):this.label),p("div",{class:`${e}-cascader-option__suffix`},p("div",{class:`${e}-cascader-option-icon-placeholder`},this.isLeaf?"child"!==this.checkStrategy||this.multiple&&this.cascade?null:p(g,{name:"fade-in-scale-up-transition"},{default:()=>this.checked?p(S,{clsPrefix:e,class:`${e}-cascader-option-icon ${e}-cascader-option-icon--checkmark`},{default:()=>p(B,null)}):null}):p(A,{clsPrefix:e,scale:.85,strokeWidth:24,show:this.isLoading,class:`${e}-cascader-option-icon`},{default:()=>p(S,{clsPrefix:e,key:"arrow",class:`${e}-cascader-option-icon ${e}-cascader-option-icon--arrow`},{default:()=>p(R,null)})}))))}}),nt=d({name:"CascaderSubmenu",props:{depth:{type:Number,required:!0},tmNodes:{type:Array,required:!0}},setup(){const{virtualScrollRef:e,mergedClsPrefixRef:t,mergedThemeRef:n,optionHeightRef:o}=_(et),r=h(null),a=h(null),i={scroll(t,n){var o,i;e.value?null===(o=a.value)||void 0===o||o.scrollTo({index:t}):null===(i=r.value)||void 0===i||i.scrollTo({index:t,elSize:n})}};return Object.assign({mergedClsPrefix:t,mergedTheme:n,scrollbarInstRef:r,vlInstRef:a,virtualScroll:e,itemSize:T((()=>D(o.value))),handleVlScroll:()=>{var e;null===(e=r.value)||void 0===e||e.sync()},getVlContainer:()=>{var e;return null===(e=a.value)||void 0===e?void 0:e.listElRef},getVlContent:()=>{var e;return null===(e=a.value)||void 0===e?void 0:e.itemsElRef}},i)},render(){const{mergedClsPrefix:e,mergedTheme:t,virtualScroll:n}=this;return p("div",{class:[n&&`${e}-cascader-submenu--virtual`,`${e}-cascader-submenu`]},p(L,{ref:"scrollbarInstRef",theme:t.peers.Scrollbar,themeOverrides:t.peerOverrides.Scrollbar,container:n?this.getVlContainer:void 0,content:n?this.getVlContent:void 0},{default:()=>n?p(N,{items:this.tmNodes,itemSize:this.itemSize,onScroll:this.handleVlScroll,showScrollbar:!1,ref:"vlInstRef"},{default:({item:e})=>p(tt,{key:e.key,tmNode:e})}):this.tmNodes.map((e=>p(tt,{key:e.key,tmNode:e})))}))}}),ot=d({name:"NCascaderMenu",props:{value:[String,Number,Array],placement:{type:String,default:"bottom-start"},show:Boolean,menuModel:{type:Array,required:!0},loading:Boolean,onFocus:{type:Function,required:!0},onBlur:{type:Function,required:!0},onKeydown:{type:Function,required:!0},onMousedown:{type:Function,required:!0},onTabout:{type:Function,required:!0}},setup(e){const{localeRef:t,isMountedRef:n,mergedClsPrefixRef:o,syncCascaderMenuPosition:r,handleCascaderMenuClickOutside:a,mergedThemeRef:i}=_(et),l=[],s=h(null),d=h(null);E(d,(function(){r()}));const c={scroll(e,t,n){const o=l[e];o&&o.scroll(t,n)},showErrorMessage:function(e){var n;const{value:{loadingRequiredMessage:o}}=t;null===(n=s.value)||void 0===n||n.showOnce(o(e))}};return Object.assign({isMounted:n,mergedClsPrefix:o,selfElRef:d,submenuInstRefs:l,maskInstRef:s,mergedTheme:i,handleFocusin:function(t){const{value:n}=d;n&&(n.contains(t.relatedTarget)||e.onFocus(t))},handleFocusout:function(t){const{value:n}=d;n&&(n.contains(t.relatedTarget)||e.onBlur(t))},handleClickOutside:function(e){a(e)}},c)},render(){const{submenuInstRefs:e,mergedClsPrefix:t,mergedTheme:n}=this;return p(g,{name:"fade-in-scale-up-transition",appear:this.isMounted},{default:()=>this.show?O(p("div",{tabindex:"0",ref:"selfElRef",class:`${t}-cascader-menu`,onMousedown:this.onMousedown,onFocusin:this.handleFocusin,onFocusout:this.handleFocusout,onKeydown:this.onKeydown},this.menuModel[0].length?p("div",{class:`${t}-cascader-submenu-wrapper`},this.menuModel.map(((t,n)=>p(nt,{ref:t=>{t&&(e[n]=t)},key:n,tmNodes:t,depth:n+1}))),p(Xe,{clsPrefix:t,ref:"maskInstRef"})):p("div",{class:`${t}-cascader-menu__empty`},j(this.$slots.empty,(()=>[p(z,{theme:n.peers.Empty,themeOverrides:n.peerOverrides.Empty})]))),U(this.$slots.action,(e=>e&&p("div",{class:`${t}-cascader-menu-action`,"data-action":!0},e))),p($,{onFocus:this.onTabout})),[[F,this.handleClickOutside,void 0,{capture:!0}]]):null})}}),rt=d({name:"NCascaderSelectMenu",props:{value:{type:[String,Number,Array],default:null},show:Boolean,pattern:{type:String,default:""},multiple:Boolean,tmNodes:{type:Array,default:()=>[]},filter:Function,labelField:{type:String,required:!0},separator:{type:String,required:!0}},setup(e){const{isMountedRef:t,mergedValueRef:n,mergedClsPrefixRef:o,mergedThemeRef:r,mergedCheckStrategyRef:a,slots:i,syncSelectMenuPosition:l,closeMenu:s,handleSelectMenuClickOutside:d,doUncheck:c,doCheck:u,clearPattern:f}=_(et),p=h(null),g=T((()=>function(e,t,n,o){const r=[],a=[];return function e(i){for(const l of i){if(l.disabled)continue;const{rawNode:i}=l;a.push(i),!l.isLeaf&&t||r.push({label:Ze(l,o,n),value:l.key,rawNode:l.rawNode,path:Array.from(a)}),!l.isLeaf&&l.children&&e(l.children),a.pop()}}(e),r}(e.tmNodes,"child"===a.value,e.labelField,e.separator))),m=T((()=>{const{filter:t}=e;if(t)return t;const{labelField:n}=e;return(e,t,o)=>o.some((t=>t[n]&&~t[n].indexOf(e)))})),v=T((()=>{const{pattern:t}=e,{value:n}=m;return(t?g.value.filter((e=>n(t,e.rawNode,e.path))):g.value).map((e=>({value:e.value,label:e.label})))})),b=T((()=>q(v.value,K("value","children"))));function y(t){if(e.multiple){const{value:e}=n;Array.isArray(e)?e.includes(t.key)?c(t.key):u(t.key):null===e&&u(t.key),f()}else u(t.key),s(!0)}const w={prev:function(){var e;null===(e=p.value)||void 0===e||e.prev()},next:function(){var e;null===(e=p.value)||void 0===e||e.next()},enter:function(){var e;if(p){const t=null===(e=p.value)||void 0===e?void 0:e.getPendingTmNode();return t&&y(t),!0}return!1}};return Object.assign({isMounted:t,mergedTheme:r,mergedClsPrefix:o,menuInstRef:p,selectTreeMate:b,handleResize:function(){l()},handleToggle:function(e){y(e)},handleClickOutside:function(e){d(e)},cascaderSlots:i},w)},render(){const{mergedClsPrefix:e,isMounted:t,mergedTheme:n,cascaderSlots:o}=this;return p(g,{name:"fade-in-scale-up-transition",appear:t},{default:()=>this.show?O(p(H,{ref:"menuInstRef",onResize:this.handleResize,clsPrefix:e,class:`${e}-cascader-menu`,autoPending:!0,themeOverrides:n.peerOverrides.InternalSelectMenu,theme:n.peers.InternalSelectMenu,treeMate:this.selectTreeMate,multiple:this.multiple,value:this.value,onToggle:this.handleToggle},{empty:()=>j(o["not-found"],(()=>[]))}),[[F,this.handleClickOutside,void 0,{capture:!0}]]):null})}}),at=G([l("cascader-menu","\n outline: none;\n position: relative;\n margin: 4px 0;\n display: flex;\n flex-flow: column nowrap;\n border-radius: var(--n-menu-border-radius);\n overflow: hidden;\n box-shadow: var(--n-menu-box-shadow);\n color: var(--n-option-text-color);\n background-color: var(--n-menu-color);\n ",[V({transformOrigin:"inherit",duration:"0.2s"}),W("empty","\n display: flex;\n padding: 12px 32px;\n flex: 1;\n justify-content: center;\n "),l("scrollbar",{width:"100%"}),l("base-menu-mask",{backgroundColor:"var(--n-menu-mask-color)"}),l("base-loading",{color:"var(--n-loading-color)"}),l("cascader-submenu-wrapper","\n position: relative;\n display: flex;\n flex-wrap: nowrap;\n "),l("cascader-submenu","\n height: var(--n-menu-height);\n min-width: var(--n-column-width);\n position: relative;\n ",[Q("virtual","\n width: var(--n-column-width);\n "),l("scrollbar-content",{position:"relative"}),G("&:first-child","\n border-top-left-radius: var(--n-menu-border-radius);\n border-bottom-left-radius: var(--n-menu-border-radius);\n "),G("&:last-child","\n border-top-right-radius: var(--n-menu-border-radius);\n border-bottom-right-radius: var(--n-menu-border-radius);\n "),G("&:not(:first-child)","\n border-left: 1px solid var(--n-menu-divider-color);\n ")]),l("cascader-menu-action","\n box-sizing: border-box;\n padding: 8px;\n border-top: 1px solid var(--n-menu-divider-color);\n "),l("cascader-option","\n height: var(--n-option-height);\n line-height: var(--n-option-height);\n font-size: var(--n-option-font-size);\n padding: 0 0 0 18px;\n box-sizing: border-box;\n min-width: 182px;\n background-color: #0000;\n display: flex;\n align-items: center;\n white-space: nowrap;\n position: relative;\n cursor: pointer;\n transition:\n background-color .2s var(--n-bezier),\n color 0.2s var(--n-bezier);\n ",[Q("show-prefix",{paddingLeft:0}),W("label","\n flex: 1 0 0;\n overflow: hidden;\n text-overflow: ellipsis;\n "),W("prefix",{width:"32px",display:"flex",alignItems:"center",justifyContent:"center"}),W("suffix",{width:"32px",display:"flex",alignItems:"center",justifyContent:"center"}),l("cascader-option-icon-placeholder",{lineHeight:0,position:"relative",width:"16px",height:"16px",fontSize:"16px"},[l("cascader-option-icon",[Q("checkmark",{color:"var(--n-option-check-mark-color)"},[V({originalTransition:"background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)"})]),Q("arrow",{color:"var(--n-option-arrow-color)"})])]),Q("selected",{color:"var(--n-option-text-color-active)"}),Q("active",{color:"var(--n-option-text-color-active)",backgroundColor:"var(--n-option-color-hover)"}),Q("pending",{backgroundColor:"var(--n-option-color-hover)"}),G("&:hover",{backgroundColor:"var(--n-option-color-hover)"}),Q("disabled","\n color: var(--n-option-text-color-disabled);\n background-color: #0000;\n cursor: not-allowed;\n ",[l("cascader-option-icon",[Q("arrow",{color:"var(--n-option-text-color-disabled)"})])])])]),l("cascader","\n z-index: auto;\n position: relative;\n width: 100%;\n ")]),it=Object.assign(Object.assign({},Y.props),{allowCheckingNotLoaded:Boolean,to:te.propTo,bordered:{type:Boolean,default:void 0},options:{type:Array,default:()=>[]},value:[String,Number,Array],defaultValue:{type:[String,Number,Array],default:null},placeholder:String,multiple:Boolean,size:String,filterable:Boolean,disabled:{type:Boolean,default:void 0},disabledField:{type:String,default:"disabled"},expandTrigger:{type:String,default:"click"},clearable:Boolean,clearFilterAfterSelect:{type:Boolean,default:!0},remote:Boolean,onLoad:Function,separator:{type:String,default:" / "},filter:Function,placement:{type:String,default:"bottom-start"},cascade:{type:Boolean,default:!0},leafOnly:Boolean,showPath:{type:Boolean,default:!0},show:{type:Boolean,default:void 0},maxTagCount:[String,Number],menuProps:Object,filterMenuProps:Object,virtualScroll:{type:Boolean,default:!0},checkStrategy:{type:String,default:"all"},valueField:{type:String,default:"value"},labelField:{type:String,default:"label"},childrenField:{type:String,default:"children"},renderLabel:Function,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],"onUpdate:show":[Function,Array],onUpdateShow:[Function,Array],onBlur:Function,onFocus:Function,onChange:[Function,Array]}),lt=d({name:"Cascader",props:it,setup(e,{slots:t}){const{mergedBorderedRef:n,mergedClsPrefixRef:o,namespaceRef:r,inlineThemeDisabled:a}=X(e),i=Y("Cascader","-cascader",at,Ye,e,o),{localeRef:l}=J("Cascader"),s=h(e.defaultValue),d=T((()=>e.value)),c=Z(d,s),f=T((()=>e.leafOnly?"child":e.checkStrategy)),p=h(""),g=ee(e),{mergedSizeRef:m,mergedDisabledRef:v,mergedStatusRef:b}=g,y=h(null),w=h(null),C=h(null),x=h(null),k=h(null),_=h(new Set),P=h(null),A=h(null),S=te(e),R=h(!1),B=e=>{_.value.add(e)},M=e=>{_.value.delete(e)},L=T((()=>{const{valueField:t,childrenField:n,disabledField:o}=e;return q(e.options,{getDisabled:e=>e[o],getKey:e=>e[t],getChildren:e=>e[n]})})),N=T((()=>{const{cascade:t,multiple:n}=e;return n&&Array.isArray(c.value)?L.value.getCheckedKeys(c.value,{cascade:t,allowNotLoaded:e.allowCheckingNotLoaded}):{checkedKeys:[],indeterminateKeys:[]}})),E=T((()=>N.value.checkedKeys)),O=T((()=>N.value.indeterminateKeys)),F=T((()=>{const{treeNodePath:e,treeNode:t}=L.value.getPath(k.value);let n;return null===t?n=[L.value.treeNodes]:(n=e.map((e=>e.siblings)),t.isLeaf||_.value.has(t.key)||!t.children||n.push(t.children)),n})),j=T((()=>{const{keyPath:e}=L.value.getPath(k.value);return e})),z=T((()=>i.value.self.optionHeight));function U(t){const{onUpdateShow:n,"onUpdate:show":o}=e;n&&ge(n,t),o&&ge(o,t),de.value=t}function $(t,n,o){const{onUpdateValue:r,"onUpdate:value":a,onChange:i}=e,{nTriggerFormInput:l,nTriggerFormChange:d}=g;r&&ge(r,t,n,o),a&&ge(a,t,n,o),i&&ge(i,t,n,o),s.value=t,l(),d()}function K(e){x.value=e}function H(e){k.value=e}function G(e){const{value:{getNode:t}}=L;return e.map((e=>{var n;return(null===(n=t(e))||void 0===n?void 0:n.rawNode)||null}))}function V(t){var n;const{cascade:o,multiple:r,filterable:a}=e,{value:{check:i,getNode:l,getPath:s}}=L;if(r)try{const{checkedKeys:n}=i(t,N.value.checkedKeys,{cascade:o,checkStrategy:f.value,allowNotLoaded:e.allowCheckingNotLoaded});$(n,G(n),n.map((e=>{var t;return Je(null===(t=s(e))||void 0===t?void 0:t.treeNodePath)}))),a&&Ce(),x.value=t,k.value=t}catch(d){if(!(d instanceof he))throw d;if(y.value){const n=l(t);null!==n&&y.value.showErrorMessage(n.rawNode[e.labelField])}}else if("child"===f.value){const e=l(t);if(!(null==e?void 0:e.isLeaf))return!1;$(t,e.rawNode,Je(s(t).treeNodePath))}else{const e=l(t);$(t,(null==e?void 0:e.rawNode)||null,Je(null===(n=s(t))||void 0===n?void 0:n.treeNodePath))}return!0}function W(t){const{cascade:n,multiple:o}=e;if(o){const{value:{uncheck:o,getNode:r,getPath:a}}=L,{checkedKeys:i}=o(t,N.value.checkedKeys,{cascade:n,checkStrategy:f.value,allowNotLoaded:e.allowCheckingNotLoaded});$(i,i.map((e=>{var t;return(null===(t=r(e))||void 0===t?void 0:t.rawNode)||null})),i.map((e=>{var t;return Je(null===(t=a(e))||void 0===t?void 0:t.treeNodePath)}))),x.value=t,k.value=t}}ne(e.options)&&oe(e.options,((e,t)=>{e!==t&&(k.value=null,x.value=null)}));const Q=T((()=>{if(e.multiple){const{showPath:t,separator:n,labelField:o,cascade:r}=e,{getCheckedKeys:a,getNode:i}=L.value;return a(E.value,{cascade:r,checkStrategy:f.value,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys.map((e=>{const r=i(e);return null===r?{label:String(e),value:e}:{label:t?Ze(r,n,o):r.rawNode[o],value:r.key}}))}return[]})),se=T((()=>{const{multiple:t,showPath:n,separator:o,labelField:r}=e,{value:a}=c;if(t||Array.isArray(a))return null;{const{getNode:e}=L.value;if(null===a)return null;const t=e(a);return null===t?{label:String(a),value:a}:{label:n?Ze(t,o,r):t.rawNode[r],value:t.key}}})),de=h(!1),ce=u(e,"show"),ue=Z(ce,de),ve=T((()=>{const{placeholder:t}=e;return void 0!==t?t:l.value.placeholder})),be=T((()=>!(!e.filterable||!p.value)));function ye(t){const{onBlur:n}=e,{nTriggerFormBlur:o}=g;n&&ge(n,t),o()}function we(t){const{onFocus:n}=e,{nTriggerFormFocus:o}=g;n&&ge(n,t),o()}function Ce(){var e;null===(e=C.value)||void 0===e||e.focusInput()}function xe(){v.value||(p.value="",U(!0),e.filterable&&Ce())}function ke(e=!1){var t;e&&(null===(t=C.value)||void 0===t||t.focus()),U(!1),p.value=""}function _e(e){var t;be.value||ue.value&&((null===(t=C.value)||void 0===t?void 0:t.$el.contains(fe(e)))||ke())}function Te(){e.clearFilterAfterSelect&&(p.value="")}function Pe(t){var n,o,r;const{value:a}=x,{value:i}=L;switch(t){case"prev":if(null!==a){const e=i.getPrev(a,{loop:!0});null!==e&&(K(e.key),null===(n=y.value)||void 0===n||n.scroll(e.level,e.index,D(z.value)))}break;case"next":if(null===a){const e=i.getFirstAvailableNode();null!==e&&(K(e.key),null===(o=y.value)||void 0===o||o.scroll(e.level,e.index,D(z.value)))}else{const e=i.getNext(a,{loop:!0});null!==e&&(K(e.key),null===(r=y.value)||void 0===r||r.scroll(e.level,e.index,D(z.value)))}break;case"child":if(null!==a){const t=i.getNode(a);if(null!==t)if(t.shallowLoaded){const e=i.getChild(a);null!==e&&(H(a),K(e.key))}else{const{value:n}=_;if(!n.has(a)){B(a),H(a);const{onLoad:n}=e;n&&n(t.rawNode).then((()=>{M(a)})).catch((()=>{M(a)}))}}}break;case"parent":if(null!==a){const e=i.getParent(a);if(null!==e){K(e.key);const t=e.getParent();H(null===t?null:t.key)}}}}function Ae(t){var n,o;switch(t.key){case" ":case"ArrowDown":case"ArrowUp":if(e.filterable&&ue.value)break;t.preventDefault()}if(!I(t,"action"))switch(t.key){case" ":if(e.filterable)return;case"Enter":if(ue.value){const{value:t}=be,{value:n}=x;if(t)w.value&&w.value.enter()&&Te();else if(null!==n)if(E.value.includes(n)||O.value.includes(n))W(n);else{const t=V(n);!e.multiple&&t&&ke(!0)}}else xe();break;case"ArrowUp":t.preventDefault(),ue.value&&(be.value?null===(n=w.value)||void 0===n||n.prev():Pe("prev"));break;case"ArrowDown":t.preventDefault(),ue.value?be.value?null===(o=w.value)||void 0===o||o.next():Pe("next"):xe();break;case"ArrowLeft":t.preventDefault(),ue.value&&!be.value&&Pe("parent");break;case"ArrowRight":t.preventDefault(),ue.value&&!be.value&&Pe("child");break;case"Escape":ue.value&&(pe(t),ke(!0))}}function Se(){var e;null===(e=P.value)||void 0===e||e.syncPosition()}function Re(){var e;null===(e=A.value)||void 0===e||e.syncPosition()}oe(ue,(t=>{if(!t)return;if(e.multiple)return;const{value:n}=c;Array.isArray(n)||null===n?(x.value=null,k.value=null):(x.value=n,k.value=n,me((()=>{var e;if(!ue.value)return;const{value:t}=k;if(null!==c.value){const n=L.value.getNode(t);n&&(null===(e=y.value)||void 0===e||e.scroll(n.level,n.index,D(z.value)))}})))}),{immediate:!0});const Be=T((()=>!(!e.multiple||!e.cascade)||"child"!==f.value));re(et,{slots:t,mergedClsPrefixRef:o,mergedThemeRef:i,mergedValueRef:c,checkedKeysRef:E,indeterminateKeysRef:O,hoverKeyPathRef:j,mergedCheckStrategyRef:f,showCheckboxRef:Be,cascadeRef:u(e,"cascade"),multipleRef:u(e,"multiple"),keyboardKeyRef:x,hoverKeyRef:k,remoteRef:u(e,"remote"),loadingKeySetRef:_,expandTriggerRef:u(e,"expandTrigger"),isMountedRef:ae(),onLoadRef:u(e,"onLoad"),virtualScrollRef:u(e,"virtualScroll"),optionHeightRef:z,localeRef:l,labelFieldRef:u(e,"labelField"),renderLabelRef:u(e,"renderLabel"),syncCascaderMenuPosition:Re,syncSelectMenuPosition:Se,updateKeyboardKey:K,updateHoverKey:H,addLoadingKey:B,deleteLoadingKey:M,doCheck:V,doUncheck:W,closeMenu:ke,handleSelectMenuClickOutside:function(e){be.value&&_e(e)},handleCascaderMenuClickOutside:_e,clearPattern:Te});const Me={focus:()=>{var e;null===(e=C.value)||void 0===e||e.focus()},blur:()=>{var e;null===(e=C.value)||void 0===e||e.blur()},getCheckedData:()=>{if(Be.value){const e=E.value;return{keys:e,options:G(e)}}return{keys:[],options:[]}},getIndeterminateData:()=>{if(Be.value){const e=O.value;return{keys:e,options:G(e)}}return{keys:[],options:[]}}},Ie=T((()=>{const{self:{optionArrowColor:e,optionTextColor:t,optionTextColorActive:n,optionTextColorDisabled:o,optionCheckMarkColor:r,menuColor:a,menuBoxShadow:l,menuDividerColor:s,menuBorderRadius:d,menuHeight:c,optionColorHover:u,optionHeight:h,optionFontSize:f,loadingColor:p,columnWidth:g},common:{cubicBezierEaseInOut:m}}=i.value;return{"--n-bezier":m,"--n-menu-border-radius":d,"--n-menu-box-shadow":l,"--n-menu-height":c,"--n-column-width":g,"--n-menu-color":a,"--n-menu-divider-color":s,"--n-option-height":h,"--n-option-font-size":f,"--n-option-text-color":t,"--n-option-text-color-disabled":o,"--n-option-text-color-active":n,"--n-option-color-hover":u,"--n-option-check-mark-color":r,"--n-option-arrow-color":e,"--n-menu-mask-color":ie(a,{alpha:.75}),"--n-loading-color":p}})),De=a?le("cascader",void 0,Ie,e):void 0;return Object.assign(Object.assign({},Me),{handleTriggerResize:function(){ue.value&&(be.value?Se():Re())},mergedStatus:b,selectMenuFollowerRef:P,cascaderMenuFollowerRef:A,triggerInstRef:C,selectMenuInstRef:w,cascaderMenuInstRef:y,mergedBordered:n,mergedClsPrefix:o,namespace:r,mergedValue:c,mergedShow:ue,showSelectMenu:be,pattern:p,treeMate:L,mergedSize:m,mergedDisabled:v,localizedPlaceholder:ve,selectedOption:se,selectedOptions:Q,adjustedTo:S,menuModel:F,handleMenuTabout:function(){ke(!0)},handleMenuFocus:function(e){var t;(null===(t=C.value)||void 0===t?void 0:t.$el.contains(e.relatedTarget))||(R.value=!0,we(e))},handleMenuBlur:function(e){var t;(null===(t=C.value)||void 0===t?void 0:t.$el.contains(e.relatedTarget))||(R.value=!1,ye(e))},handleMenuKeydown:function(e){Ae(e)},handleMenuMousedown:function(t){I(t,"action")||e.multiple&&e.filter&&(t.preventDefault(),Ce())},handleTriggerFocus:function(e){var t;(null===(t=y.value)||void 0===t?void 0:t.$el.contains(e.relatedTarget))||(R.value=!0,we(e))},handleTriggerBlur:function(e){var t;(null===(t=y.value)||void 0===t?void 0:t.$el.contains(e.relatedTarget))||(R.value=!1,ye(e),ke())},handleTriggerClick:function(){e.filterable?xe():ue.value?ke(!0):xe()},handleClear:function(t){t.stopPropagation(),e.multiple?$([],[],[]):$(null,null,null)},handleDeleteOption:function(t){const{multiple:n}=e,{value:o}=c;n&&Array.isArray(o)&&void 0!==t.value?W(t.value):$(null,null,null)},handlePatternInput:function(e){p.value=e.target.value},handleKeydown:Ae,focused:R,optionHeight:z,mergedTheme:i,cssVars:a?void 0:Ie,themeClass:null==De?void 0:De.themeClass,onRender:null==De?void 0:De.onRender})},render(){const{mergedClsPrefix:e}=this;return p("div",{class:`${e}-cascader`},p(se,null,{default:()=>[p(de,null,{default:()=>p(ce,{onResize:this.handleTriggerResize,ref:"triggerInstRef",status:this.mergedStatus,clsPrefix:e,maxTagCount:this.maxTagCount,bordered:this.mergedBordered,size:this.mergedSize,theme:this.mergedTheme.peers.InternalSelection,themeOverrides:this.mergedTheme.peerOverrides.InternalSelection,active:this.mergedShow,pattern:this.pattern,placeholder:this.localizedPlaceholder,selectedOption:this.selectedOption,selectedOptions:this.selectedOptions,multiple:this.multiple,filterable:this.filterable,clearable:this.clearable,disabled:this.mergedDisabled,focused:this.focused,onFocus:this.handleTriggerFocus,onBlur:this.handleTriggerBlur,onClick:this.handleTriggerClick,onClear:this.handleClear,onDeleteOption:this.handleDeleteOption,onPatternInput:this.handlePatternInput,onKeydown:this.handleKeydown},{arrow:()=>{var e,t;return null===(t=(e=this.$slots).arrow)||void 0===t?void 0:t.call(e)}})}),p(ue,{key:"cascaderMenu",ref:"cascaderMenuFollowerRef",show:this.mergedShow&&!this.showSelectMenu,containerClass:this.namespace,placement:this.placement,width:this.options.length?void 0:"target",teleportDisabled:this.adjustedTo===te.tdkey,to:this.adjustedTo},{default:()=>{var e;null===(e=this.onRender)||void 0===e||e.call(this);const{menuProps:t}=this;return p(ot,Object.assign({},t,{ref:"cascaderMenuInstRef",class:[this.themeClass,null==t?void 0:t.class],value:this.mergedValue,show:this.mergedShow&&!this.showSelectMenu,menuModel:this.menuModel,style:[this.cssVars,null==t?void 0:t.style],onFocus:this.handleMenuFocus,onBlur:this.handleMenuBlur,onKeydown:this.handleMenuKeydown,onMousedown:this.handleMenuMousedown,onTabout:this.handleMenuTabout}),{action:()=>{var e,t;return null===(t=(e=this.$slots).action)||void 0===t?void 0:t.call(e)},empty:()=>{var e,t;return null===(t=(e=this.$slots).empty)||void 0===t?void 0:t.call(e)}})}}),p(ue,{key:"selectMenu",ref:"selectMenuFollowerRef",show:this.mergedShow&&this.showSelectMenu,containerClass:this.namespace,width:"target",placement:this.placement,to:this.adjustedTo,teleportDisabled:this.adjustedTo===te.tdkey},{default:()=>{var e;null===(e=this.onRender)||void 0===e||e.call(this);const{filterMenuProps:t}=this;return p(rt,Object.assign({},t,{ref:"selectMenuInstRef",class:[this.themeClass,null==t?void 0:t.class],value:this.mergedValue,show:this.mergedShow&&this.showSelectMenu,pattern:this.pattern,multiple:this.multiple,tmNodes:this.treeMate.treeNodes,filter:this.filter,labelField:this.labelField,separator:this.separator,style:[this.cssVars,null==t?void 0:t.style]}))}})]}))}}),st=""+new URL("headerD-220e6507.png",t.meta.url).href,dt=()=>ve.get("/edu-app/open/sysArea/queryAllProvince"),ct=d({name:"setting-personInfo",setup(){const e=be(),t=ye(),l=we({sexs:[{label:"男",value:1,class:"option"},{label:"女",value:0,class:"option"}],areaList:[]}),s=h(),d=we({provinceCode:"",cityCode:"",regionCode:"",nickname:t.info.nickname,phone:t.info.phone,gender:t.info.gender,schoolId:t.info.schoolInfos?.[0]?.id,tenantId:t.info.schoolInfos?.[0]?.tenantId,id:t.info.id,avatar:t.info.avatar}),c=we({disabled:!0,openChangePwd:!1,uploadShow:!0});return Ce((()=>{(async()=>{const e=await dt();200===e?.code&&(l.areaList=e.data)})()})),()=>xe("div",{class:n.infoWrap},[xe("div",{class:n.teacherInfoWrap},[xe("div",{class:n.teacherHeadWrap},[xe(ke,{previewDisabled:!0,class:n.headerD,src:st},null),xe(ke,{previewDisabled:!0,class:n.defultHeade,src:d.avatar||r},null),xe("div",{style:{display:c.disabled?"none":""},class:[n.defultHeade,n.changeHead]},[_e("修改头像"),c.uploadShow&&xe(Ve,{class:[n.uploadFile],cropper:!0,"onUpdate:fileList":e=>{d.avatar=e,c.uploadShow=!1,setTimeout((()=>{c.uploadShow=!0}),100)}},null)])]),xe("div",{class:n.headerInfo},[xe("p",{class:n.headerTitle},[t.info.nickname,xe(ke,{previewDisabled:!0,class:n.sexIcon,src:t.info.gender?a:i},null)]),xe("p",{class:n.headerSubTitle},[t.info.schoolInfos?.[0]?.name,_e(" | 音乐老师")])])]),xe("div",{class:n.setInfo},[xe(Te,{ref:s,model:d,disabled:c.disabled},{default:()=>[xe(Pe,{cols:3,"x-gap":"100"},{default:()=>[xe(Ae,null,{default:()=>[xe(Se,{label:"姓名",path:"nickname",rule:{required:!0,message:"请填写老师姓名",trigger:"blur"}},{default:()=>[xe(Re,{bordered:!c.disabled,placeholder:"请填写老师姓名",value:d.nickname,"onUpdate:value":e=>d.nickname=e},null)]})]}),xe(Ae,null,{default:()=>[xe(Se,{label:"手机号",path:"phone",rule:[{required:!0,message:"请填写老师手机号",trigger:"blur"},{pattern:/^1[3456789]\d{9}$/,message:"手机号格式不正确",trigger:"blur"}]},{default:()=>[xe(Re,{bordered:!c.disabled,placeholder:"请填写老师手机号",value:d.phone,"onUpdate:value":e=>d.phone=e},null)]})]}),xe(Ae,null,{default:()=>[xe(Se,{label:"性别",path:"sex"},{default:()=>[xe(Be,{bordered:!c.disabled,class:n.select,showArrow:!c.disabled,placeholder:"请选择性别",options:l.sexs,value:d.gender,"onUpdate:value":e=>d.gender=e},null)]})]})]}),xe(Se,{label:"城区",style:{maxWidth:"30%"}},{default:()=>[xe(lt,{bordered:!c.disabled,options:l.areaList,labelField:"name",valueField:"code",childrenField:"areas",checkStrategy:"child",expandTrigger:"hover",defaultValue:t.info.regionCode||t.info.cityCode,"onUpdate:value":(e,t,n)=>{d.provinceCode=n[0]?.code,d.cityCode=n[1]?.code,d.regionCode=n[2]?.code}},null)]})]})]),c.disabled?xe(Me,{class:n.btnList,align:"center",justify:"end"},{default:()=>[xe(Ie,{class:n.btn,color:"#198cfe",onClick:()=>c.openChangePwd=!0},{default:()=>[_e("修改密码")]}),xe(Ie,{class:n.btn,color:"#f24433",onClick:()=>c.disabled=!1},{default:()=>[_e("修改信息")]})]}):xe(Me,{class:n.btnList,align:"center",justify:"end"},{default:()=>[xe(Ie,{class:n.btn,onClick:()=>c.disabled=!0},{default:()=>[_e("取消")]}),xe(Ie,{class:n.btn,type:"primary",onClick:()=>{s.value.validate((async n=>{n||(await Le(d),console.log(d),t.getInfo(),c.disabled=!0,e.success("修改成功"))}))}},{default:()=>[_e("完成")]})]}),xe(De,{class:n.changePwdModal,show:c.openChangePwd,"onUpdate:show":e=>c.openChangePwd=e,preset:"dialog",showIcon:!1,title:"修改密码"},{default:()=>[xe(o,{onClose:()=>{c.openChangePwd=!1}},null)]})])}}),ut="_logo_sn7fs_1",ht="_changeHead_sn7fs_8",ft="_uploadFile_sn7fs_29",pt="_formWrap_sn7fs_37",gt="_schoolInfo_sn7fs_61",mt="_errorBtn_sn7fs_103",vt="_addTeacher_sn7fs_106",bt="_btnList_sn7fs_178",yt="_btn_sn7fs_178",wt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Ct=[Oe("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 112v288"},null,-1),Oe("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M400 256H112"},null,-1)],xt=d({name:"Add",render:function(e,t){return Ee(),Ne("svg",wt,Ct)}}),kt=d({name:"teacher-operation",emits:["close"],props:{areaList:{type:Array,default:()=>[]}},setup(e,{emit:t}){const n=ye(),o=we({provinceCode:"",cityCode:"",regionCode:"",tenantId:n.info.schoolInfos?.[0]?.tenantId,phone:null,schoolId:n.info.schoolInfos?.[0]?.id,nickname:null,gender:1}),r=h(!1),a=h(),i=be(),l=async()=>{a.value.validate((async e=>{if(!e){try{r.value=!0,await(n={...o},ve.post("/edu-app/teacher/add",{data:n})),i.success("添加成功")}catch(a){console.log(a)}var n;setTimeout((()=>{r.value=!1,t("close")}),100)}}))};return()=>xe("div",null,[xe(Te,{model:o,ref:a,showRequireMark:!1,"label-placement":"left","label-width":"126"},{default:()=>[xe(Se,{label:"老师姓名",path:"nickname",rule:[{required:!0,message:"请输入老师姓名"}]},{default:()=>[xe(Re,{value:o.nickname,"onUpdate:value":e=>o.nickname=e,placeholder:"请输入老师姓名",clearable:!0,maxlength:14},null)]}),xe(Se,{label:"老师性别",path:"gender",rule:[{required:!0,message:"请选择老师性别"}]},{default:()=>[xe(Me,null,{default:()=>[xe(Fe("n-button"),{class:"genderBtn",type:o.gender?"info":void 0,tertiary:!o.gender,onClick:()=>{o.gender=1}},{default:()=>[_e("男")]}),xe(Fe("n-button"),{class:"genderBtn",type:o.gender?void 0:"info",tertiary:!!o.gender,onClick:()=>{o.gender=0}},{default:()=>[_e("女")]})]})]}),xe(Se,{label:"城区"},{default:()=>[xe(lt,{to:"body",placeholder:"请选择城区",options:e.areaList,labelField:"name",valueField:"code",childrenField:"areas",checkStrategy:"child",expandTrigger:"hover","onUpdate:value":(e,t,n)=>{o.provinceCode=n[0]?.code,o.cityCode=n[1]?.code,o.regionCode=n[2]?.code}},null)]}),xe(Se,{label:"手机号",path:"phone",rule:[{required:!0,message:"手机号码",trigger:"blur"},{pattern:/^((13[0-9])|(14(0|[5-7]|9))|(15([0-3]|[5-9]))|(16(2|[5-7]))|(17[0-8])|(18[0-9])|(19([0-3]|[5-9])))\d{8}$/,message:"请输入正确的手机号",trigger:"blur"}]},{default:()=>[xe(Re,{maxlength:11,value:o.phone,"onUpdate:value":e=>o.phone=e,placeholder:"请输入手机号",clearable:!0},null)]}),xe("div",{class:"nalert"},[xe(je,{type:"error",showIcon:!1,bordered:!1},{default:()=>[_e("默认密码为ktyq+手机号后四位")]})])]}),xe(Me,{style:{padding:"20px 0 32px 0"},justify:"center"},{default:()=>[xe(Ie,{class:"actionBtn",round:!0,type:"default",onClick:()=>t("close")},{default:()=>[_e("取消")]}),xe(Ie,{class:"actionBtn",round:!0,type:"primary",onClick:()=>l(),loading:r.value},{default:()=>[_e("确定")]})]})])}});function _t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function Tt(e,t){for(var n,o="",r=0,a=-1,i=0,l=0;l<=e.length;++l){if(l<e.length)n=e.charCodeAt(l);else{if(47===n)break;n=47}if(47===n){if(a===l-1||1===i);else if(a!==l-1&&2===i){if(o.length<2||2!==r||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){var s=o.lastIndexOf("/");if(s!==o.length-1){-1===s?(o="",r=0):r=(o=o.slice(0,s)).length-1-o.lastIndexOf("/"),a=l,i=0;continue}}else if(2===o.length||1===o.length){o="",r=0,a=l,i=0;continue}t&&(o.length>0?o+="/..":o="..",r=2)}else o.length>0?o+="/"+e.slice(a+1,l):o=e.slice(a+1,l),r=l-a-1;a=l,i=0}else 46===n&&-1!==i?++i:i=-1}return o}var Pt={resolve:function(){for(var e,t="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var r;o>=0?r=arguments[o]:(void 0===e&&(e=process.cwd()),r=e),_t(r),0!==r.length&&(t=r+"/"+t,n=47===r.charCodeAt(0))}return t=Tt(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(_t(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=Tt(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return _t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var n=arguments[t];_t(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":Pt.normalize(e)},relative:function(e,t){if(_t(e),_t(t),e===t)return"";if((e=Pt.resolve(e))===(t=Pt.resolve(t)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var o=e.length,r=o-n,a=1;a<t.length&&47===t.charCodeAt(a);++a);for(var i=t.length-a,l=r<i?r:i,s=-1,d=0;d<=l;++d){if(d===l){if(i>l){if(47===t.charCodeAt(a+d))return t.slice(a+d+1);if(0===d)return t.slice(a+d)}else r>l&&(47===e.charCodeAt(n+d)?s=d:0===d&&(s=0));break}var c=e.charCodeAt(n+d);if(c!==t.charCodeAt(a+d))break;47===c&&(s=d)}var u="";for(d=n+s+1;d<=o;++d)d!==o&&47!==e.charCodeAt(d)||(0===u.length?u+="..":u+="/..");return u.length>0?u+t.slice(a+s):(a+=s,47===t.charCodeAt(a)&&++a,t.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(_t(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,o=-1,r=!0,a=e.length-1;a>=1;--a)if(47===(t=e.charCodeAt(a))){if(!r){o=a;break}}else r=!1;return-1===o?n?"/":".":n&&1===o?"//":e.slice(0,o)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');_t(e);var n,o=0,r=-1,a=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var i=t.length-1,l=-1;for(n=e.length-1;n>=0;--n){var s=e.charCodeAt(n);if(47===s){if(!a){o=n+1;break}}else-1===l&&(a=!1,l=n+1),i>=0&&(s===t.charCodeAt(i)?-1==--i&&(r=n):(i=-1,r=l))}return o===r?r=l:-1===r&&(r=e.length),e.slice(o,r)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){o=n+1;break}}else-1===r&&(a=!1,r=n+1);return-1===r?"":e.slice(o,r)},extname:function(e){_t(e);for(var t=-1,n=0,o=-1,r=!0,a=0,i=e.length-1;i>=0;--i){var l=e.charCodeAt(i);if(47!==l)-1===o&&(r=!1,o=i+1),46===l?-1===t?t=i:1!==a&&(a=1):-1!==t&&(a=-1);else if(!r){n=i+1;break}}return-1===t||-1===o||0===a||1===a&&t===o-1&&t===n+1?"":e.slice(t,o)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,o=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+o:n+e+o:o}("/",e)},parse:function(e){_t(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,o=e.charCodeAt(0),r=47===o;r?(t.root="/",n=1):n=0;for(var a=-1,i=0,l=-1,s=!0,d=e.length-1,c=0;d>=n;--d)if(47!==(o=e.charCodeAt(d)))-1===l&&(s=!1,l=d+1),46===o?-1===a?a=d:1!==c&&(c=1):-1!==a&&(c=-1);else if(!s){i=d+1;break}return-1===a||-1===l||0===c||1===c&&a===l-1&&a===i+1?-1!==l&&(t.base=t.name=0===i&&r?e.slice(1,l):e.slice(i,l)):(0===i&&r?(t.name=e.slice(1,a),t.base=e.slice(1,l)):(t.name=e.slice(i,a),t.base=e.slice(i,l)),t.ext=e.slice(a,l)),i>0?t.dir=e.slice(0,i-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};Pt.posix=Pt;const At=Pt.extname,St=Pt.basename;class Rt{constructor(){let e="undefined"==typeof global,t="image/png",n="image/jpeg",o="image/jpeg",r="image/webp",a="application/pdf",i="image/svg+xml";Object.assign(this,{toMime:this.toMime.bind(this),fromMime:this.fromMime.bind(this),expected:e?'"png", "jpg", or "webp"':'"png", "jpg", "pdf", or "svg"',formats:e?{png:t,jpg:n,jpeg:o,webp:r}:{png:t,jpg:n,jpeg:o,pdf:a,svg:i},mimes:e?{[t]:"png",[n]:"jpg",[r]:"webp"}:{[t]:"png",[n]:"jpg",[a]:"pdf",[i]:"svg"}})}toMime(e){return this.formats[(e||"").replace(/^\./,"").toLowerCase()]}fromMime(e){return this.mimes[e]}}class Bt{static for(e){return(new Bt).append(e).get()}constructor(){this.crc=-1}get(){return~this.crc}append(e){for(var t=0|this.crc,n=this.table,o=0,r=0|e.length;o<r;o++)t=t>>>8^n[255&(t^e[o])];return this.crc=t,this}}function Mt(e){let t=new Uint8Array(e),n=new DataView(t.buffer),o={array:t,view:n,size:e,set8:(e,t)=>(n.setUint8(e,t),o),set16:(e,t)=>(n.setUint16(e,t,!0),o),set32:(e,t)=>(n.setUint32(e,t,!0),o),bytes:(e,n)=>(t.set(n,e),o)};return o}Bt.prototype.table=(()=>{var e,t,n,o=[];for(e=0;e<256;e++){for(n=e,t=0;t<8;t++)n=1&n?n>>>1^3988292384:n>>>1;o[e]=n}return o})();class It{constructor(e){let t=new Date;Object.assign(this,{directory:e,offset:0,files:[],time:(t.getHours()<<6|t.getMinutes())<<5|t.getSeconds()/2,date:(t.getFullYear()-1980<<4|t.getMonth()+1)<<5|t.getDate()}),this.add(e)}async add(e,t){let n=!t,o=It.encoder.encode(`${this.directory}/${n?"":e}`),r=new Uint8Array(n?0:await t.arrayBuffer()),a=30+o.length,i=a+r.length,{offset:l}=this,s=Mt(26).set32(0,134742036).set16(6,this.time).set16(8,this.date).set32(10,Bt.for(r)).set32(14,r.length).set32(18,r.length).set16(22,o.length);l+=a;let d=Mt(a+r.length+16).set32(0,67324752).bytes(4,s.array).bytes(30,o).bytes(a,r);l+=r.length,d.set32(i,134695760).bytes(i+4,s.array.slice(10,22)),l+=16,this.files.push({offset:l,folder:n,name:o,header:s,payload:d}),this.offset=l}toBuffer(){let e=this.files.reduce(((e,{name:t})=>46+t.length+e),0),t=Mt(e+22),n=0;for(var{offset:o,name:r,header:a,folder:i}of this.files)t.set32(n,33639248).set16(n+4,20).bytes(n+6,a.array).set8(n+38,i?16:0).set32(n+42,o).bytes(n+46,r),n+=46+r.length;t.set32(n,101010256).set16(n+8,this.files.length).set16(n+10,this.files.length).set32(n+12,e).set32(n+16,this.offset);let l=new Uint8Array(this.offset+t.size),s=0;for(var{payload:d}of this.files)l.set(d.array,s),s+=d.size;return l.set(t.array,s),l}get blob(){return new Blob([this.toBuffer()],{type:"application/zip"})}}It.encoder=new TextEncoder;const Dt=(e,t,n,o)=>{if(o){let{width:t,height:n}=e,r=Object.assign(document.createElement("canvas"),{width:t,height:n}),a=r.getContext("2d");a.fillStyle=o,a.fillRect(0,0,t,n),a.drawImage(e,0,0),e=r}return new Promise(((o,r)=>e.toBlob(o,t,n)))},Lt=(e,t)=>{const n=window.URL.createObjectURL(t),o=document.createElement("a");o.style.display="none",o.href=n,o.setAttribute("download",e),void 0===o.download&&o.setAttribute("target","_blank"),document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout((()=>window.URL.revokeObjectURL(n)),100)},Nt={asBuffer:(...e)=>Dt(...e).then((e=>e.arrayBuffer())),asDownload:async(e,t,n,o,r)=>{Lt(r,await Dt(e,t,n,o))},asZipDownload:async(e,t,n,o,r,a,i)=>{let l=St(r,".zip")||"archive",s=new It(l);await Promise.all(e.map((async(e,r)=>{let l=(e=>a.replace("{}",String(e+1).padStart(i,"0")))(r);await s.add(l,await Dt(e,t,n,o))}))),Lt(`${l}.zip`,s.blob)},atScale:(e,t,n)=>e.map((e=>{if(1==t&&!n)return e.canvas;let o=document.createElement("canvas"),r=o.getContext("2d"),a=e.canvas?e.canvas:e;return o.width=a.width*t,o.height=a.height*t,n&&(r.fillStyle=n,r.fillRect(0,0,o.width,o.height)),r.scale(t,t),r.drawImage(a,0,0),o})),options:function(e,{filename:t="",extension:n="",format:o,page:r,quality:a,matte:i,density:l,outline:s,archive:d}={}){var{fromMime:c,toMime:u,expected:h}=new Rt,f=(d=d||"canvas",o||n.replace(/@\d+x$/i,"")||At(t)),p=(o=c(u(f)||f),u(o)),g=e.length;if(!f)throw new Error("Cannot determine image format (use a filename extension or 'format' argument)");if(!o)throw new Error(`Unsupported file format "${f}" (expected ${h})`);if(!g)throw new RangeError("Canvas has no associated contexts (try calling getContext or newPage first)");let m,v,b=t.replace(/{(\d*)}/g,((e,t)=>(v=!0,t=parseInt(t,10),m=isFinite(t)?t:isFinite(m)?m:-1,"{}"))),y=r>0?r-1:r<0?g+r:void 0;if(isFinite(y)&&y<0||y>=g)throw new RangeError(1==g?`Canvas only has a ‘page 1’ (${y} is out of bounds)`:`Canvas has pages 1–${g} (${y} is out of bounds)`);if(e=isFinite(y)?[e[y]]:v||"pdf"==o?e:e.slice(-1),void 0===a)a=.92;else if("number"!=typeof a||!isFinite(a)||a<0||a>1)throw new TypeError("The quality option must be an number in the 0.0–1.0 range");if(void 0===l){let e=(n||St(t,f)).match(/@(\d+)x$/i);l=e?parseInt(e[1],10):1}else if("number"!=typeof l||!Number.isInteger(l)||l<1)throw new TypeError("The density option must be a non-negative integer");return void 0===s?s=!0:"svg"==o&&(s=!!s),{filename:t,pattern:b,format:o,mime:p,pages:e,padding:m,quality:a,matte:i,density:l,outline:s,archive:d}}},{asBuffer:Et,asDownload:Ot,asZipDownload:Ft,atScale:jt,options:zt}=Nt,Ut=Symbol.for("toDataURL"),{CanvasRenderingContext2D:$t,CanvasGradient:qt,CanvasPattern:Kt,Image:Ht,ImageData:Gt,Path2D:Vt,DOMMatrix:Wt,DOMRect:Qt,DOMPoint:Xt}=window,Yt={Canvas:class{constructor(e,t){let n=document.createElement("canvas"),o=[];for(var[r,a]of(Object.defineProperty(n,"async",{value:!0,writable:!1,enumerable:!0}),Object.entries({png:()=>Et(n,"image/png"),jpg:()=>Et(n,"image/jpeg"),pages:()=>o.concat(n).map((e=>e.getContext("2d")))})))Object.defineProperty(n,r,{get:a});return Object.assign(n,{width:e,height:t,newPage(...e){var{width:t,height:r}=n,a=Object.assign(document.createElement("canvas"),{width:t,height:r});a.getContext("2d").drawImage(n,0,0),o.push(a);var[t,r]=e.length?e:[t,r];return Object.assign(n,{width:t,height:r}).getContext("2d")},saveAs(e,t){t="number"==typeof t?{quality:t}:t;let n=zt(this.pages,{filename:e,...t}),{pattern:o,padding:r,mime:a,quality:i,matte:l,density:s,archive:d}=n,c=jt(n.pages,s);return null==r?Ot(c[0],a,i,l,e):Ft(c,a,i,l,d,o,r)},toBuffer(e="png",t={}){t="number"==typeof t?{quality:t}:t;let n=zt(this.pages,{extension:e,...t}),{mime:o,quality:r,matte:a,pages:i,density:l}=n,s=jt(i,l,a)[0];return Et(s,o,r,a)},[Ut]:n.toDataURL.bind(n),toDataURL(e="png",t={}){t="number"==typeof t?{quality:t}:t;let o=zt(this.pages,{extension:e,...t}),{mime:r,quality:a,matte:i,pages:l,density:s}=o,d=jt(l,s,i)[0],c=d[d===n?Ut:"toDataURL"](r,a);return Promise.resolve(c)}})}},loadImage:e=>new Promise(((t,n)=>Object.assign(new Ht,{crossOrigin:"Anonymous",onload:t,onerror:n,src:e}))),CanvasRenderingContext2D:$t,CanvasGradient:qt,CanvasPattern:Kt,Image:Ht,ImageData:Gt,Path2D:Vt,DOMMatrix:Wt,DOMRect:Qt,DOMPoint:Xt},Jt=(e,t,n={},o=n)=>{if(Array.isArray(t))t.forEach((t=>Jt(e,t,n,o)));else if("function"==typeof t)t(e,n,o,Jt);else{const r=Object.keys(t)[0];Array.isArray(t[r])?(o[r]={},Jt(e,t[r],n,o[r])):o[r]=t[r](e,n,o,Jt)}return n},Zt=(e,t)=>(n,o,r,a)=>{t(n,o,r)&&a(n,e,o,r)},en=(e=0)=>t=>t.data[t.pos+e],tn=e=>t=>t.data.subarray(t.pos,t.pos+=e),nn=e=>t=>t.data.subarray(t.pos,t.pos+e),on=e=>t=>Array.from(tn(e)(t)).map((e=>String.fromCharCode(e))).join(""),rn=e=>t=>{const n=tn(2)(t);return e?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]},an=(e,t)=>(n,o,r)=>{const a="function"==typeof t?t(n,o,r):t,i=tn(e),l=new Array(a);for(var s=0;s<a;s++)l[s]=i(n);return l},ln=e=>t=>{const n=(e=>e.data[e.pos++])(t),o=new Array(8);for(var r=0;r<8;r++)o[7-r]=!!(n&1<<r);return Object.keys(e).reduce(((t,n)=>{const r=e[n];return r.length?t[n]=((e,t,n)=>{for(var o=0,r=0;r<n;r++)o+=e[t+r]&&2**(n-r-1);return o})(o,r.index,r.length):t[n]=o[r.index],t}),{})};var sn={blocks:e=>{const t=[],n=e.data.length;for(var o=0,r=(e=>e.data[e.pos++])(e);0!==r&&r;r=(e=>e.data[e.pos++])(e)){if(e.pos+r>=n){const r=n-e.pos;t.push(tn(r)(e)),o+=r;break}t.push(tn(r)(e)),o+=r}const a=new Uint8Array(o);for(var i=0,l=0;l<t.length;l++)a.set(t[l],i),i+=t[l].length;return a}};const dn=Zt({gce:[{codes:tn(2)},{byteSize:e=>e.data[e.pos++]},{extras:ln({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:rn(!0)},{transparentColorIndex:e=>e.data[e.pos++]},{terminator:e=>e.data[e.pos++]}]},(e=>{var t=nn(2)(e);return 33===t[0]&&249===t[1]})),cn=Zt({image:[{code:e=>e.data[e.pos++]},{descriptor:[{left:rn(!0)},{top:rn(!0)},{width:rn(!0)},{height:rn(!0)},{lct:ln({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},Zt({lct:an(3,((e,t,n)=>Math.pow(2,n.descriptor.lct.size+1)))},((e,t,n)=>n.descriptor.lct.exists)),{data:[{minCodeSize:e=>e.data[e.pos++]},sn]}]},(e=>44===en()(e))),un=Zt({text:[{codes:tn(2)},{blockSize:e=>e.data[e.pos++]},{preData:(e,t,n)=>tn(n.text.blockSize)(e)},sn]},(e=>{var t=nn(2)(e);return 33===t[0]&&1===t[1]})),hn=Zt({application:[{codes:tn(2)},{blockSize:e=>e.data[e.pos++]},{id:(e,t,n)=>on(n.blockSize)(e)},sn]},(e=>{var t=nn(2)(e);return 33===t[0]&&255===t[1]})),fn=Zt({comment:[{codes:tn(2)},sn]},(e=>{var t=nn(2)(e);return 33===t[0]&&254===t[1]})),pn=[{header:[{signature:on(3)},{version:on(3)}]},{lsd:[{width:rn(!0)},{height:rn(!0)},{gct:ln({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:e=>e.data[e.pos++]},{pixelAspectRatio:e=>e.data[e.pos++]}]},Zt({gct:an(3,((e,t)=>Math.pow(2,t.lsd.gct.size+1)))},((e,t)=>t.lsd.gct.exists)),{frames:((e,t)=>(n,o,r,a)=>{const i=[];let l=n.pos;for(;t(n,o,r);){const t={};if(a(n,e,o,t),n.pos===l)break;l=n.pos,i.push(t)}return i})([dn,hn,fn,cn,un],(e=>{var t=en()(e);return 33===t||44===t}))}],gn=(e,t,n)=>{if(!e.image)return void console.warn("gif frame does not have associated image.");const{image:o}=e,r=o.descriptor.width*o.descriptor.height;var a=((e,t,n)=>{const o=4096,r=n;var a,i,l,s,d,c,u,h,f,p;const g=new Array(n),m=new Array(o),v=new Array(o),b=new Array(4097);for(d=1+(i=1<<(p=e)),a=i+2,u=-1,l=(1<<(s=p+1))-1,h=0;h<i;h++)m[h]=0,v[h]=h;var y,w,C,x,k,_;for(y=w=C=x=k=_=0,f=0;f<r;){if(0===x){if(w<s){y+=t[_]<<w,w+=8,_++;continue}if(h=y&l,y>>=s,w-=s,h>a||h==d)break;if(h==i){l=(1<<(s=p+1))-1,a=i+2,u=-1;continue}if(-1==u){b[x++]=v[h],u=h,C=h;continue}for(c=h,h==a&&(b[x++]=C,h=u);h>i;)b[x++]=v[h],h=m[h];C=255&v[h],b[x++]=C,a<o&&(m[a]=u,v[a]=C,0==(++a&l)&&a<o&&(s++,l+=a)),u=c}x--,g[k++]=b[x],f++}for(f=k;f<r;f++)g[f]=0;return g})(o.data.minCodeSize,o.data.blocks,r);o.descriptor.lct.interlaced&&(a=((e,t)=>{const n=new Array(e.length),o=e.length/t,r=function(o,r){const a=e.slice(r*t,(r+1)*t);n.splice.apply(n,[o*t,t].concat(a))},a=[0,4,2,1],i=[8,8,4,2];for(var l=0,s=0;s<4;s++)for(var d=a[s];d<o;d+=i[s])r(d,l),l++;return n})(a,o.descriptor.width));const i={pixels:a,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return o.descriptor.lct&&o.descriptor.lct.exists?i.colorTable=o.lct:i.colorTable=t,e.gce&&(i.delay=10*(e.gce.delay||10),i.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(i.transparentIndex=e.gce.transparentColorIndex)),n&&(i.patch=(e=>{const t=e.pixels.length,n=new Uint8ClampedArray(4*t);for(var o=0;o<t;o++){const t=4*o,r=e.pixels[o],a=e.colorTable[r];n[t]=a[0],n[t+1]=a[1],n[t+2]=a[2],n[t+3]=r!==e.transparentIndex?255:0}return n})(i)),i};function mn(e){var t=encodeURI(e).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return t.length+(t.length!=Number(e)?3:0)}class vn{constructor(e){this.mode=wn.MODE_8BIT_BYTE,this.parsedData=[],this.data=e;const t=[];for(let n=0,o=this.data.length;n<o;n++){const e=[],o=this.data.charCodeAt(n);o>65536?(e[0]=240|(1835008&o)>>>18,e[1]=128|(258048&o)>>>12,e[2]=128|(4032&o)>>>6,e[3]=128|63&o):o>2048?(e[0]=224|(61440&o)>>>12,e[1]=128|(4032&o)>>>6,e[2]=128|63&o):o>128?(e[0]=192|(1984&o)>>>6,e[1]=128|63&o):e[0]=o,t.push(e)}this.parsedData=Array.prototype.concat.apply([],t),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}getLength(){return this.parsedData.length}write(e){for(let t=0,n=this.parsedData.length;t<n;t++)e.put(this.parsedData[t],8)}}class bn{constructor(e=-1,t=yn.L){this.moduleCount=0,this.dataList=[],this.typeNumber=e,this.errorCorrectLevel=t,this.moduleCount=0,this.dataList=[]}addData(e){if(this.typeNumber<=0)this.typeNumber=function(e,t){for(var n=1,o=mn(e),r=0,a=An.length;r<a;r++){var i=0;switch(t){case yn.L:i=An[r][0];break;case yn.M:i=An[r][1];break;case yn.Q:i=An[r][2];break;case yn.H:i=An[r][3]}if(o<=i)break;n++}if(n>An.length)throw new Error("Too long data");return n}(e,this.errorCorrectLevel);else{if(this.typeNumber>40)throw new Error(`Invalid QR version: ${this.typeNumber}`);if(!function(e,t,n){const o=mn(t),r=e-1;let a=0;switch(n){case yn.L:a=An[r][0];break;case yn.M:a=An[r][1];break;case yn.Q:a=An[r][2];break;case yn.H:a=An[r][3]}return o<=a}(this.typeNumber,e,this.errorCorrectLevel))throw new Error(`Data is too long for QR version: ${this.typeNumber}`)}const t=new vn(e);this.dataList.push(t),this.dataCache=void 0}isDark(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(`${e},${t}`);return this.modules[e][t]}getModuleCount(){return this.moduleCount}make(){this.makeImpl(!1,this.getBestMaskPattern())}makeImpl(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(let n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(let e=0;e<this.moduleCount;e++)this.modules[n][e]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=bn.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)}setupPositionProbePattern(e,t){for(let n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(let o=-1;o<=7;o++)t+o<=-1||this.moduleCount<=t+o||(this.modules[e+n][t+o]=0<=n&&n<=6&&(0==o||6==o)||0<=o&&o<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=o&&o<=4)}getBestMaskPattern(){if(Number.isInteger(this.maskPattern)&&Object.values(Cn).includes(this.maskPattern))return this.maskPattern;let e=0,t=0;for(let n=0;n<8;n++){this.makeImpl(!0,n);const o=xn.getLostPoint(this);(0==n||e>o)&&(e=o,t=n)}return t}setupTimingPattern(){for(let e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(let e=8;e<this.moduleCount-8;e++)null==this.modules[6][e]&&(this.modules[6][e]=e%2==0)}setupPositionAdjustPattern(){const e=xn.getPatternPosition(this.typeNumber);for(let t=0;t<e.length;t++)for(let n=0;n<e.length;n++){const o=e[t],r=e[n];if(null==this.modules[o][r])for(let e=-2;e<=2;e++)for(let t=-2;t<=2;t++)this.modules[o+e][r+t]=-2==e||2==e||-2==t||2==t||0==e&&0==t}}setupTypeNumber(e){const t=xn.getBCHTypeNumber(this.typeNumber);for(var n=0;n<18;n++){var o=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=o}for(n=0;n<18;n++)o=!e&&1==(t>>n&1),this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=o}setupTypeInfo(e,t){const n=this.errorCorrectLevel<<3|t,o=xn.getBCHTypeInfo(n);for(var r=0;r<15;r++){var a=!e&&1==(o>>r&1);r<6?this.modules[r][8]=a:r<8?this.modules[r+1][8]=a:this.modules[this.moduleCount-15+r][8]=a}for(r=0;r<15;r++)a=!e&&1==(o>>r&1),r<8?this.modules[8][this.moduleCount-r-1]=a:r<9?this.modules[8][15-r-1+1]=a:this.modules[8][15-r-1]=a;this.modules[this.moduleCount-8][8]=!e}mapData(e,t){let n=-1,o=this.moduleCount-1,r=7,a=0;for(let i=this.moduleCount-1;i>0;i-=2)for(6==i&&i--;;){for(let n=0;n<2;n++)if(null==this.modules[o][i-n]){let l=!1;a<e.length&&(l=1==(e[a]>>>r&1)),xn.getMask(t,o,i-n)&&(l=!l),this.modules[o][i-n]=l,r--,-1==r&&(a++,r=7)}if(o+=n,o<0||this.moduleCount<=o){o-=n,n=-n;break}}}static createData(e,t,n){const o=Tn.getRSBlocks(e,t),r=new Pn;for(var a=0;a<n.length;a++){const t=n[a];r.put(t.mode,4),r.put(t.getLength(),xn.getLengthInBits(t.mode,e)),t.write(r)}let i=0;for(a=0;a<o.length;a++)i+=o[a].dataCount;if(r.getLengthInBits()>8*i)throw new Error(`code length overflow. (${r.getLengthInBits()}>${8*i})`);for(r.getLengthInBits()+4<=8*i&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=8*i||(r.put(bn.PAD0,8),r.getLengthInBits()>=8*i));)r.put(bn.PAD1,8);return bn.createBytes(r,o)}static createBytes(e,t){let n=0,o=0,r=0;const a=new Array(t.length),i=new Array(t.length);for(var l=0;l<t.length;l++){const d=t[l].dataCount,c=t[l].totalCount-d;o=Math.max(o,d),r=Math.max(r,c),a[l]=new Array(d);for(var s=0;s<a[l].length;s++)a[l][s]=255&e.buffer[s+n];n+=d;const u=xn.getErrorCorrectPolynomial(c),h=new _n(a[l],u.getLength()-1).mod(u);for(i[l]=new Array(u.getLength()-1),s=0;s<i[l].length;s++){const e=s+h.getLength()-i[l].length;i[l][s]=e>=0?h.get(e):0}}let d=0;for(s=0;s<t.length;s++)d+=t[s].totalCount;const c=new Array(d);let u=0;for(s=0;s<o;s++)for(l=0;l<t.length;l++)s<a[l].length&&(c[u++]=a[l][s]);for(s=0;s<r;s++)for(l=0;l<t.length;l++)s<i[l].length&&(c[u++]=i[l][s]);return c}}bn.PAD0=236,bn.PAD1=17;const yn={L:1,M:0,Q:3,H:2},wn={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Cn={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};class xn{static getBCHTypeInfo(e){let t=e<<10;for(;xn.getBCHDigit(t)-xn.getBCHDigit(xn.G15)>=0;)t^=xn.G15<<xn.getBCHDigit(t)-xn.getBCHDigit(xn.G15);return(e<<10|t)^xn.G15_MASK}static getBCHTypeNumber(e){let t=e<<12;for(;xn.getBCHDigit(t)-xn.getBCHDigit(xn.G18)>=0;)t^=xn.G18<<xn.getBCHDigit(t)-xn.getBCHDigit(xn.G18);return e<<12|t}static getBCHDigit(e){let t=0;for(;0!=e;)t++,e>>>=1;return t}static getPatternPosition(e){return xn.PATTERN_POSITION_TABLE[e-1]}static getMask(e,t,n){switch(e){case Cn.PATTERN000:return(t+n)%2==0;case Cn.PATTERN001:return t%2==0;case Cn.PATTERN010:return n%3==0;case Cn.PATTERN011:return(t+n)%3==0;case Cn.PATTERN100:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case Cn.PATTERN101:return t*n%2+t*n%3==0;case Cn.PATTERN110:return(t*n%2+t*n%3)%2==0;case Cn.PATTERN111:return(t*n%3+(t+n)%2)%2==0;default:throw new Error(`bad maskPattern:${e}`)}}static getErrorCorrectPolynomial(e){let t=new _n([1],0);for(let n=0;n<e;n++)t=t.multiply(new _n([1,kn.gexp(n)],0));return t}static getLengthInBits(e,t){if(1<=t&&t<10)switch(e){case wn.MODE_NUMBER:return 10;case wn.MODE_ALPHA_NUM:return 9;case wn.MODE_8BIT_BYTE:case wn.MODE_KANJI:return 8;default:throw new Error(`mode:${e}`)}else if(t<27)switch(e){case wn.MODE_NUMBER:return 12;case wn.MODE_ALPHA_NUM:return 11;case wn.MODE_8BIT_BYTE:return 16;case wn.MODE_KANJI:return 10;default:throw new Error(`mode:${e}`)}else{if(!(t<41))throw new Error(`type:${t}`);switch(e){case wn.MODE_NUMBER:return 14;case wn.MODE_ALPHA_NUM:return 13;case wn.MODE_8BIT_BYTE:return 16;case wn.MODE_KANJI:return 12;default:throw new Error(`mode:${e}`)}}}static getLostPoint(e){const t=e.getModuleCount();let n=0;for(var o=0;o<t;o++)for(var r=0;r<t;r++){let a=0;const i=e.isDark(o,r);for(let n=-1;n<=1;n++)if(!(o+n<0||t<=o+n))for(let l=-1;l<=1;l++)r+l<0||t<=r+l||0==n&&0==l||i==e.isDark(o+n,r+l)&&a++;a>5&&(n+=3+a-5)}for(o=0;o<t-1;o++)for(r=0;r<t-1;r++){let t=0;e.isDark(o,r)&&t++,e.isDark(o+1,r)&&t++,e.isDark(o,r+1)&&t++,e.isDark(o+1,r+1)&&t++,0!=t&&4!=t||(n+=3)}for(o=0;o<t;o++)for(r=0;r<t-6;r++)e.isDark(o,r)&&!e.isDark(o,r+1)&&e.isDark(o,r+2)&&e.isDark(o,r+3)&&e.isDark(o,r+4)&&!e.isDark(o,r+5)&&e.isDark(o,r+6)&&(n+=40);for(r=0;r<t;r++)for(o=0;o<t-6;o++)e.isDark(o,r)&&!e.isDark(o+1,r)&&e.isDark(o+2,r)&&e.isDark(o+3,r)&&e.isDark(o+4,r)&&!e.isDark(o+5,r)&&e.isDark(o+6,r)&&(n+=40);let a=0;for(r=0;r<t;r++)for(o=0;o<t;o++)e.isDark(o,r)&&a++;return n+=Math.abs(100*a/t/t-50)/5*10,n}}xn.PATTERN_POSITION_TABLE=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],xn.G15=1335,xn.G18=7973,xn.G15_MASK=21522;class kn{static glog(e){if(e<1)throw new Error(`glog(${e})`);return kn.LOG_TABLE[e]}static gexp(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return kn.EXP_TABLE[e]}}kn.EXP_TABLE=new Array(256),kn.LOG_TABLE=new Array(256),kn._constructor=function(){for(var e=0;e<8;e++)kn.EXP_TABLE[e]=1<<e;for(e=8;e<256;e++)kn.EXP_TABLE[e]=kn.EXP_TABLE[e-4]^kn.EXP_TABLE[e-5]^kn.EXP_TABLE[e-6]^kn.EXP_TABLE[e-8];for(e=0;e<255;e++)kn.LOG_TABLE[kn.EXP_TABLE[e]]=e}();class _n{constructor(e,t){if(null==e.length)throw new Error(`${e.length}/${t}`);let n=0;for(;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(let o=0;o<e.length-n;o++)this.num[o]=e[o+n]}get(e){return this.num[e]}getLength(){return this.num.length}multiply(e){const t=new Array(this.getLength()+e.getLength()-1);for(let n=0;n<this.getLength();n++)for(let o=0;o<e.getLength();o++)t[n+o]^=kn.gexp(kn.glog(this.get(n))+kn.glog(e.get(o)));return new _n(t,0)}mod(e){if(this.getLength()-e.getLength()<0)return this;const t=kn.glog(this.get(0))-kn.glog(e.get(0)),n=new Array(this.getLength());for(var o=0;o<this.getLength();o++)n[o]=this.get(o);for(o=0;o<e.getLength();o++)n[o]^=kn.gexp(kn.glog(e.get(o))+t);return new _n(n,0).mod(e)}}class Tn{constructor(e,t){this.totalCount=e,this.dataCount=t}static getRSBlocks(e,t){const n=Tn.getRsBlockTable(e,t);if(null==n)throw new Error(`bad rs block @ typeNumber:${e}/errorCorrectLevel:${t}`);const o=n.length/3,r=[];for(let a=0;a<o;a++){const e=n[3*a+0],t=n[3*a+1],o=n[3*a+2];for(let n=0;n<e;n++)r.push(new Tn(t,o))}return r}static getRsBlockTable(e,t){switch(t){case yn.L:return Tn.RS_BLOCK_TABLE[4*(e-1)+0];case yn.M:return Tn.RS_BLOCK_TABLE[4*(e-1)+1];case yn.Q:return Tn.RS_BLOCK_TABLE[4*(e-1)+2];case yn.H:return Tn.RS_BLOCK_TABLE[4*(e-1)+3];default:return}}}Tn.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];class Pn{constructor(){this.buffer=[],this.length=0}get(e){const t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)}put(e,t){for(let n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))}getLengthInBits(){return this.length}putBit(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}}const An=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];var Sn=256,Rn=1024,Bn=1<<18;function Mn(e,t){var n,o,r,a,i;function l(e,t,o,r,a){n[t][0]-=e*(n[t][0]-o)/Rn,n[t][1]-=e*(n[t][1]-r)/Rn,n[t][2]-=e*(n[t][2]-a)/Rn}function s(e,t,o,r,a){for(var l,s,d=Math.abs(t-e),c=Math.min(t+e,Sn),u=t+1,h=t-1,f=1;u<c||h>d;)s=i[f++],u<c&&((l=n[u++])[0]-=s*(l[0]-o)/Bn,l[1]-=s*(l[1]-r)/Bn,l[2]-=s*(l[2]-a)/Bn),h>d&&((l=n[h--])[0]-=s*(l[0]-o)/Bn,l[1]-=s*(l[1]-r)/Bn,l[2]-=s*(l[2]-a)/Bn)}function d(e,t,o){var i,l,s,d,c,u=~(1<<31),h=u,f=-1,p=f;for(i=0;i<Sn;i++)l=n[i],(s=Math.abs(l[0]-e)+Math.abs(l[1]-t)+Math.abs(l[2]-o))<u&&(u=s,f=i),(d=s-(r[i]>>12))<h&&(h=d,p=i),c=a[i]>>10,a[i]-=c,r[i]+=c<<10;return a[f]+=64,r[f]-=65536,p}this.buildColormap=function(){!function(){var e,t;for(n=[],o=new Int32Array(256),r=new Int32Array(Sn),a=new Int32Array(Sn),i=new Int32Array(32),e=0;e<Sn;e++)t=(e<<12)/Sn,n[e]=new Float64Array([t,t,t,0]),a[e]=256,r[e]=0}(),function(){var n,o,r,a,c,u,h=e.length,f=30+(t-1)/3,p=h/(3*t),g=~~(p/100),m=Rn,v=2048,b=v>>6;for(b<=1&&(b=0),n=0;n<b;n++)i[n]=m*(256*(b*b-n*n)/(b*b));h<1509?(t=1,o=3):o=h%499!=0?1497:h%491!=0?1473:h%487!=0?1461:1509;var y=0;for(n=0;n<p;)if(l(m,u=d(r=(255&e[y])<<4,a=(255&e[y+1])<<4,c=(255&e[y+2])<<4),r,a,c),0!==b&&s(b,u,r,a,c),(y+=o)>=h&&(y-=h),0===g&&(g=1),++n%g==0)for(m-=m/f,(b=(v-=v/30)>>6)<=1&&(b=0),u=0;u<b;u++)i[u]=m*(256*(b*b-u*u)/(b*b))}(),function(){for(var e=0;e<Sn;e++)n[e][0]>>=4,n[e][1]>>=4,n[e][2]>>=4,n[e][3]=e}(),function(){var e,t,r,a,i,l,s=0,d=0;for(e=0;e<Sn;e++){for(i=e,l=(r=n[e])[1],t=e+1;t<Sn;t++)(a=n[t])[1]<l&&(i=t,l=a[1]);if(a=n[i],e!=i&&(t=a[0],a[0]=r[0],r[0]=t,t=a[1],a[1]=r[1],r[1]=t,t=a[2],a[2]=r[2],r[2]=t,t=a[3],a[3]=r[3],r[3]=t),l!=s){for(o[s]=d+e>>1,t=s+1;t<l;t++)o[t]=e;s=l,d=e}}for(o[s]=d+255>>1,t=s+1;t<256;t++)o[t]=255}()},this.getColormap=function(){for(var e=[],t=[],o=0;o<Sn;o++)t[n[o][3]]=o;for(var r=0,a=0;a<Sn;a++){var i=t[a];e[r++]=n[i][0],e[r++]=n[i][1],e[r++]=n[i][2]}return e},this.lookupRGB=function(e,t,r){for(var a,i,l,s=1e3,d=-1,c=o[t],u=c-1;c<Sn||u>=0;)c<Sn&&((l=(i=n[c])[1]-t)>=s?c=Sn:(c++,l<0&&(l=-l),(a=i[0]-e)<0&&(a=-a),(l+=a)<s&&((a=i[2]-r)<0&&(a=-a),(l+=a)<s&&(s=l,d=i[3])))),u>=0&&((l=t-(i=n[u])[1])>=s?u=-1:(u--,l<0&&(l=-l),(a=i[0]-e)<0&&(a=-a),(l+=a)<s&&((a=i[2]-r)<0&&(a=-a),(l+=a)<s&&(s=l,d=i[3]))));return d}}var In=5003,Dn=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function Ln(e,t,n,o){var r,a,i,l,s,d,c,u,h,f=Math.max(2,o),p=new Uint8Array(256),g=new Int32Array(In),m=new Int32Array(In),v=0,b=0,y=!1;function w(e,t){p[a++]=e,a>=254&&k(t)}function C(e){x(In),b=s+2,y=!0,P(s,e)}function x(e){for(var t=0;t<e;++t)g[t]=-1}function k(e){a>0&&(e.writeByte(a),e.writeBytes(p,0,a),a=0)}function _(e){return(1<<e)-1}function T(){return 0===c?-1:(--c,255&n[u++])}function P(e,t){for(r&=Dn[v],v>0?r|=e<<v:r=e,v+=h;v>=8;)w(255&r,t),r>>=8,v-=8;if((b>i||y)&&(y?(i=_(h=l),y=!1):(++h,i=12==h?4096:_(h))),e==d){for(;v>0;)w(255&r,t),r>>=8,v-=8;k(t)}}this.encode=function(n){n.writeByte(f),c=e*t,u=0,function(e,t){var n,o,r,c,u,f,p;for(y=!1,i=_(h=l=e),d=1+(s=1<<e-1),b=s+2,a=0,c=T(),p=0,n=In;n<65536;n*=2)++p;p=8-p,x(f=In),P(s,t);e:for(;-1!=(o=T());)if(n=(o<<12)+c,g[r=o<<p^c]!==n){if(g[r]>=0){u=f-r,0===r&&(u=1);do{if((r-=u)<0&&(r+=f),g[r]===n){c=m[r];continue e}}while(g[r]>=0)}P(c,t),c=o,b<4096?(m[r]=b++,g[r]=n):C(t)}else c=m[r];P(c,t),P(d,t)}(f+1,n),n.writeByte(0)}}function Nn(){this.page=-1,this.pages=[],this.newPage()}Nn.pageSize=4096,Nn.charMap={};for(var En=0;En<256;En++)Nn.charMap[En]=String.fromCharCode(En);function On(e,t){this.width=~~e,this.height=~~t,this.transparent=null,this.transIndex=0,this.repeat=-1,this.delay=0,this.image=null,this.pixels=null,this.indexedPixels=null,this.colorDepth=null,this.colorTab=null,this.neuQuant=null,this.usedEntry=new Array,this.palSize=7,this.dispose=-1,this.firstFrame=!0,this.sample=10,this.dither=!1,this.globalPalette=!1,this.out=new Nn}Nn.prototype.newPage=function(){this.pages[++this.page]=new Uint8Array(Nn.pageSize),this.cursor=0},Nn.prototype.getData=function(){for(var e="",t=0;t<this.pages.length;t++)for(var n=0;n<Nn.pageSize;n++)e+=Nn.charMap[this.pages[t][n]];return e},Nn.prototype.toFlattenUint8Array=function(){const e=[];for(var t=0;t<this.pages.length;t++)if(t===this.pages.length-1){const n=Uint8Array.from(this.pages[t].slice(0,this.cursor));e.push(n)}else e.push(this.pages[t]);const n=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));return e.reduce(((e,t)=>(n.set(t,e),e+t.length)),0),n},Nn.prototype.writeByte=function(e){this.cursor>=Nn.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=e},Nn.prototype.writeUTFBytes=function(e){for(var t=e.length,n=0;n<t;n++)this.writeByte(e.charCodeAt(n))},Nn.prototype.writeBytes=function(e,t,n){for(var o=n||e.length,r=t||0;r<o;r++)this.writeByte(e[r])},On.prototype.setDelay=function(e){this.delay=Math.round(e/10)},On.prototype.setFrameRate=function(e){this.delay=Math.round(100/e)},On.prototype.setDispose=function(e){e>=0&&(this.dispose=e)},On.prototype.setRepeat=function(e){this.repeat=e},On.prototype.setTransparent=function(e){this.transparent=e},On.prototype.addFrame=function(e){this.image=e,this.colorTab=this.globalPalette&&this.globalPalette.slice?this.globalPalette:null,this.getImagePixels(),this.analyzePixels(),!0===this.globalPalette&&(this.globalPalette=this.colorTab),this.firstFrame&&(this.writeHeader(),this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.globalPalette||this.writePalette(),this.writePixels(),this.firstFrame=!1},On.prototype.finish=function(){this.out.writeByte(59)},On.prototype.setQuality=function(e){e<1&&(e=1),this.sample=e},On.prototype.setDither=function(e){!0===e&&(e="FloydSteinberg"),this.dither=e},On.prototype.setGlobalPalette=function(e){this.globalPalette=e},On.prototype.getGlobalPalette=function(){return this.globalPalette&&this.globalPalette.slice&&this.globalPalette.slice(0)||this.globalPalette},On.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")},On.prototype.analyzePixels=function(){this.colorTab||(this.neuQuant=new Mn(this.pixels,this.sample),this.neuQuant.buildColormap(),this.colorTab=this.neuQuant.getColormap()),this.dither?this.ditherPixels(this.dither.replace("-serpentine",""),null!==this.dither.match(/-serpentine/)):this.indexPixels(),this.pixels=null,this.colorDepth=8,this.palSize=7,null!==this.transparent&&(this.transIndex=this.findClosest(this.transparent,!0))},On.prototype.indexPixels=function(e){var t=this.pixels.length/3;this.indexedPixels=new Uint8Array(t);for(var n=0,o=0;o<t;o++){var r=this.findClosestRGB(255&this.pixels[n++],255&this.pixels[n++],255&this.pixels[n++]);this.usedEntry[r]=!0,this.indexedPixels[o]=r}},On.prototype.ditherPixels=function(e,t){var n={FalseFloydSteinberg:[[3/8,1,0],[3/8,0,1],[2/8,1,1]],FloydSteinberg:[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]],Stucki:[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]],Atkinson:[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]]};if(!e||!n[e])throw"Unknown dithering kernel: "+e;var o=n[e],r=0,a=this.height,i=this.width,l=this.pixels,s=t?-1:1;this.indexedPixels=new Uint8Array(this.pixels.length/3);for(var d=0;d<a;d++){t&&(s*=-1);for(var c=1==s?0:i-1,u=1==s?i:0;c!==u;c+=s){var h=3*(r=d*i+c),f=l[h],p=l[h+1],g=l[h+2];h=this.findClosestRGB(f,p,g),this.usedEntry[h]=!0,this.indexedPixels[r]=h,h*=3;for(var m=f-this.colorTab[h],v=p-this.colorTab[h+1],b=g-this.colorTab[h+2],y=1==s?0:o.length-1,w=1==s?o.length:0;y!==w;y+=s){var C=o[y][1],x=o[y][2];if(C+c>=0&&C+c<i&&x+d>=0&&x+d<a){var k=o[y][0];h=r+C+x*i,l[h*=3]=Math.max(0,Math.min(255,l[h]+m*k)),l[h+1]=Math.max(0,Math.min(255,l[h+1]+v*k)),l[h+2]=Math.max(0,Math.min(255,l[h+2]+b*k))}}}}},On.prototype.findClosest=function(e,t){return this.findClosestRGB((16711680&e)>>16,(65280&e)>>8,255&e,t)},On.prototype.findClosestRGB=function(e,t,n,o){if(null===this.colorTab)return-1;if(this.neuQuant&&!o)return this.neuQuant.lookupRGB(e,t,n);for(var r=0,a=16777216,i=this.colorTab.length,l=0,s=0;l<i;s++){var d=e-(255&this.colorTab[l++]),c=t-(255&this.colorTab[l++]),u=n-(255&this.colorTab[l++]),h=d*d+c*c+u*u;(!o||this.usedEntry[s])&&h<a&&(a=h,r=s)}return r},On.prototype.getImagePixels=function(){var e=this.width,t=this.height;this.pixels=new Uint8Array(e*t*3);for(var n=this.image,o=0,r=0,a=0;a<t;a++)for(var i=0;i<e;i++)this.pixels[r++]=n[o++],this.pixels[r++]=n[o++],this.pixels[r++]=n[o++],o++},On.prototype.writeGraphicCtrlExt=function(){var e,t;this.out.writeByte(33),this.out.writeByte(249),this.out.writeByte(4),null===this.transparent?(e=0,t=0):(e=1,t=2),this.dispose>=0&&(t=7&this.dispose),t<<=2,this.out.writeByte(0|t|e),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},On.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame||this.globalPalette?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},On.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},On.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes("NETSCAPE2.0"),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},On.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);for(var e=768-this.colorTab.length,t=0;t<e;t++)this.out.writeByte(0)},On.prototype.writeShort=function(e){this.out.writeByte(255&e),this.out.writeByte(e>>8&255)},On.prototype.writePixels=function(){new Ln(this.width,this.height,this.indexedPixels,this.colorDepth).encode(this.out)},On.prototype.stream=function(){return this.out};var Fn=globalThis&&globalThis.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,a){function i(e){try{s(o.next(e))}catch(t){a(t)}}function l(e){try{s(o.throw(e))}catch(t){a(t)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}s((o=o.apply(e,t||[])).next())}))};const{Canvas:jn}=Yt,zn=.4;function Un(e){if(e)return new Promise((function(n,o){if("data"==e.slice(0,4)){let r=new Image;return r.onload=function(){n(r),t(r)},r.onerror=function(){o("Image load error"),t(r)},void(r.src=e)}let r=new Image;r.setAttribute("crossOrigin","Anonymous"),r.onload=function(){n(r)},r.onerror=function(){o("Image load error")},r.src=e}));function t(e){e.onload=null,e.onerror=null}}class $n{constructor(e){const t=Object.assign({},e);if(Object.keys($n.defaultOptions).forEach((e=>{e in t||Object.defineProperty(t,e,{value:$n.defaultOptions[e],enumerable:!0,writable:!0})})),t.components?"object"==typeof t.components&&Object.keys($n.defaultComponentOptions).forEach((e=>{e in t.components?Object.defineProperty(t.components,e,{value:Object.assign(Object.assign({},$n.defaultComponentOptions[e]),t.components[e]),enumerable:!0,writable:!0}):Object.defineProperty(t.components,e,{value:$n.defaultComponentOptions[e],enumerable:!0,writable:!0})})):t.components=$n.defaultComponentOptions,null!==t.dotScale&&void 0!==t.dotScale){if(t.dotScale<=0||t.dotScale>1)throw new Error("dotScale should be in range (0, 1].");t.components.data.scale=t.dotScale,t.components.timing.scale=t.dotScale,t.components.alignment.scale=t.dotScale}this.options=t,this.canvas=new jn(e.size,e.size),this.canvasContext=this.canvas.getContext("2d"),this.qrCode=new bn(-1,this.options.correctLevel),Number.isInteger(this.options.maskPattern)&&(this.qrCode.maskPattern=this.options.maskPattern),Number.isInteger(this.options.version)&&(this.qrCode.typeNumber=this.options.version),this.qrCode.addData(this.options.text),this.qrCode.make()}draw(){return new Promise((e=>this._draw().then(e)))}_clear(){this.canvasContext.clearRect(0,0,this.canvas.width,this.canvas.height)}static _prepareRoundedCornerClip(e,t,n,o,r,a){e.beginPath(),e.moveTo(t,n),e.arcTo(t+o,n,t+o,n+r,a),e.arcTo(t+o,n+r,t,n+r,a),e.arcTo(t,n+r,t,n,a),e.arcTo(t,n,t+o,n,a),e.closePath()}static _getAverageRGB(e){const t={r:0,g:0,b:0};let n,o,r=-4;const a={r:0,g:0,b:0};let i=0;o=e.naturalHeight||e.height,n=e.naturalWidth||e.width;const l=new jn(n,o).getContext("2d");if(!l)return t;let s;l.drawImage(e,0,0);try{s=l.getImageData(0,0,n,o)}catch(d){return t}for(;(r+=20)<s.data.length;)s.data[r]>200||s.data[r+1]>200||s.data[r+2]>200||(++i,a.r+=s.data[r],a.g+=s.data[r+1],a.b+=s.data[r+2]);return a.r=~~(a.r/i),a.g=~~(a.g/i),a.b=~~(a.b/i),a}static _drawDot(e,t,n,o,r=0,a=1){e.fillRect((t+r)*o,(n+r)*o,a*o,a*o)}static _drawAlignProtector(e,t,n,o){e.clearRect((t-2)*o,(n-2)*o,5*o,5*o),e.fillRect((t-2)*o,(n-2)*o,5*o,5*o)}static _drawAlign(e,t,n,o,r=0,a=1,i,l){const s=e.fillStyle;e.fillStyle=i,new Array(4).fill(0).map(((i,l)=>{$n._drawDot(e,t-2+l,n-2,o,r,a),$n._drawDot(e,t+2,n-2+l,o,r,a),$n._drawDot(e,t+2-l,n+2,o,r,a),$n._drawDot(e,t-2,n+2-l,o,r,a)})),$n._drawDot(e,t,n,o,r,a),l||(e.fillStyle="rgba(255, 255, 255, 0.6)",new Array(2).fill(0).map(((i,l)=>{$n._drawDot(e,t-1+l,n-1,o,r,a),$n._drawDot(e,t+1,n-1+l,o,r,a),$n._drawDot(e,t+1-l,n+1,o,r,a),$n._drawDot(e,t-1,n+1-l,o,r,a)}))),e.fillStyle=s}_draw(){var e,t,n,o,r,a,i,l,s,d,c,u,h,f,p,g,m,v,b;return Fn(this,void 0,void 0,(function*(){const y=null===(e=this.qrCode)||void 0===e?void 0:e.moduleCount,w=this.options.size;let C=this.options.margin;(C<0||2*C>=w)&&(C=0);const x=Math.ceil(C),k=w-2*C,_=this.options.whiteMargin,T=this.options.backgroundDimming,P=Math.ceil(k/y),A=P*y,S=A+2*x,R=new jn(S,S),B=R.getContext("2d");this._clear(),B.save(),B.translate(x,x);const M=new jn(S,S),I=M.getContext("2d");let D=null,L=[];if(this.options.gifBackground){const e=(e=>{const t=new Uint8Array(e);return Jt({data:t,pos:0},pn)})(this.options.gifBackground);if(D=e,E=!0,L=(N=e).frames.filter((e=>e.image)).map((e=>gn(e,N.gct,E))),this.options.autoColor){let e=0,t=0,n=0,o=0;for(let r=0;r<L[0].colorTable.length;r++){const a=L[0].colorTable[r];a[0]>200||a[1]>200||a[2]>200||0===a[0]&&0===a[1]&&0===a[2]||(o++,e+=a[0],t+=a[1],n+=a[2])}e=~~(e/o),t=~~(t/o),n=~~(n/o),this.options.colorDark=`rgb(${e},${t},${n})`}}else if(this.options.backgroundImage){const e=yield Un(this.options.backgroundImage);if(this.options.autoColor){const t=$n._getAverageRGB(e);this.options.colorDark=`rgb(${t.r},${t.g},${t.b})`}I.drawImage(e,0,0,e.width,e.height,0,0,S,S),I.rect(0,0,S,S),I.fillStyle=T,I.fill()}else I.rect(0,0,S,S),I.fillStyle=this.options.colorLight,I.fill();var N,E;const O=xn.getPatternPosition(this.qrCode.typeNumber),F=(null===(n=null===(t=this.options.components)||void 0===t?void 0:t.data)||void 0===n?void 0:n.scale)||zn,j=.5*(1-F);for(let e=0;e<y;e++)for(let t=0;t<y;t++){const n=this.qrCode.isDark(e,t),o=t<8&&(e<8||e>=y-8)||t>=y-8&&e<8;let r=o||6==e&&t>=8&&t<=y-8||6==t&&e>=8&&e<=y-8;for(let l=1;l<O.length-1;l++)r=r||e>=O[l]-2&&e<=O[l]+2&&t>=O[l]-2&&t<=O[l]+2;const a=t*P+(r?0:j*P),i=e*P+(r?0:j*P);B.strokeStyle=n?this.options.colorDark:this.options.colorLight,B.lineWidth=.5,B.fillStyle=n?this.options.colorDark:this.options.colorLight,0===O.length?r||B.fillRect(a,i,(r?1:F)*P,(r?1:F)*P):r||t<y-4&&t>=y-4-5&&e<y-4&&e>=y-4-5||B.fillRect(a,i,(r?1:F)*P,(r?1:F)*P)}const z=O[O.length-1],U=this.options.colorLight;if(B.fillStyle=U,B.fillRect(0,0,8*P,8*P),B.fillRect(0,(y-8)*P,8*P,8*P),B.fillRect((y-8)*P,0,8*P,8*P),(null===(r=null===(o=this.options.components)||void 0===o?void 0:o.timing)||void 0===r?void 0:r.protectors)&&(B.fillRect(8*P,6*P,(y-8-8)*P,P),B.fillRect(6*P,8*P,P,(y-8-8)*P)),(null===(i=null===(a=this.options.components)||void 0===a?void 0:a.cornerAlignment)||void 0===i?void 0:i.protectors)&&$n._drawAlignProtector(B,z,z,P),null===(s=null===(l=this.options.components)||void 0===l?void 0:l.alignment)||void 0===s?void 0:s.protectors)for(let e=0;e<O.length;e++)for(let t=0;t<O.length;t++){const n=O[t],o=O[e];(6!==n||6!==o&&o!==z)&&(6!==o||6!==n&&n!==z)&&(n===z&&o===z||$n._drawAlignProtector(B,n,o,P))}B.fillStyle=this.options.colorDark,B.fillRect(0,0,7*P,P),B.fillRect((y-7)*P,0,7*P,P),B.fillRect(0,6*P,7*P,P),B.fillRect((y-7)*P,6*P,7*P,P),B.fillRect(0,(y-7)*P,7*P,P),B.fillRect(0,(y-7+6)*P,7*P,P),B.fillRect(0,0,P,7*P),B.fillRect(6*P,0,P,7*P),B.fillRect((y-7)*P,0,P,7*P),B.fillRect((y-7+6)*P,0,P,7*P),B.fillRect(0,(y-7)*P,P,7*P),B.fillRect(6*P,(y-7)*P,P,7*P),B.fillRect(2*P,2*P,3*P,3*P),B.fillRect((y-7+2)*P,2*P,3*P,3*P),B.fillRect(2*P,(y-7+2)*P,3*P,3*P);const $=(null===(c=null===(d=this.options.components)||void 0===d?void 0:d.timing)||void 0===c?void 0:c.scale)||zn,q=.5*(1-$);for(let e=0;e<y-8;e+=2)$n._drawDot(B,8+e,6,P,q,$),$n._drawDot(B,6,8+e,P,q,$);const K=(null===(h=null===(u=this.options.components)||void 0===u?void 0:u.cornerAlignment)||void 0===h?void 0:h.scale)||zn,H=.5*(1-K);$n._drawAlign(B,z,z,P,H,K,this.options.colorDark,(null===(p=null===(f=this.options.components)||void 0===f?void 0:f.cornerAlignment)||void 0===p?void 0:p.protectors)||!1);const G=(null===(m=null===(g=this.options.components)||void 0===g?void 0:g.alignment)||void 0===m?void 0:m.scale)||zn,V=.5*(1-G);for(let e=0;e<O.length;e++)for(let t=0;t<O.length;t++){const n=O[t],o=O[e];(6!==n||6!==o&&o!==z)&&(6!==o||6!==n&&n!==z)&&(n===z&&o===z||$n._drawAlign(B,n,o,P,V,G,this.options.colorDark,(null===(b=null===(v=this.options.components)||void 0===v?void 0:v.alignment)||void 0===b?void 0:b.protectors)||!1))}if(_&&(B.fillStyle=this.options.backgroundColor,B.fillRect(-x,-x,S,x),B.fillRect(-x,A,S,x),B.fillRect(A,-x,x,S),B.fillRect(-x,-x,x,S)),this.options.logoImage){const e=yield Un(this.options.logoImage);let t=this.options.logoScale,n=this.options.logoMargin,o=this.options.logoCornerRadius;(t<=0||t>=1)&&(t=.2),n<0&&(n=0),o<0&&(o=0);const r=A*t,a=.5*(S-r),i=a;B.restore(),B.fillStyle=this.options.logoBackgroundColor,B.save(),$n._prepareRoundedCornerClip(B,a-n,i-n,r+2*n,r+2*n,o+n),B.clip();const l=B.globalCompositeOperation;B.globalCompositeOperation="destination-out",B.fill(),B.globalCompositeOperation=l,B.restore(),B.save(),$n._prepareRoundedCornerClip(B,a,i,r,r,o),B.clip(),B.drawImage(e,a,i,r,r),B.restore(),B.save(),B.translate(x,x)}if(D){let e,t,n,o,r,a;if(L.forEach((function(i){e||(e=new On(w,w),e.setDelay(i.delay),e.setRepeat(0));const{width:l,height:s}=i.dims;t||(t=new jn(l,s),n=t.getContext("2d"),n.rect(0,0,t.width,t.height),n.fillStyle="#ffffff",n.fill()),o&&a&&l===o.width&&s===o.height||(o=new jn(l,s),r=o.getContext("2d"),a=r.createImageData(l,s)),a.data.set(i.patch),r.putImageData(a,0,0),n.drawImage(o.getContext("2d").canvas,i.dims.left,i.dims.top);const d=new jn(S,S),c=d.getContext("2d");c.drawImage(t.getContext("2d").canvas,0,0,S,S),c.rect(0,0,S,S),c.fillStyle=T,c.fill(),c.drawImage(R.getContext("2d").canvas,0,0,S,S);const u=new jn(w,w),h=u.getContext("2d");h.drawImage(d.getContext("2d").canvas,0,0,w,w),e.addFrame(h.getImageData(0,0,u.width,u.height).data)})),!e)throw new Error("No frames.");if(e.finish(),qn(this.canvas)){const t=e.stream().toFlattenUint8Array().reduce(((e,t)=>e+String.fromCharCode(t)),"");return Promise.resolve(`data:image/gif;base64,${window.btoa(t)}`)}return Promise.resolve(Buffer.from(e.stream().toFlattenUint8Array()))}{I.drawImage(R.getContext("2d").canvas,0,0,S,S),B.drawImage(M.getContext("2d").canvas,-x,-x,S,S);const e=new jn(w,w);e.getContext("2d").drawImage(R.getContext("2d").canvas,0,0,w,w),this.canvas=e;const t=this.options.gifBackground?"gif":"png";return qn(this.canvas)?Promise.resolve(this.canvas.toDataURL(t)):Promise.resolve(this.canvas.toBuffer(t))}}))}}function qn(e){try{return e instanceof HTMLElement}catch(t){return"object"==typeof e&&1===e.nodeType&&"object"==typeof e.style&&"object"==typeof e.ownerDocument}}$n.CorrectLevel=yn,$n.defaultComponentOptions={data:{scale:.4},timing:{scale:.5,protectors:!1},alignment:{scale:.5,protectors:!1},cornerAlignment:{scale:.5,protectors:!0}},$n.defaultOptions={text:"",size:400,margin:20,colorDark:"#000000",colorLight:"rgba(255, 255, 255, 0.6)",correctLevel:yn.M,backgroundImage:void 0,backgroundDimming:"rgba(0,0,0,0)",logoImage:void 0,logoScale:.2,logoMargin:4,logoCornerRadius:8,whiteMargin:!0,components:$n.defaultComponentOptions,autoColor:!0,logoBackgroundColor:"#ffffff",backgroundColor:"#ffffff"};const Kn=d({name:"TheQrCode",props:{text:{type:String,required:!0},qid:{type:String},correctLevel:{type:Number,default:0},size:{type:Number,default:220},margin:{type:Number,default:20},colorDark:{type:String,default:"#000000"},colorLight:{type:String,default:"#FFFFFF"},bgSrc:{type:String,default:void 0},background:{type:String,default:"rgba(0,0,0,0)"},backgroundDimming:{type:String,default:"rgba(0,0,0,0)"},logoSrc:{type:String,default:void 0},logoBackgroundColor:{type:String,default:"rgba(255,255,255,1)"},gifBgSrc:{type:String,default:void 0},logoScale:{type:Number,default:.2},logoMargin:{type:Number,default:0},logoCornerRadius:{type:Number,default:8},whiteMargin:{type:[Boolean,String],default:!0},dotScale:{type:Number,default:1},autoColor:{type:[Boolean,String],default:!0},binarize:{type:[Boolean,String],default:!1},binarizeThreshold:{type:Number,default:128},callback:{type:Function,default:function(){}},bindElement:{type:Boolean,default:!0},backgroundColor:{type:String,default:"#FFFFFF"},components:{default:function(){return{data:{scale:1},timing:{scale:1,protectors:!1},alignment:{scale:1,protectors:!1},cornerAlignment:{scale:1,protectors:!0}}}}},data:()=>({imgUrl:""}),watch:{$props:{deep:!0,handler(){this.main()}}},mounted(){this.main()},methods:{async main(){if(this.gifBgSrc){const t=await(e=this.gifBgSrc,new Promise((t=>{const n=new XMLHttpRequest;n.responseType="blob",n.onload=function(){const e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsArrayBuffer(n.response)},n.open("GET",e),n.send()}))),n=this.logoSrc;return void this.render(void 0,n,t)}var e;const t=this.bgSrc,n=this.logoSrc;this.render(t,n)},async render(e,t,n){console.log(e,t,n),new $n({gifBackground:n,text:this.text,size:this.size}).draw().then((e=>{console.log("🚀 ~ dataUri:",e),this.imgUrl=e,this.callback&&this.callback(e,this.qid)}))}},render(){return xe(ze,null,[this.bindElement&&this.imgUrl&&xe("img",{style:"display: inline-block",src:this.imgUrl},null)])}}),Hn=d({name:"school-info",setup(){const e=ye(),t=we({areaList:[]}),n=we({name:e.info.schoolInfos?.[0]?.name,logo:e.info.schoolInfos?.[0]?.logo||e.info.avatar,provinceCode:e.info.schoolInfos?.[0]?.provinceCode||"",cityCode:e.info.schoolInfos?.[0]?.cityCode||"",regionCode:e.info.schoolInfos?.[0]?.regionCode||""}),o=we({loading:!1,schoolLoading:!0,dataList:[],disabled:!0,modal:!1,qrModal:!1}),r=async()=>{o.loading=!0;const t=await(n={schoolId:e.info.schoolInfos?.[0]?.id,page:1,rows:1e3},ve.post("/edu-app/teacher/page",{data:n}));var n;o.loading=!1,200===t?.code&&Array.isArray(t?.data?.rows)&&(o.dataList=t.data.rows)};Ce((()=>{(async()=>{const e=await dt();200===e?.code&&(t.areaList=e.data)})(),r()}));const a=Ue(),i=be(),l=e=>{const t="LOCKED"===e.status?"解冻":"冻结";a.warning({title:"温馨提示",content:`是否${t}"${e.nickname}"?`,positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{var n;await(n={ids:[e.id],status:"LOCKED"===e.status?"ACTIVATION":"LOCKED"},ve.post("/edu-app/teacher/updateStatus",{data:n})),r(),i.success(t+"成功")}})},s=e=>{a.warning({title:"警告",content:`重置"${e.nickname}"的密码,是否继续?`,positiveText:"确定",negativeText:"取消",onPositiveClick:async()=>{var t;await(t={userId:e.id,password:"ktyq"+e.phone.substr(7),clientType:"TEACHER"},ve.post("/edu-app/user/resetPassword",{data:t,requestType:"form"})),i.success("重置成功")}})},d=h(),c=()=>{d.value?.validate((async t=>{var r;t||(o.schoolLoading=!1,await(r={...e.info.schoolInfos?.[0],...n},ve.post("/edu-app/school/update",{data:r})),o.schoolLoading=!0,i.success("修改成功"),o.disabled=!0)}))},u=()=>{const t=`tenantId=${e.info.schoolInfos?.[0]?.tenantId}&schoolId=${e.info.schoolInfos?.[0]?.id}&schoolName=${e.info.schoolInfos?.[0]?.name}`,n=`${location.origin}/classroom-app/#/teaher-register?`+t;return console.log(n),n};return()=>xe("div",{class:gt},[xe(Me,{wrapItem:!1,align:"center"},{default:()=>[xe("div",{class:ut},[xe(ke,{previewDisabled:!1,width:100,height:100,src:n.logo},null),xe("div",{style:{display:o.disabled?"none":""},class:ht},[_e("修改头像"),o.schoolLoading&&xe(Ve,{class:[ft],cropper:!0,"onUpdate:fileList":e=>{n.logo=e}},null)])]),xe(Te,{ref:d,class:pt,model:n,style:{paddingTop:"30px",paddingLeft:"80px"},disabled:o.disabled},{default:()=>[xe(Me,{size:100},{default:()=>[xe(Se,{label:"学校名称",path:"name",showRequireMark:!1,rule:[{required:!0,message:"请填写学校名称",trigger:"blur"}]},{default:()=>[xe(Re,{bordered:!o.disabled,maxlength:20,value:n.name,"onUpdate:value":e=>n.name=e},null)]}),xe(Se,{label:"城区"},{default:()=>[xe(lt,{placeholder:"请选择城区",bordered:!o.disabled,options:t.areaList,labelField:"name",valueField:"code",childrenField:"areas",checkStrategy:"child",expandTrigger:"hover",defaultValue:e.info.schoolInfos?.[0]?.regionCode||e.info.schoolInfos?.[0]?.cityCode,"onUpdate:value":(e,t,o)=>{n.provinceCode=o[0]?.code,n.cityCode=o[1]?.code,n.regionCode=o[2]?.code}},null)]}),xe(Se,null,{default:()=>[o.disabled?xe(Me,{class:bt,align:"center",justify:"end"},{default:()=>[xe(Ie,{class:yt,color:"#f24433",onClick:()=>o.disabled=!1},{default:()=>[_e("修改信息")]})]}):xe(Me,{class:bt,align:"center",justify:"end"},{default:()=>[xe(Ie,{class:yt,onClick:()=>o.disabled=!0},{default:()=>[_e("取消")]}),xe(Ie,{class:yt,loading:!o.schoolLoading,type:"primary",onClick:()=>c()},{default:()=>[_e("完成")]})]})]})]})]})]}),xe(Me,{style:{padding:"32px 0"}},{default:()=>[xe(Ie,{type:"primary",renderIcon:()=>xe($e,{component:xe(xt,null,null)},null),onClick:()=>o.modal=!0},{default:()=>[_e("添加老师")]}),xe(Ie,{type:"primary",onClick:()=>o.qrModal=!0},{default:()=>[_e("老师注册二维码")]})]}),xe(qe,{loading:o.loading,columns:[{title:"老师姓名",key:"nickname"},{title:"手机号码",key:"phone"},{title:"性别",key:"questionTypeCode",render:e=>xe("div",null,[e.gender?"男":"女"])},{title:"状态",key:"statusName",render:e=>xe("div",null,["ACTIVATION"===e.status?xe(Ie,{text:!0},{default:()=>[e.statusName]}):xe(Ie,{class:mt,text:!0},{default:()=>[e.statusName]})])},{title:"操作",key:"titleImg",render:e=>xe(Me,null,{default:()=>[xe(Ie,{type:"primary",quaternary:!0,size:"small",onClick:()=>s(e)},{default:()=>[_e("重置密码")]}),"ACTIVATION"===e.status?xe(Ie,{type:"primary",quaternary:!0,size:"small",onClick:()=>l(e)},{default:()=>[_e("冻结")]}):xe(Ie,{class:mt,quaternary:!0,size:"small",onClick:()=>l(e)},{default:()=>[_e("解冻")]})]})}],data:o.dataList},null),xe(De,{class:vt,show:o.modal,"onUpdate:show":e=>o.modal=e,title:"添加老师",preset:"dialog",showIcon:!1},{default:()=>[xe(kt,{areaList:t.areaList,onClose:()=>{o.modal=!1,r()}},null)]}),xe(De,{show:o.qrModal,"onUpdate:show":e=>o.qrModal=e,title:"二维码",preset:"dialog",showIcon:!1},{default:()=>[xe("div",{style:{textAlign:"center"}},[xe(Kn,{text:u(),size:300},null)])]})])}});e("default",d({name:"base-setting",setup(e,{emit:t,attrs:o}){const r=h("person"),a=ye(),i=Ke();return i.query.activeTab&&(r.value=i.query.activeTab),oe((()=>i.query.activeTab),(e=>{r.value=e})),()=>xe("div",{class:n.listWrap},[xe(He,{class:n.customTabs,value:r.value,"onUpdate:value":e=>r.value=e,size:"large",animated:!0,"pane-wrapper-style":"margin: 0 -4px","pane-style":"padding-left: 4px; padding-right: 4px; box-sizing: border-box;"},{default:()=>[xe(Ge,{name:"person",tab:"个人信息"},{default:()=>[xe(ct,null,null)]}),a.info.isSuperAdmin&&xe(Ge,{name:"school",tab:"学校设置"},{default:()=>[xe(Hn,null,null)]})]})])}}))}}}));
|