` or `boolean`"),Do(x)?x.then($=>{$&&y()}).catch($=>{Kt(ju,`some error occurred: ${$}`)}):x&&y()},S=()=>{var E,x;(x=(E=f.value)==null?void 0:E.focus)==null||x.call(E)};return mt(()=>{f.value.checked=b.value}),t({focus:S,checked:b}),(E,x)=>(O(),H("div",{class:I(v.value),onClick:Je(C,["prevent"])},[W("input",{id:i(u),ref_key:"input",ref:f,class:I(i(r).e("input")),type:"checkbox",role:"switch","aria-checked":b.value,"aria-disabled":i(c),"aria-label":e.ariaLabel,name:e.name,"true-value":e.activeValue,"false-value":e.inactiveValue,disabled:i(c),tabindex:e.tabindex,onChange:y,onKeydown:an(C,["enter"])},null,42,K7),!e.inlinePrompt&&(e.inactiveIcon||e.inactiveText||E.$slots.inactive)?(O(),H("span",{key:0,class:I(g.value)},[ne(E.$slots,"inactive",{},()=>[e.inactiveIcon?(O(),oe(i(Ve),{key:0},{default:J(()=>[(O(),oe(dt(e.inactiveIcon)))]),_:1})):te("v-if",!0),!e.inactiveIcon&&e.inactiveText?(O(),H("span",{key:1,"aria-hidden":b.value},Se(e.inactiveText),9,W7)):te("v-if",!0)])],2)):te("v-if",!0),W("span",{class:I(i(r).e("core")),style:je(p.value)},[e.inlinePrompt?(O(),H("div",{key:0,class:I(i(r).e("inner"))},[b.value?(O(),H("div",{key:1,class:I(i(r).e("inner-wrapper"))},[ne(E.$slots,"active",{},()=>[e.activeIcon?(O(),oe(i(Ve),{key:0},{default:J(()=>[(O(),oe(dt(e.activeIcon)))]),_:1})):te("v-if",!0),!e.activeIcon&&e.activeText?(O(),H("span",q7,Se(e.activeText),1)):te("v-if",!0)])],2)):(O(),H("div",{key:0,class:I(i(r).e("inner-wrapper"))},[ne(E.$slots,"inactive",{},()=>[e.inactiveIcon?(O(),oe(i(Ve),{key:0},{default:J(()=>[(O(),oe(dt(e.inactiveIcon)))]),_:1})):te("v-if",!0),!e.inactiveIcon&&e.inactiveText?(O(),H("span",j7,Se(e.inactiveText),1)):te("v-if",!0)])],2))],2)):te("v-if",!0),W("div",{class:I(i(r).e("action"))},[e.loading?(O(),oe(i(Ve),{key:0,class:I(i(r).is("loading"))},{default:J(()=>[U(i(rl))]),_:1},8,["class"])):b.value?ne(E.$slots,"active-action",{key:1},()=>[e.activeActionIcon?(O(),oe(i(Ve),{key:0},{default:J(()=>[(O(),oe(dt(e.activeActionIcon)))]),_:1})):te("v-if",!0)]):b.value?te("v-if",!0):ne(E.$slots,"inactive-action",{key:2},()=>[e.inactiveActionIcon?(O(),oe(i(Ve),{key:0},{default:J(()=>[(O(),oe(dt(e.inactiveActionIcon)))]),_:1})):te("v-if",!0)])],2)],6),!e.inlinePrompt&&(e.activeIcon||e.activeText||E.$slots.active)?(O(),H("span",{key:1,class:I(m.value)},[ne(E.$slots,"active",{},()=>[e.activeIcon?(O(),oe(i(Ve),{key:0},{default:J(()=>[(O(),oe(dt(e.activeIcon)))]),_:1})):te("v-if",!0),!e.activeIcon&&e.activeText?(O(),H("span",{key:1,"aria-hidden":!b.value},Se(e.activeText),9,Y7)):te("v-if",!0)])],2)):te("v-if",!0)],2))}}),G7=U7;const X7=ut(G7),J7={data:{type:Array,default:()=>[]},size:Pn,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,rowExpandable:{type:Function},defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:[String,Object,Array,Boolean],default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,appendFilterPanelTo:String,scrollbarTabindex:{type:[Number,String],default:void 0},allowDragLastColumn:{type:Boolean,default:!0},preserveExpandedContent:Boolean,nativeScrollbar:Boolean};let Z7=1,Q7=1;const eq=e=>`${e}-table_${Z7++}`,tq=e=>`${e}_column_${Q7++}`,sp=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},nq=function(e,t,n,a,l){if(!t&&!a&&(!l||me(l)&&!l.length))return e;De(n)?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const o=a?null:function(r,u){return l?qw(Ln(l),c=>De(c)?Sn(r,c):c(r,u,e)):(t!=="$key"&&st(r)&&"$value"in r&&(r=r.$value),[st(r)?t?Sn(r,t):null:r])},s=function(r,u){var c,d,f,v,g;if(a)return a(r.value,u.value);for(let m=0,p=((c=r.key)==null?void 0:c.length)??0;m((g=u.key)==null?void 0:g[m]))return 1}return 0};return e.map((r,u)=>({value:r,index:u,key:o?o(r,u):null})).sort((r,u)=>{let c=s(r,u);return c||(c=r.index-u.index),c*+n}).map(r=>r.value)},E2=function(e,t){let n=null;return e.columns.forEach(a=>{a.id===t&&(n=a)}),n},aq=function(e,t){let n=null;for(let a=0;a{if(!e)throw new Error("Row is required when get row identity");if(De(t)){if(!t.includes("."))return`${e[t]}`;const n=t.split(".");let a=e;for(const l of n)a=a[l];return`${a}`}else if(We(t))return t.call(null,e);return""},nr=function(e,t,n=!1,a="children"){const l=e||[],o={};return l.forEach((s,r)=>{if(o[En(s,t)]={row:s,index:r},n){const u=s[a];me(u)&&Object.assign(o,nr(u,t,!0,a))}}),o};function lq(e,t){const n={};let a;for(a in e)n[a]=e[a];for(a in t)if(Dt(t,a)){const l=t[a];xt(l)||(n[a]=l)}return n}function hm(e){return e===""||xt(e)||(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function x2(e){return e===""||xt(e)||(e=hm(e),Number.isNaN(e)&&(e=80)),e}function oq(e){return He(e)?e:De(e)?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function sq(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...a)=>t(n(...a)))}function Xs(e,t,n,a,l,o,s){let r=o??0,u=!1;const d=(()=>{if(!s)return e.indexOf(t);const p=En(t,s);return e.findIndex(h=>En(h,s)===p)})(),f=d!==-1,v=l==null?void 0:l.call(null,t,r),g=p=>{p==="add"?e.push(t):e.splice(d,1),u=!0},m=p=>{let h=0;const b=(a==null?void 0:a.children)&&p[a.children];return b&&me(b)&&(h+=b.length,b.forEach(y=>{h+=m(y)})),h};return(!l||v)&&(Wt(n)?n&&!f?g("add"):!n&&f&&g("remove"):g(f?"remove":"add")),!(a!=null&&a.checkStrictly)&&(a!=null&&a.children)&&me(t[a.children])&&t[a.children].forEach(p=>{const h=Xs(e,p,n??!f,a,l,r+1,s);r+=m(p)+1,h&&(u=h)}),u}function rq(e,t,n="children",a="hasChildren",l=!1){const o=r=>!(me(r)&&r.length);function s(r,u,c){t(r,u,c),u.forEach(d=>{if(d[a]&&l){t(d,null,c+1);return}const f=d[n];o(f)||s(d,f,c+1)})}e.forEach(r=>{if(r[a]&&l){t(r,null,0);return}const u=r[n];o(u)||s(r,u,0)})}const iq=(e,t,n,a)=>{const l=We(a==null?void 0:a.tooltipFormatter)?a.tooltipFormatter({row:n,column:a,cellValue:_o(n,a.property).value}):void 0;return Jt(l)?{slotContent:l,content:null,strategy:"fixed",...e}:{slotContent:null,content:l??t,strategy:"fixed",...e}};let pn=null;function uq(e,t,n,a,l,o){var g;const s=iq(e,t,n,a),r={...s,slotContent:void 0};if((pn==null?void 0:pn.trigger)===l){const m=(g=pn.vm)==null?void 0:g.component;Uw(m==null?void 0:m.props,r),m&&s.slotContent&&(m.slots.content=()=>[s.slotContent]);return}pn==null||pn();const u=o==null?void 0:o.refs.tableWrapper,c=u==null?void 0:u.dataset.prefix,d=U(zn,{virtualTriggering:!0,virtualRef:l,appendTo:u,placement:"top",transition:"none",offset:0,hideAfter:0,...r},s.slotContent?{content:()=>s.slotContent}:void 0);d.appContext={...o.appContext,...o};const f=document.createElement("div");Fo(d,f),d.component.exposed.onOpen();const v=u==null?void 0:u.querySelector(`.${c}-scrollbar__wrap`);pn=()=>{var p,h;(h=(p=d.component)==null?void 0:p.exposed)!=null&&h.onClose&&d.component.exposed.onClose(),Fo(null,f);const m=pn;v==null||v.removeEventListener("scroll",m),m.trigger=void 0,m.vm=void 0,pn=null},pn.trigger=l??void 0,pn.vm=d,v==null||v.addEventListener("scroll",pn)}function T2(e){return e.children?qw(e.children,T2):[e]}function o0(e,t){return e+t.colSpan}const $2=(e,t,n,a)=>{let l=0,o=e;const s=n.states.columns.value;if(a){const u=T2(a[e]);l=s.slice(0,s.indexOf(u[0])).reduce(o0,0),o=l+u.reduce(o0,0)-1}else l=e;let r;switch(t){case"left":o=s.length-n.states.rightFixedLeafColumnsLength.value&&(r="right");break;default:o=s.length-n.states.rightFixedLeafColumnsLength.value&&(r="right")}return r?{direction:r,start:l,after:o}:{}},mm=(e,t,n,a,l,o=0)=>{const s=[],{direction:r,start:u,after:c}=$2(t,n,a,l);if(r){const d=r==="left";s.push(`${e}-fixed-column--${r}`),d&&c+o===a.states.fixedLeafColumnsLength.value-1?s.push("is-last-column"):!d&&u-o===a.states.columns.value.length-a.states.rightFixedLeafColumnsLength.value&&s.push("is-first-column")}return s};function s0(e,t){return e+(Ld(t.realWidth)||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const gm=(e,t,n,a)=>{const{direction:l,start:o=0,after:s=0}=$2(e,t,n,a);if(!l)return;const r={},u=l==="left",c=n.states.columns.value;return u?r.left=c.slice(0,o).reduce(s0,0):r.right=c.slice(s+1).reverse().reduce(s0,0),r},Sr=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function O2(e){return e.some(t=>Jt(t)?!(t.type===Cn||t.type===ze&&!O2(t.children)):!0)?e:null}function cq(e){const t=ht(),n=B(!1),a=B([]),l=(c,d)=>{const f=t.store.states.rowExpandable.value;return(f==null?void 0:f(c,d))??!0};return{updateExpandRows:()=>{const c=e.data.value||[],d=e.rowKey.value;if(n.value)a.value=t.store.states.rowExpandable.value?c.filter(l):c.slice();else if(d){const f=nr(a.value,d);a.value=c.filter((v,g)=>{const m=En(v,d);return!!f[m]&&l(v,g)})}else a.value=[]},toggleRowExpansion:(c,d)=>{const f=(e.data.value||[]).indexOf(c);f>-1&&!l(c,f)||Xs(a.value,c,d,void 0,void 0,void 0,e.rowKey.value)&&t.emit("expand-change",c,a.value.slice())},setExpandRowKeys:c=>{t.store.assertRowKey();const d=e.data.value||[],f=e.rowKey.value,v=nr(d,f);a.value=c.reduce((g,m)=>{const p=v[m];return p&&l(p.row,p.index)&&g.push(p.row),g},[])},isRowExpanded:c=>{const d=e.rowKey.value;return d?!!nr(a.value,d)[En(c,d)]:a.value.includes(c)},states:{expandRows:a,defaultExpandAll:n}}}function dq(e){const t=ht(),n=B(null),a=B(null),l=c=>{t.store.assertRowKey(),n.value=c,s(c)},o=()=>{n.value=null},s=c=>{const{data:d,rowKey:f}=e,v=a.value;let g=null;f.value&&(g=(i(d)||[]).find(m=>En(m,f.value)===c)??null),a.value=g??null,t.emit("current-change",a.value,v)};return{setCurrentRowKey:l,restoreCurrentRowKey:o,setCurrentRowByKey:s,updateCurrentRow:c=>{const d=a.value;if(c&&c!==d){a.value=c,t.emit("current-change",a.value,d);return}!c&&d&&(a.value=null,t.emit("current-change",null,d))},updateCurrentRowData:()=>{const c=e.rowKey.value,d=e.data.value||[],f=a.value;if(f&&!d.includes(f))if(c){const v=En(f,c);s(v)}else a.value=null,t.emit("current-change",null,f);else n.value&&(s(n.value),o())},states:{_currentRowKey:n,currentRow:a}}}function fq(e){const t=B([]),n=B({}),a=B(16),l=B(!1),o=B({}),s=B("hasChildren"),r=B("children"),u=B(!1),c=ht(),d=w(()=>{if(!e.rowKey.value)return{};const S=e.data.value||[];return v(S)}),f=w(()=>{const S=e.rowKey.value,E=Object.keys(o.value),x={};return E.length&&E.forEach($=>{if(o.value[$].length){const k={children:[]};o.value[$].forEach(T=>{const M=En(T,S);k.children.push(M),T[s.value]&&!x[M]&&(x[M]={children:[]})}),x[$]=k}}),x}),v=S=>{const E=e.rowKey.value,x={};return rq(S,($,k,T)=>{const M=En($,E);me(k)?x[M]={children:k.map(P=>En(P,E)),level:T}:l.value&&(x[M]={children:[],lazy:!0,level:T})},r.value,s.value,l.value),x},g=(S=!1,E)=>{var M,P;E||(E=(M=c.store)==null?void 0:M.states.defaultExpandAll.value);const x=d.value,$=f.value,k=Object.keys(x),T={};if(k.length){const N=i(n),A=[],j=(V,D)=>{if(S)return t.value?E||t.value.includes(D):!!(E||V!=null&&V.expanded);{const _=E||t.value&&t.value.includes(D);return!!(V!=null&&V.expanded||_)}};k.forEach(V=>{const D=N[V],_={...x[V]};if(_.expanded=j(D,V),_.lazy){const{loaded:F=!1,loading:L=!1}=D||{};_.loaded=!!F,_.loading=!!L,A.push(V)}T[V]=_});const z=Object.keys($);l.value&&z.length&&A.length&&z.forEach(V=>{var F;const D=N[V],_=$[V].children;if(A.includes(V)){if(((F=T[V].children)==null?void 0:F.length)!==0)throw new Error("[ElTable]children must be an empty array.");T[V].children=_}else{const{loaded:L=!1,loading:K=!1}=D||{};T[V]={lazy:!0,loaded:!!L,loading:!!K,expanded:j(D,V),children:_,level:void 0}}})}n.value=T,(P=c.store)==null||P.updateTableScrollY()};fe(()=>t.value,()=>{g(!0)},{deep:!0}),fe(()=>d.value,()=>{g()}),fe(()=>f.value,()=>{g()});const m=S=>{t.value=S,g()},p=S=>l.value&&S&&"loaded"in S&&!S.loaded,h=(S,E)=>{c.store.assertRowKey();const x=e.rowKey.value,$=En(S,x),k=$&&n.value[$];if($&&k&&"expanded"in k){const T=k.expanded;E=xt(E)?!k.expanded:E,n.value[$].expanded=E,T!==E&&c.emit("expand-change",S,E),E&&p(k)&&y(S,$,k),c.store.updateTableScrollY()}},b=S=>{c.store.assertRowKey();const E=e.rowKey.value,x=En(S,E),$=n.value[x];p($)?y(S,x,$):h(S,void 0)},y=(S,E,x)=>{const{load:$}=c.props;$&&!n.value[E].loaded&&(n.value[E].loading=!0,$(S,x,k=>{if(!me(k))throw new TypeError("[ElTable] data must be an array");n.value[E].loading=!1,n.value[E].loaded=!0,n.value[E].expanded=!0,k.length&&(o.value={...o.value,[E]:k}),c.emit("expand-change",S,!0)}))};return{loadData:y,loadOrToggle:b,toggleTreeExpansion:h,updateTreeExpandKeys:m,updateTreeData:g,updateKeyChildren:(S,E)=>{const{lazy:x,rowKey:$}=c.props;if(x){if(!$)throw new Error("[Table] rowKey is required in updateKeyChild");o.value[S]&&(o.value={...o.value,[S]:E})}},normalize:v,states:{expandRowKeys:t,treeData:n,indent:a,lazy:l,lazyTreeNodeMap:o,lazyColumnIdentifier:s,childrenColumnName:r,checkStrictly:u}}}const pq=(e,t)=>{const n=t.sortingColumn;return!n||De(n.sortable)?e:nq(e,t.sortProp,t.sortOrder,n.sortMethod,n.sortBy)},hc=e=>{const t=[];return e.forEach(n=>{n.children&&n.children.length>0?t.push.apply(t,hc(n.children)):t.push(n)}),t};function vq(){var Vt;const e=ht(),{size:t}=Vn((Vt=e.proxy)==null?void 0:Vt.$props),n=B(null),a=B([]),l=B([]),o=B(!1),s=B([]),r=B([]),u=B([]),c=B([]),d=B([]),f=B([]),v=B([]),g=B([]),m=[],p=B(0),h=B(0),b=B(0),y=B(!1),C=B([]),S=B({}),E=B(!1),x=B(!1),$=B(null),k=B(null),T=B({}),M=B(null),P=B(null),N=B(null),A=B(null),j=B(null);let z=[];const V=w(()=>n.value?nr(C.value,n.value):void 0),D=ce=>{var wt;const{childrenColumnName:Pe,lazyTreeNodeMap:Ue}=e.store.states,at=ce[Pe.value]??[];if(!n.value)return at;const gt=En(ce,n.value);return[...((wt=Ue.value)==null?void 0:wt[gt])??[],...at]};fe(a,()=>{var ce;e.state&&(K(!1),e.props.tableLayout==="auto"&&((ce=e.refs.tableHeaderRef)==null||ce.updateFixedColumnStyle()))},{deep:!0});const _=()=>{if(!n.value)throw new Error("[ElTable] prop row-key is required")},F=ce=>{var Pe;(Pe=ce.children)==null||Pe.forEach(Ue=>{Ue.fixed=ce.fixed,F(Ue)})},L=()=>{s.value.forEach(et=>{F(et)}),c.value=s.value.filter(et=>[!0,"left"].includes(et.fixed));const ce=s.value.find(et=>et.type==="selection");let Pe;ce&&ce.fixed!=="right"&&!c.value.includes(ce)&&s.value.indexOf(ce)===0&&c.value.length&&(c.value.unshift(ce),Pe=!0),d.value=s.value.filter(et=>et.fixed==="right");const Ue=s.value.filter(et=>(Pe?et.type!=="selection":!0)&&!et.fixed);r.value=Array.from(c.value).concat(Ue).concat(d.value);const at=hc(Ue),gt=hc(c.value),wt=hc(d.value);p.value=at.length,h.value=gt.length,b.value=wt.length,u.value=Array.from(gt).concat(at).concat(wt),o.value=c.value.length>0||d.value.length>0},K=(ce,Pe=!1)=>{ce&&L(),Pe?e.state.doLayout():e.state.debouncedUpdateLayout()},q=ce=>V.value?!!V.value[En(ce,n.value)]:C.value.includes(ce),X=w(()=>{const ce=new Map;if(!n.value||!$.value)return ce;let Pe=0;const Ue=at=>{me(at)&&at.forEach(gt=>{const wt=En(gt,n.value);ce.set(wt,Pe),Pe+=1;const et=D(gt);et.length&&Ue(et)})};return Ue(a.value||[]),ce}),Z=(ce={})=>{const{emitChange:Pe=!0}=ce;if(Rt.checkStrictly.value||!n.value){S.value={},z=[];return}const Ue=n.value,at=ce.rowIndexMap??X.value,gt=$.value,wt=new WeakMap,et=_e=>{const Nt=wt.get(_e);if(Nt)return Nt;const qt=En(_e,Ue);return wt.set(_e,qt),qt},Bt={},Re=[],Ye=new Set(C.value.map(_e=>et(_e))),Qe=[];let Xt=!1;const Me=(_e,Nt,qt)=>{const nn=Ye.has(Nt);qt&&!nn?(Qe.push(_e),Ye.add(Nt),Xt=!0):!qt&&nn&&(Ye.delete(Nt),Xt=!0)},Be=_e=>{let Nt=0,qt=0;return me(_e)?(_e.forEach(nn=>{const On=et(nn),Xa=D(nn);let pl=0,yo=0;if(Xa.length){const Te=Be(Xa);pl=Te.selectedCount,yo=Te.selectableCount}const Ja=gt?gt.call(null,nn,at.get(On)??0):!0;if(Ja&&yo>0){const Te=pl===yo;!Te&&pl!==0&&(Bt[On]=!0,Re.push(nn)),Me(nn,On,Te)}Ja&&(qt+=1,Ye.has(On)&&(Nt+=1)),Nt+=pl,qt+=yo}),{selectedCount:Nt,selectableCount:qt}):{selectedCount:Nt,selectableCount:qt}};if(Be(a.value||[]),Xt){const _e=C.value.filter(Nt=>Ye.has(et(Nt)));Qe.forEach(Nt=>{Ye.has(et(Nt))&&_e.push(Nt)}),C.value=_e}S.value=Bt,z=Re,Xt&&Pe&&e.emit("selection-change",C.value?C.value.slice():[])},Q=()=>{y.value=!1;const ce=C.value;C.value=[],S.value={},z=[],ce.length&&e.emit("selection-change",[])},ee=()=>{var Pe,Ue;let ce;if(n.value){ce=[];const at=(Ue=(Pe=e==null?void 0:e.store)==null?void 0:Pe.states)==null?void 0:Ue.childrenColumnName.value,gt=nr(a.value,n.value,!0,at),{lazyTreeNodeMap:wt}=e.store.states;wt.value&&Object.entries(wt.value).forEach(([et,Bt])=>{gt[et]&&Bt.forEach(Re=>{const Ye=En(Re,n.value);gt[Ye]||(gt[Ye]={row:Re,index:-1})})});for(const et in V.value)Dt(V.value,et)&&!gt[et]&&ce.push(V.value[et].row)}else ce=C.value.filter(at=>!a.value.includes(at));if(ce.length){const at=C.value.filter(gt=>!ce.includes(gt));C.value=at,Z({emitChange:!1}),e.emit("selection-change",[...at])}},ie=()=>(C.value||[]).slice(),ve=()=>z.slice(),pe=(ce,Pe,Ue)=>{var Ye;if(!n.value||Rt.checkStrictly.value||!Rt.lazy.value)return;const{lazyTreeNodeMap:at,childrenColumnName:gt}=e.store.states,wt=En(ce,n.value),et=((Ye=at.value)==null?void 0:Ye[wt])??[],Bt=ce[gt.value]??[],Re={children:gt.value,checkStrictly:!1};for(const Qe of et){const Xt=Ue.get(En(Qe,n.value))??0;Xs(C.value,Qe,Pe,Re,$.value,Xt,n.value),pe(Qe,Pe,Ue)}for(const Qe of Bt)pe(Qe,Pe,Ue)},re=(ce,Pe,Ue=!0,at=!1)=>{var wt,et,Bt,Re;const gt={children:(et=(wt=e==null?void 0:e.store)==null?void 0:wt.states)==null?void 0:et.childrenColumnName.value,checkStrictly:(Re=(Bt=e==null?void 0:e.store)==null?void 0:Bt.states)==null?void 0:Re.checkStrictly.value};if(Xs(C.value,ce,Pe,gt,at?void 0:$.value,a.value.indexOf(ce),n.value)){if(Rt.lazy.value&&!Rt.checkStrictly.value){const Qe=Pe??q(ce);pe(ce,Qe,X.value),Z({emitChange:!1,rowIndexMap:X.value})}else Z({emitChange:!1});const Ye=(C.value||[]).slice();Ue&&e.emit("select",Ye,ce),e.emit("selection-change",Ye)}},R=()=>{var Bt,Re;const ce=x.value?!y.value:!(y.value||C.value.length);y.value=ce;let Pe=!1,Ue=0;const at=(Re=(Bt=e==null?void 0:e.store)==null?void 0:Bt.states)==null?void 0:Re.rowKey.value,{childrenColumnName:gt}=e.store.states,wt={children:gt.value,checkStrictly:!1};a.value.forEach((Ye,Qe)=>{const Xt=Qe+Ue;Xs(C.value,Ye,ce,wt,$.value,Xt,at)&&(Pe=!0),Ue+=le(En(Ye,at))});const et=X.value;if(Rt.lazy.value&&!Rt.checkStrictly.value&&at)for(const Ye of Object.values(Rt.lazyTreeNodeMap.value))for(const Qe of Ye){const Xt=et.get(En(Qe,at))??0;Xs(C.value,Qe,ce,wt,$.value,Xt,at)&&(Pe=!0),pe(Qe,ce,et)}Z({emitChange:!1,rowIndexMap:et}),Pe&&e.emit("selection-change",C.value?[...C.value]:[]),e.emit("select-all",(C.value||[]).slice())},Y=()=>{var gt;if(((gt=a.value)==null?void 0:gt.length)===0){y.value=!1;return}let ce=0,Pe=0;const Ue=wt=>{for(const et of wt){const Bt=$.value&&$.value.call(null,et,ce);if(q(et))Pe++;else if(!$.value||Bt)return!1;ce++;const Re=D(et);if(Re.length&&!Ue(Re))return!1}return!0},at=Ue(a.value||[]);y.value=Pe===0?!1:at},ae=ce=>{if(!n.value)return!1;const Pe=En(ce,n.value);return!!S.value[Pe]},le=ce=>{var gt;if(!e||!e.store)return 0;const{treeData:Pe}=e.store.states;let Ue=0;const at=(gt=Pe.value[ce])==null?void 0:gt.children;return at&&(Ue+=at.length,at.forEach(wt=>{Ue+=le(wt)})),Ue},se=(ce,Pe)=>{const Ue={};return Ln(ce).forEach(at=>{T.value[at.id]=Pe,Ue[at.columnKey||at.id]=Pe}),Ue},de=(ce,Pe,Ue)=>{P.value&&P.value!==ce&&(P.value.order=null),P.value=ce,N.value=Pe,A.value=Ue},be=()=>{let ce=i(l);Object.keys(T.value).forEach(Pe=>{const Ue=T.value[Pe];if(!Ue||Ue.length===0)return;const at=E2({columns:u.value},Pe);at&&at.filterMethod&&(ce=ce.filter(gt=>Ue.some(wt=>at.filterMethod.call(null,wt,gt,at))))}),M.value=ce},we=()=>{a.value=pq(M.value??[],{sortingColumn:P.value,sortProp:N.value,sortOrder:A.value})},Oe=(ce=void 0)=>{ce!=null&&ce.filter||be(),we()},Ce=ce=>{const{tableHeaderRef:Pe}=e.refs;if(!Pe)return;const Ue=Object.assign({},Pe.filterPanels),at=Object.keys(Ue);if(at.length)if(De(ce)&&(ce=[ce]),me(ce)){const gt=ce.map(wt=>aq({columns:u.value},wt));at.forEach(wt=>{const et=gt.find(Bt=>Bt.id===wt);et&&(et.filteredValue=[])}),e.store.commit("filterChange",{column:gt,values:[],silent:!0,multi:!0})}else at.forEach(gt=>{const wt=u.value.find(et=>et.id===gt);wt&&(wt.filteredValue=[])}),T.value={},e.store.commit("filterChange",{column:{},values:[],silent:!0})},Ie=()=>{P.value&&(de(null,null,null),e.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:ge,toggleRowExpansion:ke,updateExpandRows:Le,states:qe,isRowExpanded:lt}=cq({data:a,rowKey:n}),{updateTreeExpandKeys:nt,toggleTreeExpansion:Ze,updateTreeData:kt,updateKeyChildren:Pt,loadOrToggle:Lt,states:Rt}=fq({data:a,rowKey:n}),{updateCurrentRowData:jt,updateCurrentRow:Yt,setCurrentRowKey:xe,states:Ee}=dq({data:a,rowKey:n}),Ke=ce=>{ge(ce),nt(ce)},Xe=(ce,Pe)=>{u.value.some(({type:Ue})=>Ue==="expand")?ke(ce,Pe):Ze(ce,Pe)};return fe(()=>Rt.checkStrictly.value,ce=>{ce?(S.value={},z=[]):Z({emitChange:!1}),Y()}),fe(()=>Rt.lazyTreeNodeMap.value,()=>{var at;if(!Rt.lazy.value||Rt.checkStrictly.value||!n.value)return;const ce=X.value,Pe=C.value.length;for(const gt of Object.keys(Rt.lazyTreeNodeMap.value))(at=V.value)!=null&&at[gt]&&pe(V.value[gt].row,!0,ce);const Ue=C.value.length!==Pe;Z({emitChange:!Ue,rowIndexMap:ce}),Y(),Ue&&e.emit("selection-change",[...C.value])}),{assertRowKey:_,updateColumns:L,scheduleLayout:K,isSelected:q,clearSelection:Q,cleanSelection:ee,getSelectionRows:ie,getHalfSelectionRows:ve,toggleRowSelection:re,_toggleAllSelection:R,toggleAllSelection:null,updateAllSelected:Y,updateSelectionByChildren:Z,getRowIndeterminate:ae,updateFilters:se,updateCurrentRow:Yt,updateSort:de,execFilter:be,execSort:we,execQuery:Oe,clearFilter:Ce,clearSort:Ie,toggleRowExpansion:ke,setExpandRowKeysAdapter:Ke,setCurrentRowKey:xe,toggleRowExpansionAdapter:Xe,isRowExpanded:lt,updateExpandRows:Le,updateCurrentRowData:jt,loadOrToggle:Lt,updateTreeData:kt,updateKeyChildren:Pt,states:{tableSize:t,rowKey:n,data:a,_data:l,isComplex:o,_columns:s,originColumns:r,columns:u,fixedColumns:c,rightFixedColumns:d,leafColumns:f,fixedLeafColumns:v,rightFixedLeafColumns:g,updateOrderFns:m,leafColumnsLength:p,fixedLeafColumnsLength:h,rightFixedLeafColumnsLength:b,isAllSelected:y,selection:C,selectionIndeterminate:S,reserveSelection:E,selectOnIndeterminate:x,selectable:$,rowExpandable:k,filters:T,filteredData:M,sortingColumn:P,sortProp:N,sortOrder:A,hoverRow:j,...qe,...Rt,...Ee}}}function kv(e,t){return e.map(n=>{var a;return n.id===t.id?t:((a=n.children)!=null&&a.length&&(n.children=kv(n.children,t)),n)})}function Ev(e){e.forEach(t=>{var n,a;t.no=(n=t.getColumnIndex)==null?void 0:n.call(t),(a=t.children)!=null&&a.length&&Ev(t.children)}),e.sort((t,n)=>t.no-n.no)}function hq(){const e=ht(),t=vq(),n=he("table"),{t:a}=St();return{ns:n,t:a,...t,mutations:{setData(r,u){const c=i(r._data)!==u;r.data.value=u,r._data.value=u,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),i(r.reserveSelection)?e.store.assertRowKey():c?e.store.clearSelection():e.store.cleanSelection(),e.store.updateSelectionByChildren({emitChange:!1}),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(r,u,c,d){var g;const f=i(r._columns);let v=[];c?(c&&!c.children&&(c.children=[]),(g=c.children)==null||g.push(u),v=kv(f,c)):(f.push(u),v=f),Ev(v),r._columns.value=v,r.updateOrderFns.push(d),u.type==="selection"&&(r.selectable.value=u.selectable,r.reserveSelection.value=u.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(r,u){var c;((c=u.getColumnIndex)==null?void 0:c.call(u))!==u.no&&(Ev(r._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(r,u,c,d){var g;const f=i(r._columns)||[];if(c)(g=c.children)==null||g.splice(c.children.findIndex(m=>m.id===u.id),1),Ae(()=>{var m;((m=c.children)==null?void 0:m.length)===0&&delete c.children}),r._columns.value=kv(f,c);else{const m=f.indexOf(u);m>-1&&(f.splice(m,1),r._columns.value=f)}const v=r.updateOrderFns.indexOf(d);v>-1&&r.updateOrderFns.splice(v,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(r,u){const{prop:c,order:d,init:f}=u;if(c){const v=i(r.columns).find(g=>g.property===c);v&&(v.order=d,e.store.updateSort(v,c,d),e.store.commit("changeSortCondition",{init:f}))}},changeSortCondition(r,u){const{sortingColumn:c,sortProp:d,sortOrder:f}=r,v=i(c),g=i(d),m=i(f);Ld(m)&&(r.sortingColumn.value=null,r.sortProp.value=null),e.store.execQuery({filter:!0}),(!u||!(u.silent||u.init))&&e.emit("sort-change",{column:v,prop:g,order:m}),e.store.updateTableScrollY()},filterChange(r,u){const{column:c,values:d,silent:f}=u,v=e.store.updateFilters(c,d);e.store.execQuery(),f||e.emit("filter-change",v),e.store.updateTableScrollY()},toggleAllSelection(){var r,u;(u=(r=e.store).toggleAllSelection)==null||u.call(r)},rowSelectedChanged(r,u){e.store.toggleRowSelection(u),e.store.updateAllSelected()},setHoverRow(r,u){r.hoverRow.value=u},setCurrentRow(r,u){e.store.updateCurrentRow(u)}},commit:function(r,...u){const c=e.store.mutations;if(c[r])c[r].apply(e,[e.store.states,...u]);else throw new Error(`Action not found: ${r}`)},updateTableScrollY:function(){Ae(()=>e.layout.updateScrollY.apply(e.layout))}}}const bm={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",rowExpandable:"rowExpandable",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"},"treeProps.checkStrictly":{key:"checkStrictly",default:!1}};function mq(e,t){if(!e)throw new Error("Table is required.");const n=hq();return n.toggleAllSelection=Al(n._toggleAllSelection,10),Object.keys(bm).forEach(a=>{N2(M2(t,a),a,n)}),gq(n,t),n}function gq(e,t){Object.keys(bm).forEach(n=>{fe(()=>M2(t,n),a=>{N2(a,n,e)})})}function N2(e,t,n){let a=e,l=bm[t];st(l)&&(a=a||l.default,l=l.key),n.states[l].value=a}function M2(e,t){if(t.includes(".")){const n=t.split(".");let a=e;return n.forEach(l=>{a=a[l]}),a}else return e[t]}var bq=class{constructor(e){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.heightMap={},this.height=B(null),this.scrollX=B(!1),this.scrollY=B(!1),this.bodyWidth=B(null),this.fixedWidth=B(null),this.rightFixedWidth=B(null),this.gutterWidth=0;for(const t in e)Dt(e,t)&&(Qt(this[t])?this[t].value=e[t]:this[t]=e[t]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){const e=this.height.value;if(Ld(e))return!1;const t=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(t!=null&&t.wrapRef)){let n=!0;const a=this.scrollY.value;return n=t.wrapRef.scrollHeight>t.wrapRef.clientHeight,this.scrollY.value=n,a!==n}return!1}setHeight(e,t="height"){if(!It)return;const n=this.table.vnode.el;if(e=oq(e),this.height.value=Number(e),this.heightMap[t]=e,!n&&(e||e===0)){Ae(()=>{this.heightMap[t]===e&&this.setHeight(e,t)});return}n&&He(e)?(n.style[t]=`${e}px`,this.updateElsHeight()):n&&De(e)&&(n.style[t]=e,this.updateElsHeight())}setMaxHeight(e){this.setHeight(e,"max-height")}getFlattenColumns(){const e=[];return this.table.store.states.columns.value.forEach(t=>{t.isColumnGroup?e.push.apply(e,t.columns):e.push(t)}),e}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(e){if(!e)return!0;let t=e;for(;t.tagName!=="DIV";){if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}updateColumnsWidth(){var r;if(!It)return;const e=this.fit,t=(r=this.table.vnode.el)==null?void 0:r.clientWidth;let n=0;const a=this.getFlattenColumns(),l=a.filter(u=>!He(u.width));if(a.forEach(u=>{He(u.width)&&u.realWidth&&(u.realWidth=null)}),l.length>0&&e){if(a.forEach(u=>{n+=Number(u.width||u.minWidth||80)}),n<=t){this.scrollX.value=!1;const u=t-n;if(l.length===1)l[0].realWidth=Number(l[0].minWidth||80)+u;else{const c=u/l.reduce((f,v)=>f+Number(v.minWidth||80),0);let d=0;l.forEach((f,v)=>{if(v===0)return;const g=Math.floor(Number(f.minWidth||80)*c);d+=g,f.realWidth=Number(f.minWidth||80)+g}),l[0].realWidth=Number(l[0].minWidth||80)+u-d}}else this.scrollX.value=!0,l.forEach(u=>{u.realWidth=Number(u.minWidth)});this.bodyWidth.value=Math.max(n,t),this.table.state.resizeState.value.width=this.bodyWidth.value}else a.forEach(u=>{!u.width&&!u.minWidth?u.realWidth=80:u.realWidth=Number(u.width||u.minWidth),n+=u.realWidth}),this.scrollX.value=n>t,this.bodyWidth.value=n;const o=this.store.states.fixedColumns.value;if(o.length>0){let u=0;o.forEach(c=>{u+=Number(c.realWidth||c.width)}),this.fixedWidth.value=u}const s=this.store.states.rightFixedColumns.value;if(s.length>0){let u=0;s.forEach(c=>{u+=Number(c.realWidth||c.width)}),this.rightFixedWidth.value=u}this.notifyObservers("columns")}addObserver(e){this.observers.push(e)}removeObserver(e){const t=this.observers.indexOf(e);t!==-1&&this.observers.splice(t,1)}notifyObservers(e){this.observers.forEach(t=>{var n,a;switch(e){case"columns":(n=t.state)==null||n.onColumnsChange(this);break;case"scrollable":(a=t.state)==null||a.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${e}.`)}})}};const fl=Symbol("ElTable"),I2=e=>{const t=[];return e.forEach(n=>{n.children?(t.push(n),t.push.apply(t,I2(n.children))):t.push(n)}),t},P2=e=>{let t=1;const n=(l,o)=>{if(o&&(l.level=o.level+1,t{n(r,l),s+=r.colSpan}),l.colSpan=s}else l.colSpan=1};e.forEach(l=>{l.level=1,n(l,void 0)});const a=[];for(let l=0;l{l.children?(l.rowSpan=1,l.children.forEach(o=>o.isSubColumn=!0)):l.rowSpan=t-l.level+1,a[l.level-1].push(l)}),a};function yq(e){const t=Fe(fl),n=w(()=>P2(e.store.states.originColumns.value));return{isGroup:w(()=>{const o=n.value.length>1;return o&&t&&(t.state.isGroup.value=!0),o}),toggleAllSelection:o=>{o.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:n}}var wq=ue({name:"ElTableFilterPanel",components:{ElCheckbox:ll,ElCheckboxGroup:nm,ElScrollbar:il,ElTooltip:zn,ElIcon:Ve,ArrowDown:jl,ArrowUp:Qd},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:tn.appendTo},setup(e){const t=ht(),{t:n}=St(),a=he("table-filter"),l=t==null?void 0:t.parent;e.column&&!l.filterPanels.value[e.column.id]&&(l.filterPanels.value[e.column.id]=t);const o=B(null),s=B(null),r=B(0),u=B([]),c=w(()=>e.column&&e.column.filters),d=w(()=>e.column&&e.column.filterClassName?`${a.b()} ${e.column.filterClassName}`:a.b()),f=w({get:()=>{var k;return(((k=e.column)==null?void 0:k.filteredValue)||[])[0]},set:k=>{var T;if(e.column){const M=[...e.column.filteredValue??[]];Ta(k)?M.splice(0,1):M.splice(0,1,k),(T=e.upDataColumn)==null||T.call(e,"filteredValue",M)}}}),v=w(()=>e.column?e.column.filterMultiple:!0),g=k=>k.value===f.value,m=()=>{var k;(k=o.value)==null||k.onClose()},p=()=>{y(u.value),m()},h=()=>{u.value=[],y(u.value),m()},b=(k,T)=>{f.value=k,r.value=T,Ta(k)?y([]):y([k]),m()},y=k=>{var T,M,P;(T=e.upDataColumn)==null||T.call(e,"filteredValue",k),(M=e.store)==null||M.commit("filterChange",{column:e.column,values:k}),(P=e.store)==null||P.updateAllSelected()},C=()=>{var k;u.value=[...((k=e.column)==null?void 0:k.filteredValue)||[]]},S=()=>{var k,T;(k=s.value)==null||k.focus(),!v.value&&x(),e.column&&((T=e.upDataColumn)==null||T.call(e,"filterOpened",!0))},E=()=>{var k;e.column&&((k=e.upDataColumn)==null||k.call(e,"filterOpened",!1))},x=()=>{if(Ta(f)){r.value=0;return}const k=(c.value||[]).findIndex(T=>T.value===f.value);r.value=k>=0?k+1:0};return{multiple:v,filterClassName:d,filteredValue:u,filterValue:f,filters:c,handleConfirm:p,handleReset:h,handleSelect:b,isPropAbsent:Ta,isActive:g,t:n,ns:a,tooltipRef:o,rootRef:s,checkedIndex:r,handleBeforeShowTooltip:C,handleShowTooltip:S,handleHideTooltip:E,handleKeydown:k=>{var A,j;const T=Gt(k),M=(c.value?c.value.length:0)+1;let P=r.value,N=!0;switch(T){case ye.down:case ye.right:P=(P+1)%M;break;case ye.up:case ye.left:P=(P-1+M)%M;break;case ye.tab:m(),N=!1;break;case ye.enter:case ye.space:if(P===0)b(null,0);else{const z=(c.value||[])[P-1];z.value&&b(z.value,P)}break;default:N=!1}N&&k.preventDefault(),r.value=P,(j=(A=s.value)==null?void 0:A.querySelector(`.${a.e("list-item")}:nth-child(${P+1})`))==null||j.focus()}}}});const Sq=["disabled"],Cq=["tabindex","aria-checked"],kq=["tabindex","aria-checked","onClick"],Eq=["aria-label"];function xq(e,t,n,a,l,o){const s=_t("el-checkbox"),r=_t("el-checkbox-group"),u=_t("el-scrollbar"),c=_t("arrow-up"),d=_t("arrow-down"),f=_t("el-icon"),v=_t("el-tooltip");return O(),oe(v,{ref:"tooltipRef",offset:0,placement:e.placement,"show-arrow":!1,trigger:"click",role:"dialog",teleported:"",effect:"light",pure:"",loop:"","popper-class":e.filterClassName,persistent:"","append-to":e.appendTo,onBeforeShow:e.handleBeforeShowTooltip,onShow:e.handleShowTooltip,onHide:e.handleHideTooltip},{content:J(()=>[e.multiple?(O(),H("div",{key:0,ref:"rootRef",tabindex:"-1",class:I(e.ns.e("multiple"))},[W("div",{class:I(e.ns.e("content"))},[U(u,{"wrap-class":e.ns.e("wrap")},{default:J(()=>[U(r,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=g=>e.filteredValue=g),class:I(e.ns.e("checkbox-group"))},{default:J(()=>[(O(!0),H(ze,null,bt(e.filters,g=>(O(),oe(s,{key:g.value,value:g.value},{default:J(()=>[it(Se(g.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),W("div",{class:I(e.ns.e("bottom"))},[W("button",{class:I(e.ns.is("disabled",e.filteredValue.length===0)),disabled:e.filteredValue.length===0,type:"button",onClick:t[1]||(t[1]=(...g)=>e.handleConfirm&&e.handleConfirm(...g))},Se(e.t("el.table.confirmFilter")),11,Sq),W("button",{type:"button",onClick:t[2]||(t[2]=(...g)=>e.handleReset&&e.handleReset(...g))},Se(e.t("el.table.resetFilter")),1)],2)],2)):(O(),H("ul",{key:1,ref:"rootRef",tabindex:"-1",role:"radiogroup",class:I(e.ns.e("list")),onKeydown:t[4]||(t[4]=(...g)=>e.handleKeydown&&e.handleKeydown(...g))},[W("li",{role:"radio",class:I([e.ns.e("list-item"),e.ns.is("active",e.isPropAbsent(e.filterValue))]),tabindex:e.checkedIndex===0?0:-1,"aria-checked":e.isPropAbsent(e.filterValue),onClick:t[3]||(t[3]=g=>e.handleSelect(null,0))},Se(e.t("el.table.clearFilter")),11,Cq),(O(!0),H(ze,null,bt(e.filters,(g,m)=>(O(),H("li",{key:g.value,role:"radio",class:I([e.ns.e("list-item"),e.ns.is("active",e.isActive(g))]),tabindex:e.checkedIndex===m+1?0:-1,"aria-checked":e.isActive(g),onClick:p=>e.handleSelect(g.value,m+1)},Se(g.text),11,kq))),128))],34))]),default:J(()=>{var g;return[W("button",{type:"button",class:I(`${e.ns.namespace.value}-table__column-filter-trigger`),"aria-label":e.t("el.table.filterLabel",{column:((g=e.column)==null?void 0:g.label)||""})},[U(f,null,{default:J(()=>[ne(e.$slots,"filter-icon",{},()=>{var m;return[(m=e.column)!=null&&m.filterOpened?(O(),oe(c,{key:0})):(O(),oe(d,{key:1}))]})]),_:3})],10,Eq)]}),_:3},8,["placement","popper-class","append-to","onBeforeShow","onShow","onHide"])}var Tq=Rn(wq,[["render",xq]]);function ym(e){const t=ht();kd(()=>{n.value.addObserver(t)}),mt(()=>{a(n.value),l(n.value)}),Kl(()=>{a(n.value),l(n.value)}),eu(()=>{n.value.removeObserver(t)});const n=w(()=>{const o=e.layout;if(!o)throw new Error("Can not find table layout.");return o}),a=o=>{var c;const s=((c=e.vnode.el)==null?void 0:c.querySelectorAll("colgroup > col"))||[];if(!s.length)return;const r=o.getFlattenColumns(),u={};r.forEach(d=>{u[d.id]=d});for(let d=0,f=s.length;d{var u,c;const s=((u=e.vnode.el)==null?void 0:u.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let d=0,f=s.length;d{p.stopPropagation()},o=(p,h)=>{!h.filters&&h.sortable?m(p,h,!1):h.filterable&&!h.sortable&&l(p),a==null||a.emit("header-click",h,p)},s=(p,h)=>{a==null||a.emit("header-contextmenu",h,p)},r=B(null),u=B(!1),c=B(),d=(p,h)=>{var b,y,C;if(It&&!(h.children&&h.children.length>0)&&r.value&&e.border&&r.value.id===h.id){u.value=!0;const S=a;t("set-drag-visible",!0);const E=(b=S==null?void 0:S.vnode.el)==null?void 0:b.getBoundingClientRect().left,x=(C=(y=n==null?void 0:n.vnode)==null?void 0:y.el)==null?void 0:C.querySelector(`th.${h.id}`),$=x.getBoundingClientRect(),k=$.left-E+30;Ba(x,"noclick"),c.value={startMouseLeft:p.clientX,startLeft:$.right-E,startColumnLeft:$.left-E,tableLeft:E};const T=S==null?void 0:S.refs.resizeProxy;T.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const M=N=>{const A=N.clientX-c.value.startMouseLeft,j=c.value.startLeft+A;T.style.left=`${Math.max(k,j)}px`},P=()=>{if(u.value){const{startColumnLeft:N,startLeft:A}=c.value;h.width=h.realWidth=Number.parseInt(T.style.left,10)-N,S==null||S.emit("header-dragend",h.width,A-N,h,p),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",u.value=!1,r.value=null,c.value=void 0,t("set-drag-visible",!1)}document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",P),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{sa(x,"noclick")},0)};document.addEventListener("mousemove",M),document.addEventListener("mouseup",P)}},f=(p,h)=>{var T;if(!e.border||h.children&&h.children.length>0)return;const b=p.target,y=wa(b)?b.closest("th"):null;if(!y)return;const C=Fa(y,"is-sortable");if(C){const M=u.value?"col-resize":"";y.style.cursor=M;const P=y.querySelector(".caret-wrapper");P&&(P.style.cursor=M)}if(!h.resizable||u.value){r.value=null;return}const S=y.getBoundingClientRect(),E=((T=y.parentNode)==null?void 0:T.lastElementChild)===y,x=e.allowDragLastColumn||!E,$=S.width>12&&S.right-p.clientX<8&&x,k=$?"col-resize":"";document.body.style.cursor=k,r.value=$?h:null,C&&(y.style.cursor=k)},v=()=>{!It||u.value||(document.body.style.cursor="")},g=({order:p,sortOrders:h})=>{if(p==="")return h[0];const b=h.indexOf(p||null);return h[b>h.length-2?0:b+1]},m=(p,h,b)=>{var T;p.stopPropagation();const y=h.order===b?null:b||g(h),C=(T=p.target)==null?void 0:T.closest("th");if(C&&Fa(C,"noclick")){sa(C,"noclick");return}if(!h.sortable)return;const S=p.currentTarget;if(["ascending","descending"].some(M=>Fa(S,M)&&!h.sortOrders.includes(M)))return;const E=e.store.states;let x=E.sortProp.value,$;const k=E.sortingColumn.value;(k!==h||k===h&&Ld(k.order))&&(k&&(k.order=null),E.sortingColumn.value=h,x=h.property??null),y?$=h.order=y:$=h.order=null,E.sortProp.value=x,E.sortOrder.value=$,a==null||a.store.commit("changeSortCondition")};return{handleHeaderClick:o,handleHeaderContextMenu:s,handleMouseDown:d,handleMouseMove:f,handleMouseOut:v,handleSortClick:m,handleFilterClick:l}}function Oq(e){const t=Fe(fl),n=he("table");return{getHeaderRowStyle:r=>{const u=t==null?void 0:t.props.headerRowStyle;return We(u)?u.call(null,{rowIndex:r}):u},getHeaderRowClass:r=>{const u=[],c=t==null?void 0:t.props.headerRowClassName;return De(c)?u.push(c):We(c)&&u.push(c.call(null,{rowIndex:r})),u.join(" ")},getHeaderCellStyle:(r,u,c,d)=>{let f=(t==null?void 0:t.props.headerCellStyle)??{};We(f)&&(f=f.call(null,{rowIndex:r,columnIndex:u,row:c,column:d}));const v=gm(u,d.fixed,e.store,c);return Sr(v,"left"),Sr(v,"right"),Object.assign({},f,v)},getHeaderCellClass:(r,u,c,d)=>{const f=mm(n.b(),u,d.fixed,e.store,c),v=[d.id,d.order,d.headerAlign,d.className,d.labelClassName,...f];d.children||v.push("is-leaf"),d.sortable&&v.push("is-sortable");const g=t==null?void 0:t.props.headerCellClassName;return De(g)?v.push(g):We(g)&&v.push(g.call(null,{rowIndex:r,columnIndex:u,row:c,column:d})),v.push(n.e("cell")),v.filter(m=>!!m).join(" ")}}}var r0=ue({name:"ElTableHeader",components:{ElCheckbox:ll},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})},appendFilterPanelTo:{type:String},allowDragLastColumn:{type:Boolean}},setup(e,{emit:t}){const n=ht(),a=Fe(fl),l=he("table"),o=B({}),{onColumnsChange:s,onScrollableChange:r}=ym(a),u=(a==null?void 0:a.props.tableLayout)==="auto",c=Ft(new Map),d=B();let f;const v=()=>{f&&(clearTimeout(f),f=void 0),f=setTimeout(()=>{f=void 0;const N=d.value;N&&c.size>0&&(c.forEach((A,j)=>{const z=N.querySelector(`.${j.replace(/\s/g,".")}`);z&&(A.width=z.getBoundingClientRect().width||A.width)}),c.clear())})};fe(c,v),zt(()=>{f&&(clearTimeout(f),f=void 0)}),mt(async()=>{await Ae(),await Ae();const{prop:N,order:A}=e.defaultSort;a==null||a.store.commit("sort",{prop:N,order:A,init:!0}),v()});const{handleHeaderClick:g,handleHeaderContextMenu:m,handleMouseDown:p,handleMouseMove:h,handleMouseOut:b,handleSortClick:y,handleFilterClick:C}=$q(e,t),{getHeaderRowStyle:S,getHeaderRowClass:E,getHeaderCellStyle:x,getHeaderCellClass:$}=Oq(e),{isGroup:k,toggleAllSelection:T,columnRows:M}=yq(e),{t:P}=St();return n.state={onColumnsChange:s,onScrollableChange:r},n.filterPanels=o,{ns:l,t:P,filterPanels:o,onColumnsChange:s,onScrollableChange:r,columnRows:M,getHeaderRowClass:E,getHeaderRowStyle:S,getHeaderCellClass:$,getHeaderCellStyle:x,handleHeaderClick:g,handleHeaderContextMenu:m,handleMouseDown:p,handleMouseMove:h,handleMouseOut:b,handleSortClick:y,handleFilterClick:C,isGroup:k,toggleAllSelection:T,saveIndexSelection:c,isTableLayoutAuto:u,theadRef:d,updateFixedColumnStyle:v}},render(){const{ns:e,t,isGroup:n,columnRows:a,getHeaderCellStyle:l,getHeaderCellClass:o,getHeaderRowClass:s,getHeaderRowStyle:r,handleHeaderClick:u,handleHeaderContextMenu:c,handleMouseDown:d,handleMouseMove:f,handleSortClick:v,handleMouseOut:g,store:m,$parent:p,saveIndexSelection:h,isTableLayoutAuto:b}=this;let y=1;return Ge("thead",{ref:"theadRef",class:e.is("group",n)},a.map((C,S)=>Ge("tr",{class:s(S),key:S,style:r(S)},C.map((E,x)=>{E.rowSpan>y&&(y=E.rowSpan);const $=o(S,x,C,E);return b&&E.fixed&&h.set($,E),Ge("th",{class:$,colspan:E.colSpan,key:`${E.id}-thead`,rowspan:E.rowSpan,scope:E.colSpan>1?"colgroup":"col",ariaSort:E.sortable?E.order:void 0,style:l(S,x,C,E),onClick:k=>{var T;(T=k.currentTarget)!=null&&T.classList.contains("noclick")||u(k,E)},onContextmenu:k=>c(k,E),onMousedown:k=>d(k,E),onMousemove:k=>f(k,E),onMouseout:g},[Ge("div",{class:["cell",E.filteredValue&&E.filteredValue.length>0?"highlight":""]},[E.renderHeader?E.renderHeader({column:E,$index:x,store:m,_self:p}):E.label,E.sortable&&Ge("button",{type:"button",class:"caret-wrapper","aria-label":t("el.table.sortLabel",{column:E.label||""}),onClick:k=>v(k,E)},[Ge("i",{onClick:k=>v(k,E,"ascending"),class:"sort-caret ascending"}),Ge("i",{onClick:k=>v(k,E,"descending"),class:"sort-caret descending"})]),E.filterable&&Ge(Tq,{store:m,placement:E.filterPlacement||"bottom-start",appendTo:p==null?void 0:p.appendFilterPanelTo,column:E,upDataColumn:(k,T)=>{E[k]=T}},{"filter-icon":()=>E.renderFilterIcon?E.renderFilterIcon({filterOpened:E.filterOpened}):null})])])}))))}});function Nq(e){const t=Fe(fl),n=B(""),a=B(Ge("div")),l=(m,p,h)=>{var E,x;const b=t,y=sp(m);let C=null;const S=(E=b==null?void 0:b.vnode.el)==null?void 0:E.dataset.prefix;y&&(C=l0({columns:((x=e.store)==null?void 0:x.states.columns.value)??[]},y,S),C&&(b==null||b.emit(`cell-${h}`,p,C,y,m))),b==null||b.emit(`row-${h}`,p,C,m)},o=(m,p)=>{l(m,p,"dblclick")},s=(m,p)=>{var h;(h=e.store)==null||h.commit("setCurrentRow",p),l(m,p,"click")},r=(m,p)=>{l(m,p,"contextmenu")},u=Al(m=>{var p;(p=e.store)==null||p.commit("setHoverRow",m)},30),c=Al(()=>{var m;(m=e.store)==null||m.commit("setHoverRow",null)},30),d=m=>{const p=window.getComputedStyle(m,null);return{left:Number.parseInt(p.paddingLeft,10)||0,right:Number.parseInt(p.paddingRight,10)||0,top:Number.parseInt(p.paddingTop,10)||0,bottom:Number.parseInt(p.paddingBottom,10)||0}},f=(m,p,h)=>{var y;let b=(y=p==null?void 0:p.target)==null?void 0:y.parentNode;for(;m>1&&(b=b==null?void 0:b.nextSibling,!(!b||b.nodeName!=="TR"));)h(b,"hover-row hover-fixed-row"),m--};return{handleDoubleClick:o,handleClick:s,handleContextMenu:r,handleMouseEnter:u,handleMouseLeave:c,handleCellMouseEnter:(m,p,h)=>{var D,_,F;if(!t)return;const b=t,y=sp(m),C=(D=b==null?void 0:b.vnode.el)==null?void 0:D.dataset.prefix;let S=null;if(y){if(S=l0({columns:((_=e.store)==null?void 0:_.states.columns.value)??[]},y,C),!S)return;y.rowSpan>1&&f(y.rowSpan,m,Ba);const L=b.hoverState={cell:y,column:S,row:p};b==null||b.emit("cell-mouse-enter",L.row,L.column,L.cell,m)}if(!h){(pn==null?void 0:pn.trigger)===y&&(pn==null||pn());return}const E=m.target.querySelector(".cell");if(!(Fa(E,`${C}-tooltip`)&&E.childNodes.length&&((F=E.textContent)!=null&&F.trim())))return;const x=document.createRange();x.setStart(E,0),x.setEnd(E,E.childNodes.length);const{width:$,height:k}=x.getBoundingClientRect(),{width:T,height:M}=E.getBoundingClientRect(),{top:P,left:N,right:A,bottom:j}=d(E),z=N+A,V=P+j;Ml($+z,T)||Ml(k+V,M)||Ml(E.scrollWidth,T)?uq(h,((y==null?void 0:y.innerText)||(y==null?void 0:y.textContent))??"",p,S,y,b):(pn==null?void 0:pn.trigger)===y&&(pn==null||pn())},handleCellMouseLeave:m=>{const p=sp(m);if(!p)return;p.rowSpan>1&&f(p.rowSpan,m,sa);const h=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",h==null?void 0:h.row,h==null?void 0:h.column,h==null?void 0:h.cell,m)},tooltipContent:n,tooltipTrigger:a}}function Mq(e){const t=Fe(fl),n=he("table");return{getRowStyle:(c,d)=>{const f=t==null?void 0:t.props.rowStyle;return We(f)?f.call(null,{row:c,rowIndex:d}):f||null},getRowClass:(c,d,f)=>{var m;const v=[n.e("row")];t!=null&&t.props.highlightCurrentRow&&c===((m=e.store)==null?void 0:m.states.currentRow.value)&&v.push("current-row"),e.stripe&&f%2===1&&v.push(n.em("row","striped"));const g=t==null?void 0:t.props.rowClassName;return De(g)?v.push(g):We(g)&&v.push(g.call(null,{row:c,rowIndex:d})),v},getCellStyle:(c,d,f,v)=>{const g=t==null?void 0:t.props.cellStyle;let m=g??{};We(g)&&(m=g.call(null,{rowIndex:c,columnIndex:d,row:f,column:v}));const p=gm(d,e==null?void 0:e.fixed,e.store);return Sr(p,"left"),Sr(p,"right"),Object.assign({},m,p)},getCellClass:(c,d,f,v,g)=>{const m=mm(n.b(),d,e==null?void 0:e.fixed,e.store,void 0,g),p=[v.id,v.align,v.className,...m],h=t==null?void 0:t.props.cellClassName;return De(h)?p.push(h):We(h)&&p.push(h.call(null,{rowIndex:c,columnIndex:d,row:f,column:v})),p.push(n.e("cell")),p.filter(b=>!!b).join(" ")},getSpan:(c,d,f,v)=>{let g=1,m=1;const p=t==null?void 0:t.props.spanMethod;if(We(p)){const h=p({row:c,column:d,rowIndex:f,columnIndex:v});me(h)?(g=h[0],m=h[1]):st(h)&&(g=h.rowspan,m=h.colspan)}return{rowspan:g,colspan:m}},getColspanRealWidth:(c,d,f)=>{if(d<1)return c[f].realWidth;const v=c.map(({realWidth:g,width:m})=>g||m).slice(f,f+d);return Number(v.reduce((g,m)=>Number(g)+Number(m),-1))}}}const Iq=["colspan","rowspan"];var Pq=ue({name:"TableTdWrapper",__name:"td-wrapper",props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(e){return(t,n)=>(O(),H("td",{colspan:e.colspan,rowspan:e.rowspan},[ne(t.$slots,"default")],8,Iq))}}),Rq=Pq;function _q(e){const t=Fe(fl),n=he("table"),{handleDoubleClick:a,handleClick:l,handleContextMenu:o,handleMouseEnter:s,handleMouseLeave:r,handleCellMouseEnter:u,handleCellMouseLeave:c,tooltipContent:d,tooltipTrigger:f}=Nq(e),{getRowStyle:v,getRowClass:g,getCellStyle:m,getCellClass:p,getSpan:h,getColspanRealWidth:b}=Mq(e);let y=-1;const C=w(()=>{var k;return(k=e.store)==null?void 0:k.states.columns.value.findIndex(({type:T})=>T==="default")}),S=(k,T)=>{var P;const M=(P=t==null?void 0:t.props)==null?void 0:P.rowKey;return M?En(k,M):T},E=(k,T,M,P=!1)=>{const{tooltipEffect:N,tooltipOptions:A,store:j}=e,{indent:z,columns:V}=j.states,D=[];let _=!0;return M&&(D.push(n.em("row",`level-${M.level}`)),_=!!M.display),T===0&&(y=-1),e.stripe&&_&&y++,D.push(...g(k,T,y)),Ge("tr",{style:[_?null:{display:"none"},v(k,T)],class:D,key:S(k,T),onDblclick:F=>a(F,k),onClick:F=>l(F,k),onContextmenu:F=>o(F,k),onMouseenter:()=>s(T),onMouseleave:r},V.value.map((F,L)=>{const{rowspan:K,colspan:q}=h(k,F,T,L);if(!K||!q)return null;const X=Object.assign({},F);X.realWidth=b(V.value,q,L);const Z={store:j,_self:e.context||t,column:X,row:k,$index:T,cellIndex:L,expanded:P};L===C.value&&M&&(Z.treeNode={indent:M.level&&M.level*z.value,level:M.level},Wt(M.expanded)&&(Z.treeNode.expanded=M.expanded,"loading"in M&&(Z.treeNode.loading=M.loading),"noLazyChildren"in M&&(Z.treeNode.noLazyChildren=M.noLazyChildren)));const Q=`${S(k,T)},${L}`,ee=X.columnKey||X.rawColumnKey||"",ie=F.showOverflowTooltip&&Uw({effect:N},A,F.showOverflowTooltip);return Ge(Rq,{style:m(T,L,k,F),class:p(T,L,k,F,q-1),key:`${ee}${Q}`,rowspan:K,colspan:q,onMouseenter:ve=>u(ve,k,ie),onMouseleave:c},{default:()=>x(L,F,Z)})}))},x=(k,T,M)=>T.renderCell(M);return{wrappedRowRender:(k,T)=>{const M=e.store,{isRowExpanded:P,assertRowKey:N}=M,{treeData:A,lazyTreeNodeMap:j,childrenColumnName:z,rowKey:V}=M.states,D=M.states.columns.value;if(D.some(({type:_})=>_==="expand")){const _=P(k),F=E(k,T,void 0,_),L=t==null?void 0:t.renderExpanded;if(!L)return console.error("[Element Error]renderExpanded is required."),F;const K=[[F]];return(t.props.preserveExpandedContent||_)&&K[0].push(Ge("tr",{key:`expanded-row__${F.key}`,style:{display:_?"":"none"}},[Ge("td",{colspan:D.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[L({row:k,$index:T,store:M,expanded:_})])])),K}else if(Object.keys(A.value).length){N();const _=En(k,V.value);let F=A.value[_],L=null;F&&(L={expanded:F.expanded,level:F.level,display:!0,noLazyChildren:void 0,loading:void 0},Wt(F.lazy)&&(L&&Wt(F.loaded)&&F.loaded&&(L.noLazyChildren=!(F.children&&F.children.length)),L.loading=F.loading));const K=[E(k,T,L??void 0)];if(F){let q=0;const X=(Z,Q)=>{Z&&Z.length&&Q&&Z.forEach(ee=>{const ie={display:Q.display&&Q.expanded,level:Q.level+1,expanded:!1,noLazyChildren:!1,loading:!1},ve=En(ee,V.value);if(Ta(ve))throw new Error("For nested data item, row-key is required.");if(F={...A.value[ve]},F&&(ie.expanded=F.expanded,F.level=F.level||ie.level,F.display=!!(F.expanded&&ie.display),Wt(F.lazy)&&(Wt(F.loaded)&&F.loaded&&(ie.noLazyChildren=!(F.children&&F.children.length)),ie.loading=F.loading)),q++,K.push(E(ee,T+q,ie)),F){const pe=j.value[ve]||ee[z.value];X(pe,F)}})};F.display=!0,X(j.value[_]||k[z.value],F)}return K}else return E(k,T,void 0)},tooltipContent:d,tooltipTrigger:f}}const Aq={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var Lq=ue({name:"ElTableBody",props:Aq,setup(e){var d;const t=ht(),n=Fe(fl),a=he("table"),{wrappedRowRender:l,tooltipContent:o,tooltipTrigger:s}=_q(e),{onColumnsChange:r,onScrollableChange:u}=ym(n),c=[];return fe((d=e.store)==null?void 0:d.states.hoverRow,(f,v)=>{var b,y;const g=t==null?void 0:t.vnode.el,m=Array.from((g==null?void 0:g.children)||[]).filter(C=>C==null?void 0:C.classList.contains(`${a.e("row")}`));let p=f;const h=(b=m[p])==null?void 0:b.childNodes;if(h!=null&&h.length){let C=0;Array.from(h).reduce((S,E,x)=>{var $,k;return(($=h[x])==null?void 0:$.colSpan)>1&&(C=(k=h[x])==null?void 0:k.colSpan),E.nodeName!=="TD"&&C===0&&S.push(x),C>0&&C--,S},[]).forEach(S=>{var E;for(p=f;p>0;){const x=(E=m[p-1])==null?void 0:E.childNodes;if(x[S]&&x[S].nodeName==="TD"&&x[S].rowSpan>1){Ba(x[S],"hover-cell"),c.push(x[S]);break}p--}})}else c.forEach(C=>sa(C,"hover-cell")),c.length=0;!((y=e.store)!=null&&y.states.isComplex.value)||!It||Kn(()=>{const C=m[v],S=m[f];C&&!C.classList.contains("hover-fixed-row")&&sa(C,"hover-row"),S&&Ba(S,"hover-row")})}),eu(()=>{pn==null||pn()}),{ns:a,onColumnsChange:r,onScrollableChange:u,wrappedRowRender:l,tooltipContent:o,tooltipTrigger:s}},render(){const{wrappedRowRender:e,store:t}=this,n=(t==null?void 0:t.states.data.value)||[];return Ge("tbody",{tabIndex:-1},[n.reduce((a,l)=>a.concat(e(l,a.length)),[])])}});function Dq(){var t;const e=(t=Fe(fl))==null?void 0:t.store;return{leftFixedLeafCount:w(()=>(e==null?void 0:e.states.fixedLeafColumnsLength.value)??0),rightFixedLeafCount:w(()=>(e==null?void 0:e.states.rightFixedColumns.value.length)??0),columnsCount:w(()=>(e==null?void 0:e.states.columns.value.length)??0),leftFixedCount:w(()=>(e==null?void 0:e.states.fixedColumns.value.length)??0),rightFixedCount:w(()=>(e==null?void 0:e.states.rightFixedColumns.value.length)??0),columns:w(()=>(e==null?void 0:e.states.columns.value)??[])}}function Bq(e){const{columns:t}=Dq(),n=he("table");return{getCellClasses:(o,s)=>{const r=o[s],u=[n.e("cell"),r.id,r.align,r.labelClassName,...mm(n.b(),s,r.fixed,e.store)];return r.className&&u.push(r.className),r.children||u.push(n.is("leaf")),u},getCellStyles:(o,s)=>{const r=gm(s,o.fixed,e.store);return Sr(r,"left"),Sr(r,"right"),r},columns:t}}var i0=ue({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const t=Fe(fl),n=he("table"),{getCellClasses:a,getCellStyles:l,columns:o}=Bq(e),{onScrollableChange:s,onColumnsChange:r}=ym(t);return{ns:n,onScrollableChange:s,onColumnsChange:r,getCellClasses:a,getCellStyles:l,columns:o}},render(){const{columns:e,getCellStyles:t,getCellClasses:n,summaryMethod:a,sumText:l}=this,o=this.store.states.data.value;let s=[];return a?s=a({columns:e,data:o}):e.forEach((r,u)=>{if(u===0){s[u]=l;return}const c=o.map(g=>Number(g[r.property])),d=[];let f=!0;c.forEach(g=>{if(!Number.isNaN(+g)){f=!1;const m=`${g}`.split(".")[1];d.push(m?m.length:0)}});const v=Math.max.apply(null,d);f?s[u]="":s[u]=c.reduce((g,m)=>{const p=Number(m);return Number.isNaN(+p)?g:Number.parseFloat((g+m).toFixed(Math.min(v,20)))},0)}),Ge(Ge("tfoot",[Ge("tr",{},[...e.map((r,u)=>Ge("td",{key:u,colspan:r.colSpan,rowspan:r.rowSpan,class:n(e,u),style:t(r,u)},[Ge("div",{class:["cell",r.labelClassName]},[s[u]])]))])]))}});function Vq(e){return{setCurrentRow:v=>{e.commit("setCurrentRow",v)},getSelectionRows:()=>e.getSelectionRows(),getHalfSelectionRows:()=>e.getHalfSelectionRows(),toggleRowSelection:(v,g,m=!0)=>{e.toggleRowSelection(v,g,!1,m),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:v=>{e.clearFilter(v)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(v,g)=>{e.toggleRowExpansionAdapter(v,g)},clearSort:()=>{e.clearSort()},sort:(v,g)=>{e.commit("sort",{prop:v,order:g})},updateKeyChildren:(v,g)=>{e.updateKeyChildren(v,g)}}}function Fq(e,t,n,a){const l=B(!1),o=B(null),s=B(!1),r=z=>{s.value=z},u=B({width:null,height:null,headerHeight:null}),c=B(!1),d={display:"inline-block",verticalAlign:"middle"},f=B(),v=B(0),g=B(0),m=B(0),p=B(0),h=B(0);fe(()=>e.height,z=>{t.setHeight(z??null)},{immediate:!0}),fe(()=>e.maxHeight,z=>{t.setMaxHeight(z??null)},{immediate:!0}),fe(()=>[e.currentRowKey,n.states.rowKey],([z,V])=>{!i(V)||!i(z)||n.setCurrentRowKey(`${z}`)},{immediate:!0}),fe(()=>e.data,z=>{a.store.commit("setData",z)},{immediate:!0,deep:!0}),ia(()=>{e.expandRowKeys&&n.setExpandRowKeysAdapter(e.expandRowKeys)});const b=()=>{a.store.commit("setHoverRow",null),a.hoverState&&(a.hoverState=null)},y=(z,V)=>{const{pixelX:D,pixelY:_}=V;Math.abs(D)>=Math.abs(_)&&(a.refs.bodyWrapper.scrollLeft+=V.pixelX/5)},C=w(()=>e.height||e.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),S=w(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),E=()=>{C.value&&t.updateElsHeight(),t.updateColumnsWidth(),!(typeof window>"u")&&requestAnimationFrame(T)};mt(async()=>{await Ae(),n.updateColumns(),M(),requestAnimationFrame(E);const z=a.vnode.el,V=a.refs.headerWrapper;e.flexible&&z&&z.parentElement&&(z.parentElement.style.minWidth="0"),u.value={width:f.value=z.offsetWidth,height:z.offsetHeight,headerHeight:e.showHeader&&V?V.offsetHeight:null},n.states.columns.value.forEach(D=>{D.filteredValue&&D.filteredValue.length&&a.store.commit("filterChange",{column:D,values:D.filteredValue,silent:!0})}),a.$ready=!0});const x=(z,V)=>{if(!z)return;const D=Array.from(z.classList).filter(_=>!_.startsWith("is-scrolling-"));D.push(t.scrollX.value?V:"is-scrolling-none"),z.className=D.join(" ")},$=z=>{const{tableWrapper:V}=a.refs;x(V,z)},k=z=>{const{tableWrapper:V}=a.refs;return!!(V&&V.classList.contains(z))},T=function(){if(!a.refs.scrollBarRef)return;if(!t.scrollX.value){const K="is-scrolling-none";k(K)||$(K);return}const z=a.refs.scrollBarRef.wrapRef;if(!z)return;const{scrollLeft:V,offsetWidth:D,scrollWidth:_}=z,{headerWrapper:F,footerWrapper:L}=a.refs;F&&(F.scrollLeft=V),L&&(L.scrollLeft=V),V>=_-D-1?$("is-scrolling-right"):$(V===0?"is-scrolling-left":"is-scrolling-middle")},M=()=>{a.refs.scrollBarRef&&(a.refs.scrollBarRef.wrapRef&&Ht(a.refs.scrollBarRef.wrapRef,"scroll",T,{passive:!0}),e.fit?on(a.vnode.el,P):Ht(window,"resize",P),on(a.refs.tableInnerWrapper,()=>{var z,V;P(),(V=(z=a.refs)==null?void 0:z.scrollBarRef)==null||V.update()}))},P=()=>{var X,Z,Q,ee;const z=a.vnode.el;if(!a.$ready||!z)return;let V=!1;const{width:D,height:_,headerHeight:F}=u.value,L=f.value=z.offsetWidth;D!==L&&(V=!0);const K=z.offsetHeight;(e.height||C.value)&&_!==K&&(V=!0);const q=e.tableLayout==="fixed"?a.refs.headerWrapper:(X=a.refs.tableHeaderRef)==null?void 0:X.$el;e.showHeader&&(q==null?void 0:q.offsetHeight)!==F&&(V=!0),v.value=((Z=a.refs.tableWrapper)==null?void 0:Z.scrollHeight)||0,m.value=(q==null?void 0:q.scrollHeight)||0,p.value=((Q=a.refs.footerWrapper)==null?void 0:Q.offsetHeight)||0,h.value=((ee=a.refs.appendWrapper)==null?void 0:ee.offsetHeight)||0,g.value=v.value-m.value-p.value-h.value,V&&(u.value={width:L,height:K,headerHeight:e.showHeader&&(q==null?void 0:q.offsetHeight)||0},E())},N=$n(),A=w(()=>{const{bodyWidth:z,scrollY:V,gutterWidth:D}=t;return z.value?`${z.value-(V.value?D:0)}px`:""}),j=w(()=>e.maxHeight?"fixed":e.tableLayout);return{isHidden:l,renderExpanded:o,setDragVisible:r,isGroup:c,handleMouseLeave:b,handleHeaderFooterMousewheel:y,tableSize:N,emptyBlockStyle:w(()=>{if(e.data&&e.data.length)return;let z="100%";e.height&&g.value&&(z=`${g.value}px`);const V=f.value;return{width:V?`${V}px`:"",height:z}}),resizeProxyVisible:s,bodyWidth:A,resizeState:u,doLayout:E,tableBodyStyles:S,tableLayout:j,scrollbarViewStyle:d,scrollbarStyle:w(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${m.value+p.value}px)`}:{maxHeight:`${+e.maxHeight-m.value-p.value}px`}:{})}}function zq(e){let t;const n=()=>{const a=e.vnode.el.querySelector(".hidden-columns"),l={childList:!0,subtree:!0},o=e.store.states.updateOrderFns;t=new MutationObserver(()=>{o.forEach(s=>s())}),t.observe(a,l)};mt(()=>{n()}),eu(()=>{t==null||t.disconnect()})}function mc(e){const t=e.tableLayout==="auto";let n=e.columns||[];t&&n.every(({width:l})=>xt(l))&&(n=[]);const a=l=>{const o={key:`${e.tableLayout}_${l.id}`,style:{},name:void 0};return t?o.style={width:`${l.width}px`}:o.name=l.id,o};return Ge("colgroup",{},n.map(l=>Ge("col",a(l))))}mc.props=["columns","tableLayout"];const Hq=()=>{const e=B(),t=(o,s)=>{const r=e.value;r&&r.scrollTo(o,s)},n=(o,s)=>{const r=e.value;r&&He(s)&&["Top","Left"].includes(o)&&r[`setScroll${o}`](s)};return{scrollBarRef:e,scrollTo:t,setScrollTop:o=>n("Top",o),setScrollLeft:o=>n("Left",o)}},Kq=["data-prefix"],Wq={ref:"hiddenColumns",class:"hidden-columns"};var jq=ue({name:"ElTable",__name:"table",props:J7,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-dblclick","cell-contextmenu","cell-click","row-dblclick","row-click","row-contextmenu","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(e,{expose:t}){const n=e,{t:a}=St(),l=he("table"),o=go("table"),s=ht();Tt(fl,s);const r=mq(s,n);s.store=r;const u=new bq({store:s.store,table:s,fit:n.fit,showHeader:n.showHeader});s.layout=u;const c=w(()=>(r.states.data.value||[]).length===0),{setCurrentRow:d,getSelectionRows:f,getHalfSelectionRows:v,toggleRowSelection:g,clearSelection:m,clearFilter:p,toggleAllSelection:h,toggleRowExpansion:b,clearSort:y,sort:C,updateKeyChildren:S}=Vq(r),{isHidden:E,renderExpanded:x,setDragVisible:$,isGroup:k,handleMouseLeave:T,handleHeaderFooterMousewheel:M,tableSize:P,emptyBlockStyle:N,resizeProxyVisible:A,bodyWidth:j,resizeState:z,doLayout:V,tableBodyStyles:D,tableLayout:_,scrollbarViewStyle:F,scrollbarStyle:L}=Fq(n,u,r,s),{scrollBarRef:K,scrollTo:q,setScrollLeft:X,setScrollTop:Z}=Hq(),Q=Al(V,50),ee=eq(l.namespace.value),ie=s;s.tableId=ee,s.state={isGroup:k,resizeState:z,doLayout:V,debouncedUpdateLayout:Q};const ve=w(()=>n.sumText??a("el.table.sumText")),pe=w(()=>n.emptyText??a("el.table.emptyText")),re=w(()=>{var ae;return n.tooltipEffect??((ae=o.value)==null?void 0:ae.tooltipEffect)}),R=w(()=>{var ae;return n.tooltipOptions??((ae=o.value)==null?void 0:ae.tooltipOptions)}),Y=w(()=>P2(r.states.originColumns.value)[0]);return zq(s),zt(()=>{Q.cancel()}),t({ns:l,layout:u,store:r,columns:Y,handleHeaderFooterMousewheel:M,handleMouseLeave:T,tableId:ee,tableSize:P,isHidden:E,isEmpty:c,renderExpanded:x,resizeProxyVisible:A,resizeState:z,isGroup:k,bodyWidth:j,tableBodyStyles:D,emptyBlockStyle:N,debouncedUpdateLayout:Q,setCurrentRow:d,getSelectionRows:f,getHalfSelectionRows:v,toggleRowSelection:g,clearSelection:m,clearFilter:p,toggleAllSelection:h,toggleRowExpansion:b,clearSort:y,doLayout:V,sort:C,updateKeyChildren:S,t:a,setDragVisible:$,context:ie,computedSumText:ve,computedEmptyText:pe,computedTooltipEffect:re,computedTooltipOptions:R,tableLayout:_,scrollbarViewStyle:F,scrollbarStyle:L,scrollBarRef:K,scrollTo:q,setScrollLeft:X,setScrollTop:Z,allowDragLastColumn:n.allowDragLastColumn}),(ae,le)=>(O(),H("div",{ref:"tableWrapper",class:I([{[i(l).m("fit")]:e.fit,[i(l).m("striped")]:e.stripe,[i(l).m("border")]:e.border||i(k),[i(l).m("hidden")]:i(E),[i(l).m("group")]:i(k),[i(l).m("fluid-height")]:e.maxHeight,[i(l).m("scrollable-x")]:i(u).scrollX.value,[i(l).m("scrollable-y")]:i(u).scrollY.value,[i(l).m("enable-row-hover")]:!i(r).states.isComplex.value,[i(l).m("enable-row-transition")]:(i(r).states.data.value||[]).length!==0&&(i(r).states.data.value||[]).length<100,"has-footer":e.showSummary},i(l).m(i(P)),e.className,i(l).b(),i(l).m(`layout-${i(_)}`)]),style:je(e.style),"data-prefix":i(l).namespace.value,onMouseleave:le[1]||(le[1]=(...se)=>i(T)&&i(T)(...se))},[W("div",{ref:"tableInnerWrapper",class:I(i(l).e("inner-wrapper"))},[W("div",Wq,[ne(ae.$slots,"default")],512),e.showHeader&&i(_)==="fixed"?ft((O(),H("div",{key:0,ref:"headerWrapper",class:I(i(l).e("header-wrapper"))},[W("table",{ref:"tableHeader",class:I(i(l).e("header")),style:je(i(D)),border:"0",cellpadding:"0",cellspacing:"0"},[U(i(mc),{columns:i(r).states.columns.value,"table-layout":i(_)},null,8,["columns","table-layout"]),U(i(r0),{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:i(r),"append-filter-panel-to":e.appendFilterPanelTo,"allow-drag-last-column":e.allowDragLastColumn,onSetDragVisible:i($)},null,8,["border","default-sort","store","append-filter-panel-to","allow-drag-last-column","onSetDragVisible"])],6)],2)),[[i(hy),i(M)]]):te("v-if",!0),W("div",{ref:"bodyWrapper",class:I(i(l).e("body-wrapper"))},[U(i(il),{ref_key:"scrollBarRef",ref:K,"view-style":i(F),"wrap-style":i(L),always:e.scrollbarAlwaysOn,tabindex:e.scrollbarTabindex,native:e.nativeScrollbar,onScroll:le[0]||(le[0]=se=>ae.$emit("scroll",se))},{default:J(()=>[W("table",{ref:"tableBody",class:I(i(l).e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:je({width:i(j),tableLayout:i(_)})},[U(i(mc),{columns:i(r).states.columns.value,"table-layout":i(_)},null,8,["columns","table-layout"]),e.showHeader&&i(_)==="auto"?(O(),oe(i(r0),{key:0,ref:"tableHeaderRef",class:I(i(l).e("body-header")),border:e.border,"default-sort":e.defaultSort,store:i(r),"append-filter-panel-to":e.appendFilterPanelTo,onSetDragVisible:i($)},null,8,["class","border","default-sort","store","append-filter-panel-to","onSetDragVisible"])):te("v-if",!0),U(i(Lq),{context:i(ie),highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":re.value,"tooltip-options":R.value,"row-style":e.rowStyle,store:i(r),stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),e.showSummary&&i(_)==="auto"?(O(),oe(i(i0),{key:1,class:I(i(l).e("body-footer")),border:e.border,"default-sort":e.defaultSort,store:i(r),"sum-text":ve.value,"summary-method":e.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):te("v-if",!0)],6),c.value?(O(),H("div",{key:0,ref:"emptyBlock",style:je(i(N)),class:I(i(l).e("empty-block"))},[W("span",{class:I(i(l).e("empty-text"))},[ne(ae.$slots,"empty",{},()=>[it(Se(pe.value),1)])],2)],6)):te("v-if",!0),ae.$slots.append?(O(),H("div",{key:1,ref:"appendWrapper",class:I(i(l).e("append-wrapper"))},[ne(ae.$slots,"append")],2)):te("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex","native"])],2),e.showSummary&&i(_)==="fixed"?ft((O(),H("div",{key:1,ref:"footerWrapper",class:I(i(l).e("footer-wrapper"))},[W("table",{class:I(i(l).e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:je(i(D))},[U(i(mc),{columns:i(r).states.columns.value,"table-layout":i(_)},null,8,["columns","table-layout"]),U(i(i0),{border:e.border,"default-sort":e.defaultSort,store:i(r),"sum-text":ve.value,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[At,!c.value],[i(hy),i(M)]]):te("v-if",!0),e.border||i(k)?(O(),H("div",{key:2,class:I(i(l).e("border-left-patch"))},null,2)):te("v-if",!0)],2),ft(W("div",{ref:"resizeProxy",class:I(i(l).e("column-resize-proxy"))},null,2),[[At,i(A)]])],46,Kq))}}),qq=jq;const Yq={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(t=>["ascending","descending",null].includes(t))}},Uq={selection:"table-column--selection",expand:"table__expand-column"},Gq={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},Xq=e=>Uq[e]||"",Jq={selection:{renderHeader({store:e}){function t(){return e.states.data.value&&e.states.data.value.length===0}return Ge(ll,{disabled:t(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection??void 0,modelValue:e.states.isAllSelected.value,ariaLabel:e.t("el.table.selectAllLabel")})},renderCell({row:e,column:t,store:n,$index:a}){return Ge(ll,{disabled:t.selectable?!t.selectable.call(null,e,a):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",e)},onClick:l=>l.stopPropagation(),modelValue:n.isSelected(e),indeterminate:n.getRowIndeterminate(e),ariaLabel:n.t("el.table.selectRowLabel")})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let n=t+1;const a=e.index;return He(a)?n=t+a:We(a)&&(n=a(t)),Ge("div",{},[n])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({column:e,row:t,store:n,expanded:a,$index:l}){var c,d;const{ns:o}=n,s=[o.e("expand-icon")];!e.renderExpand&&a&&s.push(o.em("expand-icon","expanded"));const r=function(f){f.stopPropagation(),n.toggleRowExpansion(t)},u=((d=(c=n.states.rowExpandable).value)==null?void 0:d.call(c,t,l))??!0;return u||s.push(o.is("disabled")),Ge("button",{type:"button",disabled:!u,"aria-label":n.t(a?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":a,class:s,onClick:r},{default:()=>e.renderExpand?[e.renderExpand({expanded:a,expandable:u})]:[Ge(Ve,null,{default:()=>[Ge(ra)]})]})},sortable:!1,resizable:!1}};function Zq({row:e,column:t,$index:n}){var o;const a=t.property,l=a&&_o(e,a).value;return t&&t.formatter?t.formatter(e,t,l,n):((o=l==null?void 0:l.toString)==null?void 0:o.call(l))||""}function Qq({row:e,treeNode:t,store:n},a=!1){const{ns:l}=n;if(!t)return a?[Ge("span",{class:l.e("placeholder")})]:null;const o=[],s=function(r){r.stopPropagation(),!t.loading&&n.loadOrToggle(e)};if(t.indent&&o.push(Ge("span",{class:l.e("indent"),style:{"padding-left":`${t.indent}px`}})),Wt(t.expanded)&&!t.noLazyChildren){const r=[l.e("expand-icon"),t.expanded?l.em("expand-icon","expanded"):""];let u=ra;t.loading&&(u=rl),o.push(Ge("button",{type:"button","aria-label":n.t(t.expanded?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":t.expanded,class:r,onClick:s},{default:()=>[Ge(Ve,{class:l.is("loading",t.loading)},{default:()=>[Ge(u)]})]}))}else o.push(Ge("span",{class:l.e("placeholder")}));return o}function u0(e,t){return e.reduce((n,a)=>(n[a]=a,n),t)}function eY(e,t){const n=ht();return{registerComplexWatchers:()=>{const o=["fixed"],s={realWidth:"width",realMinWidth:"minWidth"},r=u0(o,s);Object.keys(r).forEach(u=>{const c=s[u];Dt(t,c)&&fe(()=>t[c],d=>{let f=d;c==="width"&&u==="realWidth"&&(f=hm(d)),c==="minWidth"&&u==="realMinWidth"&&(f=x2(d)),n.columnConfig.value[c]=f,n.columnConfig.value[u]=f;const v=c==="fixed";e.value.store.scheduleLayout(v)})})},registerNormalWatchers:()=>{const o=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip","tooltipFormatter","resizable"],s=["showOverflowTooltip"],r={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},u=u0(o,r);Object.keys(u).forEach(d=>{const f=r[d];Dt(t,f)&&fe(()=>t[f],v=>{n.columnConfig.value[d]=v,(d==="filters"||d==="filterMethod")&&(n.columnConfig.value.filterable=!!(n.columnConfig.value.filters||n.columnConfig.value.filterMethod))})}),s.forEach(d=>{Dt(e.value.props,d)&&fe(()=>e.value.props[d],f=>{n.columnConfig.value.type!=="selection"&&xt(t[d])&&(n.columnConfig.value[d]=f)})});const c=go("table");c.value&&Dt(c.value,"showOverflowTooltip")&&fe(()=>{var d;return(d=c.value)==null?void 0:d.showOverflowTooltip},d=>{n.columnConfig.value.type!=="selection"&&(!xt(t.showOverflowTooltip)||!xt(e.value.props.showOverflowTooltip)||(n.columnConfig.value.showOverflowTooltip=d))})}}}function tY(e,t,n){const a=ht(),l=B(""),o=B(!1),s=B(),r=B(),u=he("table");ia(()=>{s.value=e.align?`is-${e.align}`:null,s.value}),ia(()=>{r.value=e.headerAlign?`is-${e.headerAlign}`:s.value,r.value});const c=w(()=>{let S=a.vnode.vParent||a.parent;for(;S&&!S.tableId&&!S.columnId;)S=S.vnode.vParent||S.parent;return S}),d=w(()=>{const{store:S}=a.parent;if(!S)return!1;const{treeData:E}=S.states,x=E.value;return x&&Object.keys(x).length>0}),f=B(hm(e.width)),v=B(x2(e.minWidth)),g=S=>(f.value&&(S.width=f.value),v.value&&(S.minWidth=v.value),!f.value&&v.value&&(S.width=void 0),S.minWidth||(S.minWidth=80),S.realWidth=Number(xt(S.width)?S.minWidth:S.width),S),m=S=>{const E=S.type,x=Jq[E]||{};Object.keys(x).forEach(k=>{const T=x[k];k!=="className"&&!xt(T)&&(S[k]=T)});const $=Xq(E);if($){const k=`${i(u.namespace)}-${$}`;S.className=S.className?`${S.className} ${k}`:k}return S},p=S=>{me(S)?S.forEach(x=>E(x)):E(S);function E(x){var $;(($=x==null?void 0:x.type)==null?void 0:$.name)==="ElTableColumn"&&(x.vParent=a)}};return{columnId:l,realAlign:s,isSubColumn:o,realHeaderAlign:r,columnOrTableParent:c,setColumnWidth:g,setColumnForcedProps:m,setColumnRenders:S=>{e.renderHeader?Kt("TableColumn","Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header."):S.type!=="selection"&&(S.renderHeader=x=>{if(a.columnConfig.value.label,t.header){const $=t.header(x);if(O2($))return Ge(ze,$)}return it(S.label)}),t["filter-icon"]&&(S.renderFilterIcon=x=>ne(t,"filter-icon",x)),t.expand&&(S.renderExpand=x=>ne(t,"expand",x));let E=S.renderCell;return S.type==="expand"?(S.renderCell=x=>Ge("div",{class:"cell"},[E(x)]),n.value.renderExpanded=x=>t.default?t.default(x):t.default):(E=E||Zq,S.renderCell=x=>{let $=null;if(t.default){const A=t.default(x);$=A.some(j=>j.type!==Cn)?A:E(x)}else $=E(x);const{columns:k}=n.value.store.states,T=k.value.findIndex(A=>A.type==="default"),M=d.value&&x.cellIndex===T,P=Qq(x,M),N={class:"cell",style:{}};return S.showOverflowTooltip&&(N.class=`${N.class} ${i(u.namespace)}-tooltip`,N.style={width:`${(x.column.realWidth||Number(x.column.width))-1}px`}),p($),Ge("div",N,[P,$])}),S},getPropsData:(...S)=>S.reduce((E,x)=>(me(x)&&x.forEach($=>{E[$]=e[$]}),E),{}),getColumnElIndex:(S,E)=>Array.prototype.indexOf.call(S,E),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",a.columnConfig.value)}}}var nY=ue({name:"ElTableColumn",__name:"index",props:Yq,setup(e){const t=e,n=mn(),a=ht(),l=go("table"),o=B({}),s=w(()=>{let k=a.parent;for(;k&&!k.tableId;)k=k.parent;return k}),{registerNormalWatchers:r,registerComplexWatchers:u}=eY(s,t),{columnId:c,isSubColumn:d,realHeaderAlign:f,columnOrTableParent:v,setColumnWidth:g,setColumnForcedProps:m,setColumnRenders:p,getPropsData:h,getColumnElIndex:b,realAlign:y,updateColumnOrder:C}=tY(t,n,s),S=v.value,E="tableId"in S?S.tableId:S.columnId;c.value=tq(E),kd(()=>{var j,z;d.value=s.value!==S;const k=t.type||"default",T=t.sortable===""?!0:t.sortable,M=k==="selection"?!1:xt(t.showOverflowTooltip)?S.props.showOverflowTooltip??((j=l.value)==null?void 0:j.showOverflowTooltip):t.showOverflowTooltip,P=xt(t.tooltipFormatter)?S.props.tooltipFormatter??((z=l.value)==null?void 0:z.tooltipFormatter):t.tooltipFormatter,N={...Gq[k],id:c.value,type:k,property:t.prop||t.property,align:y,headerAlign:f,showOverflowTooltip:M,tooltipFormatter:P,filterable:t.filters||t.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:T,index:t.index,rawColumnKey:a.vnode.key};let A=h(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);A=lq(N,A),A=sq(p,g,m)(A),o.value=A,r(),u()}),mt(()=>{var P,N;const k=v.value,T=d.value?(P=k.vnode.el)==null?void 0:P.children:(N=k.refs.hiddenColumns)==null?void 0:N.children,M=()=>b(T||[],a.vnode.el);o.value.getColumnIndex=M,M()>-1&&s.value.store.commit("insertColumn",o.value,d.value?"columnConfig"in k&&k.columnConfig.value:null,C)});let x=n.header;Ed(()=>{n.header!==x&&(x=n.header,si(o))}),zt(()=>{const k=o.value.getColumnIndex;(k?k():-1)>-1&&s.value.store.commit("removeColumn",o.value,d.value?"columnConfig"in S&&S.columnConfig.value:null,C)}),a.columnId=c.value,a.columnConfig=o;const $=()=>{var k,T;try{const M=(k=n.default)==null?void 0:k.call(n,{row:{},column:{},$index:-1}),P=[];if(me(M))for(const N of M)((T=N.type)==null?void 0:T.name)==="ElTableColumn"||N.shapeFlag&2?P.push(N):N.type===ze&&me(N.children)&&N.children.forEach(A=>{(A==null?void 0:A.patchFlag)!==1024&&!De(A==null?void 0:A.children)&&P.push(A)});return Ge("div",P)}catch{return Ge("div",[])}};return(k,T)=>(O(),oe($))}}),aY=nY,lY=aY,R2=lY;const oY=ut(qq,{TableColumn:R2}),sY=un(R2),xv={asc:"desc",desc:"asc"},Ui=Symbol("placeholder"),_2=String,Su={type:G(Array),required:!0},wm={type:G(Array)},A2={...wm,required:!0},rY=String,c0={type:G(Array),default:()=>dn([])},rs={type:Number,required:!0},L2={type:G([String,Number,Symbol]),default:"id"},d0={type:G(Object)},ds=$e({class:String,columns:Su,columnsStyles:{type:G(Object),required:!0},depth:Number,expandColumnKey:rY,estimatedRowHeight:{...ys.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:G(Function)},onRowHover:{type:G(Function)},onRowHeightChange:{type:G(Function)},rowData:{type:G(Object),required:!0},rowEventHandlers:{type:G(Object)},rowIndex:{type:Number,required:!0},rowKey:L2,style:{type:G(Object)}}),rp={type:Number,required:!0},Sm=$e({class:String,columns:Su,fixedHeaderData:{type:G(Array)},headerData:{type:G(Array),required:!0},headerHeight:{type:G([Number,Array]),default:50},rowWidth:rp,rowHeight:{type:Number,default:50},height:rp,width:rp}),gc=$e({columns:Su,data:A2,fixedData:wm,estimatedRowHeight:ds.estimatedRowHeight,width:rs,height:rs,headerWidth:rs,headerHeight:Sm.headerHeight,bodyWidth:rs,rowHeight:rs,cache:tk.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:ys.scrollbarAlwaysOn,scrollbarStartGap:ys.scrollbarStartGap,scrollbarEndGap:ys.scrollbarEndGap,class:_2,style:d0,containerStyle:d0,getRowHeight:{type:G(Function),required:!0},rowKey:ds.rowKey,onRowsRendered:{type:G(Function)},onScroll:{type:G(Function)}}),iY=$e({cache:gc.cache,estimatedRowHeight:ds.estimatedRowHeight,rowKey:L2,headerClass:{type:G([String,Function])},headerProps:{type:G([Object,Function])},headerCellProps:{type:G([Object,Function])},headerHeight:Sm.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:G([String,Function])},rowProps:{type:G([Object,Function])},rowHeight:{type:Number,default:50},cellProps:{type:G([Object,Function])},columns:Su,data:A2,dataGetter:{type:G(Function)},fixedData:wm,expandColumnKey:ds.expandColumnKey,expandedRowKeys:c0,defaultExpandedRowKeys:c0,class:_2,fixed:Boolean,style:{type:G(Object)},width:rs,height:rs,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:ys.hScrollbarSize,vScrollbarSize:ys.vScrollbarSize,scrollbarAlwaysOn:lk.alwaysOn,sortBy:{type:G(Object),default:()=>({})},sortState:{type:G(Object),default:void 0},onColumnSort:{type:G(Function)},onExpandedRowsChange:{type:G(Function)},onEndReached:{type:G(Function)},onRowExpand:ds.onRowExpand,onScroll:gc.onScroll,onRowsRendered:gc.onRowsRendered,rowEventHandlers:ds.rowEventHandlers}),uY=(e,t,n)=>{const a={flexGrow:0,flexShrink:0,...n?{}:{flexGrow:e.flexGrow??0,flexShrink:e.flexShrink??1}},l={...e.style??{},...a,flexBasis:"auto",width:e.width};return t||(e.maxWidth&&(l.maxWidth=e.maxWidth),e.minWidth&&(l.minWidth=e.minWidth)),l};function cY(e,t,n){const a=w(()=>i(t).map((h,b)=>({...h,key:h.key??h.dataKey??b}))),l=w(()=>i(a).filter(h=>!h.hidden)),o=w(()=>i(l).filter(h=>h.fixed==="left"||h.fixed===!0)),s=w(()=>i(l).filter(h=>h.fixed==="right")),r=w(()=>i(l).filter(h=>!h.fixed)),u=w(()=>{const h=[];return i(o).forEach(b=>{h.push({...b,placeholderSign:Ui})}),i(r).forEach(b=>{h.push(b)}),i(s).forEach(b=>{h.push({...b,placeholderSign:Ui})}),h}),c=w(()=>i(o).length||i(s).length),d=w(()=>i(a).reduce((h,b)=>(h[b.key]=uY(b,i(n),e.fixed),h),{})),f=w(()=>i(l).reduce((h,b)=>h+b.width,0)),v=h=>i(a).find(b=>b.key===h),g=h=>i(d)[h],m=(h,b)=>{h.width=b};function p(h){var E;const{key:b}=h.currentTarget.dataset;if(!b)return;const{sortState:y,sortBy:C}=e;let S="asc";st(y)?S=xv[y[b]]:S=xv[C.order],(E=e.onColumnSort)==null||E.call(e,{column:v(b),key:b,order:S})}return{columns:a,columnsStyles:d,columnsTotalWidth:f,fixedColumnsOnLeft:o,fixedColumnsOnRight:s,hasFixedColumns:c,mainColumns:u,normalColumns:r,visibleColumns:l,getColumn:v,getColumnStyle:g,updateColumnWidth:m,onColumnSorted:p}}const dY=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,onMaybeEndReached:l})=>{const o=B({scrollLeft:0,scrollTop:0});function s(g){var p,h,b;const{scrollTop:m}=g;(p=t.value)==null||p.scrollTo(g),(h=n.value)==null||h.scrollToTop(m),(b=a.value)==null||b.scrollToTop(m)}function r(g){o.value=g,s(g)}function u(g){o.value.scrollTop=g,s(i(o))}function c(g){var m,p;o.value.scrollLeft=g,(p=(m=t.value)==null?void 0:m.scrollTo)==null||p.call(m,i(o))}function d(g){var m;r(g),(m=e.onScroll)==null||m.call(e,g)}function f({scrollTop:g}){const{scrollTop:m}=i(o);g!==m&&u(g)}function v(g,m="auto"){var p;(p=t.value)==null||p.scrollToRow(g,m)}return fe(()=>i(o).scrollTop,(g,m)=>{g>m&&l()}),{scrollPos:o,scrollTo:r,scrollToLeft:c,scrollToTop:u,scrollToRow:v,onScroll:d,onVerticalScroll:f}},fY=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,tableInstance:l,ns:o,isScrolling:s})=>{const r=ht(),{emit:u}=r,c=Et(!1),d=B(e.defaultExpandedRowKeys||[]),f=B(-1),v=Et(null),g=B({}),m=B({}),p=Et({}),h=Et({}),b=Et({}),y=w(()=>He(e.estimatedRowHeight));function C(M){var P;(P=e.onRowsRendered)==null||P.call(e,M),M.rowCacheEnd>i(f)&&(f.value=M.rowCacheEnd)}function S({hovered:M,rowKey:P}){s.value||l.vnode.el.querySelectorAll(`[rowkey="${String(P)}"]`).forEach(N=>{M?N.classList.add(o.is("hovered")):N.classList.remove(o.is("hovered"))})}function E({expanded:M,rowData:P,rowIndex:N,rowKey:A}){var V,D;const j=[...i(d)],z=j.indexOf(A);M?z===-1&&j.push(A):z>-1&&j.splice(z,1),d.value=j,u("update:expandedRowKeys",j),(V=e.onRowExpand)==null||V.call(e,{expanded:M,rowData:P,rowIndex:N,rowKey:A}),(D=e.onExpandedRowsChange)==null||D.call(e,j),l.vnode.el.querySelector(`.${o.is("hovered")}[rowkey="${String(A)}"]`)&&Ae(()=>S({hovered:!0,rowKey:A}))}const x=Al(()=>{var M,P,N,A;c.value=!0,g.value={...i(g),...i(m)},$(i(v),!1),m.value={},v.value=null,(M=t.value)==null||M.forceUpdate(),(P=n.value)==null||P.forceUpdate(),(N=a.value)==null||N.forceUpdate(),(A=r.proxy)==null||A.$forceUpdate(),c.value=!1},0);function $(M,P=!1){i(y)&&[t,n,a].forEach(N=>{const A=i(N);A&&A.resetAfterRowIndex(M,P)})}function k(M,P,N){const A=i(v);(A===null||A>N)&&(v.value=N),m.value[M]=P}function T({rowKey:M,height:P,rowIndex:N},A){A?A==="right"?b.value[M]=P:p.value[M]=P:h.value[M]=P;const j=Math.max(...[p,b,h].map(z=>z.value[M]||0));i(g)[M]!==j&&(k(M,j,N),x())}return{expandedRowKeys:d,lastRenderedRowIndex:f,isDynamic:y,isResetting:c,rowHeights:g,resetAfterIndex:$,onRowExpanded:E,onRowHovered:S,onRowsRendered:C,onRowHeightChange:T}},pY=(e,{expandedRowKeys:t,lastRenderedRowIndex:n,resetAfterIndex:a})=>{const l=B({}),o=w(()=>{const r={},{data:u,rowKey:c}=e,d=i(t);if(!d||!d.length)return u;const f=[],v=new Set;d.forEach(m=>v.add(m));let g=u.slice();for(g.forEach(m=>r[m[c]]=0);g.length>0;){const m=g.shift();f.push(m),v.has(m[c])&&me(m.children)&&m.children.length>0&&(g=[...m.children,...g],m.children.forEach(p=>r[p[c]]=r[m[c]]+1))}return l.value=r,f}),s=w(()=>{const{data:r,expandColumnKey:u}=e;return u?i(o):r});return fe(s,(r,u)=>{r!==u&&(n.value=-1,a(0,!0))}),{data:s,depthMap:l}},vY=(e,t)=>e+t,bc=e=>me(e)?e.reduce(vY,0):e,Ns=(e,t,n={})=>We(e)?e(t):e??n,Io=e=>(["width","maxWidth","minWidth","height"].forEach(t=>{e[t]=fn(e[t])}),e),D2=e=>Jt(e)?t=>Ge(e,t):e,hY=(e,{columnsTotalWidth:t,rowsHeight:n,fixedColumnsOnLeft:a,fixedColumnsOnRight:l})=>{const o=w(()=>{const{fixed:p,width:h,vScrollbarSize:b}=e,y=h-b;return p?Math.max(Math.round(i(t)),y):y}),s=w(()=>{const{height:p=0,maxHeight:h=0,footerHeight:b,hScrollbarSize:y}=e;if(h>0){const C=i(v),S=i(n),E=i(f)+C+S+y;return Math.min(E,h-b)}return p-b}),r=w(()=>{const{maxHeight:p}=e,h=i(s);if(He(p)&&p>0)return h;const b=i(n)+i(f)+i(v);return Math.min(h,b)}),u=p=>p.width,c=w(()=>bc(i(a).map(u))),d=w(()=>bc(i(l).map(u))),f=w(()=>bc(e.headerHeight)),v=w(()=>{var p;return(((p=e.fixedData)==null?void 0:p.length)||0)*e.rowHeight}),g=w(()=>i(s)-i(f)-i(v)),m=w(()=>{const{style:p={},height:h,width:b}=e;return Io({...p,height:h,width:b})});return{bodyWidth:o,fixedTableHeight:r,mainTableHeight:s,leftTableWidth:c,rightTableWidth:d,windowHeight:g,footerHeight:w(()=>Io({height:e.footerHeight})),emptyStyle:w(()=>({top:fn(i(f)),bottom:fn(e.footerHeight),width:fn(e.width)})),rootStyle:m,headerHeight:f}};function mY(e){const t=B(),n=B(),a=B(),{columns:l,columnsStyles:o,columnsTotalWidth:s,fixedColumnsOnLeft:r,fixedColumnsOnRight:u,hasFixedColumns:c,mainColumns:d,onColumnSorted:f}=cY(e,Ot(e,"columns"),Ot(e,"fixed")),{scrollTo:v,scrollToLeft:g,scrollToTop:m,scrollToRow:p,onScroll:h,onVerticalScroll:b,scrollPos:y}=dY(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,onMaybeEndReached:ae}),C=he("table-v2"),S=ht(),E=Et(!1),{expandedRowKeys:x,lastRenderedRowIndex:$,isDynamic:k,isResetting:T,rowHeights:M,resetAfterIndex:P,onRowExpanded:N,onRowHeightChange:A,onRowHovered:j,onRowsRendered:z}=fY(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,tableInstance:S,ns:C,isScrolling:E}),{data:V,depthMap:D}=pY(e,{expandedRowKeys:x,lastRenderedRowIndex:$,resetAfterIndex:P}),_=w(()=>{const{estimatedRowHeight:le,rowHeight:se}=e,de=i(V);return He(le)?Object.values(i(M)).reduce((be,we)=>be+we,0):de.length*se}),{bodyWidth:F,fixedTableHeight:L,mainTableHeight:K,leftTableWidth:q,rightTableWidth:X,windowHeight:Z,footerHeight:Q,emptyStyle:ee,rootStyle:ie,headerHeight:ve}=hY(e,{columnsTotalWidth:s,fixedColumnsOnLeft:r,fixedColumnsOnRight:u,rowsHeight:_}),pe=B(),re=w(()=>{const le=i(V).length===0;return me(e.fixedData)?e.fixedData.length===0&&le:le});function R(le){const{estimatedRowHeight:se,rowHeight:de,rowKey:be}=e;return se?i(M)[i(V)[le][be]]||se:de}const Y=B(!1);function ae(){const{onEndReached:le}=e;if(!le)return;const{scrollTop:se}=i(y),de=i(_),be=de-(se+i(Z))+e.hScrollbarSize;!Y.value&&i($)>=0&&de<=se+i(K)-i(ve)?(Y.value=!0,le(be)):Y.value=!1}return fe(()=>i(_),()=>Y.value=!1),fe(()=>e.expandedRowKeys,le=>x.value=le,{deep:!0}),{columns:l,containerRef:pe,mainTableRef:t,leftTableRef:n,rightTableRef:a,isDynamic:k,isResetting:T,isScrolling:E,hasFixedColumns:c,columnsStyles:o,columnsTotalWidth:s,data:V,expandedRowKeys:x,depthMap:D,fixedColumnsOnLeft:r,fixedColumnsOnRight:u,mainColumns:d,bodyWidth:F,emptyStyle:ee,rootStyle:ie,footerHeight:Q,mainTableHeight:K,fixedTableHeight:L,leftTableWidth:q,rightTableWidth:X,showEmpty:re,getRowHeight:R,onColumnSorted:f,onRowHovered:j,onRowExpanded:N,onRowsRendered:z,onRowHeightChange:A,scrollTo:v,scrollToLeft:g,scrollToTop:m,scrollToRow:p,onScroll:h,onVerticalScroll:b}}const Cm=Symbol("tableV2"),B2="tableV2GridScrollLeft",gY=ue({name:"ElTableV2Header",props:Sm,setup(e,{slots:t,expose:n}){const a=he("table-v2"),l=Fe(B2),o=B(),s=w(()=>Io({width:e.width,height:e.height})),r=w(()=>Io({width:e.rowWidth,height:e.height})),u=w(()=>Ln(i(e.headerHeight))),c=v=>{const g=i(o);Ae(()=>{g!=null&&g.scroll&&g.scroll({left:v})})},d=()=>{const v=a.e("fixed-header-row"),{columns:g,fixedHeaderData:m,rowHeight:p}=e;return m==null?void 0:m.map((h,b)=>{var C;const y=Io({height:p,width:"100%"});return(C=t.fixed)==null?void 0:C.call(t,{class:v,columns:g,rowData:h,rowIndex:-(b+1),style:y})})},f=()=>{const v=a.e("dynamic-header-row"),{columns:g}=e;return i(u).map((m,p)=>{var b;const h=Io({width:"100%",height:m});return(b=t.dynamic)==null?void 0:b.call(t,{class:v,columns:g,headerIndex:p,style:h})})};return Kl(()=>{l!=null&&l.value&&c(l.value)}),n({scrollToLeft:c}),()=>{if(!(e.height<=0))return U("div",{ref:o,class:e.class,style:i(s),role:"rowgroup"},[U("div",{style:i(r),class:a.e("header")},[f(),d()])])}}}),bY="ElTableV2Grid",yY=e=>{const t=B(),n=B(),a=B(0),l=w(()=>{const{data:h,rowHeight:b,estimatedRowHeight:y}=e;if(!y)return h.length*b}),o=w(()=>{const{fixedData:h,rowHeight:b}=e;return((h==null?void 0:h.length)||0)*b}),s=w(()=>bc(e.headerHeight)),r=w(()=>{const{height:h}=e;return Math.max(0,h-i(s)-i(o))}),u=w(()=>i(s)+i(o)>0),c=({data:h,rowIndex:b})=>h[b][e.rowKey];function d({rowCacheStart:h,rowCacheEnd:b,rowVisibleStart:y,rowVisibleEnd:C}){var S;(S=e.onRowsRendered)==null||S.call(e,{rowCacheStart:h,rowCacheEnd:b,rowVisibleStart:y,rowVisibleEnd:C})}function f(h,b){var y;(y=n.value)==null||y.resetAfterRowIndex(h,b)}function v(h,b){const y=i(t),C=i(n);st(h)?(y==null||y.scrollToLeft(h.scrollLeft),a.value=h.scrollLeft,C==null||C.scrollTo(h)):(y==null||y.scrollToLeft(h),a.value=h,C==null||C.scrollTo({scrollLeft:h,scrollTop:b}))}function g(h){var b;(b=i(n))==null||b.scrollTo({scrollTop:h})}function m(h,b){const y=i(n);if(!y)return;const C=a.value;y.scrollToItem(h,0,b),C&&v({scrollLeft:C})}function p(){var h,b;(h=i(n))==null||h.$forceUpdate(),(b=i(t))==null||b.$forceUpdate()}return fe(()=>e.bodyWidth,()=>{var h;He(e.estimatedRowHeight)&&((h=n.value)==null||h.resetAfter({columnIndex:0},!1))}),{bodyRef:n,forceUpdate:p,fixedRowHeight:o,gridHeight:r,hasHeader:u,headerHeight:s,headerRef:t,totalHeight:l,itemKey:c,onItemRendered:d,resetAfterRowIndex:f,scrollTo:v,scrollToTop:g,scrollToRow:m,scrollLeft:a}},km=ue({name:bY,props:gc,setup(e,{slots:t,expose:n}){const{ns:a}=Fe(Cm),{bodyRef:l,fixedRowHeight:o,gridHeight:s,hasHeader:r,headerRef:u,headerHeight:c,totalHeight:d,forceUpdate:f,itemKey:v,onItemRendered:g,resetAfterRowIndex:m,scrollTo:p,scrollToTop:h,scrollToRow:b,scrollLeft:y}=yY(e);Tt(B2,y),Qi(async()=>{var E;await Ae();const S=(E=l.value)==null?void 0:E.states.scrollTop;S&&h(Math.round(S)+1)}),n({forceUpdate:f,totalHeight:d,scrollTo:p,scrollToTop:h,scrollToRow:b,resetAfterRowIndex:m});const C=()=>e.bodyWidth;return()=>{const{cache:S,columns:E,data:x,fixedData:$,useIsScrolling:k,scrollbarAlwaysOn:T,scrollbarEndGap:M,scrollbarStartGap:P,style:N,rowHeight:A,bodyWidth:j,estimatedRowHeight:z,headerWidth:V,height:D,width:_,getRowHeight:F,onScroll:L}=e,K=He(z),q=K?HV:BV,X=i(c);return U("div",{role:"table",class:[a.e("table"),e.class],style:N},[U(q,{ref:l,data:x,useIsScrolling:k,itemKey:v,columnCache:0,columnWidth:K?C:j,totalColumn:1,totalRow:x.length,rowCache:S,rowHeight:K?F:A,width:_,height:i(s),class:a.e("body"),role:"rowgroup",scrollbarStartGap:P,scrollbarEndGap:M,scrollbarAlwaysOn:T,onScroll:L,onItemRendered:g,perfMode:!1},{default:Z=>{var ee;const Q=x[Z.rowIndex];return(ee=t.row)==null?void 0:ee.call(t,{...Z,columns:E,rowData:Q})}}),i(r)&&U(gY,{ref:u,class:a.e("header-wrapper"),columns:E,headerData:x,headerHeight:e.headerHeight,fixedHeaderData:$,rowWidth:V,rowHeight:A,width:_,height:Math.min(X+i(o),D)},{dynamic:t.header,fixed:t.row})])}}});function wY(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const SY=(e,{slots:t})=>{const{mainTableRef:n,...a}=e;return U(km,pt({ref:n},a),wY(t)?t:{default:()=>[t]})};function CY(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const kY=(e,{slots:t})=>{if(!e.columns.length)return;const{leftTableRef:n,...a}=e;return U(km,pt({ref:n},a),CY(t)?t:{default:()=>[t]})};function EY(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const xY=(e,{slots:t})=>{if(!e.columns.length)return;const{rightTableRef:n,...a}=e;return U(km,pt({ref:n},a),EY(t)?t:{default:()=>[t]})},TY=e=>{const{isScrolling:t}=Fe(Cm),n=B(!1),a=B(),l=w(()=>He(e.estimatedRowHeight)&&e.rowIndex>=0),o=(u=!1)=>{const c=i(a);if(!c)return;const{columns:d,onRowHeightChange:f,rowKey:v,rowIndex:g,style:m}=e,{height:p}=c.getBoundingClientRect();n.value=!0,Ae(()=>{if(u||p!==Number.parseInt(m.height)){const h=d[0],b=(h==null?void 0:h.placeholderSign)===Ui;f==null||f({rowKey:v,height:p,rowIndex:g},h&&!b&&h.fixed)}})},s=w(()=>{const{rowData:u,rowIndex:c,rowKey:d,onRowHover:f}=e,v=e.rowEventHandlers||{},g={};return Object.entries(v).forEach(([m,p])=>{We(p)&&(g[m]=h=>{p({event:h,rowData:u,rowIndex:c,rowKey:d})})}),f&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:m,hovered:p})=>{const h=g[m];g[m]=b=>{f({event:b,hovered:p,rowData:u,rowIndex:c,rowKey:d}),h==null||h(b)}}),g}),r=u=>{const{onRowExpand:c,rowData:d,rowIndex:f,rowKey:v}=e;c==null||c({expanded:u,rowData:d,rowIndex:f,rowKey:v})};return mt(()=>{i(l)&&o(!0)}),{isScrolling:t,measurable:l,measured:n,rowRef:a,eventHandlers:s,onExpand:r}},$Y=ue({name:"ElTableV2TableRow",props:ds,setup(e,{expose:t,slots:n,attrs:a}){const{eventHandlers:l,isScrolling:o,measurable:s,measured:r,rowRef:u,onExpand:c}=TY(e);return t({onExpand:c}),()=>{const{columns:d,columnsStyles:f,expandColumnKey:v,depth:g,rowData:m,rowIndex:p,style:h}=e;let b=d.map((y,C)=>{const S=me(m.children)&&m.children.length>0&&y.key===v;return n.cell({column:y,columns:d,columnIndex:C,depth:g,style:f[y.key],rowData:m,rowIndex:p,isScrolling:i(o),expandIconProps:S?{rowData:m,rowIndex:p,onExpand:c}:void 0})});if(n.row&&(b=n.row({cells:b.map(y=>me(y)&&y.length===1?y[0]:y),style:h,columns:d,depth:g,rowData:m,rowIndex:p,isScrolling:i(o)})),i(s)){const{height:y,...C}=h||{},S=i(r);return U("div",pt({ref:u,class:e.class,style:S?h:C,role:"row"},a,i(l)),[b])}return U("div",pt(a,{ref:u,class:e.class,style:h,role:"row"},i(l)),[b])}}});function OY(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const NY=(e,{slots:t})=>{const{columns:n,columnsStyles:a,depthMap:l,expandColumnKey:o,expandedRowKeys:s,estimatedRowHeight:r,hasFixedColumns:u,rowData:c,rowIndex:d,style:f,isScrolling:v,rowProps:g,rowClass:m,rowKey:p,rowEventHandlers:h,ns:b,onRowHovered:y,onRowExpanded:C}=e,S=Ns(m,{columns:n,rowData:c,rowIndex:d},""),E=Ns(g,{columns:n,rowData:c,rowIndex:d}),x=c[p],$=l[x]||0,k=!!o,T=d<0,M=[b.e("row"),S,b.is("expanded",k&&s.includes(x)),b.is("fixed",!$&&T),b.is("customized",!!t.row),{[b.e(`row-depth-${$}`)]:k&&d>=0}],P=u?y:void 0,N={...E,columns:n,columnsStyles:a,class:M,depth:$,expandColumnKey:o,estimatedRowHeight:T?void 0:r,isScrolling:v,rowIndex:d,rowData:c,rowKey:x,rowEventHandlers:h,style:f};return U($Y,pt(N,{onRowExpand:C,onMouseenter:z=>{P==null||P({hovered:!0,rowKey:x,event:z,rowData:c,rowIndex:d})},onMouseleave:z=>{P==null||P({hovered:!1,rowKey:x,event:z,rowData:c,rowIndex:d})},rowkey:x}),OY(t)?t:{default:()=>[t]})},Em=(e,{slots:t})=>{var s;const{cellData:n,style:a}=e,l=((s=n==null?void 0:n.toString)==null?void 0:s.call(n))||"",o=ne(t,"default",e,()=>[l]);return U("div",{class:e.class,title:l,style:a},[o])};Em.displayName="ElTableV2Cell";Em.inheritAttrs=!1;const V2=e=>{const{expanded:t,expandable:n,onExpand:a,style:l,size:o,ariaLabel:s}=e,r={onClick:n?()=>a(!t):void 0,ariaLabel:s,ariaExpanded:t,class:e.class};return U("button",pt(r,{type:"button"}),[U(Ve,{size:o,style:l},{default:()=>[U(ra,null,null)]})])};V2.inheritAttrs=!1;const Tv=({columns:e,column:t,columnIndex:n,depth:a,expandIconProps:l,isScrolling:o,rowData:s,rowIndex:r,style:u,expandedRowKeys:c,ns:d,t:f,cellProps:v,expandColumnKey:g,indentSize:m,iconSize:p,rowKey:h},{slots:b})=>{const y=Io(u);if(t.placeholderSign===Ui)return U("div",{class:d.em("row-cell","placeholder"),style:y},null);const{cellRenderer:C,dataKey:S,dataGetter:E}=t,x=We(E)?E({columns:e,column:t,columnIndex:n,rowData:s,rowIndex:r}):Sn(s,S??""),$=Ns(v,{cellData:x,columns:e,column:t,columnIndex:n,rowIndex:r,rowData:s}),k={class:d.e("cell-text"),columns:e,column:t,columnIndex:n,cellData:x,isScrolling:o,rowData:s,rowIndex:r},T=D2(C),M=T?T(k):ne(b,"default",k,()=>[U(Em,k,null)]),P=[d.e("row-cell"),t.class,t.align==="center"&&d.is("align-center"),t.align==="right"&&d.is("align-right")],N=r>=0&&g&&t.key===g,A=r>=0&&c.includes(s[h]);let j;const z=`margin-inline-start: ${a*m}px;`;return N&&(st(l)?j=U(V2,pt(l,{class:[d.e("expand-icon"),d.is("expanded",A)],size:p,expanded:A,ariaLabel:f(A?"el.table.collapseRowLabel":"el.table.expandRowLabel"),style:z,expandable:!0}),null):j=U("div",{style:[z,`width: ${p}px; height: ${p}px;`].join(" ")},null)),U("div",pt({class:P,style:y},$,{role:"cell"}),[j,M])};Tv.inheritAttrs=!1;const MY=$e({class:String,columns:Su,columnsStyles:{type:G(Object),required:!0},headerIndex:Number,style:{type:G(Object)}}),IY=ue({name:"ElTableV2HeaderRow",props:MY,setup(e,{slots:t}){return()=>{const{columns:n,columnsStyles:a,headerIndex:l,style:o}=e;let s=n.map((r,u)=>t.cell({columns:n,column:r,columnIndex:u,headerIndex:l,style:a[r.key]}));return t.header&&(s=t.header({cells:s.map(r=>me(r)&&r.length===1?r[0]:r),columns:n,headerIndex:l})),U("div",{class:e.class,style:o,role:"row"},[s])}}});function PY(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const RY=({columns:e,columnsStyles:t,headerIndex:n,style:a,headerClass:l,headerProps:o,ns:s},{slots:r})=>{const u={columns:e,headerIndex:n},c=[s.e("header-row"),Ns(l,u,""),s.is("customized",!!r.header)],d={...Ns(o,u),columnsStyles:t,class:c,columns:e,headerIndex:n,style:a};return U(IY,d,PY(r)?r:{default:()=>[r]})},xm=(e,{slots:t})=>ne(t,"default",e,()=>{var n,a;return[U("div",{class:e.class,title:(n=e.column)==null?void 0:n.title},[(a=e.column)==null?void 0:a.title])]});xm.displayName="ElTableV2HeaderCell";xm.inheritAttrs=!1;const _Y=e=>{const{sortOrder:t}=e;return U("button",{type:"button","aria-label":e.ariaLabel,class:e.class},[U(Ve,{size:14},{default:()=>[U(t==="asc"?D_:A_,null,null)]})])},f0=(e,{slots:t})=>{const{column:n,ns:a,t:l,style:o,onColumnSorted:s}=e,r=Io(o);if(n.placeholderSign===Ui)return U("div",{class:a.em("header-row-cell","placeholder"),style:r},null);const{headerCellRenderer:u,headerClass:c,sortable:d}=n,f={...e,class:a.e("header-cell-text")},v=D2(u),g=v?v(f):ne(t,"default",f,()=>[U(xm,f,null)]),{sortBy:m,sortState:p,headerCellProps:h}=e;let b,y,C;if(p){const x=p[n.key];b=!!xv[x],y=b?x:"asc"}else b=n.key===m.key,y=b?m.order:"asc";y==="asc"?C="ascending":y==="desc"?C="descending":C=void 0;const S=[a.e("header-cell"),Ns(c,e,""),n.align==="center"&&a.is("align-center"),n.align==="right"&&a.is("align-right"),d&&a.is("sortable")],E={...Ns(h,e),onClick:n.sortable?s:void 0,ariaSort:d?C:void 0,class:S,style:r,"data-key":n.key};return U("div",pt(E,{role:"columnheader"}),[g,d&&U(_Y,{class:[a.e("sort-icon"),b&&a.is("sorting")],sortOrder:y,ariaLabel:l("el.table.sortLabel",{column:n.title||""})},null)])},F2=(e,{slots:t})=>{var n;return U("div",{class:e.class,style:e.style},[(n=t.default)==null?void 0:n.call(t)])};F2.displayName="ElTableV2Footer";const z2=(e,{slots:t})=>{const n=ne(t,"default",{},()=>[U(f2,null,null)]);return U("div",{class:e.class,style:e.style},[n])};z2.displayName="ElTableV2Empty";const H2=(e,{slots:t})=>{var n;return U("div",{class:e.class,style:e.style},[(n=t.default)==null?void 0:n.call(t)])};H2.displayName="ElTableV2Overlay";function jr(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const AY=ue({name:"ElTableV2",props:iY,slots:Object,setup(e,{slots:t,expose:n}){const a=he("table-v2"),{t:l}=St(),{columnsStyles:o,fixedColumnsOnLeft:s,fixedColumnsOnRight:r,mainColumns:u,mainTableHeight:c,fixedTableHeight:d,leftTableWidth:f,rightTableWidth:v,data:g,depthMap:m,expandedRowKeys:p,hasFixedColumns:h,mainTableRef:b,leftTableRef:y,rightTableRef:C,isDynamic:S,isResetting:E,isScrolling:x,bodyWidth:$,emptyStyle:k,rootStyle:T,footerHeight:M,showEmpty:P,scrollTo:N,scrollToLeft:A,scrollToTop:j,scrollToRow:z,getRowHeight:V,onColumnSorted:D,onRowHeightChange:_,onRowHovered:F,onRowExpanded:L,onRowsRendered:K,onScroll:q,onVerticalScroll:X}=mY(e);return n({scrollTo:N,scrollToLeft:A,scrollToTop:j,scrollToRow:z}),Tt(Cm,{ns:a,isResetting:E,isScrolling:x}),()=>{const{cache:Z,cellProps:Q,estimatedRowHeight:ee,expandColumnKey:ie,fixedData:ve,headerHeight:pe,headerClass:re,headerProps:R,headerCellProps:Y,sortBy:ae,sortState:le,rowHeight:se,rowClass:de,rowEventHandlers:be,rowKey:we,rowProps:Oe,scrollbarAlwaysOn:Ce,indentSize:Ie,iconSize:ge,useIsScrolling:ke,vScrollbarSize:Le,width:qe}=e,lt=i(g),nt={cache:Z,class:a.e("main"),columns:i(u),data:lt,fixedData:ve,estimatedRowHeight:ee,bodyWidth:i($),headerHeight:pe,headerWidth:i($),height:i(c),mainTableRef:b,rowKey:we,rowHeight:se,scrollbarAlwaysOn:Ce,scrollbarStartGap:2,scrollbarEndGap:Le,useIsScrolling:ke,width:qe,getRowHeight:V,onRowsRendered:K,onScroll:q},Ze=i(f),kt=i(d),Pt={cache:Z,class:a.e("left"),columns:i(s),data:lt,fixedData:ve,estimatedRowHeight:ee,leftTableRef:y,rowHeight:se,bodyWidth:Ze,headerWidth:Ze,headerHeight:pe,height:kt,rowKey:we,scrollbarAlwaysOn:Ce,scrollbarStartGap:2,scrollbarEndGap:Le,useIsScrolling:ke,width:Ze,getRowHeight:V,onScroll:X},Lt=i(v),Rt={cache:Z,class:a.e("right"),columns:i(r),data:lt,fixedData:ve,estimatedRowHeight:ee,rightTableRef:C,rowHeight:se,bodyWidth:Lt,headerWidth:Lt,headerHeight:pe,height:kt,rowKey:we,scrollbarAlwaysOn:Ce,scrollbarStartGap:2,scrollbarEndGap:Le,width:Lt,style:`${a.cssVarName("table-scrollbar-size")}: ${Le}px`,useIsScrolling:ke,getRowHeight:V,onScroll:X},jt=i(o),Yt={ns:a,depthMap:i(m),columnsStyles:jt,expandColumnKey:ie,expandedRowKeys:i(p),estimatedRowHeight:ee,hasFixedColumns:i(h),rowProps:Oe,rowClass:de,rowKey:we,rowEventHandlers:be,onRowHovered:F,onRowExpanded:L,onRowHeightChange:_},xe={cellProps:Q,expandColumnKey:ie,indentSize:Ie,iconSize:ge,rowKey:we,expandedRowKeys:i(p),ns:a,t:l},Ee={ns:a,headerClass:re,headerProps:R,columnsStyles:jt},Ke={ns:a,t:l,sortBy:ae,sortState:le,headerCellProps:Y,onColumnSorted:D},Xe={row:Pe=>U(NY,pt(Pe,Yt),{row:t.row,cell:Ue=>{let at;return t.cell?U(Tv,pt(Ue,xe,{style:jt[Ue.column.key]}),jr(at=t.cell(Ue))?at:{default:()=>[at]}):U(Tv,pt(Ue,xe,{style:jt[Ue.column.key]}),null)}}),header:Pe=>U(RY,pt(Pe,Ee),{header:t.header,cell:Ue=>{let at;return t["header-cell"]?U(f0,pt(Ue,Ke,{style:jt[Ue.column.key]}),jr(at=t["header-cell"](Ue))?at:{default:()=>[at]}):U(f0,pt(Ue,Ke,{style:jt[Ue.column.key]}),null)}})},Vt=[e.class,a.b(),a.e("root"),a.is("dynamic",i(S))],ce={class:a.e("footer"),style:i(M)};return U("div",{class:Vt,style:i(T)},[U(SY,nt,jr(Xe)?Xe:{default:()=>[Xe]}),U(kY,Pt,jr(Xe)?Xe:{default:()=>[Xe]}),U(xY,Rt,jr(Xe)?Xe:{default:()=>[Xe]}),t.footer&&U(F2,ce,{default:t.footer}),i(P)&&U(z2,{class:a.e("empty"),style:i(k)},{default:t.empty}),t.overlay&&U(H2,{class:a.e("overlay")},{default:t.overlay})])}}}),LY=$e({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:G(Function)}}),DY=e=>{const t=B(),n=B(0),a=B(0);let l;return mt(()=>{l=on(t,([o])=>{const{width:s,height:r}=o.contentRect,{paddingLeft:u,paddingRight:c,paddingTop:d,paddingBottom:f}=getComputedStyle(o.target),v=Number.parseInt(u)||0,g=Number.parseInt(c)||0,m=Number.parseInt(d)||0,p=Number.parseInt(f)||0;n.value=s-v-g,a.value=r-m-p}).stop}),zt(()=>{l==null||l()}),fe([n,a],([o,s])=>{var r;(r=e.onResize)==null||r.call(e,{width:o,height:s})}),{sizer:t,width:n,height:a}},BY=ue({name:"ElAutoResizer",props:LY,setup(e,{slots:t}){const n=he("auto-resizer"),{height:a,width:l,sizer:o}=DY(e),s={width:"100%",height:"100%"};return()=>{var r;return U("div",{ref:o,class:n.b(),style:s},[(r=t.default)==null?void 0:r.call(t,{height:a.value,width:l.value})])}}}),VY=ut(AY),FY=ut(BY),vf=Symbol("tabsRootContextKey"),zY=$e({tabs:{type:G(Array),default:()=>dn([])},tabRefs:{type:G(Object),default:()=>dn({})}}),p0="ElTabBar";var HY=ue({name:p0,__name:"tab-bar",props:zY,setup(e,{expose:t}){const n=e,a=Fe(vf);a||rn(p0,"");const l=he("tabs"),o=B(),s=B(),r=B(!1),u=w(()=>r.value?s.value:{...s.value,transition:"none"}),c=w(()=>{var p;return xt(a.props.defaultValue)||!!((p=s.value)!=null&&p.transform)}),d=()=>{let p=0,h=0;const b=["top","bottom"].includes(a.props.tabPosition)?"width":"height",y=b==="width"?"x":"y",C=y==="x"?"left":"top";return n.tabs.every(S=>{if(xt(S.paneName))return!1;const E=n.tabRefs[S.paneName];if(!E)return!1;if(!S.active)return!0;p=E[`offset${Af(C)}`],h=E[`client${Af(b)}`];const x=window.getComputedStyle(E);return b==="width"&&(h-=Number.parseFloat(x.paddingLeft)+Number.parseFloat(x.paddingRight),p+=Number.parseFloat(x.paddingLeft)),!1}),{[b]:`${h}px`,transform:`translate${Af(y)}(${p}px)`}},f=()=>{s.value=d(),r.value||Kn(()=>Kn(()=>{r.value=!0}))},v=[],g=()=>{v.forEach(p=>p.stop()),v.length=0,Object.values(n.tabRefs).forEach(p=>{v.push(on(p,f))})};fe(()=>n.tabs,async()=>{await Ae(),f(),g()},{immediate:!0});const m=on(o,()=>f());return zt(()=>{v.forEach(p=>p.stop()),v.length=0,m.stop()}),t({ref:o,update:f}),(p,h)=>(O(),H("div",{ref_key:"barRef",ref:o,class:I([i(l).e("active-bar"),i(l).is(i(a).props.tabPosition),i(l).is("hidden",!c.value)]),style:je(u.value)},null,6))}}),KY=HY;const WY=5,jY=({scrollable:e,navOffset:t,navSize:n,navContainerSize:a,isHorizontal:l})=>{const o=B(!1),s=w(()=>Math.max(n.value-a.value,0));let r,u;const c=v=>{if(!e.value||v.touches.length!==1)return;const{clientX:g,clientY:m}=td(v);r={startX:g,startY:m,startOffset:t.value},u=void 0},d=v=>{if(!r||!e.value)return;if(v.touches.length!==1){f();return}const{clientX:g,clientY:m}=td(v),p=r.startX-g,h=r.startY-m,b=l.value?p:h,y=l.value?h:p,C=Math.abs(b),S=Math.abs(y);if(Yw(u)){if(Math.max(C,S)<=WY)return;u=C>S}if(!u)return;const E=ya(r.startOffset+b,0,s.value);s.value<=0||E===t.value||!v.cancelable||(v.preventDefault(),o.value=!0,t.value=E)},f=()=>{r=void 0,u=void 0,o.value=!1};return{isTouchScrolling:o,handleTouchStart:c,handleTouchMove:d,handleTouchEnd:f}},qY=$e({panes:{type:G(Array),default:()=>dn([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean,tabindex:{type:[String,Number],default:void 0}}),YY={tabClick:(e,t,n)=>n instanceof Event,tabRemove:(e,t)=>t instanceof Event},v0="ElTabNav",UY=ue({name:v0,props:qY,emits:YY,setup(e,{expose:t,emit:n}){const a=Fe(vf);a||rn(v0,"");const l=he("tabs"),o=sR(),s=uR(),r=B(),u=B(),c=B(),d=B({}),f=B(),v=B(!1),g=B(0),m=B(!1),p=B(!0),h=B(!1),b=Et(),y=w(()=>["top","bottom"].includes(a.props.tabPosition)),C=w(()=>y.value?"width":"height"),S=w(()=>{const ee=C.value==="width"?"X":"Y";return{transition:h.value||A.value?"none":void 0,transform:`translate${ee}(-${g.value}px)`}}),{width:E,height:x}=Ri(r),{width:$,height:k}=Ri(u,{width:0,height:0},{box:"border-box"}),T=w(()=>y.value?E.value:x.value),M=w(()=>y.value?$.value:k.value),{onWheel:P}=sk({atStartEdge:w(()=>g.value<=0),atEndEdge:w(()=>M.value-g.value<=T.value),layout:w(()=>y.value?"horizontal":"vertical")},ee=>{g.value=ya(g.value+ee,0,M.value-T.value)}),N=ee=>{h.value=!0,P(ee),Kn(()=>{h.value=!1})},{isTouchScrolling:A,handleTouchStart:j,handleTouchMove:z,handleTouchEnd:V}=jY({scrollable:v,navOffset:g,navSize:M,navContainerSize:T,isHorizontal:y}),D=()=>{if(!r.value)return;const ee=r.value.getBoundingClientRect()[C.value],ie=g.value;if(!ie)return;const ve=ie>ee?ie-ee:0;g.value=ve},_=()=>{if(!r.value||!u.value)return;const ee=u.value.getBoundingClientRect()[C.value],ie=r.value.getBoundingClientRect()[C.value],ve=g.value;if(!Ml(ee-ve,ie))return;const pe=ee-ve>ie*2?ve+ie:ee-ie;g.value=pe},F=async()=>{const ee=u.value;if(!v.value||!c.value||!r.value||!ee)return;await Ae();const ie=d.value[e.currentName];if(!ie)return;const ve=r.value,pe=ie.getBoundingClientRect(),re=ve.getBoundingClientRect(),R=re.left+1,Y=re.right-1,ae=ee.getBoundingClientRect(),le=y.value?ae.width-re.width:ae.height-re.height,se=g.value;let de=se;y.value?(pe.leftY&&(de=se+pe.right-Y)):(pe.topre.bottom&&(de=se+(pe.bottom-re.bottom))),de=Math.max(de,0),g.value=Math.min(de,le)},L=()=>{var pe;if(!u.value||!r.value)return;e.stretch&&((pe=f.value)==null||pe.update());const ee=u.value.getBoundingClientRect()[C.value],ie=r.value.getBoundingClientRect()[C.value],ve=g.value;ie0&&(g.value=0))},K=ee=>{const ie=Gt(ee);let ve=0;switch(ie){case ye.left:case ye.up:ve=-1;break;case ye.right:case ye.down:ve=1;break;default:return}const pe=Array.from(ee.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let re=pe.indexOf(ee.target)+ve;re<0?re=pe.length-1:re>=pe.length&&(re=0),pe[re].focus({preventScroll:!0}),pe[re].click(),q()},q=()=>{p.value&&(m.value=!0)},X=()=>m.value=!1,Z=(ee,ie)=>{d.value[ie]=ee},Q=async()=>{var ee;await Ae(),(ee=d.value[e.currentName])==null||ee.focus({preventScroll:!0})};return fe(o,ee=>{ee==="hidden"?p.value=!1:ee==="visible"&&setTimeout(()=>p.value=!0,50)}),fe(s,ee=>{ee?setTimeout(()=>p.value=!0,50):p.value=!1}),on(c,()=>{Kn(L)}),mt(()=>setTimeout(()=>F(),0)),Kl(()=>L()),t({scrollToActiveTab:F,removeFocus:X,focusActiveTab:Q,tabListRef:u,tabBarRef:f,scheduleRender:()=>si(b)}),()=>{const ee=v.value?[U("span",{class:[l.e("nav-prev"),l.is("disabled",!v.value.prev)],onClick:D},[U(Ve,null,{default:()=>[U(io,null,null)]})]),U("span",{class:[l.e("nav-next"),l.is("disabled",!v.value.next)],onClick:_},[U(Ve,null,{default:()=>[U(ra,null,null)]})])]:null,ie=e.panes.map((ve,pe)=>{var be,we;const re=ve.uid,R=ve.props.disabled,Y=ve.props.name??ve.index??`${pe}`,ae=!R&&(ve.isClosable||ve.props.closable!==!1&&e.editable);ve.index=`${pe}`;const le=ae?U(Ve,{class:"is-icon-close",onClick:Oe=>n("tabRemove",ve,Oe)},{default:()=>[U(Ya,null,null)]}):null,se=((we=(be=ve.slots).label)==null?void 0:we.call(be))||ve.props.label,de=!R&&ve.active?e.tabindex??a.props.tabindex:-1;return U("div",{ref:Oe=>Z(Oe,Y),class:[l.e("item"),l.is(a.props.tabPosition),l.is("active",ve.active),l.is("disabled",R),l.is("closable",ae),l.is("focus",m.value)],id:`tab-${Y}`,key:`tab-${re}`,"aria-controls":`pane-${Y}`,role:"tab","aria-selected":ve.active,tabindex:de,onFocus:()=>q(),onBlur:()=>X(),onClick:Oe=>{X(),n("tabClick",ve,Y,Oe)},onKeydown:Oe=>{const Ce=Gt(Oe);ae&&(Ce===ye.delete||Ce===ye.backspace)&&n("tabRemove",ve,Oe)}},[se,le])});return b.value,U("div",{ref:c,class:[l.e("nav-wrap"),l.is("scrollable",!!v.value),l.is(a.props.tabPosition)]},[ee,U("div",{class:l.e("nav-scroll"),ref:r},[e.panes.length>0?U("div",{class:[l.e("nav"),l.is(a.props.tabPosition),l.is("stretch",e.stretch&&["top","bottom"].includes(a.props.tabPosition))],ref:u,style:S.value,role:"tablist",onKeydown:K,onWheel:N,onTouchstart:j,onTouchmove:z,onTouchend:V,onTouchcancel:V},[e.type?null:U(KY,{ref:f,tabs:[...e.panes],tabRefs:d.value},null),ie]):null])])}}}),GY=$e({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},defaultValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:G(Function),default:()=>!0},stretch:Boolean,tabindex:{type:[String,Number],default:0}}),ip=e=>De(e)||He(e),XY={[rt]:e=>ip(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>ip(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>ip(e),tabAdd:()=>!0},JY=ue({name:"ElTabs",props:GY,emits:XY,setup(e,{emit:t,slots:n,expose:a}){const l=he("tabs"),o=w(()=>["left","right"].includes(e.tabPosition)),{children:s,addChild:r,removeChild:u,ChildrenSorter:c}=Zd(ht(),"ElTabPane"),d=B(),f=B((xt(e.modelValue)?e.defaultValue:e.modelValue)??"0"),v=async(y,C=!1)=>{var S,E,x,$;if(!(f.value===y||xt(y)))try{let k;if(e.beforeLeave){const T=e.beforeLeave(y,f.value);k=T instanceof Promise?await T:T}else k=!0;if(k!==!1){const T=(S=s.value.find(M=>M.paneName===f.value))==null?void 0:S.isFocusInsidePane();f.value=y,C&&(t(rt,y),t("tabChange",y)),(x=(E=d.value)==null?void 0:E.removeFocus)==null||x.call(E),T&&(($=d.value)==null||$.focusActiveTab())}}catch{}},g=(y,C,S)=>{y.props.disabled||(t("tabClick",y,S),v(C,!0))},m=(y,C)=>{y.props.disabled||xt(y.props.name)||(C.stopPropagation(),t("edit",y.props.name,"remove"),t("tabRemove",y.props.name))},p=()=>{t("edit",void 0,"add"),t("tabAdd")},h=y=>{const C=Gt(y);[ye.enter,ye.numpadEnter].includes(C)&&p()},b=y=>{const C=y.el.firstChild,S=["bottom","right"].includes(e.tabPosition)?y.children[0].el:y.children[1].el;C!==S&&C.before(S)};return fe(()=>e.modelValue,y=>v(y)),fe(f,async()=>{var y;await Ae(),(y=d.value)==null||y.scrollToActiveTab()}),Tt(vf,{props:e,currentName:f,registerPane:r,unregisterPane:u,nav$:d}),a({currentName:f,get tabNavRef(){return As(d.value,["scheduleRender"])}}),()=>{const y=n["add-icon"],C=e.editable||e.addable?U("div",{class:[l.e("new-tab"),o.value&&l.e("new-tab-vertical")],tabindex:e.tabindex,onClick:p,onKeydown:h},[y?ne(n,"add-icon"):U(Ve,{class:l.is("icon-plus")},{default:()=>[U(GS,null,null)]})]):null,S=()=>U(UY,{ref:d,currentName:f.value,editable:e.editable,type:e.type,panes:s.value,stretch:e.stretch,onTabClick:g,onTabRemove:m},null),E=U("div",{class:[l.e("header"),o.value&&l.e("header-vertical"),l.is(e.tabPosition)]},[U(c,null,{default:S,$stable:!0}),C]),x=U("div",{class:l.e("content")},[ne(n,"default")]);return U("div",{class:[l.b(),l.m(e.tabPosition),{[l.m("card")]:e.type==="card",[l.m("border-card")]:e.type==="border-card"}],onVnodeMounted:b,onVnodeUpdated:b},[x,E])}}}),ZY=$e({label:{type:String,default:""},name:{type:[String,Number]},closable:{type:Boolean,default:void 0},disabled:Boolean,lazy:Boolean}),QY=["id","aria-hidden","aria-labelledby"],h0="ElTabPane";var eU=ue({name:h0,__name:"tab-pane",props:ZY,setup(e){const t=e,n=ht(),a=mn(),l=Fe(vf);l||rn(h0,"usage: ");const o=he("tab-pane"),s=B(),r=B(),u=w(()=>t.closable??l.props.closable),c=w(()=>l.currentName.value===(t.name??r.value)),d=B(c.value),f=w(()=>t.name??r.value),v=w(()=>!t.lazy||d.value||c.value),g=()=>{var p;return(p=s.value)==null?void 0:p.contains(document.activeElement)};fe(c,p=>{p&&(d.value=!0)});const m=Ft({uid:n.uid,getVnode:()=>n.vnode,slots:a,props:t,paneName:f,active:c,index:r,isClosable:u,isFocusInsidePane:g});return l.registerPane(m),zt(()=>{l.unregisterPane(m)}),Ed(()=>{var p;a.label&&((p=l.nav$.value)==null||p.scheduleRender())}),(p,h)=>v.value?ft((O(),H("div",{key:0,id:`pane-${f.value}`,ref_key:"paneRef",ref:s,class:I(i(o).b()),role:"tabpanel","aria-hidden":!c.value,"aria-labelledby":`tab-${f.value}`},[ne(p.$slots,"default")],10,QY)),[[At,c.value]]):te("v-if",!0)}}),K2=eU;const tU=ut(JY,{TabPane:K2}),nU=un(K2),aU=$e({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:ul,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}});var lU=ue({name:"ElText",__name:"text",props:aU,setup(e,{expose:t}){const n=e,a=B(),l=$n(),o=he("text"),s=w(()=>[o.b(),o.m(n.type),o.m(l.value),o.is("truncated",n.truncated),o.is("line-clamp",!xt(n.lineClamp))]),{width:r,height:u}=Ri(a),c=B(!1);let d;const f=()=>{d&&Ra(d),d=Kn(()=>{var v,g,m,p;if(d=void 0,c.value=!1,n.truncated){const h=(v=a.value)==null?void 0:v.offsetWidth,b=(g=a.value)==null?void 0:g.scrollWidth;h&&b&&b>h&&(c.value=!0)}else if(!xt(n.lineClamp)){const h=(m=a.value)==null?void 0:m.offsetHeight,b=(p=a.value)==null?void 0:p.scrollHeight;h&&b&&b>h&&(c.value=!0)}})};return fe(()=>[r.value,u.value,n.truncated,n.lineClamp],f,{flush:"post"}),Or(a,f,{attributes:!0,attributeFilter:["class","style"],subtree:!0,childList:!0,characterData:!0}),mt(f),zt(()=>{d&&Ra(d)}),t({isTruncated:c}),(v,g)=>{var m;return O(),oe(dt(e.tag),{ref_key:"textRef",ref:a,class:I(s.value),title:v.$attrs.title??(c.value?(m=a.value)==null?void 0:m.textContent:void 0),style:je({"-webkit-line-clamp":e.lineClamp})},{default:J(()=>[ne(v.$slots,"default")]),_:3},8,["class","title","style"])}}}),oU=lU;const Tm=ut(oU),W2="09:00",j2="18:00",q2="00:30",sU=$e({format:{type:String,default:"HH:mm"},modelValue:{type:G(String)},disabled:{type:Boolean,default:void 0},editable:{type:Boolean,default:!0},effect:{type:G(String),default:"light"},clearable:{type:Boolean,default:!0},size:Pn,placeholder:String,start:{type:String,default:W2},end:{type:String,default:j2},step:{type:String,default:q2},minTime:{type:G(String)},maxTime:{type:G(String)},includeEndTime:Boolean,name:String,prefixIcon:{type:G([String,Object]),default:()=>US},clearIcon:{type:G([String,Object]),default:()=>ql},popperClass:{type:G([String,Array,Object,Boolean]),default:""},popperStyle:{type:G([String,Array,Object,Boolean]),default:void 0},...Ls}),ws=e=>{const t=(e||"").split(":");if(t.length>=2){let n=Number.parseInt(t[0],10);const a=Number.parseInt(t[1],10);if(Number.isNaN(n)||Number.isNaN(a))return null;const l=e.toUpperCase();return l.includes("AM")&&n===12?n=0:l.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:a}}return null},rU=e=>!!e&&e.hours>=0&&e.minutes>=0&&!Number.isNaN(e.hours)&&!Number.isNaN(e.minutes),up=(e,t)=>{const n=ws(e);if(!n)return-1;const a=ws(t);if(!a)return-1;const l=n.minutes+n.hours*60,o=a.minutes+a.hours*60;return l===o?0:l>o?1:-1},m0=e=>`${e}`.padStart(2,"0"),yc=e=>`${m0(e.hours)}:${m0(e.minutes)}`,iU=(e,t)=>{const n=ws(e);if(!n)return"";const a=ws(t);if(!a)return"";const l={hours:n.hours,minutes:n.minutes};return l.minutes+=a.minutes,l.hours+=a.hours,l.hours+=Math.floor(l.minutes/60),l.minutes=l.minutes%60,yc(l)};var uU=ue({name:"ElTimeSelect",__name:"time-select",props:sU,emits:[yt,"blur","focus","clear",rt],setup(e,{expose:t}){tt.extend(Xh);const{Option:n}=Wo,a=e,l=he("input"),o=B(),s=sn(),{lang:r}=St(),u=(y,C,S,E=!0)=>{const x=ws(y);return!rU(x)||!E&&x.hours===0&&x.minutes===0?(Kt("ElTimeSelect",`invalid ${C}, fallback to default ${C} (${S}).`),S):yc(x)},c=w(()=>a.modelValue),d=w(()=>u(a.start,"start",W2)),f=w(()=>u(a.end,"end",j2)),v=w(()=>{const y=ws(a.minTime||"");return y?yc(y):null}),g=w(()=>{const y=ws(a.maxTime||"");return y?yc(y):null}),m=w(()=>u(a.step,"step",q2,!1)),p=w(()=>{var E;const y=[],C=(x,$)=>{y.push({value:x,rawValue:$,disabled:up($,v.value||"-1:-1")<=0||up($,g.value||"100:100")>=0})};let S=d.value;for(;up(S,f.value)<=0;)C(tt(S,"HH:mm").locale(r.value).format(a.format),S),S=iU(S,m.value);return a.includeEndTime&&((E=y[y.length-1])==null?void 0:E.rawValue)!==f.value&&C(tt(f.value,"HH:mm").locale(r.value).format(a.format),f.value),y});return t({blur:()=>{var y,C;(C=(y=o.value)==null?void 0:y.blur)==null||C.call(y)},focus:()=>{var y,C;(C=(y=o.value)==null?void 0:y.focus)==null||C.call(y)}}),(y,C)=>(O(),oe(i(Wo),{ref_key:"select",ref:o,name:e.name,"model-value":c.value,disabled:i(s),clearable:e.clearable,"clear-icon":e.clearIcon,size:e.size,effect:e.effect,placeholder:e.placeholder,"default-first-option":"",filterable:e.editable,"empty-values":e.emptyValues,"value-on-clear":e.valueOnClear,"popper-class":e.popperClass,"popper-style":e.popperStyle,"onUpdate:modelValue":C[0]||(C[0]=S=>y.$emit(i("update:modelValue"),S)),onChange:C[1]||(C[1]=S=>y.$emit(i("change"),S)),onBlur:C[2]||(C[2]=S=>y.$emit("blur",S)),onFocus:C[3]||(C[3]=S=>y.$emit("focus",S)),onClear:C[4]||(C[4]=()=>y.$emit("clear"))},{prefix:J(()=>[e.prefixIcon?(O(),oe(i(Ve),{key:0,class:I(i(l).e("prefix-icon"))},{default:J(()=>[(O(),oe(dt(e.prefixIcon)))]),_:1},8,["class"])):te("v-if",!0)]),default:J(()=>[(O(!0),H(ze,null,bt(p.value,S=>(O(),oe(i(n),{key:S.value,label:S.value,value:S.value,disabled:S.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["name","model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear","popper-class","popper-style"]))}}),cU=uU;const dU=ut(cU),Y2="timeline",fU=$e({mode:{type:String,values:["start","alternate","alternate-reverse","end"],default:"start"},reverse:Boolean}),pU=ue({name:"ElTimeline",props:fU,setup(e,{slots:t}){const n=he("timeline");Tt(Y2,{props:e,slots:t});const a=w(()=>[n.b(),n.is(e.mode)]);return()=>{var o;const l=$a(((o=t.default)==null?void 0:o.call(t))??[]);return Ge("ul",{class:a.value},e.reverse?l.reverse():l)}}}),vU=$e({timestamp:{type:String,default:""},hideTimestamp:Boolean,center:Boolean,placement:{type:String,values:["top","bottom"],default:"bottom"},type:{type:String,values:["primary","success","warning","danger","info"],default:""},color:{type:String,default:""},size:{type:String,values:["normal","large"],default:"normal"},icon:{type:Ut},hollow:Boolean});var hU=ue({name:"ElTimelineItem",__name:"timeline-item",props:vU,setup(e){const t=e,{props:n}=Fe(Y2),a=he("timeline-item"),l=w(()=>[a.e("node"),a.em("node",t.size||""),a.em("node",t.type||""),a.is("hollow",t.hollow)]),o=w(()=>[a.b(),{[a.e("center")]:t.center},a.is(n.mode)]);return(s,r)=>(O(),H("li",{class:I(o.value)},[W("div",{class:I(i(a).e("tail"))},null,2),s.$slots.dot?te("v-if",!0):(O(),H("div",{key:0,class:I(l.value),style:je({backgroundColor:e.color})},[e.icon?(O(),oe(i(Ve),{key:0,class:I(i(a).e("icon"))},{default:J(()=>[(O(),oe(dt(e.icon)))]),_:1},8,["class"])):te("v-if",!0)],6)),s.$slots.dot?(O(),H("div",{key:1,class:I(i(a).e("dot"))},[ne(s.$slots,"dot")],2)):te("v-if",!0),W("div",{class:I(i(a).e("wrapper"))},[!e.hideTimestamp&&e.placement==="top"?(O(),H("div",{key:0,class:I([i(a).e("timestamp"),i(a).is("top")])},Se(e.timestamp),3)):te("v-if",!0),W("div",{class:I(i(a).e("content"))},[ne(s.$slots,"default")],2),!e.hideTimestamp&&e.placement==="bottom"?(O(),H("div",{key:1,class:I([i(a).e("timestamp"),i(a).is("bottom")])},Se(e.timestamp),3)):te("v-if",!0)],2)],2))}}),U2=hU;const mU=ut(pU,{TimelineItem:U2}),gU=un(U2),G2="left-check-change",X2="right-check-change",xo=$e({data:{type:G(Array),default:()=>[]},titles:{type:G(Array),default:()=>[]},buttonTexts:{type:G(Array),default:()=>[]},filterPlaceholder:String,filterMethod:{type:G(Function)},leftDefaultChecked:{type:G(Array),default:()=>[]},rightDefaultChecked:{type:G(Array),default:()=>[]},renderContent:{type:G(Function)},modelValue:{type:G(Array),default:()=>[]},format:{type:G(Object),default:()=>({})},filterable:Boolean,props:{type:G(Object),default:()=>dn({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},validateEvent:{type:Boolean,default:!0},virtualScroll:Boolean,itemSize:{type:Number,default:30}}),$v=(e,t)=>[e,t].every(me)||me(e)&&vn(t),bU={[yt]:(e,t,n)=>[e,n].every(me)&&["left","right"].includes(t),[rt]:e=>me(e),[G2]:$v,[X2]:$v},Cu=e=>{const t={label:"label",key:"key",disabled:"disabled"};return w(()=>({...t,...e.props}))},yU=(e,t)=>({onSourceCheckedChange:(l,o)=>{e.leftChecked=l,o&&t(G2,l,o)},onTargetCheckedChange:(l,o)=>{e.rightChecked=l,o&&t(X2,l,o)}}),wU=e=>{const t=Cu(e),n=w(()=>e.data.reduce((a,l)=>(a[l[t.value.key]]=l,a),{}));return{sourceData:w(()=>e.data.filter(a=>!e.modelValue.includes(a[t.value.key]))),targetData:w(()=>e.targetOrder==="original"?e.data.filter(a=>e.modelValue.includes(a[t.value.key])):e.modelValue.reduce((a,l)=>{const o=n.value[l];return o&&a.push(o),a},[]))}},SU=(e,t,n)=>{const a=Cu(e),l=(r,u,c)=>{n(rt,r),n(yt,r,u,c)};return{addToLeft:()=>{const r=e.modelValue.slice();t.rightChecked.forEach(u=>{const c=r.indexOf(u);c>-1&&r.splice(c,1)}),l(r,"left",t.rightChecked)},addToRight:()=>{let r=e.modelValue.slice();const u=e.data.filter(c=>{const d=c[a.value.key];return t.leftChecked.includes(d)&&!e.modelValue.includes(d)}).map(c=>c[a.value.key]);r=e.targetOrder==="unshift"?u.concat(r):r.concat(u),e.targetOrder==="original"&&(r=e.data.filter(c=>r.includes(c[a.value.key])).map(c=>c[a.value.key])),l(r,"right",t.leftChecked)}}},Ov="checked-change",CU=$e({data:xo.data,optionRender:{type:G(Function)},placeholder:String,title:String,filterable:Boolean,format:xo.format,filterMethod:xo.filterMethod,defaultChecked:xo.leftDefaultChecked,props:xo.props,virtualScroll:xo.virtualScroll,itemSize:xo.itemSize}),kU={[Ov]:$v},EU=(e,t,n)=>{const a=Cu(e),l=w(()=>e.data.filter(g=>We(e.filterMethod)?e.filterMethod(t.query,g):String(g[a.value.label]||g[a.value.key]).toLowerCase().includes(t.query.toLowerCase()))),o=w(()=>l.value.filter(g=>!g[a.value.disabled])),s=w(()=>{const g=t.checked.length,m=e.data.length,{noChecked:p,hasChecked:h}=e.format;return p&&h?g>0?h.replace(/\${checked}/g,g.toString()).replace(/\${total}/g,m.toString()):p.replace(/\${total}/g,m.toString()):`${g}/${m}`}),r=w(()=>{const g=t.checked.length;return g>0&&g{const g=o.value.map(m=>m[a.value.key]);t.allChecked=g.length>0&&g.every(m=>t.checked.includes(m))},c=g=>{t.checked=g?o.value.map(m=>m[a.value.key]):[]},d=B(),{height:f}=Ri(w(()=>{var g;return(g=d.value)==null?void 0:g.$el})),v=B();return fe(()=>t.checked,(g,m)=>{if(u(),t.checkChangeByUser){const p=g.concat(m).filter(h=>!g.includes(h)||!m.includes(h));n(Ov,g,p)}else n(Ov,g),t.checkChangeByUser=!0}),fe(o,()=>{u()}),fe(()=>e.data,()=>{const g=[],m=l.value.map(p=>p[a.value.key]);t.checked.forEach(p=>{m.includes(p)&&g.push(p)}),t.checkChangeByUser=!1,t.checked=g}),fe(()=>e.defaultChecked,(g,m)=>{if(m&&g.length===m.length&&g.every(b=>m.includes(b)))return;const p=[],h=o.value.map(b=>b[a.value.key]);g.forEach(b=>{h.includes(b)&&p.push(b)}),t.checkChangeByUser=!1,t.checked=p},{immediate:!0}),fe(()=>t.query,()=>{var g;e.virtualScroll&&((g=v.value)==null||g.scrollToItem(0))},{flush:"post"}),{filteredData:l,checkableData:o,checkedSummary:s,virtualListRef:v,isIndeterminate:r,checkboxGroupRef:d,virtualListHeight:f,updateAllChecked:u,handleAllCheckedChange:c}};var xU=ue({name:"ElTransferPanel",__name:"transfer-panel",props:CU,emits:kU,setup(e,{expose:t,emit:n}){const a=e,l=n,o=mn(),s=({option:$})=>$,{t:r}=St(),u=he("transfer"),c=Ft({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),d=Cu(a),{filteredData:f,checkedSummary:v,virtualListRef:g,isIndeterminate:m,checkboxGroupRef:p,virtualListHeight:h,handleAllCheckedChange:b}=EU(a,c,l),y=w(()=>!pa(c.query)&&pa(f.value)),C=w(()=>!pa(o.default()[0].children)),{checked:S,allChecked:E,query:x}=Vn(c);return t({query:x}),($,k)=>(O(),H("div",{class:I(i(u).b("panel"))},[W("p",{class:I(i(u).be("panel","header"))},[U(i(ll),{modelValue:i(E),"onUpdate:modelValue":k[0]||(k[0]=T=>Qt(E)?E.value=T:null),indeterminate:i(m),"validate-event":!1,onChange:i(b)},{default:J(()=>[W("span",{class:I(i(u).be("panel","header-title"))},Se(e.title),3),W("span",{class:I(i(u).be("panel","header-count"))},Se(i(v)),3)]),_:1},8,["modelValue","indeterminate","onChange"])],2),W("div",{class:I([i(u).be("panel","body"),i(u).is("with-footer",C.value)])},[e.filterable?(O(),oe(i(Yn),{key:0,modelValue:i(x),"onUpdate:modelValue":k[1]||(k[1]=T=>Qt(x)?x.value=T:null),class:I(i(u).be("panel","filter")),size:"default",placeholder:e.placeholder,"prefix-icon":i(R_),clearable:"","validate-event":!1},null,8,["modelValue","class","placeholder","prefix-icon"])):te("v-if",!0),ft(U(i(nm),{ref_key:"checkboxGroupRef",ref:p,modelValue:i(S),"onUpdate:modelValue":k[2]||(k[2]=T=>Qt(S)?S.value=T:null),"validate-event":!1,class:I([i(u).is("filterable",e.filterable),i(u).be("panel","list")])},{default:J(()=>[e.virtualScroll?(O(),oe(i(yu),{key:1,ref_key:"virtualListRef",ref:g,data:i(f),total:i(f).length,"item-size":e.itemSize,height:i(h)},{default:J(({data:T,index:M,style:P})=>[(O(),H("div",{key:T[M][i(d).key],style:je(P)},[U(i(ll),{class:I(i(u).be("panel","item")),value:T[M][i(d).key],disabled:T[M][i(d).disabled],"validate-event":!1},{default:J(()=>{var N;return[U(s,{option:(N=e.optionRender)==null?void 0:N.call(e,T[M])},null,8,["option"])]}),_:2},1032,["class","value","disabled"])],4))]),_:1},8,["data","total","item-size","height"])):(O(!0),H(ze,{key:0},bt(i(f),T=>(O(),oe(i(ll),{key:T[i(d).key],class:I(i(u).be("panel","item")),value:T[i(d).key],disabled:T[i(d).disabled],"validate-event":!1},{default:J(()=>{var M;return[U(s,{option:(M=e.optionRender)==null?void 0:M.call(e,T)},null,8,["option"])]}),_:2},1032,["class","value","disabled"]))),128))]),_:1},8,["modelValue","class"]),[[At,!y.value&&!i(pa)(e.data)]]),ft(W("div",{class:I(i(u).be("panel","empty"))},[ne($.$slots,"empty",{},()=>[it(Se(y.value?i(r)("el.transfer.noMatch"):i(r)("el.transfer.noData")),1)])],2),[[At,y.value||i(pa)(e.data)]])],2),C.value?(O(),H("p",{key:0,class:I(i(u).be("panel","footer"))},[ne($.$slots,"default")],2)):te("v-if",!0)],2))}}),g0=xU;const TU={key:0},$U={key:0};var OU=ue({name:"ElTransfer",__name:"transfer",props:xo,emits:bU,setup(e,{expose:t,emit:n}){const a=e,l=n,o=mn(),{t:s}=St(),r=he("transfer"),{formItem:u}=Hn(),c=Ft({leftChecked:[],rightChecked:[]}),d=Cu(a),{sourceData:f,targetData:v}=wU(a),{onSourceCheckedChange:g,onTargetCheckedChange:m}=yU(c,l),{addToLeft:p,addToRight:h}=SU(a,c,l),b=B(),y=B(),C=T=>{switch(T){case"left":b.value.query="";break;case"right":y.value.query=""}},S=w(()=>a.buttonTexts.length===2),E=w(()=>a.titles[0]||s("el.transfer.titles.0")),x=w(()=>a.titles[1]||s("el.transfer.titles.1")),$=w(()=>a.filterPlaceholder||s("el.transfer.filterPlaceholder"));fe(()=>a.modelValue,()=>{var T;a.validateEvent&&((T=u==null?void 0:u.validate)==null||T.call(u,"change").catch(vt))});const k=w(()=>T=>{var P;if(a.renderContent)return a.renderContent(Ge,T);const M=(((P=o.default)==null?void 0:P.call(o,{option:T}))||[]).filter(N=>N.type!==Cn);return M.length?M:Ge("span",T[d.value.label]||T[d.value.key])});return t({clearQuery:C,leftPanel:b,rightPanel:y}),(T,M)=>(O(),H("div",{class:I(i(r).b())},[U(g0,{ref_key:"leftPanel",ref:b,data:i(f),"option-render":k.value,placeholder:$.value,title:E.value,filterable:e.filterable,format:e.format,"filter-method":e.filterMethod,"default-checked":e.leftDefaultChecked,props:a.props,"virtual-scroll":e.virtualScroll,"item-size":e.itemSize,onCheckedChange:i(g)},{empty:J(()=>[ne(T.$slots,"left-empty")]),default:J(()=>[ne(T.$slots,"left-footer")]),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","virtual-scroll","item-size","onCheckedChange"]),W("div",{class:I(i(r).e("buttons"))},[U(i(Bn),{type:"primary",class:I([i(r).e("button"),i(r).is("with-texts",S.value)]),disabled:i(pa)(c.rightChecked),onClick:i(p)},{default:J(()=>[U(i(Ve),null,{default:J(()=>[U(i(io))]),_:1}),i(xt)(e.buttonTexts[0])?te("v-if",!0):(O(),H("span",TU,Se(e.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),U(i(Bn),{type:"primary",class:I([i(r).e("button"),i(r).is("with-texts",S.value)]),disabled:i(pa)(c.leftChecked),onClick:i(h)},{default:J(()=>[i(xt)(e.buttonTexts[1])?te("v-if",!0):(O(),H("span",$U,Se(e.buttonTexts[1]),1)),U(i(Ve),null,{default:J(()=>[U(i(ra))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),U(g0,{ref_key:"rightPanel",ref:y,data:i(v),"option-render":k.value,placeholder:$.value,filterable:e.filterable,format:e.format,"filter-method":e.filterMethod,title:x.value,"default-checked":e.rightDefaultChecked,props:a.props,"virtual-scroll":e.virtualScroll,"item-size":e.itemSize,onCheckedChange:i(m)},{empty:J(()=>[ne(T.$slots,"right-empty")]),default:J(()=>[ne(T.$slots,"right-footer")]),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","virtual-scroll","item-size","onCheckedChange"])],2))}}),NU=OU;const MU=ut(NU),$m="RootTree",J2="NodeInstance",b0="TreeNodeMap",Z2=$e({data:{type:G(Array),default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkOnClickLeaf:{type:Boolean,default:!0},checkDescendants:Boolean,autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:{type:Array},defaultExpandedKeys:{type:Array},currentNodeKey:{type:[String,Number]},renderContent:{type:G(Function)},showCheckbox:Boolean,draggable:Boolean,allowDrag:{type:G(Function)},allowDrop:{type:G(Function)},props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:Boolean,highlightCurrent:Boolean,load:{type:Function},filterNodeMethod:{type:Function},accordion:Boolean,indent:{type:Number,default:18},icon:{type:Ut}}),IU={"check-change":(e,t,n)=>e&&Wt(t)&&Wt(n),"current-change":(e,t)=>!0,"node-click":(e,t,n,a)=>e&&t&&a instanceof Event,"node-contextmenu":(e,t,n,a)=>e instanceof Event&&t&&n,"node-collapse":(e,t,n)=>e&&t,"node-expand":(e,t,n)=>e&&t,check:(e,t)=>e&&t,"node-drag-start":(e,t)=>e&&t,"node-drag-end":(e,t,n,a)=>e&&a,"node-drop":(e,t,n,a)=>e&&t&&a,"node-drag-leave":(e,t,n)=>e&&t&&n,"node-drag-enter":(e,t,n)=>e&&t&&n,"node-drag-over":(e,t,n)=>e&&t&&n},Q2="$treeNodeId",y0=function(e,t){!t||t.$treeNodeId||Object.defineProperty(t,Q2,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},Om=(e,t)=>t==null?void 0:t[e||"$treeNodeId"],Nv=(e,t,n)=>{const a=e.value.currentNode;n();const l=e.value.currentNode;a!==l&&t("current-change",l?l.data:null,l)},eE=e=>{let t=!0,n=!0,a=!0,l=!0;for(let o=0,s=e.length;o{n.canFocus=t,Mv(n.childNodes,t)})};let PU=0;var Iv=class wc{constructor(t){this.isLeafByUser=void 0,this.isLeaf=void 0,this.isEffectivelyChecked=!1,this.id=PU++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const n in t)Dt(t,n)&&(this[n]=t[n]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){var o;const t=this.store;if(!t)throw new Error("[Node]store is required!");t.registerNode(this);const n=t.props;if(n&&typeof n.isLeaf<"u"){const s=qu(this,"isLeaf");Wt(s)&&(this.isLeafByUser=s)}if(t.lazy!==!0&&this.data?(this.setData(this.data),t.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&t.lazy&&t.defaultExpandAll&&!this.isLeafByUser&&this.expand(),me(this.data)||y0(this,this.data),!this.data)return;const a=t.defaultExpandedKeys,l=t.key;l&&!vn(this.key)&&a&&a.includes(this.key)&&this.expand(null,t.autoExpandParent),l&&t.currentNodeKey!==void 0&&this.key===t.currentNodeKey&&(t.currentNode&&(t.currentNode.isCurrent=!1),t.currentNode=this,t.currentNode.isCurrent=!0),t.lazy&&t._initDefaultCheckedNode(this),this.updateLeafState(),(this.level===1||((o=this.parent)==null?void 0:o.expanded)===!0)&&(this.canFocus=!0)}setData(t){me(t)||y0(this,t),this.data=t,this.childNodes=[];let n;this.level===0&&me(this.data)?n=this.data:n=qu(this,"children")||[];for(let a=0,l=n.length;a-1)return t.childNodes[n+1]}return null}get previousSibling(){const t=this.parent;if(t){const n=t.childNodes.indexOf(this);if(n>-1)return n>0?t.childNodes[n-1]:null}return null}contains(t,n=!0){return(this.childNodes||[]).some(a=>a===t||n&&a.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,n,a){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof wc)){if(!a){const l=this.getChildren(!0);l!=null&&l.includes(t.data)||(xt(n)||n<0?l==null||l.push(t.data):l==null||l.splice(n,0,t.data))}Object.assign(t,{parent:this,store:this.store}),t=Ft(new wc(t)),t instanceof wc&&t.initialize()}t.level=this.level+1,xt(n)||n<0?this.childNodes.push(t):this.childNodes.splice(n,0,t),this.updateLeafState()}insertBefore(t,n){let a;n&&(a=this.childNodes.indexOf(n)),this.insertChild(t,a)}insertAfter(t,n){let a;n&&(a=this.childNodes.indexOf(n),a!==-1&&(a+=1)),this.insertChild(t,a)}removeChild(t){const n=this.getChildren()||[],a=n.indexOf(t.data);a>-1&&n.splice(a,1);const l=this.childNodes.indexOf(t);l>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(l,1)),this.updateLeafState()}removeChildByData(t){const n=this.childNodes.find(a=>a.data===t);n&&this.removeChild(n)}expand(t,n){const a=()=>{if(n){let l=this.parent;for(;l&&l.level>0;)l.expanded=!0,l=l.parent}this.expanded=!0,t&&t(),Mv(this.childNodes,!0)};this.shouldLoadData()?this.loadData(l=>{me(l)&&(this.store.checkStrictly||(this.checked?this.setChecked(!0,!0):ti(this)),a())}):a()}doCreateChildren(t,n={}){t.forEach(a=>{this.insertChild(Object.assign({data:a},n),void 0,!0)})}collapse(){this.expanded=!1,Mv(this.childNodes,!1)}shouldLoadData(){return!!(this.store.lazy===!0&&this.store.load&&!this.loaded)}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser,this.isEffectivelyChecked=this.isLeaf&&this.disabled;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0,this.isEffectivelyChecked=this.isLeaf&&this.disabled;return}this.isLeaf=!1}setChecked(t,n,a,l){if(this.indeterminate=t==="half",this.checked=t===!0,this.isEffectivelyChecked=!this.childNodes.length&&(this.disabled||this.checked),this.store.checkStrictly&&!n)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const s=()=>{if(n){const r=this.childNodes;for(let f=0,v=r.length;f{s(),ti(this)},{checked:t!==!1});return}else s()}const o=this.parent;!o||o.level===0||!a&&!this.store.checkStrictly&&ti(o)}getChildren(t=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const a=this.store.props;let l="children";return a&&(l=a.children||"children"),xt(n[l])&&(n[l]=null),t&&!n[l]&&(n[l]=[]),n[l]}updateChildren(){const t=this.getChildren()||[],n=this.childNodes.map(o=>o.data),a={},l=[];t.forEach((o,s)=>{const r=o[Q2];r&&n.some(u=>(u==null?void 0:u.$treeNodeId)===r)?a[r]={index:s,data:o}:l.push({index:s,data:o})}),this.store.lazy||n.forEach(o=>{a[o==null?void 0:o.$treeNodeId]||this.removeChildByData(o)}),l.forEach(({index:o,data:s})=>{this.insertChild({data:s},o)}),this.updateLeafState()}loadData(t,n={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(n).length)){this.loading=!0;const a=o=>{this.childNodes=[],this.doCreateChildren(o,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,o)},l=()=>{this.loading=!1};this.store.load(this,a,l)}else t&&t.call(this)}eachNode(t){const n=[this];for(;n.length;){const a=n.shift();n.unshift(...a.childNodes),t(a)}}reInitChecked(){this.store.checkStrictly||ti(this)}},RU=class{constructor(e){this.lazy=!1,this.checkStrictly=!1,this.autoExpandParent=!1,this.defaultExpandAll=!1,this.checkDescendants=!1,this.currentNode=null,this.currentNodeKey=null;for(const t in e)Dt(e,t)&&(this[t]=e[t]);this.nodesMap={}}initialize(){if(this.root=new Iv({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const e=this.load;e(this.root,t=>{this.root.doCreateChildren(t),this._initDefaultCheckedNodes()},vt)}else this._initDefaultCheckedNodes()}filter(e){const t=this.filterNodeMethod,n=this.lazy,a=async function(l){const o=l.root?l.root.childNodes:l.childNodes;for(const[s,r]of o.entries())r.visible=!!(t!=null&&t.call(r,e,r.data,r)),s%80===0&&s>0&&await Ae(),await a(r);if(!l.visible&&o.length){let s=!0;s=!o.some(r=>r.visible),l.root?l.root.visible=s===!1:l.visible=s===!1}e&&l.visible&&!l.isLeaf&&(!n||l.loaded)&&l.expand()};a(this)}setData(e){e!==this.root.data?(this.nodesMap={},this.root.setData(e),this._initDefaultCheckedNodes(),this.setCurrentNodeKey(this.currentNodeKey)):this.root.updateChildren()}getNode(e){if(e instanceof Iv)return e;const t=st(e)?Om(this.key,e):e;return this.nodesMap[t]||null}insertBefore(e,t){var a;const n=this.getNode(t);(a=n.parent)==null||a.insertBefore({data:e},n)}insertAfter(e,t){var a;const n=this.getNode(t);(a=n.parent)==null||a.insertAfter({data:e},n)}remove(e){const t=this.getNode(e);t&&t.parent&&(t===this.currentNode&&(this.currentNode=null),t.parent.removeChild(t))}append(e,t){const n=Ta(t)?this.root:this.getNode(t);n&&n.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],t=this.nodesMap;e.forEach(n=>{const a=t[n];a&&a.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(e){const t=this.defaultCheckedKeys||[];!vn(e.key)&&t.includes(e.key)&&e.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}registerNode(e){const t=this.key;if(!(!e||!e.data))if(!t)this.nodesMap[e.id]=e;else{const n=e.key;vn(n)||(this.nodesMap[n]=e)}}deregisterNode(e){!this.key||!e||!e.data||(e.childNodes.forEach(t=>{this.deregisterNode(t)}),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,t=!1){const n=[],a=function(l){(l.root?l.root.childNodes:l.childNodes).forEach(o=>{(o.checked||t&&o.indeterminate)&&(!e||e&&o.isLeaf)&&n.push(o.data),a(o)})};return a(this),n}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map(t=>(t||{})[this.key])}getHalfCheckedNodes(){const e=[],t=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(a=>{a.indeterminate&&e.push(a.data),t(a)})};return t(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(e=>(e||{})[this.key])}_getAllNodes(){const e=[],t=this.nodesMap;for(const n in t)Dt(t,n)&&e.push(t[n]);return e}updateChildren(e,t){const n=this.nodesMap[e];if(!n)return;const a=n.childNodes;for(let l=a.length-1;l>=0;l--){const o=a[l];this.remove(o.data)}for(let l=0,o=t.length;lr.level-u.level),l=Object.create(null),o=Object.keys(n);a.forEach(r=>r.setChecked(!1,!1));const s=r=>{r.childNodes.forEach(u=>{var c;l[u.data[e]]=!0,(c=u.childNodes)!=null&&c.length&&s(u)})};for(let r=0,u=a.length;r{g.isLeaf||g.setChecked(!1,!1,!0),f(g)}),v.reInitChecked()};f(c)}}}setCheckedNodes(e,t=!1){const n=this.key,a={};e.forEach(l=>{a[(l||{})[n]]=!0}),this._setCheckedKeys(n,t,a)}setCheckedKeys(e,t=!1){this.defaultCheckedKeys=e;const n=this.key,a={};e.forEach(l=>{a[l]=!0}),this._setCheckedKeys(n,t,a)}setDefaultExpandedKeys(e){e=e||[],this.defaultExpandedKeys=e,e.forEach(t=>{const n=this.getNode(t);n&&n.expand(null,this.autoExpandParent)})}setChecked(e,t,n){const a=this.getNode(e);a&&a.setChecked(!!t,n)}getCurrentNode(){return this.currentNode}setCurrentNode(e){const t=this.currentNode;t&&(t.isCurrent=!1),this.currentNode=e,this.currentNode.isCurrent=!0}setUserCurrentNode(e,t=!0){var l;const n=e[this.key],a=this.nodesMap[n];this.setCurrentNode(a),t&&this.currentNode&&this.currentNode.level>1&&((l=this.currentNode.parent)==null||l.expand(null,!0))}setCurrentNodeKey(e,t=!0){var a;if(this.currentNodeKey=e,Ta(e)){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const n=this.getNode(e);n&&(this.setCurrentNode(n),t&&this.currentNode&&this.currentNode.level>1&&((a=this.currentNode.parent)==null||a.expand(null,!0)))}};function tE(e){const t=Fe(b0,null);let n={treeNodeExpand:a=>{var l;e.node!==a&&((l=e.node)==null||l.collapse())},children:new Set};return t&&t.children.add(n),zt(()=>{t&&t.children.delete(n),n=null}),Tt(b0,n),{broadcastExpanded:a=>{if(e.accordion)for(const l of n.children)l.treeNodeExpand(a)}}}const nE=Symbol("dragEvents");function _U({props:e,ctx:t,el$:n,dropIndicator$:a,store:l}){const o=he("tree"),s=B({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return Tt(nE,{treeNodeDragStart:({event:d,treeNode:f})=>{if(d.dataTransfer){if(We(e.allowDrag)&&!e.allowDrag(f.node))return d.preventDefault(),!1;d.dataTransfer.effectAllowed="move";try{d.dataTransfer.setData("text/plain","")}catch{}s.value.draggingNode=f,t.emit("node-drag-start",f.node,d)}},treeNodeDragOver:({event:d,treeNode:f})=>{if(!d.dataTransfer)return;const v=f,g=s.value.dropNode;g&&g.node.id!==v.node.id&&sa(g.$el,o.is("drop-inner"));const m=s.value.draggingNode;if(!m||!v)return;let p=!0,h=!0,b=!0,y=!0;We(e.allowDrop)&&(p=e.allowDrop(m.node,v.node,"prev"),y=h=e.allowDrop(m.node,v.node,"inner"),b=e.allowDrop(m.node,v.node,"next")),d.dataTransfer.dropEffect=h||p||b?"move":"none",(p||h||b)&&(g==null?void 0:g.node.id)!==v.node.id&&(g&&t.emit("node-drag-leave",m.node,g.node,d),t.emit("node-drag-enter",m.node,v.node,d)),p||h||b?s.value.dropNode=v:s.value.dropNode=null,v.node.nextSibling===m.node&&(b=!1),v.node.previousSibling===m.node&&(p=!1),v.node.contains(m.node,!1)&&(h=!1),(m.node===v.node||m.node.contains(v.node))&&(p=!1,h=!1,b=!1);const C=v.$el,S=C.querySelector(`.${o.be("node","content")}`).getBoundingClientRect(),E=n.value.getBoundingClientRect(),x=n.value.scrollTop;let $;const k=p?h?.25:b?.45:1:Number.NEGATIVE_INFINITY,T=b?h?.75:p?.55:0:Number.POSITIVE_INFINITY;let M=-9999;const P=d.clientY-S.top;PS.height*T?$="after":h?$="inner":$="none";const N=C.querySelector(`.${o.be("node","expand-icon")}`).getBoundingClientRect(),A=a.value;$==="before"?M=N.top-E.top+x:$==="after"&&(M=N.bottom-E.top+x),A.style.top=`${M}px`,A.style.left=`${N.right-E.left}px`,$==="inner"?Ba(C,o.is("drop-inner")):sa(C,o.is("drop-inner")),s.value.showDropIndicator=$==="before"||$==="after",s.value.allowDrop=s.value.showDropIndicator||y,s.value.dropType=$,t.emit("node-drag-over",m.node,v.node,d)},treeNodeDragEnd:d=>{var m,p;const{draggingNode:f,dropType:v,dropNode:g}=s.value;if(d.preventDefault(),d.dataTransfer&&(d.dataTransfer.dropEffect="move"),f!=null&&f.node.data&&g){const h={data:f.node.data};v!=="none"&&f.node.remove(),v==="before"?(m=g.node.parent)==null||m.insertBefore(h,g.node):v==="after"?(p=g.node.parent)==null||p.insertAfter(h,g.node):v==="inner"&&g.node.insertChild(h),v!=="none"&&(l.value.registerNode(h),l.value.key&&f.node.eachNode(b=>{var y;(y=l.value.nodesMap[b.data[l.value.key]])==null||y.setChecked(b.checked,!l.value.checkStrictly)})),sa(g.$el,o.is("drop-inner")),t.emit("node-drag-end",f.node,g.node,v,d),v!=="none"&&t.emit("node-drop",f.node,g.node,v,d)}f&&!g&&t.emit("node-drag-end",f.node,null,v,d),s.value.showDropIndicator=!1,s.value.draggingNode=null,s.value.dropNode=null,s.value.allowDrop=!0}}),{dragState:s}}var AU=ue({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=he("tree"),n=Fe(J2),a=Fe($m);return()=>{const l=e.node,{data:o,store:s}=l;return e.renderContent?e.renderContent(Ge,{_self:n,node:l,data:o,store:s}):ne(a.ctx.slots,"default",{node:l,data:o},()=>[Ge(Tm,{tag:"span",truncated:!0,class:t.be("node","label")},()=>[l.label])])}}}),LU=AU,DU=ue({name:"ElTreeNode",components:{ElCollapseTransition:sf,ElCheckbox:ll,NodeContent:LU,ElIcon:Ve,Loading:rl},props:{node:{type:Iv,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:Boolean},emits:["node-expand"],setup(e,t){const n=he("tree"),{broadcastExpanded:a}=tE(e),l=Fe($m),o=B(!1),s=B(!1),r=B(),u=B(),c=B(),d=Fe(nE),f=ht();Tt(J2,f),l||Kt("Tree","Can not find node's tree."),e.node.expanded&&(o.value=!0,s.value=!0);const v=l.props.props.children||"children";fe(()=>{var M;const T=(M=e.node.data)==null?void 0:M[v];return T&&[...T]},()=>{e.node.updateChildren()}),fe(()=>e.node.indeterminate,T=>{p(e.node.checked,T)}),fe(()=>e.node.checked,T=>{p(T,e.node.indeterminate)}),fe(()=>e.node.childNodes.length,()=>e.node.reInitChecked()),fe(()=>e.node.expanded,T=>{Ae(()=>o.value=T),T&&(s.value=!0)});const g=T=>l.props.nodeKey?Om(l.props.nodeKey,T.data):T.id,m=T=>{const M=e.props.class;if(!M)return{};let P;if(We(M)){const{data:N}=T;P=M(N,T)}else P=M;return De(P)?{[P]:!0}:P},p=(T,M)=>{(r.value!==T||u.value!==M)&&l.ctx.emit("check-change",e.node.data,T,M),r.value=T,u.value=M},h=T=>{Nv(l.store,l.ctx.emit,()=>{var M;if((M=l==null?void 0:l.props)!=null&&M.nodeKey){const P=g(e.node);l.store.value.setCurrentNodeKey(P)}else l.store.value.setCurrentNode(e.node)}),l.currentNode.value=e.node,l.props.expandOnClickNode&&y(),(l.props.checkOnClickNode||e.node.isLeaf&&l.props.checkOnClickLeaf&&e.showCheckbox)&&!e.node.disabled&&C(!e.node.checked),l.ctx.emit("node-click",e.node.data,e.node,f,T)},b=T=>{var M;(M=l.instance.vnode.props)!=null&&M.onNodeContextmenu&&(T.stopPropagation(),T.preventDefault()),l.ctx.emit("node-contextmenu",T,e.node.data,e.node,f)},y=()=>{e.node.isLeaf||(o.value?(l.ctx.emit("node-collapse",e.node.data,e.node,f),e.node.collapse()):e.node.expand(()=>{t.emit("node-expand",e.node.data,e.node,f)}))},C=T=>{const M=l==null?void 0:l.props.checkStrictly,P=e.node.childNodes;!M&&P.length&&(T=P.some(N=>!N.isEffectivelyChecked)),e.node.setChecked(T,!M),Ae(()=>{const N=l.store.value;l.ctx.emit("check",e.node.data,{checkedNodes:N.getCheckedNodes(),checkedKeys:N.getCheckedKeys(),halfCheckedNodes:N.getHalfCheckedNodes(),halfCheckedKeys:N.getHalfCheckedKeys()})})};return{ns:n,node$:c,tree:l,expanded:o,childNodeRendered:s,oldChecked:r,oldIndeterminate:u,getNodeKey:g,getNodeClass:m,handleSelectChange:p,handleClick:h,handleContextMenu:b,handleExpandIconClick:y,handleCheckChange:C,handleChildNodeExpand:(T,M,P)=>{a(M),l.ctx.emit("node-expand",T,M,P)},handleDragStart:T=>{l.props.draggable&&d.treeNodeDragStart({event:T,treeNode:e})},handleDragOver:T=>{T.preventDefault(),l.props.draggable&&d.treeNodeDragOver({event:T,treeNode:{$el:c.value,node:e.node}})},handleDrop:T=>{T.preventDefault()},handleDragEnd:T=>{l.props.draggable&&d.treeNodeDragEnd(T)},CaretRight:YS}}});const BU=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],VU=["aria-expanded"];function FU(e,t,n,a,l,o){const s=_t("el-icon"),r=_t("el-checkbox"),u=_t("loading"),c=_t("node-content"),d=_t("el-tree-node"),f=_t("el-collapse-transition");return ft((O(),H("div",{ref:"node$",class:I([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:t[2]||(t[2]=Je((...v)=>e.handleClick&&e.handleClick(...v),["stop"])),onContextmenu:t[3]||(t[3]=(...v)=>e.handleContextMenu&&e.handleContextMenu(...v)),onDragstart:t[4]||(t[4]=Je((...v)=>e.handleDragStart&&e.handleDragStart(...v),["stop"])),onDragover:t[5]||(t[5]=Je((...v)=>e.handleDragOver&&e.handleDragOver(...v),["stop"])),onDragend:t[6]||(t[6]=Je((...v)=>e.handleDragEnd&&e.handleDragEnd(...v),["stop"])),onDrop:t[7]||(t[7]=Je((...v)=>e.handleDrop&&e.handleDrop(...v),["stop"]))},[W("div",{class:I(e.ns.be("node","content")),style:je({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(O(),oe(s,{key:0,class:I([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:Je(e.handleExpandIconClick,["stop"])},{default:J(()=>[(O(),oe(dt(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):te("v-if",!0),e.showCheckbox?(O(),oe(r,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=Je(()=>{},["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):te("v-if",!0),e.node.loading?(O(),oe(s,{key:2,class:I([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:J(()=>[U(u)]),_:1},8,["class"])):te("v-if",!0),U(c,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),U(f,null,{default:J(()=>[!e.renderAfterExpand||e.childNodeRendered?ft((O(),H("div",{key:0,class:I(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded,onClick:t[1]||(t[1]=Je(()=>{},["stop"]))},[(O(!0),H(ze,null,bt(e.node.childNodes,v=>(O(),oe(d,{key:e.getNodeKey(v),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:v,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,VU)),[[At,e.expanded]]):te("v-if",!0)]),_:1})],42,BU)),[[At,e.node.visible]])}var zU=Rn(DU,[["render",FU]]);function HU({el$:e},t){const n=he("tree");mt(()=>{o()}),Kl(()=>{var s;(s=e.value)==null||s.querySelectorAll("input[type=checkbox]").forEach(r=>{r.setAttribute("tabindex","-1")})});function a(s,r){var c,d;const u=t.value.getNode(s[r].dataset.key);return u.canFocus&&u.visible&&(((c=u.parent)==null?void 0:c.expanded)||((d=u.parent)==null?void 0:d.level)===0)}Ht(e,"keydown",s=>{const r=s.target;if(!r.className.includes(n.b("node")))return;const u=Gt(s),c=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)),d=c.indexOf(r);let f;if([ye.up,ye.down].includes(u)){if(s.preventDefault(),u===ye.up){f=d===-1?0:d!==0?d-1:c.length-1;const g=f;for(;!a(c,f);){if(f--,f===g){f=-1;break}f<0&&(f=c.length-1)}}else{f=d===-1?0:d=c.length&&(f=0)}}f!==-1&&c[f].focus()}[ye.left,ye.right].includes(u)&&(s.preventDefault(),r.click());const v=r.querySelector('[type="checkbox"]');[ye.enter,ye.numpadEnter,ye.space].includes(u)&&v&&(s.preventDefault(),v.click())});const o=()=>{var u;if(!e.value)return;const s=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`));Array.from(e.value.querySelectorAll("input[type=checkbox]")).forEach(c=>{c.setAttribute("tabindex","-1")});const r=e.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);if(r.length){r[0].setAttribute("tabindex","0");return}(u=s[0])==null||u.setAttribute("tabindex","0")}}var KU=ue({name:"ElTree",components:{ElTreeNode:zU},props:Z2,emits:IU,setup(e,t){const{t:n}=St(),a=he("tree"),l=B(new RU({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));l.value.initialize();const o=B(l.value.root),s=B(null),r=B(null),u=B(null),{broadcastExpanded:c}=tE(e),{dragState:d}=_U({props:e,ctx:t,el$:r,dropIndicator$:u,store:l});HU({el$:r},l);const f=ht(),v=w(()=>{let L=f==null?void 0:f.parent;for(;L;){if(L.type.name==="ElTreeSelect")return!0;L=L.parent}return!1}),g=w(()=>{const{childNodes:L}=o.value;return(!L||L.length===0||L.every(({visible:K})=>!K))&&!v.value});fe(()=>e.currentNodeKey,L=>{l.value.setCurrentNodeKey(L??null)}),fe(()=>e.defaultCheckedKeys,(L,K)=>{cn(L,K)||l.value.setDefaultCheckedKey(L??[])}),fe(()=>e.defaultExpandedKeys,L=>{l.value.setDefaultExpandedKeys(L??[])}),fe(()=>e.data,L=>{l.value.setData(L)},{deep:!0}),fe(()=>e.checkStrictly,L=>{l.value.checkStrictly=L});const m=L=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");l.value.filter(L)},p=L=>e.nodeKey?Om(e.nodeKey,L.data):L.id,h=L=>{if(!e.nodeKey)throw new Error(`[Tree] nodeKey is required in ${L}`)},b=L=>{h("getNodePath");const K=l.value.getNode(L);if(!K)return[];const q=[K.data];let X=K.parent;for(;X&&X!==o.value;)q.push(X.data),X=X.parent;return q.reverse()},y=(L,K)=>l.value.getCheckedNodes(L,K),C=L=>l.value.getCheckedKeys(L),S=()=>{const L=l.value.getCurrentNode();return L?L.data:null},E=()=>{h("getCurrentKey");const L=S();return L?L[e.nodeKey]:null},x=(L,K)=>{h("setCheckedNodes"),l.value.setCheckedNodes(L,K)},$=(L,K)=>{h("setCheckedKeys"),l.value.setCheckedKeys(L,K)},k=(L,K,q=!1)=>{l.value.setChecked(L,K,q)},T=()=>l.value.getHalfCheckedNodes(),M=()=>l.value.getHalfCheckedKeys(),P=(L,K=!0)=>{h("setCurrentNode"),Nv(l,t.emit,()=>{c(L),l.value.setUserCurrentNode(L,K)})},N=(L=null,K=!0)=>{h("setCurrentKey"),Nv(l,t.emit,()=>{c(),l.value.setCurrentNodeKey(L,K)})},A=L=>l.value.getNode(L),j=L=>{l.value.remove(L)},z=(L,K)=>{l.value.append(L,K)},V=(L,K)=>{l.value.insertBefore(L,K)},D=(L,K)=>{l.value.insertAfter(L,K)},_=(L,K,q)=>{c(K),t.emit("node-expand",L,K,q)},F=(L,K)=>{h("updateKeyChildren"),l.value.updateChildren(L,K)};return Tt($m,{ctx:t,props:e,store:l,root:o,currentNode:s,instance:f}),Tt(Hl,void 0),{ns:a,store:l,root:o,currentNode:s,dragState:d,el$:r,dropIndicator$:u,isEmpty:g,filter:m,getNodeKey:p,getNodePath:b,getCheckedNodes:y,getCheckedKeys:C,getCurrentNode:S,getCurrentKey:E,setCheckedNodes:x,setCheckedKeys:$,setChecked:k,getHalfCheckedNodes:T,getHalfCheckedKeys:M,setCurrentNode:P,setCurrentKey:N,t:n,getNode:A,remove:j,append:z,insertBefore:V,insertAfter:D,handleNodeExpand:_,updateKeyChildren:F}}});function WU(e,t,n,a,l,o){const s=_t("el-tree-node");return O(),H("div",{ref:"el$",class:I([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner",e.dragState.dropType==="inner"),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(O(!0),H(ze,null,bt(e.root.childNodes,r=>(O(),oe(s,{key:e.getNodeKey(r),node:r,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),e.isEmpty?(O(),H("div",{key:0,class:I(e.ns.e("empty-block"))},[ne(e.$slots,"empty",{},()=>[W("span",{class:I(e.ns.e("empty-text"))},Se(e.emptyText??e.t("el.tree.emptyText")),3)])],2)):te("v-if",!0),ft(W("div",{ref:"dropIndicator$",class:I(e.ns.e("drop-indicator"))},null,2),[[At,e.dragState.showDropIndicator]])],2)}var jU=Rn(KU,[["render",WU]]);const Nm=ut(jU),qU=(e,{attrs:t,emit:n},{select:a,tree:l,key:o})=>{const s=he("tree-select");fe(()=>e.data,()=>{e.filterable&&Ae(()=>{var u,c;(c=l.value)==null||c.filter((u=a.value)==null?void 0:u.states.inputValue)})},{flush:"post"});const r=u=>{var d,f;const c=u.at(-1);if(c.expanded&&c.childNodes.at(-1))r([c.childNodes.at(-1)]);else{(f=(d=l.value.el$)==null?void 0:d.querySelector(`[data-key="${u.at(-1).key}"]`))==null||f.focus({preventScroll:!0});return}};return mt(()=>{Ht(()=>{var u;return(u=a.value)==null?void 0:u.$el},"keydown",async u=>{const c=Gt(u),{dropdownMenuVisible:d}=a.value;[ye.down,ye.up].includes(c)&&d&&(await Ae(),setTimeout(()=>{var f,v,g;if(ye.up===c){const m=l.value.store.root.childNodes;r(m);return}(g=(v=(f=a.value.optionsArray[a.value.states.hoveringIndex].$el)==null?void 0:f.parentNode)==null?void 0:v.parentNode)==null||g.focus({preventScroll:!0})}))},{capture:!0})}),{...Ll(Vn(e),Object.keys(Wo.props)),...t,class:w(()=>t.class),style:w(()=>t.style),"onUpdate:modelValue":u=>n(rt,u),valueKey:o,popperClass:w(()=>[s.e("popper"),e.popperClass]),filterMethod:(u="")=>{var c;e.filterMethod?e.filterMethod(u):e.remoteMethod?e.remoteMethod(u):(c=l.value)==null||c.filter(u)}}},YU=ue({extends:Yc,setup(e,t){const n=Yc.setup(e,t);delete n.selectOptionClick;const a=ht().proxy;return Ae(()=>{n.select.states.cachedOptions.get(a.value)||n.select.onOptionCreate(a)}),fe(()=>t.attrs.visible,l=>{Ae(()=>{n.states.visible=l})},{immediate:!0}),n},methods:{selectOptionClick(){this.$el.parentElement.click()}}});function Pv(e){return e||e===0}function Mm(e){return me(e)&&e.length}function js(e){return me(e)?e:Pv(e)?[e]:[]}function Sc(e,t,n,a,l){for(let o=0;o{fe([()=>e.modelValue,o],()=>{e.showCheckbox&&Ae(()=>{const m=o.value;m&&!cn(m.getCheckedKeys(),js(e.modelValue))&&m.setCheckedKeys(js(e.modelValue))})},{immediate:!0,deep:!0});const r=w(()=>({value:s.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...e.props})),u=(m,p)=>{var b;const h=r.value[m];return We(h)?h(p,(b=o.value)==null?void 0:b.getNode(u("value",p))):p[h]},c=js(e.modelValue).map(m=>Sc(e.data||[],p=>u("value",p)===m,p=>u("children",p),(p,h,b,y)=>y&&u("value",y))).filter(m=>Pv(m)),d=w(()=>{if(!e.renderAfterExpand&&!e.lazy)return[];const m=[];return Cc(e.data.concat(e.cacheData),p=>{const h=u("value",p);m.push({value:h,currentLabel:u("label",p),isDisabled:u("disabled",p)})},p=>u("children",p)),m}),f=()=>{var m;return(m=o.value)==null?void 0:m.getCheckedKeys().filter(p=>{var b;const h=(b=o.value)==null?void 0:b.getNode(p);return!vn(h)&&pa(h.childNodes)})},v=m=>{cn(e.modelValue,m)||a(yt,m)};function g(m){a(rt,m),v(m)}return{...Ll(Vn(e),Object.keys(Nm.props)),...t,nodeKey:s,expandOnClickNode:w(()=>!e.checkStrictly&&e.expandOnClickNode),defaultExpandedKeys:w(()=>e.defaultExpandedKeys?e.defaultExpandedKeys.concat(c):c),renderContent:(m,{node:p,data:h,store:b})=>m(YU,{value:u("value",h),label:u("label",h),disabled:u("disabled",h),visible:p.visible},e.renderContent?()=>e.renderContent(m,{node:p,data:h,store:b}):n.default?()=>n.default({node:p,data:h,store:b}):void 0),filterNodeMethod:(m,p,h)=>e.filterNodeMethod?e.filterNodeMethod(m,p,h):m?new RegExp(bh(m),"i").test(u("label",p)||""):!0,onNodeClick:(m,p,h)=>{var b,y,C;if((b=t.onNodeClick)==null||b.call(t,m,p,h),!(e.showCheckbox&&e.checkOnClickNode))if(!e.showCheckbox&&(e.checkStrictly||p.isLeaf)){if(!u("disabled",m)){const S=(y=l.value)==null?void 0:y.states.options.get(u("value",m));(C=l.value)==null||C.handleOptionSelect(S)}}else e.expandOnClickNode&&h.proxy.handleExpandIconClick()},onCheck:(m,p)=>{var E;if(!e.showCheckbox)return;const h=u("value",m),b={};Cc([o.value.store.root],x=>b[x.key]=x,x=>x.childNodes);const y=p.checkedKeys,C=e.multiple?js(e.modelValue).filter(x=>!(x in b)&&!y.includes(x)):[],S=C.concat(y);if(e.checkStrictly)g(e.multiple?S:S.includes(h)?h:void 0);else if(e.multiple){const x=f();g(C.concat(x))}else{const x=Sc([m],T=>!Mm(u("children",T))&&!u("disabled",T),T=>u("children",T)),$=x?u("value",x):void 0,k=Pv(e.modelValue)&&!!Sc([m],T=>u("value",T)===e.modelValue,T=>u("children",T));g($===e.modelValue||k?void 0:$)}Ae(()=>{var $;const x=js(e.modelValue);o.value.setCheckedKeys(x),($=t.onCheck)==null||$.call(t,m,{checkedKeys:o.value.getCheckedKeys(),checkedNodes:o.value.getCheckedNodes(),halfCheckedKeys:o.value.getHalfCheckedKeys(),halfCheckedNodes:o.value.getHalfCheckedNodes()})}),(E=l.value)==null||E.focus()},onNodeExpand:(m,p,h)=>{var b;(b=t.onNodeExpand)==null||b.call(t,m,p,h),Ae(()=>{if(!e.checkStrictly&&e.lazy&&e.multiple&&p.checked){const y={},C=o.value.getCheckedKeys();Cc([o.value.store.root],x=>y[x.key]=x,x=>x.childNodes);const S=js(e.modelValue).filter(x=>!(x in y)&&!C.includes(x)),E=f();g(S.concat(E))}})},cacheOptions:d}};var GU=ue({props:{data:{type:Array,default:()=>[]}},setup(e){const t=Fe(gu);return fe(()=>e.data,()=>{var a;e.data.forEach(l=>{t.states.cachedOptions.has(l.value)||t.states.cachedOptions.set(l.value,l)});const n=((a=t.selectRef)==null?void 0:a.querySelectorAll("input"))||[];It&&!Array.from(n).includes(document.activeElement)&&t.setSelected()},{flush:"post",immediate:!0}),()=>{}}}),XU=ue({name:"ElTreeSelect",inheritAttrs:!1,props:{...YC,...Z2,cacheData:{type:Array,default:()=>[]}},setup(e,t){const{slots:n,expose:a,emit:l,attrs:o}=t,s={...o,onChange:void 0},r=B(),u=B(),c=w(()=>e.nodeKey||e.valueKey||"value"),d=qU(e,{attrs:o,emit:l},{select:r,tree:u,key:c}),{cacheOptions:f,...v}=UU(e,{attrs:s,slots:n,emit:l},{select:r,tree:u,key:c}),g=Ft({});return a(g),mt(()=>{Object.assign(g,{...Ll(u.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...Ll(r.value,["focus","blur","selectedLabel"]),treeRef:u.value,selectRef:r.value})}),()=>Ge(Wo,Ft({...d,ref:m=>r.value=m}),{...n,default:()=>[Ge(GU,{data:f.value}),Ge(Nm,Ft({...v,ref:m=>u.value=m}))]})}}),JU=XU;const ZU=ut(JU),Im=Symbol(),QU={key:-1,level:-1,data:{}},aE={type:Number,default:26},eG=$e({data:{type:G(Array),default:()=>dn([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:G(Object),default:()=>dn({children:"children",label:"label",disabled:"disabled",value:"id",class:""})},highlightCurrent:Boolean,showCheckbox:Boolean,defaultCheckedKeys:{type:G(Array),default:()=>dn([])},checkStrictly:Boolean,defaultExpandedKeys:{type:G(Array),default:()=>dn([])},indent:{type:Number,default:16},itemSize:aE,icon:{type:Ut},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkOnClickLeaf:{type:Boolean,default:!0},currentNodeKey:{type:G([String,Number])},accordion:Boolean,filterMethod:{type:G(Function)},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:Boolean}),tG=$e({node:{type:G(Object),default:()=>dn(QU)},expanded:Boolean,checked:Boolean,indeterminate:Boolean,showCheckbox:Boolean,disabled:Boolean,current:Boolean,hiddenExpandIcon:Boolean,itemSize:aE}),nG=$e({node:{type:G(Object),required:!0}}),lE="node-click",oE="node-drop",sE="node-expand",rE="node-collapse",iE="current-change",uE="check",cE="check-change",dE="node-contextmenu",aG={[lE]:(e,t,n)=>e&&t&&n,[oE]:(e,t,n)=>e&&t&&n,[sE]:(e,t)=>e&&t,[rE]:(e,t)=>e&&t,[iE]:(e,t)=>e&&t,[uE]:(e,t)=>e&&t,[cE]:(e,t)=>e&&Wt(t),[dE]:(e,t,n)=>e&&t&&n},lG={click:(e,t)=>!!(e&&t),drop:(e,t)=>!!(e&&t),toggle:e=>!!e,check:(e,t)=>e&&Wt(t)};function oG(e,t){const n=B(new Set),a=B(new Set),{emit:l}=ht();fe([()=>t.value,()=>e.defaultCheckedKeys],()=>Ae(()=>{y(e.defaultCheckedKeys)}),{immediate:!0});const o=(C=!1)=>{if(!t.value||!e.showCheckbox||e.checkStrictly&&!C)return;const{levelTreeNodeMap:S,maxLevel:E}=t.value,x=n.value,$=new Set;for(let k=E;k>=1;--k){const T=S.get(k);T&&T.forEach(M=>{const P=M.children;let N=!M.isLeaf||M.disabled||x.has(M.key);if(P){let A=!0,j=!1;for(const z of P){const V=z.key;if(z.isEffectivelyChecked||(N=!1),x.has(V))j=!0;else if($.has(V)){A=!1,j=!0;break}else A=!1}A?x.add(M.key):j?($.add(M.key),x.delete(M.key)):(x.delete(M.key),$.delete(M.key))}M.isEffectivelyChecked=N})}a.value=$},s=C=>n.value.has(C.key),r=C=>a.value.has(C.key),u=(C,S,E=!0,x=!0,$=!1)=>{const k=n.value,T=C.children;(!e.checkStrictly||$)&&E&&(T!=null&&T.length)&&(S=T.some(P=>!P.isEffectivelyChecked));const M=(P,N)=>{k[N?"add":"delete"](P.key);const A=P.children;(!e.checkStrictly||$)&&A&&A.forEach(j=>{(!j.disabled||j.children)&&M(j,N)})};M(C,S),x&&o(),E&&c(C,S)},c=(C,S)=>{const{checkedNodes:E,checkedKeys:x}=m(),{halfCheckedNodes:$,halfCheckedKeys:k}=p();l(uE,C.data,{checkedKeys:x,checkedNodes:E,halfCheckedKeys:k,halfCheckedNodes:$}),l(cE,C.data,S)};function d(C=!1){return m(C).checkedKeys}function f(C=!1){return m(C).checkedNodes}function v(){return p().halfCheckedKeys}function g(){return p().halfCheckedNodes}function m(C=!1){const S=[],E=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:x}=t.value;n.value.forEach($=>{const k=x.get($);k&&(!C||C&&k.isLeaf)&&(E.push($),S.push(k.data))})}return{checkedKeys:E,checkedNodes:S}}function p(){const C=[],S=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:E}=t.value;a.value.forEach(x=>{const $=E.get(x);$&&(S.push(x),C.push($.data))})}return{halfCheckedNodes:C,halfCheckedKeys:S}}function h(C){n.value.clear(),a.value.clear(),Ae(()=>{y(C)})}function b(C,S,E){if(t!=null&&t.value&&e.showCheckbox){const x=t.value.treeNodeMap.get(C);x&&u(x,S,!1,void 0,E)}}function y(C){if(t!=null&&t.value){const{treeNodeMap:S}=t.value;if(e.showCheckbox&&S){for(const E of C){const x=S.get(E);x&&!s(x)&&u(x,!0,!1,!1)}o()}}}return{updateCheckedKeys:o,toggleCheckbox:u,isChecked:s,isIndeterminate:r,getCheckedKeys:d,getCheckedNodes:f,getHalfCheckedKeys:v,getHalfCheckedNodes:g,setChecked:b,setCheckedKeys:h}}function sG(e,t){const n=B(new Set([])),a=B(new Set([])),l=w(()=>We(e.filterMethod));function o(r){var p;if(!l.value)return;const u=new Set,c=a.value,d=n.value,f=[],v=((p=t.value)==null?void 0:p.treeNodes)||[],g=e.filterMethod;d.clear();function m(h){h.forEach(b=>{f.push(b),g!=null&&g(r,b.data,b)?f.forEach(C=>{u.add(C.key),C.expanded=!0}):(b.expanded=!1,b.isLeaf&&d.add(b.key));const y=b.children;if(y&&m(y),!b.isLeaf){if(!u.has(b.key))d.add(b.key);else if(y){let C=!0;for(const S of y)if(!d.has(S.key)){C=!1;break}C?c.add(b.key):c.delete(b.key)}}f.pop()})}return m(v),u}function s(r){return a.value.has(r.key)}return{hiddenExpandIconKeySet:a,hiddenNodeKeySet:n,doFilter:o,isForceHiddenExpandIcon:s}}function rG(e,t){const n=B(new Set),a=B(),l=Et(),o=B(),{isIndeterminate:s,isChecked:r,toggleCheckbox:u,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:f,getHalfCheckedNodes:v,setChecked:g,setCheckedKeys:m}=oG(e,l),{doFilter:p,hiddenNodeKeySet:h,isForceHiddenExpandIcon:b}=sG(e,l),y=w(()=>{var R;return((R=e.props)==null?void 0:R.value)||"id"}),C=w(()=>{var R;return((R=e.props)==null?void 0:R.children)||"children"}),S=w(()=>{var R;return((R=e.props)==null?void 0:R.disabled)||"disabled"}),E=w(()=>{var R;return((R=e.props)==null?void 0:R.label)||"label"}),x=w(()=>{var de;const R=n.value,Y=h.value,ae=[],le=((de=l.value)==null?void 0:de.treeNodes)||[],se=[];for(let be=le.length-1;be>=0;--be)se.push(le[be]);for(;se.length;){const be=se.pop();if(!Y.has(be.key)&&(ae.push(be),be.children&&R.has(be.key)))for(let we=be.children.length-1;we>=0;--we)se.push(be.children[we])}return ae}),$=w(()=>x.value.length>0);function k(R){const Y=new Map,ae=new Map;let le=1;function se(be,we=1,Oe=void 0){var Ie;const Ce=[];for(const ge of be){const ke=P(ge),Le={level:we,key:ke,data:ge};Le.label=A(ge),Le.parent=Oe;const qe=M(ge);Le.disabled=N(ge),Le.isLeaf=!qe||qe.length===0,Le.expanded=n.value.has(ke),qe&&qe.length&&(Le.children=se(qe,we+1,Le)),Ce.push(Le),Y.set(ke,Le),ae.has(we)||ae.set(we,[]),(Ie=ae.get(we))==null||Ie.push(Le)}return we>le&&(le=we),Ce}const de=se(R);return{treeNodeMap:Y,levelTreeNodeMap:ae,maxLevel:le,treeNodes:de}}function T(R){const Y=p(R);Y&&(n.value=Y)}function M(R){return R[C.value]}function P(R){return R?R[y.value]:""}function N(R){return R[S.value]}function A(R){return R[E.value]}function j(R){n.value.has(R.key)?K(R):L(R)}function z(R){const Y=new Set,ae=l.value.treeNodeMap;n.value.forEach(le=>{const se=ae.get(le);se&&(se.expanded=!1)}),R.forEach(le=>{let se=ae.get(le);for(;se&&!Y.has(se.key);)Y.add(se.key),se.expanded=!0,se=se.parent}),n.value=Y}function V(R,Y){_(R),t(lE,R.data,R,Y),e.expandOnClickNode&&j(R),e.showCheckbox&&(e.checkOnClickNode||R.isLeaf&&e.checkOnClickLeaf)&&!R.disabled&&u(R,!r(R),!0)}function D(R,Y){t(oE,R.data,R,Y)}function _(R){X(R)||(a.value=R.key,t(iE,R.data,R))}function F(R,Y){u(R,Y)}function L(R){const Y=n.value;if(l.value&&e.accordion){const{treeNodeMap:le}=l.value;Y.forEach(se=>{const de=le.get(se);R&&R.level===(de==null?void 0:de.level)&&(Y.delete(se),de.expanded=!1)})}Y.add(R.key);const ae=ve(R.key);ae&&(ae.expanded=!0,t(sE,ae.data,ae))}function K(R){n.value.delete(R.key);const Y=ve(R.key);Y&&(Y.expanded=!1,t(rE,Y.data,Y))}function q(R){return!!R.disabled}function X(R){const Y=a.value;return Y!==void 0&&Y===R.key}function Z(){var R,Y;if(a.value!==void 0)return(Y=(R=l.value)==null?void 0:R.treeNodeMap.get(a.value))==null?void 0:Y.data}function Q(){return a.value}function ee(R){a.value=R}function ie(R){l.value=k(R)}function ve(R){var ae;const Y=st(R)?P(R):R;return(ae=l.value)==null?void 0:ae.treeNodeMap.get(Y)}function pe(R,Y="auto"){const ae=ve(R);ae&&o.value&&o.value.scrollToItem(x.value.indexOf(ae),Y)}function re(R){var Y;(Y=o.value)==null||Y.scrollTo(R)}return fe(()=>e.currentNodeKey,R=>{a.value=R},{immediate:!0}),fe(()=>e.defaultExpandedKeys,R=>{z(R||[])}),fe(()=>e.data,R=>{ie(R),z(e.defaultExpandedKeys||[])},{immediate:!0}),{tree:l,flattenTree:x,isNotEmpty:$,listRef:o,getKey:P,getChildren:M,toggleExpand:j,toggleCheckbox:u,isChecked:r,isIndeterminate:s,isDisabled:q,isCurrent:X,isForceHiddenExpandIcon:b,handleNodeClick:V,handleNodeDrop:D,handleNodeCheck:F,getCurrentNode:Z,getCurrentKey:Q,setCurrentKey:ee,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:f,getHalfCheckedNodes:v,setChecked:g,setCheckedKeys:m,filter:T,setData:ie,getNode:ve,expandNode:L,collapseNode:K,setExpandedKeys:z,scrollToNode:pe,scrollTo:re}}var iG=ue({name:"ElTreeNodeContent",props:nG,setup(e){const t=Fe(Im),n=he("tree");return()=>{const a=e.node,{data:l}=a;return t!=null&&t.ctx.slots.default?t.ctx.slots.default({node:a,data:l}):Ge(Tm,{tag:"span",truncated:!0,class:n.be("node","label")},()=>[a==null?void 0:a.label])}}});const uG=["aria-expanded","aria-disabled","aria-checked","data-key"];var cG=ue({name:"ElTreeNode",__name:"tree-node",props:tG,emits:lG,setup(e,{emit:t}){const n=e,a=t,l=Fe(Im),o=he("tree"),s=w(()=>(l==null?void 0:l.props.indent)??16),r=w(()=>(l==null?void 0:l.props.icon)??YS),u=m=>{var b;const p=(b=l==null?void 0:l.props.props)==null?void 0:b.class;if(!p)return{};let h;if(We(p)){const{data:y}=m;h=p(y,m)}else h=p;return De(h)?{[h]:!0}:h},c=m=>{a("click",n.node,m)},d=m=>{a("drop",n.node,m)},f=()=>{a("toggle",n.node)},v=m=>{a("check",n.node,m)},g=m=>{var p,h,b,y;(b=(h=(p=l==null?void 0:l.instance)==null?void 0:p.vnode)==null?void 0:h.props)!=null&&b.onNodeContextmenu&&(m.stopPropagation(),m.preventDefault()),l==null||l.ctx.emit(dE,m,(y=n.node)==null?void 0:y.data,n.node)};return(m,p)=>{var h,b,y;return O(),H("div",{ref:"node$",class:I([i(o).b("node"),i(o).is("expanded",e.expanded),i(o).is("current",e.current),i(o).is("focusable",!e.disabled),i(o).is("checked",!e.disabled&&e.checked),u(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.disabled,"aria-checked":e.checked,"data-key":(h=e.node)==null?void 0:h.key,onClick:Je(c,["stop"]),onContextmenu:g,onDragover:p[1]||(p[1]=Je(()=>{},["prevent"])),onDragenter:p[2]||(p[2]=Je(()=>{},["prevent"])),onDrop:Je(d,["stop"])},[W("div",{class:I(i(o).be("node","content")),style:je({paddingLeft:`${(e.node.level-1)*s.value}px`,height:e.itemSize+"px"})},[r.value?(O(),oe(i(Ve),{key:0,class:I([i(o).is("leaf",!!((b=e.node)!=null&&b.isLeaf)),i(o).is("hidden",e.hiddenExpandIcon),{expanded:!((y=e.node)!=null&&y.isLeaf)&&e.expanded},i(o).be("node","expand-icon")]),onClick:Je(f,["stop"])},{default:J(()=>[(O(),oe(dt(r.value)))]),_:1},8,["class"])):te("v-if",!0),e.showCheckbox?(O(),oe(i(ll),{key:1,"model-value":e.checked,indeterminate:e.indeterminate,disabled:e.disabled,onChange:v,onClick:p[0]||(p[0]=Je(()=>{},["stop"]))},null,8,["model-value","indeterminate","disabled"])):te("v-if",!0),U(i(iG),{node:{...e.node,expanded:e.expanded}},null,8,["node"])],6)],42,uG)}}}),dG=cG,fG=ue({name:"ElTreeV2",__name:"tree",props:eG,emits:aG,setup(e,{expose:t,emit:n}){const a=e,l=n,o=mn(),s=w(()=>a.itemSize);Tt(Im,{ctx:{emit:l,slots:o},props:a,instance:ht()}),Tt(Hl,void 0);const{t:r}=St(),u=he("tree"),{flattenTree:c,isNotEmpty:d,listRef:f,toggleExpand:v,isIndeterminate:g,isChecked:m,isDisabled:p,isCurrent:h,isForceHiddenExpandIcon:b,handleNodeClick:y,handleNodeDrop:C,handleNodeCheck:S,toggleCheckbox:E,getCurrentNode:x,getCurrentKey:$,setCurrentKey:k,getCheckedKeys:T,getCheckedNodes:M,getHalfCheckedKeys:P,getHalfCheckedNodes:N,setChecked:A,setCheckedKeys:j,filter:z,setData:V,getNode:D,expandNode:_,collapseNode:F,setExpandedKeys:L,scrollToNode:K,scrollTo:q}=rG(a,l);return t({toggleCheckbox:E,getCurrentNode:x,getCurrentKey:$,setCurrentKey:k,getCheckedKeys:T,getCheckedNodes:M,getHalfCheckedKeys:P,getHalfCheckedNodes:N,setChecked:A,setCheckedKeys:j,filter:z,setData:V,getNode:D,expandNode:_,collapseNode:F,setExpandedKeys:L,scrollToNode:K,scrollTo:q}),(X,Z)=>(O(),H("div",{class:I([i(u).b(),{[i(u).m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[i(d)?(O(),oe(i(yu),{key:0,ref_key:"listRef",ref:f,"class-name":i(u).b("virtual-list"),data:i(c),total:i(c).length,height:e.height,"item-size":s.value,"perf-mode":e.perfMode,"scrollbar-always-on":e.scrollbarAlwaysOn},{default:J(({data:Q,index:ee,style:ie})=>[(O(),oe(dG,{key:Q[ee].key,style:je(ie),node:Q[ee],expanded:Q[ee].expanded,"show-checkbox":e.showCheckbox,checked:i(m)(Q[ee]),indeterminate:i(g)(Q[ee]),"item-size":s.value,disabled:i(p)(Q[ee]),current:i(h)(Q[ee]),"hidden-expand-icon":i(b)(Q[ee]),onClick:i(y),onToggle:i(v),onCheck:i(S),onDrop:i(C)},null,8,["style","node","expanded","show-checkbox","checked","indeterminate","item-size","disabled","current","hidden-expand-icon","onClick","onToggle","onCheck","onDrop"]))]),_:1},8,["class-name","data","total","height","item-size","perf-mode","scrollbar-always-on"])):(O(),H("div",{key:1,class:I(i(u).e("empty-block"))},[ne(X.$slots,"empty",{},()=>[W("span",{class:I(i(u).e("empty-text"))},Se(e.emptyText??i(r)("el.tree.emptyText")),3)])],2))],2))}}),pG=fG;const vG=ut(pG),hG="ElUpload";var mG=class extends Error{constructor(e,t,n,a){super(e),this.name="UploadAjaxError",this.status=t,this.method=n,this.url=a}};function w0(e,t,n){let a;return n.response?a=`${n.response.error||n.response}`:n.responseText?a=`${n.responseText}`:a=`fail to ${t.method} ${e} ${n.status}`,new mG(a,n.status,t.method,e)}function gG(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const bG=e=>{typeof XMLHttpRequest>"u"&&rn(hG,"XMLHttpRequest is undefined");const t=new XMLHttpRequest,n=e.action;t.upload&&t.upload.addEventListener("progress",o=>{const s=o;s.percent=o.total>0?o.loaded/o.total*100:0,e.onProgress(s)});const a=new FormData;if(e.data)for(const[o,s]of Object.entries(e.data))me(s)?s.length===2&&s[0]instanceof Blob&&De(s[1])?a.append(o,s[0],s[1]):s.forEach(r=>{a.append(o,r)}):a.append(o,s);a.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(w0(n,e,t))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(w0(n,e,t));e.onSuccess(gG(t))}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const l=e.headers||{};if(l instanceof Headers)l.forEach((o,s)=>t.setRequestHeader(s,o));else for(const[o,s]of Object.entries(l))vn(s)||t.setRequestHeader(o,String(s));return t.send(a),t},fE=["text","picture","picture-card"];let yG=1;const Rv=()=>Date.now()+yG++,pE=$e({action:{type:String,default:"#"},headers:{type:G(Object)},method:{type:String,default:"post"},data:{type:G([Object,Function,Promise]),default:()=>dn({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:G(Array),default:()=>dn([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:fE,default:"text"},httpRequest:{type:G(Function),default:bG},disabled:{type:Boolean,default:void 0},limit:Number,directory:Boolean}),wG=$e({...pE,beforeUpload:{type:G(Function),default:vt},beforeRemove:{type:G(Function)},onRemove:{type:G(Function),default:vt},onChange:{type:G(Function),default:vt},onPreview:{type:G(Function),default:vt},onSuccess:{type:G(Function),default:vt},onProgress:{type:G(Function),default:vt},onError:{type:G(Function),default:vt},onExceed:{type:G(Function),default:vt},crossorigin:{type:G(String)}}),vE=Symbol("uploadContextKey"),SG=$e({files:{type:G(Array),default:()=>dn([])},disabled:{type:Boolean,default:void 0},handlePreview:{type:G(Function),default:vt},listType:{type:String,values:fE,default:"text"},crossorigin:{type:G(String)}}),CG={remove:e=>!!e},kG=$e({...pE,beforeUpload:{type:G(Function),default:vt},onRemove:{type:G(Function),default:vt},onStart:{type:G(Function),default:vt},onSuccess:{type:G(Function),default:vt},onProgress:{type:G(Function),default:vt},onError:{type:G(Function),default:vt},onExceed:{type:G(Function),default:vt}}),EG=$e({disabled:{type:Boolean,default:void 0},directory:Boolean}),xG={file:e=>me(e)},TG=["tabindex","aria-disabled","onKeydown"],$G=["src","crossorigin"],OG=["onClick"],NG=["title"],MG=["onClick"],IG=["onClick"];var PG=ue({name:"ElUploadList",__name:"upload-list",props:SG,emits:CG,setup(e,{emit:t}){const n=e,a=t,{t:l}=St(),o=he("upload"),s=he("icon"),r=he("list"),u=sn(),c=B(!1),d=w(()=>[o.b("list"),o.bm("list",n.listType),o.is("disabled",u.value)]),f=async g=>{const m=g.relatedTarget;await Ae(),m!=null&&m.classList.contains(o.be("list","item"))||(c.value=!1)},v=g=>{a("remove",g)};return(g,m)=>(O(),oe(nw,{tag:"ul",class:I(d.value),name:i(r).b()},{default:J(()=>[(O(!0),H(ze,null,bt(e.files,(p,h)=>(O(),H("li",{key:p.uid||p.name,class:I([i(o).be("list","item"),i(o).is(p.status),{focusing:c.value}]),tabindex:i(u)?void 0:0,"aria-disabled":i(u),role:"button",onKeydown:an(b=>!i(u)&&v(p),["delete"]),onFocus:m[0]||(m[0]=b=>c.value=!0),onBlur:f,onClick:m[1]||(m[1]=b=>c.value=!1)},[ne(g.$slots,"default",{file:p,index:h},()=>[e.listType==="picture"||p.status!=="uploading"&&e.listType==="picture-card"?(O(),H("img",{key:0,class:I(i(o).be("list","item-thumbnail")),src:p.url,crossorigin:e.crossorigin,alt:""},null,10,$G)):te("v-if",!0),p.status==="uploading"||e.listType!=="picture-card"?(O(),H("div",{key:1,class:I(i(o).be("list","item-info"))},[W("a",{class:I(i(o).be("list","item-name")),onClick:Je(b=>e.handlePreview(p),["prevent"])},[U(i(Ve),{class:I(i(s).m("document"))},{default:J(()=>[U(i(u_))]),_:1},8,["class"]),W("span",{class:I(i(o).be("list","item-file-name")),title:p.name},Se(p.name),11,NG)],10,OG),p.status==="uploading"?(O(),oe(i(pm),{key:0,type:e.listType==="picture-card"?"circle":"line","stroke-width":e.listType==="picture-card"?6:2,percentage:Number(p.percentage),style:je(e.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):te("v-if",!0)],2)):te("v-if",!0),W("label",{class:I(i(o).be("list","item-status-label"))},[e.listType==="text"?(O(),oe(i(Ve),{key:0,class:I([i(s).m("upload-success"),i(s).m("circle-check")])},{default:J(()=>[U(i(Dh))]),_:1},8,["class"])):["picture-card","picture"].includes(e.listType)?(O(),oe(i(Ve),{key:1,class:I([i(s).m("upload-success"),i(s).m("check")])},{default:J(()=>[U(i(br))]),_:1},8,["class"])):te("v-if",!0)],2),i(u)?te("v-if",!0):(O(),oe(i(Ve),{key:2,class:I(i(s).m("close")),"aria-label":i(l)("el.upload.delete"),role:"button",tabindex:"0",onClick:b=>v(p),onKeydown:an(Je(b=>v(p),["prevent"]),["enter","space"])},{default:J(()=>[U(i(Ya))]),_:1},8,["class","aria-label","onClick","onKeydown"])),i(u)?te("v-if",!0):(O(),H("i",{key:3,class:I(i(s).m("close-tip"))},Se(i(l)("el.upload.deleteTip")),3)),e.listType==="picture-card"?(O(),H("span",{key:4,class:I(i(o).be("list","item-actions"))},[W("span",{class:I(i(o).be("list","item-preview")),onClick:b=>e.handlePreview(p)},[U(i(Ve),{class:I(i(s).m("zoom-in"))},{default:J(()=>[U(i(JS))]),_:1},8,["class"])],10,MG),i(u)?te("v-if",!0):(O(),H("span",{key:0,class:I(i(o).be("list","item-delete")),onClick:b=>v(p)},[U(i(Ve),{class:I(i(s).m("delete"))},{default:J(()=>[U(i(r_))]),_:1},8,["class"])],10,IG))],2)):te("v-if",!0)])],42,TG))),128)),ne(g.$slots,"append")]),_:3},8,["class","name"]))}}),S0=PG;const C0="ElUploadDrag";var RG=ue({name:C0,__name:"upload-dragger",props:EG,emits:xG,setup(e,{emit:t}){const n=e,a=t;Fe(vE)||rn(C0,"usage: ");const l=he("upload"),o=B(!1),s=sn(),r=v=>new Promise((g,m)=>v.file(g,m)),u=async v=>{try{if(v.isFile){const g=await r(v);return v.fullPath&&!g.webkitRelativePath&&Object.defineProperty(g,"webkitRelativePath",{value:v.fullPath.replace(/^\//,"")}),g.isDirectory=!1,[g]}if(v.isDirectory){const g=v.createReader(),m=()=>new Promise((C,S)=>g.readEntries(C,S)),p=[];let h=await m();for(;h.length>0;)p.push(...h),h=await m();const b=p.map(C=>u(C).catch(()=>[])),y=await Promise.all(b);return Dc(y)}}catch{return[]}return[]},c=async v=>{if(s.value)return;o.value=!1,v.stopPropagation();const g=Array.from(v.dataTransfer.files),m=v.dataTransfer.items||[];if(n.directory){const p=Array.from(m).map(b=>{var y;return(y=b==null?void 0:b.webkitGetAsEntry)==null?void 0:y.call(b)}).filter(b=>b),h=await Promise.all(p.map(u));a("file",Dc(h));return}g.forEach((p,h)=>{var y,C;const b=(C=(y=m[h])==null?void 0:y.webkitGetAsEntry)==null?void 0:C.call(y);b&&(p.isDirectory=b.isDirectory)}),a("file",g)},d=()=>{s.value||(o.value=!0)},f=v=>{v.currentTarget.contains(v.relatedTarget)||(o.value=!1)};return(v,g)=>(O(),H("div",{class:I([i(l).b("dragger"),i(l).is("dragover",o.value)]),onDrop:Je(c,["prevent"]),onDragover:Je(d,["prevent"]),onDragleave:Je(f,["prevent"])},[ne(v.$slots,"default")],34))}}),_G=RG;const AG=["tabindex","aria-disabled","onKeydown"],LG=["name","disabled","multiple","accept","webkitdirectory"];var DG=ue({name:"ElUploadContent",inheritAttrs:!1,__name:"upload-content",props:kG,setup(e,{expose:t}){const n=e,a=he("upload"),l=sn(),o=Et({}),s=Et(),r=p=>{if(p.length===0)return;const{autoUpload:h,limit:b,fileList:y,multiple:C,onStart:S,onExceed:E}=n;if(b&&y.length+p.length>b){E(p,y);return}C||(p=p.slice(0,1));for(const x of p){const $=x;$.uid=Rv(),S($),h&&u($)}},u=async p=>{if(s.value.value="",!n.beforeUpload)return d(p);let h,b={};try{const C=n.data,S=n.beforeUpload(p);b=gi(n.data)?xl(n.data):n.data,h=await S,gi(n.data)&&cn(C,b)&&(b=xl(n.data))}catch{h=!1}if(h===!1){n.onRemove(p);return}let y=p;h instanceof Blob&&(h instanceof File?y=h:y=new File([h],p.name,{type:p.type})),d(Object.assign(y,{uid:p.uid}),b)},c=async(p,h)=>We(p)?p(h):p,d=async(p,h)=>{const{headers:b,data:y,method:C,withCredentials:S,name:E,action:x,onProgress:$,onSuccess:k,onError:T,httpRequest:M}=n;try{h=await c(h??y,p)}catch{n.onRemove(p);return}const{uid:P}=p,N={headers:b||{},withCredentials:S,file:p,data:h,method:C,filename:E,action:x,onProgress:j=>{$(j,p)},onSuccess:j=>{k(j,p),delete o.value[P]},onError:j=>{T(j,p),delete o.value[P]}},A=M(N);o.value[P]=A,A instanceof Promise&&A.then(N.onSuccess,N.onError)},f=p=>{const h=p.target.files;h&&r(Array.from(h))},v=()=>{l.value||(s.value.value="",s.value.click())},g=()=>{v()};return t({abort:p=>{Xw(o.value).filter(p?([h])=>String(p.uid)===h:()=>!0).forEach(([h,b])=>{b instanceof XMLHttpRequest&&b.abort(),delete o.value[h]})},upload:u}),(p,h)=>(O(),H("div",{class:I([i(a).b(),i(a).m(e.listType),i(a).is("drag",e.drag),i(a).is("disabled",i(l))]),tabindex:i(l)?void 0:0,"aria-disabled":i(l),role:"button",onClick:v,onKeydown:an(Je(g,["self"]),["enter","space"])},[e.drag?(O(),oe(_G,{key:0,disabled:i(l),directory:e.directory,onFile:r},{default:J(()=>[ne(p.$slots,"default")]),_:3},8,["disabled","directory"])):ne(p.$slots,"default",{key:1}),W("input",{ref_key:"inputRef",ref:s,class:I(i(a).e("input")),name:e.name,disabled:i(l),multiple:e.multiple,accept:e.accept,webkitdirectory:e.directory||void 0,type:"file",onChange:f,onClick:h[0]||(h[0]=Je(()=>{},["stop"]))},null,42,LG)],42,AG))}}),k0=DG;const E0="ElUpload",x0=e=>{var t;(t=e.url)!=null&&t.startsWith("blob:")&&URL.revokeObjectURL(e.url)},BG=(e,t)=>{const n=iR(e,"fileList",void 0,{passive:!0}),a=m=>n.value.find(p=>p.uid===m.uid);function l(m){var p;(p=t.value)==null||p.abort(m)}function o(m=["ready","uploading","success","fail"]){n.value=n.value.filter(p=>!m.includes(p.status))}function s(m){n.value=n.value.filter(p=>p.uid!==m.uid)}const r=m=>{Ae(()=>e.onChange(m,n.value))},u=(m,p)=>{const h=a(p);h&&(console.error(m),h.status="fail",s(h),e.onError(m,h,n.value),r(h))},c=(m,p)=>{const h=a(p);h&&(e.onProgress(m,h,n.value),h.status="uploading",h.percentage=Math.round(m.percent))},d=(m,p)=>{const h=a(p);h&&(h.status="success",h.response=m,e.onSuccess(m,h,n.value),r(h))},f=m=>{vn(m.uid)&&(m.uid=Rv());const p={name:m.name,percentage:0,status:"ready",size:m.size,raw:m,uid:m.uid};if(e.listType==="picture-card"||e.listType==="picture")try{p.url=URL.createObjectURL(m)}catch(h){Kt(E0,h.message),e.onError(h,p,n.value)}n.value=[...n.value,p],r(p)},v=async m=>{const p=m instanceof File?a(m):m;p||rn(E0,"file to be removed not found");const h=b=>{l(b),s(b),e.onRemove(b,n.value),x0(b)};e.beforeRemove?await e.beforeRemove(p,n.value)!==!1&&h(p):h(p)};function g(){n.value.filter(({status:m})=>m==="ready").forEach(({raw:m})=>{var p;return m&&((p=t.value)==null?void 0:p.upload(m))})}return fe(()=>e.listType,m=>{m!=="picture-card"&&m!=="picture"||(n.value=n.value.map(p=>{const{raw:h,url:b}=p;if(!b&&h)try{p.url=URL.createObjectURL(h)}catch(y){e.onError(y,p,n.value)}return p}))}),fe(n,m=>{for(const p of m)p.uid||(p.uid=Rv()),p.status||(p.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:l,clearFiles:o,handleError:u,handleProgress:c,handleStart:f,handleSuccess:d,handleRemove:v,submit:g,revokeFileObjectURL:x0}};var VG=ue({name:"ElUpload",__name:"upload",props:wG,setup(e,{expose:t}){const n=e,a=sn(),l=Et(),{abort:o,submit:s,clearFiles:r,uploadFiles:u,handleStart:c,handleError:d,handleRemove:f,handleSuccess:v,handleProgress:g,revokeFileObjectURL:m}=BG(n,l),p=w(()=>n.listType==="picture-card"),h=w(()=>({...n,fileList:u.value,onStart:c,onProgress:g,onSuccess:v,onError:d,onRemove:f}));return zt(()=>{u.value.forEach(m)}),Tt(vE,{accept:Ot(n,"accept")}),t({abort:o,submit:s,clearFiles:r,handleStart:c,handleRemove:f}),(b,y)=>(O(),H("div",null,[p.value&&e.showFileList?(O(),oe(S0,{key:0,disabled:i(a),"list-type":e.listType,files:i(u),crossorigin:e.crossorigin,"handle-preview":e.onPreview,onRemove:i(f)},va({append:J(()=>[U(k0,pt({ref_key:"uploadRef",ref:l},h.value),{default:J(()=>[b.$slots.trigger?ne(b.$slots,"trigger",{key:0}):te("v-if",!0),!b.$slots.trigger&&b.$slots.default?ne(b.$slots,"default",{key:1}):te("v-if",!0)]),_:3},16)]),_:2},[b.$slots.file?{name:"default",fn:J(({file:C,index:S})=>[ne(b.$slots,"file",{file:C,index:S})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):te("v-if",!0),!p.value||p.value&&!e.showFileList?(O(),oe(k0,pt({key:1,ref_key:"uploadRef",ref:l},h.value),{default:J(()=>[b.$slots.trigger?ne(b.$slots,"trigger",{key:0}):te("v-if",!0),!b.$slots.trigger&&b.$slots.default?ne(b.$slots,"default",{key:1}):te("v-if",!0)]),_:3},16)):te("v-if",!0),b.$slots.trigger?ne(b.$slots,"default",{key:2}):te("v-if",!0),ne(b.$slots,"tip"),!p.value&&e.showFileList?(O(),oe(S0,{key:3,disabled:i(a),"list-type":e.listType,files:i(u),crossorigin:e.crossorigin,"handle-preview":e.onPreview,onRemove:i(f)},va({_:2},[b.$slots.file?{name:"default",fn:J(({file:C,index:S})=>[ne(b.$slots,"file",{file:C,index:S})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):te("v-if",!0)]))}}),FG=VG;const zG=ut(FG),HG=$e({zIndex:{type:Number,default:9},rotate:{type:Number,default:-22},width:Number,height:Number,image:String,content:{type:G([String,Array]),default:"Element Plus"},font:{type:G(Object)},gap:{type:G(Array),default:()=>[100,100]},offset:{type:G(Array)}});function KG(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function WG(e){return Object.keys(e).map(t=>`${KG(t)}: ${e[t]};`).join(" ")}function jG(){return window.devicePixelRatio||1}const qG=(e,t)=>{let n=!1;return e.removedNodes.length&&t&&(n=Array.from(e.removedNodes).includes(t)),e.type==="attributes"&&e.target===t&&(n=!0),n},YG={left:[0,.5],start:[0,.5],center:[.5,0],right:[1,-.5],end:[1,-.5]};function cp(e,t,n=1){const a=document.createElement("canvas"),l=a.getContext("2d"),o=e*n,s=t*n;return a.setAttribute("width",`${o}px`),a.setAttribute("height",`${s}px`),l.save(),[l,a,o,s]}function UG(){function e(t,n,a,l,o,s,r,u,c){const[d,f,v,g]=cp(l,o,a);let m=0;if(t instanceof HTMLImageElement)d.drawImage(t,0,0,v,g);else{const{color:q,fontSize:X,fontStyle:Z,fontWeight:Q,fontFamily:ee,textAlign:ie,textBaseline:ve}=s,pe=Number(X)*a;d.font=`${Z} normal ${Q} ${pe}px/${o}px ${ee}`,d.fillStyle=q,d.textAlign=ie,d.textBaseline=ve;const re=me(t)?t:[t];if(ve!=="top"&&re[0]){const R=d.measureText(re[0]);d.textBaseline="top";const Y=d.measureText(re[0]);m=R.actualBoundingBoxAscent-Y.actualBoundingBoxAscent}re==null||re.forEach((R,Y)=>{const[ae,le]=YG[ie];d.fillText(R??"",v*ae+c*le,Y*(pe+s.fontGap*a))})}const p=Math.PI/180*Number(n),h=Math.max(l,o),[b,y,C]=cp(h,h,a);b.translate(C/2,C/2),b.rotate(p),v>0&&g>0&&b.drawImage(f,-v/2,-g/2);function S(q,X){return[q*Math.cos(p)-X*Math.sin(p),q*Math.sin(p)+X*Math.cos(p)]}let E=0,x=0,$=0,k=0;const T=v/2,M=g/2;[[0-T,0-M],[0+T,0-M],[0+T,0+M],[0-T,0+M]].forEach(([q,X])=>{const[Z,Q]=S(q,X);E=Math.min(E,Z),x=Math.max(x,Z),$=Math.min($,Q),k=Math.max(k,Q)});const P=E+C/2,N=$+C/2,A=x-E,j=k-$,z=r*a,V=u*a,D=(A+z)*2,_=j+V,[F,L]=cp(D,_);function K(q=0,X=0){F.drawImage(y,P,N,A,j,q,X+m,A,j)}return K(),K(A+z,-j/2-V/2),K(A+z,+j/2+V/2),[L.toDataURL(),D/a,_/a]}return e}var GG=ue({name:"ElWatermark",__name:"watermark",props:HG,setup(e){const t={position:"relative"},n=e,a=w(()=>{var P;return((P=n.font)==null?void 0:P.fontGap)??3}),l=w(()=>{var P;return((P=n.font)==null?void 0:P.color)??"rgba(0,0,0,.15)"}),o=w(()=>{var P;return((P=n.font)==null?void 0:P.fontSize)??16}),s=w(()=>{var P;return((P=n.font)==null?void 0:P.fontWeight)??"normal"}),r=w(()=>{var P;return((P=n.font)==null?void 0:P.fontStyle)??"normal"}),u=w(()=>{var P;return((P=n.font)==null?void 0:P.fontFamily)??"sans-serif"}),c=w(()=>{var P;return((P=n.font)==null?void 0:P.textAlign)??"center"}),d=w(()=>{var P;return((P=n.font)==null?void 0:P.textBaseline)??"hanging"}),f=w(()=>n.gap[0]),v=w(()=>n.gap[1]),g=w(()=>f.value/2),m=w(()=>v.value/2),p=w(()=>{var P;return((P=n.offset)==null?void 0:P[0])??g.value}),h=w(()=>{var P;return((P=n.offset)==null?void 0:P[1])??m.value}),b=()=>{const P={zIndex:n.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let N=p.value-g.value,A=h.value-m.value;return N>0&&(P.left=`${N}px`,P.width=`calc(100% - ${N}px)`,N=0),A>0&&(P.top=`${A}px`,P.height=`calc(100% - ${A}px)`,A=0),P.backgroundPosition=`${N}px ${A}px`,P},y=Et(null),C=Et(),S=B(!1),E=()=>{C.value&&(C.value.remove(),C.value=void 0)},x=(P,N)=>{var A;y.value&&C.value&&(S.value=!0,C.value.setAttribute("style",WG({...b(),backgroundImage:`url('${P}')`,backgroundSize:`${Math.floor(N)}px`})),(A=y.value)==null||A.append(C.value),setTimeout(()=>{S.value=!1}))},$=P=>{let N=120,A=64,j=0;const{image:z,content:V,width:D,height:_,rotate:F}=n;if(!z&&P.measureText){P.font=`${Number(o.value)}px ${u.value}`;const L=me(V)?V:[V];let K=0,q=0;L.forEach(Z=>{const{width:Q,fontBoundingBoxAscent:ee,fontBoundingBoxDescent:ie,actualBoundingBoxAscent:ve,actualBoundingBoxDescent:pe}=P.measureText(Z),re=xt(ee)?ve+pe:ee+ie;Q>K&&(K=Math.ceil(Q)),re>q&&(q=Math.ceil(re))}),N=K,A=q*L.length+(L.length-1)*a.value;const X=Math.PI/180*Number(F);j=Math.ceil(Math.abs(Math.sin(X)*A)/2),N+=j}return[D??N,_??A,j]},k=UG(),T=()=>{const P=document.createElement("canvas").getContext("2d"),N=n.image,A=n.content,j=n.rotate;if(P){C.value||(C.value=document.createElement("div"));const z=jG(),[V,D,_]=$(P),F=L=>{const[K,q]=k(L||"",j,z,V,D,{color:l.value,fontSize:o.value,fontStyle:r.value,fontWeight:s.value,fontFamily:u.value,fontGap:a.value,textAlign:c.value,textBaseline:d.value},f.value,v.value,_);x(K,q)};if(N){const L=new Image;L.onload=()=>{F(L)},L.onerror=()=>{F(A)},L.crossOrigin="anonymous",L.referrerPolicy="no-referrer",L.src=N}else F(A)}};return mt(()=>{T()}),fe(()=>n,()=>{T()},{deep:!0,flush:"post"}),zt(()=>{E()}),Or(y,P=>{S.value||P.forEach(N=>{qG(N,C.value)&&(E(),T())})},{attributes:!0,subtree:!0,childList:!0}),(P,N)=>(O(),H("div",{ref_key:"containerRef",ref:y,style:je([t])},[ne(P.$slots,"default")],4))}}),XG=GG;const JG=ut(XG),ZG=["absolute","fixed"],QG=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],Pm=$e({placement:{type:G(String),values:QG,default:"bottom"},reference:{type:G(Object),default:null},strategy:{type:G(String),values:ZG,default:"absolute"},offset:{type:Number,default:10},showArrow:Boolean,zIndex:{type:Number,default:2001}}),eX={close:()=>!0},tX=$e({modelValue:Boolean,current:{type:Number},showArrow:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeIcon:{type:Ut},placement:Pm.placement,contentStyle:{type:G([Object])},mask:{type:G([Boolean,Object]),default:!0},gap:{type:G(Object),default:()=>({offset:6,radius:2})},zIndex:{type:Number},scrollIntoViewOptions:{type:G([Boolean,Object]),default:()=>({block:"center"})},type:{type:G(String)},appendTo:{type:G([String,Object]),default:"body"},closeOnPressEscape:{type:Boolean,default:!0},targetAreaClickable:{type:Boolean,default:!0}}),nX={[rt]:e=>Wt(e),"update:current":e=>He(e),close:e=>He(e),finish:()=>!0,change:e=>He(e)},aX=$e({target:{type:G([String,Object,Function])},title:String,description:String,showClose:{type:Boolean,default:void 0},closeIcon:{type:Ut},showArrow:{type:Boolean,default:void 0},placement:Pm.placement,mask:{type:G([Boolean,Object]),default:void 0},contentStyle:{type:G([Object])},prevButtonProps:{type:G(Object)},nextButtonProps:{type:G(Object)},scrollIntoViewOptions:{type:G([Boolean,Object]),default:void 0},type:{type:G(String)}}),lX={close:()=>!0},oX=(e,t,n,a,l)=>{const o=B(null),s=()=>{let d;return De(e.value)?d=document.querySelector(e.value):We(e.value)?d=e.value():d=e.value,d},r=()=>{const d=s();if(!d||!t.value){o.value=null;return}sX(d)||d.scrollIntoView(l.value);const{left:f,top:v,width:g,height:m}=d.getBoundingClientRect();o.value={left:f,top:v,width:g,height:m,radius:0}};mt(()=>{fe([t,e],()=>{r()},{immediate:!0}),window.addEventListener("resize",r)}),zt(()=>{window.removeEventListener("resize",r)});const u=d=>(me(n.value.offset)?n.value.offset[d]:n.value.offset)??6,c=w(()=>{var g;if(!o.value)return o.value;const d=u(0),f=u(1),v=((g=n.value)==null?void 0:g.radius)||2;return{left:o.value.left-d,top:o.value.top-f,width:o.value.width+d*2,height:o.value.height+f*2,radius:v}});return{mergedPosInfo:c,triggerTarget:w(()=>{const d=s();return!a.value||!d||!window.DOMRect?d||void 0:{getBoundingClientRect(){var f,v,g,m;return window.DOMRect.fromRect({width:((f=c.value)==null?void 0:f.width)||0,height:((v=c.value)==null?void 0:v.height)||0,x:((g=c.value)==null?void 0:g.left)||0,y:((m=c.value)==null?void 0:m.top)||0})}}})}},hf=Symbol("ElTour");function sX(e){const t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:a,right:l,bottom:o,left:s}=e.getBoundingClientRect();return a>=0&&s>=0&&l<=t&&o<=n}const rX=(e,t,n,a,l,o,s,r)=>{const u=B(),c=B(),d=B({}),f={x:u,y:c,placement:a,strategy:l,middlewareData:d},v=w(()=>{const b=[C4(i(o)),E4(),k4(),iX()];return i(r)&&i(n)&&b.push(x4({element:i(n)})),b}),g=async()=>{if(!It)return;const b=i(e),y=i(t);if(!b||!y)return;const C=await T4(b,y,{placement:i(a),strategy:i(l),middleware:i(v)});Pi(f).forEach(S=>{f[S].value=C[S]})},m=w(()=>{if(!i(e))return{position:"fixed",top:"50%",left:"50%",transform:"translate3d(-50%, -50%, 0)",maxWidth:"100vw",zIndex:i(s)};const{overflow:b}=i(d);return{position:i(l),zIndex:i(s),top:i(c)!=null?`${i(c)}px`:"",left:i(u)!=null?`${i(u)}px`:"",maxWidth:b!=null&&b.maxWidth?`${b==null?void 0:b.maxWidth}px`:""}}),p=w(()=>{if(!i(r))return{};const{arrow:b}=i(d);return{left:(b==null?void 0:b.x)!=null?`${b==null?void 0:b.x}px`:"",top:(b==null?void 0:b.y)!=null?`${b==null?void 0:b.y}px`:""}});let h;return mt(()=>{const b=i(e),y=i(t);b&&y&&(h=w4(b,y,g)),ia(()=>{g()})}),zt(()=>{h&&h()}),{update:g,contentStyle:m,arrowStyle:p}},iX=()=>({name:"overflow",async fn(e){const t=await S4(e);let n=0;return t.left>0&&(n=t.left),t.right>0&&(n=t.right),{data:{maxWidth:e.rects.floating.width-n}}}}),uX=$e({zIndex:{type:Number,default:1001},visible:Boolean,fill:{type:String,default:"rgba(0,0,0,0.5)"},pos:{type:G(Object)},targetAreaClickable:{type:Boolean,default:!0}}),cX={style:{width:"100%",height:"100%"}},dX=["d"];var fX=ue({name:"ElTourMask",inheritAttrs:!1,__name:"mask",props:uX,setup(e){const t=e,{ns:n}=Fe(hf),a=w(()=>{var d;return((d=t.pos)==null?void 0:d.radius)??2}),l=w(()=>{const d=a.value,f=`a${d},${d} 0 0 1`;return{topRight:`${f} ${d},${d}`,bottomRight:`${f} ${-d},${d}`,bottomLeft:`${f} ${-d},${-d}`,topLeft:`${f} ${d},${-d}`}}),{width:o,height:s}=mh(),r=w(()=>{const d=o.value,f=s.value,v=l.value,g=`M${d},0 L0,0 L0,${f} L${d},${f} L${d},0 Z`,m=a.value;return t.pos?`${g} M${t.pos.left+m},${t.pos.top} h${t.pos.width-m*2} ${v.topRight} v${t.pos.height-m*2} ${v.bottomRight} h${-t.pos.width+m*2} ${v.bottomLeft} v${-t.pos.height+m*2} ${v.topLeft} z`:g}),u=w(()=>({position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:t.zIndex,pointerEvents:t.pos&&t.targetAreaClickable?"none":"auto"})),c=w(()=>({fill:t.fill,pointerEvents:"auto",cursor:"auto"}));return jd(Ot(t,"visible"),{ns:n}),(d,f)=>e.visible?(O(),H("div",pt({key:0,class:i(n).e("mask"),style:u.value},d.$attrs),[(O(),H("svg",cX,[W("path",{class:I(i(n).e("hollow")),style:je(c.value),d:r.value},null,14,dX)]))],16)):te("v-if",!0)}}),pX=fX;const vX=["data-side"];var hX=ue({name:"ElTourContent",__name:"content",props:Pm,emits:eX,setup(e,{emit:t}){const n=e,a=t,l=B(n.placement),o=B(n.strategy),s=B(null),r=B(null);fe(()=>n.placement,()=>{l.value=n.placement});const{contentStyle:u,arrowStyle:c}=rX(Ot(n,"reference"),s,r,l,o,Ot(n,"offset"),Ot(n,"zIndex"),Ot(n,"showArrow")),d=w(()=>l.value.split("-")[0]),{ns:f}=Fe(hf),v=()=>{a("close")},g=m=>{m.detail.focusReason==="pointer"&&m.preventDefault()};return(m,p)=>(O(),H("div",{ref_key:"contentRef",ref:s,style:je(i(u)),class:I(i(f).e("content")),"data-side":d.value,tabindex:"-1"},[U(i(Mr),{loop:"",trapped:"","focus-start-el":"container","focus-trap-el":s.value||void 0,onReleaseRequested:v,onFocusoutPrevented:g},{default:J(()=>[ne(m.$slots,"default")]),_:3},8,["focus-trap-el"]),e.showArrow?(O(),H("span",{key:0,ref_key:"arrowRef",ref:r,style:je(i(c)),class:I(i(f).e("arrow"))},null,6)):te("v-if",!0)],14,vX))}}),mX=hX,gX=ue({name:"ElTourSteps",props:{current:{type:Number,default:0}},emits:["update-total"],setup(e,{slots:t,emit:n}){let a=0;return()=>{var u,c;const l=(u=t.default)==null?void 0:u.call(t),o=[];let s=0;function r(d){me(d)&&d.forEach(f=>{var v;((v=(f==null?void 0:f.type)||{})==null?void 0:v.name)==="ElTourStep"&&(o.push(f),s+=1)})}return l.length&&r($a((c=l[0])==null?void 0:c.children)),a!==s&&(a=s,n("update-total",s)),o.length?o[e.current]:null}}}),bX=ue({name:"ElTour",inheritAttrs:!1,__name:"tour",props:tX,emits:nX,setup(e,{emit:t}){const n=e,a=t,l=he("tour"),o=B(0),s=B(),r=w(()=>!xt(n.current)),u=B(n.current??0),c=w({get(){return xt(n.current)?u.value:n.current},set(N){(r.value?n.current:u.value)!==N&&(r.value||(u.value=N),a("update:current",N))}}),d=w(()=>{var N;return(N=s.value)==null?void 0:N.target}),f=w(()=>[l.b(),C.value==="primary"?l.m("primary"):""]),v=w(()=>{var N;return((N=s.value)==null?void 0:N.placement)||n.placement}),g=w(()=>{var N;return((N=s.value)==null?void 0:N.contentStyle)??n.contentStyle}),m=w(()=>{var N;return((N=s.value)==null?void 0:N.mask)??n.mask}),p=w(()=>!!m.value&&n.modelValue),h=w(()=>Wt(m.value)?void 0:m.value),b=w(()=>{var N;return!!d.value&&(((N=s.value)==null?void 0:N.showArrow)??n.showArrow)}),y=w(()=>{var N;return((N=s.value)==null?void 0:N.scrollIntoViewOptions)??n.scrollIntoViewOptions}),C=w(()=>{var N;return((N=s.value)==null?void 0:N.type)??n.type}),{nextZIndex:S}=du(),E=S(),x=w(()=>n.zIndex??E),{mergedPosInfo:$,triggerTarget:k}=oX(d,Ot(n,"modelValue"),Ot(n,"gap"),m,y);fe(()=>n.current,N=>!xt(N)&&(u.value=N)),fe(c,(N,A)=>{!n.modelValue||N===A||a(yt,N)},{flush:"post"}),fe(()=>n.modelValue,N=>{!N&&c.value!==0&&(c.value=0)});const T=()=>{n.closeOnPressEscape&&(a(rt,!1),a("close",c.value))},M=N=>{o.value=N},P=mn();return Tt(hf,{currentStep:s,current:c,total:o,showClose:Ot(n,"showClose"),closeIcon:Ot(n,"closeIcon"),mergedType:C,ns:l,slots:P,updateModelValue(N){a(rt,N)},onClose(){a("close",c.value)},onFinish(){a("finish")}}),(N,A)=>{var j,z;return O(),H(ze,null,[(O(),oe(kr,{to:e.appendTo},[W("div",pt({class:f.value},N.$attrs),[U(pX,{visible:p.value,fill:(j=h.value)==null?void 0:j.color,style:je((z=h.value)==null?void 0:z.style),pos:i($),"z-index":x.value,"target-area-clickable":e.targetAreaClickable},null,8,["visible","fill","style","pos","z-index","target-area-clickable"]),e.modelValue?(O(),oe(mX,{key:c.value,reference:i(k),placement:v.value,"show-arrow":b.value,"z-index":x.value,style:je(g.value),onClose:T},{default:J(()=>[U(i(gX),{current:c.value,onUpdateTotal:M},{default:J(()=>[ne(N.$slots,"default")]),_:3},8,["current"])]),_:3},8,["reference","placement","show-arrow","z-index","style"])):te("v-if",!0)],16)],8,["to"])),te(" just for IDE "),te("v-if",!0)],64)}}}),yX=bX;const wX=["aria-label"];var SX=ue({name:"ElTourStep",__name:"step",props:aX,emits:lX,setup(e,{emit:t}){const n=e,a=t,{Close:l}=ZS,{t:o}=St(),{currentStep:s,current:r,total:u,showClose:c,closeIcon:d,mergedType:f,ns:v,slots:g,updateModelValue:m,onClose:p,onFinish:h}=Fe(hf);fe(n,T=>{s.value=T},{immediate:!0});const b=w(()=>n.showClose??c.value),y=w(()=>n.closeIcon??d.value??l),C=T=>{if(T)return As(T,["children","onClick"])},S=()=>{var T,M;r.value-=1,(T=n.prevButtonProps)!=null&&T.onClick&&((M=n.prevButtonProps)==null||M.onClick())},E=()=>{var T;r.value>=u.value-1?x():r.value+=1,(T=n.nextButtonProps)!=null&&T.onClick&&n.nextButtonProps.onClick()},x=()=>{$(),h()},$=()=>{m(!1),p(),a("close")},k=T=>{var M;if(!((M=T.target)!=null&&M.isContentEditable))switch(Gt(T)){case ye.left:T.preventDefault(),r.value>0&&S();break;case ye.right:T.preventDefault(),E()}};return mt(()=>{window.addEventListener("keydown",k)}),zt(()=>{window.removeEventListener("keydown",k)}),(T,M)=>(O(),H(ze,null,[b.value?(O(),H("button",{key:0,"aria-label":i(o)("el.tour.close"),class:I(i(v).e("closebtn")),type:"button",onClick:$},[U(i(Ve),{class:I(i(v).e("close"))},{default:J(()=>[(O(),oe(dt(y.value)))]),_:1},8,["class"])],10,wX)):te("v-if",!0),W("header",{class:I([i(v).e("header"),{"show-close":i(c)}])},[ne(T.$slots,"header",{},()=>[W("span",{role:"heading",class:I(i(v).e("title"))},Se(e.title),3)])],2),W("div",{class:I(i(v).e("body"))},[ne(T.$slots,"default",{},()=>[W("span",null,Se(e.description),1)])],2),W("footer",{class:I(i(v).e("footer"))},[W("div",{class:I(i(v).b("indicators"))},[i(g).indicators?(O(),oe(dt(i(g).indicators),{key:0,current:i(r),total:i(u)},null,8,["current","total"])):(O(!0),H(ze,{key:1},bt(i(u),(P,N)=>(O(),H("span",{key:P,class:I([i(v).b("indicator"),i(v).is("active",N===i(r))])},null,2))),128))],2),W("div",{class:I(i(v).b("buttons"))},[i(r)>0?(O(),oe(i(Bn),pt({key:0,size:"small",type:i(f)},C(e.prevButtonProps),{onClick:S}),{default:J(()=>{var P;return[it(Se(((P=e.prevButtonProps)==null?void 0:P.children)??i(o)("el.tour.previous")),1)]}),_:1},16,["type"])):te("v-if",!0),i(r)<=i(u)-1?(O(),oe(i(Bn),pt({key:1,size:"small",type:i(f)==="primary"?"default":"primary"},C(e.nextButtonProps),{onClick:E}),{default:J(()=>{var P;return[it(Se(((P=e.nextButtonProps)==null?void 0:P.children)??(i(r)===i(u)-1?i(o)("el.tour.finish"):i(o)("el.tour.next"))),1)]}),_:1},16,["type"])):te("v-if",!0)],2)],2)],64))}}),hE=SX;const CX=ut(yX,{TourStep:hE}),kX=un(hE),EX=$e({container:{type:G([String,Object])},offset:{type:Number,default:0},bound:{type:Number,default:15},duration:{type:Number,default:300},marker:{type:Boolean,default:!0},type:{type:G(String),default:"default"},direction:{type:G(String),default:"vertical"},selectScrollTop:Boolean}),xX={change:e=>De(e),click:(e,t)=>e instanceof MouseEvent&&(De(t)||xt(t))},Yu=(e=>{if(!It||e==="")return null;if(De(e))try{return document.querySelector(e)}catch{return null}return e});function TX(e){let t=0;const n=(...a)=>{t&&Ra(t),t=Kn(()=>{e(...a),t=0})};return n.cancel=()=>{Ra(t),t=0},n}const mE=Symbol("anchor");var $X=ue({name:"ElAnchor",__name:"anchor",props:EX,emits:xX,setup(e,{expose:t,emit:n}){const a=e,l=n,o=mn(),s=B(""),r=B({}),u=B(null),c=B(null),d=B(),f={};let v=!1,g=0;const m=he("anchor"),p=w(()=>[m.b(),a.type==="underline"?m.m("underline"):"",m.m(a.direction)]),h=N=>{f[N.href]=N.el},b=N=>{delete f[N]},y=N=>{s.value!==N&&(s.value=N,l(yt,N))};let C=null,S="";const E=N=>{if(!d.value)return;const A=Yu(N);if(!A)return;if(C){if(S===N)return;C()}S=N,v=!0;const j=nb(A,d.value),z=gv(A,j),V=j.scrollHeight-j.clientHeight,D=Math.min(z-a.offset,V);C=wR(d.value,g,D,a.duration,()=>{setTimeout(()=>{v=!1,S=""},20)})},x=N=>{N&&(y(N),E(N))},$=(N,A)=>{l("click",N,A),x(A)},k=TX(()=>{d.value&&(g=ab(d.value));const N=T();v||xt(N)||y(N)}),T=()=>{if(!d.value)return;const N=ab(d.value),A=[];for(const j of Object.keys(f)){const z=Yu(j);if(!z)continue;const V=nb(z,d.value),D=gv(z,V);A.push({top:D-a.offset-a.bound,href:j})}A.sort((j,z)=>j.top-z.top);for(let j=0;jN))return z.href}},M=()=>{const N=Yu(a.container);!N||su(N)?d.value=window:d.value=N};Ht(d,"scroll",k);const P=()=>{Ae(()=>{if(!u.value||!c.value||!s.value){r.value={};return}const N=f[s.value];if(!N){r.value={};return}const A=u.value.getBoundingClientRect(),j=c.value.getBoundingClientRect(),z=N.getBoundingClientRect();if(a.direction==="horizontal"){const V=z.left-A.left;r.value={left:`${V}px`,width:`${z.width}px`,opacity:1}}else{const V=z.top-A.top+(z.height-j.height)/2;r.value={top:`${V}px`,opacity:1}}})};return fe(s,P),fe(()=>{var N;return(N=o.default)==null?void 0:N.call(o)},P),mt(()=>{M();const N=decodeURIComponent(window.location.hash);Yu(N)?x(N):k()}),fe(()=>a.container,()=>{M()}),Tt(mE,{ns:m,direction:a.direction,currentAnchor:s,addLink:h,removeLink:b,handleClick:$}),t({scrollTo:x}),(N,A)=>(O(),H("div",{ref_key:"anchorRef",ref:u,class:I(p.value)},[e.marker?(O(),H("div",{key:0,ref_key:"markerRef",ref:c,class:I(i(m).e("marker")),style:je(r.value)},null,6)):te("v-if",!0),W("div",{class:I(i(m).e("list"))},[ne(N.$slots,"default")],2)],2))}}),OX=$X;const NX=$e({title:String,href:String}),MX=["href"];var IX=ue({name:"ElAnchorLink",__name:"anchor-link",props:NX,setup(e){const t=e,n=B(null),{ns:a,direction:l,currentAnchor:o,addLink:s,removeLink:r,handleClick:u}=Fe(mE),c=w(()=>[a.e("link"),a.is("active",o.value===t.href)]),d=f=>{u(f,t.href)};return fe(()=>t.href,(f,v)=>{Ae(()=>{v&&r(v),f&&s({href:f,el:n.value})})}),mt(()=>{const{href:f}=t;f&&s({href:f,el:n.value})}),zt(()=>{const{href:f}=t;f&&r(f)}),(f,v)=>(O(),H("div",{class:I(i(a).e("item"))},[W("a",{ref_key:"linkRef",ref:n,class:I(c.value),href:e.href,onClick:d},[ne(f.$slots,"default",{},()=>[it(Se(e.title),1)])],10,MX),f.$slots["sub-link"]&&i(l)==="vertical"?(O(),H("div",{key:0,class:I(i(a).e("list"))},[ne(f.$slots,"sub-link")],2)):te("v-if",!0)],2))}}),gE=IX;const PX=ut(OX,{AnchorLink:gE}),RX=un(gE),bE={label:"label",value:"value",disabled:"disabled"},_X=$e({direction:{type:G(String),default:"horizontal"},options:{type:G(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},props:{type:G(Object),default:()=>bE},block:Boolean,size:Pn,disabled:{type:Boolean,default:void 0},validateEvent:{type:Boolean,default:!0},id:String,name:String,...ua(["ariaLabel"])}),AX={[rt]:e=>De(e)||He(e)||Wt(e),[yt]:e=>De(e)||He(e)||Wt(e)},LX=["id","aria-label","aria-labelledby"],DX=["name","disabled","checked","onChange"];var BX=ue({name:"ElSegmented",__name:"segmented",props:_X,emits:AX,setup(e,{emit:t}){const n=e,a=t,l=he("segmented"),o=Gn(),s=$n(),r=sn(),{formItem:u}=Hn(),{inputId:c,isLabeledByFormItem:d}=Ea(n,{formItemContext:u}),f=B(null),v=eR(),g=Ft({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),m=(P,N)=>{const A=h(N);a(rt,A),a(yt,A),P.target.checked=A===n.modelValue},p=w(()=>({...bE,...n.props})),h=P=>st(P)?P[p.value.value]:P,b=P=>st(P)?P[p.value.label]:P,y=P=>!!(r.value||st(P)&&P[p.value.disabled]),C=P=>n.modelValue===h(P),S=P=>n.options.find(N=>h(N)===P),E=P=>[l.e("item"),l.is("selected",C(P)),l.is("disabled",y(P))],x=()=>{if(!f.value)return;const P=f.value.querySelector(".is-selected"),N=f.value.querySelector(".is-selected input");if(!P||!N){g.width=0,g.height=0,g.translateX=0,g.translateY=0,g.focusVisible=!1;return}g.isInit=!0,n.direction==="vertical"?(g.height=P.offsetHeight,g.translateY=P.offsetTop):(g.width=P.offsetWidth,g.translateX=P.offsetLeft);try{g.focusVisible=N.matches(":focus-visible")}catch{}},$=w(()=>[l.b(),l.m(s.value),l.is("block",n.block)]),k=w(()=>({width:n.direction==="vertical"?"100%":`${g.width}px`,height:n.direction==="vertical"?`${g.height}px`:"100%",transform:n.direction==="vertical"?`translateY(${g.translateY}px)`:`translateX(${g.translateX}px)`,display:g.isInit?"block":"none"})),T=w(()=>[l.e("item-selected"),l.is("disabled",y(S(n.modelValue))),l.is("focus-visible",g.focusVisible)]),M=w(()=>n.name||o.value);return on(f,x),fe(v,x),fe(()=>n.options,x,{deep:!0,flush:"post"}),fe(()=>n.modelValue,()=>{var P;x(),n.validateEvent&&((P=u==null?void 0:u.validate)==null||P.call(u,"change").catch(vt))},{flush:"post"}),(P,N)=>e.options.length?(O(),H("div",{key:0,id:i(c),ref_key:"segmentedRef",ref:f,class:I($.value),role:"radiogroup","aria-label":i(d)?void 0:e.ariaLabel||"segmented","aria-labelledby":i(d)?i(u).labelId:void 0},[W("div",{class:I([i(l).e("group"),i(l).m(e.direction)])},[W("div",{style:je(k.value),class:I(T.value)},null,6),(O(!0),H(ze,null,bt(e.options,(A,j)=>(O(),H("label",{key:j,class:I(E(A))},[W("input",{class:I(i(l).e("item-input")),type:"radio",name:M.value,disabled:y(A),checked:C(A),onChange:z=>m(z,A)},null,42,DX),W("div",{class:I(i(l).e("item-label"))},[ne(P.$slots,"default",{item:A},()=>[it(Se(b(A)),1)])],2)],2))),128))],2)],10,LX)):te("v-if",!0)}}),VX=BX;const FX=ut(VX),zX=(e,t)=>{const n=e.toLowerCase();return(t.label||t.value||"").toLowerCase().includes(n)},HX=(e,t,n)=>{const{selectionEnd:a}=e;if(a===null)return;const l=e.value,o=Ln(t);let s=-1,r;for(let u=a-1;u>=0;--u){const c=l[u];if(s===-1&&(c===n||c===`
+`||c==="\r")){s=u;continue}if(o.includes(c)){const d=s===-1?a:s;r={pattern:l.slice(u+1,d),start:u+1,end:d,prefix:c,prefixIndex:u,splitIndex:s,selectionEnd:a};break}}return r},KX=(e,t={debug:!1,useSelectionEnd:!1})=>{const n=e.selectionStart!==null?e.selectionStart:0,a=e.selectionEnd!==null?e.selectionEnd:0,l=t.useSelectionEnd?a:n,o=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];if(t.debug){const v=document.querySelector("#input-textarea-caret-position-mirror-div");v!=null&&v.parentNode&&v.parentNode.removeChild(v)}const s=document.createElement("div");s.id="input-textarea-caret-position-mirror-div",document.body.appendChild(s);const r=s.style,u=window.getComputedStyle(e),c=e.nodeName==="INPUT";r.whiteSpace=c?"nowrap":"pre-wrap",c||(r.wordWrap="break-word"),r.position="absolute",t.debug||(r.visibility="hidden"),o.forEach(v=>{if(c&&v==="lineHeight")if(u.boxSizing==="border-box"){const g=Number.parseInt(u.height),m=Number.parseInt(u.paddingTop)+Number.parseInt(u.paddingBottom)+Number.parseInt(u.borderTopWidth)+Number.parseInt(u.borderBottomWidth),p=m+Number.parseInt(u.lineHeight);g>p?r.lineHeight=`${g-m}px`:g===p?r.lineHeight=u.lineHeight:r.lineHeight="0"}else r.lineHeight=u.height;else r[v]=u[v]}),Fd()?e.scrollHeight>Number.parseInt(u.height)&&(r.overflowY="scroll"):r.overflow="hidden",s.textContent=e.value.slice(0,Math.max(0,l)),c&&s.textContent&&(s.textContent=s.textContent.replace(/\s/g," "));const d=document.createElement("span");d.textContent=e.value.slice(Math.max(0,l))||".",d.style.position="relative",d.style.left=`${-e.scrollLeft}px`,d.style.top=`${-e.scrollTop}px`,s.appendChild(d);const f={top:d.offsetTop+Number.parseInt(u.borderTopWidth),left:d.offsetLeft+Number.parseInt(u.borderLeftWidth),height:Number.parseInt(u.fontSize)*1.5};return t.debug?d.style.backgroundColor="#aaa":document.body.removeChild(s),f.left>=e.clientWidth&&(f.left=e.clientWidth),f},WX=$e({...Wh,options:{type:G(Array),default:()=>[]},prefix:{type:G([String,Array]),default:"@",validator:e=>De(e)?e.length===1:e.every(t=>De(t)&&t.length===1)},split:{type:String,default:" ",validator:e=>e.length===1},filterOption:{type:G([Boolean,Function]),default:()=>zX,validator:e=>e===!1?!0:We(e)},placement:{type:G(String),default:"bottom"},showArrow:Boolean,offset:{type:Number,default:0},whole:Boolean,checkIsWhole:{type:G(Function)},modelValue:String,loading:Boolean,popperClass:tn.popperClass,popperStyle:tn.popperStyle,popperOptions:{type:G(Object),default:()=>({})},props:{type:G(Object),default:()=>yE}}),jX={[rt]:e=>De(e),"whole-remove":(e,t)=>De(e)&&De(t),input:e=>De(e),search:(e,t)=>De(e)&&De(t),select:(e,t)=>st(e)&&De(t),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},yE={value:"value",label:"label",disabled:"disabled"},qX=$e({options:{type:G(Array),default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),YX={select:e=>De(e.value)},UX=["id","aria-disabled","aria-selected","onMousemove","onClick"];var GX=ue({name:"ElMentionDropdown",__name:"mention-dropdown",props:qX,emits:YX,setup(e,{expose:t,emit:n}){const a=e,l=n,o=he("mention"),{t:s}=St(),r=B(-1),u=B(),c=B(),d=B(),f=(S,E)=>[o.be("dropdown","item"),o.is("hovering",r.value===E),o.is("disabled",S.disabled||a.disabled)],v=S=>{S.disabled||a.disabled||l("select",S)},g=S=>{r.value=S},m=w(()=>a.disabled||a.options.every(S=>S.disabled)),p=w(()=>a.options[r.value]),h=()=>{!p.value||p.value.disabled||a.disabled||l("select",p.value)},b=S=>{const{options:E}=a;if(E.length===0||m.value)return;S==="next"?(r.value++,r.value===E.length&&(r.value=0)):S==="prev"&&(r.value--,r.value<0&&(r.value=E.length-1));const x=E[r.value];if(x.disabled){b(S);return}Ae(()=>y(x))},y=S=>{var k,T,M,P;const{options:E}=a,x=E.findIndex(N=>N.value===S.value),$=(k=c.value)==null?void 0:k[x];if($){const N=(M=(T=d.value)==null?void 0:T.querySelector)==null?void 0:M.call(T,`.${o.be("dropdown","wrap")}`);N&&Sh(N,$)}(P=u.value)==null||P.handleScroll()};return fe(()=>a.options,()=>{m.value||a.options.length===0?r.value=-1:r.value=a.options.findIndex(S=>!S.disabled)},{immediate:!0}),t({hoveringIndex:r,navigateOptions:b,selectHoverOption:h,hoverOption:p}),(S,E)=>(O(),H("div",{ref_key:"dropdownRef",ref:d,class:I(i(o).b("dropdown"))},[S.$slots.header?(O(),H("div",{key:0,class:I(i(o).be("dropdown","header"))},[ne(S.$slots,"header")],2)):te("v-if",!0),ft(U(i(il),{id:e.contentId,ref_key:"scrollbarRef",ref:u,tag:"ul","wrap-class":i(o).be("dropdown","wrap"),"view-class":i(o).be("dropdown","list"),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:J(()=>[(O(!0),H(ze,null,bt(e.options,(x,$)=>(O(),H("li",{id:`${e.contentId}-${$}`,ref_for:!0,ref_key:"optionRefs",ref:c,key:$,class:I(f(x,$)),role:"option","aria-disabled":x.disabled||e.disabled||void 0,"aria-selected":r.value===$,onMousemove:k=>g($),onClick:Je(k=>v(x),["stop"])},[ne(S.$slots,"label",{item:x,index:$},()=>[W("span",null,Se(x.label??x.value),1)])],42,UX))),128))]),_:3},8,["id","wrap-class","view-class","aria-label"]),[[At,e.options.length>0&&!e.loading]]),e.loading?(O(),H("div",{key:1,class:I(i(o).be("dropdown","loading"))},[ne(S.$slots,"loading",{},()=>[it(Se(i(s)("el.mention.loading")),1)])],2)):te("v-if",!0),S.$slots.footer?(O(),H("div",{key:2,class:I(i(o).be("dropdown","footer"))},[ne(S.$slots,"footer")],2)):te("v-if",!0)],2))}}),XX=GX,JX=ue({name:"ElMention",inheritAttrs:!1,__name:"mention",props:WX,emits:jX,setup(e,{expose:t,emit:n}){const a=e,l=n,o=w(()=>{const D=Yn.props??[],_=me(D)?D:Object.keys(D);return Ll(a,_)}),s=he("mention"),r=sn(),u=Gn(),c=B(),d=B(),f=B(),v=B(!1),g=B(),m=B(),p=w(()=>a.showArrow?a.placement:`${a.placement}-start`),h=w(()=>a.showArrow?["bottom","top"]:["bottom-start","top-start"]),b=w(()=>({...yE,...a.props})),y=D=>{const _={label:D[b.value.label],value:D[b.value.value],disabled:D[b.value.disabled]};return{...D,..._}},C=w(()=>a.options.map(y)),S=w(()=>{const{filterOption:D}=a;return!m.value||!D?C.value:C.value.filter(_=>D(m.value.pattern,_))}),E=w(()=>v.value&&(!!S.value.length||a.loading)),x=w(()=>{var D;return`${u.value}-${(D=f.value)==null?void 0:D.hoveringIndex}`}),$=D=>{l(rt,D),l(Tn,D),j()},k=D=>{var F,L,K,q;if((F=c.value)!=null&&F.isComposing)return;const _=Gt(D);switch(_){case ye.left:case ye.right:j();break;case ye.up:case ye.down:if(!v.value)return;D.preventDefault(),(L=f.value)==null||L.navigateOptions(_===ye.up?"prev":"next");break;case ye.enter:case ye.numpadEnter:if(!v.value){a.type!=="textarea"&&j();return}D.preventDefault(),(K=f.value)!=null&&K.hoverOption?(q=f.value)==null||q.selectHoverOption():v.value=!1;break;case ye.esc:if(!v.value)return;D.preventDefault(),v.value=!1;break;case ye.backspace:if(a.whole&&m.value){const{splitIndex:X,selectionEnd:Z,pattern:Q,prefixIndex:ee,prefix:ie}=m.value,ve=A();if(!ve)return;const pe=ve.value,re=C.value.find(R=>R.value===Q);if((We(a.checkIsWhole)?a.checkIsWhole(Q,ie):re)&&X!==-1&&X+1===Z){D.preventDefault();const R=pe.slice(0,ee)+pe.slice(X+1);l(rt,R),l(Tn,R),l("whole-remove",Q,ie);const Y=ee;Ae(()=>{ve.selectionStart=Y,ve.selectionEnd=Y,V()})}}}},{wrapperRef:T}=mo(c,{disabled:r,afterFocus(){j()},beforeBlur(D){var _;return(_=d.value)==null?void 0:_.isFocusInsideContent(D)},afterBlur(){v.value=!1}}),M=()=>{j()},P=D=>a.options.find(_=>D.value===_[b.value.value]),N=D=>{if(!m.value)return;const _=A();if(!_)return;const F=_.value,{split:L}=a,K=F.slice(m.value.end),q=K.startsWith(L),X=`${D.value}${q?"":L}`,Z=F.slice(0,m.value.start)+X+K;l(rt,Z),l(Tn,Z),l("select",P(D),m.value.prefix);const Q=m.value.start+X.length+(q?1:0);Ae(()=>{_.selectionStart=Q,_.selectionEnd=Q,_.focus(),V()})},A=()=>{var D,_;return a.type==="textarea"?(D=c.value)==null?void 0:D.textarea:(_=c.value)==null?void 0:_.input},j=()=>{setTimeout(()=>{z(),V(),Ae(()=>{var D;return(D=d.value)==null?void 0:D.updatePopper()})},0)},z=()=>{const D=A();if(!D)return;const _=KX(D),F=D.getBoundingClientRect(),L=T.value.getBoundingClientRect();g.value={position:"absolute",width:0,height:`${_.height}px`,left:`${_.left+F.left-L.left}px`,top:`${_.top+F.top-L.top}px`}},V=()=>{const D=A();if(document.activeElement!==D){v.value=!1;return}const{prefix:_,split:F}=a;if(m.value=HX(D,_,F),m.value&&m.value.splitIndex===-1){v.value=!0,l("search",m.value.pattern,m.value.prefix);return}v.value=!1};return t({input:c,tooltip:d,dropdownVisible:E}),(D,_)=>(O(),H("div",{ref_key:"wrapperRef",ref:T,class:I(i(s).b())},[U(i(Yn),pt(pt(o.value,D.$attrs),{ref_key:"elInputRef",ref:c,"model-value":e.modelValue,disabled:i(r),role:E.value?"combobox":void 0,"aria-activedescendant":E.value?x.value||"":void 0,"aria-controls":E.value?i(u):void 0,"aria-expanded":E.value||void 0,"aria-label":e.ariaLabel,"aria-autocomplete":E.value?"none":void 0,"aria-haspopup":E.value?"listbox":void 0,onInput:$,onKeydown:k,onMousedown:M}),va({_:2},[bt(D.$slots,(F,L)=>({name:L,fn:J(K=>[ne(D.$slots,L,Cl(kl(K)))])}))]),1040,["model-value","disabled","role","aria-activedescendant","aria-controls","aria-expanded","aria-label","aria-autocomplete","aria-haspopup"]),U(i(zn),{ref_key:"tooltipRef",ref:d,visible:E.value,"popper-class":[i(s).e("popper"),e.popperClass],"popper-style":e.popperStyle,"popper-options":e.popperOptions,placement:p.value,"fallback-placements":h.value,effect:"light",pure:"",offset:e.offset,"show-arrow":e.showArrow},{default:J(()=>[W("div",{style:je(g.value)},null,4)]),content:J(()=>[U(XX,{ref_key:"dropdownRef",ref:f,options:S.value,disabled:i(r),loading:e.loading,"content-id":i(u),"aria-label":e.ariaLabel,onSelect:N,onClick:_[0]||(_[0]=Je(F=>{var L;return(L=c.value)==null?void 0:L.focus()},["stop"]))},va({_:2},[bt(D.$slots,(F,L)=>({name:L,fn:J(K=>[ne(D.$slots,L,Cl(kl(K)))])}))]),1032,["options","disabled","loading","content-id","aria-label"])]),_:3},8,["visible","popper-class","popper-style","popper-options","placement","fallback-placements","offset","show-arrow"])],2))}}),ZX=JX;const QX=ut(ZX),eJ=$e({layout:{type:String,default:"horizontal",values:["horizontal","vertical"]},lazy:Boolean}),tJ={resizeStart:(e,t)=>!0,resize:(e,t)=>!0,resizeEnd:(e,t)=>!0,collapse:(e,t,n)=>!0},nJ=$e({min:{type:[String,Number]},max:{type:[String,Number]},size:{type:[String,Number]},resizable:{type:Boolean,default:!0},collapsible:Boolean}),aJ={"update:size":e=>typeof e=="number"||typeof e=="string"};function lJ(e){const t=B(),{width:n,height:a}=Ri(t);return{containerEl:t,containerSize:w(()=>e.value==="horizontal"?n.value:a.value)}}function oJ(e,t,n,a){const l=h=>h*t.value||0;function o(h,b){return Kd(h)?l(zd(h)):Wd(h)?Hd(h):h??b}const s=B(0),r=B(null);let u=[],c=vt;const d=w(()=>e.value.map(h=>[h.min,h.max]));fe(a,()=>{if(s.value){const h=new MouseEvent("mouseup",{bubbles:!0});window.dispatchEvent(h)}});const f=h=>{s.value=0,r.value={index:h,confirmed:!1},u=n.value},v=(h,b)=>{var P;let y=null;if((!r.value||!r.value.confirmed)&&b!==0){if(b>0)y=h,r.value={index:h,confirmed:!0};else for(let N=h;N>=0;N-=1)if(u[N]>0){y=N,r.value={index:N,confirmed:!0};break}}const C=y??((P=r.value)==null?void 0:P.index)??h,S=[...u],E=C+1,x=o(d.value[C][0],0),$=o(d.value[E][0],0),k=o(d.value[C][1],t.value||0),T=o(d.value[E][1],t.value||0);let M=b;S[C]+Mk&&(M=k-S[C]),S[E]-M>T&&(M=S[E]-T),S[C]+=M,S[E]-=M,s.value=M,c=()=>{e.value.forEach((N,A)=>{N.size=S[A]}),c=vt},a.value||c()},g=()=>{a.value&&c(),s.value=0,r.value=null,u=[]},m=[];return{lazyOffset:s,onMoveStart:f,onMoving:v,onMoveEnd:g,movingIndex:r,onCollapse:(h,b)=>{m.length||m.push(...n.value.map(($,k)=>{var T;return $<=0?o((T=d.value[k])==null?void 0:T[0],0):$}));const y=n.value,C=b==="start"?h:h+1,S=b==="start"?h+1:h,E=y[C],x=y[S];if(E!==0&&x!==0)y[C]=0,y[S]+=E,m[h]=E;else{const $=E+x,k=ya(m[h],0,$),T=$-k;y[S]=k,y[C]=T}e.value.forEach(($,k)=>{$.size=y[k]})}}}function sJ(e,t){const n=w(()=>e.value.map(s=>s.size)),a=w(()=>e.value.length),l=B([]);fe([n,a,t],()=>{var c;let s=[],r=0;for(let d=0;dd+(f||0),0);if(u>1||!r){const d=1/u;s=s.map(f=>f===void 0?0:f*d)}else{const d=(1-u)/r;s=s.map(f=>f===void 0?d:f)}l.value=s});const o=s=>s*t.value;return{percentSizes:l,pxSizes:w(()=>l.value.map(o))}}const wE=Symbol("splitterRootContextKey");var rJ=ue({name:"ElSplitter",__name:"splitter",props:eJ,emits:tJ,setup(e,{emit:t}){const n=he("splitter"),a=t,l=e,o=Ot(l,"layout"),s=Ot(l,"lazy"),{containerEl:r,containerSize:u}=lJ(o),{removeChild:c,children:d,addChild:f,ChildrenSorter:v}=Zd(ht(),"ElSplitterPanel");fe(d,()=>{h.value=null,d.value.forEach((M,P)=>{M.setIndex(P)})});const{percentSizes:g,pxSizes:m}=sJ(d,u),{lazyOffset:p,movingIndex:h,onMoveStart:b,onMoving:y,onMoveEnd:C,onCollapse:S}=oJ(d,u,m,s),E=w(()=>({[n.cssVarBlockName("bar-offset")]:s.value?`${p.value}px`:void 0}));return Tt(wE,Ft({panels:d,percentSizes:g,pxSizes:m,layout:o,lazy:s,movingIndex:h,containerSize:u,onMoveStart:M=>{b(M),a("resizeStart",M,m.value)},onMoving:(M,P)=>{y(M,P),s.value||a("resize",M,m.value)},onMoveEnd:async M=>{C(),await Ae(),a("resizeEnd",M,m.value)},onCollapse:(M,P)=>{S(M,P),a("collapse",M,P,m.value)},registerPanel:f,unregisterPanel:c})),(M,P)=>(O(),H("div",{ref_key:"containerEl",ref:r,class:I([i(n).b(),i(n).e(o.value)]),style:je(E.value)},[ne(M.$slots,"default"),U(i(v)),te(" Prevent iframe touch events from breaking "),i(h)?(O(),H("div",{key:0,class:I([i(n).e("mask"),i(n).e(`mask-${o.value}`)])},null,2)):te("v-if",!0)],6))}}),iJ=rJ;function uJ(e){return e&&st(e)?e:{start:!!e,end:!!e}}function T0(e,t,n,a){return!!(e!=null&&e.collapsible.end&&t>0||n!=null&&n.collapsible.start&&a===0&&t>0)}var cJ=ue({name:"ElSplitterBar",__name:"split-bar",props:{index:{type:Number,required:!0},layout:{type:String,values:["horizontal","vertical"],default:"horizontal"},resizable:{type:Boolean,default:!0},lazy:Boolean,startCollapsible:Boolean,endCollapsible:Boolean},emits:["moveStart","moving","moveEnd","collapse"],setup(e,{emit:t}){const n=he("splitter-bar"),a=e,l=t,o=w(()=>a.layout==="horizontal"),s=w(()=>o.value?{width:0}:{height:0}),r=w(()=>({width:o.value?"16px":"100%",height:o.value?"100%":"16px",cursor:a.resizable?o.value?"ew-resize":"ns-resize":"auto",touchAction:"none"})),u=w(()=>{const y=n.e("dragger");return{[`${y}-horizontal`]:o.value,[`${y}-vertical`]:!o.value,[`${y}-active`]:!!c.value}}),c=B(null),d=y=>{a.resizable&&(c.value=[y.pageX,y.pageY],l("moveStart",a.index),window.addEventListener("mouseup",m),window.addEventListener("mousemove",v))},f=y=>{if(a.resizable&&y.touches.length===1){y.preventDefault();const C=y.touches[0];c.value=[C.pageX,C.pageY],l("moveStart",a.index),window.addEventListener("touchend",p),window.addEventListener("touchmove",g)}},v=y=>{const{pageX:C,pageY:S}=y,E=C-c.value[0],x=S-c.value[1],$=o.value?E:x;l("moving",a.index,$)},g=y=>{if(y.touches.length===1){y.preventDefault();const C=y.touches[0],S=C.pageX-c.value[0],E=C.pageY-c.value[1],x=o.value?S:E;l("moving",a.index,x)}},m=()=>{c.value=null,window.removeEventListener("mouseup",m),window.removeEventListener("mousemove",v),l("moveEnd",a.index)},p=()=>{c.value=null,window.removeEventListener("touchend",p),window.removeEventListener("touchmove",g),l("moveEnd",a.index)},h=w(()=>o.value?io:Qd),b=w(()=>o.value?ra:jl);return(y,C)=>(O(),H("div",{class:I([i(n).b()]),style:je(s.value)},[e.startCollapsible?(O(),H("div",{key:0,class:I([i(n).e("collapse-icon"),i(n).e(`${e.layout}-collapse-icon-start`)]),onClick:C[0]||(C[0]=S=>l("collapse",e.index,"start"))},[ne(y.$slots,"start-collapsible",{},()=>[(O(),oe(dt(h.value),{style:{width:"12px",height:"12px"}}))])],2)):te("v-if",!0),W("div",{class:I([i(n).e("dragger"),u.value,i(n).is("disabled",!e.resizable),i(n).is("lazy",e.resizable&&e.lazy)]),style:je(r.value),onMousedown:d,onTouchstart:f},null,38),e.endCollapsible?(O(),H("div",{key:1,class:I([i(n).e("collapse-icon"),i(n).e(`${e.layout}-collapse-icon-end`)]),onClick:C[1]||(C[1]=S=>l("collapse",e.index,"end"))},[ne(y.$slots,"end-collapsible",{},()=>[(O(),oe(dt(b.value),{style:{width:"12px",height:"12px"}}))])],2)):te("v-if",!0)],6))}}),dJ=cJ;const $0="ElSplitterPanel";var fJ=ue({name:$0,__name:"split-panel",props:nJ,emits:aJ,setup(e,{expose:t,emit:n}){const a=he("splitter-panel"),l=e,o=n,s=Fe(wE);s||rn($0,"usage: ");const{panels:r,layout:u,lazy:c,containerSize:d,pxSizes:f}=Vn(s),{registerPanel:v,unregisterPanel:g,onCollapse:m,onMoveEnd:p,onMoveStart:h,onMoving:b}=s,y=B(),C=ht(),S=C.uid,E=B(0),x=w(()=>r.value[E.value]),$=_=>{E.value=_},k=w(()=>x.value?f.value[E.value]??0:0),T=w(()=>x.value?f.value[E.value+1]??0:0),M=w(()=>x.value?r.value[E.value+1]:null),P=w(()=>{var _;return M.value?l.resizable&&((_=M.value)==null?void 0:_.resizable)&&(k.value!==0||!l.min)&&(T.value!==0||!M.value.min):!1}),N=w(()=>x.value?E.value!==r.value.length-1:!1),A=w(()=>T0(x.value,k.value,M.value,T.value)),j=w(()=>T0(M.value,T.value,x.value,k.value));function z(_){return Kd(_)?zd(_)*d.value||0:Wd(_)?Hd(_):_??0}let V=!1;fe(()=>l.size,()=>{if(!V&&x.value){if(!d.value){x.value.size=l.size;return}const _=z(l.size),F=z(l.max),L=z(l.min),K=Math.min(Math.max(_,L||0),F||_);K!==_&&o("update:size",K),x.value.size=K}}),fe(()=>{var _;return(_=x.value)==null?void 0:_.size},_=>{_!==l.size&&(V=!0,o("update:size",_),Ae(()=>V=!1))}),fe(()=>l.resizable,_=>{x.value&&(x.value.resizable=_)});const D=Ft({uid:S,getVnode:()=>C.vnode,setIndex:$,...l,collapsible:w(()=>uJ(l.collapsible))});return v(D),zt(()=>g(D)),t({splitterPanelRef:y}),(_,F)=>(O(),H(ze,null,[W("div",pt({ref_key:"panelEl",ref:y,class:[i(a).b()],style:{flexBasis:`${k.value}px`}},_.$attrs),[ne(_.$slots,"default")],16),N.value?(O(),oe(dJ,{key:0,index:E.value,layout:i(u),lazy:i(c),resizable:P.value,"start-collapsible":A.value,"end-collapsible":j.value,onMoveStart:i(h),onMoving:i(b),onMoveEnd:i(p),onCollapse:i(m)},{"start-collapsible":J(()=>[ne(_.$slots,"start-collapsible")]),"end-collapsible":J(()=>[ne(_.$slots,"end-collapsible")]),_:3},8,["index","layout","lazy","resizable","start-collapsible","end-collapsible","onMoveStart","onMoving","onMoveEnd","onCollapse"])):te("v-if",!0)],64))}}),SE=fJ;const pJ=ut(iJ,{SplitPanel:SE}),vJ=un(SE),tl="ElInfiniteScroll",hJ={delay:{type:Number,default:200},distance:{type:Number,default:0},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},Rm=(e,t)=>Object.entries(hJ).reduce((n,[a,l])=>{const{type:o,default:s}=l,r=e.getAttribute(`infinite-scroll-${a}`);let u=t[r]??r??s;return u=u==="false"?!1:u,u=o(u),n[a]=Number.isNaN(u)?s:u,n},{}),CE=e=>{const{observer:t}=e[tl];t&&(t.disconnect(),delete e[tl].observer)},mJ=(e,t)=>{const{container:n,containerEl:a,instance:l,observer:o,lastScrollTop:s}=e[tl],{disabled:r,distance:u}=Rm(e,l),{clientHeight:c,scrollHeight:d,scrollTop:f}=a,v=f-s;if(e[tl].lastScrollTop=f,o||r||v<0)return;let g=!1;if(n===e)g=d-(c+f)<=u;else{const{clientTop:m,scrollHeight:p}=e,h=gv(e,a);g=f+c>=h+m+p-u}g&&t.call(l)};function dp(e,t){const{containerEl:n,instance:a}=e[tl],{disabled:l}=Rm(e,a);l||n.clientHeight===0||(n.scrollHeight<=n.clientHeight?t.call(a):CE(e))}const gJ={async mounted(e,t){const{instance:n,value:a}=t;Ol({scope:tl,from:"the directive v-infinite-scroll",replacement:"the el-scrollbar infinite scroll",version:"3.0.0",ref:"https://element-plus.org/en-US/component/scrollbar#infinite-scroll"},!0),We(a)||rn(tl,"'v-infinite-scroll' binding value must be a function"),await Ae();const{delay:l,immediate:o}=Rm(e,n),s=wh(e,!0),r=s===window?document.documentElement:s,u=No(mJ.bind(null,e,a),l);if(s){if(e[tl]={instance:n,container:s,containerEl:r,delay:l,cb:a,onScroll:u,lastScrollTop:r.scrollTop},o){const c=new MutationObserver(No(dp.bind(null,e,a),50));e[tl].observer=c,c.observe(e,{childList:!0,subtree:!0}),dp(e,a)}s.addEventListener("scroll",u)}},unmounted(e){if(!e.ElInfiniteScroll)return;const{container:t,onScroll:n}=e[tl];t==null||t.removeEventListener("scroll",n),CE(e)},async updated(e){if(!e.ElInfiniteScroll)await Ae();else{const{containerEl:t,cb:n,observer:a}=e[tl];t.clientHeight&&a&&dp(e,n)}}},_v=gJ;_v.install=e=>{e.directive("InfiniteScroll",_v)};const bJ=_v;function yJ(e,t){let n,a=!1;const l=B(!1),o=Ft({...e,originalPosition:"",originalOverflow:"",visible:!1});function s(m){o.text=m}function r(){if(a)return;a=!0;const m=o.parent,p=g.ns||g._.exposed.ns;if(!m.vLoadingAddClassList){let b=m.getAttribute("loading-number");b=Number.parseInt(b)-1,b?m.setAttribute("loading-number",b.toString()):(sa(m,p.bm("parent","relative")),m.removeAttribute("loading-number")),sa(m,p.bm("parent","hidden"))}u(),v.unmount();const h=g.$;h.vnode.el=null,h.subTree=null,v._container=null}function u(){var m,p;(p=(m=g.$el)==null?void 0:m.parentNode)==null||p.removeChild(g.$el)}function c(){var m;e.beforeClose&&!e.beforeClose()||(l.value=!0,clearTimeout(n),n=setTimeout(d,400),o.visible=!1,(m=e.closed)==null||m.call(e))}function d(){if(!l.value)return;const m=o.parent;l.value=!1,m.vLoadingAddClassList=void 0,r()}const v=uw(ue({name:"ElLoading",setup(m,{expose:p}){const{ns:h,zIndex:b}=lf("loading");return p({ns:h,zIndex:b}),()=>{const y=o.spinner||o.svg,C=Ge("svg",{class:"circular",viewBox:o.svgViewBox?o.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},y?void 0:[Ge("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),S=o.text?Ge("p",{class:h.b("text")},[o.text]):void 0;return Ge(Fn,{name:h.b("fade"),onAfterLeave:d},{default:J(()=>[ft(U("div",{style:{backgroundColor:o.background||""},class:[h.b("mask"),o.customClass,h.is("fullscreen",o.fullscreen)]},[Ge("div",{class:h.b("spinner")},[C,S])]),[[At,o.visible]])])})}}}));Object.assign(v._context,t??{});const g=v.mount(document.createElement("div"));return{...Vn(o),setText:s,removeElLoadingChild:u,close:c,handleAfterLeave:d,vm:g,get $el(){return a?null:g.$el}}}let Uu;const ar=function(e={},t){if(!It)return;const n=wJ(e);if(n.fullscreen&&Uu)return Uu;const a=yJ({...n,closed:()=>{var o;(o=n.closed)==null||o.call(n),n.fullscreen&&(Uu=void 0)}},t??ar._context);SJ(n,n.parent,a),O0(n,n.parent,a),n.parent.vLoadingAddClassList=()=>O0(n,n.parent,a);let l=n.parent.getAttribute("loading-number");return l?l=`${Number.parseInt(l)+1}`:l="1",n.parent.setAttribute("loading-number",l),n.parent.appendChild(a.$el),Ae(()=>a.visible.value=n.visible),n.fullscreen&&(Uu=a),a},wJ=e=>{let t;return De(e.target)?t=document.querySelector(e.target)??document.body:t=e.target||document.body,{parent:t===document.body||e.body?document.body:t,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:t===document.body&&(e.fullscreen??!0),lock:e.lock??!1,customClass:e.customClass||"",visible:e.visible??!0,beforeClose:e.beforeClose,closed:e.closed,target:t}},SJ=async(e,t,n)=>{const{nextZIndex:a}=n.vm.zIndex||n.vm._.exposed.zIndex,l={};if(e.fullscreen)n.originalPosition.value=Sl(document.body,"position"),n.originalOverflow.value=Sl(document.body,"overflow"),l.zIndex=a();else if(e.parent===document.body){n.originalPosition.value=Sl(document.body,"position"),await Ae();for(const o of["top","left"]){const s=o==="top"?"scrollTop":"scrollLeft";l[o]=`${e.target.getBoundingClientRect()[o]+document.body[s]+document.documentElement[s]-Number.parseInt(Sl(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])l[o]=`${e.target.getBoundingClientRect()[o]}px`}else n.originalPosition.value=Sl(t,"position");for(const[o,s]of Object.entries(l))n.$el.style[o]=s},O0=(e,t,n)=>{const a=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?sa(t,a.bm("parent","relative")):Ba(t,a.bm("parent","relative")),e.fullscreen&&e.lock?Ba(t,a.bm("parent","hidden")):sa(t,a.bm("parent","hidden"))};ar._context=null;const ni=Symbol("ElLoading"),ns=e=>`element-loading-${co(e)}`,N0=(e,t)=>{const n=t.instance,a=c=>st(t.value)?t.value[c]:void 0,l=c=>{const d=De(c)&&(n==null?void 0:n[c])||c;return B(d)},o=c=>l(a(c)||e.getAttribute(ns(c))),s=a("fullscreen")??t.modifiers.fullscreen,r={text:o("text"),svg:o("svg"),svgViewBox:o("svgViewBox"),spinner:o("spinner"),background:o("background"),customClass:o("customClass"),fullscreen:s,target:a("target")??(s?void 0:e),body:a("body")??t.modifiers.body,lock:a("lock")??t.modifiers.lock},u=ar(r);u._context=mi._context,e[ni]={options:r,instance:u}},CJ=(e,t)=>{for(const n of Object.keys(e))Qt(e[n])&&(e[n].value=t[n])},mi={mounted(e,t){t.value&&N0(e,t)},updated(e,t){const n=e[ni];if(!t.value){n==null||n.instance.close(),e[ni]=null;return}n?CJ(n.options,st(t.value)?t.value:{text:e.getAttribute(ns("text")),svg:e.getAttribute(ns("svg")),svgViewBox:e.getAttribute(ns("svgViewBox")),spinner:e.getAttribute(ns("spinner")),background:e.getAttribute(ns("background")),customClass:e.getAttribute(ns("customClass"))}):N0(e,t)},unmounted(e){var t;(t=e[ni])==null||t.instance.close(),e[ni]=null}};mi._context=null;const kJ={install(e){ar._context=e._context,mi._context=e._context,e.directive("loading",mi),e.config.globalProperties.$loading=ar},directive:mi,service:ar},kE=["primary","success","info","warning","error"],EE=["top","top-left","top-right","bottom","bottom-left","bottom-right"],ta=dn({customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,placement:void 0,zIndex:0,grouping:!1,repeatNum:1,appendTo:It?document.body:void 0}),EJ=$e({customClass:{type:G([String,Array,Object,Boolean]),default:ta.customClass},dangerouslyUseHTMLString:{type:Boolean,default:ta.dangerouslyUseHTMLString},duration:{type:Number,default:ta.duration},icon:{type:Ut,default:ta.icon},id:{type:String,default:ta.id},message:{type:G([String,Object,Function]),default:ta.message},onClose:{type:G(Function),default:ta.onClose},showClose:{type:Boolean,default:ta.showClose},type:{type:String,values:kE,default:ta.type},plain:{type:Boolean,default:ta.plain},offset:{type:Number,default:ta.offset},placement:{type:String,values:EE,default:ta.placement},zIndex:{type:Number,default:ta.zIndex},grouping:{type:Boolean,default:ta.grouping},repeatNum:{type:Number,default:ta.repeatNum}}),xJ={destroy:()=>!0},ol=hd({}),TJ=e=>(ol[e]||(ol[e]=hd([])),ol[e]),$J=(e,t)=>{const n=ol[t]||[],a=n.findIndex(s=>s.id===e),l=n[a];let o;return a>0&&(o=n[a-1]),{current:l,prev:o}},OJ=(e,t)=>{const{prev:n}=$J(e,t);return n?n.vm.exposed.bottom.value:0},NJ=(e,t,n)=>(ol[n]||[]).findIndex(a=>a.id===e)>0?16:t,MJ=["id"],IJ=["innerHTML"];var PJ=ue({name:"ElMessage",__name:"message",props:EJ,emits:xJ,setup(e,{expose:t,emit:n}){const{Close:a}=Vh,l=e,o=n,s=B(!1),{ns:r,zIndex:u}=lf("message"),{currentZIndex:c,nextZIndex:d}=u,f=B(),v=B(!1),g=B(0);let m;const p=w(()=>l.type?l.type==="error"?"danger":l.type:"info"),h=w(()=>{const A=l.type;return{[r.bm("icon",A)]:A&&Ho[A]}}),b=w(()=>l.icon||Ho[l.type]||""),y=w(()=>l.placement||"top"),C=w(()=>OJ(l.id,y.value)),S=w(()=>Math.max(NJ(l.id,l.offset,y.value)+C.value,l.offset)),E=w(()=>g.value+S.value),x=w(()=>y.value.includes("left")?r.is("left"):y.value.includes("right")?r.is("right"):r.is("center")),$=w(()=>y.value.startsWith("top")?"top":"bottom"),k=w(()=>({[$.value]:`${S.value}px`,zIndex:c.value}));function T(){l.duration!==0&&({stop:m}=dr(()=>{P()},l.duration))}function M(){m==null||m()}function P(){v.value=!1,Ae(()=>{var A;s.value||((A=l.onClose)==null||A.call(l),o("destroy"))})}function N(A){Gt(A)===ye.esc&&P()}return mt(()=>{T(),d(),v.value=!0}),fe(()=>l.repeatNum,()=>{M(),T()}),Ht(document,"keydown",N),on(f,()=>{g.value=f.value.getBoundingClientRect().height}),t({visible:v,bottom:E,close:P}),(A,j)=>(O(),oe(Fn,{name:i(r).b("fade"),onBeforeEnter:j[0]||(j[0]=z=>s.value=!0),onBeforeLeave:e.onClose,onAfterLeave:j[1]||(j[1]=z=>A.$emit("destroy")),persisted:""},{default:J(()=>[ft(W("div",{id:e.id,ref_key:"messageRef",ref:f,class:I([i(r).b(),{[i(r).m(e.type)]:e.type},i(r).is("closable",e.showClose),i(r).is("plain",e.plain),i(r).is("bottom",$.value==="bottom"),x.value,e.customClass]),style:je(k.value),role:"alert",onMouseenter:M,onMouseleave:T},[e.repeatNum>1?(O(),oe(i(mC),{key:0,value:e.repeatNum,type:p.value,class:I(i(r).e("badge"))},null,8,["value","type","class"])):te("v-if",!0),b.value?(O(),oe(i(Ve),{key:1,class:I([i(r).e("icon"),h.value])},{default:J(()=>[(O(),oe(dt(b.value)))]),_:1},8,["class"])):te("v-if",!0),!e.dangerouslyUseHTMLString||A.$slots.default?(O(),H("p",{key:2,class:I(i(r).e("content"))},[ne(A.$slots,"default",{},()=>[it(Se(e.message),1)])],2)):(O(),H(ze,{key:3},[te(" Caution here, message could've been compromised, never use user's input as message "),W("p",{class:I(i(r).e("content")),innerHTML:e.message},null,10,IJ)],2112)),e.showClose?(O(),oe(i(Ve),{key:4,class:I(i(r).e("closeBtn")),onClick:Je(P,["stop"])},{default:J(()=>[U(i(a))]),_:1},8,["class"])):te("v-if",!0)],46,MJ),[[At,v.value]])]),_:3},8,["name","onBeforeLeave"]))}}),RJ=PJ;let _J=1;const AJ=e=>{if(!e.appendTo)e.appendTo=document.body;else if(De(e.appendTo)){let t=document.querySelector(e.appendTo);wa(t)||(Kt("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body),e.appendTo=t}},LJ=e=>{!e.placement&&De(aa.placement)&&aa.placement&&(e.placement=aa.placement),e.placement||(e.placement="top"),EE.includes(e.placement)||(Kt("ElMessage",`Invalid placement: ${e.placement}. Falling back to 'top'.`),e.placement="top")},xE=e=>{const t=!e||De(e)||Jt(e)||We(e)?{message:e}:e,n={...ta,...t};return AJ(n),LJ(n),Wt(aa.grouping)&&!n.grouping&&(n.grouping=aa.grouping),He(aa.duration)&&n.duration===3e3&&(n.duration=aa.duration),He(aa.offset)&&n.offset===16&&(n.offset=aa.offset),Wt(aa.showClose)&&!n.showClose&&(n.showClose=aa.showClose),Wt(aa.plain)&&!n.plain&&(n.plain=aa.plain),n},DJ=e=>{const t=e.props.placement||"top",n=ol[t],a=n.indexOf(e);if(a===-1)return;n.splice(a,1);const{handler:l}=e;l.close()},BJ=({appendTo:e,...t},n)=>{const a=`message_${_J++}`,l=t.onClose,o=document.createElement("div"),s={...t,id:a,onClose:()=>{l==null||l(),DJ(c)},onDestroy:()=>{Fo(null,o)}},r=U(RJ,s,We(s.message)||Jt(s.message)?{default:We(s.message)?s.message:()=>s.message}:null);r.appContext=n||Ms._context,Fo(r,o),e.appendChild(o.firstElementChild);const u=r.component,c={id:a,vnode:r,vm:u,handler:{close:()=>{u.exposed.close()}},props:r.component.props};return c},Ms=(e={},t)=>{if(!It)return{close:()=>{}};const n=xE(e),a=TJ(n.placement||"top");if(n.grouping&&a.length){const o=a.find(({vnode:s})=>{var r;return((r=s.props)==null?void 0:r.message)===n.message});if(o)return o.props.repeatNum+=1,o.props.type=n.type,o.handler}if(He(aa.max)&&a.length>=aa.max)return{close:()=>{}};const l=BJ(n,t);return a.push(l),l.handler};kE.forEach(e=>{Ms[e]=(t={},n)=>{const a=xE(t);return Ms({...a,type:e},n)}});function VJ(e){for(const t in ol)if(Dt(ol,t)){const n=[...ol[t]];for(const a of n)(!e||e===a.props.type)&&a.handler.close()}}function FJ(e){ol[e]&&[...ol[e]].forEach(t=>t.handler.close())}Ms.closeAll=VJ;Ms.closeAllByPlacement=FJ;Ms._context=null;const Xn=qS(Ms,"$message");var zJ=ue({name:"ElMessageBox",directives:{TrapFocus:DD},components:{ElButton:Bn,ElFocusTrap:Mr,ElInput:Yn,ElOverlay:rm,ElIcon:Ve,...Vh},inheritAttrs:!1,props:{buttonSize:{type:String,validator:k2},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:n,zIndex:a,ns:l,size:o}=lf("message-box",w(()=>e.buttonSize)),{t:s}=n,{nextZIndex:r}=a,u=B(!1),c=Ft({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",cancelButtonType:"",confirmButtonType:"primary",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:$l(rl),cancelButtonLoadingIcon:$l(rl),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:r()}),d=w(()=>{const D=c.type;return{[l.bm("icon",D)]:D&&Ho[D]}}),f=Gn(),v=Gn(),g=w(()=>{const D=c.type;return c.icon||D&&Ho[D]||""}),m=w(()=>!!c.message),p=B(),h=B(),b=B(),y=B(),C=B(),S=w(()=>c.confirmButtonClass);fe(()=>c.inputValue,async D=>{await Ae(),e.boxType==="prompt"&&D&&A()},{immediate:!0}),fe(()=>u.value,D=>{var _;D&&(e.boxType!=="prompt"&&(c.autofocus?b.value=((_=C.value)==null?void 0:_.$el)??p.value:b.value=p.value),c.zIndex=r()),e.boxType==="prompt"&&(D?Ae().then(()=>{y.value&&y.value.$el&&(c.autofocus?b.value=j()??p.value:b.value=p.value)}):(c.editorErrorMessage="",c.validateError=!1))});const E=w(()=>e.draggable),x=w(()=>e.overflow),{isDragging:$}=iS(p,h,E,x);mt(async()=>{await Ae(),e.closeOnHashChange&&window.addEventListener("hashchange",k)}),zt(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",k)});function k(){u.value&&(u.value=!1,Ae(()=>{c.action&&t("action",c.action)}))}const T=()=>{e.closeOnClickModal&&N(c.distinguishCancelAndClose?"close":"cancel")},M=Mh(T),P=D=>{var _;if(c.inputType!=="textarea"&&!((_=y.value)!=null&&_.isComposing))return D.preventDefault(),N("confirm")},N=D=>{var _;e.boxType==="prompt"&&D==="confirm"&&!A()||(c.action=D,c.beforeClose?(_=c.beforeClose)==null||_.call(c,D,c,k):k())},A=()=>{if(e.boxType==="prompt"){const D=c.inputPattern;if(D&&!D.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||s("el.messagebox.error"),c.validateError=!0,!1;const _=c.inputValidator;if(We(_)){const F=_(c.inputValue);if(F===!1)return c.editorErrorMessage=c.inputErrorMessage||s("el.messagebox.error"),c.validateError=!0,!1;if(De(F))return c.editorErrorMessage=F,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},j=()=>{var _;const D=(_=y.value)==null?void 0:_.$refs;return(D==null?void 0:D.input)??(D==null?void 0:D.textarea)},z=()=>{N("close")},V=()=>{e.closeOnPressEscape&&z()};return e.lockScroll&&jd(u,{ns:l}),{...Vn(c),ns:l,overlayEvent:M,visible:u,hasMessage:m,typeClass:d,contentId:f,inputId:v,btnSize:o,iconComponent:g,confirmButtonClasses:S,rootRef:p,focusStartRef:b,headerRef:h,inputRef:y,isDragging:$,confirmRef:C,doClose:k,handleClose:z,onCloseRequested:V,handleWrapperClick:T,handleInputEnter:P,handleAction:N,t:s}}});const HJ=["aria-label","aria-describedby"],KJ=["aria-label"],WJ=["id"];function jJ(e,t,n,a,l,o){const s=_t("el-icon"),r=_t("el-input"),u=_t("el-button"),c=_t("el-focus-trap"),d=_t("el-overlay");return O(),oe(Fn,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=f=>e.$emit("vanish")),persisted:""},{default:J(()=>[ft(U(d,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:J(()=>[W("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:I(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...f)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...f)),onMousedown:t[9]||(t[9]=(...f)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...f)),onMouseup:t[10]||(t[10]=(...f)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...f))},[U(c,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:J(()=>[W("div",{ref:"rootRef",class:I([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:je(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=Je(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(O(),H("div",{key:0,ref:"headerRef",class:I([e.ns.e("header"),{"show-close":e.showClose}])},[W("div",{class:I(e.ns.e("title"))},[e.iconComponent&&e.center?(O(),oe(s,{key:0,class:I([e.ns.e("status"),e.typeClass])},{default:J(()=>[(O(),oe(dt(e.iconComponent)))]),_:1},8,["class"])):te("v-if",!0),W("span",null,Se(e.title),1)],2),e.showClose?(O(),H("button",{key:0,type:"button",class:I(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=an(Je(f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[U(s,{class:I(e.ns.e("close"))},{default:J(()=>[(O(),oe(dt(e.closeIcon||"close")))]),_:1},8,["class"])],42,KJ)):te("v-if",!0)],2)):te("v-if",!0),W("div",{id:e.contentId,class:I(e.ns.e("content"))},[W("div",{class:I(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(O(),oe(s,{key:0,class:I([e.ns.e("status"),e.typeClass])},{default:J(()=>[(O(),oe(dt(e.iconComponent)))]),_:1},8,["class"])):te("v-if",!0),e.hasMessage?(O(),H("div",{key:1,class:I(e.ns.e("message"))},[ne(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(O(),oe(dt(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(O(),oe(dt(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:Se(e.message)},null,8,["for","textContent"]))])],2)):te("v-if",!0)],2),ft(W("div",{class:I(e.ns.e("input"))},[U(r,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=f=>e.inputValue=f),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:I({invalid:e.validateError}),onKeydown:an(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),W("div",{class:I(e.ns.e("errormsg")),style:je({visibility:e.editorErrorMessage?"visible":"hidden"})},Se(e.editorErrorMessage),7)],2),[[At,e.showInput]])],10,WJ),e.showCancelButton||e.showConfirmButton?(O(),H("div",{key:1,class:I(e.ns.e("btns"))},[e.showCancelButton?(O(),oe(u,{key:0,type:e.cancelButtonType==="text"?"":e.cancelButtonType,text:e.cancelButtonType==="text",loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:I([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=f=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=an(Je(f=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:J(()=>[it(Se(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","size"])):te("v-if",!0),ft(U(u,{ref:"confirmRef",type:e.confirmButtonType==="text"?"":e.confirmButtonType,text:e.confirmButtonType==="text",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:I([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=f=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=an(Je(f=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:J(()=>[it(Se(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","disabled","size"]),[[At,e.showConfirmButton]])],2)):te("v-if",!0)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,HJ)]),_:3},8,["z-index","overlay-class","mask"]),[[At,e.visible]])]),_:3})}var qJ=Rn(zJ,[["render",jJ]]);const Gi=new Map,YJ=e=>{let t=document.body;return e.appendTo&&(De(e.appendTo)&&(t=document.querySelector(e.appendTo)),wa(e.appendTo)&&(t=e.appendTo),wa(t)||(Kt("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body)),t},fp=(e,t)=>{var a;const n=(a=e.component)==null?void 0:a.proxy;return()=>n.handleAction(t)},UJ=(e,t,n=null)=>{const a=U(qJ,e,We(e.message)||Jt(e.message)?{default:We(e.message)?()=>e.message({confirm:fp(a,"confirm"),cancel:fp(a,"cancel"),close:fp(a,"close")}):()=>e.message}:null);return a.appContext=n,Fo(a,t),YJ(e).appendChild(t.firstElementChild),a.component},GJ=()=>document.createElement("div"),XJ=(e,t)=>{const n=GJ();e.onVanish=()=>{Fo(null,n),Gi.delete(l)},e.onAction=o=>{const s=Gi.get(l);let r;e.showInput?r={value:l.inputValue,action:o}:r=o,e.callback?e.callback(r,a.proxy):o==="cancel"||o==="close"?e.distinguishCancelAndClose&&o!=="cancel"?s.reject("close"):s.reject("cancel"):s.resolve(r)};const a=UJ(e,n,t),l=a.proxy;for(const o in e)Dt(e,o)&&!Dt(l.$props,o)&&(o==="closeIcon"&&st(e[o])?l[o]=$l(e[o]):l[o]=e[o]);return l.visible=!0,l};function Pr(e,t=null){if(!It)return Promise.reject();let n;return De(e)||Jt(e)?e={message:e}:n=e.callback,new Promise((a,l)=>{const o=XJ(e,t??Pr._context);Gi.set(o,{options:e,callback:n,resolve:a,reject:l})})}const JJ=["alert","confirm","prompt"],ZJ={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};JJ.forEach(e=>{Pr[e]=QJ(e)});function QJ(e){return(t,n,a,l)=>{let o="";return st(n)?(a=n,o=""):xt(n)?o="":o=n,Pr(Object.assign({title:o,message:t,type:"",...ZJ[e]},a,{boxType:e}),l)}}Pr.close=()=>{Gi.forEach((e,t)=>{t.doClose()}),Gi.clear()};Pr._context=null;const To=Pr;To.install=e=>{To._context=e._context,e.config.globalProperties.$msgbox=To,e.config.globalProperties.$messageBox=To,e.config.globalProperties.$alert=To.alert,e.config.globalProperties.$confirm=To.confirm,e.config.globalProperties.$prompt=To.prompt};const kc=To,TE=["primary","success","info","warning","error"],eZ=$e({customClass:{type:G([String,Array,Object,Boolean]),default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:Ut},id:{type:String,default:""},message:{type:G([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:G(Function),default:()=>{}},onClose:{type:G(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...TE,""],default:""},zIndex:Number,closeIcon:{type:Ut,default:Ya},progress:{type:G([Boolean,Object]),default:!1},pauseOnHover:{type:Boolean,default:!0}}),tZ={destroy:()=>!0},nZ=["id"],aZ=["textContent"],lZ={key:0},oZ=["innerHTML"];var sZ=ue({name:"ElNotification",__name:"notification",props:eZ,emits:tZ,setup(e,{expose:t}){const n=e,{ns:a,zIndex:l}=lf("notification"),{nextZIndex:o,currentZIndex:s}=l,r=B(!1);let u;const c=B(100);let d=0,f=0;const v=w(()=>{const A=n.type;return A&&Ho[n.type]?a.m(A):""}),g=w(()=>!!n.progress&&n.duration>0),m=w(()=>{switch(n.type){case"success":return"success";case"warning":return"warning";case"error":return"exception";default:return}}),p=w(()=>({status:m.value,strokeWidth:3,showText:!1,...typeof n.progress=="object"?n.progress:void 0})),h=w(()=>n.type&&Ho[n.type]||n.icon),b=w(()=>n.position.endsWith("right")?"right":"left"),y=w(()=>n.position.startsWith("top")?"top":"bottom"),C=w(()=>({[y.value]:`${n.offset}px`,zIndex:n.zIndex??s.value})),{pause:S,resume:E}=GP(()=>{c.value=Math.max(0,100-(d+Date.now()-f)/n.duration*100)},100,{immediate:!1});function x(){if(n.duration<=0)return;u==null||u(),S(),f=Date.now();const A=Math.max(0,n.duration-d);({stop:u}=dr(()=>{r.value&&P()},A)),g.value&&(c.value=A/n.duration*100,E())}function $(){u==null||u(),S(),f>0&&(d+=Date.now()-f,f=0)}let k=!1;function T(){k=!0,n.pauseOnHover&&$()}function M(){k=!1,n.pauseOnHover&&x()}function P(){r.value=!1,$()}function N(A){switch(Gt(A)){case ye.delete:case ye.backspace:$();break;case ye.esc:r.value&&P();break;default:if(k&&n.pauseOnHover)break;$(),x()}}return mt(()=>{x(),o(),r.value=!0}),Ht(document,"keydown",N),t({visible:r,close:P}),(A,j)=>(O(),oe(Fn,{name:i(a).b("fade"),onBeforeLeave:e.onClose,onAfterLeave:j[1]||(j[1]=z=>A.$emit("destroy")),persisted:""},{default:J(()=>[ft(W("div",{id:e.id,class:I([i(a).b(),e.customClass,b.value]),style:je(C.value),role:"alert",onMouseenter:T,onMouseleave:M,onClick:j[0]||(j[0]=(...z)=>e.onClick&&e.onClick(...z))},[h.value?(O(),oe(i(Ve),{key:0,class:I([i(a).e("icon"),v.value])},{default:J(()=>[(O(),oe(dt(h.value)))]),_:1},8,["class"])):te("v-if",!0),W("div",{class:I(i(a).e("group"))},[W("h2",{class:I(i(a).e("title")),textContent:Se(e.title)},null,10,aZ),ft(W("div",{class:I(i(a).e("content")),style:je(e.title?void 0:{margin:0})},[ne(A.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(O(),H(ze,{key:1},[te(" Caution here, message could've been compromised, never use user's input as message "),W("p",{innerHTML:e.message},null,8,oZ)],2112)):(O(),H("p",lZ,Se(e.message),1))])],6),[[At,e.message]]),e.showClose?(O(),oe(i(Ve),{key:0,class:I(i(a).e("closeBtn")),onClick:Je(P,["stop"])},{default:J(()=>[(O(),oe(dt(e.closeIcon)))]),_:1},8,["class"])):te("v-if",!0)],2),g.value?(O(),H("div",{key:1,class:I(i(a).e("progress")),"aria-hidden":"true"},[U(i(pm),pt(p.value,{percentage:c.value}),null,16,["percentage"])],2)):te("v-if",!0)],46,nZ),[[At,r.value]])]),_:3},8,["name","onBeforeLeave"]))}}),rZ=sZ;const Cr={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},rd=16;let iZ=1;const Is=function(e={},t){if(!It)return{close:()=>{}};(De(e)||Jt(e))&&(e={message:e});const n=e.position||"top-right";let a=e.offset||0;Cr[n].forEach(({vm:d})=>{var f;a+=(((f=d.el)==null?void 0:f.offsetHeight)||0)+rd}),a+=rd;const l=`notification_${iZ++}`,o=e.onClose,s={...e,offset:a,id:l,onClose:()=>{uZ(l,n,o)}};let r=document.body;wa(e.appendTo)?r=e.appendTo:De(e.appendTo)&&(r=document.querySelector(e.appendTo)),wa(r)||(Kt("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),r=document.body);const u=document.createElement("div"),c=U(rZ,s,We(s.message)?s.message:Jt(s.message)?()=>s.message:null);return c.appContext=xt(t)?Is._context:t,c.props.onDestroy=()=>{Fo(null,u)},Fo(c,u),Cr[n].push({vm:c}),r.appendChild(u.firstElementChild),{close:()=>{c.component.exposed.close()}}};TE.forEach(e=>{Is[e]=(t={},n)=>((De(t)||Jt(t))&&(t={message:t}),Is({...t,type:e},n))});function uZ(e,t,n){const a=Cr[t],l=a.findIndex(({vm:c})=>{var d;return((d=c.component)==null?void 0:d.props.id)===e});if(l===-1)return;const{vm:o}=a[l];if(!o)return;n==null||n(o);const s=o.el.offsetHeight,r=t.split("-")[0];a.splice(l,1);const u=a.length;if(!(u<1))for(let c=l;c{t.component.exposed.close()})}function dZ(e="top-right"){var n,a,l,o;let t=((l=(a=(n=Cr[e][0])==null?void 0:n.vm.component)==null?void 0:a.props)==null?void 0:l.offset)||0;for(const{vm:s}of Cr[e])s.component.props.offset=t,t+=(((o=s.el)==null?void 0:o.offsetHeight)||0)+rd}Is.closeAll=cZ;Is.updateOffsets=dZ;Is._context=null;const fZ=qS(Is,"$notify"),pZ=$e({...As(Xr,["ariaLabel","gpuAcceleration","rawContent"]),placement:Cv.placement,tabindex:Cv.tabindex,effect:{...Xr.effect,default:"light"},title:String,width:{type:[String,Number],default:150},offset:{...Xr.offset,default:void 0},persistent:{...Xr.persistent,default:!0}}),vZ={"update:visible":e=>Wt(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0};({...As(OL,["gpuAcceleration"])});var hZ=ue({name:"ElPopover",__name:"popover",props:pZ,emits:vZ,setup(e,{expose:t,emit:n}){const a=e,l=n,o=w(()=>{const b=zn.props,y=me(b)?b:Object.keys(b);return Ll(a,y)}),s=he("popover"),r=B(),u=w(()=>{var b;return(b=i(r))==null?void 0:b.popperRef}),c=w(()=>[{width:fn(a.width)},a.popperStyle]),d=w(()=>[s.b(),a.popperClass,{[s.m("plain")]:!!a.content}]),f=w(()=>a.transition===`${s.namespace.value}-fade-in-linear`),v=()=>{var b;(b=r.value)==null||b.hide()},g=()=>{l("before-enter")},m=()=>{l("before-leave")},p=()=>{l("after-enter")},h=()=>{l("update:visible",!1),l("after-leave")};return t({popperRef:u,hide:v}),(b,y)=>(O(),oe(i(zn),pt({ref_key:"tooltipRef",ref:r},o.value,{"aria-label":e.title,"popper-class":d.value,"popper-style":c.value,"gpu-acceleration":f.value,onBeforeShow:g,onBeforeHide:m,onShow:p,onHide:h}),{content:J(()=>[e.title?(O(),H("div",{key:0,class:I(i(s).e("title")),role:"title"},Se(e.title),3)):te("v-if",!0),ne(b.$slots,"default",{hide:v},()=>[it(Se(e.content),1)])]),default:J(()=>[b.$slots.reference?ne(b.$slots,"reference",{key:0}):te("v-if",!0)]),_:3},16,["aria-label","popper-class","popper-style","gpu-acceleration"]))}}),mZ=hZ;const M0=(e,t)=>{var a;const n=(a=t.arg||t.value)==null?void 0:a.popperRef;n&&(n.triggerRef=e)};var gZ={mounted(e,t){M0(e,t)},updated(e,t){M0(e,t)}};const bZ="popover",$E=A4(gZ,bZ),yZ=ut(mZ,{directive:$E}),wZ="2.14.8",SZ=(e=[])=>({version:wZ,install:(n,a)=>{n[wg]||(n[wg]=!0,e.forEach(l=>n.use(l)),a&&jh(a,n,!0))}});var CZ=[B4,nA,b8,FY,E8,x8,I8,mC,z8,H8,Bn,TC,QB,aV,bV,yV,R6,Nk,B6,ll,e6,nm,U6,uF,cF,sf,Fk,BF,U8,jF,qF,YF,UF,GF,pH,Gk,CH,kH,BH,a2,JH,BK,VK,FK,f2,nL,aL,Ve,O9,p2,Yn,v2,j9,J9,aW,yW,wW,SW,CW,OW,ij,pj,yZ,dC,pm,Ok,f6,d6,Oj,Pj,j6,il,Wo,Yc,IB,e7,s7,r7,$7,P7,jk,lz,V7,F7,X7,oY,sY,VY,tU,nU,so,Tm,lB,dU,mU,gU,zn,MU,Nm,ZU,vG,zG,JG,CX,kX,PX,RX,FX,QX,pJ,vJ],kZ=[bJ,kJ,Xn,kc,fZ,$E],_m=SZ([...CZ,...kZ]);_m.install;_m.version;var EZ=_m;const Uo="xq0084";async function bo(e,t){const n=await fetch(e,t);if(n.status===401)throw Object.assign(new Error("未登录:请先在壳子登录统一账户再打开本界面"),{code:401});if(!n.ok){let a=`HTTP ${n.status}`;try{a=(await n.json()).detail||a}catch{}throw Object.assign(new Error(a),{code:n.status,status:n.status})}return n.json()}const I0=()=>bo(`/api/plugin-config/${Uo}`),xZ=e=>bo(`/api/plugin-config/${Uo}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),TZ=()=>bo(`/api/plugins/${Uo}/last-fields`),$Z=()=>bo(`/api/plugin-configs?plugin_id=${encodeURIComponent(Uo)}`),OZ=(e,t)=>bo("/api/plugin-configs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:Uo,name:e,fields:t})}),NZ=e=>bo(`/api/plugin-configs/${encodeURIComponent(Uo)}/${encodeURIComponent(e)}`,{method:"DELETE"}),MZ=e=>bo("/api/runs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:Uo,fields:e})}),IZ=e=>bo(`/api/runs/${e}`),PZ=e=>bo(`/api/runs/${e}/stop`,{method:"POST"});function RZ(e){const t=new WebSocket((location.protocol==="https:"?"wss://":"ws://")+location.host+"/ws");return t.onmessage=n=>{try{e(JSON.parse(n.data))}catch{}},t}const pp=e=>JSON.parse(JSON.stringify(e)),OE=`plugin:${Uo}:lastSavedAt`;function _Z(){try{return localStorage.getItem(OE)||""}catch{return""}}function AZ(e){try{localStorage.setItem(OE,e)}catch{}}function vp(e,t){Object.keys(e).forEach(n=>{const a=t?t[n]:void 0;a==null||a===""||(e[n]=Array.isArray(a)?[...a]:a)})}function LZ(e={}){const{defaults:t,validate:n,buildPayload:a}=e,l=Ft(t?t():{}),o=B(!1),s=B(!1),r=B(null),u=B(_Z()),c=B(!1),d=B(0),f=B(!1);let v=null,g="",m=null,p=null;const h=(F,L)=>{r.value=F?{type:F,text:L}:null};mt(async()=>{try{const F=await I0();vp(l,F)}catch(F){F.code===401&&(s.value=!0)}o.value=!0,$()}),fe(l,()=>{!o.value||c.value||(clearTimeout(p),p=setTimeout(()=>b(!1),800))},{deep:!0});async function b(F){try{await xZ(pp(l)),u.value=new Date().toLocaleTimeString("zh-CN",{hour12:!1}),AZ(u.value),F&&Xn.success("配置已保存到本机")}catch(L){L.code===401?s.value=!0:Xn.error("配置保存失败:"+L.message)}}function y(){Object.assign(l,t?t(l):{}),h(null),Xn.info("已恢复默认配置")}async function C(){try{const F=await TZ(),L=F.fields||{};if(!Object.keys(L).length){Xn.info("暂无上次执行参数");return}vp(l,L),Xn.success("已恢复上次执行参数"+(F.at?`(${F.at})`:""))}catch(F){F.code===401?s.value=!0:Xn.error("恢复上次参数失败:"+F.message)}}const S=B([]),E=B(""),x=w(()=>[{value:"",label:"当前配置(自动保存)"},...S.value.map(F=>({value:F.id,label:F.name}))]);async function $(){try{const F=await $Z();S.value=F.configs||[]}catch{}}function k(F){if(!F)return;const L=S.value.find(K=>K.id===F);L&&(vp(l,L.fields),Xn.success(`已应用方案「${L.name}」`))}async function T(){const F=S.value.find(q=>q.id===E.value);let L="";try{({value:L}=await kc.prompt("方案保存到本机(同名覆盖,密码明文保存,每套方案可绑定不同账号),供「定时任务」引用:到点自动取该方案的最新参数执行。","存为配置方案",{inputValue:F?F.name:"",confirmButtonText:"保存方案",cancelButtonText:"取消",inputPattern:/\S/,inputErrorMessage:"请输入方案名称"}))}catch{return}if(L=String(L).trim(),!L)return;const K=S.value.find(q=>q.name===L);if(K)try{await kc.confirm(`已存在同名方案「${K.name}」,保存将覆盖它的参数(多套不同配置请用不同名称)。`,"覆盖已有方案",{type:"warning",confirmButtonText:"覆盖保存",cancelButtonText:"取消"})}catch{return}try{const q=await OZ(L,pp(l));await $(),E.value=q.config?q.config.id:"",Xn.success(`方案「${L}」已保存`)}catch(q){q.code===401?s.value=!0:Xn.error("方案保存失败:"+q.message)}}async function M(){const F=S.value.find(L=>L.id===E.value);if(F){try{await kc.confirm(`删除配置方案「${F.name}」?引用它的定时任务到点会跳过触发并提示重选。`,"删除方案",{type:"warning",confirmButtonText:"删除",cancelButtonText:"取消"})}catch{return}try{await NZ(F.id),E.value="",await $(),Xn.success("方案已删除")}catch(L){Xn.error("方案删除失败:"+L.message)}}}async function P(F){if(!c.value){if(s.value)try{await I0(),s.value=!1}catch{h("error","登录态未就绪,请稍后重试");return}if(!(n&&!n(F))){await b(!1),h(null),c.value=!0,d.value=0;try{const L=a?a(l):pp(l);F&&(L.action=F),g=(await MZ(L)).run_id,A(),j()}catch(L){c.value=!1,z(),L.code===401?(s.value=!0,h("error","登录态未就绪,本次没有启动,请稍后重试")):L.code===409?h("warn","已取消加入执行队列,本次没有启动"):h("error","启动执行失败:"+L.message)}}}}async function N(){if(!(!g||f.value)){f.value=!0;try{await PZ(g),Xn.warning("已发出强制停止指令,正在终止执行进程…")}catch(F){Xn.error("停止失败:"+F.message)}finally{f.value=!1}}}function A(){v&&v.readyState<=1||(v=RZ(F=>{F.run_id&&F.run_id!==g||(F.t==="progress"?d.value=Math.max(d.value,F.pct||0):F.t==="run_done"&&(F.ok?V():F.status==="cancelled"?D(F.error):_(F.error||"执行失败")))}),v.onclose=()=>{v=null})}function j(){z(),m=setInterval(async()=>{var F;if(g)try{const L=await IZ(g);L.status==="done"?V((F=L.result)==null?void 0:F.summary):L.status==="cancelled"?D(L.error):L.status==="error"&&_(L.error||"执行失败")}catch{}},5e3)}function z(){m&&(clearInterval(m),m=null)}function V(F){z(),c.value=!1,d.value=100,F&&h("ok",F)}function D(F){z(),c.value=!1,h("warn","任务已取消:"+(F||"用户已停止"))}function _(F){z(),c.value=!1,h("error","执行失败:"+F)}return{form:l,loaded:o,needLogin:s,notice:r,lastSavedAt:u,running:c,progress:d,stopping:f,saveNow:b,resetDefaults:y,restoreLastFields:C,schemes:S,schemeSel:E,schemeOptions:x,onSchemeChange:k,saveSchemeAs:T,removeScheme:M,run:P,forceStop:N}}const DZ=(e,t)=>{const n=e.__vccOpts||e;for(const[a,l]of t)n[a]=l;return n},BZ={class:"page"},VZ={class:"toolbar"},FZ={key:0,class:"notice is-warn"},zZ={class:"n-ico"},HZ={class:"sec"},KZ={class:"sec-body"},WZ={class:"dir-ctrl"},jZ={class:"sec"},qZ={class:"sec-body"},YZ={class:"rows"},UZ={class:"row"},GZ={class:"r-ctrl"},XZ={class:"sec"},JZ={class:"sec-body"},ZZ={class:"actions"},QZ={key:2,class:"runline"},eQ={class:"pct"},tQ={__name:"App",setup(e){const t=()=>({save_dir:"D:\\资料\\人资\\银行卡更新",keep_files:30,limit_rows:0,write_hr:!1,push_webhook:"",push_secret:""}),n=($,k)=>{const T=parseInt(String($??"").trim(),10);return Number.isFinite(T)&&T>=0?T:k};function a($){return{save_dir:($.save_dir||"").trim(),keep_files:n($.keep_files,30),limit_rows:n($.limit_rows,0),write_hr:!!$.write_hr,push_webhook:($.push_webhook||"").trim(),push_secret:($.push_secret||"").trim()}}const{form:l,needLogin:o,notice:s,lastSavedAt:r,running:u,progress:c,stopping:d,saveNow:f,resetDefaults:v,restoreLastFields:g,schemeSel:m,schemeOptions:p,onSchemeChange:h,saveSchemeAs:b,removeScheme:y,run:C,forceStop:S}=LZ({defaults:t,validate(){const $=(l.push_webhook||"").trim();return $&&!/^https?:\/\//i.test($)?(Xn.warning("钉钉群机器人 Webhook 需以 http:// 或 https:// 开头"),!1):/^\d+$/.test(String(l.keep_files??0))?!0:(Xn.warning("结果留档份数需为 0 或正整数"),!1)},buildPayload:a}),E=B(!1);async function x(){E.value=!0;try{const $=await fetch("/api/dialog/directory",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:"选择输出目录",current:l.save_dir||""})}),k=await $.json().catch(()=>({}));if(!$.ok)throw new Error(k.detail||k.error||"HTTP "+$.status);k.path&&(l.save_dir=k.path)}catch($){Xn.warning("打开文件夹选择失败:"+$.message)}finally{E.value=!1}}return($,k)=>{const T=_t("el-option"),M=_t("el-select"),P=_t("el-button"),N=_t("el-input"),A=_t("el-form-item"),j=_t("el-input-number"),z=_t("el-form"),V=_t("el-switch");return O(),H("div",BZ,[W("div",VZ,[k[11]||(k[11]=W("span",{class:"spacer"},null,-1)),W("span",{class:I(["saved",{"is-idle":!i(r)}])},[k[8]||(k[8]=W("i",null,null,-1)),it(Se(i(r)?"已保存 "+i(r):"尚未保存"),1)],2),U(M,{modelValue:i(m),"onUpdate:modelValue":k[0]||(k[0]=D=>Qt(m)?m.value=D:null),class:"scheme-sel",size:"small",disabled:i(u),onChange:i(h)},{default:J(()=>[(O(!0),H(ze,null,bt(i(p),D=>(O(),oe(T,{key:D.value,label:D.label,value:D.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled","onChange"]),U(P,{size:"small",disabled:i(u),onClick:i(b)},{default:J(()=>[...k[9]||(k[9]=[it("存为方案",-1)])]),_:1},8,["disabled","onClick"]),U(P,{size:"small",text:"",type:"danger",disabled:i(u)||!i(m),onClick:i(y)},{default:J(()=>[...k[10]||(k[10]=[it("删除",-1)])]),_:1},8,["disabled","onClick"])]),i(o)?(O(),H("div",FZ,[...k[12]||(k[12]=[W("span",{class:"n-ico"},"!",-1),W("span",null,"未登录:请先在壳子登录统一账户",-1)])])):i(s)?(O(),H("div",{key:1,class:I(["notice","is-"+i(s).type])},[W("span",zZ,Se(i(s).type==="ok"?"✓":i(s).type==="error"?"✕":"!"),1),W("span",null,Se(i(s).text),1)],2)):te("",!0),W("section",HZ,[k[15]||(k[15]=W("div",{class:"sec-head"},[W("span",{class:"sec-badge"},"01"),W("span",{class:"sec-name"},"输出与留档"),W("span",{class:"sec-line"})],-1)),W("div",KZ,[U(z,{"label-position":"top"},{default:J(()=>[U(A,{label:"输出目录"},{default:J(()=>[W("div",WZ,[U(N,{modelValue:i(l).save_dir,"onUpdate:modelValue":k[1]||(k[1]=D=>i(l).save_dir=D),class:"dir-input",disabled:i(u),clearable:"",placeholder:"留空 = D:\\资料\\人资\\银行卡更新"},null,8,["modelValue","disabled"]),U(P,{class:"dir-btn",disabled:i(u)||E.value,loading:E.value,onClick:x},{default:J(()=>[...k[13]||(k[13]=[it("选择",-1)])]),_:1},8,["disabled","loading"])])]),_:1}),U(A,{label:"结果留档份数"},{default:J(()=>[U(j,{modelValue:i(l).keep_files,"onUpdate:modelValue":k[2]||(k[2]=D=>i(l).keep_files=D),min:0,max:999,step:1,disabled:i(u),"controls-position":"right"},null,8,["modelValue","disabled"])]),_:1}),k[14]||(k[14]=W("div",{class:"tip"},[it(" 每次运行生成一份 "),W("b",null,"银行卡变更核对结果_时间戳.xlsx"),it(" 与一批影像目录; 超出留档份数的历史文件自动清理,"),W("b",null,"0 = 不清理"),it("。 ")],-1))]),_:1})])]),W("section",jZ,[k[18]||(k[18]=W("div",{class:"sec-head"},[W("span",{class:"sec-badge"},"02"),W("span",{class:"sec-name"},"处理范围"),W("span",{class:"sec-line"})],-1)),W("div",qZ,[U(z,{"label-position":"top"},{default:J(()=>[U(A,{label:"最多处理条数"},{default:J(()=>[U(j,{modelValue:i(l).limit_rows,"onUpdate:modelValue":k[3]||(k[3]=D=>i(l).limit_rows=D),min:0,max:9999,step:1,disabled:i(u),"controls-position":"right"},null,8,["modelValue","disabled"])]),_:1}),k[16]||(k[16]=W("div",{class:"tip"},[it(" 自动筛选 AI 表格「银行卡-变更收集表」中 "),W("b",null,"是否更新HR系统 / 收到纸质资料 / 登记日期"),it(" 任一为空的待处理行;"),W("b",null,"0 = 处理全部"),it(",调试时可填小数字只跑前几条。 ")],-1))]),_:1}),W("div",YZ,[W("div",UZ,[k[17]||(k[17]=W("div",{class:"r-main"},[W("div",{class:"r-title"},"写入 HR 工资卡并回写台账"),W("div",{class:"r-desc"}," 核对通过 → 导入 HR「工资管理-工资卡管理」→ 回写 AI 表格「是否更新HR系统=是」; 关闭 = 只核对出表(现金发放、委托发放始终转人工) ")],-1)),W("div",GZ,[U(V,{modelValue:i(l).write_hr,"onUpdate:modelValue":k[4]||(k[4]=D=>i(l).write_hr=D),disabled:i(u)},null,8,["modelValue","disabled"])])])])])]),W("section",XZ,[k[20]||(k[20]=W("div",{class:"sec-head"},[W("span",{class:"sec-badge"},"03"),W("span",{class:"sec-name"},"钉钉群提醒"),W("span",{class:"sec-line"})],-1)),W("div",JZ,[U(z,{"label-position":"top"},{default:J(()=>[U(A,{label:"群机器人 Webhook"},{default:J(()=>[U(N,{modelValue:i(l).push_webhook,"onUpdate:modelValue":k[5]||(k[5]=D=>i(l).push_webhook=D),disabled:i(u),clearable:"",placeholder:"留空 = 只导出不推送"},null,8,["modelValue","disabled"])]),_:1}),U(A,{label:"机器人加签密钥"},{default:J(()=>[U(N,{modelValue:i(l).push_secret,"onUpdate:modelValue":k[6]||(k[6]=D=>i(l).push_secret=D),type:"password","show-password":"",disabled:i(u)||!i(l).push_webhook,clearable:"",placeholder:"机器人安全设置为「加签」时填写,否则留空"},null,8,["modelValue","disabled"])]),_:1}),k[19]||(k[19]=W("div",{class:"tip"},[it(" 仅当存在"),W("b",null,"需人工核实"),it("记录时推送异常名单摘要(文本格式,结果文件请到输出目录自取)。 ")],-1))]),_:1})])]),k[28]||(k[28]=dT('流程说明▾
① 取数:读取人资 AI 表格「银行卡-变更收集表」,筛出三项字段任一为空的待处理行。
② 下影像:集中下载银行卡卡号面照片与持卡人身份证照片(预签名地址有效期短,先下后识别)。
③ 识别比对:识别卡号、身份证号、姓名、开户银行,与表格登记值逐项比对; 变更原因含「现金」的记录不做影像核对。
④ 导入 HR:开启「写入 HR 工资卡」时,核对通过的记录按身份证匹配导入 HR 工资卡管理(主卡/工资卡),成功后回写 AI 表格「是否更新HR系统=是」,该行下次不再进待处理; 委托发放、缺开户银行等记录跳过并注明原因。
⑤ 输出:一致放行;不一致、识别不出或导入失败的进异常名单,输出核对工作簿并按需推送钉钉群提醒人事手动处理。
',1)),W("div",ZZ,[U(P,{type:"primary",class:"btn-run",loading:i(u),onClick:i(C)},{default:J(()=>[it(Se(i(u)?"执行中 "+i(c)+"%":"一键执行"),1)]),_:1},8,["loading","onClick"]),i(u)?(O(),oe(P,{key:0,type:"danger",plain:"",loading:i(d),onClick:i(S)},{default:J(()=>[...k[21]||(k[21]=[it("强制停止",-1)])]),_:1},8,["loading","onClick"])):te("",!0),k[25]||(k[25]=W("span",{class:"spacer"},null,-1)),U(P,{disabled:i(u),onClick:i(g)},{default:J(()=>[...k[22]||(k[22]=[it("恢复上次参数",-1)])]),_:1},8,["disabled","onClick"]),U(P,{disabled:i(u),onClick:k[7]||(k[7]=D=>i(f)(!0))},{default:J(()=>[...k[23]||(k[23]=[it("保存配置",-1)])]),_:1},8,["disabled"]),U(P,{text:"",disabled:i(u),onClick:i(v)},{default:J(()=>[...k[24]||(k[24]=[it("恢复默认",-1)])]),_:1},8,["disabled","onClick"])]),i(u)?(O(),H("div",QZ,[k[26]||(k[26]=W("span",{class:"pulse"},null,-1)),k[27]||(k[27]=W("span",null,"正在执行,日志与进度实时显示在工作台下方「运行日志」区",-1)),W("span",eQ,Se(i(c))+"%",1)])):te("",!0)])}}},nQ=DZ(tQ,[["__scopeId","data-v-c19f933b"]]);uw(nQ).use(EZ).mount("#app")});export default aQ();
diff --git a/plugins/XQ0001-0100/XQ0084 银行卡更新EHR系统/ui/index.html b/plugins/XQ0001-0100/XQ0084 银行卡更新EHR系统/ui/index.html
new file mode 100644
index 0000000..f6117a2
--- /dev/null
+++ b/plugins/XQ0001-0100/XQ0084 银行卡更新EHR系统/ui/index.html
@@ -0,0 +1,13 @@
+
+
+
+
+
+ 银行卡更新EHR系统
+
+
+
+
+
+
+